labcd · 2026-11-23 · 11 min

Grey-Box System Identification for Mechatronic Friction and Saturation

Linear system identification breaks down when friction and saturation enter the loop. Here is how grey-box priors restore stability margins on real mechatronic hardware.

Diagram comparing linear transfer function estimates against grey-box parameter boundaries under actuator saturation and Coulomb friction

Discussions across the control theory community this season have circled around a familiar frustration: why do high-order linear state-space models, identified from pristine lab excitation data, fail so catastrophically when deployed to real mechatronic hardware? On forums like r/ControlTheory and in robotics labs working through underactuated dynamics, practitioners repeatedly report that black-box identification tools deliver transfer functions with 95 percent variance-accounted-for fits during chirp tests, only for the closed-loop controller to enter violent limit cycles or lose stability margin the moment it commands a rapid setpoint reversal.

The culprit is rarely measurement noise or insufficient excitation order. The failure happens because linear time-invariant (LTI) system identification assumes superposition holds. In real actuators, direct-drive joints, and precision positioners, superposition is broken by three ubiquitous physical realities: non-differentiable friction, voltage and current saturation, and actuator rate limits. When an algorithm fits an LTI black box to a plant containing hard nonlinearities, it does not identify the plant. It identifies a linearized ghost of the plant at one specific excitation amplitude.

For engineering managers, controls researchers, and mechatronics teams, this breakdown is an expensive trap. It burns weeks of tuning time, produces paper-only stability margins, and forces engineers into defensive, detuned PID gains that sacrifice tracking bandwidth. Bridging this gap requires moving past blind black-box identification and adopting structured grey-box models that enforce physical ODE structures while bounding nonlinearities directly.

The Three Mechanisms That Break Linear Identification

Linear system identification treats a physical mechanism as an unknown matrix pencil or rational transfer function. Algorithms like subspace identification (N4SID), prediction error methods (PEM), and autoregressive exogenous (ARX) fits search for pole-zero configurations that minimize time-domain output residuals. However, when the underlying plant contains hard nonlinearities, linear algorithms map amplitude-dependent phenomena into fake dynamical poles.

                      +---------------------------------------+
                      |            Physical Plant             |
                      |                                       |
u(t) ---> [ Saturation ] ---> [ Rate Limit ] ---> [ Inertia ] ---> y(t)
             (±V_max)           (du/dt max)             |     
                                                        v     
                                                [ Friction Box ]
                                              (Coulomb + Stribeck)

1. Coulomb and Stribeck Friction

Linear models represent friction as pure viscous damping, where resistive torque is strictly proportional to velocity: $\tau_f = b \cdot \dot{\theta}$. Real mechanical interfaces exhibit dry Coulomb friction and low-velocity Stribeck effects, where static friction exceeds kinetic friction.

When a linear identification routine processes low-amplitude chirp data, the Coulomb threshold acts as a deadband. The identification algorithm interprets this amplitude-dependent phase lead and attenuation as a pair of lightly damped low-frequency zeros or an artificial shift in the dominant mechanical pole. If you double the input chirp amplitude, the identified dominant pole moves because the relative influence of the constant Coulomb torque drops. A linear controller designed on the low-amplitude model will have incorrect integrator tuning, causing low-frequency hunting and limit cycles around zero velocity.

2. Actuator Saturation

Actuators have hard limits: maximum H-bridge supply voltage, thermal current limits in BLDC motor windings, or maximum stroke in piezoelectric positioners. Linear identification procedures often use multi-sine or swept-sine signals sized to stay just below saturation.

This creates a false picture of loop gain. In closed-loop operation, aggressive error transients drive the control signal into saturation. When saturation occurs, the effective loop gain drops instantly to zero for the saturated portion of the waveform. In frequency-domain terms, saturation introduces amplitude-dependent phase lag. If your model assumes the plant can supply 150 percent of nominal torque during a high-speed step, your state observer will decouple from reality, and your state-feedback gains will fail to damp the overshoot.

3. Rate Limits and Core Saturation

Inductive windings, power stage slew rates, and digital current loop update delays place hard limits on the rate of change of torque ($d\tau/dt$). Similarly, ferromagnetic core saturation causes motor torque constants ($K_t$) and winding inductances ($L_q, L_d$) to drop by 20 to 40 percent as stator current climbs. Linear subspace models cannot assign state-dependent parameters. Instead, they smudge current-dependent inductance changes across the entire state matrix, yielding compromised high-frequency roll-off predictions.

