Chapter 27: Disturbance Rejection and Reference Tracking Design

Lesson 2: Design for Set-Point Tracking Quality

This lesson develops systematic design methods to achieve high-quality set-point tracking in linear feedback systems. We connect time-domain specifications (overshoot, rise time, settling time) and frequency-domain shaping of the complementary sensitivity function to concrete controller structures such as 2-DOF PID and reference prefilters, with a particular eye toward robotics servo systems (e.g., robot joints and drive axes).

1. Conceptual Overview of Set-Point Tracking Quality

In a standard single-input single-output (SISO) feedback system, the control objective for tracking is that the output \( y(t) \) follows the reference (set-point) \( r(t) \) with:

  • Small transient error (limited overshoot, short rise and settling time).
  • Small steady-state error (often zero for steps or ramps).
  • Acceptable control effort and actuator usage.
  • Robustness to model uncertainty and disturbances (coherent with Lesson 1).

For a unity-feedback system with controller \( C(s) \) and plant \( G(s) \), the Laplace transforms of the reference, output, and error are denoted \( R(s) \), \( Y(s) \), and \( E(s)=R(s)-Y(s) \), respectively. The closed-loop transfer function from reference to output is the complementary sensitivity function:

\[ T(s) \equiv \frac{Y(s)}{R(s)} = \frac{C(s)G(s)}{1 + C(s)G(s)}. \]

Tracking quality is therefore determined by the shape of \( T(s) \) in the frequency domain and by the associated closed-loop pole locations in the time domain.

A typical design workflow for set-point tracking is summarized below.

flowchart TD
  RQ["Tracking requirements (step, ramp, limits)"] --> TS["Convert to time-domain specs"]
  TS --> PL["Map specs to desired pole locations"]
  PL --> CS["Choose controller structure (PID / lead-lag / 2-DOF)"]
  CS --> NU["Adjust numerator (weights, filters) for set-point response"]
  NU --> SI["Simulate and check time + frequency responses"]
  SI --> HW["Deploy on 'robot joint' or actuator"]
        

In this lesson we focus on shaping \( T(s) \) using numerator adjustments (two-degree-of-freedom controllers and prefilters), while assuming that the denominator (closed-loop poles) has already been chosen to satisfy stability and regulation constraints from previous chapters.

2. Closed-Loop Tracking Transfer Functions and Prefilters

Consider a unity-feedback system with an additional reference prefilter \( F(s) \) placed before the summing junction:

flowchart LR
  R["Reference r"] --> F["Prefilter F(s)"]
  F --> SUM["Sum: r_f - y"]
  Y["Output y"] -->|"feedback"| SUM
  SUM --> C["Controller C(s)"]
  C --> G["Plant G(s)"]
  G --> Y
        

Let \( R(s) \) be the Laplace transform of the original reference and define filtered reference \( R_f(s) = F(s)R(s) \). With controller \( C(s) \) and plant \( G(s) \), we have:

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

Solving for \( Y(s) \) in terms of \( R(s) \) gives:

\[ \bigl(1 + C(s)G(s)\bigr)Y(s) = C(s)G(s)F(s)R(s) \quad \Longrightarrow \quad \frac{Y(s)}{R(s)} = T_F(s) = \frac{F(s)C(s)G(s)}{1 + C(s)G(s)}. \]

Crucially, the denominator (and hence the closed-loop poles) is \( 1 + C(s)G(s) \) and does not depend on the choice of \( F(s) \). The prefilter \( F(s) \) only modifies the numerator, and therefore the zero locations of \( T_F(s) \).

This separation allows the following strategy:

  1. First design \( C(s) \) for stability, regulation, and desired closed-loop poles.
  2. Then design \( F(s) \) to shape the set-point response (reduce overshoot, limit command slope, etc.) without altering stability.

In later sections, we will exploit similar ideas using two-degree-of-freedom (2-DOF) PID controllers, where the set-point path and feedback path can be adjusted independently.

3. Time-Domain Tracking Specs and Closed-Loop Pole Selection

For many servo systems (e.g., robot joint position control), the closed-loop behavior can be approximated by a dominant second-order system for step tracking:

\[ T_{\text{des}}(s) = \frac{\omega_n^2}{s^2 + 2\zeta\omega_n s + \omega_n^2}, \]

