In this video you will see how to automatically tune the gains of a multivariable fixed structure controller
for a distillation column modeled in Simulink.
To do that, we will use Control System Tuner app.
The distillation column is shown here.
The controlled variables are the concentrations yD and yB of the chemicals D and B,
and the manipulated variables are the reflux L and boilup V.
This process exhibits strong coupling, making it challenging to control.
We can describe this system in this Simulink model.
The model has a fixed-structure controller that consists of 2 PI compensators and a 2 by 2 decoupling matrix.
Our goal is to keep this controller architecture but to tune controller gains to decouple two loops
and provide stable response with a response time of about 10 seconds for each loop.
To do that we need to tune 8 controller gains – 2 gains for each of the PI controllers
and 4 gains for the decoupling matrix.
As you will see, we will do that quickly using Control System Tuner app.
Let’s now go into MATLAB and Simulink and see how this works.
Here is the Simulink model, where we have modeled our distillation column
and created the controller architecture with 2 PI compensators and a decoupling matrix.
The initial gain values are just guesses – proportional gain is set to 1, and integral gain is set to 0.1 for both PI controllers,
and the decoupling matrix is just set to unity diagonal matrix.
As you can see the controller takes D setpoint and B setpoint as inputs and tries to adjust manipulated variables L and V
to have measured concentrations combined in the vector signal y track the setpoints.
So let’s run the simulation with default gain values.
Here are the results.
The red lines are setpoints for D and B, and blue lines are actual concentrations.
As you can see, with default gain values, the controller is not tracking the reference setpoints at all, and is in fact unstable.
Let’s now use Control System Tuner app to tune the controller gains.
To tune our controller, we go to the Tuning tab and specify blocks we want to tune - 2 PI controllers and a decoupling matrix.
Next, we need to specify tuning goals.
In this case let’s use a tuning goal called Quick Loop Tuning.
We need to specify actuator signals (plant input) in our model, and we also specify the sensor signals (plant outputs).
We then specify desired crossover bandwidth.
As we want response time of around 10 seconds, we will specify a bandwidth of 0.5 rad/sec.
We then specify gain and phase margins we want – let’s say 6 dB gain margin and
60 degrees phase margin.
When we click Ok, the tuning goal is created and a plot is added.
In fact, quick loop tuning creates two goals and corresponding plots that we see here.
The first plot shows desired loop shape we want – shown by dashed black line.
As you can see, we basically want an integrator-like loop shape with a crossover that we specified, 0.5 rad/sec.
Blue lines show our current loop gains that don't quite match the desired loop gain.
The second plot shows our stability margin goals. We want our gain margin above 6 dB, and phase margin above 60 degrees.
Let’s now tune by pressing “tune” button. We see that the plots are updated.
The solid black line in the first plot is the loop gain that we have after tuning.
As you see it looks exactly as we wanted – like an integrator that crosses at 0.5 rad/sec.
The red and green lines are corresponding closed-loop transfer functions – transmissibility and sensitivity.
The second plot show that our phase margins are now 90 degrees.
We can now update blocks in Simulink model with tuned values.
Now run the simulation with tuned values, and observe the results.
As we see the controller now provides good reference tracking, and decouples two loops quite effectively.
In summary, this demonstration showed how you can automatically tune the gains of a complex fixed-structure controller
modeled in Simulink.