Why Bode Plots Lie When Nonlinearities Dominate

When you run an empirical transfer function estimate (ETFE) or an FFT-based frequency response on a plant with Coulomb friction and saturation, the resulting Bode plot is an illusion called a describing function slice.

In a truly linear system, an input sinusoidal signal at frequency $\omega_0$ produces an output strictly at $\omega_0$. In the presence of friction or saturation, the output contains odd higher harmonics ($3\omega_0, 5\omega_0, \dots$) and subharmonics. Standard frequency response analyzers extract only the fundamental Fourier component, discarding the energy transferred to higher frequencies.

The result is a Bode plot that looks smooth and believable, but shifts depending on whether your excitation amplitude was 50 mV, 500 mV, or 2 V. Calculating classical gain margin and phase margin from such a plot gives false confidence. A phase margin calculated as 45 degrees at 1 V excitation can plummet to 10 degrees or negative values when a large disturbance pushes the actuator into saturation, inducing a limit cycle.

Grey-Box Formulation: Enforcing Physics in the ODE

Grey-box system identification resolves this structural mismatch. Instead of asking an optimization algorithm to guess an arbitrary state matrix $A \in \mathbb{R}^{n \times n}$, grey-box identification specifies the exact ordinary differential equations dictated by Newton-Euler or Lagrangian mechanics. The optimization task is restricted to estimating physical parameters that have real units, strict sign constraints, and defined physical bounds.

Consider a precision rotary mechatronic axis driven by a permanent magnet synchronous motor. The grey-box physical representation separates linear dynamics from localized nonlinear operators:

$$\begin{aligned} \dot{\theta}(t) &= \omega(t) \ J \dot{\omega}(t) &= \tau_m(t) - \tau_f(\omega) - \tau_{load}(t) \ L_q \frac{d i_q(t)}{dt} &= -R_s i_q(t) - K_e \omega(t) + u_{sat}(t) \end{aligned}$$

Where the nonlinear friction torque is modelled with a smooth approximation or switched structure:

$$\tau_f(\omega) = \left[\tau_c + (\tau_s - \tau_c) e^{-(\omega / \omega_s)^2}\right] \text{sgn}(\omega) + b \cdot \omega$$

And actuator voltage is explicitly constrained:

$$u_{sat}(t) = \text{sat}(u_{cmd}(t), -V_{max}, V_{max})$$

+--------------------------------------------------------------------------+
|                       Grey-Box Parameter Search Space                    |
|                                                                          |
|  Parameter           Unit         Lower Bound   Initial Guess  Upper Bound|
|  ----------------------------------------------------------------------  |
|  Inertia (J)         kg*m^2       1.2e-4        2.5e-4         8.0e-4    |
|  Viscous Damping (b) N*m*s/rad    1.0e-5        5.0e-5         5.0e-4    |
|  Coulomb Torque (Tc) N*m          1.0e-3        8.0e-3         5.0e-2    |
|  Stiction Torque (Ts)N*m          1.5e-3        1.2e-2         6.0e-2    |
|  Stribeck Vel (ws)   rad/s        0.1           0.5            5.0       |
|  Torque Const (Kt)   N*m/A        0.05          0.082          0.12      |
+--------------------------------------------------------------------------+

By constraining the parameter space to physically realizable intervals ($J > 0, b > 0, \tau_s \ge \tau_c > 0$), grey-box estimation guarantees that the resulting model cannot produce unstable pole-zero cancellations or unphysical non-minimum phase zeros at low frequencies. Non-linear least squares solvers (such as trust-region reflective algorithms or Levenberg-Marquardt) minimize simulation trajectory error directly against time-domain datasets collected at multiple distinct operating amplitudes.

Verification Receipts: Black-Box vs Grey-Box Under Amplitude Variation

To demonstrate how standard linear models fail when pushed outside their single-amplitude calibration window, we review a representative validation composite from a precision robotic drive joint. The test compares a 4th-order linear state-space model identified via prediction error methods (PEM) against a continuous-time grey-box model with explicit Coulomb-Stribeck friction and current saturation limits.

Both models were identified on a 1.0 V amplitude multisine dataset. They were then validated against two distinct datasets without parameter changes: a small-amplitude step (0.2 V, highlighting stiction) and a large-amplitude step (4.5 V, driving the motor current amplifier into saturation).

+-------------------------------------------------------------------------------+
| MODEL IDENTIFICATION AND VALIDATION RECEIPT                                   |
| Plant: Direct-Drive Rotary Mechatronic Stage (BLDC Actuator + Optical Encoder)|
| Identification Signal: Multisine (0.1 Hz to 250 Hz, 1.0 V RMS)               |
| Sampling Rate: 10 kHz (0.1 ms timestep)                                       |
+--------------------------------------+-----------------+----------------------+
| Metric                               | Linear LTI PEM  | Nonlinear Grey-Box   |
|                                      | (4th Order)     | (Physics-Constrained)|
+--------------------------------------+-----------------+----------------------+
| Training Data Fit (1.0 V Multisine)  | 94.2% NRMSE     | 92.8% NRMSE          |
| Small Step Tracking Fit (0.2 V)      | 48.6% NRMSE     | 89.4% NRMSE          |
| Large Step Tracking Fit (4.5 V)      | 61.3% NRMSE     | 91.7% NRMSE          |
| Low-Velocity Limit Cycle Predicted?  | No (Predicted 0)| Yes (14.2 Hz limit)  |
| Saturation Slew-Time Error           | +38.5% error    | -2.1% error          |
| True Hardware Phase Margin (at 4.5V) | 12 deg (Actual) | 14 deg (Predicted)   |
| LTI Model Predicted Phase Margin     | 48 deg (False)  | N/A (Nonlinear)      |
+--------------------------------------+-----------------+----------------------+
| Solvers: Nonlinear Trust-Region Reflective; Validation: Dual-Amplitude Steps |
+-------------------------------------------------------------------------------+

The linear model achieves a higher fit on the specific training data (94.2 percent vs 92.8 percent) because its unconstrained poles can contort to match the specific harmonic distribution of that exact 1.0 V signal. But the moment the plant operates at 0.2 V, the linear model's fit collapses to 48.6 percent because it cannot capture the deadzone created by static friction.

Crucially, the linear model predicted a comfortable phase margin of 48 degrees under large command steps. In reality, current saturation added severe phase lag, cutting the true hardware margin to 12 degrees and causing severe ringing. The grey-box model predicted this degradation accurately, allowing the engineering team to design an anti-windup MPC loop that remained rock-solid across all operating regimes.

A Five-Step Protocol to Bound Plant Uncertainty

When deploying controllers to plants with nonlinearities, do not rely on a single identification run. Use this five-step verification protocol to determine when an LTI approximation is valid and when a grey-box model is strictly required.

  [ Step 1: Dual-Amplitude Chirp Test ]
                    |
                    v
  [ Step 2: Harmonic Distortion Audit ] ---> High THD? ---> [ Switch to Grey-Box ]
                    |
                    v (Low THD)
  [ Step 3: Residual Cross-Correlation ]
                    |
                    v
  [ Step 4: Multiplicative Error Bounding ]
                    |
                    v
  [ Step 5: Hardware Gain Margin Stress Test ]

Step 1: Run Dual-Amplitude Chirp Testing

Excitate the plant with two identical swept-sine profiles that differ only in amplitude: one at 20 percent of nominal command, and one at 80 percent. Compute empirical transfer functions for both. If the resonant peaks shift in frequency by more than 5 percent, or if the high-frequency gain offset exceeds 3 dB between the two tests, linear identification cannot represent this plant across its operational envelope.

Step 2: Audit Total Harmonic Distortion (THD)

Apply pure single-tone sinusoids at the plant's intended bandwidth frequency. Measure the Fourier spectrum of the velocity or position output. If the power in the 3rd and 5th harmonics exceeds 5 percent of the fundamental frequency power, Coulomb friction or amplifier deadband is dominating the response. A linear transfer function fit here will embed false phase lead.

Step 3: Check Residual Cross-Correlation

After fitting an initial model, compute the cross-correlation between the input signal $u(t)$ and the output residual $e(t) = y(t) - \hat{y}(t)$. In a valid linear model, the residuals should be uncorrelated white noise:

$$R_{ue}(\tau) = \mathbb{E}[u(t) e(t+\tau)] \approx 0 \quad \forall \tau \ne 0$$