where \( \omega_n \) is the natural frequency and \( \zeta \) is the damping ratio. From earlier chapters, the key approximate relations for a unit step input are:

\[ \begin{aligned} M_p &\approx \exp\!\left( -\frac{\pi \zeta}{\sqrt{1-\zeta^2}} \right), \\ t_s &\approx \frac{4}{\zeta \omega_n} \quad\text{(2% settling time criterion)}, \\ t_r &\approx \frac{1.8}{\omega_n} \quad\text{(rise time, typical for intermediate } \zeta\text{)}. \end{aligned} \]

Given desired bounds on overshoot \( M_p \), settling time \( t_s \), and possibly rise time \( t_r \), we can choose \( \zeta \) and \( \omega_n \), and therefore the desired dominant poles:

\[ s_{1,2} = -\zeta\omega_n \pm j\omega_n\sqrt{1-\zeta^2}. \]

For a double-integrator-like plant, a particularly important case in robotics is:

\[ G(s) = \frac{1}{s^2}, \]

which models the relation between torque input and angular position for a rigid joint with negligible damping and gearing (after suitable normalization). A proportional-derivative (PD) controller \( C(s)=K_d s + K_p \) yields the closed-loop:

\[ T(s) = \frac{K_d s + K_p}{s^2 + K_d s + K_p}. \]

Matching this denominator to the desired canonical form gives:

\[ K_d = 2\zeta\omega_n, \qquad K_p = \omega_n^2. \]

Thus, once \( \zeta \) and \( \omega_n \) are selected from tracking specs, PD gains are obtained directly. Since \( G(s) \) contains two integrators, the resulting closed loop is type 1 and achieves zero steady-state error for step commands.

4. Two-Degree-of-Freedom PID and Set-Point Weighting

Classical single-degree-of-freedom PID uses the same error \( e(t)=r(t)-y(t) \) for proportional, integral, and derivative actions. A two-degree-of-freedom PID (2-DOF PID) separates the effect of the reference in these terms via set-point weights:

\[ u(t) = K_p\bigl(\beta r(t) - y(t)\bigr) + K_i \int_0^t \bigl(r(\sigma) - y(\sigma)\bigr)\,d\sigma + K_d\frac{d}{dt}\bigl(\gamma r(t) - y(t)\bigr), \]

where \( \beta \) and \( \gamma \) are scalar weights:

  • \( \beta \) affects the proportional response to set-point steps.
  • \( \gamma \) affects the derivative anticipation of set-point changes.
  • The integral still acts on the true tracking error to remove steady-state error.

Taking Laplace transforms and denoting \( R(s) \), \( Y(s) \), \( U(s) \) as before:

\[ \begin{aligned} U(s) &= K_p\bigl(\beta R(s) - Y(s)\bigr) + \frac{K_i}{s}\bigl(R(s) - Y(s)\bigr) + K_d s\bigl(\gamma R(s) - Y(s)\bigr) \\ &= C_r(s)R(s) - C_y(s)Y(s), \end{aligned} \]

where we define:

\[ C_r(s) = K_p\beta + \frac{K_i}{s} + K_d\gamma s, \qquad C_y(s) = K_p + \frac{K_i}{s} + K_d s. \]

With plant \( G(s) \), the output is \( Y(s) = G(s)U(s) \), so

\[ Y(s) = G(s)\bigl(C_r(s)R(s) - C_y(s)Y(s)\bigr) \quad\Longrightarrow\quad \bigl(1 + G(s)C_y(s)\bigr)Y(s) = G(s)C_r(s)R(s). \]

Thus the tracking transfer function is

\[ \frac{Y(s)}{R(s)} = T_{2\text{DOF}}(s) = \frac{G(s)C_r(s)}{1 + G(s)C_y(s)}. \]

The key structural result is that:

  • The denominator depends only on \( C_y(s) \), i.e., on \( K_p, K_i, K_d \).
  • The set-point weights \( \beta \) and \( \gamma \) appear only in the numerator through \( C_r(s) \).

Consequently, one can:

  1. Design \( K_p, K_i, K_d \) (using pole placement or frequency shaping) to guarantee stability and good disturbance rejection.
  2. Adjust \( \beta \) and \( \gamma \) afterwards to reduce overshoot or oscillations in set-point response, without affecting closed-loop poles.

