Preprint
Article

This version is not peer-reviewed.

Real-Hardware Deployment of a Nussbaum-Function PID Controller on a Current-Controlled Low-Cost Actuator via Hardware-Aware Optuna Tuning

Submitted:

03 June 2026

Posted:

04 June 2026

You are already at the latest version

Abstract
Real-hardware deployment of adaptive manipulator controllers remained difficult because assumptions made in paper-level formulations were often weakened by friction, encoder quantization, current limits, communication latency, and low-speed actuation nonlinearities. This paper investigated that deployment gap for a recent Nussbaum-function PID controller by translating it from a simulation-level formulation into direct current-command control on a Niryo NED3 Pro actuator. To isolate deployment-layer behaviour from whole-arm Coriolis, centrifugal, and gravity dynamics, the study focused on a single decoupled actuator (Dynamixel ID 6, distal wrist) under long-horizon sinusoidal tracking around a fixed operating region.A direct transfer of the baseline control law was first reproduced and was shown to degrade due to cumulative adaptation-state growth, weakening of the Nussbaum modulation, and high internal command saturation. A hardware-oriented implementation was then evaluated that preserved the Nussbaum core while introducing adaptation-state regularization, low-speed velocity-reference feedforward, and tail-region damping. Its parameters were selected through a hardware-aware Optuna optimization archive comprising 79 real-hardware trials, with unsafe runs rejected and a composite score reflecting tracking quality, internal command saturation, actuation activity, and bounded adaptation growth.Over 300 s of continuous operation, the enhanced implementation reduced the mean absolute error from 10.476° to 1.054° and the internal command saturation ratio from 0.450 to 0.012 relative to the direct baseline, within the reported actuator, trajectory, and safety envelope. The main contribution was therefore not only a tuned controller but also a reproducible real-hardware methodology demonstrating how Nussbaum-based PID control could be successfully deployed and improved on a low-cost manipulator when adaptation management, actuation mapping, and hardware-aware optimization were treated as integral elements of the research design.
Keywords: 
;  ;  ;  ;  ;  ;  ;  ;  

1. Introduction

Reliable trajectory tracking on low-cost robot manipulators is still much harder in real hardware than in simulation. Even when a controller is supported by Lyapunov analysis, its practical behaviour can be dominated by effects that are usually suppressed or idealized in paper-level models, including friction, gear compliance, encoder quantization, actuator current limits, communication delay, and command slew limits. Recent reviews continue to show that adaptive, robust, disturbance-observer, and neural techniques remain central to manipulator control, especially when uncertainties and constraints matter [1,2]. However, the literature also shows a persistent deployment gap: many methods are evaluated numerically or on highly controlled laboratory platforms, while the transition to low-cost current-driven actuators remains underreported. A central part of this gap is sensing: on low-cost actuators the controller closes its loop on quantized position feedback and on a noisy, current-limited torque-proxy measurement, so the practical behaviour of an adaptive law is inseparable from the resolution, latency, and saturation of the on-board sensing and current-measurement chain. The present study therefore treats encoder quantization, velocity estimation, and current feedback not as nuisance terms but as first-class measurement constraints that govern whether the adaptive law remains usable.
Figure 1. Conceptual graphical abstract of the study: Nussbaum-PID core is connected to a real current-driven actuator, augmented by hardware-aware regularization, and tuned through measured physical trials before long-horizon validation. The project landing page is hosted at https://danielz.co.uk/projects/hardware-aware-nussbaum-pid/, and the companion GitHub repository (manuscript source, figures, tables, and scripts) is available at https://github.com/danialza/hardware-aware-nussbaum-pid.
Figure 1. Conceptual graphical abstract of the study: Nussbaum-PID core is connected to a real current-driven actuator, augmented by hardware-aware regularization, and tuned through measured physical trials before long-horizon validation. The project landing page is hosted at https://danielz.co.uk/projects/hardware-aware-nussbaum-pid/, and the companion GitHub repository (manuscript source, figures, tables, and scripts) is available at https://github.com/danialza/hardware-aware-nussbaum-pid.
Preprints 216736 g001
In the present project, that gap became explicit when a recent Nussbaum-function PID formulation for robot manipulators [3] was moved from simulation-level validation to direct current-command control on a Niryo NED3 Pro wrist actuator. The appeal of the Nussbaum approach is clear. Since the early Nussbaum-gain idea for adaptive systems with unknown control direction [4], this class of methods has remained attractive because it can handle sign-sensitive control effectiveness without requiring the sign of the high-frequency gain to be known a priori. In robot and manipulator control contexts, this means that a compact adaptive controller can be designed even when the effective actuator direction, transmission convention, or low-level command mapping is uncertain [5,6]. Yet the same feature that makes Nussbaum methods attractive in theory, namely the oscillatory adaptive modulation generated by N ( ζ ) , can become practically fragile if the adaptation state ζ is allowed to drift through critical regions while the actuator is already current-limited or friction-dominated.
This paper therefore has two linked goals. First, it documents a faithful real-hardware implementation of the baseline Nussbaum-PID (NPID) formulation on a directly commanded Dynamixel actuator. Second, it evaluates a hardware-oriented enhanced NPID implementation that preserves the Nussbaum core while adding implementation-level regularization required for long-duration operation on the tested real motor. To make this deployment behaviour observable under controlled conditions, the evaluation is deliberately concentrated on a single distal-wrist actuator, so that dominant whole-arm Coriolis, centrifugal, and gravity coupling effects are reduced and the measured residual is more strongly governed by the adaptation mechanism and the actuator/sensing chain; the rationale for this controlled single-joint design is detailed in Section 3. The resulting study is intentionally not framed as a pure theoretical extension. Instead, it is framed as a real-hardware control paper in which implementation-layer decisions are treated as research contributions because they determine whether the adaptive law remains usable beyond short favorable windows.
A second contribution of the paper is methodological. Instead of relying on manual parameter tuning alone, the controller was tuned through an aggregated Optuna archive on the physical actuator. Across the archived bundle, this search accumulated 79 real-hardware trials and approximately 87.9 min of closed-loop runtime. Optuna was selected because it supports structured trial management, dynamic search spaces, and efficient search through tree-structured Parzen estimators [7]. More importantly for this study, the objective was defined in hardware terms rather than as pure curve-fitting: unsafe or practically poor behaviours such as insufficient motion span, high internal command saturation, excessive ζ -growth, and large long-tail errors were rejected or penalized directly in the scoring function. This turns the tuning process itself into a reproducible part of the research method.
The main contributions of the paper are as follows:
  • A direct current-command implementation of a recent Nussbaum-function PID on a low-cost real manipulator actuator, with full run logging and reproducible plots.
  • A hardware-oriented enhanced NPID implementation that retains the Nussbaum core but adds soft ζ -leakage, velocity-reference feedforward, and tail-region damping to reduce deployment-induced degradation on the tested actuator.
  • An Optuna-based real-hardware tuning archive with 79 physical trials, hard safety filters, and multi-objective score shaping focused on tracking accuracy, saturation, actuation activity, and bounded adaptation growth.
  • A 300 s decoupled-joint experimental dataset, obtained on the Dynamixel ID 6 distal wrist actuator as the controlled isolated test bed required to expose deployment-layer effects with reduced multi-body coupling, showing that the final tuned enhanced implementation reduces the mean absolute error from 10 . 476 to 1 . 054 and the internal command saturation ratio from 0.450 to 0.012 relative to the direct baseline implementation under the same reported hardware setting.

3. Materials and Methods

3.1. Experimental Platform and Evidence Pipeline

