Chapter 20: Two-Degree-of-Freedom (2-DOF) Linear Controllers

Lesson 4: Separating Tracking and Disturbance-Rejection Objectives

This lesson formalizes how two-degree-of-freedom (2-DOF) controller structures can decouple the design of reference tracking from disturbance rejection. Building on previous chapters (transfer functions, time response, and frequency response), we derive closed-loop transfer functions for 1-DOF and 2-DOF architectures, prove a separation property, and show how to exploit it in analysis and implementation (Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica) with emphasis on servo applications such as robot joints.

1. Tracking vs Disturbance Rejection in 1-DOF Feedback

Consider the standard 1-DOF negative-feedback loop with plant \( G(s) \), controller \( C(s) \), reference \( R(s) \), output \( Y(s) \), and an input disturbance \( D(s) \) that adds at the plant input. The Laplace-domain equations are

\[ \begin{aligned} E(s) &= R(s) - Y(s), \\ U(s) &= C(s)E(s), \\ Y(s) &= G(s)\bigl(U(s) + D(s)\bigr). \end{aligned} \]

Eliminating \(E(s)\) and \(U(s)\) gives

\[ Y(s) = G(s)\bigl(C(s)(R(s) - Y(s)) + D(s)\bigr) \quad \Rightarrow \\ \bigl(1 + G(s)C(s)\bigr)Y(s) = G(s)C(s)R(s) + G(s)D(s). \]

From this we read off the closed-loop transfer functions from reference and disturbance to the output:

\[ T_{yr}^{\text{1DOF}}(s) \equiv \frac{Y(s)}{R(s)}\Bigg|_{D(s)=0} = \frac{G(s)C(s)}{1 + G(s)C(s)}, \qquad T_{yd}^{\text{1DOF}}(s) \equiv \frac{Y(s)}{D(s)}\Bigg|_{R(s)=0} = \frac{G(s)}{1 + G(s)C(s)}. \]

Both tracking and disturbance response depend on the same loop transfer product \( G(s)C(s) \). If we adjust \( C(s) \) to improve disturbance rejection (for example by increasing low-frequency loop gain), we inevitably change the tracking dynamics (overshoot, rise time, etc.). This coupling motivates two-degree-of-freedom structures.

2. General 2-DOF Structure with Reference Prefilter

A simple but powerful 2-DOF architecture adds a reference prefilter \( Q(s) \) in the feedforward path while leaving the feedback controller \( C(s) \) unchanged. The control input is

\[ U(s) = Q(s)R(s) - C(s)Y(s), \]

and the plant still obeys \( Y(s) = G(s)\bigl(U(s) + D(s)\bigr) \). Substituting and rearranging:

\[ \begin{aligned} Y(s) &= G(s)\bigl(Q(s)R(s) - C(s)Y(s) + D(s)\bigr) \\ &= G(s)Q(s)R(s) - G(s)C(s)Y(s) + G(s)D(s), \\ \bigl(1 + G(s)C(s)\bigr)Y(s) &= G(s)Q(s)R(s) + G(s)D(s). \end{aligned} \]

Therefore the 2-DOF closed-loop transfer functions are

\[ \boxed{ T_{yr}(s) = \frac{Y(s)}{R(s)}\Bigg|_{D(s)=0} = \frac{G(s)Q(s)}{1 + G(s)C(s)}, \quad T_{yd}(s) = \frac{Y(s)}{D(s)}\Bigg|_{R(s)=0} = \frac{G(s)}{1 + G(s)C(s)} } \]

Note that \(T_{yd}(s)\) is independent of the prefilter \(Q(s)\), whereas \(T_{yr}(s)\) depends on \(Q(s)\). The closed-loop poles (roots of \(1 + G(s)C(s) = 0\)) are also independent of \(Q(s)\). Thus:

  • Feedback controller \( C(s) \) determines stability and disturbance rejection.
  • Prefilter \( Q(s) \) shapes the reference-tracking transient without affecting disturbance rejection or closed-loop poles.
