Real Time Embedded Target Application of MPC

버전 (1.56 MB) 작성자: Nassim Khaled
Practical Design and Application of Model Predictive Control- Chapter 9

다운로드 수: 1.7K

업데이트 날짜: 2018/10/29

라이선스 보기

These are the files for Chapter 9 for the book " Practical Design and Application of Model Predictive Control" by Elsevier (eBook ISBN: 9780128139196, Paperback ISBN: 9780128139189).
This chapter guides the user through the process of controlling speed of a DC motor using MPC and run the controller on a real time hard-ware.
To collect data for system identification, run Chapter_9_Section_6_Model.slx and then Chapter_9_Section_6_Script.m to plot the results. It is assumed that the user has Arduino Mega connected per instructions in chapter_9.

Run Chapter_9_Section_7_Script.m to assess nonlinearity of the motor. In this step, the data of the DC motor is already embedded in the script. Use your collected data instead of the one in the script.

Run Chapter_9_Section_8_Script.m to perform system identification.
In folder Section_9, you will find the 3 linear models for the DC motor. You can use these to create MPC controller.
The MPC sessions are saved under MPC_DesignTask_Chapter_9_Section_9_MPC_1.mat , MPC_DesignTask_Chapter_9_Section_9_MPC_2.mat and MPC_DesignTask_Chapter_9_Section_9_MPC_3.mat
The exported MPC controllers are saved under Motor_Linear_MPC_Mode_1.mat, Motor_Linear_MPC_Mode_2.mat and Motor_Linear_MPC_Mode_3.mat

To run the Multi-Mode MPC controller on Arduino, go to Chapter_9/Section_10 folder and follow these instructions:
Make sure the motor hardware and the Arduino Mega board are connected to the computer with an open session of Matlab®(preferably R2017a). Set Matlab® directory to Chapter_9/Section_10 directory. In the Matlab® command window load the MPC controller .mat files by typing the commands load Motor_Linear_MPC_Mode_1.mat; load Motor_Linear_MPC_Mode_2.mat; load Mo-tor_Linear_MPC_Mode_3.mat. Open Simulink® model Chapter_9_Section_10_Model_1.slx. Then Click on the Run button to generate code from the model, compile and deploy into the Arduino Mega.

인용 양식

Nassim Khaled (2023). Real Time Embedded Target Application of MPC (, MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2017a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
 Power Electronics Control 커뮤니티에 더 많은 파일이 있습니다

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!





버전 게시됨 릴리스 정보

Updated the website for the project.

We added a tag: Arduino.