Skip to main content

Model Based Automatic Code Generation for Nonlinear Model Predictive Control

  • Conference paper
  • First Online:
Book cover Numerical Software Verification (NSV 2016)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 10152))

Included in the following conference series:

  • 410 Accesses

Abstract

This paper demonstrates a symbolic tool that generates C code for nonlinear model predictive controllers. The optimality conditions are derived in a quick tutorial on optimal control. A model based workflow using MapleSim for modeling and simulation, and Maple for analysis and code generation is then explained. In this paper, we assume to have a control model of a nonlinear plant in MapleSim. The first step of the workflow is to get the equations of the control model from MapleSim. These equations are usually in the form of differential algebraic equations. After converting the equations to ordinary differential equations, the C code for the model predictive controller is generated using a tool created in Maple. The resulting C code can be used to simulate the control algorithm and program the hardware controller. The proposed tool for automatic code generation for model predictive controllers is open and can be employed by users to create their own customized code generation tool.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Maplesoft, a division of Waterloo Maple Inc.: MapleSim (2016)

    Google Scholar 

  2. Maplesoft, a division of Waterloo Maple Inc.: Maple (2016)

    Google Scholar 

  3. Qin, S.J., Badgwell, T.A.: A survey of industrial model predictive control technology. Control Eng. Pract. 11, 733–764 (2003)

    Article  Google Scholar 

  4. Qin S.J., Badgwell T.A.: An overview of nonlinear model predictive control applications. In: Allgöwer F., Zheng A. (eds.) Nonlinear Model Predictive Control. Progress in Systems and Control Theory. Springer, Switzerland (2000)

    Google Scholar 

  5. Boyd, S., Vandenberghe, L.: Convex Optimization. Cambridge University Press, Cambridge (2004)

    Book  MATH  Google Scholar 

  6. Diehl, M., Ferreau, H.J., Haverbeke, N.: Efficient numerical methods for nonlinear MPC and moving horizon estimation. In: Magni, L., et al. (eds.) Nonlinear Model Predictive Control. LNCIS, vol. 384, pp. 391–417. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  7. Ohtsuka, T.: A continuation/GMRES method for fast computation of nonlinear receding horizon control. Automatica 40, 563–574 (2004)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Behzad Samadi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Samadi, B. (2017). Model Based Automatic Code Generation for Nonlinear Model Predictive Control. In: Bogomolov, S., Martel, M., Prabhakar, P. (eds) Numerical Software Verification. NSV 2016. Lecture Notes in Computer Science(), vol 10152. Springer, Cham. https://doi.org/10.1007/978-3-319-54292-8_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-54292-8_8

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-54291-1

  • Online ISBN: 978-3-319-54292-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics