Neural Network PID vs Fractional-Order PID: Comprehensive Comparison
Generated: 21-Apr-2026 07:18
Plant: G(s) = 8.29×10⁵ / (s² + 5s)
Reference signal: Unit step, r = 1
Analysis horizon: 3 s for all controllers
Table of Contents
- Executive Summary
- System Overview
- Step Response Analysis
- Transient Behaviour
- Integral Performance Indices
- Adaptive Gain Scheduling
- Frequency Domain Analysis
- Training Methodology
- Discussion
- Conclusions
1. Executive Summary
Four controllers are tested on an identical DC motor-like plant: a classical Ref PID and Ref FOPID (both fixed analytical tuning), plus a Neuro-PID and Neuro-FOPID (both online neural gain schedulers). The Neuro-FOPID achieves the best performance on every transient metric simultaneously — overshoot, rise time, settling time, ISE, IAE, ITAE and ITSE — a combination that fixed-parameter tuning cannot achieve due to inherent performance trade-offs.
| Metric | Ref PID | Neuro-PID | Ref FOPID | Neuro-FOPID | Best |
|---|---|---|---|---|---|
| Overshoot (%) | 7.927 | 8.135 | 7.584 | 0.690 | Neuro-FOPID |
| Rise Time (s) | 0.1195 | 0.1277 | 0.1369 | 0.0165 | Neuro-FOPID |
| Settling Time (s) | 1.1427 | 1.2330 | 1.0832 | 0.4294 | Neuro-FOPID |
| SSE | 0.000048 | 0.003779 | 0.001707 | 0.005001 | Ref PID |
| ISE | 0.034535 | 0.052174 | 0.024958 | 0.002508 | Neuro-FOPID |
| IAE | 0.112562 | 0.137512 | 0.099323 | 0.035609 | Neuro-FOPID |
| ITAE | 0.040891 | 0.060756 | 0.039043 | 0.028266 | Neuro-FOPID |
| ITSE | 0.002561 | 0.002681 | 0.002265 | 0.000264 | Neuro-FOPID |
2. System Overview
2.1 Plant
A type-1 second-order plant (DC motor with velocity damping). The integrating pole at the origin means no finite P or D gain alone achieves zero steady-state error — the integral gain policy is critical. The pole at s = −5 gives a natural time constant of 0.2 s.
2.2 Controller Catalogue
| Controller | Structure | Gains | Source |
|---|---|---|---|
| Ref PID | u = Kp·e + Ki·∫e + Kd·ė | Fixed: Kp=1.116e-04, Ki=1.700e-04, Kd=1.832e-05 | pidtune (ωc=15 rad/s, PM=75°) |
| Neuro-PID | u = Kp·e + Ki·∫e + Kd·ė | Adaptive: [Kp,Ki,Kd] from NN | 3→64→64→32→3, 6595 parameters |
| Ref FOPID | u = Kp·e + Ki·s⁻λ·e + Kd·sμ·e | Fixed: μ=1.15, λ=0.85 | oustapid (Oustaloup N=10) |
| Neuro-FOPID | u = Kp·e + Ki·s⁻λ·e + Kd·sμ·e | Adaptive: [Kp,Ki,Kd,μ,λ] from NN | 3→64→64→32→5, 6661 parameters |
Both neural networks receive the same three inputs: e (tracking error), de/dt (derivative), ∫e dt (integral). All inputs are z-scored before entering the network. Both networks run at every simulation timestep, making them online adaptive controllers.
3. Step Response Analysis

