Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CODE:
num = [1 1] ;
den = poly([0 -2 -3 -4]) ;
G = tf(num,den);
rlocus(G)
System is marginally stable for k = 141 As the value of roots is purely imaginary
at that point.
CODE:
numg = [1 1];
deng = poly([0 -2 -3 -4] );
G = tf(numg,deng) ;
H = 1 ;
T = feedback (G,H);
rlocus(T)
The value of gain for which the closed-loop transfer function will have a pole on
the real axis at -0.5 is 12.4.
Part a
CODE:
numg = poly([-10 -20]);
deng = poly([10.0000+10.0000i 10.0000-10.0000i -30]);
G = tf(numg,deng);
H= 1; figure ; rlocus(G)
figure ; T = feedback(G,H) ; rlocus(T)
Part b
For the same code used in part a just locate zeta = 0.707.
Part c
Assume critical damping is where poles are just real and zeta=1, at that point
gain is 14100.
CODE:
J = 3.2284e-6;
b = 3.5077e-6;
K = 0.0274;
R = 4;
L = 2.75e-6;
s = tf('s') ;
G = K/(s*((J*s+b)*(L*s+R)+K^2));
subplot(211)
step(G)
title('Before feedback')
T = feedback(G,1)
subplot(212)
step(T)
title('After feedback')
damp(T)
Before feedback system was unstable. Unity feedback was attached and closed
loop step response was observed. Now system is stable.
Requirement of overshoot time is fulfilled, for settling time poles of closed loop
transfer function are observed using damp command. Result of command
window is on next page.
Therefore, the damping (z= 0.643) and the natural frequency (wn = 46.1) of the
complex conjugate poles will affect the response of the closed-loop system.
The
larger the value of Kp the smaller the steady-state error is due to the disturbance, but
it never reaches zero. Adding an integral term will eliminate the steady state error.
Step 2: PI CONTROL:
Set Kp = 21 and test for different ranges of Ki.
CODE:
%Step response (Cont. with the previous code)
Ki = 100;
for i = 1:5
C(:,:,i) = pid(21,Ki);
Ki = Ki + 200;
end
cl = feedback(C*G,1);
t = 0:0.001:0.4;
step(cl(:,:,1), cl(:,:,2), cl(:,:,3), t)
title('step response’)
legend('Ki = 100', 'Ki = 300', 'Ki = 500')
With the use of integrator steady state error to step disturbance is reduced to 0.
the larger the value of Ki_is employed, the faster the error decays to zero. Let ki = 500.
With Kp = 21
Ki=500
Kd = 0.15
We get
RiseTime: 0.0046
SettlingTime: 0.0338
SettlingMin: 0.9103
Undershoot: 0
Peak: 1.1212
PeakTime: 0.0122
Model Reduction:
neglect the pole at -1.45e6 because this pole is very fast and and its effect on
response is minimum as described earlier.
CODE:
%Reduction
poles = pole(G);
Greduced = minreal(G*(s/max(abs(poles)) + 1))
pole(Greduced)
Use an integrator in the reduced model and the root locus of reduced model is now:
C = 1/s;
rlocus(Greduced*C)
Imaginary Axis (seconds -1)
CODE: