Synthetic Aperture Radar Systems - Laboratory Handbook

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 58

MIREL PĂUN

SYNTHETIC APERTURE RADAR


SYSTEMS
Laboratory Handbook

Editura
NAUTICA
CONTENTS

Page

Laboratory work no. 1


The operating principle of pulse radar 5

Laboratory work no. 2


Implement a Doppler Radar on a SDR platform 11

Laboratory work no. 3


Implement a Stepped-FMCW radar using a VNA 21

Laboratory work no. 4


Focus a raw image from a SAR satellite 27

Laboratory work no. 5


Implement a SAR radar using a VNA 31

Laboratory work no. 6


Introduction to SAR Polarimetry data processing using
PolSARpro 35

Laboratory work no. 7


Polarimetric segmentation of a SAR image using
PolSARpro 41

Appendix 1 47

Appendix 2 49

Appendix 3 53

Bibliography 57
Laboratory work no. 1

1. The operating principle of pulse radar

1.1. Objectives
• Study the operating principle of pulse radar.

1.2. Theoretical hints


Radar (radio detection and ranging) is a system that uses the reflection of radio
waves on different objects (called targets) to determine their existence and their distance from
the equipment.
Systems that emit their own radio signal used for target detection are called
active radars. Systems that use signals emitted by other equipment or by the target itself are
called passive radars.

According to the type of signal emitted, active radar systems are classified into:
- Continuous wave (CW) radar, which emits a pure sinusoidal, continuous,
unmodulated signal. This type of equipment is not able to determine the
distance to which the target is located, being only able to indicate the
presence / absence of the target, the radar cross-section (RCS) and the
relative velocity of the target based on the Doppler Effect.
- Frequency-modulated continuous-wave (FMCW) radar, which emits a
continuous, frequency-modulated sinusoidal signal. It can at the same time
determine the distance and relative speed of the target.
- Pulse radar, which emits short radio pulses and is able to determine the
distance to the target. It is currently the most common type of radar.

Based on the transmitter and receiver locations, active radars are classified
into:
- Monostatic radar - the transmitter and the receiver are placed in the same
location (are co-located).
- Bistatic radar - the transmitter and receiver are separated by a distance
comparable to the distance to the target.
- Multistatic radar - a system that contains a multitude of monostatic or
bistatic radars, placed in different locations, serving a common coverage
area.

5
Laboratory work no. 1

1.3. Experiment

Using the AT3000 waveguide experimental system components, build a monostatic


active pulse radar.

Figure 1.1: AT3000 experimental system

Necessary equipment

From the AT3000 kit


 Gunn Oscillator
 Variable Attenuator
 PIN Modulator
 Slotted Line
 Waveguide
 Slide Screw Tuner
 Crystal Detector
 2 Horn Antennas
 Power Supply
 1 kHz Generator
 2 Reflecting Sheets
 Component Supporters
 4 BNC - BNC Cables 50Ω
 2 Power Cords

Other
 2-channel Oscilloscope

6
Laboratory work no. 1

Procedure

1. Build the system in figure 1.2 using the components listed above.
CAUTION! Do not look in the direction of the broadcast antenna during system
operation. May cause blindness.

Figure 1.2: Block diagram

Figure 1.3: Practical implementation

2. By manipulating the micrometric screw in the Gunn diode oscillator, adjust its
oscillation frequency to approx. 10 GHz.

3. Adjust the variable attenuator to 10 dB.

4. Start the oscilloscope and adjust it to display the time evolution of two signals with a
frequency of approx. 1 kHz and amplitude of several tens of mV.

5. With all the settings in the middle of the scale, start the modulator signal generator
which also provides the polarization of the PIN diode in the PIN modulator.
CAUTION! Powering the oscillator before polarizing the PIN diode can lead to its
destruction.

7
Laboratory work no. 1

6. By adjusting the voltage to the minimum position, start the oscillator’s power supply.

7. Adjust the supply voltage of the oscillator until it starts oscillating (indicated by the
occurrence of a signal on the oscilloscope channel 1).

8. By adjusting the impedance adapter (slide screw tuner) the amplitude of the emitted
signal can be maximized, which leads to the increase of the target reflection seen on the
channel 2 of the oscilloscope.

In case of correct operation, an image similar to that in figure 1.4 should appear on the
oscilloscope screen.

Figure 1.4: Oscilloscope waveforms

9. By changing the positions and angles of the two targets (reflecting sheets), study the
effects on the reflected signal (oscilloscope channel 2).

System operation

On the transmission path, the microwave signal generated by the Gunn diode
oscillator is then attenuated by a variable attenuator which, besides adjusting the output
power, also provides the oscillator isolation function, thus reducing unwanted influences of
load variations on signal parameters. Next, the signal is amplitude modulated using the PIN
diode modulator. The detector in the waveguide segment with the detector (slotted line)
provides a voltage proportional to the power of the microwave signal transmitted by the

8
Laboratory work no. 1

guide, so the supplied voltage has the shape of the emitted signal envelope, i.e. the form of the
modulator signal.
This voltage is visualized on channel 1 of the oscilloscope. The impedance
adapter (slide screw tuner) has the function of adapting the impedance of the waveguide to the
impedance of the antenna, thus ensuring the maximum power transfer to it.
On the receive path, the target reflected signal is captured by the antenna and
applied to the crystal detector which, similar to the detector in the transmitter, provides a
voltage proportional to the received signal strength - its envelope, which is displayed on the
channel 2 of the oscilloscope.

Exercises

1) From the non-overlapping condition of the first received pulse with the second
pulse emitted by the radar, determine the maximum detection distance of a
target for the implemented system. (Rmax = c ∙ T / 2)

2) Calculate the resolution of the system (resolution = minimum distance between


two targets ensuring non-overlapping of their radar echoes). (δr = c ∙ τ / 2)

3) Assuming that in Figure 1.4 Δt = 10 ns, at what distance from radar is the
target? (R = c ∙ Δt / 2)

9
10
Laboratory work no. 2

2. Implement a Doppler radar on a SDR platform

2.1.Objectives
 Implement a Doppler radar in SDR technology.

2.2. Theoretical hints


Doppler radar is specialized radar that uses the Doppler Effect to determine the
velocity of the target.
The Doppler Effect is the variation in the frequency of a wave emitted by a source
of oscillations (or reflected by a target in the case of radar) if it is moving relative to the receiver.
In the case of a Doppler radar, the radio wave emitted by the radar is reflected by
the target, the signal received by reflection at the radar receiver having a different frequency
from the frequency of the emitted signal, the frequency difference Δf being called the Doppler
deviation. The relationship between the Doppler deviation and the relative velocity component of
the target in the direction of the radar is:

𝑓𝑡
∆𝑓 ≈ 2𝑣 (2.1)
𝑐

where ft is the frequency of the signal emitted by radar, c is the speed of light, v is the relative
speed of the target in the direction of the radar and Δf is the Doppler deviation Δf = fr - ft, where
fr is the frequency of the received signal.
From relation 2.1 the target speed is determined according to:

𝑐 ∆𝑓
𝑣 ≈ (2.2)
2 𝑓𝑡

Doppler radars have applications in aviation, meteorology, medicine and traffic


control.
SDR is the acronym for Software Defined Radio and designates a radio equipment
in which some or all functions made with hardware in the classical radio equipment (eg, mixing,
filtering) are performed by a software program running on a digital device. The advantage of
such a device is reconfigurability, and the same equipment can be configured to implement a
variety of functions by simply modifying the program (eg. the same device can be configured as
a transceiver, radar, GPS receiver, etc.).

11
Laboratory work no. 2

2.3. Experiment

Necessary equipment

 USRP N200 SDR equipped with the WBX radio module


 2 Vivaldi broadband antennas
 Computer (with LabVIEW 2013 + NI-USRP driver 14.5.1)
 2 coaxial cables 50 Ω SMA - SMA and 1 Ethernet cable

Procedure

1. Assemble the circuit:

Figure 2.1: PC - SDR – Antennas connection

12
Laboratory work no. 2

The WBX radio module is mounted inside the USRP N200 SDR platform housing.
In order to establish the connection between the computer and the USRP N200 SDR,
it is compulsory that the computer network board is Gigabit. Otherwise, a Gigabit Ethernet
Switch between SDR and the computer is required. Using the switch also allows shared use of
the SDR by multiple users.

2. Implement the program in Figure 2.2 in the LabVIEW graphical programming


environment. To do this, the following items are brought to the program’s Block
Diagram (they can be searched by name using the Search option in the Functions
Palette):

- From the Programming / Structures library the While Loop block;


- Array Size, Index Array, and Build Array blocks from the Programming /
Array library;
- From the Programming / Cluster, Class, & Variant library, Unbundle By
Name block;
- From the Programming / Numeric library, Add, Subtract, Multiply, Divide,
Reciprocal, Numeric Constant and DBL Numeric Constant blocks;
- From the Programming / Numeric / Conversion library To Quad Integer
block;
- From the Programming / Numeric / Complex library Complex To Re / Im
and Re / Im To Complex blocks;
- From the Programming / Boolean library True Constant block;
- From the library Programming / Comparison Greater Than 0 and Select
blocks;
- From the Programming / Dialog & User Interface library, Simple Error
Handler and Merge Errors blocks;
- From the library Programming / Waveform Build Waveform block;
- From the Instrument I/O / Instrument Drivers / NI-USRP / Tx library,
niUSRP Open Tx Session, niUSRP Configure Signal, niUSRP Write Tx Data,
and niUSRP Close Session blocks;
- From the Instrument I/O / Instrument Drivers / NI-USRP / Rx library, the
niUSRP Open Rx Session, niUSRP Configure Signal, niUSRP Initiate,
niUSRP Fetch Rx Data, niUSRP Abort, and niUSRP Close Session blocks;
- From the Signal Processing / Signal Generation library, the Sine Wave
block;
- From the Signal Processing / Waveform Measurements library, Extract
Multiple Tone Information (Extract Tones) block.

In the program’s Front Panel bring the following items from the Controls Palette:

- From the Modern / Numeric library Numeric Control, Numeric Indicator and
Meter blocks;
- From the Modern / Boolean library, Round LED and Stop Button blocks;
13
Laboratory work no. 2

- From the Modern / String & Path library String Control block;
- From the Modern / Graph library Waveform Graph block;
- From the Modern / Container library Tab Control and SubPanel blocks;
- From the Modern / I/O library IVI Logical Name block.

The niSRP Write Tx Data and niUSRP Fetch Rx Data blocks are configured as
follows (by clicking the arrow, the contextual menu appears):

The Multiple Tone Information block configuration constant is generated by right-


clicking on the output sorting input of the block and selecting from the context menu that
appears the Create > Constant operation. Then the constant is set to the decreasing
amplitude mode.

The Stop button is configured (by right-clicking it and choosing the Properties option
from the context menu) as follows:

14
Laboratory work no. 2

To control the second While loop using the same stop button, create a local variable
associated with the button by right-clicking on it and choosing Create > Local Variable
from the context menu. Then right click on it and choose Change To Read from the
context menu.

Figure 2.2: The LabVIEW program

15
Laboratory work no. 2

Figure 2.3: Program GUI - Panel Tab

Figure 2.4: Program GUI - Configuration Tab

3. Adjust target detection sensitivity (detection threshold) to eliminate false


detections and test system operation by moving the target in front of the antennas
(the target can be a metal object, a person).

System operation

The system continually emits a constant frequency sine wave and continually measures
the magnitude of the wave reflected by the possible targets. If the magnitude of the reflected
wave is greater than the selected detection threshold, the system considers that it has detected a
target and calculates its velocity on the basis of the difference between the frequency of the
reflected wave and the emission frequency using formula 2.2.
16
Laboratory work no. 2

For the system presented, the baseband signal processing is performed on the computer,
by the software. The software is created with the LabVIEW graphical programming environment
and is shown in Figure 2.2.

The section of the program presented in figure 2.5 implements the SDR configuration,
setting the sampling frequency of digital-to-analog converters, local oscillator frequency,
amplifier gain, and antenna port.

Figure 2.5: Configuration of the transmitter section

The section in figure 2.6 sets the frequency of the sinusoidal modulator signal that will
modulate the carrier generated by the local oscillator onboard the SDR and sets the duration of
the transmit sequence, then calculates the normalized frequency of the modulator signal, the
number of samples of the transmit sequence and the frequency of the signal emitted by the
equipment, i.e. the frequency of the emitted radio wave, this being equal to the frequency of the
local oscillator in the SDR emission path + the frequency of the modulator signal.

Figure 2.6: Configuration + calculation of additional transmit parameters

17
Laboratory work no. 2

The next section of the program implements the configuration of the radio receiver
section of the SDR platform, setting the sampling frequency of the analogue-to-digital
converters, the local oscillator frequency (at the same value as the emission oscillator), the gain
of the amplifier, the antenna port and the duration of the acquired sequence. It also calculates the
number of samples of the sequence by multiplying the duration with the sampling frequency.

Figure 2.7: Configuring the receiver section

The program section in Figure 2.8 implements the transmit loop that generates the complex
baseband sinusoidal signal (composed of two sinusoids, one for the real, the other for the
imaginary part of the baseband signal) to be sent to the SDR in order to modulate the broadcast
carrier. It also displays graphically the time evolution of this signal.

18
Laboratory work no. 2

Figure 2.8: Transmit loop

The program section in Figure 2.9 implements the receive loop where the received signal is
transferred to the computer, graphically displayed, tested whether the amplitude of any
component in its spectrum exceeds the detected detection threshold indicating the presence of a
target, and if the answer is affirmative, the frequency of the dominant component (with the
highest amplitude) is calculated and the frequency of the emitted signal is subtracted to obtain
the Doppler frequency deviation. Then, using the formula 2.2 the velocity of the target is
calculated and displayed.

Figure 2.9: Receive loop


19
Laboratory work no. 2

The program section in Figure 2.10 stops communication with the SDR equipment and
displays any errors that may have occurred during the program's operation.

Figure 2.10: The final section of the program

Exercises

1) What is the resolution in cm/s when measuring the speed with this system if the
frequency determination resolution is 5 Hz (calculated as the inverse of the
acquisition sequence duration = 1 / 0.2s) and the emission frequency is 2GHz?

2) What Doppler frequency deviation produces a target that travels at 200 Km/h for
the equipment presented in the previous point?

3) What is the speed measured by a Doppler radar oriented in a direction that makes
an angle of 30 degrees with the direction of the target movement?

20
Laboratory work no. 3

3. Implement a Stepped-FMCW radar using a VNA

3.1. Objectives
 Build a radar capable of determining the distance to the target using a Vector
Network Analyzer.

3.2. Theoretical hints


The Vector Network Analyzer is a measurement instrument used to determine the
S (Scattering) parameters matrix of a network. S parameters are complex (have amplitude and
phase), frequency-dependent quantities that characterize a multiport system. They are often used
to characterize antennas, filters, attenuators, splitters, couplings, circulators, etc. For defining the
S parameters, the notion of "power wave" is used, the parameters being calculated as ratios
between the incident and the reflected / transmitted waves at the terminals of the tested device.

Port 1 Port 2

Figure 3.1: Characterization of a 2-port network using S parameters

