Question

Please solve as a MATLAB code.

A unity feedback closed loop control system is displayed in Figure 4. (a) Assume that the controller is given by G (s) 2. Bas

An+ Desired attitude 酬r) -10 (s2+3.5s+6)ctual s+10 attitude Figure 4: A unity feedback closed loop control system

A unity feedback closed loop control system is displayed in Figure 4. (a) Assume that the controller is given by G (s) 2. Based on the lsim function of MATLAB, calculate and obtain the graph of the response for (t) at. Here a 0.5°/s. Find the height error after 10 seconds, (b) In order to reduce the steady-state error, substitute G (s) with the following controller This is a Proportional-Integral (PI) controller. Repeat part (a) in the presence of Pl controller, and juxtapose the steady state error of the previous controller with the PI controller.
An+ Desired attitude 酬r) -10 (s2+3.5s+6)ctual s+10 attitude Figure 4: A unity feedback closed loop control system
0 0
Add a comment Improve this question Transcribed image text
Answer #1

with proportional controller:

k=2;

matlab code:

clc;clear all;close all;
t=0:0.001:20;
num=[10 50];
d1=[1 10];
d2=[1 3.5 6 0];
denum=conv(d1,d2)
sys1=tf(num,denum)
sys=feedback(sys1,1)
ip=0.5*t;
lsim(sys,ip,t),grid

output:


denum =

1.0000 13.5000 41.0000 60.0000 0


sys1 =

10 s + 50
------------------------------
s^4 + 13.5 s^3 + 41 s^2 + 60 s

Continuous-time transfer function.


sys =

10 s + 50
-----------------------------------
s^4 + 13.5 s^3 + 41 s^2 + 70 s + 50

Continuous-time transfer function.

output response:

Linear Simulation Results Input: In(1) Time (seconds): 11 Amplitude: 5.48 System: sys Time (seconds): 11 Amplitude: 4.92 20 1with proportional control:

g(s)=2+(1/s);

matlab code:

clc;clear all;close all;
t=0:0.001:20;
n1=[2 1];
n2=[10 50];
num=conv(n1,n2);
d1=[1 10];
d2=[1 3.5 6 0 0];
denum=conv(d1,d2)
sys1=tf(num,denum)
sys=feedback(sys1,1)
ip=0.5*t;
lsim(sys,ip,t),grid

output:


denum =

1.0000 13.5000 41.0000 60.0000 0 0


sys1 =

20 s^2 + 110 s + 50
--------------------------------
s^5 + 13.5 s^4 + 41 s^3 + 60 s^2

Continuous-time transfer function.


sys =

20 s^2 + 110 s + 50
---------------------------------------------
s^5 + 13.5 s^4 + 41 s^3 + 80 s^2 + 110 s + 50

Continuous-time transfer function..

response:

Linear Simulation Results System: sys Time (seconds): 11 Amplitude: 5.51 20 10 12 14 16 18 Time (seconds)

Add a comment
Know the answer?
Add Answer to:
A unity feedback closed loop control system is displayed in Figure 4. (a) Assume that the control...
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