Digital AIUpdated 24 October 20268 min read

Neural Network PID Control: From PID to AI Optimisation

PID still runs most control loops, but neural networks now help where PID struggles: nonlinear plants, long delays and many interacting variables. This guide explains where neural networks fit, where they do not, and how to use them safely beside a PLC.

Neural NetworksProcess ControlPIDModel Predictive ControlControl Systems
Hands pointing at a process-analysis workflow on a laptop screen beside a test rig

Key takeaways

  • PID remains the default because it is simple and transparent, but it struggles with nonlinear plants, long delays, noise and interacting loops.
  • In industry neural networks mostly sit above the PLC as soft sensors, plant models for MPC, tuning advisers or setpoint optimisers.
  • Keep the PLC in charge: bounded setpoints, rate limits, a heartbeat, automatic fallback and operator override.
  • Validate by simulation, then in advisory mode on the real plant, and test behaviour outside the training range.
  • Safety functions and interlocks stay conventional and separate from any learned model.

A neural network PID controller is a conventional PID loop whose tuning, setpoint or compensation is improved by a neural network, or sometimes replaced by one. In practice, industry mostly keeps PID in the PLC and adds neural networks above it, as a soft sensor, a plant model for model predictive control, or an optimiser that suggests setpoints within strict limits.

Why is PID still the default, and where does it struggle?

PID is simple, transparent and supported in every PLC and DCS. Technicians understand it, and a well-tuned loop controls most temperatures, flows, levels and pressures perfectly well. But it has known limits. The Wikipedia summary of PID control lists them: it works best when the loop is linear and symmetric, so a nonlinear valve gives variable loop sensitivity; the derivative term amplifies measurement noise; integral windup causes overshoot after large setpoint changes; and long delays in measurement or action can make PID ineffective.

If you are new to the basics, start with our guide to PID control fundamentals. The cases where more sophistication is worth it include strongly nonlinear processes such as pH, long dead times such as dryers and large furnaces, and interacting loops where fixing one disturbs another.

Modular control pulpit for an operator in a steel manufacturing plant
Modular control pulpit for an operator in a steel manufacturing plantPhoto: CopyRyteDan, CC0, via Wikimedia Commons

What are the ways neural networks are used in process control?

Neural networks can approximate complicated nonlinear relationships from data, which is why they are used in several distinct roles. The roles differ a great deal in risk.

1. Soft sensors (inferential measurement). The network estimates a quantity that is hard to measure online, such as product quality or composition, from easy measurements like temperatures and flows. The estimate can feed a dashboard or, with care, a controller. This is the lowest-risk and most common use.

2. Plant models for model predictive control (MPC). MPC uses a model of the process to predict what will happen over a horizon and picks the control moves that give the best predicted outcome within limits. For nonlinear plants the model can be a neural network. MATLAB's introductory series explains why MPC is used and how it relies on a process model.

3. Adaptive tuning and gain scheduling. A network, or a simpler learning method, recommends PID gains for the current operating point, for example different gains at low and high load. The PID loop still executes in the PLC.

4. Supervisory optimisation. The model recommends setpoints that reduce energy or raise yield, within limits set by engineers. DeepMind's 2016 work on Google data centres is a well-known example: an ensemble of deep neural networks trained on sensor history predicted energy efficiency and recommended actions, with two further network ensembles simulating whether the actions would stay within temperature and pressure constraints. The company reported a 40 percent reduction in the energy used for cooling at that site. That is a single result in a very well-instrumented environment, not a typical saving.

5. Direct neural control. A network replaces the controller, as in model-reference or NARMA-L2 schemes taught in control courses. These are mostly academic or niche; stability guarantees and tuning are harder than for PID.

Why Use Model Predictive Control? | Understanding MPC, Part 1

How should you connect a neural network to a PLC safely?

The safest architecture treats the model as an adviser and the PLC as the authority.

  1. The PLC keeps the base loop. The PID or MPC runs on the controller with its alarms, limits and fault handling.
  2. The model writes only to a small number of bounded setpoints or gain parameters, through a clearly defined interface, with the PLC clamping values to engineer-set limits and rate-limiting changes.
  3. Heartbeat and fallback. If the model stops updating, produces nonsense, or the link drops, the PLC reverts to fixed safe values automatically.
  4. Operator override. Operators can switch the model off, and the plant must run correctly without it.
  5. Safety functions stay separate. Interlocks and shutdown logic are conventional and independently tested. Do not hand them to a learned model.
  6. Change control. Treat the model like any other control change: simulate, document, test and sign off.

