ControlDesign[StateFeedback]
PolePlacement
calculate the state feedback gain for single-input or multiple-input systems according to desired closed-loop poles
Calling Sequence
Parameters
Options
Description
Examples
References
PolePlacement(Amat, Bmat, p, opts)
PolePlacement(sys, 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 PolePlacement 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 PolePlacement command calculates the state feedback gain Kc for single-input or multiple-input systems according to the desired closed-loop pole locations given by p.
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 pole placement is performed using the Sylvester equation method if open-loop and closed-loop poles are disjoint and there are no symbolic parameters in the A and B matrices and the p list. The closed-loop system matrix is then Ac=A−B·Kc where Kc is the calculated feedback gain. The algorithm detects if any of the open-loop poles and desired closed-loop poles are at the same position (or numerically too close) or if any symbolic parameters exists and switches to the cyclic method in such cases.
When the syntax PolePlacement(sys, p, return_Kr) is used, the 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 3 inputs)
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:
Desired poles
p1≔−1+I,−0.1,−3.581,−1−I,−5.7720:
Obtain the state feedback gain Kc:
Kc≔StateFeedback:-PolePlacement⁡Amat,Bmat,p1
Kc≔4.900102280219731.35723979032959−0.298845142567289−3.758867224134072.98040260420064−0.769663041613281−0.8056384138234610.0343911471969752−1.04028874033608−1.15733500000762−4.12917582839676−0.3100958145743390.5152005450315614.00754085025248−2.27773489827041
Verify the closed-loop system matrix has the desired poles
LinearAlgebra:-Eigenvalues⁡Amat−Bmat·Kc
−5.77200000000023+0.⁢I−3.58099999999982+0.⁢I−0.100000000000239+0.⁢I−0.999999999999811+I−0.999999999999811−I
Symbolic example
System object sys with symbolic entries (3 states, 3 inputs, 3 outputs)
sys≔StateSpace⁡Matrix⁡1,2,3,x,4,−1,2,5,7,Matrix⁡3,6,9,7,5,2,Matrix⁡1,0,0,0,1,0,0,0,1,Matrix⁡3,2:
PrintSystem⁡sys
State Spacecontinuous3 output(s); 2 input(s); 3 state(s)inputvariable=u1⁡t,u2⁡toutputvariable=y1⁡t,y2⁡t,y3⁡tstatevariable=x1⁡t,x2⁡t,x3⁡ta=123x4−1257b=369752c=100010001d=000000
Desired symbolic poles
p2≔−4,−b+c⁢I,−b−c⁢I:
Obtain the state feedback gain Kc and the feed-forward gain Kr:
Kc,Kr≔StateFeedback:-PolePlacement⁡sys,p2,return_Kr=true,parameters=x=0:
evalf⁡Kc
−0.01105243808⁢b2−0.01105243808⁢c2−0.07399413568⁢b−0.31477903520.01492746525⁢b2+0.01492746525⁢c2−0.05451317909⁢b−0.8774754121−0.01297231488⁢b2−0.01297231488⁢c2−0.2777819673⁢b−1.0559715000.03282239188⁢b2+0.03282239188⁢c2+0.2197401605⁢b+0.9347983468−0.04433004833⁢b2−0.04433004833⁢c2+0.1618876227⁢b+2.6058360720.03852384419⁢b2+0.03852384419⁢c2+0.8249282666⁢b+3.135915362
evalf⁡Kr
−0.008550987593⁢b2−0.008550987593⁢c2−0.001731055306⁢b+0.048859583250.01803167490⁢b2+0.01803167490⁢c2+0.03516269174⁢b−0.9924780905−0.003750099818⁢b2−0.003750099818⁢c2−0.01136627340⁢b+0.32081665980.02539384194⁢b2+0.02539384194⁢c2+0.005140709696⁢b−0.07434464063−0.05354861031⁢b2−0.05354861031⁢c2−0.1044225391⁢b+1.5101526060.01113666007⁢b2+0.01113666007⁢c2+0.03375438766⁢b−0.4881539649
sys:-a≔eval⁡sys:-a,x=0:
eigen≔LinearAlgebra:-Eigenvalues⁡sys:-a−sys:-b·Kc
eigen≔−4−b+I⁢c−b−I⁢c
Use ReduceSystem
sys1≔StateSpace⁡Matrix⁡4,0,−3,5,3,0,0,3,1,0,−1,1,0,0,0,0,Matrix⁡5,1,−1,1,3,−1,0,2,6,0,0,z,Matrix⁡1,0,3,5,−3,0,5,7,Matrix⁡1,0,0,0,1,1:
PrintSystem⁡sys1
State Spacecontinuous2 output(s); 3 input(s); 4 state(s)inputvariable=u1⁡t,u2⁡t,u3⁡toutputvariable=y1⁡t,y2⁡tstatevariable=x1⁡t,x2⁡t,x3⁡t,x4⁡ta=40−35300310−110000b=51−113−102600zc=1035−3057d=100011
Get a subsystem considering the first two inputs.
subsys1≔Subsystem⁡sys1,1,2:
PrintSystem⁡subsys1
State Spacecontinuous2 output(s); 2 input(s); 4 state(s)inputvariable=u1⁡t,u2⁡toutputvariable=y1⁡t,y2⁡tstatevariable=x1⁡t,x2⁡t,x3⁡t,x4⁡ta=40−35300310−110000b=51130200c=1035−3057d=1001
p3≔−1+I⋅3,−1−I⋅3,−7+I⋅9,−7−I⋅9
p3≔−1+3⁢I,−1−3⁢I,−7+9⁢I,−7−9⁢I
Get the state-feedback gain for subsys1
Kc≔StateFeedback:-PolePlacement⁡subsys1,p3
Error, (in ControlDesign:-StateFeedback:-PolePlacement) the given state-space realization is not controllable
Remove the uncontrollable states if possible. ReduceSystem will remove the structural uncontrollable states.
rsubsys≔ReduceSystem⁡subsys1,reducedtype=controllable:
PrintSystem⁡rsubsys
State Spacecontinuous2 output(s); 2 input(s); 3 state(s)inputvariable=u1⁡t,u2⁡toutputvariable=y1⁡t,y2⁡tstatevariable=x1⁡t,x2⁡t,x3⁡ta=40−330010−1b=511302c=103−305d=1001
Verify the resulting subsystem is controllable
Controllable⁡rsubsys
true
Desired poles for the controllable subsystem
p4≔−1,−7+I⋅9,−7−I⋅9:
Kc≔StateFeedback:-PolePlacement⁡rsubsys,p4
Kc≔65.5315096910030−75.9744508280598−190.79882159326628.5444171884857−32.6665742925206−82.1138959689399
[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][Ackermann]
LinearAlgebra[SylvesterSolve]
Download Help Document