This exercise demonstrates Active Disturbance Rejection Control (ADRC) for a pendulum system. The controller must regulate the pendulum angle to a setpoint while rejecting disturbances and handling sensor noise.
System Parameters:
- Pendulum tip mass: M = 0.4 kg
- Rod length: l = 0.3 m
- Viscous friction coefficient: c = 0.1
- Gravitational acceleration: g = 9.81 m/s²
Control Specifications:
- Settling time (10% of setpoint): < 5 seconds (initial), < 2 seconds (final)
- Disturbance rejection: oscillations within 10% of setpoint
- Control effort: torque oscillations within 1 Nm peak-to-peak
- Setpoint: θ_setpoint = 1 rad
Disturbance Configuration:
- Eccentric mass: m_e = 0.2 kg at radius r_e = 0.02 m
- Disturbance frequency: ω_m = 20 rad/s
- Centrifugal force: Fc = m_e * r_e * ω_m²
The ADRC controller consists of a state-feedback controller and an Extended State Observer (ESO) that estimates both system states and total disturbance.
Before controlling the actual pendulum, we validate our ADRC implementation on a simplified double-integrator plant where the ESO model perfectly matches the plant dynamics.
Objective: Verify that the simulated response matches the theoretical second-order response, confirming correct implementation of the ESO and control law.
Expected Result: Perfect overlap between simulated and theoretical responses, with ESO accurately estimating all states and zero total disturbance (no model mismatch).
Observation: The responses match perfectly. Furthermore, the ESO's state estimates (theta_hat, theta_hat_dot) align exactly with the plant's true states, and the estimated total disturbance f_hat is zero. This is expected because the plant model and the ESO's internal model are identical, leaving no "unmodeled" dynamics to reject.
- Initial condition: θ = π/2 rad
- Control: Manual mode with u_manual = 0
- Disturbance: Enabled at t = 5s
Expected Behavior: Damped oscillations settling to vertical position (θ = 0) due to gravity and friction, with visible disturbance effects after t = 5s.
Observation: The pendulum swings and settles as expected, confirming the basic dynamics (gravity, inertia, friction) are implemented correctly. The disturbance at t=5s creates a clear oscillation.
- Initial condition: θ = π/2 rad
- Control: Constant torque u_manual = Mgl
- Disturbance: Disabled
Expected Behavior: Pendulum remains steady at π/2 rad because the applied torque balances gravitational torque.
- Initial condition: θ = 0 rad
- Control: Constant torque u_manual = Mgl/2
- Disturbance: Disabled
Expected Behavior: Pendulum settles at non-zero angle where applied torque balances gravitational torque.
Observation: The pendulum moves and settles at a non-zero angle, confirming that the input (motor torque) correctly influences the plant model.
We also check the states estimated by the ESO.
Observation: Note that now the total disturbance term is different from zero because the actual plant differes from the ideal double integrator plant. However, the ESO is doing a good job in properly estimating the states of the actual plant.
Configuration:
- Control mode: ADRC enabled
- Initial conditions: θ = 0 rad, θ_dot = 0 rad/s
- Disturbance: Enabled
- Observer bandwidth:
keso = 20
Performance Assessment:
- Verify settling within 5 seconds to 10% of setpoint
- Check disturbance rejection within 10% bounds
- Monitor control torque within 1 Nm peak-to-peak
keso = 20
Real sensors introduce measurement noise that affects control performance, particularly through the high-gain observer.
Problem: High observer bandwidth (keso=20) amplifies measurement noise into the control signal, causing excessive torque oscillations that violate the 1 Nm specification.
Solution: Reduce observer bandwidth to filter high-frequency noise while maintaining adequate disturbance rejection.
Trade-off Analysis:
- Lower bandwidth (
keso=7): Smoother control action, better noise rejection - Higher bandwidth (
keso=20): Faster state estimation, better disturbance rejection - Compromise:
keso=7provides acceptable performance with compliant control effort
keso = 7
New Specification: Settling within 10% of setpoint in less than 2 seconds.
Approach: Increase controller bandwidth while maintaining observer ratio for noise immunity.
Validation: Verify that the faster response meets the new settling time requirement while maintaining acceptable control effort and disturbance rejection.
keso = 5
The ADRC controller successfully meets all control specifications:
- Setpoint Tracking: Achieves required settling times (5s and 2s versions)
- Disturbance Rejection: Maintains oscillations within 10% of setpoint despite eccentric mass disturbance
- Control Effort: Maintains torque oscillations within 1 Nm peak-to-peak specification
- Noise Robustness: Proper observer tuning provides immunity to sensor noise
- Observer Bandwidth Trade-off: Critical balance between estimation speed and noise sensitivity
- Model Independence: ADRC effectively handles unmodeled dynamics and disturbances
- Practical Tuning: Systematic approach to meeting multiple competing specifications
For nominal performance with noise:
- Controller bandwidth: ω_c = 3 rad/s
- Observer ratio:
keso = 7 - Settling time: ~2 seconds
For enhanced set-point racking performance:
-
Controller bandwidth: ω_c = 4 rad/s
-
Observer ratio:
keso = 5 -
Settling time: ~1.5 seconds


















