Bird
Raised Fist0
Simulinkdata~5 mins

Disturbance rejection in Simulink - Time & Space Complexity

Choose your learning style10 modes available
Time Complexity: Disturbance rejection
O(n)
Understanding Time Complexity

We want to understand how the time needed to reject disturbances changes as the system size grows.

How does the system's response time scale when disturbances increase?

Scenario Under Consideration

Analyze the time complexity of the disturbance rejection block in this Simulink model.


% Simulink disturbance rejection example
% Assume a feedback control loop with disturbance input
% and a PID controller block

% Time vector
 t = 0:0.01:10;

% Disturbance input block
Disturbance = (t >= 5);

% Plant model block
Plant = tf([1], [1 3 2]);

% PID controller block
Controller = pid(1, 0.5, 0.1);

% Closed-loop system
ClosedLoop = feedback(Controller*Plant, 1);

% Output response to disturbance
Output = lsim(ClosedLoop, Disturbance, t);

This code models how a control system reacts to a sudden disturbance using a PID controller and a plant model.

Identify Repeating Operations

Look for repeated calculations or simulations that affect time.

  • Primary operation: Simulation of system response over time steps.
  • How many times: Once per time step in the simulation timeline.
How Execution Grows With Input

The time to simulate grows as we increase the number of time steps in the simulation.

Input Size (n = time steps)Approx. Operations
1010 simulation steps
100100 simulation steps
10001000 simulation steps

Pattern observation: The operations increase directly with the number of time steps.

Final Time Complexity

Time Complexity: O(n)

This means the time to simulate disturbance rejection grows linearly with the number of time steps.

Common Mistake

[X] Wrong: "The disturbance rejection simulation time stays the same no matter how long the simulation runs."

[OK] Correct: Each additional time step requires calculations, so longer simulations take more time.

Interview Connect

Understanding how simulation time grows helps you design efficient models and explain system behavior clearly.

Self-Check

"What if we increased the complexity of the plant model? How would the time complexity change?"

Practice

(1/5)
1. What is the main goal of disturbance rejection in a Simulink control system?
easy
A. To keep the system output stable despite external changes
B. To increase the system's input signal strength
C. To remove all feedback loops from the system
D. To make the system run faster without delays

Solution

  1. Step 1: Understand disturbance rejection purpose

    Disturbance rejection aims to keep the system output steady even when outside changes happen.
  2. Step 2: Compare options to this goal

    Only To keep the system output stable despite external changes matches this goal by focusing on output stability despite disturbances.
  3. Final Answer:

    To keep the system output stable despite external changes -> Option A
  4. Quick Check:

    Disturbance rejection = output stability [OK]
Hint: Disturbance rejection means steady output despite changes [OK]
Common Mistakes:
  • Confusing disturbance rejection with increasing input
  • Thinking disturbance rejection removes feedback loops
  • Assuming it speeds up the system only
2. Which Simulink block is commonly used to reduce the effect of disturbances in a control system?
easy
A. PID Controller block
B. Gain block
C. Scope block
D. Mux block

Solution

  1. Step 1: Identify blocks that affect disturbance

    PID Controller blocks adjust system response to reduce disturbance effects.
  2. Step 2: Eliminate unrelated blocks

    Gain changes signal strength, Scope shows signals, Mux combines signals but doesn't reduce disturbances.
  3. Final Answer:

    PID Controller block -> Option A
  4. Quick Check:

    PID Controller reduces disturbances [OK]
Hint: PID blocks help control disturbances in Simulink [OK]
Common Mistakes:
  • Choosing Scope block which only displays signals
  • Confusing Gain block with disturbance rejection
  • Selecting Mux block which combines signals
3. Given this Simulink feedback loop with a disturbance input, what will happen if the PID controller gains are set too low?
Disturbance --> + --> System --> Output
               ^                 |
               |-----------------|
               PID Controller
medium
A. The system output will oscillate rapidly
B. The system output will closely follow the disturbance
C. The system output will reject the disturbance completely
D. The system output will be zero regardless of disturbance

Solution

  1. Step 1: Understand low PID gains effect

    Low PID gains mean weak correction to disturbances, so system output follows disturbance closely.
  2. Step 2: Analyze other options

    Complete rejection needs strong gains, oscillation usually comes from too high gains, zero output is unrealistic here.
  3. Final Answer:

    The system output will closely follow the disturbance -> Option B
  4. Quick Check:

    Low gains = poor disturbance rejection [OK]
Hint: Low PID gains mean weak disturbance correction [OK]
Common Mistakes:
  • Assuming low gains cause oscillations
  • Thinking output will be zero regardless
  • Believing disturbance is fully rejected with low gains
4. You have a Simulink model with a disturbance rejection loop, but the output still shows large fluctuations. Which of these is the most likely error?
medium
A. The feedback loop is missing the disturbance input
B. The system has no input signal
C. The Scope block is not connected properly
D. The PID controller gains are set too high causing instability

Solution

  1. Step 1: Identify cause of large output fluctuations

    High PID gains can cause the system to become unstable and oscillate, causing large fluctuations.
  2. Step 2: Check other options

    Missing disturbance input means no disturbance effect, Scope connection affects display only, no input signal means no output but not fluctuations.
  3. Final Answer:

    The PID controller gains are set too high causing instability -> Option D
  4. Quick Check:

    High gains cause instability and fluctuations [OK]
Hint: Too high PID gains cause unstable output [OK]
Common Mistakes:
  • Blaming Scope block for output fluctuations
  • Ignoring PID gain settings
  • Assuming missing disturbance input causes fluctuations
5. You want to design a Simulink model that rejects a sudden step disturbance affecting the system output. Which combination of blocks and settings is best to achieve fast disturbance rejection with minimal overshoot?
hard
A. Use a Scope block to monitor output and manually adjust input
B. Use only a Gain block with high gain and no feedback loop
C. Use a PID Controller block with tuned proportional and derivative gains, plus a feedback loop including the disturbance input
D. Use a Mux block to combine disturbance and input signals without control

Solution

  1. Step 1: Identify blocks for disturbance rejection

    PID Controller with tuned gains helps react quickly and reduce overshoot; feedback loop is needed to correct disturbances.
  2. Step 2: Evaluate other options

    Gain block alone cannot reject disturbances well; Scope only monitors signals; Mux combines signals but does not control.
  3. Final Answer:

    Use a PID Controller block with tuned proportional and derivative gains, plus a feedback loop including the disturbance input -> Option C
  4. Quick Check:

    PID + feedback = fast, minimal overshoot rejection [OK]
Hint: Combine PID with feedback loop for best disturbance rejection [OK]
Common Mistakes:
  • Relying on Gain block without feedback
  • Using Scope as control instead of monitoring
  • Ignoring feedback loop importance
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard