Artificial Intelligence in Mechatronics Applications
Chapter 8
System Identification and Intelligent Control
Bachelor Program in Mechatronics Engineering
Artificial Intelligence in Mechatronics Applications
•
Bachelor
System Identification and Intelligent Control
Introduction and Context
Mechatronic systems combine mechanical structures, electrical drives, sensors, embedded computation, and control software. Their performance depends not only on component quality but also on how accurately the system is represented and controlled. A motor-driven positioning stage, for example, may exhibit friction, backlash, flexible modes, sensor noise, actuator saturation, temperature-dependent parameters, and communication delay. A fixed controller designed from an ideal model may therefore perform poorly when the operating conditions change.
System identification is the process of constructing a mathematical model from measured inputs and outputs. Intelligent control uses models, rules, learning algorithms, or adaptive mechanisms to make control decisions under uncertainty. These subjects are closely related: identification supplies the knowledge needed for control, while control experiments generate informative data for further identification.
This chapter compares physics-based, data-driven, and hybrid models, then examines adaptive, fuzzy, neural, predictive, and learning-based control. The central engineering question is not whether an algorithm is described as “intelligent,” but whether it provides adequate tracking, stability, robustness, computational efficiency, safety, and explainability for the application.
Learning Objectives
By the end of this chapter, students should be able to:
Distinguish physics-based, data-driven, and hybrid models.
Formulate basic discrete-time models for mechatronic systems.
Design and interpret system-identification experiments.
Explain the operating principles and limitations of adaptive, fuzzy, neural, predictive, and reinforcement-learning control.
Select an appropriate control architecture for a practical mechatronic application.
Identify safety, validation, cybersecurity, and governance requirements for intelligent controllers.
1. Models as Engineering Representations
A model is a purposeful approximation of a physical system. It is not required to reproduce every physical detail; it must reproduce the behavior relevant to a design decision. A motor-speed model may ignore bearing geometry but must represent inertia, torque constant, resistance, friction, and load variation if these influence speed regulation.
1.1 Physics-based models
Physics-based models are derived from conservation laws and constitutive relationships. For a rotational electromechanical actuator, a simplified model can be written as
J dω/dt = Kₜ i − bω − τL
where J is reflected rotational inertia in kg·m², ω is angular speed in rad/s, Kₜ is the torque constant in N·m/A, i is armature current in A, b is viscous-friction coefficient in N·m·s/rad, and τ_L is load torque in N·m. The equation assumes a rigid shaft, linear viscous friction, and torque proportional to current. Coulomb friction, saturation, backlash, and flexible couplings are omitted.
A state-space representation is
ẋ = f(x,u,d,θ), y = h(x,u,d,θ) + v
where x is the state vector, u is the manipulated input, d represents disturbances, θ contains model parameters, y is the measured output, and v is measurement noise. For a linear time-invariant approximation,
xₖ₊₁ = Axₖ + Buₖ + Edₖ
yₖ = Cxₖ + Duₖ + vₖ
The matrices A, B, C, and D must have compatible dimensions. The discrete sampling interval is assumed constant. Physics-based models are interpretable and often extrapolate better outside the measured data range, but they can be difficult to derive for friction, hysteresis, contact, and unmodeled flexibility.
1.2 Data-driven models
A data-driven model infers relationships from observations rather than explicitly deriving them from physical laws. A common linear autoregressive model with exogenous input is
where y is the measured output, u is the input, aᵢ and bⱼ are estimated coefficients, and eₖ is modeling error. The input and output must be sampled consistently, and the selected delays must be appropriate to the process dynamics.
More flexible models include decision trees, Gaussian processes, support-vector regression, and neural networks. Data-driven models can capture nonlinear effects without explicitly specifying their mechanism. Their weaknesses include dependence on representative data, sensitivity to distribution shift, possible lack of physical plausibility, and reduced interpretability.
1.3 Hybrid models
Hybrid modeling combines known physics with learned residuals or uncertain parameters. For example,
xₖ₊₁ = fphys(xₖ,uₖ,θ) + r_φ(xₖ,uₖ)
Here f_phys is a mechanistic model and r_φ is a learned residual parameterized by φ. The residual should be constrained so that the learned component does not contradict known conservation laws or safety limits. Another hybrid approach estimates physical parameters online, such as mass, friction, or motor resistance, from measured data.
Hybrid models are often attractive in mechatronics because they require less data than a completely black-box model while capturing effects that are difficult to model analytically. However, poor separation between the physical and learned parts can cause identifiability problems: several parameter combinations may explain the same measured behavior.
Model type
Main strength
Main limitation
Typical use
Physics-based
Interpretability and extrapolation
Simplifying assumptions
Design, simulation, safety analysis
Data-driven
Captures complex nonlinear behavior
Data dependence and weak interpretability
Prediction, anomaly detection
Hybrid
Balances physical insight and flexibility
More complex validation
Advanced control and digital twins
2. System Identification
2.1 The identification workflow
A reliable identification study normally follows these stages:
Define the purpose, operating range, outputs, constraints, and acceptable error.
Select sensors, sampling rate, excitation signals, and safety limits.
Collect data under conditions that sufficiently excite the relevant dynamics.
Preprocess data by synchronizing channels, removing obvious faults, filtering where justified, and documenting units.
Estimate model parameters using an appropriate method.
Validate using independent data, not merely the data used for fitting.
Quantify uncertainty and determine whether the model is adequate for the intended controller.
The principle of persistent excitation is important. If an input remains nearly constant, parameters associated with dynamic response cannot be reliably distinguished. A step, chirp, pseudorandom binary sequence, or carefully designed multisine signal can provide richer excitation, but safety and actuator limits must always be respected.
2.2 Least-squares estimation
For a linear regression model, collect N observations in the form
y = Φθ + e
where y is an N×1 output vector, Φ is the regression matrix, θ is the parameter vector, and e is the error vector. Ordinary least squares gives
θ̂ = (ΦᵀΦ)⁻¹Φᵀy
provided ΦᵀΦ is nonsingular. In practice, QR or singular-value-decomposition methods are preferred to directly computing the inverse, especially when regressors are correlated. The estimate is meaningful when the model structure is suitable, the data are sufficiently informative, and errors are not systematically correlated with regressors.
For online adaptation, a recursive least-squares update with forgetting factor λ, 0 < λ ≤ 1, is often used:
Kₖ = Pₖ₋₁φₖ / (λ + φₖᵀPₖ₋₁φₖ)
θ̂ₖ = θ̂ₖ₋₁ + Kₖ(yₖ − φₖᵀθ̂ₖ₋₁)
Pₖ = λ⁻¹[Pₖ₋₁ − KₖφₖᵀPₖ₋₁]
Here φₖ is the regressor, Pₖ is the covariance or confidence matrix, and the innovation is yₖ − φₖᵀθ̂ₖ₋₁. A smaller λ gives greater emphasis to recent data but can increase sensitivity to noise.
2.3 Validation and model quality
A model should be tested on data not used for estimation. Useful measures include root-mean-square error,
RMSE = √[(1/N)∑ₖ₌₁ᴺ(yₖ − ŷₖ)²]
where yₖ is the measured value and ŷₖ is the predicted value. RMSE has the same units as the output and penalizes large errors more strongly than mean absolute error. A good average error does not guarantee safe control: a model may fail at saturation, near singular configurations, or during rapid transients.
Residual analysis is also important. Residuals should have approximately zero mean and little autocorrelation if the model has captured the relevant dynamics. Validation should cover changes in load, speed, temperature, direction, and disturbance conditions. For neural or other high-capacity models, train/validation/test separation and leakage prevention are essential.
3. Intelligent Control Architectures
A practical controller usually contains more than one algorithm. A low-level current loop may be conventional PI control, while an outer loop uses model predictive control or a learned trajectory planner. Supervisory logic can switch between modes, detect faults, and enforce safety constraints.
Intelligent control architecture with plant, sensors, model and controller
Figure: Intelligent control architecture with plant, sensors, model and controller
Figure: A generic intelligent-control architecture in which measured feedback informs both control action and model estimation.
3.1 Adaptive control
Adaptive control changes controller parameters in response to estimated plant behavior. In model-reference adaptive control, the desired response is represented by a reference model and controller parameters are adjusted to reduce tracking error. In self-tuning control, parameters are identified online and a controller is recalculated from the updated model.
Adaptation is useful when payload, friction, or actuator characteristics change. Its risks include parameter drift, excitation requirements, noise amplification, and instability during rapid adaptation. A robust design usually includes parameter bounds, projection or normalization, dead zones, rate limits, and a fallback controller.
3.2 Fuzzy control
Fuzzy control represents qualitative knowledge using linguistic variables such as “position error is positive large” or “velocity is near zero.” Membership functions map numerical values to degrees of membership between 0 and 1. A rule might be: IF position error is positive large AND velocity is positive, THEN command is negative large.
A typical Mamdani controller fuzzifies inputs, evaluates rules, aggregates their outputs, and defuzzifies the result, often using a centroid calculation. Fuzzy control is valuable when expert knowledge is available but an accurate model is difficult to derive. It can be smooth and intuitive, but rule completeness, scaling, tuning, and formal stability analysis require care. Fuzzy control is not automatically stable merely because its rules appear reasonable.
3.3 Neural-network control
A neural network can approximate an inverse dynamics map, estimate unknown disturbances, or serve as a policy. A feedforward layer can be written as
z = σ(Wx + b)
where x is the input vector, W is a weight matrix, b is a bias vector, and σ is an activation function. Training minimizes a selected loss over data; it does not by itself guarantee closed-loop stability.
Safe uses include residual compensation around a stabilizing baseline controller, system identification for prediction, and supervised approximation of a validated control law. Input normalization, out-of-distribution detection, uncertainty estimation, and bounded outputs are important in deployment.
3.4 Model predictive control
Model predictive control (MPC) uses a model to predict future behavior and solves a finite-horizon optimization at each sample. A simplified linear quadratic objective is
Q and P are positive semidefinite weighting matrices, R is positive definite, N is the prediction horizon, and subscript r denotes the reference. Only the first control action is normally applied; the optimization is then repeated using new measurements. Constraints are a major advantage, but computation, model mismatch, and feasibility must be addressed. Terminal costs, terminal sets, robust formulations, or carefully chosen horizons can support stability, but stability claims depend on the exact formulation and assumptions.
3.5 Learning-based and reinforcement-learning control
Reinforcement learning (RL) learns a policy through interaction with an environment. At time k, the controller observes state sₖ, selects action aₖ, receives reward rₖ, and transitions to sₖ₊₁. A discounted return is
Gₖ = ∑ₜ₌₀^∞ γᵗrₖ₊ₜ₊₁
where γ, 0 ≤ γ < 1, is the discount factor. In physical systems, unrestricted trial-and-error is usually unacceptable. Training is therefore commonly performed in simulation, with domain randomization, offline data, demonstrations, safety filters, or a conventional backup controller. The sim-to-real gap, reward misspecification, exploration risk, and limited certification remain substantial challenges.
4. Stability, Robustness, and Real-Time Performance
4.1 Stability
For a discrete linear closed-loop system xₖ₊₁ = A_cl xₖ, asymptotic stability requires every eigenvalue of A_cl to lie strictly inside the unit circle. For continuous-time linear systems, stability requires eigenvalues of A_cl to have negative real parts. These statements apply to the stated linear time-invariant models; nonlinear and time-varying systems need appropriate Lyapunov or other analyses.
A Lyapunov approach seeks a positive-definite function V(x) such that its change is negative away from the equilibrium. For a discrete system, a common condition is
∆V = V(xₖ₊₁) − V(xₖ) < 0
for all nonzero states in the region of interest. A learned controller may be tested empirically, but repeated successful simulations are not a proof of stability.
4.2 Robustness
Robustness is the ability to maintain acceptable behavior despite model uncertainty, disturbances, sensor noise, parameter variation, delays, and faults. Important techniques include gain and phase margins, disturbance observers, robust MPC, anti-windup, saturation handling, fault detection, and conservative operating envelopes.
A controller can be stable yet unacceptable if its response is too slow, oscillatory, noisy, or energy-intensive. Conversely, high nominal performance may conceal poor robustness. Evaluation should include worst-case or stress scenarios, not only average performance.
4.3 Latency and sampling
A digital controller operates at discrete instants. The sampling period Tₛ must be short enough to resolve relevant dynamics and allow computation, communication, and actuation before the next update. Total delay may include sensor conversion, filtering, scheduling, network transmission, optimization, and actuator response. Delays reduce phase margin and can destabilize fast loops.
Real-time feasibility requires bounded execution time, not merely a low average execution time. If the worst-case computation time approaches or exceeds Tₛ, deadline misses can create variable delay and degraded control. Hardware-in-the-loop testing and worst-case execution-time analysis are therefore important before deployment.
5. Worked Example: Online Estimation and Adaptive Speed Control
Consider a drive whose sampled speed approximately follows
ωₖ = aωₖ₋₁ + buₖ₋₁ + eₖ
Suppose one measurement gives ωₖ₋₁ = 10 rad/s, uₖ₋₁ = 2 V, and ωₖ = 11.2 rad/s. An initial model has â = 0.90 and b̂ = 0.40 (rad/s)/V. The predicted speed is
ω̂ₖ = 0.90(10) + 0.40(2) = 9.8 rad/s
The innovation is 11.2 − 9.8 = 1.4 rad/s. This positive innovation indicates that the measured speed is higher than predicted. A recursive estimator would combine this innovation with the regressor φₖ = [10, 2]ᵀ and its covariance matrix to update â and b̂. The numerical update cannot be determined without Pₖ₋₁ and λ; assuming values that were not supplied would be invalid.
An adaptive controller could then recompute a speed-control gain using the updated model. In practice, the design should constrain parameter estimates to physically plausible ranges, account for measurement noise, and retain a conventional fallback if the estimator becomes poorly conditioned. The example illustrates an important engineering distinction: a model prediction error is evidence for adaptation, not proof that the underlying physical parameters have changed.
6. Illustrative Case: Intelligent Control of a Robotic Pick-and-Place Axis
Background
The following is an illustrative case. A belt-driven robotic axis must move a 5 kg payload between workstations. Its position sensor has finite resolution, the belt exhibits elasticity, and friction varies with temperature. A conventional position controller performs well at low speed but produces overshoot when the payload changes.
Problem
The engineering team must improve settling time without exceeding motor current, belt tension, or position-error limits. The controller must execute every 2 ms, tolerate a 20% payload variation, and provide a safe response when sensor data are invalid.
Analysis
A physics-based model captures reflected inertia, motor torque, viscous friction, belt stiffness, and actuator limits. Identification experiments using bounded chirp signals are performed at several payloads and temperatures. A validation set is reserved for testing. The resulting model predicts the dominant rigid-body behavior, but friction and belt hysteresis remain imperfectly represented.
A purely neural controller is rejected for direct deployment because the available data do not cover all combinations of temperature, payload, and belt wear. Instead, a hybrid architecture is selected. The baseline controller is a constrained MPC or robust feedback controller based on the physical model. A small learned residual estimates friction-related compensation only within a validated operating envelope. A supervisory monitor disables the residual and switches to the baseline controller when confidence falls or sensor consistency checks fail.
Approach and solution
The control loop includes:
an inner current loop with a fixed, high-rate controller;
an outer position and velocity controller using the identified model;
online estimation of payload-related inertia within bounded limits;
a learned residual for repeatable friction effects;
current, position, velocity, and temperature constraints;
watchdog timing and sensor plausibility checks.
Testing proceeds in simulation, hardware-in-the-loop, unloaded operation, loaded operation, and fault-injection trials. The learned component is evaluated against data from temperatures and payloads not used during training.
Outcome
In this illustrative case, the hybrid controller reduces settling time in the validated operating region while maintaining the safety envelope. The principal benefit does not come solely from the neural residual; it comes from combining a physically meaningful baseline, explicit constraints, bounded adaptation, and independent fault handling. If latency increases or the learned model encounters an unfamiliar condition, graceful degradation is more valuable than marginal nominal performance.
Learning points
Model selection should follow the control objective and risk level.
Data coverage is as important as model architecture.
Safety constraints must remain active regardless of learning method.
Validation must include disturbances, operating changes, and faults.
Intelligent control is usually an architecture, not a single algorithm.
7. Professional Practice, Ethics, and Governance
Engineers are responsible for the behavior of the complete cyber-physical system, including data collection, software updates, and failure modes. Relevant practices include traceable requirements, version-controlled datasets and models, calibration records, access control, secure communication, audit logs, and documented change management.
Safety-critical applications require hazard analysis, independent verification, and clearly defined safe states. A learned controller should not be accepted solely because it performs well on a test set. It should have a specified operating domain, monitoring strategy, fallback behavior, and evidence that it meets applicable machinery, functional-safety, electromagnetic-compatibility, and cybersecurity requirements. Exact regulatory obligations depend on the jurisdiction and application.
Data quality also has ethical significance. Sensors may reveal worker behavior, production rates, or maintenance practices. Data collection should be proportionate, protected, and transparent. Engineers should avoid overstating the autonomy or reliability of an AI component, especially where operators may incorrectly assume that the system has guaranteed understanding or safe behavior.
8. Best-Practice Design Procedure
A defensible intelligent-control project can follow this sequence:
Begin with requirements, hazards, operating limits, and performance metrics.
Build the simplest adequate physics-based model.
Design an informative but safe identification experiment.
Compare model structures using independent validation data.
Add data-driven components only where they address a demonstrated modeling gap.
Preserve hard constraints, monitoring, and a stabilizing fallback.
Analyze sampling, latency, computation, numerical conditioning, and saturation.
Test nominal, disturbed, uncertain, and fault conditions.
Document assumptions, data provenance, model versions, and acceptance criteria.
Monitor deployed performance and define a process for recalibration or rollback.
Contemporary Developments
Current research increasingly combines differentiable physical models, uncertainty-aware machine learning, safe reinforcement learning, event-triggered control, edge AI, and digital twins. Physics-informed learning attempts to embed differential equations or conservation laws into training. Probabilistic models can express prediction uncertainty, which supports risk-aware decisions. Event-triggered control reduces communication or computation by updating only when an error condition is met, although the triggering mechanism itself must be analyzed for stability and implementation effects.
These developments do not eliminate fundamental engineering requirements. Better prediction does not automatically yield a stable controller, and a sophisticated algorithm may be inferior to a simpler one if it cannot meet timing, verification, maintenance, or safety requirements.
Chapter Summary
System identification constructs useful models from measured behavior, while intelligent control uses adaptation, rules, learned functions, prediction, or interaction to regulate mechatronic systems. Physics-based models provide interpretability and physical structure; data-driven models capture complex behavior but depend strongly on representative data; hybrid models combine both advantages when their interfaces are carefully constrained.
Reliable identification requires informative experiments, appropriate estimation, independent validation, residual analysis, and uncertainty awareness. Adaptive control responds to changing parameters, fuzzy control encodes linguistic expertise, neural methods approximate nonlinear relationships, MPC handles prediction and constraints, and reinforcement learning can optimize policies but introduces exploration and certification challenges.
Controller quality must be judged through stability, robustness, tracking, constraint handling, latency, worst-case execution time, and safe fault behavior. In professional mechatronics, intelligent algorithms should normally operate within a complete architecture containing sensing, estimation, monitoring, constraints, fallback control, cybersecurity, and documented validation.
Key Terms
System identification: Estimating a mathematical model from measured inputs and outputs.
Physics-based model: A model derived from physical laws and constitutive relationships.
Data-driven model: A model inferred primarily from experimental or operational data.
Hybrid model: A model combining mechanistic structure with learned components.
Persistent excitation: Input variation sufficient to reveal the parameters or dynamics of interest.
Regression matrix: A matrix containing measured regressors used for parameter estimation.
Recursive least squares: An online parameter-estimation method that updates estimates as data arrive.
Residual: The difference between an observed value and a model prediction.
Adaptive control: Control in which parameters or laws change in response to estimated system behavior.
Fuzzy control: Rule-based control using linguistic variables and graded membership.
Neural-network control: Control or estimation using learned parameterized neural functions.
Model predictive control: Receding-horizon optimization based on a process model and constraints.
Reinforcement learning: Learning a policy through actions, rewards, and state transitions.
Robustness: Ability to maintain acceptable performance under uncertainty and disturbances.
Lyapunov stability: Stability assessed using an energy-like function whose change satisfies specified conditions.
Latency: Time delay between measurement, computation, communication, and actuation.
Worst-case execution time: Maximum verified computation time under specified hardware and software conditions.
Distribution shift: A change between the data distribution used for development and that encountered in operation.
Fallback controller: A validated alternative controller used when an advanced component is unsafe or unreliable.
Review Questions
Short Answer Questions
What is the main difference between a physics-based model and a data-driven model?
Why must identification data contain sufficient excitation?
State one advantage and one limitation of model predictive control.
What does a forgetting factor do in recursive least squares?
Why is worst-case execution time important in a digital control loop?
Long Answer Questions
Compare physics-based, data-driven, and hybrid models for a robotic manipulator with nonlinear friction.
Explain the complete system-identification workflow, including experiment design and independent validation.
Describe how adaptive, fuzzy, and neural controllers differ in their knowledge representation and failure modes.
Explain how constraints and prediction are incorporated into model predictive control.
Discuss why successful simulation of a learned controller is not sufficient evidence of closed-loop safety.
Analytical / Application Questions
A motor-speed model predicts 9.8 rad/s while the measured speed is 11.2 rad/s. Calculate the innovation and explain what additional information is required to perform a recursive least-squares update.
Design a safe hybrid-control architecture for a variable-payload conveyor axis. Specify the baseline controller, learned component, monitored variables, fallback conditions, and validation tests.
A controller has excellent nominal tracking but misses its 2 ms deadline during optimization peaks. Analyze the likely control consequences and propose at least four engineering remedies.
Multiple Choice Questions with Answers
Question 1
Which model type explicitly combines mechanistic equations with a learned residual?
A. Physics-based model
B. Hybrid model
C. Purely data-driven model
D. Open-loop model
Correct Answer: B. Hybrid model
Question 2
In ordinary least squares, what condition is required for the expression θ̂ = (ΦᵀΦ)⁻¹Φᵀy to use an ordinary inverse?
A. The output must be noise-free
B. The input must be constant
C. ΦᵀΦ must be nonsingular
D. The sampling period must be zero
Correct Answer: C. ΦᵀΦ must be nonsingular
Question 3
What is the innovation in the worked speed-estimation example?
A. 0.4 rad/s
B. 1.2 rad/s
C. 1.4 rad/s
D. 9.8 rad/s
Correct Answer: C. 1.4 rad/s
Question 4
Which feature is a principal advantage of model predictive control?
A. It never requires a model
B. It can explicitly handle constraints
C. It guarantees stability for every formulation
D. It eliminates computation during operation
Correct Answer: B. It can explicitly handle constraints
Question 5
For a discrete linear closed-loop system, asymptotic stability requires the eigenvalues of the closed-loop matrix to be:
A. Outside the unit circle
B. On the imaginary axis
C. Strictly inside the unit circle
D. All equal to one
Correct Answer: C. Strictly inside the unit circle
Question 6
What is a major risk of unrestricted reinforcement-learning experimentation on a physical robot?
A. The robot cannot receive measurements
B. Exploration may create unsafe actions
C. The reward is always zero
D. The sampling rate becomes infinite
Correct Answer: B. Exploration may create unsafe actions
Question 7
Why are independent validation data used in system identification?
A. To increase the number of controller actuators
B. To test generalization beyond the fitting data
C. To guarantee zero measurement noise
D. To remove all physical constraints
Correct Answer: B. To test generalization beyond the fitting data
Question 8
Which practice best supports safe deployment of a neural residual controller?
A. Removing all output limits
B. Using it without a baseline controller
C. Bounding its operating domain and retaining a fallback
D. Training only on nominal data and disabling monitoring
Correct Answer: C. Bounding its operating domain and retaining a fallback
Question 9
If a controller misses its sampling deadline, the immediate engineering concern is usually:
A. Variable or excessive computation-induced delay
B. Improved phase margin
C. Automatic parameter identifiability
D. Elimination of sensor noise
Correct Answer: A. Variable or excessive computation-induced delay
Question 10
What does persistent excitation provide during identification?
A. Input variation that helps reveal system dynamics
B. A guarantee that the system is stable
C. A method for removing actuator saturation
D. A replacement for independent validation
Correct Answer: A. Input variation that helps reveal system dynamics
Artificial Intelligence in Mechatronics Applications
Chapter 8
of 15