Closed loop control of liquid through a Solenoid Valve

Just had another look, you can also get a meter that gives a 4-20ma output so could be used in conjunction with the flow sensor to give a flow rate rather than a pulse. this takes away the need to calculate the flow rate in the PLC. Did not see this on the first glance. so yes, measure both, control one. providing it is set up correctly and nobody messes with your flow settings then it should work reasonably well even on varying flow rates of the water.
 
From the diagram in the original post it looks to me like both of the valves are proportional valves. This should make things much easier regardless of how the flow requirement is determined.

I would come up with a system that is heavy on feed forwards and controllable in the water path. I would stick with volume ( pulses) and not try to convert to flow rate on the control side. As indicated already, the flow rate calculation will introduce a delay and process noise that you might not want to deal with.

You have a target ratio in mind. When you start dispensing I would open the valves to what should be the desired amount for each of them to produce the correct flow rate at that ratio. Apply scalars to the pulse feedback so the total scaled number of pulses is the same at the desired ratio. Then control the water path on the difference in pulses. This should result in better long-term stability as ANY volume error should be captured and ultimately corrected. As the flows deviates the total volume difference will be an integral of the flow error and will produce a much more stable error to control to.

Why choose the water path to control? As has been said, both systems are gravity fed and will suffer from flow rate changes based on that. However, assuming the diagram is at least somewhat representative and based on the OP saying the water feed if from the plant tank (presumably at a reasonably higher elevation) the water flow will be more consistent over time than the lube flow. This will make the correction much more linear over time as the lube flow is affected by gravity.

Keith
 
Why choose the water path to control?


no particular reason. I am still wondering what sets the overall flow rate: it could be manual; I suspect it is actually sump level, but whether it is bang-bang between high and low level switches, or PID to a setpoint, we do not yet know.


The other question is what is the volume of the sump (time constant = sump volume / flow)? The OP mentions a single CNC machine, so it might not be a huge sump. If the time constant is small, or if the sump level is bang-bang control, then I would not be as interested in ultimately correcting a period of high dosing with a period of low dosing, as I would be in always hitting the target dosing.
 
Last edited:
ditto the placement of the flow sensor up stream and that the coolant should be 'geared' to the water.
It will be easier to get a good reference from the water flow since it is a higher flow.
The water flow will not change that fast so it should be easy to for the coolant flow to track the water flow.

The tricky part will occur from the gains not being linear. The pressure will be proportional to the height of fluid in the tanks and the flow will be proportional to the square root of the level in the tanks. Another thing that can change the gains is if the surface area of the fluids change as the level changes. So it would be best if the level in the water tank was kept relatively constant so the gain is constant. If the water level is controlled by a proportional valve then that will obviously change the flow rates. A feed forward term should be derived from the water tanks proportional valve opening and feed to the coolant system.

Another is the proportional valves. A proportional valve does not mean the flow is proportional to the control signal.

If this was another level control problem I would simply say use a proportional band be done but since this application requires a little precision and finesse I thought I would mention some gotchas.
 
Dear God! I did not expect so many responses.

I request you good people to allow me some time to go through everything. I will revert with a collated post by tomorrow.

Cheers guys.
 
Controlling water versus lube flow brings up an interesting design point, at least to me. Is it easier to control something given a linear correction response to a non-linear error or is it easier to control given a non-linear correction to a linear error (assuming you can't linearise either)? My gut feeling is the former which would lead me to control the water (it's head will remain more stable assuming the diagram is representative) but I might be wrong on that. The problem with that path is that the base flow rate may not end up where you want it.

As far as feed forwards are concerned I would tend to base those off a "virtual master" and just go open loop on one or the other. Conceivably you could trim both independently with this method also.

Keith
 
The OP stated that the cost is a bit high by having two control loops, assuming this is the case then having done similar systems (although with pumps & control valves). the simplest solution is leave the water as is & control the flow of the lube, with a bit of thought it should give reasonable responses and follow the flow of the water, assuming the water tank level is not going to change from full to half empty within a second or two it should be possible for the lube control valve to follow with ease. Again this is assuming the addon meter is used for 4-20ma, I would use this rather than try to convert the pulses into flow in the PLC. PI control should suffice for this application.
Caveats: If the flow of the lube is too small control may be a little difficult.
Assume there is no sudden change in flow rate (with gravity fed this should not be a problem). An empty line (tank empty) will require some alarm handling to stop the process in the event of empty tank or low flow.
 
Originally posted by parky:

the simplest solution is leave the water as is & control the flow of the lube...

I'm not sure this is necessarily true from a raw control standpoint (linear response versus linear error) but it would be by far the less expensive option. The two flow paths have a nearly 100:1 volume ratio so only controlling the lube would be much less expensive, even if you decide to go with a valve that provided significantly more flow than you would need to account for low head cases.

