Skip to content

Bistatic Example

Stephen Paine edited this page Jul 13, 2022 · 8 revisions

Getting Started

This is a starting point for those wanting to make use of FERS for radar projects. The goal is to be as simple and brief as possible, and to eliminate any tedious trial-and-error in getting a simulation up and running quickly.

What is FERS?

FERS is a simulator for radar systems.

Using FERS

FERS works from the the command line, and was designed to be used in a Linux environment. Some work has been started towards a GUI, but currently the command-line is still used mostly.

To run a FERS simulation, one simply types the following into the command line: $ fers [input_file.fersxml]

How FERS works

FERS takes as input:

  1. An xml file (with the extension ".fersxml") which describes the entire simulation.
  2. One or more files containing pulse waveform data. The fersxml file associates these with specific transmitters in the simulation.

It returns as output:

  1. One or more files representing the raw radar return at the terminals of each receiver in the simulation.
  2. An optional xml file containing additional information about the simulation.

The input and output data can be in one of two forms:

  1. CSV (comma-separated values), a text file2. HDF5 (Hierarchical data format), a more efficient binary format, in which the data must be organised in a specific way for FERS to make use of it.

Some notes on I/O:

  • The values in the files represent voltages across a 1 ohm resistor. Thus to calculate the power, one takes the square of the values in the data.
  • Note the returned data is normalised, and comes with a scaling factor. To obtain the actual values one must thus multiply the data by this scaling value.
  • All input and output signals are in base-band i.e. the carrier component is implicit. The Nyquist sampling rate (also specified in the fersxml input file) is thus lowered: you do not need to sample at twice the carrier frequency.

Creating FERS Input Data

Note: All of the work below is done using Matlab

The first step is creating the signal to be used by the transmitter. The script below generates a Gaussian noise signal and saves it as an HDF5 file.

sig = randn(1,500000)+j*randn(1,500000);
I = real(sig);
Q = imag(sig);
fprintf('Writing HDF5 data...\n');
hdf5write('waveform.h5', '/I/value', real(I), '/Q/value', imag(Q));
fprintf('Complete.\n');

This is now put in the same directory as a .fersxml script, and called from within it.

Creating Basic FERS XML File

1. Separate Reference and Surveillance Files

There are two ways that this simulation can be achieved. The first is to use two different simulation files, one for the reference channel and one for surveillance channel:

Reference File [ref.fersxml]

0 1 500000 10e3 89e6 89e6 -6440 -10760 1056 0 0.0 0 0 0 1 0.0 0.0 116.0 0 0 0 0 0 0 1 1 100

Surveillance File [surv.fersxml]

0 1 500000 10e3 89e6 89e6 -6440 -10760 1056 0 0.0 0 0 0 1 0.0 0.0 116.0 0 0 0 0 0 0 1 1 100
  <positionwaypoint>
<x>2000</x>
<y>4300</y>
<altitude>1600.0</altitude>
<time>0</time>
  </positionwaypoint>
  
  <positionwaypoint>
<x>2000</x>
<y>4000</y>
<altitude>1600.0</altitude>
<time>1</time>
  </positionwaypoint>
  
</motionpath>    
<fixedrotation>
  <startazimuth>0.0</startazimuth>
  <startelevation>0.0</startelevation>
  <azimuthrate>0</azimuthrate>
  <elevationrate>0</elevationrate>
</fixedrotation>
<target name="wings">
  <rcs type="isotropic">
    <value>100</value>
  </rcs>
</target>
  <positionwaypoint>
<x>2000</x>
<y>8900</y>
<altitude>1600.0</altitude>
<time>0</time>
  </positionwaypoint>
  
  <positionwaypoint>
<x>2000</x>
<y>9000</y>
<altitude>1600.0</altitude>
<time>1</time>
  </positionwaypoint>
  
</motionpath>    
<fixedrotation>
  <startazimuth>0.0</startazimuth>
  <startelevation>0.0</startelevation>
  <azimuthrate>0</azimuthrate>
  <elevationrate>0</elevationrate>
</fixedrotation>
<target name="wings">
  <rcs type="isotropic">
    <value>100</value>
  </rcs>
</target>

Combined Reference and Surveillance File

If you want to use a single file for a more realistic simulation, i.e. where the direct path interference is present in the surveillance channel, use a single reference and surveillance file as shown:

Single File (bistatic.fersxml)

Running a FERS Simulation

Now that we have the simulation files, we can run the simulation. Go to the folder where you have saved the .fersxml file(s) and call FERS:
$ fers ref.fersxml and $ fers surv.fersxml or if you run with a single file, use bistatic.fersxml

This will produce an HDF5 file containing the return received by our antennas is produced as output. These two files will be called "ref.h5" and "surv.h5".

Post-Processing

The data contained in the HDF5 file can be read in using the Matlab script below:

% Load an HDF5 file produced by FERS function [I Q scale] = loadfersHDF5(name) hinfo = hdf5info(name); count = round(size(hinfo.GroupHierarchy.Datasets,2)/2); numelements = hinfo.GroupHierarchy.Datasets(1).Dims;

I = zeros(numelementscount,1); Q = zeros(numelementscount,1);

scale = hinfo.GroupHierarchy.Datasets(1).Attributes(3).Value;

for k = 1:count Itemp = hdf5read(hinfo.GroupHierarchy.Datasets(2k-1)); Qtemp = hdf5read(hinfo.GroupHierarchy.Datasets(2k));

   I(1+(k-1)*numelements:k*numelements,1) = Itemp;
   Q(1+(k-1)*numelements:k*numelements,1) = Qtemp;

end end

To visualize the results, a simple matched filter could be implemented as follows: Matlab:

ard_plot function

function y = ard_plot(s1,s2,fs,fd_max,td_max)

%Generates an ARD plot for the reference and scattered signals using the %frequency domain implementation.

%Corresponds to: %1. The dot-product of the reference and scattered signals %2. Windowing the results to minimize the sidelobes in Doppler %3. The FFT of the above dot-product %4. Discarding frequency bins not of interest %5. Delaying the reference signal by one sample and repeating % the above process %6. An ARD plot is then generated and displayed

%Author: Sebastiaan Heunis, Yoann paichard

%function ard(s1,s2,fs,fd_max,Td) %s1: Scattered signal, N samples in column [s1(1,1;...;s(N,1)] %s2: Reference signal, N samples in column [s1(1,1;...;s(N,1)] %fs: Sampling frequency %fd_max: Maximum Doppler shift: fd_max < fs %td_max: Maximum time delay: td_max < N/fs

% Limits and resolution for computation : % Doppler fd : range = [-fd_max : fd_max], resolution = fs/N % Tau : range = [0 : td_max], resolution = 1/fs

c = 3e8; %speed of the light N=length(s1); %number of points Ndelay = floor(td_maxfs) %number of points corresponding to td_max Ndop = ceil(Nfd_max/fs) %number of points corresponding to fd_max

%initialisation of temporary variables temp = zeros(N,1); temp2 = zeros(N,1); s2_pad = [zeros(Ndelay,1);s2]; y1=zeros(Ndelay+1,2*fd_max+1);

tic for k = 1:Ndelay+1 temp = s1.*conj(s2_pad(Ndelay+2-k:N+Ndelay+1-k)); %dot-product of the reference and scattered signals temp = temp.*hanning(N); %windowing the result temp2 = fftshift(fft(temp,N)); %FFT of the above dot-product y1(k,:) = temp2(floor(N/2)+1-Ndop:floor(N/2)+1+Ndop); %Discarding frequency bins not of interest end display('Range-Doppler computation') toc

y = abs(y1).^2; %Power conversion y =y./max(max(abs(y))); %Normalizing max to 1

%Time and frequency axis time = 0:1/fs:Ndelay/fs; range = timec; frequency = -fd_max:1:fd_max; Dyn_dB = 40; %Dynamic range (dB) max_dB = 10log10(max(max(abs(y))));

tic figure('Name','Contour plot'); contourf(time,frequency,10*log10(y.')); colormap jet; colorbar; grid on; xlabel('Bistatic delay [s]','Fontsize',10); ylabel('Doppler frequency [Hz]','Fontsize',10); title('Range-Doppler response') display('contour plot computation') toc

tic figure('Name','2D image'); imagesc(time,frequency,10*log10(y.'),[max_dB-100 max_dB]); axis xy; colorbar; xlabel('Bistatic delay [s]','Fontsize',10); ylabel('Doppler frequency [Hz]','Fontsize',10); grid on; title('Range-Doppler response') display('imagesc plot computation') toc

plot_function

clc; clear all; close all;

% h5Import [Ino Qno scale_no] = loadfersHDF5('direct.h5'); [Imov Qmov scale_mov] = loadfersHDF5('echo.h5'); I_Qmov = Imov + j*Qmov; I_Qmov = I_Qmov.scale_mov; I_Qno = Ino + jQno; I_Qno = I_Qno.*scale_no; I_Qmov=I_Qmov-I_Qno;

% run_ard fs = 500000; dopp_bins = 200; delay = 133e-6;

s1 = I_Qmov; s2 = I_Qno;

y = ard_plot(s1,s2,fs,dopp_bins,delay);

Run all together

%Remove previous data clear; clc; close all;

% Ask user for files %prompt_direct = 'Please enter the direct signal simulation file: '; %prompt_echo = '\nPlease enter the echo signal simulation file: '; %prompt_waveform = '\nPlease enter waveform for file simulation: ';

%direct = input(prompt_direct, 's'); %fprintf('Done') %echo = input(prompt_echo, 's'); %fprintf('Done') %waveform = input(prompt_waveform, 's'); %fprintf('Done')

direct = 'ref.fersxml' fprintf('Done') echo = 'surv.fersxml' fprintf('Done')

% Run the simulation for direct signal fprintf('\nSimulating Reference Signal\n\n') strCommand = sprintf('export LD_LIBRARY_PATH="" && fers %s',direct); system(strCommand, '-echo'); fprintf('Done')

% Run the simulation for echo signal fprintf('\nSimulating Surveilance Signal\n\n') strCommand = sprintf('export LD_LIBRARY_PATH="" && fers %s',echo); system(strCommand, '-echo'); fprintf('Done')

% h5Import [Ino Qno scale_no] = loadfersHDF5('ref.h5'); [Imov Qmov scale_mov] = loadfersHDF5('surv.h5'); I_Qmov = Imov + j*Qmov; I_Qmov = I_Qmov.scale_mov; I_Qno = Ino + jQno; I_Qno = I_Qno.*scale_no; I_Qmov=I_Qmov-I_Qno;

% run_ard fs = 500000; dopp_bins = 200; delay = 133e-6;

s1 = I_Qmov; s2 = I_Qno;

y = ard_plot(s1,s2,fs,dopp_bins,delay);

Clone this wiki locally