LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deadband Zone in tank control

I am trying to create a deadband zone(maybe stability zone is correct terminology) that the output will enter into the zone and hold the valve(keep it from moving) until the PV goes either above or below the zone. Once the PV goes beyond the zone, either above or below, I want the valve to kick back on to bring it back into the zone, and hold again. Basically, I do not want to wear the valve out by constantly keeping it adjusting to the SP. By holding the valve in this zone, I want to be able to extend the life of the valve over time.

Message 1 of 10
(5,299 Views)

Take a look at a VI I posted in this older thread.

 

http://forums.ni.com/t5/LabVIEW/refrigerator-temperature-control/m-p/1096003#M484777

 

It was for temperature control, but the concept is the same.  You may have to invert the action depending on whether you need to turn on the valve when something goes high, or need to turn it on when something goes low.

0 Kudos
Message 2 of 10
(5,268 Views)

Expanding on what RavensFan said, this will provide you with the state of the tank level with the Goldilocks principle: Too High, Too Low, or Just Right

 

deadzone.png

0 Kudos
Message 3 of 10
(5,256 Views)

I was not 100% sure what your algorithm is. It sounds like you want to have the valve wide open when it hits the low level and not shut off until it hits the full tank level. And vice versa: valve closes and stays closed until it hits the low level.

 

That is a little different then a deadzone. My mistake. You don't need the three states in my snippet. RavensFan algorithm is the one to use: 2 states ON/Off with the feedback node from the previous state to determine the present state of the valve.

0 Kudos
Message 4 of 10
(5,241 Views)

Thanks guys. I was looking for a function block for this but if I have more trouble I will post my code.

 

 

0 Kudos
Message 5 of 10
(5,202 Views)

In your example, what is the output in this case? Don't I want my output to be my valve position?

0 Kudos
Message 6 of 10
(5,199 Views)

You said your valve was On/Off.  The output is a boolean.

 

If you need your valve to be something that is position control (e.g. 0-100% open) then you should look at PID control.

0 Kudos
Message 7 of 10
(5,194 Views)

I have already created the PID control for it. But instead of turning off, we want the valve to hold position. Somewhere between 0 and 100 percent. I do not care what position the valve is only that it stops overcorrecting to maintain setpoint. This is to ensure a longer lifespan of the valve. That was my mistake in saying on/off. The position of the valve holds, but it doesn't move as long as we are within the range we want. Because right now, it simply keeps adjusting to maintain the exact setpoint. This is ok but will wear the valve out overtime.

0 Kudos
Message 8 of 10
(5,192 Views)

Use a similar subVI that has shift registers, but make sure the output does not change unless the requested output has a large enough difference from the last output.

 

You could also put some timer mechanism in there so that periodically it updates the output anyway.

 

Another thing you could do is put a filter on the setpoint output.

0 Kudos
Message 9 of 10
(5,188 Views)

I ended up using boolean logic to achieve what I needed. Basically using an SR flip flop to hold valve position and when PV is outside our zone then we do a reset

0 Kudos
Message 10 of 10
(5,149 Views)