A common practical choice is:

  • \( \beta \approx 0.5 \) to reduce step overshoot compared to the standard choice \( \beta=1 \).
  • \( \gamma=0 \) so that derivative action is applied only to the measured output, not to the set-point (reducing noise sensitivity and "kick").

5. Reference Prefilters for Command Shaping

Even with optimally chosen closed-loop poles, a step command can excite nonminimum-phase zeros or high-frequency dynamics, leading to excessive overshoot or actuator saturation. A reference prefilter \( F(s) \) shapes the command before it enters the feedback loop:

\[ T_F(s) = \frac{Y(s)}{R(s)} = F(s)T_0(s), \qquad T_0(s) = \frac{C(s)G(s)}{1 + C(s)G(s)}. \]

Because \( F(s) \) multiplies \( T_0(s) \) without modifying its poles, we can choose \( F(s) \) to attenuate high-frequency content of the command:

\[ F(s) = \frac{\omega_f}{s + \omega_f}, \]

with cutoff frequency \( \omega_f \) chosen slightly below the desired closed-loop bandwidth. For a unit step input, the effective command becomes a first-order ramped step, which reduces the initial acceleration demand on the plant (critical for physical joints with torque limits).

For more refined shaping, one can approximate a desired second-order reference model:

\[ F(s) = \frac{\omega_{f}^2}{s^2 + 2\zeta_f\omega_f s + \omega_f^2} \quad\text{and choose } \zeta_f,\omega_f \text{ to match actuator limits or jerk constraints.} \]

In robotics, such prefilters are often used to convert abrupt position commands into smooth motion profiles compatible with actuator and mechanical constraints, while the feedback loop maintains accuracy.

6. Frequency-Domain View of Tracking Quality

For a sinusoidal reference \( r(t) = A\sin(\omega_r t) \), the steady-state output satisfies:

\[ y(t) \approx \bigl|T(j\omega_r)\bigr|A \sin\bigl(\omega_r t + \angle T(j\omega_r)\bigr). \]

The tracking amplitude error is quantified by

\[ E_{\text{amp}}(\omega_r) = \bigl|1 - T(j\omega_r)\bigr|. \]

For good tracking up to a specified frequency band \( [0,\omega_{\text{track}}] \), a typical design requirement is

\[ \bigl|T(j\omega)\bigr| \approx 1 \quad\text{for all } \omega \in [0,\omega_{\text{track}}], \]

which implies that the loop gain \( |C(j\omega)G(j\omega)| \) is large in that band. However, large loop gain at high frequencies increases sensitivity to measurement noise and unmodeled dynamics. Thus, shaping \( T(s) \) and the sensitivity function \( S(s) = 1/(1+C(s)G(s)) \) involves trade-offs:

  • High \( |T(j\omega)| \) at low frequencies for good tracking.
  • Low \( |T(j\omega)| \) at high frequencies to avoid amplifying noise.
  • Stable and well-damped closed-loop poles for good transient behavior.

Two-degree-of-freedom controllers and prefilters give extra freedom in shaping \( T(s) \) (tracking) independently from \( S(s) \) (regulation and robustness).

7. Python Implementation — Set-Point Tracking for a Robot Joint

We now implement a PD controller (with optional prefilter) for a double-integrator plant approximating a robot joint: \( G(s) = 1/s^2 \). We use the python-control library together with numpy.


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

# Double-integrator plant: G(s) = 1 / s^2
s = ctrl.TransferFunction.s
G = 1 / s**2

# Design specs
Mp_max = 0.10     # 10% overshoot (approx)
zeta = 0.6        # typical damping for ~10% overshoot
ts_des = 1.0      # desired 2% settling time [s]

# Natural frequency from ts ≈ 4/(zeta*omega_n)
omega_n = 4.0 / (zeta * ts_des)   # ≈ 6.666...

# PD gains for canonical second-order closed loop
Kd = 2.0 * zeta * omega_n         # ≈ 8.0
Kp = omega_n**2                   # ≈ 44.4

C_pd = Kd * s + Kp

# Closed-loop from reference to output without prefilter
T0 = ctrl.feedback(C_pd * G, 1)

