Manuscript Offprint
arXiv:2611.01220Differentiable Iterative Learning Control for Black-Box Position-Commanded Manipulators
Mohammed Al-Ghaili, Yakoop Qasim, and Hassan Almubarak
Abstract—High-accuracy repetitive tracking is challenging for position-commanded manipulators whose low-level controllers are inaccessible, while constrained model-based iterative learning control (ILC) can require substantial manual parameter tuning. We present Differentiable Iterative Learning Control (Diff-ILC), an online bilevel framework that adapts the parameters of a constrained ILC update between physical robot executions. A closed-loop differential model is identified once from paired smooth perturbations and subsequently kept fixed. At each trial, a constrained quadratic program computes a feasible command correction, while a real-anchored next-trial prediction defines a task-level objective. Hypergradients are obtained by implicitly differentiating the locally active KKT system, enabling multiple computational parameter updates without additional robot executions. Experiments on a 6-DoF DOBOT CR3 across unseen planar and three-dimensional trajectories show substantially faster physical-trial convergence than fixed-parameter model-based ILC. Across the four primary trajectories, after only two trial-to-trial updates, Diff-ILC achieves 78.8% and 76.4% lower mean joint-vector and Cartesian RMSE, respectively, than fixed-parameter model-based ILC.
I. INTRODUCTION
Iterative learning control (ILC) is well suited to finite-duration repetitive tasks because it improves the command applied on subsequent trials using tracking information from previous executions [1, 2, 3, 4]. This is particularly attractive for commercial robotic manipulators, which often expose joint-position command interfaces while keeping their embedded controllers and actuator-level dynamics inaccessible. In this setting, tracking performance can be improved between repetitions without modifying the internal feedback controller or requiring torque-level robot models [5].
Optimization-based ILC computes the trial-to-trial correction over the complete trajectory horizon and can directly incorporate tracking objectives, regularization, and motion constraints. Constrained ILC has been formulated as a finite-dimensional quadratic program [6], while data-driven norm-optimal formulations have incorporated experimentally estimated input-output behavior together with actuator limits [7]. Such methods can provide substantial tracking improvement, but their performance depends strongly on parameters that balance tracking-error reduction, correction magnitude, temporal smoothness, and admissible trial-to-trial modification.
Reducing this tuning burden has therefore received considerable attention. Parameter optimization, adaptive learning, and data-driven model updates have been studied in ILC [8, 1, 2,

Fig. 1. Diff-ILC combines constrained model-based ILC with implicit differentiation through the locally active KKT system to adapt ILC parameters between physical robot executions. This online adaptation accelerates tracking-error reduction over the first few repetitions on the DOBOT CR3.
3], while more recent work has explored self-parametrization for data-driven ILC [9] and evolutionary gain adaptation for industrial robot tracking [10]. However, parameter adaptation is more challenging in constrained optimization-based ILC because the parameters affect the solution of the finite-horizon optimization problem itself. Regularization and smoothness weights modify the objective, while a correction bound can alter the active constraint set. Task-level adaptation therefore requires sensitivities through the constrained optimal solution.
Differentiable optimization provides a systematic mechanism for obtaining such sensitivities. OptNet and differentiable convex optimization layers established general approaches for differentiating through parameterized constrained optimization problems [11, 12], while differentiable MPC propagated gradients through optimal-control solutions [13]. More recent methods such as DiffTune, DiffTune-MPC, and differentiable robust MPC use these sensitivities for controller adaptation [14, 15, 16]. The repetitive-learning setting considered here introduces an additional challenge: each new plant evaluation requires execution of the complete physical trajectory, the closed-loop robot dynamics are unavailable, and the parameters to be adapted enter both the objective and active constraints of the ILC problem.
To address these challenges, we introduce Differentiable Iterative Learning Control (Diff-ILC), an online bilevel framework for constrained model-based ILC on black-box
M. Al-Ghaili, Y. Qasim, and H. Almubarak are with the Control & Instrumentation Engineering Department, KFUPM, Dhahran, Saudi Arabia. Email: {g202424100, g202423660, halmubarak}@kfupm.edu.sa Project website: https://cortx-lab.github.io/projects/differentiable-ilc/.
position-commanded manipulators. As illustrated in Fig. 1, a closed-loop data-driven differential model is developed once from paired smooth perturbations and subsequently kept fixed. At each physical trial, a constrained quadratic program computes a feasible command correction from the latest measured tracking error. A real-anchored next-trial prediction then evaluates the resulting joint- and Cartesian-space tracking performance together with command smoothness. The task-level objective is differentiated through the locally active Karush–Kuhn–Tucker (KKT) system of the inner ILC problem, allowing multiple computational updates of the joint-specific regularization and smoothness parameters and the shared correction bound between physical robot executions.
The main contributions of this work are:
• We develop a data-driven closed-loop differential model for command-level constrained ILC on position-commanded manipulators with inaccessible internal servo dynamics. The model is identified once from paired physical perturbations and used across subsequent trajectory geometries and execution conditions.
• We formulate the constrained ILC update as a differentiable optimization layer and introduce a bilevel adaptation scheme for joint-specific correction, temporal-variation, and curvature penalties together with a shared trial-to-trial correction bound. A real-anchored task-level objective is differentiated through the locally active KKT system using an adjoint formulation, enabling multiple parameter updates without additional physical executions.
• We validate Diff-ILC experimentally on a 6-DoF DOBOT CR3 across unseen planar and three-dimensional trajectories and an additional faster execution condition. Using the same identified differential model, tracking metric, initial command, and physical motion constraints, Diff-ILC achieves substantially faster tracking-error reduction over the first few physical repetitions than fixed-parameter constrained model-based ILC.
A. Repeated Trajectory Tracking
Consider an -joint manipulator that repeatedly executes a finite-duration trajectory over the discrete-time horizon . The robot exposes a joint-position command interface while its internal controllers and low-level dynamics are unavailable to the user, which is a common setting for industrial manipulators. We therefore treat the complete closed-loop robot as an unknown trajectory-to-trajectory map
where denotes the unknown closed-loop mapping, and denote the commanded and measured joint trajectories at trial , respectively.
Let denote the desired joint trajectory. After trial , the measured tracking error is defined as
Iterative learning control (ILC) modifies the feedforward command between repetitions according to
where is a finite-horizon command correction computed from the information available after trial j. Unlike torque-controlled formulations, no model of the manipulator rigid-body dynamics or internal servo controller is assumed to be available. The learning controller instead relies on commanded trajectories, measured robot motion, and a data-driven approximation of the local closed-loop command-to-output response.
Each updated command must remain executable by the position-controlled robot. Let and denote first- and second-order finite-difference operators over the trajectory horizon. We require
where h is the sampling period, and the bounds are applied joint-wise. A trial-to-trial correction bound may additionally be imposed as
B. Learning Control Objective
We consider a family of repetitive finite-duration motion tasks in which each task is specified by a desired trajectory and may differ in path geometry, execution speed, or operating condition. For a given task, the robot executes the same desired motion repeatedly, and the commanded trajectory may be modified only between successive executions.
The objective is to design a trial-to-trial learning law that achieves high-accuracy tracking while satisfying the command and motion constraints defined above. In particular, the learning controller should determine a correction after each physical execution such that the measured trajectory progressively approaches the desired trajectory while maintaining feasible and sufficiently smooth commanded motion.
We express the trial-to-trial correction through the general learning law
where denotes the ILC update policy, and collects the design parameters governing its behavior at trial j. These parameters determine how the learning law balances aggressive tracking-error reduction against the magnitude and smoothness of the command correction.
A central consideration is the number of physical repetitions required to achieve accurate tracking. Unlike an optimization performed entirely in simulation, every ILC iteration requires execution of the complete trajectory on the physical robot. Slow learning therefore increases experimental time, robot utilization, and the number of inaccurate motions executed before satisfactory tracking is achieved. The relevant objective is consequently not only low asymptotic tracking error but also rapid improvement within the first few physical repetitions.
The parameters that provide an effective balance between tracking improvement, command regularization, and trajectory smoothness may also depend on the trajectory geometry, execution speed, and operating condition. Manually returning these parameters for each new repetitive motion can require additional physical experimentation and limits the practical scalability of model-based ILC.
The problem addressed in this work can therefore be stated as follows. Given a position-commanded manipulator with inaccessible closed-loop dynamics and a repetitive finite-horizon motion task, design an update law of the form (8) that generates feasible command corrections and drives the measured trajectory toward the desired trajectory in as few physical repetitions as possible. The learning law should remain effective across different trajectory geometries and execution speeds while automatically adapting the parameters governing the ILC update, rather than requiring trajectory-specific manual retuning.
To this end, the next section develops a compact data-driven differential model of that predicts how changes in the commanded trajectory affect the measured robot motion. This model is subsequently used in the constrained ILC update and its differentiable outer-level parameter adaptation.
III. CLOSED-LOOP DIFFERENTIAL MODEL IDENTIFICATION
Data-driven and local identified models are used in the literature to construct enhanced ILC updates for systems with uncertain or inaccessible dynamics [5, 17]. Here, we identify the closed-loop differential response required specifically by the constrained command-level ILC update.
The constrained ILC update requires a prediction of how a trial-to-trial change in the commanded trajectory affects the measured robot motion. Since the measured trajectory is already available after trial , an accurate prediction of the absolute closed-loop response is not necessary. Instead, we seek a differential model that predicts the change in the measured trajectory resulting from a command correction
The next-trial motion can then be predicted by anchoring the differential response at the measured trajectory from the current physical trial.
We approximate the closed-loop command-to-motion behavior by the discrete-time affine model
where are the commanded and measured joint positions, are full matrices and is a constant offset. The full matrices allow the model to capture cross-joint coupling, while the delayed command term allows for one-sample memory in the closed-loop command response.
Rather than identifying the affine model directly from absolute command and measurement data, we identify its differential response around a nominal trajectory . Smooth excitation trajectories are commonly used in robot identification to obtain informative data while respecting motion constraints, with B-spline parameterizations providing a convenient means of generating smooth and bounded joint motions [18]. More specifically, we construct smooth multi-joint perturbation directions using a B-spline basis and execute each direction symmetrically about the nominal trajectory.
. From the corresponding measured trajectories and , the differential command and response are constructed:
The symmetric construction cancels the common nominal response and the affine offset d. Subtracting the paired instances of (10) therefore gives
which directly models the local command-to-motion response required by the ILC update.
For each perturbation direction and time sample, define
Stacking the regressors and corresponding next-sample differential outputs as columns of and , respectively, the model matrices are estimated jointly using ridge regression
where is the regularization parameter. Notice that the affine offset d does not need to be estimated since it vanishes in the differential representation.
Given a candidate command correction , the identified model predicts the corresponding change in measured motion according to
with . The predicted next-trial trajectory is
Thus, the identified model predicts only the change induced by the candidate command correction, while the trajectory prediction is re-anchored at the measured robot motion after every physical trial.
The differential model is identified once prior to the ILC experiments and subsequently kept fixed. No model reidentification is performed during the trial-to-trial learning process. As shown later in the experiments, this single compact model is sufficient to support effective constrained model-based ILC across the considered repetitive motion tasks and operating conditions.
IV. DIFFERENTIABLE CONSTRAINED ITERATIVE LEARNING CONTROL
A. Constrained Model-Based ILC
At trial , the measured trajectory and tracking error are available from the physical execution of the robot. Using the differential model developed in Section III, we seek a command correction whose predicted motion change reduces the measured tracking error while maintaining a smooth and feasible command trajectory.
For the optimization formulation, let , and denote the time-major stacked forms of , and , respectively, with subscript denoting the corresponding time-step block. Let and denote the first- and second-order finite-difference operators over the trajectory horizon.

