determine the closed-loop equations of a system with state feedback controller - MapleSim Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : MapleSim Toolboxes : MapleSim Control Design Toolbox : ControlDesign Package : System Manipulation : ControlDesign/StateFeedbackClosedLoop

ControlDesign[StateFeedbackClosedLoop] - determine the closed-loop equations of a system with state feedback controller

Calling Sequence

StateFeedbackClosedLoop(sys, Kc, opts)

Parameters

sys

-

System; system object

Kc

-

Matrix; state feedback gain

opts

-

(optional) equation(s) of the form option = value; specify options for the StateFeedbackClosedLoop command

Description

• 

The StateFeedbackClosedLoop command calculates the closed-loop system equations of the state feedback controller with Kc gain and plant sys.

• 

When the option Kr is specified, the state feedback controller is governed by the control law  uc=Kc.x+Kr.r, where x is the state vector of sys, r is the reference vector, Kc is the feedback gain and Kr is the direct or feedforward gain.

• 

The sys is a SISO (single input, single output) or MIMO (multiple input, multiple output) linear system object created using the DynamicSystems package. The system object can be of types: transfer function (TF), zero-pole-gain (ZPK), coefficients (Coeff), state-space (SS), and diff-equation (DE). It is assumed that the state feedback controller gains are obtained using the sys representation obtained by DynamicSystems[StateSpace].

• 

The StateFeedbackClosedLoop command returns a system object whose type is the same as the type of sys, unless the option outputtype is specified.

• 

The closed-loop system inputs are

– 

the reference inputs r=y_ref (when a non-zero Kr Matrix is specified)

  

The reference vector r contains a reference signal for each sys output y.

• 

The closed-loop system outputs are

– 

the outputs y of sys 

– 

the controller outputs uc (if augment_output = true)

Examples

withControlDesign:

withDynamicSystems:

A DC motor with stator inductance L, stator resistance R, electromotive force (emf) constant K, rotor moment of inertia J, and damping ratio b is modeled using the following differential equations.

eqsLⅆⅆtit+Rit=VtKwt,Jⅆⅆtwt+bwt=KitTt:

The input variables are the source voltage Vt and the torque load Tt, and the output variables are the rotor angular speed wt and the stator current it.

sysdeDiffEquationeqs,':-inputvariable'=Vt,Tt,':-outputvariable'=wt,it:

In state-space form:

sysStateSpacesysde:

PrintSystemsys

State Spacecontinuous2 output(s); 2 input(s); 2 state(s)inputvariable=Vt,Ttoutputvariable=wt,itstatevariable=x1t,x2ta=RLKLKJbJb=1L001Jc=0110d=0000

(1)

For control, the controlled input is the voltage Vt and the controlled output is the DC motor speed wt. The corresponding subsystem is obtained.

sysSubsystemsys,1,1:

PrintSystemsys

State Spacecontinuous1 output(s); 1 input(s); 2 state(s)inputvariable=Vtoutputvariable=wtstatevariable=x1t,x2ta=RLKLKJbJb=1L0c=01d=0

(2)

Designing the state feedback controller with gains Kc and Kr (u=Kc.x+Krr) by  pole placement with desired poles p1 and p2.

Obtaining the feedback gain Kc:

Kc,KrStateFeedback:-PolePlacementsys,p1,p2,'return_Kr'

Kc,Kr:=JLp1+JLp2+JR+LbJJ2Lp1p2+JLbp1+JLbp2JK2+Lb2JK,LJp1p2K

(3)

The closed-loop equations of the state feedback control system are obtained next.

clsysStateFeedbackClosedLoopsys,Kc,':-Kr'=Kr:

PrintSystemclsys

State Spacecontinuous1 output(s); 1 input(s); 2 state(s)inputvariable=w_reftoutputvariable=wtstatevariable=x1t,x2ta=RL+JLp1+JLp2+RJ+bLLJKLp1p2J2L+p1bJL+p2bJLK2J+b2LLJKKJbJb=Jp1p2K0c=01d=0

(4)

Using outputtype and augment_output, the transfer function of closed-loop system is obtained.  The output vector will contain the controller output Vt.

clsys1StateFeedbackClosedLoopsys,Kc,':-Kr'=Kr,':-outputtype'=tf,':-augment_output'=true:

PrintSystemclsys1

Transfer Functioncontinuous2 output(s); 1 input(s)inputvariable=w_refsoutputvariable=ws,Vstf1,1=p1p2s2+p1p2s+p1p2tf2,1=LJp1p2s2+p1p2RJ+Lbs+p1p2K2+RbKs2+Kp1p2s+Kp1p2

(5)

Assign numerical values for the parameters:

paramsJ=0.01,b=0.1,K=0.01,R=1,L=0.5:

Next, the numeric values for the desired poles are obtained. For 0.1% overshoot, settling time of about 1 sec, the damping ratio Z  and the natural frequency ω are defined as follows:  

Z0.98:ω5Z:

polessolves2+2Zωs+ω2,s:

p1poles1;p2poles2

p1:=4.999999998+1.015293305I

p2:=4.9999999981.015293305I

(6)

Then, the numeric values for the feedback gain Kc and the feed-forward gain Kr are:

Kcmapsimplify,evalKc,params,'zero'

Kc:=1.00000000213.00541026

(7)

Krmapsimplify,evalKr,params,'zero'

Kr:=13.01541024

(8)

clsysStateFeedbackClosedLoopsys,Kc,':-Kr'=Kr,':-parameters'=params:

PrintSystemclsys

State Spacecontinuous1 output(s); 1 input(s); 2 state(s)inputvariable=w_reftoutputvariable=wtstatevariable=x1t,x2ta=3.99999988687227410-926.030820521.010.0b=26.030820480.0c=0.01.0d=0.0

(9)

Plotting the closed-loop system step response:

ResponsePlotclsys,8Step,'duration'=10,'numpoints'=200,'labels'=t,DC Motor Rotational Speed,'labeldirections'=horizontal,vertical,'gridlines'=true,'view'=0..10,0..10

Obtain the properties of the step response such as steady-state value and settling-point.

propStepPropertiesclsys

prop:=1.,0.103866687817983,0.100000000000000,0.231175892242102,0.333333333333333,0.441908334624695,0.666666666666667,0.742737847117827,0.900000000000000,undefined,undefined,1.09872655595021,0.980000000000000

(10)

plots:-displayplotprop2..7,'style'=point,'symbol'=cross,'color'=blue,'symbolsize'=30,plot0,prop1,10,prop1,'color'=gray,ResponsePlotclsys,Step,'duration'=10,'numpoints'=200,'gridlines'=true,'title'=Step response,'labels'=t,DC Motor Rotational Speed,'labeldirections'=horizontal,vertical,'view'=0..10,0..1.2

See Also

ControlDesign, ControlDesign[LQR], ControlDesign[StateFeedback], ControlDesign[StateFeedback][Ackermann], ControlDesign[StateFeedback][PolePlacement]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam