Application Center - Maplesoft

App Preview:

Series Compensation Design Using the Root Locus

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application



2004 J.M. Redwood.


 This worksheet illustrates a method for designing a series-compensation network for a simple servo.  The method involves altering the root locus of a servo by suiting the network's poles and zeros in the complex plane so that the locus passes through dominant poles that produce the desired response.  The compensated servo's responses to standard inputs are then compared with those of the uncompensated servo.  Finally, the network is designed using standard components and the compensated servo's performance is checked using these components.


 This worksheet and the package of procedures entitled "Bode2", may be used, adapted, or copied, provided that copyright is acknowledged and the whole of this License section is included in any copies, or adaptations, of the worksheet, or of the package.

 This worksheet and the "Bode2" package may be used for educational purposes free of charge.

 Commercial users are not required to pay a license fee for this worksheet, or for the "Bode2" package.  Instead, they are requested to make a donation to Cancer Research UK, National Office, 61 Lincoln's Inn Fields, LONDON, WC2A 3PX, UK.  The donations line telephone number is +44 (0)20 7009 8820; the Fax number is  +44 (0)20 7269 3100; and the E-mail address is "".  The size of donation is left to the user's discretion.

 This worksheet and associated  "Bode2" package of procedures are offered without warranty of any kind whatsoever.



 This worksheet uses significant computer resources.  If necessary, the user should separate the worksheet into two parts, comprising everything down to and including the subsection "Poles and Zeros" in the "Compensated Servo" section, and then that subsection together with the remainder.  Copying the diagrams to a different file, and then deleting them from the worksheet may also help to free resources.


 The servo examined in this worksheet rotated a turntable about its vertical axis to a position determined by a remote synchro-control transmitter.  The turntable carried a load firmly fixed to it with its center of mass on the turntable's vertical axis.  The servo comprised a torque motor driving the table and a synchro control transformer through 3:1 reduction gearing.  The table drove another synchro control transformer through 36:1 step-up gearing.  The error between this 36-speed synchro control transformer and the remote synchro control transmitter was fed through a pre-amplifier, phase discrimination circuits and a series compensation network to a power amplifier and thence to the torque motor's field windings.  The torque motor had a permanent-magnet armature and the torque it produced was proportional to the current in the field windings.

 Without compensation, the servo was unstable.  A series compensation network was used to stabilize the servo and its design is illustrated in this worksheet.

Performance Required

 The servo was required to have a fast response to a change of position input and to follow a constant speed input closely, which could contain noise at 16 cycles per second (cps) and above.  The maximum constant speed to be followed was 30 rpm.  Experience suggested that a servo with the following parameters would produce satisfactory results:

a.  Velocity error coefficient = 80 radians/second,

b.  Undamped natural frequency = 30 radians/second, and

c.  Damping ratio = 0.55.

 Since radians are dimensionless, radians/second will be expressed as 1/sec in the remainder of this worksheet.

 The servo loop is illustrated in the sketch below.

Block Diagram

[Inserted Image]


 R is the reference input (angular position).

 C is the controlled output (angular position).

 e = R - C is the error between the controlled output and the reference input.  

 C/R is the closed loop response of the controlled output to the reference input.


N.B.  The servo is assumed to be linear throughout the operating region and the principle of super-position therefore applies.


 The "Bode2" package will be required for plotting attenuation and phase margin diagrams.  It is also necessary to call the "plots" package and to change the imaginary unit to j, instead of I.  More than 2 or 3 decimal places imply much greater precision than is warranted.  However, about 5 decimal places are needed to view the results of calculations satisfactorily, so "displayprecision" is set to 5 (computation occurs at the precision set by "Digits").

> restart:

> interface(imaginaryunit=j): interface(displayprecision=5):

> with(plots): with(Bode2):

Warning, the name changecoords has been redefined

 Some settings are now defined for the plots produced in this worksheet.

> txt := axesfont=[TIMES,ROMAN,12], labelfont=[TIMES,ROMAN,12], titlefont=[TIMES,ROMAN,12]:

> plotset := txt, colour=[blue,red,black], linestyle=[SOLID,SOLID,DOT]:

Transfer Functions shown in the Block Diagram

a.  Pre-amplifier (including gains of synchros and error-phase-discriminating circuits).

> K1;


K1 has units of volts/radian.

b.  Compensation Network

> Gc;


Gc has units of volts/volt.

c.  Power Amplifier

> K2;


 K2 has the units of volt/volt.

d.  Motor and Load

 The transfer function may be approximated as Gm 1/(K[b]*s*(J*R[f]*s/(K[b]*K[tau])+1)*(L[f]*s/R[f]+1))  =  1/(K[b]*s*(T[m]*s+1)*(T[f]*s+1)) .  

 This assumes that the combined motor and load friction is relatively small, and if represented by q, a coefficient of viscous friction, then q*R[f]/(K[b]*K[tau])  << 1.  T[m] is the motor and load's mechanical time constant, and T[f] is the motor field's time constant.