flowchart LR
  R["R(s)"] --> Q["Q(s)"]
  Q --> SUM1["+ node"]
  Y["Y(s)"] -->|feedback| C["C(s)"]
  C -->|sub| SUM1
  SUM1 --> U["U(s)"]
  D["D(s)"] --> SUM2["+ node"]
  U --> SUM2
  SUM2 --> G["G(s)"]
  G --> Y
        

This structural separation explains why 2-DOF controllers are widely used in precise servo systems (robot joints, servo drives, motion stages): we can tune \( C(s) \) for robustness and disturbance attenuation, then adjust \( Q(s) \) for desired tracking performance, largely independently.

3. Separation Theorem for Reference Tracking and Disturbance Rejection

Theorem (Objective Separation in 2-DOF Architecture).

Consider the 2-DOF structure of Section 2 with plant \(G(s)\), feedback controller \(C(s)\), and prefilter \(Q(s)\). Assume the loop \(1 + G(s)C(s)\) is internally stable. Then:

  1. The transfer function from disturbance \(D(s)\) to output \(Y(s)\) is independent of \(Q(s)\) and given by \(T_{yd}(s) = \dfrac{G(s)}{1 + G(s)C(s)}\).
  2. The closed-loop poles are independent of \(Q(s)\).
  3. Any stable, proper \(Q(s)\) with unit DC gain (\(Q(0) = 1\)) preserves the steady-state error to step inputs, while modifying only the transient tracking.

Proof.

Items (1) and (2) follow directly from the identity

\[ \bigl(1 + G(s)C(s)\bigr)Y(s) = G(s)Q(s)R(s) + G(s)D(s), \]

which gives, with \(R(s) = 0\),

\[ T_{yd}(s) = \frac{Y(s)}{D(s)}\Bigg|_{R(s)=0} = \frac{G(s)}{1 + G(s)C(s)}, \]

independent of \(Q(s)\). The characteristic equation of the closed-loop system is \(1 + G(s)C(s) = 0\), which does not contain \(Q(s)\), so the poles are unaffected.

For (3), consider a unit-step reference \(r(t) = 1\), so \(R(s) = 1/s\). If the feedback loop with \(Q(s)=1\) is stable and has zero steady-state error to step (for example, due to an integrator in \(C(s)\)), then

\[ \lim_{t\to\infty} y(t) = \lim_{s\to 0} s\,T_{yr}^{\text{1DOF}}(s)R(s) = \lim_{s\to 0} T_{yr}^{\text{1DOF}}(s) = 1. \]

With prefilter \(Q(s)\), the step response is

\[ y(t) \;\text{from step}\; r(t) = 1 \quad\Rightarrow\quad \lim_{t\to\infty} y(t) = \lim_{s\to 0} s\,T_{yr}(s)R(s) = \lim_{s\to 0} \frac{G(s)Q(s)}{1 + G(s)C(s)}. \]

If \(Q(0) = 1\), then \(T_{yr}(0) = T_{yr}^{\text{1DOF}}(0)\), so the steady-state value is unchanged, while the transient behavior for finite time can be tuned by shaping \(Q(s)\). \(\square\)

4. Design Workflow: Feedback for Disturbance Rejection, Prefilter for Tracking

A practical 2-DOF design approach is:

  1. Model the plant. Obtain \(G(s)\) from physics, identification, or previous chapters.
  2. Design the feedback controller \(C(s)\). Using root locus or frequency-response methods (Bode, Nyquist), choose \(C(s)\) such that:
    • The closed-loop is stable.
    • Disturbances at key frequencies are attenuated (adequate low-frequency loop gain).
    • Noise and unmodeled high-frequency dynamics are acceptable.
  3. Freeze \(C(s)\). Once robustness and disturbance rejection are satisfactory, do not change \(C(s)\).
  4. Design \(Q(s)\) for tracking. Choose a stable, proper prefilter \(Q(s)\) (typically with \(Q(0)=1\)) so that \(T_{yr}(s) = \dfrac{G(s)Q(s)}{1+G(s)C(s)}\) matches desired transient and frequency-domain specifications (rise time, overshoot, bandwidth).
  5. Validate. Simulate step responses and disturbance responses; verify that disturbance rejection behavior is unchanged when varying \(Q(s)\).
