필터 지우기
필터 지우기

How to code Model Predictive Control in Simulink with DAQ Board Input Output

조회 수: 5 (최근 30일)
Hello Community,
Currently I have only Discrete Statespace Model of Plant.
My Goal is to implement MPC controller on real hardware i.e. PZT actuator and operated it.
I will take Analog input signal (y) from my Sensor using NI DAQ USB6363 as well I will apply my control output signal (u) from MPC to my plant using same NI DAQ board.
I need help in establishing this task, I don't know how to move forward and how to design simulink model for such task. I am also not sure about objective function, constraints etc of my system yet.
As far I know that I have only A,B,C,D matrices. Now the next step is to solve Quadratic Problem and define constraints, but how to do? In short I need some codes for MPC I think.
Any help will be appreciated.

채택된 답변

Angelo Yeo
Angelo Yeo 2023년 11월 6일
This question is quite broad. Initially, it seems beneficial to utilize MathWorks' Model Predictive Control toolbox. However, before that, it might be better to familiarize yourself with the basic concepts. The videos available at this link could provide a good foundation for learning these basic concepts.
Afterwards, I recommend using our toolbox, which can be found at this link. However, a potential obstacle could be using NI DAQ device. For this, you would need to use the Hardware Support Package, which can be installed from this link. Once installed, you can receive data through an interface like this one.
You can then control the received data using the Model Predictive Control toolbox and send the output back as needed.
  댓글 수: 4
Muhammad
Muhammad 2023년 11월 17일
I just want to ask few questions,
Does MPC Toolbox can work in Real Time with DAQ Devices? After designing controller my goal is to implement it to the physical device, which I will do by using DAQ Board.
Angelo Yeo
Angelo Yeo 2023년 11월 17일
Hi @Muhammad, in short answer, yes.
You can refer to the following documentation for real time application with MPC. In essence, you can generate C/C++ code with "Coder" group toolboxes and embed the code into your device.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Model Predictive Control Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by