Lesson 14 of 221 hour

Proportional Control and Stability

Start with the lesson question, connect the representations, and test the model with evidence.

controlproportional controlgainovershootsettlingstabilitysaturation

Learning objectives

  • Distinguish open-loop and closed-loop control.
  • Explain setpoint, error, gain, overshoot, and stability.
  • Tune and evaluate a simple feedback controller.
Lesson flowHook, model, explanationShow guidance

Inspect the opening phenomenon

Predict what changes, then name the evidence.

Apply in the lab

Name the evidence before reading the answer.

Read only what helps

Then use the lab and recall check.

More when needed

Transcript and resources stay available below.

Course progress

AI & Robotics Foundations · Feedback and Control · Lesson 14

Proportional Control and Stability

In progress

Decision challenge

Observe the phenomenon. Then connect the representations.

Use the opening example to make a prediction, identify evidence, and explain which model supports it.

Can More Gain Make a Robot Worse?

Predict whether the largest gain will produce the best complete response.

A larger gain produces a stronger correction, but the full response determines whether it is useful.

Before

Predict whether the largest gain will produce the best complete response.

During

Track error, requested command, applied command, overshoot, and settling.

After

Choose one gain and cite two response measures.

Reference drawerTranscript, source notes, scripts, and package status stay tucked away until you need them.6 files

Lesson reading

live

1 hr

Video script

draft

1080x1920

Transcript fallback

available

courses/ai-robotics/modules/05-feedback-and-control/lessons/02-proportional-control-and-stability/video-transcript.md

Tune a Proportional Heading Controller

draft

30 min

Mastery check

live

7 questions / 10 min

Transcript for accessibility and fallback

# Transcript — Can More Gain Make a Robot Worse? A rover must turn to ninety degrees. Proportional control multiplies signed error by gain: u equals K p times e. More gain means a stronger command for the same error, but the actuator may clamp that request. Low gain can be slow. Moderate gain can settle efficiently. Excessive gain may overshoot, oscillate, or stay saturated—depending on the robot and delay. Choose gain from the complete response: rise, overshoot, settling, limits, and disturbance recovery. Which trace would you defend, and what evidence supports it?

Reading lab

Core explanation

Connect the lesson's words, diagrams, graphs, evidence, and equations.

How hard should the robot correct?

A rover faces 0° and must turn to 90°. A tiny correction is safe but slow. A strong correction moves quickly—but may carry the rover past the target and send it back again.

Predict: If the rover keeps overshooting left and right, should you always increase its gain?

Proportional gain response comparison

The proportional rule

Define signed error:

e = setpoint - measurement

Then compute the controller output:

u = Kp × e

Kp is proportional gain. It converts error units into command units. With a 90° setpoint, a 60° measurement, and Kp = 0.02 command/degree:

e = 90° - 60° = +30°

u = 0.02 × 30 = +0.60

The positive sign tells the rover which way to turn. The magnitude tells it how strongly.

The actuator gets the final word

Suppose the motor command must remain between −0.50 and +0.50. The controller asks for +0.60, but the applied command is:

u_applied = clamp(+0.60, -0.50, +0.50) = +0.50

This is saturation. The controller equation and physical command are not always identical. Any evaluation that ignores command limits can recommend impossible behavior.

Read a response, not a slogan

EvidenceQuestion
Rise timeHow quickly does the response approach the target?
OvershootHow far does it pass the target?
SettlingWhen does it enter and remain inside tolerance?
Steady-state errorWhat error remains after transients fade?
Saturation timeHow long is the actuator pinned at a limit?
BoundednessAfter a disturbance, do error and command remain bounded?

A low gain often gives a slow response. A moderate gain may balance speed and overshoot. An excessive gain can amplify delayed corrections, cause repeated overshoot, keep the actuator saturated, or destabilize some plants. These are tendencies, not universal guarantees: the plant, sampling, friction, delay, and limits matter.

Worked gain comparison

Three simulated runs use the same rover, target, starting angle, update period, and command limit.

  • Kp = 0.005: small commands; slow approach; little overshoot.
  • Kp = 0.02: faster approach; bounded correction; settles inside tolerance.
  • Kp = 0.08: reaches the target quickly but overshoots, reverses, and spends more time saturated.

The defensible choice is not “the biggest gain.” It is the gain whose full response meets the task constraints.

Stability intuition

For this lesson, call an equilibrium locally stable when a small disturbance produces a response that remains bounded and returns toward the target. One successful crossing of 90° does not establish stability. Inspect what happens afterward and repeat with a disturbance.

Retrieval pause

At a setpoint of 90°, the measured heading is 100°, and Kp = 0.03. What are the signed error and unsaturated command?

Answer after calculating: e = -10°, so u = -0.30. The command reverses direction because the rover passed the target.

Misconception checks

  • “More gain always improves control.” No. More gain changes the closed-loop dynamics and control effort; it may worsen overshoot, saturation, or stability.
  • “Zero error means the robot is safe.” No. Velocity, obstacles, actuator state, and sensor validity still matter.
  • “A simulation proves hardware behavior.” No. It supplies evidence about a stated model, not a guarantee about a different physical plant.

Summary

Proportional control maps signed error to command through u = Kp e. Gain should be selected from response evidence—speed, overshoot, settling, residual error, saturation, and boundedness—under realistic limits and disturbances.

Further learning

Practice labTune a Proportional Heading ControllerOpen this when you are ready to apply the model, collect evidence, and check your explanation.30 min

Lab: Tune a Proportional Heading Controller

Objective

Compare three proportional gains in a hardware-free heading simulation and defend one using response evidence.

Materials

  • Spreadsheet, calculator, or paper
  • Optional downloadable template: lab-worksheet.csv
  • Start heading: 0°; target heading: 90°
  • Time step: dt = 0.2 s
  • Command limit: ±0.50
  • Inertia factor: 0.75
  • Command gain: 24 degrees/s per step

Update rule

  1. error = 90 - heading
  2. raw_command = Kp × error
  3. command = clamp(raw_command, -0.50, +0.50)
  4. turn_rate_next = 0.75 × turn_rate + 24 × command
  5. heading_next = heading + 0.2 × turn_rate_next

Steps

  1. Run 30 steps with Kp = 0.005, 0.02, and 0.08.
  2. Record heading, signed error, raw command, applied command, and saturation.
  3. Mark first target crossing, maximum overshoot, and first step that enters and remains within ±2°.
  4. At step 15, subtract 8° from heading and continue to test disturbance recovery.
  5. Choose a gain and defend it using at least three measures.

Expected Result

Low gain should respond slowly. Moderate gain should usually offer a better speed/overshoot tradeoff in this illustrative model. High gain should demand more saturated effort and can oscillate. Exact values depend on rounding.

Troubleshooting

  • Preserve negative error and command signs after overshoot.
  • Clamp only the command, not the error.
  • Update turn rate before heading.
  • Use identical conditions for all gain comparisons.

Accessibility fallback

Use the supplied worksheet and compare the precomputed trend descriptions if graphing is inaccessible. Report direction, peak, settling, and saturation in words.

Reflection Questions

  1. Why is the fastest first crossing not necessarily the best controller?
  2. Which result would you expect to change first on real hardware, and why?
  3. How did saturation change the relationship between requested and applied command?

Extension Challenge

Repeat the comparison with a different inertia factor or command limit. Explain whether the same gain remains defensible and which response measure changed most.