riccardinofuffolo

Controlli Automatici - 15/VII/2002 (versione con zero)

Jun 18th, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.12 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. errore = 0.16;
  14. Kcb = Kr^2/(errore*KF1*KF2);
  15.  
  16. % 1.1.c
  17. % Disturbo lungo il ramo diretto, G1 di tipo 1(+1). Effetto nullo.
  18.  
  19. % bode(F1*F2*C) -> A stabilità regolare -> Kc positivo
  20. Kc = Kcb;
  21.  
  22. % Funzione ad anello definita fin qui
  23. Ga0 = Kc*F1*F2/(s*Kr);
  24.  
  25. % 1.1.d
  26. wb = 4;
  27. wc = 0.63*wb;
  28.  
  29. % 1.1.e
  30. sovra = 0.25;
  31. MrdB = 20*log10((1 + sovra)/0.9);
  32. mphi = 60 - 5*(MrdB) ;                 % Con Nichols ottengo poco più di 40°
  33.  
  34. [modulo0 fase0] = bode(Ga0, wc);
  35.  
  36. deltamodulo = 20*log10(modulo0);
  37. deltafase = (180 - fase0) + mphi + 15;
  38.  
  39. % Rete PI
  40. xz = 3.84;
  41. tauz = xz/wc;
  42. %bode(1+s)
  43. Cz = (1 + tauz*s);
  44.  
  45. Ga1 = Ga0 * Cz;
  46. [modulo1 fase1] = bode(Ga1, wc);
  47.  
  48. % Attenuatrice
  49. mi = modulo1;
  50. xi = 75;
  51. taui = xi/wc
  52. %figure, bode((1+s/mi)/(1+s))
  53. Ri = (1 + (taui/mi)*s)/(1 + taui*s);
  54.  
  55. Ga2 = Ga1 * Ri;
  56.  
  57. margin(Ga2)
  58.  
  59. W = feedback(Kc*F1*F2*Cz*Ri/s, 1/Kr);
  60. step(W)
  61. bode(W)
Advertisement
Add Comment
Please, Sign In to add comment