QUICK START ON USE OF LICSS V

advertisement
QUICK START ON USE OF LICSS V.0 GUI SOFTWARE UTILITY
Remark 1
For application to single-variable nonlinear systems, it is assumed that user has obtained
a frequency domain model using the method outlined in Chapter 2 (also see pages 71-73
to help modifying the software given in Fig. 2.9). A transfer function may then be
identified using invfreqs function of MATLAB®. Then proceed as follows.
Remark 2
To activate LICCS V. 0, load and run gui_amir_4.m.
Example 1 – Lead/Lag design
PROBLEM STATEMENT - Consider the example problem studied in by Ogata 1990.
The linear plant is of the following form.
Gp 
4
ss  0.5
(1)
It is desired to design a lead-lag compensator that results in a closed-loop system that
would have the damping ratio of the dominant closed-loop poles equal 0.5 with an
undamped natural frequency of 5 rad/sec; the static velocity error constant is to be 80
sec 1 . The corresponding desired closed-loop transfer function is obtained as follows.
The desired transfer function is of the following form.
hd 
xs   n2
s  2 n s   n2
2
(2)
Where from the problem statement,  n  5 and   0.5 . Based on the definition of
velocity error constant, kv , the following relation holds.
2 
2 n   n   x  0  x  4.6875
 kv 