I would still tend toward controlling volume versus flow as a correction. You could do that proportional only and stay on ratio through the majority of the flow. And ultimately you will end up with the correct volume ratio in the sump even if the last little bit isn't actually mixed.

Keith
 
Hi, I think what I would do and it would be nearly foolproof is what was mentioned about batch mixing. Purchase another tank and have a sight glass with graduations or even an inexpensive level sensor. Add whatever amount of water is needed to bring it to the first level, then the other ingredient. One could even purchase a tank with the gallons/litres already shown on the sight glass. There would always be a proper mixture this way. Just a thought hope this helps.
 
If you feed the concentrate with a chemical pump, it will appreciate having a gravity fed source and you can control it quite precisely. If you get a chemical pump with a pulse or analog input, you can wire it straight to the flow sensor from the water feed line and you will get a consistent blend. We do this all the time in water treatment systems, and use peristaltic or diaphragm pumps. If you use a peristaltic, include a leak detector because the pump tubing will wear out at some point and you need to know that.
 
peristaltic Pumps do not fit well with flow meters due to the pulse function, however, the errors that may occur will probably be small. If both lines have flow meters then a batch system is the best, but I think the control of one leg but meter both is probably the most cost effective solution. Variable flow should not be a major problem providing the flow change is not too excessive. I think the trick is to try & adjust the average flow rates so that they finish around the same time (or better still the lube slightly in front of the water). If this is a cutting fluid then the tolerances do not have to be too accurate. Assuming a reasonable control can be achieved, the mix entering the sump of the CNC will mix in it's own right due to the turbulence and pumping of the lube through the system. I would hope the OP has been given a spec on accuracy, it would not be a good idea to take on a project without a specification.
 
There are many other variables to consider BUT based on info provided, here goes....Does the system allow for batch mixing? Can you mix a full batch in your static mixer and then send it all to the CNC sump. If you do this, you can do away with the proportional valves. If the process is critical, I would have flow meters downstream of the valve to monitor flow and/or leaks in the event of valve failure.

Yes the system is a batch "on-demand" dispenser. How would I mix a full batch without proportional valves?
 
To get a correct mix I don't think you have much choice but to control both flow rates, however, if the flow rate of the coolant is reasonably constant then you could just use a controller on the water side, however, this is not ideal and dependent on the accuracy you require. The best solution is if you could dose known quantities into a buffer vessel & then mix. but not knowing your system it is difficult to come up with an accurate answer. If this is just coolant for cutting it probably does not need to be that accurate, however, I'm no expert in cutting fluids so reserve my judgement.

This is what I have been thinking too. Using a controller on the water side and a Peristaltic or Dosing pump with variable flow for the coolant.

Yes mixing accuracy is not very important. I have spoken to a cutting fluid manufacturer who has advised me to target a >80% mixing efficiency.

A separate buffer vessel looks a bit difficult right now. I would very much want to probe the possibility of getting the two liquids mixed inline. If this does not work out, I might go for a mixing tank within my dispenser. The problem being if I have to "charge" up my CNC sump (approx. 500 Litres). I would need a really large mixing tank right?
 
Flow meters after a valve is not a good idea, if it is open ended then flow will tend to be detected as the pipe empties so flow meters should always be upstream of a shut off valve to keep the flow meter full. I have already suggested a buffer tank as I believe the mixer to be in-line so will not hold any real amount. The only other thing I can suggest is that you use manual valves to control the flow of each, batch both solutions at the same time but ensure the lube will finish before the water by enough based on fastest flow, by using batch in parallel it could be possible to tune it fine enough where the water is slightly behind the lube so it adds a small quantity at the end to make up the batch. This does mean a slug of water without lube but should mix quickly in the sump. This way there is no need for PID control, batch i.e. count pulses instead of flow so although not a true mix as the last would be water should work quite well.
Problems with this is someone will decide to alter the manual flow control valves & mess it up but using batch in parallel is a far easier method providing you get the timing right.

Manual valves are not an option at all, sorry.
 

Similar Topics

So it looks like i am stuck with an old reliance DC drive on this project instead of the powerflex dc w/ 22-COMM-E. That being said i am trying to...
Replies
0
Views
1,187
I have just received a RFQ for a closed loop pumping system (hydroforming ). I did a small system like this about 8 years ago in a SLC. It worked...
Replies
3
Views
2,300
Is it possible to operate a unidrive sp in closed loop vector contol to drive a roller that is turning in a cradle type configuration and the...
Replies
2
Views
1,997
Hey guys, Im not sure how appropriate this is for this forum but I have received alot of help from you guys in the past. Im taking industrial...
Replies
4
Views
2,161
HI, i am trying to control DC motor and encoder,by using plc200.cpu222 HSC 0,and analog output card. can you help me by giving me a hint about the...
Replies
2
Views
1,953
Back
Top Bottom