Chapter 12: Digital Control and Real-Time Implementation

Lesson 3: Multi-Rate Control Loops

This lesson develops a systematic theory and implementation methodology for multi-rate control loops in robotic systems, where sensing, computation, and actuation occur at different sampling frequencies. We derive equivalent single-rate models, analyze stability and performance, and show how multi-rate architectures arise naturally in hierarchical robot controllers (current / torque / position / task-space loops). The lesson includes mathematical derivations together with Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica implementations.

1. Motivation and Conceptual Overview

In modern robots, different subsystems run at different rates: inner motor current loops may run at 10–20 kHz, joint torque loops at about 1 kHz, joint position loops at a few hundred Hz, and high-level task-space controllers at tens of Hz. At the same time, sensors such as IMUs, encoders, and cameras provide information at their own natural frequencies. The result is a multi-rate feedback architecture:

  • fast inner loops for actuators and local stabilization,
  • slower outer loops for motion and task objectives,
  • heterogeneous sampling due to sensing and communication constraints.

We assume that from previous lessons you are comfortable with discrete-time models obtained from sampling a continuous-time plant with zero-order hold (ZOH), and with discrete-time stability via eigenvalues of the state matrix. We now extend that knowledge to the case where controllers and sensors operate at integer multiples of a base sampling period.

flowchart TD
  TLoop["Outer loop: task / impedance (e.g. 50 Hz)"]
    --> PLoop["Joint position loop (e.g. 200 Hz)"]
  PLoop --> TQLoop["Torque / current loop (e.g. 1 kHz)"]
  Sensors["Sensors with mixed rates (encoders, IMU, camera)"]
    --> TLoop
  Sensors --> PLoop
  TQLoop --> Act["Actuators (motors, drives)"]
        

The key question is: how can we analyze and design such multi-rate loops using the single-rate discrete-time tools you already know? The central ideas are:

  1. Choose a base period for the fastest loop.
  2. Represent slower loops as operating every integer multiple of that base period.
  3. Derive an equivalent single-rate model seen by each slower loop.

2. Base-Period Modeling of Multi-Rate Loops

Let the continuous-time linearized robot dynamics (around a fixed operating point) be given in state-space form

\[ \dot{x}(t) = A_c x(t) + B_c u(t), \quad y(t) = C x(t), \]

where \( x(t) \in \mathbb{R}^n \) may represent joint positions and velocities, \( u(t) \in \mathbb{R}^m \) actuator inputs (torques or motor voltages), and \( y(t) \) measured outputs.

Choose a fast base sampling period \( T_f > 0 \), typically the period of the fastest inner loop (for example the torque loop). Applying zero-order hold with period \( T_f \) gives the discrete-time model

\[ x[k+1] = A_f x[k] + B_f u[k], \quad y[k] = C x[k], \]

where \( A_f = e^{A_c T_f} \) and \( B_f = \int_0^{T_f} e^{A_c \sigma}\, d\sigma\, B_c \).

Now suppose a slow controller operates with period \( T_s = m T_f \), for an integer \( m \ge 2 \). We introduce a slow-time index \( q \) such that the slow controller updates at times \( k = q m \), while the plant evolves at every fast step \( k \).

A simple and practically important multi-rate architecture is:

  • an inner fast loop (for example torque control) running at \( T_f \),
  • an outer slow loop (for example joint position control) running at \( T_s = m T_f \).

The outer loop computes a signal \( v[q] \) (for example desired torque or inner-loop reference), which is held constant between slow updates. The inner loop uses this signal at the fast rate together with the fast state feedback.

3. Cascaded Fast Inner Loop and Slow Outer Loop

Consider a fast inner controller of the form

\[ u[k] = -K_f x[k] + v[q] \quad \text{for all } k \text{ such that } q m \le k < (q+1)m, \]

where \( v[q] \) is the outer-loop command held constant over the interval of fast indices \( k \) from \( q m \) to \( (q+1)m - 1 \). Substituting into the plant yields the fast closed-loop dynamics

