Assurance Mechanisms
Some control applications require the controller to select control actions such that the plant states do not violate certain critical constraints. In many cases, the constraints are on plant states that the controller does not control directly. Instead, you define a constraint function that defines the constraint in terms of the control action signal. These constraint enforcement techniques, widely known as assurance mechanisms, ensure that your system operates safely within defined boundaries, even when unexpected conditions arise. This proactive approach helps you prevent failures and maintain control integrity.

Simulink® Control Design™ software lets you implement general or special purpose constraints on nominal control actions. The available techniques are summarized in this table.
| Constraint Type | Application |
|---|---|
| General Purpose — Specify constraints as a function of system states and action bounds using this general-purpose block |
|
| Barrier Certificate — Define safety set of the desired states of a system using control barrier functions such that the states remain in the safety set |
|
| Passivity — Enforce passivity on a closed-loop system by modifying control actions such that system dissipates energy over time |
|
This functionality requires Optimization Toolbox™ software to compute the modified control actions that are closest to specified control actions, subject to constraints and action bounds.
Blocks
| Constraint Enforcement | Modify control actions to satisfy constraints and action bounds |
| Barrier Certificate Enforcement | Modify control actions to satisfy barrier certificate constraints and action bounds (Since R2022a) |
| Passivity Enforcement | Modify control actions to satisfy passivity constraints and action bounds (Since R2023a) |
| High-Order Control Barrier Function | Modify control actions to satisfy high-order control barrier function (CBF) constraints and action bounds (Since R2026a) |
Topics
General Purpose Constraint Enforcement
- Constraint Enforcement for Control Design
You can modify control actions in real-time to satisfy constraints and action bounds. - Enforce Constraints for PID Controllers
Apply a known constraint function to a PID control application using the Constraint Enforcement block. - Learn and Apply Constraints for PID Controllers
Learn and apply an unknown constraint function for a PID control application using the Constraint Enforcement block.
Control Barrier Function Enforcement
- Enforce Safety Constraints with Control Barrier Functions
Modify control actions to satisfy barrier certificate constraints and action bounds. - Enforce Barrier Certificate Constraints for PID Controllers
Apply barrier certificate constraints to a PID control application using the Barrier Certificate Enforcement block. - Enforce Barrier Certificate Constraints for Adaptive Cruise Control
Enforce barrier certificate constraints for adaptive cruise control to maintain velocity and following distance. - Enforce Barrier Certificate Constraints for Collision-Free Robots
Enforce barrier certificate constraints for two robots to reach their target positions in collision-free manner. - Enforce Barrier Certificate Constraints for Collision-Free Multi-Robot System
Enforce barrier certificate constraints for three robots to reach their target positions in collision-free manner. - Safe PID Controller for Two Link Robot using High-Order Control Barrier Function
Apply high-order CBF constraints to ensure safety for a two-link robot. (Since R2026a)
Passivity Enforcement
- Passivity Enforcement for Control Design
Modify control actions to satisfy passivity constraints and action bounds. - Enforce Passivity Constraints for Quadruple-Tank System
Enforce passivity constraints for water height control in a quadruple tank system. - Enforce Passivity Constraint for Flexible Beam
Enforce passivity constraints for vibration control in a flexible beam.
Reinforcement Learning Applications
- Train Reinforcement Learning Agent with Constraint Enforcement
Train a reinforcement learning agent with actions constrained using the Constraint Enforcement block. - Train RL Agent for Adaptive Cruise Control with Constraint Enforcement
Train a reinforcement learning agent for adaptive cruise control with enforced constraints on velocity and following distance. - Train RL Agent for Lane Keeping Assist with Constraint Enforcement
Train a reinforcement agent for lane keep assist with enforced constraints on lateral deviation. - Add Safety Constraint to Simulate Two-Link Robot with SAC Agent (Reinforcement Learning Toolbox)
Add high-order barrier function to safely simulate a two-link robot model with a SAC agent.