Question

Analyze the response of the system, using matlab X-4x-5x = cosh (at); *(0) = 1, *(0)=4
0 0
Add a comment Improve this question Transcribed image text
Answer #1

In matlab I have done it using lsim as well as ode45.

lsim code:

A = [0 1;5 4];
B = [0;1];
C = [1 0;0 1];
D = 0;
sys = ss(A,B,C,D)
t = 0:0.01:1;
ic = [1;4];
u = cosh(2*t);
figure(1)
lsim(sys,u,t,ic)

out(1) shows displacement responce and out(2) shows velocity responce.

Linear Simulation Results 150 100 To: Out(1) 50 Amplitude 0 800 600 To: Out(2) 400 200 0 0 0.1 0.2 0.3 0.7 0.8 0.9 1 0.4 0.5

by ode 45:

function:

function dydx = odefun(t,y)
    dydx = [y(2);5*y(1)+4*y(2)+cosh(2*t)];
end

code:

[t,y] = ode45(@(t,y) odefun(t,y),t,ic)
figure(2)
plot(t,y(:,1),'displacement response')
figure(3)
plot(t,y(:,2),'velocity response')

after saving the function, run the code in matlab.

upvote my answer.

Add a comment
Know the answer?
Add Answer to:
Analyze the response of the system, using matlab X"-4x'-5x = cosh (at); *(0) = 1, *'(0)=4
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