Lab project Siso Tool Use in MATLAB Lab project Siso Tool Use in MATLAB PDF

Title Lab project Siso Tool Use in MATLAB Lab project Siso Tool Use in MATLAB
Author john Smith
Course Electronics Law
Institution Harvard University
Pages 9
File Size 580.6 KB
File Type PDF
Total Downloads 1
Total Views 143

Summary

This project is used for siso tool This project is used for siso tool This project is used for siso tool This project is used for siso tool...


Description

Co Contr ntr ntrol ol Sys yste te tems ms

Utilisation of the SISOTOOL function for Control Systems

The objective of this laboratory is to:  Introduce the control analysis and design GUI ‘sisotool’ in Matlab/Control Systems Toolbox;  Study methods of data input and choice of feedback architecture;  Study the use of the root locus method for analysing control systems;  Use frequency analysis to improve stability and response.

1.

SISOTOOL GUIDE

To start the toolbox, type sisotool (lower case) in the command window. You should get the screen illustrated in Figure 1. The plot on the top right is the root locus, bottom right is the response of the system to a step input, and the plots on the left are the magnitude and phase plots of the Bode diagram. The plots are now empty because no model is imported yet.

Figure 1: Sisotool Results Window.

To start importing functions, you need to click the ‘Edit Architecture’ tab in the ‘Control System Window.’ Select the following control system architecture:

Figure 2: View in the Architecture tab. By default, the F, C, G, and H blocks are all set to one. You can set any of these blocks to a model of a plant by changing the values present in them or by adding functions in the workspace, or in a MAT-file etc. Select the model of interest and use the arrow buttons at the end of each ‘Identifier’ to put them into F, C, G, or H blocks. For this work you can define the transfer function from within the command window. As an example, consider the following transfer function: 𝐺(𝑠) = 1.1

𝑠2

𝑠+2 + 2𝑠 + 4

Exercise Input the above transfer function in the command window by typing: sys = tf([1 2],[1 2 4]) and import it to G from the workspace. Click OK and you get the root locus and the bode diagram as shown in Figure 3.

You can move the pink square around on the root locus to change the gain, and the Bode plots will adjust accordingly. You can also use the red “cross” and “circle” icons from the ‘Root Locus Editor’ to add extra poles and zeros (the double crosses/circles stand for complex conjugate poles/zeros). The eraser icon will delete the added poles or zeros (but not the ones already imported from the workspace).

Figure 3: Root Locus and Bode plot for 𝐺(𝑠).

Right click on the graph to see additional functionality.

1.2

Exercise Add the grids to each graph.

The grid on the root locus shows radial and circular lines which are for the constant damping ratio and natural frequency contours, respectively. Sometimes these can be used to set design limits, for example, if you can’t use a certain value for damping ratio. The gridlines on the bode plot show on a logarithmic scale, as frequencies are normally always plotted in this manner.

Figure 4: Inclusion of Grid Lines.

SOME IMPORTANT POINTS

1)

The root locus is a locus describing the roots of the characteristic equation (of the unity-feedback system with the transfer function KGH) plotted on the s-plane as a function of K.

2)

The Bode diagram consists of two plots, the magnitude and phase of the open-loop transfer function. You could however see a closed loop Bode plot by selecting ‘ClosedLoop Bode Editor’ under the ‘Tuning Methods’ menu or adding a ‘New Plot’ from the ‘Analysis’ menu.

3)

In the screen shown above, C=K and H=1 (unity-feedback).

2.

ADDING POLES AND ZEROS

The ability to add/erase poles and zeros graphically is extremely useful when you are designing a control system for a plant. In sisotool, G is assumed to be a given plant. This is fixed and won’t change. The added poles, zeros and gains are for the C tab in the ‘Controller and Fixed Blocks’ window on the left-hand side (which is known as the Compensator).

2.1

Exercise Add a single pole at the origin and zero at -0.2.

Figure 5: Inclusion of an additional Pole at the origin and a Zero at -0.2.

The gain values can be edited by clicking the current compensator to get a more accurate position (the red circle).

2.2

Exercise Investigate how adjusting the value of the compensator gain and position of the zero and pole (also known as an ‘integrator)’ affects the response. What happens?

Sisotool is also capable of much more. The important ones include; Response to Step Response (r to y): It gives the closed loop unit step input response of the system in question. It includes the output from the plant as well as the control signal coming from the control block C. It can be updated in real-time. Rejection to Disturbance: (e.g. du to y): Similar to Response to Step Response except it gives the closed-loop unit step disturbance response of the system in question. The disturbance signal is nominally injected between the C and G blocks via a summation junction. …and many more in the analysis

3.

3.1

ROOT LOCUS ANALYSIS OF FEEDBACK SYSTEMS

The root locus method

The stability and response of closed-loop systems is largely determined by the following expression: (1 + 𝐾(𝑠)𝐺(𝑠)) Consider the following block diagram:

Figure 6: Block diagram for a unity feedback closed-loop system. 3.2

Exercise Derive an expression for the transfer function in terms of K, Kc(s), and Go(s),

