Output Regulation 

Regulate the height of the liquid in the lower tank whose net flow rate is subject to an exogenous disturbance. The control input is the flow into the upper tank.

Use Bernoulli's law and mass balance to derive the resulting differential equations.

In[1]:=
Click for copyable input
X

Use steady-state operating values .

In[2]:=
Click for copyable input
X
Out[2]=

Define the corresponding nonlinear system with input and output .

In[3]:=
Click for copyable input
X
In[4]:=
Click for copyable input
X
Out[4]=

The feedback law.

In[5]:=
Click for copyable input
X
Out[5]=

The closed-loop system.

In[6]:=
Click for copyable input
X
Out[6]=

A polynomial disturbance is approximated as a piecewise constant function.

In[7]:=
Click for copyable input
X
In[8]:=
Click for copyable input
X
Out[8]=

Assemble the simulation model and simulate the state responses.

In[9]:=
Click for copyable input
X
In[10]:=
Click for copyable input
X

The plot shows that the desired regulation has been achieved.

In[11]:=
Click for copyable input
X
Out[11]=