Board Reference

    Flight Controller
    Field Oriented Controller

    Motor Drive

    PMSM

    Motion Control

    Attitude Control

    Tutorial

    Mathematics
    Classical Control
    State Estimation
    Feedforward Control
    Disturbance Observer
    Motion Control

Controller Design

Prepare a disturbance observer

An angular velocity of a rigid body is governed by
Ω˙=Jb1(S(JbΩ)Ω+τa),\begin{align} \dot{\bm{\Omega}}&=\bm{J}_{\rm b}^{-1}\left(S(\bm{J}_{\rm b}\bm{\Omega})\bm{\Omega}+\bm{\tau}_{\rm a}\right), \end{align}
where Ω\bm{\Omega}, Jb\bm{J}_{\rm b}, and τa\bm{\tau}_{\rm a} denote an angular velocity, body inertia, and action torque, and S()S(\cdot) is a skew-symmetric matrix such that S(x)y=x×y (x, yR3)S(x)y=x\times y\ (x,\ y \in \mathbb{R}^3) holds. Let τ\bm{\tau} be the sum of a control input τc\bm{\tau}_{\rm c} and disturbance τd\bm{\tau}_{\rm d}, i.e.,
Ω˙=Jb1(S(JbΩ)Ω+τc+τd).\begin{align} \dot{\bm{\Omega}}&=\bm{J}_{\rm b}^{-1}\left(S(\bm{J}_{\rm b}\bm{\Omega})\bm{\Omega}+\bm{\tau}_{\rm c}+\bm{\tau}_{\rm d}\right). \end{align}
A disturbance observer estimates τd\bm{\tau}_{\rm d} and enable us suppress that effect. To construct the observer, let us introduce extended-state-space representation
ddt[τdΩ]=[00Jb10][τdΩ]+[0Jb1]u+vy=[0I][τdΩ],\begin{align} \frac{d}{dt} \begin{bmatrix} \bm{\tau}_{\rm d} \\ \bm{\Omega} \end{bmatrix} &= \begin{bmatrix} \bm{0} & \bm{0} \\ \bm{J}_{\rm b}^{-1} & \bm{0} \end{bmatrix} \begin{bmatrix} \bm{\tau}_{\rm d} \\ \bm{\Omega} \end{bmatrix} + \begin{bmatrix} \bm{0} \\ \bm{J}_{\rm b}^{-1} \end{bmatrix} \bm{u}+\bm{v}\\ \bm{y} &= \begin{bmatrix} \bm{0} & \bm{I} \end{bmatrix} \begin{bmatrix} \bm{\tau}_{\rm d} \\ \bm{\Omega} \end{bmatrix}, \end{align}
where
uS(JbΩ)Ω+τc\begin{align} \bm{u}&\equiv S(\bm{J}_{\rm b}\bm{\Omega})\bm{\Omega}+\bm{\tau}_{\rm c} \end{align}
and v\bm{v} denotes a process noise that includes perturbation and the derivative of τd\bm{\tau}_{\rm d}. The observable matrix of this extended system is full rank and the observer is able to be constructed:
Ma=[0IJ10] rank(Ma)=6,\begin{align} \bm{M}_{\rm a}&=\begin{bmatrix} \bm{0} & \bm{I} \\ \bm{J^{-1}} & \bm{0} \end{bmatrix}\\ \therefore\ &{\rm rank}(\bm{M}_{\rm a})=6, \end{align}
Since Jb\bm{J}_{\rm b} is known parameter and Ω\bm{\Omega} is measurable, S(JbΩ)ΩS(\bm{J}_{\rm b}\bm{\Omega})\bm{\Omega} can be regarded as an input to the extended system. Following to the Gopinath's method, the minimal-order state observer is obtained as
τ^d=Q(u^sJ^bΩ)Q(sI+ωg)1ωg,\begin{align} \hat{\bm{\tau}}_{\rm d}&=-\bm{Q}(\hat{\bm{u}} -s\hat{\bm{J}}_{\rm b}\bm{\Omega})\\ \bm{Q}&\equiv (s\bm{I}+\bm{\omega}_{\rm g})^{-1}\bm{\omega}_{\rm g}, \end{align}
where Q\bm{Q} and ωgdiag{ωg,i} (i=1,2,3)\bm{\omega}_{\rm g}\equiv{\rm diag}\{\omega_{\rm g,i}\}\ (i=1,2,3) represent the observer gain and relating parameters that specify the cutoff frequencies of disturbance observation. An observation error converges to 0 when the derivative of τd\bm{\tau}_{\rm d} is 0, namely, the observer correctly estimates step disturbance and estimates other disturbance with the variation of a gain and phase.