Note that the controller is represented here as two components; a dynamic compensator, 𝐾𝐶 (𝑠), and a gain parameter, 𝐾 , which is independent of frequency (commonly an electronic gain provided by a high specification operational amplifier). These are represented by just ‘C’ in sisotool. The plant transfer function 𝐺𝑜 (𝑠) is fixed and not accessible for change by the designer. The transfer function 𝐾𝐶 (𝑠) can be varied by the designer in two ways: 1) Its structure can be changed (how many Poles and Zeros it has); 2) Its parameters can be changed (where those Poles and Zeros are located). In an analog controller, this would again be done electronically using a filter type circuit based on an operational amplifier. It is normal to start the design procedure with as simple as possible a structure for 𝐾𝐶 (𝑠); very often it is just set to unity. Poles and Zeros are added to its structure as necessary, once it has been shown that a simple structure does not yield satisfactory system performance (speed of response, accuracy etc). A designer can also vary the value of gain, 𝐾. The plot of the roots of the denominator equation, as 𝐾 varies between 0 and ∞ is known as the root locus. The aim is to choose a value of 𝐾 that yields desirable locations for the closed-loop poles. The sisotool GUI allows you to change 𝐾 and 𝐾𝐶 (𝑠) easily and to see the effect of the changes in terms of:  The locations of the closed-loop system Poles;  The time response;  The frequency response.

3.3

Exercise Show how varying 𝐾 and 𝐾𝐶 (𝑠) affect these parameters using the previous transfer function from section 1. Adjust 𝐾 between 1 and 1000 and adjust 𝐾𝐶 to include a Pole or Zero term. If using the architecture in Figure 2, 𝐾 and 𝐾𝐶 are merged into the single transfer function, ‘C’.

Note: sisotool is only a design aid! It is up to you to specify what system performance you desire and to know what must be done to achieve that performance. In other words, you must know the theory behind it in order to use it properly.

4.

USING SISOTOOL FOR ROOT LOCUS ANALYSIS

NB: You will use sisotool during the MATLAB examination which is an important part of the assessment for this module. It is essential that you have a working knowledge of it.

4.1

Exercise 1

Suppose that in the unity feedback control system of Figure 6, the Plant consists of a double integrator so that the plant transfer function is: 1 𝑠2 This is typical of the forward loop of a servomechanism; for instance, it may represent the successive integrations between acceleration, velocity and position. a) Define the plant as a system in the command window and import into the ‘plant block’ (G in the sisotool diagram). The root locus and open loop Bode plots are produced immediately with a gain of 𝐾 = 1 and the compensator 𝐾𝐶 (𝑠) = 1. b) On the basis of the root locus and open loop frequency response, is the system stable, critically stable or unstable? c) What is the rate in decrease in the magnitude per decade and the value in the phase on the Bode – is this significant? – this has been discussed in the lectures.

4.2

Exercise 2

The step response can be displayed using the ‘Analysis’ menu. Observe how the closed-loop system response, in the time and frequency domains, changes with loop gain. Does this system with no dynamic compensation achieve a completely stable response?

4.3

Exercise 3

We now start to add some dynamic compensation using the Compensator editor. a) First, look at the effect of making 𝐾𝐶 (𝑠) a single pole at 𝑠 = −4, so that the open loop transfer function becomes: 𝐾𝐾𝐶 (𝑠)𝐺𝑜 =

𝐾 𝑠 2 (𝑠 + 4)

b) What order system is this and is it stable? c) Remove the pole at 𝑠 = −4 and substitute a zero at 𝑠 = −1. Again, plot the root locus. Has this helped? Comment on the root locus, frequency and step responses. d) Now re-introduce the pole at 𝑠 = −4. This combination of zero and pole in this form is known as a lead compensator:

𝐾𝐶 (𝑠) =

𝑠+1 𝑠+4

e) Produce its root locus. What effect has re-introducing the pole had on the root locus, compared with the zero alone? Why is it desirable to re-introduce the pole anyway? f) Repeat step d) with the pole at 𝑠 = −10 and another at 𝑠 = −1, with the zero left in the same place. Comment on the changes you see on the root locus as the pole is re-located nearer to the origin. What effect will this have on the time response?

5.

USING SISOTOOL FOR FREQUENCY RESPONSE

Control system design can be done using the open loop Bode plot or the root locus method where you observe the locations of the poles over a range of gains. Both methods have their advantages and disadvantages, and it is best to regard them as complementary, giving different insights into the dynamics of the system being investigated.

Figure 7: Block diagram for a unity feedback closed-loop system.

5.1

Exercise a) Enter the plant transfer function 𝐺(𝑠) into Matlab at the command window and load sisotool. b) If you want, to minimise distraction, temporarily hide the root locus and closed loop Bode plot panes to leave just the open loop Bode plot. c) Import the plant transfer function. Make sure the compensator gain is unity. You should see a standard second order frequency response. d) Set the gain in the compensator to the value from 1 to 1000 using a variable of intermediate values. What effect did it have on the Bode plot? e) Set the compensator gain back to 1 and now some design constraints:

i)

Firstly, impose a design constraint that 𝜁 ≥ 0.8 by adjusting the pink dot on the root locus (Why might you do this considering the step i.e. time response?). What is the maximum value of gain, 𝐾 , that can be used?

ii)

Now find the value of 𝜔 for the closed loop system at this value of gain. Let’s call this 𝜔𝑑 and use it as a second design constraint; we want the natural frequency of the final system to be (approximately) 𝜔𝑑.

iii)

Thirdly, show that there is a substantial steady state error in response to a unit step input (𝑟(𝑠) = 1 ⁄𝑠 ) for this value of gain. Our third and final design constraint is that the output should have zero steady state error. Therefore, the amplitude to a step input of 1 needs to have an output amplitude of 1. Change the value of F (in Figure 2) to obtain zero steady state error.

6.

FINAL EXERCISE – possible exam question!

Consider the following block diagram:

a) Draw the root locus and the closed loop step response for 𝐾 = 10. Comment on the stability of the system. b) Draw the Bode diagram for 𝐾 = 1 and determine the gain and phase margins. Comment on the system’s stability. c) On the Bode diagram, find the appropriate gain margin required for achieving a percent overshoot of 10% and a settling time of 17 seconds....


Similar Free PDFs