ControlDesign[StateObserver]
Observer
construct the static gain (Luenberger) observer for a given system and observer gain
Calling Sequence
Parameters
Options
Description
Examples
Observer(sys, L, opts)
sys
-
System; system object;
L
Matrix or Vector; observer gain
opts
(optional) equation(s) of the form option = value; specify options for the Observer command
parameters = {list, set}(name = complexcons)
Specifies numeric values for the parameters of sys. These values override any parameters previously specified for sys. The numeric value on the right-hand side of each equation is substituted for the name on the left-hand side in the sys equations. The default is the value of sys given by DynamicSystems:-SystemOptions(parameters).
The Observer command constructs the static gain (Luenberger) observer for the given system sys and observer gain L.
The system sys is a continuous or discrete-time linear system object created using the DynamicSystems package. The system object must be in state-space (SS) form.
All sys inputs are assumed known (deterministic), and all sys outputs are assumed to be measured.
The Observer command returns the observer object in the state-space form. The observer system object gets the input(s) and output(s) of sys as inputs and generates the estimates of the state(s) and output(s) of sys as its outputs.
Suppose the sys state-space realization is given as
x⋅=Ax+Buy=Cx+Du
The observer equations are given by
xˆ⋅=A−LCx^+B−LDLuy
x^y^=ICx^+00D0uy
In the discrete-time domain, the Observer command uses the same state-space matrices as in the continuous-time case to generate estimates for state(s) xn and output(s) yn as x^n|n−1 and y^n|n−1, respectively, based on the past measurements up to yn-1. The sampling time of the generated observer object is the same as the sampling time of the system sys.
with⁡ControlDesign:
with⁡DynamicSystems:
State-space system in continuous time (5 states, 3 inputs and 2 outputs)
Amat≔Matrix⁡1,−2,3,−5,12,0,4,−1,2,−3,2,5,7,−4,3,−2,4,3,8,7,19,14,1,−4,7:
Bmat≔Matrix⁡3,6,3,9,7,5,5,2,1,4,−1,7,6,−8,2:
Cmat≔Matrix⁡3,9,5,4,6,1,0,−4,5,7:
Dmat≔Matrix⁡1,−2,0,3,0,−1:
sys≔StateSpace⁡Amat,Bmat,Cmat,Dmat:
PrintSystem⁡sys
State Spacecontinuous2 output(s); 3 input(s); 5 state(s)inputvariable=u1⁡t,u2⁡t,u3⁡toutputvariable=y1⁡t,y2⁡tstatevariable=x1⁡t,x2⁡t,x3⁡t,x4⁡t,x5⁡ta=1−23−51204−12−3257−43−2438719141−47b=3639755214−176−82c=3954610−457d=1−2030−1
Desired observer poles
p≔−3,−4,−5+3⁢I,−5−3⁢I,−7:
Get the observer gain Matrix L for the desired poles
L≔StateObserver:-PolePlacement⁡sys,p
L≔5.613879995032024.25288865156742−3.33851876208652−2.638950666309182.084444931839460.857378214523429−0.743810167611425−0.2976171958150025.062902321183593.86362016334714
Construct the observer object for sys with gain L
Obsv≔StateObserver:-Observer⁡sys,L:
PrintSystem⁡Obsv
See Also
ControlDesign
ControlDesign[StateFeedback][PolePlacement]
ControlDesign[StateObserver][Ackermann]
ControlDesign[StateObserver][PolePlacement]
Download Help Document