×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How can I create a basic mathematical model from real life systems?

How can I create a basic mathematical model from real life systems?

How can I create a basic mathematical model from real life systems?

(OP)
In college, a simple transfer function was given and we were asked to tune the PID which is what I am trying to do, I cant do this without the transfer function of the real model and I do not know how to get acquire it myself?

I have a degree in ME, and I am struggling to create a mathematical model to simulate a humidifier in an HVAC system.

The final goal is to model the rate of change of humidity going into a room and being returned through the duct knowing the CFM, air changes per hour, max load of the humidifier, and rate of change in the room itself as the humidifier adds moisture to the air in %RH. (Input to the PID is setpoint in %RH, room %RH being read, and output is amount of humidification to add, based on the valve position... which can be assumed %RH to add to the stream)

TL;DR: How do I model a humidifier in an HVAC system with a transfer function to tune the PID controls?

I assumed that 1/(0.1s+1) would be a simple start for the sensor lag back to the controller, but how do i model the humidity being added to the room (i assumed based on volume, max flow rate from the humidifier or current position, and percent of this air being returned through the duct),

Any help is greatly appreciated!

RE: How can I create a basic mathematical model from real life systems?

RE: How can I create a basic mathematical model from real life systems?

(OP)
I could not figure out how to quote your response above as is always done on forums.

Thank you, system identification is the word I need to start using in my googling.

Those links were helpful, now I suppose you take the laplace? i'd love to see some real examples worked out through matlab or similiar, or by hand.

RE: How can I create a basic mathematical model from real life systems?

I'm assuming the system is already built for the following, as does system identification. If it isn't, you have to model using physics principles, which is much harder, especially since you can't validate the model until the system gets built.
Put your system at the desired operating point in manual mode on all parameters that can affect the humidity - basically air flow and humidity valve position.
In manual on your humidity controller, input a step change in valve position and measure the response of humidity over time until it reaches steady state. The step has to be big enough so you see a response, but not so big you move too far away from your operating point. It might take a couple of attempts to find the right step size. Make sure you're sampling fast enough to see the response curve. Humidity will probably change slowly if the room volume is big enough compared to the input air flow rate, so a slow sampling rate will probably work.
Use that curve to estimate a transfer function model's parameters - a first-order lag plus dead time model will probably suffice. There are a lot of web tutorials now to do this. This TF includes the effects of valve and sensor, so don't worry about modeling those separately.
Use the model parameters to tune the PID according to heuristic tuning rules. Try PI first. Do not use Ziegler-Nichols rules - they might have been first to develop heuristic rules, so they made it into all the textbooks, but their rules are too aggressive and typically lead to a response with too much overshoot and oscillation. I like CHR rules for regulators with 0 % overshoot.
Put all controllers back in auto mode and keep an eye on the humidity over a couple of days. Also keep an eye on the humidity valve position for the same period. If it moves too frequently but humidity is staying in control, detune the controller. You don't want to wear your valve out too fast. If the valve hits its travel limits and humidity goes out of control, make the tuning more aggressive. If PI isn't controlling well, try PID.
If the room volume to flow ratio is too big, it creates a long time constant, and you may have to detune your controller or move on to cascade control.

There are plenty of web tutorials on "PID tuning" if this post didn't help you.

xnuke
"Live and act within the limit of your knowledge and keep expanding it to the limit of your life." Ayn Rand, Atlas Shrugged.
Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.

RE: How can I create a basic mathematical model from real life systems?

(OP)
Thank you!

I used the a first-order lag plus dead time mode all day and tried to model the room, what it turns out is i figured out i modeled the valve delay opening. which is okay.

I am now trying to add transfer functions to simulate the room (probably in feedback based on RH) and mass flow rate of humidity in, and temperature.. much harder..

RE: How can I create a basic mathematical model from real life systems?

You need to collect data of the process then find differential equation that responds the way the actual data or PV did.
https://deltamotion.com/peter/py/SysID%20SOPDT.zip
The link above is a python program that will find the PID gains for a temperature control system.
You will need to edit is so it applies to humidity. Your model is a simple first order model without dead time.
I think you will find a closer model will have more parameters.

There is a text file of data called HotRod.txt. The hotrod was a wood burner tool with a temperature sensor on it. A person on PLCs.net used these small temperature systems to train students.
He send me the data in 2005.
The data consists of 3 columns.
Time, % control ouput, PV or feedback data.
The model for the SOPDT process is well known but there are 5 items that must be calculated or estimated.
The open loop gain, two time constants, a dead time, and an offset. The program tries many iterations trying different combinations of these 5 items until the error is reduced to be small.
One the model is know, it is easy to calculate the controller gains.
Install Anaconda and learn how to use it. It is free and can do the same things as Matlab and more.
https://www.anaconda.com/

I also have a YouTube channel on control theory. My channel is not the typical stuff like this gain do this and that gain does that. It is all about how to apply control theory to real world applications. My YouTube is meant for graduate students and practicing engineers. The first two videos you want to watch is
https://www.youtube.com/watch?v=qzr6eL90Aok
then
https://www.youtube.com/watch?v=lermULNDz3M

In my not so humble opinion, teachers and text books teach control theory wrong.
The should start with system identification.
You can't control what you don't understand.

Quote:


I often say that when you can measure what you are speaking about, and express it in numbers, you know something about it; but when you cannot measure it, when you cannot express it in numbers, your knowledge is of a meagre and unsatisfactory kind.
Lord Kelvin
None of the rest of the crap that is learned is worth anything until system identification is first mastered.

BTW, I generally have have a lot of contempt for mechanical engineers because they too often design stuff without consideration of how it is going to be controlled.
It is good that you are starting out right.











Peter Nachtwey
Delta Computer Systems
http://www.deltamotion.com
http://forum.deltamotion.com/

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources

eBook – How to Choose the Correct Corrosion Testing Method
When designing a metal component, engineers have to consider how susceptible certain alloys are to corrosion in the final product’s operating environment. In a recent study by NACE (National Association of Corrosion Engineers), it was estimated that the direct and indirect costs of corrosion in the United States is approximately 6.2% of the GDP. In 2016, that cost exceeded $1 trillion dollars for the first time. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close