Lecture 12 AO Control Theory
Total Page:16
File Type:pdf, Size:1020Kb
Lecture 12 AO Control Theory Claire Max with many thanks to Don Gavel and Don Wiberg UC Santa Cruz February 18, 2016 Page 1 What are control systems? • Control is the process of making a system variable adhere to a particular value, called the reference value. • A system designed to follow a changing reference is called tracking control or servo. Page 2 Outline of topics • What is control? - The concept of closed loop feedback control • A basic tool: the Laplace transform - Using the Laplace transform to characterize the time and frequency domain behavior of a system - Manipulating Transfer functions to analyze systems • How to predict performance of the controller Page 3 Adaptive Optics Control Aberrated wavefront phase surfaces! Telescope Aperture! Wavefront sensor! Corrected Wavefront! Computer! Imaging Wavefront corrector dector! (Deformable Mirror)! 3! Page 4 Differences between open-loop and closed-loop control systems • Open-loop: control system OPEN uses no knowledge of the output • Closed-loop: the control action is dependent on the output in some way • “Feedback” is what CLOSED distinguishes open from closed loop • What other examples can you think of? Page 5 More about open-loop systems • Need to be carefully calibrated ahead of time: OPEN • Example: for a deformable mirror, need to know exactly what shape the mirror will have if the n actuators are each driven with a voltage Vn • Question: how might you go about this calibration? Page 6 Some Characteristics of Closed- Loop Feedback Control • Increased accuracy (gets to the desired final position more accurately because small errors will get corrected on subsequent measurement cycles) • Less sensitivity to nonlinearities (e.g. hysteresis in the deformable mirror) because the system is always making small corrections to get to the right place • Reduced sensitivity to noise in the input signal • BUT: can be unstable under some circumstances (e.g. if gain is too high) Page 7 Historical control systems: float valve Credit: Franklin, Powell, Emami-Naeini • As liquid level falls, so does float, allowing more liquid to flow into tank • As liquid level rises, flow is reduced and, if needed, cut off entirely • Sensor and actuator are both “contained” in the combination of the float and supply tube Page 8 Block Diagrams: Show Cause and Effect Credit: DiStefano et al. 1990 • Pictorial representation of cause and effect • Interior of block shows how the input and output are related. • Example b: output is the time derivative of the input Page 9 “Summing” Block Diagrams are circles X Credit: DiStefano et al. 1990 • Block becomes a circle or “summing point” • Plus and minus signs indicate addition or subtraction (note that “sum” can include subtraction) • Arrows show inputs and outputs as before • Sometimes there is a cross in the circle Page 10 A home thermostat from a control theory point of view Credit: Franklin, Powell, Emami-Naeini Page 11 Block diagram for an automobile cruise control Credit: Franklin, Powell, Emami-Naeini Page 12 Example 1 • Draw a block diagram for the equation Page 13 Example 1 • Draw a block diagram for the equation Credit: DiStefano et al. 1990 Page 14 Example 2 • Draw a block diagram for how your eyes and brain help regulate the direction in which you are walking Page 15 Example 2 • Draw a block diagram for how your eyes and brain help regulate the direction in which you are walking Credit: DiStefano et al. 1990 Page 16 Summary so far • Distinction between open loop and closed loop – Advantages and disadvantages of each • Block diagrams for control systems – Inputs, outputs, operations – Closed loop vs. open loop block diagrams Page 17 The Laplace Transform Pair" ∞ H (s)= ∫ h(t)e−stdt 0 1 i∞ h(t)= ∫ H (s)estds 2πi −i∞ •! Example: decaying exponential" Transform:" h(t)= e−σt ∞ 0" t" −(s+σ )t H (s)= ∫ e dt Im(s)" 0 ∞ −1 = e−(s+σ )t s +σ x! 0 -σ Re(s)" 1 = ; Re(s)> −σ 18 s +σ The Laplace Transform Pair" Example (continued), decaying exponential" Inverse Transform:" i∞ 1 1 i st s = −σ + ρe θ h(t)= e ds Im(s)" 2πi ∫ s +σ 1 −i∞ = ρ −1e−iθ π s +σ 1 1 t iθ ρ = ρ − e−σ iρ dθ ds = iρe dθ ∫ θ 2πi −π x! -σ Re(s)" 1 π = e−σt ∫ i dθ 2πi −π = e−σt The above integration makes use of the Cauchy Principal Value Theorem:" 1 If F(s) is analytic then" F(s) ds = 2πiF(a) ∫ s − a 19 Laplace Transform Pairs" h(t)" H(s)" (like lim e-st )! sè0 1 1" unit step" s 0" t" 1 −σt e s +σ 1 ⎛ 1 1 ⎞ −σt ⎜ + ⎟ e cos(ωt) 2 ⎝ s +σ − iω s +σ + iω ⎠ −σt 1 ⎛ 1 1 ⎞ e sin(ωt) ⎜ − ⎟ 2i ⎝ s +σ − iω s +σ + iω ⎠ e−sT delayed step" 0" T" t" s 1− e−sT unit pulse" 20 0" T" t" s Laplace Transform Properties (1)" L{ αh(t) + βg(t) } = αH(s) + βG(s) Linearity" L{ h(t + T) } = esT H(s) Time-shift" (T ≤ 0) L δ t =1 Dirac delta function transform" { ( ) } (“sifting” property)" ⎧ t ⎫ L⎨ ∫ h(t ′) g(t − t ′) dt ′⎬ = H(s) G(s) Convolution" ⎩ 0 ⎭ ⎧ t ⎫ L⎨ ∫ h(t ′) δ(t − t ′) dt ′⎬ = H(s) Impulse response" ⎩ 0 ⎭ t ∫ h(t − t ′) eiωt ′ dt ′ = H(iω) eiωt Frequency response" 0 21 Laplace Transform Properties (2)" System Block Diagrams" x(t)! y(t)! X(s)! Y(s)! h(t)! H(s)! convolution of input x(t) •! Product of input spectrum X(s) with with impulse response h(t)! frequency response H(s)! •! H(s) in this role is called the transfer function! ⎧ t ⎫ L⎨ ∫ h(t ′) x(t − t ′) dt ′⎬ = H(s)X(s) = Y(s) ⎩ 0 ⎭ Conservation of Power or Energy" ∞ i∞ 2 1 2 ∫[h(t)] dt = ∫ H (s) ds 0 2πi −i∞ ∞ “Parseval’s Theorem”" 1 2 = H iω dω ∫ ( ) 22 2π −∞ Closed loop control (simple example, H(s)=1)" X(s)" W(s)" residual" disturbance" +" E(s)" -" Y(s)" correction" gC(s)" Where g ≡ gain" Our goal will be to suppress X(s) (residual) by high-gain feedback so that Y(s)~W(s)" E(s) = W (s) − gC(s)E(s) solving for E(s)," W (s) Note: for consistency “around the E(s) = loop,” the units of the gain g must be 1+ gC(s) the inverse of the units of C(s)." 23 Back Up: Control Loop Arithmetic + W(s) input A(s) output Y(s) - B(s) A(s)W (s) Y (s) = A(s)W (s) − A(s) B(s)Y (s) Y (s) = 1+ A s B s ( ) ( ) Unstable if any roots of 1+A(s)B(s) = 0 are in right-half of the s-plane: exponential growth exp(st) Page 24 Stable and unstable behavior Stable Stable Unstable Unstable Page 25 Block Diagram for Closed Loop Control !(t) disturbance! +! residual! e(t) -! "DM(t)! gC(f)! H(f) where !g = loop gain! correction! H(f) = Camera Exposure x DM Response x Computer Delay! C(f) = Controller Transfer Function! Our goal will be to find a C(f) that suppress e(t) (residual) so that !DM tracks !" 1! e!(f!!)!=! !( f )! 1!+!gC!(!f!)!H!(!f! )! We can design a filter, C(f), into the feedback loop to:! a) Stabilize the feedback (i.e. keep it from oscillating)! b) Optimize performance! 9! Page 26 The integrator, one choice for C(s)" A system whose impulse response is the unit step" ⎧0 t < 0 1 c(t)= ⎨ ↔ C(s)= 0" t" ⎩1 t ≥ 0 s acts as an integrator to the input signal:" x(t)! y(t)! c(t)! t t y(t)= ∫ c(t − t′)x(t′)dt′ = ∫ x(t′)dt′ 0 0 c(t-t’)! x(t’)! t’! 0! t! 27 that is, C(s) integrates the past history of inputs, x(t)" The Integrator, continued" In Laplace terminology:" X(s)! Y(s)! X (s) Y (s)= C(s)! s An integrator has high gain at low frequencies, low gain at high frequencies." Write the input/output transfer function for an integrator in closed loop:" The closed loop transfer function with the integrator in the feedback loop is:" W(s)" +" X(s)" W(s)" X(s)" -" H (s)" Y(s)" ≡ CL gC(s)" 1 W (s) ⎛ s ⎞ C(s) = ⇒ X (s) = = W (s) = HCL (s)W (s) s 1+ g s ⎝⎜ s + g⎠⎟ closed loop transfer function" 28 output (e.g. residual wavefront to science camera)" input disturbance (e.g. atmospheric wavefront)" The integrator in closed loop (1) s HCL (s) = s + g HCL(s), viewed as a sinusoidal response filter: DC response = 0 HCL (s) → 0 as s → 0 (“Type-0” behavior) High-pass behavior HCL (s) →1 as s → ∞ and the “break” frequency (transiFon from low freq to high freq behavior) is around s ~ g 29 The integrator in closed loop (2) The break frequency is oKen called the “half-power” frequency 22 HHCLCL (isγ)) 1 1/2 s HCL (s) = s + g g s (log-log scale) • Note that the gain, g, is the bandwidth of the controller: • Frequencies below g are rejected, frequencies above g are passed. • By convenon, g is known as the gain-bandwidth product. 30 Disturbance Rejection Curve for Feedback Control With Compensation e( f )! 1! =! !( f )! 1!+!gC!(!f!)!H!(!f! )! C(f) = Integrator = e-sT / (1 – e-sT) Increasing Gain (g) Starting to Much resonate! better rejection! 19! Page 31 Assume that residual wavefront error is introduced by only two sources 1. Failure to completely cancel atmospheric phase distortion 2.