Question

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Please wriite the matlab code of the question :)))

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

PROBLEM 4 Suppose that a system is shown in Figure 4. There are three controllers that might be incorporated into this system

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Matlab code is given below in bold letters.

clc;

close all;

clear all;

% define the lapalce variable s

s = tf('s');

% define the plant

Gp = 1/(s^2+5*s+6);

% plot the root locus with proportional controller

% define gain k

k = 0:0.1:100;

figure;rlocus(Gp,k);

Root Locus 15 System: Gp Gain: 11.9 Pole: -25 3.41i Damping: 0.591 Overshoot(%): 10 Frequency (radis: 4.23 0 0.5 43.5 -3-2.5

From the above figure, it is observed that the %overshoot is 10 % for a gain of 11.9.

Time constant = 1/2.5 = 0.4 sec

Therefore the settling time = 4*T = 4*0.4 = 1.6 sec.

% Question 2 integral controller

% MATLAB code is in bold letter

% plot the root lcous with integral controller alone

% define gain k

k = 0:0.1:100;

figure;rlocus(Gp/s,k);

Root Locus System: untitled1 Gain: 4.4 Pole: -0.650.876i Damping: 0.596 Overshoot (% 9.7 Frequency (rad/s): 1.09 -3 -4 -6 -4

From the above figure, it is observed that the %overshoot is 10 % for a gain of 4.4.

Time constant = 1/0.65 = 1.5385 sec

Therefore the settling time = 4*T = 4*1.5385 = 6.1538 sec.

% Question 3 Proportional + integral controller

% plot the root lcous with proportional integral controller

% define gain k

k = 0:0.1:100;

figure;rlocus(Gp*(s+1)/s,k);

Root Locus 15 System: untitled1 10 Gai: 10 Pole: -2.112.87i Damping: 0.591 Overshoot(%): 9.99 Frequency (radis): 3.56 153.52.

From the above figure, it is observed that the % overshoot is 10 % for a gain of 10.

Time constant = 1/2.11= 0.4739sec

Therefore the settling time = 4*T = 4*0.4739 = 1.8957sec.

% Question d
figure;
subplot(311);
rlocus(Gp,k);
title('proportional controller');

subplot(312);
rlocus(Gp/s,k);
title('intgral controller controller');


subplot(313);
rlocus(Gp*(s+1)/s,k);
title('proportional + integral controller');

proportional controller 20 -10 -3.5 -2.5 0.5 0.5 Real Axis (seconds intgral controller controller Real Axis (seconds) proport

Add a comment
Know the answer?
Add Answer to:
Please wriite the matlab code of the question
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