init_cds_simulink_intro_part1.m 709 B

1234567891011121314151617181920212223242526272829303132333435
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % Einf�hrung in Matlab/Simulink
  3. %
  4. % Bakk.-Vertiefung
  5. % Institut fuer Automatisierungstechnik
  6. % Gruppe fuer komplexe dynamische Systeme
  7. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  8. % Aufraeumen
  9. clear
  10. close all
  11. clc
  12. %% Parameter deffinieren
  13. T = 0.5;
  14. xi = 0.2;
  15. V = 2;
  16. Ta = 0.1;
  17. %% Moeglichkeiten zum Implementieren eines Systems, PT2-Glied
  18. % 1. Moeglichkeit: Uebertragungsfunktion
  19. G_tf = tf([V],[T^2 2*xi*T 1])
  20. G_z = c2d(G_tf,Ta,'zoh')
  21. % 2. Moeglichkeit: Zustandsraumdarstellung
  22. A = [0 1; -1/T^2 -2*xi/T];
  23. B = [0;V/T^2];
  24. C = [1;0];
  25. D = 0;
  26. sys = ss(A,B,C',D)