Bird
Raised Fist0
Simulinkdata~20 mins

Step response analysis in Simulink - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Step Response Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate
2:00remaining
Step Response Peak Time Calculation
Given a second-order system with transfer function \( G(s) = \frac{100}{s^2 + 12s + 100} \), what is the peak time \( T_p \) observed in the step response?
Simulink
num = [100];
den = [1 12 100];
sys = tf(num, den);
info = stepinfo(sys);
peak_time = info.PeakTime;
A0.4 seconds
B0.5 seconds
C0.25 seconds
D0.1 seconds
Attempts:
2 left
💡 Hint

Peak time is the time at which the response reaches its first maximum peak.

❓ data_output
intermediate
1:30remaining
Settling Time from Step Response Data
You have step response data from a system. Which of the following MATLAB commands correctly extracts the settling time from the step response info structure?
Simulink
num = [1];
den = [1 3 2];
sys = tf(num, den);
info = stepinfo(sys);
Asettling_time = info.Settling_time;
Bsettling_time = info.SettlingTime;
Csettling_time = info.settlingtime;
Dsettling_time = info.settlingTime;
Attempts:
2 left
💡 Hint

MATLAB is case-sensitive and uses exact field names in structures.

❓ visualization
advanced
2:00remaining
Interpreting Step Response Plot Characteristics
You run a step response simulation in Simulink and observe the plot below. Which characteristic can you NOT determine directly from this plot?
AOvershoot percentage
BRise time
CSteady-state error
DSystem order
Attempts:
2 left
💡 Hint

Think about what information a step response plot shows and what it does not.

🧠 Conceptual
advanced
1:30remaining
Effect of Damping Ratio on Step Response
How does increasing the damping ratio \( \zeta \) of a second-order system affect its step response?
AOvershoot increases and settling time increases
BOvershoot increases and settling time decreases
COvershoot decreases and settling time increases
DOvershoot decreases and settling time decreases
Attempts:
2 left
💡 Hint

Recall how damping affects oscillations and speed of settling.

🔧 Debug
expert
2:30remaining
Identifying Error in Step Response Code
What error will the following Simulink MATLAB code produce when run? num = [10]; den = [1 2]; sys = tf(num, den); info = stepinfo(sys); peak_time = info.PeakTime; disp(peak_time);
Simulink
num = [10];
den = [1 2];
sys = tf(num, den);
info = stepinfo(sys);
peak_time = info.PeakTime;
disp(peak_time);
ANo error, outputs peak time correctly
BRuntime error: PeakTime field does not exist
CSyntax error: missing semicolon
DRuntime error: stepinfo requires a stable system
Attempts:
2 left
💡 Hint

Check the system stability and stepinfo requirements.

Practice

(1/5)
1. What does the step function in Simulink primarily show about a system?
easy
A. The system's output response to a sudden input change
B. The frequency response of the system
C. The system's steady-state error only
D. The system's input signal over time

Solution

  1. Step 1: Understand the purpose of the step function

    The step function simulates how a system reacts when a sudden input (step input) is applied.
  2. Step 2: Identify what the output represents

    The output shows how the system's output changes over time after the step input, revealing speed and stability.
  3. Final Answer:

    The system's output response to a sudden input change -> Option A
  4. Quick Check:

    Step response = output after sudden input [OK]
Hint: Step function shows output after sudden input change [OK]
Common Mistakes:
  • Confusing step response with frequency response
  • Thinking it shows only steady-state error
  • Assuming it plots input signal instead of output
2. Which of the following is the correct syntax to plot the step response of a transfer function sys in MATLAB?
easy
A. response.step(sys)
B. plotstep(sys)
C. sys.step()
D. step(sys)

Solution

  1. Step 1: Recall MATLAB step response syntax

    The standard MATLAB command to plot step response is step(sys), where sys is the system model.
  2. Step 2: Check other options for correctness

    Options B, C, and D are not valid MATLAB commands for step response plotting.
  3. Final Answer:

    step(sys) -> Option D
  4. Quick Check:

    Use step(sys) to plot response [OK]
Hint: Use step(sys) to plot step response in MATLAB [OK]
Common Mistakes:
  • Using incorrect function names like plotstep
  • Trying object method calls not supported
  • Confusing syntax with other toolboxes
3. Given the following MATLAB code, what is the approximate settling time of the system's step response?
sys = tf([1], [1 3 2]);
info = stepinfo(sys);
settling_time = info.SettlingTime;
medium
A. About 2 seconds
B. About 1 second
C. About 3 seconds
D. About 4 seconds

Solution

  1. Step 1: Analyze the transfer function

    The system has poles at -1 and -2, so it is stable and expected to settle quickly.
  2. Step 2: Use stepinfo to find settling time

    The stepinfo function calculates settling time, which for this system is approximately 2 seconds.
  3. Final Answer:

    About 2 seconds -> Option A
  4. Quick Check:

    Settling time from stepinfo ≈ 2 sec [OK]
Hint: Use stepinfo(sys).SettlingTime for settling time [OK]
Common Mistakes:
  • Confusing settling time with rise time
  • Ignoring system poles location
  • Assuming default values without calculation
4. Identify the error in the following MATLAB code for plotting step response:
sys = tf([1 2], [1 4 5]);
step(sys)
title('Step Response')
xlabel('Time')
ylabel('Output')
medium
A. Missing semicolon after tf definition
B. No error; code runs correctly
C. The transfer function numerator and denominator are reversed
D. Step function should be called as step_response(sys)

Solution

  1. Step 1: Check transfer function syntax

    The numerator and denominator vectors are correctly placed in tf([1 2], [1 4 5]).
  2. Step 2: Verify step function and plot commands

    The step(sys) command is correct, and titles and labels are properly set.
  3. Final Answer:

    No error; code runs correctly -> Option B
  4. Quick Check:

    Code syntax is correct and runs [OK]
Hint: Check tf and step syntax carefully [OK]
Common Mistakes:
  • Thinking numerator and denominator are swapped
  • Expecting semicolon is mandatory (optional)
  • Using incorrect step function names
5. You want to compare the step responses of two systems sys1 = tf([1], [1 2 1]) and sys2 = tf([2], [1 3 2]). Which MATLAB code snippet correctly plots both responses on the same graph for comparison?
hard
A. step(sys1); step(sys2);
B. plot(step(sys1), step(sys2));
C. step([sys1 sys2]);
D. step(sys1 + sys2);

Solution

  1. Step 1: Understand how to plot multiple step responses

    Using step([sys1 sys2]) plots both systems' step responses on the same figure for easy comparison.
  2. Step 2: Evaluate other options

    step(sys1); step(sys2); overwrites the first plot without hold on; plot(step(sys1), step(sys2)); is invalid syntax; step(sys1 + sys2); plots sum system, not comparison.
  3. Final Answer:

    step([sys1 sys2]) -> Option C
  4. Quick Check:

    Use step([sys1 sys2]) for combined plot [OK]
Hint: Use step([sys1 sys2]) to plot both responses together [OK]
Common Mistakes:
  • Trying to add systems instead of plotting separately
  • Using plot() on step outputs incorrectly
  • Forgetting hold on/off when plotting separately
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