Fig. 2. Computational graph of Diff-ILC at physical trial . The measured trajectory anchors the constrained ILC update and real-anchored next-trial prediction, while hypergradients through the locally active KKT system update the ILC parameters over multiple computational epochs. After the final outer update, the inner QP is re-solved using , and only the resulting updated command is executed on the robot at trial .
Define the normalization constants , , , and . Then, the constrained model-based ILC update is formulated as
s.t.
where the joint-wise limits are understood to be repeated over the trajectory horizon and . The quadratic terms are normalized according to the trajectory horizon and the corresponding finite-difference order, reducing the dependence of their relative weighting on the horizon length.
The first term in the objective in (15) penalizes the predicted residual tracking error . The remaining terms regularize the magnitude, temporal variation, and curvature of the command correction, respectively. Together with the physical constraints in (15), these terms determine the aggressiveness and smoothness of the learning update.
The weighting matrices are constructed from joint-specific regularization parameters. Let , and and define their horizon extensions as , , , where denotes the Kronecker product. Similarly, for a fixed joint-space tracking metric , we define .
We keep the tracking metric Q fixed and adapt the regularization and correction parameters. This removes the common scale ambiguity that would arise from jointly scaling all quadratic weights while retaining the relative trade-off between tracking improvement, correction magnitude, and tem-
poral smoothness. The parameters governing the ILC update are therefore collected as
For a fixed , the optimization problem in (15) defines a conventional constrained model-based ILC update, i.e. the QP realizes the parameterized learning law in (8), with . The command applied on the following physical trial is .
For the subsequent sensitivity analysis, we write (15) in standard quadratic-program form. Define . Then the constrained ILC update can be expressed as
where and
where denotes block-diagonal assembly. The matrix encodes the differential dynamics and command constraints, with corresponding bounds and . The parameters , , and enter , whereas enters the bounds. Retaining both and as decision variables preserves the sparse finite-horizon structure induced by the differential dynamics, whereas eliminating would result in a condensed QP in with generally dense quadratic terms. Following [9], we refer to this data-driven formulation as model-based ILC. The next subsection treats as learnable and adapts it between physical trials.
B. Bilevel Parameter Adaptation
The correction quality depends on the regularization parameters and correction limit, which balance predicted tracking improvement against correction magnitude, temporal variation, and curvature. We therefore adapt these parameters at the outer level based on the solution of the inner ILC problem. Fig. 2 summarizes the resulting trial-level computational graph, including the real-anchored prediction, outer parameter update, and subsequent physical execution.
For a fixed parameter vector , the inner solution predicts the joint trajectory on the next trial as
Consequently, the predicted joint-space tracking error is
It is worth noting that (19) is anchored at the measured trajectory obtained from the current physical execution. The identified model is used only to predict the incremental effect of the candidate ILC correction rather than to generate an absolute rollout of the robot motion. A new physical measurement re-anchors this prediction after every ILC trial.
Although the inner problem is formulated in joint space, the tracking performance can also be evaluated directly in Cartesian task space. Let denote a differentiable forward-kinematics map, and let denote the desired Cartesian reference at time step . The Cartesian trajectory predicted by the differential model is obtained by applying forward kinematics to the predicted joint trajectory. Hence, the predicted Cartesian tracking error is
Stacking these errors over the trajectory horizon gives
Since contains the joint-wise acceleration limits, we define the horizon-level normalization matrix , where the reciprocal is applied elementwise. For the Cartesian tracking term, define the normalization constant . The outer objective evaluates whether the correction generated by the inner problem is desirable from the perspective of the next physical trial. We define
where , , and are fixed outer-level weights. The first term evaluates the predicted next-trial tracking error in joint space, while the second evaluates the same predicted correction in Cartesian task space. The final term discourages unnecessary approach to the acceleration limits and promotes a smooth updated command trajectory. The outer weights define the task-level evaluation criterion and are kept fixed; they are not included in the learnable parameter vector .
The resulting parameter-learning problem is bilevel because the outer objective depends on the solution of the constrained inner problem
subject to solves the inner QP in (17)
where denotes the admissible set of ILC parameters defined in Section IV-D. During the outer optimization, the measured
trial data and are held fixed. Only the parameters governing the correction to be applied on the next physical trial are adapted.
C. Implicit Differentiation Through Constrained ILC Update
The outer objective depends on through the optimizer . Rather than differentiating through the iterations of a particular numerical QP solver, we differentiate the local optimality conditions that characterize the constrained ILC solution.
To first compute the gradient of the outer objective with respect to the primal QP variables, define the block-diagonal forward-kinematics Jacobian
where . The gradient of the outer loss with respect to the inner solution is then
with and . These expressions show explicitly how the joint-space, Cartesian-space, and command-smoothness criteria propagate to the variables of the constrained ILC problem.
Let contain all equality constraints and all inequality constraints that are active at . The locally active constraints can be written as , where contains the corresponding equality values and active lower or upper bounds. The Lagrangian associated with the locally active QP is
The corresponding KKT conditions are
Consider a scalar parameter contained in . During the outer update, the measured trial data are fixed, and therefore and do not depend on . In a neighborhood where the active set remains unchanged, differentiating (27)–(28) gives
The sensitivity analysis is local. We assume that the active set remains unchanged in a neighborhood of the current solution and that the active constraints satisfy the linear-independence constraint qualification, with a nonsingular local KKT system. Under these standard regularity conditions, the constrained optimizer defines a locally differentiable solution map.
Computing (29) separately for every component of would require one KKT solve per parameter. We instead introduce the primal and active-constraint adjoints p and s through
The adjoint system involves the same symmetric KKT matrix as the forward sensitivity problem. The hypergradient of the outer objective with respect to any scalar parameter is therefore
Thus, a single adjoint KKT solve provides the quantities required to evaluate the hypergradients of all learnable ILC parameters.
To make this dependence explicit, partition and define , where is the th standard basis vector in . The joint-specific regularization gradients are
The correction limit enters through the constraint bounds rather than the QP Hessian. Let and denote the active upper and lower correction-bound rows, respectively. Its hypergradient is
When no correction-bound row is active, the local derivative with respect to is zero.
D. Constrained Parameterization and Trial-Level Learning
The learnable parameters must remain within their admissible ranges during the outer optimization. We therefore optimize unconstrained raw parameters and map them to valid ILC parameters through differentiable transformations.
For each positive regularization parameter , let denote its corresponding raw parameter and define , where is a prescribed lower bound. The shared correction limit is constrained to a prescribed interval by . Here, denotes the logistic sigmoid, and the transformations collectively define . The hypergradients are propagated through by the chain rule, and the raw parameters are updated using Adam. At each nonterminal physical trial, the measured trajectory is held fixed while outer epochs update the parameters computationally. The inner QP is then re-solved with the final parameters, and only the resulting correction is applied on the next physical trial, where is the trajectory form of . Algorithm 1 summarizes the complete procedure.
V. EXPERIMENTATION AND RESULTS
A. Experimental Setup
Experiments were conducted on a 6-DoF DOBOT CR3 using only its joint-position command interface. The ILC experiments operated at 100 Hz. For model identification, data were acquired at 125 Hz and resampled to the control grid. Three nominal executions and six symmetric smooth multi-joint perturbation directions were collected about a 0.05 Hz
Algorithm 1 Differentiable Iterative Learning Control
Input: Reference trajectory ; identified differential model ; feasible initial command ; initial raw parameters ; number of physical trials ; number of outer epochs
Return: Learned command and parameters
1: for do
2: Execute on the robot, measure , and compute
3: if then
4:
5: for do
6:
7: Solve the inner QP (17) for
8: Evaluate the outer loss (22) and compute
9: Determine the local active set
10: Solve the adjoint KKT system (30)
11: Evaluate using (31)–(35)
12: Propagate the hypergradient through
13: Update using Adam
14: end for
15:
16: Re-solve (17) using
17:
18:
19: end if
20: end for
21:
22: return
joint-space sinusoidal trajectory, resulting in 15 physical trials. The perturbations were generated using 10 B-spline basis functions and bounded by in position, in velocity, and in acceleration. The matrices were estimated using ridge regression with and then kept fixed throughout all ILC experiments; no re-identification was performed for different trajectories or execution speeds.
Each ILC experiment comprised 10 physical trials. The fixed-parameter constrained model-based ILC baseline used for all six joints and . Diff-ILC was initialized with the same regularization parameters, but with , which was adapted within . The regularization parameters remained positive through the soft-plus parameterization. Both methods used the same differential model, tracking metric , initial command, and joint-position, velocity, and acceleration constraints. Joint positions were limited to for Joints 1, 2, 4, 5, and 6 and to for Joint 3; command velocity and acceleration were limited to and , respectively. Two Diff-ILC configurations were evaluated using five and ten outer optimization epochs between physical executions.
The inner QP was solved using OSQP [19], and the adjoint KKT system was solved using MINRES [20]. The losses, forward kinematics, and parameter transformations were implemented in double-precision PyTorch, and the raw parameters were updated using Adam with learning rate 0.2. The outer-loss weights were fixed at , , and . The adjoint hypergradient was verified against finite differences for all 19 learnable parameters at multiple physical trials. Close agreement was obtained whenever the local active set remained unchanged.
The evaluation used unseen planar circle, infinity, and star trajectories and a three-dimensional helix. The circle and helix had radius 150 mm, with a helix pitch of 50 mm. The infinity trajectory had width 400 mm and height 150 mm,

Fig. 3. Joint and Cartesian tracking convergence over the first five physical trials for the four 0.1 Hz evaluation trajectories using fixed-parameter model-based ILC and Diff-ILC with five and ten outer optimization epochs between physical executions.
while the star had outer radius 150 mm and inner-to-outer radius ratio 0.382. Cartesian paths were converted to joint-space references using inverse kinematics with fixed end-effector orientation and then smoothed. The four primary trajectories were executed at 0.1 Hz for samples, corresponding to approximately 20 s. An additional circle was executed at 0.15 Hz to evaluate transfer to faster motion. All applied commands satisfied the prescribed constraints within the numerical feasibility tolerance of the QP solver. Tracking performance is evaluated using the RMS over time of the joint-error norm, , and analogously the Cartesian position-error norm.
A supplementary video demonstrating the robot experiments and tracking results is available at https://www.youtube.com/watch?v=Jrib0FHbBd4.
B. Tracking Convergence
As shown in Fig. 3, all methods improve tracking across the four unseen trajectories. The average joint/Cartesian RMSE decreases from mm at Trial 1 to mm for fixed-parameter model-based ILC by Trial 3.
Over the same trials, Diff-ILC reaches mm with five epochs and mm with ten epochs; the latter corresponds to 78.8% and 76.4% lower joint and Cartesian RMSE, respectively, than the fixed baseline. By Trial 5, both Diff-ILC configurations achieve approximately mm. Notably, by Trial 3, after only two trial-to-trial updates Diff-ILC already achieves lower mean error than the fixed-parameter baseline does by Trial 5, directly demonstrating the gain in physical-trial efficiency.
Increasing the number of outer epochs can improve early physical-trial convergence, but at higher computational cost. The ten-epoch configuration performs best at Trial 3, whereas by Trial 5 the five- and ten-epoch configurations achieve similar performance, with five epochs marginally better for the helix and infinity trajectories. Because all outer epochs optimize the same real-anchored next-trial surrogate constructed from the fixed identified differential model, additional optimization can improve the predicted update without necessarily yielding proportional improvement on the subsequent physical trial under model mismatch. Re-anchoring the prediction at the measured trajectory after every physical execution prevents such mismatch from accumulating across trials.
TABLE I
JOINT-VECTOR AND CARTESIAN TRACKING PERFORMANCE AT SELECTED PHYSICAL TRIALS. ENTRIES REPORT THE MEAN JOINT-VECTOR RMS ( )/CARTESIAN POSITION RMS (MM) OVER THREE REPEATED EXPERIMENTS. THE PENULTIMATE COLUMN REPORTS THE TRIAL PAIR AT WHICH FIXED MB-ILC REACHES THE 5% CRITERION RELATIVE TO DIFF-ILC FOR BOTH JOINT AND CARTESIAN RMS ERRORS; THE FINAL COLUMN GIVES THE TRIAL 3 REDUCTION RELATIVE TO FIXED-PARAMETER MODEL-BASED ILC.
| Trajectory | Method | T1 (nominal) | T3 | T5 | (5%) | J/C (%) |
|---|---|---|---|---|---|---|
| Circle | Fixed MB-ILC | 5.47/15.12 | 1.48/4.05 | 0.49/1.26 | – | – |
| Diff-ILC (5 epochs) | 5.52/15.18 | 0.53/1.30 | 0.26/0.68 | T5/T3 | 64.2/67.9 | |
| Diff-ILC (10 epochs) | 5.46/15.09 | 0.28/0.73 | 0.26/0.67 | T7/T3 | 81.1/82.0 | |
| Fast circle | Fixed MB-ILC | 9.06/22.60 | 2.40/6.02 | 0.84/2.06 | – | – |
| Diff-ILC (5 epochs) | 9.11/22.73 | 2.10/4.62 | 0.55/1.30 | T4/T3 | 12.5/23.3 | |
| Diff-ILC (10 epochs) | 9.06/22.59 | 0.60/1.45 | 0.53/1.26 | T8/T3 | 75.0/75.9 | |
| Helix | Fixed MB-ILC | 5.57/15.16 | 1.46/3.79 | 0.45/1.07 | – | – |
| Diff-ILC (5 epochs) | 5.55/15.12 | 0.57/1.41 | 0.27/0.68 | T5/T3 | 61.0/62.8 | |
| Diff-ILC (10 epochs) | 5.61/15.15 | 0.28/0.73 | 0.28/0.74 | T7/T3 | 80.8/80.7 | |
| Infinity | Fixed MB-ILC | 6.31/17.77 | 1.60/4.48 | 0.49/1.36 | – | – |
| Diff-ILC (5 epochs) | 6.27/17.65 | 0.73/1.86 | 0.33/0.96 | T5/T3 | 54.4/58.5 | |
| Diff-ILC (10 epochs) | 6.31/17.71 | 0.33/0.95 | 0.35/1.01 | T8/T3 | 79.4/78.8 | |
| Star | Fixed MB-ILC | 7.12/20.18 | 2.06/5.68 | 0.65/1.72 | – | – |
| Diff-ILC (5 epochs) | 7.17/20.19 | 1.49/3.99 | 0.35/0.91 | T4/T3 | 27.7/29.8 | |
| Diff-ILC (10 epochs) | 7.17/20.23 | 0.52/1.82 | 0.33/0.81 | T6/T3 | 74.8/68.0 |

