Jump to content

3 point control of HVAC 3 way valve


Recommended Posts

Hello,

My task is to control 3 way control valve in the boiler house to reach desired water temperature in the boiler house output.

I have a 3 way valve with 3 point control, means that it has 1 digital input for closing and 1 for opening.

Before i had another project with analogue control (0-10V) and i used PID autotune FB to send a signal to the valve according to ambient temperature.

With 3 point control should i use PID autotune output as  PWM FB's  duty cycle  or is it otherwise? 

Face with this type of valve first time, hope for advice, thank you.

Link to comment
Share on other sites

There is an example for PID loop in U90 ladder called "PID with motorized valve". You should check it out.

Idea is to have a register that will contain virtual "position" of the valve expressed in 1/10 of a second (you need to know time it takes for valve to fully open from closed position, this will be PID max output). You will then compare this value with the PID output, if it is smaller than PID you open the valve, if it's larger you close it. You should have a small deadband.

If output for opening the valve is active you increment virtual position register every 10ms (SB7). If output for closing is active you decrement it.

I used this before with Vison and Jazz controllers and it works well.

  • Upvote 2
Link to comment
Share on other sites

  • MVP 2023

Why not just program like a thermostat? Set a minimum temperature and open the valve when the temperature is below the minimum. Close the valve when the temperature is at or above the minimum (or the reverse - not sure what valve you're opening and closing).

 

I would be cautious about using Pulse-Width Modulation on a water valve since you might end up with a lot of water hammer or excess wear and early failure on the valve itself.

Link to comment
Share on other sites

Do you have the make and model of the valve?

Here's my assumption right now.

The valve has an input to open and one to close.  If you apply a signal to open, for 1 second, and then remove signal, does the valve stay open or does it close automatically, in which case, why is there a signal input for close.  In my mind, opening the valve leaves it open until you specifically send a close valve signal.

 

My gut tells me to use the temperature as your variable to control the PID but it may have issues because you need to drive two digital outputs from the PLC for control in the PID loop and I can't see the logic to an effective way to do that in my head yet.  But that's all dependent on how the valve actually runs.

 

*edit*

If all that holds true, then PWM won't necessarily work as intended. 

Link to comment
Share on other sites

  • MVP 2023

Flex has the right approach - PID won't work here.  Our PID is not capable of heat/cool.  You're going to have to write your own control scheme - I've done this with a motorized variac that had a similar control model.

I'd make something with timed pulses to run the valve one way or the other depending how far away from the setpoint you are.  You can roll your own proportional control by varying the amount of time you output to the valve one way or the other based on this.

Joe T.

Link to comment
Share on other sites

  • MVP 2023

Hi all,

I am actually in the large HVAC game, and all of the valves I've encountered similar to what Vamal is describing work via one input moves the valve in the closed direction, and the other moves it in the open direction.  Whilst writing this, Joe's answer has popped up, and he has described a way of doing it.  As he and Isak say, you can do timed pulses and work on theoretical position. 

However, in all of my instances I have given up on the actuator in question as you never really know where the valve is in it's span. I have always changed the actuator to a modulating type, which is generally very easy to do.  I do acknowledge that some of the bigger valves have all of the actuation mechanism as a dedicated part of the valve body.  But nearly all of the 3 ways I see in HVAC have an easily changed actuator.  To save lots of headaches and enable much better control, I strongly suggest changing it.  For most of mine it is a couple of hundred$ max.

There also is the cheaper possiblity that most actuators are able to have an add-on analogue output module attached.  This is another way of achieving the same aim, but you end up needing 2 DOs and 1 AI and it is often easier just to change to the different actuator, which in my cases means I then need 1AO and 1AI.  And for those who puzzle why an AI, my systems always check that the valve in question is responding correctly.

And an FYI edit:  make sure the system is correctly balanced, to ensure smooth temp transitions.

cheers,

Aus

  • Upvote 1
Link to comment
Share on other sites

On 19.9.2016 at 2:58 PM, Isakovic said:

There is an example for PID loop in U90 ladder called "PID with motorized valve". You should check it out.

Idea is to have a register that will contain virtual "position" of the valve expressed in 1/10 of a second (you need to know time it takes for valve to fully open from closed position, this will be PID max output). You will then compare this value with the PID output, if it is smaller than PID you open the valve, if it's larger you close it. You should have a small deadband.

If output for opening the valve is active you increment virtual position register every 10ms (SB7). If output for closing is active you decrement it.

I used this before with Vison and Jazz controllers and it works well.

I have seen the example, thank you. 

So it is not necessary to actually have a physical feedback from the valve? i do not really understand how to implement the virtual position.

Link to comment
Share on other sites

On 19.9.2016 at 9:50 PM, cantcliff said:

Do you have the make and model of the valve?

Here's my assumption right now.

The valve has an input to open and one to close.  If you apply a signal to open, for 1 second, and then remove signal, does the valve stay open or does it close automatically, in which case, why is there a signal input for close.  In my mind, opening the valve leaves it open until you specifically send a close valve signal.

 

My gut tells me to use the temperature as your variable to control the PID but it may have issues because you need to drive two digital outputs from the PLC for control in the PID loop and I can't see the logic to an effective way to do that in my head yet.  But that's all dependent on how the valve actually runs.

 

*edit*

If all that holds true, then PWM won't necessarily work as intended. 

I use the valve Belimo AV230-3, here s the data sheet 

http://www.novreczky.eu/belimo/pdf/av2303.pdf

And yes it has 2 outputs: one for opening and one for closing.

Link to comment
Share on other sites

On 20.9.2016 at 2:12 AM, Ausman said:

Hi all,

I am actually in the large HVAC game, and all of the valves I've encountered similar to what Vamal is describing work via one input moves the valve in the closed direction, and the other moves it in the open direction.  Whilst writing this, Joe's answer has popped up, and he has described a way of doing it.  As he and Isak say, you can do timed pulses and work on theoretical position. 

However, in all of my instances I have given up on the actuator in question as you never really know where the valve is in it's span. I have always changed the actuator to a modulating type, which is generally very easy to do.  I do acknowledge that some of the bigger valves have all of the actuation mechanism as a dedicated part of the valve body.  But nearly all of the 3 ways I see in HVAC have an easily changed actuator.  To save lots of headaches and enable much better control, I strongly suggest changing it.  For most of mine it is a couple of hundred$ max.

There also is the cheaper possiblity that most actuators are able to have an add-on analogue output module attached.  This is another way of achieving the same aim, but you end up needing 2 DOs and 1 AI and it is often easier just to change to the different actuator, which in my cases means I then need 1AO and 1AI.  And for those who puzzle why an AI, my systems always check that the valve in question is responding correctly.

And an FYI edit:  make sure the system is correctly balanced, to ensure smooth temp transitions.

cheers,

Aus

Thank you for your suggestion Aus.

In my case though i have no chance to change the valve and i must work with what i have. 

And ATM the valve only has 2DIs for the open and close commands, Probably buying and additional AO module for the valve may make it simpler. What do you think?

Link to comment
Share on other sites

  • 2 weeks later...
  • MVP 2023

Hi Vamal,

First up, it seems that you are in a bit of a bind with that actuator...it is one of the models in the Belimo range that doesn't have the modulating module option...not all of them do.  However, more later on the fact that it does have a DO module.

Also, just making sure that you understand that I'm not saying change the valve, I'm saying just change the actuator.

If you can just change the actuator have a look at this:  www.belimo.com.au/pdf/e/EV24A-SR-TPC_datasheet_en-gb.pdf

But......you have an actuator that is large, and therefore $ are higher if you choose to change it, which may influence your decision.  But if you stick with Belimo (and I think they are good units) the only way in this size area you will get modulation seems to be to change the actuator.  I would check with your local Belimo to make sure of this.

If you cannot change things at all, you could perhaps add the 2 x DO module.  You could use this to get endpoint signals periodically, say every 24hours, which in theory then let you update your maths every day to work with theoretical position by checking the running time end to end.  If the system has downtime this is simple, if it is on 24/7 then harder, but not impossible.

Theoretical/virtual position is in some ways not necessary anyway, if you move the valve and get the required result then you don't need to know where it is!  But I have always found that modulation makes the process much smoother and is ultimately the easiest to implement.

Check with Belimo, they sometimes have more than the catalogue says!

cheers and good luck...

Aus

  • Like 1
  • Upvote 1
Link to comment
Share on other sites

On 26.9.2016. at 8:24 AM, vamalgise said:

I have seen the example, thank you. 

So it is not necessary to actually have a physical feedback from the valve? i do not really understand how to implement the virtual position.

Your valve takes 150s to fully open/close, in the example 1/10 of a second is used to measure valve position, so its position will be between 0 and 1500. In the PID loop 1500 will be max output  (fully opened valve).

PID output is compared to register that contains virtual position. If PID output is higher than virtual position you open the valve to make this two values equal. While PLC output for opening the valve is active you increment virtual position register every 100ms, while PLC output for closing is active you decrement the same register every 100 ms (SB7).  So virtual position changes every time you open/close the valve.

I don't know how better to explain this concept but the example is very good. It has solved problems for dead band (valve won't move for values less than 1 second) and end positions (in position 0 and 1500 PLC output for opening/clossing remains active for extra 2 minutes to be sure it's in the right position).

Before I started using this method I made some logic that opened and closed valve based on the error. It used pause and active time, if temperature is much lower than setpoint - open valve for, let's say, 3 seconds every 30 seconds, if it's few degrees under open for 1s every 45 seconds, +/-0.5 degrees around setpoint don't do anything. This could be made functional but it always oscillated.

Some PLC manufacturers have function block for three point valve control, maybe it could be implemented in VisiLogic in the future, just a sugestion . It makes life much simpler in these situations.

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...
On 10/7/2016 at 0:30 PM, Ausman said:

Hi Vamal,

First up, it seems that you are in a bit of a bind with that actuator...it is one of the models in the Belimo range that doesn't have the modulating module option...not all of them do.  However, more later on the fact that it does have a DO module.

Also, just making sure that you understand that I'm not saying change the valve, I'm saying just change the actuator.

If you can just change the actuator have a look at this:  www.belimo.com.au/pdf/e/EV24A-SR-TPC_datasheet_en-gb.pdf

But......you have an actuator that is large, and therefore $ are higher if you choose to change it, which may influence your decision.  But if you stick with Belimo (and I think they are good units) the only way in this size area you will get modulation seems to be to change the actuator.  I would check with your local Belimo to make sure of this.

If you cannot change things at all, you could perhaps add the 2 x DO module.  You could use this to get endpoint signals periodically, say every 24hours, which in theory then let you update your maths every day to work with theoretical position by checking the running time end to end.  If the system has downtime this is simple, if it is on 24/7 then harder, but not impossible.

Theoretical/virtual position is in some ways not necessary anyway, if you move the valve and get the required result then you don't need to know where it is!  But I have always found that modulation makes the process much smoother and is ultimately the easiest to implement.

Check with Belimo, they sometimes have more than the catalogue says!

cheers and good luck...

Aus

In my case, Aus, i have a plant where is an old PLC and i have to change it with V570, the principle of the customer is that it worked with old PLC and it has to work with the new one, without any replacement. The process is 24/7 non-stop, it is a district heating gas boiler house. The idea with 2 DO seams logical in case if the actuator does not move exactly as fast as it was designed to.

Thx mate

Link to comment
Share on other sites

  • 3 months later...

Hello everobody!

3 months ago i had finally launched 3 way valve 3 point control as was recommended by Isakovic, implementing virtual position.

The problem i faced was the difference between nominal actuating time (8mm/s, with 40mm nominal stroke=320s) and actual actuating time, which appeared to be  more than that.

The issue was that when outside temperature was very low and water temperature set point was very high, PID was giving CV output 100% which in case of my actuator was set to 3200 (10msec) max PID output. But valve was opened only about 80% and PV was not able to reach SP. 

I increased PID MAX output to 4000 and it seemed to be working well, but virtual position was always a bit bigger than actual and never correct. I had to calibrate it few times.

But one day PID stoped working giving status 5 (set point change in progress) and output went to 0. When i fully opened the valve manually, i calibrated the virtual position again to 100% and so far it works, but i am afraid that it is temporary.

Could you please advice me how can i change my system to avoid the control of the valve by virtual position?

Thank you! Vamal...

Link to comment
Share on other sites

  • MVP 2023
15 hours ago, vamalgise said:

The problem i faced was the difference between nominal actuating time (8mm/s, with 40mm nominal stroke=320s) and actual actuating time, which appeared to be  more than that.

Hi Vamal, welcome to the real world where specifications differ from actual operating conditions.  Even the temperature of the medium alters running times on these things...and load conditions always mean there are varying degrees of flow resistance throughout the circuit.  We've discussed this a bit and you could try the alternative method of timed pulses.

But it also sounds like you have been completely relying on the virtual position.  You need to periodically force the valve to a physical endpoint and then resume your normal process.  And you could build things into your program that check for unusual numbers and self-correct if necessary.

A possible alternative is to implement the 2 DIs and have them not set for endpoints, but measure them between a much smaller span more often.  This wouldn't necessarily affect the output much if you set them close to the normal operational span, it would only take a minute or so to do.  Then adjust your MAX according to whatever the maths works out to be.  The bonus of this method is that you might get one of the DI tripping during your normal operation, which gives you a confirmation of where the valve is physically.     and an edit: don't forget that the switches trip at different points depending on which way the valve is running.

cheers,

Aus

 

Link to comment
Share on other sites

21 hours ago, vamalgise said:

3 months ago i had finally launched 3 way valve 3 point control as was recommended by Isakovic, implementing virtual position.

Oh boy.

Ok, this is how I deal with it. Nevermind the language.

MI210 - PID output
MI263 - Virtual position
MB206 - bit which tells output control subroutine valve is in end position

58996588ca0bd_0Position.PNG.a417beb77319b4de3ff6bcf62f491a69.PNG

When PID is 0 and Virtual position is less than 11, use TD17 to close valve for 1 second every 20 seconds. I have a similar one for 100% PID output.

Link to comment
Share on other sites

1 hour ago, Isakovic said:

Oh boy.

Ok, this is how I deal with it. Nevermind the language.

MI210 - PID output
MI263 - Virtual position
MB206 - bit which tells output control subroutine valve is in end position

58996588ca0bd_0Position.PNG.a417beb77319b4de3ff6bcf62f491a69.PNG

When PID is 0 and Virtual position is less than 11, use TD17 to close valve for 1 second every 20 seconds. I have a similar one for 100% PID output.

As i understood you do not use end switches in your valve, so it is very important to have correct PID output range (according to valve actuating time as you mentioned before).

The thing is that if PID out goes to 0 and virtual position will follow it very fast, it still doesnt guarantee that the valve is in the right place.

And one more question. Why is it important to use pulse output with a gap between the pulses? is it better for the valve mechanism? I only use output as long as it needed without pulses.

Thank you

Link to comment
Share on other sites

7 hours ago, Ausman said:

Hi Vamal, welcome to the real world where specifications differ from actual operating conditions.  Even the temperature of the medium alters running times on these things...and load conditions always mean there are varying degrees of flow resistance throughout the circuit.  We've discussed this a bit and you could try the alternative method of timed pulses.

But it also sounds like you have been completely relying on the virtual position.  You need to periodically force the valve to a physical endpoint and then resume your normal process.  And you could build things into your program that check for unusual numbers and self-correct if necessary.

A possible alternative is to implement the 2 DIs and have them not set for endpoints, but measure them between a much smaller span more often.  This wouldn't necessarily affect the output much if you set them close to the normal operational span, it would only take a minute or so to do.  Then adjust your MAX according to whatever the maths works out to be.  The bonus of this method is that you might get one of the DI tripping during your normal operation, which gives you a confirmation of where the valve is physically.     and an edit: don't forget that the switches trip at different points depending on which way the valve is running.

cheers,

Aus

 

Yes Aus, i was totally dependent on virtual position, without calibrating the value.

I think your idea with auxiliary switch somewhere close to the operating area could be very useful.

Do the valve moves the same distance while the output is active for 1 minute or when the output is active 20 pulses of 5 seconds with lets say 1 second gap?

What do you mean by switch trip?

Link to comment
Share on other sites

  • MVP 2023

Most actuators, even when modulating, dont mind working in tiny increments, that's what they're designed to do.  But I don't understand your maths of 20 x 5 seconds = 1 minute.  ??  Lots of start stop will generally mean similar movement to one long run.

The only way you're going to know where it physically is, is to fit the switches at least.  Then to minimise the total checking time, force the valve whichever direction is theoretically closest to either switch until it trips.  Then go the other way until the other one trips to measure things.  And by "trip" I mean the change of switch state depending on which way you have it set up.  From open to closed, or vice versa.  And my point about valve running direction is important, due to the hysteresis ("deadband") inherent in switches.  If you are running the valve one way the switch might change state at 48%, but if you are running it the other way the same switch might change back at 50%.

And I'd theorise that Isak has answered you on the pulse question already but it hasn't appeared online yet.  Wait.

cheers,

Aus

 

Link to comment
Share on other sites

22 hours ago, vamalgise said:

As i understood you do not use end switches in your valve, so it is very important to have correct PID output range (according to valve actuating time as you mentioned before).

The thing is that if PID out goes to 0 and virtual position will follow it very fast, it still doesnt guarantee that the valve is in the right place.

And one more question. Why is it important to use pulse output with a gap between the pulses? is it better for the valve mechanism? I only use output as long as it needed without pulses.

Thank you

In standard 3 point valves end switches are internal mechanism of stopping the valve, when it comes to end position it will stop moving. They usually don't have connection to external circuits, at least those I used so far don't.

Normal outputs are used for open/close, as you said it gets command to open/close as long as it is needed. Nets 14 and 15 from the picture are used for correction of virtual position because of the valve inertia. Let's say your virtual position goes to 0 but valve has 2mm yet to close, your system maybe won't be able to reach set point. Did you include this possibility in your program, looking at your problem it seems you didn't? If you check U90 example they activate close output for 2 minutes when PID reaches 0 to make sure it is closed, logic I use will send 1 second pulse every 20 seconds (or any other rhythm you see suitable) and the valve will get to 0 position, I find this method more stable (note this function activates when PID output is 0 and virtual position is 1-2%). Valve won't mind getting orders to close if it is already closed. The same goes for fully opened valve.

Do you have certain dead band for valve movement?

If it is possible you could measure the time it takes to open and the times it takes to close as Ausman suggested and modify your logic, but the difference shouldn't be that drastic that basic idea discussed couldn't correct it.

I don't know for better alternative to virtual position if you use valve without analog feedback. This is method other PLC manufacturers that have three step control function blocks use. Before this solution I used pulses where gap between them depended on the difference between SP and PV, but PID is more stable.

On 6.2.2017. at 9:52 AM, vamalgise said:

The problem i faced was the difference between nominal actuating time (8mm/s, with 40mm nominal stroke=320s)

Do you have valve data sheet. What does it say for the units s/mm or mm/s? Check if you calculated moving time right.

Link to comment
Share on other sites

On 8.2.2017 at 4:37 AM, Ausman said:

Most actuators, even when modulating, dont mind working in tiny increments, that's what they're designed to do.  But I don't understand your maths of 20 x 5 seconds = 1 minute.  ??  Lots of start stop will generally mean similar movement to one long run.

The only way you're going to know where it physically is, is to fit the switches at least.  Then to minimise the total checking time, force the valve whichever direction is theoretically closest to either switch until it trips.  Then go the other way until the other one trips to measure things.  And by "trip" I mean the change of switch state depending on which way you have it set up.  From open to closed, or vice versa.  And my point about valve running direction is important, due to the hysteresis ("deadband") inherent in switches.  If you are running the valve one way the switch might change state at 48%, but if you are running it the other way the same switch might change back at 50%.

And I'd theorise that Isak has answered you on the pulse question already but it hasn't appeared online yet.  Wait.

cheers,

Aus

 

Of course 12x5 i meant, my bad.

 

Link to comment
Share on other sites

On 8.2.2017 at 8:42 AM, Isakovic said:

In standard 3 point valves end switches are internal mechanism of stopping the valve, when it comes to end position it will stop moving. They usually don't have connection to external circuits, at least those I used so far don't.

Normal outputs are used for open/close, as you said it gets command to open/close as long as it is needed. Nets 14 and 15 from the picture are used for correction of virtual position because of the valve inertia. Let's say your virtual position goes to 0 but valve has 2mm yet to close, your system maybe won't be able to reach set point. Did you include this possibility in your program, looking at your problem it seems you didn't? If you check U90 example they activate close output for 2 minutes when PID reaches 0 to make sure it is closed, logic I use will send 1 second pulse every 20 seconds (or any other rhythm you see suitable) and the valve will get to 0 position, I find this method more stable (note this function activates when PID output is 0 and virtual position is 1-2%). Valve won't mind getting orders to close if it is already closed. The same goes for fully opened valve.

Do you have certain dead band for valve movement?

If it is possible you could measure the time it takes to open and the times it takes to close as Ausman suggested and modify your logic, but the difference shouldn't be that drastic that basic idea discussed couldn't correct it.

I don't know for better alternative to virtual position if you use valve without analog feedback. This is method other PLC manufacturers that have three step control function blocks use. Before this solution I used pulses where gap between them depended on the difference between SP and PV, but PID is more stable.

Do you have valve data sheet. What does it say for the units s/mm or mm/s? Check if you calculated moving time right.

First of all its s/mm, sorry.

I have 1% deadband for opening and for closing. It is not possible to measure the total time for opening and closing right now, because it is very low temperature outside and if i completely close the valve it is critical for the process, as it is district heating hot water pipe and the valve is very slow. 

Now after reseting the pid and virtual position 1 week ago, the valve operates well and there is no problem. Implementing your part of the programm is good idea, i will try it and see how it will go.

Thank you both Ausman and Isakovic for help

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 7 months later...

I like this thread also. I had to use a 3-point valve because I was an analogue output short. I think I got it to work pretty good. I programmed it so the valve closes for 20 sec extra (total runtime is 30 sec for the valve) every time PID output reaches zero and the virtual position is below 20. It worked almost smoother than a modulating valve. Thank for your advice.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...