Control loop lab: cruise control on a hill
About this app
A cruise control drives up the same hill three times: with a fixed pedal, with feed-forward and with feedback control. The plot keeps one comparison curve per strategy, and the block diagram lights up setpoint, controller, actuator, plant, sensor and feedback live. With unknown load or headwind only the closed loop holds the speed.
With explain mode: an AI tutor walks you through the app, points out what matters in the scene and answers your questions.
Three control strategies
Open-loop control sets an input without measuring the result. Feedforward control measures a known disturbance and uses a model to compute the correction in advance; it acts immediately but is only as good as its model. Feedback control measures the controlled variable itself, forms the error e = w − v between setpoint and actual value and adjusts the input. It also counters unknown disturbances, but only reacts once an error exists. A PI controller sets u = Kp·e + Ki·∫e dt; the integral term removes the steady-state error.
What the app shows
A 1500 kg car with 90 kW drives a route with a hill on cruise control. On the slope the downhill force m·g·sin α acts against the motion. You run three strategies in turn: open loop with a fixed pedal position, feedforward via an inclination sensor, and feedback with speedometer and PI controller. Each run leaves a comparison curve of speed over distance. The block diagram lights up setpoint, controller, actuator, plant, sensor and feedback path live, and the forces on the car can be shown.
Try it yourself
Run each strategy once and compare the curves: open loop loses speed on the hill, feedforward and feedback mostly hold it. Then add 400 kg of load or a headwind under “Disturbances” and run feedforward and feedback again. Only feedback keeps the speed, because the feedforward model does not know these disturbances. Set Ki to 0 for a pure P controller and watch the steady-state error; a large Kp makes the speed oscillate.
Frequently asked questions
- What is the difference between open-loop and closed-loop control?
- Open-loop control sets an input without measuring the outcome. Closed-loop control measures the output, compares it with the setpoint and corrects continuously. That is why only closed-loop control compensates disturbances it does not know about.
- What is feedforward control?
- Feedforward control measures a disturbance and uses a model to calculate the required counteraction in advance. It is faster than feedback because it does not wait for an error. Disturbances missing from the model remain uncorrected, so in practice it is often combined with feedback.
- Why does a P controller leave a steady-state error?
- A P controller responds only in proportion to the current error. If the plant permanently needs more input, such as more throttle on a hill, a residual error remains that produces exactly this extra input. The integral term accumulates the error over time and removes it.
- How realistic is the vehicle model?
- It solves m·dv/dt = drive force minus grade force, rolling resistance and air drag, with a 0.8 s actuator delay and a 0.25 s speedometer lag. Heights in the 3D scene are exaggerated 2.5 times so the slope is visible.
Subject: Technical logistics & intralogistics
More from Technical logistics & intralogistics
- Evaluating automation: LCCA, NPV, payback
- Flow lab: throughput, WIP, cycle time
- Conveyor atlas 3D
- AGV fleet sizing
- AGV navigation 3D
- Palletising cell 3D
- Robot kinematics & workspace (3D)
- Tugger train planner 3D
A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps