1 / 17

Design Realization lecture 22

Design Realization lecture 22. John Canny 11/6/03. Last time. Some physics: Bending and stretching Construction methods: Molding Welding Structural components Modular systems. This time. Circuit design critique Control principles Simulation – Matlab/Simulink. Feedback Control.

rossij
Download Presentation

Design Realization lecture 22

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Design Realization lecture 22 John Canny 11/6/03

  2. Last time • Some physics: • Bending and stretching • Construction methods: • Molding • Welding • Structural components • Modular systems

  3. This time • Circuit design critique • Control principles • Simulation – Matlab/Simulink

  4. Feedback Control • Often we want to move a system in a particular way, by controlling a parameter such as: • Position control • Speed control • Force control • Feedback control uses sensor(s) to measure this parameter and make corrections. • Feedback must be applied with care to avoid ever-increasing corrections (instability).

  5. - + Feedback Control • Naively, we want to do something like this: V+ Amplifier Input(voltagerepresentingdesired angle) Potentiometer on shaft(angle sensor) Motor

  6. - + Feedback Control • Any difference between input and measured shaft angle will be amplified, moving the motor. • If the direction is correct, the motor will reduce the difference. With high gain, the error  0. V+ Amplifier Input Potentiometer on shaft(angle sensor) Motor

  7. Simulink Models • Tools like Matlab/Simulink allow us to design and test controllers before building them. • Here is the controller just shown in Simulink: Voltage angle

  8. Feedback Instability • Problem: the amplifier has delay, the motor has inertia, keeps moving even after error  0. • If gain is too high, it will overshoot, “ring” or possibly oscillate.

  9. PD Stabilizing Controller • The simplest way to control feedback is with a “PD” (Proportional Derivative) controller. • A multiple of the derivative of the output is subtracted from the amplifier input.

  10. PD Stabilization • Why does derivative feedback stabilize the system? • Derivative feedback simulates a damper. • Motion in a fluid creates viscous drag (F  -v). • Viscous drag quickly robs the system of energy.

  11. PID Control • Sometimes there is a residual error between desired and actual output (not for DC motors). • Computing the integral of the difference signal will reduce it to zero in the steady state.

  12. PID Tracking Controller • All three terms P,I,D are computed on the difference signal: PID controller

  13. Implementing PID Controllers • Normally, the controller CPU is running at fixed discrete time steps. • Derivates can be computed by differencing consecutive samples, integrals by summing samples. • This approach introduces delays and can cause problems at high frequency. • Make sure that amplifiers “roll off” at high frequency – use a low-pass amplifier.

  14. Discrete lowpass amplifier • Input is (x1,…,xn), output is (y1,…,yn) yk = a yk-1 + (1-a)b xk a, b constants, a < 1. • If x = 0, y non-zero, then the amplifier outputs a decreasing geometric sequence, which is a discrete approximation to exponential decay. • It simulates a simple RC low-pass circuit.

  15. Discrete lowpass amplifier • The amplifier’s DC Gain is b • Corner frequency c = (- ln a)/t = 2fcwhere t is the discrete step time.

  16. Automatic code generation • There is a companion to Matlab/Simulink called “real-time workshop” (RTW). • RTW automatically generates C code to run a Simulink model. It can handle new user-defined blocks (e.g. for sensor input or motor output). • This code can be compiled and run on the control processor.

  17. Automatic code generation • RTW code generation includes scheduling and event-handling and allows blocks to run at different rates. • It also allows complicated models that may not run correctly with a simple discrete-step approximation.

More Related