- Increased memory usage: Buffering more data samples will require additional memory on the MCU to store the buffered data. You need to ensure that the MCU has enough memory available to accommodate the increased buffer size.
- Increased latency: Buffering introduces additional delay between the time the data is sampled and when it is transmitted/received. This can impact the real-time responsiveness of your system, especially if there are strict timing requirements.
Communication Rate Between Host and Target Models
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am using a target and host model set up for a motor controller. I am currently using a sampling rate of 10 kHz, and I am aware that the serial communication cannot operate at this speed. Therefore, the debug data is buffered to 600 samples before transmiting from the host to slow down the communication rate. In our application, there may be a variable sampling rate, and when I increase the sampling rate high enough the models can no longer transmit/recieve all of the data. I can probably buffer more data samples before transmitting but my question is as follows;
Is there a downside to buffering more data samples? Does it take up more space on the MCU (we're currenlt using the F28379D)? Can I buffer too much data?
Additionally, is there an aprroximate max communication rate between the two models? I know with 600 buffered samples at a sample rate of 10 kHz, they models communicate at ~17 Hz. What is the maximum rate they can communicate?
Thanks!
0 comentarios
Respuestas (1)
Varun
el 15 de Sept. de 2023
Hi,
I understand that you are currently using a sampling rate of 10 kHz and buffering 600 samples before transmitting from the host to slow down the communication rate.
Here are the disadvantages of buffering more data samples:
Communication rate = Sampling rate / Buffer size Communication rate = 10 kHz / 600 samples Communication rate = ~16.7 Hz
So, with the current setup, the host and target models communicate at approximately 16.7 Hz.
To determine the maximum communication rate, you can perform some testing and analysis on your system. Gradually increase the sampling rate and observe the behaviour of the system. Monitor the MCU's memory usage and ensure it remains within acceptable limits. Also, consider the impact on other system tasks and the overall system performance.
Hope this helps.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!