\[ x[k+1] = A_{cl} x[k] + B_f v[q], \quad A_{cl} \triangleq A_f - B_f K_f. \]

We are interested in a slow equivalent model that maps \( x[q m] \) to \( x[(q+1)m] \) with input \( v[q] \). This will be the effective plant seen by the slow outer loop.

3.1 Derivation of the Equivalent Slow-Rate Model

Let \( x_q \triangleq x[q m] \). For a fixed \( q \), unroll the dynamics for \( j = 0, 1, \dots, m \):

\[ \begin{aligned} x[qm + 1] &= A_{cl} x_q + B_f v[q], \\ x[qm + 2] &= A_{cl} x[qm+1] + B_f v[q] \\ &= A_{cl}^2 x_q + \left(A_{cl} B_f + B_f\right) v[q], \\ &\;\;\vdots \\ x[qm + j] &= A_{cl}^j x_q + \sum_{i=0}^{j-1} A_{cl}^{j-1-i} B_f\, v[q]. \end{aligned} \]

Setting \( j = m \) gives the slow-step relation

\[ x[(q+1)m] = A_{cl}^m x_q + \sum_{i=0}^{m-1} A_{cl}^{m-1-i} B_f\, v[q]. \]

Define the equivalent slow-rate plant matrices

\[ \bar{A} \triangleq A_{cl}^m, \quad \bar{B} \triangleq \sum_{i=0}^{m-1} A_{cl}^{m-1-i} B_f. \]

Then the slow-time dynamics are

\[ x_{q+1} = \bar{A} x_q + \bar{B} v[q], \quad y_q = C x_q, \]

where \( y_q \triangleq y[q m] = C x_q \). The outer loop can therefore be designed as if it were interacting with a single-rate discrete-time plant with sampling period \( T_s = m T_f \) and matrices \( (\bar{A}, \bar{B}, C) \).

3.2 Proof Sketch by Induction

The formula for \( x[qm + j] \) can be proved by induction on \( j \):

  • For \( j = 1 \), the formula reduces to \( x[qm+1] = A_{cl} x_q + B_f v[q] \), which matches the dynamics.
  • Assume it holds for \( j \). Then

    \[ \begin{aligned} x[qm + (j+1)] &= A_{cl} x[qm + j] + B_f v[q] \\ &= A_{cl}\Big( A_{cl}^j x_q + \sum_{i=0}^{j-1} A_{cl}^{j-1-i} B_f\, v[q] \Big) + B_f v[q] \\ &= A_{cl}^{j+1} x_q + \sum_{i=0}^{j-1} A_{cl}^{j-i} B_f\, v[q] + B_f v[q] \\ &= A_{cl}^{j+1} x_q + \sum_{i=0}^{j} A_{cl}^{j-i} B_f\, v[q], \end{aligned} \]

    which is exactly the formula with \( j \) replaced by \( j+1 \).

Thus the equivalent slow-rate model is rigorously justified.

4. Stability of Multi-Rate Cascades

Let \( \lambda_1, \dots, \lambda_n \) be the eigenvalues of the fast closed-loop matrix \( A_{cl} \). For each eigenpair \( (\lambda_i, \phi_i) \) with \( A_{cl} \phi_i = \lambda_i \phi_i \), we have

\[ \bar{A} \phi_i = A_{cl}^m \phi_i = \lambda_i^m \phi_i. \]

Hence the eigenvalues of the slow-rate matrix \( \bar{A} \) are exactly \( \lambda_i^m \). Therefore:

  • If the fast closed loop is stable (all \( |\lambda_i| < 1 \)), then the equivalent slow-rate plant is also stable because \( |\lambda_i^m| = |\lambda_i|^m < 1 \).
  • The slow eigenvalues may be more clustered and can lead to different transient behavior, which must be accounted for in outer-loop controller design.

In practice, one often chooses the inner loop bandwidth significantly higher than that of the outer loop. The above eigenvalue relationship formalizes the intuition that a well-stabilized fast loop behaves like a new plant for the slower controllers.

