控制系统工具箱

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Amplitude
2 1.8 1.6 1.4 1.2
1 0.8 0.6 0.4 0.2
0 0
Step Response
5
10
15
20
25
30
Time (sec)
一般输入响应
响应函数 lsim
>>help lsim LSIM(SYS,U,T) plots the time response of the LTI model SYS to the input signal described by U and T. The time vector T consists of regularly spaced time samples and U is a matrix with as many columns as inputs and whose i-th row specifies the input value at time T(i). For example,
t = 0:0.01:5; u = sin(t); lsim(sys,u,t) simulates the response of a single-input model SYS to the input u(t)=sin(t) during 5 seconds.
一般输入响应
例:输入为如下分段函数:
0 t 0 u(t) 2 0 t 2
0.5 t 2
一般输入响应
源程序
g=tf([3 2],[2 4 5 1]); time=[0:0.02:10]'; u=2.0*(1+0*(time)); for ii=min(find(time>=2.0)):length(u)
传递函数
传递函数零点、极点图形表示
pzmap
O指示零点 X指示极点
Imaginary Axis
Pole-Zero Map 1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-5
-4.5 -4
-3.5 -3
-2.5 -2
-1.5 -1
-0.5
0
Real Axis
传递函数
例1:创建如下系统的TF对象,显示对象属性并 提取分子分母多项式,以行向量显示,绘制极 点-零点图 y(iv) 10y 30 y 40 y 24 y 4u 36u 32u
或者:
>> G2=zpk(-0.75,[-1;-5],4)
传递函数
两种形式互换 TF形式变换为ZPK形式
Gzpk=zpk(Gtf) [zz,pp,kk]=zpkdata(Gzpk,’v’) %获得G(s)的零点、极点和增益
ZPK形式变换为TF形式
Svv=tf(Sxx) [nn,dd]=tfdata(Svv,’v’) %获得分子分母多项式系数
解:
numG=[4 36 32] denG=[1 10 30 40 24] G=tf(numG,denG) get(G) [nn,dd]=tfdata(G,’v’) pzmap(G)
传递函数
例2:使用例1中的系统,建立ZPK模型,提取零 点、极点和增益,验证其与TF对象所得结果相同
来自百度文库
resG = -0.1867 - 0.5526i -0.1867 + 0.5526i 0.3734
polG = -0.8796 + 1.1414i -0.8796 - 1.1414i -0.2408
otherG = []
传递函数的部分分式展开:
G(s) 0.3734 0.1867 j0.5526 s 0.2408 s 0.9796 j1.1414 0.1867 j0.5526 s 0.8796 j1.1414
控制系统工具箱
传递函数
单输入/单输出线性定常系统
系统微分方程 y 6y 5y 4u 3u
系统传递函数 系统ZPK形式
G(s) 4(s 0.75) (s 1)(s 5)
G(s)
4s 3 s2 6s
5
传递函数
MATLAB中创建传递函数(TF)对象
创建两个行向量,按降阶顺序分别包含分子和分 母多项式中s各次幂的系数
阶跃响应
例: numg=[3 2];deng=[2 4 5 1]; numstep=numg; denstep=[deng 0]; gstep=tf(numstep,denstep) impulse(gstep,30) g=tf(numg,deng) step(g,30) dc_gain=dcgain(g)
脉冲响应 impulse(G)
例:
一个线性定常系统的传递函数是
G(s)
2s3
3s 2 4s2 5s
1
写出G(s)的部分分式展开式,并绘制系 统的脉冲响应。
留数与脉冲响应
解:
numG=[3 2];denG[2 4 5 1]; G=tf(numG,denG) [resG,polG,otherG]=residue(numG,denG) Impule(G)
解:
n=[4 36 32]; d=[1 10 30 40 24]; G=tf(n,d) GG=zpk(G) [zz,pp,kk]=zpkdata(GG,’v’) [z,p,k]=zpkdata(G,’v’)
留数与脉冲响应
留数 [resG,polG,otherG]=residue(numG,denG) resG留数 polG极点 otherG常数
使用tf命令建立TF对象
例如:
>> numG=[4 3];denG=[1 6 5]; >> G1=tf(numG,denG) 或 >> G1=tf([4 3],[1 5 6])
传递函数
零点、极点、增益形式(ZPK)表示
输入零点和极点列向量及标量形式的增益 使用zpk命令建立ZPK对象
例:
>> zG=-0.75;pG=[-1;-5];kG=4; >> G2=zpk(zG,pG,kG)
系统的脉冲响应
Amplitude
0.7 0.6 0.5 0.4 0.3 0.2 0.1
0 0
Impulse Response
5
10
15
20
25
Time (sec)
阶跃响应
阶跃响应函数 step(G)
DC增益 dcgain(G) s=0处的增益,即分子多项式和分母多项式 的常数项之比。
对给定传递函数G(s),增加一个s=0处的极 点,再使用impulse命令,也可得到系统的 阶跃响应。
相关文档
最新文档