flowchart TD
  A["Start: plant model G(s)"] --> B["Design C(s) for stability and disturbance rejection"]
  B --> C["Fix C(s) (do not change)"]
  C --> D["Compute baseline closed-loop G(s)/(1 + G(s) C(s))"]
  D --> E["Choose Q(s) with Q(0)=1"]
  E --> F["Shape T_yr(s) = G(s) Q(s)/(1 + G(s) C(s))"]
  F --> G["Simulate: step tracking"]
  D --> H["Simulate: disturbance response T_yd(s)"]
  G --> I["Iterate Q(s) if tracking not acceptable"]
  H --> I
  I --> J["Implement in real-time (e.g. robot joint)"]
        

In robotics, \(C(s)\) usually implements a robust inner-loop servo for each joint, often as a PID designed for load disturbances and friction. The prefilter \(Q(s)\) is then used to smooth commands from the motion planner (e.g., via a first-order or higher-order command shaper), improving tracking without weakening disturbance rejection.

5. Example: 2-DOF PID with Set-Point Weighting

A widely used 2-DOF PID structure in servo and robotic systems introduces set-point weights in the proportional and derivative paths. In the time domain:

\[ u(t) = K_p\bigl(b\,r(t) - y(t)\bigr) + K_i \int_0^t \bigl(r(\sigma) - y(\sigma)\bigr)\,d\sigma + K_d\bigl(c\,\dot{r}(t) - \dot{y}(t)\bigr), \]

where \(b\) and \(c\) are dimensionless weights. The Laplace-domain controller can be written as

\[ U(s) = \underbrace{\bigl(K_p b + K_i/s + K_d c s\bigr)}_{\text{prefilter }Q_{\text{PID}}(s)} R(s) - \underbrace{\bigl(K_p + K_i/s + K_d s\bigr)}_{\text{feedback }C_{\text{PID}}(s)} Y(s). \]

Comparing with the generic 2-DOF structure:

  • \(Q(s) = Q_{\text{PID}}(s)\) depends on \(b\) and \(c\).
  • \(C(s) = C_{\text{PID}}(s)\) is a standard PID, independent of \(b\), \(c\).

The disturbance transfer function is

\[ T_{yd}(s) = \frac{G(s)}{1 + G(s)C_{\text{PID}}(s)}, \]

which does not involve \(b\) or \(c\). Thus:

  • We can tune \(K_p, K_i, K_d\) for disturbance rejection and robustness.
  • We can then adjust \(b\) and \(c\) to reduce overshoot or oscillation in response to reference changes without degrading disturbance rejection.

For many servo drives and robot joints, a typical choice is \(b < 1\), which effectively reduces the proportional “kick” due to step changes in reference, while keeping integral action unweighted so that steady-state error remains small.

6. Python Lab – Simulating 1-DOF vs 2-DOF Servo for a Robot Joint

We now illustrate the effect of a prefilter \(Q(s)\) in Python using the python-control library, as commonly done in robotics research and ROS-based tooling. Consider a simplified joint model \( G(s) = \dfrac{1}{s(s+1)} \) with a PID controller.


import numpy as np
import control as ct
import matplotlib.pyplot as plt

# Plant: approximate robot joint position dynamics
# G(s) = 1 / (s (s + 1))
s = ct.TransferFunction.s
G = 1 / (s * (s + 1))

# Feedback PID controller C(s)
Kp = 30.0
Ki = 70.0
Kd = 2.0
C = Kp + Ki / s + Kd * s

# Loop transfer function
L = C * G

# 1-DOF closed-loop (no prefilter)
Tyr_1dof = ct.minreal(L / (1 + L))
Tyd_1dof = ct.minreal(G / (1 + L))  # disturbance at plant input

# 2-DOF with first-order prefilter Q(s) = 1 / (Tq s + 1)
Tq = 0.2  # prefilter time constant
Q = 1 / (Tq * s + 1)

Tyr_2dof = ct.minreal(G * Q / (1 + L))
Tyd_2dof = ct.minreal(G / (1 + L))  # same as 1-DOF

# Step response from reference
t = np.linspace(0.0, 5.0, 500)
t1, y1 = ct.step_response(Tyr_1dof, T=t)
t2, y2 = ct.step_response(Tyr_2dof, T=t)