𝑠11 𝑠12
For a 2-port network (figure 3.1) S-matrix is: S = 𝑠 𝑠22
21
𝑏1 𝑏1 𝑏2 𝑏2
where s11 = , s12 = , s21 = , s22 = , a1 and a2 are the incident waves
𝑎1 𝑎2 𝑎1 𝑎2
(complex quantities that characterize the incident waves) and b1 and b2 are the reflected /
transmitted waves.
To measure parameter s11, a signal characterized by a1 is injected into port 1,
while the reflected signal characterized by b1 is measured, port 2 being terminated on a known
𝑏
load, typically 50Ω. Then s11 is determined using the relationship s11 = 𝑎1 .
1

To measure parameter s21, a signal characterized by a1 is injected into port 1 and


𝑏2
the signal transmitted to port 2, characterized by b2, is determined using s21 = . Analogously,
𝑎1
s22 and s12 are determined using similar procedures.
The Vector Network Analyzer automates the operations described above, thus
determining the S parameters matrix associated with a 2-port, by automatically changing the
source and measured ports. Also, because the S parameters depend on the frequency, the
21
Laboratory work no. 3

equipment performs the measurements at different frequencies, starting from a minimum value
and incrementing the frequency value in equal steps, which is why the resulting radar will be
called stepped-frequency radar.
The typical block diagram of a VNA contains a variable-frequency sine wave
source, 4 receivers, 2 switches, and 2 directional couplers that separate the incident and reflected
waves (Figure 3.2).

Figure 3.2: Block diagram of a VNA

Between the two ports of the VNA connects the device under test (DUT). In our
application, to use the analyzer as radar, two identical ultra-wide band antennas are connected at
both ports and the VNA is configured for measuring s21 (or s12) across the entire analyzer
frequency range. Thus, the equipment emits using one of the antennas a frequency-modulated
sinusoidal signal (a chirp) and receives the signal reflected by the potential targets with the other
antenna.
The array of s21 parameters resulting from the measurement (one value for each
tested frequency) is processed using the Inverse Discrete Fourier Transform, resulting in the
time-domain response of the radar’s environment containing the targets. This response can be
treated as the impulse-response of the environment (in the same way as the Inverse Fourier
Transform of a system’s Transfer Function is the impulse-response of that system, because the
frequency-dependent S parameters array is a kind of Transfer Function), and in its graphical
representation radar "echoes" produced by targets are easily identifiable. By simply multiplying
the time axis (abscissa) with the light velocity divided by 2, the Echo Amplitude vs. Distance
graph is created (figure 3.3). Such a representation in radar terminology is called an A-scope, A-
display or R-scope.

Target response

Figure 3.3: Temporal response


22
Laboratory work no. 3

3.3. Experiment

Necessary equipment

 R & S FSH4 portable Vector Network Analyzer


 2 x N male to SMA male adapters
 2 x Vivaldi ultra-wide band antennas
 Computer (with FSH4 View v2.70 software)
 USB cable for Computer – Analyzer connection
 Measuring tape

Procedure

1. Connect the two Vivaldi antennas to the two ports of the Analyzer using the two
N-SMA adapters as shown in figure 3.4.

Figure 3.4: The analyzer equipped with the two Vivaldi antennas

2. Start and configure the Analyzer to work as a Vector Analyzer (not as a Spectrum
Analyzer, from the MEAS menu, setting Meas Mode -> Vector), without
calibration (accessing submenu Calibration -> Restore Calibration Settings),
displaying s21 parameter (accessing submenu Result Display -> Transmission
Fwd (Port 1 > 2)), in magnitude and phase format (submenu Format ->
Magnitude + Phase).

Set the frequency span to its maximum possible value accessing the menu SPAN
-> Full Span.

Activate the RF preamplifier in the AMPT menu, RF Attenuation submenu.

Choose the automatic sweep time accessing the menu SWEEP -> Auto SWP
Time, the sweep type as Single Sweep and the trigger as Trigger –> Free Run.

23
Laboratory work no. 3

The bandwidth of the filters is left in automatic mode from the BW -> Auto
RBW menu.

Set the trace display mode from the TRACE menu -> Trace Mode -> Clear /
Write.

3. Connect the Analyzer to your computer via USB.

4. Open FSH4View Version 2.70 and connect to the analyzer via USB as shown in
Figure 3.5.

Figure 3.5: Connecting to VNA from FSH4View

5. A target-free measurement shall be performed in order to compensate for the


unwanted coupling between the two antennas (the response resulting from the
target-free measurement will be subtracted from the useful measurement, thus
eliminating the effect of unwanted coupling). To do so, press the SWEEP button,
and then access the Trigger -> Free Run submenu. Following this command, the
Analyzer performs a new measurement, indicated by temporary showing an
asterisk in the top right corner of the Analyzer screen. After the asterisk
disappears, from the FSH4View program acquire the resulting measurement data
by accessing the Instrument -> Display Sweep menu.
Save the current measurement by going to the File menu -> Save As and choosing
as the file format .txt, and the file name Correction.txt.

6. Place a target (a metallic object) in front of the equipment at a distance between


20cm - 150cm. The origin of the measuring system (point 0 of the measuring
tape) is the phase center of the antennas, marked with a vertical stripe on the
antennas.

24
Laboratory work no. 3

7. Perform a new measurement following the same procedure as in Section 5, except


that the file name will be Measurement.txt.

8. Open the two files, Correction.txt and Measurement.txt, in a text editor (eg.
Notepad++), and delete the first 47 lines containing the analyzer configuration
data.

9. Run in MATLAB the data processing script called Processing_radar_VNA.m,


listed in Appendix 1. The Correction.txt and Measurement.txt files must be in
the same folder as the script.
Check the match between the distance measured with the measurement tape and
the one indicated by the radar.

Exercises

1) What is the resolution of the system, knowing that the analyzer bandwidth in the
𝑐
case of the full span setting is approx. 3 GHz? (δr = 2𝐵 ).

2) Modify the Processing_radar_VNA.m script so that it no longer corrects the


coupling between the antennas. Run with the previously stored measurement file.
What effect do you notice?

25
26
Laboratory work no. 4

4. Focus a raw image from a SAR satellite

4.1. Objectives
 Process raw data images provided by a SAR satellite using MATLAB.

4.2. Theoretical hints


Synthetic Aperture Radar (SAR) is an airborne imaging radar, capable of
delivering high-resolution images. It is extremely useful in geology, climatology, ecology and
archeology.
As indicated by its name, Synthetic Aperture Radar is a type of radar that provides
very good resolution in the direction of movement of the radar equipment, called azimuth, by
synthesizing an equivalent antenna with a length equal to the distance that the equipment has
traveled over the entire scan. As is known from the theory of antennas, the width of the main
radiation lobe of an antenna is inversely proportional to the antenna size, which is why a good
resolution, requiring a narrow radiation lobe, requires a very large antenna, much larger than the
size of an antenna mounted on an airplane or satellite.

Figure 4.1: SAR acquisition geometry


27
Laboratory work no. 4

Like any radar, the SAR equipment emits radio pulses, followed by an echo
listening window, during which the equipment "listens" to the echoes and stores the received
signals in a column of a matrix called the raw data matrix.
The transmission and listening procedure is repeated at a PRI (Pulse Repetition
Interval) interval, where PRI = 1 / PRF (Pulse Repetition Frequency).
The raw data (two-dimensional) matrix is obtained, where each column contains
the samples of the echo received after a pulse.
The scene is thus sampled in time in two directions. Time in the direction of the
range is called fast time which alludes to the high velocity of propagation of electromagnetic
waves (speed of light) and the one in the direction of azimuth (in rows), called slow time
(sampled at the platform speed, obviously much lower than the speed of light).

