Hi dear all

I want to use an MPC controller for a two-tank system. The tanks are connected with two pipes in different heights. The tank1 is filled with a continuous pump and an output pipe is connected to the tank2. Stability, constant continuous output and predefined height of liquid in tanks are aims of control.

the MPC function block is written with YALMIP language with Mosek solver.

I use feedback of heights (h1, h2) to the MPC function Input (fig.1) and two errors “Invalid setting for output port dimensions of 'p17__2/Mux1'. The dimensions are being set to 1. This is not valid because the total number of input and output elements are not the same” and “Error in port widths or dimensions. Input port 1 of 'p17__2/MPC1' is a one dimensional vector with 1 elements” are showed. But when I use a signal source instead of h1, h2 no error is occurred (fig.2).

Can you anyone advise me about my mistake?

Thanks a lot.

More Mohamad Bita's questions See All
Similar questions and discussions