Professional Documents
Culture Documents
Báo cáo TN ĐK số - ĐHBKHN
Báo cáo TN ĐK số - ĐHBKHN
Bo co th nghim iu khin s
Sinh vin:Trn Th Thoan
Mssv: 20102754
Lp K TH 4 K55
Nhm : Kp 2 sng th 4 tun 29,32,37
S liu c giao: Gi6, Lz1, Gw3
( )=
1
1+
1
1+
Lnh Matlab
Trn Th Thoan_20102754
Page 1
Bo co Th nghim iu khin s
Tt=100e-6; Ra=250e-3; La=4e-3;
Ta=La/Ra; T1=0.1e-3; T2=0.01e-3;
>> km=38.2; ke=236.8;J=0.012;xi=0.04;
>> Gi=tf(1,[Tt 1])*(1/Ra)*tf(1,[Ta 1])
Transfer function:
4
--------------------------1.6e-006 s^2 + 0.0161 s + 1
Page 2
Bo co Th nghim iu khin s
Transfer function:
0.0001209 z + 0.0001169
----------------------z^2 - 1.904 z + 0.9043
Sampling time (seconds): 1e-005
>> Gzi5=c2d(Gi,T2,'foh')
Transfer function:
4.064e-005 z^2 + 0.0001585 z + 3.865e-005
----------------------------------------z^2 - 1.904 z + 0.9043
Sampling time (seconds): 1e-005
>> Gzi6=c2d(Gi,T2,'tustin')
Transfer function:
5.951e-005 z^2 + 0.000119 z + 5.951e-005
---------------------------------------z^2 - 1.904 z + 0.9042
Sampling time (seconds): 1e-005
=
Ta c T =T1
7=
0.0004 z^2
0.0162 z^2 0.0161 z + 1.6e 006
7=
4e 005 z^2
0.01611 z^2 0.0161 z + 1.6e 006
T = T2
Lnh matlab
Gzi7=tf([ 0.0004 0 0],[0.0162 -0.0161 1.6e-006],T1)
Gzi8=tf([4e-005 0 0],[0.01611 -0.0161 1.6e-006],T2)
c, th
Lnh matlab
step(Gi)
Trn Th Thoan_20102754
Page 3
Bo co Th nghim iu khin s
hold on
step(Gzi1)
step(Gzi2)
step(Gzi3)
step(Gzi4)
step(Gzi5)
step(Gzi6)
step(Gzi7)
step(Gzi8)
Trn Th Thoan_20102754
Page 4
Bo co Th nghim iu khin s
1
1+
.
2
Vng kn:
( )=
1+
Lnh matlab
Gh=tf(1/Ra)*tf(1,[Ta 1])*tf(km*xi)*tf(1,[2*pi*J 0])
Transfer function:
6.112
----------------------0.001206 s^2 + 0.0754 s
Gk=feedback(Gh,ke*xi)
Transfer function:
Trn Th Thoan_20102754
Page 5
Bo co Th nghim iu khin s
6.112
------------------------------0.001206 s^2 + 0.0754 s + 57.89
Page 6
Bo co Th nghim iu khin s
Transfer function:
8.443e-008 z^2 + 3.377e-007 z + 8.44e-008
----------------------------------------z^2 - 1.999 z + 0.9994
Sampling time (seconds): 1e-005
>> Gk6=c2d(Gk,T2,'tustin')
Transfer function:
1.266e-007 z^2 + 2.532e-007 z + 1.266e-007
-----------------------------------------z^2 - 1.999 z + 0.9994
Sampling time (seconds): 1e-005
RA 1 STA
2 JS 2 JRA S (1 STA )
kM
GH ( S )
2 JRA S (1 STA )
GK ( S )
k M ke 2
1 G H (S ) * ke
1
2 JRA S (1 STA )
1/ ke
5066
2
2 JRA
2 JRA
T S2
S 1 s 62.5s 47987
2 A
2
kM ke
k M ke
G (S )
5066
A
Bs C
A
B( s a )
C Ba
b
H (S ) K
2
2
2
2
2
S
s(s 62.5s 47987) S (s a) b
S (s a ) b
b (s a ) 2 b 2
GH ( S )
z
z ( z e aT cos(bT ))
C Ba
ze aT sin(bT )
Z {H ( S ) A
B 2
z 1
z 2 ze aT cos(bT ) e 2 aT
b z 2 2 ze aT cos(bT ) e2 aT
G ( z ) (1 z 1 ) H ( z )
Vi C1
C Ba
b
a=31.25;b=216.82;A=0.105570258;B=-0.105570258;C=-6.598141163;
C1 =-0.015215711
+Vi chu k trch mu: T1 =0,1ms
Trn Th Thoan_20102754
Page 7
Bo co Th nghim iu khin s
2.2576547*105 2.522394922*10 5
z 2 1.993291132 z 0.99376949
+Vi chu k trch mu: T1 =0,01ms
Giz 7
Giz 8
2.53249*107 2.531971794*107
z 2 1.999370398 z 0.999375195
c, th
Lnh Matlab
step(Gk)
hold on
step(Gk1)
step(Gk2)
step(Gk3)
step(Gk4)
step(Gk5)
step(Gk6)
step(Gk7)
step(Gk8)
Trn Th Thoan_20102754
Page 8
Bo co Th nghim iu khin s
Trn Th Thoan_20102754
Page 9
Bo co Th nghim iu khin s
1.3 M hnh trng thi ng c ca CMC trn min thi gian lin tc
Lnh matlab
Gh=tf(1/Ra)*tf(1,[Ta 1])*tf(km*xi)*tf(1,2*pi*J)
Transfer function:
6.112
------------------0.001206 s + 0.0754
Gk=feedback(Gh,ke*xi)
Transfer function:
6.112
------------------------------0.001206 s^2 + 0.0754 s + 57.89
T3= 0.1; T4= 0.01
[A,B,C,D]=tf2ss([ 6.112],[0.001206 0.0754 57.89])
A=
1.0e+004 *
-0.0063 -4.8002
0.0001
0
B=
1
0
C=
1.0e+003 *
0
5.0680
Trn Th Thoan_20102754
Page 10
Bo co Th nghim iu khin s
D=
0
>> [Az1,Bz1]=c2d(A,B,T1)
Az1 =
0.9935 -4.7848
0.0001 0.9998
Bz1 =
1.0e-004 *
0.9968
0.0000
>> [Az1,Bz1]=c2d(A,B,T3)
Az1 =
-0.0438 -2.9271
0.0001 -0.0399
Bz1 =
1.0e-004 *
0.6098
0.2166
>> [Az2,Bz2]=c2d(A,B,T4)
Az2 =
-0.4989 -133.8566
0.0028 -0.3245
Trn Th Thoan_20102754
Page 11
Bo co Th nghim iu khin s
Bz2 =
0.0028
0.0000
>> G2k1=ss(Az1,Bz1,C,D,T3)
a=
x1
x2
x1 -0.04376
-2.927
x2 6.098e-005 -0.03995
b=
u1
x1 6.098e-005
x2 2.166e-005
c=
x1 x2
y1 0 5068
d=
u1
y1 0
Sampling time (seconds): 0.1
Discrete-time state-space model.
>> G2k2=ss(Az2,Bz2,C,D,T4)
a=
x1
x2
x1 -0.4989 -133.9
x2 0.002789 -0.3245
b=
u1
x1 0.002789
x2 2.759e-005
c=
x1 x2
y1 0 5068
Trn Th Thoan_20102754
Page 12
Bo co Th nghim iu khin s
d=
u1
y1 0
step(Gk)
hold on
step(G2k1)
step(G2k2)
th p ng
6=
Trn Th Thoan_20102754
Page 13
Bo co Th nghim iu khin s
Chuyn sang min nh z m m
Lnh Matlab
Gi6=filt([5.951e-005 0.000119 5.951e-005],[1 -1.904 0.9042],T2)
Transfer function:
5.951e-005 + 0.000119 z^-1 + 5.951e-005 z^-2
-------------------------------------------1 - 1.904 z^-1 + 0.9042 z^-2
Trn Th Thoan_20102754
Page 14
Bo co Th nghim iu khin s
0.9139 - 0.3361 z^-1 - 0.4139 z^-2 - 0.1639 z^-3
Simulink
Hnh 5: M phng simulink cho b iu khin thit k bng phng php Dead-Beat
th p ng
Page 15
Bo co Th nghim iu khin s
x1+x2+x3=1
Chn x1=0.1 x2 =0.4 x3=0.5
Lnh matlab
Gw= filt([0 0.1 0.4 0.5],1,T2)
Transfer function:
0.1 z^-1 + 0.4 z^-2 + 0.5 z^-3
Gri2=Gw/(Gi6*(1-Gw))
Transfer function:
0.1 z^-1 + 0.2096 z^-2 - 0.1712 z^-3 - 0.5903 z^-4 + 0.4521 z^-5
---------------------------------------------------------------5.951e-005 + 0.000113 z^-1 + 2.381e-005 z^-2 - 8.331e
-005 z^-3 - 8.33e-005 z^-4 - 2.975e-005 z^-5
Simulink
th p ng
Trn Th Thoan_20102754
Page 16
Bo co Th nghim iu khin s
Hnh 8: M phng simulink cho b iu khin thit k bng phng php CBMH
Page 17
Bo co Th nghim iu khin s
Trn Th Thoan_20102754
Page 18
Bo co Th nghim iu khin s
BI 3.THIT K BK CHO I TNG TC QUAY Gn
3.1 Xc nh hm truyn t ca i tng v tm hm truyn t trn
min nh Z
1
G = G ( ) . k . .
2Js
Phng php ZOH thi gian trch mu 0.1 ms
Xp x Gw(bi 2)=1/(1+Tt*s);Tt=100us
Lnh Matlab
G1=tf([1],[2*pi*J 0])
Transfer function:
1
-------0.0754 s
>> Gik=tf([1],[2*Tt 1])
Transfer function:
1
-----------0.0002 s + 1
>> Gn=Gik*km*xi*G1
Transfer function:
1.528
------------------------1.508e-005 s^2 + 0.0754 s
>> Gnz=c2d(Gn,T2,'tustin')
Transfer function:
2.471e-006 z^2 + 4.943e-006 z + 2.471e-006
-----------------------------------------z^2 - 1.951 z + 0.9512
Sampling time (seconds): 1e-005
>> Gnz1=filt([2.471e-006 4.943e-006 2.471e-006],[1 1.951 0.9512],T2)
Trn Th Thoan_20102754
Page 19
Bo co Th nghim iu khin s
Transfer function:
2.471e-006 + 4.943e-006 z^-1 + 2.471e-006 z^-2
---------------------------------------------1 + 1.951 z^-1 + 0.9512 z^-2
3.2 Tng hp b iu khin PI theo tiu chun tch phn bnh phng
-B iu khin c dng:
r +r z
G (z ) =
1 + pz
Chn p=-1
-i tng iu khin c dng:
b +b z +b z
G (z ) =
a +a z +a z
-Sai lch iu chnh: Ez
=
=
Lnh matlab
function F= function1(r)
b0=2.471e-006;b1= 4.943e-006 ; b2=2.471e-006 ;
a0=1; a1= 1.951; a2= 0.9512;
F= 1+(1-r(1)*b1)^2+(1+(a1*b1-2*b1-b2)*r(1)+b1^2*r(1)^2-b1*r(2))^2+(-(a11+r(1)*b1)*(1+(a1*b1-2*b1-b2)*r(1)+b1^2*r(1)^2-b1*r(2))-(a2a1+r(1)*b2+r(2)*b1)*(1-r(1)*b1)-(r(2)*b2-a2))^2;
Trn Th Thoan_20102754
Page 20
Bo co Th nghim iu khin s
options=optimset('fminunc');
options=optimset(options,'Display','iter','LargeScale','off');
r0=[-100 100];
[r,fval]=fminunc('function1',r0,options)
r=
1.0e+005 *
2.0438
2.7231
fval =
1.0172
Simulink
th scope
Page 21
Bo co Th nghim iu khin s
Nhn xt:
Vi b s chn c t cng c optimazation ta thy b iu khin lm khng lm h n
nh c. Vy ta phi chn b s [r0 r1] khc.
Ta chn [ro r1]= [99 -98]
Simulink
th scope
Trn Th Thoan_20102754
Page 22
Bo co Th nghim iu khin s
- Kho st h thng vi tc ng ca nhiu u vo
Simulink
th scope
Trn Th Thoan_20102754
Page 23
Bo co Th nghim iu khin s
- Kho st h thng vi tc ng ca nhiu u ra
Simulink
th scope
Page 24
Bo co Th nghim iu khin s
th scope
Trn Th Thoan_20102754
Page 25
Bo co Th nghim iu khin s
3.3 Thit k b iu chnh PI theo phng php gn im cc
a thc c tnh ca hm truyn ch o:
N ( z ) P( z ). A( z ) R ( z ).B ( z )
( z 1)( z 2 a1 z a2 ) ( r0 z r1 )(b0 z 2 b1 z b2 )
(1 r0b0 ) z 3 (1 a1 b1r0 b0 r1 ) z 2 (a2 a1 b1r1 b2 r0 ) z (a2 b2 r1 )
Chn im cc ca i tng l z1 , z 2 , z3 th a thc c tnh l:
N ( z ) ( z z1 ).( z z2 ).( z z3 )
z 3 ( z1 z 2 z3 ) z 2 ( z1 z2 z2 z3 z3 z1 ) z z1 z2 z3
1 a1 b1r0 b0 r1
z1 z2 z3
b
r
0
0
a a b r b r
Cn bng h s, ta c: 2 1 1 1 2 0 z1 z2 z2 z3 z3 z1
1 b0 r0
a2 b2 r1
z1 z2 z3
1 b0 r0
b2
a2
b1 b0 ( z1 z2 ) .r0
b0
.r1 1 a1 ( z1 z2 )
z1 z2
z1 z2
z z
z z
z1 z2
z1 z2
a2 b2 r1
z3
(1 b0 r0 ) z1 z2
Chn
z1,2 = 0.5 0,5j
Simulink
Trn Th Thoan_20102754
Page 26
Bo co Th nghim iu khin s
th scope
chn li
z1,2 = 0.912 0,0412j
Trn Th Thoan_20102754
Page 27
Bo co Th nghim iu khin s
th scope
chn li
z1,2 = 0.135 0.333j
gii c [ro r1] =[-5656110.03 1388606.737]
z3=0.2293
Simulink
Trn Th Thoan_20102754
Page 28
Bo co Th nghim iu khin s
th scope
Trn Th Thoan_20102754
Page 29
Bo co Th nghim iu khin s
p2=[0.5 0.5]
K2=acker(Az2,Bz2,p2)
G2=ss(Az2-Bz2*K2,Bz2,C,D,T4)
step(G2)
K4=acker(Az2,Bz2,p3)
G4=ss(Az2-Bz2*K4,Bz2,C,D,T4)
step(G4)
th
Trn Th Thoan_20102754
Page 30
Bo co Th nghim iu khin s
Hnh 25: th p ng
Q1 =
1.0e+003 *
0 5.0680
0.0003 -0.2024
Q2=obsv(Az2,C)
Q2 =
1.0e+003 *
0 5.0680
0.0141 -1.6446
Kim tra tnh quan st c bng cch tnh hng ca ma trn Q1, Q2
rank(Q1)
Trn Th Thoan_20102754
Page 31
Bo co Th nghim iu khin s
ans =
2
rank(Q2)
ans =
2
Kt lun h quan st c vi 2 chu k trch mu T1, T2
b, Tnh iu khin c
Ma trn iu khin
Ct1=ctrb(Az1,B)
Ct1 =
1.0000 0.9935
0 0.0001
>> Ct2=ctrb(Az2,B)
Ct2 =
1.0000 -0.4989
0 0.0028
Kim tra hng ma trn iu khin
>> rank(Ct1)
ans =
2
>> rank(Ct2)
ans =
2
Vy H iu khin c
The end
Trn Th Thoan_20102754
Page 32