Experiments were conducted on a Niryo NED3 Pro manipulator using direct Dynamixel current-command control. The manuscript evidence is deliberately concentrated on a single actuator, namely Dynamixel ID 6 (Niryo J5) in the distal wrist chain, used here as the controlled, decoupled test bed of the study.
The Nussbaum adaptation mechanism interacts with several hardware-induced effects whose individual contributions are extremely difficult to separate when the controller is exercised on a full multi-degree-of-freedom arm. These effects include unmodeled Coulomb and viscous friction at the actuator, severe encoder quantization at the gearbox output, current-saturation and slew limits in the Mode 0 current loop, communication latency on the Dynamixel bus, and the dead-band introduced by the low-level current driver near zero command. On a multi-joint arm these effects are superimposed on the time-varying Coriolis, centrifugal, and gravity terms of (1), so that a single tracking-error trace at any joint reflects a sum of (i) the Nussbaum adaptation transient, (ii) the hardware-oriented regularization studied here, (iii) the actuator and sensing non-idealities, and (iv) the multi-body coupling. Isolating the distal wrist joint reduces the dominant contribution of term (iv), because the upstream joints are held at a fixed configuration during every reported run, the wrist payload is fixed, and the gravity component at the operating centre is approximately constant. This design does not eliminate all residual joint-level effects: friction, backlash, compliance, cable and gearbox effects, gravity residuals, and load-dependent behaviour may still influence the same actuator. It does, however, reduce the dominant multi-body coupling confound sufficiently for the remaining residual to be interpreted primarily in terms of the Nussbaum mechanism and the actuator/sensing chain, which is exactly the deployment-layer behaviour this paper aims to characterize.
This single-joint study is the necessary first step of a multi-stage evaluation programme: characterize and improve the deployment-layer behaviour of an adaptive controller on a single decoupled joint, establish the safety envelope, the regularization architecture, and the hardware-aware Optuna scoring, and then carry the resulting controller forward to whole-arm trajectory tracking in subsequent work. The Dynamixel ID 6 / Niryo J5 actuator is well suited to this role: it sits at the distal end of the kinematic chain, so its dynamics are dominated by its own rotor inertia and friction rather than by the rest of the arm; it is the actuator most exposed to encoder-quantization and low-speed effects in the NED3 Pro platform; and it is the actuator for which sustained current-mode operation is most demanding because the available current ceiling is modest relative to the demanded torque at low speeds. The paper uses the dual identifier “Dynamixel ID 6 / Niryo J5” to avoid ambiguity between actuator IDs and whole-arm joint numbering conventions used in earlier working notes.
The controller was executed outside the higher-level ROS command path for the final evidence runs. This decision was made after early experiments showed that command-state conflicts and timing jitter in the middleware path could obscure the low-level behaviour of the adaptive law. The final evidence loop therefore logged the reference position, measured position, filtered velocity, tracking error, intermediate Nussbaum variables, commanded current, measured current, and saturation indicators in a single direct loop. Figure 2 shows the annotated distal actuator map and the robot used to ground the experiments in the physical platform.
Table 1. Main experimental protocol used in the main real-hardware Nussbaum runs.
Table 1. Main experimental protocol used in the main real-hardware Nussbaum runs.
Item Setting
Robot platform Niryo NED3 Pro
Low-level interface Direct Dynamixel current command (Mode 0/current-control path)
Primary tested actuator Dynamixel ID 6 / Niryo J5
Dynamixel current scale used for conversion XM430-W350 / XM430 X-series current-register convention, c I 2.69 mA / count
Trajectory type Locked-center sinusoid
Reference amplitude 10
Reference frequency 0.05 Hz
Operating center 140 start-centered operating region
Control rate 24 Hz
Main validation duration 300 s
Evidence artifacts CSV logs, JSON summaries, and publication-style PDF/PNG plots
Core safety envelope Current clamp, current slew limit, velocity filtering, anti-windup, q-guard, and adaptation freeze on satx.

3.2. Baseline Nussbaum-PID Formulation

The manipulator model adopted in the source NPID work [3] is
M ( q ) q ¨ + C ( q , q ˙ ) q ˙ + G ( q ) = τ , τ = κ u ,
where q R n is the joint position vector, M ( q ) is the symmetric positive-definite inertia matrix, C ( q , q ˙ ) q ˙ collects Coriolis and centrifugal terms, G ( q ) is gravity, τ is the applied joint torque, u is the control input, and κ is an unknown control-direction matrix. In the real-hardware deployment of Section 4, unmodeled friction, encoder quantization, communication latency, and current-command nonlinearities additionally act on the joint; these are treated explicitly at the deployment layer rather than absorbed into (1).
For tracking, the joint-level error signals are
e = q d q , e ˙ = q ˙ d q ˙ , e I ( t ) = 0 t e ( ξ ) d ξ ,
and the source formulation defines the generalized intermediate variable
Ψ ( t ) = 2 γ e ( t ) + γ 2 e I ( t ) + e ˙ ( t ) , γ > 0 ,
which couples proportional, integral, and derivative tracking error into a single signal. The role of Ψ is established in [3]: if Ψ ( t ) 0 as t , then e, e ˙ , and e I remain bounded and converge to zero.
For dimensional consistency in Eq. (3), the parameter γ has units of s 1 . Therefore, 2 γ e , γ 2 e I , and e ˙ all have angular-rate units. In the implementation reported in this paper, the controller signals q, q d , e, e I , and e ˙ were represented in degrees, degree-seconds, and degrees per second, respectively, because these are the native units used in the logged actuator data and in the reported tracking-error metrics. The same mathematical structure can be implemented using radians if all signals and gains are rescaled consistently. However, the optimized parameters reported in this paper are degree-basis implementation parameters and should not be transferred directly to a radian-basis controller without the corresponding unit conversion.
To avoid ambiguity between the source theoretical formulation and the implemented single-joint controller, the RBF input used in this hardware implementation is defined explicitly as
χ = Ψ q q ˙ .
The corresponding RBF approximation is F ( χ ; ψ ) = ψ ϕ ( χ ) , with Gaussian basis functions
ϕ i ( χ ) = exp 1 2 ( χ c i ) B i 1 ( χ c i ) ,
where c i is the centre of the i-th basis function and B i is its covariance matrix. This implementation-level regressor differs from the broader source-paper notation x = [ e , e ˙ , q , Ψ ] . The reduced regressor χ was used because the present validation is a single-joint hardware deployment study and because Ψ already combines the proportional, integral, and derivative tracking-error information used by the controller. All RBF centres, widths, and tuned gains reported in this paper therefore correspond to the implemented regressor χ , not to the full source-paper vector x. The adaptive gain correction is
κ Δ ( t ) = α ψ ^ ( t ) ϕ ( χ ) ,
and the RBF weight update is
ψ ^ ˙ ( t ) = Γ α Ψ ( t ) 2 ϕ ( χ ) + σ m ψ ^ ( t ) ,
with α > 0 , Γ = Γ > 0 , and σ m > 0 the σ -modification leakage term (denoted σ in [3]; renamed here only to avoid collision with the RBF width symbol).
The Nussbaum function used throughout this work is
N ( ζ ) = ζ 2 cos ( ζ ) .
and the associated Nussbaum gain is K N ( ζ ) = N ( ζ ) . Although this function satisfies N ( 0 ) = 0 , this is a property of the Nussbaum function rather than an initial condition for the adaptation state. The hardware implementation therefore used the non-zero initial adaptation state
ζ ( 0 ) = ζ 0 = 0.8856929670 ,
which was selected during the offline Optuna tuning process together with the remaining deployment parameters, rather than chosen manually after the validation run. The general source control law is
u ( t ) = ( k π + κ π ) K N ( ζ ) e + ( k ι + κ ι ) K N ( ζ ) e I + ( k Δ + κ Δ ) K N ( ζ ) e ˙ ,
and the source then imposes the linking relations
k Δ = k π 2 γ = k ι γ 2 , κ Δ ( t ) = κ π ( t ) 2 γ = κ ι ( t ) γ 2 ,
which yield the characteristic polynomial s 2 + 2 γ s + γ 2 = ( s + γ ) 2 . For γ > 0 , this polynomial is Hurwitz, and the control law reduces to the compact form
u pure = k Δ + κ Δ N ( ζ ) Ψ ,
with adaptation-state dynamics
ζ ˙ = Ψ ( k Δ + κ Δ ) Ψ = k Δ + κ Δ Ψ 2 .
Equation (13) is mathematically concise and was implemented directly in the initial hardware baseline. In the reported real-motor tests, this direct implementation showed a deployment-layer degradation mechanism. Since Ψ 2 0 , ζ can accumulate over long runs when k Δ + κ Δ remains predominantly positive in the tested regime. As ζ approaches regions where cos ( ζ ) becomes small, the effective multiplicative action of N ( ζ ) decreases; after crossing such regions, the effective sign of the Nussbaum modulation can change. On a current-limited actuator with friction and quantized sensing, this behaviour can reduce practical control authority. This observation concerns the direct hardware transfer of the baseline law and should not be read as a contradiction of the source Lyapunov analysis.

3.3. Enhanced NPID Formulation

