HW7, MAE 171. Spring 2005. UCI

Nasser Abbasi


Problem 1


Figure

Plot the R.L. (Root Locus)

step 1

Identify the position of the open loop poles and zeros on the Z-plane. Since the open loop tf is MATH then we have a zero at $z=-1$ and a pole at $z=1,z=0.6065$


Figure

step 2

Identify R.L. on the real line.

Number of poles and zeros must be odd to the right of the line segment for that segment to be on the R.L., hence we see that the R.L. on the real line is as follows.


Figure

step 3

Find asymptotes.

Number of asymptotes is $n-m\,\ $where $n$ is number of finite open loop poles, and $m$ is number of open loop finite zeros.

Hence $n-m=1$, so there is one asymptote. The angle the asymptote makes with the real axis is MATH for MATH (this is for $K>0)$.

Since $n-m=1$, then we count $N$ up to zero only ($N=n-m-1=0)$, so we obtain angle as MATH.

Now find where the center of the asymptote on the real line.

This is given by MATH

step 4$\qquad $

Find break away and break in points on the real line. Note_1

The characteristic equation is MATH hence MATH, then

MATH

Hence $\frac{dK}{dz}=0$ leads to $-z^{2}-2z+2.213=0$, Solution is

MATH
$\allowbreak $. Since both solutions are on the R.L. then both are valid. The solution $z=0.79248$ is between 2 poles, hence it is a breakaway point, and the solution MATH is between 2 zeros (one zeros at $-\infty $) hence that is a break-in point. So far we have this plot.


Figure

step 5

Find angle of departure of the break away point. (point $z=0.792$).

There are 4 branches at this point. Hence each branch makes $90^{0}$ with the other branch. Since one branch is fixed (from $z=1$ to $z=0.792$), hence R.L. makes $90^{0}$ with the real line. Similarly for angle of arrival at point $z=-2.792$). Hence RL is a circle that has on its perimeter the point $z=0.792$ and the point $z=-2.7925$) (we are not asked to prove this). Since RL starts at a poles and ends at a zero, then one branch will arrive at the break-in point and moves to the zero located at $z=-1$ and the other branch will move to the other zero locate at $z=-\infty $. Hence RL looks as follows


Figure

The center of the RL circle is located at midpoint between $z=-2.792$ and $z=0.79248$ i.e. at point MATH

Now to determine the critical value of gain $K$ for stability.

$K$ will be zero at a pole and will be $\infty $ at a zero. When RL meets the unit circle the system will become unstable.

We can use Jury tests to find the range of stable K.

The characteristic equation is MATH

Hence we need MATH or MATH or

MATH

From requirement that MATH we obtain MATH

From requirement that MATH we obtain

MATH

Which does not provide any new range information for $K$ as $K$ cancels out.

Since this is a second order system, no need to construct Jury table. We can stop here. Hence the range of $K$ for stability is MATH


Figure

We can now find where the R.L. cross the unit circle.

Since MATH, when $K=0.3935$ we get MATHSolution is MATH


Figure

Hence MATH

But MATH

This is $\omega _{d}$ when the system becomes unstable, ie. at $\zeta =0$ and MATH

$T=0.1\sec $, what value of gain $K$ will yield $\zeta =0.5?$

$\zeta $ is a function of the position of the closed loop discrete system as expressed by the relation MATH. The position of the closed loop poles is a function of $K$ (since by definition the closed loop poles move on RL as $K$ changes).

The characteristic equation is MATH, then the closed loop poles are the roots of this equation. which are MATH

Taking one of the roots, we obtain MATH

Note that $\zeta =0$ at $K=0.3935$ and $\zeta $will increase as $K$ becomes smaller.

By trial and error decrease $K$ and for each $K$ solve for $z$ in the above equation. Once $z$ is found, $r,\theta $ are known. Find MATH and check if the desired value. Continue this process until we reach the required $\zeta =0.5$ value.

This is a simple script which solves this. The answer is MATH

