How to simulate the io interface model of hil testing with Simulink?

5 次查看(过去 30 天)
I have already simulated the entire vehicle model, but I don't know how to simulate the IO interface model that can interact with hardware data.

回答(1 个)

Ayush
Ayush 2024-8-8
编辑:Ayush 2024-8-8
Hi Lixue,
To perform or simulate a Hardware-In-the-Loop (HIL) testing where the model interacts with the hardware data, you would need to install and get familiar with some of the toolboxes that MATLAB provide as well as check for compatibility with the hardware that you would be using in the vehicle model. Here is a high-level overview on how to achieve the same:
1. First, you would need to install the required toolboxes for HIL simulation for which you can refer to the following documentations:
Simulink Real-Time to run the simulation with real-time data:
Instrument Control Toolbox to communicate with external instruments and sensors:
Vehicle Network Toolbox to utilize communication protocols like CAN, LIN popularly used in the automotive industry:
2. Then, after configuring your hardware to work as intended using the above toolboxes and adding relevant I/O blocks in your vehicle model to interact with the hardware during simulation. Some blocks that might come in handy are the "Analog Input/Output" , "Digital Input/Output" and many more.
3. After this, you can simply run the simulation, capture the real time data from the hardware connected and monitor the results through data logging and analysis algorithms.
Additionally, you can also check out this example from the MathWorks documentation to take reference on how an HIL simulation is achieved in an Electric Vehicle Model:
Hope this helps!
  1 个评论
lixue
lixue 2024-8-28
Hello, I would also like to ask if it is possible to provide a detailed explanation on how to add relevant IO modules to the vehicle model if there are no tools like Speedgoat and only Simulink is available. Thank you!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

标签

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by