PIDE: a challenge for a newcomer programmer

buhnen

Member
Join Date
May 2008
Location
Somewhereland
Posts
131
Hi all dear fellows...

I'm sure any of you might have seen any of my posts in this forum, almost always going around the same topic : PID, PIDE.

The matter is that I've been gathering along these last months quite much useful information posted here (Once again, thanks specially Ron Beafourt for sharing all your vast knowledge on the matter with us) but it hasn't yet come to me the chance to go in the "fine-programmation" of my project which involves the PIDE programming ( I'm waiting to be sent to the working place where the project is being perfomed : a water treatment plant)

So, yes, I've got huge loads of tips,technical literature, posts dealing with his to be read...and so on. But all of this information in hands of an unexperienced (and almost self-taught made) programmer is just seeming to me to be like having thousand pieces of a puzzle, other words: like I got a fragmentary approach to the PIDE programming but not a global and practical vision I can make sense of it.

So as a last attempt, I just wanted to post here with enough level of detail how exactly my application is about and listen to all of your tips.

Description of the process:



- A water tank getting filled of water from a pipe on the top of it.

- A floating high-level switch at the top for a purpose that is not a need to be understood here by now.(excuse my poor technical english guys).

- A floating low-level switch at the bottom (It must always be TRUE, otherwise the water pumping out process will be inmediately stopped)

-A LIT (level transmitter 4-20 mA) which is my analogic input feeding the PV parametre to the PIDE block and is going through a 1769 IF8 analogic input card.

Detecting the water filling level.

-Two pumps: Lead and Lag. The lead on is linked to a speedrive's and the lag pump is started straightly. The speeddrive analogic input gets the PIDE's CV through a 1769-OF8C analogic output (the CPU is a 1769-L32E).

When the lead pump can't control the process by itself, for example, when it's raining and the water flowing in to the tank increases drastically, the lag pump must be started helping to support the pump out process. Once the water level is again under control and the CV suits the pre-selected Setpoint (with its associated deadband;the water level in tank must be at a medium level) , the lag pump will be stopped. We have a preselected Program Setpoint, say 50%, and we'll be able to change the Setpoint value from a HMI device whenever we want to (always within the range of allowed values)

As you all can see,the application isn't complex. I have decided to choose the PIDE and not the PID mainly because of the option it offers for toggling in a clear way between the two mode states (Operator and Program) without being necessary any extra rungs of code and for avoiding also problems like bumped transfers. If I'm not wrong the PIDE block simplifies these tasks quite a lot. Secondly: because of the autotuning option which I reckon it'd simplify the PID loop tuning. And also,generally speaking, because the PIDE seems to be a more complex tool and therefore a thriller "programming challenge".But this is quite a personal estimation...

Specificlly my doubt is: what parametres,among the vast quantity of them, are strictly those ones I'd need for this application? This is what currently overwhelms me the most about working with the PIDE, because I don't even know where to start from with them. I let for a later time all the rest which is related to the autotuning, but by now: what should be my starting point when trying to pick out the right set of parametres and manage how to understand the way they are related to each others?

Looking despairingly for some tips which provide me a practical approach to the PIDE...

Thanks in advance.
 
Trying to understand now how the set of tags ProgProgReq, ProgAutoReq, ProgManReq is interrelated.

Please correct me if I'm wrong:

-ProgProg must be ALWAYS true.

-When we want to go in the AUTO mode, that is to say, the program routine assumes the control of the PIDE and NOT the HMI (from which the operator enters a value for the CV ), then ProgAutoReq=1

-Just the opposite: We want to go in MANUAL mode, then ProgAutoReq=0 and ProgManReq=1

Is it so easy like this?? :confused:
 
Buhnen.
Your job is a common application and you should be able to make it work well. There are, however, a couple of things you should bear in mind right from the start.

i) The Duty/Standby pump arrangement will give a non linear response to the PIDE output. I would suggest that you take some time at the start of commissioning to determine the speed at which the pumps actually start to do useful work and scale the PIDE so that this is the output when the CV is 0%. This speed will depend on the back pressure that the pump must overcome before it can generate flow so it is different for every application. If you can read the actual delivered power rather than amps from the drive this is fairly easy to do.