The goal of the enhanced NPID formulation was to preserve the Nussbaum core while preventing the actuator from being driven into the most damaging parts of the baseline adaptation trajectory. Three additions were kept in the final manuscript configuration. First, the ζ -law was regularized using a soft leakage term:
ζ ˙ = k Δ + κ Δ Ψ 2 λ ζ max 0 , ζ ζ soft .
This term is used here as an implementation-level adaptation governor. It does not remove the Nussbaum mechanism because N ( ζ ) remains in the control law. However, it is not claimed as a general replacement for the original Nussbaum adaptation law. Its purpose is to slow excessive ζ -growth in the tested actuator setting once ζ enters a range that was empirically associated with poor long-duration hardware behaviour.
Second, a low-speed velocity-reference feedforward term was added:
u vref = k f tanh q ˙ d v f ,
where k f is the feedforward magnitude and v f is the velocity scale used to smooth the sign transition. The term is motivated by Coulomb-friction-like low-speed hesitation, but it uses the desired velocity q ˙ d , not the measured velocity q ˙ . It is therefore described here as velocity-reference feedforward rather than as a direct friction observer or measured-velocity friction compensator. This design was used to provide a smooth reversal bias without injecting measured-velocity noise into the current command.
Third, a tail-region damping term was activated only when the absolute tracking error became large enough to justify extra damping. In the implementation, the activation weight is a smoothstep map between an error threshold and a full-activation error level. In compact notation,
a tail ( | e | ) [ 0 , 1 ] ,
where a tail increases monotonically from 0 to 1 as | e | grows between a lower error threshold and a full-activation level through a smoothstep (cubic Hermite) interpolation, so that the additional damping stays inactive during normal small-error tracking and engages only on large excursions; the two activation thresholds are reported with the other deployment parameters in the released configuration files. The additional tail damping is
u tail = k t d e ˙ .
The implemented enhanced NPID control signal before current mapping is therefore
u pp = sat u max u pure + a tail ( | e | ) u tail + u vref .
Here sat u max ( · ) denotes symmetric saturation at the internal controller limit u max . The variable u pp is a dimensionless controller-side command and should not be interpreted as a joint torque. These three additions define the enhanced NPID controller studied here. Other engineering safeguards, including anti-windup, velocity filtering, saturation-aware freezing of adaptation, current slew limiting, and a joint-angle guard, remained active as the fixed deployment envelope during all real-hardware trials. They are important for reproducible execution, but they were not treated as the main scientific novelty of the manuscript.
Figure 3 summarizes the full closed-loop architecture and the role of every equation introduced above. The signal flow runs from left to right along the main horizontal chain. The Reference block emits the locked-centre sinusoidal reference q d = 140 + A sin ( 2 π f t ) with the validated amplitudes A { 10 , 40 } and frequencies f { 0.05 , 0.5 } Hz . The Error shaping block applies Eqs. (2)–(3) to produce the generalized error Ψ , with integral anti-windup acting on the integrator inside Ψ . The Adaptive Nussbaum mechanism expands its internal structure into six sub-blocks arranged in a 3 × 2 grid: the left column holds the filtered error ( Ψ routed in from PID shaping), the ψ ^ adaptation law of Eq. (7) with hyperparameters Γ , α , σ m , and the pure adaptive law u pure = ( k Δ + κ Δ ) N ( ζ ) Ψ of Eq. (12); the right column holds the RBF regressor ϕ ( χ ) with input χ = [ Ψ , q , q ˙ ] , the ζ update law ( ζ ˙ driven by Ψ 2 with the λ ζ tail-leak input from the regularization block), and the Nussbaum gain N ( ζ ) = ζ 2 cos ζ that supplies unknown-sign handling. The block-level output κ Δ = α ψ ^ ϕ of Eq. (6) is shown along the bottom of the mechanism panel, where the RBF regressor output ϕ is combined with the adapted weights ψ ^ to drive the pure adaptive law.
The three hardware-oriented additions are grouped in the Regularization block at the bottom of the figure and are routed via dashed green arrows back into the controller: the soft ζ -leak λ ζ [ ζ ζ soft ] + is injected directly into the ζ -update sub-block of the adaptive mechanism, while the velocity-reference feedforward u vref of Eq. (15) and the tail damping u tail of Eq. (17) are summed with u pure at the explicit Σ junction outside the mechanism panel. The summed pre-deployment command u pp then enters the Current mapping + guards block, which applies the current mapping of Eq. (19), the current and slew clamps, and the saturation-aware adaptation freeze before issuing the raw current command I cmd to the Actuator (Dynamixel ID 6 in Mode 0 current loop). The measured joint state ( q , q ˙ ) is fed back to the input summing junction to close the position loop.
A second, offline loop is shown in dashed purple. The Optuna tuning and evidence block consumes per-trial telemetry from the actuator during the tuning phase only, and distributes the selected hyperparameters along the selected parameter bus to every tunable block: γ in error shaping, the core/RBF gains ( k Δ , α , Γ , σ m , RBF ) , the regularization parameters ( λ ζ , k f , k t d ) , and the current and slew limits in the current-mapping block. The amber OFFLINE TUNING badge at the top-right of the figure, the (offline, frozen at deploy) qualifier on the parameter bus, and the (tuning phase only) qualifier on the telemetry arrow all reinforce that this Optuna loop is not part of the deployed real-time controller: once the parameter set of Table 6 has been selected, the Optuna bus and tuning telemetry are disconnected, the parameters are frozen, and the controller runs as a fixed-parameter real-time loop. The colour key at the bottom of the figure separates the four functional concerns: controller math (blue), hardware/safety (orange), regularization (green), and Optuna evidence (purple).

3.4. Current-Command Deployment Layer

The actuator does not accept a torque command directly. The dimensionless controller command u pp is therefore mapped into raw Dynamixel current-command counts as
I cmd raw = max I max raw , min I max raw , round s c k I u u pp + I bias raw .
where k I u maps the dimensionless controller command into raw current counts, I bias raw is a raw-count bias, I max raw is the raw current clamp, and s c { 1 , + 1 } is the experimentally identified command-sign convention. For the final manuscript configuration, s c = 1 , k I u = 210 , I bias raw = 0.1296542137 , and I max raw = 39 . Since the raw Dynamixel current command is integer-valued, the small optimized bias I bias raw = 0.1296542137 has no independent physical meaning except through its effect on rounding close to integer thresholds. It is retained here only for exact reproducibility of the released configuration selected by Optuna. In practice, this value is approximately equivalent to zero raw current count.
If a physical current value is required, the raw command can be converted using the current least-significant bit of the tested Dynamixel actuator,
I cmd mA = c I I cmd raw ,
where c I is the model-specific current scale in mA / count . The deployment configuration used the XM430-W350 current-register convention for the tested Dynamixel actuator, for which the project configuration records c I 2.69 mA / count . Therefore, the clamp I max raw = 39 corresponds to approximately I max mA 39 × 2.69 = 104.9 mA . The quantitative controller claims in this paper are nevertheless reported in raw Dynamixel current units and internal command units because those are the quantities logged by the deployment layer. The sign must be validated experimentally; it cannot be copied blindly from a different controller family.
The command sent to the motor was also subject to current clamping and a first-order slew constraint. Although these safety layers are conceptually simple, they are crucial for real-hardware credibility because they define the part of the theoretical control law that the actuator can actually realize.

3.5. Theoretical Scope of the Implemented Controller

The baseline NPID controller follows the theoretical formulation in the source work, where boundedness is established under the assumptions of the considered manipulator model and the corresponding adaptive control law. The enhanced controller implemented in this paper includes hardware-facing components, namely soft adaptation-state leakage, low-speed velocity-reference feedforward, tail-region damping, current clamping, slew-rate limiting, anti-windup, and saturation-aware adaptation handling. These components are introduced for real-motor deployment and are not claimed here as a new Lyapunov-based theoretical extension of the source controller. Therefore, the claims of the present paper are restricted to experimentally observed bounded operation under the reported actuator, reference trajectory, operating region, and safety envelope. The objective is to characterize and improve practical deployability, not to replace the original theoretical analysis.
A clarification on the role of the Nussbaum mechanism in this single-joint study is warranted, because it pre-empts a natural objection. On the isolated Dynamixel ID 6 test bed the effective command sign is in fact identifiable, and indeed the deployment layer fixes it to a constant value ( s c = 1 in Eq. (19)). One might therefore ask why a Nussbaum-gain controller, whose defining purpose is to resolve an unknown control direction, is exercised at all on a joint whose direction is known. The answer is methodological. The unknown-sign capability of the Nussbaum law is not the property under test in this paper; it is the property the source controller will be relied upon to provide in the multi-joint and variable-transmission settings targeted in subsequent work, where effective control-direction and low-level command-mapping uncertainty genuinely arise once joints are coupled, reconfigured, or driven through gear trains of mixed convention. Before that sign-handling capability can be trusted on real hardware, the deployment dynamics of the very same adaptation law—the growth of ζ , the behaviour of N ( ζ ) = ζ 2 cos ( ζ ) near its critical region, and the interaction of both with current limits and friction—must first be characterized in the cleanest practical setting. A single decoupled joint with a known, fixed sign is precisely that setting: it reduces the influence of multi-body coupling and removes sign ambiguity, so that the ζ -drift degradation reported in Section 4 can be interpreted as a deployment-layer effect rather than as a sign-resolution transient. In other words, the known-sign single joint is used here not because the Nussbaum gain is needed to find the sign, but because it is the controlled experiment in which the deployability of the Nussbaum adaptation mechanism can be established before its sign-handling property is exercised on harder, genuinely sign-uncertain configurations.

3.6. Optuna-Guided Real-Hardware Tuning

