# trade-off on control performance for system with imaginary conjugate poles

I'm writing a feedback controller for the following SIMO system, where I want to give as input reference position and velocity $$r_{ref}$$, $$v_{ref}$$. The errors on position and velocity will be combined according to a control law in the form

$$u = -k_p(r-r_{ref}) - k_d(v-v_{ref})$$

where $$u$$ is the scalar control signal for the system.

My transfer functions from $$u$$ to $$r$$ is

$$T_{u\rightarrow r} = \frac{a}{s^2+b}$$

and since $$v = \dot{r}$$, I get

$$T_{u\rightarrow v} = \frac{as}{s^2+b}$$.

My question is: how do I understand the performance limits of this type of system? Given the maximum input constraint that I can shape by looking at the K*S transfer function, what else limits this type of system? For example, can I still get reduced steady-state error without violating input constraints and have good stability margins with this control structure, or should I necessarily move to a more complex control structure (e.g., PID or $$H_\infty$$)?

At the moment I'm getting GM = 6dB (which seems fine), but PM = 14°, which is really poor.

Thanks a lot!

• What are the values of $a, b, k_p, k_d$? And what kind of $r_{ref}$, $v_{ref}$ do you want to track (constant, sine, ...)? Apr 2 '20 at 19:27
• Hi @SampleTime a and b are equal to 4 and 6 respectively. Kp and Kd is what I'm computing (in the last example I got kp = 0.78, kd = 1.97. Finally, the reference signal r_{ref} is some sinusoidal with frequency of about 0.1 Hz, while v_{ref} is simply the derivative of that as I said. Do you think that if I add a lead-lag compensator I can drastically improve robustness and performance giving the maximum input? (the maximum input expected for a unitary step input is 2). Thanks! Apr 3 '20 at 0:57
• @SampleTime please share some knowledge! :) Apr 4 '20 at 3:05

For tracking of periodic references you can make use of the internal model principle. Your plant is:

\begin{align} \dot{x} &= A x + B u \newline y &= C x \end{align}

with

\begin{align} A &= \begin{bmatrix} 0 & 1 \newline -b & 0 \end{bmatrix}, B = \begin{bmatrix} 0 \newline a \end{bmatrix}, C = \begin{bmatrix} 1 & 0 \end{bmatrix} \newline x &= \begin{bmatrix} x_1 \newline x_2 \end{bmatrix} = \begin{bmatrix} r \newline v \end{bmatrix} \newline y &= x_1 = r \end{align}

By the internal model principle you should use the information about your reference signal in the controller. You can do that by using the following controller dynamics:

\begin{align} \dot{x}_c &= A_c x_c + B_c e \newline y_c &= C_c x_c \end{align}

with $$\omega_0 = 2 \pi f_0$$ (the frequency of your reference signal),

\begin{align} A_c &= \begin{bmatrix} 0 & 1 \newline -\omega_0^2 & 0 \end{bmatrix} , B_c = \begin{bmatrix} 0 \newline \omega_0 \end{bmatrix}, C_c = \begin{bmatrix} 1 & 0 \newline 0 & 1 \end{bmatrix} \newline x_c &= \begin{bmatrix} x_{c,1} \newline x_{c,2} \end{bmatrix} \newline e &= r_{ref} - y \end{align}

Finally let $$u = -(K x + K_c y_c)$$ where $$K = \begin{bmatrix} k_1 & k_2 \end{bmatrix}$$ and $$K_c = \begin{bmatrix} k_{c,1} & k_{c,2} \end{bmatrix}$$. Put everything together:

\begin{align} \dot{z} &= A_z z + B_z u + B_r r_{ref} \newline y &= C_z z \end{align}

with

\begin{align} A_z &= \begin{bmatrix} A & 0 \newline -B_c C & A_c \end{bmatrix}, B_z = \begin{bmatrix} B \newline 0 \end{bmatrix}, B_r = \begin{bmatrix} 0 \newline B_c \end{bmatrix}, C_z = \begin{bmatrix} C & 0 \end{bmatrix} \newline z &= \begin{bmatrix} z_1 \newline z_2 \newline z_3 \newline z_4 \end{bmatrix} = \begin{bmatrix} x_1 \newline x_2 \newline x_{c,1} \newline x_{c,2} \end{bmatrix} \newline u &= -K_z z \newline y &= z_1 = r \end{align}

Design a controller matrix $$K_z = \begin{bmatrix} K & K_c \end{bmatrix} = \begin{bmatrix} k_1 & k_2 & k_{c,1} & k_{c,2} \end{bmatrix}$$ for $$(A_z, B_z)$$, for example with LQR. This will give you the open loop transfer function from $$r_{ref}$$ to $$y$$:

$$G_o(s) = \frac{b_1 s + b_0}{s^4 + a_3 s^3 + a_2 s^2 + a_1 s + a_0}$$

and

\begin{align} b_1 &= a k_{c,2} \omega_0 \newline b_0 &= -a k_{c,1} \omega_0 \newline a_3 &= a k_2 \newline a_2 &= \omega_0^2 + b + a k_1 \newline a_1 &= a k_2 \omega_0^2 \newline a_0 &= \omega_0^2 (b + a k_1) \end{align} And the closed loop transfer function $$G_{cl} = G_o/(1 + G_o)$$.

We can now insert values: $$a = 4, b = 6, f_0 = 0.1$$. I use the following weight matrices for the LQR design:

$$Q = \begin{bmatrix} 1 & 0 & 0 & 0 \newline 0 & 1 & 0 & 0 \newline 0 & 0 & 1 & 0 \newline 0 & 0 & 0 & 1 \end{bmatrix}, R = 1$$

That gives me $$K_z = \begin{bmatrix} 0.9789 & 1.2204 & 0.0466 & -1.8782\end{bmatrix}$$ using the Matlab lqr function. The overall open loop transfer function is

$$G_o(s) = \frac{4.72 s - 0.1171}{s^4 + 4.882 s^3 + 10.31 s^2 + 6.648 s + 3.797}$$

which has a gain margin of $$20$$ dB and a phase margin of $$65.7^\circ$$. Finally, we can look at the tracking performance:

You can see that both $$r_{ref}$$ and $$v_{ref}$$ are tracked successfully, with the error converging asymptotically to zero and the control input $$u$$ is in the allowed interval of $$-2 \leq u \leq 2$$. Of course that also depends on the amplitude of your reference signal, if it gets larger, $$u$$ will also get larger so this gives you a limit on how large the amplitudes of your reference signal can be.

• Hi @SampleTime thanks a lot! Just a last question. How does the PM change if I have to use the velocity directly as feedback signal together with the position? shall I look at the magnitude MS of the 2x2 S sensitivity transfer matrix and then compute the new margin as PM = asin(1/(2*MS)) ? Because in the design above you're assuming the plant to be purely a SISO, right? Apr 4 '20 at 23:44
• @venom The design above already uses both the position and the velocity for feedback, as it is a full-state feedback controller: $k_1$ is the gain for the position and $k_2$ the gain for the velocity, $k_{c,1}, k_{c_2}$ are gains for the controller dynamics. Apr 5 '20 at 9:32
• cool, thanks a lot! Apr 6 '20 at 1:10