Construct an acceleration controller

The acceleration control is established using τ^d\hat{\bm{\tau}}_{\rm d}. Let τc\bm{\tau}_{\rm c} be composed of a reference input τref\bm{\tau}^{\rm ref} and τ^d\hat{\bm{\tau}}_{\rm d} as
τc=τrefτ^d.\begin{align} \bm{\tau}_{\rm c}&=\bm{\tau}^{\rm ref}-\hat{\bm{\tau}}_{\rm d}. \end{align}
With this rule, the governing equations are expressed as
sΩ=Jb1(S(JbΩ)Ω+τc+τd)τc=τref+Q(S(J^bΩ)Ω+τcsJ^bΩ),\begin{align} s\bm{\Omega}&=\bm{J}_{\rm b}^{-1}\left(S(\bm{J}_{\rm b}\bm{\Omega})\bm{\Omega}+\bm{\tau}_{\rm c}+\bm{\tau}_{\rm d} \right) \\ \bm{\bm{\tau}}_{\rm c}&=\bm{\tau}^{\rm ref}+\bm{Q}(S(\hat{\bm{J}}_{\rm b}\bm{\Omega})\bm{\Omega}+\bm{\tau}_{\rm c} -s\hat{\bm{J}}_{\rm b}\bm{\Omega}), \end{align}
and we obtain
sΩ=Jb1G(τref+[QS(J^bΩ)Ω+TS(JbΩ)Ω]+Tτd),\begin{align} s\bm{\Omega}&=\bm{J}_{\rm b}^{-1}\bm{G}\left(\bm{\tau}^{\rm ref}+[\bm{Q}S(\hat{\bm{J}}_{\rm b}\bm{\Omega})\bm{\Omega}+\bm{T}S(\bm{J}_{\rm b}\bm{\Omega})\bm{\Omega}]+\bm{T}\bm{\tau}_{\rm d}\right), \end{align}
where
G(QJ^bJb1+T)1TIQ.\begin{align} \bm{G}&\equiv\left(\bm{Q}\hat{\bm{J}}_{\rm b}\bm{J}_{\rm b}^{-1}+\bm{T}\right)^{-1}\\ \bm{T}&\equiv \bm{I}-\bm{Q}. \end{align}
Herein, let us design a reference torque as
τref=J^bαrefS(J^bΩ)Ω,\begin{align} \bm{\tau}^{\rm ref} = \hat{\bm{J}}_{\rm b}\bm{\alpha}^{\rm ref}-S(\hat{\bm{J}}_{\rm b}\bm{\Omega})\bm{\Omega}, \end{align}
where αref\bm{\alpha}^{\rm ref} is an angular acceleration reference. The dynamics is expressed as
sΩ=Hαref+Jb1τe,\begin{align} s\bm{\Omega}&=\bm{H}\bm{\alpha}^{\rm ref}+\bm{J}_{\rm b}^{-1}\bm{\tau}_{\rm e}, \end{align}
where
HJb1(QJ^bJb1+T)1J^bτeGT[(S(JbΩ)S(J^bΩ))Ω+τd].\begin{align} \bm{H}&\equiv \bm{J}_{\rm b}^{-1}\left(\bm{Q}\hat{\bm{J}}_{\rm b}\bm{J}_{\rm b}^{-1}+\bm{T}\right)^{-1} \hat{\bm{J}}_{\rm b}\\ \bm{\tau}_{\rm e}&\equiv \bm{G}\bm{T} \left[ \left(S(\bm{J}_{\rm b}\bm{\Omega})-S(\hat{\bm{J}}_{\rm b}\bm{\Omega}) \right) \bm{\Omega} + \bm{\tau}_{\rm d} \right]. \end{align}
Within the bandwidth of ωgm=min(ωg,i)\omega_{\rm gm}=\min(\omega_{\rm g,i}), HI\bm{H}\approx\bm{I} and T0\bm{T}\approx\bm{0} hold and hence the acceleration control is achieved.

Attitude controller