Optuna is used in this paper only as an offline tuning framework. It runs on a host computer that is connected to the robot during the parameter-search phase, drives a sequence of finite-duration real-hardware trials, and stores trial telemetry, scores, and the selected parameter set. Once the parameter set of Table 6 has been chosen, the Optuna loop is disconnected and the controller runs as a fixed-parameter real-time loop. No live optimization, online hyperparameter adaptation, or online Optuna optimization is used during deployment; the purple Optuna paths in Figure 3 are exercised only during the tuning phase.The manual tuning was useful for initial safety checks, but it was insufficient for the final controller because several parameters interact nonlinearly: k Δ , γ , α , Γ , RBF width, current ceiling, slew limit, ζ -leakage, velocity-reference feedforward, and tail-region damping. Optuna was therefore used as the main search framework [7]. The implementation uses Optuna’s Tree-structured Parzen Estimator (TPE) sampler with multivariate sampling enabled and a fixed random seed for reproducibility, together with a short startup phase of random trials before the TPE model is engaged. The complete tuning archive contains 79 physical closed-loop trials, of which 61 satisfied the score-validity criterion used in the archived logs. The final manuscript configuration is therefore not presented as a blind single-trial winner; instead, it is a long-run validated configuration selected from the parameter basin exposed by the cumulative search effort and then confirmed in 300 s operation. For full transparency, the 79-trial figure refers specifically to the headline 10 / 0.05 Hz archive; the additional operating points reported in Table 4 and Table 5 required further finite-duration Optuna passes, so the total real-hardware search effort behind the paper amounts to several hundred trials (Table 2). All passes shared the same admissibility filters and the same scoring function of Eq. (21); the quantitative selection claims in this subsection are nonetheless reported only from the single 79-trial headline archive so that every headline number is traceable to one campaign rather than aggregated across heterogeneous search budgets.
The Optuna score was deliberately hardware-aware. Trials were rejected immediately if they violated core admissibility conditions such as insufficient motion span, excessive maximum error, excessive 95th-percentile error, or too much ζ -growth. The remaining trials were scored using a weighted sum of tracking accuracy, internal command saturation ratio, effort ratio, low control activity, and soft penalties on adaptation growth. To avoid ambiguity about mixed units, the objective is written below in its implemented scaled form: error quantities are in degrees, ratios are dimensionless, and the numerical weights therefore carry the effective reciprocal units needed to make J a scalar score. Equivalently, the degree-valued terms can be interpreted as normalized by 1 , while the ratio terms are normalized by one.
J = w mae MAE deg + w rms RMSE deg + w 95 P 95 deg + w max e max , deg + w sat 10 r sat , int + w eff 5 r eff + w span 10 | 1 r span | + w u 10 Π u + w ζ Π ζ + w c u max .
where r sat , int is the internal command saturation ratio, r eff is the mean absolute raw-current demand divided by I max raw , r span is the achieved motion-span ratio, Π u = max ( 0 , r u , min r u ) penalizes insufficient controller activity, Π ζ collects soft exceedances of the configured ζ -magnitude/growth limits, and u max is the internal command clamp. For the headline archive, the active weights were w mae = 1.0 , w rms = 0.6 , w 95 = 0.2 , w max = 0.03 , w sat = 1.5 , w eff = 0.1 , w span = 0.8 , w u = 0.8 , w ζ = 0.1 for the active ζ -soft-limit term, and w c = 0.05 . Tail-window and step-specific weights were available in the tuning code but set to zero for the headline sinusoidal archive. This structure is closer to real experimental design than to ordinary curve-fitting because it explicitly encodes what counts as a successful and defensible hardware run.

3.7. Evaluation Metrics

All final evidence was assessed using fixed metrics computed from the saved CSV logs. The core metrics were mean absolute error, root-mean-square error, 95th-percentile absolute error, maximum absolute error, internal command saturation ratio, and total ζ -growth over the run. For a run with N logged in-loop samples and per-sample tracking error e k , these are MAE = 1 N k = 1 N | e k | , RMSE = 1 N k = 1 N e k 2 , P 95 the 95th percentile of { | e k | } , e max = max k | e k | , and the total adaptation growth Δ ζ = ζ ( T ) ζ ( 0 ) over a run of duration T. The internal command saturation ratio reported throughout the paper is defined as the fraction of in-loop samples for which | u pp | reaches the controller’s internal command clamp max_control; it therefore measures how often the adaptive law was running against its configured authority limit rather than how often the raw motor current itself touched the Dynamixel current rail. These metrics were selected because they capture complementary aspects of performance: average tracking quality, worst-case excursions, actuator stress, and long-horizon adaptation behaviour.

4. Results

4.1. Source-Paper Numerical Simulation Evidence

Before presenting the real-hardware results, it is useful to state what was already demonstrated in the source NPID paper. Rahimi Nohooji and Voos validated their controller numerically on a two-link robot manipulator moving in the vertical plane [3]. The simulation used sinusoidal desired trajectories, linked PID/Nussbaum parameters, an RBF neural approximator, and the adaptation laws for ψ ^ ( t ) and ζ ( t ) . The reported results showed position tracking, velocity tracking, bounded generalized error Ψ ( t ) , and bounded control input under the assumptions of the source theoretical formulation.
The present paper uses that source formulation as the baseline controller for real-hardware assessment. The source-paper simulation did not include the direct current-command interface, encoder quantization, actuator friction, command-sign identification, current saturation, or slew-rate limits of the Niryo NED3 Pro actuator. The following subsections therefore move from the original numerical setting to real physical validation. No figure from the source manuscript is reproduced here; any future reuse of source-paper figures should follow the required citation and permission process.

4.2. Best 300 S Enhanced Nussbaum Tracking Performance on Real Hardware

The best validated 300 s enhanced Nussbaum run in the archive is the final manuscript configuration, archived internally as break-c12a-300. Figure 4 in the multi-envelope subsection that follows renders this run in the four-panel template used throughout the Results section. The corresponding scalar performance is summarized in Table 3. The best run achieved a mean absolute error of 1 . 054 , root-mean-square error of 1 . 283 , 95th-percentile absolute error of 2 . 145 , maximum absolute error of 6 . 530 , internal command saturation ratio of 0.012 , and total ζ -growth of 0.194 . These figures correspond to the single best validated run (approximately 7200 in-loop samples at the 24 Hz control rate over 300 s) rather than to an ensemble average across repeated runs; this single-run mode of reporting is stated explicitly here and is revisited as a limitation in Section 5. These values support the limited practical claim of the paper: after hardware-oriented regularization and structured tuning, the implemented NPID controller tracked a long-horizon sinusoid on the tested real actuator without returning to the degradation pattern observed in the direct baseline implementation.
Relative to the strongest pre-final velocity-reference-feedforward baseline bestnow-fric-300, the final manuscript run improved MAE by approximately 8.8%, improved the P95 error by approximately 6.0%, reduced the maximum absolute error by approximately 28.1%, and lowered the internal command saturation ratio by approximately 14.3%.

4.3. Multi-Amplitude and Multi-Frequency Sinusoidal Validation

To probe the operating envelope of the enhanced NPID implementation, the same controller family was retuned and revalidated on the same Dynamixel ID 6 actuator at a second amplitude ( 40 ) and at a higher frequency band ( 0.5 Hz ), in addition to the headline 10 / 0.05 Hz configuration. Table 4 reports the resulting metrics from the best validated real-hardware run at each operating point. The amplitude–frequency sweep is reported on the same joint and within the same safety envelope, so the runs are directly comparable.
The strongest two results are the 10 / 0.05 Hz headline configuration and the 40 / 0.05 Hz long-horizon run, which both retain bounded adaptation over the full 300 s validation horizon. At 40 / 0.05 Hz , the larger commanded sweep increases reversal energy and slightly raises the internal command saturation ratio, but the controller still tracks the reference with correlation 0.992 and a small phase lag of 0.14 s . At 10 / 0.5 Hz the controller remains bounded and usable with near-unity amplitude ratio, although the higher reversal rate raises the internal command saturation ratio and increases mean error. The 40 / 0.5 Hz run is reported as the best short-window tracking result obtained at the high-amplitude high-rate corner; in this case the controller did not converge to a trustworthy long-horizon configuration within the search budget, and the row is therefore included as a partial-validation result rather than as a long-duration claim.
Table 4. Multi-amplitude and multi-frequency real-hardware validation of the enhanced NPID implementation on Dynamixel ID 6.
Table 4. Multi-amplitude and multi-frequency real-hardware validation of the enhanced NPID implementation on Dynamixel ID 6.
Amp. Freq. MAE (deg) RMSE (deg) P95 (deg) Internal sat. ratio Status
10 0.05 Hz 1.054 1.283 2.145 0.012 Best validated 300 s headline run
10 0.5 Hz 3.63 4.28 7.76 0.655 Bounded and practically usable
40 0.05 Hz 2.83 3.56 7.04 0.250 Best long-run 300 s at 40
40 0.5 Hz 8.47 10.61 21.40 0.762 Best short-window;
Figure 4, Figure 5, Figure 6 and Figure 7 render the four validated sinusoidal operating points using a single four-panel template: position (reference vs. measured), tracking error with ±P95 guides, commanded versus measured current with the safety rails, and the adaptive states ζ and ψ ^ against the ζ 0 and π / 2 reference lines. The visual language is held constant across operating points so that the comparison can be read at a glance.

4.4. Bandwidth Limit of the Real Closed Loop

