Escolar Documentos
Profissional Documentos
Cultura Documentos
Control Design
Control Design
6-2
Section Outline
Uses of feedback Control design methods Time domain Frequency domain Control design tools
Control Design
6-3
Uses of Feedback
Make things happen as closely as possible to some specification e.g. rise time.
Control Design
6-4
The Control System Toolbox offers a variety of tools for designing and evaluating controllers
Root locus and Bode design (SISOTOOL) Pole placement LQR (Kalman filtering) techniques
Robust, Mu-Analysis, and Synthesis Fuzzy Logic, Neural Networks Model Predictive Control
Control Design
6-5
Loop Shaping
Control system design essentially consists of shaping the nominal system in the frequency domain. This is typically done by adding transfer function terms to ensure: Enough roll-off at high frequency Enough gain at low frequency Good stability margins PID control is loop shaping with a constrained controller structure and is sufficient for many applications
Control Design
6-6
Shows the effect of increasing gain k Diagram plotted from open loop plant, rlocus(G) Poles travel towards zeros or infinity as k increases Determination of destabilising gain
Control Design
6-7
Place dominant closed-loop poles in the desired region by changing the gain and by introducing additional poles and zeros.
Control Design
6-8
Stability Margins
The amount by which gain and phase can change while still maintaining stability
Gain Margin
Phase Margin
Control Design
6-9
PID is an ideal lead-lag or lag-lead compensator These techniques can be used to change the phase and gain margins.
Control Design
6 - 10
Phase-Lead
Phase-Lead
sz H ( s) k s p
z=1
p=5
2006 The MathWorks, Inc.
Control Design
6 - 11
Phase-Lag
Phase-lag
sz H ( s) k s p
p=1
z=5
2006 The MathWorks, Inc.
Control Design
6 - 12
Increases the magnitude of the system frequency response by 20log(a) in the range peak1-peak2 Lag-lead compensator Phase-lag and phase-lead cascade 1> 2 peak1< peak2
H (s) c (1 1s )(1 a 2 s ) (1 a 1s )(1 2 s )
Increases the magnitude of the system frequency response by -20log(a) in the range peak1-peak2
>> leadlaglaglead
2006 The MathWorks, Inc.
Control Design
6 - 13
peak1=1 peak2=100
>> leadlaglaglead
peak1=1 peak2=100
Control Design
6 - 14
Bode response Current control law Root locus Graphical display of open-loop, closed-loop, and controller poles and zeros Response Characteristics >> ms_transferfcn, sisotool(ms_tf) 2006 The MathWorks, Inc.
Control Design
6 - 15
Control Design
6 - 16
Adding a Controller
1. Click here, and then drag the poles, zeros or gain in the Root Locus window.
2. Click in the Current Compensator box or on the red colored C block to see a controller editor GUI.
2006 The MathWorks, Inc.
Control Design
6 - 17
Control Design
6 - 18
Control Design
6 - 19
Adjust the gains by trial and error Write a custom optimization script Use the Optimization Toolbox Use Simulink Response Optimization
Control Design
6 - 20
Control Design
6 - 21
>> mass_spring_respopt
Control Design
6 - 22
Specifying Constraints
There are two ways to specify constraints: Using the mouse to drag from the center point, end point or time boundary Right-clicking on a boundary and use the Constraint Editor
2006 The MathWorks, Inc.
Control Design
6 - 23
The tunable parameters must be specified. This is done using the Optimization->Tuned Parameters pull down menu
2006 The MathWorks, Inc.
Control Design
6 - 24
The constraint values that give this response can be loaded from mass_spring_constrains.mat.
2006 The MathWorks, Inc.
Control Design
6 - 25
Control Design
6 - 26
Additional Considerations
Real designs must take account of many of the following components Signal conditioning and prefilters Noise filters Notch filters Characteristics of the A/D and D/A converters Actuator dynamics Sensor dynamics Discretization of the controller Implementation of the controller
2006 The MathWorks, Inc.
Control Design
6 - 27
Implementation
Use Real-Time Workshop Rapid simulations: non-real time Rapid prototyping applications: hardware-in-the-loop Embedded system design: code generated for embedded systems
Rapid Simulation Deployment Code Generation
Prototyping Code
Hardware-inthe-Loop Simulation
Embedded Code
Control Design
6 - 28
Summary Outline
Uses of feedback Control design methods Time domain Frequency domain Control design tools