Lecture 1: Open and closed loop systems, Laplace Transforms, impulse responses, pole locations Venkata Sonti∗ Department of Mechanical Engineering Indian Institute of Science Bangalore, India, 560012 This draft: March 12, 2008 Keywords : 1 Open and closed loop systems An open loop dynamical system put together for an application, while it responds to forces and initial conditions may not satisfy conditions required in that application because of several reasons: a full model is never available, there are uncertainties in the system, the response is sensitive to certain parameters and their variations, the design requirement for response may interfere with the functionality of the system, etc. General requirements on a system include: The system has to be stable, adequately damped, capable of rejecting disturbance and quick to respond, less sensitive to parametric variations. While open loop systems may fail to satisfy the above requirements, feedback systems provide a very good solution. For e.g., an open loop robot hand, modelled as a double pendulum, even with motors at every joint and elbow may not perform according to the specs because: 1) The model is inadequate (rigid body model vs flexible body model). There may be joint uncertainties. 2) Model may be adequate but system values EI, ρ are uncertain. 3) The system values are known with reasonable accuracies but day to day variations exist. When you assemble, the system behaves one way, when your friend assembles, it behaves another way. 4) Due to the above reasons system may actually be unstable. 5) Open loop systems cannot handle disturbances. 6) And the system may be uncontrollable after all the design and assembly due to the above reasons. This necessitates a method of including control system design during the system design stage, iteratively. The above issues are largely corrected by using closed loop systems. Closed loop systems can be made stable even when the open loop system is unstable, artificial electronic damping can be built into the system, closed loop systems are relatively less sensitive to disturbances, and also can be made insensitive to parametric variations. In order to achieve the requirements above, in addition to the physical system (which for us are usually mechanical systems) one needs electronic systems which can effectively modify (improve) the response. We will see soon, in the next lecture that the system poles determine the system response. This additional system effectively modifies the total pole locations of the combined physical and the electronic system. In order to achieve this, an adequate continuous corrective action is built into the system. Important response information is continuously measured and fed back for comparison ∗ 1 with the target reference value. This in turn generates a force related to the difference between the two values. This force is applied to the electronic and physical system continuously. The system thus is now called a closed loop or a feed-back control system. The open loop and the closed loop system are shown in figures 1 and 2, respectively. Figure 1 shows an open loop system. An apriori computed force is applied to the system which is expected to respond based on the specs. If the system fails to respond correctly (because your estimates were off) or an unanticipated disturbance acted on it, then there is no way to correct the course. On the other hand, figure 2 shows a feed-back system. The response C(s) is measured using the sensor H(s) and the resultant is compared with the input R(s). The resultant difference (error) is acted upon by the controller which works on the actuator. The actuator then applies the required force on the system. The closed loop thus contains the sensor dynamics, the controller dynamics, the actuator dynamics in addition to the system we are interested in. It should be noted that all measurements have to be done or converted if necessary into one unit so that comparison with the target signal is possible. Usually, measurements result in currents and voltages. Hence, this conversion from a mechanical input to an electrical output are also included in the sensor, controller and actuator dynamics. In designing the full control system the dynamics of all the components need to be accounted for. If the controller is very slow compared to the system, it will not send the right input at the right time. In this class, we will assume perfect sensor and actuator dynamics, i.e., what goes into the sensor (it is commonly denoted by H(s)) and the actuator comes out unmodified instantaneously. So we replace them with unity transfer functions. r(t) actuator force SYSTEM c(t) Figure 1: An open loop system. r(t) R(s) controller actuator system c(t) C(s) sensor Figure 2: Closed loop or feed-back control system. The above feedback system can be shown as in figure 3 where the forward path controlleractuator-system are shown as G(s) and the return sensor path is shown as H(s). It can be shown that in this feedback configuration C(s) G(s) G(s) = = , when H(s) = 1 R(s) 1 + G(s)H(s) 1 + G(s)) We will in our class assume H(s) = 1. These are called unity feedback systems. They imply that the sensors have perfect dynamics: they are very quick and have very high natural frequencies. 2 r(t) R(s) e(t) + - G(s) E(s) b(t) c(t) C(s) H(s) B(s) Figure 3: Closed loop feedback system in typical terminology. 2 Typical control problems and step response Typical control system problems include • Canon, telescope, radar dish pointing • Speed maintainance of a vehicle • Automated stoppage of a metro-rail • Robot arm movement from one position to another • Ship changes course The above list is far from exhaustive. However, it is intended to show that many control applications involve the tracking of a given command signal. Thus, how quickly and smoothly the system tracks without too much deviations and oscillations is a big issue. Such information is contained in the ”step response” of a control system. A step input is given to the physical system and the response carries information about the speed of response and damping inherent in the system. In looking at the step response of systems we shall make use of Laplace Transforms. In the next section we take a brief look at the same. 3 Laplace Transform (LT) The Laplace transform of a function x(t) is given by X(s) = Z ∞ x(t)e−st dt (1) −∞ We deal with causal systems, (systems which respond after the input is given) and hence the lower limit is 0 for us. LT can be used to solve ordinary differential equations (ODEs). 3.1 Example 1 For e.g., given an ODE of the form ẍ(t) + 4x(t) = δ(t). taking the LT results in s2 X(s) − sẋ(0) − x(0) + 4X(s) = 1 3 For the time being, taking the initial conditions to be zero gives X(s) = s2 1 +4 (2) the inverse LT of which gives the time domain response x(t) = 1 sin(2t). 2 (3) The s values where X(s) goes to infinity are called the poles of X(s). In this case they are given by +2i and −2i. Keeping this is in view, let us look at the plot of x(t) given below in figure 4. The response is seen to be a pure undecaying oscillation. Time domain response of example 1 1 0.8 0.6 x(t)=0.5*sin(2t) 0.4 0.2 0 −0.2 −0.4 −0.6 −0.8 −1 0 2 4 6 8 10 12 14 16 time t in secs Figure 4: Time domain response for example 1. 3.2 Example 2 For e.g., given an ODE of the form ẍ(t) + 3ẋ(t) + 4x(t) = δ(t). Applying the LT operator (for zero initial conditions) gives X(s) = s2 1 1 , = 2 + 3s + 4 s + 2ξωn s + ωn 2 (4) where ξ = 0.75 and ωn = 2. The inverse LT (using tables) of which gives the time domain response x(t) = q 1 1 −ξωn t p e sin(ω 1 − ξ 2 t). n ωn 1 − ξ 2 (5) The s values where X(s) goes to infinity are called the poles of X(s). In this case they are given by −1.5 + i ∗ 1.3229 and −1.5 − i ∗ 1.3229. Keeping this is in view, let us look at the plot of x(t) given below in figure 5. The response is a decaying oscillation. 4 Time domain response of example 2 0.3 0.25 0.2 x(t) 0.15 0.1 0.05 0 −0.05 0 1 2 3 4 5 6 7 8 9 10 time t in secs Figure 5: Time domain response for example 2. 3.3 Example 3 For e.g., given an ODE of the form ẍ(t) − 4x(t) = δ(t). taking the LT results in s2 X(s) − sẋ(0) − x(0) − 4X(s) = 1 For the time being, taking the initial conditions to be zero gives X(s) = s2 1 1 1 = − , −4 4(s − 2) 4(s + 2) (6) the inverse LT of which gives the time domain response x(t) = Ae2t + Be−2t . (7) where A = − 41 and B = 41 . The poles for this case are at s = ±2. Let us plot this response in Matlab and see how it looks. It is an exponentially increasing response going off to infinity. 3.4 Example 4 For e.g., given an ODE of the form ẍ(t) − 3ẋ(t) + 4x(t) = δ(t). Applying the LT operator (for zero initial conditions) gives X(s) = s2 1 , − 3s + 4 (8) the inverse LT of which gives the time domain response x(t) = q 1 1 ξωn t p 1 − ξ 2 t). e sin(ω n ωn 1 − ξ 2 5 (9) Time domain response for example 3 14 12 8 2t x(t)=Ae +Be −2t 10 6 4 2 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 time t in secs Figure 6: Time domain response for example 3. Time domain response for example 4 500 400 300 x(t) 200 100 0 −100 −200 −300 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 time t in secs Figure 7: Time domain response for example 4. 6 The s values where X(s) goes to infinity are called the poles of X(s). In this case they are given by 1.5 + i ∗ 1.3229 and 1.5 − i ∗ 1.3229. Keeping this is in view, let us look at the plot of x(t) given below in figure 7. The response is an exponentially increasing oscillating response going to infinity. From the impulse responses of the systems given above, one can say that poles on the imaginary axis cause the system to oscillate and complex poles with negative real parts give the system a decaying oscillation while complex poles with positive real parts cause the response to go to infinity (the system is unstable). The nature of response is similar even when the input is a step. This picture can be generalized as in figure 8. Imag Axis Imag Axis Imag Axis Imag Axis Imag Axis Imag Axis Pole zero map 1 2 0 X −2 2 −6 0 −2 2 0.5 X −4 −2 0 Real Axis 2 4 6 1 2 3 4 −4 −2 0 Real X Axis 2 4 0 0 2 6 0.5 1 1.5 2 1 0 X −2 2 −6 −4 −2 0 Real Axis X 2 4 0 0 2 6 0 −6 −4 −2 0 Real Axis X 2 4 6 0 0 20 0 −6 −4 −2 6 8 10 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 0 X −2 2 4 1 X −2 2 2 0 Real Axis 2 4 6 −20 0 10000 X 0 5000 −2 −6 −4 −2 0 Real Axis 2 4 6 0 0 Figure 8: Pole locations and step response of second order systems. 4 5 0.5 X −6 0 0 1 Second order system characteristics Oscillatory systems with single, multi degrees of freedom can be represented in the form mẍ(t) + cẋ(t) + kx(t) = F (t). 7 The equation above can be a single scalar or a system of equations. For a scalar system if we make the following substitution √ c = 2 kmξ and ωn 2 = k m then we get ẍ(t) + 2ξωn ẋ(t) + ωn 2 x(t) = F (t) . m The LT of the above equation results in X(s) = 1 F (s) , m s2 + 2ξωn s + ωn 2 where F (s) can be a delta or a step function or any function. The transfer function is said to be of second order since it has s2 in the denominator as the highest power of s. These second order systems display characteristics typical of vibrating systems so much so that even higher order systems can be understood by breaking them up into a set of second order systems (a polynomial with real coefficients has either real roots or conjugate complex roots). Thus, we try to understand the typical features of second order systems. We choose a typical second order transfer function of the form ωn 2 C(s) = 2 , R(s) s + 2ξωn s + ωn 2 (10) the denominator of which is called the characteristic polynomial and which when set to zero gives the roots of the characteristic polynomial as shown below ∆ = s2 + 2ξωn s + ωn 2 = 0 (11) The roots are the poles of the second order transfer function above. q s1 , s2 = −ξωn ± jωn 1 − ξ 2 = −α ± jωd . (12) When this second order system is subjected to a step input it becomes C(s) = C(s) = C(s) = ωn 2 s(s2 + 2ξωn s + ωn 2 ) s + 2ξωn 1 − 2 s s + 2ξωn s + ωn 2 1 ξωn s + ξωn − − 2 2 s (s + ξωn ) + ωd (s + ξωn )2 + ωd 2 (13) We have inverse LT of s + ξωn (s + ξωn )2 + ωd 2 ωd (s + ξωn )2 + ωd 2 = e−ξωn t cos(ωd t) = e−ξωn t sin(ωd t) And so −ξωn t c(t) = 1 − e (14) ! ξ cos(ωd t) + p sin(ωd t) 1 − ξ2 8 or The error e−ξωn t c(t) = 1 − p sin ωd t + tan−1 2 1−ξ p 1 − ξ2 ξ ! e(t) = r(t) − c(t) t≥0 (15) (16) ! ξ sin(ωd t) e(t) = e−ξωn t cos(ωd t) + p 1 − ξ2 goes to zero at t = ∞. 5 Second order step response indices • Maximum overshoot: The maximum overshoot is defined as the largest deviation of the output over the step input during the transient state. The amount of maximum overshoot is also used as a measure of relative stability of the system. The maximum overshoot is often represented as a percentage of the final value of the response, i.e., %max. overshoot = maximumovershoot x100% f inalvalue • Delay Time: The delay time td is defined as the time required for the step response to reach 50% of its final value. • Rise Time: The rise time tr is defined as the time required for the step response to rise from 10% to 90% of its final value (overdamped). For under damped, we take the time to reach 100 % of the value the first time. • Settling Time: The settling time ts is defined as the time required for the step response to decrease and stay withina specified percentage of its final value. Usually 5% Rise time tr By setting C(tr ) = 1 we get −ξωn tr 1=1−e ! ξ cos(ωd tr ) + p sin(ωd tr ) 1 − ξ2 cos(ωd tr ) + p ξ sin(ωd tr ) = 0 1 − ξ2 tan(ωd tr ) = − p 1 − ξ2 ωd =− ξ σ 1 ωd tr = tan−1 ωd −σ θ as in figure 9. Peak time tp 9 = π−θ ωd Differentiating c(t) w.r.t. t and setting it to zero we get dc ωn e−ξωn tp = 0 |t = sin(ωd tp ) p 2 dt p 1−ξ sin(ωd tp ) = 0 or ωd tp = 0, π, 2π, 3π, ... The peak time corresponds to the first peak and so tp = π ωd which corresponds to one-half cycle of the frequency of damped oscillations. 10 Maximum overshoot Mp The maximum overshoot occurs at the peak time tp . Substituting for tp in the equation for c(t) we get Mp = c(tp ) − 1 ! ξ d cos(π) + p sin(π) = −e 1 − ξ2 √ 2 = e−(σ/ωd )π = e−πξ/ 1−ξ −ξωn ωπ The maximum percent overshoot is Mp x 100 % Settling time ts From the expression for c(t) if we ignore the sine term then the response lies within the envelope given by q 1 ± e−ξωn t / 1 − ξ 2 For small values of ξ, the denominator can be ignored and and so if we set a 1% criterion for settling time, we get 4.6 ts = σ for 2% we get 4 ts = σ and for 5% we get 3 ts = σ . Given tr , Mp , and ts , we should be able to find the pole positions. From the response equation above it can be seen that ξ is representative of damping and ωn represents the frequency of oscillation (the natural quickness of the system). If we plot the root positions as in figure 9, then cos(θ) = ξ so that the smaller is θ the larger is ξ the damping. Or the more toward the real axis the root, the more the damping is. Also, the absolute distance of the root from the origin of the omplex plane is ωn the frequency of oscillation. The farther the root from the origin, the faster the system is. jω Root s-plane X θ ωn α=ζ ω n ω= ω n 0 1 − ζ2 σ X Root Figure 9: Position of the complex root. Natural frequency and damping. 11 References [1] Benjamin Kuo, 1982, Automatic Control Systems, Prentice Hall of India. 12