Awilder1015

PIDE instruction help in water blending application

9 posts in this topic

I have an application that I'm having trouble figuring out.

Basically, I want to make an automatic hot/cold water faucet for a beer brewing process. I will have 2 control valves, one for hot water, and one for cold water. The hot water supply will be at about 200F, and the cold water will be around 60F. Each will receive an analog command signal, 0-100%. There will also be a flow meter and a temperature sensor, and these will each generate an analog signal.

There will be 2 different user-settable setpoints: Flow rate and Temperature. The temperature setpoint will always be between 140F and 180F, so a mix of both hot and cold water will always be required. Flow rate will be variable depending on the grains being used and the speed that grain is being added to the process.

I'm imagining that there should probably be two PID loops, using two PIDE function blocks. One will take the Temperature Setpoint, the other will take the Flow rate setpoint. The temperature sensor's analog signal will be the process variable for the Temperature PIDE block, and the flow rate will be the process variable for the Flow rate PIDE block. This all seems fairly straight forward.

The issue comes with deciding how the Control Variables should be set up. Since I have only one temperature PID loop, how can I use the one Control Variable to actuate both valves to hit the temperature setpoint? If I can figure out how one CV can control two valves, how can I use the CV from the flow rate PID loop to then adjust the valves to hit the flow rate setpoint when both valves are already receiving a signal from the temperature PID loop? It seems like the separate PID loops will be fighting each other.

Is there some way around this problem? This might be a good candidate for a Cascaded PID loop, but I'm not sure because the two PID loops are going to be about the same speed.

Thank you for your help!

Share this post


Link to post
Share on other sites

First rule of PID control - keep it simple. :) Off the top of my head I can't see a way around it. You need a specific temperature of water and a specific flow rate.

Something like this might work but something about it bugs me. RO on the bottom line is restriction orifice (to limit the amount of flow. You know the temperature range of the hot supply and the cold side sounded stable. So the cold flow is the wild flow and the hot flow is the controlled flow, classic ratio control...) otherwise you would use two valves, one fail open, one fail closed. High accuracy CAD drawing made with Rapid Scratch and Finger Erase...

p3589848825-5.jpg

Share this post


Link to post
Share on other sites

Hmmm...this is interesting...

Just thinking out loud here, and I don't know how to implement it, but could your temperature loop CV be a proportion of hot to cold water (like 50/50 or 60/40, etc.)? IOW, its output would be 0-100% hot water. The cold water percentage would then be the remainder (100-0%). Then you can increase/decrease both to get the desired flow rate. 

Example: if both hot and cold have the same flow rate at 100% open, and your final flow needs to be 50% with a 50/50 ratio, you would have both hot and cold open to 25%. If you needed a 60/40 ratio, your temperature CV would be 60% and the valves would be 30% and 20% open. Could you multiply the two? So that CVt x CVf = 0.50 x 0.60 = 0.30 signal to the hot water valve.

 

2 people like this

Share this post


Link to post
Share on other sites

Joe,

I like your idea. I'm going to pursue that for now, since if I can get it to work, I won't have to redesign the plumbing. We're going to be retrofitting existing equipment, so the fewer pipe cuts and welds I have to do, the better.

Thanks for your help!

Share this post


Link to post
Share on other sites

Please remember that my post was pretty much just brainstorming. I've never done anything like that before, so I may have steered you down a deep rabbit hole.

1 person likes this

Share this post


Link to post
Share on other sites
40 minutes ago, Joe E. said:

Please remember that my post was pretty much just brainstorming. I've never done anything like that before, so I may have steered you down a deep rabbit hole.

It's a good idea. Water is a wonderful thing. It behaves itself. He'll need to know the flow rate of each stream and the temperature of each stream to make it work. Once he knows that then valve position is just a calculation. It's a perfect application for an AOI.

My example is not without issues. Hysteresis would be a problem. If demand goes up there will be a lag between desired temperature and actual. In the real world would be a volume tank in the middle and possible hot and cold temperature trim lines tying in downstream <-- not a good use of the first rule.

Share this post


Link to post
Share on other sites

I think I'm going to be able to get it to work, but I'm starting to wonder if there might be a different way that hasn't been suggested yet: Modular Multivariable Control (MMC).

There are an inappropriate number of possible inputs and outputs to this function block, and I haven't wrapped my head around how the instruction works, much less if it's the right choice, however it seems promising based on this description from the instruction help:

"The MMC instruction controls two process variables to their setpoints using up to three control variables. The MMC instruction calculates the control variables (CV1, CV2, and CV3) in the auto mode based on the PV1 -SP1, PV2 - SP2 deviation, internal model, and tuning."

and

"The MMC is a flexible model-based algorithm that can be used in two basic configuration modes:

  • Three control variables used to control two interacting process variables
  • Two control variables used to control two interacting process variables

It sounds like this is for this exact application, where there are 2-3 very closely linked PVs, CVs, and SPs. Through some black magic, it seems like this function block can figure out how the different variables are related and control the CVs based on that. Has anyone used this before?

Share this post


Link to post
Share on other sites

I've never heard of the MMC instruction, but it does look tailor-made for what you're doing. It's definitely worth a test.

Share this post


Link to post
Share on other sites

Or you could simple roll your own. It's just water...

THQH + TC QC = Tfinal(QH + QC)

T = Temperature. Doesn't matter what units as long as they are the same.

Q = Flow rate. Doesn't matter what units as long as they are the same.

I might add a bias value to the AOI to allow me to tweak the output plus or minus x%

Or you could spend a bunch of time trying to make a Multivariable Control block do what most modern shower controls do with little to no effort. The MMC is a block used in advanced control applications where inter-controller interactions wreak havoc on the ability to control the process. It's not intended for making hot water...

The 667-YD Fisher control valve is tailor made for this application (it's the part about the first drawing that was missing and that was bugging me).

p3591374779-5.jpg

product-bulletin-fisher-yd-ys-control-valves-en-125150.pdf

Edited by Michael Lloyd
Added spec sheet for valve

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now