Manuscript Offprint
arXiv:2610.33679Energy-Based Fault Detection and Isolation Framework for Flat Port-Hamiltonian Mechanical Systems
Johnny Garcia, Nicolas Salguero, Naveed Iqbal, Brahim Brahmi, and Ramy Rashad
Abstract—Fault diagnosis during regulated motion requires informative signals even when feedback attenuates tracking deviations. This paper develops an energy-based diagnostic framework that constructs mechanical port-power residuals without a dedicated dynamic observer. Spectral Hamiltonian Algebraic Power Evaluation (SHAPE) combines port-Hamiltonian variables and differential flatness to generate nominal power references from planned motion for fully actuated mechanical systems with collocated actuation. Subtracting these references from commanded effort multiplied by measured flow yields residuals whose final evaluation requires neither recursive observer updates nor measured-state dynamics calculations. Continuous wavelet transform (CWT) scalograms and a shared-encoder convolutional neural network assess their ability to distinguish nominal operation, actuator loss of effectiveness, anomalous friction, and vibration from complete trajectories. Evaluation uses a simulated six-degree-of-freedom Kinova manipulator under model predictive control and fixed plant-model mismatch, with single faults at a specified joint. Across five training seeds and 3000 held-out test runs, SHAPE-CWT achieves a mean accuracy of 84.69 percent, versus 81.67 percent for torque residuals and 97.17 percent for the generalized momentum observer under common CWT processing. The respective sample standard deviations are 0.70, 0.70, and 0.37 percentage points. These results demonstrate useful fault-type discrimination from algebraic power residuals, while severity-excitation profiles and offline velocity perturbations reveal limits to their diagnostic capability.
Index Terms—Differential flatness, energy-based diagnosis, fault detection and isolation (FDI), physics-guided machine learning, port-Hamiltonian systems, wavelet scalograms.
I. INTRODUCTION
F AULT detection and isolation (FDI) supports the reliable operation of mechanical systems by identifying faults during commanded motion. This task is challenging under feedback control; the controller can compensate for degradation and disturbances while maintaining tracking performance, masking fault signatures in the tracking error [1]. Small tracking deviations can therefore coexist with abnormal operation, creating a need for diagnostic signals that remain informative during regulated motion.
Data-driven methods learn fault signatures from measured signals and their representations. Convolutional neural networks (CNNs), combined with time-frequency representations such as continuous wavelet transform (CWT) scalograms, are widely used to extract diagnostic patterns in machinery [2], [3]. Their performance depends on the information available in the selected inputs. Physics-guided diagnosis incorporates model knowledge into the learning pipeline [4], motivating the construction of diagnostic inputs that express discrepancies from physically defined nominal behavior.
Model-based residuals provide such discrepancies. Generalized-momentum observers support actuator FDI and sensorless collision detection without acceleration measurements [5], [6], and residual-driven observers can reconstruct actuator fault profiles [7]. For sufficiently accurate trajectory tracking, another approach compares measured joint torque with the nominal torque calculated along the desired motion [8].
An energetic perspective relates diagnostic signals to power exchange, storage, and dissipation. The port-Hamiltonian (pH) framework makes these relationships explicit through interconnected physical subsystems and effort–flow ports [9], [10]. Energy-aware control illustrates the value of this perspective: energy tanks can regulate energy exchange to support stable and safe interaction [11]. For diagnosis, unknown-input Hamiltonian observers generate residuals and estimate faults in linear pH systems under observer-existence and disturbance-decoupling conditions [12]. Mechanical energy observers also detect external interactions through a dynamically updated energy discrepancy [13]. These developments motivate exploiting energetic structure to construct diagnostic signals, while exploring how much of this task can be achieved without a dedicated dynamic observer.
Manuscript dated 10 October 2026. This work was supported by King Fahd University of Petroleum and Minerals (KFUPM). (Corresponding author: Johnny Garcia.)
Johnny Garcia and Nicolas Salguero are with the Electrical Engineering Department, King Fahd University of Petroleum and Minerals, Dhahran 31261, Saudi Arabia (e-mail: g202427540@kfupm.edu.sa; g202426740@kfupm.edu.sa).
Naveed Iqbal is with the Electrical Engineering Department and the Interdisciplinary Research Center for Communication Systems and Sensing, King Fahd University of Petroleum and Minerals, Dhahran 31261, Saudi Arabia (e-mail: naveediqbal@kfupm.edu.sa).
Brahim Brahmi is with the Electrical Engineering Department and the Interdisciplinary Research Center for Intelligent Manufacturing and Robotics, King Fahd University of Petroleum and Minerals, Dhahran 31261, Saudi Arabia (e-mail: brahim.brahmi@kfupm.edu.sa).
Algebraic diagnosis and power monitoring provide complementary precedents. Differential flatness supplies analytical redundancy through discrepancies between measurements and reconstructed states or inputs [14]. Polynomial-approximation operators permit algebraic reconstruction of residuals or additive faults, with filtering and computable error bounds [15].
Ramy Rashad is with the Control and Instrumentation Engineering Department and the Interdisciplinary Research Center for Smart Mobility and Logistics, King Fahd University of Petroleum and Minerals, Dhahran 31261, Saudi Arabia (e-mail: ramy.rashad@kfupm.edu.sa).
Power-consumption diagnosis compares healthy electrical-consumption profiles with measurements and combines model fitting with neural-network classification [16].
The objective pursued here is to use mechanical port power for fault diagnosis without synthesizing a dedicated dynamic observer. For systems with planned motion, differential flatness parameterizes nominal states and inputs through reference outputs and their finite derivatives [17], [18], offering a basis for algebraic nominal power references. Establishing which fault types these power discrepancies can distinguish under feedback, model mismatch, and measurement errors is essential to assessing their diagnostic value.
To address this objective, this paper introduces the Spectral Hamiltonian Algebraic Power Evaluation (SHAPE) framework for fully actuated, differentially flat pH mechanical systems with collocated actuation ports. SHAPE combines pH port variables and flatness-based nominal references to construct a power residual at each actuation port. Subtracting nominal port power from commanded effort multiplied by measured port flow yields physically interpretable diagnostic inputs. With nominal references available, residual evaluation requires neither recursive observer updates nor dynamics evaluation at the measured state.
The diagnostic realization maps synchronized port residuals into CWT scalograms and processes them with a shared-encoder CNN. The evaluation classifies complete trajectories of a simulated six-degree-of-freedom (6-DoF) manipulator under flatness-based model predictive control (MPC), with single faults injected at a specified joint.
The main contributions are as follows:
-
Algebraic port-wise power residuals: A nominal reference generator based on pH port variables and differential flatness, together with a commanded-power residual and a decomposition organizing fault, dynamic-mismatch, and measurement contributions under the stated assumptions.
-
Physics-guided diagnostic realization: A CWT and shared-encoder CNN pipeline using synchronized port-power residuals to distinguish nominal operation, actuator loss of effectiveness (LoE), anomalous friction, and oscillatory disturbances.
-
Comparative diagnostic characterization: An evaluation of four residual formulations under common CWT processing and three complete SHAPE representation pipelines, distinguishing correct fault-type identification, fault-type confusion, and missed detection. Joint severity–excitation profiles and complementary vibration experiments characterize where diagnostic coverage is retained or limited, while offline sensor perturbations reveal changes in failure mode. These empirical profiles are interpreted alongside residual-construction requirements.
Section II presents the mathematical preliminaries, and Section III develops SHAPE. Sections IV and V describe the simulation protocols and diagnostic results, respectively. Section VI concludes the paper.
A. Port-Hamiltonian Framework and Power Balance
The port-Hamiltonian framework models complex nonlinear physical structures through geometric and energetic principles. Power-preserving interconnections governed by a Dirac structure route energy among internal storage elements and interaction ports, whereas resistive elements account for internal power dissipation [9], [10]. Unlike coordinate-dependent state-space formulations where energetic conservation is implicit, the pH framework provides an explicit structural separation between conservative power routing and dissipation.
Geometrically, the state space of an explicit input-state-output pH system is defined on a smooth manifold of finite dimension , equipped with a smooth Hamiltonian function bounded below, representing the total stored energy. Physical state flows belong to the tangent space , whereas dual efforts belong to the cotangent space , represented in local coordinates by the co-energy vector . In the absence of direct input-to-output feedthrough, the continuous-time explicit input-state-output pH formulation maps co-energy variables and external inputs to state derivatives and conjugate outputs as
Here, denotes the -dimensional state vector, represents the input port variables, and denotes the conjugate output variables across interaction ports.
The internal matrices map co-energy variables to state flows within the system topology: the skew-symmetric interconnection matrix defines the conservative power routing without net storage or generation, the symmetric positive semi-definite matrix characterizes internal energy dissipation, and the input matrix establishes the port interaction topology coupling the system with its environment.
Evaluating the total time derivative of the Hamiltonian along system trajectories reveals the energetic behavior. By the chain rule, . Substituting (1), the conservative term strictly vanishes due to skew-symmetry, , yielding the fundamental power balance equation
Inequality (2) defines system passivity with respect to the supply rate and storage function , establishing that the rate of change of stored energy is bounded by the net power supplied through the interaction ports.
B. Port-Hamiltonian Modeling of Mechanical Systems
For an -degree-of-freedom mechanical system, the Hamiltonian function describes the total stored physical energy through
Here, denotes an -dimensional smooth configuration manifold, represents the vector of generalized position coordinates in a local chart, is the generalized inertia matrix, and denotes the potential energy field (calibrated such that ). The canonical momentum vector is defined on the cotangent fiber via the Legendre transformation as .
In local phase-space coordinates with , the co-energy vector partitions as
This identifies the generalized velocity vector as . To couple this mechanical state space with resistive dissipation and external interaction ports, the structure matrices from Section II-A instantiate into canonical mechanical blocks:
(5)
Here, , with ( ) modeling state-dependent internal dissipation (such as viscous and friction phenomena), and is the input coupling matrix for independent actuation ports with (non-redundant actuation).
Substituting (5) and (4) into (1) yields the mechanical equations of motion in phase space under impedance causality:
(6)
Here, represents the generalized control effort (actuator torques or forces), and the conjugate port flow vector satisfies .
C. Differential Flatness
Differential flatness establishes that the state vector and control input vector of a nonlinear dynamical system can be completely parameterized by a flat output vector and a finite number of its time derivatives. Formally, a nonlinear system is differentially flat if there exist smooth mappings and such that
Here, denote the maximum finite derivation orders associated with the state and input manifolds, respectively [17], [18]. These orders depend on the chosen flat parameterization.
SHAPE Methodology

