You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old February 14th, 2021, 12:10 PM   #61
Mispeld
Member
United States

Mispeld is offline
 
Mispeld's Avatar
 
Join Date: Feb 2017
Location: VA
Posts: 528
The attached workbook is an approach to suggestion #1 in the previous post. The optimization might work better with the fitted data, and without compromising results. If a negative CV is a problem, it can also be offset (i.e., CV Mod+ column).
Attached Files
File Type: xlsx TankFit.xlsx (363.7 KB, 5 views)
__________________
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." -Stephen Hawking
  Reply With Quote
Old February 14th, 2021, 01:46 PM   #62
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Quote:
Originally Posted by Mispeld View Post
Two suggestions: (1) apply smoothing functions to the plant data, and add a CV offset to create a smooth bottom to its oscillation instead of the discontinuity at zero, and (2) force a first order w/ deadtime system so there are only three optimization parameter (if I understand correctly), and run a series of evenly-spaced grid "searches," and then plot the objective on a series of 3D plots to visually interpret the "surfaces" that simplex is operating on. This may help guide the starting values to find the minimum objective of interest.
For the PV being sent to the PID I am running it through a 10 second filter and then truncating the output to 2 decimal places. (00.00). I do this because the filter output is a 7 decimal place REAL that moves frequently in either direction and produces undesirable effects on the PID CV.

I can change that CV output to not bottom out at zero, this will also have the effect increasing the deadtime as it will take longer for the valve to open enough to send cooling. However I think that having it not bottom out is a good step forward.

Regarding the TankFit document you posted, I see that the graph has averaged in the datapoints but what am I really looking at here?
  Reply With Quote
Old February 14th, 2021, 04:42 PM   #63
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,339
Quote:
Originally Posted by GrizzlyC View Post
I can change that CV output to not bottom out at zero, this will also have the effect increasing the deadtime as it will take longer [because of reset wind up?] for the valve to open enough to send cooling. However I think that having it not bottom out is a good step forward.

There should be no reset wind up in the PIDE if the CV minimum value is accomplished by either
  1. seting the PIDE the CV minimum value (CVEUmin?),
  2. OR
  3. adding 1 to the PIDE output CV value, but doing the adding external to the PIDE, so 0 by the PIDE becomes 1 to the CV conversion and everything downstream

Last edited by drbitboy; February 14th, 2021 at 04:48 PM.
  Reply With Quote
Old February 14th, 2021, 04:49 PM   #64
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,339
Quote:
Originally Posted by GrizzlyC View Post
For the PV being sent to the PID I am running it through a 10 second filter and then truncating the output to 2 decimal places. (00.00). I do this because the filter output is a 7 decimal place REAL that moves frequently in either direction and produces undesirable effects on the PID CV.

The Kc (proportional gain) and/or Kd (derivative gain) are too high and/or the deadband is too small.
  Reply With Quote
Old February 14th, 2021, 05:59 PM   #65
Mispeld
Member
United States

Mispeld is offline
 
Mispeld's Avatar
 
Join Date: Feb 2017
Location: VA
Posts: 528
Quote:
Originally Posted by GrizzlyC View Post
For the PV being sent to the PID I am running it through a 10 second filter and then truncating the output to 2 decimal places. (00.00). I do this because the filter output is a 7 decimal place REAL that moves frequently in either direction and produces undesirable effects on the PID CV.

I can change that CV output to not bottom out at zero, this will also have the effect increasing the deadtime as it will take longer for the valve to open enough to send cooling. However I think that having it not bottom out is a good step forward.

Regarding the TankFit document you posted, I see that the graph has averaged in the datapoints but what am I really looking at here?
Considering a process lag in the 10's of minutes, a filter with a 10-second time constant is not unreasonable. That is kind of long in my experience for dealing with instrumentation noise. Regardless, unless I am missing something, the rounding of the CV to integer values prevents excessive valve reversals; though I could imagine the occasional issue with CV "noise" when it moves through the round-off point (this actually happens in the dataset at around 40000 seconds elapsed time when it flips between 6% and 7%.)

Maybe there is a misunderstanding with respect to CV scaling and the valve positioner. I am assuming a CV = 0 means the valve is fully closed, and coolant flow is stopped. Or if not fully closed, a minimum opening allowed for equipment or safety requirements. With the current tuning there are times when the controller wants a negative valve position, which, if real, would recover temperature more quickly toward target. The suggestion is to continue allowing CV to reach zero, but with some equipment/process change that results in less heat removal than the current zero point.

Finally the TankFit dataset are sinusoid models applied to the CV and PV time series as if the CV could go negative. So it is more like "eyeball averaging" in selecting the model variables to give the best visual fit. In retrospect the amplitude of the PV model might be a bit too large because if the CV could go negative, as mentioned above, the PV would have reversed sooner, without the v-shape.

Regarding suggestion #2 in my earlier post about plotting the response surface: there is a example of this in Mr. Nachtwey's system identification video on his youtube channel.
__________________
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." -Stephen Hawking
  Reply With Quote
Old February 14th, 2021, 08:29 PM   #66
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,339
Quote:
Originally Posted by GrizzlyC View Post
I have the valve go to complete closed position 4ma when at 0%CV to ensure the valve is closed and move it to 7ma at 1%CV to just barely crack it open and proportion it up from there in small increments as it is a ball valve.

4ma to 7ma is nearly 20% of a 4-20ma signal, and that is for the 1% change in PIDE CV. Now, we do not know the actual valve characteristic, nor do we know anything about non-linearities in the cooling system characteristic, but does that seem like a bit of a big jump to anyone else? At a minimum the PIDE assumes at near-linear (or near-equal-percentage) response between CV and PV.


So the first 0-to-1% in CV from the PIDE goes from 0 to 20% of the valve position, and the next 9% CV or so gets to 29-30%; could this system not be re-scaled to simply have linear CV position from 0-30%?
  Reply With Quote
Old February 14th, 2021, 09:34 PM   #67
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: United Welfare States of America
Posts: 7,356
Quote:
Originally Posted by drbitboy View Post
Hey Peter,

Update: Deadtime printed out is 0.006 (what are the units?)
Ooop, sorry about that. I really hate when I ask a question and I don't get an answer.

The units are minutes for the time constants and dead time.
I used the standard ISA PID.
The gain is control output percent per degree of error.


Again, the system identification program will work best if your initial guess is close to the real values. This way the system ID program will find the global minimum instead of a local minimum. I can estimate the real values by looking at a plot.
Please keep trying.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon

Last edited by Peter Nachtwey; February 14th, 2021 at 09:39 PM.
  Reply With Quote
Old February 14th, 2021, 09:47 PM   #68
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,339
Here is how I think about this process i.e. it is trying to control an accumulating quantity by draining at a rate equal to that being added. In reality the quantity is heat (Q) with temperature as a proxy, an analogous model is level control, where the quantity is volume with level as a proxy.


slow_pide.png

Tau1 expresses the total heat capacity divided by the thermal resistance of the cooling jacket system (heat transfer coefficients; reciprocal of thermal conductivities; etc.). Tau2 expresses the same from the main body of the tank to the PT100 sensor inside the thermowell; Tau2 is ideally negligible compared to Tau1, but I put it in there to remind myself that the PIDE is controlling the temperature of temperature sensor, which is a proxy for the material temperature. There is also a Tau3 from the thermowell to the cooling system, but @GrizzlyC says that is properly insulated so Tau3 is infinity.

It could be argued whether the control valve in this model is represented accurately i.e. perhaps the CV could be seen as a setpoint cascading to level (model; temperature+flow reality) control loop in the cooling system, but that level of subtlety is probably not needed.

The point to made is that when CV goes to 0, the large volume in the main tank drops just a little as it quickly fills the smaller volume/level (i.e. cross-sectional area) in the cooling system, after which the inflow of material will start raising the main tank level. This is analogous to the large thermal inertia of the main tank quickly bringing the smaller thermal inertia of glycol in the cooling jackets to thermal equilibrium, dropping the main tank temperature slightly, after which the exotherm will start raising the temperature of the main tank. Also, the material around the thermowell would start its exotherm-driven temperature rise almost immediately as it is isolated from the cooling jackets.
  Reply With Quote
Old February 14th, 2021, 10:29 PM   #69
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,339
Quote:
Originally Posted by Peter Nachtwey View Post
@drbitboy
I am surprised the program didn't do better but the data isn't very good.

I just realized that the CV munging done means using the raw data is pointless:
  • At 0% CV output from the PIDE the valve signal is 4ma i.e. 0%
  • At 1% CV output from the PIDE the valve signal is 7ma i.e. 19.75%
  • I am going to assume CV:valve-signal is 1%:1% i.e. 1%:0.16ma after that.
Running the case now, but I still do not expect decent results: this is a ball valve controlling chilled glycol to a cooling jacket. The CV:PV behavior is unlikely to be linear.

Last edited by drbitboy; February 14th, 2021 at 10:31 PM.
  Reply With Quote
Old February 15th, 2021, 12:13 AM   #70
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Quote:
Originally Posted by drbitboy View Post
4ma to 7ma is nearly 20% of a 4-20ma signal, and that is for the 1% change in PIDE CV. Now, we do not know the actual valve characteristic, nor do we know anything about non-linearities in the cooling system characteristic, but does that seem like a bit of a big jump to anyone else? At a minimum the PIDE assumes at near-linear (or near-equal-percentage) response between CV and PV.


