Run our first serious simulation

Let's place a Step block in the model, connect it to the Target Goto (whose corresponding From block is connected to the Target speed controller input), and set its Final value to 100 km/h.

Run the simulation and open the Scope block. The speed graph should be like this one:

Run our first serious simulation

Quite an overshoot! The vehicle speed reaches almost 150 km/h when the controller closes the throttle. This is due to a too high integral gain, Ki, forcing the vehicle to go a lot faster than intended. Who wants a ride?

Calibrate the PI controller

To calibrate the PI controller constants, Kp and Ki, we'll use this manual method of keeping Ki to zero ...

Get Getting Started with Simulink now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.