Fig. 1. Conceptual architecture and energetic signal flow of the general SHAPE framework. (Top-Right) Algebraic Nominal Reference Generator exploits differential flatness to compute an algebraic nominal port-power baseline directly from planned trajectories. (Top-Left) Closed-Loop Physical System evaluates the commanded-power proxy under feedback control, plant mismatch, disturbances, and physical anomalies. (Bottom) Spectro-Temporal Fault Diagnosis System evaluates the port-power residual vector and maps the resulting 1-D non-stationary residuals into 2-D spectro-temporal signatures for fault diagnosis.
III. THE SHAPE METHODOLOGY
The SHAPE framework constructs diagnostic inputs for differentially flat pH systems from planned nominal power and measured port flow. It evaluates the discrepancy between nominal port power and commanded effort multiplied by measured flow, without recursive observer updates in the final residual mapping. Departures from the nominal model can appear in this residual; their diagnostic separability is evaluated experimentally below.
To diagnose these anomalies, the conceptual architecture of the SHAPE framework is structured into three interacting domains, as illustrated in Fig. 1: the algebraic nominal reference generator, the closed-loop physical system, and the spectro-temporal fault diagnosis system.
A. Algebraic Nominal Reference Generator
Exploiting the differential flatness parameterizations (7) and (8), the nominal state vector and nominal control input vector are evaluated algebraically along a planned flat reference trajectory as
(9)
Substituting into the conjugate port-flow map of the nominal pH model, with Hamiltonian , yields the synthesized nominal flow vector:
To evaluate the external power exchange on a channel-by-channel basis, the formulation adopts the following canonical setting:
Assumption 1 (Collocated and Fully Actuated Port Coordinates): The mechanical pH system with canonical state is fully actuated in configuration , with an input matrix satisfying . Consequently, in the selected generalized-coordinate basis, the conjugate port variables coincide with the generalized velocity flows and generalized effort inputs .
The total external power supply is invariant under power-preserving coordinate transformations, whereas its individual scalar contributions depend on the selected port-coordinate basis [9]. Under Assumption 1, the chosen collocated basis admits the additive channel-wise representation . Accordingly, the algebraic nominal port-power baseline for the -th actuation port is defined as
B. Closed-Loop Physical System
To track the planned flat reference trajectory, the physical plant operates in closed loop under an active feedback controller that generates the commanded input effort vector to compensate for tracking deviations under anomalous conditions. Unlike the idealized algebraic generator, the physical system may exhibit parameter mismatch, disturbances, and physical anomalies, while its measured port variables may be affected by sensor noise.
The state evolution of the perturbed physical system is modeled in pH form as
Its measured conjugate port flow is
Here, is the canonical input distribution matrix. The fault-affected resistive structure is , where , with representing the healthy physical dissipation, accounting for the persistent plant-to-reference model mismatch, and representing additional fault-induced dissipation acting on the momentum coordinates. The diagonal matrix , with , models actuator LoE while preserving full input rank. Finally, is an additive exogenous effort disturbance acting on the momentum dynamics, and represents zero-mean measurement noise.
To formalize the structural integrity of the plant under this degradation class, the framework establishes the following condition:
Assumption 2 (Topological Invariance and Kinematic Integrity): The physical anomaly set alters actuator effectiveness, internal dissipation, or exogenous effort, but preserves the continuous configuration manifold Q of dimension and the canonical mechanical pH structure established in Section II-B under Assumption 1.
Because the delivered actuator-port power is not directly measured, the diagnostic architecture evaluates the commanded port-power proxy :
This commanded proxy is deliberate: unlike a delivered-effort measurement, which already reflects actuator degradation, evaluating the commanded effort retains the command-to-delivery power discrepancy at the diagnostic port.
C. Spectro-Temporal Fault Diagnosis System
- Power Residual Evaluation: For each actuation port channel , the diagnostic architecture evaluates a scalar energetic residual , defined as the discrepancy between the commanded port power proxy (13) and the nominal algebraic baseline (11):
To relate this discrepancy to explicit physical contributions while retaining the coupled Hamiltonian dynamics, we project the perturbed system (12) onto the i-th coordinate momentum:
Multiplying by the true generalized flow yields the actuator-port power relation , where
The quantities are coordinate contributions to the global Hamiltonian rate, whose sum satisfies , with individual values depending on the selected generalized-coordinate basis. Expanding (13) via with , and subtracting the nominal planned baseline , where denotes the nominal counterpart of (16), the scalar residual (14) decomposes directly into five constituent terms in watts (W):
(17)
The coordinate dynamic mismatch is defined as
(18)
The decomposition (17) provides an algebraically exact organization of the residual into physically interpretable contributions under the stated assumptions. Because measured flow, commanded effort, and physical trajectory are closed-loop variables affected by the active anomaly, the magnitudes of these contributions remain dynamically interdependent. The term represents the direct command-to-delivery power discrepancy associated with actuator loss of effectiveness, represents the residual contribution associated with exogenous effort disturbances, accounts for the healthy plant-to-reference model mismatch and closed-loop dynamic mismatch, and represents the coordinate contribution associated with anomalous internal dissipation. For coupled dissipation, positive semi-definiteness guarantees , although an individual coordinate contribution need not be nonnegative. Under zero-mean measurement noise independent of the control input, the feedthrough satisfies , with conditional variance , establishing an effort-dependent heteroscedastic noise floor.
Within each scalar temporal channel, the constituent mechanisms in (17) are superposed. Because measured flow and commanded effort evolve under closed-loop feedback, an anomaly at one port can induce transient responses across coupled actuation coordinates. Moreover, under non-stationary operation, the spectral content of the residual may evolve throughout the observation interval. These properties motivate evaluating a joint spectro-temporal representation that retains temporal localization together with spectral organization alongside the original temporal residual.
- Abstract Spectro-Temporal Representation: Let denote a finite observation interval, and let denote an ordered spectral-coordinate domain. For each actuation port channel , the scalar power residual is treated as a square-integrable signal . SHAPE constructs a two-dimensional spectro-temporal representation through the abstract mapping
Here, denotes a space of representations indexed by . The interpretation of depends on the selected realization and may correspond to frequency, scale, or another ordered spectral parameterization.
The continuous representation is converted into a finite two-dimensional grid through the discretization operator
Here, denote the spectral and temporal grid dimensions, respectively. The resulting representation is governed by the following structural design requirements:
-
Joint Spectro-Temporal Localization: provides coefficients jointly indexed by time and spectral coordinate, such that transient residual variations remain temporally localized and spectrally organized throughout the observation interval.
-
Ordered Two-Dimensional Morphology: The discretization operator D preserves the ordering and neighborhood relations of the temporal samples and spectral samples . Consequently, neighboring entries of correspond to neighboring temporal and spectral regions.
-
Portwise Representation Consistency: Within a given SHAPE realization, the same operators and D, temporally aligned observation grid, ordered spectral grid, and preprocessing rule are applied to every actuation port channel.
Together, these requirements define the class of two-dimensional residual morphologies used by SHAPE.
- Pattern Classification: Let denote the composite tensor aggregating the spectro-temporal grids from all active configuration coordinates, where and represent the numbers of spectral and temporal bins, respectively, and represents the local grid for coordinate . Under a single-fault-location formulation, the framework defines a learned, inductive classification operator
Here, is the discrete set of trajectory-level health classes corresponding to the nominal regime and the physical degradation modes formalized in Assumption 2, with denoting the predicted class. This formulation restricts the operator to multi-class fault-type categorization at a fixed, predetermined coordinate, isolating fault-type identification from the separate problem of spatial fault localization across the configuration coordinates.
To account for the dynamic coupling and energy redistribution induced by closed-loop feedback across the multi-port channels, the inductive classification operator C is structured according to three architectural design requirements:
-
Homogeneous Local Feature Extraction: To enforce uniform representational capacity across configuration coordinates, the extraction of nonlinear spectro-temporal features within each local representation is governed by shared projection parameters across channels.
-
Inter-Port Dynamic Cross-Correlation: To distinguish fault-mechanism signatures from reactive, controller-induced power fluctuations distributed across coupled actuation ports, the operator captures nonlinear cross-channel dependencies across all configuration coordinates .
-
Class-Discriminative Fusion under Feedback Masking: To support empirical separation of the prescribed health classes under feedback attenuation, the operator fuses the multi-port energy fluctuations into a learned discriminative representation.
Together, these architectural design requirements complete the methodological formulation of the classification operator C by defining an empirical inductive mapping from multi-port closed-loop power residuals to the discrete trajectory-level health classes in .
IV. SIMULATION SETUP: 6-DoF MANIPULATOR
The SHAPE framework was instantiated and evaluated in simulation on a fully actuated 6-DoF Kinova Gen3 manipulator. Fig. 2 summarizes the resulting simulation and diagnostic workflow. Section IV-A defines the reference-trajectory population and constructs the nominal joint states, torques, and port-power baselines through flatness and inverse dynamics. Section IV-B specifies the constrained closed-loop simulation, perturbed plant, Joint 2 anomaly models, paired physical campaign, and numerical signal acquisition. Section IV-C constructs the SHAPE and comparator residuals, their matched diagnostic representations and classifier architectures, and the training, model-selection, and statistical evaluation protocols.
A. Algebraic Nominal Reference Generator and Reference-Trajectory Population
- Nominal Flatness and Inverse-Dynamics Mapping: For the 6-DoF Kinova Gen3 manipulator, the flat output is instantiated as the planned joint-position trajectory . The corresponding extended flat trajectory is
Using the nominal inertia matrix , the nominal canonical momentum and state trajectories are
Evaluating the nominal momentum dynamics (6) along under the collocated condition yields , with
The nominal conjugate flow is . Therefore, the joint-wise nominal port-power baseline defined in (11) becomes
- Deterministic Multi-Segment Reference Generation: Each parent trajectory was defined in joint space over a horizon and partitioned into segments of equal duration . The number of segments and the motion mode were assigned a priori in the experimental manifest. The temporal knots and their associated waypoints were
6-DoF Kinova Gen3 Manipulator