> Gm := 1/(K[b]*s*(T[m]*s + 1)*(T[f]*s + 1));

Gm := 1/(K[b]*s*(T[m]*s+1)*(T[f]*s+1))

 Gm has the units of (radian/sec/volt = 1/volt.sec)

Motor & Load Time Constants


 The combined mass of the load and table was 1.5 kg with a radius of gyration given by k^2 = 72*mm^2 .

 The moment of inertia of the 3:1 reduction gearing between the load-table and the motor referred to the motor shaft was 392700*g*mm^2 .  

 The 36-speed synchro control transformer's moment of inertia was 7540*g*mm^2

 The moment of inertia of the 36-speed synchro control transformer's gearing referred to the load-table's drive shaft was 450410*g*mm^2 .

 The moment of inertia of the motor was Float(6, -3)*oz*inch^2 .

 The motor's torque constant was K[tau] = Float(68, -1)*ozf*inch/amp and its back-emf constant was K[b] = 5*volt/(1000*rpm) .

 The overall gain K1 of the pre-amplifier, including the synchro chain, was 10 volts/radian.

 The gain K2 of the power amplifier was 2 volt/volt.

 The motor's field resistance was 0.84 ohms and its inductance was 0.1 mH.

 All the above data are converted below to SI units.


 The moments of inertia of the 36-speed and 1-speed synchros, the 36-speed synchro's gearing and the load-table, each referred to the load-table's drive shaft were

> J_synchros := convert( 7540.*(36^2 + 1),'units',g*mm^2,kg*m^2);

J_synchros := 0.9779380000e-2

> J_synchrogears := convert(450410.,'units',g*mm^2,kg*m^2);

J_synchrogears := 0.4504100000e-3

> J_load := convert(1.5*72,'units',kg*mm^2,kg*m^2);

J_load := 0.1080000000e-3

 The total moment of inertia referred to the load-table's drive shaft was

> J_total := J_synchros + J_synchrogears + J_load;

J_total := 0.1033779000e-1

 The moment of inertia of the gearing between the motor and the load-table's drive shaft was

> J_gears := convert(392700,'units',g*mm^2,kg*m^2);

J_gears := 3927/10000000

 The combined total moment of inertia at the load-table's drive shaft referred to the motor and that of the gearing between the motor and load drive shaft was

> J_combined := J_total*(1/3)^2 + J_gears;

J_combined := 0.1541343333e-2

Mechanical and Motor Field Time Constants

> R[m] := 0.84;

R[m] := .84

> K[b] := convert(5/1000,'units',volt/rpm,volt/(radian/s) );

K[b] := 3/20/Pi

> K[tau] := convert(6.8,'units','ounceforce*inch/A','N*m/A');

K[tau] := 0.4801855234e-1

 The inertias and the above are combined into the mechanical time constant, T[m] , of the motor and load.

> T[m] := R[m]*J_combined/(K[b]*K[tau]);

T[m] := .1797539127*Pi

> evalf(T[m]);


 The motor field's parameters are combined into the shunt field constant T[f]

> L[m] := 0.1*10^(-3);

L[m] := 0.1000000000e-3

> T[f] := L[m]/R[m];

T[f] := 0.1190476190e-3

 Because T[f] is very small compared with T[m] , it can be ignored initially, thus the motor and load transfer function is

> Gm := '1/(K[b]*s*(T[m]*s + 1))';

Gm := 1/(K[b]*s*(T[m]*s+1))

> Gm := evalf(%);

Gm := 20.94395103/(s*(.5647135717*s+1.))

Loop Transfer Function

By definition, the loop transfer function is C/epsilon = KG .  Setting the compensation network's transfer function to unity and ignoring the motor field time constant T[f] , the loop transfer function for the uncompensated servo is given by,

> KG := K1*K2*1*Gm;

KG := 20.94395103*K1*K2/(s*(.5647135717*s+1.))

 Before considering compensation, the gains should be set to small values and the uncompensated servo's response should be examined.  Setting K1 = K2 = 1, the loop transfer function, is given by

> KG_small := eval(KG,{K1=1,K2=1});

KG_small := 20.94395103/(s*(.5647135717*s+1.))

 Inserting the normal gain settings K1 = 10 and K2 =2,

> KG := eval(KG,{K1=10,K2=2});

KG := 418.8790206/(s*(.5647135717*s+1.))

Uncompensated Servo

 The closed loop transfer function for the uncompensated servo with gains set to small values is

> `C/R uncomp small gains` :=  (KG_small/(1+KG_small));

`C/R uncomp small gains` := 20.94395103/(s*(.5647135717*s+1.)*(1+20.94395103/(s*(.5647135717*s+1.))))

 The poles of this uncompensated servo are obtained thus,

> poles := [solve(denom(normal(`C/R uncomp small gains`)))];

poles := [-.8854046105+6.025263503*I, -.8854046105-6.025263503*I]

 The poles result in the following damping ratio and undamped natural frequency,

> eq1 := sqrt(1-zeta^2)/zeta = abs( Im(poles[2])/Re(poles[2]) ):

> eq2 := zeta*omega[n] = abs( Re(poles[2]) ):

> solve({eq1,eq2});

{zeta = .1453873380, omega[n] = 6.089970575}

 These indicate an unstable servo - sluggish and very lightly damped.  A faster response is not possible without increasing the gains, but to do so would make the servo even more unstable.  

 The root locus of the compensated servo's open-loop transfer function is now plotted.  The poles of the uncompensated servo's closed loop transfer function with small values of gain are superimposed on this root locus.

> r := rootlocus(KG,s,0..1,colour=cyan,symbolsize=18):

> p := plot(map([Re,Im],poles),0..-15,-15..15,txt,style=point,symbol=cross,symbolsize=18,colour=red):

> display([r,p],labels=[,],axes=normal,labelfont=[SYMBOL],title="Root Locus of\n Uncompensated Open-Loop Transfer Function\n with Poles of Closed Loop Transfer Function\n at Small Gains Superimposed",scaling=constrained);


 To achieve the required parameters of omega[n] = 30/sec and zeta = 55/100 , the root locus needs to be moved to the left along the real axis, so that the dominant poles can be at a radius of 30 from the origin and make an angle of arccos(-55/100) = 56.6 degrees with the negative real axis.  These parameters would yield a fast, adequately damped transient performance of the closed loop servo.  Zeros to the left of the locus pull it to the left, and a lag-lead compensation network was used to provide a zero for this purpose.

 The closed loop transfer function for the uncompensated servo with its normal gain settings will be needed later and is

> `C/R uncomp` :=  (KG/(1+KG));

`C/R uncomp` := 418.8790206/(s*(.5647135717*s+1.)*(1+418.8790206/(s*(.5647135717*s+1.))))

Compensation Network

Finding the Compensation Network's Constants

1.  The transfer function for a lag-lead network is Gc = Kc*beta*(T[1]*s+1)*(T[2]*s+1)/(alpha*(T[1]/alpha+1)*(beta*T[2]*s+1)) = Kc*(s+1/T[1])*(s+1/T[2])/((s+alpha/T[1])*(s+1/(beta*T[2]))) , in which 1 < beta , 1 < alpha and beta <> alpha .  If T[2] is chosen sufficiently large, the lag network's transfer function (the second part of Gc) will have unit magnitude and zero phase at the dominant poles.  The first part of Gc, (s+1/T[1])/(s+alpha/T[1]) , (the lead network's transfer function) must contribute a phase change such that the root loci of the lead-compensated servo pass through dominant poles that yield the desired damping ratio and undamped natural frequency.  Having chosen T[1] , the phase change required from the lead network determines the value of alpha .  It is often convenient to choose T[1] equal to the motor and load mechanical time constant T[m] , so that the [T[1]*s+1] term (approximately) cancels the [T[m]*s+1] term in the uncompensated servo's loop transfer function.  However, any reasonable choice can be made.

2.  With the lead network's constants determined, Kc can be obtained by equating to unity the magnitude of the transfer function for the combination of lead-network and uncompensated servo at the desired dominant poles.

3.  As proc (t) options operator, arrow; infinity end proc , the compensated servo's transfer function tends toward the value of Kv, the velocity error coefficient.  Since the required value of Kv is specified, and both a and Kc are known, b can be found from this limiting value of the transfer function.  

4.  It remains to find sufficiently large T[2] from the condition, mentioned at paragraph 1 above, that the lag network's transfer function must have approximately unit magnitude and zero phase at the desired dominant poles,  

Lead Angle Required

The required dominant poles are s_dom = -zeta*omega[n]+j*omega[n]*sqrt(1-zeta^2) and its conjugate, where omega[n] = 30, zeta = 55/100 .  Considering the positive pole,


> s_dom := -zeta*omega[n]+j*omega[n]*sqrt(1-zeta^2);

s_dom := -zeta*omega[n]+I*omega[n]*(1-zeta^2)^(1/2)

> s_dom := simplify( eval(s_dom,{omega[n] = 30, zeta = 55/100}) );

s_dom := -33/2+9/2*I*31^(1/2)

 The phase of the uncompensated servo at the dominant poles is obtained by evaluating the loop transfer function's phase at that pole thus

> phase := argument(eval(KG,s=s_dom));

phase := 2.027771526

 Hence, the phase change to be contributed by the lead network is given by

> lead_angle := Pi - phase;

> evalf(convert(%,degrees));

lead_angle := Pi-2.027771526


 That is, the lead part of the compensation network has to contribute 64 degrees to the phase of the compensated servo's loop transfer function for its root locus to pass through the chosen dominant pole.  This is represented in the sketch below by the angle BPA.

Sketch of Dominant Pole on Root Locus

[Inserted Image]

