Is it possible to receive data from arduino via serial communication, then compute with the data and send information back to the arduino?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have to run a controller through arduino that controls a motor for a specifc purpose. I have designed the Model predictive controller in Simulink with my model, and everything works as intended. Is it possible, instead od reading values from the simulated model, to receive real values from an arduino board into matlab and use those in the control implementation on simulink, then send the control signal back? Say for example in my simulated model, I measure some variable, x. I measure this x in the simulation, feed it back to the MPC, compute a control signal, then send that to the simulated plant. Is it possible to instead, receive x into my simulink model from my arduino board (would be measured from the physical model), use this x in my MPC controller, and send the computed control signal back to my arduino where further processing and actuating of the various physical systems can be done?
댓글 수: 0
답변 (1개)
Biral Pradhan
2022년 9월 1일
I understand you want to achieve serial transmission and reception with an Arduino via your Simulink model. Kindly follow the below documentation link for better understanding of "Serial Transmission" and "Serial Reception" blocks.
I would also recommend going through the below example documentation to help with the overall process.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Modeling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!