Similar ideas apply when outputs are sampled at slower rates than inputs (for example, a camera providing end-effector pose at tens of Hz while the joint encoders are read at kHz). In that case, one considers multi-rate measurement equations and either:

  • lifting to an augmented state that collects states between slow samples, or
  • using estimators that explicitly handle missing or delayed measurements.

5. Example – Multi-Rate Joint Torque and Position Control

Consider a single revolute joint with inertia \( J > 0 \) and viscous damping \( b \ge 0 \), driven by motor torque \( \tau(t) \):

\[ J \ddot{q}(t) + b \dot{q}(t) = \tau(t). \]

Using the state \( x(t) = [q(t)\;\; \dot{q}(t)]^\top \) and input \( u(t) = \tau(t) \), the continuous-time matrices are

\[ A_c = \begin{bmatrix} 0 & 1 \\ 0 & -b/J \end{bmatrix}, \quad B_c = \begin{bmatrix} 0 \\ 1/J \end{bmatrix}, \quad C = \begin{bmatrix} 1 & 0 \end{bmatrix}. \]

Suppose an inner torque/current loop runs with period \( T_f \), and a position controller (for \( q(t) \)) runs with period \( T_s = m T_f \). The design procedure is:

  1. Discretize at \( T_f \) to obtain \( A_f, B_f \).
  2. Design a stabilizing fast feedback gain \( K_f \) (for example LQR or pole placement).
  3. Compute \( A_{cl} = A_f - B_f K_f \) and the equivalent outer-loop plant \( (\bar{A}, \bar{B}, C) \) using the formulas in Section 3.
  4. Design a slow outer-loop controller (for example a discrete-time PD or LQR at sampling period \( T_s \)) for this equivalent plant.

This decomposition is particularly natural for robot manipulators, where motor drives often implement proprietary fast current controllers, and the robot manufacturer exposes a lower-rate torque or position interface to the user. Modeling the inner loops as a fast closed system and deriving the equivalent outer dynamics is the key step to principled controller design.

6. Implementation Pattern and Scheduling Flow

On a real-time CPU, a simple software pattern for two-rate control is:

  • Run a fast periodic task with period \( T_f \) (inner loop).
  • Within that task, every \( m \)-th invocation also execute the outer loop.
  • Use shared memory to pass states and commands between loops.
flowchart TD
  Start["Fast tick k"] --> Read["Read fast sensors (e.g. encoders)"]
  Read --> OuterCheck["Is k divisible by m?"]
  OuterCheck -->|yes| Outer["Update slow controller \n(position / task loop)"]
  OuterCheck -->|no| SkipOuter["Keep previous slow command"]
  Outer --> Inner["Compute inner control using fast feedback"]
  SkipOuter --> Inner
  Inner --> Apply["Send commands to drives"]
  Apply --> Next["Increment k and wait for next fast tick"]
        

Multi-rate sensing is handled similarly: at each fast tick, new data is read only from sensors whose sampling times have elapsed. The control law may use the latest available value of each sensor, possibly with prediction or filtering to compensate for different delays.

7. Python Implementation – Multi-Rate Simulation of a Joint

The following Python code simulates a simple joint model with a fast inner state-feedback loop and a slower outer proportional position loop. We use a double-integrator discretization (ignoring damping for simplicity) and implement the two-rate structure described above.


import numpy as np

# Base (fast) sampling period and multi-rate factor
T_fast = 0.001        # 1 kHz torque or velocity loop
m = 10                # outer loop at 100 Hz
T_slow = m * T_fast

# Simple double-integrator discrete model: x = [q, qdot]
# x[k+1] = A_f x[k] + B_f u[k]
A_f = np.array([[1.0, T_fast],
                [0.0, 1.0]])
B_f = np.array([[0.5 * T_fast**2],
                [T_fast]])

# Fast inner feedback (e.g. on velocity) and slow outer loop on position
K_fast = np.array([[0.0, 5.0]])       # simple velocity feedback
K_slow = 50.0                         # proportional position gain

