フィルターのクリア

Non-real time simulation with Arduino

2 ビュー (過去 30 日間)
Daniel
Daniel 2014 年 3 月 16 日
回答済み: Daniel 2014 年 3 月 22 日
Here's my question:
I want Simulink to run a simulation when hooked up to my Arduino, but I want it to run much faster than real-time. The idea here is to have a simulation of my physical system run, then, depending on the outputs of the simulation, change the inputs to my actual physical system. In short, it's a way to see how my physical system will respond to an input before actually applying that input.
My question to you: How can I get simulink to run its simulation and spit out results to my Arduino faster than real-time? Is there a way to specify my simulation time?
Your assistance here would be very much appreciated.

採用された回答

Kaustubha Govind
Kaustubha Govind 2014 年 3 月 20 日
MATLAB/Simulink runs on Windows, Mac and Linux; none of which are real-time operating systems. Therefore, in general, MATLAB/Simulink are not recommended for real-time simulation. There are two add-on products that are available for true real-time simulation: Simulink Real-Time (formerly xPC Target) and Real-Time Windows Target.
However, if you are designing for a soft real-time application, and your Simulink model runs faster than your application, you might be able to get away with this.
Do you plan to run your model in a loop with the hardware, or do you asynchronously request results from Simulink when inputs become available?

その他の回答 (1 件)

Daniel
Daniel 2014 年 3 月 22 日
Thanks very much for the helpful response. So it sounds like by default, my simulation will run fast, which is what I want.
My plan is to compile the Simulink model into C code to my hardware.

カテゴリ

Help Center および File ExchangeMATLAB Support Package for Arduino Hardware についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by