# Add a first-order prefilter F(s) to smooth the command
omega_f = 0.7 * omega_n           # slightly below closed-loop bandwidth
F = omega_f / (s + omega_f)

# Prefiltered tracking transfer: T = F * T0
T = ctrl.minreal(F * T0)

# Step responses
t = np.linspace(0, 3, 1000)
t1, y_no_pref = ctrl.step_response(T0, T=t)
t2, y_pref = ctrl.step_response(T, T=t)

plt.figure()
plt.plot(t1, y_no_pref, label="Without prefilter")
plt.plot(t2, y_pref, label="With prefilter F(s)")
plt.axhline(1.0, color="k", linestyle="--", linewidth=0.8)
plt.xlabel("Time [s]")
plt.ylabel("Output position")
plt.grid(True)
plt.legend()
plt.title("Set-point tracking for robot joint (double integrator + PD)")
plt.show()
      

In a robotics context (e.g., ROS), the output of this simulation can be used to tune gains before implementing a discrete-time version in a real-time control loop:


# Sketch of ROS integration (position command for a joint)
import rospy
from std_msgs.msg import Float64

rospy.init_node("joint_pid_controller")
cmd_pub = rospy.Publisher("/joint1_position_controller/command",
                          Float64, queue_size=1)

# In a real-time loop:
#   1. Read current joint position y.
#   2. Compute control torque u using discrete-time version of PD/2-DOF PID.
#   3. Publish u via cmd_pub.
      

Robotics-related Python libraries that can be combined with this approach include ROS (via rospy), the python-control package for classical design, and toolkits such as modern_robotics for kinematics and dynamics.

8. C++ Implementation — 2-DOF PID in a Robotics Loop

The following C++ code shows a discrete-time 2-DOF PID controller suitable for use in a robotics middleware such as ROS. We use the roscpp client library and can optionally use Eigen for linear algebra elsewhere in the robot stack.


#include <ros/ros.h>
#include <std_msgs/Float64.h>

class TwoDofPID {
public:
  TwoDofPID(double Kp, double Ki, double Kd,
            double beta, double gamma, double Ts)
    : Kp_(Kp), Ki_(Ki), Kd_(Kd),
      beta_(beta), gamma_(gamma), Ts_(Ts),
      e_int_(0.0),
      r_prev_(0.0), r_prev2_(0.0),
      y_prev_(0.0), y_prev2_(0.0) {}

  double update(double r, double y) {
    // Tracking error
    double e = r - y;

    // Integral term (simple rectangular integration)
    e_int_ += e * Ts_;

    // "Weighted" signals for proportional and derivative actions
    double r_beta = beta_ * r;
    double r_gamma = gamma_ * r;

    // Discrete derivative approximation (second-order backward difference)
    double dr = (r_gamma - 2.0 * r_prev_ + r_prev2_) / (Ts_ * Ts_);
    double dy = (y - 2.0 * y_prev_ + y_prev2_) / (Ts_ * Ts_);

    double u =
      Kp_ * (r_beta - y) +        // proportional
      Ki_ * e_int_ +             // integral
      Kd_ * (dr - dy);           // derivative on weighted reference and output

    // Shift histories
    r_prev2_ = r_prev_;
    r_prev_  = r_gamma;
    y_prev2_ = y_prev_;
    y_prev_  = y;

    return u;
  }

private:
  double Kp_, Ki_, Kd_;
  double beta_, gamma_;
  double Ts_;
  double e_int_;
  double r_prev_, r_prev2_;
  double y_prev_, y_prev2_;
};

int main(int argc, char** argv) {
  ros::init(argc, argv, "joint_2dof_pid");
  ros::NodeHandle nh;

  // Example parameters (would be loaded from ROS params)
  double Kp = 44.4;
  double Ki = 10.0;
  double Kd = 8.0;
  double beta = 0.5;
  double gamma = 0.0;
  double Ts = 0.001; // 1 ms

  TwoDofPID pid(Kp, Ki, Kd, beta, gamma, Ts);

  ros::Publisher cmd_pub =
    nh.advertise<std_msgs::Float64>("/joint1_effort_controller/command", 1);

  ros::Rate rate(1.0 / Ts);

  double r = 1.0;   // desired joint angle [rad]

  while (ros::ok()) {
    // Here we would read the measured joint position y from a topic or interface
    double y_meas = /* read from hardware or simulation */ 0.0;

    double u = pid.update(r, y_meas);

    std_msgs::Float64 msg;
    msg.data = u;
    cmd_pub.publish(msg);

    ros::spinOnce();
    rate.sleep();
  }
  return 0;
}
      

