您的当前位置:首页正文

闭环传递函数

2021-09-27 来源:钮旅网
闭环传递函数

⼀.取TD=0,T1=∞,KP=1~5,则PID 控制器的传递函数为:Gc (S )=1~5(TD=0,T1=∞,KP=1~5)

求系统的闭环传递函数的MATLAB 程序如下: 【1】Gc (S )=1

>> n1=[1];d1=[0.017 1];s1=tf(n1,d1); >> n2=[1];d2=[0.076 0];s2=tf(n2,d2); >> sys1=feedback(s1*s2,1)Transfer function: 1--------------------------0.001292 s^2 + 0.076 s + 1

>> n3=[0 44];d3=[0.00167 1];s3=tf(n3,d3); >> n4=[1];d4=0.0612;s4=tf(n4,d4); >> sys=feedback(sys1*s3,s4)Transfer function:2.693

---------------------------------------------------1.32e-007 s^3 + 8.684e-005 s^2 + 0.004753 s + 44.06 =2.693/0.0012s^3+0.0585s^2+0.004753s+44.06>>num1=[0 0 2.693];

>>den1=[0.0012 0.0585 0.004753 44.06]; >>step(num1,den1,0.60)

00.10.20.30.40.50.6-200

-150-100-50050100150200

250Step ResponseTime (sec)A m p l i t u d e【2】Gc (S )=2

>> n1=[1];d1=[0.017 1];s1=tf(n1,d1); >> n2=[1];d2=[0.076 0];s2=tf(n2,d2); >> sys1=feedback(s1*s2,1)Transfer function: 1--------------------------0.001292 s^2 + 0.076 s + 1

>> n3=[0 88];d3=[0.00167 1];s3=tf(n3,d3); >> n4=[1];d4=0.0612;s4=tf(n4,d4); >> sys=feedback(sys1*s3,s4)Transfer function:5.386

---------------------------------------------------1.32e-007 s^3 + 8.684e-005 s^2 + 0.004753 s + 88.06 =5.386/0.0012s^3+0.0585s^2+0.004753s+88.06>>num2=[0 0 5.386];

>>den2=[0.0012 0.0585 0.004753 88.06];>>step(num2,den2,0.60)

00.10.20.30.40.50.6-8-6-4-224

Step ResponseTime (sec)A m p l i t u d e【3】Gc (S )=3

>> n1=[1];d1=[0.017 1];s1=tf(n1,d1); >> n2=[1];d2=[0.076 0];s2=tf(n2,d2); >> sys1=feedback(s1*s2,1) Transfer function: 1--------------------------0.001292 s^2 + 0.076 s + 1

>> n3=[0 132];d3=[0.00167 1];s3=tf(n3,d3); >> n4=[1];d4=0.0612;s4=tf(n4,d4); >> sys=feedback(sys1*s3,s4)Transfer function:8.078

---------------------------------------------------1.32e-007 s^3 + 8.684e-005 s^2 + 0.004753 s + 13

2.1 =8.078/0.0012s^3+0.0585s^2+0.004753s+132.1 >>num3=[0 0 8.078];>>den3=[0.0012 0.0585 0.004753 132.1]; >>step(num3,den3,0.60)

00.10.20.30.40.50.6-15

-10-5051015202530

35Step ResponseTime (sec)A m p l i t u d e【4】Gc (S )=4

>> n1=[1];d1=[0.017 1];s1=tf(n1,d1); >> n2=[1];d2=[0.076 0];s2=tf(n2,d2); >> sys1=feedback(s1*s2,1)Transfer function: 1

--------------------------0.001292 s^2 + 0.076 s + 1

>> n3=[0 176];d3=[0.00167 1];s3=tf(n3,d3); >> n4=[1];d4=0.0612;s4=tf(n4,d4); >> sys=feedback(sys1*s3,s4) Transfer function:10.77

---------------------------------------------------1.32e-007 s^3 + 8.684e-005 s^2 + 0.004753 s + 176.1 =10.77/0.0012s^3+0.0585s^2+0.004753s+176.1 >>num4=[0 0 10.77];>>den4=[0.0012 0.0585 0.004753 176.1]; >>step(num4,den4,0.60)

00.10.20.30.40.50.6-140

-120-100-80-60-40-2002040

60Step ResponseTime (sec)A m p l i t u d e【5】Gc (S )=5

>> n1=[1];d1=[0.017 1];s1=tf(n1,d1); >> n2=[1];d2=[0.076 0];s2=tf(n2,d2);>> sys1=feedback(s1*s2,1)Transfer function:0 1--------------------------0.001292 s^2 + 0.076 s + 1

>> n3=[0 220];d3=[0.00167 1];s3=tf(n3,d3); >> n4=[1];d4=0.0612;s4=tf(n4,d4); >> sys=feedback(sys1*s3,s4) Transfer function:13.46

---------------------------------------------------1.32e-007 s^3 + 8.684e-005 s^2 + 0.004753 s + 220.1 =13.46/0.0012s^3+0.0585s^2+0.004753s+220.1 >> num5=[0 013.46];