(3)
Hence,
hd 
4.6875 s  25
s 2  5s  25
(4)
SOLUTION USING LICSS v. 0
1. for “input method” enter [0 0] and hit the “Enter Key”; the first 0 indicates that
you want to input using transfer function mode, and the second zero indicates that
you want to enter plant G_p.
2. with reference to equation (1) for “num” enter 4 and hit the “Enter Key”. For
“den” enter [1 0.5 0] and hit the “Enter Key”.
3. Go to “Display” and enter 2 followed by the “Enter Key”. The numerator and
denominator coefficients are displayed in yellow and brown bars next to the Num
and Den static texts. This is to make sure that you have not done a mistake.
4. for “hd_switch” enter 1 and then hit the “Enter Key”. This will indicate that you
want to enter the desired transfer function in transfer function mode.
5. With reference to equation (4), for “Num_hd” enter [4.6875 25] and hit the
“Enter Key”. For “Den_hd” enter [1 5 25] and hit the “Enter Key”.
6. Go to “Display” and enter 3 followed by hitting the ‘Enter Key”. The numerator
and denominator coefficients of the desired transfer function would be displayed.
7. For “Method” use 1 to indicate the use of cad_controller that allows design of
various classical controllers. Hit the “Enter Key”.
8. From help menu, select Params-1 to see the required input; then for “Params-1”
enter [1,-1,-1,-1,-1,-1,-1,-1] to indicate the design of a lead-lag controller with
default values. Hit the “Enter Key”.
9. Click on “Press to Design”. When the design is completed, the coefficients of the
designed controller would be displayed in yellow and brown bars next to Num
and Den static texts.
10. Go to “tfinal” (above plot screen 1) and enter 3 for three seconds of simulation.
Hit the “Enter Key”.
11. Go to “SCRN NO” and select a screen number; for example enter 1 followed by
hitting the “Enter Key”.
12. Go to “Plot Overlay” and enter 0 to plot on a blank screen. Hit the “Enter Key”.
13. Click on “Plot Y” button.
14. You can save the plot data on the screens by clicking on “Save Plot data” to
create the plot using some other software like Excel®. The data file separates the
data for each plot of each screen by a horizontal line of data whose first element
is the screen number, the second element is the plot number, and the third
element is the number of data points. For frequency response data, there is a
fourth element with 1 designating the magnitude data and 2 for phase data.
15. If you want the plot for publication purposes or for your report go to “Plot” and
enter [5 1] to get a “figure” screen of screen 1. Click on “Plot”. The “figure”
plot will appear. Prepare the plot as you normally do in MATLAB, and save a
“jpeg” format for insertion in the Word file.
Example 2 – PID design
For the second example problem, consider the following first-order plus delay model
studied in Wang et al. 1995.
G s  
e 5 s
10 s  1
(5)
The desired transfer function is of the following form.
e 5 s
hd 
20 s  1
(6)
Notice that the developed procedure must have all transfer functions as rational functions
in s ; for this reason, we approximate the e 5 s term as below (Kuo 1982).
e Ts 
1
(7)
1 Ts / n 
n
Where T  5 and we arbitrarily select the order of approximation as n  4 .
substituting equation (7) into equations (5) and (6), the following would be obtained.
G s  
hd s  
1
24 .41s  80 .57 s  101 .6s 3  59 .38 s 2  15 s  1
5
4
1
48 .83 s 5  158 .7 s 4  195 .3s 3  109 .4s 2  25 s  1
(8)
(9)
To get the above coefficients, the following MATLAB commands may be executed.
By
one=[5/4 1]; two=one;three=conv(one,two);four=three;denp_g=conv(three,four);
five=[10 1];den_g=conv(denp_g,five);g=tf(1,den_g);
six=[20 1];den_hd=conv(denp_g,six);hd=tf(1,den_hd);
SOLUTION USING LICSS v. 0
1. Enter G and hd similar to Steps 1-6 of the lead-lag controller design discussed
above.
2. For “Method” use 1; then, hit the “Enter Key”.
3. For “Params-1” enter [2,-1,-1,-1,-1,-1,-1,-1]; then, hit the “Enter Key”.
4. Click on “Press to Design”. When the design is completed, the coefficients of the
designed controller would be displayed in yellow and brown bars next to Num
and Den static texts.
5. Go to “tfinal” (above plot screen 1) and enter 150 for 150 seconds of simulation.
Hit the “Enter Key”.
6. Go to “SCRN NO” and select a screen number; for example 1 followed by hitting
the “Enter Key”.
7. Go to “Plot Overlay” and enter 0 to plot on a blank screen. Hit the “Enter Key”.
8. Click on “Plot Y” button.
9. You can save the plot data on the screens by clicking on “Save Plot data” to create
the plot using some other software like Excel.
10. If you want the plot for publication purposes or for your report go to “Plot” and
enter [5 1] to get a “figure” screen of screen 1. Click on “Plot”. The “figure” plot
will appear. Prepare the plot as you normally do in MATLAB, and save a “jpeg”
format for insertion in the Word file.
11. The user should set up a Simulink file and verify the design using exact model
given by equation (5).
Example 3 – P + Rate Feedback
PROBLEM STATEMENT - Consider the example problem studied in by Diazzo 1968.
The linear plant is of the following form.
Gp 
0.88
0.2 s 3  1.2 s 2  s
(10)
It is desired to design a P+Rate Feedback controller that results in a closed-loop system
with the following transfer function.
hd s  
15
s  3.464 s  15
2
(11)
SOLUTION USING LICSS v. 0
1. Enter G and hd similar to Steps 1-6 of the lead-lag controller design discussed
above.
2. For “Method” use 1; then, hit the “Enter Key”.
3. For “Params-1” enter [4,-1,-1,-1,-1,-1,-1,-1]; then, hit the “Enter Key”.
4. Click on “Press to Design”. When the design is completed, the coefficients of the
designed controller would be displayed in cyan, green, and red blocks.
5. Go to “tfinal” (above plot screen 1) and enter 5 for 5 seconds of simulation. Hit
the “Enter Key”.
6. Go to “SCRN NO” and select a screen number; for example 1 followed by hitting
the “Enter Key”.
7. Go to “Plot Overlay” and enter 0 to plot on a blank screen. Hit the “Enter Key”.
8. Click on “Plot Y” button.
9. You can save the plot data on the screens by clicking on “Save Plot data” to create
the plot using some other software like Excel.
10. If you want the plot for publication purposes or for your report go to “Plot” and
enter [5 1] to get a “figure” screen of screen 1. Click on “Plot”. The “figure” plot
will appear. Prepare the plot as you normally do in MATLAB, and save a “jpeg”
format for insertion in the Word file.
Download