Two additional operating points were probed deliberately above the comfortable tracking range of the actuated joint, namely 10 / 1.5 Hz and 10 / 3 Hz , together with high-amplitude pushes at 40 / 1.0 Hz and 40 / 1.5 Hz . These runs were not used to claim controller performance; they were used to characterize the practical bandwidth of the combined system, that is, the cascade of mechanical joint, current-command path, velocity estimation, and the enhanced Nussbaum closed loop. At 10 / 1.5 Hz , the best obtained real-hardware run remained bounded ( MAE 9 . 82 , P 95 16 . 59 , amplitude ratio 1.37 , phase lag 0.20 s , correlation 0.32 , internal command saturation ratio 0.92 ). The negative correlation and near-clamp internal command saturation indicate that the measured response is no longer phase-aligned with the reference: the joint is responding, but mostly out of phase and clipped. At 40 / 1.0 Hz , 40 / 1.5 Hz , and 10 / 3 Hz no validated tracking-quality run was obtained within the search budget; the candidates remained on the penalty floor with large persistent error and amplitude-ratio collapse.
This pattern is consistent with a classical closed-loop bandwidth limit rather than with a Nussbaum-specific failure mode. The peak reference velocity at 10 / 3 Hz reaches 2 π · 3 · 10 188 . 5 / s , which in combination with the current ceiling, current slew limit, and the velocity-estimation low-pass filter places the demanded motion beyond what the present hardware/software stack can realize with phase fidelity. The implication for this paper is conservative: the multi-amplitude/multi-frequency claims in Table 4 are restricted to the 0.5 Hz band, and the 1.0 3 Hz probes are reported as evidence of where the present low-cost stack reaches its bandwidth limit, not as failures of the controller theory.
Figure 8 renders the 10 / 1.5 Hz probe as a representative bandwidth-limit run using the same four-panel template as the validated operating points, so that the failure pattern is directly comparable to the in-envelope runs: the measured trajectory is amplitude-inflated relative to the reference but largely out of phase, and the command u pp sits at the internal max_control clamp for the majority of the run. The remaining bandwidth probes ( 10 / 3 Hz , 40 / 1.0 Hz , 40 / 1.5 Hz ) follow the same pattern and are documented in the Supplementary Material. They confirm that the practical envelope boundary is set by the combined low-cost stack rather than by the controller itself.

4.5. Direct Baseline Versus Enhanced Nussbaum Behaviour

Figure 9 is the main explanatory figure because it shows why the direct hardware transfer of the baseline NPID formulation was not sufficient for the tested current-driven actuator. The baseline run exhibits rapid accumulation of ζ , high internal command saturation, and a loss of practical control authority as the Nussbaum term approaches its critical region. The enhanced formulation run, by contrast, keeps the adaptation state in a safer operating band while preserving the overall Nussbaum-driven control structure.
In the archived baseline evidence, the first critical event occurs when ζ crosses the vicinity of π / 2 , where cos ( ζ ) is close to zero. At that point, the multiplicative effect of N ( ζ ) = ζ 2 cos ( ζ ) collapses, and the effective control action weakens drastically even though the position error may still be large. Once ζ moves further, the effective sign of the Nussbaum modulation can reverse, which is especially damaging on a current-limited actuator. This is the core physical reason why the baseline configuration recorded a mean absolute error of 10 . 476 and an internal command saturation ratio of 0.450 .

4.6. Critical-Region Zoom during Direct Baseline Degradation

The long-run comparison in Figure 9 shows the global contrast between the baseline and enhanced controllers, but the failure mechanism becomes much clearer when the first critical event is viewed locally. Figure 10 zooms into the time window centered on the baseline ζ π / 2 crossing. In this neighborhood, the baseline controller shows simultaneous collapse of useful Nussbaum modulation, growth in tracking error, and loss of current-command effectiveness. The enhanced controller, by contrast, stays away from this critical crossing and therefore preserves useful control authority.

4.7. Ablation Across Enhanced Nussbaum Variants

Figure 11 summarizes the progression from the initial usable enhanced Nussbaum configuration to the final manuscript run. The ablation shows that no single engineering addition was sufficient on its own. Instead, the final result emerged from a sequence of practical corrections: first making the controller move reliably, then reducing saturation, then improving low-speed behaviour via velocity-reference feedforward, and finally suppressing tail-region spikes.
This progression also reduces the risk of presenting the final controller as a one-off tuned curve. It shows a traceable path from direct baseline degradation to refined long-duration operation under the reported hardware constraints.
Two points should be stated plainly when reading Table 3, so that the contribution of each component is not overstated. First, the single largest improvement over the direct baseline is recovered once the basic deployment safeguards and low-speed velocity-reference feedforward are in place: mean absolute error falls from 10 . 476 (direct baseline) to 1 . 231 at the first enhanced configuration and to 1 . 156 once velocity-reference feedforward is added, while the internal command saturation ratio drops from 0.450 to 0.014 . The subsequent Nussbaum-specific regularization and structured tuning (soft ζ -leakage, tail-region damping, and the final parameter basin) then contribute a further, smaller, but consistent refinement to 1 . 054 mean error, with the clearest gains in the worst-case and stress metrics rather than in the average: the maximum absolute error improves from 9 . 081 to 6 . 530 ( 28 % ) and the internal command saturation ratio from 0.014 to 0.012 . The honest interpretation is therefore that deployment-layer engineering and velocity-reference feedforward account for most of the recovery of average tracking, whereas the adaptation-management terms primarily contain the long-horizon tail behaviour and bounded ζ -growth that the direct baseline could not sustain. Second, the comparisons in Table 3 are made within the NPID family; the present study does not include a matched non-adaptive classical PID (or PID-plus-velocity-reference-feedforward-without-Nussbaum) baseline on the same actuator. The ablation should accordingly be read as isolating the contribution of each addition relative to the direct baseline implementation, not as a claim of superiority over a well-tuned classical controller. A matched classical-PID reference under the identical current-command deployment layer and safety envelope is a clear and necessary item for the multi-joint continuation of this work.

4.8. Optuna Search Evidence and Valid-Trial Trade-Off Landscape

Figure 12 combines the readable valid-trial trade-off view with a compact summary of the full Optuna archive. The archive panel shows the objective-score progression across the 79 real-hardware trials, while the remaining panels focus on the valid-trial structure: accuracy–adaptation trade-offs, internal command saturation, late-window residual behaviour, and the normalized parameter fingerprints of the best-performing valid configurations. Scientifically, this combined view shows that the selected controller was not chosen from a single favourable run, but from a structured hardware search in which tracking accuracy, bounded adaptation growth, actuation limits, and long-window persistence were considered jointly. The figure supports the main methodological claim of the paper: hardware-aware tuning is part of the deployment evidence, not merely a curve-fitting step.
The practical lesson from the archive is that Optuna was not merely a convenience tool. It was the main mechanism that converted a controller with several tightly coupled nonlinear parameters into a reproducible real-hardware workflow. The search also exposed that short runs can be misleading: some candidates looked promising early but later failed in 120–300 s operation because the ζ -dynamics were still too aggressive. That is why the final manuscript run was validated at 300 s even after shorter trials had already identified attractive parameter regions.

4.9. Cycle-Level Residual Behaviour

The final run achieves low aggregate error, but its residual is not perfectly smooth. Figure 13 zooms into a clean late-cycle window from the final run to show the residual behaviour that still remains after tuning. The dominant residual error occurs near reversal regions, where low-speed friction, quantized feedback, and the non-ideal realization of very small current corrections remain coupled.
This is consistent with the design logic of the final enhanced NPID controller. The controller no longer fails through large-scale ζ -drift, but it still cannot completely remove the physical low-speed behaviour of the actuator under bounded current commands.

4.10. Step-Test Protocol and Real-Hardware Step Results

The same enhanced NPID controller was also evaluated using the project’s step-capable direct runner and step-aware metrics. Step sequences are scientifically complementary to the sinusoidal evidence because they separate instantaneous gain effects from the accumulated memory of the adaptation state ζ . Two step amplitudes were tested on Dynamixel ID 6, both starting from the 140 operating center: a 15 step (target 125 ) and a 40 step (target 100 ), both shaped with a short smoothstep ramp. Table 5 reports the measured step metrics. The post- 1.5 s and tail figures are reported separately to isolate the transient peak from the post-settling residual.
For both step amplitudes the controller reaches and holds the demanded target with sub-degree mean error and sub-half-degree tail error, indicating that the enhanced implementation also handles abrupt reference changes without releasing the adaptation state into the empirically problematic region observed in the direct baseline. The 40 step exhibits a larger transient peak error (Max  7 . 6 ) than the 15 step because the demanded acceleration is larger, but the post-settling behaviour remains tight in both cases.
Figure 14. Real-hardware 15 step ( 140 125 ) on Dynamixel ID 6, plotted with the same four-panel template as the sinusoidal runs. The position panel shows the smoothstep approach to the target, the error panel collapses inside ±P95 well before the settle window, and the adaptive states remain bounded throughout the transient.
Figure 14. Real-hardware 15 step ( 140 125 ) on Dynamixel ID 6, plotted with the same four-panel template as the sinusoidal runs. The position panel shows the smoothstep approach to the target, the error panel collapses inside ±P95 well before the settle window, and the adaptive states remain bounded throughout the transient.
Preprints 216736 g014
Figure 15. Real-hardware 40 step ( 140 100 ) on Dynamixel ID 6. The larger demand produces a larger transient current and a higher peak error than the 15 case, but the post-settling residual remains tight and ζ does not approach the π / 2 critical line.
Figure 15. Real-hardware 40 step ( 140 100 ) on Dynamixel ID 6. The larger demand produces a larger transient current and a higher peak error than the 15 case, but the post-settling residual remains tight and ζ does not approach the π / 2 critical line.
Preprints 216736 g015
Table 5. Real-hardware step-response metrics for the enhanced NPID implementation on Dynamixel ID 6. Both runs start at the 140 operating center; the 15 run targets 125 and the 40 run targets 100 . Post-1.5 s and tail metrics are restricted to the post-transient window.
Table 5. Real-hardware step-response metrics for the enhanced NPID implementation on Dynamixel ID 6. Both runs start at the 140 operating center; the 15 run targets 125 and the 40 run targets 100 . Post-1.5 s and tail metrics are restricted to the post-transient window.
Metric 15 step 40 step
Step amplitude (deg) 14.57 39.57
Final measured (deg) 125.07 100.02
Final error (deg) 0.07 0.02
MAE (deg) 0.569 0.560
P95 | e | (deg) 1.381 2.778
Max | e | (deg) 6.311 7.565
Post-1.5 s MAE (deg) 0.460 0.502
Post-1.5 s P95 (deg) 0.611 1.323
Tail MAE (deg) 0.171 0.113
Tail P95 (deg) 0.420 0.371

4.11. Final Parameter Set

Table 6. Final parameter set used for the headline 10 / 0.05 Hz 300 s run. The multi-amplitude/multi-frequency and step runs reported in Table 4 and Table 5 were re-tuned from this basin via additional Optuna passes; the parameters that vary across operating points are max_control, max_current_slew, current_bias_raw, γ / gamma_link, k_delta, qd_lpf_alpha, predict_horizon_sec, tail_kd, and the velocity-reference feedforward parameters stored in the code as fric_coulomb and fric_vel_scale, while the adaptive-core and RBF settings were held constant.
Table 6. Final parameter set used for the headline 10 / 0.05 Hz 300 s run. The multi-amplitude/multi-frequency and step runs reported in Table 4 and Table 5 were re-tuned from this basin via additional Optuna passes; the parameters that vary across operating points are max_control, max_current_slew, current_bias_raw, γ / gamma_link, k_delta, qd_lpf_alpha, predict_horizon_sec, tail_kd, and the velocity-reference feedforward parameters stored in the code as fric_coulomb and fric_vel_scale, while the adaptive-core and RBF settings were held constant.
Group Parameter Value
Paper core γ / gamma_link 1.1824623105
Paper core k Δ / k_delta 0.1336345470
Paper core ζ 0 0.8856929670
Adaptive core α 7.1072835468
Adaptive core Γ / gamma_adapt 8.7187500403
Adaptive core σ m / sigma_mod 0.2460708825
RBF Nodes 11
RBF Width 1.4631904539
RBF Center range [-3.2, 3.2]
Hardware-aware extension λ ζ / zeta_leak 0.0237735451
Hardware-aware extension ζ soft 0.9891853160
Hardware-aware extension tail_kd 0.0606430796
Velocity-reference feedforward k f / fric_coulomb 0.0089323247
Velocity-reference feedforward v f / fric_vel_scale 1.2725305725
Deployment max_control 0.0632
Deployment k I u / torque_to_current 210
Deployment command_sign -1
Deployment current_bias_raw -0.1296542137
Safety envelope max_current_raw 39
Safety envelope max_current_slew 10.1211443054
Safety envelope predict_horizon_sec 0.0056165844
Safety envelope qd_lpf_alpha 0.1383932134
Safety envelope integral_limit 1.6504936083
Safety envelope q_abs_guard_deg 35

5. Discussion

The most important scientific result of the paper is not simply that the final error became small. It is that the direct baseline and enhanced implementation runs explain why the real actuator behaves differently from the theoretical idealization. The direct baseline NPID implementation degraded in practice not because the source mathematics was contradicted, but because the adaptation state ζ accumulated under real-hardware non-idealities until the multiplicative effect of N ( ζ ) became physically weak in the tested actuator setting. Once current limits, low-speed friction, quantized sensing, and command-rate constraints are present, the direct transfer of the paper-level control law may not preserve the behaviour expected from the cleaner theoretical model.
This is where the enhanced NPID implementation becomes practically useful. The added ζ -leakage term does not remove the Nussbaum mechanism; it limits excessive growth of the adaptation state in the tested hardware setting. Likewise, the velocity-reference feedforward term offsets a specific low-speed actuator deficiency near reversals, while the tail damping term reduces local transient spikes that dominate the 95th-percentile error on long runs. For that reason, the enhanced controller should be read as a deployment-oriented regularization of the direct baseline implementation, not as a new Lyapunov-based replacement for the source controller.
The role of Optuna is equally important in the final interpretation. Several of the decisive parameters in Table 6 interact strongly. For example, more aggressive control magnitude can improve short-term tracking while simultaneously worsening saturation or accelerating ζ -growth. Likewise, a stronger leak can reduce long-duration ζ -growth but may weaken the adaptive effect if chosen too aggressively. It would have been easy to overfit one metric by manual trial and error. The Optuna workflow reduced that risk by making the selection pressure explicit and reproducible. In that sense, Optuna was not just a helper script; it was part of the paper’s methodology.
The remaining limitation is also clear from the figures. Even the final controller retains residual irregularity near reversal regions. This suggests that the dominant remaining bottleneck is not the gross Nussbaum adaptation logic but the fine low-speed behaviour of the actuator under bounded current commands. More extensive compensation of friction, backlash, or velocity quantization might reduce those residual spikes further, but such additions must be weighed against the desire to keep the controller close to the original NPID structure.
Viewed broadly, the paper argues for a particular research stance: when an adaptive controller is deployed on low-cost real hardware, the mapping layer, safety envelope, tuning method, and failure analysis should be reported as part of the scientific contribution. In this case, that reporting makes the difference between an attractive paper equation and a reproducible experimental controller.

5.1. Scope and Limitations

The reported evidence is concentrated on a single decoupled actuator and a fixed operating region, by design rather than by convenience: as detailed in Section 3, the distal wrist joint was selected as the controlled isolated test bed required to characterize deployment-layer degradation of the Nussbaum adaptation mechanism while reducing the dominant influence of multi-body coupling. Within that test bed the validation envelope already spans two reference families (sinusoidal and step) and two amplitudes ( 10 and 40 ) at frequencies up to 0.5 Hz , together with bandwidth-limit probes at 1.0 3 Hz . This is sufficient to substantiate the deployment-layer claims of the paper but, by construction, it does not yet establish multi-joint trajectory-tracking behaviour. The bandwidth-limit probes additionally show that, beyond roughly 0.5 Hz on this low-cost stack, the dominant limitation is the combined bandwidth of mechanics, current path, and velocity estimation rather than the Nussbaum adaptation logic itself.
The principal limitations of the present study follow directly from this design and are stated explicitly. (i) Single-run reporting. The quantitative results in Table 3, Table 4 and Table 5 are taken from the best validated run at each operating point rather than from an ensemble of repeated trials; no run-to-run variance, confidence interval, or statistical significance test is reported. The headline numbers should therefore be read as representative best-case real-hardware behaviour under the stated envelope, not as statistical means, and a programme of repeated matched trials with mean±standard-deviation reporting is required before stronger statistical claims can be made. (ii) Absence of a non-adaptive baseline. As noted in Section 4, the comparisons are internal to the NPID family; a matched classical PID and a PID-with-velocity-reference-feedforward reference under the identical deployment layer were not collected, so the paper does not establish whether the Nussbaum machinery outperforms a well-tuned conventional controller on this joint—only that the adaptive law can be deployed safely once its adaptation state is managed. (iii) Scope of the test bed. The evidence is confined to one decoupled distal-wrist actuator, a single 140 operating centre, and a 0.5 Hz tracking envelope; multi-joint coupling, payload variation, and disturbance rejection are out of scope by design. These three limitations are deliberate consequences of the controlled single-joint methodology adopted here; they bound the claims of the paper rather than undermining them.
Each limitation maps directly onto a concrete next step. On top of the secure single-joint foundation established here, the natural continuation is to carry the same controller, safety envelope, and Optuna scoring forward to whole-arm trajectory tracking, to collect repeated matched trials across the remaining NED3 Pro joints for statistical reporting, and to add the matched classical-PID and PID-plus-velocity-reference-feedforward references under the identical current-command deployment layer so that the specific contribution of the Nussbaum mechanism on real hardware can be quantified directly.

6. Conclusions

This paper presented a real-hardware deployment study of a Nussbaum-function PID controller commanded through direct current control on a low-cost manipulator. A direct implementation of the baseline NPID law was first reproduced and shown to degrade in the tested hardware setting through cumulative ζ -growth, weakening of effective Nussbaum modulation, and high internal command saturation. A hardware-oriented enhanced implementation was then evaluated by preserving the Nussbaum core while adding soft ζ -leakage, low-speed velocity-reference feedforward, and tail-region damping. On the decoupled distal-wrist test bed that this study deliberately adopted as its controlled experimental setting, the best reported 300 s enhanced run reduced the mean absolute error from 10 . 476 to 1 . 054 and the internal command saturation ratio from 0.450 to 0.012 relative to the direct baseline implementation, with a root-mean-square error of 1 . 283 and a 95th-percentile absolute error of 2 . 145 . The same enhanced implementation was further validated across a multi-amplitude and multi-frequency envelope (sinusoids at 10 and 40 for frequencies up to 0.5 Hz , plus 15 and 40 step responses), and the practical bandwidth limit of the combined low-cost stack was characterized at 1.0 3 Hz . The study also showed that Optuna-based real-hardware tuning was useful because it encoded tracking quality, internal command saturation, actuation activity, and adaptation-growth constraints into a reproducible search process.
The main conclusion is therefore limited but practical. NPID control can be transferred to a low-cost current-driven manipulator actuator only when the deployment layer, safety envelope, and adaptation management are treated explicitly. The enhanced implementation reported here should be interpreted as an experimentally validated hardware regularization under the stated actuator, trajectory, and safety constraints, not as a new general stability result. Future work follows directly from the limitations stated in Section 5: extending the same evidence pipeline to whole-arm, multi-joint trajectory tracking; collecting repeated matched trials for statistical (mean±standard-deviation) reporting; adding a matched classical-PID baseline under the identical current-command deployment layer; and releasing disturbance-rejection datasets that complement the step and sinusoidal evidence reported here.