>>den5=[0.0012 0.0585 0.004753 220.1]; >>step(num5,den5,0.60)

00.10.20.30.40.50.6-200

-150-100-50050100150200

250Step ResponseTime (sec)A m p l i t u d e

调速系统在不同KP 作⽤下的阶跃响应曲线 求解过程 >> n1=[1];d1=[0.017 1];s1=tf(n1,d1); n2=[1];d2=[0.076 0];s2=tf(n2,d2);

sys1=feedback(s1*s2,1)Transfer function:1

--------------------------0.001292 s^2 + 0.076 s + 1

>> n3=[0 44];d3=[0.00167 1];s3=tf(n3,d3);n4=[1];d4=0.0612;s4=tf(n4,d4);sys=feedback(sys1*s3,s4)Transfer function:2.693

---------------------------------------------------1.32e-007 s^3 + 8.684e-005 s^2 + 0.004753 s + 44.06>> num1=[0 0 2.693];

>> den1=[0.0012 0.0585 0.004753 44.06];>> step(num1,den1,0.60)>> hold on

>> num2=[0 0 5.386];

>> den2=[0.0012 0.0585 0.004753 88.06];>> step(num2,den2,0.60)>> hold on

>> num3=[0 0 8.078];

>> den3=[0.0012 0.0585 0.004753 132.1];>> step(num3,den3,0.60)>> hold on

>> num4=[0 0 10.77];

>> den4=[0.0012 0.0585 0.004753 176.1];>> step(num4,den4,0.60)>> hold on

>> num5=[0 0 13.46];

>> den5=[0.0012 0.0585 0.004753 220.1];>> step(num5,den5,0.60)0.3

0.350.40.450.50.550.6-100

-80-60-40-20020

406080100

Step ResponseTime (sec)A m p l i t u d e

⼆.取 KP=1,TD=0,积分时间常数T=0.03,0.05,0.07,则PID 控制器的传递函数为:Gc(S)=1+0.03S/0.03S(T=0.03) =1+0.05S/0.05ST=(0.05) =1+0.07S/0.07S(T=0.07)

求系统的闭环传递函数的MATLAB 程序如下: 【1】Gc(S)=1+0.03S/0.03S(T=0.03) >> n1=[1];d1=[0.017 1];s1=tf(n1,d1); n2=[1];d2=[0.076 0];s2=tf(n2,d2); sys1=feedback(s1*s2,1)Transfer function: 1--------------------------0.001292 s^2 + 0.076 s + 1

>> n3=[0.03 1];d3=[0.03 0];s3=tf(n3,d3); n4=[0 44];d4=[0.00167 1];s4=tf(n4,d4); n5=[1];d5=0.0612;s5=tf(n5,d5);sys=feedback(sys1*s3*s4, s5) Transfer function:0.08078 s + 2.693

--------------------------------------------------------------3.961e-009 s^4 + 2.605e-006 s^3 + 0.0001426 s^2 + 1.322 s + 44

=0.08078s+2.693/0.0894s^4+0.0065s^3+ 0.0001426 s^2 + 1.322 s + 44 >> num1=[0 0.08078 2.693];den=[0.0894 0.0065 0.0001426 1.322 44]; >> step(num1,den,4)

00.51 1.52 2.53 3.54-7000-6000-5000-4000-3000-2000-10001000

Step ResponseTime (sec)A m p l i t u d e

【2】Gc(S)=1+0.05S/0.05ST=(0.05) n1=[1];d1=[0.017 1];s1=tf(n1,d1); n2=[1];d2=[0.076 0];s2=tf(n2,d2);sys1=feedback(s1*s2,1) Transfer function: 1--------------------------0.001292 s^2 + 0.076 s + 1

>> n3=[0.05 1];d3=[0.05 0];s3=tf(n3,d3); >> n4=[0 44];d4=[0.00167 1];s4=tf(n4,d4); >> n5=[1];d5=0.0612;s5=tf(n5,d5); >>

sys=feedback(sys1*s3*s4, s5)Transfer function:0.1346 s + 2.693

--------------------------------------------------------------6.602e-009 s^4 + 4.342e-006 s^3 + 0.0002377 s^2 + 2.203 s + 44=0.1346s+2.693/0.1492s^4+0.0795s^3+0.0002377 s^2 + 2.203 s + 44>> num2=[0 0.1346 2.693];

den2=[0.1492 0.0795 0.0002377 2.203 44]; >> step(num2,den2,4) >>

00.51 1.52 2.53 3.54-2500-2000-1500-1000-500500

Step ResponseTime (sec)A m p l i t u d e

【3】Gc(S)= 1+0.07S/0.07S(T=0.07) >> n1=[1];d1=[0.017 1];s1=tf(n1,d1); >> n2=[1];d2=[0.076 0];s2=tf(n2,d2); >>sys1=feedback(s1*s2,1)Transfer function: 1--------------------------0.001292 s^2 + 0.076 s + 1

