Advertisement
aidanozo

Untitled

Jan 5th, 2025
1,366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.90 KB | None | 0 0
  1. Laborator 6 SCPI
  2. num = [1.11 , 1];
  3. den = [1.9, 0.9, 1.7];
  4.  
  5. s = tf('s')
  6.  
  7. Hs = tf(num, den)
  8.  
  9. Hs.InputDelay = 1.5;
  10.  
  11. T = 0.5;
  12.  
  13. Hs_discretized = c2d(Hs, T, 'zoh');
  14.  
  15. Hs_shifted = Hs_discretized * tf(1, [1 0 0 0], T);
  16.  
  17. [num, den] = tfdata(Hs_shifted, 'v');
  18.  
  19. Hs_z_minus3 = tf(num, den, T, 'Variable', 'z^-1');
  20.  
  21. Hs_z_minus3
  22.  
  23. A = [-1.594, 0.7891]
  24. B = [0.3103, -0.1953]
  25.  
  26. omega = 0.5026;
  27. theta = 0.75;
  28.  
  29. num = omega^2;
  30. den = [1, 2 * theta * omega, omega^2];
  31.  
  32. Hi = tf(num, den);
  33.  
  34. Hi
  35.  
  36. Hi_discretized = c2d(Hi, T, 'zoh');
  37. Hi_discretized
  38.  
  39. P = [-1.634, 0.686]
  40.  
  41. Matrice = [1 0 0 0 0 0 0 ; -1.594 1 0 0 0 0 0 ; 0.7891 -1.594 1 0 0 0 0 ; 0 0.7891 -1.594 1 0 0 0 ; 0 0 0.7891 -1.594 1 0.303 0 ; 0 0 0 0.7891 -1.594 -0.1953 0.303 ; 0 0 0 0 0.7 0 -0.1953]
  42. P = [1 ; -1.634 ; 0.686 ; 0 ; 0; 0; 0]
  43. syms s1 s2 s3 s4 r0 r1
  44. coloana = [1; s1; s2; s3; s4; r0; r1]
  45.  
  46. solutii = linsolve(Matrice, P);
  47.  
  48. solutii
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement