PIDE - Initial Value at Start

JoshM

Member
Join Date
Mar 2012
Location
NYC
Posts
54
Hi,

In the Enhanced PID function block is there a way to set an initial starting value (not a minimum value) for the CVEU.

Thank you,

Josh
 
Yes.
Write the initial value for CV in the "CVInitValue" parameter, then for one scan set the "CVInitReg" Bool.
Alternately, you can do the same thing with the "CVPrevious" and "CVSetPrevious" parameters.

If you need more info search for Publication 1756-RM006G-EN-P on Rockwell's website.

Cheers,
Dustin
 
Dustin,

Can you use that method to get 2+ PIDE functions back on track with each other? For example: I have several independent PIDE functions on separate PLC's, but they are looking at the same calculation. Due to noise or communication failures these PIDE function might slightly drift apart. I want to once an hour average out their CVEU and get them back to similar outputs. This is also important because if our network goes down the chances of these PID's drifting apart is very likely.

Thank you,

Josh
 
Dustin,

Can you use that method to get 2+ PIDE functions back on track with each other? For example: I have several independent PIDE functions on separate PLC's, but they are looking at the same calculation. Due to noise or communication failures these PIDE function might slightly drift apart. I want to once an hour average out their CVEU and get them back to similar outputs. This is also important because if our network goes down the chances of these PID's drifting apart is very likely.

Thank you,

Josh

Hi Josh,

Yes I suppose you could do that. If you had some baseline CV value that you wanted to "reset" all your PID's to, then you could send a request over the network to reset all the CV's to that value. Or you could have that coded into the PLC's to execute the "CVInitReq" at a specific interval.

I'm not sure exactly what it is you are trying to do. You say you have several PIDE's on different PLC's and you are concerned about them drifting apart. What kind of network are they all on? Are you wanting to average the CVEU's of all the PIDE's over an hour, then write that value back to all the PIDE's after the averaging algorithm is completed? If so, you may see a significant PV bump in some of your PIDE's, depending on how far a particular CV is off from the group average.

If you are just wanting to write a baseline constant CV to all your PIDE's once an hour, then this would be easier to execute, but I still don't see the benefit, but I can see plenty of potential drawbacks. But you know your process, and I don't.

Seems to me, if you have similar processes on different machines that require significantly different CV's to maintain the same setpoint, then there are disturbances in your system that aren't properly accounted for.

Back to your question: Say process analysis shows that your process runs at setpoint under normal conditions with a CV of 75%. Due to process variations, you know that these CV's may drift a bit over time, but it is crucial that all the CV's be "brought back in line" once an hour. Normally, you rely on your plant network to share information between PLC's, but you don't trust the network with the task of re-initializing the CV's, since your IT guy is fresh out of school and the network has been known to fail at the worst possible times.

So you want the re-initialization routine to reside in each of your PLC's and to be carried out once an hour, ideally simultaneously. Here's how I would do that:

Set-up a periodic task, with a period of 1000 ms (one second). In that task, have an unconditional ADD instruction on the first rung. This will be your scan "counter".
Use a DINT rather than an actual counter because the CTU instruction requires false-to-true transitions. When Scan_Counter = 3600, move your baseline value to "CVInitValue", and OTE "CVInitReq", then clear Scan_Counter.

Code would look something like this:

Code:
SOR SBR ADD Scan_Counter 1 Scan_Counter EOR
SOR EQU Scan_Counter 3600 MOV Base_CV MyPIDE.CVinitValue OTE MyPIDE.CVInitReq CLR Scan_Counter EOR
You would have to make sure that the PIDE routine is called after the CVInitReq is set, but before the next time the periodic task is called. You could also do the above code in your FBD where the PIDE is executed. Depending on the update rate, you may have to adjust the value of Scan_Counter before performing the initialization routine.

To keep all the PIDE's in sync across the plant, you could send out a "Scan_Counter_Reset" request across the network once daily. It would zero out all the counters simultaneously to eliminate any drift that had occurred over the previous 24-hour period. That way, the network keeps everything exactly in sync, but if the network fails, you still keep the PIDE's resetting once an hour on roughly the same schedule.

Hope this helps.

Cheers,
Dustin

🍻
 
The PLC's are on an Ethernet I/P network. When any of the PIDE CVEU's gets greater than 5% (I might decide to do a time trigger) away from the highest CVEU I want to take the average of all CVEU's. Write that average to the cvInitValue for each PIDE then CVInitReq all PIDE's at same time to get them back to same point of operation.

