1. Home
  2. Explore
  3. Engineering
  4. Control Design Principles

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Control Design Principles

Principles of Control Design

Plant Modeling: The Throttle Example

The control design workflow begins with a plant model — a mathematical representation of the physical system to be controlled. In this episode, the plant is a throttle valve with three torques acting on it:

  • Spring torque — always pulls the throttle back to its initial position.

  • Motor torque — the actuating force that opens or closes the throttle.

  • Damping torque — models friction or resistive forces present in any mechanical system.

The dynamic behavior of the throttle is captured by resolving the equations of motion for the angular acceleration θ¨\ddot{\theta}θ¨ (theta double dot). The resulting differential equation is:

Jθ¨+bθ˙+kθ=τmotorJ \ddot{\theta} + b \dot{\theta} + k \theta = \tau_{motor}Jθ¨+bθ˙+kθ=τmotor​

Where:

  • θ\thetaθ = angular position of the throttle

  • JJJ = moment of inertia

  • bbb = damping coefficient

  • kkk = spring constant

  • τmotor\tau_{motor}τmotor​ = torque applied by the motor (proportional to input voltage)

This equation is rearranged to isolate θ¨\ddot{\theta}θ¨:

θ¨=1J(τmotor−bθ˙−kθ)\ddot{\theta} = \frac{1}{J} \left( \tau_{motor} - b \dot{\theta} - k \theta \right)θ¨=J1​(τmotor​−bθ˙−kθ)

The double integration of θ¨\ddot{\theta}θ¨ yields the position θ\thetaθ, which is the output of the system.

Building the Simulink Model

The model is constructed in Simulink by:

  1. Taking θ¨\ddot{\theta}θ¨ as the input to two integrators in series.

  2. The output of the second integrator is the angle θ\thetaθ.

  3. The parameters JJJ, bbb, kkk, and motor torque are introduced as constants or gains.

Key recommendation: Wrap the entire plant model into a subsystem (by selecting all blocks and clicking "Create Subsystem"). This hierarchical structure improves readability, maintainability, and reusability — especially useful when sharing models with others.

The subsystem has one input (voltage) and one output (angle). The plant model is now ready for controller integration.


PID Controller Setup

A PID controller is the classic choice for linear control systems because:

  • It works for approximately 90% of industrial applications.

  • It relies on linear control theory, making analysis and tuning straightforward.

  • It offers a good balance of performance and robustness without the complexity of nonlinear methods.

The controller is added to the Simulink model using the library browser (search "PID" and select the Simulink PID Controller block). The control loop is closed by:

  1. Placing a Sum block that computes the error = reference signal - feedback (plant output). The sum signs are set to + - (plus from reference, minus from feedback).

  2. Connecting the error to the PID controller input.

  3. Connecting the PID output to the plant input.

  4. Feeding the plant output back to the sum block.

A Signal Builder block is used to generate the reference signal (instead of a simple step). Advantages of Signal Builder:

  • Allows grouping multiple signals.

  • Supports multiple scenarios (simulate one or all at once).

  • Can import data from Excel or spreadsheets (e.g., drive cycles).

  • Interactive editing of signal points.

In the example, a step reference from 0° to 90° (closed to fully open throttle) is created.

To visualize results, scopes are added directly to signals using "Create & Connect Viewer" (avoids cluttering the model with scope blocks). Both the reference and plant output are connected to the same scope for comparison.

Initial simulation (with untuned PID gains) shows blurry behavior, overshoot, and vibrations — the starting point for tuning.


Controller Tuning

The PID controller has three parameters: proportional (P), integral (I), and derivative (D). Instead of manual trial-and-error, the PID Tuner (accessed via the "Tune" button on the PID block) provides an interactive optimization:

  1. The tool performs linearization of the plant around the operating point.

  2. It displays a step response plot comparing the current (dotted) and tuned (solid) responses.

  3. Slider bars for time-domain performance (response speed) and robustness (gain/phase margins) allow real-time adjustment.

  4. Bode plot of the open-loop system shows gain margin and phase margin — indicators of stability (e.g., phase margin of 69° is considered good).

The tuning algorithm automatically guarantees a stable closed-loop system (as long as margins remain positive). After adjusting the sliders, clicking "Update Block" applies the new PID gains to the workspace variables (e.g., P, I, D).