Start in advisory mode, where the model displays what it would do while the existing control continues, and compare for several weeks before closing any loop.

What does a realistic example look like?

Take a neutralisation tank where pH is controlled by dosing acid or alkali. The relationship between reagent flow and pH is strongly nonlinear: near neutral, a tiny dose changes pH a lot, while far from neutral it barely changes. A fixed PID tuned for one operating point will be sluggish at one end and oscillate at the other. A common improvement is gain scheduling, using different gains in different pH ranges. A learned model of the titration curve, trained on logged data and checked against lab samples, can refine those schedules and also act as a soft sensor when the probe fouls. The PLC still runs the loop, clamps the dose, and raises an alarm if the probe and the model disagree for too long. That last check, comparing the model with the instrument, is one of the simplest and most valuable safeguards.

How do you validate a neural network for control?

Use simulation first. Tools such as MATLAB and Simulink let you build a plant model, test the controller against disturbances and sensor noise, and check stability margins. Then test on the real plant with the model in advisory mode. Specifically check behaviour outside the range of training data, because a network can extrapolate badly when the process moves to a condition it never saw. Test sensor failure, a stuck valve and a start-up from cold. Record which version of the model produced which action, so an incident can be reconstructed.

What do these skills lead to?

Roles that combine process control with data science are growing, though many are advertised as machine learning or data roles. ITJobsWatch reported a median UK salary of £75,000 for permanent machine learning roles across 2,526 advertisements in the six months to 23 October 2026; process-industry roles that need control knowledge are a narrower niche, so treat that figure as an indication of the wider market, not of control engineering pay.

How to learn control and neural networks for free

Start free

Start with the free PID Control course if loops are new to you, or Machine Learning with Python if data is. Then try the first five free days of the Machine Learning Engineer job simulation and see current openings on the AI and machine learning jobs page. The self-paced EDWartens AI Module offers a structured route with graded industrial projects; see its page for the current price.

Start free

Learn AI and machine learning free, then practise the job

Free job simulation

Machine Learning Engineer

Train, evaluate and document a model, and catch target leakage.

The first five days are free, no card needed.

Live UK jobs

AI and ML jobs in the UK

Updated daily, with licensed visa sponsors marked.

Browse all engineering jobs

Frequently asked questions

Can a neural network replace a PID controller?

Technically yes, in research schemes such as model-reference or NARMA-L2 control, but in industry it is rare. Most sites keep the PID in the PLC and use a neural network to estimate hard-to-measure variables, model the plant for MPC or suggest bounded setpoints.

What is a neural network PID controller?

It is a PID controller whose gains or compensation are adjusted by a neural network, or a control scheme that combines a network with PID action. The PID loop usually still runs in the controller, with the network adapting it to changing conditions.

When should I use model predictive control instead of PID?

Consider MPC when the process has long delays, strong interactions between loops, or constraints that matter, such as limits on several variables at once. A process model predicts the outcome of control moves and picks the best within limits.

Is it safe to let AI adjust setpoints?

It can be if the model only writes bounded, rate-limited setpoints, the PLC falls back automatically if the model fails, operators can override, and safety functions remain separate and conventional. Always change through management of change.

What skills do I need to apply neural networks to process control?

A solid grounding in PID, process dynamics and instrumentation, plus Python and machine learning basics, simulation in MATLAB or Simulink, and an understanding of PLC interfaces. Free courses on EDWartens UK cover each part.

Sources

  1. Proportional-integral-derivative controller, Wikipedia
  2. DeepMind AI reduces Google data centre cooling bill by 40%, DeepMind (2016)
  3. Universal approximation theorem, Wikipedia
  4. Machine learning jobs in the UK, ITJobsWatch (checked 24 October 2026)

Share this article

About the author

EDWartens Team

EDWartens Instructional Team

The EDWartens instructional team brings together UK-based automation engineers, certified Siemens and Rockwell specialists, and industry practitioners with decades of combined experience in PLC programming, SCADA engineering, and industrial AI.

View all articles by EDWartens

Ready to become job-ready?

Start with a free course today, or train live in Siemens PLC, HMI and SCADA on the Professional Module.