Supplementary Materials

The following supporting information can be downloaded at the website of this paper posted on Preprints.org.

Author Contributions

Conceptualization, D.Z.M. and A.Z.; methodology, D.Z.M., O.T. and A.Z.; software, D.Z.M. and A.Z.; validation, D.Z.M. and A.Z.; formal analysis, D.Z.M. and A.Z.; investigation, D.Z.M. and A.Z.; data curation, D.Z.M. and A.Z.; writing-original draft preparation, D.Z.M. and A.Z.; writing-review and editing, D.Z.M. O.T. and A.Z.; supervision, A.Z.; visualization, D.Z.M. and A.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The controller source code, run commands, raw closed-loop CSV logs, Optuna trial archives, metric tables, and the figure-generation scripts in the scripts/ directory of the manuscript package (build_main_results_figures.py, build_envelope_figures.py, build_control_architecture_diagram.py) that support the findings of this study are openly available. The project landing page is hosted at https://danielz.co.uk/projects/hardware-aware-nussbaum-pid/, and the companion GitHub repository (manuscript source, figures, tables, and scripts) is at https://github.com/danialza/hardware-aware-nussbaum-pid. Additional archived failure/intermediate evidence and the extra bandwidth-limit probe are provided as Supplementary Material accompanying this article. Additional bulk data (raw CSV logs and Optuna trial archives) is available from the corresponding author on reasonable request.

Acknowledgments

The authors thank Dr. Hamed Rahimi Nohooji for technical discussions on the distinction between the original NPID controller and the hardware-oriented implementation studied in this paper. The listed authors are responsible for the hardware implementation, experiments, data analysis, and manuscript claims. The authors also acknowledge the local project archive that preserved the controller scripts, Optuna trial logs, run commands, and generated figures used to assemble this manuscript draft.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

NPID Nussbaum-PID
MAE Mean absolute error
P95 95th-percentile absolute error
PID Proportional–integral–derivative
RBF Radial basis function
RMSE Root-mean-square error
TPE Tree-structured Parzen estimator

References

  1. Abdelmaksoud, S.I.; Al-Mola, M.H.; Abro, G.E.M.; Asirvadam, V.S. In-Depth Review of Advanced Control Strategies and Cutting-Edge Trends in Robot Manipulators: Analyzing the Latest Developments and Techniques. IEEE Access 2024, 12, 47672–47701. [Google Scholar] [CrossRef]
  2. Tinoco, V.; Silva, M.F.; Santos, F.N.; Morais, R.; Magalhães, S.A.; Oliveira, P.M. A Review of Advanced Controller Methodologies for Robotic Manipulators. Int. J. Dyn. Control 2025, 13, 36. [Google Scholar] [CrossRef]
  3. Rahimi Nohooji, H.; Voos, H. Nussbaum Function Based PID Approach for Tracking Control of Robot Manipulators. In Proceedings of the 2024 32nd Mediterranean Conference on Control and Automation (MED), Chania, Crete, Greece, 2024; pp. 334–339. [Google Scholar] [CrossRef]
  4. Nussbaum, R.D. Some Remarks on a Conjecture in Parameter Adaptive Control. Syst. Control Lett. 1983, 3, 243–246. [Google Scholar] [CrossRef]
  5. Tran, D.T.; Dao, H.V.; Ahn, K.K. Adaptive Synchronization Sliding Mode Control for an Uncertain Dual-Arm Robot with Unknown Control Direction. Appl. Sci. 2023, 13, 7423. [Google Scholar] [CrossRef]
  6. Han, S.H.; Tran, M.S.; Tran, D.T. Adaptive Sliding Mode Control for a Robotic Manipulator with Unknown Friction and Unknown Control Direction. Appl. Sci. 2021, 11, 3919. [Google Scholar] [CrossRef]
  7. Akiba, T.; Sano, S.; Yanase, T.; Ohta, T.; Koyama, M. Optuna: A Next-Generation Hyperparameter Optimization Framework. In Proceedings of the Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 2019; pp. 2623–2631. [Google Scholar] [CrossRef]
  8. Rahimi Nohooji, H. Constrained Neural Adaptive PID Control for Robot Manipulators. J. Frankl. Inst. 2020, 357, 3907–3923. [Google Scholar] [CrossRef]
  9. Rahimi Nohooji, H.; Zaraki, A.; Voos, H. Actor–Critic Learning Based PID Control for Robotic Manipulators. Appl. Soft Comput. 2024, 151, 111153. [Google Scholar] [CrossRef]
  10. Nguyen, V.T.; Nguyen, Q.C.; Van, M.; Su, S.F.; Garg, H.; Duong, D.N.; Tan, P.X. Robust Adaptive Nonlinear PID Controller Using Radial Basis Function Neural Network for Ballbots with External Force. Eng. Sci. Technol. An. Int. J. 2025, 61, 101914. [Google Scholar] [CrossRef]
  11. Pan, C.; Huang, H.; Chen, C.; Wu, L.; Xiao, J. Neuro-adaptive command-filtered backstepping control of uncertain flexible-joint manipulators with input saturation via output. Sci. Rep. 2025, 15, 17254. [Google Scholar] [CrossRef]
  12. Liu, X.; Wang, L.; Yang, Y. Model-Free Adaptive Robust Control Based on TDE for Robot with Disturbance and Input Saturation. Robotica 2023, 41, 3426–3445. [Google Scholar] [CrossRef]
  13. Ahanda, J.J.B.M.; Mbede, J.B.; Melingui, A.; Zobo, B.E. Robust Adaptive Command Filtered Control of a Robotic Manipulator with Uncertain Dynamic and Joint Space Constraints. Robotica 2018, 36, 767–786. [Google Scholar] [CrossRef]
  14. Ai, W.; Jiang, Y.; Pan, X.; Zhang, Y.; Wang, H. Neural Network Control of Robotic Manipulators with Full-State Time-Varying Constraints and Composite Disturbance Observer. J. Frankl. Inst. 2025, 362, 108084. [Google Scholar] [CrossRef]
  15. Xia, Y.; Liu, Y.; Sun, W. Disturbance Observer-Based Full-State Constrained Control for Robotic Systems with Dead Zone. J. Frankl. Inst. 2023, 360, 14630–14644. [Google Scholar] [CrossRef]
  16. Deng, X.; Yuan, Y.; Wei, L.; Xu, B.; Tao, L. Adaptive Neural Tracking Control for Nonstrict-Feedback Nonlinear Systems with Unknown Control Gains via Dynamic Surface Control Method. Mathematics 2022, 10, 2419. [Google Scholar] [CrossRef]
  17. Wu, Y.; Wan, F.; Xu, T.; Fang, H. UDE-Based Task Space Tracking Control of Uncertain Robot Manipulator with Input Saturation and Output Constraint. Robotica 2022, 40, 3651–3668. [Google Scholar] [CrossRef]
  18. Berkenkamp, F.; Schoellig, A.P.; Krause, A. Safe controller optimization for quadrotors with Gaussian processes. In Proceedings of the 2016 IEEE international conference on robotics and automation (ICRA), 2016; pp. 491–496. [Google Scholar] [CrossRef]
  19. Coutinho, J.P.; Santos, L.O.; Reis, M.S. Bayesian Optimization for Automatic Tuning of Digital Multi-Loop PID Controllers. Comput. Chem. Eng. 2023, 173, 108211. [Google Scholar] [CrossRef]
  20. Fujimoto, Y.; Sato, H.; Nagahara, M. Controller Tuning with Bayesian Optimization and Its Acceleration: Concept and Experimental Validation. Asian J. Control 2023, 25, 2408–2414. [Google Scholar] [CrossRef]
  21. Nobar, M.; Keller, J.; Rupenyan, A.; Khosravi, M.; Lygeros, J. Guided Bayesian Optimization: Data-Efficient Controller Tuning with Digital Twin. IEEE Trans. Autom. Sci. Eng. 2024. [Google Scholar] [CrossRef]
  22. Stenger, D.; Scheurenberg, D.; Vallery, H.; Trimpe, S. Early Stopping Bayesian Optimization for Controller Tuning. Proc. 2024 IEEE 63rd Conf. Decis. Control (CDC) 2024, 3747–3753. [Google Scholar] [CrossRef]
  23. Van Niekerk, J.; Le Roux, J.D.; Craig, I.K. On-Line Automatic Controller Tuning Using Bayesian Optimisation: A Bulk Tailings Treatment Plant Case Study. IFAC-PapersOnLine 2022, 55, 126–131. [Google Scholar] [CrossRef]
  24. Song, Z.; Huang, Y. Review of intelligent motor controller parameter self-tuning technology. Electronics 2025, 14, 2229. [Google Scholar] [CrossRef]