The sketch above illustrates the vectors of the lead network on the complex plane.  The point "P" represents the positive dominant pole that is to be located at [-33/2, j*9*sqrt(31)/2] .  The point "A" represents the zero produced by the lead network at [-1/T[1], j*0] and the point "B" represents the pole produced by it at [-alpha/T[1], j*0] .  Since AO = -1/T[1] , BO can be found by plane trigonometry, thus yielding alpha = BO/AO .


 Arbitrarily choosing T[1] = T[m] ,

> T[1] := T[m];

T[1] := .1797539127*Pi

> AO := 1/T[1]:

> BPA := lead_angle:

> AP := abs((s_dom) - (-1/T[1] + j*0) ):

> NP := Im(s_dom):

> PAN := arcsin(NP/AP):

> NPA := Pi/2 - PAN:

> BPN := BPA - NPA:

> BN := NP*tan(BPN):

> BO := BN + NO:

> NO := -Re(s_dom):

> alpha := BO/AO:


> evalf(alpha);




At the dominant pole, the magnitude of the transfer function for the combined lead network and uncompensated servo should be unity.

> eq1 := abs( 'Kc*((s+1/T[1])/(s + alpha/T[1]) )'* KG ) = 1;

eq1 := 418.8790206*abs(Kc*(s+1/T[1])/((s+alpha/T[1])*s*(.5647135717*s+1.))) = 1

> eq1 := eval(eq1,s=(s_dom) ):

> sol := solve(eq1,{Kc}) assuming Kc>0:

> evalf(sol);

> assign(sol);

{Kc = 1.213338911}


 The value of b for the lag portion of the compensation circuit, (s+1/T[2])/(s+1/(beta*T[2])) , is easily obtained from the compensated servo's required value of velocity error coefficient, Kv = 80/sec.

> Gc := 'Kc*( (s + 1/T[1])/(s + alpha/T[1]) ) * ( (s + 1/T[2])/(s + 1/(beta*T[2]) ) )';

Gc := Kc*(s+1/T[1])*(s+1/T[2])/((s+alpha/T[1])*(s+1/(beta*T[2])))

 Since the velocity error coefficient, Kv, is given by the limit of the open-loop transfer function as proc (t) options operator, arrow; infinity end proc , using the final value theorem of the Laplace transform,

> eq1 := Kv = limit(s*Gc*KG,s=0);

eq1 := Kv = 27.27272729*beta

> eq2 := Kv = 80;

eq2 := Kv = 80

> sol := solve({eq1,eq2});

sol := {beta = 2.933333331, Kv = 80.}

> assign(sol);


 Next, the value of T[2] has to be chosen sufficiently large for the lag part of the compensation network to have approximately unit magnitude and approximately zero phase at the dominant pole.

> lag := 'eval( (s + 1/T[2])/(s + 1/(beta*T[2])),s=s_dom )';

lag := eval((s+1/T[2])/(s+1/(beta*T[2])), s = s_dom)

> eq1 := 0.99 < abs(lag):

> eq2 := abs(lag) < 1.01:

> eq3 := -5*Pi/180 < argument(lag):

> eq4 := argument(lag) < 0:

> sol := solve({eq1,eq2,eq3,eq4}) assuming real;

sol := {1.185160110 < T[2]}

 Choosing T[2] as the next higher integer,

> T[2] := ceil(op([1,1],sol));

T[2] := 2

Compensated Servo

Poles and Zeros

 Inserting the term for the motor's shunt field time constant, the compensated servo's loop transfer function is

> KG_comp := evalf(Gc*KG/(T[f]*s + 1));

KG_comp := 508.2422147*(s+1.770809221)*(s+.5000000000)/((s+33.00000003)*(s+.1704545456)*s*(.5647135717*s+1.)*(0.1190476190e-3*s+1.))

 The zeros and poles of the compensated servo's closed loop transfer function, C/R, are given by

> `C/R` := evalf( simplify( KG_comp/(1+KG_comp) ) ):

> zeros := [solve(numer(normal(`C/R`)))];

zeros := [-.5000000000, -1.770809221]

> poles := [solve(denom(normal(`C/R`)))];

poles := [-8400.107561, -16.27838121-24.98191476*I, -16.27838121+24.98191476*I, -1.770809221, -.5061336972]

 Due to very slight rounding errors, the zero of the compensation network at -1/T[1] = -Float(1771, -3) /sec has not cancelled the pole caused by the motor time constant at -1/T[m] = -Float(1771, -3) /sec as intended - though such a small error is unimportant.  Much greater discrepancies occur in practice due to the assumptions made about the motor and load transfer function.  The effect of the zero not canceling a pole is to increase the order of the servo, and to cause greater overshoots and longer transients than would otherwise be the case.

 The positive dominant pole is -Float(162784, -4)+j*Float(249819, -4) , which is slightly different from the desired value, namely -Float(1650, -2)+j*Float(250549, -4) , and similarly for the conjugates.  This results in slight differences between the achieved and desired damping ratio and undamped natural frequency.  If these differences are too great, a second lead network could be needed.  As it was, the damping ratio and undamped natural frequency of the compensated servo were