This template cleanly separates set-point weights \( \beta \), \( \gamma \) from the PID gains, enabling tuning for both regulation and tracking. Robotics frameworks such as ros_control or real-time middleware (e.g., Orocos) can integrate this controller within a broader robot control architecture.

9. Java Implementation — Set-Point Tracking Controller Skeleton

Java is often used in educational robotics platforms (for example, FRC robots via WPILib). Below is a simple 2-DOF PID-like controller class for set-point tracking. Linear algebra or optimization tasks can be supported with libraries such as Apache Commons Math or EJML.


public class TwoDofPIDController {
    private double Kp, Ki, Kd;
    private double beta, gamma;
    private double Ts;

    private double eInt = 0.0;
    private double rPrev = 0.0, rPrev2 = 0.0;
    private double yPrev = 0.0, yPrev2 = 0.0;

    public TwoDofPIDController(double Kp, double Ki, double Kd,
                               double beta, double gamma, double Ts) {
        this.Kp = Kp;
        this.Ki = Ki;
        this.Kd = Kd;
        this.beta = beta;
        this.gamma = gamma;
        this.Ts = Ts;
    }

    public double update(double r, double y) {
        double e = r - y;
        eInt += e * Ts;

        double rBeta = beta * r;
        double rGamma = gamma * r;

        double dr = (rGamma - 2.0 * rPrev + rPrev2) / (Ts * Ts);
        double dy = (y - 2.0 * yPrev + yPrev2) / (Ts * Ts);

        double u = Kp * (rBeta - y) + Ki * eInt + Kd * (dr - dy);

        rPrev2 = rPrev;
        rPrev = rGamma;
        yPrev2 = yPrev;
        yPrev = y;

        return u;
    }
}
      

In a robotics project, the update method would be called in a periodic loop (e.g., every few milliseconds), and the returned control command would be sent to a motor controller. Java-based robot libraries such as WPILib already contain PID controllers; understanding the structure of 2-DOF PID helps interpret and extend these implementations for improved tracking.

10. MATLAB/Simulink Implementation — Designing a Prefilter

In MATLAB, the design of \( C(s) \) and \( F(s) \) and their integration into a simulation is straightforward with the Control System Toolbox. The following script implements the PD design from Section 3 with a first-order prefilter.


s = tf('s');

% Double integrator plant
G = 1 / s^2;

% Design choices (same as Python example)
zeta = 0.6;
ts_des = 1.0;
omega_n = 4 / (zeta * ts_des);

Kd = 2 * zeta * omega_n;
Kp = omega_n^2;

C_pd = Kd * s + Kp;

% Closed-loop tracking without prefilter
T0 = feedback(C_pd * G, 1);

% First-order prefilter F(s)
omega_f = 0.7 * omega_n;
F = omega_f / (s + omega_f);

% Prefiltered tracking transfer function
T = minreal(F * T0);

figure;
step(T0, 'b--', T, 'r-', 3); % simulate 3 seconds
grid on;
legend('Without prefilter', 'With prefilter');
title('Set-point tracking with PD controller and prefilter');

% In Simulink:
%  - Use Transfer Fcn blocks for G(s), C_pd(s), and F(s)
%  - Connect F(s) in series with the reference input
%  - Use Sum blocks to form the error and feedback paths
      

In robotics, the same design can be deployed to servo motors and robot joints using Simulink models combined with the Robotics System Toolbox, enabling hardware-in-the-loop experiments with actuators and sensors.

11. Wolfram Mathematica Implementation — Symbolic and Numeric Design

Mathematica can be used to manipulate transfer functions symbolically, derive closed-loop expressions, and verify tracking properties analytically before numeric simulation.


(* Define Laplace variable and transfer functions *)
s = LaplaceTransformVariable;

G = TransferFunctionModel[1/{1, 0, 0}, s]; (* 1/s^2 *)

