Question

5 For a system: Y() 10.4s? +47s +160 U(s) 5+148° +568 +160 use Matlab to do: (a) obtain the state-space representation of the
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB CODE:

clc
close all
num = [10.4 47 160];
den = [1 14 56 160];
G = tf(num,den);
% a)
[A,B,C,D] = tf2ss(num,den)

% b)
csys = canon(G,'modal')

% c)
Roots = eig(A)
if real(Roots)>0
disp('Given system is unstable')
else
disp('Given system is stable')
end

% d)

Contr = ctrb(A,B)
if det(Contr)==0
disp('Given system is controllable')
else
disp('Given system is Not controllable')
end

obser = obsv(A,C)
if det(obser)==0
disp('Given system is observable')
else
disp('Given system is Not observable')
end

OUTPUT

For a ;

Command Window -14 -56 -160 10.4000 47.0000 160.0000

For b :

Command Window csys = x1 x2 x3 x1 -10 x2 -2 3.464 x3 -3.464 -2 ul x1 -6.947 x2 2.036 x3 -4.437 x1 x2 x3 -1.383 0.1194 -0.1243

For c :

Command Window Roots = -10.0000 + 0.0000i -2.0000 + 3.4641i -2.0000 - 3.4641i Given system is stable Contr = -14 140 -14 !!

For d :Command Window Contr 140 -14 -14 Given system is Not controllable obser = 1.0e+04 * 0.0047 0.0010 0.0160 -0.0099 -0.0422 -0.1

THANK YOU.

Add a comment
Answer #2

clc
close all
num = [1 2 15 10];
den = [1 4 8 10];
G = tf(num,den);
% a)
[A,B,C,D] = tf2ss(num,den)

% b)
csys = canon(G,'modal')

% c)
Roots = eig(A)
if real(Roots)>0
disp('Given system is unstable')
else
disp('Given system is stable')
end

% d)

Contr = ctrb(A,B)
if det(Contr)==0
disp('Given system is controllable')
else
disp('Given system is Not controllable')
end

obser = obsv(A,C)
if det(obser)==0
disp('Given system is observable')
else
disp('Given system is Not observable')
end



Add a comment
Know the answer?
Add Answer to:
5 For a system: Y() 10.4s? +47s +160 U(s) 5+148° +568 +160 use Matlab to do:...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT