Linearization of a hydro power plant (Control Theory)

73 Views Asked by At

I am simulating the lagoon of a hydro power plant. To begin with I will simulate it as a water tank problem.

The main objective of this project is to control the height of the lagoon by using a radial gate. The desired height is $$ H_d = 116 \, m \quad \text{above sea level} \qquad \qquad (1) $$

The input flow into the "tank" is chosen first as a constant flow $$ Q_{in} = 500 \, \frac{m^3}{s} \qquad \qquad (2) $$ the output flow is controlled by using a radial gate that is described by $$ Q_{out} = \frac{dV}{dt} = C_g D L \sqrt{2g H_g} \qquad \qquad (3) $$ where $H_g = H- \frac{D}{2}$. This is shown in the image below

enter image description here

by grouping all the constants together as $C_1 = C_g L \sqrt{g}$ and inserting $H_g$ into the equation yields $$ Q_{out} = C_1 D \sqrt{2H-D} \qquad \qquad (4) $$ The differential equation for the lagoon can be written as $$ \dot H = \frac{1}{\rho A} \Big(Q_{in} - Q_{out}\Big) \qquad \qquad (5) $$ where $\rho$ is water density of water with a unit $[kg/m^3]$ and $A$ is the cross sectional area of the water in the lagoon in $[m^2]$. I'm actually not sure yet if the water density $ \rho$ should be included in the equation, so right now I'm using $$ \dot H = \frac{1}{A} \Big(Q_{in} - Q_{out}\Big) \qquad \qquad (6) $$ which gives me more square root looking plot.

Before I design a controller for this system I want to see how it behaves, to do that, I use Matlab. When I choose $D = 2 \, [m]$ as a constant, and the initial height as $H=115.8 \, m$, and plot the height vs. time, over 30 days I get the image below

enter image description here

To simulate this, I made a for loop where I start by calculating equation (3), the output flow. Then I calculate equation (6), and after that I use discrete integral method give by $$ H = H + \dot H \cdot dt \qquad \qquad (7) $$ or in other words $$ H = \int_0^t \dot H \, dt \qquad \qquad (8) $$ or in discrete time $$ H = \sum_{i=0}^t \dot H \, dt \qquad \qquad (9) $$ This is how I get the height in the plot.

Well, now my big problem starts, the linearization. I want to linearize this model, because this model is highly nonlinear.

I started by defining the model as $$ f(H,D) = \dot H = \frac{1}{A} (Q_{in} - Q_{out}) = \frac{1}{A} (Q_{in} - C_1 D \sqrt{2H-D}). \qquad \qquad (10) $$ To linearize it, I set $f(H,D) = 0$ and solve for $H$. $$ \frac{1}{A} (Q_{in} - C_1 D \sqrt{2H-D}) = 0 \\ Q_{in} - C_1 D \sqrt{2H-D} = 0 \\ H = \frac{1}{2}\left(\frac{Q_{in}}{C_1 \cdot D}\right)^2 + \frac{1}{2}D = \frac{Q^2+C^2D^3}{2C^2D^2} \qquad \qquad (11) $$

Now I have stationary values $$ H_0 = \frac{1}{2}\left(\frac{Q_{in}}{C_1 \cdot D_0}\right)^2 + \frac{1}{2}D_0 \qquad \qquad (12) $$

and the deviation from the stationary values is

$$ H(t) = H_0 + \Delta H(t). \qquad \qquad (13) $$

State equation for the system is thus

$$ \Delta \dot H = A \cdot \Delta H + B \Delta D \qquad \qquad (14) $$

where I chose $x = H$ as a state and $u = D$ as a control variable, so $\dot x = \dot H$.

By applying Jacobian, I got

$$ A = \left.\frac{df(H,D)}{dH}\right|_0 = - \frac{D_0 C_1}{\sqrt{2H_0 - D_0}} \qquad \qquad (15) \\ B = \left. \frac{df(H,D)}{dD} \right|_0 = \frac{C_1(3D_0 - 4H_0)}{2\sqrt{2H_0 - D_0}} \qquad \qquad (16) $$

By inserting (15) and (16) into (14), the first order state equation becomes

$$ \Delta H = [- \frac{D_0 C_1}{\sqrt{2H_0 - D_0}}] \Delta H + [\frac{C_1(3D_0 - 4H_0)}{2\sqrt{2H_0 - D_0}}] \Delta D. \qquad \qquad (17) $$

When I choose $D_0 = 4$ (half open gate, the gate can open from 0 - 8.7m), I get $$ H_0 = 16976030400 $$ which is ridiculous number. I also got very weird plot as shown in the figure below. My question is, what am I doing wrong and what should I do to get the correct linearized model so I can start designing a controller for this "water tank".

P.s. the values I get for A and B are $$ A = -5.7143e-04 \\ B = -4.8503e+06 $$

and available measurements are $H$ and $D$. Maybe I am making this more complicated than it is. My idea is to implement PID controller for this gate and there will be more gates in this lagoon.

enter image description here