zeta = 3/5;  (* 0.6 *)
tsDes = 1.0;
omegaN = 4/(zeta*tsDes);

Kd = 2*zeta*omegaN;
Kp = omegaN^2;

Cpd = TransferFunctionModel[{Kd, Kp}, {1, 0}, s]; (* Kd*s + Kp *)

(* Closed loop without prefilter *)
T0 = SystemsModelFeedbackConnect[Cpd*G, 1];

(* First-order prefilter *)
omegaF = 7*omegaN/10;
F = TransferFunctionModel[{omegaF}, {1, omegaF}, s];

T = SystemsModelSeries[F, T0];

(* Step responses *)
StepResponsePlot[{T0, T}, {t, 0, 3},
  PlotLegends -> {"Without prefilter", "With prefilter"},
  PlotTheme -> "Detailed",
  AxesLabel -> {"t [s]", "y(t)"}]
      

Symbolic capabilities allow, for example, exact derivation of the closed-loop numerator and denominator, leading to explicit formulas for overshoot and settling time as functions of the design parameters.

12. Problems and Solutions

Problem 1 (PD Design for Set-Point Tracking): Consider the double-integrator plant \( G(s) = 1/s^2 \) with PD controller \( C(s) = K_d s + K_p \). For a unit step set-point:

  1. Derive the closed-loop transfer function \( T(s) = Y(s)/R(s) \).
  2. Show that choosing \( K_d = 2\zeta\omega_n \) and \( K_p = \omega_n^2 \) yields canonical second-order form with natural frequency \( \omega_n \) and damping ratio \( \zeta \).

Solution:

(a) Unity feedback with controller \( C(s) \) and plant \( G(s) \) gives:

\[ T(s) = \frac{C(s)G(s)}{1 + C(s)G(s)} = \frac{(K_d s + K_p)\frac{1}{s^2}} {1 + (K_d s + K_p)\frac{1}{s^2}} = \frac{K_d s + K_p}{s^2 + K_d s + K_p}. \]

(b) The denominator is \( s^2 + K_d s + K_p \). To match the canonical form

\[ s^2 + 2\zeta\omega_n s + \omega_n^2, \]

we equate coefficients:

\[ K_d = 2\zeta\omega_n, \qquad K_p = \omega_n^2. \]

Therefore, for \( G(s) = 1/s^2 \), PD gains can be selected directly from the desired \( \zeta \) and \( \omega_n \), giving the canonical second-order closed-loop response.

Problem 2 (Choosing Gains from Time-Domain Specs): For the plant and controller in Problem 1, design a PD controller to achieve approximately 10% overshoot and 1 second 2% settling time for a unit step.

Solution:

A damping ratio of about \( \zeta \approx 0.6 \) yields approximately 10% overshoot. The settling time relation \( t_s \approx 4/(\zeta\omega_n) \) gives:

\[ \omega_n = \frac{4}{\zeta t_s} = \frac{4}{0.6 \cdot 1} \approx 6.67 \text{ rad/s}. \]

Then:

\[ \begin{aligned} K_d &= 2\zeta\omega_n \approx 2 \cdot 0.6 \cdot 6.67 \approx 8.0, \\ K_p &= \omega_n^2 \approx (6.67)^2 \approx 44.4. \end{aligned} \]

These values provide a good initial design that can be refined via simulation or experimentation.

Problem 3 (Denominator Independence in 2-DOF PID): For the 2-DOF PID structure in Section 4, with \( C_r(s) \) and \( C_y(s) \) as defined there, show that the closed-loop denominator depends only on \( C_y(s) \) and not on the set-point weights \( \beta \), \( \gamma \).

Solution:

Starting from \( U(s) = C_r(s)R(s) - C_y(s)Y(s) \) and \( Y(s) = G(s)U(s) \), we obtain

\[ Y(s) = G(s)\bigl(C_r(s)R(s) - C_y(s)Y(s)\bigr) \quad\Longrightarrow\quad \bigl(1 + G(s)C_y(s)\bigr) Y(s) = G(s)C_r(s)R(s). \]

The closed-loop transfer function is therefore:

\[ \frac{Y(s)}{R(s)} = \frac{G(s)C_r(s)}{1 + G(s)C_y(s)}. \]