> eq1 := sqrt(1-zeta^2)/zeta = abs( Im(poles[2])/Re(poles[2]) ):

> eq2 := zeta*omega[n] = abs( Re(poles[2]) ):

> solve({eq1,eq2}) ;

{omega[n] = 29.81747407, zeta = .5459342791}

 These are close enough to the required values.

 The root locus of the compensated servo's open-loop transfer function is now plotted, with the poles and zeros of the compensated servo's closed loop transfer function superimposed.  However, the pole caused by the motor's shunt field time constant at 1/T[f] = 8400 /sec is of no interest, so the horizontal and vertical ranges for the plot are chosen to confine the plot to the area close to the origin.

> r := rootlocus(KG_comp,s,0..1,colour=cyan,symbolsize=18):

> z := plot(map([Re,Im],zeros),0..-18,-26..26,style=point,symbol=circle,symbolsize=18,colour=blue):

> p := plot(map([Re,Im],poles),0..-18,-26..26,style=point,symbol=cross,symbolsize=18,colour=red):

> display([r,z,p],labels=[,],axes=normal,txt,labelfont=[SYMBOL],title="Root Locus of Compensated Open-Loop Transfer Function\n with Poles and Zeros of Closed Loop Transfer Function Superimposed");

> unassign('p','z','r');


It should be noted that the scales in the plot above are not equal, but they can be made so by including the "scaling = constrained" option in the "display" command.  However, the region close to the origin then becomes very congested.

