Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 40

Integral Control for Disturbance Rejection

Recommended resources

Hello! Welcome to the next lesson in our course on multivariable control.

In our last session, we developed a formal state-space model for a system subject to constant input disturbances. We did this by augmenting the system's state vector with a new state representing the disturbance, d, which had the simple dynamic d_dot = 0. This gave us an augmented model: ẋ_a = A_a x_a + B_a u.

Today, we will address the central learning outcome of this lesson: to design an integral-augmented controller that rejects these constant external disturbances. You'll discover that the very same controller architecture we used for achieving zero steady-state tracking error is the key to making our system robust against these unwanted inputs. We will connect the theory to a concrete design procedure and show how you can apply it to your rotary inverted pendulum project.

1. The Integral Controller for Disturbance Rejection

Recall the integral control structure we designed for reference tracking. The core idea was to integrate the error signal, e = r - y, and feed this integral back into the control input. This forces the controller to work until the error is driven to zero. It turns out this mechanism is exactly what we need to combat constant disturbances.

The block diagram below illustrates this architecture.

State-Space Control with Integral Action Block Diagram
This block diagram shows a state feedback controller (`Kx`) combined with an integral controller (`Ki`). The integral action is based on the error `e` between the reference `r` and the system output `y`. This structure is designed to eliminate steady-state error from both setpoint changes and constant disturbances.

Let's quickly re-establish the augmented system for this controller. We introduce a new state, z, which is the integral of the error:

Since y = Cx, we have ż = r - Cx.

Our original plant is now affected by a disturbance d:

The control law uses feedback from both the original states x and the new integral state z:

Combining these gives us the complete dynamics of the closed-loop system in the presence of a disturbance.


2. Why Integral Control Works: A Steady-State Analysis

To understand why this controller rejects disturbances, let's analyze its behavior in steady-state. In steady-state, all derivatives are zero (ẋ = 0 and ż = 0).

From ż_ss = 0, we immediately get:

This is a powerful result. It states that at steady-state, the output must equal the reference. The presence of the constant disturbance d does not appear in this equation at all! The integrator has forced the steady-state error to zero, regardless of the disturbance.

So, what happened to the disturbance? The control input u has adjusted to cancel it out. Let's look at the steady-state equation for ẋ:

Solving for u_ss:

(Assuming B is invertible for simplicity of illustration; the principle holds more generally).

The steady-state control input u_ss is composed of two parts: one part (-B⁻¹(Ax_ss)) holds the system at the desired state, and the other part (-d) actively cancels the disturbance. The integral state z automatically grows or shrinks until the control input u provides exactly the right amount of effort to achieve this cancellation.

This concept is also discussed in the "State feedback and Observer Feedback" document from our last lesson.

State feedback and Observer Feedback

The following reading offers an intuitive explanation for why integral control successfully rejects disturbances. It argues that if any error remained, the integrator's output would grow infinitely, which is impossible in a stable closed-loop system.

Please read the section 'Method 2: Augmenting plant dynamics' on page 119. Focus on the paragraph beginning 'The most usual case is to combat constant disturbances using integral control.' This provides the core intuition.


3. Designing the Integral-Augmented Controller

The design process is identical to the one we used for reference tracking. The goal is to find the gain matrix K_a = [K_p, K_i] that places the poles of the augmented system in desirable locations, ensuring stability and good performance.

The following video provides a step-by-step guide to this process using pole placement.

State variable control 34: Integral control

This video, 'State variable control 34: Integral control' by Corné van Daalen, demonstrates the complete design process for an integral controller. It shows how to form the augmented system and use MATLAB's 'acker' function to calculate the feedback gains.

Please watch the following segments: Introduction (0:00 - 2:39): Understand the controller structure and why it's needed. Augmented System Derivation (2:39 - 4:25): See how the A_bar (A_aug) and B_bar (B_aug) matrices are constructed. Regulator Design (4:25 - 5:57): Learn how the problem is framed so standard pole placement tools can be used. MATLAB Example (5:57 - 8:01): Follow a practical example for a pendulum system.

