Sign in to follow this  
Followers 0
Colin Carpenter

Level Control

5 posts in this topic

Hi, I'd like to ask for some advice from the experienced programmers on the forum. I'm currently programming a FX2N plus E700 HMI system to do the following: The system is designed to enable operators at a processing dairy to easily create correctly mixed batches of yogurt, soured cream etc. To do this, the operator selects the product he wants to make and the kgs of the batch that he wants to produce. The system then calculates (using Floating Point maths) the correct volumes of skim, concentrate and cream that need to be blended together to supply an intermediate balance tank (1000 litres capacity) that will then gravity feed to a pasteuriser running at 9000 litres per hour. Each of the three product feeds has it's own pump. control valve and feedback flow meter, which enables a PID loop to be used for each of the 3 produt flows ..... setpoint for each is the relevant determined volumetric flow rate ( so the 3 combined will equal 9000), feedback is the relevant flow rate and the control output is the control valve. No problem so far .... all programmed and ready to run. The thing I can't work out for sure is the way to control the level in the intermediate balance tank. Ideally, I want it to run at 80% full (good head to feed the pasteuriser), but the flow rate in the pasteuriser will never be EXACTLY 9000 lph, and there are times when I need to almost run the tank empty, then build it back to the 80% level (eg at the end of one batch, followed by another). The volumetric ratio of the 3 products must always be the same, regardless of flow rate. I'm tempted to use some simple logic ...... eg, if the tank level is less than 30% and more than 20% then make the combined flow rate, say, 9200 lph, and reduce it as it approaches the desired level, but part of me thinks there must be a PID way of doing this. Any ideas? Thanks.

Share this post


Link to post
Share on other sites
Do you have to maintain precise ratios as the tank is filled? Couldn't you make PID loops for second and third ingredient simply follow the flow of first one? I guess you just have to scale the setpoints. If the flow ratios are 40:37:23 for example, then it would be something like this: SP2=PV1*(37/40) SP3=PV1*(23/40) Where PV is process value (measured by flow meters), SP is setpoint value (target) CV is Control Value (output) etc. Then you only have to tune them properly and control first loop (the 40% one) based on tank level requirements. Do you think this sounds ok?

Share this post


Link to post
Share on other sites
Yes, the ratios have to be precise, but that's not a problem. If the system decides that the flowrate has to be 9000 lph, then it will calculate the flowrates of each of the three and the PID loops will then use these calculated value s to control the flow of each one. What I'm not sure of, is how to determine the total flowrate into the buffer tank of the 3 product flows. For example, if the buffer tank is low, then the level needs to be raised up, so the total flow rate needs to be greater than 9000 lph ( the rate at which it is gravity feeding out of the tank). Conversely, if the level is high, then I need to reduce the total flow rate to less than 9000 lph. The ideal situation would be steady state flow at 80% full buffer tank .... which may or may not be exactly 9000 depending on other factors. If it was a single control valve controlling the feed of a single liquid into the buffer tank, the PV would be liquid level, SP would be required height (80%) and CV would be applied to the control valve (0-1000 bits equivalent to 4-20 mA in my case). PID would work fine. In my case though, I need a PID loop which modifies the 9000 lph flow rate variable, and the rest would then follow. It's the maths to convert the CV into a flowrate that's baffling me a bit. Thanks for your help

Share this post


Link to post
Share on other sites
so we have: - buffer tank, - three ingredients are filling the buffer tank and - feed out rate is controlled by gravity or whatever - each feed into buffer tank is measured by flowmeters and controlled by proportional valve. - desired level in buffer tank is 80% i have nothing to change to my previous post i think i would just make the biggest ingredient the main loop and control it by level as if it was single feed. (i know, you are still in shock). the other two feeds would follow the flow of first feed. this way you keep the ratio fixed regardless if you feed too little or too much. if you fill it faster than it's drained, level will increase. as you approach target level, valve in first loop will close the feed1 and the other two will follow (while maintaining the ratios). i think you are making it complicated by looking into outgoing flow and the figure of 9000lph. it may sound that controlling only one loop by buffer tank level is not right since we feed it from three sources. i think that this is not important since the other two feeds are proportional to the first one - and the ratio is fixed. (well almost..., it might be out of balance while the two slave loops are trying to follow the main one but this is only until they settle). what yogurt you are making so I can avoid it until you are done tuning system? i have sensitive stomach (just kidding)

Share this post


Link to post
Share on other sites
Ah, I see what you mean now. PID Loop 1 would use the tank level as the PV, 80% as the SP and the MV would be fed directly onto the proportional valve of the main ingredient flow. Then read the flow rate of this product, apply the ratio maths to find the flow rate set points for the other 2 products and use PID loops 2 and 3 applied to their respective proportional valves to control their flow rates to the 2 calculated flow set points. Interesting ..... very interesting. Gonna have to think on this a bit more ...... what would happen if any one of the products can be the major constituent? (As is in fact the case) Thanks for that ...... I see what you mean about avoiding the product until the loops are tuned. Historically, I like to tune them with a very relaxed attitude to life, having started the valves in manual close to where I know the valves will end up.

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
Sign in to follow this  
Followers 0