Partitioned control (stable, linear system)

Differential equation

Define simple second-order differential equation with input f

diffeq = m  x''[t] + b  x '[t] + k  x[t] == f ;

Display differential equation

diffeq // TraditionalForm

k x(t) + b x^′(t) + m x^′′(t) f

Numeric system values

The values below are exact, because of numeric instability in DSolve[ ]. Use NDSolve[ ] for non-exact values.

vals = {m->1, b1, k1, x01, dx00} ;

Zero control (f = 0)

Control input

control = {f0} ;

Damping ratio and natural frequency

{ζ, ω} /. {ζs, ωs} /. vals

{1/2, 1}

Corresponding roots

roots /. vals

{1/2 (-1 -  3^(1/2)), 1/2 (-1 +  3^(1/2))}

Differential equation solution

fx = ProcessDSolve[{diffeq, initCond} /. vals /. control // N] ; x[t] == fx // TraditionalForm

FormBox[RowBox[{x(t), , RowBox[{RowBox[{1.,  , RowBox[{, ^, RowBox[{(, RowBox[ ... {-, 0.5}],  , t}], )}]}],  , RowBox[{sin, (, RowBox[{0.866025,  , t}], )}]}]}]}], TraditionalForm]

Plot length

RowBox[{RowBox[{tmax,  , =,  , 10.}], ;}]

Plot solution

g1 = Plot[fx, {t, 0, tmax}, PlotStyleBlue, FrameTrue, PlotRangeAll] ;

[Graphics:../HTMLFiles/index_193.gif]

Partitioned control

Partitioned control law

Partitioned control law:
    f = α Overscript[f,^] + β where,
    
    α = m
    β = b Overscript[x, .] + k x
    Overscript[f,^] = -k_px - k_vOverscript[x, .]

control = {fα fp + β , fp -kp x[t] - kv x '[t], αm, βb x '[t] + k x[t]} ;

Corresponding controlled system

controlledSystem = diffeq //. control ;

Display controlled system equation

controlledSystem // TraditionalForm

k x(t) + b x^′(t) + m x^′′(t) k x(t) + b x^′(t) + m (-kp x(t) - kv x^′(t))

controlledSystem = (controlledSystem // Simplify) ; controlledSystem // TraditionalForm

m (kp x(t) + kv x^′(t) + x^′′(t)) 0

Desired controlled system characteristics

The values below are exact, because of numeric instability in DSolve[ ]. Use NDSolve[ ] for non-exact values.

desiredCharacteristics = {ω4, ζ1} ;

Computation of gain values for characteristic equation s^2 + 2ζsω + ω^2 = 0

eqs = {ω (ω/.ωs), ζ  (ζ/.ζs)} ; eqs2 = eqs /.&nb ... 2754;Coefficient[Expand[controlledSystem[[1]]], x '[t]]} ; eqs2 // PowerExpand // TraditionalForm

{ωkp^(1/2), ζkv/(2 kp^(1/2))}

gainsSymbolic = Solve[eqs2, {kp, kv}] // Flatten

{kv2 ζ ω, kpω^2}

gains = gainsSymbolic /. vals /.desiredCharacteristics

{kv8, kp16}

Controlled system roots

controlledCharEq = DiffEqToCharEq[controlledSystem] ; controlledRoots = (s/.#) & /@ Solve[controlledCharEq, s] ;

Display controlled system roots

controlledRoots /. vals /. gains

{-4, -4}

Differential equation solution

fx = ProcessDSolve[{controlledSystem, initCond} /. vals /. gains] ; x[t] == fx // TraditionalForm

x(t) 4 ^(-4 t) t + ^(-4 t)

Plot length

RowBox[{RowBox[{tmax,  , =,  , 10.}], ;}]

Plot solution

g2 = Plot[fx, {t, 0, tmax}, PlotStyleRed, FrameTrue, PlotRangeAll] ;

[Graphics:../HTMLFiles/index_219.gif]

Compare to unforced system

Show[g1, g2] ;

[Graphics:../HTMLFiles/index_221.gif]

Control f

dfx = D[fx, t] ; fn = f //. control /.vals /. gains/. {x[t] fx, x '[t] dfx} ; fn // TraditionalForm

112 ^(-4 t) t - 15 (4 ^(-4 t) t + ^(-4 t))

Plot[fn, {t, 0, tmax}, PlotStyleMagenta, FrameTrue, PlotRangeAll] ;

[Graphics:../HTMLFiles/index_226.gif]


Created by Mathematica  (November 12, 2003)