plt.figure()
plt.plot(t1, y1, label="1-DOF tracking")
plt.plot(t2, y2, linestyle="--", label="2-DOF tracking with Q(s)")
plt.xlabel("time [s]")
plt.ylabel("joint position")
plt.legend()
plt.grid(True)

# Disturbance response: simulate step load torque at plant input
# Use superposition with D(s) entering through Tyd(s)
t3, yd1 = ct.step_response(Tyd_1dof, T=t)
t4, yd2 = ct.step_response(Tyd_2dof, T=t)

plt.figure()
plt.plot(t3, yd1, label="1-DOF disturbance response")
plt.plot(t4, yd2, linestyle="--", label="2-DOF disturbance response (same)")
plt.xlabel("time [s]")
plt.ylabel("joint position deviation")
plt.legend()
plt.grid(True)

plt.show()
      

In a robotic joint servo implemented in Python (for example via ROS 2 and rclpy plus a low-level C++ driver), \(C(s)\) would typically run at high frequency on embedded hardware, while the prefilter \(Q(s)\) could be applied to the joint reference trajectories generated by a planner. The above simulation verifies that changing \(Q(s)\) affects only tracking, not disturbance rejection.

7. C++ Implementation – 2-DOF PID Class for Embedded Robotics

The following C++ class implements a discrete-time 2-DOF PID suitable for integration in embedded controllers (for example, a ROS-based robot joint controller using ros_control and Eigen for matrix operations). The proportional and derivative terms use set-point weights \(b\) and \(c\), while integral action uses the full error.


#pragma once
#include <cmath>

class TwoDofPID
{
public:
    TwoDofPID(double kp, double ki, double kd,
              double b, double c, double dt)
        : kp_(kp), ki_(ki), kd_(kd),
          b_(b), c_(c), dt_(dt),
          integral_(0.0), y_prev_(0.0), r_prev_(0.0)
    {}

    // Update control input for new reference r and measured output y
    double update(double r, double y)
    {
        // Error for integral term
        double e = r - y;
        integral_ += e * dt_;

        // Weighted signals for derivative term
        double v  = c_ * r - y;
        double v_prev = c_ * r_prev_ - y_prev_;
        double dv = (v - v_prev) / dt_;

        // Proportional term uses weight b on reference
        double up = kp_ * (b_ * r - y);
        double ui = ki_ * integral_;
        double ud = kd_ * dv;

        // Store previous values
        y_prev_ = y;
        r_prev_ = r;

        return up + ui + ud;
    }

    void reset()
    {
        integral_ = 0.0;
        y_prev_ = 0.0;
        r_prev_ = 0.0;
    }

private:
    double kp_, ki_, kd_;
    double b_, c_;
    double dt_;
    double integral_;
    double y_prev_, r_prev_;
};
      

In a joint-level ROS controller, the inner loop would call update(r, y) at each sampling instant with the desired joint position and measured position. The choice of \(b\) and \(c\) affects only the response to changes in \(r\), not the disturbance-response characteristics of the closed loop.

8. Java Implementation – 2-DOF PID for Robot Simulation

Java is often used in educational robotics (e.g., FRC robots via WPILib). The 2-DOF PID pattern carries over directly. Below is a simple Java class implementing the same structure as in C++, suitable for simulation or integration into a higher-level robotics framework (such as WPILib or ROSJava).


public class TwoDofPID {
    private double kp, ki, kd;
    private double b, c;
    private double dt;

    private double integral;
    private double yPrev;
    private double rPrev;

    public TwoDofPID(double kp, double ki, double kd,
                     double b, double c, double dt) {
        this.kp = kp;
        this.ki = ki;
        this.kd = kd;
        this.b = b;
        this.c = c;
        this.dt = dt;
        reset();
    }

    public double update(double r, double y) {
        double e = r - y;
        integral += e * dt;

        double v = c * r - y;
        double vPrev = c * rPrev - yPrev;
        double dv = (v - vPrev) / dt;

        double up = kp * (b * r - y);
        double ui = ki * integral;
        double ud = kd * dv;

        yPrev = y;
        rPrev = r;

        return up + ui + ud;
    }

