Baixe o app para aproveitar ainda mais
Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original
Dublin Institute of Technology College of Engineering and Built Environment Control Engineering 1 Mech 3019 Dr. Nigel Kent Rm: 387 Email:nigel.kent@dit.ie Ext: 3885 Dublin, 2013 Introduction Aims The aim of this module is to; Introduce the concept of control in an engi- neering context and to indicate the wide variety of control tasks in engineer- ing systems. Describe common control strategies; open loop and feedback. Present a description of closed loop control systems and analyse the main properties of feedback. Introduce the concepts of steady state error, dis- turbances, disturbance rejection and stability. Present time and frequency domain models as equivalent descriptions of system behaviour. Provide an understanding of the need for compensation and to illustrate the proper- ties of proportional, integral and derivative controllers. Understand that proper control system design leads to systems that are efficiently and ad- equately controlled, and can have a direct impact on energy consumption, the environment and society. Content Concept of control systems, types of control, open and closed loop systems, effects of feedback. Differential equations and transfer functions of physical systems. Block diagrams and their reduction. ii Analytical treatment of first and second order systems. Effect of dis- turbances, steady state errors. Standard test inputs and system re- sponse. Stability of linear systems, the Routh-Hurwitz Criterion. Process control systems, 2 step, proportional, integral, and derivative control actions. Generation of control actions. Frequency response. Nyquist and Bode plots of the open loop system, relative stability, the closed loop frequency response. Learning Outcomes On completion of the module you should be able to: Derive the differential equations, transfer functions and block diagram models of physical systems. Apply transfer function and block diagram modelling in the analysis and performance of control systems. Evaluate the dynamic and steady state performance of first and second order systems in response to standard test inputs. Predict, analyse and evaluate control system performance using com- puter simulation. Explain the operation and application of standard controller modes. Apply frequency response methods to predict system response. Evaluate the performance and stability of open and closed loop sys- tems. Communicate and work effectively as part of a team Recognise that good control system design has a direct impact on the environment and society. Assessment End of semester written examination 60% Continuous assessment & Laboratory Work 40% Essential Reading Class Notes Recommended Reading Control engineering an introductory course Wilkie, Johnson, Katebi Palgrave Macmillian (2002) Control engineering Bolton, W. Newes (2003) Control systems engineering Nise N. S. Wiley (2003) Integrated Electrical and Electronic Engineering Frazer and Milne McGraw-Hill (1994) The art of control engineering Dutton, K, Thompson, S. Barraclough B. Addison-Wesley (1997) Control Engineering Bissell, C. C. Stanley Thornes Pub. Ltd (1994) Introduction to control system technology Bateson R. N. Prentice Hall (1998) Mechatronics Bolton W. Longman (1999) Contents Contents i 1 Control Basics 1 1.0.1 Proportional Control . . . . . . . . . . . . . . . . . . 10 1.0.2 Integral Control . . . . . . . . . . . . . . . . . . . . . 17 1.0.3 Derivative Control . . . . . . . . . . . . . . . . . . . 22 1.0.4 PID Control . . . . . . . . . . . . . . . . . . . . . . . 25 2 Models of Physical Systems 28 2.1 The Laplace Transform . . . . . . . . . . . . . . . . . . . . . 28 2.2 Inverse Laplace Transform . . . . . . . . . . . . . . . . . . . 31 2.2.1 Method of Residues . . . . . . . . . . . . . . . . . . . 32 2.3 Mathematical models of physical systems . . . . . . . . . . . 34 3 Block Diagrams and their Reduction 62 3.1 Block diagram reductions . . . . . . . . . . . . . . . . . . . 63 4 The Performance of Control Systems 67 4.1 First Order Open Loop Systems . . . . . . . . . . . . . . . . 67 4.2 First Order Closed Loop Systems . . . . . . . . . . . . . . . 71 4.3 Second Order Systems . . . . . . . . . . . . . . . . . . . . . 85 4.3.1 Velocity (Rate) Feedback . . . . . . . . . . . . . . . . 107 i CONTENTS N.Kent 5 Frequency Response 113 5.1 Frequency Response of a First Order System . . . . . . . . . 114 5.1.1 Nyquist Stability Criterion . . . . . . . . . . . . . . . 127 5.2 The Bode Diagram . . . . . . . . . . . . . . . . . . . . . . . 134 5.3 The Routh Stability Criterion . . . . . . . . . . . . . . . . . 153 Appendices 169 ii Chapter 1 Control Basics For this course we will define control as the use of algorithms and feedback for engineering systems. These systems can include mechanical, fluidic, thermal, electrical and electronic systems. Examples include, feedback loops in electronic amplifiers, setpoint control of chemical processing plants, 'fly by wire' systems on aircrafts, cruise control for cars. Control can be thought of as two (or more) systems linked together such that one systems influences/controls the other. The terms open loop and closed loop are used to describe such system configurations. Open loop systems, as shown in, Fig 1.1 (a) are characterised by a user defined input ( 'r' in Fig 1.1 (a)) and this value is continually input into System 1. The output of System 1 in turn affects the performance of System 2. Closed loop systems or feedback systems, shown in Fig 1.1 (b), are characterised by an interconnected cycle, where by the output of System 2 is 'fed back' to the input of System 1. This feature allows System 1 to adapt based on the output of the overall system thus varying the effect on System 2. In general a controller senses the operating conditions of a system, com- pares this condition against the desired behavior, calculates what, if any, changes are required based on a model of the system's response to exter- 1 CHAPTER 1. CONTROL BASICS N.Kent nal inputs and then actuates the system to implement the desired change. This basic feedback loop of sensing, calculation and actuation is the central concept in control. System 1 System 2 System 1 System 2 r u y u y (a) Open Loop (b) Closed Loop Fig 1.1: Feedback configurations. (a) Shows Open loop feedback where a predefined value 'r' is input into System 1, the output of System 1 is directly inputted into System 2. (b) Shows Closed loop feedback where the output of System 2 is looped around and inputted into System 1. Open Loop Control Open loop control does not compare the actual system output to the desired system output to determine the action the controller should take. Instead, a calibrated setting is used to obtain the desired result. Example Consider a manually operated valve with a dial indicator as shown in Fig 1.2. The dial indicator can tell the user if the valve is fully open or fully closed or set at some location between both situations. To ensure appro- priate operation the valve must be calibrated by measuring the flow rate at different dial positions from open to closed. Fig 1.3 shows a calibration curve obtained for the valve for different pressure drops across the valve. Lets assume that in normal operation with a pressure drop of ∆p2 we require a volume flow rate of q˙2. In this case we can set our valve to the 'Setpoint' as indicated in Fig 1.3 and every- thing will work fine. If for whatever reason the pressure drop in the pipe increases to ∆p3 due perhaps to a blockage in another part of the pipe 2 CHAPTER 1. CONTROL BASICS N.Kent Flow Rate (q˙) Pressure Drop(∆p) or ( dp dx ) DialSetting Fully Open Fully Closed Fig 1.2: Manual Valve network forcing more fluid down the pipe we are interested in or a surge in power causing the pump to run faster then the output flow rate will increase to q˙3. Of course if for whatever reason the pressure drop in the pipe decreases to ∆p1 due perhaps to a slow leak in a pipe then the out- put flow rate will decrease to q˙1. The point is open-loop control cannot correct for unexpected changes in pressure drop. More generally we say open loop systems cannot correct for external disturbances in the system. F lo w R at e (q˙ ) Dial Setting ∆p1 ∆p2 ∆p3 q˙3 q˙2 q˙1 Closed OpenSet Point Fig 1.3: Graph of various flow rates for different pressure drops 3 CHAPTER 1. CONTROL BASICS N.Kent The primary advantage of open loop systems is that it is less expensive than closed loop control, mainly because it is not necessary to measure the actual result. The disadvantage of open loop control is that errors caused by external disturbances are not corrected. Often a human operator must correct slowly changing disturbances by manual adjustment. In this case however, the human operator is providing feedback signal and as such is is closing the loop. Closed Loop Control As we have seen a closed loop system is characterised by feedback. The closed loop system uses the output from the 'Process' and feeds it back to the 'Controller'. The controller then acts based on this revised input and adjusts the manipulating element in order to adjust the process towards a user defined setpoint. Process Measuring Transmitter Control Mode Controlled Variable Disturbance Variables Manipulated Variable Controller error Setpoint Manipulating Element Measured Value of Controlled Variable + - Fig 1.4: Closed loop Process Control Take for example, Fig 1.4. Fig 1.4 shows a block diagram of a process control system. Process control is concerned with maintaining variables such 4 CHAPTER 1. CONTROL BASICS N.Kent as temperature, liquid level in a tank, pH and other physical quantities. To analyse this diagram we first need to outline a few definitions and discuss the meaning of each block: Process Block - is the representation of the physical variable to be controlled. For the purposes of explanation lets take the physical variable to be liquid level in a tank. Measuring Transmitter - is the sensor configuration that deter- mines the value of the controlled variable. The measuring transmitter then converts the value of the controlled variable to a signal suitable for transmission to the controller location, usually a location away from the Process. A measuring transmitter will usually consist of a sensing element and signal converter. In our case, the controlled vari- able is any variable that will change relative to the level of liquid in the tank and can be measured, say for example the height of liquid in the tank. The sensing element might be a variable resistance pressure sensor (P = ρgh) the output signal from the pressure sensor will need to be converted from resistance to a signal the controller can read usually current/voltage and then transmitted to the controller. Controller is the unit that calculates the error in the system and decides how the manipulating element should be changed to eliminate this error. The error detector computes the difference between the de- sired value (how much liquid do we want in the tank) called setpoint and the measured value (how much fluid is in the tank. error = setpoint - measured value of controlled variable 5 CHAPTER 1. CONTROL BASICS N.Kent The control block converts this error into a 'control action' that will try eliminate this error i.e measured value = desired value The four most common control modes are on/off, proportional mode (P), integral mode (I) and derivative mode (D). We will look at each of these modes later in this section. Since we will deal with the control modes later in this section, for our liquid level example, lets say for now that the error detector reads a user defined setpoint value say 50% i.e we want the tank half full of liquid. This setpoint is converted to an appropiate signal current/voltage and compared to the measured value converted from the pressure sensor - the difference in these signals will tell the controller how far the level of liquid that is actually in the tank is from the desired level. Manipulating Element uses the controller output to regulate the manipulated variable and usually consists of two parts, the actuator and the final controlling element. � The actuator converts the the controller output into an action on the final controlling element � The final controlling element then changes the value of the ma- nipulated variable The fill level of the tank can be controlled by means of a valve. A pneumatic control valve may be used to control the flow of liquid into the tank. A schematic of such a valve is shown in Fig 1.5. As the air enters it pushes on a diaphragm opening the valve if no air is applied the valve is closed by means of a spring. If such a device was used the 6 CHAPTER 1. CONTROL BASICS N.Kent controller would 'tell' the actuator in this case a pump, what pres- sure to apply to the valve or final controlling element. The valve then opens by an amount determined by the air pressure and changes the flow rate into the tank. Controlled Variable Spring Diaphragm Input air pressure signal Fig 1.5: Pneumatically Operated Valve Manipulated Variable - is the variable regulated by the final con- trol element to achieve the desired value of the controlled variable. The manipulated variable is capable of affecting change in the control variable. In our example the manipulated variable is the flow rate into that tank - this has the ability to affect the controlled variable i.e the height of liquid in the tank. Disturbances are process input variable but are not controlled by the control system. Disturbance variables are capable of changing the load on a system and are the main reason for using a closed loop control system. Disturbances can be in the form of a slow leak in the tank itself or is often an additional valve on the tank, since it is fair to assume that the liquid stored will be used subsequently in the process there may be an outlet valve on the tank to facilitate the use of liquid. 7 CHAPTER 1. CONTROL BASICS N.Kent This valve is not controlled by the controller but the controller must react if this valve is open because if the valve is open the level of liquid in the tank will drop. The primary advantage of closed loop control is the potential for more accurate control of the process. There are two disadvantages of closed loop control. 1. Closed loop control is more expensive than open loop control 2. The feedback feature of closed loop control can, in certain circum- stances, result in the system becoming unstable. An unstable system produces an oscillation of the controlled variable Simple forms of Feedback Control Two position or On/Off Control Two position or 'On Off' control is the simplest and least expensive mode of feedback control. The controller has only two possible values depending on the sign of the error the controller value changes. Consider the situation shown in Figure 1.6. The controller is configured such that if the thermostat reading is lower than the required temperature the heater power is fully on and if the thermo- stat temperature is higher than the required temperature the temperature is fully off. This is represented in Fig 1.7. The graph to the left of Fig 1.7 shows the measured error over time while the graph on the right shows the controller response to this error. It should be noted that the error can either be positive or negative representing the measured temperature either being too hot or too cold. It should also be noted that regardless of the magnitude or duration of the 8 CHAPTER 1. CONTROL BASICS N.Kent Power Supply Tank Heating Element Thermostat Feedback to On/Off Switch Fig 1.6: Schematic On/Off control system showing tank of liquid to be heated and controlled via a thermostat Time Time -ve +ve E rr or 0 C on tr ol le r O u tp u t Min Max Fig 1.7: Graphs showing On/Off controller response(right) to measured system error (right). Note that the response only depends on the sign of the error. If the error is positive the controller output is maximum, if the error is negative the controller output is minimum. error the controller output can be in only one of two positions - either fully on or fully off. Mathematically this relationship can be represented as: u = umax if e > 0umin if e < 0 9 CHAPTER 1. CONTROL BASICS N.Kent Where u is the controller output and e is the error. Most on off con- trollers incorporate a 'dead-band' around e = 0 where no control action occurs this is to limit the frequency of switching between the ON and OFF states. Generally the two position mode of control is best adapted to large systems with relatively slow process rates so in the example of the heated tank the the overall effect of the heater is relatively slow and fluctuations in temperature are gradual i.e the temperature rises slowly and falls slowly, thus, for such systems on/off control is satisfactory. However, due to the nature of the switching of the output the temper- ature in the tank is never held constant is is constantly fluctuating about the setpoint as shown in Fig 1.8. For many processes this fluctuations may be acceptable however for more sophisticated control operations additional methods of control are required. Time Time C on tr ol le r O u tp u t Process Variable Setpoint SP On 100% Off 0% Fig 1.8: Graphs showing the result of On Off control. The graph on the right shows how the process variable reacts based on the 'on/off' controller input shown on the right. Notice how the process variable never settles at the setpoint - it continually oscillates around the setpoint 1.0.1 Proportional Control One of the biggest problems with On/Off control is that the control action is exactly the same for small deviations from the setpoint (small errors) as 10 CHAPTER 1. CONTROL BASICS N.Kent it is for large deviations from the setpoint (large errors). With this in mind, a form of control known as Proportional Control was developed. At its most basic, proportional control changes the controller action based on the magnitude of the error. Small errors in the system are met with a propor- tionally small output response from the controller while large errors result in a large output response from the controller. Taking our heated cylinder from the On/Off control example previously, we can represent proportional control by removing the switch and replacing it by a current limiting device as shown in Fig 1.9. Power Supply Tank Heating Element Thermostat Feedback to Current ControlCurrent Control Fig 1.9: Schematic control system showing tank of liquid to be heated and controlled via a thermostat. Note the switch from the previous section has been replaced by a current limiting device In this case of the heated cylinder shown in Fig 1.9 if the temperature change is relatively small then the corresponding controller action is rela- tively small. i.e. if the temperature changes by only a small amount then the current is changed by only a small amount. This relationship is shown graphically in Fig 1.10. Notice the difference in controller output between this graph and the one shown in Fig 1.8. 11 CHAPTER 1. CONTROL BASICS N.Kent Time Time -ve +ve E rr or 0 C on tr ol le r O u tp u t Min Max 1 2 3 4 5 6 1 2 3 4 5 6 Fig 1.10: Proportional Control Up to now we have described proportional control in rather vague terms i.e 'small' changes in error lead to 'small' changes in controller output. As engineers we need to build up more robust definitions of relations between the input and output for any given system. The relationship between rela- tive input and relative output for a given system can be defined in terms of whats called proportional band or as the proportional gain KP of the system. Proportional Band is defined as the range over which proportional control is implemented. Proportional Gain or KP is the amount the error is multiplied by in order to achieve the required controller output over the proportional band. Mathematically Proportional Control can be described as follows: u = umax if e ≥ emax KP e if emin < e < emax umin if e ≤ emin Where u is the controller action Kp is the proportional gain and e is the system error. If e ≥ emax or ≤ emin then the control action is as it would 12 CHAPTER 1. CONTROL BASICS N.Kent be in the case of On/Off control i.e umax or umin. If the error lies within the emax and emin band, then the controller output is the error times the proportional gain KP . This band or region is the proportional band. The proportional band is usually expressed as a percentage of the scale range. Example 1 In the case of the heated tank shown in Figure 1.9. Lets say the range of temperatures possible in the tank, assuming the liquid is water, is from room temperature, 22 degrees, to boiling at 100 degrees. If the heater spec- ification is such that it can only heat the water by 10 degrees from fully on to fully off then the proportional band is: P.B = 10 100− 22 × 100 = 12.8% That is a 12.8% change in temperature causes the heater to go from fully hot to fully cold. Example 2: If the full scale range of the level of liquid in a tank is 1 metre (tank empty to tank full) and the fill valve for the tank is set such that a change in level of 0.1 metre will cause the valve to go from fully open to fully closed then the proportional band setting is: P.B = 0.1 1 × 100 = 10% That is a 0.1m change in liquid level causes the valve to go from fully open to fully closed. 13 CHAPTER 1. CONTROL BASICS N.Kent The relationship between KP and P.B is given by P.B = 1 KP × 100 It is usually arranged to have the manipulating variable, e.g the current in the heater or the valve position from the above examples, giving the desired value of the controlled position at the centre of the proportional band. Taking the valve example this means the valve is half open when the liquid is at the desired level so if the tank becomes too full we can close the valve if that tank becomes too empty we can open the valve and allow more liquid in. Exercise: A proportional type pneumatic controller is used to control the liquid level in a tank at a desired level of 7.5 meters. The range of the instrument is 0-10 meters and the proportional band is set at 15%. The controller has an output pressure range of 20-100 kN/m 2 and the output pressure increases with increasing level. If the output pressure is 60 kN/m 2 when the tank level is at the desired value, find: a The liquid levels corresponding to output pressure of 20 kN/m 2 and 100 kN/m 2 respectively. b The value of the output pressure for an error of 0.15 meters below the desired value. 14 CHAPTER 1. CONTROL BASICS N.Kent Solution: Problems with Proportional Control Consider the situation from the previous exercise. The instrument range, proportional band and output pressure can be graphed as shown in Fig 1.11. In the case of the initial setpoint of the system, liquid level 7.5, can be seen in point 'A' in Fig 1.11. 0 1 2 3 4 5 6 7 8 9 10 Liquid level (m) 20 30 40 50 60 70 80 90 100 P-Band 15% Offset A B P re ss u re (2 0- 10 0) k N /m 2 Fig 1.11: Caption 15 CHAPTER 1. CONTROL BASICS N.Kent If however the load of the system is changed in order to counter act this the controller output must also change. In the case of Fig 1.11 we assume an increase in load on the system causing the liquid level to drop to a value of 7.125m. This results in a change in output pressure from 50% to 25% of the pressure range, shown in point 'B' in Fig 1.11. In this case the level stabilises and does not oscillate around a setpoint as in the case of on off control. However the new steady state condition is less than the required setpoint and the difference between original setpoint and new steady state position is called the offset as shown in Fig 1.11. The offset is proportional to the load change and inversely proportional to the gain KP of the system. If the proportional band (p-band)is widened as shown in Fig 1.12 then under the same loading conditions i.e the tank level dropping to 7.125m the percentage change in controller output is 12.5 % as opposed to 25% in the case of a narrower p-band. 0 1 2 3 4 5 6 7 8 9 10 Liquid level (m) 20 30 40 50 60 70 80 90 100 P-Band 30% Offset A B P re ss u re (2 0- 10 0) k N /m 2 Fig 1.12: Caption This may seem desireable however the case of the wider proportional band it can be seen that the controller is less sensitive to changes in tank 16 CHAPTER 1. CONTROL BASICS N.Kent level i.e. the for the same change in tank level the controller response is less for the wide proportional band than it is for the narrower (15%) band. Obviously narrowing the proportional band will have the opposite effect, and increase sensitivity however reducing the proportional band to zero will in effect return us to On/Off control. Since we originally looked at getting away from on/off control due to the oscillation problems encountered setting the proportional band to zero is not desirable, however having a non zero proportional band introduces the offset problem so we are left with the following situation: A wide proportional band (small gain) will provide a less sensitive response, but a greater stability. A narrow proportional band (large gain) will provide a more sensitive response, but there is a practical limit to how narrow the proportional band can be set. Too narrow a proportional band (too much gain) will result in oscil- lation and unstable control. The proportional mode is used when the gain can be made large enough to reduce the proportional offset to an acceptable level for the largest ex- pected load change. If proportional control cannot reduce the proportional offset to an acceptable level then Integral control can also be introduced in combination with proportional control to eliminate the offset error entirely. 1.0.2 Integral Control The integral control mode changes the output of the controller by an amount proportional to the integral of the error signal. The proportion by which the controller is changed based on the error is called the integral gain KI . This relationship is shown in Fig 1.13. 17 CHAPTER 1. CONTROL BASICS N.Kent Time Time -ve +ve E rr or 0 C on tr ol le r O u tp u t Min Max 1 2 3 4 5 6 1 2 3 4 5 6 Fig 1.13: Caption Fig 1.13 shows the error signal as used previously, to describe both on off and proportional control, on the left hand side and the corresponding integral response on the right hand side. The figure can be described by studying each graph over time. Time 0-1 There is no error signal therefore the output of the integral con- troller is zero. Time 1-2 The error is relatively low and is a positive error therefore the output from the integral controller increases over time - i.e as the area under the error curve increases Time 2-3 The error switches to negative and has a greater magnitude than occurred between times 1-2. The resultant controller output decreases at a sharper rate than between times 1-2. At time point 2 the net overall error is negative. Time 3-5 Between times 3-5 the error is large, sustained and positive in sign. This results in a sharp increase in the integral controller response and remains at a constant slope over times 3-5 since he overall area increases between 3-5. 18 CHAPTER 1. CONTROL BASICS N.Kent Time 5-6 The error drops significantly although remains positive - this results in the output integral controller remaining on an upward curve however at a slower rate than between times 3-5 due to the lower error magnitude. Mathematically integral Control can be described as follows: u(t) = KI ∫ t 0 e(τ).dτ Where u is the integral output KI is the integral gain and e is the error signal and τ is called the dummy variable of integration. Up to now you would have seen integral of the form ∫ b a f(x)dx or ∫ 2pi 0 sinθ + cos2θdθ. These functions describe curves i.e f(x) is a curve that can be plotted for any value of x and can then be integrated over a range. In our case of error e we have no such description of the curve just a series of values of error over time. For this reason we introduce τ the dummy variable of integration. It can simply be thought of as a mathematical tool to facilitate integration. For our purposes we can just think of integral control as the sum of the error over time. Ok, now we have an integral controller - so what? If this integral action was added to the control output from the proportional controller the net effect would be to reduce the steady error problem that occurs with the proportional controller. Since the integral controller output depends on the integral of any error over time, a sustained steady state error would result in a large response from the integral controller thus reducing the steady state error and over time eliminating it entirely. This type of combined control is called PI control and is demonstrated graphically in Fig 1.14. The graph to the left of Fig 1.14 is the error signal we are by now familiar with the graph to the right show the PI response 19 CHAPTER 1. CONTROL BASICS N.Kent between time 1 and time 2. The purely proportional response is shown by the dashed line and is labeled 'P' while the purely integral response is shown by the dashed-dot line indicated 'I'. The net response indicated P+I in Fig 1.14shows the overall response of a PI controller to a constant error between time points 1 and 2. Time Time -ve +ve E rr or 0 C on tr ol le r O u tp u t Ti OI OP P+I I P 1 4 5 632 1 2 Fig 1.14: Caption The time Ti as indicated in Fig 1.14 is called the 'Integral action time' and is defined as the the time taken for the output from the integral control (OI) mode to reach the same output as the proportional mode controller output (OP ) for a constant error. The relationship between the integral gain and the integral action time is shown as follows: KI = KP Ti Where KI is the integral gain KP is the proportional gain and Ti is the integral action time. Different controller manufacturers use different types of algorithms in effect the net result is the same - where might might describe changing the integral control action in terms of Integral gain others might describe changing the integral control action in terms of integral action time. Changing the integral action time on a controller has the following effects 20 CHAPTER 1. CONTROL BASICS N.Kent If it is too short (large integral gain), over-reaction and instability will result. If it is too long (low integral gain), the integral action will be very slow to take effect. Exercise: A step input of magnitude 4% is applied to the input of a proportional plus integral controller. At a time t=0 the output undergoes a sudden step change of 10% and after a lapse of 3 minutes the total change is 25%. Calculate a The proportional bandwidth b Integral action time Solution: Mathematically the PI controller can be described as the sum of both the proportional control and the integral control. 21 CHAPTER 1. CONTROL BASICS N.Kent u(t) = KP .e(t) +KI ∫ t 0 e(τ).dτ or u(t) = KP [ e(t) + 1 Ti ∫ t 0 e(τ).dτ ] Ok, so now we have a controller that gives a response based on the error at any given time (the proportional part) it also gives a response based on what the error has been in the past (the integral response). We have got rid of our oscillations due to on/off control and eliminated steady state error due to changes in load. We could satisfy ourselves and say our job is complete and in fact the PI controller is used in many industrial control problems but lets go one step further. What if we could predict what the error was going be in the future, surely that would be of benefit? 1.0.3 Derivative Control Derivative control does exactly that, it predicts what the error signal will be in the future and changes the control action based on that prediction. In essence the process is very simple, derivative control measures the slope of the error signal (or how fast the error is changing) at any given point then predicts what the error will be at a time t + ∆t and decides what control action should be implemented based on this prediction. It can be shown graphically in Fig 1.15. In the case of Fig 1.15, since the controller response is based on the slope of the error signal, we have changed our error signal from before to allow visualisation of the response. Lets break down the derivative controller response as we did in the case of the integral response 22 CHAPTER 1. CONTROL BASICS N.Kent Time Time -ve +ve E rr or 0 C on tr ol le r O u tp u t 1 4 5 632 1 4 5 632 Fig 1.15: Caption Time 0-1 There is no error signal, so there is no slope of the error signal, therefore the output of the integral controller is zero. Time 1-2 The error increases sharply at time point 1 and increases slowly to time point 2. The resultant derivative controller action is an in- crease in controller output between point 1 and point 2. Note we are ignoring the sudden sharp change in slope that occurs at a single time point i.e the initial jump at point 1. Time 2-3 The error switches to negative and remains constant. The re- sultant controller output is zero since the slope of the line between points 2-3 is zero. Note in this case there is a system error however the controller output is zero. Time 3-5 The error increases significantly at time point 3 and continually increases, at a constant rate up to time point 5. The resultant con- troller action is larger than the controller action between point 1-2 due to the fact the slope of the error signal is greater. Time 5-5.5 The error drops significantly although remains positive. How- ever the controller response drops into the negative region due to the fact the slope of the error output is now negative. The magnitude of 23 CHAPTER 1. CONTROL BASICS N.Kent the negative controller response is directly related to the slope of the error response Time 5.5-6 The error response is constant again therefore the resultant controller response is zero. Mathematically derivative control can be described as follows: u(t) = KD de(t) dt Where u(t) is the derivative response, KD is called the derivative gain and de(t) dt is the slope of the error signal at time t. Since derivative control action only occurs with changing error, and will not respond to constant error as shown between point 2-3 in Fig 1.15. Derivative control is never used alone but is used in combination with pro- portional control or proportional and integral control. Fig 1.16 shows the controller response from proportional and derivative (PD) controller. The graph to the left of Fig 1.16 shows the error signal as before and the graph on the right of Fig 1.16 shows the PD controller response over time points 0-2. Time Time -ve +ve E rr or 0 C on tr ol le r O u tp u t 1 4 5 632 21 P+D P D OD OP Td Fig 1.16: Caption 24 CHAPTER 1. CONTROL BASICS N.Kent The purely derivative response labelled D in Fig 1.16 can be seen to be constant between time 1 and time 2, since the slope of the error is constant the derivative response is constant. However, the proportional response can be seen to increase between time 1 and time 2. This is due to to the fact the error itself is increasing between time 1 and time 2. Since proportional controller output is dependent only on the error at any given time it also increases between point 1 and point 2. The overall response from a PD controller can be seen, labelled P+D, in Fig 1.16. In a similar manner to the integral controller the derivative controller can be described in terms of derivative gain KD or Derivative Action Time (Td in Fig 1.16). Derivative action time is defined as the time taken for the output from proportional control mode OP to equal the the output from the derivative control mode OD. The relationship between KD and Td is as follows KD = KP .Td The proportional plus derivative mode is especially useful when the pro- cess under goes sudden load changes i.e. the error jumps rapidly. The predictive nature of the derivative aspect ensures the controller response acts rapidly. 1.0.4 PID Control A combination of proportional integral and derivative (PID) controllers are used in the majority of industrial control processes. A PID controller is also called a three term or three mode controller. A graph summarising the process is shown in Fig 1.17. For any given error signal the proportional control takes into account the error at that time and eliminates oscillations, 25 CHAPTER 1. CONTROL BASICS N.Kent the integral control aspect considers the error in the past and eliminates steady state error while the derivative control component examines how fast the error is changing into the future and acts to reduce the error before is occurs. Time Past Present Future E rr or Integral Proportional Derivative Fig 1.17: Caption Mathematically the PID controller is described as u(t) = KP .e(t) +KI ∫ t 0 e(τ).dτ +KD de(t) dt or u(t) = KP [ e(t) + 1 Ti ∫ t 0 e(τ).dτ + Td de(t) dt ] PID controller can, and are used in a range if industrial process con- trol systems from keeping liquid at a constant level in a tank, to mixing chemicals, to power consumption. In all cases the gains/action times of the controller must be set to give appropriate control response for a given sys- tem error. The process of setting these controllers to appropriate gains is called PID tuning. Obviously having a knowledge of how a system behaves to external loads and disturbances would of benefit when choosing these gains. Although many systems may on the surface seem very different, the 26 CHAPTER 1. CONTROL BASICS N.Kent underlying mathematics behind each system can be remarkably similar. In the next section we will look at how we can model real life systems and investigate system response based on these models. 27 Chapter 2 Models of Physical Systems 2.1 The Laplace Transform There has been lots written on the 'power' of the Laplace transform. At this stage all you need to really know is that the Laplace transform is a method of changing differential equations into algebraic equations that are easier to solve. For example the differential equations describing how a system behaves with time are changed into algebraic equations not involving time. System behaviour in the 'time domain' is transformed into the 's-domain' in which algebraic manipulations can be carried out. On completion of the manipulation we can then perform an 'inverse Laplace transform' to convert from the 's-domain' to the 'time domain' so that the behaviour over time can be observed. The Laplace transform can be written in the form: F (s) = L{f(t)} = ∫ ∞ 0 e−stf(t).dt Where: F (s) is our new domain it is customary to use a capital letter for a 28 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent Laplace transform. In the case of Laplace transforms the new domain is called the 'Frequency' domain and the operator s = σ+ jω is called the complex frequency and units are (1/time). L{} is the Laplace transform notation f(t) is our original function plotted in the time domain 'signified by the letter t. ∫ ∞ 0 e−stf(t).dt is the transform itself. We multiply each term of f(t) by e−st and integrate wrt time from 0→∞ Fortunately there are tables available where the transform for many different time based functions are available. However lets look at a few ex- amples. Step Input f(t) = A F (s) = L{A} = ∫ ∞ 0 e−stA.dt F (s) = A [ − 1 s .e−st ]∞ 0 = A s Exponential f(t) = e−at F (s) = L{e−at} = ∫ ∞ 0 e−st.e−at.dt 29 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent F (s) = ∫ ∞ 0 e−(s+a)t.dt F (s) = [ − 1 s+ a .e−(s+a)t ]∞ 0 F (s) = [0]− [ − 1 s+ a ] F (s) = 1 s+ a Ramp input f(t) = t F (s) = L{t} = ∫ ∞ 0 t.e−st.dt F (s) = 1 s2 t f(t) 0 σ jω F (s) = L{t} = 1 s2 Double ’x’ Double Pole Time Domain s-Domain Parabolic or Acceleration Signal f(t) = t2 F (s) = 2 s3 30 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent t f(t) 0 σ jω F (s) = L{t2} = 2 s3 Triple ’x’ Multiple pole of order 3 Time Domain s-Domain Sinusoid f(t) = sinωt F (s) = ω s2 + ω2 t f(t) 0 σ jω F (s) = L{sinωt} = ω s2 + ω2 Time Domain s-Domain Poles A full table of required Laplace transforms will be available on the day of the exam 2.2 Inverse Laplace Transform On converting our system transfer function (the relationship between output and input) from the time domain to the s domain and solving the required algebraic equations we must now convert from the s domain to the time domain. This can be done using the inverse Laplace transform. 31 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent The inverse Laplace transform of F (s) is defined as f(t) = 1 2pij ∫ α+j∞ α−j∞ F (s).estds Fortunately in most cases the order (value of the highest power) of the numerator is less than that of the denominator. If this is the case then the methos of partial fractions or method of residues can be used to find f(t) if F (s) is known. 2.2.1 Method of Residues Steps in implementing the Residue theroem 1. Write down F (s) 2. Factorise the denominator 3. Take each pole in turn and find the residue for that pole. To find the residue for a given pole multiply F (s) by that pole and by est and set s = pole value. The result is the reside for that pole. 4. Repeat this process for all poles. The overall time based response f(t) = ∑ Residues Example 1 F (s) = 1 s+ a . What is the corresponding f(t)? 32 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent f(t) = [ 1 (s+ a)︸ ︷︷ ︸ F (s) × (s+ a)︸ ︷︷ ︸ Pole × est︸︷︷︸ est ] s→−a f(t) = [ 1 ��� �(s+ a) ×����(s+ a)× est ] s→−a Setting s = −a f(t) = e−at Example 2 F (s) = 1 s(s+ 1) . What is the corresponding f(t)? f(t) = [ 1 s(s+ 1) .s.est ] s→0 + [ 1 s(s+ 1) .(s+ 1).est ] s→−1 f(t) = 1 + (−e−t) f(t) = 1− e−t) Exercise F (s) = 1 (s+ 2)(s+ 3)(s+ 4) . What is the corresponding f(t)? Answer: f(t) = 1 2 e−2t − e−3t + 1 2 e−4t Multiple Poles 33 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent In the previous examples s is not raised to any power greater than one. If it was there would be whats calle a multiple pole and the factors would be in the form sn or (s + a)n These are considered multiple poles of order n. To find the residue of a multiple pole of order n we use: R = 1 n− 1! dn−1 dsn−1 [F (s).est.(s+ a)n]s→−a Example 1 If F (s) = 1 s2 find f(t) In this case n = 2 f(t) = d ds [ 1 s2 .est.s2 ] s→0 f(t) = [t.est]s→0 f(t) = t.1 f(t) = t 2.3 Mathematical models of physical systems A critical problem in engineering design and analysis is the determination of a mathematical model. To be useful the model must not be too com- plicated. Therefore simplifying assumptions are often made. The system we are concerned with are dynamic in nature and their behaviour will be described by differential equations. 34 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent Although they will often be non linear systems it is customary to lin- earise them about an operating point to obtain linear differential equations. Therefore it should be borne in mind that such linear models are useful for preliminary design and analysis only over a limited range. Nonetheless these types of models are widely used in engineering utiliz- ing, Laplace transforms frequency response and steady state models, (all of which will cover in due course). The components of all control system are diverse in nature and may include electrical, electronic, mechanical, thermal and fluidic devices. The differential equations for these devices are obtained using the basic laws of physics eg Ohm's Law, Lenz Law, Newton's Laws, Bernoulli's Eqn, Boyles Law, Kirchoffs Laws etc. Laplace transformation of these differential equations yields an algebraic equations in terms of complex frequency or what we have been calling s. These algebraic equations can be easily manipulated to obtain the trans- fer function of the system defined as the ratio of the output Laplace trans- form and the input Laplace transform./ This transfer function represents a linear model of the system and is usually shown in the form of a block diagram as shown below. X(s) Y (s) G(s) Fig 2.1: Block diagram representation of a Transfer Function Y (s) X(s) = G(s) Y (s) = X(s).G(s) 35 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent Recall For a Capacitor i(t) = C. dv dt Taking the Laplace transform of both sides I(s) = C.sV (s) From Ohms Law we have V = I.Z ∴ V (s) = I(s).Z(s) V (s) I(s) = Z(s) From the Laplace transform of a capacitor V (s) I(s) = 1 sC Therefore Z(s) = 1 sC i.e. in terms of Laplace the reactance of a Capacitor is 1 sC Similarly for an inductor v = L di dt 36 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent Taking Laplace V (s) = L.sI(s) From Ohms Law V (s) I(s) = Z(s) Therefore for an inductor Z(s) = sL 1 jωC 1 sC For sin waves In general Capacitors Inductors jωL sL Example 1 Find the transfer function of the following system. Solution: vin(t) = i(t).R + vo(t) 37 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent R Cvin(t) vout(t) Fig 2.2: First order system - RC circuit i(t) = C. dvo(t) dt vin(t) = RC. dvo(t) dt + vo(t) This is a first order linear differential equation. Taking the Laplace transform the functions of time become functions of s so we have Vin(s) = RCsVo(s) + Vo(s) Vin(s) = Vo(s)(1 + sRC) Vo(s) Vin(s) = 1 1 + sRC It is standard practice to let RC = τ . This value of τ is called the 'time constant'of the system and can be considered a measure of how quickly the system responds. We will look at this concept a little later but for now the transfer function Vo(s) Vin(s) can be written as Vo(s) Vin(s) = 1 1 + sτ This is the general form of a transfer function for a first order system 38 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent and is represented in block diagram format as shown below. Vin(s) Vout(s)1 1 + sτ Fig 2.3: First order transfer function A common test signal in control engineering is the step input. A step input can be thought of as turning a switch on, or more accurately increas- ing the input signal from one level to another over a short period of time such that in signal looks like a'step'. f(t) = A where A is the magnitude of the input signal i.e. A Volts if the input signal is a voltage. In Laplace the step input of magnitude A is written as F (s) = A s For the RC circuit we have just analysed lets apply a DC voltage of V Volts at time t = 0 and calculate the output response. vin(t) = V Vin(s) = V s The transfer function of the circuit is Vo(s) Vin(s) = 1 1 + sτ Rearranging we have 39 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent Vo(s) = Vin(s)× 1 1 + sτ Vo(s) = V s × 1 1 + sτ Important!!. Up to now at this point we have used the residue method to find the inverse Laplace transform and find the time based re- sponse of the system. We are still going to perform this step but we must modify the transfer function such that the coefficient of s is 1. Consider the transfer function 1 1 + sτ Divide above and below by τ We now have Vo(s) Vin(s) = 1 τ s+ 1 τ We now perform the residue method on this version of the transfer func- tion so we have. vo(t) = V s . 1 τ s+ 1 τ .s.ests→0 + V s . 1 τ s+ 1 τ .(s+ 1 τ ).est s→− 1 τ Solving we have vo(t) = V − V e− tτ 40 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent vo(t) = V (1− e− tτ ) Exercise: What is the measure of vo(t) when t = τ? vo(t) = V (1− e− tτ ) vo(t) = V (1− e− ττ ) when t = τ vo(t) = V (1− e−1) vo(t) = V (1− 0.367) vo(t) = 0.632V Now consider the above equation. The equation is telling us that after a time t = τ seconds the output of the circuit will be 0.632 or 63.2% of the input signal V . Note that the voltage V is the final value of the output (as t → ∞) the output goes to V . Also remember that in this case τ = RC where R and C are physical components. So by changing the values of R and C we can determine how quickly the curcuit reaches 63.2% of its final value and as a result ives an indication of how quickly the system will re- spond. The time constant τ of a system can be defined as the length of time 41 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent it takes the system to reach 63.2% of its final value for a step input into the system. Another way to look at the time constant is to say the time constant is the time it would take the system to reach its final value if it were to maintain its initial slope. Consider vo(t) = V − V e− tτ dvo dt = V τ e− t τ︸ ︷︷ ︸ Slope At time t = 0 dvo dt = V τ To understand this a little more look at the response of the circuit as defined by vo(t) = V (1− e− tτ ) t V τ 0.632V Time to reach V had the output continued at initial slope vo Fig 2.4: Time constant for first order system 42 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent Exercise: How long does it take for the output to reach its final value? In theory the answer is∞ however after only four time constants we have vo(t) = V (1− e− tτ ) vo(t) = V (1− e− 4ττ ) vo(t) = V (1− e−4) vo(t) = 0.98V i.e the output will reach 98% of its final value after only 4 time constants. Example 2 - Fluid Model Air and Reciever Initially, po is at atmospheric pressure. At time t = 0, pin is applied. Po Pin Restriction e.g. Valve Fig 2.5: Pressure vessel 43 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent dpo dt ∝ [pin(t)− po(t)] dpo dt = K[pin(t)− po(t)] dpo dt +Kpo(t) = Kpin(t) This is a first order linear differential equation Taking the Laplace of both sides we have sPo(s) +KPo(s) = KPin(s) Po(s)[s+K] = KPin(s) Po(s) Pin(s) = K s+K Pin(s) Pout(s)K s+K Fig 2.6: Block diagram for first order system Example - The Integrator If the input to a system is constant and the the output of a system ramps this is known as an integrator. For the system shown below we consider q to be the input to the system and x to be the output. To simplify the system we neglect friction, fluid compressibility, leakage past the piston and piston inertia. 44 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent x Flowrate q˙ Fig 2.7: Hydraulic Cylinder With these assumptions in mind we see the velocity of the piston is di- rectly proportional to the flow rate of the hydraulic fluid q. The differential equation relating the the flow rate q and the piston displacement is: dx dt ∝ q dx dt = Kq(t) dx = Kq(t).dt Integrating both sides ∫ dx = ∫ Kq(t).dt x = K ∫ q(t).dt We can solve using the Laplace transform in the following manner dx dt = Kq(t) 45 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent Taking the Laplace and assuming zero initial conditions sX(s) = KQ(s) X(s) Q(s) = K s K s Q(s) X(s) Fig 2.8: Hydraulic Cylinder Comparing the both the time based and Laplace solutions we can see that multiplication by 1 s in the Laplace domain is the same as integrating in the time domain. Further we can say that differentiating in the time domain is the same as multiplying by s in the Laplace domain. The output for the system for a step input is as follows t t Constant Flowrate q˙ x Run to end position Fig 2.9: Cylinder output for constant input Exercise: 46 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent Derive the time based output for the system for a constant (step) input to the system of magnitude q. Mechanical Systems Spring k x f(t) = k × x(t) Damper B x f(t) = B dx dt Mass x f(t) = m d2x dt2m f(t) To derive the transfer function of a mechanical system draw a free body diagram of the mass. Remember the object of these exercises is to derive the transfer function i.e. to relate the input and output. 47 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent Example: Find the transfer function of the following system: x(t) m k Spring Constant Viscous Friction f(t) Fig 2.10: Spring mass damper systems Solution: The free body diagram of the mass looks as follows: m kx(t) f(t) B dx dt We are looking for X(s) F (s) ∑ F = m d2x dt2 f(t) = −Bdx dt − k.x(t) = md 2x dt2 f(t) = m d2x dt2 +B dx dt + k.x(t) This is a second order linear differential equation 48 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent Assuming zero conditions and taking the Laplace transform of both sides we get ms2X(s) +BsX(s) + kX(s) = F (s) X(s)[ms2 +Bs+ k] = F (s) X(s) F (s) = 1 ms2 +Bs+ k Or can be also written as X(s) F (s) = 1 m s2 + B m s+ k m 1 m s2 + b m s+ k m X(s)F (s) Exercise: Find the transfer function Xo(s) Xi(s) for the following system xo(t) m k xi(t) B mB dxo dt k(xi(t)− xo(t)) Answer: k m s2 + b m s+ k m Xo(s)Xi(s) 49 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent Solution: ∑ F = m d2x dt2 k[xi(t)− xo(t)]−Bdxo dt = m d2xo dt2 kxi(t)− kxo(t)−Bdxo dt = m d2xo dt2 kxi(t) = m d2xo dt2 +B dxo dt + kxo(t) This is a second order differential equation. Taking the Laplace trans- form and assuming zero initial conditions kXi(s) = ms 2Xo(s) +BsXo(s) + kXo(s) kXi(s) = Xo(s)[ms 2 +Bs+ k] Xo(s) Xi(s) = k ms2 +Bs+ k Or as the answer gave Xo(s) Xi(s) = k m s2 + B m s+ k m The system is described as a second order differential equation. This results in s2 terms in the Laplace transform of the system. Example Determine the transfer function X(s) F (s) for the following system 50 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent f(t)m1m2 k2 k1 x(t)y(t) D3 D1D2 Solution: First determine the free body diagrams for each mass. In this case we are jumping straight to the Laplace transform on the diagram itself. If you are looking at these notes for the first time now - this was explained in class! m1m2 k2Y (s) D3sY (s) k1(X(s)− Y (s)) D2s(X(s)− Y (s)) F (s) k1(X(s)− Y (s)) D2s(X(s)− Y (s)) D1sX(s) For m1 F (s)− k1(X(s)− Y (s))−D2s(X(s)− Y (s))−D1sX(s) = m1s2X(s) For m2 k1(X(s)− Y (s)) +D2s(X(s)− Y (s))−D3sY (s)− k2Y (s) = m2s2Y (s) From equations from m2 k1X(s)−k1Y (s)+D2sX(s)−D2sY (s)−D3sY (s)−k2Y (s) = m2s2Y (s) 51 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent k1X(s)+D2sX(s) = m2s 2Y (s)+D2sY (s)+D3sY (s)+k2Y (s)+k1Y (s) X(s)(k1 +D2s) = Y (s)(m2s 2 +D2s+D3s+ k2 + k1) Y (s) = X(s)(k1 +D2s) (m2s2 +D2s+D3s+ k2 + k1) From equation from m1 F (s) + Y (s)(D2s+K1) = X(s)(m1s 2 +D1s+D2s+ k1) Now since we are looking for X(s) F (s) as given in the question we must elim- inate Y (s). Since Y (s) = X(s)(k1 +D2s) (m2s2 +D2s+D3s+ k2 + k1) we can substitute this value for Y (s) into F (s) + Y (s)(D2s+K1) = X(s)(m1s 2 +D1s+D2s+ k1) After some manipulation we can determine X(s) F (s) = ms2 +D1s+D2s+ k1 + k2 (m1s2 +D1s+D2s+ k1)(m2s2 +D2s+D3s+ k2 + k1)− (k1 +D2s)2 This then is a fourth order system since when we multiply the denomi- nator out further we get a m1m2s 4 term. Liquid systems 52 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent Consider the tank as as shown with an input qi and and output qo discharging water under its own head. h(m) Area = A(m2) qo(t) Restriction qi(t) Assuming laminar flow Inflow - Outflow = Rate of accumulation. The flow through pipes is opposed by a property of pipes known as as hydraulic resistance. It is defined as R = h(t) qo(t) It follows therefore that qo(t) = h(t) R We require a transfer function relating Qi(s) and H(s) So: qi(t)− qo(t) = A.dh dt 53 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent qi(t)− h(t) R = A. dh dt qi(t) = A. dh dt + h(t) R Taking the Laplace transform of both sides and assuming zero initial conditions Qi(s) = AsH(s) + H(s) R Qi(s) = H(s) [ As+ 1 R ] Qi(s) = H(s) [1 + ARs R ] H(s) Qi(s) = R 1 + ARs H(s) Qi(s) = R 1 + τs where τ = AR If we require the transfer function Qo(s) Qi(s) then qi(t)− qo(t) = A.dh dt R = h(t) qo(t) = dh dqo Rdqo = dh R dqo dt = dh dt So now we have 54 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent qi(t)− qo(t) = ARdqo dt Taking Laplace and assuming zero initial conditions Qi(s)−Qo(s) = ARsQo(s) Qi(s) = ARsQo(s) +Qo(s) Qi(s) = Qo(s)[ARs+ 1] Qo(s) Qi(s) = 1 ARs+ 1 Interaction and Loading Consider the system as shown below h1 A1 q2(t)Restriction q1(t) h2 A2 q3(t) Restriction We can model the entire system as two block diagrams as shown 55 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent 1 A1R1s+ 1 1 A2R2s+ 1 q1 q2 q3 We note however that the lower tank has no effect on what happens in the upper tank. Instead of the word 'effect' Control engineers use the word 'loading'. Technically the way we would say this is that the two systems are non interacting and that the lower tank does not load the upper tank. Consider now the system below h1 A1 Restriction q1(t) A2 qo(t) h2 In this case the 2nd tank does have an effect on the 1st tank. We say in this case the second tank loads the first tank and the two systems are interacting. If we require the transfer function Q3(s) Q1(s) then the system must be considered as one unit. This type of system is called a 'Lumped System' Modelling electromechanical systems Consider the armature controlled DC servo motor as shown below. The field current is constant and the voltage v(t) is applied to the arma- ture which has a resistance Ra and negligible inductance. The effect of the application of the input voltage v(t) will be to cause the armature to rotate. The transfer function relating the voltage applied V (s) to the position of the shaft θ(s) is found as follows. 56 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent v(t) vb(t) J D θ(t) ia Constant Field Ra Armature First lets consider the mechanical aspects of the motor Applying a voltage to the motor will cause a torque to be produced at the shaft. Torque J D ω ∑ torques = J dω dt Tm(t)−Dω(t) = J dω dt Tm(t) = J dω dt +Dω(t) Taking the Laplace and assuming zero initial conditions we have Tm(s) = Jsω(s) +Dω(s) Tm(s) = ω(s)[Js+D] 57 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent ω(s) Tm(s) = 1 Js+D This is a first order system. However we are interested in position θ(s) not angular velocity as given by ω(s) Remember in terms of shaft position ω = dθ dt Taking the Laplace of both sides we have sθ(s) = ω(s) θ(s) = 1 s ω(s) In terms of our mechanical system we can now write θ(s) Tm(s) = 1 Js2 +Ds This result is now a second order system. Tm ωm(s) θ(s)1 s 1 Js+D Tm θ(s)1 Js2 +Ds Now considering the electrical aspects of the motor 58 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent The Back e.m.f is proportional to the motor speed. Loading the motor causes the speed to drop thus reducing vb a reduction in vb causes the more current to pass through the armature thus increasing the torque. ia = vt − vb Ra Back e.m.f vb = Kbω(t) Tm(t) = Kmia Km or Kt is the torque constant of the motor and can be found on a specification sheet for a motor. In terms of an equation relating the applied voltage to the output speed we have. ia = vt − vb Ra = Tm(t) Km Substituting vb = Kbω(t) vt −Kbω(t) Ra = Tm(t) Km Tm(t) = [vt −Kbω(t)]Km Ra Tm(t) = J dω dt +Dω(t) [vt −Kbω(t)]Km Ra = J dω dt +Dω(t) 59 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent vtKm Ra − KbKmω(t) Ra = J dω dt +Dω(t) vtKm JRa − KbKmω(t) JRa = dω dt + D J ω(t) vtKm JRa = dω dt + D J ω(t) + KbKmω(t) JRa Km JRa v(t) = dω dt + ω(t) [D J + KbKm JRa ] Let α = [D J + KbKm JRa ] and K = Km JRa dω dt + αω(t) = Kv(t) This is a first order differential equation Taking the Laplace transform of both sides and assuming zero initial conditions we have sω(s) + αω(s) = KV (s) ω(s)[s+ α] = KV (s) ω(s) V (s) = K [s+ α] As before we require position as opposed to angular velocity. The result of which is shown below Note: to achieve position from velocity we need to integrate. In Laplace domain we have already seen that multiplying by 1 s is the same as inte- 60 CHAPTER 2. MODELS OF PHYSICAL SYSTEMS N.Kent V (s) ωm(s) θ(s)1 s K s+ α θ(s)V (s) K s2 + αs grating in the time domain. This can be seen again in the block diagram above. In the next section we will look at the power of block diagrams for visualising systems. 61 Chapter 3 Block Diagrams and their Reduction In the analysis of control systems it is very convenient to obtain the block diagrams of the different components and their connections. If the various components are non interacting it is possible to obtain the overall transfer function of the system through a suitable combination of the transfer func- tion of the component blocks utilising some basic rules of block diagram transformations to reduce the original diagrams. Lets look at a block diagram representation of the DC motor from the previous Chapter + − V (s) Kb 1 Ra 1 s 1 Js+D Km θ(s) ia Tm ω(s) Kbω(s) V (s)−Kbω(s) Now lets look at some reduction techniques for different configurations of blocks. 62 CHAPTER 3. BLOCK DIAGRAMS AND THEIR REDUCTION N.Kent 3.1 Block diagram reductions a Combining blocks in cascade (series) G1 G2 x1 x2 x3 x1 x3 G1.G2 b Combining blocks in parallel G1 G2 X Y X Y G1 +G2 + + 63 CHAPTER 3. BLOCK DIAGRAMS AND THEIR REDUCTION N.Kent c Moving a summing point behind a block G X2 Y + + X1 G X2 Y + + X1 G d Moving a pickoff point behind a block G YX X G YX X1 G e Elimination of a feedback loop 64 CHAPTER 3. BLOCK DIAGRAMS AND THEIR REDUCTION N.Kent G Y X H + − G 1 +GH Y X Example: Process Control. G1 YX H + − G2 G3 Controller Actuator Process Measurement Exercises: Find the transfer function C(s) R(s) of the following systems G1 C(s)R(s) H3 + − G2 G3 + − + − G4 H2 H1 65 CHAPTER 3. BLOCK DIAGRAMS AND THEIR REDUCTION N.Kent G1 C(s)R(s) + − G2 G3 + − G4 H2 H1 + − G1 C(s)R(s) + − G2 G3 + − G4 H4 H2 + − H3 − H1 66 Chapter 4 The Performance of Control Systems In general we do not know the inputs to a system design. Hence, for the purposes of analysis it is customary to consider the the effects of the ap- plication of a certain number of standard test inputs to the system hich subject the system to sudden changes. The most common ones are: A step input A ramp input A sinusoid (we will look at this later) 4.1 First Order Open Loop Systems Lets remind ourselves what the response of a first order, open loop (no feed- back) system is to (a) a step input and (b) a ramp input. Consider the first order system as shown below. We already have derived the transfer function 67 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent R Cvin(t) vout(t) Vo(s) Vin(s) = 1 τ s+ 1 τ Therefore we can write Vo(s) = Vin(s). 1 τ s+ 1 τ For a step input For a step input of magnitude V volts and using the method of residues we can find vo(t) vo(t) = V (1− e− tτ ) V t vo(t) For a ramp input 68 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent L[vint] = 1 s2 Vo(s) = Vin(s). 1 τ s+ 1 τ Vo(s) = 1 s2 . 1 τ s+ 1 τ In terms of poles we have a multiple pole of order 2 at s = 0 and a simple pole at s = − 1 τ . The residue of a multiple pole is given by R = 1 (n− 1)! . dn−1 dsn−1 [ F (s).(s+ α)2.est ] s→−α In this case Vo(s) = F (s) α = 0 n = 2 So we have R1 = 1 (2− 1)! . d ds [ 1 s2 . 1 τ s+ 1 τ .s2.est ] s→0 R1 = d ds [ 1 τ s+ 1 τ .est ] s→0 R1 = 1 τ d ds [ est s+ 1 τ ] s→0 R1 = 1 τ [(s+ 1 τ ).t.est − est.1 (s+ 1 τ )2 ] s→0 69 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent R1 = 1 τ [ 1 τ .t.1− 1 1 τ 2 ] R1 = (t− τ) For the residue at the simple pole R2 = [ 1 s2 . 1 τ s+ 1 τ .(s+ 1 τ ).est ] s→− 1 τ R2 = [ 1 (− 1 τ )2 . 1 τ . e− t τ ] R2 = τ 2.1 τ .e− t τ R2 = τe− tτ Now using the two residues vo(t) = R1 +R2 vo(t) = (t− τ)− τe− tτ t v(t) vin(t) vo(t) 70 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent 4.2 First Order Closed Loop Systems Now lets look at the closed loop response to (a) a step input and (b) a ramp input. To keep in line with the conventions for a first order system we will re write the transfer function as 1 1 + sτ The block diagram for the system in closed loop form with a propor- tional controller gain of K looks like K 1 1 + sτ + − R(s) C(s) Controller Closed Loop i.e Feedback is applied The response to an input is found as before. However, our closed loop transfer function (cltf) will be different than the open loop transfer func- tion because we need to take the feedback into account. We use the block diagram reduction rules to find our transfer function C(s) R(s) Note in this case H(s) = 1 this is often the case and is called 'unity feedback' C(s) R(s) = K 1 + sτ 1 + K 1 + sτ = K 1 + sτ +K C(s) R(s) = K τ s+ 1+K τ 71 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent C(s) = R(s). K τ s+ 1+K τ For a step input C(s) = 1 s . K τ s+ 1+K τ c(t) = 1 s . K τ s+ 1+K τ .s.ests→0 + 1 s . K τ s+ 1+K τ .(s+ 1+K τ ).est s→− 1+K τ c(t) = K 1 +K − K 1 +K e− 1+K τ .t c(t) = K 1 +K [1− e− 1+Kτ .t] The final value of c(t) is when t→∞ c(t) = K 1 +K [1− 0] = K 1 +K The closed loop response can be shown on the graph below 1 t K 1 +K Steady State Error First Order Closed Loop Response Note: in contrast to the open loop response the closed loop response introduces a 'steady state error' into the system. 72 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent Steady State Error = Steady Input - Steady Output In the case shown Errorss = 1− K 1 +K Errorss = 1 1 +K We can observe two (related) things from this equation. The first is that as we increase K the steady state error becomes smaller. The second is that no matter how large we increase K by there will be some steady state error. We mentioned previously that using proportional control introduced an error that could not be eliminated by proportional control alone. This is that error. It is also worth noting that K is adjustable by the user and is called the gain of the system thinking back to the proportional control K is the factor we multiply the error by to get our system to reach its steady state in the desired time or with an appropriate response. Closed Loop Time Constant In our closed loop transfer function (cltf) c(t) = K 1 +K − K 1 +K e− 1+K τ .t we note that the term e− 1+K τ .t is of the form e − t τcl where τcl is the closed loop time constant. 73 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent Therefore τcl = τ K + 1 Where τ is the open loop time constant and K is the gain as described above. Note that increasing K reduces the the closed loop time constant and thus increases the system response. Therefore since increasing K results in a reduction of the steady state error and also reduces the closed loop time constant we say that a high gain is beneficial for for both transient and steady state performance. More practical diagram + − Desired Speed Actual Speed Motor and Load ω ω t K 1 1 + sτ + − R(s) C(s) ω Power Amplifier Tachometer Motor and Load 74 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent Relationship between Error and Input Often we need to find what the steady state error is in a closed loop sys- tem due to a given input. On way to find this error is to set t to infinity thus finding the value of the output at the max possible time i.e. infinity. We have applied this method in the last section. Now lets look at another method. Consider the relatively simple block diagram as shown below G + − R(s) C(s)εs ε(s) = R(s)− C(s) C(s) = ε(s).G(s) ε(s) = R(s)− ε(s).G(s) ε(s) + ε(s).G(s) = R(s) ε(s)[1 +G(s)] = R(s) ε(s) R(s) = 1 1 +G(s) ε(s) = 1 1 +G(s) .R(s) Applying this technique to the previous problem we have 75 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent K 1 1 + sτ + − R(s) C(s)ε(s) Note: ε(s) is the error in Laplace domain while εss is the steady state error. In general we require the steady state error εss in the time domain. From before we know this error to be 1 1 +K for a step input into the system ε(s) R(s) = 1 1 +G(s) ε(s) R(s) = 1 1 + K 1 + sτ = 1 + sτ 1 + sτ +K ε(s) = R(s). 1 + sτ 1 + sτ +K For a step input R(s) = 1 s ε(s) = 1 s . 1 + sτ 1 + sτ +K Now lets introduce whats called the Final Value Theroem. This theo- rem simply states that the final (time based) value (or final f(t))of a Laplace based function F (s) is given by f(t)︸︷︷︸ t→∞ = F (s).s︸ ︷︷ ︸ s→0 Since we need to find the final value of 1 s . 1 + sτ 1 + sτ +K in order to find the steady state error we can apply the final value theorem. This gives us 76 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent [εss(t)]t→∞ = [1 s . 1 + sτ 1 + sτ +K .s ] s→0 [εss(t)]t→∞ = 1 1 +K This solution is as we had before. While this example is relatively simple the final value theorem can be applied to situations where the solution may not be so obvious. Removal of steady state error If the steady state error must be removed we can add integral action to the proportional control. Remember earlier we said that integral action simply 'adds up' the steady state error over a defined time and adjusts the controller appropriately to eliminate the error. In Laplace integration is performed my multiplying by 1 s It is common to be able to change the integral gain (or integral action time) just as the proportional gain can be changed for a given system. Our integrator block diagram therefore looks as follows Ki s ε(s) Where Ki is the integral gain. The modified block diagram therefore looks as follows Which can be reduced using the block diagram reduction rules to 77 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent K 1 1 + sτ + − R(s) C(s)ε(s) Ki s ε(s) + + K + Ki s 1 1 + sτ + − R(s) C(s)ε(s) Now to find the error for this system ε(s) R(s) = 1 1 +G(s) ε(s) R(s) = 1 1 + ( K + Ki s )( 1 1 + sτ ) ε(s) R(s) = s s+ ( sK +Ki )( 1 1 + sτ ) ε(s) R(s) = s(1 + sτ) s(1 + sτ) + (sK +Ki) ε(s) = R(s). s(1 + sτ) s(1 + sτ) + (sK +Ki) For a step input ε(s) = 1 s . s(1 + sτ) s(1 + sτ) + (sK +Ki) Applying the final value theorem [εss(t)]t→∞ = [1 s . s(1 + sτ) s(1 + sτ) + (sK +Ki) .s ] s→0 78 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent [εss(t)]t→∞ = 0 i.e. There is no steady state error. Note: The system with proportional control was first order. The system with integral control is second order. Second order system have different dynamic behaviour than first order and we will look at that later. Ramp Input Now lets look at the response of a closed loop first order system to a ramp input. K 1 1 + sτ + − R(s) C(s) Controller r(t) = t R(s) = 1 s2 We have already determined the closed loop transfer function for a first order system and have written it as follows C(s) R(s) = K τ s+ 1+K τ In terms of output we can write C(s) = R(s). K τ s+ 1+K τ 79 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent In this case R(s) = 1 s2 so we can write C(s) = 1 s2 . K τ s+ 1+K τ We require c(t) Using the residue method R1 = d ds [ 1 s2 . K τ s+ 1+K τ .s2.est ] s→0 R1 = K τ . d ds [ est s+ 1+K τ ] s→0 R1 = K τ [(s+ 1+K τ ).t.est − est.1 (s+ 1+K τ )2 ] s→0 R1 = K τ [(1+K τ ).t− 1 (1+K τ )2 ] R1 = K.τ 2 (1 +K)2τ [1 +K τ .t− 1 ] R1 = K (1 +K)2 .τ [1 +K τ .t− 1 ] R1 = K (1 +K)2 .τ. 1 +K τ .t− K (1 +K)2 .τ R1 = K 1 +K .t− Kτ (1 +K)2 In the case of Residue 2 R2 = [ 1 s2 . K τ s+ 1+K τ .(s+ 1+K τ ).est ] s→− 1+K τ 80 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent R2 = [ 1 (−1+K τ )2 . K τ .e− 1+K τ t ] R2 = [ τ 2 (1 +K)2 . K τ .e− 1+K τ t ] R2 = [ K.τ (1 +K)2 .e− 1+K τ t ] c(t) = R1 +R2 c(t) = K 1 +K .t− Kτ (1 +K)2 + K.τ (1 +K)2 .e− 1+K τ t t v(t) vin(t) vo(t) As t increases the third term will go to zero Since the error ε(t) = r(t)− c(t) we have ε(t) = t− K 1 +K .t− Kτ (1 +K)2 The equation above shows that the error will increases with time and approach infinity as t approaches infinity. 81 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent Effect of Disturbance Signals Many control systems are subject to unwanted disturbance signals. For example, gust of wind affecting radar, sudden load on a motor shaft, spike in current affecting temperature control systems. A block diagram for a disturbance is shown below. In this case the disturbance is at the output. K G(s) + − R(s) C(s)+ + N(s) H(s) In order to fins the output C(s) superposition is used to find the contri- bution to inputs R(s) and N(s). The theorem of superposition states that that each input can be taken alone and the value of output can be evaluated due to this input. The total output is is the sum of the outputs for each input acting alone. Applying superposition to the system shown we have Considering N(s) acting alone + − C(s)N(s) K G(s) H(s) C ′(S) N(s) = 1 1 +KG(s)H(s) C ′(S) = N(s). 1 1 +KG(s)H(s) 82 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent Now considering R(s) acting alone K G(s) + − R(s) C(s) H(s) C ′′(S) R(s) = KG(s) 1 +KG(s)H(s) C ′′(S) = R(s). KG(s) 1 +KG(s)H(s) Now the total C(s) C(s) = N(s). 1 1 +KG(s)H(s) +R(s). KG(s) 1 +KG(s)H(s) As can be seen from the above equation the effect of the noise is reduced by the ratio 1 1 +KG(s)H(s) over the range of frequencies of interest. Therefore by increasing the open loop gain we can alleviate the effect of disturbances occurring at the output level. Example: Speed Control System Open loop motor controller K 1 1 + sτ + − ωd ωin ωout 83 CHAPTER 4. THE PERFORMANCE OF CONTROL SYSTEMS N.Kent If a disturbance occurs then teh controller does not react and the new output speed is ωo − ωd Closed loop motor controller K 1 1 + sτ + − R(s) ωo(s) + − ωd(s) In terms of superposition and looking at the output from the noise only
Compartilhar