Jeff Plotzke Posted February 27, 2007 Report Share Posted February 27, 2007 This isn't exactly LabVIEW, but hopefully someone has done this... I'm trying to do PID control of a system. The input of the system is two proportional valves -- One valve is a large coarse valve, the other is a smaller fine-tune valve. My system must use these two valves in order to achieve a desired flow of the overall system. My thought is this: I monitor the feedback to see if I'm within x% (x to be determined) of my desired setpoint. If I am not, I set my fine valve to 50% open and adjust my coarse valve using PID until I'm within the x%. Once I get within the x% of the setpoint, I switch over to another PID loop, maintaining the current value of the coarse valve, and use the fine-tune valve to home in on my setpoint. However, if I detect that the setpoint drifts out of the x%, I set my fine valve back to 50% and then re-adjust with my coarse. Both PID loops would be running constantly, however my logic would determine if I use the current values or maintain previous values to the system. My worry is the switch points of this logic -- How will the PID react? My hope is that since I'm constantly inputting and running both PID controls, my output won't jump when switching. I understand that I'll definitely need hysteresis so that my system doesn't switch back and forth at the x% point. Has anyone done anything similar that could give me a few tips? Thanks all! Quote Link to comment
crelf Posted February 28, 2007 Report Share Posted February 28, 2007 Your reasoning looks sane for the most part, but AFAICT, your biggest issue is going to be when switching from fine to coarse: you said: QUOTE ...if I detect that the setpoint drifts out of the x%, I set my fine valve back to 50% and then re-adjust with my coarse Depending on your physical phenomena, that may not be a good idea: imagine if you did this when your fine is at one of the extremes (say, below 10% and above 90%) - you're saying that you want to swing that to 50% - that might not be a good idea and could cause a big change, and maybe even an instability in your system. Your best bet is to know how coarse and fine are relative with respect to each other - ie: fine full scale will be representative to a percentage of the full scale of the coarse: then, when you do swing the fine back to 50% you should simultaneously adjust the coarse to compensate for the instability. For example, if your fine full scale represents 10% of your coarse full scale - if your fine is at 20% and then you want to swing it to 50% without making a change to the output, you'll need to swing your coarse down 30% of 10% (around 3.3%). I'm not 100% that I've been 100% clear - give me a yell if you need me to clear it up. Once you've got the concept down it shouldn't be too difficult to set it up - it's just the relativity that you need to work out. Quote Link to comment
PaulG. Posted February 28, 2007 Report Share Posted February 28, 2007 QUOTE(Jeff Plotzke @ Feb 26 2007, 05:44 PM) This isn't exactly LabVIEW, but hopefully someone has done this...I'm trying to do PID control of a system. The input of the system is two proportional valves -- One valve is a large coarse valve, the other is a smaller fine-tune valve. My system must use these two valves in order to achieve a desired flow of the overall system ... Does this have anything to do with "DP"? (I would Skype you but you're offline. ) Quote Link to comment
Jeff Plotzke Posted February 28, 2007 Author Report Share Posted February 28, 2007 QUOTE(crelf @ Feb 26 2007, 07:57 PM) Your best bet is to know how coarse and fine are relative with respect to each other - ie: fine full scale will be representative to a percentage of the full scale of the coarse: then, when you do swing the fine back to 50% you should simultaneously adjust the coarse to compensate for the instability. For example, if your fine full scale represents 10% of your coarse full scale - if your fine is at 20% and then you want to swing it to 50% without making a change to the output, you'll need to swing your coarse down 30% of 10% (around 3.3%). I'm not 100% that I've been 100% clear - give me a yell if you need me to clear it up. Once you've got the concept down it shouldn't be too difficult to set it up - it's just the relativity that you need to work out. I understand what you're saying -- That's a good idea. I set the fine valve back to 50% so the next time I switch back to fine I have my "full-range" again. My worry was that if I got to a setpoint with a fine valve setting of 10% open or so, then had to jump to my coarse, the next time I jumped back to my fine control, I only had 10% to play with without fully closing the valve and having no where to go. So, while writing this, perhaps it makes since to have it switch when it's a certain delta away from the setpoint. Using an example of the coarse valve supplying a max flow of 100 liters/min and the fine valve supplying 10 liters/min, I want to make sure that I never switch to the fine valve if I'm more than 10 liters/min away from my desired flow. Using a percentage of setpoint may start introducing some problems... Does this make sense? Quote Link to comment
crelf Posted February 28, 2007 Report Share Posted February 28, 2007 QUOTE(Jeff Plotzke @ Feb 27 2007, 11:40 AM) I understand what you're saying -- That's a good idea. I set the fine valve back to 50% so the next time I switch back to fine I have my "full-range" again. My worry was that if I got to a setpoint with a fine valve setting of 10% open or so, then had to jump to my coarse, the next time I jumped back to my fine control, I only had 10% to play with without fully closing the valve and having no where to go. Actually, if your fine setpoint is good at 10% and you know how much 10% of your fine is in relation coarse, then once you've reached your setpoint, you can slowly (relatively speaking ) start bringing your fine back to 50% while adjusting your coarse to compensate - then, if your input changes a little, you're in the best place to be able to adjust for it. QUOTE(Jeff Plotzke @ Feb 27 2007, 11:40 AM) So, while writing this, perhaps it makes since to have it switch when it's a certain delta away from the setpoint... Sounds like you've just had a What you're describing is a simple fuzzy loic system. Oh, and yes, that's indeed a great idea - you could also consider it in the time domain: use your coarse to get it to a "close-enough" value and then switch over to fine - this is certainly different to the process you've already suggested, and it very-much dependson the system that you're working on. Personally, I'd steer away from temporal control and stick with the relative control. QUOTE(PaulG. @ Feb 27 2007, 11:30 AM) Does this have anything to do with "DP"? "DP"? Quote Link to comment
Jeff Plotzke Posted February 28, 2007 Author Report Share Posted February 28, 2007 QUOTE(crelf @ Feb 26 2007, 09:02 PM) Actually, if your fine setpoint is good at 10% and you know how much 10% of your fine is in relation coarse, then once you've reached your setpoint, you can slowly (relatively speaking ) start bringing your fine back to 50% while adjusting your coarse to compensate - then, if your input changes a little, you're in the best place to be able to adjust for it. The "slowly adjusting back the fine valve to 50%" part logic frightens me a bit... especially while doing PID control of the system. I agree that in theory your plan should work fine... but theory never likes to play nice with me... Quote Link to comment
French LVer Posted February 28, 2007 Report Share Posted February 28, 2007 Greetings, I guess i will be OT once again but i use sometimes regulation with two valves. Regulation chosen is based on these two facts : - setting point changes slowly, - and controlled system is quite stable. So i use a loose proportional regulation loop (no I and D) for coarse valve. And fine-tune valve do all regulation job (with mainly integral). This way, there is no need to switch between several settings. Bye. Quote Link to comment
crelf Posted February 28, 2007 Report Share Posted February 28, 2007 QUOTE(Jeff Plotzke @ Feb 27 2007, 01:24 PM) ...but theory never likes to play nice with me... Shelia! QUOTE(French LVer @ Feb 27 2007, 10:45 PM) Regulation chosen is based on these two facts : - setting point changes slowly, - and controlled system is quite stable. So i use a loose proportional regulation loop (no I and D) for coarse valve. And fine-tune valve do all regulation job (with mainly integral). That is indeed a valid control molel :thumbup: , but I don't completely agree with the first of your two "facts": it should work irrespective of the speed of the SP - it's actually the speed of the response of the system to the P control. Quote Link to comment
French LVer Posted February 28, 2007 Report Share Posted February 28, 2007 QUOTE(crelf @ Feb 27 2007, 01:54 PM) That is indeed a valid control molel :thumbup: , but I don't completely agree with the first of your two "facts": it should work irrespective of the speed of the SP - it's actually the speed of the response of the system to the P control. It depends if you need a fast response on a 0 - 100% command. P regulation is loose and I regulation is only on fine-tune valve. Quote Link to comment
Jeff Plotzke Posted February 28, 2007 Author Report Share Posted February 28, 2007 QUOTE So i use a loose proportional regulation loop (no I and D) for coarse valve. And fine-tune valve do all regulation job (with mainly integral). QUOTE It depends if you need a fast response on a 0 - 100% command. P regulation is loose and I regulation is only on fine-tune valve. Thank you both for your help! I do know that the system has a slow response rate; as for stability, I'm not sure. A "fast" response isn't necessary in most cases. So, to make sure I understand completely, I should be able to run control on both valves in parallel, using a P-controller on the coarse valve, and a I-controller (perhaps with a very slight P) on the fine valve. Correct? Quote Link to comment
Grampa_of_Oliva_n_Eden Posted February 28, 2007 Report Share Posted February 28, 2007 My coffe hasn't started to work so this may be in left field... How about using the PID to regulate the error between your set point and the actual and use gain scheduling such that when the error is large, the corse PID values dominate and when the error is small the fine PID dominates. Like I said, pre-coffee idea. Ben Quote Link to comment
French LVer Posted February 28, 2007 Report Share Posted February 28, 2007 QUOTE(Jeff Plotzke @ Feb 27 2007, 02:12 PM) So, to make sure I understand completely, I should be able to run control on both valves in parallel, using a P-controller on the coarse valve, and a I-controller (perhaps with a very slight P) on the fine valve. Correct? Yes Jeff. One PID for each valve in parallel : - Coarse valve PID with a "loose" P (in order to avoid resonance). - Fine-tune valve PID with neat set of PID (in my case, I-parameter is doing all job). Quote Link to comment
LAVA 1.0 Content Posted February 28, 2007 Report Share Posted February 28, 2007 QUOTE(Jeff Plotzke @ Feb 26 2007, 11:44 PM) Has anyone done anything similar that could give me a few tips? Thanks all! Hello Jeff, We made a control system which almost represent your ideas... http://www.ruag.com/ruag/binary?media=130200&open=true''>http://www.ruag.com/ruag/binary?media=130200&open=true' target="_blank">http://www.ruag.com/ruag/binary?media=130200&open=true The control System is used to control 4 hydraulic engines for a wind tunnel model (Airbus A400- almost like the Hercules). 12000 RPM, +/- 10 RPM, 35kW per Engine. We also use proportional valves for fine tunning and a another motor for the "aproximate" adjust of the flow of the 200kW Pump. The proplems you have to solve are quite tricky, you have to care about the levels of the valves and the main flow etc. when you change from the big to the fine tune etc. A further challange was to solve the issue, that we only have one hydraulic pump for 2 hydraulic engines... I would make a slow adjust for the big valve and a fast PID Loop for the fine tunning, but I don't know how fast your control system has to be... Quote Link to comment
crelf Posted February 28, 2007 Report Share Posted February 28, 2007 QUOTE(French LVer @ Feb 28 2007, 12:22 AM) One PID for each valve in parallel :- Coarse valve PID with a "loose" P (in order to avoid resonance). - Fine-tune valve PID with neat set of PID (in my case, I-parameter is doing all job). :thumbup: I agree! Quote Link to comment
Jeff Plotzke Posted February 28, 2007 Author Report Share Posted February 28, 2007 QUOTE(French LVer @ Feb 27 2007, 09:22 AM) Yes Jeff. One PID for each valve in parallel :- Coarse valve PID with a "loose" P (in order to avoid resonance). - Fine-tune valve PID with neat set of PID (in my case, I-parameter is doing all job). Great -- Thanks again for all the suggestions! I think this is how I'm going to implement it. I'll let you know how it turns out! Quote Link to comment
fuzzycontrolfreak Posted March 31, 2007 Report Share Posted March 31, 2007 Hey Jeff, I know it might be too late to share an opinion on this, but after reading thr impressive replies, another idea jumped into my mind, it is as follows, The setpoint fed to the coarse valve shouldn't be the actual, a pseudo set poin might be fed to the coarse controller according to the position of the fine valve. So for example, if the fine valve is at one of its extremes (let's say 90%), a set point higher than the actual one is fed to the coarse valve controller, so on achieving it the fine valve will have to compensate by moving its way back to the desirable 50% position, upon which the set point for the coarse valve coincides with the actual setpoint. This will always try to keep the system at a situation where the fine valve is at the midpoint. I tried to make myself as clear as possible here, i hope you got the idea. And good luck with your project... Quote Link to comment
Anders Björk Posted April 5, 2007 Report Share Posted April 5, 2007 QUOTE(Jeff Plotzke @ Feb 26 2007, 11:44 PM) This isn't exactly LabVIEW, but hopefully someone has done this...I'm trying to do PID control of a system. The input of the system is two proportional valves -- One valve is a large coarse valve, the other is a smaller fine-tune valve. My system must use these two valves in order to achieve a desired flow of the overall system. My thought is this: I monitor the feedback to see if I'm within x% (x to be determined) of my desired setpoint. If I am not, I set my fine valve to 50% open and adjust my coarse valve using PID until I'm within the x%. Once I get within the x% of the setpoint, I switch over to another PID loop, maintaining the current value of the coarse valve, and use the fine-tune valve to home in on my setpoint. However, if I detect that the setpoint drifts out of the x%, I set my fine valve back to 50% and then re-adjust with my coarse. Both PID loops would be running constantly, however my logic would determine if I use the current values or maintain previous values to the system. My worry is the switch points of this logic -- How will the PID react? My hope is that since I'm constantly inputting and running both PID controls, my output won't jump when switching. I understand that I'll definitely need hysteresis so that my system doesn't switch back and forth at the x% point. Has anyone done anything similar that could give me a few tips? Thanks all! Maybe this all to late but, but if a remeber correctly one way to implement this isto use the control error from the controller for the large valve as the variable to control in the controller for the small valve. That is practially your own manual approach with to controller in automatic control. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.