matlab进行系统校正,MATLAB校正系统程序

41528d3028836879cd698677c3999917.gifMATLAB校正系统程序

clear; G1=tf(20,[1,0.4,0]) %系统的开环传递函数 G=feedback(G1,1,-1) %原系统的闭环传递函数 figure(1) step(G) %原系统的单位阶跃响应 figure(2) rlocus(G1) %原系统的根轨迹 figure(3) margin(G1) %原系统的bode图 [Gm0,Pm0,Wg0,Wc0]=margin(G1) deta=5 %补偿角 Phim=45-Pm0+deta %校正装置最大超前角 a=sin(Phim*pi/180) alpha=(1+a)/(1-a) Wm=Wc0*alpha^(1/4) T=1/(Wm*sqrt(alpha)); alpha_T=alpha*T Gc=tf([alpha_T,1],[T,1]) %校正装置 Ga=G1*Gc %校正后的传递函数 G11=feedback(G1,1); %原系统闭环传递函数 Gaa=feedback(Ga,1); %校正后系统闭环传递函数 figure(4) rlocus(Ga)%校正后系统的根轨迹 legend( Ga ) figure(5) margin(Ga) %校正后系统的频域特性 [Gm,Pm,Wcm,Wpm]=margin(Ga) figure(6) step(G11, -.k ,Gaa)%原系统与校正后系统的时域特性的比较 legend( G1 , Ga ) figure(7) bode(G1, -.k ,Gc, : ,Ga)%原系统与校正后系统的频域特性的比较 legend( G1 , Gc , Ga ) G1 = 20 ----------- s^2 + 0.4 s Continuous-time transfer function. G = 20 ---------------- s^2 + 0.4 s + 20 Continuous-time transfer function. Gm0 = Inf Pm0 = 5.1214 Wg0 = Inf Wc0 = 4.4631 deta = 5 Phim = 44.8786 a = 0.7056 alpha = 5.7936 Wm = 6.9243 alpha_T = 0.3476 Gc = 0.3476 s + 1 ------------ 0.06 s + 1 Continuous-time transfer function. Ga = 6.952 s + 20 ---------------------------- 0.06 s^3 + 1.024 s^2 + 0.4 s Continuous-time transfer function. Gm = Inf Pm = 48.1787 Wcm = Inf Wpm = 6.9371 校正前 校正后

  • 0
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值