ControlDesign
ComputePoles
compute the poles used in an Ackermann pole placement design based on a desired time constant of the closed-loop system
Calling Sequence
Parameters
Options
Description
Examples
ComputePoles(sys, Tc, opts)
sys
-
System; system object
Tc
And(positive, numeric); desired closed-loop time constant (in seconds)
opts
(optional) equation(s) of the form option = value; specify options for the ComputePoles 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 ComputePoles command returns a list of poles needed to design a state feedback controller for sys by pole placement with the Ackermann command. The returned list will contain as many poles as the number of states of sys.
The computation of the poles is done based on the desired time constant, Tc (seconds), of the closed-loop system.
The system sys is a continuous or discrete-time linear system object created using the DynamicSystems package. The system object must have a single input and must be controllable and in state-space (SS) form.
If sys is uncontrollable, try the ReduceSystem command to remove any structurally uncontrollable states of sys.
with⁡ControlDesign:
with⁡DynamicSystems:
Use parameters option
Consider a state-space system corresponding to a DC Motor:
sys_a≔Matrix⁡−dJ,KJ,0,−KL,−RL,0,1,0,0:
sys_b≔Matrix⁡0,1J,1L,0,0,0:
sys_c≔Matrix⁡0,1,0,1,0,0,0,0,1:
sys_d≔Matrix⁡0,0,0,0,0,0:
sys1≔StateSpace⁡sys_a,sys_b,sys_c,sys_d,inputvariable=V⁡t,T⁡t,outputvariable=i_out⁡t,omega_out⁡t,theta_out⁡t,statevariable=ω⁡t,i⁡t,θ⁡t:
PrintSystem⁡sys1
State Spacecontinuous3 output(s); 2 input(s); 3 state(s)inputvariable=V⁡t,T⁡toutputvariable=i_out⁡t,omega_out⁡t,theta_out⁡tstatevariable=ω⁡t,i⁡t,θ⁡ta=−dJKJ0−KL−RL0100b=01J1L000c=010100001d=000000
The numeric values of the model parameters are as follows:
params1≔J=0.01,K=0.01,L=0.5,R=1,d=0.1:
Extract a subsystem with the desired input and output.
subsys1≔Subsystem⁡sys1,1,2:PrintSystem⁡subsys1
State Spacecontinuous1 output(s); 1 input(s); 3 state(s)inputvariable=V⁡toutputvariable=omega_out⁡tstatevariable=ω⁡t,i⁡t,θ⁡ta=−dJKJ0−KL−RL0100b=01L0c=100d=0
Check if the subsystem is controllable:
Controllable⁡subsys1,parameters=params1
true
Compute the poles for a desired time constant of 1 second:
τ≔1:
p1≔ComputePoles⁡subsys1,τ,parameters=params1
p1≔−1.,−1.,−1.
Use the previous results to compute the state feedback gain:
Kc≔StateFeedback:-Ackermann⁡subsys1,p1,parameters=params1
Kc≔36.49000000−4.5000000000.5000000000
Use ReduceSystem
Consider the following state-space system
Am≔Matrix⁡δ,1,−φ,σ,3,0,0,3,1,0,−1,1,0,0,0,0:
Bm≔Matrix⁡5,z,−1,1,3,−x,0,2,y,0,0,z:
Cm≔Matrix⁡1,0,3,5,−3,0,σ,7:
Dm≔Matrix⁡1,0,0,0,1,1:
The numeric values of the system parameters are
params2≔δ=2,φ=7,σ=3,z=4:
Create the state-space model, using the parameters option so that they do not have to be later passed to subsequent function calls as was done in the previous example.
sys2≔StateSpace⁡Am,Bm,Cm,Dm,parameters=params2:PrintSystem⁡sys2
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=δ1−φσ300310−110000b=5z−113−x02y00zc=1035−30σ7d=100011
subsys2≔Subsystem⁡sys2,1:PrintSystem⁡subsys2
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=δ1−φσ300310−110000b=5100c=1035−30σ7d=10
Check if the system is controllable:
Controllable⁡subsys2
false
Observable⁡subsys2
The subsystem is observable but uncontrollable. Try removing structural uncontrollable states
rsys≔ReduceSystem⁡subsys2: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=δ1−φ30010−1b=510c=103−30σd=10
Controllable⁡rsys
Observable⁡rsys
p2≔ComputePoles⁡rsys,τ
p2≔−1.049223528+0.2188673555⁢I,−1.049223528−0.2188673555⁢I,−0.043808373
Kc≔StateFeedback:-Ackermann⁡rsys,p2
Kc≔0.58984464030.1930322270−1.400163308
See Also
ControlDesign[StateFeedback][Ackermann]
Download Help Document