Dieu Khien Toc Do Dong Co Dien 1 Chieu

Embed Size (px)

Citation preview

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    1/31

    I. M hnh ha v kho st cc c tnh ca ngc mt chiu

    1.M hnh khng gian trng thi ca ng c mt chiuCc phng trnh ng hc c bn

    - Phng trnh cn bng in p phn ng(1)

    - Sc in ng phn ng

    (2)

    - Phng trnh chuyn ng

    (2)

    Trong :

    . l mmen in t.(3)

    . l mmen cn ca ti.

    . l tc gc ca rotor.

    . l mmen qun tnh ca ng c.

    Mt khc, do (n tnh theo vng/giy), nn ta c th vit

    (3)

    - Hng s ng c

    (5)

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    2/31

    Xem [MATSIM01]Tr.291.

    Hphng trnh khng gian trng thiT cc phng trnh c bn trn ta c th vit h phng trnh m t khng gian trng thi ca ng c mt chiu nh sau:

    (4)

    H phng trnh ny c hai bin trng thi v n. Cc tn hiu vo l in p v mmen cnca ti .

    Gi s cc bin trng thi v n l o c, vit li h phng trnh trn di dng ma trn ta c

    (5)

    Hay di dng ngn gn

    (6)

    Trong

    (7)

    (8)

    (9)

    (10)

    Bin trng thi , tn hiu vo .

    http://www.dieukhien.net/vn/bibliography.php?refmode=showreference&name=MATSIM01http://www.dieukhien.net/vn/bibliography.php?refmode=showreference&name=MATSIM01http://www.dieukhien.net/vn/bibliography.php?refmode=showreference&name=MATSIM01http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmss001%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmss001%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmss001%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmssm001%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmssm001%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmssm001%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmssm002%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmssm002%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmssm002%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27%20%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmssm002%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmssm001%27%29/http://newwin%28%27equation%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmss001%27%29/http://www.dieukhien.net/vn/bibliography.php?refmode=showreference&name=MATSIM01
  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    3/31

    2.Cc c tnh vng htrong min thi gianT cc phng trnh (001) hay (002) ta c th vit lnh Matlab m t khng gian trng thi cang c mt chiu nh sau:

    matlab code

    1.2. Ra = 0.25;3. La = 0.004;4. Phi = 0.04;5. J = 0.012;6. Km = 38.2;7. Ke = 2*pi*Km;8.9. A_m = [-Ra/La -Ke*Phi/La; Km*Phi/2/pi/J 0];10. B_m = [1/La 0; 0 -1/2/pi/J];11. C_m = [1 0; 0 1];12. D_m = [0 0; 0 0];13.14. G_m = ss(A_m, B_m, C_m, D_m);15. minfo(G_m)

    Khi chy m-file ny, Matlab s to ra m hnh khng gian trng thi ca ng c mt chiu clu bin G_m qua lnh:

    G_m = ss(A_m, B_m, C_m, D_m);

    Lnh minfo(G_m) cho bit thng tin v m hnh i tng

    MATLAB ss object: 2 states 2 outputs 2 inputs

    Hnh 1: M hnh G_mca ng c mt chiu

    Ta c th s dng cc lnh sau v p ng bc nhy v phn ph cc im cc ca h

    matlab code

    1. figure(1);2. step(G_m);3.4. figure(2);5. plot(eig(G_m),'r*');6. grid on;

    http://xn--newwin%28%27phng%20trnh%20%3Cb%3E001%3C-btd725e8ra/b%3e',%20'//frac%7bd%7d%7bdt%7d//begin%7bbmatrix%7di_a////n//end%7bbmatrix%7d%20=%20//begin%7bbmatrix%7d%20-%20//frac%7bR_a%7d%7bL_a%7d%20&%20-//frac%7bk_e//Phi%7d%7bL_z%7d%20////%20//frac%7bk_m//Phi%7d%7b2//pi%20J%7d%20&%200//end%7bbmatrix%7d%20//begin%7bbmatrix%7d%20i_a%20////%20n%20//end%7bbmatrix%7d%20+%20//begin%7bbmatrix%7d//frac%7b1%7d%7bL_a%7d%20&%200////%200%20&%20-//frac%7b1%7d%7b2//pi%20J%7d//end%7bbmatrix%7d%20//begin%7bbmatrix%7du_a////T_L//end%7bbmatrix%7d%20',%20'',%20'index.php?arid=1069%27)http://xn--newwin%28%27phng%20trnh%20%3Cb%3E001%3C-btd725e8ra/b%3e',%20'//frac%7bd%7d%7bdt%7d//begin%7bbmatrix%7di_a////n//end%7bbmatrix%7d%20=%20//begin%7bbmatrix%7d%20-%20//frac%7bR_a%7d%7bL_a%7d%20&%20-//frac%7bk_e//Phi%7d%7bL_z%7d%20////%20//frac%7bk_m//Phi%7d%7b2//pi%20J%7d%20&%200//end%7bbmatrix%7d%20//begin%7bbmatrix%7d%20i_a%20////%20n%20//end%7bbmatrix%7d%20+%20//begin%7bbmatrix%7d//frac%7b1%7d%7bL_a%7d%20&%200////%200%20&%20-//frac%7b1%7d%7b2//pi%20J%7d//end%7bbmatrix%7d%20//begin%7bbmatrix%7du_a////T_L//end%7bbmatrix%7d%20',%20'',%20'index.php?arid=1069%27)http://xn--newwin%28%27phng%20trnh%20%3Cb%3E001%3C-btd725e8ra/b%3e',%20'//frac%7bd%7d%7bdt%7d//begin%7bbmatrix%7di_a////n//end%7bbmatrix%7d%20=%20//begin%7bbmatrix%7d%20-%20//frac%7bR_a%7d%7bL_a%7d%20&%20-//frac%7bk_e//Phi%7d%7bL_z%7d%20////%20//frac%7bk_m//Phi%7d%7b2//pi%20J%7d%20&%200//end%7bbmatrix%7d%20//begin%7bbmatrix%7d%20i_a%20////%20n%20//end%7bbmatrix%7d%20+%20//begin%7bbmatrix%7d//frac%7b1%7d%7bL_a%7d%20&%200////%200%20&%20-//frac%7b1%7d%7b2//pi%20J%7d//end%7bbmatrix%7d%20//begin%7bbmatrix%7du_a////T_L//end%7bbmatrix%7d%20',%20'',%20'index.php?arid=1069%27)http://xn--newwin%28%27phng%20trnh%20%3Cb%3E002%3C-btd725e8ra/b%3e',%20'%20//left//%7b%20//begin%7barray%7d%7bl%7d%20//dot%7bx%7d%20=%20A_m%20x%20+%20B_m%20u%20////%20y%20=%20C_m%20x%20+%20D_m%20u%20//end%7barray%7d%20//right.%20',%20'',%20'index.php?arid=1069%27)http://xn--newwin%28%27phng%20trnh%20%3Cb%3E002%3C-btd725e8ra/b%3e',%20'%20//left//%7b%20//begin%7barray%7d%7bl%7d%20//dot%7bx%7d%20=%20A_m%20x%20+%20B_m%20u%20////%20y%20=%20C_m%20x%20+%20D_m%20u%20//end%7barray%7d%20//right.%20',%20'',%20'index.php?arid=1069%27)http://xn--newwin%28%27phng%20trnh%20%3Cb%3E002%3C-btd725e8ra/b%3e',%20'%20//left//%7b%20//begin%7barray%7d%7bl%7d%20//dot%7bx%7d%20=%20A_m%20x%20+%20B_m%20u%20////%20y%20=%20C_m%20x%20+%20D_m%20u%20//end%7barray%7d%20//right.%20',%20'',%20'index.php?arid=1069%27)http://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/plot.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/eig.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/eig.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmmodel001%27%29/http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/eig.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/plot.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://xn--newwin%28%27phng%20trnh%20%3Cb%3E002%3C-btd725e8ra/b%3e',%20'%20//left//%7b%20//begin%7barray%7d%7bl%7d%20//dot%7bx%7d%20=%20A_m%20x%20+%20B_m%20u%20////%20y%20=%20C_m%20x%20+%20D_m%20u%20//end%7barray%7d%20//right.%20',%20'',%20'index.php?arid=1069%27)http://xn--newwin%28%27phng%20trnh%20%3Cb%3E001%3C-btd725e8ra/b%3e',%20'//frac%7bd%7d%7bdt%7d//begin%7bbmatrix%7di_a////n//end%7bbmatrix%7d%20=%20//begin%7bbmatrix%7d%20-%20//frac%7bR_a%7d%7bL_a%7d%20&%20-//frac%7bk_e//Phi%7d%7bL_z%7d%20////%20//frac%7bk_m//Phi%7d%7b2//pi%20J%7d%20&%200//end%7bbmatrix%7d%20//begin%7bbmatrix%7d%20i_a%20////%20n%20//end%7bbmatrix%7d%20+%20//begin%7bbmatrix%7d//frac%7b1%7d%7bL_a%7d%20&%200////%200%20&%20-//frac%7b1%7d%7b2//pi%20J%7d//end%7bbmatrix%7d%20//begin%7bbmatrix%7du_a////T_L//end%7bbmatrix%7d%20',%20'',%20'index.php?arid=1069%27)
  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    4/31

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    5/31

    C th download m-file ny y:DCMC0001.m

    3.Cc c tnh vng htrong min tn sVi m hnh khng gian trng thi lp, m hnh ca DCM c th c v nh sau

    Nh vy, n l mt h hai u vo, hai u ra. u vo th nht l in p phn ng , u voth hai l mmen ti , u ra th nht l dng in phn ng v u ra th hai chnh l tc .

    Trong c php ca biu Bode

    bodemag(G_m(1,1),'r',G_m(1,2),'b', G_m(2,1),'g',G_m(2,2),'m', logspace(-1,5,500));

    th:

    - l m hnh trng thi ca i tng.

    - Vit ngha l biu Bode c v cho p ng ca u ra out i vi u voin. Nh vy

    l p ng u ra s 2 (tc ) i vi u vo s 1 (in p phn ng ).

    - Cc ch ci r, b, g, m l ch mu ca cc ng v.

    - Lnh logspace(-1,5,500) biu din trc tn s theo Logarit t n vi 500 im v.

    ngha ca biu Bode

    Biu Bode phn nh mi quan h gia tn s -bin v c pha na nu v y (ci ny sau) nn cn gi l c tnh tn-bin-pha.

    V d, bodemag(G_m(2,1)) cho bit bin ca tn hiu ra knh 2 theo tn s u vo knh1. Ngha l s ph thuc ca tc u ra theo tn s ca tn hiu iu khin u vo s 1.

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    6/31

    chnh l ngha ca biu Bode. N c vai tr rt quan trng trong vic kho st h.

    matlab code

    1. Ra = 0.25;2. La = 0.004;3. Phi = 0.04;4. J = 0.012;5. Km = 38.2;6. Ke = 2*pi*Km;7.8. A_m = [-Ra/La -Ke*Phi/La; Km*Phi/2/pi/J 0];9. B_m = [1/La 0; 0 -1/2/pi/J];10. C_m = [1 0; 0 1];11. D_m = [0 0; 0 0];12.13. G_m = ss(A_m, B_m, C_m, D_m);14. minfo(G_m)15.16. figure(1);17. bodemag(G_m(1,1),'r--',G_m(1,2),'b--', logspace(-1,5,500));18. title('Bieu do bien do Bode - He tuong tu');19. legend('Ua - n', 'T_L - n', 3);20. gridon,21.22. T = 0.0025; %SamplingTime23.24. U = eye(2);25.26. A_md = U + A_m*T;27. B_md = B_m*T;28. C_md = C_m;29. D_md = D_m;30.31. G_md = ss(A_md, B_md, C_md, D_md);32. minfo(G_md);33.34. figure(2);35. bodemag(G_md(1,1),'r--',G_md(1,2),'b--', logspace(-1,5,500));36. title('Bieu do bien do Bode - He roi rac');37. legend('Ua - n', 'T_L - n', 3);38. gridon

    http://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/eye.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/eye.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/eye.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.html
  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    7/31

    4.M phng ng c mt chiuBy gi ta c th xy dng m hnh m phng ng c mt chiu chy khng ti (mmen cn

    ca ti ) da trn m hnh va xy dng nh sau

    Hnh 1:M hnh m phng ng c mt chiu

    Lu nhp cc ma trn ca m hnh bng cch kch kp chut ln khi khng gian trng thi sau nhp , , v nh hnh sau

    http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmmodel002%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmmodel002%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmmodel002%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmmodel002%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmmodel002%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmmodel002%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27dcmmodel002%27%29/
  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    8/31

    Cc ma trn ca m hnh DCM

    C th download file ny y:dcmdl.mdl

    Kt qum phng nh sau

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    9/31

    Hnh 2:Kt qu m phng khng ti ng c mt chiu

    II. Phng php thit k1.Cc mch vng iu chnh

    S khi ca cc mch vng c th c m t nh sau:

    Trong l b iu chnh tc , l b iu chnh dng in. Nh vy l ta cn phi chai b iu khin PID cho hai mch vng.

    http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcrp001%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcrp001%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcrp001%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcrp001%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcrp001%27%29/
  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    10/31

    Tuy nhin, ta c th thit k b iu khin cho mch vng dng in trc, s nh sau:

    Cn ni cc khi vi nhau th ta c th dng lnh

    >> help connect

    Sau chn

    -- Reference page in Help browser

    doc connect

    xem chi tit hn.

    Ch :

    - Bi ton y l iu khin tc (hay v tr) ca ng c. Tn hiu t l tc , tn hiucn iu khin l tc thc u ra s c phn hi v so snh vi tc t .

    - T tc , b iu khin tc phi tnh ra dng cn thit to ra momen quay cho ng

    c, dng ny chnh l .

    - Vi dng in yu cu nh trn, b iu khin dng s tnh ra in p cn thit t vophn ng (hay chnh l in p cn cung cp cho ng c) tora dng in thc c phn

    hi v so snh vi dng in t do b iu khin tc cung cp.

    Bi ton tng th gm c hai mch vng: mch vng trong c gi l mch vng dng in v

    mc ch ca n l iu chnh dng. Mch vng ngoi l mch vng tc . H thng iukhin c dng nh trn gi l --Cascade-- (iu khin lng nhau).

    Cch chng ta ang thc hin y l thit k tng mch vng mt, t trong ra ngoi. Thngthng, mch vng trong cng bao gi cng phi c p ng nhanh nht, cng ra ngoi th tc p ng cng gim dn.

    Th cn phn bit th no l "--trng thi--" v "--u ra--"? Cc trng thi mang tnh tng quthn, n phn nh ng cc trng thi bn trong ca i tng (v d vui, bun, gin d...). Ccbin trng thi c th o c bng cc thit b o th c th a ra ngoi c nn c gi l "--u ra--". Nu tt c cc bin trng thi u o c th "trng thi" v "u ra" l hon tonging nhau. Cn nu c cc bin trng thi khng o c th phi cn n bi ton nhn dng,

    ngha l phi da trn c s cc bin u vo v bin u ra o c tnh ra cc bin .

    2.Xy dng h thng knTrong bo co ny chng ta s s dng lnh Connect xy dng h thng kn. Phn m t sauy chng ti dch t help ca Matlab.

    C php ca lnh ny nh sau:

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    11/31

    matlab code

    1. sysc = connect(sys,Q,inputs,outputs)Cc h thng ng hc phc tp thng c cho di dng cc s khi. Ngay c vi cc hc phc tp va phi th cng rt kh tm m hnh khng gian trng thi

    s dng cc

    cng c phn tch v thit k c sn. Bt u vi m t s khi, ta c th s dng cc lnh --append-- v --connect-- xy dng mt m hnh khng gian trng thi ca h thng.

    Trc tin, dng

    matlab code

    1. sys = append(sys1,sys2,...,sysN)to specify each block sysj in the diagram and form a block-diagonal, unconnected LTI model sys

    of the diagram.

    Next, use

    matlab code

    1. sysc = connect(sys,Q,inputs,outputs)to connect the blocks together and derive a state-space model sysc for the overall

    interconnection. The arguments Q, inputs, and outputs have the following purpose: The matrix Q

    indicates how the blocks on the diagram are connected. It has a row for each input of sys, where

    the first element of each row is the input number. The subsequent elements of each row specify

    where the block input gets its summing inputs; negative elements indicate minus inputs to thesumming junction. For example, if input 7 gets its inputs from the outputs 2, 15, and 6, where the

    input from output 15 is negative, the corresponding row of Q is [7 2 -15 6]. Short rows can bepadded with trailing zeros (see example below). Given sys and Q, connect computes a state-

    space model of the interconnection with the same inputs and outputs as sys (that is, the

    concatenation of all block inputs and outputs). The index vectors inputs and outputs then indicatewhich of the inputs and outputs in the large unconnected system are external inputs and outputs

    of the block diagram. For example, if the external inputs are inputs 1, 2, and 15 of sys, and the

    external outputs are outputs 2 and 7 of sys, then inputs and outputs should be set to

    matlab code

    1. inputs = [1 2 15];2. outputs = [2 7];

    The final model sysc has these particular inputs and outputs.

    Since it is easy to make a mistake entering all the data required for a large model, be sure toverify your model in as many ways as you can. Here are some suggestions: Make sure the poles

    of the unconnected model sys match the poles of the various blocks in the diagram. Check that

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    12/31

    the final poles and DC gains are reasonable. Plot the step and bode responses of sysc and

    compare them with your expectations.

    The connect function does not support delays in a reliable way. If you need to work extensivelywith block diagrams or you need to interconnect models with time delays, Simulink is a much

    easier and more comprehensive tool for model building.

    V d

    Consider the following block diagram.

    Given the matrices of the state-space model sys2

    matlab code

    1. A = [ -9.0201 17.77912. -1.6943 3.2138 ];3. B = [ -.5112 .53624. -.002 -1.8470];5. C = [ -3.2897 2.45446. -13.5009 18.0745];7. D = [-.5476 -.14108. -.6459 .2958 ];

    Define the three blocks as individual LTI models.

    matlab code

    1. sys1 = tf(10,[1 5],'inputname','uc')2. sys2 = ss(A,B,C,D,'inputname',{'u1' 'u2'},...3. 'outputname',{'y1' 'y2'})4. sys3 = zpk(-1,-2,2)

    Next append these blocks to form the unconnected model sys.

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    13/31

    matlab code

    1. sys = append(sys1,sys2,sys3)This produces the block-diagonal model

    matlab code

    1. sys2.3. a =4. x1 x2 x3 x45. x1 -5 0 0 06. x2 0 -9.0201 17.779 07. x3 0 -1.6943 3.2138 08. x4 0 0 0 -29.10.11. b =12. uc u1 u2 ?13. x1 4 0 0 014. x2 0 -0.5112 0.5362 015. x3 0 -0.002 -1.847 016. x4 0 0 0 1.414217.18.19.20.21. c =22. x1 x2 x3 x423. ? 2.5 0 0 024. y1 0 -3.2897 2.4544 025. y2 0 -13.501 18.075 026. ? 0 0 0 -1.414227.28.29. d =30. uc u1 u2 ?31. ? 0 0 0 032. y1 0 -0.5476 -0.141 033. y2 0 -0.6459 0.2958 034. ? 0 0 0 235.36. Continuous-time system.

    Note that the ordering of the inputs and outputs is the same as the block ordering you chose.Unnamed inputs or outputs are denoted b.

    To derive the overall block diagram model from sys, specify the interconnections and the

    external inputs and outputs. You need to connect outputs 1 and 4 into input 3 (u2), and output 3(y2) into input 4. The interconnection matrix Q is therefore

    matlab code

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    14/31

    1. Q = [3 1 -42. 4 3 0];

    Note that the second row of Q has been padded with a trailing zero. The block diagram has two

    external inputs uc and u1 (inputs 1 and 2 of sys), and two external outputs y1 and y2 (outputs 2

    and 3 of sys). Accordingly, set inputs and outputs as follows.

    matlab code

    1. inputs = [1 2];2. outputs = [2 3];

    You can obtain a state-space model for the overall interconnection by typing

    matlab code

    1. sysc = connect(sys,Q,inputs,outputs)2.3. a =4. x1 x2 x3 x45. x1 -5 0 0 06. x2 0.84223 0.076636 5.6007 0.476447. x3 -2.9012 -33.029 45.164 -1.64118. x4 0.65708 -11.996 16.06 -1.62839.10.11. b =12. uc u113. x1 4 014. x2 0 -0.07600115. x3 0 -1.501116. x4 0 -0.5739117.18.19. c =20. x1 x2 x3 x421. y1 -0.22148 -5.6818 5.6568 -0.1252922. y2 0.46463 -8.4826 11.356 0.2628323.24.25. d =26. uc u127. y1 0 -0.6620428. y2 0 -0.4058229.30. Continuous-time system.

    Note that the inputs and outputs are as desired.

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    15/31

    III. Thit k biu khin PID tng t1.Biu khin PID tng t

    By gi ta tip tc vi phn thit k b iu khin tng t.

    Chng ta c hai la chn:

    - Thit k bng Simulink: C th coi l phng php thc nghim. Phng php thit k ngin, nhanh chng, mi th u c sn, c ni vo nhau ri xem kt qu -> chn kt qu tt nht.

    - Thit k bng Matlab: ihi phi hiu bi ton, l thuyt v phi bit lp trnh mt cht ->kh hn mt cht nhng s hiu su hn v l thuyt v cch thc hin. Cho php kho st nhiuc tnh hn ngay trong qu trnh thit k cng nh hiu thm v cc lnh Matlab dng trongthit k.

    Hng th hai s c ch cho nhng ngi cn hiu su thm v cch thit k b iu khin. Tuynhin, khi lm th ta nn kt hp c hai hng trn va thit k theo l thuyt va c ci kim chng ngay.

    By gi chng ta bt u vi b iukhin dng (vng lp trong)

    y ta cha cn quan tm n tc vi, k n, mun bng bao nhiu cng c, min l tat dng bng bao nhiu th n phi ra by nhiu!

    s dng hm --connect-- ta v li s iu khin, trong nh s th t cc u vo cacc khi trong hnh trn, s th t ca cc u ra ca cc khi trong hnh vung nh hnh sau

    Trong khi l khi ta s t hm truyn bng 1. Khi ny c vo tin khai bo uvo ra cho c h m lnh --connect-- yu cu thi. Trong thut ton iu khin v hm truyn can bng 1 nn c n cng khng nh hng g n cu trc ca c h.

    Ta khai bo khi bng lnh

    matlab code

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    16/31

    1. sys1 = tf(1, 1, 'inputname', 'in');Vi khi iu khin PID th tm thi ta ch dng PI v khai bo nh sau:

    matlab code

    1. Kd = 1;2. Kp = 100;3. Ki = 10;4.5. numpid = [Kp Ki];6. denpid = [1 0];7.8. sys2 = tf(numpid, denpid, 'inputname', 'ei', 'outputname','uaref');

    Cui cng l m hnh ng c, khai bo nh sau:

    matlab code

    1. sys3 = ss(A_m, B_m, C_m, D_m, 'inputname', {'ua', 'TL'},'outputname',{'ia', 'n'});

    Sau s dng lnh --append-- bo cho Matlab bit cc khi cn kt hp v th t ca chngnh sau:

    matlab code

    1. sys = append(sys1, sys2, sys3);Tip theota phi khai bo cc im ni ca cc khu. Nu cc bn s thy, u vo ca khi

    l c s th t l 2, n l hiu ca u ra s 1 ca khi v u ra s 3 ca DCM. Vy nnkhi khai bo ma trn ta s phi c dng:

    [u vo s 2 = u ra s 1 - u ra s 3]

    Tng t, u vo ca khi DCM c s th t l 3 c ni vi u ra s 2 ca khi . Vynn khi khai bo ma trn ta s phi c dng:

    [u vo s 3 = u ra s 2]

    Tm li, ta khai bo ma trn nh sau:

    matlab code

    1. Q = [2 1 -32. 3 2 0];

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    17/31

    By gi khai bo cc u vo v u ra ca h sau khi ni vi nhau:

    matlab code

    1. inputs = [1 4];2. outputs = [3 4];

    Cui cng l dng lnh connnect:

    matlab code

    1. sysc = connect(sys,Q,inputs,outputs);

    n y ta c c m hnh khng gian trng thi tng hp ca h kn gm c b iu khin

    v i tng iu khin. u vo l dng in t (v ) v mmen ti , ura l dng in thc phn ng v tc .

    By gi ta c th v th th Bode v step nh sau:

    matlab code

    1. figure(3);2.

    bodemag(sysc(1,1),'r--', sysc(1,2),'b--', sysc(2,1),'g--',sysc(2,2),'m--',...

    3. logspace(-1,5,500));4. title('Bieu do Bode - Dieu khien dong tuong tu');5. legend('i_a^{ref} - i_a', 'T_L - i_a', 'i_a^{ref} - n', 'T_L - n', 3);6. grid on;7.8. [yc, tc] = step(sysc, 0.05);9.10. figure(4);11. plot(tc, yc(:, 1, 1),'r--', tc, yc(:, 2, 1),'g--', tc, yc(:, 1, 2),'b-

    -', tc,...12. yc(:, 2, 2),'k--'),13. title('Dap ung buoc nhay cua vong lap dieu khien dong');14. legend('i_a^{ref} - i_a', 'i_a^{ref} - n', 'T_L - i_a', 'T_L - n', 2);15. axis([0, 0.001, -0.2, 1.25]);16. gridon;

    C th download m-file ny ti y.DCMC001.m

    http://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/plot.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/plot.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/axis.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/axis.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/axis.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/plot.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.html
  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    18/31

    Hnh 3:Bi u Bode iu khi n dng tng t

    Hnh 4:p ng bc nhy vng lp iu khin dngBy gi l lc ta cn phn tch cc p ng thu c. T c th a ra mt s kt lun s b

    v vic chn cc h s v .

    http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcd001%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcd002%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcd001%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcd002%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcd001%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcd002%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcd001%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcd002%27%29/http://newwin%28%27image%27%2C%20%27%27%2C%20%27%27%2C%20%27figdcmcd001%27%29/
  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    19/31

    nhm ln ta c th thay sysc bng mt ci tn khc, chng hn -hekindcd- (h kn vi biu chnh dng). Khi lnh dng l

    matlab code

    1. hekindcd = connect(sys,Q,inputs,outputs);Sau tnh [yc, tc] v nh sau

    matlab code

    1. [yc, tc] = step(hekindcd, 0.05);Lu rng i vi biu Bode th trc tung biu th cho logarit ca bin . C th, nu gil bin ca tn hiu u ra th gi tr ghi trn trc tung l . V vy:

    - Gi tr 0 trn trc tung ng vi

    - Gi tr 20 trn trc tung ng vi

    - Gi tr 40 trn trc tung ng vi

    ...

    By gi ta quay li t biu Bode ca m hnh DCM (h h, v figure(1) trong m-file)

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    20/31

    Hy ch n ng mu , th hin quan h gia (chnh l in p cn c sinh ra dng) v . Bnc nhn xt g trong trng hp ny khng? Bn thy bin ca n th no?

    2.Phn tch cht lngGi tr bin ng vi tn s u vo khong hn 200 rad/s. Ngha l khi dao ng vi tn skhong . Th cn khi dao ng nh, khng thay i hoc thay i nhanh (tn s cao) thbin gim rt nhanh.iu ny c ngha l nh hng ca i vi l rt yu. V d khi ta t mt gi tr c nh(tn s bng 0) th gi tr bin c khi ch khong -100dB. Hay

    Tm li, ta c th nhn xt s b l taphi dng mt b iu khin c h s khuychi rt ln c th iu khin c u ra bm theo gi tr t u vo.By gi ta xem qua iu g xy ra cho ta vi b iu khin thit k nh trn (ng vi

    ).R rng l trong khong tn s t n khong th hay .

    Ngha l . Cn li ngoi khong tn s th khng iu khin c. Lu rng tn s khong l lc ng c tnh tn s bin bt u i xung rtnhanh v chnh l Bandwidth hay di thng tn ca h. Ngha l, nu tn s u

    vo ca ln hn tn s ny th bin ca u ra gim xung rt nhanh, hay ni

    cch khc rt nhanh.Trong thc t th ta mong mun c dng ng thng nm trng vi ng hay

    trong sut di tn s t 0 n cho u ra bm theo u vo (vhm truyn bng ).

    Chnh v th m ta s th tng n 10.000 v n 100. Khi p ng tn s can nh sau:

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    21/31

    Trong thc t, c trng hp phi dng .y mi ch l cc nhn xt s b, p dng cho vng iu khin dng bn trong. Nh nitrn, vng iu khin ny phi c p ng tht nhanh. Trong trng hp ny n vo khongrad/s v do

    Chu k vo khong

    Ta cn phi thit k mch vng iu chnh tc na. Mch vng ny c Bandwitdh chm hnnhiu v tc c khng th nhanh nh in c.

    3.M phng biu khin PID tng tTrc tin l vi b tham s:

    S m phng download y:DCMCC001.mdl

    p ng u ra

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    22/31

    Nh vy l tn hiu ra khng bm theo tn hiu vo.

    Cn y l vi b tham s:p ng u ra

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    23/31

    u ra bm tt theo u vo.

    4.iu chnh tc tng hp b iu khin th dng s kt ni sau

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    24/31

    Cn y l on chng trnh

    matlab code

    1. Ra = 0.25;2. La = 0.004;3. Phi = 0.04;4. J = 0.012;5. Km = 38.2;6. Ke = 2*pi*Km;7.8. A_m = [-Ra/La -Ke*Phi/La; Km*Phi/2/pi/J 0];9. B_m = [1/La 0; 0 -1/2/pi/J];10. C_m = [1 0; 0 1];11. D_m = [0 0; 0 0];12.13. G_m = ss(A_m, B_m, C_m, D_m);14. minfo(G_m)15.16. figure(1);17. bodemag(G_m(1,1),'r--',G_m(1,2),'b--', G_m(2,1),'g--',G_m(2,2),'m--',

    logspace(-1,5,500));18. title('Bieu do Bode vong ho');19. legend('U_a - I_a', 'U_a - n', 'T_L - I_a', 'T_L - n', 3);20. gridon;21.22. Kdc = 1;23. Kpc = 2500;24. Kic = 5;25.26. numpidc = [Kpc Kic];27. denpidc = [1 0];28.29. Wc = tf(1, 1, 'inputname', 'in');30. Kcc = tf(numpidc, denpidc, 'inputname', 'ec', 'outputname','uaref');31. DCM = ss(A_m, B_m, C_m, D_m, 'inputname', {'ua', 'TL'},

    'outputname',{'ia', 'n'});32.33. CMMApp = append(Wc, Kcc, DCM);34.35. Qc = [2 1 -336. 3 2 0];37.38. inputsc = [1 4];39. outputsc = [3 4];40.41. CCMDL = connect(CMMApp, Qc, inputsc, outputsc);42.43. figure(2);

    http://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/pi.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/j.html
  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    25/31

    44. bodemag(CCMDL(1,1),'r--', CCMDL(1,2),'b--', CCMDL(2,1),'g--',CCMDL(2,2),'m--',...

    45. logspace(0,9,500));46. title('Bieu do Bode - Dieu khien dong tuong tu');47. legend('i_a^{ref} - i_a', 'T_L - i_a', 'i_a^{ref} - n', 'T_L - n', 3);48. gridon;49.50. figure(3);51. step(CCMDL);52. gridon;53.54. Kdn = 1;55. Kpn = 0.15;56. Kin = 7.5;57.58. numpidn = [Kpn Kin];59. denpidn = [1 0];60.61. Wn = tf(1, 1, 'inputname', 'nr');62. Kn = tf(numpidn, denpidn, 'inputname', 'en', 'outputname','iaref');63.64. [CCMDLA, CCMDLB, CCMDLC, CCMDLD] = ssdata(CCMDL);65. CCMDLS = ss(CCMDLA, CCMDLB, CCMDLC, CCMDLD, 'inputname', {'ui',

    'TL'},...66. 'outputname',{'ia', 'n'});67.68. SCMDLApp = append(Wn, Kn, CCMDLS);69.70. Qn = [2 1 -471. 3 2 0];72.73. inputsn = [1 4];74. outputsn = [3 4];75.76. SCMDL = connect(SCMDLApp, Qn, inputsn, outputsn);77.78. figure(4);79. bodemag(SCMDL(2,1),'r--', SCMDL(1,1),'b--', SCMDL(2,2),'g--',

    SCMDL(1,2),'m--',...80. logspace(-2, 3, 500));81. title('Bieu do Bode - Dieu khien tocdo');82. legend('n_{ref} - n', 'n_{ref} - i_a', 'TL - n', 'T_L - i_a', 1);83. gridon;84.85. figure(5);86. step(SCMDL);87. gridon;

    Download file ny y.DCMC003.m

    Cc p ng ca h thng thit k

    http://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/toc.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/toc.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/toc.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/title.htmlhttp://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.html
  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    26/31

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    27/31

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    28/31

    5.M phng hiu khin vi hai mch vngM phng hiu khin vi hai mch vng.

    M hnh m phng download y.DCMCC003.mdl

    Cc kt qu m phng khng ti, dng in tng ln trong qu trnh khi ng ri tr v 0.

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    29/31

    Cc kt qu m phng c ti

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    30/31

    v cc hnh sau khi m phng th dng file ny. plot_DCMC.m

    p ng ca h khi ti thay i

    Trn cc th m phng th hin rt r nh hng ca ti n cc p ng ca hthng. Khi ti tng th nu khng iu chnh g th tc ng c s b gim xung.

    Nhng do c b iu chnh tc nn n s ra lnh tng dng ln sinh ra thm lc bli tc ng ca ti. Qua b iu khin dng, tn hiu yu cu tng ny s c chuyn

  • 7/31/2019 Dieu Khien Toc Do Dong Co Dien 1 Chieu

    31/31

    thnh in p (tng) t ln phn ng. B iu khin dng s lin tc theo di xem dng t c mc yu cu cha, cn b iu khin tc th kim tra s sai khc v tc nh th hin hnh di y

    ( y ta cn cha cp n nh hng trc tip ca mmen i vi dng in theo hm truynt n ).

    Khi m phng ta c th thay i ti thy dng in thay i nh th no, trong khi tc vngi nguyn.

    Phi ni rng cc b iu khin p ng rt tt yu cu t ra v rt ging vi thc t.