Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

PID Temperature Control

Please login with a confirmed email address before reporting spam

Hey everyone,

I am having trouble with PID control of a gas flow.

Basically I have a pipe (shown as 2D ax) where air flows through it. A heater at the middle of the pipe (domain 2) heats the air to the set point of 70C.


I have the comsol file attached that works which shows the air getting heated. But i want to implement PID control. I tried following the PID reactor control example in the documentation, but can't get it to work. I'm trying to control the temperature of the air by the heat source amount. But if there is another easier way, let me know.


Attached are two files: 1, working heater example. 2, not working...but with attempted PID functions.


Any help would be GREATLY appreciated.


2 Replies Last Post 9 ott 2015, 21:48 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11 giu 2012, 16:01 GMT-4
Hi

one thing to check carefully your pressures. As normally you operate with an absolute pressure defined in the fluid node and gauge differential pressures at the inflow/outflow nodes (at least that is what I have understood, pls check carefully tge doc), I suspect that the material parameters used are the sum of both pressures, hence not exactly what you intendend, or ?

Then to easier select your boundaries, add a new Definitions - View and deselect the Axis node - "Preserve aspect ratio", then re-zoom

Then the main comments for your PID is why do you integrate the inlet temperature bundary "4" and not the outlet temperature boundary "6" ?

Secondary comment: why not set some units to ensure that these are coherent all the way through. To tune your PID, I would start one parameter by one just to check you have all signs OK etc then try to get all three adjusted at best.

Finally, as you do not have a constant flow velocity, and that in 2D-axi you should also consider the loop length 2*pi*r for your integration to get a more representative value for int(T), or use perhaps an average operator, that will anyhow mainly offset your units and your gain PID parameters

--
Good luck
Ivar
Hi one thing to check carefully your pressures. As normally you operate with an absolute pressure defined in the fluid node and gauge differential pressures at the inflow/outflow nodes (at least that is what I have understood, pls check carefully tge doc), I suspect that the material parameters used are the sum of both pressures, hence not exactly what you intendend, or ? Then to easier select your boundaries, add a new Definitions - View and deselect the Axis node - "Preserve aspect ratio", then re-zoom Then the main comments for your PID is why do you integrate the inlet temperature bundary "4" and not the outlet temperature boundary "6" ? Secondary comment: why not set some units to ensure that these are coherent all the way through. To tune your PID, I would start one parameter by one just to check you have all signs OK etc then try to get all three adjusted at best. Finally, as you do not have a constant flow velocity, and that in 2D-axi you should also consider the loop length 2*pi*r for your integration to get a more representative value for int(T), or use perhaps an average operator, that will anyhow mainly offset your units and your gain PID parameters -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 9 ott 2015, 21:48 GMT-4
For PID control, I defined a variable I= It-(T_set-T_m). The expression is that I followed a example. But the expression is wrong. It said "inconsistent unit". Could you please help me?
For PID control, I defined a variable I= It-(T_set-T_m). The expression is that I followed a example. But the expression is wrong. It said "inconsistent unit". Could you please help me?

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.