1© 2016 The MathWorks, Inc.
Accelerating Control System Design
Using Systematic Approach
Naga Pemmaraju
Senior Application Engineer,
Modeling & Controls
Jayaraj Lakshmanan
Senior Training Engineer,
Modeling & Controls
2
3
What is a Control System?
A control system is a device, or set of devices, that manages, commands,
directs or regulates the behavior of other devices or systems.
Source: Wikipedia
+/-u y
System
Actu
ato
rs
Se
ns
ors
s1 s2
s3
Controller Plant
4
What is a Control System?
A control system is a device, or set of devices, that manages, commands,
directs or regulates the behavior of other devices or systems.
Source: Wikipedia
Plant
+/-u y
Controller
s1 s2
s3
System
Actu
ato
rs
Se
ns
ors
5
What is a Control System?
A control system is a device, or set of devices, that manages, commands,
directs or regulates the behavior of other devices or systems.
Source: Wikipedia
+/-u y
System
Actu
ato
rs
Se
ns
ors
s1 s2
s3
Controller Plant
6
Objectives in Control System Design
+/-u y
System
Actu
ato
rs
Se
ns
ors
s1 s2
s3
Controller Plant
Stability
Transient and Steady State Behavior
Robustness
7
Systematic Approach of Designing a Control System
Plant Modeling
(including Linearization)
Analyze(understand current state of system)
Design the Controller
Closed Loop Simulation
Iterate
Real Time Testing &
Deployment
Latent Pain
Time to Design
8
Accelerating Control System Design Using Systematic Approach
Plant Modeling
(including Linearization)
Analyze(understand current state of system)
Design the Controller
Closed Loop Simulation
Iterate
Real Time Testing &
Deployment
• Linearization of Plant
• Automatic PID Controller
Tuning
• Multi-Loop Controller
Tuning
• Response Optimization
• Gain Scheduling
• Model Predictive Control
AGENDA
9
MATLAB and Simulink Help Land
Unpiloted Boeing Spacecraft
ChallengeDesign a guidance, navigation, and control (GN&C) system
that allows the X-40A to land and come to a full stop on a
standard runway without either power or a pilot
SolutionUse MathWorks tools to streamline software implementation,
shorten the design-to-software-to-verification cycle, and enable
them to make late changes
Results Rapid development within budget
A successful test flight
A contract to continue development
"I am very pleased with the
results of this flight test.
It is a significant step in the
development phase."
John Fuller
Boeing
Boeing X-40A – in test flight (directly above)
and on the ground (top).
Link to user story
10
SimulinkA Platform for Model Based Design
• Dynamic Systems Modeling and Simulation
• Design of Controller and Filters
11
Introduction to Simulink
12
Example: Mass-Spring-Damper
y
u
k b
m
m
𝑘(𝑢 − 𝑦) 𝑏 𝑢 − 𝑦
System Schematic Free Body Diagram Transfer Function
𝑚 𝑦 𝑡 = 𝑘 𝑢 𝑡 − 𝑦 𝑡 + 𝑏 )𝑢(𝑡 − )𝑦(𝑡
𝑌 𝑆
)𝑈(𝑆=
𝑏𝑠 + 𝑘
𝑚𝑠2 + 𝑏𝑠 + 𝑘
System Analysis
13
System Analysis- Time Domain
14
System Analysis - Frequency Domain
15
• Linearization of Plant
• Automatic PID Controller Tuning
• Gain Scheduling
• Multi-Loop Controller Tuning
• Response Optimization
• Model Predictive Control
AGENDA
16
Linearization
Linearization is a 2 step process
– Finding operating point
– Obtaining the Linear Model
Different Ways of Linearization
– Operating point based
Trimming
Snap shot
– Frequency response estimation
Use Simulink Control Design and the Control System Toolbox to
automatically linearize the plant, design and tune your PID controllers
Linear Analysis Tool
17
LinearizationFrequency Response Estimation
Computation of a model’s
frequency response from a
graphical tool
Easy specification of input signal
Optional initialization of input signal
from the exact linearization results
Plotting of frequency response
together with exact linearization results
18
• Linearization of Plant
• Automatic PID Controller Tuning
• Gain Scheduling
• Multi-Loop Controller Tuning
• Response Optimization
• Model Predictive Control
AGENDA
19
Automatic PID tuning
Use Simulink Control Design and the Control System Toolbox to
automatically linearize the plant, design and tune your PID controllers
reference+
-
controller
S1 S2
S3
20
PID Tuner App
Automatically finds the
design that balances
performance and robustness
Lets you easily try different
controller structures
Provides two sliders for fine-
tuning the design
Several response plots can
be displayed simultaneously
Interactive tuning of PID
controllers
21
• Linearization of Plant
• Automatic PID Controller Tuning
• Gain Scheduling
• Multi-Loop Controller Tuning
• Response Optimization
• Model Predictive Control
AGENDA
22
Gain Scheduled PID Controllers
• Common strategy for
controlling systems
whose dynamics change
with time or operating
condition.
• Well suited for Linear
parameter-varying (LPV)
systems and large
classes of nonlinear
systems
23
• Linearization of Plant
• Automatic PID Controller Tuning
• Gain Scheduling
• Multi-Loop Controller Tuning
• Response Optimization
• Model Predictive Control
AGENDA
24
Control design and linearizationMulti-input, multi-output control tuning
• SYSTUNE or Control System
Tuner app automatically
tunes control systems from
high-level design goals
(reference tracking,
disturbance rejection, and
stability margins)
• Tune control system
regardless of control system
architecture and/or the
number of feedback loops
25
26
• Linearization of Plant
• Automatic PID Controller Tuning
• Gain Scheduling
• Multi-Loop Controller Tuning
• Response Optimization
• Model Predictive Control
AGENDA
27
Fine tune controller gains using response optimization
Use Simulink Design Optimization to optimize overall system
response against requirements in the time and frequency domain
• Optimize model response
to satisfy design
requirements, test model
robustness
• Optimize time and
frequency-domain design
requirements
simultaneously, using
model verification blocks,
or custom constraints and
cost functions
28
29
• Linearization of Plant
• Automatic PID Controller Tuning
• Gain Scheduling
• Multi-Loop Controller Tuning
• Response Optimization
• Model Predictive Control
AGENDA
30
Model Predictive Controls
How MPC worksUses an internal plant model to predict future behavior
Solves a quadratic programming (QP) problem online
BenefitsMakes better decision with more knowledge of plant dynamics
Handles plant input and output constraints explicitly
Integrates both feedback and feed-forward control
31
MPC Designer App
Design model predictive
controllers in MATLAB and
Simulink using improved
interactive workflows
Tune controller performance
using interactive sliders
Review MPC controllers for
design and stability issues
Compare the performance of
multiple MPC controllers
32
Base/recommended control design tools
reference+
-
controller
S1 S2
S3
Control System
Toolbox
Optimization
Toolbox
Simulink Control
Design
Simulink Design
Optimization
33
Other control related products to
consider…
System Identification
Toolbox
Robust Control
Toolbox
Stateflow
Model Predictive
Control Toolbox
Global Optimization
Toolbox
Neural Network
Toolbox
specialized methods
34
Other Resources
Designing Feedback Compensators and Control Logic:
http://in.mathworks.com/solutions/control-systems/designing-feedback- compensators-control-logic.html
Simulink Control Design Overviewhttp://in.mathworks.com/videos/simulink-control-design-overview-61203.html?s_tid=srchtitle
Simulink Design Optimization
http://in.mathworks.com/products/sl-design-optimization/
Model Predictive Control
http://in.mathworks.com/products/mpc/
35
Training
MATLAB Fundamentals
Simulink for System and Algorithm Modeling
MATLAB and Simulink for Control Design Acceleration
36
Q&A