    public void reset() {
        integral = 0.0;
        yPrev = 0.0;
        rPrev = 0.0;
    }
}
      

During simulation of a robot arm, one can experiment with different values of \(b\) and \(c\) to reduce overshoot on the joint reference trajectory while leaving disturbance rejection (due to the closed-loop term with \(C(s)\)) unchanged.

9. MATLAB/Simulink – Analytical Design of \( Q(s) \) Given \( C(s) \)

In MATLAB, we can explicitly compute the closed-loop transfer functions and synthesize a prefilter \(Q(s)\) to approximate a desired second-order behavior. Suppose we have designed \(C(s)\) for a plant \(G(s)\) and want the tracking response to match a second-order model

\[ M(s) = \frac{\omega_n^2}{s^2 + 2\zeta\omega_n s + \omega_n^2}. \]

With 2-DOF architecture, we set \( T_{yr}(s) = \dfrac{G(s)Q(s)}{1 + G(s)C(s)} \approx M(s) \), so formally

\[ Q_{\text{ideal}}(s) = M(s)\,\frac{1 + G(s)C(s)}{G(s)}. \]

We then approximate \(Q_{\text{ideal}}(s)\) by a stable, proper rational function (e.g., by canceling high-frequency factors). The following MATLAB code illustrates this workflow:


% Plant and feedback controller
s = tf('s');
G = 1 / (s * (s + 1));

Kp = 30; Ki = 70; Kd = 2;
C = Kp + Ki / s + Kd * s;

L = C * G;

% Disturbance transfer function (independent of Q)
Tyd = minreal(G / (1 + L));

% Desired second-order tracking model
zeta = 0.7;
wn   = 4.0;
M    = wn^2 / (s^2 + 2*zeta*wn*s + wn^2);

% Ideal prefilter (may be non-proper)
Q_ideal = minreal(M * (1 + L) / G);

% Approximate Q(s) by a first-order model with unit DC gain
Tq = 0.2;
Q = 1 / (Tq * s + 1);

% 2-DOF tracking transfer function
Tyr = minreal(G * Q / (1 + L));

figure; step(Tyr); grid on;
title('2-DOF tracking with prefilter Q(s)');

figure; step(Tyd); grid on;
title('Disturbance response T_{yd}(s) (unchanged by Q)');
      

In Simulink, the same 2-DOF structure can be realized by placing the PID Controller block in the feedback path and a Transfer Fcn block implementing \(Q(s)\) in the reference path, feeding the sum block that computes the control input.

10. Wolfram Mathematica – Symbolic Verification of Separation

Mathematica can be used to symbolically verify that the disturbance transfer function is independent of \(Q(s)\), and to manipulate algebraic forms of closed-loop transfer functions. The following code defines generic \(G(s)\), \(C(s)\), \(Q(s)\) and derives \(T_{yr}(s)\) and \(T_{yd}(s)\).


ClearAll["Global`*"];

(* Symbolic Laplace variable *)
s =.; (* symbolic s *)

(* Generic transfer functions as symbols *)
G[s_] := Subscript[G, 0][s];
C[s_] := Subscript[C, 0][s];
Q[s_] := Subscript[Q, 0][s];

(* 2-DOF equations:
   (1 + G C) Y = G Q R + G D
*)
Y[s_] =.;
R[s_] =.;
D[s_] =.;

eq = (1 + G[s] C[s]) Y[s] == G[s] Q[s] R[s] + G[s] D[s];

(* Solve for Y in terms of R and D *)
Ysol = Solve[eq, Y[s]][[1, 1, 2]] // Simplify

(* Extract transfer functions *)
Tyr[s_] = Simplify[Coefficient[Ysol, R[s]]];
Tyd[s_] = Simplify[Coefficient[Ysol, D[s]]];

Tyr[s]
Tyd[s]

(* Check that Tyd does not contain Q[s] *)
FreeQ[Tyd[s], Q[s]]
      

