What? Why? How?
What? Why? How?
A systematic way to change the behavior of a system.
- The system has undesirable characteristics (e.g., unstable)
- Higher level automation (e.g., cruise control)
- Higher level automation (e.g., cruise control)
Model, Analyze & Design, Deploy
Models: ODEs and OΔEs
Models: ODEs and OΔEs
Car
Car
In[]:=
car=mv'[t]==f[t]-bv[t]
Karl Johan Åström and Richard M. Murray, Feedback Systems: An Introduction for Scientists and Engineers, Second Edition. Princeton University Press, February 2, 2021
Boat
Boat
|
η={x,y,ψ}
ν={V,0,r}
={(δr,δT),(δr,δT),(δr,δT)}
X
ctrl
Y
ctrl
N
ctrl
η
R
ψ
R
β
M+C(ν)ν+D(ν)ν=f
ν
C. Sonnenburg et al., “Control-Oriented Planar Motion Modeling of Unmanned Surface Vehicles,” Oceans 2010 MTS Seattle, WA, USA, 2010, pp. 1-10, doi: 10.1109/OCEANS.2010.5664297.
Mixing tank
Mixing tank
|
In[]:=
tank={[k+1]==0.95123[k]+4.9[k]+4.9[k],[k+1]==0.904838[k]-0.019[k]+0.009[k]};
c
1
c
1
q
in1
q
in2
c
2
c
2
q
in1
q
in2
B. Ogunnaike and W. Ray, Process Dynamics, Modeling, and Control. Oxford University Press, 17 November 1994.
Models: State space models
Models: State space models
Linear state-space models
Linear state-space models
Example 1
Example 1
In[]:=
carSSM=StateSpaceModel[car,v[t],f[t],v[t],t]
x
y==c.x+d.u
In[]:=
=;=;={{1}};={{0}};
-b
m
1
m
In[]:=
StateSpaceModel[{,,,}]
Example 2
Example 2
eulerEOM={[t]-(-)[t][t]==[t],[t]-(-)[t][t]==[t],[t]-(-)[t][t]==[t]};
ℐ
1
′
ω
1
ℐ
2
ℐ
3
ω
2
ω
3
τ
1
ℐ
2
′
ω
2
ℐ
3
ℐ
1
ω
1
ω
3
τ
2
ℐ
3
′
ω
3
ℐ
1
ℐ
2
ω
1
ω
2
τ
3
In[]:=
StateSpaceModel[eulerEOM,{[t],[t],[t]},{[t],[t],[t]},{[t],[t],[t]},t]
ω
1
ω
2
ω
3
τ
1
τ
2
τ
3
ω
1
ω
2
ω
3
Affine state-space models
Affine state-space models
In[]:=
eulerASSM=AffineStateSpaceModel[eulerEOM,{[t],[t],[t]},{[t],[t],[t]},{[t],[t],[t]},t]
ω
1
ω
2
ω
3
τ
1
τ
2
τ
3
ω
1
ω
2
ω
3
x
y==c(x)+d(x).u
In[]:=
=,,;=DiagonalMatrix[1/{,,}];={,,};=ConstantArray[0,{3,3}];={,,};
(-)
ℐ
2
ℐ
3
ω
2
ω
3
ℐ
1
(-+)
ℐ
1
ℐ
3
ω
1
ω
3
ℐ
2
(-)
ℐ
1
ℐ
2
ω
1
ω
2
ℐ
3
ℐ
1
ℐ
2
ℐ
3
ω
1
ω
2
ω
3
ω
1
ω
2
ω
3
In[]:=
AffineStateSpaceModel[{,,,},]
Nonlinear state-space models
Nonlinear state-space models
Example 1
Example 1
In[]:=
NonlinearStateSpaceModel[eulerEOM,{[t],[t],[t]},{[t],[t],[t]},{[t],[t],[t]},t]
ω
1
ω
2
ω
3
τ
1
τ
2
τ
3
ω
1
ω
2
ω
3
x
y==g(x,u)
Example 2
Example 2
In[]:=
eqs={mx''[t]==f[t]Cos[δ[t]],my''[t]==f[t]Sin[δ[t]]};
In[]:=
nssm=NonlinearStateSpaceModel[eqs,{x[t],y[t]},{f[t],δ[t]},{x[t],y[t]},t]
In[]:=
={vx,Cos[δ]f/m,vy,Sin[δ]f/m};ℊ={x,y};NonlinearStateSpaceModel[{,ℊ},{x,vx,y,vy},{f,δ}]
Example 3
Example 3
In[]:=
eqs=Tan[x'[t]]+Sin[x[t]]==u[t];
In[]:=
NonlinearStateSpaceModel[eqs,x[t],u[t],u[t],t]
Discrete-time models
Discrete-time models
In[]:=
StateSpaceModel[x[k+2]+x[k+1]+x[k]==u[k],x[k],u[k],x[k],k]
In[]:=
={{0,1},{-1,-1}};={{0},{1}};={{1,0}};={{0}};
In[]:=
StateSpaceModel[{,,,},SamplingPeriod->τ]
Models: Transfer function models
Models: Transfer function models
Continuous-time systems
Continuous-time systems
From ODEs
From ODEs
In[]:=
eq=x''[t]+2x'[t]+3x[t]==u[t];
In[]:=
DSolveValue[{eq/.u[t]->DiracDelta[t],x[0]==0,x'[0]==0},x[t],t]/.HeavisideTheta[0]->0
In[]:=
LaplaceTransform[%,t,s]//Simplify
In[]:=
Map[LaplaceTransform[#,t,s]&,eq,{1}]
In[]:=
%/.{HoldPattern[LaplaceTransform][var_[t],__]:>(ToExpression@ToUpperCase@ToString@var)@s,_[0]:>0}
In[]:=
SolveValues[%,X[s]]
U[s]
From expressions
From expressions
In[]:=
TransferFunctionModel,s
1
3+2s+
2
s
In[]:=
TransferFunctionModel,,+3,s
1
s
s
s+1
2
2
s
Discrete-time systems
Discrete-time systems
From OΔEs
From OΔEs
In[]:=
eq=x[k+3]+2x[k+2]+x[k]==(u[k+1]+u[k])/2;
In[]:=
Map[ZTransform[#,k,z]&,eq,{1}]
In[]:=
%/.{HoldPattern[ZTransform][var_[k],__]:>(ToExpression@ToUpperCase@ToString@var)@z,_[_?IntegerQ]:>0}
In[]:=
SolveValues[%,X[z]]
U[z]
From expressions
From expressions
More on Models
More on Models
System models
System models
Convert between models
Convert between models
Systems connections model
Systems connections model
Analysis: State space methods
Analysis: State space methods
Controllability
Controllability
Overview
Overview
Matrix
Matrix
Gramian
Gramian
PBH
PBH
Distribution
Distribution
Example 1
Example 1
Example 2
Example 2
Observability
Observability
Matrix
Matrix
Gramian
Gramian
PBH
PBH
Codistribution
Codistribution
Example 1
Example 1
Example 2
Example 2
Simulation
Simulation
Symbolic simulation
Symbolic simulation
Numeric simulation
Numeric simulation
Discrete-time simulation
Discrete-time simulation
Measurements
Measurements
Design: PID
Design: PID
Overview
Overview
Controller architectures and tuning rules
Controller architectures and tuning rules
Example
Example
A controller to maintain liquid level in a tank.
The model of the system.
Design the controller.
The closed-loop system.
Simulate it.
Design: LQ
Design: LQ
Overview
Overview
Example
Example
A model of the system.
Design the controller.
The closed-loop system.
Simulate it.
The controller effort.
Design: MPC
Design: MPC
Overview
Overview
Example
Example
Design a controller to automate the administration of anesthesia.
Model
Model
A model of the pharmacokinetic (PK) characteristics.
A model of the pharmacodynamic (PD) characteristics.
A plot showing the nonlinear characteristics of the Hill equation.
A discrete-time approximation of the model.
Control design
Control design
Set up the cost to track the output.
Specify the constraint to prevent the patient from going into a deep hypnotic state.
Compute the controller.
Simulation
Simulation
The closed-loop system.
The BIS plot.
Design: Feedback linearization
Design: Feedback linearization
Overview
Overview
Linearization by transformation
The transformed system consists of a linear system and a residual system.
The system with a feedback compensator
Example
Example
The model of a axial flow compressor.
Feedback linearize it.
Design a controller based on the linearized system.
The closed-loop system.
Its response.
Deployment: Microcontroller kit
Deployment: Microcontroller kit
Overview
Overview
Deploy a quarter-car model
Deploy a quarter-car model
HIL simulation
HIL simulation
Things omitted
Things omitted
Models
Models
◼
Delay systems
◼
Descriptor systems
◼
SystemModels
Analysis
Analysis
◼
Classical analysis (Bode, Nyquist, stability margins, M and N contours, etc)
◼
Circle criterion
◼
Minimal models, decompositions and transformations, etc
◼
Carleman and state transform linearizations
Design
Design
◼
Pole placement
◼
Tracking
◼
Estimator design
◼
Full information output regulator, asymptotic output tracking
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Wolfram R&D LIVE: Control Systems: An Overview
by Suba Thomas
Wolfram Community, STAFF PICKS, May 11 2023
https://community.wolfram.com/groups/-/m/t/2917597
by Suba Thomas
Wolfram Community, STAFF PICKS, May 11 2023
https://community.wolfram.com/groups/-/m/t/2917597