Sie sind auf Seite 1von 6

Sisotool Tutorial

Sisotool is used to design controllers of different types in a short time. You can use it to observe both
the time response and frequency response of the system.

To use sisotool, type the following command in matlab:

>>sisotool(G)

G is the open-loop function before adding the compensator. After you type it, the following two
windows will appear:

The windows on the left shows the root-locus, gain response and phase response of G. You will not use
the root-locus plot in this assignment, ignore it.

Under the gain curve, the current value of gain margin is given, the frequency below it is the phase-
crossover frequency (wpc). Under the phase plot, the current value of phase margin is given, the
frequency below it is the gain-crossover frequency (wgc).

The window on the right shows the Control Manager which will be used to add the controllers. The
effect of any change you make in the manager will be seen on the gain and phase plots. The block in red
(C) is the controller block that you will design.

In the manager window, click on the Compensator Editor Tab, you will see the following:
In this tab you will design your compensator. From this figure C is now equal to 1, which means there is
no controller yet.

In the Dynamics Panel, right click, you will find Add Pole/Zero then you will find all the pole-zero
combinations of different types

You will use these combinations to


achieve the required response. Next I
will give an example of designing a lead
compensator.

Let ( ) , we want to
( )( )
achieve a PM = 45.

Steps:

Type the following in workspace:

>>s = tf(s);

>>G = 5 / (s*(s+1)*(s+2));

Another way to write G:


>>G = zpk([],[0 -1 -2],5); %type help zpk to know how it works

Gives the same G

Another way to write G:

>>G=tf(5,[1 3 2 0]);

Also gives the same G.

then:

>>sisotool(G)

You will get PM=5.02


degrees we want to make it
45 using lead compensator.
In the compensator editor
tab right click in dynamics
panel, choose lead

Notice the change in gain


and phase plots, PM now is
37.4. Notice the
compensator equation, it
changed now from 1 to
this is a lead
compensator with T=1 and
alpha=0.1. Observe the
appearance of a red circle
and a red cross in the gain and phase plots; these are the current locations
of the zero and pole of the lead compensator. Try to drag the circle or the
cross on the phase plot, you will notice that changing the pole or zero
location changes GM,PM,wgc and wpc because you change T and alpha.

Also observe how GM and PM are calculated in the plots using the marker.
The GM is the difference below the 0 dB line at wpc. The PM is the
difference above the -180 line at wgc.
I was able to achieve the required PM by dragging the pole (cross) downwards. See the compensator
value now:

C is now equal to . You can find the current pole and zero locations on the right of the
window by left clicking the added lead row. Also you will find the value of and . If there is a
requirement on the steady-state error, simply change the value of the compensator gain to K, or
perform sisotool for KG instead of G and in this case keep the gain equal to 1.

Note that if you try to change the pole and zero locations from the gain plot, you will notice that the
compensator gain changes, which is not recommended because you have to keep the value of the gain
which satisfies the steady-state requirements, so you should change them from the phase plot only.

You can design any controller using any combination of poles and zeros and change their locations as
explained till you get the requirements.

If you want to start with reasonable values for the pole and zero, try to solve the problem analytically
first before adding the compensator. For example in this problem PM was 5.02 and required is 45. You
can write a small code to calculate and you get their values 50 and 0.1325 respectively (safety
factor=10), find the frequency at which the gain equals -20*log( )= -8.77 dB this value is found at
w=2.1 r/s then get T = 1.3 now you have T and alpha, add the lead compensator and put the obtained
values in the pole and zero values of the lead compensator, you will get PM=30, now try to move the
location of pole or zero in the phase plot you will easily reach PM=45.
To design any other controller, analyze its poles and zeroes composition, add them from the dynamics
panel, then control them from the phase plot. Remember that you still have the compensator gain as a
changeable parameter, but dont decrease it if there is a requirement on the steady state error, in this
case you have to put a minimum value for the gain to achieve a given steady-state response.

You can also observe the time response using sisotool. Choose the Analysis Plots tab instead of
Compensator Editor you will get something like this:

Change plot 1 type from None to Step and mark plot 1 at Closed Loop r to y)
Now another window appears showing the step response of the overall system, right click the window
choose characteristics to observe all transient response parameters:

You will need Settling time


and Peak response only in this
assignment. Try to change the
compensator gain, or pole or
zero location now from the
phase plot, you can see
directly the effect on the time
response.

Thats all for now.

GOOD LUCK

Das könnte Ihnen auch gefallen