The MCU RAM size requirement for Simulink Multi-Object Tracker module
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I want to generate c code for Simulink Multi-Object Tracker function and download it to MCU. About How much ram size would it require for the MCU? Is it OK to run on a MCU only with less than 200K ram?
0 comentarios
Respuestas (2)
Elad Kivelevitch
el 24 de Jul. de 2023
David,
It is possible to deploy trackers with less than 200K RAM, however the general answer to your question depends on how many detections you're expecting and how many objects you want to track.
I recommend that you look into the following examples to see how to limit generated code size.
The example shows how to use trackerJPDA but you can also use trackerGNN in the same way.
0 comentarios
Prashant Arora
el 24 de Jul. de 2023
Editada: Prashant Arora
el 24 de Jul. de 2023
Hi David,
The memory required by multi-object trackers depends on how you configure them. The trackers define properties like MaxNumTracks, MaxNumSensors, which directly impacts the memory footprint. In addition to that, I did some work in improving memory footprint of some of the multi-object trackers in Sensor Fusion and Tracking Toolbox in R2022a.
The GNN (Multi-sensor, multi-object tracker using GNN assignment - Simulink (mathworks.com)) and JPDA(Joint probabilistic data association tracker - Simulink (mathworks.com)) tracker blocks can now generate code without requiring dynamic memory allocation and with strict single-precision. In addition, they expose certain parameters to further reduce the memory footprint. For example, there are memory management properties added to the block (check out parameters enabled with "Enable memory management"). To understand their meaning, consider reading embedded code generation section of the example - Processor-in-the-Loop Verification of JPDA Tracker for Automotive Applications - MATLAB & Simulink (mathworks.com)
You can also use static code metrics - Generate Static Code Metrics Report for Simulink Model - MATLAB & Simulink (mathworks.com) to analyze the memory footprint of the generated code. The metrics will provide you the memory required from the device for the chosen tracker configuration.
From experience, I think a GNN tracker with the following parameters:
Maximum 32 tracks
Maximum 32 measurements
Maximum cluster size of 5 tracks and 5 measurements
should consume < 200 KB RAM when dynamic allocation is disabled. I would encourage you to generate code and verify it with static code metrics to ensure.
Hope this helps. Please feel free to reach out here if you have additional questions regarding this.
Prashant
2 comentarios
Prashant Arora
el 16 de Ag. de 2023
Hi David, the tracker uses maximum number of tracks to define both tentative and confirmed tracks. Tentative tracks are createad from every unassociated detection. If you set it to 15 and the tracker is maintaining 15 tentative + confirmed tracks, it will not initiate new tracks until some tentative tracks are deleted.
To reduce memory consumed, I would suggest to turn on memory management and set appropriate values of maximum number of tracks and detections per cluster. (assuming you're using GNN or JPDA tracker).
Ver también
Categorías
Más información sobre Tracking and Sensor Fusion en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!