Ron Beaufort
Lifetime Supporting Member
the following question was asked in a recent thread ...
Can anyone give me a brief overview of what the key differences are between the PID ladder instruction and the PI & PIDE function block instructions? I found the 1756-rm006 file on the Literature Library, but it only describes each instruction individually, and does not compare them to each other, at least not very obviously.
since the same question comes up quite often in my classes, I've put together a quick down-and-dirty set of experiments to demonstrate some of the major differences – and similarities – between these three "process control" type instructions ...
please keep in mind that this is just an OVERVIEW – not a full discussion of all of the nuts-and-bolts material involved ... for one specific issue: most of these instructions have multiple setups which could substantially change their operation ... again, this is just an OVERVIEW of the basic ideas ...
first let's compare the PID (Proportional Integral Derivative) instruction available in Relay Ladder Logic - with the PIDE (Enhanced PID) instruction available only in either Function Block or Structured Text programming ...
the first thought that naturally pops into the beginner's head is that "enhanced" must somehow mean "better" ... well, the PIDE instruction DOES offer an "Autotuning" feature (if you've paid for the option) ... whether that particular feature is worth its price is debatable ... for some applications it works well – for others not so well ...
(related thread) ...
other than that, the PIDE does offer a LOT (some would say "too many") extra "controls" ... note that these controls are not necessarily going to control the PROCESS (flow, temperature, etc.) ... instead they're used to change the modes, and status settings, etc. of the PIDE instruction itself ...
the last time I counted there were 167 settable "parameters" inside that PIDE function block ... let's do the math on that ... if we decide to just "call out" the name of each one of those parameters – and give just a 30 second explanation of how each parameter BASICALLY works – then we're talking about over 80 minutes of time which would be required just for that little "getting acquainted" session ... about an hour and half just to list the names – and the BASIC functions ...
but that still begs the honest question: will I get BETTER CONTROL over my process by using this "enhanced" PIDE instruction instead of a "regular old-fashioned" PID? ...
well, let's see ...
in the screen shot below, the RED trace shows the output of a PID instruction – compared to the GREEN trace produced by a PIDE instruction ... although the tuning settings APPEAR to be different – the values shown have been calculated to give the same "tuning" for both methods of control ...
TIP: the "time related" functions (Integral and Derivative) are "off" by a factor of 60 ... that's because this configuration of the PID uses SECONDS – and the PIDE uses MINUTES ...
IMPORTANT! ... the signal for the INPUT is NOT being shown in this series of graphs ... the basic idea is to provide a repeatable "dummy" signal (I call this a "profile") as the input to BOTH of the instructions simultaneously ... in other words, the PID and the PIDE are both "looking at" the same input signal – and each instruction is then calculating its own OUTPUT signal ... but NEITHER of the two outputs is actually in control of the process ... specifically, the input signal just ramps up and down – regardless of what the controls (PID and/or PIDE) do in response ... so in this "test" setup, nothing that the PID or PIDE controllers (bless their little hearts) can do will alter the INPUT signal ... this allows us to perform a side-by-side COMPARISON of how the two instructions perform ... I've been using this same "dummy input" technique for years to learn about – and to teach – certain PLC concepts which are exceedingly hard to understand using any other method ... yes, eventually you'll HAVE to have a complete "feedback loop" available in order to actually practice "tuning" – but that's another fish – to be fried another day ...
now back to our story ...
in the screen shot below, we can see that the PID and the PIDE are both giving essentially the SAME RESPONSE to the dummy "profile" input signal (not shown) ...
true, there ARE some sections where the PID's red trace deviates from the PIDE's green trace ... those deviations are the result of a "filter" applied to the Derivative component – which is built into the (old fashioned) PID – but is NOT incorporated in the (new fangled) PIDE instruction ...
so ...
as far as I'm concerned, I'm not seeing that the "enhanced" PIDE has any ability to perform "better control" over a process than the UN-enhanced PID ...
but ...
maybe the optional "autotune" feature is attractive to you – or maybe all of those extra "bells-and-whistles" controls could come in handy – or maybe you just love programming in Function Blocks ... whatever ... if you've got a REASON to go with the PIDE – then go for it ...
personally I don't usually enter into the debate about which method of control is "better" ... but then I'm invariably just teaching my students how to deal with "what they've got" back at the plant ... specifically, my students are usually maintenance technicians – who don't get to choose their battles ...
it usually boils down to this ... once upon a time, a certain "programmer" put this PIDE thing in our plant's program – and now we've got to understand enough about it to get the pump back into operation again ...
when you're troubleshooting a $y$tem with the boss breathing down your neck at 3:00 o'clock in the morning, it's hard to be impressed by 167 "extra" parameters – and wondering if one of those fancy settings just happens to be keeping the pump from running ...
anyway ...
as the chart below shows, I suppose that the PID could actually be considered to give a "smoother" control over the Derivative action than the "enhanced" PIDE ... but for my money, it essentially it looks like a dead heat in the overall "ability to control" competition ...
.