UDP Communication slowing Simulink Model

2 次查看(过去 30 天)
Gday all,
For context, I am building a simulink model that will communicate with the simulator X-plane through UDP to control an aircraft. The Simulink model inputs a UDP connection and a live video feed. Using an object detection system to identify key features, a command direction will begiven, and outputted to X-plane through UDP communication.
My issue is that the UDP communication input significantly decreases the performance of the model. I have tried every UDP commenction block avaialble in Simulink. I have tested the simulation with other blocks, and I'm confident that the UDP communication input block (either of them) are the root of the issue. I havent had this issue with other models (such as image segmentation model). Nor does the UDP output show performance issues.
Is there a way to fix the performance issues seen in the model? Is there some UDP secret I dont know about? Workarounds? Would the UDP comminication block be interfereing with any other block (deep learning, PID...)?
Any quidence or tips would be appreciated

回答(1 个)

Rahul
Rahul 2024-8-9
I understand that the UDP communication blocks that you are trying to use in your Simulink model are slowing down the simulation.
You can try out a couple of steps to help you troubleshoot this issue:
  • If the sample time of the UDP blocks are not set appropriately, then the simulation can become slow due to higher number of data points being sent and received per second. Ensure you are selecting an appropraie sample time for the UDP blocks.
  • Adjusting the buffer size properties of the UDP blocks can help in reducing overhead occurring in the blocks due to frequent read/write operations.
  • Adjust the solver settings of the Simulink model as they might be causing the delay for the UDP blocks.
  • In the Debug Tab of Simulink try using Profiler's to identify the exact source of bottleneck in the UDP models.
You can refer to the following Mathworks documentations to know more about UDP blocks:
Hope this helps! Thanks.

类别

Help CenterFile Exchange 中查找有关 Development Computer Setup 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by