The last command FreeQ returns True, confirming at the symbolic level that \(T_{yd}(s)\) does not depend on \(Q(s)\). For a specific robot joint model, one can substitute explicit rational forms for \(G(s)\), \(C(s)\), and candidate \(Q(s)\), then use Mathematica to analyze pole locations and transient behavior.

11. Problems and Solutions

Problem 1 (Deriving 2-DOF Transfer Functions). Consider the 2-DOF architecture with prefilter \(Q(s)\), feedback controller \(C(s)\), plant \(G(s)\), reference \(R(s)\), and disturbance \(D(s)\) at the plant input. Derive \(T_{yr}(s)\) and \(T_{yd}(s)\).

Solution.

We have

\[ U(s) = Q(s)R(s) - C(s)Y(s), \qquad Y(s) = G(s)\bigl(U(s) + D(s)\bigr). \]

Substitute \(U(s)\) into the second equation:

\[ \begin{aligned} Y(s) &= G(s)\bigl(Q(s)R(s) - C(s)Y(s) + D(s)\bigr) \\ &= G(s)Q(s)R(s) - G(s)C(s)Y(s) + G(s)D(s). \end{aligned} \]

Collecting terms in \(Y(s)\) gives

\[ \bigl(1 + G(s)C(s)\bigr)Y(s) = G(s)Q(s)R(s) + G(s)D(s). \]

With \(D(s)=0\) we obtain

\[ T_{yr}(s) = \frac{Y(s)}{R(s)}\Bigg|_{D(s)=0} = \frac{G(s)Q(s)}{1 + G(s)C(s)}. \]

With \(R(s)=0\) we obtain

\[ T_{yd}(s) = \frac{Y(s)}{D(s)}\Bigg|_{R(s)=0} = \frac{G(s)}{1 + G(s)C(s)}. \]

Thus \(T_{yd}(s)\) is independent of \(Q(s)\).


Problem 2 (Closed-Loop Poles Independent of \( Q(s) \)). Show that the closed-loop poles of the 2-DOF system derived in Problem 1 do not depend on \(Q(s)\).

Solution.

The characteristic equation of the closed-loop system corresponds to the denominator of \(T_{yr}(s)\) and \(T_{yd}(s)\), which is \(1 + G(s)C(s)\). Since \(Q(s)\) appears only in the numerator of \(T_{yr}(s)\) and not in \(1 + G(s)C(s)\), the closed-loop poles (roots of \(1 + G(s)C(s)\)) are independent of \(Q(s)\). Changing \(Q(s)\) can modify zeros and gains, but not poles.


Problem 3 (Steady-State Error with Unit-DC Prefilter). Suppose a 1-DOF feedback loop with plant \(G(s)\) and controller \(C(s)\) is stable and has zero steady-state error to a unit step input. Show that adding a prefilter \(Q(s)\) with \(Q(0)=1\) does not change the steady-state output for a unit step reference.

Solution.

Without prefilter, the tracking transfer function is \(T_{yr}^{\text{1DOF}}(s) = \dfrac{G(s)C(s)}{1 + G(s)C(s)}\). Zero steady-state error to a unit step means

\[ \lim_{t\to\infty} y(t) = \lim_{s\to 0} s\,T_{yr}^{\text{1DOF}}(s)\frac{1}{s} = \lim_{s\to 0} T_{yr}^{\text{1DOF}}(s) = 1. \]

With prefilter, the tracking transfer function is \(T_{yr}(s) = \dfrac{G(s)Q(s)}{1 + G(s)C(s)}\), so for a unit step:

\[ \lim_{t\to\infty} y(t) = \lim_{s\to 0} s\,T_{yr}(s)\frac{1}{s} = \lim_{s\to 0} \frac{G(s)Q(s)}{1 + G(s)C(s)} = Q(0)\,\lim_{s\to 0} T_{yr}^{\text{1DOF}}(s). \]

If \(Q(0) = 1\), the steady-state output is still \(1\), so the steady-state error remains zero.


Problem 4 (Designing a First-Order Prefilter). A robot joint is modeled by \(G(s) = \dfrac{1}{s(s+2)}\). A PI controller \(C(s) = K_p + K_i/s\) has been tuned so that the 1-DOF closed loop has acceptable disturbance rejection but exhibits excessive overshoot for step references. Propose a first-order prefilter \(Q(s) = \dfrac{1}{T_q s + 1}\) and explain qualitatively how changing \(T_q\) affects tracking and disturbance rejection.