>> n3=[0.07 1];d3=[0.07 0];s3=tf(n3,d3); >> n4=[0 44];d4=[0.00167 1];s4=tf(n4,d4); >> n5=[1];d5=0.0612;s5=tf(n5,d5); >>sys=feedback(sys1*s3*s4, s5)Transfer function:0.1885 s + 2.693

--------------------------------------------------------------9.243e-009 s^4 + 6.079e-006 s^3 + 0.0003327 s^2 + 3.084 s + 44 =0.1885s+2.693/0.0011s^4+0.1374s^3+0.0003327 s^2 +3.084 s + 44 >> num3=[0 1.885 2.693];

den3=[0.0011 0.1374 0.0003327 3.084 44]; >> step(num3,den3,4)

00.51 1.52 2.53 3.54-1.5

-1-0.500.511.522.53x 10

4

Step ResponseTime (sec)A m p l i t u d e

三.取KP=0.01,T1=0.01,微分时间常数TD=12,48,84时,则PID 控制器的传递函数为: Gc(S)=0.12s^2+0.01s+1/s(TD=12)Gc(S)=0.48s^2+0.01s+1/s(TD=48) Gc(S)=0.84s^2+0.01s+1/s(TD=84) 求系统的闭环传递函数

【1】Gc(S)=0.12s^2+0.01s+1/s(TD=12) >> n1=[1];d1=[0.017 1];s1=tf(n1,d1); >> n2=[1];d2=[0.076 0];s2=tf(n2,d2); >>sys1=feedback(s1*s2,1)Transfer function: 1--------------------------0.001292 s^2 + 0.076 s + 1

>> n3=[0.12 0.01 1];d3=[1 0];s3=tf(n3,d3); >> n4=[0 44];d4=[0.00167 1];s4=tf(n4,d4); >> n5=[1];d5=0.0612;s5=tf(n5,d5); >>sys=feedback(sys1*s3*s4, s5)Transfer function:

0.3231 s^2 + 0.02693 s + 2.693

----------------------------------------------------------1.32e-007 s^4 + 8.684e-005 s^3 + 5.285 s^2 + 0.5012 s + 44

=0.3231 s^2 + 0.02693 s + 2.693/0.0012s^3+0.0585s^2+0.004753s+44

>> num1=[0.3231 0.02693 2.693]; >> den=[0.0012 0.0585 0.004753 44]; >> step(num1,den,4) >> step(num1,den,3)

00.51 1.52 2.53-2.5-2-1.5-1-0.50.511.5x 107

Step ResponseTime (sec)A m p l i t u d e

【2】Gc(S)=0.48s^2+0.01s+1/s(TD=48) >> n1=[1];d1=[0.017 1];s1=tf(n1,d1); >> n2=[1];d2=[0.076 0];s2=tf(n2,d2); >>sys1=feedback(s1*s2,1)Transfer function: 1

--------------------------0.001292 s^2 + 0.076 s + 1

>> n3=[0.48 0.01 1];d3=[1 0];s3=tf(n3,d3); >> n4=[0 44];d4=[0.00167 1];s4=tf(n4,d4); >> n5=[1];d5=0.0612;s5=tf(n5,d5); >>sys=feedback(sys1*s3*s4, s5)Transfer function:1.293 s^2 + 0.02693 s +

2.693 ----------------------------------------------------------1.32e-007 s^4 + 8.684e-005 s^3 + 21.12 s^2 + 0.5012 s + 44

= 1.293 s^2 + 0.02693 s + 2.693/0.0012s^3+0.0585s^2+0.004753s+44 >> num2=[1.293 0.02693 2.693];>> den2=[0.0012 0.0585 0.004753 44]; >>step(num2,den2,3)

0.51 1.52 2.53-10-505x 107

Step ResponseTime (sec)A m p l i t u d e

【3】Gc(S)=0.84s^2+0.01s+1/s(TD=84) >> n1=[1];d1=[0.017 1];s1=tf(n1,d1); n2=[1];d2=[0.076 0];s2=tf(n2,d2);sys1=feedback(s1*s2,1)Transfer function: 1--------------------------0.001292 s^2 + 0.076 s + 1

>> n3=[0.84 0.01 1];d3=[1 0];s3=tf(n3,d3); n4=[0 44];d4=[0.00167 1];s4=tf(n4,d4); n5=[1];d5=0.0612;s5=tf(n5,d5);sys=feedback(sys1*s3*s4, s5)Transfer function:

2.262 s^2 + 0.02693 s + 2.693 ----------------------------------------------------------1.32e-007 s^4 + 8.684e-005 s^3 + 36.96 s^2 + 0.5012 s + 44

= 2.262 s^2 + 0.02693 s + 2.693/ 0.0012s^3+0.0585s^2+0.004753s+44 >> num3=[2.262 0.02693 2.693]; den3=[0.00120.0585 0.004753 44]; >>step(num3,den3,3)

00.51 1.52 2.53-2-1.5

-1-0.50.51x 108

Step ResponseTime (sec)A m p l i t u d e

因篇幅问题不能全部显示,请点此查看更多更全内容