- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi,

In the REF_BGT60LTR11AIP_MO Dave project the config.h file allows for the customisation of the sampling frequency, however this value is not used in any other function that motion_detector_init, so I was wondering how adjusting this value affects the performance. I understand it used to define the Doppler_Hz_per_bin variable but this also is only called in the motion_detector_init function.

Also, the frame interval is used in setting the RTC tick, however could you please explain why the following equation is used when setting the RTC tick:

rtc_tick_for_frame_interval =((motion_detector-> frame_interval /RTC_CLOCK_INTERVAL_MS) -1)

Thanks for your help!

Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hello @nDonnelly,

The Algo_fft_peak.c code is designed to search for peaks, but it does not calculate the doppler frequency, which is an element of the advance motion sensing algorithm. Unfortunately, we are unable to provide the source code for the algorithm.

The expression rtc_tick_for_frame_interval = ((motion_detector->frame_interval / RTC_CLOCK_INTERVAL_MS) -1) will produce an approximate value of 10,000.

Assuming the input clock frequency is 32.768 kHz, which is a typical frequency for a low-power oscillator, and the prescaler is set to 10,000, the RTC clock frequency would be 3.2768 Hz. This implies that the RTC will generate a new counter value every 1/3.2768 seconds or approximately 305.18 milliseconds. Therefore, the frame interval in this case would be approximately 305.18 milliseconds.

However, it is important to remember that the actual frame interval may depend on the specific hardware and software implementation, as well as any additional processing or interrupt latency that may be involved.

The prescaler value has been chosen to ensure precise data acquisition.

Best Regards,

Pugitha

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hello @nDonnelly,

The sampling frequency is an important parameter in radar systems as it determines the accuracy of the measured Doppler frequency. The Doppler frequency is the difference between the transmitted and received radar signal, which is caused by the motion of the target. The Doppler shift can be determined by calculating the Fourier transform of the received signal, and the frequency resolution of this calculation is determined by the sampling frequency. Since the source code for the Advance Motion Sensing algorithm is private, it is not possible to understand how the parameters impact the algorithm's performance.

The expression rtc_tick_for_frame_interval = ((motion_detector->frame_interval / RTC_CLOCK_INTERVAL_MS) -1) is utilized by the RTC module to establish the prescaler for the timer.

Best Regards,

Pugitha

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi Pugitha,

Thanks for getting back to me! I understand that the sampling frequency affects the FFT, however it is not used in the algo_fft_peak.c algorithm. Can you confirm that the sampling frequency is only affects the performance of the advanced motion sensor algorithm and not the FFT peak algorithm.

In terms of the RTC, I understand it is setting the prescaler, my question was more related to the equation itself and how it is achieved, for example why is 1 subtracted.

Finally, would it be possible to be sent a copy of the advance motion sensor algorithm, as I am working on integrating your sensor into some of our existing products and it would be very beneficial to see this algorithm.

Thanks for help!!

Nicole

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hello @nDonnelly,

The Algo_fft_peak.c code is designed to search for peaks, but it does not calculate the doppler frequency, which is an element of the advance motion sensing algorithm. Unfortunately, we are unable to provide the source code for the algorithm.

The expression rtc_tick_for_frame_interval = ((motion_detector->frame_interval / RTC_CLOCK_INTERVAL_MS) -1) will produce an approximate value of 10,000.

Assuming the input clock frequency is 32.768 kHz, which is a typical frequency for a low-power oscillator, and the prescaler is set to 10,000, the RTC clock frequency would be 3.2768 Hz. This implies that the RTC will generate a new counter value every 1/3.2768 seconds or approximately 305.18 milliseconds. Therefore, the frame interval in this case would be approximately 305.18 milliseconds.

However, it is important to remember that the actual frame interval may depend on the specific hardware and software implementation, as well as any additional processing or interrupt latency that may be involved.

The prescaler value has been chosen to ensure precise data acquisition.

Best Regards,

Pugitha