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! Wavefront corrector (Deformable Mirror)! Imaging dector! 3! Page 4
Differences between open-loop and closed-loop control systems Open-loop: control system uses no knowledge of the output Closed-loop: the control action is dependent on the output in some way Feedback is what distinguishes open from closed loop What other examples can you think of? OPEN CLOSED Page 5
More about open-loop systems Need to be carefully calibrated ahead of time: 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 V n OPEN 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) 0 e st dt h 1 2πi i ( t) = H( s) i e st ds Example: decaying exponential" Transform:" h ( t) = e σt H ( s+ σ ) ( s) = e 0 t dt 0" t" Im(s)" = = 1 e s + σ 1 ; s + σ ( s+ σ ) t 0 Re ( s) > σ x! -σ 18 Re(s)"
19 The Laplace Transform Pair" Inverse Transform:" ( ) t t t i i st e d i i e d i e i ds s e i t h σ π π σ π π σ θ π θ ρ ρ π σ π = = = + = 2 1 2 1 1 2 1 1 Re(s)" Im(s)" x! -σ θ ρ ρ σ ρ σ θ θ θ d e i ds e s e s i i i = = + + = 1 1 ρ θ The above integration makes use of the Cauchy Principal Value Theorem:" If F(s) is analytic then" ( ) ( ) a if ds a s s F π 2 1 = Example (continued), decaying exponential"
Laplace Transform Pairs" unit step" 1" h(t)" 0" t" e σt ( ) e σt cos ωt e σt sin( ωt) (like lim sè0 e -st )! 1 2 1 2i H(s)" 1 s 1 s + σ 1 1 + s + σ iω s + σ + iω 1 1 s + σ iω s + σ + iω delayed step" e 0" T" t" s unit pulse" 1 0" T" t" s e st 20
Laplace Transform Properties (1)" { ( ) + βg( t) } = αh ( s) + βg( s) L αh t L { h( t + T) } = e st H ( s) L{ δ( t) } =1 t L h ( t )g( t t )d t = H s 0 t L h t 0 ( ) δ t t ( ) G( s) ( )d t = H s ( ) Linearity" Time-shift" Dirac delta function transform" ( sifting property)" Convolution" ( T 0) Impulse response" t 0 h( t t ) e iω t d t = H( iω ) e iωt Frequency response" 21
Laplace Transform Properties (2)" System Block Diagrams" x(t)! h(t)! y(t)! X(s)! H(s)! Y(s)! convolution of input x(t) with impulse response h(t)! t L h ( t )x ( t t )d t = H ( s )X s 0 Product of input spectrum X(s) with frequency response H(s)! H(s) in this role is called the transfer function! ( ) = Y ( s) Conservation of Power or Energy" [h( t)] 2 dt = 1 2πi 0 = 1 2π i i H ( s) 2 ds H ( iω ) 2 dω Parseval s Theorem " 22
Closed loop control (simple example, H(s)=1)" W(s)" disturbance" +" X(s)" residual" 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 ) 1+ gc( s) E s Note: for consistency around the loop, the units of the gain g must be the inverse of the units of C(s)." 23
Back Up: Control Loop Arithmetic W(s) input + - A(s) B(s) output Y(s) Y ( s) = A(s)W ( s) A( s) B( s)y ( s) Y ( s) = A ( s )W ( 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)! correction! gc(f)! H(f) where! g= loop gain! 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!" e!f! (!)! =!!( f )! 1! +! gc! (! f! )! H! (! f! )! We can design a filter, C(f), into the feedback loop to:! 1! 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" c 0 1 t < ( t) = C( s) acts as an integrator to the input signal:" t 0 0 = 1 s x(t)! c(t)! y(t)! y t ( t) c( t t ) x( t ) dt = x( t ) dt = 0 t 0 c(t-t )! x(t )! 0! t! t! that is, C(s) integrates the past history of inputs, x(t)" 27
The Integrator, continued" In Laplace terminology:" X(s)! C(s)! Y(s)! ( s) Y = X ( 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)" +" -" Y(s)" gc(s)" X(s)" W(s)" H CL (s)" X(s)" C( s) = 1 s ( ) = W ( s) X s output (e.g. residual wavefront to science camera)" 1+ g s = s s + g W s ( ) = H CL s closed loop transfer function" ( )W s ( ) 28 input disturbance (e.g. atmospheric wavefront)"
The integrator in closed loop (1) H CL ( s) = s s + g H CL (s), viewed as a sinusoidal response filter: H CL ( s) 0 as s 0 DC response = 0 ( Type-0 behavior) H CL ( s) 1 as s High-pass behavior and the break frequency (transifon from low freq to high freq behavior) is around ~ 29
The integrator in closed loop (2) The break frequency is oken called the half-power frequency ( iγ ) 2 H CL (s) 2 H CL 1 1/2 (log-log scale) H CL s ( ) = s s + g Note that the gain,, is the bandwidth of the controller: Frequencies below are rejected, frequencies above are passed. By convenfon, is known as the gain-bandwidth product. 30
Disturbance Rejection Curve for Feedback Control With Compensation e( f )!!( f )! 1! =! 1! +! gc! (! f! )! H! (! f! )! C(f) = Integrator = e -st / (1 e -st ) Much better rejection! Increasing Gain (g) Starting to resonate! 19! Page 31
Assume that residual wavefront error is introduced by only two sources 1. Failure to completely cancel atmospheric phase distortion 2. Measurement noise in the wavefront sensor Optimize the controller for best overall performance by varying design parameters such as gain and sample rate Page 32
Atmospheric turbulence! Temporal power spectrum of atmospheric phase: S! (f) = 0.077 (v/r 0 ) 5/3 f -8/ 3 Increasing wind"! Power spectrum of residual phase S e (f) = 1/(1 + g C(f) H(f)) 2 S! (f) Uncontrolled" Closed Loop Controlled" 22" Page 33
Noise! Measurement noise enters in at a different point in the loop than atmospheric disturbance!(t) disturbance" +" residual" e(t) -"! DM (t)" correction" gc(f)" H(f)! Closed loop transfer function for noise: n(t) noise" e"f" (")" gc( f )H( f )! =" n( f ) 1" +" gc" (" f" )" H" (" f" )" Noise feeds through" Noise averaged out" 23" Page 34
Residual from atmosphere + noise! Conditions! RMS uncorrected turbulence: 5400 nm! RMS measurement noise: 126 nm! gain = 0.4 Noise Dominates" Residual Turbulence Dominates"! Total Closed Loop Residual = 118 nm RMS 24" Page 35
Increased Measurement Noise! Conditions! RMS uncorrected turbulence: 5400 nm! RMS measurement noise: 397 nm! gain = 0.4 Noise Dominates" Residual Turbulence Dominates"! Total Closed Loop Residual = 290 nm RMS 25" Page 36
Reducing the gain in the higher noise case improves the residual! Conditions! RMS uncorrected turbulence: 5400 nm! RMS measurement noise: 397 nm! gain = 0.2 Noise Dominates" Residual Turbulence Dominates"! Total Closed Loop Residual = 186 nm RMS 26" Page 37
What we have learned Pros and cons of feedback control systems The use of the Laplace transform to help characterize closed loop behavior How to predict the performance of the adaptive optics under various conditions of atmospheric seeing and measurement signal-to-noise A bit about loop stability, compensators, and other good stuff Page 38
!"#"$"%&"' (")*+,")-"'&$./"-)#""-/+&0)&1%2$13)1%34)#1$)56)'4'2"7'8 91$)+%).%2$1-:&2.1%)21)&1%2$13)1#);"%"$+3)'4'2"7'<)'17");11-) 2"=2')+$">!"#$"#!%%&'()*#+"#,"#!-./0/*#.)"#2"#+.34.&%*#5$%)6-%3 +786/9#:/8(4);*#<-/)6(=/#>.33*#?@@A?8)98)9$+%03.%<)@8)A8)B1C"33<)+%-)58)D7+7.EB./()(*#5,//&0.=C $%)6-%3#%D#:7).9(=#+786/98;*#E6F#/&"*#<-/)6(=/#>.33##?@@?" 91$)#:$2*"$).%#1$7+2.1%)1%)&1%2$13)'4'2"7')$"'"+$&*).%)56< '"")2*")F#56)C"/'.2")G:/3.&+2.1%')+%-)2*".$)$"#"$"%&"'8 Page 39