ii) I would not put too much reliance on the autotune feature. Your level control is an integrating process and the autotune will probably struggle with this. In a typical PID control (ie simple temperature control) if you start from a steady state and increase the CV by a small amount the PV will increase for a while and then settle out at a higher value. In your case if you start at steady state and decrease the CV the level will not settle but will increase at a constant rate until the tank overflows. To stabilise the level at a new value you need to change the CV back to its initial value. Your options for tuning are modelling, using loop analysis software or trial and error. Loop analysis software (ie Expertune) is expensive but can save you a lot of work and problems when commissioning this type of system.
Andybr
 
What works for me is to look at the lead pump and when it is at max speed for 30 seconds (or whatever works for you) I start the secondary pump and ramp it up very slowly usong logic from the PLC (ie every 10 seconds add 50 rpms)
As the secondary pump takes the load the PID will slow the lead pump down to maintain pressure or level or whatever is required.
When the secondary pumps speed is equal to the lead pumps speed I then tell the secondary pump to become a follower of the PID speed of the lead pump. It makes for a very seamless progression. You have to write code then to determine when the secondary pump is not needed (both pumps at a certain slow speed) then you take control of the secondary pump and slowly ramp it down to off.
Regards Alan Case
 
Last edited:
other question ,

When working with PIDE and feeding the PV from an analogic input: is it advisable to choose among the next set of input data formats the "Scaled-for-PID" option ?

• Raw/Proportional Data
• Engineering Units
• Scaled-for-PID
• Percent Range

(these are the modes supported by my analogic input card)

or can I use Engineering Units as I do usually?

Thanks,
 
You use the scaled for PID option which from memory will give a value between 0 and 16383.
The PIDE equation expects to see the PV scaled to this value.
Regards Alan Case
 
Thanks Alan,

Again another question (the same one I did before but didn't get an answer)

I had a look through this information http://www.plcdev.com/getting_started_with_the_logix5000_pide_function_block
and it's quite well explained though I'm not sure if my reasoning about
how to toggle the different modes AUTO/MANUAL is right or not...

Just by having a look to the PIDE block picture, I figure out that :

-ProgProg must be ALWAYS true.

-When we want to go in the AUTO mode, that is to say, the program routine assumes the control of the PIDE and NOT the HMI (from which the operator enters a value for the CV ), then ProgAutoReq=1

-Just the opposite: We want to go in MANUAL mode, then ProgAutoReq=0 and ProgManReq=1

is this reasoning right?

Thanks
 
Something else...

Having a look to the RS Logix online help it says about the PVEUMax and PVEUMin...

PVEUMax REAL Maximum scaled value for PV. The value of PV and SP which corresponds to 100 percent span of the Process Variable.Valid = PVEUMin < PVEUMax £ maximum positive floatDefault = 100.0

PVEUMin REAL Minimum scaled value for PV. The value of PV and SP which corresponds to 0 percent span of the Process Variable.Valid = maximum negative float £ PVEUMin < PVEUMax Default = 0.0

So if my analogic input (the level transmitter) is already scaled in the same analogic input card by choosing "Scaled for PID" to 0-16383: why for to use PVEUMax and PVEUMin for limiting this span again?
I'm not sure to understand the reason to be for these two paramatres. Are they really necessary? or rather for other purposes like setting up any level alarm ?
 
Buhnen
I am very puzzled by the questions concerning use of the scale for PID function. You are using a Compact Logix processor and I would normally expect the PIDE instruction to use REAL values in engineering units. I believe that the scale for PID option is provided in your Analogue module for use with a Micrologix 1500 processor rather than Compact Logix.
 
Thanks for the tip Andy,
I didn't know the Scaled for PID was mainly for the Micrologix as I haven't had any previous programming experience with this PLC.
 

Similar Topics

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
130
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,765
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
966
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,613
We have a routine that we trigger with a JSR every 10 seconds that has PIDE instructions. This resides in a Periodic task that triggers every...
Replies
6
Views
922
Back
Top Bottom