# Reference trajectory for joint position
def q_ref(t):
    # simple step reference
    return 0.5 if t > 0.1 else 0.0

tf = 1.0
N_steps = int(tf / T_fast)
x = np.zeros((2,))     # initial state [q, qdot]
v_slow = 0.0           # outer-loop "virtual torque" command

q_hist = []
t_hist = []

for k in range(N_steps):
    t = k * T_fast

    # Slow outer loop every m fast steps
    if k % m == 0:
        q_des = q_ref(t)
        e_q = q_des - x[0]
        v_slow = K_slow * e_q

    # Fast inner loop (velocity feedback)
    u = v_slow - float(K_fast @ x)

    # Plant update
    x = A_f @ x + (B_f.flatten() * u)

    q_hist.append(x[0])
    t_hist.append(t)

# q_hist and t_hist now contain the simulated joint trajectory
print("Final joint position:", q_hist[-1])
      

In a robotics context, this logic would be embedded into a real-time control node (for example using a robotics middleware), with \( A_f, B_f \) identified from the real actuator dynamics and \( K_f, K_s \) chosen to meet bandwidth and stability requirements.

8. C++ Implementation with Eigen

The next code snippet shows a similar two-rate simulation in C++ using the Eigen linear algebra library, which is widely used in robotics software stacks.


#include <iostream>
#include <Eigen/Dense>

int main() {
    const double T_fast = 0.001;   // 1 kHz
    const int m = 10;              // outer loop at 100 Hz
    const double T_slow = m * T_fast;
    const double tf = 1.0;
    const int N_steps = static_cast<int>(tf / T_fast);

    // Double-integrator discrete model
    Eigen::Matrix2d A_f;
    A_f << 1.0, T_fast,
           0.0, 1.0;
    Eigen::Vector2d B_f;
    B_f << 0.5 * T_fast * T_fast,
           T_fast;

    // Gains
    Eigen::RowVector2d K_fast;
    K_fast << 0.0, 5.0;
    double K_slow = 50.0;

    Eigen::Vector2d x;  // [q, qdot]
    x.setZero();
    double v_slow = 0.0;

    auto q_ref = [](double t) {
        return (t > 0.1) ? 0.5 : 0.0;
    };

    for (int k = 0; k < N_steps; ++k) {
        double t = k * T_fast;

        if (k % m == 0) {
            double q_des = q_ref(t);
            double e_q = q_des - x(0);
            v_slow = K_slow * e_q;
        }

        double u = v_slow - (K_fast * x)(0);
        x = A_f * x + B_f * u;
    }

    std::cout << "Final joint position: " << x(0) << std::endl;
    return 0;
}
      

On a real robot, the loop body would be executed in a timer callback or real-time thread; the fast period \( T_f \) is typically enforced by a real-time operating system or hardware drive.

9. Java Implementation (Core Logic)

In Java, similar logic can be implemented using arrays for the state and simple matrix operations. In robotics applications, this often appears in simulation frameworks or control software for educational robots.


public class MultiRateJointControl {

    public static void main(String[] args) {
        double T_fast = 0.001;
        int m = 10;
        double tf = 1.0;
        int N_steps = (int)(tf / T_fast);

        // State x = [q, qdot]
        double[] x = new double[] {0.0, 0.0};

        // Discrete double-integrator matrices
        double[][] A_f = new double[][] {
            {1.0, T_fast},
            {0.0, 1.0}
        };
        double[] B_f = new double[] {
            0.5 * T_fast * T_fast,
            T_fast
        };

        double[] K_fast = new double[] {0.0, 5.0};
        double K_slow = 50.0;
        double v_slow = 0.0;

        for (int k = 0; k < N_steps; ++k) {
            double t = k * T_fast;

            // Slow outer loop
            if (k % m == 0) {
                double q_des = (t > 0.1) ? 0.5 : 0.0;
                double e_q = q_des - x[0];
                v_slow = K_slow * e_q;
            }

            // Fast inner loop
            double u = v_slow - (K_fast[0] * x[0] + K_fast[1] * x[1]);

            // x_next = A_f * x + B_f * u
            double q_next =
                A_f[0][0] * x[0] + A_f[0][1] * x[1] + B_f[0] * u;
            double qdot_next =
                A_f[1][0] * x[0] + A_f[1][1] * x[1] + B_f[1] * u;

            x[0] = q_next;
            x[1] = qdot_next;
        }

        System.out.println("Final joint position: " + x[0]);
    }
}
      

