GSM_2_2.m 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. % Aufgabe 2.2
  2. % GSM mit Propeller
  3. clc;
  4. clear;
  5. close all;
  6. %% 2.2.2
  7. % Subskript Notation: GSM Subskript substituiert mit G
  8. % Konstante aus Tabelle 2.1
  9. LG = 1.4e-3; % H
  10. RG = .46; % Ohm
  11. kG = .1; % N m A^-1
  12. JG = 12.4e-3; % kg m^2
  13. dcG = .152; % N m
  14. dvG = 1.8e-3; % N m s rad^-1
  15. JP = 32.5e-3; % kg m^2
  16. dcP = .169; % N m
  17. dvP = 2.7e-3; % N m s rad^-1
  18. dqP = 1e-4; % N m s^2 rad^-2
  19. cGP = .6822; % N m rad^-1
  20. dGP = 1e-5; % N m s rad^-1
  21. % Ruhelagenbedingungen (Abgabe)
  22. Mext = 0;
  23. uG = 5.6;
  24. % Ruhelagengleichungen (erste Lösung aus Maple)
  25. iGR1 = (-kG*sqrt(((-4*dcG - 4*dcP - 4*Mext)*dqP + (dvG + dvP)^2)*RG^2 + 2*kG*(2*uG*dqP + kG*(dvG + dvP))*RG + kG^4) + (2*uG*dqP + kG*(dvG + dvP))*RG + kG^3)/(2*RG^2*dqP);
  26. pGPR1 = ((-RG*dvG - kG^2)*sqrt(((-4*dcG - 4*dcP - 4*Mext)*dqP + (dvG + dvP)^2)*RG^2 + 2*kG*(2*uG*dqP + kG*(dvG + dvP))*RG + kG^4) + (-2*dcG*dqP + dvG^2 + dvG*dvP)*RG^2 + ((2*dvG + dvP)*kG^2 + 2*uG*dqP*kG)*RG + kG^4)/(2*RG^2*dqP*cGP);
  27. wGR1 = (sqrt(((-4*dcG - 4*dcP - 4*Mext)*dqP + (dvG + dvP)^2)*RG^2 + 2*kG*(2*uG*dqP + kG*(dvG + dvP))*RG + kG^4) + (-dvG - dvP)*RG - kG^2)/(2*RG*dqP);
  28. wPR1 = (sqrt(((-4*dcG - 4*dcP - 4*Mext)*dqP + (dvG + dvP)^2)*RG^2 + 2*kG*(2*uG*dqP + kG*(dvG + dvP))*RG + kG^4) + (-dvG - dvP)*RG - kG^2)/(2*RG*dqP);
  29. % Ruhelagengleichungen (zweite Lösung aus Maple)
  30. iGR2 = (kG*sqrt(((-4*dcG - 4*dcP - 4*Mext)*dqP + (dvG + dvP)^2)*RG^2 + 2*kG*(2*uG*dqP + kG*(dvG + dvP))*RG + kG^4) + (2*uG*dqP + kG*(dvG + dvP))*RG + kG^3)/(2*RG^2*dqP);
  31. pGPR2 = ((-RG*dvG - kG^2)*-sqrt(((-4*dcG - 4*dcP - 4*Mext)*dqP + (dvG + dvP)^2)*RG^2 + 2*kG*(2*uG*dqP + kG*(dvG + dvP))*RG + kG^4) + (-2*dcG*dqP + dvG^2 + dvG*dvP)*RG^2 + ((2*dvG + dvP)*kG^2 + 2*uG*dqP*kG)*RG + kG^4)/(2*RG^2*dqP*cGP);
  32. wGR2 = (-sqrt(((-4*dcG - 4*dcP - 4*Mext)*dqP + (dvG + dvP)^2)*RG^2 + 2*kG*(2*uG*dqP + kG*(dvG + dvP))*RG + kG^4) + (-dvG - dvP)*RG - kG^2)/(2*RG*dqP);
  33. wPR2 = (-sqrt(((-4*dcG - 4*dcP - 4*Mext)*dqP + (dvG + dvP)^2)*RG^2 + 2*kG*(2*uG*dqP + kG*(dvG + dvP))*RG + kG^4) + (-dvG - dvP)*RG - kG^2)/(2*RG*dqP);
  34. % x = [iG, phiG, wG, wP]
  35. % erste Ruhelage aus Maple
  36. xR1 = [iGR1; pGPR1; wGR1; wPR1]
  37. % zweite Ruhelage aus Maple
  38. xR2 = [iGR2; pGPR2; wGR2; wPR2]
  39. iGR = iGR1;
  40. pGPR = pGPR1;
  41. wGR = wGR1;
  42. wPR = wPR1;
  43. Al = [
  44. -RG/LG, 0, -kG/LG, 0;
  45. 0, 0, 1, -1;
  46. kG/JG, -cGP/JG, (-dvG - dGP)/JG, dGP/JG;
  47. 0, cGP/JP, dGP/JP, (-2*dqP*wPR - dGP - dvP)/JP
  48. ];
  49. Bl = [
  50. 1/LG, 0;
  51. 0, 0;
  52. 0, 0;
  53. 0, -1/JP
  54. ];
  55. cl = [0, 0, 0, 1];
  56. dl = [0, 0];
  57. eigAl = eig(Al);