Fig. 4. Joint-wise tracking errors for the star trajectory at Trial 3 using fixed-parameter model-based ILC and Diff-ILC with ten outer optimization epochs.
For the challenging star trajectory, Fig. 4 shows that Diff-ILC reduces the Trial 3 joint RMSE from to and the Cartesian RMSE from 5.68 to 1.82 mm, corresponding to reductions of 74.8% and 68.0%, respectively. Although the star's sharp direction changes produce larger residual errors, Diff-ILC achieves substantial improvement within three physical trials without trajectory-specific retuning.
Fig. 5 shows that, at Trial 3, Diff-ILC reduces the Cartesian RMSE for each trajectory from 4.05, 3.79, 4.48, and 5.68 mm to 0.73, 0.73, 0.95, and 1.82 mm, respectively. These results correspond to reductions of approximately 68%–82% relative to fixed-parameter model-based ILC across both smooth and high-curvature paths.
The fast-circle experiment tested transfer to a higher execution speed using the same identified differential model and without speed-specific baseline retuning. At 0.15 Hz, Diff-ILC reduced the Trial 3 joint/Cartesian RMSE from mm to mm, corresponding to reductions of 75.0% and 75.9%. Thus, the early-trial advantage is retained for substantially faster motion despite reusing the same fixed differential model.