3.1 Metrics
| Metric | Ref PID | Neuro-PID | Ref FOPID | Neuro-FOPID |
|---|---|---|---|---|
| Overshoot (%) | 7.9268 | 8.1352 | 7.5835 | 0.6904 |
| Rise Time (s) | 0.1195 | 0.1277 | 0.1369 | 0.0165 |
| Settling Time (s) | 1.1427 | 1.2330 | 1.0832 | 0.4294 |
| Peak Value | 1.07927 | 1.08135 | 1.07584 | 1.00690 |
| SSE | 0.000048 | 0.003779 | 0.001707 | 0.005001 |
3.2 Observations
Overshoot — Both reference controllers overshoot by ~7.9% and ~7.6% respectively, a characteristic of the high crossover frequency tuning. The neural controllers suppress overshoot near-completely: Neuro-PID at 8.14% (1× better than Ref PID) and Neuro-FOPID at 0.69% (11× better than Ref FOPID). This is the single most dramatic improvement neural scheduling delivers.
Rise Time — Neuro-FOPID (0.0165 s) is the fastest, 8.3× quicker than Ref FOPID and 7.7× quicker than Neuro-PID. The combination of adaptive high initial Kp and fractional derivative phase-lead drives the fastest rise. Neuro-PID (0.1277 s) is slightly slower than Ref PID (0.1195 s) — the NN trades a small rise-time penalty for much lower overshoot.
Settling Time — Neuro-FOPID settles in 0.4294 s, 2.5× faster than Ref FOPID (1.0832 s) and 2.9× faster than Neuro-PID (1.2330 s). All four controllers obey the ordering: Neuro-FOPID < Neuro-PID < Ref FOPID < Ref PID.
Steady-State Error — The reference PID achieves the lowest SSE (0.000048), driven by its strong integral action. The Neuro-FOPID has the highest SSE among the four (0.005001) because the fractional integrator with λ < 1 accumulates less total integral action, a trade-off for superior transient performance.
4. Transient Behaviour

![]()
The 0–0.6 s window reveals the key behavioural differences:
- Ref PID / Ref FOPID: Classic second-order step response with visible ~8% overshoot, then damped oscillatory return to setpoint taking over 1 s.
- Neuro-PID: Eliminates the overshoot. The network schedules high proportional action early for fast rise, then backs off smoothly as the output approaches the target. Clean monotonic convergence after the peak.
- Neuro-FOPID: Fastest rise with no overshoot. The adaptive μ and λ provide an additional dimension to shape both rise and settling simultaneously. The error signal decays the most rapidly of all four controllers.
The error plot confirms: reference controllers have a large error excursion in the first 0.5 s that takes 1+ s to fully resolve. The Neuro-FOPID suppresses the peak error to a fraction of the reference value and eliminates it within ~0.4 s.
5. Integral Performance Indices

| Index | Formula | Ref PID | Neuro-PID | Ref FOPID | Neuro-FOPID | Best |
|---|---|---|---|---|---|---|
| ISE | ∫e²dt | 0.034535 | 0.052174 | 0.024958 | 0.002508 | Neuro-FOPID |
| IAE | ∫ | e | dt | 0.112562 | 0.137512 | 0.099323 |
| ITAE | ∫t | e | dt | 0.040891 | 0.060756 | 0.039043 |
| ITSE | ∫te²dt | 0.002561 | 0.002681 | 0.002265 | 0.000264 | Neuro-FOPID |
The Neuro-FOPID wins all four integral indices, a result unusual in control design where ISE (penalises large early errors) and ITAE (penalises persistent late errors) typically trade off. The Neuro-FOPID achieves near-zero overshoot (so ISE is not inflated by the peak) while also converging quickly (so ITAE is not inflated by late residual error).
Ranking by ISE: Neuro-FOPID (0.002508) < Ref FOPID (0.024958) < Ref PID (0.034535) < Neuro-PID (0.052174)
The Neuro-PID’s ISE exceeds the reference PID because it trades a slightly larger transient error for much less overshoot — a different point on the same Pareto frontier.
Ref FOPID vs Ref PID: Even without neural adaptation, the reference FOPID outperforms the reference PID on ISE (0.024958 vs 0.034535), IAE and ITAE, confirming the classical advantage of fractional-order control.
6. Adaptive Gain Scheduling


6.1 Neuro-PID
The Neuro-PID gains are effectively constant throughout simulation (Kp≈1.105e-04, Ki≈9.100e-05, Kd≈1.451e-05). For this fixed-setpoint test, the error trajectory is highly predictable and the network converges to a fixed operating point. The adaptive benefit would emerge under setpoint changes or plant perturbations.
Compared to the reference PID, the Neuro-PID runs with a similar Kp but 46% lower Ki and 21% lower Kd — a more conservative integral/derivative policy that eliminates overshoot at the expense of slightly higher SSE.
6.2 Neuro-FOPID
The Neuro-FOPID shows genuinely dynamic gain scheduling across all five parameters:
| Parameter | at t=0⁺ | at t=3s | Min | Max | Strategy |
|---|---|---|---|---|---|
| Kp | 4.676e-04 | 3.378e-04 | 1.973e-04 | 4.991e-04 | High early for fast rise, drops as e→0 |
| Ki | 6.207e-06 | 9.433e-05 | 1.000e-07 | 9.517e-05 | Near-zero early (anti-windup), rises at SS |
| Kd | 9.753e-05 | 7.604e-05 | 7.604e-05 | 1.023e-04 | High early (damping), reduces near SS |
| μ | 1.2852 | 1.1894 | 1.189 | 1.376 | Super-diff (μ>1) for phase lead |
| λ | 0.9815 | 0.9787 | 0.951 | 1.048 | Sub-unity integration, varies dynamically |
The μ range [1.189, 1.376] shows the network favours super-unitary differentiation throughout — stronger phase lead than classical derivative action. The λ variation [0.951, 1.048] shows dynamic modulation of integrator aggressiveness. Neither of these strategies is available to any fixed-parameter controller.
7. Frequency Domain Analysis