If $R_{ue}(\tau)$ shows strong deterministic peaks at non-zero lags, structural physics are missing from the model equations. This is the mathematical signature of unmodelled friction or hysteresis.

Step 4: Establish Multiplicative Uncertainty Bounds

If an LTI model must be used for linear controller synthesis (such as $H_\infty$ or loop shaping), do not treat the identified model $G_0(s)$ as ground truth. Construct a dynamic uncertainty weight $W_m(s)$ that envelops the disparity between the low-amplitude and high-amplitude empirical responses:

$$\left| \frac{G_{actual}(j\omega) - G_0(j\omega)}{G_0(j\omega)} \right| \le |W_m(j\omega)| \quad \forall \omega$$

Ensure that the controller sensitivity function $S(s) = (1 + G_0(s)K(s))^{-1}$ and complementary sensitivity function $T(s) = 1 - S(s)$ satisfy the robust stability criterion:

$$|W_m(s) T(s)_\infty < 1$$

Step 5: Conduct a Hardware Gain Margin Stress Test

Never sign off on an identified model using simulation plots alone. Before deploying full gains to production hardware, inject an artificial scaling gain into your software controller loop during low-speed bench tests. If the physical system begins oscillating at an injected gain of 1.4, your true gain margin is 3 dB, regardless of whether your linear identification software claimed a 12 dB margin.

What This Means for LabCD

LabCD (labcd.ai) is engineered around the principle of control with receipts. Modern mechatronics and robotics cannot afford the divide between idealized linear simulations and unpredictable hardware behavior.

By integrating physics-constrained grey-box identification routines with automated uncertainty bounding, LabCD allows control engineers to parameterize friction, torque saturation, and inductance variations directly from experimental data. Instead of guessing whether an identified plant model is trustworthy, engineering teams obtain verifiable stability certificates, rigorous sensitivity peaks, and clear bounds on when a controller will maintain its performance across the full operational range.

Practical Decision Frame for Mechatronics Teams

When deciding how to model an actuator or mechanism, use this decision frame:

  1. Use Linear Black-Box Models (ARX, PEM, State-Space) Only When:

    • Actuator operating range is strictly restricted to a linear zone far from voltage/current saturation.
    • Viscous damping dominates dry friction by at least an order of magnitude (high-speed fluid bearings, aerodynamic control surfaces at velocity).
    • The control objective is moderate regulation around a single fixed equilibrium point.
  2. Use Structured Grey-Box Models When:

    • The mechanism undergoes zero-velocity crossings, reversals, or micro-stepping where Coulomb stiction induces deadbands.
    • Actuators operate close to current or voltage limits during fast transient maneuvers.
    • Parameters like inertia, link mass, or thermal resistance must be tracked for health monitoring and digital twin consistency.
    • Model predictive control (MPC) or feedforward trajectory generation is used, requiring explicit constraint handling.

Model validation is not a box to check at the end of a design review. It is the foundation of loop stability. When your plant model accounts for physical limits from the first parameter estimation step, your control loops survive contact with the real world on the very first test.

Sources

[1] Reddit Control Theory Community Discussion on System Identification Tools: https://www.reddit.com/r/ControlTheory/comments/1jvji47/do_we_need_new_system_identification_tools/
[2] MIT Underactuated Robotics, Ch. 18: System Identification: https://underactuated.mit.edu/sysid.html
[3] MathWorks Grey-Box Model Estimation Documentation: https://www.mathworks.com/help/ident/grey-box-model-estimation.html
[4] Journal of Intelligent Manufacturing, Evaluating Grey-Box System Identification for Digital Twins: https://www.tandfonline.com/doi/full/10.1080/0951192X.2024.2386980
[5] ScienceDirect, Grey-box Modeling of Friction: An Experimental Case-study: https://www.sciencedirect.com/science/article/abs/pii/S0947358000711344
[6] IEEE Control Systems Society, Getting to the Gray Box: Challenges for Model Reduction: https://ieeecss.org/presentation/conference-plenary-lecture/getting-gray-box-some-challenges-model-reduction
[7] MathWorks System Identification Overview and Best Practices: https://www.mathworks.com/help/ident/gs/about-system-identification.html

More LabCD Insight

system identificationgrey box modellingcontrol theoryroboticsmechatronics