Bird
Raised Fist0
Simulinkdata~10 mins

Reference tracking behavior in Simulink - Step-by-Step Execution

Choose your learning style10 modes available
Concept Flow - Reference tracking behavior
Start Simulation
↓
Input Reference Signal
↓
System Output
↓
Calculate Error = Reference - Output
↓
Adjust Control Input Based on Error
↓
Update System State
↓
Loop Back to System Output
↓
Stop if Simulation Time Ends
The system receives a reference signal, compares it to the output, calculates the error, adjusts control inputs to reduce error, and updates the system state repeatedly until simulation ends.
Execution Sample
Simulink
ref = 5
output = 0
for t in range(1,5):
  error = ref - output
  output += 0.5 * error
  print(output)
This code simulates a simple reference tracking where output moves closer to the reference value step by step.
Execution Table
Steptrefoutput before updateerroroutput after updateAction
115052.5Output moves halfway to reference
2252.52.53.75Output moves halfway to reference
3353.751.254.375Output moves halfway to reference
4454.3750.6254.6875Output moves halfway to reference
Exit554.68750.3125N/ASimulation ends after 4 steps
💡 Simulation ends after 4 steps as per loop range
Variable Tracker
VariableStartAfter 1After 2After 3After 4
output02.53.754.3754.6875
errorN/A52.51.250.625
Key Moments - 2 Insights
Why does the output not instantly become equal to the reference?
Because the output updates by moving only halfway towards the reference each step, as shown in the execution_table rows 1 to 4.
What does the error represent in this process?
The error is the difference between the reference and the current output, guiding how much the output should adjust, as seen in the 'error' column of the execution_table.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table at step 3, what is the output after update?
A2.5
B3.75
C4.375
D5
💡 Hint
Check the 'output after update' column in row with Step 3.
At which step does the error first become less than 1?
AStep 4
BStep 3
CStep 2
DStep 1
💡 Hint
Look at the 'error' column in the execution_table rows.
If the output updated by the full error instead of half, what would output be after step 1?
A0
B5
C2.5
D7.5
💡 Hint
Currently output moves by 0.5 * error; full error means output = output + error.
Concept Snapshot
Reference tracking behavior:
- System tries to follow a reference signal.
- Calculate error = reference - output.
- Adjust output gradually based on error.
- Output moves closer step-by-step, not instantly.
- Loop continues until simulation ends.
Full Transcript
In reference tracking behavior, the system receives a reference signal and tries to match its output to this reference. At each step, it calculates the error as the difference between the reference and the current output. The output is then adjusted by moving partway towards the reference, reducing the error gradually. This process repeats until the simulation time ends. The example code shows output starting at zero and moving halfway towards the reference value 5 each step, illustrating how the output approaches the reference over time but does not jump instantly. The execution table tracks each step's values, showing how error and output change. Key points include understanding why output changes gradually and what the error means. The quiz questions help reinforce these ideas by asking about specific values and hypothetical changes.

Practice

(1/5)
1. What does reference tracking in Simulink primarily aim to achieve?
easy
A. Reduce the size of the Simulink model
B. Make the system output follow a desired target signal
C. Increase the system's processing speed
D. Generate random output signals

Solution

  1. Step 1: Understand the goal of reference tracking

    Reference tracking means the system output should follow or match a given target or reference signal.
  2. Step 2: Identify the correct purpose

    Among the options, only making the system output follow a target signal matches the definition.
  3. Final Answer:

    Make the system output follow a desired target signal -> Option B
  4. Quick Check:

    Reference tracking = follow target signal [OK]
Hint: Reference tracking means output matches target signal [OK]
Common Mistakes:
  • Confusing reference tracking with speed optimization
  • Thinking it reduces model size
  • Assuming it generates random outputs
2. Which Simulink block is commonly used to provide the reference input signal for tracking?
easy
A. Step block
B. Gain block
C. Scope block
D. Integrator block

Solution

  1. Step 1: Identify blocks that provide input signals

    The Step block generates a step input signal, often used as a reference or target signal in tracking problems.
  2. Step 2: Eliminate other blocks

    Gain modifies signals, Scope displays signals, Integrator integrates signals but does not generate reference inputs.
  3. Final Answer:

    Step block -> Option A
  4. Quick Check:

    Reference input = Step block [OK]
Hint: Step block creates reference signals in Simulink [OK]
Common Mistakes:
  • Choosing Scope which only displays signals
  • Confusing Gain with input generation
  • Selecting Integrator which processes signals, not inputs
3. Given this Simulink setup: a Step block (reference) connected to a PID Controller, then to a Transfer Function block (plant). What is the expected behavior of the output signal?
medium
A. Output will be the integral of the step input
B. Output will remain constant at zero
C. Output will be a random noise signal
D. Output will follow the step input with some delay and overshoot

Solution

  1. Step 1: Understand the system blocks

    The Step block provides a sudden change (step input). The PID controller tries to reduce error between output and reference. The Transfer Function models the plant dynamics.
  2. Step 2: Predict output behavior

    The output will try to follow the step input but may show delay and overshoot due to plant and controller dynamics.
  3. Final Answer:

    Output will follow the step input with some delay and overshoot -> Option D
  4. Quick Check:

    PID + plant = follow step with delay [OK]
Hint: PID controls output to follow step input with delay [OK]
Common Mistakes:
  • Assuming output stays zero without input
  • Thinking output is random noise
  • Confusing output with integral of input
4. You have a Simulink model with a PID controller for reference tracking, but the output never reaches the reference value. Which fix is most likely to improve tracking?
medium
A. Increase the PID controller's proportional gain
B. Remove the Step block
C. Add a Scope block at the output
D. Decrease the simulation stop time

Solution

  1. Step 1: Identify cause of poor tracking

    If output never reaches reference, controller gain may be too low to correct error effectively.
  2. Step 2: Choose appropriate fix

    Increasing proportional gain makes controller respond stronger to error, improving tracking.
  3. Final Answer:

    Increase the PID controller's proportional gain -> Option A
  4. Quick Check:

    Better tracking = higher proportional gain [OK]
Hint: Boost proportional gain to reduce steady error [OK]
Common Mistakes:
  • Removing Step block removes reference signal
  • Adding Scope only visualizes, doesn't fix
  • Reducing stop time cuts simulation short
5. In a Simulink model, you want to track a sinusoidal reference signal using a PID controller and a Transfer Function plant. Which approach best improves tracking accuracy over time?
hard
A. Use only the Step block as reference input
B. Increase simulation stop time without changing controller
C. Tune PID gains to reduce steady-state error and add feedforward control
D. Remove the Transfer Function block

Solution

  1. Step 1: Understand sinusoidal tracking challenges

    Tracking sinusoidal signals requires controller tuning to handle continuous changes and reduce steady-state error.
  2. Step 2: Identify best improvement method

    Tuning PID gains and adding feedforward control helps anticipate reference changes, improving accuracy.
  3. Final Answer:

    Tune PID gains to reduce steady-state error and add feedforward control -> Option C
  4. Quick Check:

    Sinusoidal tracking = PID tuning + feedforward [OK]
Hint: Tune PID and add feedforward for sinusoidal tracking [OK]
Common Mistakes:
  • Using Step block only ignores sinusoidal reference
  • Increasing stop time alone doesn't improve control
  • Removing plant block breaks model
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