C Code Generation Applied to Nonlinear Model Predictive Control for an Artificial Pancreas

被引:0
|
作者
Boiroux, Dimitri [1 ,2 ]
Jorgensen, John Bagterp [1 ]
机构
[1] Tech Univ Denmark, Dept Appl Math & Comp Sci, DK-2800 Lyngby, Denmark
[2] Danish Diabet Acad, DK-5000 Odense, Denmark
关键词
OPTIMIZATION; OIL;
D O I
暂无
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
This paper presents a method to generate C code from MATLAB code applied to a nonlinear model predictive control (NMPC) algorithm. The C code generation uses the MATLAB Coder Toolbox. It can drastically reduce the time required for development compared to a manual porting of code from MATLAB to C, while ensuring a reliable and fairly optimized code. We present an application of code generation to the numerical solution of nonlinear optimal control problems (OCP). The OCP uses a sequential quadratic programming algorithm with multiple shooting and sensitivity computation. We consider the problem of glucose regulation for people with type 1 diabetes as a case study. The average computation time when using generated C code is 0.21 s (MATLAB: 1.5 s), and the maximum computation time when using generated C code is 0.97 s (MATLAB: 5.7 s). Compared to the MATLAB implementation, generated C code can run in average more than 7 times faster.
引用
收藏
页码:327 / 332
页数:6
相关论文
共 50 条
  • [1] Nonlinear Model Predictive Control and Artificial Pancreas Technologies
    Boiroux, Dimitri
    Jorgensen, John Bagterp
    [J]. 2018 IEEE CONFERENCE ON DECISION AND CONTROL (CDC), 2018, : 284 - 290
  • [2] A Tutorial on C/GMRES and Automatic Code Generation for Nonlinear Model Predictive Control
    Ohtsuka, Toshiyuki
    [J]. 2015 EUROPEAN CONTROL CONFERENCE (ECC), 2015, : 73 - 86
  • [3] Model Based Automatic Code Generation for Nonlinear Model Predictive Control
    Samadi, Behzad
    [J]. NUMERICAL SOFTWARE VERIFICATION (NSV 2016), 2017, 10152 : 85 - 95
  • [4] A Parallel Code Generation Toolkit for Nonlinear Model Predictive Control
    Deng, Haoyang
    Ohtsuka, Toshiyuki
    [J]. 2018 IEEE CONFERENCE ON DECISION AND CONTROL (CDC), 2018, : 4920 - 4926
  • [5] Automatic Code Generation Tool for Nonlinear Model Predictive Control with Jupyter
    Katayama, S.
    Ohtsuka, T.
    [J]. IFAC PAPERSONLINE, 2020, 53 (02): : 7033 - 7040
  • [6] Zone Model Predictive Control of an Artificial Pancreas
    Doyle, Francis J., III
    [J]. PROCEEDINGS OF THE 10TH WORLD CONGRESS ON INTELLIGENT CONTROL AND AUTOMATION (WCICA 2012), 2012, : 8 - 9
  • [7] A toolkit for nonlinear model predictive control using gradient projection and code generation
    Kalmari, Jouko
    Backman, Juha
    Visala, Arto
    [J]. CONTROL ENGINEERING PRACTICE, 2015, 39 : 56 - 66
  • [8] Nonlinear Model Predictive Control and System Identification for a Dual-hormone Artificial Pancreas
    Reenberg, Asbjorn Thode
    Ritschel, Tobias K. S.
    Lindkvist, Emilie B.
    Laugesen, Christian
    Svensson, Jannet
    Ranjan, Ajenthen G.
    Norgaard, Kirsten
    Jorgensen, John Bagterp
    [J]. IFAC PAPERSONLINE, 2022, 55 (07): : 915 - 921
  • [9] Embedded Model Predictive Control for a Wearable Artificial Pancreas
    Chakrabarty, Ankush
    Healey, Elizabeth
    Shi, Dawei
    Zavitsanou, Stamatina
    Doyle, Francis J., III
    Dassau, Eyal
    [J]. IEEE TRANSACTIONS ON CONTROL SYSTEMS TECHNOLOGY, 2020, 28 (06) : 2600 - 2607
  • [10] Model predictive control with integral action for artificial pancreas
    Incremona, Gian Paolo
    Messori, Mirko
    Toffanin, Chiara
    Cobelli, Claudio
    Magni, Lalo
    [J]. CONTROL ENGINEERING PRACTICE, 2018, 77 : 86 - 94