A table is generated showing how $\zeta $ changes with $K$, this is a partial listing showing when $\zeta =0.5$

   k           Damping Ratio
 0.066,      0.4927400303245694
 0.065,      0.49825440726325265
 0.064,      0.5038857217422561
 0.063,      0.5096384660975533




This below is the script with a plot showing how $K$ changes with $\zeta $


Figure




determine damped natural frequency and the number of samples

With the gain $K$ set to yield $\zeta =0.5$, determine damped natural frequency and the number of samples per cycle of damped sinusoidal oscillation

Since $K$ fixes the position of the closed loop pole on the R.L., then we can now find the angle $\theta $ that the pole makes with the real axis in the Z plane.

For $K=0.065$, substitute into equation (1) above, we obtain the pole location.MATHHence MATH

Now we can find $\omega _{d}$

MATH

We can also find$\ \omega _{n}$ (but problem did not ask for it).MATH

Now we find $N$ MATH

Since $N$ must be an integer (it is the number of samples per cycle) then we must choose $N=19$ or $N=18$. Which one to choose?

If we choose the lower value, i.e. $N=18$, this means we choose a larger $\theta $, i.e. larger gain $K\,$ or smaller $\zeta $, and the reverse will happen if we select $N=19$, the pole will be further away from the critical $K$ since $\theta $ will be smaller. It is better I think to select the larger value $N=19$ to improve the relative stability by staying away from the edge if the unit circle. So I select

$N=19$

MATH


Problem 2


Figure


Figure

Specification

  1. $\zeta ,$the damping ratio of the dominant closed loop poles is $0.5$

  2. $N,$ the number of samples per second is 8

  3. $T$, the sampling period is $0.1\sec $

Solution

First, assume there is no compensator $D\left( z\right) $.

MATH

Note that the uncompensated open loop poles are at

MATH
,
MATH
, and its zero at
MATH

The uncompensated system characteristic equation is MATH hence the characteristic polynomial is MATH or MATH

Hence uncompensated closed loop poles (roots of this polynomial) are at MATH

therefor

$r=0.95368$
and
MATH

It is clear that we need a compensator, since we want $\theta $ to be MATH which is not the case as is.

Now find the desired closed loop location to meet the specifications.

MATH

but MATH

Then from (1) we find $r$

MATH

Hence desired closed loop dominant pole must be located atMATH and at MATH Hence desired closed loop pole location isMATH

Now that we know where the desired closed loop pole must be located, we can add a compensator such that the angle condition is satisfied for this desired pole.

This drawing shows the uncompensated $G\left( z\right) $ poles/zeros and the desired closed loop location.


Figure

Now we add the lead compensator such that with its pole and zero we will satisfy the angle condition at $z_{d}$. Since this is a lead compensator, then its zero will be to the right of its pole.

First let find out the angle deficit before adding the compensator.

With simple geometry we can find the sum of uncompensated angles


Figure

MATH, hence pole MATH makes MATH with desired closed loop pole.

MATH, hence pole MATH makes MATH with desired closed loop pole.

MATH ,hence zero $\widetilde{z}_{o}$ makes MATH with desired closed loop pole.

Hence MATH

Since the angle condition requires that the sum of angles with the desired closed loop pole be MATH $,$ we need to locate the compensator pole and zero to meet this condition.

Put the compensator zero $z_{o}$ on top of the uncompensated open loop pole MATH, and the compensator pole on the real axis such that the angle condition is met. Hence now we have this diagram


Figure

The angle $\theta ,\phi $ did not change, hence we can now find angle $\gamma $

MATH

Hence MATH

Therefor we can find the lead compensator pole location MATH

$\ $

Therefor the lead compensator now is

MATH

Now we need to find $K_{D}.$ Use magnitude condition on the characteristic equation for the compensated closed loop system.

MATH

Where MATH

Note that when finding the magnitude values we do not consider the canceled poles/zeros). We get

MATH

But MATH

Hence

MATH

Hence MATH

Hence lead compensator transfer function now isMATH

So the compensated open loop T.F. now is

MATH