In a Java-based robotics framework, such code would be integrated with a scheduling mechanism (for example, a real-time scheduler or fixed-period thread) to enforce \( T_f \) and \( T_s \).

10. MATLAB/Simulink Implementation

MATLAB and Simulink are particularly convenient for studying multi-rate control, because Simulink supports multiple sample times and rate transition blocks. The following MATLAB script builds a simple multi-rate simulation using discrete-time updates.


T_fast = 0.001;
m = 10;
T_slow = m * T_fast;
tf = 1.0;
N_steps = floor(tf / T_fast);

A_f = [1, T_fast;
       0, 1];
B_f = [0.5 * T_fast^2;
       T_fast];

K_fast = [0, 5];
K_slow = 50;

x = [0; 0];    % [q; qdot]
v_slow = 0;

q_hist = zeros(N_steps, 1);
t_hist = (0:N_steps-1)' * T_fast;

for k = 1:N_steps
    t = (k-1) * T_fast;

    if mod(k-1, m) == 0
        if t > 0.1
            q_des = 0.5;
        else
            q_des = 0.0;
        end
        e_q = q_des - x(1);
        v_slow = K_slow * e_q;
    end

    u = v_slow - K_fast * x;
    x = A_f * x + B_f * u;

    q_hist(k) = x(1);
end

plot(t_hist, q_hist);
xlabel('time [s]');
ylabel('joint position q');
title('Multi-rate joint control (fast inner, slow outer)');
grid on;
      

In Simulink, the same architecture can be realized using:

  • a discrete plant block at sample time T_fast,
  • a fast inner controller block at T_fast,
  • a slow controller block at T_slow with a rate transition into the fast loop.

11. Wolfram Mathematica Implementation

Wolfram Mathematica can be used to symbolically or numerically explore multi-rate dynamics. The following code uses RecurrenceTable to simulate the same double-integrator example with a fast and slow loop.


Tfast = 0.001;
m = 10;
Tslow = m Tfast;
tf = 1.0;
Nsteps = Round[tf/Tfast];

A = { {1.0, Tfast},
     {0.0, 1.0} };
B = {0.5 Tfast^2, Tfast};

Kfast = {0.0, 5.0};
Kslow = 50.0;

qRef[t_] := Piecewise[{ {0.0, t <= 0.1}, {0.5, t > 0.1} }];

(* State: {q, qdot, vSlow} *)
xAll = RecurrenceTable[
   Module[{k = n, t = (n - 1) Tfast,
     q = x[1], qdot = x[2], vSlow = x[3],
     qdes, eq, vSlowNew, u, xNext},
    qdes = qRef[t];
    vSlowNew = If[Mod[k - 1, m] == 0,
      Kslow (qdes - q),
      vSlow
    ];
    u = vSlowNew - (Kfast.{q, qdot});
    xNext = A.{q, qdot} + B u;
    {xNext[[1]], xNext[[2]], vSlowNew}
   ],
   {x[1], x[2], x[3]},
   {x[1], x[2], x[3]} /. {x[1] -> 0.0, x[2] -> 0.0, x[3] -> 0.0},
   {n, 1, Nsteps}
];

qHist = xAll[[All, 1]];
tHist = Range[0, tf - Tfast, Tfast];

ListLinePlot[
  Transpose[{tHist, qHist}],
  AxesLabel -> {"t", "q"},
  PlotLabel -> "Multi-rate joint control"
]
      