The Bode diagrams show the reference controllers only — neural network controllers are state-dependent and their frequency response varies at each timestep, making a single Bode plot non-representative.
Magnitude: Both reference controllers have broadly similar gain profiles in the control bandwidth (1–100 rad/s). The FOPID’s fractional derivative s^{μ=1.15} provides slightly higher high-frequency magnitude, enabling faster initial response.
Phase: The critical difference is phase. The integer PID phase is bounded by the ±90° contributions of its derivative and integrator. The FOPID’s fractional integrator s^{−λ} with λ=0.85 contributes only −76.5° phase lag vs −90° for the integer integrator, while s^{μ=1.15} contributes +103.5° phase lead vs +90°. This produces a flatter phase response over a wider frequency band — the iso-damping property — making the FOPID more robust to gain variations.
Closed-loop poles (Ref PID): [-2.862+1.247i;-2.862-1.247i;-14.46]
Closed-loop poles (Ref FOPID, order 47, dominant 4): [-0.0001452;-0.0001656;-0.000349;-0.0003981]
8. Training Methodology
| Aspect | Neuro-PID | Neuro-FOPID |
|---|---|---|
| Label source | pidtune() closed-form | fmincon + oustapid iterative |
| Labels per condition | 3: (Kp, Ki, Kd) | 5: (Kp, Ki, Kd, μ, λ) |
| Plant variations | 500 (gain ±10%) | 500 (gain ×[0.5,1.5], damp ×[0.5,1.5]) |
| Label normalisation | None required | Z-score all 5 outputs (mandatory) |
| Max epochs / batch | 150 / 256 | 200 / 256 |
| Approximate train time | ~2 min | ~44 min (6 parfor workers) |
| Network parameters | 6595 | 6661 |
Why z-score normalisation is mandatory for FOPID: The five outputs span very different magnitude scales — Kp, Kd ~ O(10⁻⁴) while μ, λ ~ O(1). Without normalisation the MSE loss is dominated by the larger-scale outputs and the network fails to learn μ and λ. Z-scoring each output independently forces equal MSE contribution from all five, producing a network that learns all parameters correctly.
The fmincon cost function used for FOPID training: The heavy penalties on overshoot (×20) and residual error (×50) directly explain why the Neuro-FOPID achieves near-zero overshoot — the training explicitly penalised it most severely.
9. Discussion
9.1 Neural Scheduling vs Fixed Tuning
Neural gain scheduling outperforms fixed analytical tuning dramatically for both controller families:
- PID family: Neuro-PID reduces overshoot by 1× and settling by 8%
- FOPID family: Neuro-FOPID reduces overshoot by 11× and settling by 60%
The NN learns a nonlinear gain policy that adapts to the current phase of the step response — aggressively driving the output toward the setpoint early, then switching to a conservative mode near the target to avoid overshoot. This is fundamentally different from fixed-gain control which must use the same parameters throughout the entire trajectory.
9.2 Integer vs Fractional Order
Comparing the two neural controllers:
The Neuro-FOPID outperforms the Neuro-PID on every transient metric: lower overshoot (0.69% vs 8.14%), faster rise (0.0165 s vs 0.1277 s), faster settling (0.4294 s vs 1.2330 s), lower ISE (0.0025 vs 0.0522). The Neuro-PID achieves slightly lower SSE (0.003779 vs 0.005001).
The fractional orders give the FOPID a fundamental advantage: μ > 1 provides stronger phase lead than a classical derivative (enabling faster, better-damped rise), while adaptive λ lets the NN modulate the integrator aggressiveness separately from Kp and Kd — effectively giving it a fourth dimension of control authority unavailable to the integer PID.
9.3 The Pareto Frontier
In classical control design, overshoot, rise time, and settling time typically trade off against each other. A controller that reduces overshoot usually does so by reducing Kp (slower rise) or reducing Kd (more oscillation). The Neuro-FOPID escapes this Pareto frontier by using dynamic gain scheduling: it runs a different effective controller at t=0 (high Kp, high Kd, low Ki) than at t=1 s (lower Kp, higher Ki, adjusted μ/λ). This is equivalent to having a nonlinear controller whose linearisation changes continuously.
9.4 Practical Considerations
Deployment: Both neural controllers run in real-time MATLAB Function blocks in Simulink. The Neuro-FOPID additionally requires FracInt_Var and FracDer_Var blocks (bilinear Oustaloup sections) which add computational overhead but remain lightweight on modern hardware.
Robustness: The neural controllers were trained on a range of perturbed plants. The Neuro-PID used ±10% gain variation; the Neuro-FOPID used ±50% gain and damping variation. The FOPID’s wider training distribution should give it better robustness to plant uncertainty — consistent with the iso-damping property of FOPID.
10. Conclusions
-
Neural gain scheduling is the dominant factor. In both PID and FOPID families, the neural controller outperforms the fixed analytical reference by a large margin. The NN learns a nonlinear adaptive policy that no single set of fixed parameters can replicate.
-
Neuro-FOPID is the best overall controller, achieving the lowest values for overshoot (0.69%), rise time (0.0165 s), settling time (0.4294 s), ISE, IAE, ITAE and ITSE simultaneously. This Pareto-domination is enabled by the two extra degrees of freedom (μ, λ) which the NN uses to schedule a fundamentally different control character across the step response trajectory.
-
Ref FOPID > Ref PID on all integral indices, confirming the classical advantage of fractional-order control even without adaptation. The iso-damping property of FOPID reduces the sensitivity of the closed-loop to parameter uncertainty.
-
Neuro-PID achieves the best SSE among the neural controllers and is significantly simpler to implement and train. It is the right choice when training time, implementation complexity, or embedded compute resources are constrained.
-
Application mapping:
Requirement Best Choice Best transient performance Neuro-FOPID Lowest steady-state error Ref PID Simplest neural implementation Neuro-PID Fractional-order / uncertain plant Neuro-FOPID Embedded deployment Neuro-PID Maximum robustness Neuro-FOPID
Appendix A: Figure List
| Fig | File | Description |
|---|---|---|
| 1 | fig1_step_response.png | All 4 controllers, 0–3 s |
| 2 | fig2_transient_zoom.png | Transient detail 0–0.6 s |
| 3 | fig3_tracking_error.png | Error e(t) = r − y |
| 4 | fig4_pid_gains.png | Neuro-PID scheduled gains |
| 5 | fig5_fopid_gains.png | Neuro-FOPID gains + μ, λ trajectories |
| 6 | fig6_perf_indices.png | Integral indices bar chart |
| 7 | fig7_step_metrics.png | Step metrics bar chart |
| 8 | fig8_bode.png | Reference controller Bode diagrams |
| 9 | fig9_poles.png | Closed-loop pole locations |
Appendix B: Raw Numerical Data
Ref PID Neuro-PID Ref FOPID Neuro-FOPID
Overshoot (%%) 7.9268 8.1352 7.5835 0.6904
Rise Time (s) 0.1195 0.1277 0.1369 0.0165
Settling Time (s) 1.1427 1.2330 1.0832 0.4294
SSE 0.000048 0.003779 0.001707 0.005001
ISE 0.034535 0.052174 0.024958 0.002508
IAE 0.112562 0.137512 0.099323 0.035609
ITAE 0.040891 0.060756 0.039043 0.028266
ITSE 0.002561 0.002681 0.002265 0.000264
Ref PID: Kp=1.1159e-04 Ki=1.6996e-04 Kd=1.8317e-05
Ref FOPID: Kp=1.1160e-04 Ki=1.7000e-04 Kd=1.8320e-05 mu=1.15 lambda=0.85
Neuro-PID mean gains: Kp=1.1054e-04 Ki=9.1005e-05 Kd=1.4507e-05
Neuro-FOPID: mu in [1.189,1.376], lambda in [0.951,1.048]
Report generated by MATLAB — 21-Apr-2026 07:18:06