Controlling coupled ODE

100 Views Asked by At

Suppose I have the following system of ODEs: $$ \frac{\mathrm{dg} }{\mathrm{d} t} = (1-g)(u+Cg) \quad \text{[eq.1]} $$ $$ f = A\frac{\mathrm{d}g}{\mathrm{d}t}-Bu \quad \text{[eq.2]} $$ $$ \text{For A, B, and C are some real constant} $$ In which, $u$, is a signal/function that can be controlled.

The goal is to find $u(t)$, such that $f$ tracks a reference value.

Preferably, I want it so that u(t) is a simple PID control.

However, I struggle to linearized the equations into a linear equation in the standard form, where I could just set the PID to be proportional to some error. It would be great if someone could enlighten me on this.

This is what I have tried so far:

  • Make $g$ the subject in eq.1 and substitute that into eq.2. However, eq.1 is a quadratic in terms of $g$, which gives two expression for $g$, and I'm not sure which one to substitute into eq.2
  • I also tried a different approach, in which, I make u the subject in eq.1 and substitute that into eq.2, however, I get an expression entirely of the variables $f$ and $g$, which has no $u$ in it.

I don't think $u(t)$ is as simple as: $$ u(t) = K_p(r-f) + K_I\int(r-f)dt + K_d(\dot{r}-\dot{f}) $$ because this is kind of a balancing/optimization problem: As $u(t)$ increases, $g$ approaches the value 1 faster, giving the first term in eq.2 to be higher. However at the cost of the second term (-Bu) to also increase. Hence, there is a balance.

Note, that I'm not looking for a constant $u(t)$, because there might be disturbance in the system, in which the value $u(t)$ need to compensate for.

TL;DR: I want $f$ to track a reference value with the control input $u(t)$, but $f$ is not just a function of $u(t)$ but also dependent on $g$. Although $g$ is also dependent on $u(t)$, $g$ is also dependent on $t$, which make me to be confused on how to implement PID control on this coupled system.

1

There are 1 best solutions below

1
On BEST ANSWER

I'll give a high-level guide and maybe that might clarify some steps. It helps to put things in state-space form first. Set the state to be $x(t) := g(t)$ and the output $y(t) := f(t).$ Then

$$ \begin{aligned} \dot{x} &= F(x, u) := (1 - x) (u + C x) ,\\ y &= H(x, u) := A (1 - x) (u + C x) - B u. \end{aligned} $$

Now all you have to do is pick an operating point $(x_0,u_0)$ which describes the set-point you want to achieve. If you want the output to be a specific value $y_0$ (the value of $f$), then solve the last equation for the desired $x_0$ and $u_0$ that achieves this. Upon doing so, you want to linearize the equations on the right about the operating point $(x_0, u_0).$ This is done by defining,

$$ Q := \left.\frac{\partial F}{\partial x}\right|_{(x_0, u_0)},\quad R := \left.\frac{\partial F}{\partial u}\right|_{(x_0, u_0)},\quad C := \left.\frac{\partial H}{\partial x}\right|_{(x_0, u_0)},\quad D := \left.\frac{\partial H}{\partial u}\right|_{(x_0, u_0)}. $$ Set $\delta x := x - x_0,$ $\delta u = u - u_0$ and $\delta y = y - y_0$ which essentially capture deviations from the set-point objective. We can approximate the state-space model describing the evolution of these deviations by,

$$\begin{aligned} \delta \dot{x} &\approx Q \delta x + R \delta u,\\ \delta y &\approx C \delta x + D \delta u,\\ \end{aligned}$$

Once you've done this, you can compute the transfer function from $\delta U(s)$ to $\delta Y(s),$

$$ \frac{\delta Y(s)}{\delta U(s)} = C\left(s I - Q\right)^{-1} R + D $$

and after that it is classical control design. Note that since your original model is nonlinear, you should expect your transfer functions to be different depending on your objective. Once you have designed a specific controller for this plant transfer function, you can return back to solve for the actual control action. The controller for this system would take a reference of $0$ (you want to be at the set-point $y_0$) and an output $\delta y$ and produce a a signal $\delta u.$ To make this into a controller for the original system, you just need to add back $u_0$ in to produce the control signal $u.$