Unlike photographic images, the raw image matrix provided by the synthetic
aperture RADAR cannot be interpreted directly by humans. To obtain a useful image, similar to
a photo, it is necessary to process the data through an operation called focusing.
Focusing the raw image involves the application of two separate filters (matched
filters) over the two dimensions - range and azimuth. Most often, the pulse transmitted by radar
is a linear chirp, which offers the advantage that it can be compressed by the range filter (figure
4.2), providing high resolution without the need for extremely short impulses and therefore high
peak powers.

Figure 4.2: Range chirp compression by adaptive filtering (cross-correlation)

The expression of the linear chirp emitted by the radar is:

(4.1)

28
Laboratory work no. 4

Since the azimuth response of a point target is also shown to be a chirp, the
azimuth processing (compression) is similar to the compression in the range, namely through a
cross-correlation with the reference function (chirp) deduced based on geometric features (slant-
range, real antenna aperture, radar platform speed).
The expression of the azimuth chirp is:

(4.2)

In conclusion, the processing of raw data (image focusing) consists of applying


two successive matched filters, i.e. two inter-correlations, one in range, another in the azimuth,
as indicated in figure 4.3.

Figure 4.3: SAR image processing (raw data processing) - two matched filtering operations

Further on, in the current laboratory, raw data from the ERS (European Remote
Sensing) satellite will be processed using a MATLAB program that implements image focusing
based on the two cross-correlations described above.

Figure 4.4: The ERS Satellite


29
Laboratory work no. 4

4.3.Experiment

Necessary equipment

 Computer (with MATLAB 2014)

Procedure

1. In the MATLAB development environment, run the Processing_SAR_ERS.m


program in Appendix 2. It is necessary that the files containing raw data,
Test_Image.mat and ERS_Image.mat are in the same folder as the program.

2. Choose the test image to be processed and process it without multi looking (spatial
averaging), observing the results.

3. Select again the test image for processing and process it with multi looking
(spatial averaging), observing the results.

4. Select the real image from the ERS satellite and process it without multi looking
(spatial averaging), observing the results.

5. Select the real image from the ERS satellite and process it with multi looking
(spatial averaging), observing the results.
(Spatial averaging is required here because the range and azimuth resolutions are
not equal, resulting in pixels that are not square).

Exercises

1) Analyze the program in Appendix 2 and indicate the code sections that implement
the two matched filters (cross-correlations).

2) What is the reason why cross-correlations in the program are performed in the
frequency domain instead of being done in the time domain? (The cross-
correlation theorem shows that the Fourier Transform of the cross-correlation of
two signals is equal to the Fourier Transform of the first signal multiplied by the
complex conjugate of the Fourier Transform of the second signal.)

30
Laboratory work no. 5

5. Implement a SAR radar using a VNA

5.1. Objective
 Implement a SAR radar using a VNA and MATLAB data processing;
 Compare the execution times for 2 focusing algorithms.

5.2. Theoretical hints


The present laboratory continues the work started in the laboratory no. 3, using
the same Vector Network Analyzer as radar, with the difference that now a series of
measurements are made with the equipment placed at different positions on a straight line and
spaced 5 cm apart. The acquired data is then processed with a program that focuses the image
(synthesizes the aperture).
There work presents 2 implementations of the data processing program, the first
using the range and azimuth matched filtering, similar to the program in the laboratory 4, the
second using the "Back-Projection" algorithm. The advantage of the second algorithm is superior
computational efficiency, which translates into a smaller number of elementary arithmetic
operations, resulting in a significant decrease in processing time.
Over time, a multitude of algorithms have been developed to focus SAR images
with increased computational efficiency, so that there are currently many variants in the
literature, each of which has certain advantages and disadvantages.

5.3. Experiment

Necessary equipment

 R & S FSH4 portable Vector Network Analyzer


 2 x N male to SMA male adapters
 2 x Vivaldi ultra-wide band antennas
 Computer (with FSH4 View v2.70 software)
 SD Memory Card
 Measuring tape

31
Laboratory work no. 5

Procedure

1. Connect the two Vivaldi antennas to the two ports of the Analyzer via the two N-
SMA adapters as shown in figure 5.1.

2. Insert the SD Memory Card into the appropriate slot of the Analyzer to store the
measurements on it.

Figure 5.1: The analyzer equipped with the two Vivaldi antennas

3. Start and configure the Analyzer to work as a Vector Analyzer (not as a Spectrum
Analyzer, from the MEAS menu, setting Meas Mode -> Vector), without
calibration (accessing submenu Calibration -> Restore Calibration Settings),
displaying s21 parameter (accessing submenu Result Display -> Transmission
Fwd (Port 1 > 2)), in magnitude and phase format (submenu Format ->
Magnitude + Phase).

Set the frequency span to its maximum possible value accessing the menu SPAN
-> Full Span.

Activate the RF preamplifier in the AMPT menu, RF Attenuation submenu.

Choose the automatic sweep time accessing the menu SWEEP -> Auto SWP
Time, the sweep type as Single Sweep and the trigger as Trigger –> Free Run.

The bandwidth of the filters is left in automatic mode from the BW -> Auto
RBW menu.

Set the trace display mode from the TRACE menu -> Trace Mode -> Clear /
Write.

4. A target-free measurement shall be performed in order to compensate for the


unwanted coupling between the two antennas (the response resulting from the
target-free measurement will be subtracted from the useful measurement, thus
eliminating the effect of unwanted coupling). To do so, press the SWEEP button,
32
Laboratory work no. 5

and then access the Trigger -> Free Run submenu. Following this command, the
Analyzer performs a new measurement, indicated by temporary showing an
asterisk in the top right corner of the Analyzer screen. After the asterisk
disappears, save the measurement data on the memory card by pressing the SAVE
/ RECALL key, then access the Save submenu. By default, the file name is
Dataset###.set, where ### is a number. For this first measurement, used as
correction data set, enter the name Correction.set.

5. Place a target (a metallic object) in front of the equipment antennas at a distance


of 100cm - 150cm from it, as in figure 5.2.

6. Perform a new measurement with the Analyzer placed at the far left of its route,
the origin of the measuring tape, following the same procedure as in Section 4,
with the difference that the file name will be Ach001.set, then move the Analyzer
5cm to the right on the measuring tape and perform a new measurement, the name
of the new file being Ach002.set (the analyzer increments the number of the file
name itself), repeating this procedure until the acquisition of 41 files is completed,
which corresponds to a synthetic aperture of 2m (40 * 5cm).

7. Remove the memory card from the Analyzer and insert it into the Computer
(possibly using an SD card reader).

8. Create a new folder, called Data, on the computer where the measurement files
will be stored. Open the FSH4View program, close the first window (the one for
connecting the Analyzer to the computer) and access the File -> Convert Files
menu. In the window that opens, select the source files (the files with the
measurements from the SD card) and in the next window, indicate as destination
folder the newly created Data folder and the ASCII Files(* .TXT) format for the
files that will result following the conversion procedure.

9. Using a text editor (eg Notepad ++) create a file named DeleteLines.bat that will
contain the following code line:

FORFILES /m *.txt /C "cmd /c more +47 @file > @file.nou & move /y @file.nou @file > nul"

Place the file DeleteLines.bat in the converted files folder and execute it. It
automatically deletes the first 47 non-useful lines in each file that has txt
extension in the folder where it is placed.

10. Run the two versions of the data processing program in MATLAB,
Processing_SAR_VNA_v1.m and Processing_SAR_VNA_v2.m, listed in
Appendix 3. The previously created Data folder must be in the same folder as the
program Processing_SAR_VNA_vx.m, where x is 1 or 2.

33
Laboratory work no. 5

11. Analyze and compare the resulting images and running times for the two
program variants.

Figure 5.2: Layout of the experimental system

Exercises

1) Modify the programs so that the pixel intensity of the resulting image is
proportional to the logarithm of pixel values, then to their exponential.

34
Laboratory work no. 6

6. Introduction to SAR Polarimetry data processing using PolSARpro

6.1. Objectives
 Familiarize with the methods of processing and visualising data from different
common polarimetric SAR platforms.

6.2. Theoretical hints


The PolSARpro program is a software environment for processing raw data from
standardized polarimetric SAR systems, satellites (eg. TerraSAR-X) or airborne platforms (eg.
AIRSAR) for research purposes.

Polarimetric SAR systems use polarimetry-specific methods to obtain qualitative


and quantitative information about the physical parameters of soil, snow, ice, oceans and
anthropic structures. Polarimetry is a method of quantitative analysis of a substance, based on the
rotation of the polarization plane of a radiation by the analyzed substance.

The basic concept of SAR polarimetry is given by the 2x2 complex scattering
matrix (Sinclair scattering matrix) that describes the transformation of the two-dimensional
transmitted (e.g., incidence) plane wave vector Ei into the received (e.g., scattered) wave vector
Er (two-dimensional in the far field of the scatterer) performed by the scatterer (eq. 6.1). Both
vectors are two-dimensional, having a horizontal component EH and a vertical component EV, in
the case of plane waves.

(6.1)

where SIJ are the four complex scattering amplitudes and horizontal (H) or vertical
(V) indicate associated received and transmitted polarization. The most common type of
implementation measures the S matrix by sending and receiving using all four combinations of
linear polarizations (Figure 6.1):

Vertically polarized emission – Vertically polarized reception


Vertically polarized emission – Horizontally polarized reception
Horizontally polarized emission – Horizontally polarized reception
Horizontally polarized emission – Vertically polarized reception

35
Laboratory work no. 6

The polarization of the wave emitted / received by the equipment is dictated by


the orientation relative to the horizon of the antenna used, (the orientation is also called the
polarization of the antenna).

Figure 6.1: Architecture of a Polarimetric SAR

6.3. Experiment

Necessary equipment

 Computer (with PolSARpro v4.2)

Procedure

1. PolSARpro program comes with a set of test data, acquired with different SARs,
found on the computer at the location: ~ / PSP_demo / Sample_data, where ~
represents the user's directory. Open and process the data set from the AIRSAR
airborne platform. For this, after opening the PolSARpro program, in the first
window choose ENTER, then in the next window - the Program Menu window,
select the AIRSAR option by clicking the corresponding button as in the
following figure:

Figure 6.2: The PolSARpro menu

36
Laboratory work no. 6

2. Go to the Environment menu and, in the window that opens, enter the path to the
data acquired over Flevoland (The Netherlands) and make the settings in figure
6.3, then click Save & Exit:

Figure 6.3: Environment menu

3. Access the Import -> Input Data File menu and in the window that opens make
the settings:

Figure 6.4: Input Data File menu


37
Laboratory work no. 6

4. In the previous menu, click the Read Header button followed by OK.

5. Access the Import -> Extract -> Full Resolution menu and in the window that
opens, click the Run button.

6. To view the generated images, access the Display menu, then BMP Viewer, and
in the window that opens, choose the location of the .bmp files generated by the
data processing:

Figure 6.5: Display and BMP Viewer menus

and the result is an image like:

Figure 6.6: Final image (Pauli base representation)


38
Laboratory work no. 6

Exercises

1) Process the data from the AIRSAR_SanFrancisco set similarly.

39
40
Laboratory work no. 7

7. Polarimetric segmentation of a SAR image using PolSARpro

7.1. Objectives
 Segmentation of a Polarimetric SAR Image Using the Wishart distribution of the
second order polarimetric SAR data matrix.

7.2. Theoretical hints


Segmentation represents the division of the image into areas of interest, according
to certain criteria. Each pixel will be assigned a value, 0 or 1, representing its membership to a
specific area or region of interest. Typically, segmentation aims to extract, identify, or recognize
a particular object in an image. Areas or regions that make up an image are named segments. For
an image f(m, n), segmentation is the division of f into a number N of regions fi(m, n), with i =
1..N.

The entropy and the parameter α calculated for a polarimetric data set provide
sufficient information to segment the SAR image in a very simple manner, allowing image
segmentation in regions that correspond to urban areas, agricultural fields, water bodies (rivers,
lakes, seas, oceans).

7.3.Experiment

Necessary equipment

 Computer (with PolSARpro v4.2)

Procedure

1. Select the type of data as AIRSAR, as in the previous lab, then in the
Environment menu, choose the path to the data acquired over San Francisco
(USA), as in figure 7.1.

41
Laboratory work no. 7

Figure 7.1: Environment menu

2. Access the Import -> Input Data File menu and in the window that opens
make the following settings:

Figure 7.2: Input Data File menu

3. Click the Read Header button, and since the file does not contain information
about the number of rows and columns of the raw data matrix, insert them
manually, as in figure 7.3.

42
Laboratory work no. 7

Figure 7.3: Input Data File menu

4. Access the Import -> Extract -> Full Resolution menu and in the window
that opens, click the Run button.

5. Access the Process -> Polarimetric Segmentation -> H / A / Alpha


Classification menu and in the window that appears make the following
settings:

Figure 7.4: H / A / Alpha Classification menu

43
Laboratory work no. 7

6. Then go to the Process -> Polarimeter Segmentation -> H / A / Alpha -


Wishart Classification menu and in the window that appears make the
settings:

Figure 7.4: H / A / Alpha - Wishart Classification menu

7. To view the generated images, go to the Display menu, then the BMP Viewer
and in the window that opens, choose the location of the file wishart_H_
alpha_class_3.bmp generated by the data processing.

8. The result is an image like:

Figure 7.5: Segmented final image

44
Laboratory work no. 7

Exercises

1) Using the PolSARpro documentation, perform the supervised segmentation of the


same data set and analyze the differences.

In the segmentation based on supervised image classification, object classes on


the Earth's surface are known in advance on certain restricted areas of the image (called test
areas or sites). These areas have certain patterns and then rules are developed to be extended to
the unknown portions of the image. In other words, the user identifies some areas on the image
that are characteristic of each set of established class details. Image analysis then classifies each
pixel in the image in one of these classes. Therefore, the supervised classification is based on the
prior knowledge of the surface characteristics of a portion of the image and their use as decision-
makers in determining the properties of the other portions. The problem is reduced to detecting
patterns in the analyzed image, automatically, with the help of special programs.
The supervised digital image classification requires the following operations:
- selecting features, which consists in selecting the useful information (the detail)
that will be used to classify the rest of the landscape image;
- selecting the type of classification that consists of decomposing the character
space in disjoint subspaces so that any pixel belongs to one of the classes. There
are three types of classification: geometric classification based on measuring the
distance between the unknown pixel and a median vector, parallelepiped
classification in which a rectangle-shaped domain is set, and each pixel is tested
if it belongs to the domain and the probabilistic classification based on the
probability that a pixel belongs to a particular class.

The unsupervised (the example in the lab) classification of digital images implies
creating pixel groups that represent geographic features without first knowing what is to be
classified. Practically, pixels are built into cluster classes, and then it is checked whether clusters
have meaning in the analyzed digital image.
In order to form the classes, the spectral response of all pixels is analyzed by
statistical methods and based on the statistical analysis results the pixels are grouped into
clusters. Analysis and calculation are done automatically by software.

In practice, the two classification methods are used in combination. First, using
unsupervised classification, clusters (classes) are constructed, and then, through a supervised
cluster classification, they are ignored and joined to those of significance. This only preserves
clusters with meaning for the decision to classify the rest of the landscape.

