Real Time Simulation and HIL

13 次查看(过去 30 天)
Hi
I am currently working on real time simulation and hardware in loop simulation. I have only some knowledge about this. I have an ARDUINO mega and uno board. I am average with simulink. I have matlab 2012a.
Can you please help me how to start and what all things will be required. I don't want to use xPC target due to budget issue. So please suggest how can i start with HIL and real time simulation.
Cheers!!
[Merged information from duplicate question]
Please suggest me how can i perform hardware in loop and real time simulation using matlab and simulink.
I am pretty good with simulink and currently learning matlab.
I want to perform these things for my quadrotor.
PLEASE HELP !!! :)
  1 个评论
Mohamed elalfy
Mohamed elalfy 2013-10-18
Hi sarthank iam interesting in the same topic also iwould perform it on a quadrotor for my graduation project so i wonder if you found some thing useful or not ? did you perfprm HIL using arduino only without xpc target?

请先登录,再进行评论。

采纳的回答

Dan Lluch
Dan Lluch 2012-6-11
without getting into some of the loaded terms of 'real-time' and 'HIL' and what that means to folks...
Assume you want to put algorithms on some target processor (you call out that you have some arduinos), and you want that platform to execute that algorithm in 'real-time' while talking to hardware (potentially both inputs and outputs)...
With R2012a, go ahead and run the targetinstaller to get some of the Run on Target Hardware support: http://www.mathworks.com/products/simulink/simulink-targets/ Here is a video of the install process: http://www.mathworks.com/products/simulink/simulink-targets/videos/introduction-to-simulink-support-for-target-hardware.html
Note that even these arduionos can have more feature rich support from MathWorks tools, such as the Embedded Coder support package: http://www.mathworks.com/matlabcentral/fileexchange/30277 There was a previous post/answer for more infor on some of the differences.
There is not RTOS running on the arduino, but there is an overrun flag that flips a bit in case the processor isn't keeping up, so at least you know it isn't keeping up and try to change something. You will get more fidelity/capability as you move to RTWT, xPC Target, and then potentially other embedded platforms. It is true that xPC Target is the support from MathWorks for full featured and commercial strength offerings, especially when paired with Speedgoat hardware to form xPC Target Turnkey. There are also many third party options (and you can look at the connections program for those).
Lastly generally the application and requirements drive the real-time and HIL solution needed, which would likely push you in one of the directions that folks have suggested.
Good luck and have fun learning!
HTH Dan
  2 个评论
sarthak
sarthak 2012-6-12
Can i use xPC target..by making another desktop as target pc because i dont have xPC turnkey..its expensive...i have heard that i can use another pc as target pc..can u please tell me smthing about this???
:)
TAB
TAB 2012-6-12
Yes, you can use other desktop computer (laptop is not recommended) as xPC target. Host PC and Target PC can be connected over ethernet or COM. For detailed configuration see
http://www.mathworks.com/help/toolbox/xpc/gs/f1-21609.html

请先登录,再进行评论。

更多回答(2 个)

Ryan G
Ryan G 2012-6-11
Depending on how important actual real-time is vs quasi real-time you could use the pacer block from the Aerospace blockset.
For guaranteed real time you could also try real-time windows target.

Kaustubha Govind
Kaustubha Govind 2012-6-11
AFAIK, the only HIL solution directly available from MathWorks is xPC Target. Please refer to the xPC Target documentation about setting up.
There is currently no MathWorks solution for HIL with Arduino targets, and I'm not aware of any third-party solution either.
  1 个评论
benn nguyen
benn nguyen 2013-12-29
Rtwt supports hil (normal/external simulation)
"Real-Time Windows Target™ provides a real-time engine for executing Simulink® models on a Microsoft® Windows® PC and blocks that connect to a range of I/O boards. It enables you to create and control a real-time system for rapid prototyping or *hardware-in-the-loop* simulation"

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Multicore Processor Targets 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by