ControlDesign[StateFeedback]
Ackermann
calculate the state feedback gain for single-input systems using Ackermann's formula
Calling Sequence
Parameters
Options
Description
Examples
References
Ackermann(sys, p, opts)
Ackermann(Amat, Bmat, p, opts)
sys
-
System; system object
p
list; list of desired closed-loop poles (real or complex). Complex poles including those containing symbolic parameters must be given in complex conjugate pairs. All symbolic parameters in the list are assumed to be real.
Amat
Matrix; system matrix of a state-space system
Bmat
Matrix or Vector; input matrix of a state-space system
opts
(optional) equation(s) of the form option = value; specify options for the Ackermann command
return_Kr = true or false
True means return the direct gain Kr. The returned value becomes a sequence (Kc, Kr). The system must be specified with a system object sys. The default value is false.
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 Ackermann command calculates the state feedback gain Kc for single-input systems using Ackermann's formula to place the closed-loop poles in the desired locations.
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 and must be controllable. If Amat and Bmat matrices are specified, the (Amat, Bmat) pair must be controllable.
The closed-loop system matrix is then Ac=A−B·Kc where Kc is the calculated feedback gain.
When the syntax Ackermann(sys, p, return_Kr) is used, the feed-forward or direct gain Kr is computed as follows:
C−D·Kc·1−A+B·Kc·B+D (continuous time)
C−D·Kc·1−A+I+B·Kc·B+D (discrete time)
If sys contains structural uncontrollable states, use ReduceSystem to remove them before computing the state feedback gain Kc.
with⁡ControlDesign:
with⁡DynamicSystems:
Numeric example
State-space system matrix Amat and input matrix Bmat (5 states and 1 input)
Amat≔Matrix⁡1,−2,3,−5,12,0,4,−1,2,−3,2,5,7,−4,3,−2,4,3,8,7,3,4,1,−4,7:
Bmat≔Matrix⁡3,9,5,4,6:
Desired poles
p1≔−1+I,−0.1,−2.44,−1−I,−7.77:
Obtain the state feedback gain Kc:
Kc≔StateFeedback:-Ackermann⁡Amat,Bmat,p1
Kc≔−3.3676962193.2894237634.0305593368.644197464−5.820218623
Verify the closed-loop system matrix has the desired poles
LinearAlgebra:-Eigenvalues⁡Amat−Bmat·Kc
−7.77000009752235+0.⁢I−2.43999927357362+0.⁢I−1.00000013420824+0.999999523527025⁢I−1.00000013420824−0.999999523527025⁢I−0.100000368487564+0.⁢I
Symbolic example
System object sys with symbolic entries (3 states, 1 input, 3 outputs)
sys≔StateSpace⁡Matrix⁡1,y,3,x,4,−1,2,5,7,Matrix⁡3,9,5,Matrix⁡1,0,0,0,1,0,0,0,1,Matrix⁡3,1:
PrintSystem⁡sys
State Spacecontinuous3 output(s); 1 input(s); 3 state(s)inputvariable=u1⁡toutputvariable=y1⁡t,y2⁡t,y3⁡tstatevariable=x1⁡t,x2⁡t,x3⁡ta=1y3x4−1257b=395c=100010001d=000
p2≔−4,−5+3⁢I,−5−3⁢I
Obtain the state feedback gain Kc and the feed-forward gain Kr:
Kc,Kr≔StateFeedback:-Ackermann⁡sys,p2,return_Kr=true,parameters=x=0,y=2
Kc,Kr≔4.3839620090.24887070002.121655535,3.081693500003580.648777578948122−1.05426356579070
sys:-a≔eval⁡sys:-a,x=0,y=2:
eigen≔LinearAlgebra:-Eigenvalues⁡sys:-a−sys:-b·Kc
eigen≔−5.00000000205003+2.99999999901668⁢I−5.00000000205003−2.99999999901668⁢I−3.99999999789996+0.⁢I
Use ReduceSystem
sys1≔StateSpace⁡Matrix⁡4,0,−3,5,3,0,0,3,1,0,−1,1,0,0,0,0,Matrix⁡1,3,2,0,Matrix⁡1,0,3,5,−3,0,5,7,Matrix⁡1,0:
PrintSystem⁡sys1
State Spacecontinuous2 output(s); 1 input(s); 4 state(s)inputvariable=u1⁡toutputvariable=y1⁡t,y2⁡tstatevariable=x1⁡t,x2⁡t,x3⁡t,x4⁡ta=40−35300310−110000b=1320c=1035−3057d=10
p3≔−a+I⋅3,−a−I⋅3,−b+I⋅9,−b−I⋅9
p3≔−a+3⁢I,−a−3⁢I,−b+9⁢I,−b−9⁢I
Get the state-feedback gain
Kc≔StateFeedback:-Ackermann⁡sys1,p3
Error, (in ControlDesign:-StateFeedback:-Ackermann) the given state-space realization is not controllable
Remove the uncontrollable states if possible. ReduceSystem will remove the structural uncontrollable states.
rsys≔ReduceSystem⁡sys1,reducedtype=controllable:
PrintSystem⁡rsys
State Spacecontinuous2 output(s); 1 input(s); 3 state(s)inputvariable=u1⁡toutputvariable=y1⁡t,y2⁡tstatevariable=x1⁡t,x2⁡t,x3⁡ta=40−330010−1b=132c=103−305d=10
Verify the resulting subsystem is controllable
Controllable⁡rsys,method=rank
true
Desired poles for the controllable subsystem
p4≔−a,−b+I⋅9,−b−I⋅9:
Kc≔StateFeedback:-Ackermann⁡rsys,p4
Kc≔−16⁢a⁢b2−43⁢a⁢b−23⁢b2−956⁢a−143⁢b−1853−118⁢a⁢b2−92⁢a16⁢a⁢b2+23⁢a⁢b+13⁢b2+916⁢a+103⁢b+973
[1] T. Kailath, Linear Systems, Prentice-Hall, 1980.
[2] C. T. Chen, Linear System Theory and Design, 3rd Ed., Oxford University Press, 1999.
See Also
ControlDesign
ControlDesign[StateFeedback][PolePlacement]
Download Help Document