45
46
Appendix 1
Processing_radar_VNA.m MATLAB Program
[Laboratory 3]

% (S21) Data processing acquired with the vector analyzer:


% time domain conversion and distance-to-target determination
clear all;
c=299792458; % light speed [m/s]
%----------------- create antennas coupling correction sequence -------------
----------
% loads the data needed to fix the parasitic coupling between the antennas
% (acquisition without target):
data=load('Correction.txt');
freq=data(:,1); % column 1 contains the frequencies
mag_dB=data(:,2); % column 2 contains s21 parameter magnitudes in
dB
mag=10.^(mag_dB/20); % converts from dB
phase=data(:,3)*pi/180; % converts the phases of s21 (column 3) in [rad]
s21=mag.*exp(1i*phase); % builds s21 complex numbers from magnitudes and
%phases
% determines the frequency resolution:
delta_f=freq(2)-freq(1);
% determines no. of untested frequencies (0Hz -> freq(1)):
no_missing_freq=round(freq(1)/delta_f)-1;
% load with zeros the positions of untested frequencies:
s21=[zeros(no_missing_freq, 1);s21];
% calculates the time-domain response by adding the negative frequencies
% and performing Inverse Fourier Transform:
tempResp=ifft([0; s21; flip(conj(s21(1:end-1)))], 'symmetric');
% determines time resolution:
delta_t=1/(length(tempResp)*delta_f);
% generates temporal support:
t=0:delta_t:(length(tempResp)-1)*delta_t;
% stores the result as a vector (the correction vector):
correction=tempResp;
%--------------------------------------------------------------------------
% loads the measurement data with the target and determines the temporal
response:
data=load('Measurement.txt');
freq=data(:,1);
mag_dB=data(:,2);
mag=10.^(mag_dB/20);
phase=data(:,3)*pi/180;
s21=mag.*exp(1i*phase);
s21=[zeros(no_missing_freq, 1);s21];
tempResp=ifft([0; s21; flip(conj(s21(1:end-1)))], 'symmetric');
% performs parasitic coupling correction by subtracting the target-less
%response:
tempResp=tempResp-correction;

47
Appendix 1

% displays the time-domain response:


figure
plot(t*1e9, tempResp) %[ns]
title('Temporal Response')
xlabel('t [ns]')
ylabel('A')
grid;
% displays distance response (multiply the time axis with c / 2 and * 100 for
%conversion in cm):
figure
plot(t*c/2*100, tempResp) %[cm]
title('Temporal Response')
xlabel('dist [cm]')
ylabel('A')
grid;
% calculates and displays distance to target:
[val, ind]=max(tempResp);
distance_in_cm=(ind-1)*delta_t*c/2*100

48
Appendix 2
Processing_SAR_ERS.m MATLAB Program
[Laboratory 4]

% Program based on "Focusing of SAR raw data


% Programmed by Diana Weihing & Stefan Auer
% Remote Sensing Technology
% Technische Universität München
% 2011"

clear all; close all; clc;

%--------------------------------------------------------------------------

% A.) Load raw data:


text=['Press t to load the Test image, or s for the Satellite image: '];
selection = input(text, 's');
if selection == 't'
raw_image = load('Test_Image');
max_power = 2.1807e+008;
else
raw_image = load('ERS_Image');
max_power = 10000;
end

% Multilooking yes/no?:
text=['Press m to perform averaging (multi-looking), or any other key to '...
'not perform: '];
selection = input(text, 's');
if selection == 'm'
multilook = 1; % 0: no; 1: yes
factor_ml = 5; % multilooking factor
else
multilook = 0;
end

% Calculate image size:


fn = fieldnames(raw_image);
raw_data = getfield(raw_image,fn{1});
azimuth_size = size(raw_data,1);
range_size = size(raw_data,2);
%--------------------------------------------------------------------------

% B.) SAR sattelite parameters (ERS):

fs=18.962468*10^6; % Signal Sampling Frequency (ADC Rate) [Hz]


K_r=4.18989015*10^(11); % Chirp Modulation Rate [Hz/s]
tau_p=37.12*10^(-6); % Chirp duration [s]
V=7098.0194; % Speed of the satellite [m/s]
lambda=0.05656; % Wavelength of the carrier frequency [m]
R_0=852358.15; % Slant range [m]
49
Appendix 2

ta=0.6; % Aperture duration [s]


prf=1679.902; % Pulse Repetition Frequency [Hz]

%--------------------------------------------------------------------------

% C.) Display the raw image (absolute values because it is made up of complex
%numbers):
figure;
imagesc(abs(raw_data));colormap('gray');
title('The raw SAR image (unfocused)'); xlabel('Range'); ylabel('Azimuth');
axis equal; axis off;

%--------------------------------------------------------------------------

% D.) Generate the range chirp function:


range_chirp=zeros(1,range_size); % empty vector
tau=-tau_p/2:1/fs:tau_p/2; % time axis in range
omega = -fs/2:1/tau_p:fs/2; % frequency axis

temp_range_chirp = exp(1i.*pi.*K_r.*tau.^2); % range chirp


range_chirp_length = length(tau); % range chirp size
%--------------------------------------------------------------------------

% Display the range chirp:


figure;
subplot(2,1,1); plot(tau,real(temp_range_chirp),'b'); hold on;
plot(tau,imag(temp_range_chirp),'r');
title('Range chirp '); xlabel('Time [s]'); ylabel('Amplitude');
xlim([min(tau) max(tau)]);
subplot(2,1,2); plot(omega, abs(fftshift(fft(temp_range_chirp))));
title('Spectrum of range chirp'); xlabel('Frequency [Hz]');
ylabel('Magnitude');
xlim([min(omega) max(omega)]);

%--------------------------------------------------------------------------

% Place the generated chirp at the center of a vector with a length equal to
%the range size of the raw data matrix:
range_chirp(ceil((range_size- ...
range_chirp_length)/2):range_chirp_length+ceil((range_size-
range_chirp_length)/2)-1)=temp_range_chirp;

% Apply the Fourier Transform to the range chirp:


RANGE_CHIRP=fft(range_chirp);

% Complex conjugation of the chirp to be used for cross-correlation:


CONJ_RANGE_CHIRP=conj(RANGE_CHIRP);

%--------------------------------------------------------------------------

% E.) Generate azimuth reference function (chirp):

azimuth_chirp=zeros(1,azimuth_size); % empty vector that


%will contain the chirp
t=-ta/2:1/prf:ta/2; % time axis
v=-prf/2:1/ta:prf/2; % frequency axis

50
Appendix 2

K_a=-2*V^2/(lambda*R_0); % azimuth chirp


%modulation rate

temp_azimuth_chirp=exp(1i.*pi.*K_a.*t.^2); % azimuth chirp

azimuth_chirp_length = length(t); % azimut chirp size

%--------------------------------------------------------------------------

% Display azimuth chirp:

figure;
subplot(2,1,1); plot(t,real(temp_azimuth_chirp),'b'); hold on;
plot(t,imag(temp_azimuth_chirp),'r');
title('Azimuth chirp'); xlabel('Time [s]'); ylabel('Amplitude');
xlim([min(t) max(t)]);
subplot(2,1,2); plot(v, abs(fftshift(fft(temp_azimuth_chirp))));
title('Spectrum of azimuth chirp '); xlabel('Frequency [Hz]');
ylabel('Magnitude');
xlim([min(v) max(v)]);

%--------------------------------------------------------------------------

% Place the generated chirp at the center of a vector with a length equal to
%the azimuth size of the raw data matrix:
azimuth_chirp(ceil((azimuth_size-
azimuth_chirp_length)/2):azimuth_chirp_length+ceil((azimuth_size-
azimuth_chirp_length)/2)-1)=temp_azimuth_chirp;

