This example shows how to use Simulink® Design Optimization™ to optimize the temperature control of a heat exchanger around a temperature set-point.
The controller regulates the temperature around a setpoint in response to external temperature disturbances. The effect of this disturbance is modeled with an uncertain delay introduced in the Temperature Disturbance Model block.
The temperature controller includes a PI controller along with a feed-forward external temperature measurement. The controller gains are tuned to reduce the effect of external temperature variations by a factor of 50.
Open the heatex_demo model using the command below and run the simulation. The simulation produces an unoptimized temperature variation of the heat exchanger and the initial data for optimization.
Double-click the Scope block to view the unoptimized temperature response, the disturbance signal and the control signal.
Double-click the Heat Exchanger Model block to view the model details. The exchanger is modeled as a first-order system with delay.
Double-click the Max Temperature Variation block to view constraints on the temperature variation of the heat exchanger. This constraint is used to tune the controller parameters.
You can launch a pre-configured optimization task in SDOTOOL by first opening the model and by double-clicking on the orange block at the bottom of the model. From the SDOTOOL, press the Plot Current Response button to simulate the model and show how well the initial design satisfies the design requirements.
The solid line represents the current response with the mean Disturbance Delay as specified in the constraint block. The dashed lines represent the response with the maximum and minimum Disturbance Delay.
We start the optimization by pressing the Optimize button from the SDOTOOL. The plots are updated to indicate that the design requirements are now satisfied.
The solid curve shows the final optimized temperature variation of the heat exchanger.
% Close the model bdclose('heatex_demo')