Skip to content

Latest commit

 

History

History
76 lines (50 loc) · 6.46 KB

File metadata and controls

76 lines (50 loc) · 6.46 KB

pid.png This is at https://bomonike.github.io/pid from code at https://github.com/bomonike/bomonike.github.io/blob/master/pid.md

To maintain a process variable such as ambiant temperature at a target Setpoint, a PLC controller activates a heater or cooler based on sensor readings, in a feedback control loop. Other variables include regulating pressure and flow rate.

VIDEO by realpars.com: plc-pid-feedback.png

VIDEO: To dampen wild swings in actions and values, PLCs use the PID (Proportional Integral Derivative) approach to use keep the Setpoint Value (SV) at a desired temperature, pressure, battery or fuel level, etc. The difference between the SV and current observed PV (Process Variables) is the Error/Deviation. To keep that low, Control actions such changing the flow rate, varying voltage levels, etc. are applied to MV (Manipulated Variables) such as the position of values and voltage levels set.

VIDEO: PID Control and Tuning by Rob Sink at Yokogawa 2016 covers the topic fully in 1 hour.

VIDEO: PID (Proportional Integral Derivative) controllers are tuned using three K Controller Gain settings to reduce errors with minimal oscillations:

  • Kp "Proportional" correction to errors increase in proportion to the magnitude of historical error between the current and the desired value.

  • Ki "Integral" correction counters small errors accumulated over time (with an integral meaning an area under the graph) require more intensive correction to keep exactly at the SV.

  • Kd "Derivative" correction dampens (slows) the speed (rate of error) to avoid oscillations in the future.

DigiKey's math:
plc-pid-math.png

pid-formula-1909x819.png

HANDS-ON: Manually adjust kp, ki, kd in real time on the PID simulator Excel sheet from https://www.engineers-excel.com/Apps/PID_Simulator/Description.htm

Alternately, use web pages at

They're an improvement over the original https://grauonline.de/alexwww/ardumower/pid/pid.html provides a PID simulator you can adjust in real time by changing JavaScript code (ported in 2004 from the Arduino PID library and Arduino AutoTune Library with tests, as explained by Brett). Learnings: Auto tune.

  • If it overshoots a lot and oscillates, either the integral gain (I) needs to be increased or all gains (P,I,D) should be reduced
  • If it ramps up quickly to a value below target value and then slows down as it approaches target value? Try increasing the I constant.
  • Too much overshoot? Increase D, decrease P.
  • Response too damped? Increase P.

this video https://www.aaedmusa.com/projects/project-three-sng7y-gaslp

References about PID:

Other approaches:

  • Fuzzy Logic Control (FLC)

  • Model Predictive Control (MPC) works by using an algorithm based on a mathematical model to predict the behavior of process variables. VIDEO

  • Adaptive Control

  • Neural Network Control