经典时域分析方法
以例题的形式对经典时域解法(齐次解+特解)进行说明,最后进行总结。考虑如下形式微分方程:
y ′ ′ ( t ) + 5 y ′ ( t ) + 6 y ( t ) = 2 f ′ ( t ) + 6 f ( t ) y''\left( t \right) + 5y'\left( t \right) + 6y\left( t \right) = 2f'\left( t \right) + 6f\left( t \right) y′′(t)+5y′(t)+6y(t)=2f′(t)+6f(t)
试求:当 f ( t ) = t 2 f(t)=t^2 f(t)=t2, y ( 0 ) = 1 y(0)=1 y(0)=1, y ′ ( 0 ) = 1 y'(0)=1 y′(0)=1时的全解。
解: 对于激励 f ( t ) = t 2 f(t)=t^2 f(t)=t2,查表(不同形式激励对应的特解表达式见附录)可得特解表达式为:
y p ( t ) = P 2 t 2 + P 1 t + P 0 {y_p}\left( t \right) = {P_2}{t^2} + {P_1}t + {P_0} yp(t)=P2t2+P1t+P0
建立等式关系,求解待定系数:
{ y p ′ ′ ( t ) + 5 y p ′ ( t ) + 6 y p ( t ) = 2 f ′ ( t ) + 6 f ( t ) → ( 2 P 2 ) + 5 ( 2 P 2 t + P 1 ) + 6 ( P 2 t 2 + P 1 t + P 0 ) = 4 t + 6 t 2 → ( 2 P 2 + 5 P 1 + 6 P 0 ) + ( 10 P 2 + 6 P 1 ) t + ( 6 P 2 ) t 2 = 4 t + 6 t 2 → { P 0 = 1 2 P 1 = − 1 P 2 = 1 \left\{ \begin{array}{l} y_p''\left( t \right) + 5y_p'\left( t \right) + 6y_p\left( t \right) = 2f'\left( t \right) + 6f\left( t \right)\\ \to \left( {2{P_2}} \right) + 5\left( {2{P_2}t + {P_1}} \right) + 6\left( {{P_2}{t^2} + {P_1}t + {P_0}} \right) = 4t + 6{t^2}\\ \to \left( {2{P_2} + 5{P_1} + 6{P_0}} \right) + \left( {10{P_2} + 6{P_1}} \right)t + \left( {6{P_2}} \right){t^2} = 4t + 6{t^2} \end{array} \right. \to \left\{ \begin{array}{l} {P_0} = \frac{1}{2}\\ {P_1} = - 1\\ {P_2} = 1 \end{array} \right. ⎩ ⎨ ⎧yp′′(t)+5yp′(t)+6yp(t)=2f′(t)+6f(t)→(2P2)+5(2P2t+P1)+6(P2t2+P1t+P0)=4t+6t2→(2P2+5P1+6P0)+(10P2+6P1)t+(6P2)t2=4t+6t2→⎩ ⎨ ⎧P0=21P1=−1P2=1
特解表达式为:
y p ( t ) = t 2 − t + 1 2 {y_p}\left( t \right) = {t^2} - t + \frac{1}{2} yp(t)=t2−t+21
为求解齐次解,列写微分方程对应的特征方程:
λ 2 + 5 λ + 6 = 0 \lambda^2+5\lambda+6=0 λ2+5λ+6=0
可解得两个特征根,分别为 − 2 -2 −2和 − 3 -3 −3。不同形式特征根对应的齐次解表达式见附录,查表可得齐次解的表达式为:
y h ( t ) = C 1 e − 2 t + C 2 e − 3 t {y_h}\left( t \right) = {C_1}{e^{ - 2t}} + {C_2}{e^{ - 3t}} yh(t)=C1e−2t+C2e−3t
利用初值信息求解齐次解中的待定系数,以满足初始条件,
{ y ( t ) = y h ( t ) + y p ( t ) = C 1 e − 2 t + C 2 e − 3 t + t 2 − t + 1 2 y ( 0 ) = C 1 + C 2 + 1 2 = 1 y ′ ( 0 ) = − 2 C 1 − 3 C 2 − 1 = 1 → { C 1 = 7 2 C 2 = − 3 \left\{ \begin{array}{l} y\left( t \right) = {y_h}\left( t \right) + {y_p}\left( t \right) = {C_1}{e^{ - 2t}} + {C_2}{e^{ - 3t}} + {t^2} - t + \frac{1}{2}\\ y\left( 0 \right) = {C_1} + {C_2} + \frac{1}{2}{\rm{ = 1}}\\ y'\left( 0 \right){\rm{ = }} - 2{C_1} - 3{C_2} - 1 = {\rm{1}} \end{array} \right. \to \left\{ \begin{array}{l} {C_1} = \frac{7}{2}\\ {C_2} = - 3 \end{array} \right. ⎩ ⎨ ⎧y(t)=yh(t)+yp(t)=C1e−2t+C2e−3t+t2−t+21y(0)=C1+C2+21=1y′(0)=−2C1−3C2−1=1→{C1=27C2=−3
全响应表示式为:
y ( t ) = 7 2 e − 2 t − 3 e − 3 t + t 2 − t + 1 2 y\left( t \right) = \frac{7}{2}{e^{ - 2t}} - 3{e^{ - 3t}} + {t^2} - t + \frac{1}{2} y(t)=27e−2t−3e−3t+t2−t+21
经典时域分析方法总结:
- 特解是由外部激励唯一确定的,齐次解是为了配合初始状态而存在的,先特解再全解;
- 对于初始状态会衰减为零的稳定系统,稳态解就是特解,特解就是稳态解;
- 齐次解可实现任意的初始值,零输入响应(ZIR)只需考虑齐次解以满足初始状态;
- 零状态响应(ZSR)既要考虑特解以配合输入,又要考虑齐次解以实现零状态。
冲激响应卷积法
对于任意形式的输入信号 f ( t ) f(t) f(t),均可以表示为不同幅值冲激函数的线性组合:
f ( t ) = ∫ − ∞ ∞ f ( τ ) δ ( t − τ ) d τ f\left( t \right) = \int_{ - \infty }^\infty f \left( \tau \right)\delta \left( {t - \tau } \right){\rm{d}}\tau f(t)=∫−∞∞f(τ)δ(t−τ)dτ
对于冲激信号的冲激响应 h ( t ) h\left( t \right) h(t),可通过经典时域方法进行求解(附录给出了一个具体案例):
δ ( t ) → h ( t ) \delta \left( t \right) \to h\left( t \right) δ(t)→h(t)
对于线性时不变系统,其在输入 f ( t ) f(t) f(t)下的响应,可以表示为:
f ( t ) → y ( t ) = ∫ − ∞ ∞ f ( τ ) h ( t − τ ) d τ = f ( t ) ∗ h ( t ) f\left( t \right) \to y\left( t \right) = \int_{ - \infty }^\infty f \left( \tau \right)h\left( {t - \tau } \right){\rm{d}}\tau=f \left( t \right)*h\left( t \right) f(t)→y(t)=∫−∞∞f(τ)h(t−τ)dτ=f(t)∗h(t)
冲激响应卷积法总结:
- 冲激信号具有无穷大幅值,零时刻前后向系统瞬间注入能量,使其获得初始值。零时刻之后输入变为零,故而冲激响应表现为类似ZIR的形式;
- 对于有限幅值的输入信号 f ( t ) f(t) f(t),零时刻前后系统状态不会发生突变,故而冲激响应卷积法所得响应为零状态响应;
- 对于初始状态不为零的系统,可利用经典时域法单独求解零输入响应,两者之和即为全响应。
传递函数法
卷积运算具有一定复杂性,利用卷积定理,将时域上的卷积运算转为频域上的乘积运算。时域卷积定理,如下所示:
若:
f 1 ( t ) ↔ F 1 ( s ) , f 2 ( t ) ↔ F 2 ( s ) {f_1}\left( t \right) \leftrightarrow {F_1}\left( s \right),{f_2}\left( t \right) \leftrightarrow {F_2}\left( s \right) f1(t)↔F1(s),f2(t)↔F2(s)
则:
f 1 ( t ) ∗ f 2 ( t ) ↔ F 1 ( s ) ⋅ F 2 ( s ) {f_1}\left( t \right) * {f_2}\left( t \right) \leftrightarrow {F_1}\left( s \right) \cdot {F_2}\left( s \right) f1(t)∗f2(t)↔F1(s)⋅F2(s)
于是有:
y z s ( t ) = f ( t ) ∗ h ( t ) → Y z s ( s ) = F ( s ) ⋅ H ( s ) {y_{zs}}\left( t \right) = f\left( t \right) * h\left( t \right) \to {Y_{zs}}\left( s \right) = F\left( s \right) \cdot H\left( s \right) yzs(t)=f(t)∗h(t)→Yzs(s)=F(s)⋅H(s)
其中, F ( s ) F\left( s \right) F(s)和 H ( s ) H\left( s \right) H(s)分别为 f ( t ) f(t) f(t)和 h ( t ) h(t) h(t)所对应的拉普拉斯变换; Y z s ( s ) {Y_{zs}}\left( s \right) Yzs(s)即为零状态响应 y z s ( t ) {y_{zs}}\left( t \right) yzs(t)所对应的拉普拉斯变换,经反变换,即可得到ZSR的时域表达式。
传递函数法总结:
- 传递函数法将时域信号变换到频域进行计算,达到了简化的目的;
- 传递函数法计算所得与冲激响应卷积法一致,均为零状态响应;
不同方法之间的比较
为进一步说明上述方法之间的区别,对同一问题进行分别求解。问题如下所示:
y ′ ( t ) + y ( t ) = f ( t ) , f ( t ) = ε ( t ) , y ( 0 ) = 2 y'\left( t \right) + y\left( t \right) = f\left( t \right),f\left( t \right) = \varepsilon \left( t \right),y\left( 0 \right) = 2 y′(t)+y(t)=f(t),f(t)=ε(t),y(0)=2
经典时域分析方法(特解+齐次解):
{ { y p ( t ) = 1 y h ( t ) = C e − t → y ( t ) = 1 + C e − t → y ( 0 ) = 2 y ( t ) = 1 + e − t \left\{ \begin{aligned} &\left\{ \begin{aligned} &{y_p}\left( t \right) = 1 \\ &{y_h}\left( t \right) = C{e^{ - t}} \\ \end{aligned} \right. \to y\left( t \right) = 1 + C{e^{ - t}} \\ &\xrightarrow{{y\left( 0 \right) = 2}}y\left( t \right) = 1 + {e^{ - t}} \\ \end{aligned} \right. ⎩ ⎨ ⎧{yp(t)=1yh(t)=Ce−t→y(t)=1+Ce−ty(0)=2y(t)=1+e−t
经典时域分析方法(ZIR+ZSR):
{ { y z i ( t ) = C e − t → y z i ( 0 ) = 2 y z i ( t ) = 2 e − t y z s ( t ) = y p ( t ) + y h ( t ) = 1 + C e − t → y z s ( 0 ) = 0 y z s ( t ) = 1 − e − t → y ( t ) = y z i ( t ) + y z s ( t ) = 1 + e − t \left\{ \begin{aligned} &\left\{ \begin{aligned} &{y_{zi}}\left( t \right) = C{e^{ - t}}\xrightarrow{{{y_{zi}}\left( 0 \right) = 2}}{y_{zi}}\left( t \right) = 2{e^{ - t}} \\ &{y_{zs}}\left( t \right) = {y_p}\left( t \right) + {y_h}\left( t \right) = 1 + C{e^{ - t}}\xrightarrow{{{y_{zs}}\left( 0 \right) = 0}}{y_{zs}}\left( t \right) = 1 - {e^{ - t}} \\ \end{aligned} \right. \\ &\to y\left( t \right) = {y_{zi}}\left( t \right) + {y_{zs}}\left( t \right) = 1 + {e^{ - t}} \\ \end{aligned} \right. ⎩ ⎨ ⎧⎩ ⎨ ⎧yzi(t)=Ce−tyzi(0)=2yzi(t)=2e−tyzs(t)=yp(t)+yh(t)=1+Ce−tyzs(0)=0yzs(t)=1−e−t→y(t)=yzi(t)+yzs(t)=1+e−t
冲激响应卷积法:
{ h ′ ( t ) + h ( t ) = δ ( t ) → h ( t ) = C e − t ε ( t ) − C e − t ε ( t ) + C e − t δ ( t ) + C e − t ε ( t ) = δ ( t ) → h ( t ) = e − t ε ( t ) → y z s ( t ) = ∫ − ∞ ∞ f ( τ ) h ( t − τ ) d τ = ∫ 0 t e τ − t d τ = e τ − t ∣ 0 t = 1 − e − t → y ( t ) = y z s ( t ) + y z i ( t ) = 1 − e − t + C e − t → y ( 0 ) = 2 y ( t ) = 1 + e − t \left\{ \begin{aligned} &h'\left( t \right) + h\left( t \right) = \delta \left( t \right)\xrightarrow{{h\left( t \right) = C{e^{ - t}}\varepsilon \left( t \right)}} - C{e^{ - t}}\varepsilon \left( t \right) + C{e^{ - t}}\delta \left( t \right) + C{e^{ - t}}\varepsilon \left( t \right) = \delta \left( t \right) \to h\left( t \right) = {e^{ - t}}\varepsilon \left( t \right) \\ &\to {y_{zs}}\left( t \right) = \int_{ - \infty }^\infty f \left( \tau \right)h\left( {t - \tau } \right){\text{d}}\tau = \int_0^t {{e^{\tau - t}}{\text{d}}\tau } = \left. {{e^{\tau - t}}} \right|_0^t = 1 - {e^{ - t}} \\ &\to y\left( t \right) = {y_{zs}}\left( t \right) + {y_{zi}}\left( t \right) = 1 - {e^{ - t}} + C{e^{ - t}}\xrightarrow{{y\left( 0 \right) = 2}}y\left( t \right) = 1 + {e^{ - t}} \\ \end{aligned} \right. ⎩ ⎨ ⎧h′(t)+h(t)=δ(t)h(t)=Ce−tε(t)−Ce−tε(t)+Ce−tδ(t)+Ce−tε(t)=δ(t)→h(t)=e−tε(t)→yzs(t)=∫−∞∞f(τ)h(t−τ)dτ=∫0teτ−tdτ=eτ−t 0t=1−e−t→y(t)=yzs(t)+yzi(t)=1−e−t+Ce−ty(0)=2y(t)=1+e−t
传递函数法:
{ Y z s ( s ) = H ( s ) F ( s ) = 1 1 + s 1 s = 1 s − 1 1 + s → y z s ( t ) = 1 − e − t → y ( t ) = y z s ( t ) + y z i ( t ) = 1 + e − t \left\{ \begin{aligned} &{Y_{zs}}\left( s \right) = H\left( s \right)F\left( s \right) = \frac{1}{{1 + s}}\frac{1}{s} = \frac{1}{s} - \frac{1}{{1 + s}} \\ &\to {y_{zs}}\left( t \right) = 1 - {e^{ - t}} \\ &\to y\left( t \right) = {y_{zs}}\left( t \right) + {y_{zi}}\left( t \right) = 1 + {e^{ - t}} \\ \end{aligned} \right. ⎩ ⎨ ⎧Yzs(s)=H(s)F(s)=1+s1s1=s1−1+s1→yzs(t)=1−e−t→y(t)=yzs(t)+yzi(t)=1+e−t
参考文献
参考1:信号与系统(余成波)
附录
附录1:激励与特解
附录2:特征根与齐次解
附录3:经典时域法求解冲激响应
附录4:利用Matlab进行数值求解,全响应
利用Matlab进行数值求解过程,定义 z 1 = y , z 2 = y ′ {z_1} = y,{z_2} = y' z1=y,z2=y′,从而将二阶微分方程转化为一阶微分方程组的形式,
{ z ′ 1 = z 2 z ′ 2 = 2 f ′ ( t ) + 6 f ( t ) − 5 z 2 − 6 z 1 , { z 1 ( 0 ) = 1 z 2 ( 0 ) = 1 \left\{ \begin{array}{l} {{z'}_1} = {z_2}\\ {{z'}_2} = 2f'\left( t \right) + 6f\left( t \right) - 5{z_2} - 6{z_1} \end{array} \right.,\left\{ \begin{array}{l} {z_1}\left( 0 \right) = 1\\ {z_2}\left( 0 \right) = 1 \end{array} \right. {z′1=z2z′2=2f′(t)+6f(t)−5z2−6z1,{z1(0)=1z2(0)=1
源码如下:
% define z = [z1; z2], z1 = y; z2 = y'
tspan = [0 20];
z0 = [1; 1];[t,y_num] = ode45(@myODE, tspan, z0);% 计算解析解
y_ana = zeros(size(t));
for i = 1:length(t)y_ana(i, :) = (7/2)*exp(-2*t(i)) - 3 * exp(-3*t(i)) + t(i)^2 - t(i) + 1/2;
end% 绘制结果对比
figure;
plot(t, y_num(:,1), 'r-', 'LineWidth', 2); % 数值方法结果,红色线宽为2
hold on;
plot(t, y_ana, 'b--', 'LineWidth', 2); % 正确解析方法结果,蓝色虚线线宽为2
xlabel('t');
ylabel('y(t)');
title('数值方法和正确解析方法结果对比');
legend('数值方法', '正确解析方法');
grid on;function dzdt = myODE(t,z)dzdt = [z(2); 6*t^2+4*t-5*z(2)-6*z(1)];
end
对比解析结果和数值计算结果,如下所示:
附录5:利用Matlab进行数值求解,ZSR和ZIR
类似地,利用Matlab数值求解零状态响应和零输入响应,源码如下:
% define z = [z1; z2], z1 = y; z2 = y'
tspan = [0 2];
z0_FULL = [1; 1];
z0_ZSR = [0; 0];
z0_ZIR = [1; 1];[t_full,y_full] = ode45(@myODE_FULL, tspan, z0_FULL);
[t_zsr,y_zsr] = ode45(@myODE_ZSR, tspan, z0_ZSR);
[t_zir,y_zir] = ode45(@myODE_ZIR, tspan, z0_ZIR);% 绘制结果对比
figure;
plot(t_full, y_full(:,1), 'r-', 'LineWidth', 2); % FULL response
hold on
plot(t_zsr, y_zsr(:,1), 'b--', 'LineWidth', 2); % ZSR
hold on;
plot(t_zir, y_zir(:,1), 'g:', 'LineWidth', 2); % ZIR
xlabel('t');
ylabel('y(t)');
title('Full Response VS ZSR VS ZIR');
legend('FULL', 'ZSR', 'ZIR');
grid on;function dzdt = myODE_FULL(t,z)dzdt = [z(2); 6*t^2+4*t-5*z(2)-6*z(1)];
endfunction dzdt = myODE_ZSR(t,z)dzdt = [z(2); 6*t^2+4*t-5*z(2)-6*z(1)];
endfunction dzdt = myODE_ZIR(t,z)dzdt = [z(2); -5*z(2)-6*z(1)];
end
对比零状态响应、零输入响应和全响应,如下所示: