Bird
Raised Fist0
Simulinkdata~10 mins

Proportional control effect in Simulink - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the proportional gain value.

Simulink
Kp = [1];
Drag options to blanks, or click blank then click option'
A5
B-3
C0
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Using zero gain results in no control effect.
Negative gain reverses the control action.
2fill in blank
medium

Complete the code to calculate the proportional control output.

Simulink
control_output = [1] * error_signal;
Drag options to blanks, or click blank then click option'
Aerror_signal
BKp
Cintegral
Dderivative
Attempts:
3 left
💡 Hint
Common Mistakes
Multiplying error by itself instead of gain.
Using integral or derivative terms in proportional control.
3fill in blank
hard

Fix the error in the code to correctly update the control signal.

Simulink
control_signal = [1] + control_output;
Drag options to blanks, or click blank then click option'
Aprevious_signal
Bcontrol_output
Cerror_signal
DKp
Attempts:
3 left
💡 Hint
Common Mistakes
Adding control output to itself.
Adding error signal directly instead of control output.
4fill in blank
hard

Fill both blanks to create a dictionary of control gains and their values.

Simulink
gains = [1]: [2];
Drag options to blanks, or click blank then click option'
A{'Kp', 'Ki', 'Kd'}
B{'Kp': 10, 'Ki': 0, 'Kd': 0}
C{'Kp': 5, 'Ki': 1, 'Kd': 0}
D{'Kp': 0, 'Ki': 0, 'Kd': 0}
Attempts:
3 left
💡 Hint
Common Mistakes
Using a set instead of a dictionary.
Assigning keys without values.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension filtering gains with positive values.

Simulink
positive_gains = {k: v for k, v in gains.items() if v [1] 0 and k != [2] and k != [3]
Drag options to blanks, or click blank then click option'
A>
B<
C'Ki'
D'Kd'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' instead of '>' for filtering positive values.
Not excluding the correct keys.

Practice

(1/5)
1. What does the proportional gain (Kp) in a proportional controller primarily affect?
easy
A. The integral of the error over time
B. The delay time before the system reacts
C. The strength of the system's response to the error
D. The derivative of the error

Solution

  1. Step 1: Understand the role of proportional gain

    The proportional gain (Kp) multiplies the error to determine the output response strength.
  2. Step 2: Identify what Kp controls

    Kp controls how strongly the system reacts to the current error, not delay or integral/derivative terms.
  3. Final Answer:

    The strength of the system's response to the error -> Option C
  4. Quick Check:

    Proportional gain = response strength [OK]
Hint: Kp scales error to output strength [OK]
Common Mistakes:
  • Confusing Kp with integral or derivative gains
  • Thinking Kp controls delay or timing
  • Mixing proportional control with PID control
2. Which of the following Simulink blocks is typically used to implement proportional control?
easy
A. Integrator block
B. Derivative block
C. Sum block
D. Gain block

Solution

  1. Step 1: Identify the block that multiplies input by a constant

    The Gain block multiplies the input signal by a constant value, which is the proportional gain Kp.
  2. Step 2: Match block function to proportional control

    Proportional control output = Kp * error, so Gain block is the correct choice.
  3. Final Answer:

    Gain block -> Option D
  4. Quick Check:

    Proportional control uses Gain block [OK]
Hint: Gain block multiplies error by Kp [OK]
Common Mistakes:
  • Choosing Integrator or Derivative blocks which are for other control types
  • Confusing Sum block as proportional gain
  • Not knowing block functions
3. Given a proportional controller with gain Kp=3 and an error signal of 2, what is the controller output?
medium
A. 6
B. 5
C. 3
D. 2

Solution

  1. Step 1: Calculate output using proportional control formula

    Output = Kp * error = 3 * 2 = 6.
  2. Step 2: Verify calculation

    Multiplying gain 3 by error 2 gives 6, which matches 6.
  3. Final Answer:

    6 -> Option A
  4. Quick Check:

    3 * 2 = 6 [OK]
Hint: Multiply Kp by error to get output [OK]
Common Mistakes:
  • Adding instead of multiplying gain and error
  • Using wrong gain value
  • Confusing output with error
4. A Simulink proportional controller uses a Gain block with Kp set to -4. The error signal is positive. What is the likely effect on the system output?
medium
A. Output will be zero regardless of error
B. Output will be negative, causing inverse response
C. Output will be positive, increasing error
D. Output will oscillate randomly

Solution

  1. Step 1: Analyze effect of negative gain on positive error

    Output = Kp * error = -4 * positive value = negative output.
  2. Step 2: Understand system response

    Negative output means control acts opposite to error, causing inverse or destabilizing response.
  3. Final Answer:

    Output will be negative, causing inverse response -> Option B
  4. Quick Check:

    Negative gain flips output sign [OK]
Hint: Negative Kp reverses output sign [OK]
Common Mistakes:
  • Assuming output stays positive with negative gain
  • Thinking output is zero without error
  • Confusing oscillation with negative gain effect
5. In a Simulink model, increasing the proportional gain Kp too much causes the system to oscillate. What is the best way to reduce oscillations while keeping proportional control?
hard
A. Decrease Kp to a moderate value
B. Increase Kp further to stabilize
C. Remove the Gain block entirely
D. Set Kp to zero

Solution

  1. Step 1: Understand effect of high Kp

    High Kp causes strong reactions, leading to overshoot and oscillations.
  2. Step 2: Adjust Kp to reduce oscillations

    Lowering Kp reduces reaction strength, smoothing output and reducing oscillations.
  3. Final Answer:

    Decrease Kp to a moderate value -> Option A
  4. Quick Check:

    Lower Kp reduces oscillations [OK]
Hint: Lower Kp to smooth control [OK]
Common Mistakes:
  • Increasing Kp worsens oscillations
  • Removing Gain block stops control
  • Setting Kp to zero disables proportional control
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