So the first 0-to-1% in CV from the PIDE goes from 0 to 20% of the valve position, and the next 9% CV or so gets to 29-30%; could this system not be re-scaled to simply have linear CV position from 0-30%?
Thats right at about 7ma the ball valve just barely opens up, enough to see a crack of light through it. I bench tested it before I installed it.

I want to steer clear of a 1-20% range where nothing happens as that will cause an excessive amount of wind up.
  Reply With Quote
Old February 15th, 2021, 08:30 AM   #71
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,339
Quote:
Originally Posted by GrizzlyC View Post
Thats right at about 7ma the ball valve just barely opens up, enough to see a crack of light through it. I bench tested it before I installed it.

I want to steer clear of a 1-20% range where nothing happens as that will cause an excessive amount of wind up.

So there is no flow below a signal of around 7ma, say 19-20%?


During the bench test, did you characterize the flow vs. linear percentage? If yes, can you post that? Or can you point us to the flow characteristic of the valve? Thanks.


How did the test, with Ti = 120min, work out?

Last edited by drbitboy; February 15th, 2021 at 08:45 AM.
  Reply With Quote
Old February 15th, 2021, 08:42 AM   #72
Mispeld
Member
United States

Mispeld is offline
 
Mispeld's Avatar
 
Join Date: Feb 2017
Location: VA
Posts: 528
Quote:
Originally Posted by GrizzlyC View Post
Thats right at about 7ma the ball valve just barely opens up, enough to see a crack of light through it. I bench tested it before I installed it.

I want to steer clear of a 1-20% range where nothing happens as that will cause an excessive amount of wind up.
I missed this part about valve response problems over a significant part of the CV range. If you have a flow measurement, it is not uncommon to linearize the valve response by manipulating the PID CV before sending the signal to the analog output. Similar to what you are already doing, but with a characteristic function that is the inverse of the uncompensated flow vs. CV.

You still might benefit from tuning adjustments in the short term, though it sounds like that valve configuration is a real impediment especially if the process operating window moves.
__________________
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." -Stephen Hawking
  Reply With Quote
Old February 15th, 2021, 02:21 PM   #73
drbitboy
Lifetime Supporting Member
United States

drbitboy is online now
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,339
A query about the 11000L of media:


Is that the volume of the tank contents being cooled?


Or is it the volume of the glycol in the 2 cooling jackets?
  Reply With Quote
Old February 16th, 2021, 12:03 PM   #74
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Quote:
Originally Posted by drbitboy View Post
So there is no flow below a signal of around 7ma, say 19-20%?


During the bench test, did you characterize the flow vs. linear percentage? If yes, can you post that? Or can you point us to the flow characteristic of the valve? Thanks.


How did the test, with Ti = 120min, work out?
I don't have a flow vs. linear percentage. But yeah no flow between 4 and 7ma

I plan to do that test with Ti 120 on Thursday. I got delayed due to production changes.
  Reply With Quote
Old February 16th, 2021, 12:11 PM   #75
GrizzlyC
Member
Canada

GrizzlyC is offline
 
Join Date: Feb 2021
Location: Alberta
Posts: 28
Quote:
Originally Posted by Mispeld View Post
I missed this part about valve response problems over a significant part of the CV range. If you have a flow measurement, it is not uncommon to linearize the valve response by manipulating the PID CV before sending the signal to the analog output. Similar to what you are already doing, but with a characteristic function that is the inverse of the uncompensated flow vs. CV.

You still might benefit from tuning adjustments in the short term, though it sounds like that valve configuration is a real impediment especially if the process operating window moves.
I agree that the setup is not ideal but there are other companies that pull this system off successfully. If I was to set it up again I would use needle or globe valve to better control flow.

I can adjust the 0-100% range of the valve by manipulating the output mA after the PID, so I can increase the resolution. I just want to get a positive tuning tests before I do anything drastic.

At this point even with all of your guys help I'm still on track to just play around with the tuning parameters with no set direction other than moving the Ki to 120, probs on Thursday. Ill keep you updated and posts results as I get them.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
NOP instruction foremanml LIVE PLC Questions And Answers 26 September 8th, 2014 04:40 PM
Sample Time of the PID ISA jcp LIVE PLC Questions And Answers 20 March 10th, 2012 02:29 AM
S7200 Siemens PID Control with dead time Espartaco LIVE PLC Questions And Answers 10 April 21st, 2011 06:18 AM
Cascading Sparky LIVE PLC Questions And Answers 24 February 17th, 2003 12:33 PM
Trying to find a website ganutenator LIVE PLC Questions And Answers 9 January 5th, 2003 04:06 PM


All times are GMT -5. The time now is 09:38 PM.


.