Sign in to follow this  
Followers 0
BobLfoot

PID Tuning Dilema

20 posts in this topic

I have a process that needs approximately 400# of water at 120 degress. To generate this TEPID water I have a COLD water source at 65F - 72F and a HOT water source at 135F - 145F blended by a PID controlled valve. At 0.00 percent I get COLD in the TEPID blend and at 100.00 percent I get HOT in the TEPID blend. The loop needs to reach temp in 120 seconds once the TEPID flow is opened to the drain before it is diverted into the process. I envision two ways of doing this. 1. Hold the mixing valve at the last known good value during idle time rather than at 0 so that we start close to a value that should work. 2. Employ two gain sets. The first agressively P to get me close to SP and the second a calmer PI setup to hold the tight tolerance of the process. Any PID gurus with input?

Share this post


Link to post
Share on other sites
Well.... how would a human do it. I would open 100% and wait until it felt warmer then throttle back. What happens if you open control valve 100% in manual and hold it for XX seconds, then go to auto with a mildly tuned loop? good luck, Ken

Share this post


Link to post
Share on other sites
Great Idea Ken starting from Hot and working down. Why didn't I think of that approach -- Forest for the Trees. I'm attaching some tuning trends thus far si gurus can see how this performs so far.

Share this post


Link to post
Share on other sites
I'm with Ken on this one, I've had flow loops with similar requirement. Start in manual for xx seconds using a fixed output, either the last running output or just a fixed % , then once stable put pid into auto with mild P & I.

Share this post


Link to post
Share on other sites
Bob, If possible can you include the controlled output on the trends?

Share this post


Link to post
Share on other sites
Wish I could Ken, but CVO isn't in historian yet. Maybe the Engineering team can add it today. here's the first trend working from 100% CVO down. I like it but think P is still too low. It was P=8 ; I=1 ; D=0.01.

Share this post


Link to post
Share on other sites
From the screen shot it looks like to much "P"

Share this post


Link to post
Share on other sites
I am not a PID guy yet, my experience in programming loops is limited so please bear with me if my questions are off base. That said, I look at your chart, and it appears to me like the process goes out of range before making any corrective action. The rate of change seems linear until the threshold is crossed and then the loop makes adjustments. Isn't there a way to develop a rate of change based on direction of change and rate that the change is approaching the limit? I recently did a job where I had to control a process using two variables, one being the output of a device X, and the other being temperature. Max X was at a temp 30 degrees F lower than max Temp, so I had to chase temp based on output using cooling fans on a VFD. I set it up to increment the VFD speed based on differential to 100% of X, and the direction (add or subtract speed) based on temp. It actually worked quite well, only one oscillation from cold start and then fairly linear response after that, but seemed a rather long handed approach.

Share this post


Link to post
Share on other sites
You can calculate an initial position for the valve if your know the source temperatures using sum of products. assume cold water @ 68F and hot water @ 140F X = weight of cold water 400 x 120 = 68X + 140(400-X) solving... X = 111 i.e. 111 lb cold and 289 lb hot - which might translate to 72% open

Share this post


Link to post
Share on other sites
The problem with this is that nowhere does it take into account the final element (control valve). Without know the characteristics of the valve, and therefore it's contribution to loop gain, you can't determine an output requirement. I've used Dynamic Gain calcs to adjust the gain dependent on a variable such as speed, pressure, and delta P. The calc is based on y=Mx+B Another idea is to use a simple bit of logic to step the valve open or closed based on whether the temp is above or below setpoint (plus or minus some deadband). I have used some compares, timers, and add/subtracts to increment the loop output up or down as needed. The tuning parameters are the amount to increment and the time between increments. I tried to find an example but it's been a long day and I'm too tired to look for it aggressively.

Share this post


Link to post
Share on other sites
I am always watching. I would bias the PID with an offset of 100*(120-70)/(140-70)% control output. It can be even more accurate if you know the exact hot and tepid temperatures. I chose 70 as the average tepid temperature and 140 as the average hot temperature. You should be able to get by with just a P gain but using the integrator will help make the time constant precise. If you want the to get with 1% of 120 degrees in 120 seconds the integrator time constant must be about 24 seconds. An exponential process will get with 1% in 5 time constants and 5 times 24 = 120 seconds. It would be good to know what you are using for your gains. Do you understand how I calculated the bias?

Share this post


Link to post
Share on other sites
Peter -- I "hacked" this system to working reasonably well, but don't mind learning more from an expert of your caliber. The system presently starts with the valve at 100% hot and moves toward cold. I did this because starting from 100% cold and working toward tepid took far too long to get stable. THe PID is an Allen Bradley RSlogix 5000 PID Instruction in Dependent Mode. P=8, I=1 and D=0.01. Goal is to be +/- 5% of 120 in 120 seconds. Getting there ins 30 or 60 seconds would be even better, but not critical. The Instruction Update Time right now is 1 second. Not to be dense but Tine constant of 24 seconds?? No idea where that came from. Unless you somehow calculated the time of the waveforms I posted.

Share this post


Link to post
Share on other sites
It looks like a few of us have come up with the same bias idea. I don't see why the temperature isn't exact almost immediately if there is no water in the vessel to start with.

Share this post


Link to post
Share on other sites
Maybe this will explain, maybe not. The layout is something like this. Hot Water ON/OFF Solenoid Valve is 10 foot before Mixing Valve. Cold Water ON/OFF Solenoid Valve is 10 foot before Mixing Valve. Mixing Valve is located at point we'll call 00 feet. The RTD is 2 foot from the mixing valve down the copper line. The divert to drain / divert to vessel valve is another 30 foot beyond the RTD. The pipe section with the RTD usually remains filled with water between fill calls. Even with the valve at 100 percent hot it takes time for the pipe and water at the RTD to reach or exceed Setpoint sometimes as much as 20 seconds. Probablt not the ideal piping setupm but what I've got to live with.

Share this post


Link to post
Share on other sites
The designers should be fired. I see to many systems that are designed without a thought as to how they are going to be controlled. Sure they can be controlled but all the extra effort often cost more than simply designing the system right in the first place.

Share this post


Link to post
Share on other sites
How often is the water needed? If it is continuous use, then having it flow in a loop maintaining temp. With an instruction to start when temp. is reached. This is how we do it with a heat tunnel. Easy to maintain than to gain a target.

Share this post


Link to post
Share on other sites
The water is need for approximately 2 minutes of each hour or two when making one particular product which is not made day in and day out unfortunately. There are already two other continuous temp loops in this area like you mention, but they run at different temps and higher usage rates to make it practical to ahve them.

Share this post


Link to post
Share on other sites
I would look into running a cold water supply to a TANKLESS WATER HEATER set to the desired temperature and control the valve between the heater and the point of need. No loop needed. No time lost in waiting for temperature to be gained. Tidy setup. Edited by jagwinn

Share this post


Link to post
Share on other sites
From what Bob says it isn't that simple. The water must heat the surrounding metal too.

Share this post


Link to post
Share on other sites
Sounded good to me also until I started checking specs. This web page http://tanklesswaterheaterguide.com/ indicates flow rates in the 2 - 5 gallon per minute range. Our current system for all it's foibles delivers the required 310 pounds {ie. 38 gallons} in two minutes or less. Thats 20 gallons per minutes. So unless I want 4 or 5 tankless units in parallel and the cost of plumbing and wiring them, If I spend money at all I'd add another temperate lioop at this desired temp. Unfortunately the ROI isn't there for it just now.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0