Contents
Contents
1. Introduction.........................................................................................3
2. Bit Error over AWGN and RAYLEIGH Fading Channels ............4
2.1. PDF-based approach for binary signal ..................................................... 4
2.2. Bit Error over Gaussian channel ............................................................. 4
2.3. Bit Error over fading channel .................................................................. 5
3. Flowchart 6
4. THE MATLAB CODE .......................................................................8
5. Introduction....................................................................................... 11
6. The Probability of Bit Error When Employing MRC and BPSK
modulation 12
7. Flowchart 13
8. THE MATLAB CODE .....................................................................15
9. Introduction.......................................................................................19
10. 2. normalized radiation pattern ......................................................21
11. Flowchart 22
11.1. 3.1 Flowchart of Normalized radiation pattern for a non-weighted two-sensor
array. ...................................................................................................... 22
12. THE MATLAB CODE .....................................................................24
12.1. 4.1 MATLAB code of Normalized radiation pattern for a non-weighted two-
sensor array.............................................................................................. 24
1. Introduction.......................................................................................28
13. normalized radiation pattern ..........................................................30
14. Flowchart 31
14.1. 3.1 Flowchart of Normalized radiation pattern for a weighted two-sensor
array. ...................................................................................................... 31
15. THE MATLAB CODE .....................................................................33
15.1. 4.1 MATLAB code of Normalized radiation pattern for a weighted two-sensor
array. ...................................................................................................... 33
16. 45
17. 3. Flowchart.......................................................................................45
18. Introduction.......................................................................................48
19. Laws and equations ..........................................................................50
20. Flowchart 51
21. THE MATLAB CODE .....................................................................54
1|Page
2|Page
1. Introduction
In our experience, we will explore the behavior of Binary Phase Shift
Keying (BPSK) modulation when subjected to two common channel
models: Additive White Gaussian Noise (AWGN) and Rayleigh
fading. Our objective is to use MATLAB simulations to depict the bit
error rate (BER) performance of BPSK modulation. We will assess the
signal’s robustness against the distinct obstacles introduced by these
channels. The analysis will not only highlight the durability of BPSK
modulation across different scenarios but will also emphasize the value of
diversity strategies in overcoming signal deterioration.
FIGURE 3.4: Bit error probability for BPSK modulation over AWGN and Rayleigh fading channels.
3|Page
2. Bit Error over AWGN and RAYLEIGH Fading
Channels
2.1. PDF-based approach for binary signal
A fading channel can be considered as an AWGN with a
variable gain. The gain itself is considered as a
RV(Random variable) with a given pdf. So the average
BER can be calculated by averaging BER for
(2)
So the bit error probability is:
(3)
This equation can be simplified using Q-function as:
(4)
where the Q function is defined as:
4|Page
(5)
Using BPSK modulation and since the information are real, only the
real part of the equation is of interest. So the following sufficient
statistic is used for decision at the receiver.
(7)
The noise n has the same statistics as <w because h∗/|h| = exp(jθ)
with θ uniformly distributed in (0,π), therefore n ∼ CN(0,N0/2). This
equation shows that we have a normal AWGN channel with the
signal scaled by |h|. The bit error probability as seen before for this
case, given h, will be:
5|Page
The error probability can be calculated by:
3. Flowchart
This is the flowchart to guide the MATLAB code for calculating a
plotting the bit error probability for BPSK modulation over AWGN a
Rayleigh fading channels:
1) Start
o Begin the process.
2) Initialize Variables
6|Page
6) Plot Results
o Plot ( 𝑬𝒃/𝑵𝟎) versus (𝑷𝒃) for both AWGN and Rayleigh fading on
a semilogarithmic scale.
o Label the axes and the graph.
7) End
Figure 1
7|Page
4. THE MATLAB CODE
% Number of bits or symbols
N = 10^6;
% Rayleigh fading
rayleigh = sqrt(1/2) * (randn(1, N) + 1i*randn(1, N));
received_rayleigh = modulated_data .* rayleigh + noise_awgn;
received_rayleigh = received_rayleigh ./ rayleigh; % Equalization
detected_rayleigh = real(received_rayleigh) >= 0;
ber_rayleigh(i) = sum(detected_rayleigh ~= data) / N;
end
8|Page
hold off;
% Graph annotations
title('Bit Error Probability for BPSK Modulation');
xlabel('SNR (dB)');
ylabel('Bit Error Rate (BER)');
legend('AWGN Channel', 'Rayleigh Fading Channel');
grid on;
Figure 2
9|Page
10 | P a g e
5. Introduction
The selection combining technique is the simplest technique, where in,
the received signal from the antenna that experiences the highest SNR
(i.e, the strongest signal from N received signals) is chosen for processing
at the receiver. Therefore this technique throws away (N-1) of N
observations. Whereas, in maximum ratio combining (MRC) all N
observations are used.
MRC works on the signal in spatial domain and is very similar to what a
matched filter in frequency domain does to the incoming signal. MRC
maximizes the inner product of the weights and the signal vector.
Figure 3
The maximum ratio combining technique, uses all the received signal
elements (Figure 1), it weighs them and combines the weighted signals so
that the output SNR is maximized. Requiring the knowledge of the
individual channels , the weights are chosen as
12 | P a g e
7. Flowchart
This is the flowchart to guide the MATLAB code for calculating a
plotting the bit error probability for BPSK modulation over AWGN a
Rayleigh fading channels:
4) Start
o Begin the process.
2)Define Parameter
- SNR_dB = 0:5:40
- SNR = 10.^(SNR_dB/10)
- L_values = [1, 2, 3, 4]
- BER = zeros(length(L_values), length(SNR))
- For i = 1:length(L_values)
- Set L = L_values(i)
- Compute BER(i, :) = ber_mrc(L, SNR)
6) Plot Results
o Plot ( 𝑬𝒃/𝑵𝟎) versus (𝑷𝒃) for both AWGN and Rayleigh fading on
a semilogarithmic scale.
o Label the axes and the graph.
7) End
13 | P a g e
Figure 4
14 | P a g e
8. THE MATLAB CODE
% MATLAB code to plot the BER performance of MRC diversity for different
numbers of branches (L)
% Parameters
SNR_dB =0:5:40; % Signal-to-noise ratio in dB
SNR = 10.^(SNR_dB/10); % Linear scale SNR
% Calculate BER for AWGN (M=1)
Pb = 0.5*erfc(sqrt(SNR));
% Function to calculate BER for MRC
ber_mrc = @(L, SNR) (1/2).*(1 - sqrt(SNR./(1 + SNR))).^L .*
sum(cell2mat(arrayfun(@(l) nchoosek(L-1+l, l) .*(0.5*(1+ sqrt(SNR./(1 +
SNR)))).^l, 0:L-1, 'UniformOutput', false)));
% BER calculations for different L values
L_values = [1, 2, 3, 4];
BER = zeros(length(L_values), length(SNR));
for i = 1:length(L_values)
L = L_values(i);
BER(i, :) = 0.25*ber_mrc(L, SNR);
end
% Plotting
figure;
% Plot AWGN channel (solid line)
semilogy(SNR_dB, Pb, 'k-' ,'DisplayName', 'AWGN chanel');
hold on;
xlabel('SNR (dB)');
ylabel('Bit Error Rate (BER)');
title('BER Performance of MRC Diversity for Different Numbers of
Branches');
% Set the y-axis limits
ylim([10^-7 1]);
legend;
grid on;
15 | P a g e
Figure 5
16 | P a g e
17 | P a g e
18 | P a g e
9. Introduction
A device able to receive or transmit electromagnetic energy is called an
antenna. Antennas have become ubiquitous devices and occupy a salient
position in wireless system experienced the largest growth among
industry systems. Antennas couple electromagnetic energy from one
medium (space) to another medium as wire, coaxial cable, or waveguide.
Physical designs can vary greatly. Antenna produces complex
electromagnetic fields both near to and far from antennas. Not all of the
electromagnetic fields generated actually radiated into space. Some of the
fields remain in the vicinity of antenna and are viewed as reactive near
fields; much the same way as inductor or capacitor is a reactive storage
element in lumped element circuits.
Smart Antenna
ULA - Algorithm:
We can explain the functioning principle of a “smart” antenna using a
simple example. In the example, we consider a uniform linear array
(ULA) consisting of two identical Omni-directional sensors as shown in
Figure 1 .We assume that a signal is generated by a source in the far-
field of the “smart” antenna. The impinging signal on the sensor array is
approximately a uniform plane wave, as shown in Figure 1. With respect
to sensor 1, sensor 2 experiences a time delay of
(2)
Where d is the spacing between the two elements and the wave speed.
Similarly, knowing d and measuring , the angle of the direction of
arrival is found using
(3)
If is a narrowband signal with carrier frequency , then the time delay
corresponds to a phase shift of
(4)
Where is the wavelength corresponding to the carrier frequency, i.e.
. Clearly, for an incoming signal from a direction perpendicular to the array
normal , both the time delay and phase shift between the two sensors
are zero.
20 | P a g e
Figure 2
21 | P a g e
11. Flowchart
11.1. 3.1 Flowchart of Normalized radiation pattern for a
non-weighted two-sensor array.
1. Initialize Parameters:
- Define `N` as the number of elements in the array, which is 2 in this
case.
- Set `d` as the spacing between the elements in wavelengths, which is
0.5 wavelengths.
2. Define the Range of Angles:
- Set `theta`, an array representing the range of angles from (-pi) to (pi)
(or -180 degrees to 180 degrees), with an increment of 0.01 radians.
This covers a full 360-degree span.
3. Initialize the Radiation Pattern:
- Create an array `pattern` initialized to zero, with the same size as
`theta`. This array will store the calculated radiation pattern values.
4. Calculate the Radiation Pattern:
- Loop through each angle `k` in `theta`:
- Calculate the steering vector `a` for the current angle `theta(k)`. This
vector accounts for the phase difference caused by the geometry and
element spacing.
- Compute the array factor for the current angle This formula calculates
the power of the signal received from the direction specified by
`theta(k)`.
- Store the computed array factor in `pattern(k)`.
5. Normalize the Radiation Pattern:
- Convert `pattern` into decibels (dB) relative to its maximum value.
This is done by dividing the entire `pattern` by its maximum value to
normalize it, then converting this normalized pattern to dB.
22 | P a g e
- Set the plot title to 'Normalized Radiation Pattern for a Non-Weighted
Two-Sensor Array'.
- Label the x-axis as 'Angle (degrees)' and the y-axis as 'Normalized
Gain (dB)'.
- Enable the grid and set axis limits for clarity in visualization, focusing
the x-axis from -180 to 180 degrees and y-axis to display gains
effectively.
7. End of Algorithm
- This algorithm clearly outlines the process to compute and visualize
the radiation pattern for a simple two-element antenna array with
uniform weighting, which is useful for understanding the directional
properties of array antennas in signal processing and
communications.
23 | P a g e
12. THE MATLAB CODE
12.1. 4.1 MATLAB code of Normalized radiation pattern
for a non-weighted two-sensor array.
% Define the number of elements and the spacing between them
N = 2; % Number of elements in the array
d = 0.5; % Spacing between elements in wavelengths
24 | P a g e
Normalized radiation pattern for a non-weighted two-sensor array
25 | P a g e
Z
26 | P a g e
27 | P a g e
1. Introduction
A device able to receive or transmit electromagnetic energy is called an
antenna. Antennas have become ubiquitous devices and occupy a salient
position in wireless system experienced the largest growth among
industry systems. Antennas couple electromagnetic energy from one
medium (space) to another medium as wire, coaxial cable, or waveguide.
Physical designs can vary greatly. Antenna produces complex
electromagnetic fields both near to and far from antennas. Not all of the
electromagnetic fields generated actually radiated into space. Some of the
fields remain in the vicinity of antenna and are viewed as reactive near
fields; much the same way as inductor or capacitor is a reactive storage
element in lumped element circuits.
Smart Antenna
ULA - Algorithm:
We can explain the functioning principle of a “smart” antenna using a
simple example. In the example, we consider a uniform linear array
(ULA) consisting of two identical Omni-directional sensors as shown in
Figure 1 .We assume that a signal is generated by a source in the far-
field of the “smart” antenna. The impinging signal on the sensor array is
approximately a uniform plane wave, as shown in Figure 1. With respect
to sensor 1, sensor 2 experiences a time delay of
(2)
Where d is the spacing between the two elements and the wave speed.
Similarly, knowing d and measuring , the angle of the direction of
arrival is found using
(3)
If is a narrowband signal with carrier frequency , then the time delay
corresponds to a phase shift of
(4)
Where is the wavelength corresponding to the carrier frequency, i.e.
. Clearly, for an incoming signal from a direction perpendicular to the array
normal , both the time delay and phase shift between the two sensors
are zero.
29 | P a g e
Figure 2
30 | P a g e
14. Flowchart
14.1. 3.1 Flowchart of Normalized radiation pattern for a
weighted two-sensor array.
1. Initialize Parameters:
- Define `N` as the number of elements in the array, which is 2 in this
case.
- Set `d` as the spacing between the elements in wavelengths, which is
0.5 wavelengths.
2. Define the Weights:
- Assign complex weights to the array elements:
- `w1` is set to (0.5 times (1 - i)) for the first sensor.
- `w2` is set to (0.5 times (1 + i)) for the second sensor.
- Combine these weights into a vector `w` = ([w1; w2]).
3. Define the Range of Angles:
- Set `theta`, an array representing the range of angles from (-pi) to (pi)
(or -180 degrees to 180 degrees), with an increment of 0.01 radians.
This covers a full 360-degree span.
4. Initialize the Radiation Pattern:
- Create an array `pattern` initialized to zero, with the same size as
`theta`. This array will store the calculated radiation pattern values.
5. Calculate the Radiation Pattern:
- Loop through each angle `k` in `theta`:
- Calculate the steering vector `a` for the current angle `theta(k)`. This
vector accounts for the phase difference caused by the geometry and
element spacing.
- Compute the array factor for the current angle This formula calculates
the power of the signal received from the direction specified by
`theta(k)`.
- Store the computed array factor in `pattern(k)`.
6. Normalize the Radiation Pattern:
31 | P a g e
- Convert `pattern` into decibels (dB) relative to its maximum value.
This is done by dividing the entire `pattern` by its maximum value to
normalize it, then converting this normalized pattern to dB.
32 | P a g e
15. THE MATLAB CODE
% Define the weights for the array elements as given in the document
w1 = 0.5 * (1 - 1i); % Weight for the first sensor
w2 = 0.5 * (1 + 1i); % Weight for the second sensor
w = [w1; w2]; % Weight vector
33 | P a g e
34 | P a g e
Normalized radiation pattern for a weighted five-sensor array.
Pattern forming network, and the adaptive processor
Done By:
ZAKARYA SADEQ 202170091
Supervisor By:
D. MOHAMMED AL-SURABI
Table of Contents
Table of Contents 1
1. Introduction 2
2. normalized radiation pattern 4
3. Flowchart 5
3.1 Flowchart of Normalized radiation pattern for a weighted five-sensor
array. 5
4. THE MATLAB CODE 7
35 | P a g e
4.1 MATLAB code of Normalized radiation pattern for a weighted five-
sensor array. 7
1. Introduction
A device able to receive or transmit electromagnetic energy is called an
antenna. Antennas have become ubiquitous devices and occupy a salient
position in wireless system experienced the largest growth among industry
systems. Antennas couple electromagnetic energy from one medium
(space) to another medium as wire, coaxial cable, or waveguide. Physical
designs can vary greatly. Antenna produces complex electromagnetic fields
both near to and far from antennas. Not all of the electromagnetic fields
generated actually radiated into space. Some of the fields remain in the
vicinity of antenna and are viewed as reactive near fields; much the same
way as inductor or capacitor is a reactive storage element in lumped
element circuits.
Smart Antenna
The concept of using multiple antennas and innovative signal processing
to serve cells more intelligently has existed for many years. In fact, varying
degrees of relatively costly smart antenna systems have already been
applied in defence systems. Until recent years, cost barriers have prevented
their use in commercial systems .The advent of powerful, low-cost digital
signal processors (DSPs), general-purpose processors (and ASICs), as well
as innovative software-based signal-processing techniques (algorithms)
have made intelligent antennas practical for cellular communications
systems. Smart antenna systems are the technology of uniting not only
antenna technology but also two or more of other technology as digital
signal processors and high function of antennas. Today, when spectrally
efficient solutions are increasingly a business imperative, these systems are
providing greater coverage area for each cell site, higher rejection of
interference, and substantial capacity improvements. That can overcome
the problem in high speed mobile communication such as limited channel
bandwidth while satisfying the demand for many mobiles in a limited
channel. In truth, antennas are not smart, antenna systems are smart.
Generally co-located with a base station, a smart antenna system combines
an antenna array with a digital signal-processing capability to transmit and
receive in an adaptive, spatially sensitive manner. In other words, such a
36 | P a g e
system can automatically change the directionality of its radiation patterns
in response to its signal environment. Smart antennas also known as
adaptive array antennas, multiple antennas and recently MIMO that are
antenna arrays with smart signal processing algorithms used to identify
spatial signal signature such as the direction of arrival of the signal, and
use it to calculate beamforming vectors, to track and locate the antenna
beam on the mobile/target. The antenna could optionally be any sensor.
This can dramatically increase the performance characteristics (such as
capacity) of a wireless system.
ULA - Algorithm:
We can explain the functioning principle of a “smart” antenna using a
simple example. In the example, we consider a uniform linear array (ULA)
consisting of two identical Omni-directional sensors as shown in Figure 1
.We assume that a signal is generated by a source in the far-field of the
“smart” antenna. The impinging signal on the sensor array is approximately
a uniform plane wave, as shown in Figure 1. With respect to sensor 1,
sensor 2 experiences a time delay of
(2)
Where d is the spacing between the two elements and the wave speed.
Similarly, knowing d and measuring , the angle of the direction of arrival
is found using
(3)
If is a narrowband signal with carrier frequency , then the time delay
corresponds to a phase shift of
(4)
Where is the wavelength corresponding to the carrier frequency, i.e. .
Clearly, for an incoming signal from a direction perpendicular to the array
normal , both the time delay and phase shift between the two sensors are
zero.
37 | P a g e
Figure 2
Figure 2: Normalized radiation pattern for a non weighted two-sensor
array. Figure 2 shows the normalized radiation pattern for a two element
antenna array.
3. Flowchart
3.1 Flowchart of Normalized radiation pattern for a weighted five-sensor
array.
1. Initialize Parameters:
- Define `N` as the number of elements in the array, which is 5 in this
case.
- Set `d` as the spacing between the elements in wavelengths, which
is 0.5 wavelengths.
2. Set Steering and Interfering Angles:
38 | P a g e
- Define `theta_s`, the steering angle for the desired signal direction,
which is set to 0 degrees.
- Set `theta_i`, an array of angles in degrees for interfering signals,
with values at [-75, -45, 30, 60].
4. Compute Direction Vectors:
- Calculate the direction vector `a_s` for the desired signal based on
the steering angle `theta_s`.
- Initialize a matrix `a_i` to store direction vectors for each of the
interfering angles `theta_i`.
- Loop through each interfering angle and compute the respective
direction vectors, storing them in `a_i`.
5. Define Array Weights:
- Initialize the weights vector `w` with uniform values assuming equal
contribution from all array elements. In practice, these weights may be
optimized based on specific array processing techniques.
6. Calculate Normalized Radiation Pattern:
- Define a range of angles `theta` from -180 to 180 degrees to evaluate
the radiation pattern.
- Initialize the array factor `AF` to store the radiation pattern values.
- Loop through each angle in `theta`:
- Compute the direction vector `a_theta` for the current angle.
- Calculate the array factor `AF` at this angle using the formula
|w'*a_theta|^2, which involves the conjugate transpose of `w` and the
direction vector `a_theta`.
- Normalize the array factor by converting it into decibels relative to
its maximum value using 10*log10(AF/max(AF)).
7. Plot the Radiation Pattern:
- Plot the array factor in dB against the angle vector `theta`.
- Set the plot title, axis labels, and grid. Configure the axis range to
focus on the critical areas of the plot.
8. End of Algorithm
39 | P a g e
This algorithm provides a comprehensive outline of how to simulate an
antenna array's directional characteristics, taking into account both desired
and interfering signals, highlighting the computational steps from
initialization to visualization.
4. THE MATLAB CODE
4.1 MATLAB code of Normalized radiation pattern for a weighted five-
sensor array.
clear
% Number of elements in the array
N = 5;
% Wavelength (lambda)
lambda = 1; % Assuming a normalized wavelength
40 | P a g e
a_i(:,k) = exp(-1i*2*pi*d*sin(deg2rad(theta_i(k)))/lambda*(0:N-2)');
end
41 | P a g e
The MUSIC Algorithm
Multiple Signal Classification
Done By:
ZAKARYA SADEQ 202170091
Supervisor By:
D. MOHAMMED AL-SURABI
Table of Contents
Table of Contents 1
1. Introduction 2
2. Laws and equations 4
3. Flowchart 5
4. THE MATLAB CODE 6
42 | P a g e
1. Introduction
This repository presents a mini project to show how the direction of arrivals
(DOA) is estimated using the MUSIC algorithm. MUSIC stands for
MUltiple SIgnal Classification. It is a subspace-based algorithm used for
estimating the DOA of same-frequency narrowband sources arriving at a
sensor array. MUSIC outperforms simple methods such as picking peaks
of DFT (Discrete Fourier Transform) spectra in the presence of noise when
the number of components is known in advance because it exploits
knowledge of this number to ignore the noise in its final report.
MUSIC is a spatial spectrum estimation algorithm based on second order
statistics. It attracted intensive studies due to the following perceived
advantages.
• Capability to handle multiple simultaneous sources
• High precision measurement
• High spatial resolution
• Adjustable to small observable data cases
• Possible for real time implementation.
This short explanation the basic idea and implementation are described. Its
use for resolving multiple sound sources with antenna array is discussed.
Generalizing Figure 1 to N sources to M microphones, we have the
microphone captured sound vector,
where , , and
.
The covariance matrix, , is Hermitian and positive definite since is always
positive definite.
43 | P a g e
By eigenvalue decomposition, and are the eigenvector and corresponding
eigenvalue, we have
The noise dimension has smaller eigenvalue, which is the noise floor, while
the dimensions that contain signals will have larger eigenvalue. Therefore,
the noise subspace can be constructed by
.
The signal dimension will have smaller value if it is projected into the noise
subspace. Therefore, the following formula will have larger value and
appear to be a peak,
Figure 2
The above formula defines the MUSIC algorithm. The number of peaks
indicates the number of independent sound sources and the corresponding
direction defines the incoming direction of each sound source.
Figure 2 shows results of MUSIC algorithm for a linear array of 8
microphones. The three incoming signals impinge on the array at 0, 30, and
60 degrees from the broadside.
2. Laws and equations
Once the subspaces are determined, the DOAs of the desired signals can
be estimated by calculating the MUSIC spatial spectrum over the region of
interest
the a(θ)s are the array response vectors calculated for all angles θ within
the range of interest. Because the desired array response vectors A () are
orthogonal to the noise subspace, the peaks in the MUSIC spatial spectrum
represent the DOA estimates for the desired signals. Due to imperfections
in deriving Rxx, the noise subspace eigenvalues will not be exactly equal
to σ2 n . They do, however, form a group around the value σn2 and can be
distinguished from the signal subspace eigenvalues. The separation
becomes more pronounced as the number of samples used in the estimation
of Rxx increases (ideally reaches infinity).
44 | P a g e
16.
17. 3. Flowchart
This is the flowchart to guide the MATLAB code for calculating a
plotting the bit error probability for BPSK modulation over AWGN a
Rayleigh fading channels:
45 | P a g e
- Second signal from 15 degrees,
- Third signal from -30 degrees,
- Fourth signal from -75 degrees.
- Store these angles in a matrix `angs`.
46 | P a g e
- Label the axes and add a title to the plot.
- Enable the grid for better readability of the plot.
End of Algorithm
This algorithm provides an overview of setting up a ULA for DOA
estimation, computing the necessary covariance matrix, applying the
MUSIC algorithm, and visualizing the results. Each step is crucial for
understanding how the DOA estimations are derived from the given signals
and their directions.
47 | P a g e
18. Introduction
Conventional beamforming, also called classical beamforming, is the
easiest to understand. Conventional beamforming techniques include
delay-and-sum beamforming, phase-shift beamforming, subband
beamforming, and filter-and-sum beamforming. These beamformers are
similar because the weights and parameters that define the beampattern are
fixed and do not depend on the array input data. The weights are chosen to
produce a specified array response to the signals and interference in the
environment. A signal arriving at an array has different times of arrival at
each sensor. For example, plane waves arriving at a linear array have a time
delay that is a linear function of distance along the array. Delay-and-sum
beamforming compensates for these delays by applying a reverse delay to
each sensor. If the time delay is accurately computed, the signals from each
sensor add constructively.
Finding the compensating delay at each sensor requires accurate
knowledge of the sensor locations and signal direction. The delay-and-
sum beamformer can be implemented in the frequency domain or in the
time domain. When the signal is narrowband, time delay becomes a phase
shift in the frequency domain and is implement by multiplying each
sensor signal by a frequency-dependent compensatory phase shift. This
algorithm is implemented in the phased.PhaseShiftBeamformer. For
broadband signals, there are several approaches. One approach is to delay
the signal in time by a discrete number of samples. A problem with this
method is that the degree of resolution that you can distinguish is
determined by the sampling rate of your data, because you cannot resolve
delay differences less than the sampling interval. Because this technique
only works if the sampling rate is high, you must increase the sampling
frequency well beyond the Nyquist frequency so that the true delay is
very close to a sample time. A second method interpolates the signal
between samples. Time delay beamforming is implemented in
phased.TimeDelayBeamformer. A third method Fourier transforms the
signals to the frequency domain, applies a linear phase shift, and converts
the signal back into the time domain. Phase-shift beamforming is
performed at each frequency band Beamforming is not limited to plane
waves but can be applied even when there is wavefront curvature. In this
case, the source lies in the near field. Perhaps the term beamforming is no
48 | P a g e
longer appropriate. You can use the source-array geometry to compute the
phase shift for each point in space and then apply this phase shift at each
sensor element.
The advantage of a conventional beamformer is simplicity and ease of
implementation. Another advantage is its robustness against pointing errors
and signal direction errors. A disadvantage is its broad main lobe which
decreases resolution of closely spaced sources or targets. A second
disadvantage is that it has large sidelobes that allow interference sources to
leak into the main beam.
49 | P a g e
19. Laws and equations
Once the beamforming weight vector w is calculated, the response of this
spatial filter is represented by the antenna radiation pattern (beampattern)
for all directions, which is expressed as
P(θ) represents the average power of the spatial filter output when a single,
unitypower signal arrives from angle θ . With proper control of the magnitude and
phase in w, the pattern will exhibit a main beam in the direction of the desired
signal and, ideally, nulls toward the direction of the interfering signals.
In classical beamforming, the beamforming weight is set to be equal to the array
response vector of the desired signal. For any particular direction θ0, the antenna
pattern formed using the weight vector wb = a(θ0) has the maximum gain in this
direction compared to any other possible weight vector of the same magnitude.
This is accomplished because wb adjusts the phases of the incoming signals
arriving at each antenna element from a given direction θ0 so that they add in-
phase (or constructively). Because all the elements of the beamforming weight
vector are basically phase shifts with unity magnitude, the system is commonly
referred to as phased array. Mathematically, the desired response of the method
can be justified by the Cauchy–Schwartz inequality
for all vectors w, with equality holding if and only if w is proportional to a(θ0)
50 | P a g e
20. Flowchart
1. Initialization:
- Clear all previous MATLAB data and variables.
- Define system parameters including the number of sensors `M`,
spacing between sensors `spacing`, number of jammers `numjam`,
and the signal power levels in decibels.
2. Configuration:
- Calculate angles for the signal of interest and jammers in radians.
- Combine these angles into a single vector `angle`.
4. Covariance Matrices:
- Compute the interference covariance matrix `Rint` from the steering
vectors of the jammers and their respective power levels.
- Calculate the total covariance matrix `Rnoise` by adding the identity
matrix (representing white noise) to `Rint`.
6. Conventional Beamforming:
- Calculate the gain of the conventional beamformer across the 360-
degree range using the dot product of the steering vectors and the
vector for the signal of interest.
51 | P a g e
7. Optimal Wiener Filter Solution:
- Compute the Wiener filter weights by solving the Wiener-Hopf
equation using the total noise and interference covariance matrix and
the steering vector for the signal of interest.
- Calculate the gain of this optimal solution across the 360-degree range
in a similar manner to the conventional beamforming.
8. Plotting:
- Plot the frequency responses of both the conventional beamformer
and the Wiener solution to compare their performances.
- Mark the directions of the signal of interest and the jammers on the
plot for visual reference.
- Configure the plot with appropriate labels, legends, and axis limits.
End of Algorithm
52 | P a g e
53 | P a g e
21. THE MATLAB CODE
clear all
M = 6; % number of sensors
spacing = 1; % corresponds to lambda/2
numjam = 2; % number of jammers
numsigs = numjam + 1; % and one signal of interest
a = sqrt(0.5);
deg = pi/180; % degrees to radians conversions
angled = 30*deg; % desired signal angle-of-arrival (AoA); 0 assumes signal
comes from broadside
anglej = [-45 0]*deg; % jammer angles converted to radians
angle = [angled anglej]; % vector of all AoAs
sigpow = -10; % signal power [in dB]
jampow = [30 32 ]; % jammer powers [in dB]
% Generate steering vectors for each jammer
for p = 1:numjam
S(:,p) = exp(j*([0:M-1]'-(M-1)/2)*pi*spacing*sin(anglej(p)));
end
% Compute interference covariance matrix, i.e. jammers only
Rint = S*a*diag(10.^(jampow/10))*S';
% Compute total noise + interference covariance matrix
Rnoise = Rint + eye(M);
54 | P a g e
end
Commented [EZ1]:
Commented [EZ2]:
Commented [EZ3R2]:
Commented [EZ4R2]:
Commented [EZ5]:
Commented [EZ6R5]:
55 | P a g e