To verify and to check internal consistency of the computation, find the closed loop pole of the compensated system and verify it is the same as the one we started with. The characteristic polynomial of the compensated system isMATHHence the close loop poles of the compensated system are the roots of the above polynomial. Solution is: MATHwhich matches the desired closed loop pole we started with. (see equation (2) above).

This completes the design the lead compensator.

To find the static velocity constant. $K_{v}$

From the open loop for the compensated system, equation (3) above

MATH

The pole at $0.99958$ can be approximated to be at $1$, so I can write

MATH

This is a

type one system

MATH

Hence $e_{ss,ramp}=$ MATH

Add a lag type compensator to boost $K_{v}$ by a factor of 2

We want MATH

Hence now $e_{ss,ramp}=$ MATH

The lag compensator is MATH, let MATH per problem specification. Hence the new open loop now is MATH, hence we want

MATH

But MATH, hence

MATH

Hence MATH

Hence the lag compensator is MATH

MATH

Therefor the final compensated open loop now is

MATH

To verify that the closed loop pole still remain at the desired location, the characteristic polynomial is MATH




Solution is MATH

So the desired dominant poles remain close to the same location. Compare with equation (2). Not exactly the same location (see equation 2), but very close.

Error in $r$, the length of desired pole is

MATH

and error in $\theta $, phase of desired pole

MATH

So shift in position is less than one tenth of a percent.

System should be tested now to verify this slight movement of the closed loop pole does not have adverse effect.

This diagram shows the final poles and zeros of the final compensated system.


Figure

Discrete Simulation of unit step response


Figure

The step response for the plant only, and the plant+lead and plant+lead+lag is shown below to see the effect of adding the compensators.

The step response of the plant only shows that the response takes longer to reach the desired value, the settling time is longer, as well as the rise time. But adding the compensator does not seem to have an effect of the maximum overshoot $M_{p}$.

When the lead and lag compensators are added, the response reaches the desired value much faster. The rise time is about 1/2 second compared with about 3.5 seconds with the plant alone. The settling time when compensators are present is about 1 second, while without compensators the settling time is about 6-7 seconds.




When comparing the plant+lead vs plant+lead+lag on the step response, the presence of the lag compensator does not seem to have much of an effect, actually looking at the zoomed area, when using only the lead compensator, the step response is a little better without the presence of the lag compensator.

The effect of the lag compensator is more evident when looking at the steady state error for a ramp response. In that instance, the presence of the lag compensator has improved the steady state error by making it smaller than when using a lead compensator only. Actually the steady state error for tracking a ramp input is half that when using a lead compensator only.


Figure





Figure

The diagram below shows the impulse response for the plant alone, then plant+lead, then plant+lead+lag for comparison.





Figure


Continuous time system simulation

Using simulink we can obtain the continuous time system response to a step input. This is the result.


Figure


Problem 3

Given MATH and $T=1\sec $, find equivalent discrete-time systems using

  1. standard Z transform (impulse invariance)

  2. step invariance

  3. backward difference

  4. forward difference

  5. bilinear z-transform

  6. matched z-transform




Summary of results

This tables summarizes the results

Standard Z transform MATH
step invariance MATH
backward difference MATH
forward difference MATH
bilinear z-transform MATH
matched z-transform MATH


Step response of different emulation methods

To help understand more the emulation methods, a step response using each different emulation method is shown alongside the Laplace transform response.





Figure


Figure


Solution

Standard Z transform

MATH

MATH

MATH

Hence

MATH

$\ \ $

For $T=1$ we get

MATH

Step invariance

MATH

MATH

MATH

MATH

Hence

MATH

Since $T=1$ we get

MATH


Backward difference

use MATH

Hence

MATH


Forward difference

use $s=\frac{z-1}{T}$

Hence

MATH


Bilinear z-transform

use MATH

since $T=1$, we get MATH

Hence

MATH $\ $


Matched z-transform

MATH has one finite zero at $-2$, one zero at $\infty $ and 2 poles at $-1,-3$

Hence MATH

for $T=1$ we obtain

MATH

Now to find $K$

Since continuous system is type $0$, then use position error constant $K_{p}$

MATH

for the discrete system

MATH

Hence MATH

Hence

MATH