An acceleration controller using a disturbance observer enables to control angular acceleration. Therefore, a controller design is boil down to calculate a proper acceleration reference. To control an attitude, a feedforward controller and feedback controller that work as
αref=αffref+αfbrefαffref=s2KΦcmdαfbref=Kp(ΦcmdΦ)+Kd(sKΦcmdΩ)\begin{align} \bm{\alpha}^{\rm ref}&=\bm{\alpha}^{\rm ref}_{\rm ff}+\bm{\alpha}^{\rm ref}_{\rm fb}\\ \bm{\alpha}^{\rm ref}_{\rm ff}&=s^2K\bm{\Phi}^{\rm cmd}\\ \bm{\alpha}^{\rm ref}_{\rm fb}&=\bm{K}_{\rm p}(\bm{\Phi}^{\rm cmd}-\bm{\Phi})+\bm{K}_{\rm d}(sK\bm{\Phi}^{\rm cmd}-\bm{\Omega}) \end{align}
is adopted, where Φ=[ϕθψ]T\bm{\Phi}= \begin{bmatrix} \phi & \theta & \psi \end{bmatrix}^{\mathrm T} and KK denote a state that includes the roll, pitch, and yaw angles of a rigid body and command smoother. The smoother KK should have a relative order of 2 to make the controller be proper. Assuming that τe\bm{\tau}_{\rm e} is quite small enough to be ignored, a relation between Φcmd\bm{\Phi}^{\rm cmd} and Φ\bm{\Phi} is expressed as
Φ(s2I+sKd+Kp)1(s2KI+sKKd+Kp)Φcmd=(ID)Φcmd,D(1K)(s2I+sKd+Kp)1(s2I+sKd).\begin{align} \bm{\Phi}&\approx (s^2\bm{I}+s\bm{K}_{\rm d}+\bm{K}_{\rm p})^{-1}(s^2K\bm{I}+sK\bm{K}_{\rm d}+\bm{K}_{\rm p})\bm{\Phi}^{\rm cmd}\\ &=(\bm{I}-\bm{D})\bm{\Phi}^{\rm cmd},\\ \bm{D}&\equiv(1-K)(s^2\bm{I}+s\bm{K}_{\rm d}+\bm{K}_{\rm p})^{-1}(s^2\bm{I}+s\bm{K}_{\rm d}). \end{align}
Since a tracking error cannot be removed due to uncertainty and disturbance, Kp\bm{K}_{\rm p} and Kd\bm{K}_{\rm d} should get the form of a diagonal matrix to decouple the dynamics on each axis. Let us use the generalized form of a gain set that determines the natural frequency and attenuation rate of the closed-loop system:
Kp=diag(ωn,i2)Kd=diag(2ζiωn,i),\begin{align} \bm{K}_{\rm p}&={\rm diag}( \omega_{\rm n,i}^2 )\\ \bm{K}_{\rm d}&={\rm diag}( 2\zeta_{\rm i}\omega_{\rm n,i} ), \end{align}
where ωn,i\omega_{\rm n,i} and ζi\zeta_{\rm i} (i=1,2,3) denote the nominal natural frequency and attenuation rate of the controllers on each axis. In an ideal condition, model fluctuation is small and there is no delay in both thrust control and state observation, the open-loop transfer functions of each axis LiL_{\rm i} (i=1,2,3) are expressed as
Li=s2(2ζiωn,is+ωn,i2).\begin{align} L_{\rm i}=s^{-2}(2\zeta_{\rm i}\omega_{\rm n,i}s+\omega_{\rm n,i}^2). \end{align}
Here, the gain crossover frequencies and the phase margins of each axis ωg,i, pi\omega_{\rm g, i},\ p_{\rm i} (i=1,2,3) are expected to be
ωg,i=2ζi2+1+4ζi4ωn,ipi=tan1(2ζi2ζi2+1+4ζi4).\begin{align} \omega_{\rm g, i}&=\sqrt{2\zeta_{\rm i}^2+\sqrt{1+4\zeta_{\rm i}^4}}\omega_{\rm n,i}\\ p_{\rm i}&=\tan^{-1}\left(2\zeta_{\rm i}\sqrt{2\zeta_{\rm i}^2+\sqrt{1+4\zeta_{\rm i}^4}}\right). \end{align}
A phase margin gets almost 76.35 deg for ζ=1.0\zeta=1.0 and 65.53 deg for ζ=0.707\zeta=0.707. The total phase lag of thrust control and state observation around a frequency band of ωg\omega_{\rm g} is permissible in the range shown above.

© DigitalServo