PID alternatives

TL140

Lifetime Supporting Member
Join Date
Jun 2014
Location
South Carolina
Posts
152
Kinda off on a tangent, but I know how PID loops are the go-to for analog process control. Are there any other types of control algorithms you guys have seen used in industry?
 
Yes, there are many. One that I am investigating is MPC or model predictive control. MPC takes a lot of processing power and it requires have a pretty good model of the plant but all of the better control algorithms require a pretty good model of the plant. MPC uses no controller gains or feed forwards. It basically tries open loop output for the current scan and future scan to predict which open loop outputs will result in the best control. It is the optimization process that takes time minimizing the error between the SP and the PV now and in the future. MPC must look far enough ahead to see past the dead time.
This is not something you want to implement in a PLC.


There is a YouTube channel called APMonitor that goes into this using Matlab or Python with Gekko.



One of the most popular videos on my "Peter Ponders PID" YouTube channel is this video where I use a Smith Predictor and Sliding Mode Control (SMC)

https://www.youtube.com/watch?v=uhLMyOlwCoM
This could be implemented in a PLC.


I like SMC for its simplicity and robustness but SMC does not like dead time so a Smith Predictor should be used for processes with dead time.
 
My preferred technique is floating control. By including time delays for response and a dead band for stability I find it more responsive than PI or PID and less prone to hunting.
 
I have used my own algorithms, mainly one ID without P ! ,
applying every certain period of time (usually 2 or 3 seconds) a correction based on the square root of the variation of the error, which would be part D and another correction by the value of the error itself that would be part I.

Of course I had a pair of parameters to adjust the amount of effect I or D.


It worked pretty well, but I stopped that type of programming long time ago. I don't remember now all details.
 
we created our own corrective action loops for test equipment.

cycle #1 - push at 5000 lbs, actual 4000 - make a 200 lb correction.
repeat cycle and adjust as necessary.
by the time we got to cycle #6, it was within 50 lbs for example and got even tighter the more the system was run on the part.

james
 
we created our own corrective action loops for test equipment.

cycle #1 - push at 5000 lbs, actual 4000 - make a 200 lb correction.
repeat cycle and adjust as necessary.
by the time we got to cycle #6, it was within 50 lbs for example and got even tighter the more the system was run on the part.

james

I believe that type of error adjustment is called an 'in flight value'

I use something similar I developed for batch weighing and fluid measurement.
 
On / Off

Depending on your process..

Like the thermostat temperature control of my abode...

ā€¦..Turn the CV on when crossing a PV/SP threshold, and turn off the CV when the PV falls below the SP-Headband hysteresis.

We are warm and comfortable.

Don't overcomplicate
 
Floating control is similar to a I gain only control. A very slow I gain only.


ID without P doesn't make sense. Anything that is similar to a PID works by placing the closed loop poles. If the control method can't place the closed loop poles at the optimal locations is is not good.


FL is a fraud. I started a thread about FL a few months back. NN also need to have the equivalent of a integrator and derivative term. NN is over kill for the proportional term.


IMC is just a method of computing the controller PID gains. It does take care of placing the poles and zeros at a desired location. IMC is what is taught at the www.controlguru.com site. IMC is simple and works but it still uses a PID.


Another option I like is LQC or linear quadratic control but it is best used for applications other than process control. LQC is similar to IMC in that is just calculate gains for a PID or PI controller or maybe two PI controllers.



The rest of the control methods listed above may work but they are kludges. Yes, my home thermostat is just a on-off mercury switch.
 
Last edited:
Tom and/or Peter would either of you care to share any logic you have wrote for Floating Control? I built a PID trainer that I will be selling soon and would like to add examples of Floating Control or can you go into a little more detail on how it works?... im still working out some bugs with the control side of things but once thats done I plan on writing a couple of PID samples, that show different reaction speeds

https://www.plccable.com/miniature-machine-plc-trainer-pid-proportional-integral-derivative/

If you dont have any code that you want to share can you just elaborate a bit, is it just a manual loop (on/off) that you create by using logic ?
 
Tom and/or Peter would either of you care to share any logic you have wrote for Floating Control? I built a PID trainer that I will be selling soon and would like to add examples of Floating Control or can you go into a little more detail on how it works?... im still working out some bugs with the control side of things but once thats done I plan on writing a couple of PID samples, that show different reaction speeds

https://www.plccable.com/miniature-machine-plc-trainer-pid-proportional-integral-derivative/.

If you dont have any code that you want to share can you just elaborate a bit, is it just a manual loop (on/off) that you create by using logic ?

The attached may help. I don't have a ladder logic example handy, but if you need it after looking at these illustrations I can put one together.

You can make the control fast or slow by changing the response delay timer setting and changing the size of the steps. For some loops, for example controlling VFD speed on large blowers, I would make the step proportional to the error.

Obviously, by swapping the increase and decrease you can make the logic work for direct acting or reverse acting loops.

A handy trick is the bias, which makes the steps slightly different on rising and falling process variable. This reduces hunting, since the controlled device won't cycle back and forth between two positions.

floating control flow chart.png.jpg floating control illustration.jpg prorportional floating control illustration.jpg
 
Thank you very much! im sure I will be back with questions later but this should get me going
 
ID without P doesn't make sense. Anything that is similar to a PID works by placing the closed loop poles. If the control method can't place the closed loop poles at the optimal locations is is not good.

I assure you that it worked, with it I regulated mainly the temperature of large ceramic firing kilns.
 
Here is an example of floating control on an inlet throttled blower. Amps are proportional to air flow.The application was dissolved oxygen (DO) control of a variable level sequencing batch reactor (SBR). The big step was a shift from a pre-aeration set air flow mode to controlling air flow to maintain DO.

The programmer had initially used PID. ("That's our standard."šŸ™ƒ) We diddled around for half a day and couldn't get it tuned for reasonable response and stability at both high and low flows. The blower response to valve changes is very non-linear, but fast compared to the process- a couple of seconds.

I finally convinced him to abandon PID and program floating control. Within half an hour we got both good response and stability.

Blower Amps Floating Control.JPG
 
Last edited:

Similar Topics

Hello, I have a motor that we are sending a RPM Speed Output from 0-100% to the VFD. However, the Motor HP needs to be limited to 6000 HP and the...
Replies
3
Views
83
I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
587
Hi all, I'm having trouble solving a problem I've been working on for several months, and thought you might like a stab at it. The machine runs...
Replies
22
Views
921
How can I connect PID Output to a valve. In ladder logic program is there any logic do I want to add between valve and PID? PV=SP What will be the...
Replies
7
Views
407
I'm setting up a PID for a 50hp RO pump in a water treatment plant. When I go to manual mode on hmi I set the swm bit, I also ons the pid output%...
Replies
5
Views
569
Back
Top Bottom