MATLAB 里对函数因式分解后的分式进行拉氏变换
可以使用 MATLAB 中的 residue 函数对函数进行部分分式分解,然后再使用 laplace 函数进行拉氏变换。
例如,对于函数:
H(s) = (s+1) / (s^2 + 3s + 2)
可以使用 residue 函数进行部分分式分解:
[num, den] = residue([1 1], [1 3 2]);
其中,[1 1] 表示分子为 s+1, [1 3 2] 表示分母为 s^2 + 3s + 2。这样,num 和 den 分别表示得到的部分分式的分子和分母系数。
然后,就可以使用 laplace 函数进行拉氏变换:
syms t s;
Hs = num(1)/den(1)*exp(-s*t) + num(2)/den(2)*exp(-s*t/(1/2));
ht = ilaplace(Hs, s, t);
其中,num(1)/den(1) 和 num(2)/den(2) 分别对应部分分式的两个分式,exp(-s*t) 和 exp(-s*t/(1/2)) 分别对应每个分式的拉氏变换,ilaplace 函数用于反演拉氏变换,得到时域函数 ht。
原文地址: https://www.cveoy.top/t/topic/Hj2 著作权归作者所有。请勿转载和采集!