Mathematica is also well suited for exploring analytical properties, such as symbolic eigenvalues of \( A_{cl}^m \) or series expansions for small \( T_f \).

12. Problems and Solutions

Problem 1 (Derivation of Equivalent Slow-Rate Matrices): Consider the fast closed-loop system \( x[k+1] = A_{cl} x[k] + B_f v[q] \) for \( q m \le k < (q+1)m \) with constant \( v[q] \). Derive the equivalent slow-rate matrices \( \bar{A}, \bar{B} \) such that \( x_{q+1} = \bar{A} x_q + \bar{B} v[q] \).

Solution: Unrolling the recursion,

\[ x[qm + j] = A_{cl}^j x_q + \sum_{i=0}^{j-1} A_{cl}^{j-1-i} B_f\, v[q]. \]

For \( j = m \),

\[ x[(q+1)m] = A_{cl}^m x_q + \sum_{i=0}^{m-1} A_{cl}^{m-1-i} B_f\, v[q]. \]

Hence \( \bar{A} = A_{cl}^m \) and \( \bar{B} = \sum_{i=0}^{m-1} A_{cl}^{m-1-i} B_f \).

Problem 2 (Eigenvalues of the Slow-Rate Model): Show that if \( \lambda \) is an eigenvalue of \( A_{cl} \) with eigenvector \( \phi \neq 0 \), then \( \lambda^m \) is an eigenvalue of \( \bar{A} = A_{cl}^m \) with the same eigenvector.

Solution: By definition \( A_{cl} \phi = \lambda \phi \). Then

\[ \bar{A} \phi = A_{cl}^m \phi = A_{cl}^{m-1} (A_{cl} \phi) = A_{cl}^{m-1} (\lambda \phi) = \lambda A_{cl}^{m-1} \phi = \dots = \lambda^m \phi. \]

Hence \( \phi \) is an eigenvector of \( \bar{A} \) with eigenvalue \( \lambda^m \). Stability of the fast loop (\( |\lambda| < 1 \)) therefore implies stability of the slow model since \( |\lambda^m| = |\lambda|^m < 1 \).

Problem 3 (Design Interpretation): Assume \( A_{cl} \) is fixed and stable. How does increasing \( m \) (making the outer sampling period \( T_s = m T_f \) larger) affect:

  • the eigenvalues of the slow-rate matrix \( \bar{A} \),
  • the effective control authority of the outer loop?

Solution: The eigenvalues of \( \bar{A} \) are \( \lambda_i^m \) where \( \lambda_i \) are eigenvalues of \( A_{cl} \). For a fixed \( \lambda_i \) with \( 0 < |\lambda_i| < 1 \), the magnitude \( |\lambda_i^m| = |\lambda_i|^m \) decreases as \( m \) increases. Thus the slow-rate system appears more stable. However, the outer controller can only act every \( m \) fast periods, so its bandwidth is reduced; it reacts more slowly to disturbances and reference changes. There is therefore a trade-off between outer-loop responsiveness and computational or communication load.

Problem 4 (Multi-Rate Output Sampling): Consider the single-rate plant \( x[k+1] = A_f x[k] + B_f u[k] \), \( y[k] = C x[k] \), but assume that you only measure \( y[k] \) every \( \ell \) steps, so the controller receives \( y_\ell[q] = y[q \ell] \). Describe a strategy to design a discrete-time observer and controller at the slow rate, using an equivalent lifted model.

Solution: Define the slow state \( x_q \triangleq x[q \ell] \) and derive

\[ x_{q+1} = A_f^\ell x_q + \sum_{i=0}^{\ell-1} A_f^{\ell-1-i} B_f u[q \ell + i]. \]

If the input is also updated only at slow times (for example with a zero-order hold across the fast steps), then the sum collapses to a single matrix multiplying the slow input, similar to the derivation in Section 3. The slow measurement equation becomes \( y_q = C x_q \). One can then design a discrete-time observer and controller at sampling period \( T_\ell = \ell T_f \) for this lifted system, ensuring that the pair \( (A_f^\ell, C) \) is observable and the pair \( (A_f^\ell, \bar{B}) \) is controllable.

