Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

We Used The Following System Through The Investigation Process

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Name : Mustafa Mukhtar Elbashir Index : 174099

- System used in investigation:


We used the following system through the investigation process:

D(s)

- Steps of design:
i. Design a proportional controller:
C(s) = Kp
For the first three steps the disturbance is considered zero.
a- First, I entered the plant and sensor’s transfer functions in MATLAB as
follows:

>> s = tf('s');
>> p = 4/((2*s+1)*(0.5*s+1));
>> H = 1/(0.05*s+1);

Then I plotted the root locus of the system and used the rlocfind to find Kp*
which makes the system marginally stable as follows:

>> openloop_transfer_function = p*H;


>> rlocus(openloop_transfer_function);
>> rlocfind(openloop);
I found that Kp* = 14.0694
b- I used the command sgrid to find the value of the Kp that results in a
system with damping ratio of 𝜉 = 0.8 as follows:

>> sgrid
>> Kp = rlocfind(openloop_transfer_function);

I found that Kp = 0.3269

c- I plotted the step response for different values of Kp < Kp* and showed the
overshoot in each case as follows:

Kp_values = [3 5 7 8 10];
s = tf('s');
p = 4/((2*s+1)*(0.5*s+1));
H = 1/(0.05*s+1);
for i=1:5,
closed_loop = feedback(Kp_values(i)*p, H);
step(closed_loop);
hold on
end
set(findall(gcf, 'type','line'),'linewidth', 1); legend('Kp=3',
'Kp=5', 'Kp=7', 'Kp=8', 'Kp=10');
The results are shown below:
Then by trial and error I found the largest value of gain k̅ Ԓ which produce
about 20% overshoot and it is found to be:
k̅Ԓ = 1.255
And the response for this k̅Ԓ is shown below:

Then I calculated the gain margin and phase margin for this k̅Ԓ as follows:

>> closed_loop = feedback(1.255*p, H);


>> bode(closed_loop);
>> margin(closed_loop);

The results are shown below:


So, gain margin = infinity, phase margin = 106 deg (at 2.15 rad/s)

d- Finally, I used a unit step disturbance and visualized the response of the
system which is as follows:

ii. Proportional plus integral control design:


C(s) = 𝑲𝒑(S +𝑲𝒊) /s

In the first step the disturbance is zero.


a- I plotted the response for Kp changes from 0.3 to 1.7 with increments of 0.2
for the Ki = 0, 0.1, 0.25, 0.5, 1, 2 as follows:

Ki = x;
s = tf('s');
p=4/((2*s+1)*(0.5*s+1));
H = 1/(0.05*s+1);
for i=0.3:0.2:1.7,
c = (i*(s+Ki))/s ;
closed_loop = feedback(C*p, H);
step(closed_loop);
hold on
end
set(findall(gcf, 'type','line'),'linewidth',
1); legend('Kp=0.3', 'Kp=0.5', 'Kp=0.7', 'Kp=0.9',
'Kp=1.1', 'Kp=1.3', 'Kp=1.5', 'Kp=1.7')

x in the above code is replaced by the corresponding value of Ki. The


results are shown below:

Ki = 0:

Ki = 0.1:
Ki = 0.25:

Ki = 0.5:
Ki = 1:
Ki = 2:

The value of the Ki that results in settling time ts ≤ 6s is k̅ӏ = 0.5.

b- The value of the Kp that results in overshoot less than 10% is Kp = 0.5.
Then I plotted the response using these values of Ki and Kp when both reference
input and disturbance input is unit step. The results are shown below:

c- Comparing these results , proportional controller can reduce error by


increasing gain but can not eliminate it , however proportional plus integral
controller (PI) which is designed by connecting proportional controller in
parallel with integral controller can eliminate error to zero
d- I made the disturbance and reference inputs as ramp inputs and the response
is shown below:

iii. PID controller design:


C(S) = 𝑲𝒑 (KD * S^ 𝟐 + 𝒔 + 𝑲𝒊)/S

a- I plotted the response for Ki = 0.5, Kp changes from 1 to 10 with increments of 1,


and for the KD = 0, 0.1, 0.2, 0.3, 0.4, 0.5 as follows:

Ki = 0.5;
KD = x;
s = tf('s');
p =4/((2*s+1)*(0.5*s+1));
H = 1/(0.05*s+1);
for KP=1:10,
C = (KP*((KD*s^2)+s+Ki))/s;
closed_loop = feedback(C*p, H);
step(closed_loop);
hold on
end
set(findall(gcf, 'type','line'),'linewidth', 1);
legend('Kp=1', 'Kp=2', 'Kp=3', 'Kp=4', 'Kp=5',
'Kp=6', 'Kp=7', 'Kp=8', 'Kp=9', 'Kp=10')
x in the above code is replaced by the corresponding value of KD. The
results are shown below:

KD = 0:
KD= 0.1 :

KD = 0.2 :
KD = 0.3:

KD = 0.4:
KD = 0.5:
From above responses we see that the smallest KD that will allow overshoot and
rise time specifications is K*D = 0.4.

b- I plotted the root locus for the system with Ki = 0.5, KD = 0.4 to determine
the j 𝜔 crossing which corresponds to Kp value that make the system
marginally stable as follows:

>> KD = 0.4;
>> C = ((KD*s^2)+s+Ki)/s;
>> openloop_transfer_function = C*p*H;
>> rlocus(openloop_transfer_function);

The result is shown below:


As shown in figure the root locus does not cross the j𝜔 axis so we can not
Find a suitable value for KP.

c- From plot question (a) that corresponds to KD = 0.4 we can


see that the three specifications are satisfied when Kp = 0.7.
To officially verify this result I plotted the response with
these parameters and the result is shown below:

We see that the three specifications are satisfied when Kp = 7.

d- proportional controller reduces error by increasing gain ,


but can not eliminate it , however the proportional plus
integral controller can eliminate the error completely , the
derivative controller makes the system faster but affects on
stability and its gain is very low .

conclusion :
proportional controller can reduce error but will increase the
overshoot , reducing the settling time and the time constant ,
in the other hand the integral controller can eliminate error ,
increasing settling time and time constant , finally , the third
term controller or the derivative controller can highly
increase the overshoot but highly decrease the settling time
and time constant .

You might also like