
How can i imply multiple different temperatures to my control circuit in Simulink? (+Feedforward)
22 views (last 30 days)
Show older comments
I'm novice to Matlab and simulink. I'm making a project for a test laboratory. The test laboratory has exhaust fans and big door and that airflow is used to cool down the temperature in test lab during the tests.
I have been using a step as my setpoint during testing now. If i set the step like the real temperature in the lab, the process will still start from 0. How can i set the process begin from which ever number i want. That's the first part. Second question or part would be. How can i imply the outdoor temperature as feedforward in simulink? I haven't found any instructions for such thing.
Is there some setting that i could use that would make it so the simulink knows it's talking about temperature? So if i the laboratory is 80 degrees celsius in the beginning. Outside temperature is -15 and i start to push hot air out of the laboratory and pull cool air in. The system could count the difference? I need to do somekind of calculation for that? How can i imply it in Simulink? Plant block?
0 Comments
Answers (2)
Yifeng Tang
on 26 Nov 2025 at 20:02
This sounds like a typical application area for Simscape, the physical modeling tool inside Simulink. The Gas or Moist Air domain should be able to address the scenarios you described.

You may use a Constant Volume Chamber to represent the volume of air in the lab room, a Flow Rate Source to move air in/out of the lab, Reservoirs to set the outside air conditions, and Temperature Source to model the heat loss through walls. The outside condition can be set in the parameters of the reservoir and temperature source block, and the chamber block will allow you to set initial temperature.
0 Comments
Sam Chak
on 21 Nov 2025 at 12:00
Hi @Teo
I'm not familiar with how your thermal system runs. However, if you have derived the mathematical model, you can construct the blocks in Simulink as illustrated. Do not use the transfer function block (because the process will start from 0 by default). Instead, convert the model to the time domain and provide the initial indoor temperature to the Integrator block externally using the IC (Initial Condition) block. To represent the outdoor temperature throughout the day, you may employ a simple sine function via the Fcn (Function) block and input it into the Add block.
If you want to build a sophisticated thermal control system with the industrial grade specifications for the exhaust fan and all details of the indoor and outdoor environments, build the model using Simscape physical blocks.
Blocks in Simulink (see attached slx file)

Outdoor temperature throughout the day

Indoor temperature throughout the day

0 Comments
See Also
Categories
Find more on Gas Library in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!