
1.3 微积分应用
微积分是微分和积分的总称。基础代数研究的对象为常量,以静止的观点研究问题;而微积分的研究对象为变量,将运动变化引入了数学研究。
微积分的发展是由数百位数学家经过了几百年的钻研、争吵甚至打斗,逐步完善发展起来的,这一过程中为后世留下了一系列璀璨的名字,法国的费马、笛卡尔、罗伯瓦、笛沙格、拉格朗日、科西,英国的巴罗、瓦里士,德国的开普勒,意大利的卡瓦列利,瑞士的雅各布·伯努利和他的兄弟约翰·伯努利、欧拉……
在这些基础积累之后,英国的牛顿(就是那位发明了惯性定律的物理学家)和德国的莱布尼茨做出了最后的冲刺,正式构建了微分和积分。但此时的微积分理论尚不完善,因此导致了欧洲大陆和英国的数学界长期的争执(都为了证明自己是微积分的鼻祖)。
19世纪初,以法国科学家柯西为首,对微积分的理论进行了认真的研究,建立了极限理论,后来又经过德国数学家维尔斯特拉斯进一步的严格化,使极限理论成为微积分的坚定基础,才使微积分进一步发展开来。
微积分是真正的变量数学,工作中变化波动的物理量的有关计算,均会用到这门数学。通过微积分,可以解决不少工程问题,如在电学里面的运算误差,就是在常量基础上的变量;又如,电机控制运动学、电容和电感上的电压和电流变化、模拟信号数字化的离散化过程,都是微积分思想的一种运用。
微分学的主要内容包括极限理论、导数、微分等;积分学的主要内容包括定积分、不定积分等。
下面先用两个比较常见的简单示例来说明极限与微积分的物理含义,这不是电学的例子,仅仅为了便于理解微积分的物理概念。
求一段曲线(见图1-1)某一点M上切线的斜率k=tanα,计算式为:


图1-1
当x无限趋近于x0时,MN这条线越来越接近于M点的切线,当x=x0时,两线完全重合,斜率相等。这就是微分的基本物理含义,即当运动量无限小时,其结果与起始点的状态无限接近,当偏差小到可以忽略,不影响实际结果时,在运算上就可以用这个近似值来替代物理上不可能测量或计算出来的实际参数值。这也是今天数字化控制的理论基础,如A/D转换器的位数选择、图像的分辨率选择、传感器的指标参数选择,都是基于极限的思维的。
另一个是积分的例子,求曲边梯形(见图1-2)的面积S,计算公式为:


图1-2
与微分物理含义同理,xn与xn+1的面积可按照矩形面积计算得出,但实际面积是曲边梯形,实际面积与计算面积会有一定误差,当Δ x=xn+1-xn无限小时,Δ S的误差影响也趋近于0,其面积的计算结果与理想面积无限接近。当偏差小到不影响实际结果,甚至可以忽略时,在运算上就可以用这个近似值来替代物理上不可能测量或计算出来的实际参数值。
另一个是无穷级数的示例(见图1-3),计算公式为:

图1-3

根据等比数列求和公式可得

上面几个例子解释了微积分的历史和物理含义,下面开始探讨微积分在电子领域的应用。在电路设计里,微积分的最基础是分析电感和电容的工作特性。
对于电感,其两边的感生电动势大小、方向与通过电感电流的瞬时变化率有关,如公式(1.6)。

对于电容,其上通过的电流大小、方向与其两端电压的瞬时变化率有关,如公式(1.7)。

例如图1-4所示的电路

图1-4
根据电工学的基尔霍夫定律可知

消去i,可得:

式中,L、C、R为常数,该电路的方程为二阶线性常系数微分方程。两边除以1/LC,可得:

可以很直观地看出非齐次线性方程的一个特解为。
其次,线性方程的特征方程为:

令,
,可得

当K>0时,有

当K=0时,有

当K<0时,有
r1=α+jβ, r2=α+jβ
式中, ,
。
线性方程的通解为:


则由此推导出U2电压波形与U1、电感、电容、电阻及时间的关系。
上面的计算过程看起来较为复杂,仅仅为了1个电感、1个电容和1个电阻的选型,进行这么复杂的计算貌似得不偿失,远不如通过多凑几次元器件参数做出实物,再通过实验测试来得快,但实际上后者需要花费很多时间、金钱和精力,得到的结果还未必是最优的。
这里另推荐一种方法——电子仿真,可以简单地用仿真软件在计算机上进行多次模拟实验,快速地得出合理的元器件参数。较常用的仿真软件有很多,如Multisim仿真软件,各个仿真软件的功能都差不多,其后台运算也是基于上面的理论基础的,不过是用计算机代替了人工计算。
用实例仿真波形说明如下图1-5所示为仿真原理图,图1-6所示为信号源设置参数,图1-7所示为仿真波形。

图1-5

图1-6

图1-7
有兴趣的读者可以将仿真出来的结果与公式(1.8)进行比对。
在微积分的计算中,有一些常用的求导基础公式,其他的计算均可以通过这些基础公式推导得出,表1-1罗列了一些求导师基础公式,供实际计算时查询和参考。
表1-1


图1-8
微积分应用案例:图1-8为MCU的上电复位电路图,通过电阻对电容充电会需要一定的时间,而复位电路是低电平有效的,试计算从Vcc加电到解除复位所需要的时间t。
解

端的输入电流很小,可以忽略,假设i电流全部流入电容,则电容上的电流大小与电容上的电压变化关系为

将i代入公式(1.9),得

求解微分方程如下:

RC被称为积分时间常数,记为T,有

当t=0时,电容从无电荷情况下的初始状态开始进入充电状态,近似于两端短路,此时U=0,将特征值t=0和U=0代入公式(1.10),求得

得出:
公式(1.10)可转化为

式中,e=2.71828,则
当t=T时,

当t=2T时,

当t=3T时,

由公式(1.10)可以看出,只有当t趋近于无穷大时,电容才可能充满,但这种情况在现实中是不能容忍的。由公式(1.11)计算结果看出,在3倍的时间常数RC的情况下,电容电压可以达到预期满电压的95%,这在工程上是可以接受的。因此在电路设计中,无论充电还是放电,都以3RC作为充电、放电完毕的计算值,这个数值在任何的充电、放电电路中都有可能会用到。