riccardinofuffolo

Controlli Automatici - Controllore 15/VII/2002

Jun 17th, 2012
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.30 KB | None | 0 0
  1. clear all
  2. close all
  3. s = tf('s');
  4.  
  5. F1 = (1 + s/0.1)/((1 + s/0.2)*(1 + s/10)); F2 = 1/s; Kr = 1;
  6. KF1 = dcgain(F1); KF2 = dcgain(s*F2);
  7.  
  8. % 1.1.a
  9. % Già garantita in quanto il sistema è di tipo 1
  10.  
  11. % 1.1.b
  12. % Devo aggiungere un polo nel controllore
  13. C1 = 1/s;
  14. errore = 0.16;
  15. Kcb = Kr^2/(errore*KF1*KF2);
  16.  
  17. % 1.1.c
  18. % Disturbo lungo il ramo diretto, G1 di tipo 1(+1). Effetto nullo.
  19.  
  20. % bode(F1*F2*C) -> A stabilità regolare -> Kc positivo
  21. Kc = Kcb;
  22. C2 = Kc*C1;
  23.  
  24. % Funzione ad anello definita fin qui
  25. Ga0 = C2*F1*F2/Kr;
  26.  
  27. % 1.1.d
  28. wb = 4;
  29. wc = 0.63*wb;
  30.  
  31. % 1.1.e
  32. sovra = 0.25;
  33. MrdB = 20*log10((1 + sovra)/0.9);
  34. mphi = 60 - 5*(MrdB) + 18;                 % Con Nichols ottengo poco più di 40°
  35.  
  36. [modulo0 fase0] = bode(Ga0, wc);
  37.  
  38. deltamodulo = 20*log10(modulo0);
  39. deltafase = (180 - fase0) + mphi;
  40.  
  41. % Anticipatrice
  42. md = 7;
  43. xd = 1.14;
  44. % figure, bode((1+s)/(1+s/md))
  45. taud = xd/wc;
  46. Rd = (1 + taud*s)/(1 + (taud/md)*s);
  47.  
  48. C3 = C2 * Rd^2;
  49. Ga1 = Ga0 * Rd^2;
  50.  
  51. [modulo1 fase1] = bode(Ga1, wc);
  52.  
  53. % Attenuatrice
  54. mi = modulo1;
  55. xi = 41;
  56. % figure, bode((1+s/mi)/(1+s))
  57. taui = xi/wc;
  58. Ri = (1 + (taui/mi)*s)/(1 + taui*s);
  59.  
  60. C4 = C3 * Ri;
  61. Ga2 = Ga1 * Ri;
  62.  
  63. margin(Ga2)
  64.  
  65. % Valutazione soddisfacimento specifiche d/e
  66. W = feedback(C4*F1*F2, 1/Kr);
  67. figure, step(W)                
  68. figure, bode(W)
Advertisement
Add Comment
Please, Sign In to add comment