How can I configure the IWR6843ISK radar to continuously chirp in order to capture phase-coherent data?

11 views (last 30 days)
Hi MATLAB community,
I have an idea of how to get raw data using IWR6843ISK with dca1000. I am able to plot range profiles and calculate Angle of Arrival. Now I am trying to make SAR image using this mmwave radar and for that I need phase coherent data which has become a challenge for me because I need inter-frame coherence. I get intra-frame coherence but I am not sure how to get inter-frame coherence. My question is how to collect data in order to have PLL system. I am adding codes below that I use to collect data. I am not sure if there is any difference between these two codes or not(whether one code does collect coherent data and other does not). Any help will be highly appreciated!
Method 1:
clear dca
% Create connection to the TI Radar board and DCA1000EVM Capture card
dca = dca1000("IWR6843ISK");
% Specify the duration to record ADC data
dca.RecordDuration = 15;
% Specify the location at which you want to store the recorded data along
% with the recording parameters
dca.RecordLocation = "C:\Users\Zahra\Downloads\potato_MATLAB\potato_scripts\SAR_2D_Data\continuous_Recording_Nov20";
% Start recording.
% The function startRecording opens a window. Ensure that you do not
% close this window. It will automatically close when the recording
% finishes.
startRecording(dca);
% The startRecording function captures data in background.
% While this is happening, you are free to utilize MATLAB for any other
% tasks you might need to perform. The following code is designed to
% prevent MATLAB from proceeding until the recording has finished.
% The isRecording() function will return true if the recording is still
% in progress. Once the recording has concluded or if it has not started,
% the function will return false.
while isRecording(dca)
end
% Remember the record location for post-processing.
% In this example, we will save the recording location in a variable.
recordLocation = dca.RecordLocation;
% Clear the dca1000 object and remove the hardware connections if required
clear dca
Method 2:
clear dca; clc;
% ------------------------------------------------------------
% Connect to radar
% ------------------------------------------------------------
dca = dca1000("IWR6843ISK");
% Create save folder
saveDir = "C:\Users\Zahra\Downloads\potato_MATLAB\potato_scripts\SAR_2D_Data\non_continuous_Recording_Nov20"; % change path if needed
if ~exist(saveDir, "dir")
mkdir(saveDir);
end
% ------------------------------------------------------------
% Initialize configuration
% ------------------------------------------------------------
iqData = dca();
n_samples = size(iqData, 1); % ADC samples per chirp
n_rx = size(iqData, 2); % RX antennas
n_chirps = size(iqData, 3); % Total chirps
n_tx = 3; % Number of TXs used
selected_tx = 0; % TX0, TX1, or TX2
selected_rx = 0; % RX0, RX1, RX2, RX3 (if 4 RX antennas)
chirp_idxs = find(mod((1:n_chirps) - 1, n_tx) == selected_tx);
% % ------------------------------------------------------------
% % Prepare live plot
% % ------------------------------------------------------------
% figure;
% h_plot = plot(nan, nan, 'b');
% xlabel('Range Bin');
% ylabel('Magnitude');
% title(sprintf('Range Profile: TX%d - RX%d', selected_tx, selected_rx));
% grid on;
% ------------------------------------------------------------
% Live capture loop
% ------------------------------------------------------------
stopTime = 15; % seconds
ts = tic;
frameCount = 0;
while toc(ts) < stopTime
iqData = dca(); % Get new frame
frameCount = frameCount + 1;
% --- Extract specific TX/RX pair
chirp_idx = chirp_idxs(1);
iq = iqData(:, selected_rx + 1, chirp_idx);
iq = iq - mean(iq);
iq_windowed = iq .* blackman(n_samples);
range_fft = fft(iq_windowed, n_samples);
range_mag = abs(range_fft);
% % --- Update plot
% set(h_plot, 'XData', 1:n_samples, 'YData', range_mag);
% drawnow limitrate;
% --- Save frame to .mat file
frameName = sprintf("frame_%04d_tx%d_rx%d.mat", frameCount, selected_tx, selected_rx);
save(fullfile(saveDir, frameName), 'iqData', 'selected_tx', 'selected_rx');
end
% ------------------------------------------------------------
% Release device
% ------------------------------------------------------------
dca.release;
disp("Capture complete. Saved " + frameCount + " frames to " + saveDir);

Answers (1)

Umar
Umar on 24 Nov 2025 at 4:05
Edited: Umar on 24 Nov 2025 at 4:06

Hey Zahra,

I've looked at both of your methods pretty carefully, and I think I can help clarify what's going on here. The short answer is yes, there IS a difference between these two approaches, and it matters for what you're trying to do with SAR imaging.

So first off, both methods should theoretically give you phase-coherent data because the IWR6843ISK has a hardware PLL that's always running. The radar itself isn't the problem. But the way you're capturing the data is going to affect your inter-frame coherence, and that's what's tripping you up.

Method 1 with startRecording is actually the better choice for SAR. When you call startRecording, it sets up continuous streaming from the radar through the DCA1000, and everything runs in the background without interruption. The data flows continuously to your storage location, and there are no gaps between frames. This is exactly what you want for maintaining phase coherence across frames. The hardware keeps streaming at intervals set by your Frame Periodicity parameter in the config file, and as long as you don't touch it, the PLL stays locked the whole time.

Method 2 has a potential issue. Every time you call dca() in that while loop, you're reading from a UDP buffer. If your processing takes even a little bit of time or if there's any delay in the loop, you could get timing jitter between frames. The documentation mentions that if processing is slow, ADC data accumulates in the buffer and the next call reads buffered data instead of the latest data. That inconsistency in timing is bad news for SAR because you need precise knowledge of when each frame was captured to maintain phase relationships.

But here's the really important part that I think you might be missing: the biggest factor for inter-frame coherence isn't actually which MATLAB method you use, it's your radar configuration file. You didn't post your .cfg file, but that's where the magic happens. For SAR imaging, you need to make sure your configuration has:

1. Continuous frame mode with no gaps between frames 2. Frame periodicity set appropriately for your synthetic aperture length 3. Number of frames set to 0 or a very high number for continuous operation 4. No settings that would cause the PLL to unlock or reset between frames

The fact that you're getting intra-frame coherence but not inter-frame coherence suggests that something in your configuration might be resetting between frames or introducing phase discontinuities. This could be frame boundaries, timing parameters, or how the radar transitions between frames.

I'd recommend sticking with Method 1 because it's cleaner and more reliable for continuous capture. Then focus your attention on the configuration file. Make sure you're running in true continuous mode without any breaks. You might also want to capture data from a stationary target first and calculate the phase difference between consecutive frames to verify that you're maintaining coherence. If you see random phase jumps, that's a configuration problem, not a capture problem.

One more thing - SAR imaging is notoriously sensitive to phase errors. Even with perfect inter-frame coherence from the hardware, you might still need to implement autofocus or phase correction algorithms in your post-processing. But getting the data collection right is the first step, and Method 1 with a properly configured radar should get you there.

Hope this helps!

Good luck with your SAR imaging project!

Categories

Find more on Radar and EW Systems in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!