Partitioned control (stable, nonlinear system)

Differential equation

Define simple second-order differential equation with input f

diffeq = m  x ' '[t] + b  x '[t] + q  x[t]^3 == f ;

Display differential equation

diffeq // TraditionalForm

q x(t)^3 + b x^′(t) + m x^′′(t) f

Numeric system values

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

Zero control (f = 0)

Control input

control = {f0} ;

Simulation length

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

Numerical differential equation solution

fx = x /. (NDSolve[{diffeq, initCond} /. vals /. control // N, x, {t, 0, tmax}] // Flatten)

TagBox[RowBox[{InterpolatingFunction, [, RowBox[{RowBox[{{, RowBox[{{, RowBox[{0., ,, 10.}], }}], }}], ,, <>}], ]}], False, Editable -> False]

Plot solution

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

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

Partitioned control

Partitioned control law

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

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

Corresponding controlled system

controlledSystem = diffeq //. control ;

Display controlled system equation

controlledSystem // TraditionalForm

q x(t)^3 + b x^′(t) + m x^′′(t) q x(t)^3 + 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

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}

Numerical differential equation solution

fx = x /. (NDSolve[{controlledSystem, initCond} /. vals /. gains // N, x, {t, 0, tmax}] // Flatten) ;

Plot solution

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

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

Compare to unforced system

Show[g2, g1] ;

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

Control f

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

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

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


Created by Mathematica  (November 12, 2003)