MATLAB NMPC routine and examples

All of the "simpler" examples in the book were computed with our MATLAB NMPC routine "nmpc.m". Here you can download this routine and the M-Files for the individual examples which use this routine. The code should work for MATLAB releases R2007a and newer and requires the optimization toolbox. For more information see Section A.1 in the book and the comments and help texts in each file.

MATLAB NMPC routine: nmpc.m

(Version of 30th May 2011 in which a bug in the constraint handling has been fixed)

M-Files for examples in the book using the MATLAB NMPC routine "nmpc.m":

Example 6.26: example_6_26.m

Example 6.34: example_6_34.m

Example 7.2: example_7_2.m

Example 8.12: example_8_12.m

Example 8.31: example_8_31.m

Example 8.39: example_8_39.m

The following file contains the minimal amount of declarations needed in order to call the NMPC routine "nmpc.m". It can be used as a template for own examples.

Minimal example: minimal_example.m

→ back to homepage

© 2010-2011 Lars Grüne, Jürgen Pannek