How to convert from a function of frames to a function of time for radar board (Infineon Position2Go)?

6 views (last 30 days)
Hi Matlab Community,
I am currently using Infineon's Position2Go FMCW radar board for my project to measure instantaneous sprinting speed and walking speed. After extracting the raw data to Matlab, I noticed that the graphs I have are all as a function of Frames on the X axis. How can I convert them to a function of time (in seconds) instead?
My configs are as follows:
  • 32 Chirps Per Frame
  • 64 Samples Per Chirp
  • 150ms Frame Interval
Does it mean that for every second, there are 6.66 Frames(1/150ms) ?

Answers (1)

Anshuman
Anshuman on 15 Jul 2024
Yes, you are correct. Given that the frame interval is 150 ms, it means that there are approximately 6.66 frames per second. To convert the X-axis from frames to time (in seconds), you can use this relationship.
Here's how you can do it in MATLAB:
% Assuming frames is the number of frames you have
frames = 1:N; % Replace N with the actual number of frames
frame_interval = 0.150; % Frame interval in seconds
% Create the time vector
time = (frames - 1) * frame_interval;
% Assuming data is the variable that contains your measurements
% Replace 'data' with your actual data variable
figure;
plot(time, data);
xlabel('Time (seconds)');
ylabel('Measurement');
title('Measurement vs Time');
% If you have multiple data sets, you can plot them similarly
% For example, if you have multiple measurements stored in a matrix
% where each row corresponds to a different measurement:
figure;
hold on;
for i = 1:size(data, 1)
plot(time, data(i, :));
end
xlabel('Time (seconds)');
ylabel('Measurement');
title('Measurement vs Time');
legend('Measurement 1', 'Measurement 2', 'Measurement 3', ...); % Add appropriate legends
hold off;

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!