Luca Matone Columbia Experimental Gravity group GECo LHO Jul 1822 2011 LLO Aug 812 2011 LIGOG1100863 Day Topic Textbooks 1 Control theory Physical systems models l inear systems block diagrams ID: 1003814
Download Presentation The PPT/PDF document "An Overview of Control Theory and Digita..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
1. An Overview of Control Theory and Digital Signal ProcessingLuca MatoneColumbia Experimental Gravity group (GECo)LHO Jul 18-22, 2011LLO Aug 8-12, 2011LIGO-G1100863
2. DayTopicTextbooks1Control theory: Physical systems, models, linear systems, block diagrams, differential equations, feedback loops, cruise control example, MATLAB implementation.Chau, Pao C. Process Control: A First Course with MATLAB®. Cambridge University Press, 2002. ISBN 0-521-00255-9.Ingle, Vinay K. and John G. Proakis. Digital Signal Processing using Matlab®. Brooks/Cole 2000. ISBN 0-534-37174-4.Smith, Steven W. The Scientist and Engineer’s Guide to Digital Signal Processing. California Technical Publishing 1999. http://www.dspguide.com/2Control theory: Laplace transform and its inverse , transfer functions, partial fraction expansion, first-order and second-order systems, dynamic response, bode plots, stability criteria, MATLAB implementation.3Control theory: robustness, typical compensators, noise suppression, one arm cavity lock example, MATLAB implementation and time-domain simulations with SIMULINK. 4DSP: Discrete-time signals and systems, impulse response, system stability, convolution and correlation, differential to difference equations, the Z transform, the Discrete-time Fourier Transform (DTFT), the Discrete Fourier Transform (DFT), MATLAB implementation.5DSP: The Fast-Fourier Transform (FFT), power spectral density, sampling theorem, aliasing, analog-to-digital transformations, digital filtering, FIR filters, IIR filters, moving average filter, filter design, ADC and DACs, MATLAB implementation.Syllabus (tentative)2LIGO-G1100863Matone: An Overview of Control Theory and Digital Signal Processing (1)
3. ObjectiveControl SystemManages and regulates a set of variables in a systemSISO – single-input-single-outputMIMO – multiple-input-multiple-outputA quantity is measured then controlledRequirementsBandwidthRise timeOvershootSteady state error…3Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
4. ObjectiveDigital Signal ProcessingMeasure and filter an analog signalDigital signalCreated by sampling an analog signalCan be storedAnalog filtersCheap, fast and have a large dynamic range in both amplitude and frequencyDigital filtersCan be designed and implemented “on-the-fly”Superior level of performance.Example: a low pass digital filter can have a gain of , a frequency cutoff at , and a gain of less than for frequencies above . A transition of ! 4Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
5. Control Theory 1Given a physical systemObjective: sense and control a variable in the systemExamplesAs basic asa car’s cruise control (SISO) orNot so basic asLocking the full LIGO interferometer (MIMO)5Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
6. Example: Cruise ControlObjectiveCar needs to maintain a given speedPhysical system includescar’s inertiafrictionDirection of motionNormal force (n)Force from engine (f)Weight (mg)Friction force (ffr)Force or free body diagram: allows to analyze the forces at play6Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
7. Physical modelPhysical system described by the following equation of motionSimplifying and assuming friction force is proportional to speed Direction of motionForce from engine (f)Normal force (n)Weight (mg)Friction force (ffr)7Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
8. First-order differential equationSolving for first-order differential equation (assuming is a constant)yields the solution Direction of motionEngine force (f)Friction force (ffr)Speed at regime Time constant 8Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
9. MATLAB implementationThe linear differential equation describing the dynamics of the systemUsing MATLAB’s Symbolic Math Toolbox>> dsolve('m*Dy=f-b*y','y(0)=0')ans =(f - f/exp((b*t)/m))/b Direction of motionEngine force (f)Friction force (ffr)9Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
10. Results: cruise_timedomain.m10 Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
11. Block diagram: representing the physical systemTo illustrate a cause-and-effect relationshipA single block represents a physical systemBlocks are connected by lines Lines represent how signals flow in the systemIn general, a physical system G has signal x(t) as input and signal y(t) as output G is the transfer function of the systemGx(t)y(t)11Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
12. Car’s bodyTransfer function G represents the car’s bodyG converts the force from the engine (input signal, ) to the car’s actual speed (output signal, )with Units: Gf(t)v(t)12Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
13. Setting the desired speedSecond transfer function H (the controller)Converts the desired speed (or reference) to a required force Sets the throttleFor simplicity, H is set to a constant must be dimensionless GfvvrH13Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
14. Plotting resultsWith the actual speed is the reference: Simulate: setting desired speed to 25 m/s (55 mph) Generated force by controller HResulting speed vDesired speed vrcruisefeedback_timedomain.m14Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
15. Introducing a disturbance – a hillIn the presence of a hill the equation of motion needs to be re-visitedAssuming a small angle θ Weight (mg)Direction of motionForce from engine (f)Friction force (ffr)θAdded term15Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
16. Introducing a disturbance – a hill Weight (mg)Direction of motionForce from engine (f)Friction force (ffr)ϑAdded term16Assuming and are constants Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
17. Modifying the block diagramGvfvrH Kθ+-Summation junction 17Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
18. Modifying the block diagramGvfvrH Kθ+-Summation junction18 Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
19. Plotting resultsSetting desired speed to 25 m/s and slope of Generated force by controller HResulting speed vDesired speedProblem!cruisefeedback_timedomain.m19Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
20. Negative FeedbackLet’s measure the car’s speed andCorrect for it by feeding back into the system a measure of the actual speed GvfvrHKθ+-ceCorrection signalError signal-+20Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
21. Negative FeedbackLet’s measure the car’s speed andCorrect for it by feeding back into the system a measure of the actual speed GvfvrHKθ+-ceCorrection signal c: in this case it is just a measure of the actual speedError signal e: the difference between the desired speed and the measured speed. If null, then -+21Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
22. Negative feedbackPlot of force vs. time and speed vs. time with negative feedbackSetting Result:Faster response with feedback (compare blue against red curves)Speed at regime: (error of ) cruisefeedback_timedomain2.m22Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
23. Negative feedbackIncreasing the controller’s gain (H)decreases the rise time while decreasing the steady state errorSetting Result:Even faster responseSpeed at regime: (error of ) cruisefeedback_timedomain3.m23Yes but… how does it work?Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
24. GvfvrHKθ+-e-+c Signal flow and block diagrams24Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
25. GvfvrHKθ+-e-+c System’s open loop gain (dimensionless)25Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
26. GvfvrHKθ+-e-+c (high gain, closed loop, with feedback) 26(low gain, open loop, or no feedback) Error signal in closed loop: close to zero, proportional to angle The higher the controller’s gain, the lower e Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
27. GvfvrHKθ+-e-+c With no feedback27 Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
28. GvfvrHKθ+-e-+c (high gain, closed loop, with feedback) 28 (low gain, open loop or no feedback) Actual speed : close to with an error proportional to when in closed loop. The higher the controller’s gain, the lower the speed error. Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
29. GvfvrHKθ+-e-+c 29Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
30. GvfvrHKθ+-e-+c (high gain, closed loop, with feedback) 30 (low gain, open loop, or no feedback) Force : at regime, it does not depend on the gain in while proportional to angle Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
31. Plotting and Open loopClosed loopSetting Plotting the open loop transfer function vs. time and the closed loop transfer function vs. timeNotice the rapid rise time for the closed loop case cruisefeedback_timedomain2.m31Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
32. The error signal ePlot of error signal e vs timeError signal decreases to 3 m/s.Notice a steady state error cruisefeedback_timedomain2.m32Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
33. Open and closed loop TF with 33Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
34. Error signal e with 34Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
35. Cruise control exampleFirst-order differential equationSimplest controller: simply a gain with no time constants involvedHow to handle more complicated problems?35Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
36. P1xyP2P1P2yxP1xyP2 P1 ±P2yxP1xyP2 yxBlock diagram reduction36Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
37. PracticeDetermine the output C in terms of inputs U and R. 37Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863UCR ++-+
38. PracticeDetermine the output in terms of inputs and . 38Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863U1CR ++++ U2 ++
39. More practiceDetermine C/R for the following systems.39(a)(b)(c)Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863R ++++ C R ++++ C R ++++ C
40. How do we MEASURE the OL TF of a system when the loop is closed?Add an injection point in a closed loop systemInject signal and read signal (just before the injection) and (right after the injection)Solve for the ratio Matone: An Overview of Control Theory and Digital Signal Processing (1)40 ++LIGO-G1100863
41. So far…Control theory builds on differential equationsBlock diagrams help visualize the signal flow in a physical systemThe cause-and-effect relationship between variables is referred to as a transfer function (TF)The system’s open-loop TF is the product of transfer functionscruise control example: Two cases: and MATLAB implementationFunctions used: dsolve 41Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
42. Laplace TransformsThe technique of Laplace transform (and its inverse) facilitates the solution of ordinary differential equations (ODE).Transformation from the time-domain to the frequency-domain.Functions are complex, often described in terms of magnitude and phase42Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
43. Linear systemsTo map a model to frequency spaceSystem must be linearOutput proportional to inputGiven system PInput signals: and Output signals (response): and System P is linearIf input signal: Then output signal: Superposition principle Pxy43Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
44. ExampleIs a linear system?Knowing that and If input is , output isSystem is linear 44Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
45. ExampleIs a linear system?Knowing that andIf input is , output isSystem is not linear 45Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
46. In general OutputInput46For a stable systemMatone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
47. Laplace Transform LTransforms a linear differential equation into an algebraic equationTool in solving differential equationsLaplace transform of function fLaplace inverse transform of function F where is the transform variable Imaginary unit 47Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
48. Time domain ↔ Laplace domain InputOutput48Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
49. Laplace Transform L 49Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
50. (Some) Laplace transform pairsUnit stepUnit rampExponentialSinusoidSHOUnit stepUnit rampExponentialSinusoidSHO50Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
51. Laplace transform propertiesLinearityDerivativesFirst-order: Second-order: Integral 51Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
52. Solution to ODEsLaplace transform the system’s ODESolve the algebraic equation in sInverse transform back to the time domain52Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
53. Transfer Function 53Using derivative propertyAlgebraic equation in s, the ratio of 2 polynomials in sTransfer function relates input to output . Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
54. Transfer Function 54The roots of the numerator are referred to as zeros.The roots of the denominator are referred to as poles.Transfer function can be defined byThe coefficients of s orIts poles and zeros Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
55. Let’s apply it to the cruise control example: transfer function (the car’s body) Direction of motionEngine force (f)Friction force (ffr)G(t)f(t)v(t)G(s)F(s)V(s)55Pole at Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
56. Dynamic response: using lookup tables to inverse transformLaplace inverse transform using lookup tables Input: step function, amplitude The response (in frequency space) isThe time-domain response is 56Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
57. Dynamic response: using lookup tables to inverse transformLaplace inverse transform using lookup tables 57Pole Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
58. First-order system step response 63 %Pole pfirstorder.m58 Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
59. MATLAB implementationThe step response of transfer function >> G=tf(5, [1 5]);>> step(G); 59Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
60. Partial fraction expansionReduce a complex function to a collection of simpler onesThen use lookup table Order mOrder n 60Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
61. CommentsPoles of F(s) determine the time evolution of f(t)Zeros of F(s) affect coefficientsPoles closer to origin → larger time constants 61Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
62. ExampleFind of the Laplace transformSol: Using MATLAB>> [R,P,K]=residue([6 0 -12],[1 1 -4 -4])R = 3.0000 1.0000 2.0000P = -2.0000 2.0000 -1.0000K = [] 62 Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
63. Example: LRC circuit 63Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
64. Example: LRC circuit 64Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
65. Example: LRC circuit 65Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
66. LRC circuit: transfer functionSetting L = 1 H, C = 1 F and R = 1 Ω 66Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
67. LRC circuit: dynamic response to stepSetting the input to a step of amplitude 1 VThe unit step response is 67Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
68. LRC circuit: dynamic response to stepUsing MATLAB for the solution>> n = [1];>> d = [1 1 1 0];>> [α, a, k] = residue(n, d); Coefficient vector for polynomial at numeratorCoefficient vector for polynomial at denominator68Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
69. Plotting results of two methods>> y=α.'*exp(a*t);>> plot(t, y, 'bo');>> y2=step(1,[1 1 1],t);>> plot(t, y2, ‘r.’);OR69Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
70. Second-order system step responseOvershootPeriod of oscillationSettling time: time to settle to ±5% of final value (determined by the term) secondorder.m70Note: often the response of a high-order system is similar to the second-order oneMatone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
71. Verify the following 71Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
72. Back to cruise control: system’s step response GvfvrHKθ+-ce-+72Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
73. Step response 73Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
74. Back to cruise control>> n = [k/m];>> d = [1 (b+k)/m 0];>> [α, a, k] = residue(n, d);>> y=α.'*exp(a*t);>> plot(t, y, 'bo');OR74Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
75. Back to cruise control>> G = tf([1/m],[1 b/m]);>> H = k;>> CL = G * H / (1 + G * H);>> [y, t] = step(CL);>> plot(t, y, 'b.');75Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
76. Transfer function, poles and zerosIt is convenient to express a transfer function G(s) in terms of its poles and zeros:k is the gain of the transfer function 76Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
77. Summary of pole characteristicsReal distinct poles (often negative)Real poles, repeated m times (often negative)↕ 77Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
78. Summary of pole characteristicsComplex-conjugate poles often re-written as a second-order termPoles on imaginary axisSinusoidPole at zero: step functionPoles with a positive real partUnstable time-domain solution 78Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
79. SummaryThe Laplace transform is a tool to facilitate solving for ODEs.Systems need to be linearNo need to do the transform (integral)Use transform pairs, transform tablesLaplace transform properties: linearity, derivatives and integrals.Once in the Laplace domain, a TF is simply the ratio of two polynomials in s. Carry out algebra to solve the problem.No need to do the inverse transformUse transform pairs, transform tablesFor high-order TFs, use the partial-fraction expansion to reduce the problem to simpler partsIMPORTANT:Poles of a transfer function determine the time evolution of the systemPoles with a real positive part correspond to unstable and unphysical systemsThe system TF needs to have poles with a negative real partMATLAB implementationFunctions used: step, residue, tf79Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
80. SolutionsMatone: An Overview of Control Theory and Digital Signal Processing (1)80LIGO-G1100863
81. PracticeDetermine the output C in terms of inputs U and R.Sol: 81Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863UCR ++-+
82. PracticeDetermine the output in terms of inputs and .Sol: 82Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863U1CR ++++ U2 ++
83. More practiceDetermine C/R for the following systems. Sol: 83(a)(b)(c)Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863R ++++ C R ++++ C R ++++ C
84. How do we MEASURE the OL TF of a system when the loop is closed?Add an injection point in a closed loop systemInject signal and read signal (just before the injection) and (right after the injection)Solve for the ratio Matone: An Overview of Control Theory and Digital Signal Processing (1)84 Sol: ++LIGO-G1100863
85. Partial-fraction examplesDenominator: has distinct, real rootsExample 2.4, 2.5, 2.6Denominator: complex rootsExample 2.7, 2.8Denominator: repeated rootsExample 2.985Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863
86. Practice: verify the following 86Matone: An Overview of Control Theory and Digital Signal Processing (1)LIGO-G1100863