Fig. 2. Simulation implementation and signal flow of the SHAPE framework on the 6-DoF Kinova Gen3 manipulator. (Top-Right) Algebraic Nominal Reference Generator computes the nominal joint state trajectory and baseline joint power profile via inverse dynamics along planned trajectories. (Top-Left) Closed-loop robotic system produces the physical telemetry and commanded joint-power proxy under Flatness-MPC, computed-torque control, model mismatch, and injected faults. (Bottom) Spectro-Temporal Fault Diagnosis System evaluates the per-joint power residual vector, and transforms the 1-D temporal channels via CWT into multi-joint scalogram tensors for CNN classification.
Each segment was generated by quintic interpolation satisfying the prescribed position, velocity, and acceleration conditions
at its boundary knots.
For both motion modes, zero acceleration was imposed at every knot, , together with zero endpoint velocities, . The internal-knot velocities were defined by
Here, denotes componentwise saturation at . The stop mode reaches zero velocity at each internal knot without introducing a finite dwell interval, whereas the fly mode traverses the knots using bounded centered tangents.
The shared knot conditions provide continuity across consecutive segments.
The waypoints were sampled sequentially. The initial waypoint was drawn uniformly from the admissible joint set , whereas each subsequent waypoint was drawn according to
Here, denotes the uniform distribution over the set and the inequality is interpreted componentwise. The bounds defining and are specified in Section IV-A3. Parent-specific random seeds were recorded in the experimental manifest.
- Full-Grid Qualification and Frozen Population: Before full-grid qualification, every candidate waypoint was subjected to the nominal static-feasibility condition for , where is the nominal gravity torque and is the planning torque limit.
Each resulting trajectory and its first two derivatives were evaluated on the inclusive uniform grid , with Hz, , and . This grid defines the common reference and diagnostic sampling instants.
Let , , , and denote the physical position, velocity, acceleration, and torque limit vectors, respectively. The qualification bounds were defined as
A candidate trajectory was accepted only if all evaluated quantities were finite and, for every ,
The nominal torque was evaluated using the inverse-dynamics mapping defined in Section IV-A1.
An empirical Joint 2 activity filter was additionally imposed:
The integral was evaluated by the trapezoidal rule on the same uniform grid, excluding trajectories with negligible Joint 2 motion.
Before physical replay, each qualified trajectory and its qualification record were frozen and reused identically across all physical runs.
B. Closed-Loop Physical System and Physical Campaign
- Constrained Flatness-MPC and Nominal Torque Mapping: To track the planned joint trajectory subject to simulation limits adapted from the manufacturer specifications [19], the controller combines a constrained flatness-based MPC, following the general approach of [20], with the nominal
TABLE I FLATNESS-MPC AND TORQUE-MAPPING PARAMETERS
| Parameter | Implemented Value |
|---|---|
| Prediction interval | |
| Maximum horizons | |
| Joint-position bounds | Joints 1, 4, 6: rad;Joints 2, 3, 5: rad |
| Joint-velocity bounds | rad/s (Joints 1-3); rad/s (Joints 4-6) |
| Virtual-acceleration bounds | rad/ (Joints 1-3); rad/ (Joints 4-6) |
| Nominal-torque bounds | N m (Joints 1-3); N m (Joints 4-6) |
| QP solver | quadprog, active-set algorithm |
manipulator inverse-dynamics mapping [21]. The MPC computes a virtual-acceleration correction to the planned acceleration. Its internal prediction model consists of six double integrators discretized with prediction interval s. The Simulink controller block executes with inherited continuous sample time. The interval defines the prediction grid and reference indexing.
Let
denote the sequence of acceleration corrections, and let denote the predicted joint-position tracking error. At each evaluation instant, the correction sequence is obtained from the quadratic program (QP)
The QP is subject to the predicted position, velocity, acceleration, and nominal-torque limits summarized in Table I. The maximum prediction and control horizons are shortened near the end of the finite reference according to
Here, is the number of samples on the internal prediction grid. Table I reports the implemented simulation bounds, including a chosen interval of for the continuously rotating joints. The acceleration and nominal-torque bounds adopt the manufacturer's hard acceleration and soft torque limits, respectively [19, pp. 98–99].
The MPC formulation incorporates no separate terminal cost or invariant set, and operates without auxiliary feedback gains (). The resulting virtual acceleration is
Here, the second case is the implemented feedforward fallback. The commanded joint torque is then evaluated by mapping the actual joint-state feedback and the MPC-corrected acceleration through the nominal inverse-dynamics mapping (25):
This mapping evaluates the nominal momentum dynamics (25) using the measured joint state and the MPC-corrected acceleration in place of the planned reference . In contrast, is evaluated exclusively along the planned reference trajectory.
- Perturbed-Plant Dynamics and Joint-2 Anomaly Laws: The continuous physical system is the Kinova Gen3 instantiation of the perturbed port-Hamiltonian model in (12), with and . The nominal reference generator and controller use the nominal model, whereas the physical simulations use fixed inertial and dissipative perturbations. The nominal link masses, centers of mass, and inertia tensors match the manufacturer's six-DoF configuration without the vision module [19, pp. 207–209].
The nominal viscous and Coulomb coefficients were adapted from the actuator-type identification in [22, Sec. VII-A, eq. (12)].
For , the plant parameters were defined by
Here, and are expressed in newton meter seconds per radian and newton meters, respectively. All perturbations were deterministic, common to every physical run, and constant throughout each trajectory.
The implemented friction law was , with defined as
Here, s/rad. This definition uses the continuous limit at and satisfies .
All anomalies acted exclusively on Joint 2. Let be the second canonical basis vector and define , with s. The three anomaly laws and the training and validation parameter marginals were
These terms instantiate actuator loss of effectiveness [23], additional Coulomb dissipation, and exogenous harmonic effort [24], respectively. The friction torque in (39b) realizes the additional dissipative effort of Section III-B on Joint 2, activated here by . It enters the momentum dynamics as and satisfies . The vibration phase was evaluated using the global time base . Each run contains at most one anomaly; the nominal condition uses , , and .
- Paired Physical Campaign Design: The Primary campaign comprised 5000 qualified parent trajectories, each evaluated through four independent closed-loop siblings: nominal, loss of effectiveness, anomalous friction, and vibration. The siblings shared the same frozen reference trajectory and motion mode, while the three faulty runs also shared the parent-specific onset time . Because each sibling was simulated independently, their physical states and measured signals were allowed to diverge after fault activation. This produced 20 000 Primary physical runs.
Parents were assigned to training, validation, and testing using a 70/15/15 grouped split, corresponding to 3500, 750, and 750 parents, respectively. All four siblings of a parent remained in the same partition, preventing reference-trajectory identity from crossing between data splits. The segment counts and the fly/stop modes were balanced within each Primary partition.
Training and validation used Latin hypercube sampling over the stated parameter ranges. Primary test allocated 187–188 runs to each LoE and Friction severity bin and 31–32 runs to each vibration amplitude–frequency cell used in E1 and E2-A.
An additional controlled frequency-sweep stratum comprised 30 parents disjoint from Primary, with ten vibration runs per parent at fixed amplitude and Hz. Within each family, the reference geometry was fixed while the vibration frequency was varied. These 300 runs formed an evaluation-only frequency-sweep stratum.
The complete physical campaign therefore contained 5030 parents and 20 300 runs. Each run retained its parent, frozen trajectory, physical condition, fault parameters, and grouped-partition identifiers.
- Numerical Integration and Signal Acquisition: The continuous closed-loop dynamics were integrated using MATLAB ode45 with RelTol = , AbsTol = , and MaxStep = s. The solver retained adaptive internal steps, and the resulting variable-step physical telemetry was resampled onto the 1 kHz diagnostic grid using shape-preserving piecewise cubic Hermite interpolation (pchip).
The retained synchronized signals comprised , , and , aligned with , , , and .
For the physical campaign, and . The sampled commanded-power signal was evaluated as
Matched reruns compared the reported ode45 configuration with MaxStep=auto, holding the trajectory, physical condition, fault parameters, and controller configuration fixed. Comparison on the uniform resampling grid showed differences in commanded torque and diagnostic residuals; the 1-ms maximum-step configuration was retained for the reported campaign.
C. Spectro-Temporal Fault Diagnosis and Matched Diagnostic Comparators
- Residual Construction: For the manipulator, the SHAPE residual defined in (14) was evaluated for . For comparison, three established model-based residuals were implemented as diagnostic baselines. The torque residual adapted the inverse-dynamics comparison in [8] by replacing the measured joint torque with the commanded joint torque; it was computed for each joint as the commanded-minus-nominal torque difference. The generalized momentum observer (GMO) followed the formulation in [5], using the measured joint positions and velocities, commanded joint torques, and nominal inertia, Coriolis, gravity, and friction terms to produce six joint-resolved residuals. The energy observer (EO) followed the kinetic-energy formulation in [13, Sec. III-A, eq. (28)], producing one scalar residual from the measured joint motion, commanded joint torques, and nominal inertia, gravity, and friction terms.
Both observers used the gain and were discretized through the bilinear Tustin transformation on the diagnostic time grid defined in Section IV-B4. Their internal states were initialized from the corresponding nominal momentum and kinetic energy at t = 0, yielding zero initial residuals. The resulting residual bank comprised six joint-resolved SHAPE residuals, six torque residuals, six GMO residuals, and one scalar EO residual.
- Physical Scaling and Spectro-Temporal Representation: To realize the abstract spectro-temporal mapping formulated in Section III-C2, each residual family was first rendered nondimensional using fixed physical scaling constants common to all trajectories, for :
(41)
Here, and denote the actuator torque and joint velocity limits reported in Table I.
The scaled residual channels were then transformed using the continuous wavelet transform (CWT) as the concrete time-frequency operator. For any normalized scalar residual channel , the transform was evaluated under the normalization convention of the implemented filterbank [25]:
Here, is scale, is temporal translation, and is an admissible analytic mother wavelet satisfying [26]. The factor matches the normalization used by the implemented filterbank.
Computationally, the transform was instantiated in MATLAB R2026a using an analytic Morlet wavelet filterbank (amor) with 32 voices per octave over the physical bandwidth [1, 100] Hz. Each channel was processed independently using the native center-frequency and temporal coordinates returned by the filterbank.
To construct standardized discrete inputs, native coefficients were aggregated onto a grid of frequency bins and temporal bins via overlap-weighted aggregation in physical frequency-time coordinates. Coefficient validity was determined from the native cone of influence (COI), with a coefficient at frequency and time treated as valid when . Native coefficients outside this valid domain were excluded from aggregation. For each destination grid cell , the valid support fraction was computed as the ratio of valid native area to total bin area, and the cell was accepted if .
The primary representation was converted to logarithmic power. For accepted cells,
Cells with were assigned . Here, indexes the transformed residual component, indexes the spectral bin, indexes the temporal bin, and denotes the overlap-weighted CWT power of component computed from valid native support. For each trajectory, the SHAPE, torque, and GMO families produced six maps each, while the energy observer produced one map. All maps were stored as single-precision (float32) arrays.
- Matched Diagnostic Input Configurations: Two additional input representations were constructed from the physically scaled SHAPE residuals. The temporal configuration retained the six joint sequences over the samples of the diagnostic grid. For the fast Fourier transform (FFT) configuration, each joint sequence was multiplied by a symmetric Hann window of length . An N-point discrete Fourier transform was then evaluated without mean subtraction or zero-padding. Amplitudes were normalized by the sum of the window samples, and the nonzero-frequency amplitudes in the retained range were doubled according to the single-sided amplitude convention. The first 1001 nonnegative-frequency bins were retained, with for , corresponding to frequencies from zero to approximately 100 Hz. The resulting six diagnostic input configurations are summarized in Table II.
Configurations M01–M04 compare the four residual families under the common CWT construction defined in Section IV-C2. Configurations M01, M05, and M06 compare
TABLE II DIAGNOSTIC INPUT CONFIGURATIONS
| Configuration | Representation | Input space |
|---|---|---|
| M01: SHAPE-CWT | 2-D CWT log-power | |
| M02: Torque-CWT | 2-D CWT log-power | |
| M03: GMO-CWT | 2-D CWT log-power | |
| M04: EO-CWT | 2-D CWT log-power | |
| M05: SHAPE-Temporal | 1-D time sequence | |
| M06: SHAPE-FFT | 1-D amplitude spectrum |
the CWT, temporal, and Fourier representations derived from the same physically scaled SHAPE residuals. All configurations used the parent-grouped data partition defined in Section IV-B3.
- Shared-Encoder Classifier Architectures: The primary SHAPE-CWT configuration (M01) directly instantiates the inductive classification operator formulated in Section III-C3, mapping the composite representation to the discrete health classes . The comparator configurations (M02–M06) are classified through analogous shared-encoder architectures adapted to their respective input spaces (Table II). The continuous wavelet representations (M01–M04) are processed by a two-dimensional encoder, whereas the temporal sequence (M05) and Fourier amplitude spectrum (M06) are processed by a one-dimensional encoder. Within each classifier, the encoder parameters are shared across its active branches. Here, for M01–M03 and M05–M06, whereas for the single global EO component in M04. The common classification flow and the internal structures of both encoders are illustrated in Fig. 3.
a) Shared encoders: Each input matrix or sequence is presented to its respective encoder with a singleton channel axis. The two architectural families map single-component inputs to a common 128-dimensional latent space:
These maps yield branch embeddings for each input component (). The 2-D encoder comprises five sequential convolutional blocks ( convolutions, stride 1, padding 1, no bias, batch normalization, rectified linear unit (ReLU) activation, and max-pooling) across channels 16, 32, 64, 128, 256, followed by adaptive average pooling and a linear projection from 256 to 128 components. The 1-D encoder employs the same channel progression over five blocks (kernel 7, stride 1, padding 3, no bias, batch normalization, ReLU, and max-pooling of 2), with adaptive average pooling and a linear projection from 256 to 128 components.
b) Late fusion and classification: Branch embeddings are aggregated through fixed-order concatenation:
For , embeddings are concatenated in fixed joint order.
TABLE III DIAGNOSTIC EVALUATION PROTOCOLS
| Protocol | Scope and Evaluation Design |
|---|---|
| E0 | Primary test benchmark (3000 runs, 750 parents); M01-M06. |
| E1 | Primary fault runs stratified by physical anomaly severity; M01-M06; descriptive. |
| E2-A | Observational amplitude-frequency grid on the 750 Primary vibration runs; M01-M06; descriptive. |
| E2-B | Controlled 300-run frequency sweep at fixed vibration amplitude; M01-M04; frequency-resolved recall intervals. |
| E3 | Primary test stratified by post-fault dynamic excitation quartiles; M01-M06; descriptive. |
| E4 | Ten offline sensor-perturbation conditions applied to Primary test trajectories; M01-M04; descriptive. |
The composite representation is mapped to class logits and a predicted class by a multi-layer perceptron head:
Dropout is applied during training. Counting shared encoder parameters once, these specifications yield 623 604 trainable parameters for the six-branch 2-D configurations (M01–M03), 459 764 for the single-branch 2-D configuration (M04), and 536 532 for the six-branch 1-D configurations (M05–M06).
- Training Protocol and Model Selection: Each diagnostic configuration (M01–M06) was trained independently by minimizing the unweighted categorical cross-entropy over the four classes in . Optimization used AdamW [27] with an initial learning rate of and weight decay of . The learning rate followed a cosine annealing schedule configured over a maximum of 50 epochs with a terminal value of zero. Mini-batch sizes were 32 for M01–M03, 64 for M04 and M06, and 16 for M05.
Validation was performed after each epoch. Checkpoints were selected by validation macro- , with balanced accuracy and lower validation loss used as successive tie-breakers. Training terminated after ten consecutive epochs without improvement in this criterion.
For each configuration, training was repeated from scratch using the five fixed seeds . The checkpoint selected independently for each seed was evaluated on the held-out test partition only after model selection.
- Evaluation Protocols and Statistical Analysis: The trained diagnostic classifiers were evaluated through the six protocols summarized in Table III.
For E1, physical anomaly severity was partitioned into four ascending bins, labeled B1 through B4 within each fault class:
The dimensionless friction parameter corresponds to torque increments N·m (39), whereas the
(a) Shared-encoder diagnostic classification flow

2-D: ; (M01–M03), (M04, EO)
1-D: ; (M05), (M06)
(b) Shared 2-D CWT encoder

Conv2d , , , no bias
BatchNorm · ReLU · MaxPool
AdaptiveAvgPool2d
Linear 256 → 128
ReLU
(c) Shared 1-D temporal/FFT encoder

Conv1d , , , no bias
BatchNorm · ReLU · MaxPool 2
AdaptiveAvgPool1d
Linear 256 → 128
ReLU
Fig. 3. Shared-encoder classifier architectures used for the six diagnostic configurations. (a) Component-wise encoding, fixed-order late fusion, and four-class classification flow. (b) Two-dimensional encoder used for the CWT configurations. (c) One-dimensional encoder used for the temporal and Fourier configurations. Encoder parameters are shared across the active branches within each independently trained classifier.
intervals are expressed in newton meters. In E2-A, these four amplitude intervals were crossed with six frequency bands:
[2, 5), [5, 10), [10, 15), [15, 20), [20, 25), [25, 30] Hz.
These define a 24-cell observational grid containing 31–32 physical runs per cell. Protocol E2-B utilized the independent, fixed-amplitude vibration sweep defined in Section IV-B3.
For E3, post-fault dynamic excitation was quantified from the root mean square (RMS) of the measured Joint-2 velocity:
(47)
The post-fault window comprised all samples satisfying through the terminal sample, and the recorded velocity was used directly without demeaning. Computational quartile thresholds were estimated exclusively from Primary training runs:
These thresholds partition into four evaluation strata:
The strata contain 782, 676, 774, and 768 runs, respectively.
For E4, sensor noise was simulated by perturbing the recorded joint telemetry, with velocity-noise level specified by the signal-to-noise ratio (SNR):
(48)
Here, , are independent standard normal variables sampled per joint and time step , and is the RMS velocity of joint pooled over all samples from the 14000 Primary training runs. Ten perturbation conditions were evaluated: velocity noise alone at dB, position noise alone at , and three combined conditions pairing 40 dB velocity noise with each position-noise level. Position and velocity perturbations were applied offline to measurements while planned-reference and recorded controller quantities remained fixed; diagnostic residuals were then recomputed. The unperturbed E0 benchmark provided the clean reference.
Reported metrics comprise classification accuracy, macro- , per-class recall, binary fault sensitivity (the fraction of faulty runs assigned to any fault class), missed-detection rate (MDR, the fraction of faulty runs classified as nominal), and false-alarm rate (FAR, the fraction of nominal runs classified as faulty). Per-class recall required identifying the specific ground-truth fault category. Metrics were evaluated separately for each of the five fixed training seeds and summarized by their sample mean and standard deviation.
For E2-B, parent-population uncertainty in per-frequency recall was evaluated via cluster resampling [28] over the 30 parents (, random-number-generator seed 20260927). For each frequency and method, a common resampled parent sequence was used across all five seeds, and the five seed-specific recalls were averaged within each replicate to obtain percentile intervals. These intervals describe parent-population uncertainty conditional on the frozen models. E0 metrics and evaluations under E1, E2-A, E3, and E4 are reported descriptively.
Code, archived results, and reproduction requirements are described in the Data Availability section.
V. RESULTS AND DISCUSSION
A. Clean Diagnostic Profiles
Under the common CWT representation, SHAPE achieves higher mean recall for all three fault classes and lower mean MDR than Torque, accompanied by higher mean FAR (Table IV). SHAPE and EO attain similar mean accuracies but different diagnostic profiles: SHAPE provides higher LoE recall, whereas EO yields higher Friction recall and lower MDR and FAR. GMO achieves the highest mean accuracy, macro-, and binary fault sensitivity, together with the lowest MDR and FAR. These aggregate results establish the diagnostic performance of the power residuals relative to the alternative formulations; the following analysis examines how detection and fault-type identification vary with severity and operating excitation.
B. Diagnostic Profiles Across Fault Severity and Operating Excitation
Fig. 4 shows (a) correct fault-type identification and (b) binary fault sensitivity for SHAPE, Torque, and EO under CWT on Primary test. Q1–Q4 are the predefined strata of post-fault measured Joint-2 velocity RMS, with 29–81 unique simulated runs per severity–Q cell. Complete maps including GMO, exact cell counts, and between-seed sample standard deviations are available in the companion repository (see Data Availability).
LoE detection varies primarily with severity, with no consistent positive association between Q and binary sensitivity. In B1, sensitivity spans 66.27%–76.67% for SHAPE and 57.08%–70.24% for Torque; EO peaks at Q2 (84.88%) before returning to 70.59% at Q4. GMO remains near ceiling (96.86%–99.17%). Stronger severities bring the other formulations close to saturated detection. GMO's limited remaining variation near the ceiling prevents distinguishing weak Q dependence from saturation.
For weak LoE, SHAPE provides higher fault-type identification than Torque and EO throughout Q1–Q4. Its B1 identification remains within 50.42%–55.12%, whereas EO rises from 21.67% at Q1 to 43.53% at Q4. SHAPE thus combines higher identification with less variation across these strata than EO, while Torque also varies little but at a lower level (35.83% at Q1). EO's higher binary sensitivity does not consistently translate into correct identification: at B1 Q2, it detects 84.88% of faulty runs but identifies only 31.71% as LoE, assigning 53.17% to Friction. GMO retains substantially higher identification (91.37%–97.56% in B1).
TABLE IV CLEAN PRIMARY TEST RESULTS UNDER CWT, REPORTED AS FIVE-SEED MEAN ± SAMPLE STANDARD DEVIATION. METRICS ARE PERCENTAGES EXCEPT DIMENSIONLESS MACRO-. FAR AND MDR DENOTE FALSE-ALARM AND MISSED-DETECTION RATES
| Metric | SHAPE | Torque | GMO | EO |
|---|---|---|---|---|
| (a) Overall classification and binary detection | ||||
| Accuracy | 84.69 | 81.67 | 97.17 | 84.62 |
| ±0.70 | ±0.70 | ±0.37 | ±1.70 | |
| Macro- | 0.8453 | 0.8166 | 0.9716 | 0.8433 |
| ±0.0071 | ±0.0061 | ±0.0038 | ±0.0179 | |
| Sensitivity | 88.05 | 83.77 | 96.95 | 90.54 |
| ±1.65 | ±1.92 | ±0.35 | ±1.22 | |
| MDR | 11.95 | 16.23 | 3.05 | 9.46 |
| ±1.65 | ±1.92 | ±0.35 | ±1.22 | |
| FAR | 6.21 | 5.33 | 0.19 | 2.24 |
| ±1.71 | ±1.98 | ±0.07 | ±0.56 | |
| (b) Multiclass recall | ||||
| Nominal | 93.79 | 94.67 | 99.81 | 97.76 |
| ±1.71 | ±1.98 | ±0.07 | ±0.56 | |
| LoE | 79.20 | 72.88 | 98.43 | 70.19 |
| ±2.62 | ±4.84 | ±0.30 | ±5.88 | |
| Friction | 66.45 | 64.05 | 90.43 | 71.07 |
| ±2.18 | ±4.53 | ±1.58 | ±2.18 | |
| Vibration | 99.33 | 95.09 | 100.00 | 99.47 |
| ±0.38 | ±1.34 | ±0.00 | ±0.25 | |
At intermediate LoE severity, SHAPE's advantage over EO and Torque is largest at low Q and narrows toward Q4. In B2 Q1, identification is 68.95% for SHAPE, 38.95% for EO, and 51.58% for Torque, despite similar SHAPE and EO binary sensitivities (91.58% and 88.42%). At Q4, identification converges to 82.80%, 82.00%, and 80.80%, respectively. EO exceeds SHAPE in some stronger-fault, high-Q regions, including B3 Q4 (96.52% versus 92.17%). SHAPE also exhibits Q-associated identification gains: in B4, identification rises from 85.33% at Q1 to 97.53% at Q4 despite 100% detection at both endpoints. Detectability and fault-type discrimination therefore remain distinct even for stronger LoE.
For the algebraic residuals, weak Friction is dominated by missed detections. For SHAPE in B1, binary sensitivity spans 22.80%–31.05% and identification 11.20%–22.79%. Torque has an irregular response, reaching only 11.58% sensitivity and 10.53% identification at Q4. EO's Q1-to-Q4 sensitivity rises from 25.60% to 41.58% (peaking at 47.37% in Q3), with identification rising from 16.40% to 35.79%; its Q4 performance exceeds both algebraic formulations. GMO retains higher detection and identification, rising from 50.00% to 78.42% and from 48.40% to 76.84%, respectively. Thus, excitation-stratified differences in weak Friction affect whether faults are detected at all, as well as their assigned type.
For Friction B2, SHAPE exceeds Torque in both detection and identification throughout Q1–Q4. Its comparison with EO
(a) Identification
| SHAPE | Torque | EO | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| LoE severity | B1 | 50.4 | 55.1 | 50.4 | 50.6 | 35.8 | 37.1 | 35.8 | 37.6 | 21.7 | 31.7 | 40.4 | 43.5 |
| B2 | 68.9 | 78.9 | 90.0 | 82.8 | 51.6 | 68.7 | 78.7 | 80.8 | 38.9 | 65.7 | 73.5 | 82.0 | |
| B3 | 86.5 | 89.5 | 94.1 | 92.2 | 86.1 | 93.3 | 90.7 | 92.2 | 67.0 | 90.5 | 84.4 | 96.5 | |
| B4 | 85.3 | 92.2 | 95.4 | 97.5 | 85.3 | 91.2 | 92.6 | 98.3 | 82.7 | 95.6 | 98.3 | 98.5 | |
| Friction severity | B1 | 11.2 | 22.8 | 20.4 | 14.7 | 10.0 | 19.5 | 22.1 | 10.5 | 16.4 | 32.1 | 37.2 | 35.8 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| B2 | 60.8 | 57.7 | 67.7 | 63.1 | 57.4 | 50.3 | 59.1 | 53.8 | 54.3 | 63.4 | 68.1 | 83.5 | |
| B3 | 87.7 | 88.6 | 89.0 | 89.7 | 92.7 | 91.0 | 92.5 | 89.7 | 83.3 | 94.9 | 95.0 | 94.6 | |
| B4 | 94.9 | 98.9 | 98.5 | 99.3 | 91.0 | 94.7 | 93.6 | 95.9 | 93.4 | 95.8 | 97.4 | 95.9 | |
| Q1 | Q2 | Q3 | Q4 | Q1 | Q2 | Q3 | Q4 | Q1 | Q2 | Q3 | Q4 |
(b) Binary detection
| LoE severity | B1 | 71.7 | 75.6 | 76.7 | 66.3 | 57.1 | 70.2 | 58.3 | 57.6 | 71.7 | 84.9 | 84.6 | 70.6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| B2 | 91.6 | 86.0 | 97.0 | 93.6 | 82.6 | 80.8 | 90.4 | 95.6 | 88.4 | 91.3 | 100.0 | 98.0 | |
| B3 | 96.1 | 100.0 | 98.5 | 97.8 | 97.4 | 100.0 | 96.7 | 99.1 | 97.8 | 100.0 | 100.0 | 100.0 | |
| B4 | 100.0 | 97.1 | 99.4 | 100.0 | 96.0 | 98.5 | 99.4 | 99.8 | 99.3 | 100.0 | 100.0 | 100.0 |
| Friction severity | B1 | 22.8 | 25.1 | 28.4 | 31.1 | 16.4 | 21.9 | 26.3 | 11.6 | 25.6 | 42.8 | 47.4 | 41.6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| B2 | 71.7 | 74.3 | 77.4 | 73.1 | 68.3 | 57.1 | 65.5 | 59.6 | 72.5 | 75.4 | 80.0 | 90.8 | |
| B3 | 96.3 | 97.6 | 99.0 | 96.8 | 97.0 | 98.8 | 98.0 | 93.5 | 97.7 | 98.0 | 98.0 | 100.0 | |
| B4 | 98.5 | 100.0 | 100.0 | 99.3 | 96.4 | 97.9 | 100.0 | 98.6 | 97.0 | 100.0 | 100.0 | 100.0 | |
| Q1 | Q2 | Q3 | Q4 | Q1 | Q2 | Q3 | Q4 | Q1 | Q2 | Q3 | Q4 |
Excitation stratum
Rate (%)
Fig. 4. LoE and Friction diagnosis by SHAPE, Torque, and EO under CWT on Primary test. Cells show five-seed mean percentages: (a) correct fault-type identification; (b) true faulty runs assigned to any fault class. B1–B4 follow the fault-specific severity intervals in Section IV, from lowest to highest. Q1–Q4 are training-defined strata of post-fault measured Joint-2 velocity RMS. All panels share a 0%–100% scale.
changes across strata: SHAPE has higher identification at Q1 (60.75% versus 54.34%), whereas EO reaches 83.46% at Q4 versus 63.08% for SHAPE. EO's binary sensitivity also rises from 72.45% to 90.77% between these endpoints. Its advantage at Q4 therefore accompanies improvements in both detection and identification, while SHAPE retains a smaller Q1-to-Q4 identification change.
The power residuals provide an identification advantage over Torque across weak and intermediate LoE and over EO in several low-Q regions, although weak-fault identification remains incomplete. EO closes or reverses this identification difference in specific higher Q regions. High identification is shared more broadly at strong Friction severity and strong LoE severity with high Q, where Torque also approaches SHAPE. GMO offers the broadest clean diagnostic coverage. These profiles distinguish regions of high identification from relative advantages within regions still dominated by confusion or missed detection.
These comparisons are conditioned on severity because its distribution varies across Q strata. Q1 denotes the lowest observed velocity-RMS stratum in the qualified trajectory population; post-fault velocity RMS covaries with severity, trajectory, and dynamics, so the profiles characterize observed operating regions rather than a controlled excitation effect.
C. Amplitude–Frequency Dependence of Vibration Diagnosis
Vibration identification separates SHAPE from Torque in specific amplitude–frequency regions. In E2-A, at N·m, Torque recall is at 15–20 Hz and at 20–25 Hz, while SHAPE, EO, and GMO achieve substantially higher recall in these bands. The power residuals thus support better discrimination than Torque alongside both observer formulations. Torque recovers to 96.77% at 25–30 Hz, localizing its deficit rather than showing progressive deterioration with frequency.
The controlled E2-B sweep holds and reference geometry fixed within each parent family. All four formulations achieve 100% observed identification at eight of ten frequencies, establishing shared high-performance regions. Torque reaches at 2 Hz and at 20 Hz. Its 20 Hz deficit therefore also occurs outside E2-A's lowest-amplitude interval. The errors have different diagnostic consequences: at 2 Hz, they are predominantly assignments to LoE (10.67%), whereas at 20 Hz they are assignments to Nominal (8.00%). The former preserves anomaly detection but confuses the fault type; the latter misses the anomaly. SHAPE's observed advantage over Torque is localized, while much of the frequency sweep offers little separation among the four formulations.
D. Zero-Shot Diagnostic Response to Sensor Perturbations
E4 perturbs recorded position and velocity measurements offline and recomputes residuals under common CWT processing, with planned references and recorded controller quantities fixed. SHAPE's hard predictions remain unchanged under position-only perturbations, while Torque's remain unchanged across all ten conditions. Perturbed position does not enter SHAPE's final residual, and neither perturbed channel modifies Torque's residual in this evaluation.
Position perturbations alter both detection and identification for the observers. At , GMO LoE recall falls from 98.43% to 44.40%, predominantly through assignments to Friction, while pooled MDR changes only from 3.05% to 3.80%. Loss of LoE identification therefore coexists with little change in missed detection across the three faulty classes. For EO at the same noise level, the weakest LoE bin is frequently assigned to Friction, whereas the weakest Friction bin is predominantly assigned to Nominal. Stronger position perturbations increase EO's missed detections, with pooled MDR reaching 63.51% at . SHAPE retains its predictions across these position-only conditions, avoiding this direct measurement pathway for degradation.
Velocity perturbations expose a different limitation of SHAPE. At 40 dB, the weakest tested level, its predictions concentrate in Vibration: 98.59% Vibration recall coexists with 98.77% FAR, revealing loss of discrimination despite high class recall. GMO concentrates predictions in Nominal, with pooled MDR of 95.24%. EO exhibits both false alarms (46.83%) and missed detections (40.08%), followed by Vibration-directed predictions at stronger perturbations. At 20 and 10 dB, every GMO prediction is Nominal and every EO prediction is Vibration. Their identical 25% accuracy on the balanced population thus represents opposite failures: missed faults versus indiscriminate alarms. Even in the strongest LoE bin, , recall at 40 dB falls to 34.22%, 15.08%, and 1.28% for SHAPE, GMO, and EO, respectively.
SHAPE's clean diagnostic gains over Torque therefore accompany additional exposure to velocity perturbations. Its final residual avoids the perturbed-position pathway affecting EO and GMO, but reliable discrimination still depends on velocity quality. The favorable clean operating regions must be interpreted alongside this sensitivity; the offline protocol characterizes the diagnostic measurement pathways with controller quantities fixed, leaving closed-loop sensor-noise tolerance unestablished.
E. SHAPE Representation Dependence
The CWT, Temporal, and FFT comparisons concern complete SHAPE pipelines with different representations, architectures, dimensionalities, and training dynamics. On Primary test, mean accuracy is , , and , respectively. Fig. 5 distinguishes fault-type identification from binary detection across severity-excitation strata. CWT's higher aggregate accuracy accompanies a broader Friction advantage, while its comparison with Temporal for LoE depends on the region and diagnostic metric.
In the weakest LoE bin, B1, CWT identification remains within 50.42%–55.12% across Q, while Temporal declines from 65.42% at Q1 to 50.98% at Q4. Temporal's initial advantage therefore narrows across the excitation strata, whereas CWT maintains a more constant, but still limited, identification profile. Temporal has higher identification and detection at Q1; at Q2–Q4, its higher identification instead coexists with more missed detections. For example, at Q3, Temporal identifies 53.33% and detects 64.17% of LoE runs, compared with 50.42% and 76.67% for CWT. CWT thus recognizes more faults in this cell but assigns more of them to another fault class. At stronger severities, both pipelines attain higher identification, with local reversals and non-monotonic Q trajectories rather than a uniform ordering.
Friction provides the clearest CWT–Temporal separation in B2: identification spans 57.71%–67.66% for CWT versus 30.57%–43.40% for Temporal, with higher CWT binary detection at every Q. CWT therefore improves both anomaly detection and fault-type identification. It also exceeds Temporal in both metrics throughout B1, although both pipelines remain strongly limited by missed detection. Their differences narrow in B4, where both form broad high-identification regions. The largest advantage at intermediate severity thus differs from the relative gains within the poorly detected weakest bin.
(a) Identification
| CWT | Temporal | FFT | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| LoE severity | B1 | 50.4 | 55.1 | 50.4 | 50.6 | 65.4 | 60.5 | 53.3 | 51.0 | 1.7 | 0.0 | 1.2 | 0.4 |
| B2 | 68.9 | 78.9 | 90.0 | 82.8 | 73.7 | 86.0 | 84.3 | 86.0 | 4.7 | 9.8 | 8.7 | 15.6 | |
| B3 | 86.5 | 89.5 | 94.1 | 92.2 | 89.6 | 92.4 | 93.7 | 100.0 | 20.4 | 33.8 | 31.9 | 51.3 | |
| B4 | 85.3 | 92.2 | 95.4 | 97.5 | 84.7 | 94.6 | 94.3 | 96.8 | 12.0 | 42.0 | 46.9 | 79.3 | |
| Friction severity | B1 | 11.2 | 22.8 | 20.4 | 14.7 | 9.6 | 6.0 | 6.0 | 7.9 | 9.6 | 7.9 | 12.3 | 20.0 |
| B2 | 60.8 | 57.7 | 67.7 | 63.1 | 30.6 | 37.7 | 43.4 | 34.2 | 15.8 | 24.0 | 31.5 | 28.8 | |
| B3 | 87.7 | 88.6 | 89.0 | 89.7 | 80.0 | 83.5 | 83.0 | 81.1 | 39.0 | 54.1 | 53.0 | 57.8 | |
| B4 | 94.9 | 98.9 | 98.5 | 99.3 | 89.6 | 95.8 | 98.5 | 98.6 | 61.2 | 65.8 | 66.8 | 60.0 | |
| Q1 | Q2 | Q3 | Q4 | Q1 | Q2 | Q3 | Q4 | Q1 | Q2 | Q3 | Q4 | ||
(b) Binary detection
| LoE severity | B1 | 71.7 | 75.6 | 76.7 | 66.3 | 76.2 | 69.8 | 64.2 | 62.4 | 42.5 | 50.7 | 50.8 | 63.9 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| B2 | 91.6 | 86.0 | 97.0 | 93.6 | 88.4 | 91.7 | 93.5 | 93.6 | 54.2 | 64.5 | 74.8 | 73.6 | |
| B3 | 96.1 | 100.0 | 98.5 | 97.8 | 98.7 | 100.0 | 98.5 | 100.0 | 68.3 | 82.4 | 89.3 | 88.7 | |
| B4 | 100.0 | 97.1 | 99.4 | 100.0 | 98.0 | 99.0 | 98.9 | 100.0 | 69.3 | 88.3 | 88.0 | 96.0 | |
| Friction severity | B1 | 22.8 | 25.1 | 28.4 | 31.1 | 14.4 | 8.8 | 9.1 | 9.5 | 26.0 | 34.0 | 36.8 | 47.9 |
| B2 | 71.7 | 74.3 | 77.4 | 73.1 | 41.5 | 45.7 | 48.9 | 41.2 | 34.7 | 42.9 | 51.5 | 51.9 | |
| B3 | 96.3 | 97.6 | 99.0 | 96.8 | 88.3 | 91.8 | 92.5 | 87.0 | 50.7 | 65.5 | 73.0 | 76.2 | |
| B4 | 98.5 | 100.0 | 100.0 | 99.3 | 96.1 | 98.4 | 100.0 | 99.3 | 71.0 | 77.9 | 91.3 | 93.1 | |
| Q1 | Q2 | Q3 | Q4 | Q1 | Q2 | Q3 | Q4 | Q1 | Q2 | Q3 | Q4 |
Excitation stratum
Rate (%)
Fig. 5. LoE and Friction diagnosis by the CWT, Temporal, and FFT SHAPE pipelines on Primary test. Cells show five-seed mean percentages: (a) correct fault-type identification; (b) true faulty runs assigned to any fault class. B1–B4 follow the fault-specific severity intervals in Section IV, from lowest to highest. Q1–Q4 are training-defined strata of post-fault measured Joint-2 velocity RMS. All panels share a 0%–100% scale.
FFT exhibits substantial regional structure despite its lower aggregate performance and greater between-seed variability. In LoE B4, identification rises from 12.00% at Q1 to 79.26% at Q4, whereas identification in B1 remains very low despite appreciable binary detection. The favorable LoE regions are therefore concentrated at stronger severity and higher Q. Friction shows a different relationship between the metrics: in B4, FFT detection rises from 71.04% to 93.10% between Q1 and Q4, while identification changes from 61.19% to 60.00%, with higher intermediate means. The higher observed detection at Q4 is accompanied by more wrong-fault assignments, rather than higher Friction identification. These profiles distinguish limited fault-type separability from failure to recognize abnormality.
Vibration identification is approximately 99.3% for CWT and Temporal, compared with 71.41% for FFT. Missed detec-
TABLE V SIX-JOINT RESIDUAL-EVALUATION REQUIREMENTS. INPUTS CONCERN THE FINAL RESIDUAL MAPPING, NOT CONTROLLER SENSING; ALL METHODS USE COMMAND TORQUES. REFERENCE GENERATION IS EXCLUDED, AND STATE COUNTS DENOTE RECURSIVE OBSERVER VARIABLES
| Requirement | SHAPE | Torque | GMO | EO |
|---|---|---|---|---|
| Measured position input | No | No | Yes | Yes |
| Measured velocity input | Yes | No | Yes | Yes |
| Dynamics evaluated at measured state | No | No | Yes | Yes |
| Observer states | 0 | 0 | 6 | 1 |
| Residual channels | 6 | 6 | 6 | 1 |
tions dominate FFT errors in every amplitude–Q cell, whereas wrong-fault assignments predominate for LoE. CWT's clearest benefit is in intermediate Friction; Temporal remains competitive in LoE and Vibration, with a detection–identification tradeoff in weak LoE. FFT's better LoE regions occur at stronger severity and higher Q, but remain below CWT and Temporal. These observational profiles associate each pipeline with different favorable regions and error patterns.
F. Residual Evaluation Requirements
With command torques and nominal references available, Torque requires one subtraction per joint, whereas SHAPE requires two multiplications and one subtraction (Table V). Precomputing nominal power reduces SHAPE's final evaluation to one multiplication and one subtraction per joint: six of each per sample for . Both algebraic mappings require arithmetic and maintain no recursive observer state. These counts exclude reference generation; both formulations retain nominal model-derived quantities.
GMO and EO evaluate nominal dynamics at the measured state and update recursive observer states. Both require inertia, gravity, and friction terms; GMO additionally requires , with the nominal Coriolis-centrifugal matrix in the Christoffel convention. Given an assembled dense inertia matrix, momentum and kinetic-energy products require arithmetic, excluding model evaluation. The implemented central-difference routine for GMO evaluates inertia at twelve displaced configurations per sample, in addition to the base matrix. This count is specific to that six-joint implementation. GMO maintains six observer states and six joint-resolved residual channels; EO maintains one state and one scalar channel. SHAPE retains joint-resolved channels with measured velocity and nominal references, without measured-state dynamics evaluation. These requirements concern residual construction; complete-pipeline execution latency, including CWT and classification, remains unmeasured.
G. Diagnostic Coverage and Conditional Tradeoffs
Algebraic port-power residuals support useful fault-type discrimination, with advantages over Torque concentrated in particular operating regions. Under common CWT processing, SHAPE improves identification across weak and intermediate LoE, improves both detection and identification in intermediate Friction, and avoids some localized Vibration deficits of Torque. Strong Friction and strong LoE at high Q also provide shared regions of high identification where the distinction narrows. Incorporating velocity into the algebraic construction therefore changes diagnostic coverage while retaining a simple final evaluation, but adds measurement exposure: in E4, velocity perturbations severely degrade SHAPE while leaving Torque's residual unchanged under the offline protocol.
Relative to EO, SHAPE has higher identification in several low-Q regions and less variation across Q in weak LoE. EO closes or reverses these differences in specific higher Q regions, so their similar aggregate accuracies conceal different operating profiles. SHAPE supplies joint-resolved algebraic residuals, whereas EO uses a scalar residual and a recursive state. GMO retains the broadest clean coverage, with the highest or tied highest detection and identification in every evaluated LoE–Friction severity–Q cell, alongside measured-state dynamics evaluation and six observer states. SHAPE thus offers diagnostic capability without those observer requirements, with a remaining clean-performance gap to GMO.
Favorable regions also depend on representation and measurement quality. CWT's clearest advantage over Temporal occurs in intermediate Friction, while Temporal remains competitive in LoE and Vibration. Position-only perturbations leave SHAPE's predictions unchanged through its final measurement mapping, whereas the observer formulations degrade; velocity sensitivity limits this advantage. The empirical profiles therefore combine fault type, severity, operating stratum, representation, and measurement exposure. They distinguish high identification from relative gains in regions still affected by confusion or missed detection. Because fault type and severity are known when constructing these profiles, the regions characterize the evaluated cases rather than provide a selection rule for an undiagnosed fault.
VI. CONCLUSION
SHAPE provides a construction for energy-based fault diagnosis without a dedicated dynamic observer in fully actuated, differentially flat pH mechanical systems with collocated actuation. It combines planned nominal port power with commanded effort and measured flow to generate physically interpretable residuals. With nominal references available, residual evaluation requires neither recursive observer updates nor measured-state dynamics calculations. The simulated manipulator results show that these signals support discrimination among the evaluated fault types through the CWT and shared-encoder CNN realization.
The comparisons characterize the diagnostic capability of this construction. Under common CWT processing, SHAPE achieves higher mean accuracy than the torque residual, while GMO provides broader clean diagnostic coverage. Severity-excitation profiles reveal fault-type confusion and missed detection, particularly for weak friction. CWT achieves higher mean accuracy than the temporal and Fourier SHAPE pipelines, while offline velocity perturbations cause pronounced degradation. The usefulness of the power residuals therefore depends on operating conditions, representation, and measurement quality.
Validation remains limited to simulated single faults at a specified joint. Further work should assess physical experiments, measurement errors propagated through the controller and plant, and complete-pipeline execution cost. Unknown fault locations and simultaneous faults also require evaluation. A longer-term direction is to connect the diagnostic signals to energy-aware control, including energy freezing; this requires online detection and analysis of detection delay and closed-loop safety beyond the present complete-trajectory classification.
DATA AVAILABILITY
The simulation and diagnostic code, frozen result tables, complete regional maps, and configuration and provenance records are available at https://github.com/johnnyzxc5/SHAPE-paper-reproducibility. The repository documentation specifies the external artifacts and environment requirements for classifier reevaluation and simulation regeneration.
ACKNOWLEDGMENT
OpenAI Codex [29] was used to assist with language and clarity, preparing LaTeX code, and developing the project's GitHub reproducibility repository. The authors retain full responsibility for the manuscript, code, and reported results.
REFERENCES
[1] C. Sconyers, Y.-K. Lee, K. Kim, S. Oh, D. Mavris, N. Oza, R. Mah, R. Martin, I. A. Raptis, and G. J. Vachtsevanos, “Diagnosis of fault modes masked by control loops with an application to autonomous hovercraft systems,” Int. J. Progn. Health Manage., vol. 4, no. 1, 2013, Art. no. 007, doi: 10.36001/ijphm.2013.v4i1.1450.
[2] D. Neupane, M. R. Bouadjenek, R. Dazeley, and S. Aryal, "Data-driven machinery fault diagnosis: A comprehensive review," Neurocomputing, vol. 627, Apr. 2025, Art. no. 129588, doi: 10.1016/j.neucom.2025.129588.
[3] N. Salguero, J. Loayza, N. Iqbal, and B. Brahmi, “Multiview scalogram fusion with adaptive SE-CNNs for bearing fault diagnosis,” IEEE Trans. Ind. Informat., vol. 22, no. 8, pp. 7278–7289, Aug. 2026, doi: 10.1109/TII.2026.3684180.
[4] Y. Wu, B. Sicard, and S. A. Gadsden, “Physics-informed machine learning: A comprehensive review on applications in anomaly detection and condition monitoring,” Expert Syst. Appl., vol. 255, Dec. 2024, Art. no. 124678, doi: 10.1016/j.eswa.2024.124678.
[5] A. De Luca and R. Mattone, “Actuator failure detection and isolation using generalized momenta,” in Proc. IEEE Int. Conf. Robot. Automat. (ICRA), vol. 1, 2003, pp. 634–639, doi: 10.1109/ROBOT.2003.1241665.
[6] A. De Luca and R. Mattone, “Sensorless robot collision detection and hybrid force/motion control,” in Proc. IEEE Int. Conf. Robot. Automat. (ICRA), 2005, pp. 999–1004, doi: 10.1109/ROBOT.2005.1570247.
[7] A. De Luca and R. Mattone, “An identification scheme for robot actuator faults,” in Proc. IEEE/RSJ Int. Conf. Intell. Robots Syst. (IROS), 2005, pp. 1127–1131, doi: 10.1109/IROS.2005.1545370.
[8] S. Haddadin, A. Albu-Schäffer, A. De Luca, and G. Hirzinger, “Collision detection and reaction: A contribution to safe physical human-robot interaction,” in Proc. IEEE/RSJ Int. Conf. Intell. Robots Syst. (IROS), 2008, pp. 3356–3363, doi: 10.1109/IROS.2008.4650764.
[9] A. van der Schaft and D. Jeltsema, “Port-Hamiltonian systems theory: An introductory overview,” Found. Trends Syst. Control, vol. 1, no. 2-3, pp. 173–378, Jun. 2014, doi: 10.1561/2600000002.
[10] R. Rashad, F. Califano, A. J. van der Schaft, and S. Stramigioli, “Twenty years of distributed Port-Hamiltonian systems: A literature review,” IMA J. Math. Control Inf., vol. 37, no. 4, pp. 1400–1422, Dec. 2020, doi: 10.1093/imamci/dnaa018.
[11] R. Rashad, D. Bicego, J. Zult, S. Sanchez-Escalonilla, R. Jiao, A. Franchi, and S. Stramigioli, “Energy aware impedance control of a flying end-effector in the Port-Hamiltonian framework,” IEEE Trans. Robot., vol. 38, no. 6, pp. 3936–3955, Dec. 2022, doi: 10.1109/TRO.2022.3183532.
[12] M. Atitallah, R. El Harabi, and M. N. Abdelkrim, “Fault detection and estimation based on full order unknown input Hamiltonian observers,” in Proc. 12th Int. Multi-Conf. Syst., Signals Devices (SSD), 2015, pp. 1–7, doi: 10.1109/SSD.2015.7348226.
[13] S. Haddadin, A. De Luca, and A. Albu-Schäffer, “Robot collisions: A survey on detection, isolation, and identification,” IEEE Trans. Robot., vol. 33, no. 6, pp. 1292–1312, Dec. 2017, doi: 10.1109/TRO.2017.2723903.
[14] M. Saied, T. Mahairy, C. Francis, H. Shraim, H. Mazeh, and M. El Rafei, “Differential flatness-based approach for sensors and actuators fault diagnosis of a multirotor UAV,” IFAC-PapersOnLine, vol. 52, no. 16, pp. 831–836, 2019, doi: 10.1016/j.ifacol.2019.12.066.
[15] A. Lomakin and J. Deutscher, “Reliable algebraic fault detection and identification of robots,” IEEE Trans. Autom. Sci. Eng., vol. 19, no. 4, pp. 3821–3837, Oct. 2022, doi: 10.1109/TASE.2021.3137182.
[16] A. H. Sabry, F. H. Nordin, A. H. Sabry, and M. Z. Abidin Ab Kadir, "Fault detection and diagnosis of industrial robot based on power consumption modeling," IEEE Trans. Ind. Electron., vol. 67, no. 9, pp. 7929–7940, Sep. 2020, doi: 10.1109/TIE.2019.2931511.
[17] M. Fliess, J. Lévine, P. Martin, and P. Rouchon, “Flatness and defect of non-linear systems: introductory theory and examples,” Int. J. Control, vol. 61, no. 6, pp. 1327–1361, Jun. 1995, doi: 10.1080/00207179508921959.
[18] H. Sira-Ramírez and S. K. Agrawal, Differentially Flat Systems. New York, NY, USA: Marcel Dekker, 2004, doi: 10.1201/9781482276640.
[19] Gen3 Ultra Lightweight Robot User Guide, Kinova Inc., Boisbriand, QC, Canada, 2022, Rev. 7. Accessed: Oct. 12, 2026. [Online]. Available: https://www.kinovarobotics.com/uploads/User-Guide-Gen3-R07.pdf
[20] Z. Wang, J. Zha, and J. Wang, “Autonomous vehicle trajectory following: A flatness model predictive control approach with hardware-in-the-loop verification,” IEEE Trans. Intell. Transp. Syst., vol. 22, no. 9, pp. 5613–5623, Sep. 2021, doi: 10.1109/TITS.2020.2987987.
[21] K. M. Lynch and F. C. Park, Modern Robotics: Mechanics, Planning, and Control. Cambridge, U.K.: Cambridge Univ. Press, 2017, doi: 10.1017/9781316661239.
[22] B. Muraccioli, M. Celerier, M. Benallegue, and G. Venture, “Demonstrating a control framework for physical human-robot interaction toward industrial applications,” in Proc. Robot. Sci. Syst. (RSS), Los Angeles, CA, USA, Jun. 2025, doi: 10.15607/RSS.2025.XXI.084.
[23] S. Xu, W. Wang, and S.-Y. Chen, “Robust fault-tolerant control for stochastic port-Hamiltonian systems against actuator faults,” Mathematics, vol. 10, no. 9, 2022, Art. no. 1477, doi: 10.3390/math10091477.
[24] R. B. Randall, Vibration-Based Condition Monitoring: Industrial, Automotive and Aerospace Applications, 2nd ed. Hoboken, NJ, USA: Wiley, 2021, doi: 10.1002/9781119477631.
[25] The MathWorks, Inc., “cwtfilterbank: Continuous wavelet transform filter bank,” Wavelet Toolbox documentation, R2026a, 2026, Accessed: Oct. 10, 2026. [Online]. Available: https://www.mathworks.com/help/releases/R2026a/wavelet/ref/cwtfilterbank.html
[26] S. Mallat, A Wavelet Tour of Signal Processing, 2nd ed. San Diego, CA, USA: Academic, 1999, doi: 10.1016/B978-0-12-466606-1.X5000-4.
[27] I. Loshchilov and F. Hutter, “Decoupled weight decay regularization,” 2019, arXiv:1711.05101v3, doi: 10.48550/arXiv.1711.05101.
[28] C. A. Field and A. H. Welsh, “Bootstrapping clustered data,” J. R. Stat. Soc. B, Stat. Methodol., vol. 69, no. 3, pp. 369–390, Jun. 2007, doi: 10.1111/j.1467-9868.2007.00593.x.
[29] OpenAI, “Codex,” OpenAI, Accessed: Oct. 10, 2026. [Online]. Available: https://openai.com/codex/