求传递函数,最好能在matlab中求出,给出过程
首先,先在simlink中搭出结构图:
保存为文件simlinktf.mdl
接着写如下代码:
clear all;
k1 = 2.5;
k2 = 2;
k3 = 1.5;
[a b c d] = linmod('simlinktf');
Sys = tf(minreal(ss(a,b,c,d)))
运行结果为:
Transfer function from input 1 to output...
4 s^3 + 8 s^2 - 213.3 s - 746.7
#1: ----------------------------------------------------------
s^5 + 4 s^4 + 70.67 s^3 + 366.7 s^2 + 466.7 s + 2.747e-012
-480 s - 1680
#2: ----------------------------------------------------------
s^5 + 4 s^4 + 70.67 s^3 + 366.7 s^2 + 466.7 s + 2.747e-012
Transfer function from input 2 to output...
213.3 s + 746.7
#1: ----------------------------------------------------------
s^5 + 4 s^4 + 70.67 s^3 + 366.7 s^2 + 466.7 s + 2.747e-012
4 s^3 + 8 s^2 + 480 s + 1680
#2: ----------------------------------------------------------
s^5 + 4 s^4 + 70.67 s^3 + 366.7 s^2 + 466.7 s + 2.747e-012