Solution.

The 2-DOF tracking transfer function is \(T_{yr}(s) = \dfrac{G(s)Q(s)}{1 + G(s)C(s)}\). Increasing \(T_q\) makes \(Q(s)\) slower, effectively smoothing the reference step into a ramp-like signal. This reduces the effective slope and amplitude of the input as seen by the closed loop, thereby reducing overshoot and peak control effort. However, since \(T_{yd}(s) = \dfrac{G(s)}{1 + G(s)C(s)}\) does not depend on \(Q(s)\), disturbance rejection is not affected by \(T_q\).


Problem 5 (Decision Flow Between 1-DOF and 2-DOF Controllers). You are designing a joint controller for a robotic arm. You first design \(C(s)\) using classical methods and obtain satisfactory disturbance rejection, but the tracking transient is not acceptable. Sketch a conceptual flow that justifies switching from a 1-DOF to a 2-DOF implementation and indicates the subsequent steps.

Solution (conceptual flow).

flowchart TD
  S["Start with 1-DOF design"] --> T1["Tune C(s) for stability and disturbance rejection"]
  T1 --> E1["Evaluate tracking (overshoot, rise time)"]
  E1 -->|tracking acceptable| DONE["Keep 1-DOF implementation"]
  E1 -->|tracking poor| UPG["Introduce prefilter Q(s) (2-DOF)"]
  UPG --> D1["Choose Q(s) with Q(0)=1"]
  D1 --> SIM["Simulate tracking and disturbance"]
  SIM -->|disturbance changed| RETUNE["Retune C(s) (feedback loop)"]
  SIM -->|disturbance preserved| ACCEPT["Accept 2-DOF design for implementation"]
        

The key justification is that a prefilter offers extra freedom to improve tracking without re-tuning disturbance rejection, as long as the feedback controller \(C(s)\) remains unchanged and the loop \(1 + G(s)C(s)\) preserves its robustness properties.

12. Summary

In this lesson we showed that introducing a two-degree-of-freedom structure with a prefilter \(Q(s)\) allows partial decoupling between reference tracking and disturbance rejection. For the generic 2-DOF architecture, the disturbance transfer function and closed-loop poles depend only on the feedback loop \(G(s)C(s)\), while tracking is shaped by both \(G(s)C(s)\) and \(Q(s)\). This provides a clean workflow: first design \(C(s)\) for stability and disturbance rejection using classical tools; then, holding \(C(s)\) fixed, design \(Q(s)\) for tracking specifications with unit DC gain to preserve steady-state accuracy. We illustrated these ideas with 2-DOF PID controllers and implementations in Python, C++, Java, MATLAB/Simulink, and Mathematica, emphasizing their relevance for robotic servo control.

13. References

  1. Horowitz, I. M. (1963). Synthesis of Feedback Systems. Academic Press.
  2. Horowitz, I. M., & Sidi, M. (1972). Synthesis of 2-degrees-of-freedom feedback control systems for disturbed plants. International Journal of Control, 16(2), 287–309.
  3. Åström, K. J., & Wittenmark, B. (1984). Self-tuning controllers based on pole-zero placement. International Journal of Control, 20(3), 465–483.
  4. Åström, K. J., & Hägglund, T. (1995). PID Controllers: Theory, Design, and Tuning. Instrument Society of America. (Chapters on 2-DOF PID control).
  5. Chen, J., & Francis, B. A. (1995). Optimal Sampled-Data Control Systems. Springer. (Sections on two-degree-of-freedom designs and tracking/regulation separation).
  6. Hara, S., Yamamoto, Y., Omata, T., & Nakano, M. (1988). Repetitive control system: A new type servo system for periodic exogenous signals. IEEE Transactions on Automatic Control, 33(7), 659–668.
  7. Skogestad, S., & Postlethwaite, I. (2005). Multivariable Feedback Control: Analysis and Design, 2nd ed. Wiley. (Sections on two-degree-of-freedom control and performance versus robustness).