(c) Infinity
(d) Star
Fig. 5. Cartesian position-error magnitude along the four primary evaluation trajectories at Trial 3 for fixed-parameter model-based ILC and Diff-ILC with ten outer optimization epochs.
Joint 1
Joint 2
Joint 3
Joint 4
Joint 5
Joint 6
(a)

(b)
(c)
(d)
Fig. 6. Online evolution of the learned Diff-ILC (10) parameters for the star trajectory (a) correction penalties , (b) first-difference penalties , (c) second-difference penalties , and (d) shared correction bound .
C. Online Parameter Adaptation
Fig. 6 shows the online parameter evolution for the star trajectory. The correction penalties decrease from 1 to 0.019–0.073, while and increase to 5.07–9.76 and 6.03–9.13, respectively; the correction bound increases from to . Thus, Diff-ILC permits larger corrections while increasing penalties on temporal variation and curvature, balancing correction magnitude and smoothness.
Across the four unseen 0.1 Hz trajectories, Diff-ILC with ten outer epochs reduced the average Trial 3 joint and Cartesian RMSE by 78.8% and 76.4%, respectively, relative to fixed-parameter model-based ILC. The consistent improvement across these trajectories and the faster-circle experiment indicates that the early-trial advantage extends across changes in path geometry and execution rate while using the same identified differential model.
VI. CONCLUSION
This work presented Diff-ILC, a differentiable constrained model-based ILC framework for black-box position-commanded manipulators. A data-driven closed-loop differential model is combined with a finite-horizon constrained QP, while the ILC regularization weights and correction bound are adapted online through hypergradients obtained
from the locally active KKT system. Experiments on a 6-DoF DOBOT CR3 showed consistent improvements across unseen planar and three-dimensional trajectories using a single identified differential model. With ten outer epochs, the mean joint/Cartesian RMSE at Trial 3 decreased to mm, compared with mm for fixed-parameter model-based ILC. The results show that the principal benefit of Diff-ILC is faster tracking-error reduction during the first few physical repetitions, while additional outer epochs yield diminishing returns.
A limitation of the current formulation is that parameter adaptation relies on a real-anchored next-trial surrogate constructed from a fixed identified differential model. While this enables several computational updates between robot executions, it can increase sensitivity to model mismatch. Future work will investigate physical-loss and data-driven hypergradient formulations.
REFERENCES
[1] S. S. Saab, D. Shen, M. Orabi, D. Kors, and R. H. Jaafar, “Iterative learning control: Practical implementation and automation,” IEEE Transactions on Industrial Electronics, vol. 69, no. 2, pp. 1858–1866, Feb. 2022.
[2] C. Liu, M. Wang, X. Li, and S. Ratchev, “Feedforward enhancement through iterative learning control for robotic manipulator,” in Proceedings of the IEEE 17th International Conference on Automation Science and Engineering (CASE), Lyon, France, 2021, pp. 1067–1072.
[3] S. Chen and J. T. Wen, “Industrial robot trajectory tracking control using multi-layer neural networks trained by iterative learning control,” Robotics, vol. 10, no. 1, p. 50, 2021.
[4] T.-Q. Ta and S.-L. Chen, “Iterative learning control for integrated system of robot and machine tool,” Asian Journal of Control, vol. 25, no. 2, pp. 807–823, 2023.
[5] Y.-H. Lee, S.-C. Hsu, T.-Y. Chi, Y.-Y. Du, J.-S. Hu, and T.-C. Tsao, “Industrial robot accurate trajectory generation by nested loop iterative learning control,” Mechatronics, vol. 74, p. 102487, 2021.
[6] S. Mishra, U. Topcu, and M. Tomizuka, “Optimization-based constrained iterative learning control,” IEEE Transactions on Control Systems Technology, vol. 19, no. 6, pp. 1613–1621, 2011.
[7] P. Janssens, G. Pipeleers, and J. Swevers, “A data-driven constrained norm-optimal iterative learning control framework for LTI systems,” IEEE Transactions on Control Systems Technology, vol. 21, no. 2, pp. 546–551, 2013.
[8] D. H. Owens and K. Feng, “Parameter optimization in iterative learning control,” International Journal of Control, vol. 76, no. 11, pp. 1059–1069, 2003.
[9] M. Meindl, S. Bachhuber, and T. Seel, “Iterative model learning and dual iterative learning control: A unified framework for data-driven iterative learning control,” IEEE Transactions on Automatic Control, vol. 70, no. 12, pp. 7818–7829, 2025.
[10] C. Wang, T. Zheng, S. Zhao, T. Xu, S. Zhao, Z. Yang, H. Cai, J. Zhao, and Y. Zhu, "DEGO-ILC: An iterative learning variable gain controller for enhancing trajectory tracking precision in industrial robots," Industrial Robot: The International Journal of Robotics Research and Application, vol. 53, no. 1, pp. 178–188, 2026.
[11] B. Amos and J. Z. Kolter, “OptNet: Differentiable optimization as a layer in neural networks,” in Proceedings of the 34th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, vol. 70. PMLR, 2017, pp. 136–145.
[12] A. Agrawal, B. Amos, S. Barratt, S. P. Boyd, S. Diamond, and J. Z. Kolter, "Differentiable convex optimization layers," in Advances in Neural Information Processing Systems, vol. 32, 2019, pp. 9558–9570.
[13] B. Amos, I. Jimenez, J. Sacks, B. Boots, and J. Z. Kolter, “Differentiable MPC for end-to-end planning and control,” Advances in neural information processing systems, vol. 31, pp. 8299–8310, 2018.
[14] S. Cheng, M. Kim, L. Song, C. Yang, Y. Jin, S. Wang, and N. Hovakimyan, "Diffune: Autotuning through autodifferentiation," IEEE Transactions on Robotics, vol. 40, pp. 4085–4101, 2024.
[15] R. Tao, S. Cheng, X. Wang, S. Wang, and N. Hovakimyan, "Diffune-mpc: Closed-loop learning for model predictive control," IEEE Robotics and Automation Letters, vol. 9, no. 8, pp. 7294–7301, 2024.
[16] A. Oshin, H. Almubarak, and E. A. Theodorou, “Differentiable robust model predictive control,” in Robotics: Science and Systems XX, 2024.
[17] P. Jiang, P.-Y. Woo, and R. Unbehausen, “Iterative learning control for manipulator trajectory tracking without any control singularity,” Robotica, vol. 20, no. 2, pp. 149–158, 2002.
[18] W. Rackl, R. Lampariello, and G. Hirzinger, “Robot excitation trajectories for dynamic parameter estimation using optimized b-splines,” in 2012 IEEE International Conference on Robotics and Automation, 2012, pp. 2042–2047.
[19] B. Stellato, G. Banjac, P. Goulart, A. Bemporad, and S. Boyd, “OSQP: An operator splitting solver for quadratic programs,” Mathematical Programming Computation, vol. 12, no. 4, pp. 637–672, 2020.
[20] C. C. Paige and M. A. Saunders, “Solution of sparse indefinite systems of linear equations,” SIAM Journal on Numerical Analysis, pp. 617–629, 1975.