The denominator \( 1 + G(s)C_y(s) \) involves only \( C_y(s) \), which depends on \( K_p, K_i, K_d \) but not on the weights \( \beta \), \( \gamma \). Thus, the set-point weights cannot affect closed-loop pole locations; they only influence the numerator and hence the shape of the step response.

Problem 4 (Effect of a First-Order Prefilter on Step Tracking): Let \( T_0(s) \) denote the closed-loop transfer function of a stable unity-feedback system. A first-order prefilter \( F(s) = \omega_f/(s + \omega_f) \) is applied to the reference. For a unit step input, derive the Laplace transform of the effective command \( R_f(s) \) entering the loop and comment on how \( \omega_f \) affects the speed of the commanded trajectory.

Solution:

The Laplace transform of a unit step is \( R(s) = 1/s \). With prefilter \( F(s) \), the effective command is \( R_f(s) = F(s)R(s) \):

\[ R_f(s) = \frac{\omega_f}{s + \omega_f} \cdot \frac{1}{s} = \frac{\omega_f}{s(s + \omega_f)}. \]

In the time domain, this corresponds to a command that rises smoothly with a time constant approximately \( 1/\omega_f \). Larger \( \omega_f \) gives a faster effective command (closer to an ideal step), while smaller \( \omega_f \) slows the command, reducing the acceleration and jerk demanded from the plant at the expense of longer rise time.

Problem 5 (Frequency-Domain Tracking Requirement): Suppose a position servo must track sinusoidal references up to \( \omega_{\text{track}} = 5 \) rad/s with amplitude error below 5%. Express a frequency-domain condition on the complementary sensitivity function \( T(j\omega) \).

Solution:

For a sinusoidal reference of frequency \( \omega \), the steady-state amplitude ratio is \( |Y(j\omega)|/|R(j\omega)| = |T(j\omega)| \). An amplitude error of at most 5% means:

\[ \left|\frac{|Y(j\omega)| - |R(j\omega)|}{|R(j\omega)|}\right| = \bigl||T(j\omega)| - 1\bigr| \leq 0.05, \]

for all \( \omega \) in the tracking band. Therefore, the design must satisfy:

\[ 0.95 \leq |T(j\omega)| \leq 1.05 \quad\text{for all } \omega \in [0, 5]. \]

This inequality directly constrains the loop-shaping design for \( C(s) \) (and any prefilter \( F(s) \)) in the relevant frequency range.

13. Summary

In this lesson we formalized set-point tracking quality via the complementary sensitivity function \( T(s) \) and its time- and frequency-domain properties. We showed how desired time-domain specs translate into closed-loop pole locations, illustrated by PD control of a double-integrator plant modeling a robot joint. We then introduced two-degree-of-freedom PID controllers and reference prefilters, emphasizing their role in shaping the numerator of \( T(s) \) without changing the denominator and thus preserving stability and disturbance-rejection properties. Finally, we implemented these ideas in Python, C++, Java, MATLAB/Simulink, and Mathematica, connecting theory to practical robotics software stacks.

14. References

  1. Francis, B.A., & Wonham, W.M. (1976). The internal model principle of control theory. Automatica, 12(5), 457–465.
  2. Åström, K.J. (1970). Introduction to stochastic control theory. Academic Press. (Chapters on servo and regulator problems.)
  3. Horowitz, I.M. (1963). Synthesis of Feedback Systems. Academic Press. (Classical analysis of tracking and sensitivity.)
  4. Middleton, R.H., & Goodwin, G.C. (1988). Improved finite word length characteristics in digital control using delta operators. IEEE Transactions on Automatic Control, 33(10), 947–958. (Discusses robustness and tracking with discrete-time implementations.)
  5. Åström, K.J., & Hägglund, T. (1995). PID controllers: theory, design, and tuning. Instrument Society of America. (Provides a rigorous treatment of 2-DOF PID and set-point weighting.)
  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. Zames, G. (1981). Feedback and optimal sensitivity: Model reference transformations, multiplicative seminorms, and approximate inverses. IEEE Transactions on Automatic Control, 26(2), 301–320.
  8. Tomizuka, M. (1987). Zero phase error tracking algorithm for digital control. Journal of Dynamic Systems, Measurement, and Control, 109(1), 65–68.