O'Reilly logo

Getting Started with Simulink by Luca Zamboni

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required