Advertisement
Guest User

Pomana

a guest
Nov 22nd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. function [] = lab4()
  2. A = [0 0 1; 0 -1 6; 0 1 0]
  3. B = [0; 1; 0]
  4. C = [-2 0 1]
  5. [n n] = size(A);
  6. syms s k z h t l;
  7.  
  8. Hs = simplify( C * inv(s * eye(n) - A) * B)
  9.  
  10. yft = ilaplace(Hs / s)
  11.  
  12. tmp = ilaplace(Hs / s, s, k * h);
  13. Hdz = simplify(((z - 1) / z) * ztrans(tmp, k, z))
  14.  
  15. [N, D] = numden(Hdz);
  16. beta = coeffs(N, z);
  17. alfa = coeffs(D, z);
  18.  
  19. alfa = alfa / alfa(1);
  20. AC = [ 0 *eye(2) 1*eye(2); -alfa(3) * eye(2) -alfa(2) * eye(2)]
  21. BC = [0*eye(2) ; 1*eye(2)]
  22. CC = [ beta(2) * eye(2) beta(1) * eye(2)]
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement