simulink model for electrically heated tube

hi
i figured out the equation describing the electrically heated tube which contains the streams going in and out, the temperature loss to the environment and the heat from the electric wire that is placed between the tube and the isolation.
energy budget: P_in-P_out=dE_th/dt
IN:
stream going into the tube: c_p*m_dot*T_in
electric heater: k_tube*A_contact*deltaT_middle1
OUT:
stream going out of the tube: c_p*m_dot*T_out
heat loss from tube to environment: 2*Pi*l*k_tube&isolation*deltaT_middle2
deltaT_middle1=((T_in-T_wire)-(T_out-T_wire))/ln((T_in-T_wire)/(T_out-T_wire))
deltaT_middle2=((T_in-T_environment)-(T_out-T_environment))/ln((T_in-T_environment)/(T_out-T_environment))
P_in=c_p*m_dot*T_in+k_tube*A_contact*deltaT_middle1
P_out=c_p*m_dot*T_out+2*Pi*l*k_tube&isolation*deltaT_middle2
final equation:
dT_out/dt=(c_p*m_dot*(T_in-T_out)+k_tube*A_contact*deltaT_middle1-2*Pi*l*k_tube&isolation*deltaT_middle2)/c_p*m_dot
the temperature of the stream needs to be constant. the temperature of the environment can be viewed as constant. i want to know the difference between the energy consumption of a pid, pi and a bang-bang controller. the controller shall vary the current of the electric heater.

Answers (1)

To find out which one works best simply implement each one in Simulink and log the current to the heater. Compare this for all 3 controllers and you will know which one utilizes the least energy.
You already have a model and the PID blocks have an auto-tune function that should make this relatively simple process.

5 Comments

Your model could contain all 3 controllers but you could run them separately via Conditional Subsystems.
Jack
Jack on 9 Jul 2012
Edited: Jack on 9 Jul 2012
My problem is the connection between the controller that shall vary the current between 0-16A and the temperature of the wire which is now set as a constant.
the equation for T_wire over time is:
U*I=m*c_p*T_dot
(U/m*c_p)*I=T_dot
Ryan G
Ryan G on 9 Jul 2012
Edited: Ryan G on 9 Jul 2012
You should not need any of that extra stuff with a PID controller if you tune it properly. It will all be wrapped in with it, in a sense.
Why is the step 'current'? I would suspect you want to control a temperature correct? I would try this:
1) Step temp reference input directly into summing junction with no gain, minus side of summing junction has the temperature you are trying to control.
2) PID on the output error signal from this junction
3) Connect the output of PID directly into the system where it will control the temp.
4) Use the tune button on the PID controller, if it is discrete make sure the sample time is fast enough to handle the dynamics of the system
The output of the PID will be current. The integrator component of the PID will handle steady state error to achieve the desired temp given a reference temp.
Jack
Jack on 10 Jul 2012
Edited: Jack on 10 Jul 2012
I do not know where to connect it. T_out is the temperature I want to influence and T_wire is the temperature that is influenced by the variation of the current. I give a reverence value for T_out to the controller and in my opinion the output is T_wire.
The output of the controller is going to be current. You will want to connect that wherever the amp input is to the system.

Sign in to comment.

Asked:

on 6 Jul 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!