Problem 5 (Joint Control with Given Parameters): For the double-integrator discrete model with sampling period \( T_f \),

\[ A_f = \begin{bmatrix} 1 & T_f \\ 0 & 1 \end{bmatrix}, \quad B_f = \begin{bmatrix} \tfrac{1}{2}T_f^2 \\ T_f \end{bmatrix}, \]

choose a scalar \( k_v > 0 \) and inner-loop gain \( K_f = [\,0\;\;k_v\,] \). Derive the closed-loop matrix \( A_{cl} \) and the equivalent slow-rate matrix \( \bar{A} \) for \( m = 2 \).

Solution: The inner loop is \( u[k] = v[q] - k_v \dot{q}[k] \). Then

\[ A_{cl} = A_f - B_f K_f = \begin{bmatrix} 1 & T_f \\ 0 & 1 \end{bmatrix} - \begin{bmatrix} \tfrac{1}{2}T_f^2 \\ T_f \end{bmatrix} [\,0\;\;k_v\,] = \begin{bmatrix} 1 & T_f - \tfrac{1}{2}T_f^2 k_v \\ 0 & 1 - T_f k_v \end{bmatrix}. \]

For \( m = 2 \), \( \bar{A} = A_{cl}^2 \). This can be computed by straightforward matrix multiplication:

\[ \bar{A} = A_{cl}^2 = \begin{bmatrix} 1 & T_f - \tfrac{1}{2}T_f^2 k_v \\ 0 & 1 - T_f k_v \end{bmatrix}^2. \]

The explicit entries can be expanded, but the important point is that the eigenvalues of \( \bar{A} \) are the squares of those of \( A_{cl} \), in accordance with Problem 2.

13. Summary

In this lesson, we developed a rigorous framework for multi-rate control loops in robotic systems. Starting from a base-period discrete model, we showed how fast inner loops and slow outer loops can be analyzed by deriving equivalent slow-rate models using repeated substitution or lifting. We proved that the eigenvalues of the slow-rate matrix are powers of the fast closed-loop eigenvalues, providing a clear relationship between fast-loop and slow-loop stability.

We illustrated these ideas with a joint control example and provided multi-language implementations (Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica) that demonstrate how multi-rate logic appears in real-time code. These constructions are a foundation for the next lessons on real-time scheduling, jitter, and more advanced digital control structures in robot controllers.

14. References

  1. Araki, M., & Yamamoto, K. (1986). Multivariable multirate sampled-data systems: state-space description, transfer characteristics, and Nyquist criterion. IEEE Transactions on Automatic Control, 31(2), 145–154.
  2. Kabamba, P. (1987). Control of linear systems using generalized sampled-data hold functions. IEEE Transactions on Automatic Control, 32(9), 772–783.
  3. Chen, T., & Francis, B. A. (1995). Optimal sampled-data control systems. IEEE Transactions on Automatic Control, 40(4), 613–627.
  4. Colaneri, P., & De Nicolao, G. (1995). Multirate LQG control of continuous-time stochastic systems. Automatica, 31(4), 591–596.
  5. Bamieh, B., Pearson, J. B., Francis, B. A., & Tannenbaum, A. (1991). A lifting technique for linear periodic systems with applications to sampled-data control. Systems & Control Letters, 17(2), 79–88.
  6. Armesto, L., & Tornero, J. (2003). Dual-rate high order holds based on primitive functions. Proceedings of the American Control Conference, 1135–1140.
  7. Nagahara, M., & Yamamoto, Y. (2014). FIR digital filter design by sampled-data \( H_\infty \) discretization. IEEE Transactions on Signal Processing, 62(4), 927–936.
  8. Yang, Z., Wang, X., & Wang, L. (2022). Controllability of networked sampled-data systems. Automatica, 143, 110450.