The dominant poles are at -Float(162784, -4)+j*Float(249819, -4) and its conjugate.  In addition to the zero at -1.7708 and the almost cancelled pole at -1.7708 due to T[m] (the motor and load's mechanical time constant) there is a zero at -0.5 due to T[2] that almost cancels a pole at -0.5647, as well as the pole at the origin.  The effect of the zero canceling, or almost canceling T[m] , is to pull the uncompensated servo's root locus to the left, thus making the servo more stable at higher gains.

Bode Diagrams

 The loop transfer function and phase margins are now plotted for both the uncompensated and compensated servos.

Uncompensated Servo

 Recalling that the open loop transfer function of the uncompensated servo including its motor field time constant is

> KG/(1 + T[f]*s);


 The Bode attenuation diagram for the uncompensated servo is plotted thus

> display(linelog(numer(KG),1,[ ],[evalf(T[m]),T[f]],0.1,10^4),attenlog(KG/(1+T[f]*s),0.1,10^4));


 The break point at w = 1.77 is due to T[m] , the motor and load's mechanical time constant.  The motor's electrical time constant, T[f] , is responsible for the break point at w = 0.0001.  (The normalizing time constant used in the diagram is T = 1 sec.)

 The uncompensated servo's phase margin diagram is

> phaselog(KG/(1+T[f]*s),0.1,10^4);


 The small phase margin and consequent instability when the uncompensated servo's loop was closed is readily apparent.

Compensated Servo

 The compensated servo's loop transfer function is

> normal(KG_comp);


 The Bode attenuation diagram for the compensated servo is

> display(  linelog2((508.24221/0.56471/.11905e-3),1,[1.77081,0.50000],

attenlog(KG_comp,0.01,10^4),plot([[2.71,-60],[2.71,0]],0..4,colour=black,linestyle=DOT)  );


 The effect of the lag network is clearly apparent between omega = 1/(beta*T[2]) = 0.1766/sec and omega = 1/T[2] = 0.5/sec.  (The normalizing time constant used in the diagram is T = 1 sec.)  The downward break at omega = alpha/T[1] = 33/sec marks the end of the phase-lead network's influence.  The velocity error coefficient, Kv, is given by the intercept of the lowest frequency part of the attenuation with the loop gain axis, and is seen to be 38 dB = 80/sec as specified.

 The vertical dotted line is drawn through the frequency log10(omega*T) = Float(271, -2) when the phase margin = 0, as measured with the cursor on the phase margin diagram.  It shows that the gain margin is positive and approximately 49.4 dB.

 The compensated servo's phase margin diagram is

> display(phaselog(KG_comp,0.01,10^4),plot([[1.34,0],[1.34,70]],0..4,colour=black,linestyle=DOT));


 The vertical dotted line is at gain crossover frequency, log10(omega*T) = Float(134, -2) , as measured with the cursor on the attenuation diagram.  It shows that the phase margin is about 55 degrees.  The phase margin would remain positive across the entire frequency range out to about w = 500/sec, that is log10(omega*T) = Float(271, -2) .

Position Step Input

 The compensated servo's normalized response to a unit step input of angular displacement, together with that of the uncompensated servo, is obtained and plotted below.

 The Laplace of transforms of the responses, C, to a unit step input of displacement, for both the compensated and uncompensated servo are:  

> with(inttrans):

> step := `C/R`/s:

> uncomp_step := `C/R uncomp`/s:


 The inverse Laplace transforms of these (angular) position responses, C, are then normalized by dividing them by the input's (angular) position, R = 1 radian.

> step_resp := invlaplace(step,s,t):

> uncomp_step_resp := invlaplace(simplify(KG/((1+KG)*s)),s,t):

> plot([step_resp,uncomp_step_resp,1],t=0..3,title="Normalized Response of\n Compensated Servo (blue) &  Uncompensated Servo (red)\nto a Unit Step of Input  Position",plotset,labels=["t sec","C/R"]


 Over a shorter time scale the plot appears as,

> plot([step_resp,uncomp_step_resp,1],t=0..0.5,title="Normalized Response of\n Compensated Servo (blue) & Uncompensated Servo (red)\nto a Unit Step of Input  Position",plotset,labels=["t sec","C/R"]


 The improvement made by the compensation is obvious: the servo is now fast and adequately damped.  The maximum overshoot is about 13% and the transient is virtually complete within 0.23 second.  There is, however, a long transient tail amounting to an "overshoot" of about 1% until about t = 2.6 seconds.  This is the effect of the uncancelled zeros and poles mentioned earlier.

 The maximum overshoot and the time at which it occurs can be obtained analytically as shown below.  Because of rounding errors, the imaginary terms in the step response are not exactly zero, so it is necessary to disregard them as shown.

> slope := diff(step_resp,t):

> `Max overshoot at t` := Re(fsolve(slope=0,t,0.05..0.2));

> `Max overshoot` := eval(Re(step_resp),t=`Max overshoot at t`);

> unassign('slope');

`Max overshoot at t` := .1258159101

`Max overshoot` := 1.142448533

Velocity Step Input

 The compensated servo's normalized response to a unit step input of velocity, or ramp input, together with that of the uncompensated servo, is obtained and plotted below.

  The Laplace of transforms of the responses, C, to a unit step of (angular) velocity input, or ramp input, for both the compensated and uncompensated servo are

> vel_step := `C/R`/s^2:

> uncomp_vel_step := `C/R uncomp`/s^2:

 The inverse Laplace transforms of these (angular) position responses, C, are then normalized by dividing them by the input's (angular) position, R.  That is, each C is divided by R = velocity t = 1 radian/sec t sec = t radian, thus,

> vel_step_resp := invlaplace(vel_step,s,t) / (1*t):

> uncomp_vel_step_resp := invlaplace(uncomp_vel_step,s,t) / (1*t):

> plot([vel_step_resp,uncomp_vel_step_resp,1],t=0..3.5,title="Normalized Response of Compensated Servo (blue)\n& Uncompensated Servo (red)\nto Unit Step of Input Velocity",labels=["t sec","C/R"], colour=[blue,red],plotset);


 The uncompensated servo's response oscillates violently before following the input.  The compensated servo's response is greatly improved with a smooth response and virtually no error after t = 3 sec.  Since the input is a constant 1 radian/sec velocity, that means the output follows the input accurately after 3/(2*Pi) radians, or after a little less than 1/2 a revolution.  If this is not fast enough, then the undamped natural frequency must be increased, at the expense of greater susceptibility to noise in the input.

Return to Observations

 The response, C, to a unit step of velocity input is simply the normalized response shown above, multiplied by the normalizing factor R = 1 radian/sec t sec, and is shown below.

> plot([vel_step_resp*(1*t),uncomp_vel_step_resp*(1*t),t],  t=0..3.5, title="Response of Compensated Servo (blue)\n& Uncompensated Servo (red)\nto Unit Step of Input Velocity",labels=["t sec","C and R"],


 The uncompensated servo's response oscillates about the input, while the compensated servo exhibits the long-tail transient already mentioned.

 The error between the input, C, and the servo's response, R, is plotted below

> plot( 1000*(1*t - vel_step_resp*t), t=0..1,title="Error of Compensated Servo's Response to Unit Step of Velocity", labels=["t sec","1000 Error"],labeldirections=[horizontal,vertical],plotset);


 The maximum error is seen to be about 44.4/1000 radians = 2.55 degrees.  After about t = 0.3 sec, the error decreases smoothly toward the steady state value of 1/Kv radians.

 The steady-state error of the output when following the maximum constant speed input of 30 rpm (180 degrees/sec) is given by,

> `ss error` := evalf(180*degrees/Kv);

> unassign('`ss error`');

`ss error` := 2.250000000*degrees

 This was considered acceptable.

Closed Loop Frequency Response

 The closed loop frequency responses for the compensated and uncompensated servos are plotted below.

> a := attensemilog(`C/R`,0.1,100):

> uncomp_gain_dB := 20*log10(abs(subs(s=j*omega,`C/R uncomp`))):

> b := semilogplot(uncomp_gain_dB,omega=0.1..100,colour=red):

> c := plot([[-1,-3],[2,-3]],linestyle=DOT,colour=black):

> display([a,b,c],title="Closed Loop Frequency Responses of\nCompensated Servo (blue) &  Uncompensated Servo (red)",txt,
labels=["","Gain dB"],PLOT(TEXT([2,5],"wT",ALIGNLEFT,FONT(SYMBOL,10))),




 Using the cursor, it will be seen that the compensation network has reduced the servo's peak magnification (resonance) by a factor of 13.8 (22.8 dB) from 23.8 dB to 0.88 dB; reduced the frequency at which it occurs from 27 to 19/sec; and reduced the bandwidth from 42 to 36/sec.  (The normalizing time constant, T, is 1 sec)  

 The bandwidth of the servo, i.e. the frequency range in which the magnitude of the closed loop frequency response, C/R (jw), is greater than -3 dB, can be obtained more accurately by substituting jl = s (where l = wT) in C/R to obtain a function, C/R f, from which the maximum value of C/R (jw) can be found, thus

> `C/R f` := map(abs, subs(s=j*lambda,`C/R`) ):

> `C/R max` = maximize(`C/R f`,location,lambda=15..30);

`C/R max` = (1.106535068, {[{lambda = 18.95050090}, 1.106535068]})

 The maximize function yields not only the maximum value of C/R (jw) = 1.106 (0.88 dB), but also its location, l = wT = 18.95, whence w = 18.95/sec.

 Setting C/R f = -3 dB and solving for l yields the cutoff frequency, omega[c] .  In this case, the bandwidth extends from w = 0/sec (constant amplitude input) to the cutoff frequency, so it has the same value as the cutoff frequency.

> omega[c]*T = fsolve( `C/R f`=10^(-3/20), lambda,0..40);

> omega[c] := evalf(rhs(%)/(2*Pi)*cps);

> unassign('lambda','omega[c]');

omega[c]*T = 36.55317889

omega[c] := 5.817619103*cps

 This bandwidth is small enough to reject most 16 cps noise in the input - any such noise will be attenuated by a factor of about 11 (20.75 dB).  As has been seen in the plots of transient response above, it is adequate for good performance.  However, if a faster response to a step input of velocity is necessary, the bandwidth would have to be increased, and that would result in poorer rejection of 16 cps noise - indeed, some of it could be reproduced in the servo's output.  If the input were to contain noise at frequencies much lower than 16 cps, say 5 - 8 cps, the bandwidth would be excessive, and the noise would appear in the output.  It might also cause the motor to overheat, or the amplifiers to saturate, with resulting instability of the servo.

Return to Observations

Compensation Network Design

 The compensation network for the servo used operational amplifiers as shown in the sketch below.

[Inserted Image]

 C1 and C2 were chosen as 1 mF and R5 was arbitrarily chosen as 100 kW.  The other components of the compensation network can be determined using the following relationships to produce the desired values for T[1], T[2] , a and b.

> R5 := 10^5;

> C1 := 10^(-6);

> C2 := C1;

R5 := 100000

C1 := 1/1000000

C2 := 1/1000000

> eq1 := R1*C1 = evalf(T[1]/alpha);                       

eq1 := 1/1000000*R1 = 0.3030303028e-1

> eq2 := (R1 + R3)*C1 = T[1];

eq2 := 1/1000000*R1+1/1000000*R3 = .1797539127*Pi

> eq3 := R2*C2 = T[2];

eq3 := 1/1000000*R2 = 2

> eq4 := (R2 + R4)*C2 = beta*T[2];

eq4 := 1/1000000*R2+1/1000000*R4 = 5.866666662

> eq5:= (R2*R4*R6)/(R1*R3*R5) * (R1 + R3)/(R2 + R4) = Kc;

eq5 := 1/100000*R2*R4*R6*(R1+R3)/(R1*R3*(R2+R4)) = 1.213338911

> sols := solve({eq1,eq2,eq3,eq4,eq5},{R1,R2,R3,R4,R6}) assuming R1>0,R2>0,R3>0,R4>0;

sols := {R3 = 534410.5413, R6 = 2639.609357, R1 = 30303.03028, R2 = 2000000., R4 = 3866666.662}

 These are reasonable values, but using standard values they would be chosen as:

R1 = 30.1 kW + 205 W = 30.305 kW,
= 2 MW,

R3 = 511 kW  + 24.3 kW = 635.3 kW,

R4 = 2 MW + 1.78 MW + 86.7 kW = 3.8667 MW,

R6 = 2.55 kW + 90.9 W = 2.6409 kW.

Inserting these values,

> R1 := 30.1*10^3 + 205;  R2 := 2*10^6;  R3 := (511 + 24.3)*10^3 ;
R4 := (2 + 1.78)*10^6 + 86.7*10^3;  R6 := 2.55*10^3 +90.9;

R1 := 30305.0

R2 := 2000000

R3 := 535300.0

R4 := 3866700.00

R6 := 2640.90

 From eq1 - eq5,

> Kc := (R2*R4*R6)/(R1*R3*R5) * (R1 + R3)/(R2 + R4);

> T[1] := (R1 + R3)*C1;

> alpha := T[1]/(R1*C1);

> T[2] := R2*C2;

> beta := evalf( (R2 + R4)*C2/T[2]);

Kc := 1.213752838

T[1] := .5656050000

alpha := 18.66375186

T[2] := 2

beta := 2.933350000

> unassign('R1','R2','R3','R4','R5','R6','C1','C2');

 The values found are sufficiently close to those derived earlier for the compensation network, namely Kc = Float(121334, -5), T[1] = Float(56561, -5), alpha = Float(1863555, -5), T[2] = 2 and beta = Float(293333, -5) .

 Inserting these new values in the compensation circuit's transfer function, the new poles and zeros of the servo's closed loop transfer function can be obtained together with the new damping ratio and undamped natural frequency thus     

> Gc := Kc*( (s + 1/T[1])/(s + alpha/T[1]) ) * ( (s + 1/T[2])/(s + 1/(beta*T[2]) ) );

Gc := 1.213752838*(s+1.768018317)*(s+1/2)/((s+32.99785515)*(s+.1704535770))

> KG_comp := evalf(Gc*KG/(T[f]*s + 1)):

> zeros := [solve(numer(normal(`C/R`)))]:

> poles := [solve(denom(normal(`C/R`)))]:

> eq1 := sqrt(1-zeta^2)/zeta = abs( Im(poles[2])/Re(poles[2]) ):

> eq2 := zeta*omega[n] = abs( Re(poles[2]) ):

> solve({eq1,eq2});

{zeta = .5459342791, omega[n] = 29.81747407}


 These are identical to those found previously, namely omega[n] = Float(2981747, -5), zeta = Float(54593, -5) .


1.  The method illustrated in this worksheet for choosing the poles and zeros of a series-compensation network for a simple servo is quite straightforward.  It allows the compensation to be designed directly from the damping ratio and undamped natural frequency specified for the servo.  This is an advantage over frequency response methods since these rely on indirect relationships with the damping ratio and undamped natural frequency.  In practice, though, the choice of method depends mostly on the designer's preference and experience.

2.  One of the lead network's time constants, T[1] , was chosen equal to the motor and load's mechanical time constant, T[m] , so that the zero it produced cancelled with the pole produced by T[m] .  This is common practice, though any reasonable choice can be made.  Sometimes it is not be possible to generate a lead angle sufficiently large to cause the root loci to pass through the desired dominant poles.  In these cases, it is necessary to use two lead networks in series, use more elaborate compensation networks, or use parallel compensation.

3.  Although algebraic and trigonometric methods were used to determine the parameters of the compensation network (Kc, a, b and T[2] ), semi-graphical methods can be used instead.  These methods were pioneered by W.R. Evans in 1948 and were in use long before the PC was invented.  They are quick, easy to use and sufficiently accurate.

4.  The compensation network used in this example allows the constants a and b to differ, but for other lag-lead networks they may be identical.  For such networks, a slightly different approach is used to obtain the values of Kc, a, T[1] and T[2] , though the principles remain the same.

5.  Using the cursor to measure values of plotted functions is sufficiently accurate for most practical purposes.  When such values were obtained analytically, they differed little from those obtained with the cursor.  In any case, the precision obtained in this worksheet is misleading.  As noted earlier, the servo's transfer function is an approximation that does not take account of any damping produced by friction, or of any non-linearities.  Even if friction were to be included, it would have to be represented by viscous friction, which is not entirely realistic.  Furthermore, motor constants vary slightly from one motor to another.  Despite these reservations, the method yields solutions that are a good starting point for experimental work to determine the best choice of components when the effects of friction, backlash, etc., can be taken into account.

6.  The compensated servo's closed loop response to a step input of velocity highlighted the compromise between a wide bandwidth needed for fast performance and a narrow bandwidth needed for noise rejection.  This can be a difficult compromise because the noise in the input may not be known in the early design stages, particularly when the input forms part of separate equipment being designed by others.  Velocity Step Input  Bandwidth   

7.  The ease with which Maple produces transient responses contrasts with the long and painstaking work that was needed before its advent, and its rich graphics (particularly in the "classic" interface) are ideal for illustrating aspects of servo design.


 Inter alia: Servomechanism Analysis by G.J. Thaler and R.G. Brown, published by McGraw-Hill Book Company Inc, 1953; Control System Dynamics by W.R. Evans, published by McGraw-Hill Book Company Inc, 1954; and Modern Control Engineering by Katsuhiko Ogata, published by Prentice-Hall Inc, 2002.

Disclaimer:  While every effort has been made to validate the solutions in this worksheet, Waterloo Maple Inc. and the contributors are not responsible for any errors contained and are not liable for any damages resulting from the use of this material.