I'm trying to evaluate data I recorded with the RadarGUI to get the same results as the RadarGUI shows me. I'm working with a Distance2Go Demo Board.
The D2G board detects two targets and displays both in the RadarGUI, so far so good. Then I used the record function to record the IQ data, the FFT data and the target info data.

Now I'm trying to evaluate the recorded FFT data to get the same target info (range and level) as the RadarGUI shows me. However, I cannot get it to work (I'm using MATLAB).
The recored FFT data (can be easily pasted into MATLAB) is attached to this post. The FFT bin size is the sampling frequency divided by the FFT size which is 166666 Hz/1024=162.76 Hz. To get the desired info I should have peaks with a beatfrequency as follows:
1304.6 Hz, 2609.3 Hz. Therefore the results I should get are: target 1) level: 1341, range 260 cm and target 2) level: 882, range 139 cm. So the 1304 Hz are connected to target #2, and the 2609 Hz to target #1.

I am trying to find the FFT peaks with the following MATLAB function:

Code:

[lvl,idx]=findpeaks(fftdata,'MinPeakHeight',10);

, where 10 is the range threshold and fftdata is a vector that contains the data from the attached file.
The values in lvl correspond to the levels mentioned above. But there is a problem with the beatfrequency. I calculate it by

Code:

fbeat=idx.*binsize;

. By doing so, I don't end up with the frequencies mentioned above. What am I doing wrong?

Another problem is that I get 11 instead of 2 results by doing that...

The Sampling Frequency that you are talking about is indeed the ADC sampling rate (Number of samples per second). The ADC sampling rate is given by: (4*Bandwidth*Max_distance)/(c_light*T_chirp).
Secondly, the value '10' used as Threshold to find peaks is very low. This is reason you observe 11 peaks instead of 2.
You can use the following method to compute the target ranges from the FFT data.

threshold=300;% Range Threshold
[lvl,idx]=findpeaks(fftdata,'MinPeakHeight',threshold);
c0=3e8; % Speed of light in vacuum
BW=250e6; % Bandwidth
NTS=250; % Number of ADC samples per chirp
T_chirp=1.5e-3; % Up chirp duration
RANGE_FFT_SIZE=1024;
R_max = NTS*c0/(2*BW); % Maximum Range attainable by the system
DistPerBin = R_max/(RANGE_FFT_SIZE); %Distance Per frequency bin
dist_vec = linspace(0,(R_max-R_max/(RANGE_FFT_SIZE))/2, RANGE_FFT_SIZE/2); % distance vector in m
Range=(idx-1) * DistPerBin; % Target ranges
Target_strength=lvl;
f_b=(2*BW*Range)./(c0*T_chirp); % Target beat frequency
% Plot the fftdata
figure();
plot(dist_vec,A);
xlabel('Range (m)');
ylabel('FFT')

This should give you the values of the target ranges and corresponding beat frequencies.
Hopefully this helps you.

The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

thank you for your reply, I guess this really helps me!
Just one question: What is 'A' supposed to be? You are using it for plotting but it is not defined anywhere before?
I'll try out your example later and give you response. Maybe I'll figure out what A is by myself.

Hey,
sorry for the late respone, but it is working fine. I'm using the fftdata as A.
I understand that the threshold 10 might be a bit too low but I'm still having a problem that when I set the threshold value to the same value as in the Radar GUI I keep getting different results. But it is okay as it is now, I can work with that!

The Sampling Frequency that you are talking about is indeed the ADC sampling rate (Number of samples per second). The ADC sampling rate is given by: (4*Bandwidth*Max_distance)/(c_light*T_chirp).

If I rearrange the formula it is (calling Max_distance=R_max):
R_max = (f_Sampling*c*T_chirp)/(4*Bandwidth).
With f_Sampling=167 kHz (as mentioned above), c=3e8 m/s, T_chirp=1500 us, Bandwidth=250 MHz I'm getting: 75 m for R_max

Your are also saying:

Originally Posted by Vaishnav

R_max = NTS*c0/(2*BW); % Maximum Range attainable by the system

With NTS=250 (as you also mentioned) and a BW (=Bandwidth) of 250 MHz I get: 150 m.

So you gave me two formulas that give me two different results? How can that be? Where is my mistake or misunderstanding?
In general I prefer the idea of saying: The maximum range is affected by the maximum attainable beat frequency which should be N/(2*T_chirp)=83333 Hz. Or in other words: f_Sampling/2, which gives the same result.
To get the correct result (which seems to be 150 m as it fits my measurements and gives the bin size that is used in the Radar GUI) I'd need to use a f_Sampling of 333333 Hz. Why is that?

All content and materials on this site are provided “as is“. Infineon makes no warranties or
representations with regard to this content and these materials of any kind, whether express or
implied, including without limitation, warranties or representations of merchantability, fitness for
a particular purpose, title and non-infringement of any third party intellectual property right. No
license, whether express or implied, is granted by Infineon. Use of the information on this site may
require a license from a third party, or a license from Infineon.

Infineon accepts no liability for the content and materials on this site being accurate, complete or up-
to-date or for the contents of external links. Infineon distances itself expressly from the contents of
the linked pages, over the structure of which Infineon has no control.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings
and use of the content on this site are subject to the Usage Terms of the site; third parties using
this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of
this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements,
improvements and other changes to the content and materials, its products, programs and services
at any time or to move or discontinue any content, products, programs, or services without notice.

## Bookmarks