Does this CVInitReg wipe out accumulated data within the PIDE?

I want to do this for power saving purposes. For example: the system can be fine with 30% and 90% fan speed, but power wise the system runs more efficient with both fans running 60%. If I'm not being specific enough, please let me know.

I would just do a subroutine that runs before the PIDE subroutine (I could run it after too). In that subroutine I would have all CVEU's compared. If the difference or time is great enough I would write the average of all CVEU's to the CVinitValue tag. I would activate the CVinitReq within this subroutine too. I might use a timer to have a minimum amount of time between running this calibration. Am I missing anything?

-Josh
 
The PLC's are on an Ethernet I/P network. When any of the PIDE CVEU's gets greater than 5% (I might decide to do a time trigger) away from the highest CVEU I want to take the average of all CVEU's. Write that average to the cvInitValue for each PIDE then CVInitReq all PIDE's at same time to get them back to same point of operation.

Does this CVInitReg wipe out accumulated data within the PIDE?

I want to do this for power saving purposes. For example: the system can be fine with 30% and 90% fan speed, but power wise the system runs more efficient with both fans running 60%. If I'm not being specific enough, please let me know.

I would just do a subroutine that runs before the PIDE subroutine (I could run it after too). In that subroutine I would have all CVEU's compared. If the difference or time is great enough I would write the average of all CVEU's to the CVinitValue tag. I would activate the CVinitReq within this subroutine too. I might use a timer to have a minimum amount of time between running this calibration. Am I missing anything?

-Josh

Ok I see what you are trying to do now. If scan time is not an issue, I would run the CVEU comparison subroutine in the same task as the PIDE sub, and call it before the PIDE. If you can put all your assorted CVEU's (how many?) into an array of Floats, then this would be a good place to use a For-Next loop to cycle through the CVEU's, comparing CVEU_Array[pointer] to Highest_CVEU, if greater MOV CVEU_Array[pointer] Highest_CVEU and increment pointer. After cycling through your array and finding the highest value, cycle through the array again and Subtract each value from the highest and move to a temporary register. If the value is greater than Highest_CVEU * .05, then latch a bit. If you cycle through the whole array and no difference is greater than 5%, then unlatch the bit. You could use that bit to run your timer.

If you run the PIDE after the comparison routine, then I would unlatch the CVInitReq and clear the CVInitValue in the first rung of the comparison routine. If conditions are met, later in the ladder you can set the values again before you scan the PIDE. This will insure that the CVInitReq is only set for one scan.

Does this CVInitReg wipe out accumulated data within the PIDE?
Short answer, no. I won't try to go too far in depth about the difference in algorithms between the "Velocity" type PIDE and the "Positional" type standard ladder PID. There's plenty of others here that can explain it better than I. Here's some good reading on the subject.

Suffice it to say that the PIDE doesn't keep an integral sum, per se. The integrated error is contained within the CV itself. If you run the CVInitReq, and a couple of CV's move say 15%, then you will in effect be changing your integral sum. Your PIDE will keep incrementing or decrementing the CV to accomodate the current error on subsequent scans after the CVInitReq. Such a sudden change in CV may cause a corresponding PV jump, which the PIDE will have to account for.

This is something you will just have to experiment with, but there is a possibility that you could throw some processes into a constant oscillation. It all depends on your process, and which is more important, accurately maintaining a setpoint, or running the fans more efficiently.

If you need any more help, just let us know.

Cheers,
Dustin

🍻
 

Similar Topics

Hello all, we have an homogenizing oven with three zones, 2 burners in each zone, a soak (smaller) and a main (large). during ramp to the air...
Replies
5
Views
149
Greetings ... someone sent me a request for some student handsouts that I developed ... turns out that I had this hosted on my business website...
Replies
0
Views
140
Have a logix controller and I'm using the PIDE block for the autotuner. I've got the hang of doing it for direct control things like pressure...
Replies
21
Views
1,783
Studio 5000 version 34. Have error on PIDE CVFaulted (Status1.2), Control variable (CV) health bad. No more information online or in...
Replies
3
Views
976
Hi everyone, I am trying to add a control loop to my HMI interface however I keep getting the following issue, any idea why this would happen?
Replies
8
Views
1,623
Back
Top Bottom