% Apply the Fourier Transform to the azimuth chirp (Frequency domain


%conversion):
AZIMUTH_CHIRP=fft(azimuth_chirp);

% Complex conjugation of the chirp to be used for cross-correlation:


CONJ_AZIMUTH_CHIRP=conj(AZIMUTH_CHIRP);

%--------------------------------------------------------------------------

% F.) Focus the raw image (= 2D cross-correlation):


% Matrix of processed data (processed image):
processed_image=zeros(azimuth_size,range_size);

%-------------------------------------------------

% F.1) Range compression:

for k1 = 1:azimuth_size
vector = raw_data(k1,:); % Row selection
VECTOR = fft(vector); % Fourier Transform
CORR = VECTOR.*CONJ_RANGE_CHIRP; % Spectrum
%multiplication
if_vector = fftshift(ifft(CORR)); % Inverse Fourier
%Transform
processed_image(k1,:) = if_vector;
end

clear vector VECTOR CORR if_vector

%-------------------------------------------------

51
Appendix 2

% F.2) Azimuth compression:

for k2 = 1:range_size
vector = processed_image(:,k2); % Column selection
VECTOR = fft(vector); % Fourier Transform
CORR = VECTOR.*CONJ_AZIMUTH_CHIRP.'; % Spectrum
%multiplication
if_vector = fftshift(ifft(CORR)); % Inverse Fourier
%Transform
processed_image(:,k2) = if_vector;
end

clear vector VECTOR CORR if_vector

%--------------------------------------------------------------------------

% G.) Apply spatial averaging (Multi-looking):

% ERS: range resolution: approx. 25 m, azimuth resolution: approx. 5 m


% To obtain square pixels, 25 m / 25 m requires averaging in azimuth

if multilook == 1

% Determine the resulting image size:


ml_image=zeros(ceil(azimuth_size/factor_ml),range_size);

index=1;

% Spatial averaging in azimuth:


for i=1:factor_ml:azimuth_size-factor_ml % select pixels from
%factor_ml in factor_ml pixels
vector=processed_image(i:i+(factor_ml-1),:);
m_vector=mean(abs(vector),1); % averaging on factor_ml
%pixels
ml_image(index,:)=m_vector;
index=index+1;
end

% Final SAR image (with multilook):


processed_image = ml_image;

end

%--------------------------------------------------------------------------

% H.) Display processed (focused) image:

figure;
imagesc(abs(processed_image));colormap('gray')
title('Focused SAR image')
xlabel('Range','FontSize',12); ylabel('Azimuth','FontSize',12);
caxis([0 max_power]);
axis equal; axis off;

%--------------------------------------------------------------------------

52
Appendix 3
Processing_SAR_VNA_v1.m MATLAB Program
[Laboratory 5]

%Processing S21 data acquired with the VNA in a SAR image


%Data files must be located in ~Current_Folder~/Data/, together with
%the calibration sequence file (target-less acquisition) Correction.txt

% Based on Gorham, L.A. and Moore, L.J., "SAR image formation toolbox for
% MATLAB," Algorithms for Synthetic Aperture Radar Imagery XVII
% 7669, SPIE (2010).

clear all;
%define experiment parameters-------------------------------------
half_angle=20; %antenna real aperture (3dB half-angle) [degrees]
dist_increment=0.05; %distance increment between successive measurements [m]
image_length=3; %final image length [m]
scene_altitude=0; %altitude of the analyzed scene relative to the radar [m]
%auto computed parameters--------------------------------------------------
np = length(dir(['Data', '\*.txt']))-1; %no. of measurements = no. of files -
%correction
image_width = dist_increment * (np-1); %final image width [m]
%constants-----------------------------------------------------------------
c = 299792458; %light speed [m/s]
%----------------------antennas coupling correction------------------------
dat=load('Data\Correction.txt'); %load correction data
freq=dat(:,1); %extract frequencies
magnitude_dB=dat(:,2); %extract s21 parameters magnitudes in dB
magnitude=10.^(magnitude_dB/20); %convert from dB
phase=dat(:,3)*pi/180; %extract s21 parameters phases in radians
s21=magnitude.*exp(1i*phase); %compute complex s21 array
correction=s21; %correction array
f_start=freq(1); %start frequency [Hz]
delta_f=freq(2)-freq(1); %frequency increment (resolution) [Hz]
%---------------create raw data matrix from acquired data------------------
data.phdata=[];
for cnt = 1 : np
file=['Data\Ach' num2str(cnt,'%03d') '.txt'];
dat=load(file); %load data
magnitude_dB=dat(:,2); %extract s21 magnitudes in dB
magnitude=10.^(magnitude_dB/20); %convert from dB
phase=dat(:,3)*pi/180; %extract s21 phases in radians
s21=magnitude.*exp(1i*phase); %compute complex s21 array
s21=s21-correction; %correct for antennas coupling
data.phdata=[data.phdata s21]; %create raw data matrix
end
data.deltaF=delta_f; %frequency resolution [Hz]
data.minF=f_start; %start frequency [Hz]
data.K = size(data.phdata,1); %frequencies / pulse
data.Np = size(data.phdata,2); %no. of pulses
data.Nfft = 2^(nextpow2(10*data.K)); %total number of IFFT bins
data.maxWr = c/(2*data.deltaF); %maximum scanned range [m]

53
Appendix 3

N_pix_v=floor(image_length/data.maxWr*data.K*2); %focused image vertical no.


%of pixels
N_pix_h=floor(image_width/image_length*N_pix_v); %focused image horizontal
%no. of pixels
% Create image grid [m]:
data.x_vec=[-image_width/2:image_width/(N_pix_h-1):image_width/2];
data.y_vec=[image_length:-image_length/(N_pix_v-1):0];
data.x_mat=repmat(data.x_vec,length(data.y_vec),1);
data.y_mat=(repmat(data.y_vec,length(data.x_vec),1))';
data.z_mat=scene_altitude*ones(length(data.y_vec),length(data.x_vec));
% Create antenna positions array [m]:
data.AntX=[-dist_increment*(np-1)/2:dist_increment:dist_increment*np/2];
data.AntY=zeros(1,np);
data.AntZ=zeros(1,np);
%--------------------------SAR processing----------------------------------
% Calculate the range (straight line distance) to every bin in the range
%profile [m]:
data.r_vec = linspace(0,data.Nfft-1,data.Nfft)*data.maxWr/data.Nfft;
% Create empty image matrix:
data.im_final = zeros(size(data.x_mat));
% Initialize execution time vector:
t = zeros(1,data.Np);
% Run for each pulse (S21 measurement):
for ii = 1:data.Np
% Display time
if ii > 1
t_sofar = sum(t(1:(ii-1)));
t_est = (t_sofar*data.Np/(ii-1)-t_sofar)/60;
fprintf('Pulse %d of %d, %.02f minutes until end\n',ii,data.Np,t_est);
else
fprintf('Pulse %d ofn %d\n',ii,data.Np);
end
tic
% Calculate range profile:
rc = ifft(data.phdata(:,ii),data.Nfft);
% Calculate the range (straight line dist.) [m] between the VNA and each
%pixel in the image:
dR = sqrt((data.AntX(ii)-data.x_mat).^2 + (data.AntY(ii)-data.y_mat).^2 +
(data.AntZ(ii)-data.z_mat).^2);
% Calculate the angle for each pixel [rad]
angle=atan((abs(data.AntX(ii)-data.x_mat))./(abs(data.AntY(ii)-data.y_mat)));
% Calculate phase shifts for each pixel:
phCorr = exp(1i*4*pi*data.minF/c*dR);
% Determine which pixels fall within the range swath:
J = find(and(dR > min(data.r_vec), dR < max(data.r_vec)));
% Determine which pixels fall within the real antenna aperture (are visible):
I = find((angle(J)) < (half_angle * pi/180));
% Update the image using linear interpolation:
data.im_final(I) = data.im_final(I) + interp1(data.r_vec,rc,dR(I),'linear')…
.* phCorr(I);
% Determine pulse processing duration:
t(ii) = toc;
end
% Display focused image:
figure;
imagesc(data.x_vec,-data.y_vec,abs(data.im_final)); %colormap('gray')
title('SAR focused image')
xlabel('Azimuth [m]','FontSize',12); ylabel('Range [m]','FontSize',12);
caxis([0 max(max(abs(data.im_final)))]);

54
Appendix 3

Processing_SAR_VNA_v2.m MATLAB Program


[Laboratory 5]

%Processing S21 data acquired with the VNA in a SAR image


%Data files must be located in ~Current_Folder~/Data/, together with
%the calibration sequence file (target-less acquisition) Correction.txt

% Based on Gorham, L.A. and Moore, L.J., "SAR image formation toolbox for
% MATLAB," Algorithms for Synthetic Aperture Radar Imagery XVII
% 7669, SPIE (2010).

clear all;
%define experiment parameters-------------------------------------
half_angle=20; %antenna real aperture (3dB half-angle) [degrees]
dist_increment=0.05; %distance increment between successive measurements [m]
image_length=3; %final image length [m]
scene_altitude=0; %altitude of the analyzed scene relative to the radar [m]
%auto computed parameters--------------------------------------------------
np = length(dir(['Data', '\*.txt']))-1; %no. of measurements = no. of files -
%correction
image_width = dist_increment * (np-1); %final image width [m]
%constants-----------------------------------------------------------------
c = 299792458; %light speed [m/s]
%----------------------antennas coupling correction------------------------
dat=load('Data\Correction.txt'); %load correction data
freq=dat(:,1); %extract frequencies
magnitude_dB=dat(:,2); %extract s21 parameters magnitudes in dB
magnitude=10.^(magnitude_dB/20); %convert from dB
phase=dat(:,3)*pi/180; %extract s21 parameters phases in radians
s21=magnitude.*exp(1i*phase); %compute complex s21 array
correction=s21; %correction array
f_start=freq(1); %start frequency [Hz]
delta_f=freq(2)-freq(1); %frequency increment (resolution) [Hz]
%---------------create raw data matrix from acquired data------------------
data.phdata=[];
for cnt = 1 : np
file=['Data\Ach' num2str(cnt,'%03d') '.txt'];
dat=load(file); %load data
magnitude_dB=dat(:,2); %extract s21 magnitudes in dB
magnitude=10.^(magnitude_dB/20); %convert from dB
phase=dat(:,3)*pi/180; %extract s21 phases in radians
s21=magnitude.*exp(1i*phase); %compute complex s21 array
s21=s21-correction; %correct for antennas coupling
data.phdata=[data.phdata s21]; %create raw data matrix
end
data.deltaF=delta_f; %frequency resolution [Hz]
data.minF=f_start; %start frequency [Hz]
data.K = size(data.phdata,1); %frequencies / pulse
data.Np = size(data.phdata,2); %no. of pulses
data.Nfft = 2^(nextpow2(10*data.K)); %total number of IFFT bins
data.maxWr = c/(2*data.deltaF); %maximum scanned range [m]
N_pix_v=floor(image_length/data.maxWr*data.K*2); %focused image vertical no.
%of pixels

55
Appendix 3

N_pix_h=floor(image_width/image_length*N_pix_v); %focused image horizontal


%no. of pixels
% Create image grid [m]:
data.x_vec=[-image_width/2:image_width/(N_pix_h-1):image_width/2];
data.y_vec=[image_length:-image_length/(N_pix_v-1):0];
data.x_mat=repmat(data.x_vec,length(data.y_vec),1);
data.y_mat=(repmat(data.y_vec,length(data.x_vec),1))';
data.z_mat=scene_altitude*ones(length(data.y_vec),length(data.x_vec));
% Create antenna positions array [m]:
data.AntX=[-dist_increment*(np-1)/2:dist_increment:dist_increment*np/2];
data.AntY=zeros(1,np);
data.AntZ=zeros(1,np);
%--------------------------SAR processing----------------------------------
% Calculate the range (straight line distance) to every bin in the range
%profile [m]:
data.r_vec = linspace(0,data.Nfft-1,data.Nfft)*data.maxWr/data.Nfft;
% Create empty image matrix:
data.im_final = zeros(size(data.x_mat));
% Initialize execution time vector:
t = zeros(1,data.Np);
% Run for each pulse (S21 measurement):
for ii = 1:data.Np
% Display time
if ii > 1
t_sofar = sum(t(1:(ii-1)));
t_est = (t_sofar*data.Np/(ii-1)-t_sofar)/60;
fprintf('Pulse %d of %d, %.02f minutes until end\n',ii,data.Np,t_est);
else
fprintf('Pulse %d of %d\n',ii,data.Np);
end
tic
% Calculate range profile:
rc = ifft(data.phdata(:,ii),data.Nfft);
% Calculate the range (straight line dist.) [m] between the VNA and each
%pixel in the image:
dR = sqrt((data.AntX(ii)-data.x_mat).^2 + (data.AntY(ii)-data.y_mat).^2 +
(data.AntZ(ii)-data.z_mat).^2);
% Calculate the angle for each pixel [rad]
angle=atan((abs(data.AntX(ii)-data.x_mat))./(abs(data.AntY(ii)-data.y_mat)));
% Calculate phase shifts for each pixel:
phCorr = exp(1i*4*pi*data.minF/c*dR);
% Determine which pixels fall within the range swath:
J = find(and(dR > min(data.r_vec), dR < max(data.r_vec)));
% Determine which pixels fall within the real antenna aperture (are visible):
I = find((angle(J)) < (half_angle * pi/180));
% Update the image using linear interpolation:
data.im_final(I) = data.im_final(I) + interp1(data.r_vec,rc,dR(I),'linear')…
.* phCorr(I);
% Determine pulse processing duration:
t(ii) = toc;
end
% Display focused image:
figure;
imagesc(data.x_vec,-data.y_vec,abs(data.im_final)); %colormap('gray')
title('SAR focused image')
xlabel('Azimuth [m]','FontSize',12); ylabel('Range [m]','FontSize',12);
caxis([0 max(max(abs(data.im_final)))]);

56
Bibliography

1. ATTEN INSTRUMENTS – AT3000 (3CM) WAVEGUIDE EXPERIMENT SYSTEM


Manual For Experiment.

2. Ettus research - WBX 50-2200 MHz Rx/Tx (40 MHz) RF Daughterboard Manual.

3. Rohde & Schwarz – FSH4 Manual.

4. A. Moreira, P. Prats-Iraola, M. Younis, G. Krieger, I. Hajnsek and K. P. Papathanassiou,


"A tutorial on synthetic aperture radar," in IEEE Geoscience and Remote Sensing
Magazine, vol. 1, no. 1, pp. 6-43, March 2013. doi: 10.1109/MGRS.2013.2248301.

5. Michael Eineder, Richard Bamler, "Module 1301: SAR Imaging", https://saredu.dlr.de/ .

6. Stefan Auer, Florian Burkert, Stefan Gernhardt, "SAR image focusing with MATLAB",
Technische Universitat Munchen.

7. LeRoy A. Gorham, Linda J. Moore, "SAR image formation toolbox for MATLAB",
Proc. SPIE 7699, Algorithms for Synthetic Aperture Radar Imagery XVII, 769906
(April 18, 2010); doi:10.1117/12.855375; http://dx.doi.org/10.1117/12.855375.

8. PolSARpro Tutorial.

57

You might also like