Main Content

Model-Free Iterative Learning Control of SISO System

Since R2024a

This example implements model-free iterative learning control (ILC) to improve closed-loop trajectory tracking performance of a single-input, single-output (SISO) system.

Iterative Learning Control Basics

Iterative learning control is an improvement in run-to-run control. It uses frequent measurements in the form of the error trajectory from the previous batch run to update the control signal for the subsequent batch run. The focus of ILC has been on improving the performance of systems that execute repeated operations, starting at the same initial operating condition. This focus includes many practical industrial systems in manufacturing, robotics, and chemical processing, where mass production on an assembly line requires repetition.

To understand how ILC works, consider a generic discrete SISO plant in the state space form.



Here, t[0,N] is the time index across the operation duration and k is the iteration number during the ILC learning process.

You can represent the input-output relationship in the following lifted form.


As a result, the input-output relationship for all time t[0,N] between vectors uk and yk can compactly written as:



G=[CB00CABCBCAN-1BCAN-2B]and  d=[CAx0CA2x0CANx0]

As a simple example, assume plant G is stable and ILC is the only source that provides control action.

A general ILC update law is of the following form [1, 2].


Here, Q is a low-pass filter that removes control chatter and L is a learning function. There are multiple ways to design the learning function L. The simplest method is called model-free ILC (or Arimoto ILC) [3]. Model-free ILC does not require prior knowledge of the system dynamics and uses proportional error feedback to update the control history. In other words, the model-free ILC update law is:


where α is referred as the ILC gain.

With a properly chosen α value, the nominal asymptotic convergence of the tracking error to zero can be achieved.

Assume the plant is defined as yk=Guk+d and the tracking error is ek+1=r-yk+1. Then, using the model-free ILC update law, the error term is:

ek+1=r-(Guk+1+d)        =r-(G(uk+αek)+d)        =r-(Guk+d)-αGek        =(I-αG)ek

Therefore, the tracking error asymptotically converges to zero if and only if |I-αG|<1.

In the ILC tuning process, you can start with a small α and gradually increase its value for faster convergence until the ILC learning process becomes unstable.

Closed-Loop Model-Free Iterative Learning Control

In industrial practices, the plant is most likely already under some type of feedback or feedforward control to achieve stabilization and baseline tracking and regulation. When the operation is repeating, you can add ILC on top of the baseline controller to improve control performance.

In this example, you simulate a system that uses a model-free ILC controller to assist an existing PI controller.

Open the Simulink® model.

mdl = "scdmodelfreeilc";

Plant and PI Controller

The plant, implemented in the Plant block, is the following linear, discrete-time, second-order system.

Ts = 0.01;
G = ss([-0.7 -0.012;1 0],[1;0],[1 0],0,Ts);

Design a baseline PI controller using the pidtune function.

c = pidtune(G,"pi");

Implement the controller using the PID block.

ILC Mode Generator

The ILC learning process involves two modes: learning and reset. In learning mode, ILC outputs uk at the desired time points and measures the error between the reference rk and output yk. At the end of learning mode, ILC calculates the new control sequence uk+1 to be used in the next iteration. In reset mode, the plant returns to the initial operation condition, driven by the existing control mechanism. The ILC controller output is 0 during reset mode. The ILC Mode Generator subsystem defines the length of each mode and provides a signal that switches between learning and reset modes, which downstream modules such as Reference Trajectory Generator and ILC can use.

Reference Trajectory Generator

In this example, you use a generic reference signal. The Reference Trajectory Generator subsystem outputs the desired reference signal during the learning mode, starting at zero. Then, in reset mode, it generates a reference of zero, which allows the PI controller to bring the plant back to the initial operating point.

Model-Free ILC Controller

The model-free ILC system contains two components:

  • The ModelFreeILC block implements the main ILC update law using a MATLAB System block.

  • The Low Pass Filter block implements filter Q.

You can configure the ModelFreeILC block using the following parameters.

  • ILC gain: model-free ILC gain α.

  • Duration: duration of the repetitive operation.

  • Time step (Ts): ILC sample time (match to the low-pass filter sample time)

This block updates the control history based on stored error history from the previous iteration.

Simulation With and Without ILC

To illustrate the benefit of ILC, simulate the system both with and without ILC control enabled. You can then compare the closed-loop control performance before and after ILC is used.

Define ILC controller parameters.

Tfinal = 8;
alpha = 3;

Define the gain for the low-pass filter.

filter_gain = [0.03921 -0.9608];

Configure the model to use only PI control.

set_param(mdl + "/ILC_On","sw","0");

Simulate the system for 128 seconds, which covers eight repetitive operations.

simout_pid = sim(mdl);

Plot the reference tracking results for the PI controller.

% Reference signal 
r = squeeze(simout_pid.logsout{4}.Values.Data);
% System output y_k
y_pid = squeeze(simout_pid.logsout{3}.Values.Data);
% Mode signal
mode = squeeze(simout_pid.logsout{1}.Values.Data);

hold on
title("PID controller, Trajectory tracking")
hold off

The PID controller achieves the same performance for each of the repetitive tasks.

Configure the model to use both ILC and PID.

set_param(mdl + "/ILC_On","sw","1");

Simulate the model for eight repetitive operations.

simout_ilc = sim(mdl);

Plot the reference tracking results for the combined control system.

% Reference signal 
r = squeeze(simout_ilc.logsout{4}.Values.Data);
% System output y_k
y_ilc = squeeze(simout_ilc.logsout{3}.Values.Data);
plot(simout_ilc.logsout{4}.Values.Time, r)
hold on
plot(simout_pid.logsout{1}.Values.Time, mode,"--")
plot(simout_ilc.logsout{3}.Values.Time, y_ilc)
title("ILC controller, Trajectory tracking")
hold off

For the first operation, the control performance matches that of the PI controller case. As the iterations progress, the ILC controller improves the reference tacking performance.

The ILC control action, which compensates PI control, for the given repetitive reference tracking is shown in the following plot.

uILC = squeeze(simout_ilc.logsout{2}.Values.Data);
ylabel("ILC action")
title("ILC Control Effort")


[1] Bristow, Douglas A., Marina Tharayil, and Andrew G. Alleyne. “A Survey of Iterative Learning Control.” IEEE Control Systems 26, no. 3 (June 2006): 96–114.

[2] Gunnarsson, Svante and Mikael Norrlöf. “A Short Introduction to Iterative Learning Control.” (1997).

[3] Hätönen, J., T.J. Harte, D.H. Owens, J. Ratcliffe, P. Lewin, and E. Rogers. “Discrete-Time Arimoto ILC-Algorithm Revisited.” IFAC Proceedings Volumes 37, no. 12 (August 2004): 541–46.

[4] Lee, Jay H., Kwang S. Lee, and Won C. Kim. “Model-Based Iterative Learning Control with a Quadratic Criterion for Time-Varying Linear Systems.” Automatica 36, no. 5 (May 2000): 641–57.

[5] Harte, T. J., J. Hätönen, and D. H. Owens *. “Discrete-Time Inverse Model-Based Iterative Learning Control: Stability, Monotonicity and Robustness.” International Journal of Control 78, no. 8 (May 20, 2005): 577–86.