Real Time Simulation and HIL
조회 수: 11 (최근 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
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
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
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
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.
댓글 수: 0
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
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 Center 및 File Exchange에서 Multicore Processor Targets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!