Simulating the tuned system yields a much smoother response that reaches 90° faster with significantly less overshoot and oscillation.


Worst-Case Analysis with Uncertainties

Real-world systems have uncertain parameters that may change over time or vary across units. For example, the damping coefficient bbb in a throttle can change due to dirt accumulation or temperature variations. To ensure the controller remains robust, a worst-case analysis is performed.

Modeling Uncertainty

Using the linearization feature, a specific block parameter (e.g., damping coefficient KdK_dKd​) can be declared as uncertain — defined as a nominal value with a tolerance (e.g., 0.04±20%0.04 \pm 20\%0.04±20%). The uncertainty is specified in the block's "Linearization" tab using a MATLAB expression (e.g., Kd = ureal('Kd', 0.04, 'Percent', 20)).

Linear Analysis Point

To analyze the plant's behavior under uncertainty, analysis points are defined:

  • Input perturbation at the plant input.

  • Output measurement at the plant output. The linearization is then performed between these points, producing an uncertain state-space (USS) model.

Finding the Worst-Case Parameters

The USS model is dragged from the Linear Analysis Tool to the MATLAB workspace. Using the Robust Control Toolbox functions:

  • wcgain — computes the worst-case gain (e.g., maximum overshoot) and the corresponding parameter values that cause it.

  • usubs — substitutes the worst-case parameters into the USS model to obtain a specific worst-case system.

  • step — plots the step response of the nominal and worst-case systems for comparison.

In the throttle example, the worst-case scenario occurred with the damping at its upper bound (0.048, i.e., +20%). This confirms that increased damping leads to higher overshoot. By identifying this worst case, engineers can certify that all other parameter combinations produce less harmful behavior, giving confidence in the controller's robustness.

Benefits

  • Systematic — works with multiple uncertain parameters and their interactions.

  • Automatic — reveals worst cases that might not be obvious from experience alone.

  • Scalable — handles complex systems with many uncertainties.


Optimization with Constraints

Even a robust controller may violate real-world constraints, such as maximum allowable voltage (e.g., 12V or 15V). In the initial tuned controller, the voltage applied to the throttle reached 18V, exceeding a realistic battery limit. To address this, Response Optimization is used.

Setting Up the Optimization

  1. Open the Response Optimization tool from the Simulink "Analysis" menu.

  2. Design Variables — select the PID controller parameters (P, I, D) that the optimizer can adjust.

  3. Requirements — define constraints:

    • Signal bound: set a bound that the voltage signal must be ≤ 15V at all times.

    • The bound is linear and can be applied to a specific signal (select the appropriate line in the model).

  4. Initial Evaluation: plot the model's current response to see where it violates the constraint.

Running the Optimization

  • Click Optimize — the tool iterates to find PID gains that satisfy the voltage constraint while maintaining acceptable performance.

  • The iteration plot shows how signals meet requirements in real time.

  • In this example, only two iterations were needed to converge.

Results

After optimization:

  • The voltage signal stays ≤ 15V.

  • The plant output (angle) remains smooth and responsive, though slightly slower than the unconstrained tuned controller.

  • The controller remains stable and robust to uncertainties.

Optimization bridges the gap between theoretical control design and real-world hardware limitations.


Key Takeaways

Control design is not magic — Even though there is significant mathematics behind it, the tools are designed to be used by engineers without a PhD in control theory. The workflows are straightforward and repeatable.

Worst-case analysis — Automatically identifies parameter combinations that produce the most harmful system behavior. This gives confidence that the controller will perform safely across all expected variations, including those not encountered in testing.

Optimization capabilities — Directly incorporate real-world constraints (e.g., voltage limits, actuator saturation) into the controller tuning process. This ensures the final design is not only stable and robust but also hardware-compatible.


Final Recommendations

  • Use subsystems to organize models hierarchically.

  • Leverage PID Tuner for quick, interactive controller tuning.

  • Apply Robust Control Toolbox functions (wcgain, usubs) to systematically analyze parameter uncertainty.

  • Use Response Optimization to enforce constraints on signals (e.g., voltage, current, force).

  • Script the entire workflow in MATLAB for repeatability and automation.

The principles demonstrated here — plant modeling, PID control, tuning, robustness analysis, and optimization — form a standard workflow that can be applied to many linear control problems, from throttle valves to more complex systems.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent