📖 Scenario: You are working as a control engineer. You need to simulate a second-order system to understand how it behaves over time when given a step input. This helps in designing controllers for machines and processes.
🎯 Goal: Build a simple Simulink model that simulates a second-order system with given parameters and plots its response to a step input.
📋 What You'll Learn
Create a Simulink model with a second-order system block using the transfer function representation.
Set the system parameters: natural frequency and damping ratio.
Add a step input block to the model.
Simulate the model and plot the output response.
💡 Why This Matters
🌍 Real World
Second-order systems model many real-world devices like springs, circuits, and mechanical systems. Simulating them helps engineers design stable and efficient controllers.
💼 Career
Control engineers, system analysts, and automation specialists use these simulations daily to predict system behavior and improve designs.
Progress0 / 4 steps
1
Create the second-order system transfer function
Create a variable called wn and set it to 5 for the natural frequency. Create a variable called zeta and set it to 0.7 for the damping ratio. Then create a transfer function variable called sys representing the second-order system with numerator [wn^2] and denominator [1, 2*zeta*wn, wn^2].
Simulink
Hint
Use tf to create the transfer function. The denominator coefficients are 1, 2*zeta*wn, and wn^2.
2
Add a step input and simulation time
Create a variable called t as a time vector from 0 to 5 seconds with 0.01 second intervals. Create a variable called u as a step input vector of ones with the same length as t.
Simulink
Hint
Use 0:0.01:5 to create the time vector and ones(size(t)) for the step input.
3
Simulate the system response
Use the lsim function to simulate the response of sys to input u over time t. Store the output in a variable called y.
Simulink
Hint
Use lsim(sys, u, t) to simulate the system output.
4
Plot the system output
Plot the output y versus time t using the plot function. Label the x-axis as 'Time (seconds)' and the y-axis as 'Output'. Add a title 'Second-order System Step Response'.
Simulink
Hint
Use plot, xlabel, ylabel, and title functions to create the graph.
Practice
(1/5)
1. What does the damping ratio (ζ) affect in a second-order system simulation in Simulink?
easy
A. The color of the simulation plot
B. The speed and overshoot of the system's response
C. The size of the Simulink blocks
D. The input signal amplitude
Solution
Step 1: Understand damping ratio role
The damping ratio controls how oscillations decay in the system response.
Step 2: Connect damping ratio to response behavior
A higher damping ratio reduces overshoot and speeds settling time, affecting speed and overshoot.
Final Answer:
The speed and overshoot of the system's response -> Option B
Quick Check:
Damping ratio = speed and overshoot control [OK]
Hint: Damping ratio controls oscillation and overshoot [OK]
Common Mistakes:
Confusing damping ratio with input amplitude
Thinking damping ratio changes block size
Assuming damping ratio affects plot color
2. Which of the following is the correct way to represent a second-order transfer function in Simulink's Transfer Function block?
easy
A. Numerator: [1 0 0], Denominator: [1 2*zeta*wn wn]
B. Numerator: [1 2*zeta*wn wn^2], Denominator: [1]
C. Numerator: [1], Denominator: [1 2*zeta*wn wn^2]
D. Numerator: [wn^2], Denominator: [1 2*zeta*wn 1]
Solution
Step 1: Recall second-order transfer function form
The standard form is numerator = [1], denominator = [1 2*zeta*wn wn^2].
Step 2: Match options to standard form
Numerator: [1], Denominator: [1 2*zeta*wn wn^2] matches the correct numerator and denominator coefficients for a second-order system.
Final Answer:
Numerator: [1], Denominator: [1 2*zeta*wn wn^2] -> Option C
Quick Check:
Standard form = Numerator: [1], Denominator: [1 2*zeta*wn wn^2] [OK]
Hint: Denominator has 1, 2*zeta*wn, wn squared [OK]
Common Mistakes:
Swapping numerator and denominator
Using wrong powers for wn
Missing damping term 2*zeta*wn
3. Given the Simulink transfer function block with numerator [1] and denominator [1 4 4], what is the natural frequency (wn) and damping ratio (ζ) of the system?
medium
A. wn=2, ζ=1
B. wn=4, ζ=2
C. wn=1, ζ=4
D. wn=2, ζ=0.5
Solution
Step 1: Identify denominator coefficients
Denominator is [1 4 4], which matches [1 2*zeta*wn wn^2].
4. You created a second-order system in Simulink with numerator [1] and denominator [1 0 4], but the simulation shows no oscillations. What is the likely error?
medium
A. The damping ratio is zero, causing no oscillations
B. The input signal is missing
C. The numerator should be [1 0 4]
D. The denominator coefficients are incorrect for oscillations
Solution
Step 1: Analyze denominator coefficients
Denominator [1 0 4] means 2*zeta*wn = 0, so damping ratio ζ = 0.
Step 2: Understand effect on oscillations
Zero damping ratio means undamped oscillations, but the system denominator form is incorrect for natural frequency 2 (since wn^2=4).
Step 3: Identify correct denominator form
Correct denominator should be [1 0 4] only if system is undamped, but zero middle term can cause simulation issues.
Final Answer:
The denominator coefficients are incorrect for oscillations -> Option D
5. You want to simulate a second-order system with a natural frequency of 5 rad/s and a damping ratio of 0.3 in Simulink. What should be the denominator coefficients for the Transfer Function block?
hard
A. [1 3 25]
B. [1 3 5]
C. [1 3 15]
D. [1 3 30]
Solution
Step 1: Calculate denominator coefficients
Given wn=5, ζ=0.3, calculate 2*ζ*wn = 2*0.3*5 = 3 and wn^2 = 25.
Step 2: Form denominator array
Denominator coefficients are [1, 3, 25].
Final Answer:
[1 3 25] -> Option A
Quick Check:
2*zeta*wn=3, wn^2=25 [OK]
Hint: Multiply 2*damping*wn and square wn for denominator [OK]
Common Mistakes:
Using wn instead of wn squared
Mixing damping ratio with wn
Incorrect multiplication order
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.