Let's summarize the design steps from the video:

  1. Form the Augmented System:
    Given the original plant (A, B, C), we construct the augmented matrices A_aug and B_aug for a single-output system:

    The augmented system has n+1 states, where n is the number of original states. For a MIMO system with p outputs, you would add p integrators, making A_aug an (n+p) x (n+p) matrix.

  2. Check Controllability:
    Before proceeding, you must verify that the augmented pair (A_aug, B_aug) is controllable. If it's not, you cannot arbitrarily place the closed-loop poles. A lack of controllability here often points to structural issues in the system, such as a zero at the origin (s=0) in the plant's transfer function, which would cancel the integrator's pole.

  3. Choose Desired Pole Locations:
    Select n+1 desired locations for the closed-loop poles (p_desired). These locations determine the performance of the closed-loop system (e.g., settling time, damping). A common strategy is to use a Butterworth pattern, as shown in the video.

  4. Calculate the Gain Matrix:
    Use a pole placement function like acker (for single-input) or place (for multi-input) in MATLAB to find the gain K_a:
    Ka = acker(A_aug, B_aug, p_desired) or Ka = place(A_aug, B_aug, p_desired)

    The resulting gain K_a is partitioned into the proportional and integral gains:

Test your understanding!

Consider a simple integrator plant G(s) = 1/s. The state-space representation is A=[0], B=[1], C=[1]. You want to design an integral controller to reject a constant disturbance d.

  1. What are the dimensions of the augmented matrices A_aug and B_aug?
  2. Construct A_aug and B_aug.
  3. Is the pair (A_aug, B_aug) controllable? Why might this be important?
Show answer
  1. The original system has n=1 state. We add one integrator, so the augmented system has n+1=2 states. Therefore, A_aug is a 2x2 matrix and B_aug is a 2x1 vector.

  2. Using the formulas:

  3. To check controllability, we compute the controllability matrix Co = [B_aug, A_aug*B_aug]:

    The determinant of Co is -1, which is non-zero. The matrix has full rank (rank 2), so the system is controllable. This is crucial because it means we can place the two poles of the closed-loop system anywhere we want to achieve our desired performance.


4. Alternative Design using LQR

Pole placement requires you to choose specific pole locations, which can sometimes feel arbitrary. An alternative and more systematic approach is to use the Linear Quadratic Regulator (LQR) method on the augmented system. Here, you specify performance by tuning the weighting matrices Q and R rather than picking pole locations.

The following video demonstrates this exact process, including building a Simulink model to test the controller. This is highly relevant to your practical goals.

Control of State-Space Models in Simulink By Using Linear Quadratic Regulator - Control Systems

This video by Aleksandar Haber, 'Control of State-Space Models in Simulink By Using Linear Quadratic Regulator', shows how to design an integral-augmented controller using the LQR method. It's a great practical guide for implementation.

Focus on these parts: Augmented Model (5:29 - 6:46): See the augmented system being derived again, this time with a focus on LQR design. LQR Controller Design (6:46 - 9:49): Understand how the LQR cost function is applied to the augmented system and how the resulting gain K is partitioned into Kx (our Kp) and Ki. MATLAB Implementation (12:38 - 14:42): Watch how the augmented matrices are defined and how the lqr function is used to compute the gain K.


Application to Your Rotary Inverted Pendulum

These techniques are directly applicable to your project. The rotary inverted pendulum is susceptible to constant disturbances like friction in the main rotary joint and biases in the motor. An integral controller is essential for holding the pendulum perfectly upright or the arm at a precise angle.

The Edukit resource page you've seen before contains a tutorial and MATLAB code specifically for this.

Edukit Rotary Inverted Pendulum Control System

The 'Edukit Rotary Inverted Pendulum' resource page provides a tutorial and MATLAB script for designing a full state feedback controller with integral action for the rotor control system.

On the webpage, locate 'Tutorial 11: Full State Feedback with Integral Action'. This document explains the application. Further down, under the design tools, you will find the corresponding MATLAB script: 'Edukit_Full_State_Rotor_Design_with_Integral_Action.m'. I highly recommend studying these as you apply today's lesson to your project.


Conclusion

Today we've armed our state-feedback controller with a powerful tool for robustness. By augmenting our system with an integrator on the error signal, we've created a controller that can automatically reject the effects of unknown constant disturbances.

Key Takeaways:

  • Integral action forces the steady-state error (r-y) to zero.
  • By forcing the error to zero, the controller implicitly computes and applies a control effort that cancels out any constant input disturbance.
  • The design procedure involves creating an augmented system (A_aug, B_aug) where A_aug = [A, 0; -C, 0] and B_aug = [B; 0].
  • The controller gain K_a = [K_p, K_i] can be found by applying standard methods like pole placement or LQR to this augmented system.

Preview of the Next Lesson:
We have now designed two major types of controllers: a simple state feedback regulator and an integral-augmented regulator. In the next lesson, we will put them to the test. We will simulate and compare the tracking and disturbance rejection performance of these different designs to see the benefits of integral action firsthand.