Figure 2. The real-hardware platform used in the study. an annotated distal actuator map showing the J4–J6 chain and the DYNAMIXEL IDs, including the tested ID 6/J5 actuator. Niryo NED3 Pro manipulator used for the validation experiments.
Figure 2. The real-hardware platform used in the study. an annotated distal actuator map showing the J4–J6 chain and the DYNAMIXEL IDs, including the tested ID 6/J5 actuator. Niryo NED3 Pro manipulator used for the validation experiments.
Preprints 216736 g002
Figure 3. Closed-loop block diagram of the hardware-aware NPID architecture. The main chain runs from the locked-centre sinusoidal reference q d through error shaping ( Ψ ), the adaptive Nussbaum mechanism (six sub-blocks: filtered error Ψ , RBF regressor ϕ ( χ ) , ψ ^ adaptation, ζ update law, Nussbaum gain N ( ζ ) , and pure adaptive law u pure ), the summing junction ( u pp ), the current mapping and safety guards ( I cmd ), and the Dynamixel actuator in Mode 0 current loop, with the measured state ( q , q ˙ ) fed back.
Figure 3. Closed-loop block diagram of the hardware-aware NPID architecture. The main chain runs from the locked-centre sinusoidal reference q d through error shaping ( Ψ ), the adaptive Nussbaum mechanism (six sub-blocks: filtered error Ψ , RBF regressor ϕ ( χ ) , ψ ^ adaptation, ζ update law, Nussbaum gain N ( ζ ) , and pure adaptive law u pure ), the summing junction ( u pp ), the current mapping and safety guards ( I cmd ), and the Dynamixel actuator in Mode 0 current loop, with the measured state ( q , q ˙ ) fed back.
Preprints 216736 g003
Figure 4. Headline configuration: 10 amplitude at 0.05 Hz on Dynamixel ID 6, 300 s validation. Four-panel layout: position, tracking error with ±P95 lines, commanded and measured current with safety rails, and adaptive states ζ , ψ ^ against ζ 0 and π / 2 .
Figure 4. Headline configuration: 10 amplitude at 0.05 Hz on Dynamixel ID 6, 300 s validation. Four-panel layout: position, tracking error with ±P95 lines, commanded and measured current with safety rails, and adaptive states ζ , ψ ^ against ζ 0 and π / 2 .
Preprints 216736 g004
Figure 5. 10 amplitude at 0.5 Hz . Bounded and practically usable tracking with near-unity amplitude ratio; the higher reversal rate raises the internal command saturation ratio relative to the headline run, visible in the current panel.
Figure 5. 10 amplitude at 0.5 Hz . Bounded and practically usable tracking with near-unity amplitude ratio; the higher reversal rate raises the internal command saturation ratio relative to the headline run, visible in the current panel.
Preprints 216736 g005
Figure 6. 40 amplitude at 0.05 Hz : best validated long-horizon 300 s run at the larger amplitude. Tracking stays in phase with the reference and ζ remains well below π / 2 for the full validation window.
Figure 6. 40 amplitude at 0.05 Hz : best validated long-horizon 300 s run at the larger amplitude. Tracking stays in phase with the reference and ζ remains well below π / 2 for the full validation window.
Preprints 216736 g006
Figure 7. 40 amplitude at 0.5 Hz : best short-window tracking at the high-amplitude/high-rate corner. The current panel shows the larger commanded effort and the error panel shows the broader residual envelope; no trustworthy long-horizon configuration was reached within the search budget.
Figure 7. 40 amplitude at 0.5 Hz : best short-window tracking at the high-amplitude/high-rate corner. The current panel shows the larger commanded effort and the error panel shows the broader residual envelope; no trustworthy long-horizon configuration was reached within the search budget.
Preprints 216736 g007
Figure 8. Representative bandwidth-limit probe at 10 / 1.5 Hz on Dynamixel ID 6, rendered in the same four-panel template as the in-envelope runs. The response is bounded but out-of-phase with the reference and the command sits at the internal max_control clamp for the majority of the run.
Figure 8. Representative bandwidth-limit probe at 10 / 1.5 Hz on Dynamixel ID 6, rendered in the same four-panel template as the in-envelope runs. The response is bounded but out-of-phase with the reference and the command sits at the internal max_control clamp for the majority of the run.
Preprints 216736 g008
Figure 9. Direct baseline versus enhanced NPID comparison. The direct baseline implementation experiences rapid ζ -growth and severe loss of practical control quality, whereas the enhanced implementation retains the Nussbaum core while keeping the adaptation state away from the empirically problematic real-hardware region.
Figure 9. Direct baseline versus enhanced NPID comparison. The direct baseline implementation experiences rapid ζ -growth and severe loss of practical control quality, whereas the enhanced implementation retains the Nussbaum core while keeping the adaptation state away from the empirically problematic real-hardware region.
Preprints 216736 g009
Figure 10. Critical-region zoom centered on the direct baseline ζ π / 2 event. The direct baseline run undergoes simultaneous weakening of N ( ζ ) , loss of effective current action, and growth in tracking error, whereas the enhanced run remains outside the observed critical region.
Figure 10. Critical-region zoom centered on the direct baseline ζ π / 2 event. The direct baseline run undergoes simultaneous weakening of N ( ζ ) , loss of effective current action, and growth in tracking error, whereas the enhanced run remains outside the observed critical region.
Preprints 216736 g010
Figure 11. Ablation across archived Nussbaum variants. The progression shows that the enhanced-design regularization and tuning were cumulative rather than cosmetic: error and saturation both fell substantially from the baseline NPID run to the final 300 s result.
Figure 11. Ablation across archived Nussbaum variants. The progression shows that the enhanced-design regularization and tuning were cumulative rather than cosmetic: error and saturation both fell substantially from the baseline NPID run to the final 300 s result.
Preprints 216736 g011
Figure 12. Optuna valid-trial trade-off landscape with a compact archive summary. Panel (a) shows the objective-score progression across the full 79-trial real-hardware archive, including the best-so-far trend. The remaining panels focus on the valid-trial subset: accuracy–adaptation trade-offs, internal command saturation, late-window residual behaviour, and normalized parameter fingerprints of the top-performing valid configurations. The merged figure preserves the readable visual style of the original valid-trial analysis while adding the minimum archive-level evidence needed to show that the final controller was selected from a structured hardware search rather than from a single favourable run.
Figure 12. Optuna valid-trial trade-off landscape with a compact archive summary. Panel (a) shows the objective-score progression across the full 79-trial real-hardware archive, including the best-so-far trend. The remaining panels focus on the valid-trial subset: accuracy–adaptation trade-offs, internal command saturation, late-window residual behaviour, and normalized parameter fingerprints of the top-performing valid configurations. The merged figure preserves the readable visual style of the original valid-trial analysis while adding the minimum archive-level evidence needed to show that the final controller was selected from a structured hardware search rather than from a single favourable run.
Preprints 216736 g012
Figure 13. Cycle-level close-up from the final 300 s validation run. Residual error remains concentrated near reversal regions, indicating that the remaining limitation is primarily low-speed real-actuator behaviour rather than a collapse of the overall control law.
Figure 13. Cycle-level close-up from the final 300 s validation run. Residual error remains concentrated near reversal regions, indicating that the remaining limitation is primarily low-speed real-actuator behaviour rather than a collapse of the overall control law.
Preprints 216736 g013
Table 2. Summary of the Optuna tuning effort used to select the manuscript controller. The 79-trial physical archive is the headline 10 / 0.05 Hz campaign from which the parameter basin and the final 300 s configuration in Table 6 were selected; the additional envelope and step Optuna passes used to retune the operating points reported in Table 4 and Table 5 are listed separately.
Table 2. Summary of the Optuna tuning effort used to select the manuscript controller. The 79-trial physical archive is the headline 10 / 0.05 Hz campaign from which the parameter basin and the final 300 s configuration in Table 6 were selected; the additional envelope and step Optuna passes used to retune the operating points reported in Table 4 and Table 5 are listed separately.
Archive component Trials Valid Closed-loop time Best score
Headline 10 / 0.05 Hz Optuna archive 79 61 87.9 min 7.129
Role in selection: expose a feasible parameter basin under real actuator constraints.
Envelope and step Optuna passes (supporting) several hundred
Table 3. Selected Nussbaum run metrics used in the paper. Lower values are better for error and saturation.
Table 3. Selected Nussbaum run metrics used in the paper. Lower values are better for error and saturation.
Run MAE (deg) RMSE (deg) P95 (deg) Max (deg) Internal sat. ratio Δ ζ
Baseline NPID 10.476 15.367 31.709 34.785 0.450 0.729
First enhanced Nussbaum result 1.231 1.513 2.521 8.693 0.054 0.339
Velocity-reference-feedforward baseline 1.156 1.426 2.282 9.081 0.014 0.173
Intermediate refined variant 1.121 1.333 2.202 6.753 0.015 0.208
Final manuscript run 1.054 1.283 2.145 6.530 0.012 0.194
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2026 MDPI (Basel, Switzerland) unless otherwise stated