Root locus method will be an appropriate method to see the effect of P, I ad D gains on step response of closed loop system. Consider a second-order system:
So the unity feedback closed-loop response of this uncontrolled system is shown below.
We can see here, the system has slow response and has a steady state error too, it can be mitigated using a properly tuned controller.
We start with a Proportional controller, first see the root locus of the system G.
By cascading a P controller the root locus will move faster. as we increase the gain of the system the close loop poles will start to travel from the initial position (open loop pole location) and it will go on the path of locus. If gain is less then it will remain on real axis and far from original position i.e. away from origin that implies the value of time constant will decrease that means speed of response will increase. As we further increase the gain the poles will enter in complex plane then oscillations will be started. Step response for K_p =1 , 5 and 10 is shown below.
Figure shown below is for K_p=20 and K_p=25 in these plots the oscillation increases as K_p increase but the speed won't change much because the real part of close loop poles remain same.
Now, we introduce the proportional-derivative controller:
Now, there wil be three cases:
1)
2)
3)
In all these three case the pole loacation will vary, take case-1.
see the root locus first, below in figure as we increase the k_d the location of controller pole moves near to origin that means the speed of the system will increase. the conclusion is that the derivative controller makes system faster.
As we discussed above the rise time of the response reduces as we increase the value of k_p. and the disadvantage of the derivative is that it increases the overshoot.
The MATLAB script for PD controller is given below.
%%%%%%%%%%%%%%%%%%PD Controller design%%%%%%%%%
close all;
clear all;
s= tf('s')
a=2;b=5;
G=1/((s+a)*(s+b));
T = feedback(G,1);
figure(1)
subplot(3,1,1)
rlocus(G);
figure(2)
subplot(3,1,1)
step(T);
k_p=4;
k_d=3;
G_c=k_d*((k_p/k_d)+s);
G1=G*G_c;
T1=feedback(G1,1);
figure(1)
subplot(3,1,2)
rlocus(G1)
figure(2)
subplot(3,1,2)
step(T1)
k_pp=4;
k_dd=5;
G_c1=k_dd*((k_pp/k_dd)+s);
G2=G*G_c1;
T2=feedback(G2,1);
figure(1)
subplot(3,1,3)
rlocus(G2)
figure(2)
subplot(3,1,3)
step(T2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MATLAB script for case-2 if and case-3 is
close all;
clear all;
s= tf('s')
a=2;b=5;
G=1/((s+a)*(s+b));
T = feedback(G,1);
figure(1)
subplot(3,1,1)
rlocus(G);
figure(2)
subplot(3,1,1)
step(T);
k_p=4;
k_d=1;
G_c=k_d*((k_p/k_d)+s);
G1=G*G_c;
T1=feedback(G1,1);
figure(1)
subplot(3,1,2)
rlocus(G1)
figure(2)
subplot(3,1,2)
step(T1)
k_pp=4;
k_dd=0.5;
G_c1=k_dd*((k_pp/k_dd)+s);
G2=G*G_c1;
T2=feedback(G2,1);
figure(1)
subplot(3,1,3)
rlocus(G2)
figure(2)
subplot(3,1,3)
step(T2)
and the plots are shown below:
Now, PID controller:
The integral controller controller makes the steady state error zero but the response becomes slow, proper tuning of D and I gives the good response. the script for PID tuning is given below:
%%%%%%%%%%%PID %%%%%%%%%%%%%%
close all;
clear all;
s= tf('s')
a=2;b=5;
G=1/((s+a)*(s+b));
T = feedback(G,1);
figure(1)
subplot(3,1,1)
rlocus(G);
figure(2)
subplot(3,1,1)
step(T);
k_p=4;
k_d=1;
k_i=1;
G_c=k_p+k_d*s+k_i/s;
G1=G*G_c;
T1=feedback(G1,1);
figure(1)
subplot(3,1,2)
rlocus(G1)
figure(2)
subplot(3,1,2)
step(T1)
k_pp=4;
k_dd=1;
k_ii=0.1;
G_c1=k_pp+k_dd*s+k_ii/s;
G2=G*G_c1;
T2=feedback(G2,1);
figure(1)
subplot(3,1,3)
rlocus(G2)
figure(2)
subplot(3,1,3)
step(T2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%
Initially we put k_p=4;
k_d=1;
k_i=1;
then putting the P and D same reduce the
k_pp=4;
k_dd=1;
k_ii=0.1;
here we can see the root locus and step response, it becomes slower as we change the integral action.
Now we will increase the Derivative action to make the system faster.
k_p=4;
k_d=1;
k_i=2
the third improved graph has a faster response and zero steady state error. We can tune the gains to get a better response.
Thank you, pls comment for further help.
PID controller MATLAB 5. Apply a PID controller on the closed loop system and write a MatLab scrip that will allow you to change the values of P, I, and D coefficients and plot the effects of this...
MATLAB question. Please answer all the questions and also upload the code by MATLAB. Thanks. Down vote if no code provided. For the circuit shown above, at the moment t = 0, the switch is closed, find w(t) for 120, No energy is stored in the capacitor and inductor at moment t-0 1. Write the dynamic model for RLC circuit after t> 0? a. Show all vour work and calculations b. Write down the characteristic equation of the transfer function...
1. Consider the usual unity-feedback closed-loop control system with a proportional-gain controller: 19 r - PGS-Try P(s) Draw (by hand) and fully label a Nyquist plot with K = 1 for each of the plants listed below. Show all your work. Use the Nyquist plot to determine all values of K for which the closed-loop system is stable. Check your answers using the Routh-Hurwitz Stability Test. [15 marks] (a) P(s) = (b) P(s) = s(s+13 (6+2) (©) P(s) = 32(6+1)
Consider the following closed-loop system, in which the plant model is P(s) = elave R()2-CO POTY() a) Assume C(s) = K. Determine the range of K for which the closed-loop system is stable via: (1.) the routh-hurwitz stability criteria, (ii.) the margin() command in Matlab, and (lii.) the rlocus command in Matlab. b) Assume a proportional controller of C(s) = K = 40, and a time delay T, located between the controller and plant. Determine the maximum T, value that...
Q3. Consider a single loop unity feedback control system of the open loop transfer function (a) Find the range of values of the gain K and the parameter p so that: (i) The overshoot is less than 10%. (ii)The settling time is less than 4 seconds Note: , 4.6 M. = exp CO 40% (b)What are the three elements in a PID controller? Considering each in turn, explain the main ways in which varying the parameters affects the closed-loop system...
Can you Solve in matlab please. I need your help B-7-6. Consider the system shown in Figure 7-59. Plot the root loci for the system. Determine the value of K such that the damping ratio ζ of the dominant closed-loop poles is 05. Then determine all closed-loop poles. Plot the unit-step response curve with MATLAB. s(s2 +4s +5) Figure 7-59 Control system. B-7-6. Consider the system shown in Figure 7-59. Plot the root loci for the system. Determine the value...
(i)Apply the Nyquist criterion to find the gain Kp at which the closed loop system becomes marginally stable and the practical range of safe operating gains for the proportional controller. (ii) Find the gain margin of the system when the operating gain of the controller Kp = 2. Use Fig. 2 to read the required values off the plot. Proportional Controller Process R(S) Y() Figure 1: Unity Feedback Systems Consider again the system in Fig. 1. The plant transfer function...
PROBLEM 4 Suppose that a system is shown in Figure 4. There are three controllers that might be incorporated into this system. 1. Ge (s)-K (proportional (P) controller) 2. GS)K/s (integral (I) controller) 3. G (s)K(1+1/s) (proportional, integral (PI) controller) The system requirements are T, < 10 seconds and P0 10% for a unit step response. (a) For the (P) controller, write a piece of MATLAB code to plot root locus for 0<K<,and find the K value so that the...
Problem 2 Wis) R(s) U(s) Gol (s) D a (s) E(s) H(s) Given a system as in the diagram above, use MATLAB to solve the problems: Assume we want the closed-loop system rise time to be t, 0.18 sec S + Z H(s) 1 Gpl)s(s+)et s(s 1) s + p a) Assume W(s)-0. Draw the root locus of the system assuming compensator consists only of the adjustable gain parameter K, i.e. Dct (s) Determine the approximate range of values of...
on Matlab please!!!! Problem 1- (a) Design a controller for a plant with transfer function, G(s)-(+ to obtain (i) estep(00)s 0, (ii) T12%) < 1 s, and (iii) an-5 rad/s (4 points). (b) Plot the unit step response of the closed-loop system you design and find the percentage of overshoot, the time to the first peak, settling time and eramp[oo) (4 points). (c) Can you modify your design, without compromising design specifications, in order to further shorten T1296) while keeping...
Problem 1 The following table summarizes the results for all values of d. for a converging lens Case Type Direction Magnification S< do < 26 Real Inverted Enlarged d -2/ Real Inverted Same size de > 27 Real Inverted Reduced d. Virtual Upright Enlarged Sketch and find the image for each case shown in the table by changing the objects position Problem 2 0.25 p 0.23 P AI (b) Graded index (GRIN) rod lens is a glass rod whose refractive...