12-11-2012 06:54 PM
Awesome! I would think maybe a 2-3% room for error, the second valve (draining valve) would mainly be for going to a lower percentage of water in the desired bucket. Example - If the desired bucket has a 70% water in it, and we enter in 50%, we will need to drain out 20% of the water. Also, due to possible ripples when the water is being transferred, the sensor might pick up a value that is lower than desired, let's say we went 50% of water in the desired bucket, and there is currently 20%, so the top valve (valve that lets water in) turns on - and the sensor measures 40-45% of water due to ripples and once the ripples settles down the actual value is 55%, we may want to drain out some of that excess water to get it to 50%, does that make sense? Or am I over-complicating this? That would just be a simple if-else statement, right?
Right, will be adding some hysteresis type algorithm that will account for maybe 2-3% of error, and yes, only 1 valve will be on at any given time.
Yes, we will have to do some testing and playing around with the numbers to get it exact! We're using 1/2 inch pipe, so we will probably have to shut off the filling valve 2-3% before the desired value.
Programming the logic should be pretty simple, (I think). Any other foreseen issues? Programming in LabVIEW is our weak point, but the logic statements shouldn't be too bad, I was worried because I thought the easiest would be using a PID - But if you're saying scrap the PID, I think it will won't be too painful! :]
12-11-2012 07:23 PM
Sounds like you're at the point where you should start coding and see how it works; it's rarely possible to fully design an algorithm in advance.
I'd try filtering the level measurement and see if you can eliminate the effects of ripples that way first, instead of anticipating overshoot and planning to drain to compensate. It also sounds like this is a simple enough system that you could generate an accurate mathematical model, which makes the control much simpler (your code can calculate how long to open the valve based on how much liquid needs to move). If you can make the model work, then you can use the sensor reading only for fine tuning.
You should be able to get a good start with the information you have. If you're uncomfortable, build it up in stages - for example start with a simple VI that just reads the liquid level, and has on/off buttons for each valve. See if you can can control the liquid level manually, that will give you a sense of what the code needs to do. Feel free to post your code if you have questions about it or get stuck, but make sure your code demonstrates that you've made an effort to do it yourself.
12-11-2012 07:49 PM