Docsity

Lead Compensator Design - Examples with Resolution | EME 172, Study notes of Mechanical Engineering

Toggle sidebar
bg1
Example 2: Lead Compensator Design
A unit feedback system
with )6)(4(
)( ++
=sss
K
sKG is operating with 30% overshoot ( 358.0
=
ζ
).
(a) Design a compensator that will reduce the settling time by a factor of 2.
(b) Use control toolkit to simulate the uncompensated and compensated systems.
Solution:
(a)
1. Use program 1 to plot the root locus of the uncompensated system.
Program 1:
/***************************
* File name: rl_uncomp.ch
**************************/
#include <control.h>
int main() {
double k = 1;
array double complex p[3] = {complex(0, 0),
complex(-4, 0),
complex(-6, 0)};
array double zeta[1] = {0.358};
array double omega[1] = {10};
CControl sys;
CPlot plot;
sys.model("zpk", NULL, p, k);
sys.sgrid(1, zeta, omega);
sys.rlocus(&plot, NULL, NULL);
return 0;
}
_
+ K
)(sE)(sR G(s) )(sC
Gain Plant
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Lead Compensator Design - Examples with Resolution | EME 172 and more Study notes Mechanical Engineering in PDF only on Docsity!

Example 2: Lead Compensator Design A unit feedback system

with KG ( s )= (^) s ( s + 4 K )( s + 6 ) is operating with 30% overshoot ( ζ = 0. 358 ).

(a) Design a compensator that will reduce the settling time by a factor of 2. (b) Use control toolkit to simulate the uncompensated and compensated systems. Solution: (a)

  1. Use program 1 to plot the root locus of the uncompensated system. Program 1:

/***************************

  • File name: rl_uncomp.ch **************************/

#include <control.h>

int main() { double k = 1; array double complex p[3] = {complex(0, 0), complex(-4, 0), complex(-6, 0)}; array double zeta[1] = {0.358}; array double omega[1] = {10}; CControl sys; CPlot plot; sys.model("zpk", NULL, p, k); sys.sgrid(1, zeta, omega); sys.rlocus(&plot, NULL, NULL); return 0; }

_

K

R ( s ) E ( s ) G(s)

C ( s )

Gain Plant

Output:

  1. From the root locus, measure the real and imaginary parts of the dominant poles. The dominant poles are found to be − 1. 007 ± i 2. 63.
  1. Find the settling time of the uncompensated system.

T s =ζω^4 = 1. 0074 = 3. 972 sec.

  1. Find the settling time, dominant poles of the compensated system.

Ts ′^ = T 2 s =^3.^9722 = 1. 986 sec.

The real part of the dominant poles is − =−^4 ′=− 2. 014 T s

The imaginary part of the dominant poles is ω d = tan( sin ζω− 1 ζ) =tan(sin 2.^014 − 10. 358 ) = 5. 252.

  1. Select the compensator zero to be -5, which means zc = 5.

The compensated plant is L ( s ) = (^) ( s + p )( ss (^ + s + z 4 ))( s + 6 ) c

c (^).

To the dominant poles, ∠ L ( s )=θ zc −θ pc −θ 1 −θ 2 − θ 3 =( 2 k + 1 ) 180 o ( k = 0 ,± 1 ,± 2 ,...).

Choose k =− 1 , θ pc = 180 o+θ zc −θ 1 −θ 2 − θ 3.

Choose the dominant pole at − 2. 014 + i 5. 252 , θ pc can be found to be 7. 31 o.

(^5) −. (^252 2). 014 =tan( pc ) =tan( 7. 31 o ) pc

θ , p c = 42. 96 , whch means the compensator pole is -42.96.

  1. Use program 3 to plot the root locus of the compensated system. Program 3: /***************************
    • File name: rl_comp.ch **************************/

#include <control.h> int main() { double k = 1; array double complex z[1] = {complex(-5, 0)}; array double complex p[4] = {complex(-42.96, 0), complex(0, 0), complex(-4, 0), complex(-6, 0)}; array double zeta[1] = {0.358}; array double omega[1] = {50}; CControl sys; CPlot plot; sys.model("zpk", z, p, k); sys.sgrid(1, zeta, omega); sys.rlocus(&plot, NULL, NULL); return 0; }

  1. Use program 4 with one of the dominant poles to find the gain K and other closed-loop poles. The gain K is found to be 1423. The third and fourth poles are found to be -43.8 and -5.134, respectively. Since the third pole at -43.8 is more than 20 times of the real part of the dominant poles, the effect of the third pole is negligible. Since the fourth pole at -5.134 is close to the zero at -5, the pole-zero cancellation stands. As a result, the second order approximation is valid. Program 4:

/****************************

  • File name: rlf_comp.ch ***************************/ #include <control.h>

int main() { // default system gain double dk = 1; // compensated system zero array double complex cz[1] = {complex(-5, 0)}; // compensated system poles array double complex cp[4] = {complex(-42.96, 0), complex(0, 0), complex(-4, 0), complex(-6, 0)}; // dominant pole selected from the root locus array double complex dp[1] = {complex(-2.014, 5.252)}; // closed-loop poles when one of the dominant poles is selected array double complex p[4]; // system gain when one of the dominant poles is selected array double k[1]; CControl sys; sys.model("zpk", cz, cp, dk); sys.rlocfind(k, p, dp); printf("k: %f\n", k); printf("poles: %f\n", p); return 0; } Output:

k: 1422.

poles: complex(-43.797920,0.000000) complex(-2.014025,5.252003) complex(-5.134029,0.000000) complex(-2.014025,-5.252003)

(b)

  1. Use program 5 to obtain the step response of the uncompensated system. Program 5: /*****************************
    • File name: step_uncomp.ch ****************************/ #include <control.h>

int main() { // system gain double k = 63; // uncompensated system poles array double complex up[3] = {complex(0, 0), complex(-4, 0), complex(-6, 0)}; array double num[1] = {1}; array double den[1] = {1}; double tf = 6; CControl sys1, sys2, *sys3; CPlot plot; sys1.model("zpk", NULL, up, k); sys2.model("tf", num, den); sys3 = sys1.feedback(&sys2); sys3->grid(1); sys3->step(&plot, NULL, NULL, NULL, tf); return 0; }

  1. Use program 6 to obtain the step response of the compensated system. Program 6: /*****************************
    • File name: step_comp.ch ****************************/

#include <control.h> int main() { // system gain double k = 1423; // compensated system zero array double complex cz[1] = {complex(-5, 0)}; // compensated system poles array double complex cp[4] = {complex(-42.96, 0), complex(0, 0), complex(-4, 0), complex(-6, 0)}; array double num[1] = {1}; array double den[1] = {1}; double tf = 6; CControl sys1, sys2, *sys3; CPlot plot; sys1.model("zpk", cz, cp, k); sys2.model("tf", num, den); sys3 = sys1.feedback(&sys2); sys3->grid(1); sys3->step(&plot, NULL, NULL, NULL, tf); return 0; }

Output: