study conducted on robust adaptive mvdr beamforming for ... · study conducted on robust adaptive...

103
Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data Peng Seng Tan University of Kansas 2335 Irving Hill Road Lawrence, KS 66045-7612 http://cresis.ku.edu Technical Report CReSIS TR 157 2013

Upload: others

Post on 24-Jun-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data

Peng Seng Tan

University of Kansas 2335 Irving Hill Road

Lawrence, KS 66045-7612 http://cresis.ku.edu

Technical Report CReSIS TR 157

2013

Page 2: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Table of Contents

ii

TABLE OF CONTENTS

TABLE OF CONTENTS ......................................................................................................................................... ii LIST OF FIGURES ................................................................................................................................................. iii

1. INTRODUCTION ................................................................................................................................................. 1 2. DISCUSSION ON VARIOUS ADAPTIVE BEAMFORMERS .......................................................................... 4 3. DETAILS OF SIMULATION SETUP ................................................................................................................ 10 4. RESULTS OF SIMULATION ............................................................................................................................ 12 5. CONCLUSIONS ................................................................................................................................................. 23 6. LIST OF REFERENCES ..................................................................................................................................... 24 7. SIMULATION SOURCE CODES ...................................................................................................................... 25

Page 3: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report List of Figures

iii

LIST OF FIGURES

Fig 4.1: SINR versus SNR .................................................................................................................... 12

Fig 4.2: DOA for signal and interferers ............................................................................................ 13 Fig 4.3: Beam pattern computed at SNR = 30 dB .......................................................................... 13

Fig 4.4: SINRo versus number of snapshots for SNR = 10 dB .................................................. 15

Fig 4.5: Beam pattern computed at number of snapshots K = 500 .......................................... 16

Fig 4.6: SINR versus SNR for assumed DOA of signal at 0° ....................................................... 17

Fig 4.7: DOA for signal (assumed 0°, actual at 2°) and interferers ........................................... 17

Fig 4.8: Beam pattern computed at SNR = 30 dB for Part 2 ........................................................ 18 Fig 4.9: SINRo versus number of snapshots for SNR = 10 dB for Part 2 ................................ 19

Fig 4.10: Beam pattern computed at number of snapshots K = 500 for Part 2 ..................... 20

Fig 4.11: SINR versus SNR for Part 2 example 3 ........................................................................... 21

Fig 4.12: Beam pattern computed at SNR = 30 dB for Part 2 example 3 ................................. 21

Page 4: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Introduction

1

1. INTRODUCTION

In modern communication and radar applications, the deployment of array antennas has

become common. Due to the inherent nature of an array antenna, incoming signals received at

the antenna often undergo some form of spatial processing treatment in addition to the

traditional temporal processing chain. Taking advantage of the duality in nature between time-

frequency domain and spatial-frequency domain processing, many digital signal processing

techniques like Fourier Transform and Finite Impulse Response Filtering techniques have been

put to good use in extracting the desired information from the received signals. At the same

time, these temporal domain techniques are also used for the design and synthesis of the array

antenna beamforming techniques. This resulted in various array beamforming techniques like

the Dolph-Chebychev array processing, the Least Squares Error Pattern Synthesis technique

and Optimum Beamformers like the Minimum Variance Distortion Response (MVDR)

Beamformer and the Minimum Mean-Square Error (MMSE) Beamformer. The term “Optimum”

comes about because some optimization process occurs (i.e. minimization) to achieve some

desired criterion.

The MVDR and MMSE Beamformers can be very effective in extracting the desired signal data

from the received/measured signal that is often corrupted by noise and interfering data while

suppressing the undesirable interference and noise data at the same time. However, one main

drawback of these two Optimum Beamformers is that they assume the spatial spectral

covariance matrix, RX or Rn that contains the information of the interfering and noise data are

known beforehand so that the computation of either Rx-1 or Rn

-1 can be performed to obtain the

optimum weight vector to be applied to the array. In practice, the values of Rx-1 or Rn

-1 have to

be estimated from a finite amount of data collected by the array antennas and then used for the

computation of the required weight vectors. Thus, this gives rise to a class of Beamformers

known as Adaptive Beamformers that compute the estimations of Rx-1 or Rn

-1, i.e. 𝑅�𝑥−1 or 𝑅�𝑛−1

using the available measured data. Furthermore, in non-static signal environment, these

adaptive beamformers possess the capability to adjust the weight vectors so that the null

positions in the antenna pattern are able to correspond to the changing direction of the

interferers. An example of such an adaptive beamformer is the Sample Matrix Inversion (SMI) based MVDR.

Page 5: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Introduction

2

Despite the ability of the adaptive beamformers in overcoming the lack of information in the

actual RX or Rn, there are also issues that come about when using the estimated Rx-1 or Rn

-1.

Firstly, to ensure that performance will not degrade significantly when using 𝑅��𝑥−1 instead of Rx-1,

based on ref [1] and earlier studies, it is required that the number of array snapshot

measurements K have to be at least twice the number of array antennas N, for a performance

degradation that is within 3 dB of the optimum performance, i.e. K >= 2N. This condition is also

commonly known as the Reed-Mallett-Brennan (RMB) rule. Otherwise, when the number of

measurements K is less than the requirement stated above, it will result in a condition known as

sample starvation that will greatly degrade the result obtained. Secondly, in most applications,

the measured data consists of a mixture of both a desirable signal and the unwanted interferers

and noise. As such, the use of the measured data to compute 𝑅�𝑥−1 will result in a process

known as Covariance Matrix Contamination. In the event of a mismatch between the actual

direction of arrival (DOA) of the desired signal with that of the assumed DOA during the

computation of the adaptive weight vector, the outcome of using the contaminated 𝑅��𝑥−1 will

result in a phenomenon known as self-nulling. In layman terms, this describes the situation in

which the weight vector computed will also cancel out the desired signal from the array output in

addition to cancelling out the undesirable interferers and noise signals as the adaptive

beamformer has assumed that the actual signal is another interferer due to the DOA mismatch.

Note that other sources of signal mismatch that will result in the self-nulling phenomenon can

include inaccurate antenna calibrations and unknown signal wave-front distortions due to

environmental inhomogeneity etc. Also, in conjunction with the self-nulling phenomenon, when

the measurement sample size is small, covariance matrix contamination will also result in large

side-lobes in the array pattern of the adaptive beamformer.

In order to mitigate the undesirable effect due to covariance matrix contamination, Van Trees [1]

and others (e.g. [2]) have shown that to limit the performance degradation to be within 3 dB of

the optimal performance, the number of snapshots K will have to be greater than the value of

SINRopt(N-1) where SINRopt is the optimal Signal-Interference-Noise-Ratio (SINR) given by the

expression:

𝑆𝐼𝑁𝑅𝑜𝑝𝑡 = 𝜎𝑠2a𝑠𝐻𝑅𝑥−1𝑎𝑠 (1.1)

σs: Power of desired signal

as: Array steering vector of the DOA of the desired signal with size of N x 1

Page 6: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Introduction

3

The situation is worst for a desired signal with high SNR. For 𝑆𝐼𝑁𝑅𝑜𝑝𝑡 > N, it is shown by

Feldman and Griffiths that K must satisfy K >= N2. Next, another popular approach is the use of

the diagonal loading technique that is well described in ref [3] and ref [4]. This technique can be

viewed as the outcome of imposing a quadratic constraint on the weight vector obtained based

on some design parameter as described by ref [5] or as a means to regularize the solution of

the weight vector by adding a quadratic penalty term to the MVDR objective function of

minimizing the variance while not distorting the desired signal in the output. In fact, the diagonal

loading approach has been found to be so effective and popular that much literature has been

devoted to finding the optimal approach to implement the diagonal loading technique into the

adaptive beamformer. Also, in the literature, this technique is commonly referred to as the

Loaded Sample Matrix Inversion (LSMI) based MVDR. See references [6] to [10] for a sample

of some recent publications on this approach.

In Chapter 2 of this report, I will first highlight two adaptive beamformers from among those

reported in [6] to [10] that have the best performance based on simulation as reported in [10].

Next, I will discuss on the viability of modifying these two adaptive beamformers to improve their

performance when sufficient information about the direction of the interferers are known in

certain scenarios. In Chapter 3, details of the simulation setup for reproducing some results of

the two adaptive beamformers as reported in [10] as well as my subsequent adaptions will be

provided and the simulation results will be presented. In Chapter 4, the results that are obtained

for the various Adaptive Beamformers as well as my adaptations is shown and briefly

discussed. These results include the Beam Pattern obtained, the Signal-to-Interferer-and-Noise

Ratio (SINRo) at the array output of each Beamformer versus the SNR and the SINRo of each

beamformer versus the number of array measurement snapshots. Finally, in Chapter 5, a

conclusion drawn from the results obtained is provided.

Page 7: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Discussion on Various Adaptive Beamformers

4

2. DISCUSSION ON VARIOUS ADAPTIVE BEAMFORMERS

In Chapter 1, the advantages of the adaptive beamformers are briefly mentioned. In this

chapter, a more in-depth discussion of two recently developed adaptive beamformers will be

presented. To start off the discussion, it must be mentioned that the class of adaptive

beamformers can be subdivided into either Constrained Beamformers or Non-Constrained

Beamformers. In the sub-class of the Constrained Beamformers, the constraints can be further

divided into Linear Constraints (LC) or Quadratic Constraints (QC). For the two adaptive

beamformers that will be discussed, both fall under the category of quadratically constrained

beamformers. Note that in [11], it has been discussed on the use of quadratic constraints in

adaptive beamformers for the control of the mean-square error between the desired signal and

the actual response in the signal DOA. Also, the use of inequality constraint rather than an

equality constraint is meant to bound the maximum tolerable mean-square response error.

The 1st adaptive beamformer to be examined is known as the quadratically constrained robust

beamformer as described under [10]. This adaptive beamformer was developed with the

primary intention to mitigate the degradation of the MVDR beamformer in the event of a

mismatch between the actual direction of arrival (DOA) of the desired signal and the assumed

DOA of the same signal. To start, the beamformer seeks to provide robustness in the DOA of

the desired signal by specifying the criteria for achieving this robustness, namely to ensure that

the response from the weights of the beamformer should at least equal or exceed unity at a

range of DOAs of the desired signal. This requirement is as shown below:

min𝑤 𝑤𝐻𝑅�𝑦𝑤

subject to |𝑎𝑠𝐻(𝜃)𝑤 |2 ≥ 1 𝑓𝑜𝑟 𝜃1 ≤ 𝜃 ≤ 𝜃2 (2.1)

Note that θ1 ≤ θ ≤ θ2 are the lower and upper bounds of the mismatch in the DOA angle of the

actual signal. However, according to the author in [10], as the constraint in equation 2.1 does

not fit into any standard optimization methods, thus it has been loosened to a suboptimal

approximation from the original ideal constraint of |𝑎𝑠𝐻(𝜃)𝑤 |2 ≥ 1 for θ1 ≤ θ ≤ θ2 to just two

quadratic constraints at two DOA angles, denoted by θ1 and θ2, which, as mentioned above,

form the lower and upper bounds of the perceived actual signal DOA. Thus, the revised

optimization problem can be described as follows:

Page 8: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Discussion on Various Adaptive Beamformers

5

min𝑤 𝑤𝐻𝑅�𝑦𝑤

subject to |𝑎𝑠𝐻(𝜃1)𝑤 |2 ≥ 1 𝑎𝑛𝑑 |𝑎𝑠𝐻(𝜃2)𝑤 |2 ≥ 1 (2.2)

As the above formulation is a non-convex quadratic constraint, it is then redefined into another

equivalent form as follows:

min

𝑤,∅,𝜌0 ≥1,𝜌1 ≥1 𝑤𝐻𝑅�𝑦𝑤 subject to 𝑆𝐻𝑤 = � 𝜌0

𝜌1 𝑒𝑗∅� (2.3)

S: a matrix that is equal to [𝑎𝑠(𝜃1) 𝑎𝑠(𝜃2)]

ρ0, ρ1, φ: Real valued numbers

After dividing the above optimization problem into two parts and solving it part by part by using

the Karush-Kuhn-Tucker (KKT) condition on the 2nd part, the solution of equation 2.3 is obtained

in [10] and is as shown by the steps below:

Algorithm 1

Given θ1, θ2 and 𝐑�𝐲, compute wo by the following steps:

1. S ← [𝑎𝑠(𝜃1) 𝑎𝑠(𝜃2)]

2. V ← (𝐑�𝐲)-1S

3. R ≜ � 𝒓𝟎𝒓𝟐𝒆−𝒋𝜷

𝒓𝟐𝒆𝒋𝜷𝒓𝟏

� ← (𝐒𝑯𝐕)−𝟏

4. φ ← -β + π

a. 𝑝0 ← �1, 𝑟2

𝑟0 ≤ 1

𝑟2𝑟0

, 𝑟2𝑟0

> 1

b. 𝑝1 ← �1, 𝑟2

𝑟1 ≤ 1

𝑟2𝑟1

, 𝑟2𝑟1

> 1

5. 𝑤0 ← 𝐕𝐑� 𝜌0𝜌1 𝑒

𝑗∅�

Page 9: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Discussion on Various Adaptive Beamformers

6

However, the author of [10] observes that there are instances in which the above solution does

not guarantee satisfying the original ideal constraint of |𝑎𝑠𝐻(𝜃)𝑤 |2 ≥ 1 for θ1 ≤ θ ≤ θ2 at all times,

especially in instances where the desired signal of interest has high SNR. Fortunately, by

diagonal loading the sample covariance matrix Ry, the above solution will be able to meet the

original ideal constraint. Thus, Algorithm 1 was revised to include the additional steps as shown

below:

Algorithm 2

Given θ1, θ2 and 𝐑�𝐲, an initial value of γ, a search step size α > 1, and a set of angles ζi, i =

1,2,…,n, which satisfies θ1 ≤ ζi ≤ θ2 for all i, compute wγ by the following steps:

1. 𝐑�𝐲 ← 𝐑�𝐲 + γIN

2. Compute wγ by the Algorithm 1

3. If �𝑎𝑠𝐻(𝜍𝑖)𝑤𝛾 � ≥ 1 for all i = 1,2,…,n then stop, else γ ← αγ, and go to step 1 again

Note that the solution of wγ is similar to that of a Linearly Constrained Minimum Variance

(LCMV) beamformer with two directional constraints around the DOA of the desired signal cum

diagonal loading but with an optimized vector � 𝜌0𝜌1 𝑒

𝑗∅� instead of just �11�. Also, for this report, the

nomenclature of 𝑤�𝑟𝑜𝑏1 will be given to the 1st robust adaptive beamformer.

The 2nd adaptive beamformer to be examined is known as the robust adaptive beamformer

based on general-rank method as proposed by Shahram Shahbazpanahi in [7]. In his

adaptation, the steering vector of the desired signal is assumed to behave as a random vector

that can be described by the covariance matrix Rs which can contain a matrix rank of greater

than 1, hence the term general-rank method. As there is always uncertainty in obtaining the

actual value of Rs, this uncertainty or mismatch is modeled as an error matrix ∆1. For example,

for a rank-one signal source where Rs = asasH, the mismatch can be in the actual direction of

arrival of the desired signal source that is denoted by the array steering vector as. At the same

time, the uncertainty in the sample covariance matrix 𝐑�𝐲 is represented by a 2nd error matrix ∆2.

This error matrix can be viewed as taking into account all non-ideal conditions like data

nonstationarity, small training sample size and quantization errors etc. As such, the constrained

minimization problem for the 2nd adaptive beamformer can be constructed as follows:

Page 10: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Discussion on Various Adaptive Beamformers

7

min𝑤 max

‖∆2‖𝐹≤𝛾𝑤𝐻�𝑅�𝑦 + ∆2�𝑤

subject to 𝑤𝐻(𝑅𝑠 + ∆1)𝑤 ≥ 1 ∀ ∆1 𝑠. 𝑡. ‖∆1‖𝐹 ≤ ∈ 2.4)

‖∆‖𝐹: The Frobenius norm of the matrix ∆

ε, γ: Some known positive valued constants which are the upper bounds of the Frobenius norms

of the two error matrices.

In [7], it was shown that the above optimization problem possesses an elegant closed-form

solution which is expressed by the following:

𝑤�𝑟𝑜𝑏2 = 𝑃 ��𝑅�𝑦 + 𝛾𝐈𝑵�−1(𝑅𝑠 − 𝜀𝐈𝑵)� (2.5)

In equation 2.5, the operator P{A} represents the eigenvector corresponding to the largest

eigenvalue of the matrix A. Also, from the expression of this robust beamformer weight vector

𝑤�𝑟𝑜𝑏2, it can be viewed as an extension to the traditional MVDR beamformer with diagonal

loading where a mixture of both positive and negative diagonal loading is used instead.

At this point, the highlight on the two adaptive/robust beamformers that possess the best

performance as reported in [10] has been completed. Besides having similar characteristics

such as quadratic constraints and diagonal loading, both robust beamformers were designed

with the primary objective of mitigating the degradation of performance due to a mismatch in the

DOA of the desired signal. As such, no additional attention/effort was devoted to the

cancellation of interferers other than the use of the inverse of the sample covariance matrix, i.e.

𝐑�𝐲, to perform the cancellation/suppression etc.

Now, in some application scenarios, prior information about the location of the interfering signals

at the antenna array may be available for these interferers. An example is the measurement of

the thickness of the ice glaciers/depth of the bedrocks beneath the ice sheets by the use of a

Radar Depth Sounder (RDS) mounted on an airborne platform and transmitting the radar

signal directly into the ice sheet in the nadir direction. In such type of application, it is

understood that the desired signal will be the backscattered return (after penetrating through the

ice sheet) from the internal layers and the bottom of the ice sheet. At the same time, the returns

Page 11: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Discussion on Various Adaptive Beamformers

8

from the surface of the ice sheet will constitute the strongest interfering signals measured at the

receiving array antennas since there will be much less attenuation of the radar signal while

travelling through the air medium. However, as information about the trajectory and surface

elevation are generally available, it is possible to compute the DOA of the dominant surface

radar returns via geometry. With the knowledge of the DOA of the surface interfering signals at

the left/right side of the nadir direction, it will then be feasible to construct filters to null out these

interferers from the measured return signals. This treatment will neglect, for the time being, the

effects of mutual coupling and other array imperfections on the estimation of the clutter’s

steering vectors.

With the assumption of the availability of prior knowledge of the DOA of dominant interferers in

place, the next step in the study of robust beamformers will be to implement some linear

constraints onto the two robust beamformers highlighted in this Chapter with the intention to

further remove the presence of the interferers from the measurements.

By adopting the approach of forming linear constraints based on the interferers’ location, the 3rd

adaptive beamformer to be discussed will be the expansion of the 1st robust beamformer 𝑤�𝑟𝑜𝑏1

to include these additional constraints. As mentioned previously, the final form of 𝑤�𝑟𝑜𝑏1

resembles that of a LCMV beamformer with two directional constraints. As such, it will not be

an issue to insert the constraints for the interferers to 𝑤�𝑟𝑜𝑏1 accordingly. The final form of the

expanded 𝑤�𝑟𝑜𝑏1, which I term 𝑤�𝑟𝑜𝑏1𝑙𝑐𝑚𝑣 is as shown in equation 2.6 below:

𝑤𝑟𝑜𝑏1𝑙𝑐𝑚𝑣� = 𝐕𝟏𝐑𝟏 �𝜌0

𝜌1 𝑒𝑗∅00

� (2.6)

R1 ≜ �𝐒𝟏𝑯𝐕𝟏�−𝟏

V1 = (𝐑�𝐲 + γIN)-1S1

S1 ← [𝑎𝑠(𝜃1) 𝑎𝑠(𝜃2) 𝑎𝑠(𝜃𝑖1) 𝑎𝑠(𝜃𝑖2)]

Next, the 4th and last adaptive beamformer that will be discussed will be the addition of linear

constraints to the 2nd robust beamformer 𝑤�𝑟𝑜𝑏2, which I term this 4th beamformer as 𝑤�𝑟𝑜𝑏2𝑙𝑐𝑚𝑣.

As a start, let’s define the DOA of the two dominant surface interferers as θi1 and θi2. Next, we

can construct a constraint matrix C that contains the array steering vectors of these two angles.

Page 12: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Discussion on Various Adaptive Beamformers

9

By using the optimization steps as highlighted in [12], we can obtain the desired beamformer

accordingly and the final form of the desired weight vector is as shown in equation 2.6:

𝑤𝐻�𝑟𝑜𝑏2𝑙𝑐𝑚𝑣 = 𝑤�𝐻𝑟𝑜𝑏2�𝐈𝐍 − C[CHC]−1CH�

= 𝑤�𝐻𝑟𝑜𝑏2(𝐈𝐍 − PC) (2.6)

C: a matrix that is equal to [𝑎𝑠(𝜃𝑖1) 𝑎𝑠(𝜃𝑖2)]

PC: a projection matrix of the constraint subspace formed using the constraint matrix C

Thus, from equation 2.6 above, it can be seen that the additional computation to obtain the 4th

robust beamformer 𝑤�𝑟𝑜𝑏2𝑙𝑐𝑚𝑣 is minimal once the constraint matrix C is determined for each

depth measurement using the RDS.

Finally, the expression for the weight vector of the Capon MVDR beamformer is provided below

for reference. Note that for the optimum MVDR beamformer, there is no mismatch in the DOA

of the desired signal (θm ) and there is also perfect knowledge of the actual spectral covariance

matrix Ry. Also, the result obtained from using this ideal MVDR beamformer will be used as the

baseline for all performance comparisons in all the simulation scenarios to be described in the

next chapter.

𝑤𝑚𝑣𝑑𝑟 = 𝑅𝑦−1𝑎𝑠(𝜃𝑚)𝑎𝑠𝐻(𝜃𝑚)𝑅𝑦−1𝑎𝑠(𝜃𝑚)

(2.7)

Page 13: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Details of Simulation Setup

10

3. DETAILS OF SIMULATION SETUP

In order to compare the performance of each of the adaptive beamformers with the optimum

MVDR beamformer, a simulation using the MATLAB software is carried out and the simulation

is carried out in 2 parts. In part 1 of the simulation, the purpose is to recreate some of the

simulation examples as described in [10] when there is a mismatch of 2° between the desired

signal DOA and the actual signal DOA. Also, both the desired signal and the interferers are

modeled as narrowband sinusoidal signals in the time domain. This part serves to verify the

implementation aspects of the 1st and 2nd robust beamformers as described in Chapter 2 and

[10]. Next, in part 2 of the simulation, the scenario will change to that of having a desired signal

arriving at the NADIR direction with two dominant interferers located at the left and right side of

the NADIR direction. This change in the scenario setup is meant to represent some aspect of

the actual scenario that is encountered by a RDS for ice thickness measurement. Also in part 2,

an extra example scenario will be simulated for the case of a lesser number of array antenna

elements and available snapshots.

Next, the details of the simulation parameters for both Part 1 and Part 2 scenarios are specified

below:

Part 1 Simulation Setup

• Actual signal direction of arrival at θS = 43°

• Assumed signal direction of arrival at θm = 45°

• θ1 = 42° and θ2 = 48° to be used for the 1st and 3rd robust beamformers

• θi1 and θi2 (Interferers) direction of arrival at [30°,75°]

• SNR varying from -20 dB to 30 dB and INR at [40dB, 20dB]

• Desired signal digital normalized angular frequency at [0.2π]

• 2 Interferers’ digital normalized angular frequencies at [0.3π, 0.1π]

• Number of array elements N = 10 for a ULA

• Number of snapshots K fixed at 20*N for 1st example (to ensure K > N2) and varies from 2*N

to 50*N for 2nd example

• Diagonal loading factor γ = 10 dB

• Negative Diagonal loading factor ε = 1.95 and 4.7345 for example 1 and example 2

scenarios

Page 14: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Details of Simulation Setup

11

• Number of simulation runs for averaging each result = 100

Part 2 Simulation Setup

• Actual signal direction of arrival at θS = 2°

• Assumed signal direction of arrival at θm = 0°

• θ1 = -3° and θ2 = 3° to be used for the 1st and 3rd robust beamformers

• θi1 and θi2 (Interferers) direction of arrival at [-60°,60°]

• SNR varying from -20 dB to 30 dB and INR at [40dB, 20dB]

• Desired signal digital normalized angular frequency at [0.2π]

• 2 Interferers’ digital normalized angular frequencies at [0.3π, 0.1π]

• Number of array elements N = 10 for a ULA for 1st and 2nd example scenarios

• Number of array elements N = 6 for a ULA for 3rd example scenarios

• Number of snapshots K fixed at 20*N for 1st example and N2 for 3rd example and varies from

2*N to 50*N for 2nd example

• Diagonal loading factor γ = 10 dB

• Negative Diagonal loading factor ε = 4.7345 for example 1-2 scenarios and ε = 3.0473 for

example 3 scenario.

• Number of simulation runs for averaging each result = 100

Page 15: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Results of Simulation

12

4. RESULTS OF SIMULATION

In this chapter, the results obtained from Part 1 and Part 2 of the simulations are as shown. In the 1st

example scenario of part 1, its aim is to recreate the example scenario described in example 2 of [10]

which is a plot of the output SINRo of the various beamformers versus that of the desired signal SNR.

Note that the General-rank beamformer in [10] is equivalent to the 2nd robust beamformer in this report

and the Algorithm 2 beamformer in [10] is equivalent to the 1st robust beamformer in this report. Along

with the SINRo versus SNR plot, the beam patterns obtained at the last point of this plot as well as the

MVDR power spectrum of both the desired signal and interferers are shown as well.

Part 1 Example 1

Fig 4.1: SINR versus SNR

Page 16: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Results of Simulation

13

Fig 4.2: DOA for signal and interferers

Fig 4.3: Beam pattern computed at SNR = 30 dB

Page 17: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Results of Simulation

14

Now, in order to obtain a more meaningful result for each plot, the result of each point in figure 4.1 is

based on an average of 100 independent runs with the Gaussian noise independently generated within

each run. Also, the beam pattern for each beamformer is plotted across the θ space of ±90°.

From figure 4.1, it is observed that only the 1st robust beamformer with additional LCMV constraints is

able to closely follow the SINRo value of the ideal MVDR beamformer at each SNR value. As for the 2nd

best performing beamformer, it is still the 1st robust beamformer that was originally developed in [10]. An

illustration of the SINRo results for all the beamformers shown in figure 4.1 is as shown in table 4.1

below:

Table 4.1: Tabulation of SINRo versus SNR

Types of BF

SNR (dB) -20 -15 -10 -5 0 5 10 15 20 25 30

Ideal -10.3 -5.3 -0.3 4.69 9.69 14.69 19.69 24.69 29.69 34.69 39.69

SMI MVDR -10.46 -5.54 -0.87 2.80 2.97 -0.55 -5.24 -10.14 -14.83 -20.37 -24.63

LSMI -10.46 -5.47 -0.49 4.45 9.21 13.06 13.63 10.34 5.72 0.76 -4.15

Rob BF1 -10.38 -5.38 -0.38 4.62 9.59 14.57 19.52 24.27 28.02 30.39 33.56

Rob BF2 -10.48 -5.48 -0.50 4.45 9.27 13.71 17.35 20.47 24.23 26.71 25.71

Rob BF1

with lcmv -10.38 -5.38 -0.37 4.62 9.62 14.57 19.58 24.57 29.58 34.59 39.57

Rob BF2

with lcmv -10.45 -5.45 -0.47 4.49 9.29 13.72 17.36 20.55 24.63 29.23 34.13

In order to gain insights into the results tabulated under table 4.1, we will have to examine the plot as

shown in figure 4.3. By examining figure 4.3, it is observed that the SMI and LSMI MVDR beamformer

places a null at the actual DOA of the desired signal at 43° as they are treating it as another interferer

since the assumed signal DOA is at 45°. Note again that this phenomenon is known as self-nulling. As

for both variants of the robust beamformer 2, a check on the plot in figure 4.3 reveals that there is a shift

of the beam pattern distortion-less response from 43° to 52.38° which is due to the inability of these

beamformers to maintain the robustness performance against slight DOA mismatch at high SNR values.

Finally, for both variants of the robust beamformer 1, the beam pattern generated is still able to maintain

the distortion-less response at 44.91° that is close to the DOA of 45° for which these two beamformers

are designed for so as to cater for mismatch in the actual signal DOA.

Page 18: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Results of Simulation

15

Next, in the 2nd example scenario of part 1, its aim is to recreate the example scenario described in

example 4 of [10] which is a plot of the output SINRo of the various beamformers versus that of the

number of array measurement snapshots while the desired signal SNR is maintained at 10 dB.

Part 1 Example 2

Fig 4.4: SINRo versus number of snapshots for SNR = 10 dB

Page 19: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Results of Simulation

16

Fig 4.5: Beam pattern computed at number of snapshots K = 500

From figure 4.4, it can be seen that both SMI and LSMI beamformers are still unable to converge to the

ideal MVDR beamformer even at high values of K. A check with figure 4.5 reveals that the SMI

beamformer still places a null at the location of the actual signal DOA even when K is high whereas there

is still a shift of the distortion-less response of the LSMI beamformer from the actual DOA of 43° to

52.65°. As for the other 4 robust beamformers, their performance are quite close to the ideal

beamformer once K ≥ N2, i.e. K ≥ 100. Also, it is noted that although the steady state SINRo values as

shown in figure 4.4 is better than that as shown in example 5 of [10], it is nevertheless consistent with the

results that is shown in the 2nd example in [7]. The discrepancy may be due to a different choice of the

Ry used in computing the SINRo values for each beamformer between the author in [10] and myself.

At this point in point, from the results obtained in both example 1 and 2 of Part 1, it has been verified that

the implementation of the 1st and 2nd adaptive beamformers as described in [10] is correct. As such, Part

2 of the simulation will then be carried out as its scenario is much closer to the application of measuring

ice thickness over ice glaciers/sheets using a radar depth sounder.

Next, the results obtained for the 3 example scenarios in Part 2 are shown and discussed in the

subsequent pages. Note that both example 1 and 2 scenarios in Part 2 are just a repeat of that in Part 1

but with new directions of arrival of signals/interferers as listed in the Part 2 simulation setup.

Page 20: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Results of Simulation

17

Part 2 Example 1:

Fig 4.6: SINR versus SNR for assumed DOA of signal at 0°

Fig 4.7: DOA for signal (assumed 0°, actual at 2°) and interferers

Page 21: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Results of Simulation

18

Fig 4.8: Beam pattern computed at SNR = 30 dB for Part 2

From figure 4.6, it is again observed that the 1st robust beamformer with additional LCMV constraints is

still the overall best performer among the six beamformers. As for the 2nd best performing beamformer, it

is a tie between the 1st robust beamformer (at low to moderate SNR) and the 2nd robust beamformer with

additional LCMV constraints (at highest SNR). An illustration of the SINRo results for all the

beamformers shown in figure 4.6 is as shown in table 4.2 below:

Table 4.2: Tabulation of SINRo versus SNR for Part 2 Example 1

Types of BF

SNR (dB)

-20 -15 -10 -5 0 5 10 15 20 25 30

Ideal -10.048 -5.048 -0.048 4.95 9.95 14.95 19.95 24.95 29.95 34.95 39.95

SMI MVDR -10.56 -5.76 -1.58 0.46 -1.47 -5.62 -10.22 -15.21 -19.83 -24.43 -31.24

LSMI -10.49 -5.50 -0.56 4.26 8.56 10.88 9.39 5.35 0.64 -4.25 -9.39

Rob BF1 -10.49 -5.54 -0.50 4.47 9.23 14.36 19.11 24.28 28.69 33.49 33.91

Rob BF2 -10.48 -5.49 -0.52 4.40 9.20 13.82 18.39 23.09 27.69 30.56 29.04

Rob BF1

with lcmv -10.49 -5.49 -0.50 4.47 9.24 14.37 19.24 24.35 29.39 34.25 39.34

Page 22: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Results of Simulation

19

Types of BF

SNR (dB)

-20 -15 -10 -5 0 5 10 15 20 25 30

Rob BF2

with lcmv -10.48 -5.49 -0.52 4.41 9.20 13.82 18.40 23.14 28.03 32.99 37.98

Again, by examining figure 4.8, it is observed that both SMI and LSMI MVDR beamformers still place a

null at the actual DOA of the desired signal at 2° as they are treating it as another interferer since the

assumed signal DOA is at 0°. As for both variants of the robust beamformer 2, a check on the plot in

figure 4.8 reveals that the beam pattern distortion-less response is shifted to -2.07° at high SNR values

which is still acceptably close to the actual DOA of 2°. Finally, for both variants of the robust beamformer

1, even at high SNR, the beam pattern generated has maintained the distortion-less response at 0° for

which they are designed for.

Next, in the example 2 scenario of part 2, the aim is to check for any variation in the convergence of the

SINRo versus number of snapshots as compared to the example 2 scenario of part 1.

Part 2 Example 2

Fig 4.9: SINRo versus number of snapshots for SNR = 10 dB for Part 2

Page 23: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Results of Simulation

20

Fig 4.10: Beam pattern computed at number of snapshots K = 500 for Part 2

As in the part 1 scenario, for part 2 scenario, both SMI and LSMI beamformers are still unable to

converge to the optimum SINRo value even at high values of K. As for the other adaptive beamformers,

convergence is fast once the Feldman and Griffiths rule has been adhered to.

At this point, it will seem that the both the 1st adaptive beamformer and its variant with additional LCMV

constraints, namely the 3rd adaptive beamformer, seems to have the best performance in all the example

scenarios above. As an additional test, the 3rd example scenario is introduced in Part 2 in which there is

now a lesser number of array antennas, N = 6 (similar to MCORDS for Twin Otter) instead of 8, and the

number of array snapshots is equal to N2 which should be sufficient to prevent the situation of sample

starvation from occurring in theory. With these new parameter values, results obtained are shown and

discussed in the subsequent pages.

Page 24: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Results of Simulation

21

Part 2 Example 3

Fig 4.11: SINR versus SNR for Part 2 example 3

Fig 4.12: Beam pattern computed at SNR = 30 dB for Part 2 example 3

Page 25: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Results of Simulation

22

By examining the plot in figure 4.11, it can be seen that both the 1st adaptive beamformer degrades

substantially in its performance at even moderate SNR whereas the 2nd adaptive beamformer completely

breaks down at moderate SNR. A closer examination of figure 4.12 will reveal the reason for the huge

degradation for these two beamformers. For the 1st adaptive beamformer, it is unable to cancel out the

two interferers at ±60° as there are no nulls in the beam pattern at these 2 locations. As for the 2nd

adaptive beamformer, it is even unable to maintain the distortion-less response at the assumed signal

DOA of 0° and there are also no nulls at the locations of the interferers as well. However, for the 3rd and

4th beamformers, as it contains LCMV constraints with regards to the interferers, both beamformers are

able to maintain their excellent performance even in the situation of lesser antenna and finite sample

number of measurements. In fact, simulation results have shown that the performance of the 3rd and 4th

beamformers will not degrade even when the number of measurement snapshots is just equal to 2*N.

Page 26: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Conclusions

23

5. CONCLUSIONS

From the simulation results obtained in Chapter 4, it is again proven that the SMI/LSMI

Beamformers are not effective in the presence of DOA mismatch of the desired signal especially

at high SNR values. As for the class of robust beamformers, it is also observed that by

providing robustness against mismatch in the desired signal during the design of these robust

beamformers, it may be sufficient to maintain good performance in most situations. However, in

situations in which there are limitations in the number of available array antennas and

measurement snapshots, having prior knowledge of the interferer’s behavior will be essential as

this knowledge/information can be used to design additional constrains in the beamformers to

effectively cancel out the contributions in the return signal by the interferers.

Coming back to the current MVDR implementation in the CReSIS toolkit, it is based on the SMI

implementation with the value of K < 2*N in many cases. Also, the configuration of the antenna

array is considered 2-dimensional as the antennas locations contain both y and z axis

components. As the SNR of the MCORDs radar, in some cases, is much higher than 20 dB, it

will be feasible to consider the implementation of the 2-D version of the 1st and 3rd adaptive

beamformers into the CReSIS toolkit so as to quantify their performance against actual

measurement data.

Page 27: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report References

24

6. LIST OF REFERENCES

[1] Harry L. Van Trees, “Optimum Array Processing”, John Wiley and Sons Inc, 2002, pages

731 to 738

[2] YingBo Hua, Alex B. Gershman, Qi Cheng, “High-Resolution and Robust Signal

Processing”, 2004, pages 63 to 69

[3] H. Cox, R. M. Zeskind, M. H. Owen, “Robust Adaptive Beamforming”, IEEE Transaction

on Acoustic, Speech and Signal Processing, vol 35, pages 1365-1376, Oct 1987

[4] B. D. Carlson, “Covariance matrix estimation errors and diagonal loading in adaptive

arrays”, IEEE Transactions on Aerospace and Electronic Systems, vol 24, pages 397-

401, July 1988

[5] Harry L. Van Trees, “Optimum Array Processing”, John Wiley and Sons Inc, 2002, pages

505 to 510

[6] Jian Li, Petre Stocia and Zhisong Wang, “On Robust Capon Beamforming and Diagonal

Loading”, ”, IEEE Transactions on Signal Processing, vol 51, pages 1702-1714, July

2003

[7] Shahram Shahbazpanahi, Alex B. Gershman, Zhi-Quan Luo, Kon Max Wong, “Robust

Adaptive Beamforming for General-Rank Signal Models”, IEEE Transactions on Signal

Processing, vol 51, pages 2257-2269, Sept 2003

[8] Sergiy A. Vorobyov, Alex B. Gershman, Zhi-Quan Luo, Ning Ma, “Adaptive Beamforming

with Joint Robustness against Mismatched Signal Steering Vector and Interference

Nonstationarity”, IEEE Signal Processing Letters, vol 11, pages 108-111, Feb 2004

[9] Robert G. Lorenz, Stephen P. Boyd, “Robust Minimum Variance Beamforming”, IEEE

Transactions on Signal Processing, vol 53, pages 1684-1696, May 2005

[10] Chun-Yang Chen, P. P. Vaidyanathan, “Quadratically Constrained Beamforming Robust

Against Direction-of-Arrival Mismatch”, ”, IEEE Transactions on Signal Processing, vol

55, pages 4139-4150, Aug 2007

[11] Barry D. Van Veen, “Minimum Variance Beamforming with Soft Response Constraints”,

IEEE Transactions on Signal Processing, vol 39, pages 1964-1972, Sept 1991

[12] Harry L. Van Trees, “Optimum Array Processing”, John Wiley and Sons Inc, 2002, pages

169 to 170

Page 28: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

25

7. SIMULATION SOURCE CODES

Part 1 Example 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Simulation for Robust MVDR investigation

%

% Investigate for the following

% 1) Diagonal Loading

% 2) Robust MVDR (Rob MVDR1) Implementation as described in Ref[1]

% 3) Robust MVDR (Rob MVDR2) Implementation as described in Ref[2]

% 4) LCMV adaptations on the locations of interferers for both Rob MVDR1

% and Rob MVDR1

%

% Scenario 1: SNR = -20 to 30 dB, UI1 = 30 deg, INR1 = 40dB, UI2 = 75 deg, INR2 = 20dB

%

% Written By Peng Seng Tan

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear all

% close all

pack

clc

N = 10;%10; % Num of array elements

rng('default');

fb_averaging = 0; % To enable/disable forward backward averaging

overlap = 2; % Set value to 0, 1 or 2

if (overlap == 0) % The subarrays are non overlapping

if rem(N,5) == 0

N_sub = 5;

elseif rem(N,4) == 0

N_sub = 4;

elseif rem(N,3) == 0

N_sub = 3;

elseif rem(N,2) == 0

N_sub = 2;

else

N_sub = N;

end

num_sub_aperture = round(N/N_sub); % Number of subarrays

elseif (overlap == 1) % The subarrays are overlapping

N_sub = 4;

overlap = 6;

Page 29: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

26

num_sub_aperture = fix((N-overlap)/(N_sub-overlap));

else % No subarrays implemented

N_sub = N;

num_sub_aperture = round(N/N_sub); % Number of subarrays

end

d = 0.5; % D = 0.5*wavelength

n = ceil(-(N-1)/2:(N)/2)';

n_sub = ceil(-(N_sub-1)/2:(N_sub)/2)';

data_len = round(20*N); % Number of measured snapshots in time

theta = pi*(-0.5:0.0005:0.5); % Visible Theta space with convention of broadside = 0 degrees

vv = exp(1i*n*pi*sin(theta)); % Array manifold of steering vectors

vv_sub = exp(1i*n_sub*pi*sin(theta)); % Array manifold of SV (sub_apert)

theta_c = 1/180*pi*45;%0; % Desired signal direction in radians

theta_s = 1/180*pi*[45 43];%[0 2.0]; % Actual signal direction in radians

theta_inter = 1/180*pi*[30 75]; % Direction of Interferers in radians

% theta_inter = 1/180*pi*[-52 57]; % Direction of Interferers in radians

% Section for Robust MVDR ver 1

angle_constraint = 3.0;%3.0;

angle_left = 1/180*pi*(-angle_constraint); % -angle_constraint degrees

angle_right = 1/180*pi*(angle_constraint); % +angle_constraint degrees

theta_left = theta_c + angle_left;

theta_right = theta_c + angle_right;

num_verify_angles = 5;

angle_verify = linspace(theta_left,theta_right,num_verify_angles);

gamma_gain = 2.0; %1.1;

% Creating the Array steering vectors

dir_sv1 = exp(1i*pi*n*sin(theta_left));

dir_sv2 = exp(1i*pi*n*sin(theta_right));

dir_sv_verify = zeros(N_sub,num_verify_angles);

for num = 1:num_verify_angles

dir_sv_verify(:,num) = exp(1i*pi*n*sin(angle_verify(num)));

end

% End of section for Robust MVDR ver 1

% Section for robust MVDR ver 2

% eps_loading = round(N_sub/2);

eps_loading = 1.95;%3.0473;%4.7345; % Value is obtained from Ref[1]

% End of section for Robust MVDR ver 2

% Creating the Array steering vectors of signal and interferers

vc = exp(1i*pi*n*sin(theta_c)); % Steering vector of desired signal

Page 30: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

27

vc_sub = exp(1i*pi*n_sub*sin(theta_c)); % SV of desired signal (sub_aperture)

vs = exp(1i*pi*n*sin(theta_s)); % Steering vector of actual signal

v1 = exp(1i*n*pi*sin(theta_inter(1))); % Steering vector of interferer 1

v2 = exp(1i*n*pi*sin(theta_inter(2))); % Steering vector of interferer 2

VI = [v1 v2]; % Matrix of Steering vectors of Interferers

% wj = [0.6*pi 0.5*pi]; % Normalized Elect angular freq of Interferers (sinusoids)

wj = [0.30*pi 0.10*pi]; % Normalized Elect angular freq of Interferers (sinusoids)

wsig = 0.2*pi; % Normalized Elect angular freq of actual signal (sinusoid)

%Defining the Signal and Interferers power

SNR_vector = 10.^([-20 -15 -10 -5 0 5 10 15 20 25 30]/10);

INR = 10.^([40 20]/10);

load_factor = 10;%10;

num_runs = 100;%200; % Set the number of trial runs

for j = 1:length(SNR_vector)

SNR = SNR_vector(j);

% Initialise the average weight vectors

w_mvdr1_avg = zeros(N,1);

w_mvdr1_sub_avg = zeros(N_sub,1);

w_mvdr1_dl_avg = zeros(N,1);

w_mvdr1_sub_dl_avg = zeros(N_sub,1);

w_mvdr2_avg = zeros(N,1);

w_mvdr2_sub_avg = zeros(N_sub,1);

w_mvdr2_dl_avg = zeros(N,1);

w_mvdr2_sub_dl_avg = zeros(N_sub,1);

w_mvdr1_r1_dl_avg = zeros(N,1);

w_mvdr2_r1_dl_avg = zeros(N,1);

w_mvdr1_r2_dl_avg = zeros(N,1);

w_mvdr2_r2_dl_avg = zeros(N,1);

w_mvdr1_r1_lcmv_dl_avg = zeros(N,1);

w_mvdr2_r1_lcmv_dl_avg = zeros(N,1);

w_mvdr1_r2_lcmv_dl_avg = zeros(N,1);

w_mvdr2_r2_lcmv_dl_avg = zeros(N,1);

for k = 1:num_runs

Page 31: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

28

% This section is for signal and interferers generation

%Generate the White Gaussian Noise signal

noise = (1/sqrt(2))*randn(1,data_len*N) + 1i*(1/sqrt(2))*randn(1,data_len*N);

%Generate a Sinusoidal desired signal

signal = sqrt(SNR*var(noise))*exp(-1i*wsig*[1:data_len]);

% %Generate a AutoRegressive signal with order 2

% a1 = 1.9114; % Coefficient 1 of 2nd order Autoregressive model

% a2 = -0.95; % Coefficient 2 of 2nd order Autoregressive model

% order_ar = length([a1 a2]);

% signal = zeros(1,data_len+2);

%

% for i=3:data_len+2

% signal(i) = noise(i) + a1*signal(i-1) + a2*signal(i-2);

% end

% signal = signal(3:end);

% signal = sqrt(SNR*var(noise)/var(signal))*signal; %Make SNR to be 0dB

% Generation of Interferer signals

inter_1 = sqrt(INR(1)*var(noise))*exp(-1i*wj(1)*(1:data_len));

inter_2 = sqrt(INR(2)*var(noise))*exp(-1i*wj(2)*(1:data_len));

num_interferer = 2;

% %Start of Debug Section

% inter_total = inter_1 + inter_2 + noise(1:data_len); %Total Interfering signals + noise

% % inter_total = inter_1 + inter_2; %Total Interfering signals

%

% column_len = min(50,round(0.25*data_len));

% num_col_x = data_len-column_len;

%

% x1 = zeros(column_len,num_col_x);

% y1 = zeros(column_len,num_col_x);

%

% for i=1:num_col_x

% x1(:,i) = signal(i:i+column_len-1);

% y1(:,i) = inter_total(i:i+column_len-1);

% end

%

% x1 = flipud(x1);

% y1 = flipud(y1);

%

% Rxx_test = 1/num_col_x*(x1*x1'); %Autocorrelation matrix of signal

% Ryy_test = 1/num_col_x*(y1*y1'); %Autocorrelation matrix of interferers

Page 32: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

29

%

% %Define num of frequency samples

% up_factor = 20; %Frequency oversampling factor

% freq_samp = up_factor*column_len; %Use freq_samp number of frequency bins

% u = -1.0+(1/freq_samp):1/freq_samp:1.0; %Normalised freq location for each freq sample

%

% %Create the array manifold vector for length(u) number of freq samples

% n_test = (0:column_len-1)'; %Assume ULA locations at lambda/2 spacing

% vv_test = exp(1i*n_test*pi*u);

%

% Rxx_inv = Rxx_test\eye(column_len,column_len);

% Smvdr_xx = zeros(size(vv_test,2),1);

% Ryy_inv = Ryy_test\eye(column_len,column_len);

% Smvdr_yy = zeros(size(vv_test,2),1);

%

% for i = 1:size(vv_test,2)

% Smvdr_xx(i) = 1./(vv_test(:,i)'*Rxx_inv*vv_test(:,i));

% Smvdr_yy(i) = 1./(vv_test(:,i)'*Ryy_inv*vv_test(:,i));

% end

%

% figure(1)

% plot(u,10*log10(abs(Smvdr_xx)),'b',u,10*log10(abs(Smvdr_yy)),'r');

% title('MVDR PS of Signal + Interferers (Time Domain Snapshots)','Fontsize',13);

% xlabel('{\itNormalized Angular Frequency}','Fontsize',12)

% ylabel('PSD (dB)','Fontsize',12)

% grid;

% h = legend('Signal', 'Interferers + Noise',0);

% set(h,'FontSize',7);

% %End of Debug section

%Define the Diagonal Loading matrix

diag_load = load_factor * var(noise) * diag(ones(N,1),0); %Compute diag loading

diag_load_sub = load_factor * var(noise) * diag(ones(N_sub,1),0); %Compute diag loading

%Arrange data/noise into snapshots to represent measurements from array

noise = reshape(noise,N,data_len);

meas_data1 = vs(:,1)*signal + noise + VI*[inter_1;inter_2]; %No DOA mismatch

meas_data2 = vs(:,2)*signal + noise + VI*[inter_1;inter_2]; %With DOA mismatch

Rxx1 = (1/data_len)*(meas_data1*meas_data1'); %Sample Covariance Matrix of measured data

Rxx2 = (1/data_len)*(meas_data2*meas_data2'); %Sample Covariance Matrix with DOA mismatch

%Divide Rxx into submatrix for subarrays

Rxx1_sub = zeros(N_sub,N_sub,num_sub_aperture);

Rxx1_sub_avg = zeros(N_sub);

Rxx2_sub = zeros(N_sub,N_sub,num_sub_aperture);

Page 33: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

30

Rxx2_sub_avg = zeros(N_sub);

%Define exchange matrix for Forward Backward Averaging for subarrays

J_matrix = fliplr(eye(N_sub));

if (overlap == 0) % No overlapping sub-arrays/sub_apertures

for i=1:num_sub_aperture

% Without any pointing mismatch

if (fb_averaging == 0) % No forward-backward averaging

Rxx1_sub(:,:,i) = 1/data_len*(meas_data1(1+(i-1)*N_sub:i*N_sub,:)*meas_data1(1+(i-1)*N_sub:i*N_sub,:)');

else

Rxx1_sub(:,:,i) = 1/(2*data_len)*(meas_data1(1+(i-1)*N_sub:i*N_sub,:)*meas_data1(1+(i-1)*N_sub:i*N_sub,:)' + ...

(J_matrix*conj(meas_data1(1+(i-1)*N_sub:i*N_sub,:))*transpose(meas_data1(1+(i-

1)*N_sub:i*N_sub,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx1_sub_avg = Rxx1_sub_avg + Rxx1_sub(:,:,i);

% With pointing mismatch

if (fb_averaging == 0)

Rxx2_sub(:,:,i) = 1/data_len*(meas_data2(1+(i-1)*N_sub:i*N_sub,:)*meas_data2(1+(i-1)*N_sub:i*N_sub,:)');

else

Rxx2_sub(:,:,i) = 1/(2*data_len)*(meas_data2(1+(i-1)*N_sub:i*N_sub,:)*meas_data2(1+(i-1)*N_sub:i*N_sub,:)' + ...

(J_matrix*conj(meas_data2(1+(i-1)*N_sub:i*N_sub,:))*transpose(meas_data2(1+(i-

1)*N_sub:i*N_sub,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx2_sub_avg = Rxx2_sub_avg + Rxx2_sub(:,:,i);

end

else % Overlapping sub-arrays/sub_aperures

for i=1:num_sub_aperture

% Without any pointing mismatch

if (fb_averaging == 0)

Rxx1_sub(:,:,i) = 1/data_len*(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*...

meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)');

else

Rxx1_sub(:,:,i) = 1/(2*data_len)*(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*meas_data1(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)' +...

(J_matrix*conj(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*transpose(meas_data1(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*J_matrix));

end

Page 34: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

31

%Compute the Spatial Smoothing process

Rxx1_sub_avg = Rxx1_sub_avg + Rxx1_sub(:,:,i);

% With pointing mismatch

if (fb_averaging == 0)

Rxx2_sub(:,:,i) = 1/data_len*(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*...

meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)');

else

Rxx2_sub(:,:,i) = 1/(2*data_len)*(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*meas_data2(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)' +...

(J_matrix*conj(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*transpose(meas_data2(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx2_sub_avg = Rxx2_sub_avg + Rxx2_sub(:,:,i);

end

end

%Compute the average covariance matrix for no/with direction mismatch

Rxx1_sub_avg = (1/num_sub_aperture)*Rxx1_sub_avg;

Rxx2_sub_avg = (1/num_sub_aperture)*Rxx2_sub_avg;

%Compute inverse of covariance matrix without diagonal loading

Rxx1_inv = Rxx1\eye(N);

Rxx2_inv = Rxx2\eye(N);

%Compute inverse without diagonal loading for average of sub apertures

Rxx1_sub_inv = Rxx1_sub_avg\eye(N_sub);

Rxx2_sub_inv = Rxx2_sub_avg\eye(N_sub);

Rxx1_inv_dl = (Rxx1+diag_load)\eye(N);

Rxx2_inv_dl = (Rxx2+diag_load)\eye(N);

Rxx1_sub_inv_dl = (Rxx1_sub_avg+diag_load_sub)\eye(N_sub);

Rxx2_sub_inv_dl = (Rxx2_sub_avg+diag_load_sub)\eye(N_sub);

%Compute the MVDR Power Spectrum as shown in figure 2

Smvdr_xx1 = zeros(size(vv,2),1);

Smvdr_xx2 = zeros(size(vv,2),1);

for i = 1:size(vv,2)

Smvdr_xx1(i) = 1./(vv(:,i)'*Rxx1_inv*vv(:,i));

Smvdr_xx2(i) = 1./(vv(:,i)'*Rxx2_inv*vv(:,i));

end

Page 35: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

32

%Generate the MVDR weight vector without mismatch

w_mvdr1 = (vc'*Rxx1_inv/(vc'*Rxx1_inv*vc))';

w_mvdr1_avg = w_mvdr1_avg + w_mvdr1;

w_mvdr1_sub = (vc_sub'*Rxx1_sub_inv/(vc_sub'*Rxx1_sub_inv*vc_sub))';

w_mvdr1_sub_avg = w_mvdr1_sub_avg + w_mvdr1_sub;

w_mvdr1_dl = (vc'*Rxx1_inv_dl/(vc'*Rxx1_inv_dl*vc))';

w_mvdr1_dl_avg = w_mvdr1_dl_avg + w_mvdr1_dl;

w_mvdr1_sub_dl = (vc_sub'*Rxx1_sub_inv_dl/(vc_sub'*Rxx1_sub_inv_dl*vc_sub))';

w_mvdr1_sub_dl_avg = w_mvdr1_sub_dl_avg + w_mvdr1_sub_dl;

%Generate the MVDR weight vector with mismatch

w_mvdr2 = (vc'*Rxx2_inv/(vc'*Rxx2_inv*vc))';

w_mvdr2_avg = w_mvdr2_avg + w_mvdr2;

w_mvdr2_sub = (vc_sub'*Rxx2_sub_inv/(vc_sub'*Rxx2_sub_inv*vc_sub))';

w_mvdr2_sub_avg = w_mvdr2_sub_avg + w_mvdr2_sub;

w_mvdr2_dl = (vc'*Rxx2_inv_dl/(vc'*Rxx2_inv_dl*vc))';

w_mvdr2_dl_avg = w_mvdr2_dl_avg + w_mvdr2_dl;

w_mvdr2_sub_dl = (vc_sub'*Rxx2_sub_inv_dl/(vc_sub'*Rxx2_sub_inv_dl*vc_sub))';

w_mvdr2_sub_dl_avg = w_mvdr2_sub_dl_avg + w_mvdr2_sub_dl;

% Section for computing Robust MVDR ver 1 without/with direction mismatch

% No pointing mismatch

gamma_value = 1.0;

iter_flag = false;

iter_count = 0;

% Reset diag_load matrix back to an Identity matrix

diag_load = (1/load_factor)*diag_load;

while iter_flag == false

iter_count = iter_count + 1.0;

Rxx1_dl = (Rxx1_sub_avg + gamma_value*diag_load);

Rxx1_inv = inv(Rxx1_dl);

S_matrix = [dir_sv1 dir_sv2];

V_matrix = Rxx1_dl\S_matrix;

R_matrix = inv(S_matrix'*V_matrix);

r0 = abs(R_matrix(1,1));

Page 36: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

33

r1 = abs(R_matrix(2,2));

r2 = abs(R_matrix(2,1));

beta_angle = angle(R_matrix(1,2));

phi_angle = -beta_angle + pi;

if (r2/r0) > 1

rho_0 = r2/r0;

else

rho_0 = 1;

end

if (r2/r1) > 1

rho_1 = r2/r1;

else

rho_1 = 1;

end

w_mvdr1_r1_dl = V_matrix*R_matrix*[rho_0;rho_1*exp(1i*phi_angle)];

S_lcmv = [S_matrix v1 v2];

V_lcmv = Rxx1_dl\S_lcmv;

R_lcmv = inv(S_lcmv'*V_lcmv);

w_mvdr1_r1_lcmv_dl = V_lcmv*R_lcmv*[rho_0;rho_1*exp(1i*phi_angle);0;0];

constraint_check_fail = 0;

for num = 1:num_verify_angles

test_constraint = abs(w_mvdr1_r1_dl'*dir_sv_verify(:,num));

if test_constraint < 1.0

constraint_check_fail = constraint_check_fail + 1.0;

break;

end

end

if constraint_check_fail < 1.0

iter_flag = true;

else

gamma_value = gamma_gain*gamma_value;

end

end % End of iter_flag = false

w_mvdr1_r1_dl_avg = w_mvdr1_r1_dl_avg + w_mvdr1_r1_dl;

w_mvdr1_r1_lcmv_dl_avg = w_mvdr1_r1_lcmv_dl_avg + w_mvdr1_r1_lcmv_dl;

% With pointing mismatch

gamma_value = 1.0;

Page 37: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

34

iter_flag = false;

iter_count = 0;

while iter_flag == false

iter_count = iter_count + 1.0;

Rxx2_dl = (Rxx2_sub_avg + gamma_value*diag_load);

Rxx2_inv = inv(Rxx2_dl);

S_matrix = [dir_sv1 dir_sv2];

V_matrix = Rxx2_dl\S_matrix;

R_matrix = inv(S_matrix'*V_matrix);

r0 = abs(R_matrix(1,1));

r1 = abs(R_matrix(2,2));

r2 = abs(R_matrix(2,1));

beta_angle = angle(R_matrix(1,2));

phi_angle = -beta_angle + pi;

if (r2/r0) > 1

rho_0 = r2/r0;

else

rho_0 = 1;

end

if (r2/r1) > 1

rho_1 = r2/r1;

else

rho_1 = 1;

end

w_mvdr2_r1_dl = V_matrix*R_matrix*[rho_0;rho_1*exp(1i*phi_angle)];

S_lcmv = [S_matrix v1 v2];

V_lcmv = Rxx2_dl\S_lcmv;

R_lcmv = inv(S_lcmv'*V_lcmv);

w_mvdr2_r1_lcmv_dl = V_lcmv*R_lcmv*[rho_0;rho_1*exp(1i*phi_angle);0;0];

constraint_check_fail = 0;

for num = 1:num_verify_angles

test_constraint = abs(w_mvdr2_r1_dl'*dir_sv_verify(:,num));

if test_constraint < 1.0

constraint_check_fail = constraint_check_fail + 1.0;

break;

end

Page 38: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

35

end

if constraint_check_fail < 1.0

iter_flag = true;

else

gamma_value = gamma_gain*gamma_value;

end

end % End of iter_flag = false

w_mvdr2_r1_dl_avg = w_mvdr2_r1_dl_avg + w_mvdr2_r1_dl;

w_mvdr2_r1_lcmv_dl_avg = w_mvdr2_r1_lcmv_dl_avg + w_mvdr2_r1_lcmv_dl;

% End of section to compute the Robust MVDR ver 1

% Secton for computing Robust MVDR ver 2

diag_load = load_factor*diag_load;

% No pointing mismatch

aa1 = vc*vc';

steering_vector_matrix = aa1 - eps_loading*eye(N,N);

[Eig_vect_rob Eig_val_rob] = eig((Rxx1_sub_avg+diag_load)\steering_vector_matrix);

if (Eig_val_rob(1) > Eig_val_rob(end))

w_mvdr1_r2_dl = Eig_vect_rob(:,1);

else

w_mvdr1_r2_dl = Eig_vect_rob(:,end);

end

w_mvdr1_r2_dl_avg = w_mvdr1_r2_dl_avg + w_mvdr1_r2_dl;

% Define Directional constraints for Interferers

C_matrix = [v1 v2];

Proj_C_matrix = (C_matrix/(C_matrix'*C_matrix))*C_matrix';

w_mvdr1_r2_lcmv_dl = (eye(N,N) - Proj_C_matrix)*w_mvdr1_r2_dl;

w_mvdr1_r2_lcmv_dl_avg = w_mvdr1_r2_lcmv_dl_avg + w_mvdr1_r2_lcmv_dl;

% With pointing mismatch

aa1 = vc*vc';

steering_vector_matrix = aa1 - eps_loading*eye(N,N);

[Eig_vect_rob Eig_val_rob] = eig((Rxx2_sub_avg+diag_load)\steering_vector_matrix);

if (Eig_val_rob(1) > Eig_val_rob(end))

w_mvdr2_r2_dl = Eig_vect_rob(:,1);

Page 39: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

36

else

w_mvdr2_r2_dl = Eig_vect_rob(:,end);

end

w_mvdr2_r2_dl_avg = w_mvdr2_r2_dl_avg + w_mvdr2_r2_dl;

w_mvdr2_r2_lcmv_dl = (eye(N,N) - Proj_C_matrix)*w_mvdr2_r2_dl;

w_mvdr2_r2_lcmv_dl_avg = w_mvdr2_r2_lcmv_dl_avg + w_mvdr2_r2_lcmv_dl;

% End of section to compute the Robust MVDR ver 2

end % End of for k = 1:num_runs

% SECTION WITHOUT POINTING MISMATCH %

%Generate average weight vector without mismatch

w_mvdr1_avg = w_mvdr1_avg/num_runs;

w_mvdr1_sub_avg = w_mvdr1_sub_avg/num_runs;

w_mvdr1_dl_avg = w_mvdr1_dl_avg/num_runs;

w_mvdr1_sub_dl_avg = w_mvdr1_sub_dl_avg/num_runs;

w_mvdr1_r1_dl_avg = w_mvdr1_r1_dl_avg/num_runs;

w_mvdr1_r2_dl_avg = w_mvdr1_r2_dl_avg/num_runs;

w_mvdr1_r1_lcmv_dl_avg = w_mvdr1_r1_lcmv_dl_avg/num_runs;

w_mvdr1_r2_lcmv_dl_avg = w_mvdr1_r2_lcmv_dl_avg/num_runs;

%Generate average Beam pattern without mismatch

Beam_mvdr1 = w_mvdr1_avg'*vv;

Beam_mvdr1_sub = w_mvdr1_sub_avg'*vv_sub;

Beam_mvdr1_dl = w_mvdr1_dl_avg'*vv;

Beam_mvdr1_sub_dl = w_mvdr1_sub_dl_avg'*vv_sub;

Beam_mvdr1_r1_dl = w_mvdr1_r1_dl_avg'*vv;

Beam_mvdr1_r2_dl = w_mvdr1_r2_dl_avg'*vv;

Beam_mvdr1_r1_lcmv_dl = w_mvdr1_r1_lcmv_dl_avg'*vv;

Beam_mvdr1_r2_lcmv_dl = w_mvdr1_r2_lcmv_dl_avg'*vv;

%Normalise the Beam patterns

Beam_mvdr1 = Beam_mvdr1/max(Beam_mvdr1);

Beam_mvdr1_dl = Beam_mvdr1_dl/max(Beam_mvdr1_dl);

Beam_mvdr1_r1_dl = Beam_mvdr1_r1_dl/max(Beam_mvdr1_r1_dl);

Beam_mvdr1_r2_dl = Beam_mvdr1_r2_dl/max(Beam_mvdr1_r2_dl);

Beam_mvdr1_r1_lcmv_dl = Beam_mvdr1_r1_lcmv_dl/max(Beam_mvdr1_r1_lcmv_dl);

Beam_mvdr1_r2_lcmv_dl = Beam_mvdr1_r2_lcmv_dl/max(Beam_mvdr1_r2_lcmv_dl);

% SECTION WITH POINTING MISMATCH %

Page 40: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

37

%Generate average weight vector with mismatch

w_mvdr2_avg = w_mvdr2_avg/num_runs;

w_mvdr2_sub_avg = w_mvdr2_sub_avg/num_runs;

w_mvdr2_dl_avg = w_mvdr2_dl_avg/num_runs;

w_mvdr2_sub_dl_avg = w_mvdr2_sub_dl_avg/num_runs;

w_mvdr2_r1_dl_avg = w_mvdr2_r1_dl_avg/num_runs;

w_mvdr2_r2_dl_avg = w_mvdr2_r2_dl_avg/num_runs;

w_mvdr2_r1_lcmv_dl_avg = w_mvdr2_r1_lcmv_dl_avg/num_runs;

w_mvdr2_r2_lcmv_dl_avg = w_mvdr2_r2_lcmv_dl_avg/num_runs;

%Generate average Beam pattern with mismatch

Beam_mvdr2 = w_mvdr2_avg'*vv;

Beam_mvdr2_sub = w_mvdr2_sub_avg'*vv_sub;

Beam_mvdr2_dl = w_mvdr2_dl_avg'*vv;

Beam_mvdr2_sub_dl = w_mvdr2_sub_dl_avg'*vv_sub;

Beam_mvdr2_r1_dl = w_mvdr2_r1_dl_avg'*vv;

Beam_mvdr2_r2_dl = w_mvdr2_r2_dl_avg'*vv;

Beam_mvdr2_r1_lcmv_dl = w_mvdr2_r1_lcmv_dl_avg'*vv;

Beam_mvdr2_r2_lcmv_dl = w_mvdr2_r2_lcmv_dl_avg'*vv;

%Normalise the Beam patterns

Beam_mvdr2 = Beam_mvdr2/max(Beam_mvdr2);

Beam_mvdr2_dl = Beam_mvdr2_dl/max(Beam_mvdr2_dl);

Beam_mvdr2_r1_dl = Beam_mvdr2_r1_dl/max(Beam_mvdr2_r1_dl);

Beam_mvdr2_r2_dl = Beam_mvdr2_r2_dl/max(Beam_mvdr2_r2_dl);

Beam_mvdr2_r1_lcmv_dl = Beam_mvdr2_r1_lcmv_dl/max(Beam_mvdr2_r1_lcmv_dl);

Beam_mvdr2_r2_lcmv_dl = Beam_mvdr2_r2_lcmv_dl/max(Beam_mvdr2_r2_lcmv_dl);

%Compute the SINRo (output) for all the MVDR implementations

%Compute SINRo for ideal MVDR implementation with known Actual Covariance Matrix

INR_SI = [INR(1) 0;0, INR(2)];

CM_actual = VI*INR_SI*VI' + eye(N_sub); %Actual Interference + Noise Covariance Matrix

RM_actual = CM_actual + SNR*vs(:,2)*vs(:,2)'; %Actual Spectral Covariance Matrix

w_mvdr_ideal = (vs(:,2)'/(RM_actual)/(vs(:,2)'/RM_actual*vs(:,2)))';

Beam_mvdr_ideal = w_mvdr_ideal'*vv;

Beam_mvdr_ideal = Beam_mvdr_ideal/max(Beam_mvdr_ideal);

SINRo_mvdr_ideal(j) = ((w_mvdr_ideal'*vs(:,2))*(vs(:,2)'*w_mvdr_ideal)*SNR)/(w_mvdr_ideal'*CM_actual*w_mvdr_ideal);

%Compute average SNR and Sample Covariance Matrix (SCM)

% SNR_avg = signal*signal'/data_len;

% SCM_avg = ((noise + VI*[inter_1;inter_2])*(noise + VI*[inter_1;inter_2])')/data_len;

SNR_avg = SNR;

Page 41: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

38

SCM_avg = CM_actual;

%Compute SINRo for Standard MVDR (with DOA mismatch) computed using SCM

SINRo_mvdr_doa(j) = ((w_mvdr2_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_avg)*SNR_avg)/(w_mvdr2_avg'*SCM_avg*w_mvdr2_avg);

%Compute SINRo for Standard MVDR with DL (with DOA mismatch) computed using SCM

SINRo_mvdr_dl(j) =

((w_mvdr2_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_dl_avg)*SNR_avg)/(w_mvdr2_dl_avg'*SCM_avg*w_mvdr2_dl_avg);

%Compute SINRo for Rob MVDR v1 (with DOA mismatch) computed using SCM

SINRo_mvdr_r1(j) =

((w_mvdr2_r1_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r1_dl_avg)*SNR_avg)/(w_mvdr2_r1_dl_avg'*SCM_avg*w_mvdr2_r1_dl_avg);

%Compute SINRo for Rob MVDR v1 with LCMV (with DOA mismatch) computed using SCM

SINRo_mvdr_r1_lcmv(j) =

((w_mvdr2_r1_lcmv_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r1_lcmv_dl_avg)*SNR_avg)/(w_mvdr2_r1_lcmv_dl_avg'*SCM_avg*w_mvdr

2_r1_lcmv_dl_avg);

%Compute SINRo for Rob MVDR v2 (with DOA mismatch) computed using SCM

SINRo_mvdr_r2(j) =

((w_mvdr2_r2_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r2_dl_avg)*SNR_avg)/(w_mvdr2_r2_dl_avg'*SCM_avg*w_mvdr2_r2_dl_avg);

%Compute SINRo for Rob MVDR v2 with LCMV (with DOA mismatch) computed using SCM

SINRo_mvdr_r2_lcmv(j) =

((w_mvdr2_r2_lcmv_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r2_lcmv_dl_avg)*SNR_avg)/(w_mvdr2_r2_lcmv_dl_avg'*SCM_avg*w_mvdr

2_r2_lcmv_dl_avg);

end

figure(2)

plot(theta*180/pi,10*log10(abs(Smvdr_xx1)),'b',theta*180/pi,10*log10(abs(Smvdr_xx2)),'r');

title('MVDR PS of Signal + Interferers','Fontsize',13);

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('PSD (dB)','Fontsize',12)

grid;

h = legend('No mismatch','DOA mismatch',0);

set(h,'FontSize',6);

figure(3)

clf;

plot(theta*180/pi,10*log10(abs(Beam_mvdr1).^2),'b',theta*180/pi,10*log10(abs(Beam_mvdr1_dl).^2),'r');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr1_r1_dl).^2),'g',theta*180/pi,10*log10(abs(Beam_mvdr1_r2_dl).^2),'m');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr1_r1_lcmv_dl).^2),'c',theta*180/pi,10*log10(abs(Beam_mvdr1_r2_lcmv_dl).^2),'k--');

title('Average Beam Pattern (No pointing mismatch)','Fontsize',13);

grid on

Page 42: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

39

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('Beam pattern (dB)','Fontsize',14)

h = legend('Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Southwest');

figure(4)

clf;

plot(theta*180/pi,10*log10(abs(Beam_mvdr_ideal).^2),'y--');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2).^2),'b',theta*180/pi,10*log10(abs(Beam_mvdr2_dl).^2),'r');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2_r1_dl).^2),'g',theta*180/pi,10*log10(abs(Beam_mvdr2_r2_dl).^2),'m');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2_r1_lcmv_dl).^2),'c',theta*180/pi,10*log10(abs(Beam_mvdr2_r2_lcmv_dl).^2),'k--');

title('Average Beam Pattern (With pointing mismatch)','Fontsize',13);

grid on

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('Beam pattern (dB)','Fontsize',14)

h = legend('Ideal','Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Southwest');

figure(5)

clf;

plot(10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_ideal)),'--',10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_doa)),'^--');

hold on

plot(10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_dl)),'v--',10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_r1)),'x--');

hold on

plot(10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_r2)),'o--',10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_r1_lcmv)),'s--');

hold on

plot(10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_r2_lcmv)),'*--');

title('SINR versus SNR without finite sample effect','Fontsize',13);

grid on

xlabel('SNR (dB)','Fontsize',12)

ylabel('SINR (dB)','Fontsize',14)

h = legend('Ideal','Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Northwest');

Page 43: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

40

Part 1 Example 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Simulation for Robust MVDR investigation

%

% Investigate for the following

% 1) Diagonal Loading

% 2) Robust MVDR (Rob MVDR1) Implementation as described in Ref[1]

% 3) Robust MVDR (Rob MVDR2) Implementation as described in Ref[2]

% 4) LCMV adaptations on the locations of interferers for both Rob MVDR1

% and Rob MVDR1

%

% Scenario 1: SNR = -20 to 30 dB, UI1 = 30 deg, INR1 = 40dB, UI2 = 75 deg, INR2 = 20dB

%

% Written By Peng Seng Tan

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear all

% close all

pack

clc

N = 10;%10; % Num of array elements

rng('default');

fb_averaging = 0; % To enable/disable forward backward averaging

overlap = 2; % Set value to 0, 1 or 2

if (overlap == 0) % The subarrays are non overlapping

if rem(N,5) == 0

N_sub = 5;

elseif rem(N,4) == 0

N_sub = 4;

elseif rem(N,3) == 0

N_sub = 3;

elseif rem(N,2) == 0

N_sub = 2;

else

N_sub = N;

end

num_sub_aperture = round(N/N_sub); % Number of subarrays

elseif (overlap == 1) % The subarrays are overlapping

N_sub = 4;

overlap = 6;

num_sub_aperture = fix((N-overlap)/(N_sub-overlap));

else % No subarrays implemented

N_sub = N;

Page 44: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

41

num_sub_aperture = round(N/N_sub); % Number of subarrays

end

d = 0.5; % D = 0.5*wavelength

n = ceil(-(N-1)/2:(N)/2)';

n_sub = ceil(-(N_sub-1)/2:(N_sub)/2)';

% data_len_vector = [20 40 100 150 200 250 300 350 400 450 500];

data_len_vector = [10 30 50 100 150 200 250 300 350 400 450 500];% 11 12 13 14 15 16 17 18 19 20 30 40 50 60 70 80 90 100

120 140 160 180 200];

% data_len = round(100*N); % Number of measured snapshots in time

theta = pi*(-0.5:0.0005:0.5); % Visible Theta space with convention of broadside = 0 degrees

vv = exp(1i*n*pi*sin(theta)); % Array manifold of steering vectors

vv_sub = exp(1i*n_sub*pi*sin(theta)); % Array manifold of SV (sub_apert)

theta_c = 1/180*pi*45;%0; % Desired signal direction in radians

theta_s = 1/180*pi*[45 43];%[0 2.0]; % Actual signal direction in radians

theta_inter = 1/180*pi*[30 75]; % Direction of Interferers in radians

% theta_inter = 1/180*pi*[-52 57]; % Direction of Interferers in radians

% Section for Robust MVDR ver 1

angle_constraint = 3.0;%3.0;

angle_left = 1/180*pi*(-angle_constraint); % -angle_constraint degrees

angle_right = 1/180*pi*(angle_constraint); % +angle_constraint degrees

theta_left = theta_c + angle_left;

theta_right = theta_c + angle_right;

num_verify_angles = 5;

angle_verify = linspace(theta_left,theta_right,num_verify_angles);

gamma_gain = 2.0; %1.1;

% Creating the Array steering vectors

dir_sv1 = exp(1i*pi*n*sin(theta_left));

dir_sv2 = exp(1i*pi*n*sin(theta_right));

dir_sv_verify = zeros(N_sub,num_verify_angles);

for num = 1:num_verify_angles

dir_sv_verify(:,num) = exp(1i*pi*n*sin(angle_verify(num)));

end

% End of section for Robust MVDR ver 1

% Section for robust MVDR ver 2

% eps_loading = round(N_sub/2);

eps_loading = 4.7345;%3.0473;%4.7345; % Value is obtained from Ref[1]

% End of section for Robust MVDR ver 2

% Creating the Array steering vectors of signal and interferers

vc = exp(1i*pi*n*sin(theta_c)); % Steering vector of desired signal

Page 45: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

42

vc_sub = exp(1i*pi*n_sub*sin(theta_c)); % SV of desired signal (sub_aperture)

vs = exp(1i*pi*n*sin(theta_s)); % Steering vector of actual signal

v1 = exp(1i*n*pi*sin(theta_inter(1))); % Steering vector of interferer 1

v2 = exp(1i*n*pi*sin(theta_inter(2))); % Steering vector of interferer 2

VI = [v1 v2]; % Matrix of Steering vectors of Interferers

% wj = [0.6*pi 0.5*pi]; % Normalized Elect angular freq of Interferers (sinusoids)

wj = [0.30*pi 0.10*pi]; % Normalized Elect angular freq of Interferers (sinusoids)

wsig = 0.20*pi; % Normalized Elect angular freq of actual signal (sinusoid)

%Defining the Signal and Interferers power

SNR = 10.^([10]/10);

INR = 10.^([40 20]/10);

load_factor = 10;%10;

num_runs = 100;%200; % Set the number of trial runs

for j = 1:length(data_len_vector)

data_len = data_len_vector(j);

% Initialise the average weight vectors

w_mvdr1_avg = zeros(N,1);

w_mvdr1_sub_avg = zeros(N_sub,1);

w_mvdr1_dl_avg = zeros(N,1);

w_mvdr1_sub_dl_avg = zeros(N_sub,1);

w_mvdr2_avg = zeros(N,1);

w_mvdr2_sub_avg = zeros(N_sub,1);

w_mvdr2_dl_avg = zeros(N,1);

w_mvdr2_sub_dl_avg = zeros(N_sub,1);

w_mvdr1_r1_dl_avg = zeros(N,1);

w_mvdr2_r1_dl_avg = zeros(N,1);

w_mvdr1_r2_dl_avg = zeros(N,1);

w_mvdr2_r2_dl_avg = zeros(N,1);

w_mvdr1_r1_lcmv_dl_avg = zeros(N,1);

w_mvdr2_r1_lcmv_dl_avg = zeros(N,1);

w_mvdr1_r2_lcmv_dl_avg = zeros(N,1);

w_mvdr2_r2_lcmv_dl_avg = zeros(N,1);

for k = 1:num_runs

Page 46: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

43

% This section is for signal and interferers generation

%Generate the White Gaussian Noise signal

noise = (1/sqrt(2))*randn(1,data_len*N) + 1i*(1/sqrt(2))*randn(1,data_len*N);

%Generate a Sinusoidal desired signal

signal = sqrt(SNR*var(noise))*exp(-1i*wsig*[1:data_len]);

% %Generate a AutoRegressive signal with order 2

% a1 = 1.9114; % Coefficient 1 of 2nd order Autoregressive model

% a2 = -0.95; % Coefficient 2 of 2nd order Autoregressive model

% order_ar = length([a1 a2]);

% signal = zeros(1,data_len+2);

%

% for i=3:data_len+2

% signal(i) = noise(i) + a1*signal(i-1) + a2*signal(i-2);

% end

% signal = signal(3:end);

% signal = sqrt(SNR*var(noise)/var(signal))*signal; %Make SNR to be 0dB

% Generation of Interferer signals

inter_1 = sqrt(INR(1)*var(noise))*exp(-1i*wj(1)*(1:data_len));

inter_2 = sqrt(INR(2)*var(noise))*exp(-1i*wj(2)*(1:data_len));

num_interferer = 2;

% %Start of Debug Section

% inter_total = inter_1 + inter_2 + noise(1:data_len); %Total Interfering signals + noise

% % inter_total = inter_1 + inter_2; %Total Interfering signals

%

% column_len = min(50,round(0.25*data_len));

% num_col_x = data_len-column_len;

%

% x1 = zeros(column_len,num_col_x);

% y1 = zeros(column_len,num_col_x);

%

% for i=1:num_col_x

% x1(:,i) = signal(i:i+column_len-1);

% y1(:,i) = inter_total(i:i+column_len-1);

% end

%

% x1 = flipud(x1);

% y1 = flipud(y1);

%

% Rxx_test = 1/num_col_x*(x1*x1'); %Autocorrelation matrix of signal

% Ryy_test = 1/num_col_x*(y1*y1'); %Autocorrelation matrix of interferers

Page 47: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

44

%

% %Define num of frequency samples

% up_factor = 20; %Frequency oversampling factor

% freq_samp = up_factor*column_len; %Use freq_samp number of frequency bins

% u = -1.0+(1/freq_samp):1/freq_samp:1.0; %Normalised freq location for each freq sample

%

% %Create the array manifold vector for length(u) number of freq samples

% n_test = (0:column_len-1)'; %Assume ULA locations at lambda/2 spacing

% vv_test = exp(1i*n_test*pi*u);

%

% Rxx_inv = Rxx_test\eye(column_len,column_len);

% Smvdr_xx = zeros(size(vv_test,2),1);

% Ryy_inv = Ryy_test\eye(column_len,column_len);

% Smvdr_yy = zeros(size(vv_test,2),1);

%

% for i = 1:size(vv_test,2)

% Smvdr_xx(i) = 1./(vv_test(:,i)'*Rxx_inv*vv_test(:,i));

% Smvdr_yy(i) = 1./(vv_test(:,i)'*Ryy_inv*vv_test(:,i));

% end

%

% figure(1)

% plot(u,10*log10(abs(Smvdr_xx)),'b',u,10*log10(abs(Smvdr_yy)),'r');

% title('MVDR PS of Signal + Interferers (Time Domain Snapshots)','Fontsize',13);

% xlabel('{\itNormalized Angular Frequency}','Fontsize',12)

% ylabel('PSD (dB)','Fontsize',12)

% grid;

% h = legend('Signal', 'Interferers + Noise',0);

% set(h,'FontSize',7);

% %End of Debug section

%Define the Diagonal Loading matrix

diag_load = load_factor * var(noise) * diag(ones(N,1),0); %Compute diag loading

diag_load_sub = load_factor * var(noise) * diag(ones(N_sub,1),0); %Compute diag loading

%Arrange data/noise into snapshots to represent measurements from array

noise = reshape(noise,N,data_len);

meas_data1 = vs(:,1)*signal + noise + VI*[inter_1;inter_2]; %No DOA mismatch

meas_data2 = vs(:,2)*signal + noise + VI*[inter_1;inter_2]; %With DOA mismatch

Rxx1 = (1/data_len)*(meas_data1*meas_data1'); %Sample Covariance Matrix of measured data

Rxx2 = (1/data_len)*(meas_data2*meas_data2'); %Sample Covariance Matrix with DOA mismatch

%Divide Rxx into submatrix for subarrays

Rxx1_sub = zeros(N_sub,N_sub,num_sub_aperture);

Rxx1_sub_avg = zeros(N_sub);

Rxx2_sub = zeros(N_sub,N_sub,num_sub_aperture);

Page 48: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

45

Rxx2_sub_avg = zeros(N_sub);

%Define exchange matrix for Forward Backward Averaging for subarrays

J_matrix = fliplr(eye(N_sub));

if (overlap == 0) % No overlapping sub-arrays/sub_apertures

for i=1:num_sub_aperture

% Without any pointing mismatch

if (fb_averaging == 0) % No forward-backward averaging

Rxx1_sub(:,:,i) = 1/data_len*(meas_data1(1+(i-1)*N_sub:i*N_sub,:)*meas_data1(1+(i-1)*N_sub:i*N_sub,:)');

else

Rxx1_sub(:,:,i) = 1/(2*data_len)*(meas_data1(1+(i-1)*N_sub:i*N_sub,:)*meas_data1(1+(i-1)*N_sub:i*N_sub,:)' + ...

(J_matrix*conj(meas_data1(1+(i-1)*N_sub:i*N_sub,:))*transpose(meas_data1(1+(i-

1)*N_sub:i*N_sub,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx1_sub_avg = Rxx1_sub_avg + Rxx1_sub(:,:,i);

% With pointing mismatch

if (fb_averaging == 0)

Rxx2_sub(:,:,i) = 1/data_len*(meas_data2(1+(i-1)*N_sub:i*N_sub,:)*meas_data2(1+(i-1)*N_sub:i*N_sub,:)');

else

Rxx2_sub(:,:,i) = 1/(2*data_len)*(meas_data2(1+(i-1)*N_sub:i*N_sub,:)*meas_data2(1+(i-1)*N_sub:i*N_sub,:)' + ...

(J_matrix*conj(meas_data2(1+(i-1)*N_sub:i*N_sub,:))*transpose(meas_data2(1+(i-

1)*N_sub:i*N_sub,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx2_sub_avg = Rxx2_sub_avg + Rxx2_sub(:,:,i);

end

else % Overlapping sub-arrays/sub_aperures

for i=1:num_sub_aperture

% Without any pointing mismatch

if (fb_averaging == 0)

Rxx1_sub(:,:,i) = 1/data_len*(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*...

meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)');

else

Rxx1_sub(:,:,i) = 1/(2*data_len)*(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*meas_data1(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)' +...

(J_matrix*conj(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*transpose(meas_data1(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*J_matrix));

end

Page 49: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

46

%Compute the Spatial Smoothing process

Rxx1_sub_avg = Rxx1_sub_avg + Rxx1_sub(:,:,i);

% With pointing mismatch

if (fb_averaging == 0)

Rxx2_sub(:,:,i) = 1/data_len*(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*...

meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)');

else

Rxx2_sub(:,:,i) = 1/(2*data_len)*(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*meas_data2(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)' +...

(J_matrix*conj(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*transpose(meas_data2(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx2_sub_avg = Rxx2_sub_avg + Rxx2_sub(:,:,i);

end

end

%Compute the average covariance matrix for no/with direction mismatch

Rxx1_sub_avg = (1/num_sub_aperture)*Rxx1_sub_avg;

Rxx2_sub_avg = (1/num_sub_aperture)*Rxx2_sub_avg;

%Compute inverse of covariance matrix without diagonal loading

Rxx1_inv = Rxx1\eye(N);

Rxx2_inv = Rxx2\eye(N);

%Compute inverse without diagonal loading for average of sub apertures

Rxx1_sub_inv = Rxx1_sub_avg\eye(N_sub);

Rxx2_sub_inv = Rxx2_sub_avg\eye(N_sub);

Rxx1_inv_dl = (Rxx1+diag_load)\eye(N);

Rxx2_inv_dl = (Rxx2+diag_load)\eye(N);

Rxx1_sub_inv_dl = (Rxx1_sub_avg+diag_load_sub)\eye(N_sub);

Rxx2_sub_inv_dl = (Rxx2_sub_avg+diag_load_sub)\eye(N_sub);

%Compute the MVDR Power Spectrum as shown in figure 2

Smvdr_xx1 = zeros(size(vv,2),1);

Smvdr_xx2 = zeros(size(vv,2),1);

for i = 1:size(vv,2)

Smvdr_xx1(i) = 1./(vv(:,i)'*Rxx1_inv*vv(:,i));

Smvdr_xx2(i) = 1./(vv(:,i)'*Rxx2_inv*vv(:,i));

end

Page 50: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

47

%Generate the MVDR weight vector without mismatch

w_mvdr1 = (vc'*Rxx1_inv/(vc'*Rxx1_inv*vc))';

w_mvdr1_avg = w_mvdr1_avg + w_mvdr1;

w_mvdr1_sub = (vc_sub'*Rxx1_sub_inv/(vc_sub'*Rxx1_sub_inv*vc_sub))';

w_mvdr1_sub_avg = w_mvdr1_sub_avg + w_mvdr1_sub;

w_mvdr1_dl = (vc'*Rxx1_inv_dl/(vc'*Rxx1_inv_dl*vc))';

w_mvdr1_dl_avg = w_mvdr1_dl_avg + w_mvdr1_dl;

w_mvdr1_sub_dl = (vc_sub'*Rxx1_sub_inv_dl/(vc_sub'*Rxx1_sub_inv_dl*vc_sub))';

w_mvdr1_sub_dl_avg = w_mvdr1_sub_dl_avg + w_mvdr1_sub_dl;

%Generate the MVDR weight vector with mismatch

w_mvdr2 = (vc'*Rxx2_inv/(vc'*Rxx2_inv*vc))';

w_mvdr2_avg = w_mvdr2_avg + w_mvdr2;

w_mvdr2_sub = (vc_sub'*Rxx2_sub_inv/(vc_sub'*Rxx2_sub_inv*vc_sub))';

w_mvdr2_sub_avg = w_mvdr2_sub_avg + w_mvdr2_sub;

w_mvdr2_dl = (vc'*Rxx2_inv_dl/(vc'*Rxx2_inv_dl*vc))';

w_mvdr2_dl_avg = w_mvdr2_dl_avg + w_mvdr2_dl;

w_mvdr2_sub_dl = (vc_sub'*Rxx2_sub_inv_dl/(vc_sub'*Rxx2_sub_inv_dl*vc_sub))';

w_mvdr2_sub_dl_avg = w_mvdr2_sub_dl_avg + w_mvdr2_sub_dl;

% Section for computing Robust MVDR ver 1 without/with direction mismatch

% No pointing mismatch

gamma_value = 1.0;

iter_flag = false;

iter_count = 0;

% Reset diag_load matrix back to an Identity matrix

diag_load = (1/load_factor)*diag_load;

while iter_flag == false

iter_count = iter_count + 1.0;

Rxx1_dl = (Rxx1_sub_avg + gamma_value*diag_load);

Rxx1_inv = inv(Rxx1_dl);

S_matrix = [dir_sv1 dir_sv2];

V_matrix = Rxx1_dl\S_matrix;

R_matrix = inv(S_matrix'*V_matrix);

r0 = abs(R_matrix(1,1));

Page 51: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

48

r1 = abs(R_matrix(2,2));

r2 = abs(R_matrix(2,1));

beta_angle = angle(R_matrix(1,2));

phi_angle = -beta_angle + pi;

if (r2/r0) > 1

rho_0 = r2/r0;

else

rho_0 = 1;

end

if (r2/r1) > 1

rho_1 = r2/r1;

else

rho_1 = 1;

end

w_mvdr1_r1_dl = V_matrix*R_matrix*[rho_0;rho_1*exp(1i*phi_angle)];

S_lcmv = [S_matrix v1 v2];

V_lcmv = Rxx1_dl\S_lcmv;

R_lcmv = inv(S_lcmv'*V_lcmv);

w_mvdr1_r1_lcmv_dl = V_lcmv*R_lcmv*[rho_0;rho_1*exp(1i*phi_angle);0;0];

constraint_check_fail = 0;

for num = 1:num_verify_angles

test_constraint = abs(w_mvdr1_r1_dl'*dir_sv_verify(:,num));

if test_constraint < 1.0

constraint_check_fail = constraint_check_fail + 1.0;

break;

end

end

if constraint_check_fail < 1.0

iter_flag = true;

else

gamma_value = gamma_gain*gamma_value;

end

end % End of iter_flag = false

w_mvdr1_r1_dl_avg = w_mvdr1_r1_dl_avg + w_mvdr1_r1_dl;

w_mvdr1_r1_lcmv_dl_avg = w_mvdr1_r1_lcmv_dl_avg + w_mvdr1_r1_lcmv_dl;

% With pointing mismatch

gamma_value = 1.0;

Page 52: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

49

iter_flag = false;

iter_count = 0;

while iter_flag == false

iter_count = iter_count + 1.0;

Rxx2_dl = (Rxx2_sub_avg + gamma_value*diag_load);

Rxx2_inv = inv(Rxx2_dl);

S_matrix = [dir_sv1 dir_sv2];

V_matrix = Rxx2_dl\S_matrix;

R_matrix = inv(S_matrix'*V_matrix);

r0 = abs(R_matrix(1,1));

r1 = abs(R_matrix(2,2));

r2 = abs(R_matrix(2,1));

beta_angle = angle(R_matrix(1,2));

phi_angle = -beta_angle + pi;

if (r2/r0) > 1

rho_0 = r2/r0;

else

rho_0 = 1;

end

if (r2/r1) > 1

rho_1 = r2/r1;

else

rho_1 = 1;

end

w_mvdr2_r1_dl = V_matrix*R_matrix*[rho_0;rho_1*exp(1i*phi_angle)];

S_lcmv = [S_matrix v1 v2];

V_lcmv = Rxx2_dl\S_lcmv;

R_lcmv = inv(S_lcmv'*V_lcmv);

w_mvdr2_r1_lcmv_dl = V_lcmv*R_lcmv*[rho_0;rho_1*exp(1i*phi_angle);0;0];

constraint_check_fail = 0;

for num = 1:num_verify_angles

test_constraint = abs(w_mvdr2_r1_dl'*dir_sv_verify(:,num));

if test_constraint < 1.0

constraint_check_fail = constraint_check_fail + 1.0;

break;

end

Page 53: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

50

end

if constraint_check_fail < 1.0

iter_flag = true;

else

gamma_value = gamma_gain*gamma_value;

end

end % End of iter_flag = false

w_mvdr2_r1_dl_avg = w_mvdr2_r1_dl_avg + w_mvdr2_r1_dl;

w_mvdr2_r1_lcmv_dl_avg = w_mvdr2_r1_lcmv_dl_avg + w_mvdr2_r1_lcmv_dl;

% End of section to compute the Robust MVDR ver 1

% Secton for computing Robust MVDR ver 2

diag_load = load_factor*diag_load;

% No pointing mismatch

aa1 = vc*vc';

steering_vector_matrix = aa1 - eps_loading*eye(N,N);

[Eig_vect_rob Eig_val_rob] = eig((Rxx1_sub_avg+diag_load)\steering_vector_matrix);

if (Eig_val_rob(1) > Eig_val_rob(end))

w_mvdr1_r2_dl = Eig_vect_rob(:,1);

else

w_mvdr1_r2_dl = Eig_vect_rob(:,end);

end

w_mvdr1_r2_dl_avg = w_mvdr1_r2_dl_avg + w_mvdr1_r2_dl;

% Define Directional constraints for Interferers

C_matrix = [v1 v2];

Proj_C_matrix = (C_matrix/(C_matrix'*C_matrix))*C_matrix';

w_mvdr1_r2_lcmv_dl = (eye(N,N) - Proj_C_matrix)*w_mvdr1_r2_dl;

w_mvdr1_r2_lcmv_dl_avg = w_mvdr1_r2_lcmv_dl_avg + w_mvdr1_r2_lcmv_dl;

% With pointing mismatch

aa1 = vc*vc';

steering_vector_matrix = aa1 - eps_loading*eye(N,N);

[Eig_vect_rob Eig_val_rob] = eig((Rxx2_sub_avg+diag_load)\steering_vector_matrix);

if (Eig_val_rob(1) > Eig_val_rob(end))

w_mvdr2_r2_dl = Eig_vect_rob(:,1);

Page 54: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

51

else

w_mvdr2_r2_dl = Eig_vect_rob(:,end);

end

w_mvdr2_r2_dl_avg = w_mvdr2_r2_dl_avg + w_mvdr2_r2_dl;

w_mvdr2_r2_lcmv_dl = (eye(N,N) - Proj_C_matrix)*w_mvdr2_r2_dl;

w_mvdr2_r2_lcmv_dl_avg = w_mvdr2_r2_lcmv_dl_avg + w_mvdr2_r2_lcmv_dl;

% End of section to compute the Robust MVDR ver 2

end % End of for k = 1:num_runs

% SECTION WITHOUT POINTING MISMATCH %

%Generate average weight vector without mismatch

w_mvdr1_avg = w_mvdr1_avg/num_runs;

w_mvdr1_sub_avg = w_mvdr1_sub_avg/num_runs;

w_mvdr1_dl_avg = w_mvdr1_dl_avg/num_runs;

w_mvdr1_sub_dl_avg = w_mvdr1_sub_dl_avg/num_runs;

w_mvdr1_r1_dl_avg = w_mvdr1_r1_dl_avg/num_runs;

w_mvdr1_r2_dl_avg = w_mvdr1_r2_dl_avg/num_runs;

w_mvdr1_r1_lcmv_dl_avg = w_mvdr1_r1_lcmv_dl_avg/num_runs;

w_mvdr1_r2_lcmv_dl_avg = w_mvdr1_r2_lcmv_dl_avg/num_runs;

%Generate average Beam pattern without mismatch

Beam_mvdr1 = w_mvdr1_avg'*vv;

Beam_mvdr1_sub = w_mvdr1_sub_avg'*vv_sub;

Beam_mvdr1_dl = w_mvdr1_dl_avg'*vv;

Beam_mvdr1_sub_dl = w_mvdr1_sub_dl_avg'*vv_sub;

Beam_mvdr1_r1_dl = w_mvdr1_r1_dl_avg'*vv;

Beam_mvdr1_r2_dl = w_mvdr1_r2_dl_avg'*vv;

Beam_mvdr1_r1_lcmv_dl = w_mvdr1_r1_lcmv_dl_avg'*vv;

Beam_mvdr1_r2_lcmv_dl = w_mvdr1_r2_lcmv_dl_avg'*vv;

%Normalise the Beam patterns

Beam_mvdr1 = Beam_mvdr1/max(Beam_mvdr1);

Beam_mvdr1_dl = Beam_mvdr1_dl/max(Beam_mvdr1_dl);

Beam_mvdr1_r1_dl = Beam_mvdr1_r1_dl/max(Beam_mvdr1_r1_dl);

Beam_mvdr1_r2_dl = Beam_mvdr1_r2_dl/max(Beam_mvdr1_r2_dl);

Beam_mvdr1_r1_lcmv_dl = Beam_mvdr1_r1_lcmv_dl/max(Beam_mvdr1_r1_lcmv_dl);

Beam_mvdr1_r2_lcmv_dl = Beam_mvdr1_r2_lcmv_dl/max(Beam_mvdr1_r2_lcmv_dl);

% SECTION WITH POINTING MISMATCH %

Page 55: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

52

%Generate average weight vector with mismatch

w_mvdr2_avg = w_mvdr2_avg/num_runs;

w_mvdr2_sub_avg = w_mvdr2_sub_avg/num_runs;

w_mvdr2_dl_avg = w_mvdr2_dl_avg/num_runs;

w_mvdr2_sub_dl_avg = w_mvdr2_sub_dl_avg/num_runs;

w_mvdr2_r1_dl_avg = w_mvdr2_r1_dl_avg/num_runs;

w_mvdr2_r2_dl_avg = w_mvdr2_r2_dl_avg/num_runs;

w_mvdr2_r1_lcmv_dl_avg = w_mvdr2_r1_lcmv_dl_avg/num_runs;

w_mvdr2_r2_lcmv_dl_avg = w_mvdr2_r2_lcmv_dl_avg/num_runs;

%Generate average Beam pattern with mismatch

Beam_mvdr2 = w_mvdr2_avg'*vv;

Beam_mvdr2_sub = w_mvdr2_sub_avg'*vv_sub;

Beam_mvdr2_dl = w_mvdr2_dl_avg'*vv;

Beam_mvdr2_sub_dl = w_mvdr2_sub_dl_avg'*vv_sub;

Beam_mvdr2_r1_dl = w_mvdr2_r1_dl_avg'*vv;

Beam_mvdr2_r2_dl = w_mvdr2_r2_dl_avg'*vv;

Beam_mvdr2_r1_lcmv_dl = w_mvdr2_r1_lcmv_dl_avg'*vv;

Beam_mvdr2_r2_lcmv_dl = w_mvdr2_r2_lcmv_dl_avg'*vv;

%Normalise the Beam patterns

Beam_mvdr2 = Beam_mvdr2/max(Beam_mvdr2);

Beam_mvdr2_dl = Beam_mvdr2_dl/max(Beam_mvdr2_dl);

Beam_mvdr2_r1_dl = Beam_mvdr2_r1_dl/max(Beam_mvdr2_r1_dl);

Beam_mvdr2_r2_dl = Beam_mvdr2_r2_dl/max(Beam_mvdr2_r2_dl);

Beam_mvdr2_r1_lcmv_dl = Beam_mvdr2_r1_lcmv_dl/max(Beam_mvdr2_r1_lcmv_dl);

Beam_mvdr2_r2_lcmv_dl = Beam_mvdr2_r2_lcmv_dl/max(Beam_mvdr2_r2_lcmv_dl);

%Compute the SINRo (output) for all the MVDR implementations

%Compute SINRo for ideal MVDR implementation with known Actual Covariance Matrix

INR_SI = [INR(1) 0;0, INR(2)];

CM_actual = VI*INR_SI*VI' + eye(N_sub); %Actual Interference + Noise Covariance Matrix

% CM_actual = (VI*sqrt([INR(1);INR(2)]))*(VI*sqrt([INR(1);INR(2)]))' + eye(N_sub);

RM_actual = CM_actual + SNR*vs(:,2)*vs(:,2)'; %Actual Spectral Covariance Matrix

w_mvdr_ideal = (vs(:,2)'/(RM_actual)/(vs(:,2)'/RM_actual*vs(:,2)))';

Beam_mvdr_ideal = w_mvdr_ideal'*vv;

Beam_mvdr_ideal = Beam_mvdr_ideal/max(Beam_mvdr_ideal);

SINRo_mvdr_ideal(j) = ((w_mvdr_ideal'*vs(:,2))*(vs(:,2)'*w_mvdr_ideal)*SNR)/(w_mvdr_ideal'*CM_actual*w_mvdr_ideal);

%Compute average SNR and Sample Covariance Matrix (SCM)

% SNR_avg = signal*signal'/data_len;

% SCM_avg = ((noise + VI*[inter_1;inter_2])*(noise + VI*[inter_1;inter_2])')/data_len;

Page 56: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

53

SNR_avg = SNR;

SCM_avg = CM_actual;

%Compute SINRo for Standard MVDR (with DOA mismatch) computed using SCM

SINRo_mvdr_doa(j) = ((w_mvdr2_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_avg)*SNR_avg)/(w_mvdr2_avg'*SCM_avg*w_mvdr2_avg);

%Compute SINRo for Standard MVDR with DL (with DOA mismatch) computed using SCM

SINRo_mvdr_dl(j) =

((w_mvdr2_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_dl_avg)*SNR_avg)/(w_mvdr2_dl_avg'*SCM_avg*w_mvdr2_dl_avg);

%Compute SINRo for Rob MVDR v1 (with DOA mismatch) computed using SCM

SINRo_mvdr_r1(j) =

((w_mvdr2_r1_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r1_dl_avg)*SNR_avg)/(w_mvdr2_r1_dl_avg'*SCM_avg*w_mvdr2_r1_dl_avg);

%Compute SINRo for Rob MVDR v1 with LCMV (with DOA mismatch) computed using SCM

SINRo_mvdr_r1_lcmv(j) =

((w_mvdr2_r1_lcmv_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r1_lcmv_dl_avg)*SNR_avg)/(w_mvdr2_r1_lcmv_dl_avg'*SCM_avg*w_mvdr

2_r1_lcmv_dl_avg);

%Compute SINRo for Rob MVDR v2 (with DOA mismatch) computed using SCM

SINRo_mvdr_r2(j) =

((w_mvdr2_r2_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r2_dl_avg)*SNR_avg)/(w_mvdr2_r2_dl_avg'*SCM_avg*w_mvdr2_r2_dl_avg);

%Compute SINRo for Rob MVDR v2 with LCMV (with DOA mismatch) computed using SCM

SINRo_mvdr_r2_lcmv(j) =

((w_mvdr2_r2_lcmv_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r2_lcmv_dl_avg)*SNR_avg)/(w_mvdr2_r2_lcmv_dl_avg'*SCM_avg*w_mvdr

2_r2_lcmv_dl_avg);

end

figure(2)

plot(theta*180/pi,10*log10(abs(Smvdr_xx1)),'b',theta*180/pi,10*log10(abs(Smvdr_xx2)),'r');

title('MVDR PS of Signal + Interferers','Fontsize',13);

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('PSD (dB)','Fontsize',12)

grid;

h = legend('No mismatch','DOA mismatch',0);

set(h,'FontSize',6);

figure(3)

clf;

plot(theta*180/pi,10*log10(abs(Beam_mvdr1).^2),'b',theta*180/pi,10*log10(abs(Beam_mvdr1_dl).^2),'r');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr1_r1_dl).^2),'g',theta*180/pi,10*log10(abs(Beam_mvdr1_r2_dl).^2),'m');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr1_r1_lcmv_dl).^2),'c',theta*180/pi,10*log10(abs(Beam_mvdr1_r2_lcmv_dl).^2),'k--');

title('Average Beam Pattern (No pointing mismatch)','Fontsize',13);

Page 57: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

54

grid on

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('Beam pattern (dB)','Fontsize',14)

h = legend('Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Southwest');

figure(4)

clf;

plot(theta*180/pi,10*log10(abs(Beam_mvdr_ideal).^2),'y--');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2).^2),'b',theta*180/pi,10*log10(abs(Beam_mvdr2_dl).^2),'r');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2_r1_dl).^2),'g',theta*180/pi,10*log10(abs(Beam_mvdr2_r2_dl).^2),'m');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2_r1_lcmv_dl).^2),'c',theta*180/pi,10*log10(abs(Beam_mvdr2_r2_lcmv_dl).^2),'k--');

title('Average Beam Pattern (With pointing mismatch)','Fontsize',13);

grid on

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('Beam pattern (dB)','Fontsize',14)

h = legend('Ideal','Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Southwest');

figure(5)

clf;

plot(data_len_vector,10*log10(abs(SINRo_mvdr_ideal)),'--',data_len_vector,10*log10(abs(SINRo_mvdr_doa)),'^--');

hold on

plot(data_len_vector,10*log10(abs(SINRo_mvdr_dl)),'v--',data_len_vector,10*log10(abs(SINRo_mvdr_r1)),'x--');

hold on

plot(data_len_vector,10*log10(abs(SINRo_mvdr_r2)),'o--',data_len_vector,10*log10(abs(SINRo_mvdr_r1_lcmv)),'s--');

hold on

plot(data_len_vector,10*log10(abs(SINRo_mvdr_r2_lcmv)),'*--');

title('SINR versus number of snapshots for SNR = 10 dB','Fontsize',13);

grid on

xlabel('Number of snapshots','Fontsize',12)

ylabel('SINR (dB)','Fontsize',14)

h = legend('Ideal','Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Northwest');

Page 58: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

55

Part 2 Example 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Simulation for Robust MVDR investigation

%

% Investigate for the following

% 1) Diagonal Loading

% 2) Robust MVDR (Rob MVDR1) Implementation as described in Ref[1]

% 3) Robust MVDR (Rob MVDR2) Implementation as described in Ref[2]

% 4) LCMV adaptations on the locations of interferers for both Rob MVDR1

% and Rob MVDR1

%

% Scenario 1: SNR = -20 to 30 dB, UI1 = 30 deg, INR1 = 40dB, UI2 = 75 deg, INR2 = 20dB

%

% Written By Peng Seng Tan

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear all

% close all

pack

clc

N = 10;%10; % Num of array elements

rng('default');

fb_averaging = 0; % To enable/disable forward backward averaging

overlap = 2; % Set value to 0, 1 or 2

if (overlap == 0) % The subarrays are non overlapping

if rem(N,5) == 0

N_sub = 5;

elseif rem(N,4) == 0

N_sub = 4;

elseif rem(N,3) == 0

N_sub = 3;

elseif rem(N,2) == 0

N_sub = 2;

else

N_sub = N;

end

num_sub_aperture = round(N/N_sub); % Number of subarrays

elseif (overlap == 1) % The subarrays are overlapping

N_sub = 4;

overlap = 6;

num_sub_aperture = fix((N-overlap)/(N_sub-overlap));

else % No subarrays implemented

N_sub = N;

Page 59: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

56

num_sub_aperture = round(N/N_sub); % Number of subarrays

end

d = 0.5; % D = 0.5*wavelength

n = ceil(-(N-1)/2:(N)/2)';

n_sub = ceil(-(N_sub-1)/2:(N_sub)/2)';

data_len = round(20*N); % Number of measured snapshots in time

theta = pi*(-0.5:0.0005:0.5); % Visible Theta space with convention of broadside = 0 degrees

vv = exp(1i*n*pi*sin(theta)); % Array manifold of steering vectors

vv_sub = exp(1i*n_sub*pi*sin(theta)); % Array manifold of SV (sub_apert)

theta_c = 1/180*pi*0;%0; % Desired signal direction in radians

theta_s = 1/180*pi*[0 2.0];%[0 2.0]; % Actual signal direction in radians

theta_inter = 1/180*pi*[-60 60]; % Direction of Interferers in radians

% theta_inter = 1/180*pi*[-52 57]; % Direction of Interferers in radians

% Section for Robust MVDR ver 1

angle_constraint = 3.0;%3.0;

angle_left = 1/180*pi*(-angle_constraint); % -angle_constraint degrees

angle_right = 1/180*pi*(angle_constraint); % +angle_constraint degrees

theta_left = theta_c + angle_left;

theta_right = theta_c + angle_right;

num_verify_angles = 5;

angle_verify = linspace(theta_left,theta_right,num_verify_angles);

gamma_gain = 2.0; %1.1;

% Creating the Array steering vectors

dir_sv1 = exp(1i*pi*n*sin(theta_left));

dir_sv2 = exp(1i*pi*n*sin(theta_right));

dir_sv_verify = zeros(N_sub,num_verify_angles);

for num = 1:num_verify_angles

dir_sv_verify(:,num) = exp(1i*pi*n*sin(angle_verify(num)));

end

% End of section for Robust MVDR ver 1

% Section for robust MVDR ver 2

% eps_loading = round(N_sub/2);

eps_loading = 4.7345;%3.0473;%4.7345; % Value is obtained from Ref[1]

% End of section for Robust MVDR ver 2

% Creating the Array steering vectors of signal and interferers

vc = exp(1i*pi*n*sin(theta_c)); % Steering vector of desired signal

vc_sub = exp(1i*pi*n_sub*sin(theta_c)); % SV of desired signal (sub_aperture)

vs = exp(1i*pi*n*sin(theta_s)); % Steering vector of actual signal

Page 60: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

57

v1 = exp(1i*n*pi*sin(theta_inter(1))); % Steering vector of interferer 1

v2 = exp(1i*n*pi*sin(theta_inter(2))); % Steering vector of interferer 2

VI = [v1 v2]; % Matrix of Steering vectors of Interferers

% wj = [0.6*pi 0.5*pi]; % Normalized Elect angular freq of Interferers (sinusoids)

wj = [0.30*pi 0.10*pi]; % Normalized Elect angular freq of Interferers (sinusoids)

wsig = 0.2*pi; % Normalized Elect angular freq of actual signal (sinusoid)

%Defining the Signal and Interferers power

SNR_vector = 10.^([-20 -15 -10 -5 0 5 10 15 20 25 30]/10);

INR = 10.^([40 40]/10);

load_factor = 10;%10;

num_runs = 100;%200; % Set the number of trial runs

for j = 1:length(SNR_vector)

SNR = SNR_vector(j);

% Initialise the average weight vectors

w_mvdr1_avg = zeros(N,1);

w_mvdr1_sub_avg = zeros(N_sub,1);

w_mvdr1_dl_avg = zeros(N,1);

w_mvdr1_sub_dl_avg = zeros(N_sub,1);

w_mvdr2_avg = zeros(N,1);

w_mvdr2_sub_avg = zeros(N_sub,1);

w_mvdr2_dl_avg = zeros(N,1);

w_mvdr2_sub_dl_avg = zeros(N_sub,1);

w_mvdr1_r1_dl_avg = zeros(N,1);

w_mvdr2_r1_dl_avg = zeros(N,1);

w_mvdr1_r2_dl_avg = zeros(N,1);

w_mvdr2_r2_dl_avg = zeros(N,1);

w_mvdr1_r1_lcmv_dl_avg = zeros(N,1);

w_mvdr2_r1_lcmv_dl_avg = zeros(N,1);

w_mvdr1_r2_lcmv_dl_avg = zeros(N,1);

w_mvdr2_r2_lcmv_dl_avg = zeros(N,1);

for k = 1:num_runs

% This section is for signal and interferers generation

Page 61: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

58

%Generate the White Gaussian Noise signal

noise = (1/sqrt(2))*randn(1,data_len*N) + 1i*(1/sqrt(2))*randn(1,data_len*N);

%Generate a Sinusoidal desired signal

signal = sqrt(SNR*var(noise))*exp(-1i*wsig*[1:data_len]);

% %Generate a AutoRegressive signal with order 2

% a1 = 1.9114; % Coefficient 1 of 2nd order Autoregressive model

% a2 = -0.95; % Coefficient 2 of 2nd order Autoregressive model

% order_ar = length([a1 a2]);

% signal = zeros(1,data_len+2);

%

% for i=3:data_len+2

% signal(i) = noise(i) + a1*signal(i-1) + a2*signal(i-2);

% end

% signal = signal(3:end);

% signal = sqrt(SNR*var(noise)/var(signal))*signal; %Make SNR to be 0dB

% Generation of Interferer signals

inter_1 = sqrt(INR(1)*var(noise))*exp(-1i*wj(1)*(1:data_len));

inter_2 = sqrt(INR(2)*var(noise))*exp(-1i*wj(2)*(1:data_len));

num_interferer = 2;

% %Start of Debug Section

% inter_total = inter_1 + inter_2 + noise(1:data_len); %Total Interfering signals + noise

% % inter_total = inter_1 + inter_2; %Total Interfering signals

%

% column_len = min(50,round(0.25*data_len));

% num_col_x = data_len-column_len;

%

% x1 = zeros(column_len,num_col_x);

% y1 = zeros(column_len,num_col_x);

%

% for i=1:num_col_x

% x1(:,i) = signal(i:i+column_len-1);

% y1(:,i) = inter_total(i:i+column_len-1);

% end

%

% x1 = flipud(x1);

% y1 = flipud(y1);

%

% Rxx_test = 1/num_col_x*(x1*x1'); %Autocorrelation matrix of signal

% Ryy_test = 1/num_col_x*(y1*y1'); %Autocorrelation matrix of interferers

%

% %Define num of frequency samples

% up_factor = 20; %Frequency oversampling factor

Page 62: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

59

% freq_samp = up_factor*column_len; %Use freq_samp number of frequency bins

% u = -1.0+(1/freq_samp):1/freq_samp:1.0; %Normalised freq location for each freq sample

%

% %Create the array manifold vector for length(u) number of freq samples

% n_test = (0:column_len-1)'; %Assume ULA locations at lambda/2 spacing

% vv_test = exp(1i*n_test*pi*u);

%

% Rxx_inv = Rxx_test\eye(column_len,column_len);

% Smvdr_xx = zeros(size(vv_test,2),1);

% Ryy_inv = Ryy_test\eye(column_len,column_len);

% Smvdr_yy = zeros(size(vv_test,2),1);

%

% for i = 1:size(vv_test,2)

% Smvdr_xx(i) = 1./(vv_test(:,i)'*Rxx_inv*vv_test(:,i));

% Smvdr_yy(i) = 1./(vv_test(:,i)'*Ryy_inv*vv_test(:,i));

% end

%

% figure(1)

% plot(u,10*log10(abs(Smvdr_xx)),'b',u,10*log10(abs(Smvdr_yy)),'r');

% title('MVDR PS of Signal + Interferers (Time Domain Snapshots)','Fontsize',13);

% xlabel('{\itNormalized Angular Frequency}','Fontsize',12)

% ylabel('PSD (dB)','Fontsize',12)

% grid;

% h = legend('Signal', 'Interferers + Noise',0);

% set(h,'FontSize',7);

% %End of Debug section

%Define the Diagonal Loading matrix

diag_load = load_factor * var(noise) * diag(ones(N,1),0); %Compute diag loading

diag_load_sub = load_factor * var(noise) * diag(ones(N_sub,1),0); %Compute diag loading

%Arrange data/noise into snapshots to represent measurements from array

noise = reshape(noise,N,data_len);

meas_data1 = vs(:,1)*signal + noise + VI*[inter_1;inter_2]; %No DOA mismatch

meas_data2 = vs(:,2)*signal + noise + VI*[inter_1;inter_2]; %With DOA mismatch

Rxx1 = (1/data_len)*(meas_data1*meas_data1'); %Sample Covariance Matrix of measured data

Rxx2 = (1/data_len)*(meas_data2*meas_data2'); %Sample Covariance Matrix with DOA mismatch

%Divide Rxx into submatrix for subarrays

Rxx1_sub = zeros(N_sub,N_sub,num_sub_aperture);

Rxx1_sub_avg = zeros(N_sub);

Rxx2_sub = zeros(N_sub,N_sub,num_sub_aperture);

Rxx2_sub_avg = zeros(N_sub);

%Define exchange matrix for Forward Backward Averaging for subarrays

Page 63: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

60

J_matrix = fliplr(eye(N_sub));

if (overlap == 0) % No overlapping sub-arrays/sub_apertures

for i=1:num_sub_aperture

% Without any pointing mismatch

if (fb_averaging == 0) % No forward-backward averaging

Rxx1_sub(:,:,i) = 1/data_len*(meas_data1(1+(i-1)*N_sub:i*N_sub,:)*meas_data1(1+(i-1)*N_sub:i*N_sub,:)');

else

Rxx1_sub(:,:,i) = 1/(2*data_len)*(meas_data1(1+(i-1)*N_sub:i*N_sub,:)*meas_data1(1+(i-1)*N_sub:i*N_sub,:)' + ...

(J_matrix*conj(meas_data1(1+(i-1)*N_sub:i*N_sub,:))*transpose(meas_data1(1+(i-

1)*N_sub:i*N_sub,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx1_sub_avg = Rxx1_sub_avg + Rxx1_sub(:,:,i);

% With pointing mismatch

if (fb_averaging == 0)

Rxx2_sub(:,:,i) = 1/data_len*(meas_data2(1+(i-1)*N_sub:i*N_sub,:)*meas_data2(1+(i-1)*N_sub:i*N_sub,:)');

else

Rxx2_sub(:,:,i) = 1/(2*data_len)*(meas_data2(1+(i-1)*N_sub:i*N_sub,:)*meas_data2(1+(i-1)*N_sub:i*N_sub,:)' + ...

(J_matrix*conj(meas_data2(1+(i-1)*N_sub:i*N_sub,:))*transpose(meas_data2(1+(i-

1)*N_sub:i*N_sub,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx2_sub_avg = Rxx2_sub_avg + Rxx2_sub(:,:,i);

end

else % Overlapping sub-arrays/sub_aperures

for i=1:num_sub_aperture

% Without any pointing mismatch

if (fb_averaging == 0)

Rxx1_sub(:,:,i) = 1/data_len*(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*...

meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)');

else

Rxx1_sub(:,:,i) = 1/(2*data_len)*(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*meas_data1(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)' +...

(J_matrix*conj(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*transpose(meas_data1(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx1_sub_avg = Rxx1_sub_avg + Rxx1_sub(:,:,i);

Page 64: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

61

% With pointing mismatch

if (fb_averaging == 0)

Rxx2_sub(:,:,i) = 1/data_len*(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*...

meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)');

else

Rxx2_sub(:,:,i) = 1/(2*data_len)*(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*meas_data2(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)' +...

(J_matrix*conj(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*transpose(meas_data2(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx2_sub_avg = Rxx2_sub_avg + Rxx2_sub(:,:,i);

end

end

%Compute the average covariance matrix for no/with direction mismatch

Rxx1_sub_avg = (1/num_sub_aperture)*Rxx1_sub_avg;

Rxx2_sub_avg = (1/num_sub_aperture)*Rxx2_sub_avg;

%Compute inverse of covariance matrix without diagonal loading

Rxx1_inv = Rxx1\eye(N);

Rxx2_inv = Rxx2\eye(N);

%Compute inverse without diagonal loading for average of sub apertures

Rxx1_sub_inv = Rxx1_sub_avg\eye(N_sub);

Rxx2_sub_inv = Rxx2_sub_avg\eye(N_sub);

Rxx1_inv_dl = (Rxx1+diag_load)\eye(N);

Rxx2_inv_dl = (Rxx2+diag_load)\eye(N);

Rxx1_sub_inv_dl = (Rxx1_sub_avg+diag_load_sub)\eye(N_sub);

Rxx2_sub_inv_dl = (Rxx2_sub_avg+diag_load_sub)\eye(N_sub);

%Compute the MVDR Power Spectrum as shown in figure 2

Smvdr_xx1 = zeros(size(vv,2),1);

Smvdr_xx2 = zeros(size(vv,2),1);

for i = 1:size(vv,2)

Smvdr_xx1(i) = 1./(vv(:,i)'*Rxx1_inv*vv(:,i));

Smvdr_xx2(i) = 1./(vv(:,i)'*Rxx2_inv*vv(:,i));

end

%Generate the MVDR weight vector without mismatch

w_mvdr1 = (vc'*Rxx1_inv/(vc'*Rxx1_inv*vc))';

w_mvdr1_avg = w_mvdr1_avg + w_mvdr1;

Page 65: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

62

w_mvdr1_sub = (vc_sub'*Rxx1_sub_inv/(vc_sub'*Rxx1_sub_inv*vc_sub))';

w_mvdr1_sub_avg = w_mvdr1_sub_avg + w_mvdr1_sub;

w_mvdr1_dl = (vc'*Rxx1_inv_dl/(vc'*Rxx1_inv_dl*vc))';

w_mvdr1_dl_avg = w_mvdr1_dl_avg + w_mvdr1_dl;

w_mvdr1_sub_dl = (vc_sub'*Rxx1_sub_inv_dl/(vc_sub'*Rxx1_sub_inv_dl*vc_sub))';

w_mvdr1_sub_dl_avg = w_mvdr1_sub_dl_avg + w_mvdr1_sub_dl;

%Generate the MVDR weight vector with mismatch

w_mvdr2 = (vc'*Rxx2_inv/(vc'*Rxx2_inv*vc))';

w_mvdr2_avg = w_mvdr2_avg + w_mvdr2;

w_mvdr2_sub = (vc_sub'*Rxx2_sub_inv/(vc_sub'*Rxx2_sub_inv*vc_sub))';

w_mvdr2_sub_avg = w_mvdr2_sub_avg + w_mvdr2_sub;

w_mvdr2_dl = (vc'*Rxx2_inv_dl/(vc'*Rxx2_inv_dl*vc))';

w_mvdr2_dl_avg = w_mvdr2_dl_avg + w_mvdr2_dl;

w_mvdr2_sub_dl = (vc_sub'*Rxx2_sub_inv_dl/(vc_sub'*Rxx2_sub_inv_dl*vc_sub))';

w_mvdr2_sub_dl_avg = w_mvdr2_sub_dl_avg + w_mvdr2_sub_dl;

% Section for computing Robust MVDR ver 1 without/with direction mismatch

% No pointing mismatch

gamma_value = 1.0;

iter_flag = false;

iter_count = 0;

% Reset diag_load matrix back to an Identity matrix

diag_load = (1/load_factor)*diag_load;

while iter_flag == false

iter_count = iter_count + 1.0;

Rxx1_dl = (Rxx1_sub_avg + gamma_value*diag_load);

Rxx1_inv = inv(Rxx1_dl);

S_matrix = [dir_sv1 dir_sv2];

V_matrix = Rxx1_dl\S_matrix;

R_matrix = inv(S_matrix'*V_matrix);

r0 = abs(R_matrix(1,1));

r1 = abs(R_matrix(2,2));

r2 = abs(R_matrix(2,1));

beta_angle = angle(R_matrix(1,2));

Page 66: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

63

phi_angle = -beta_angle + pi;

if (r2/r0) > 1

rho_0 = r2/r0;

else

rho_0 = 1;

end

if (r2/r1) > 1

rho_1 = r2/r1;

else

rho_1 = 1;

end

w_mvdr1_r1_dl = V_matrix*R_matrix*[rho_0;rho_1*exp(1i*phi_angle)];

S_lcmv = [S_matrix v1 v2];

V_lcmv = Rxx1_dl\S_lcmv;

R_lcmv = inv(S_lcmv'*V_lcmv);

w_mvdr1_r1_lcmv_dl = V_lcmv*R_lcmv*[rho_0;rho_1*exp(1i*phi_angle);0;0];

constraint_check_fail = 0;

for num = 1:num_verify_angles

test_constraint = abs(w_mvdr1_r1_dl'*dir_sv_verify(:,num));

if test_constraint < 1.0

constraint_check_fail = constraint_check_fail + 1.0;

break;

end

end

if constraint_check_fail < 1.0

iter_flag = true;

else

gamma_value = gamma_gain*gamma_value;

end

end % End of iter_flag = false

w_mvdr1_r1_dl_avg = w_mvdr1_r1_dl_avg + w_mvdr1_r1_dl;

w_mvdr1_r1_lcmv_dl_avg = w_mvdr1_r1_lcmv_dl_avg + w_mvdr1_r1_lcmv_dl;

% With pointing mismatch

gamma_value = 1.0;

iter_flag = false;

iter_count = 0;

Page 67: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

64

while iter_flag == false

iter_count = iter_count + 1.0;

Rxx2_dl = (Rxx2_sub_avg + gamma_value*diag_load);

Rxx2_inv = inv(Rxx2_dl);

S_matrix = [dir_sv1 dir_sv2];

V_matrix = Rxx2_dl\S_matrix;

R_matrix = inv(S_matrix'*V_matrix);

r0 = abs(R_matrix(1,1));

r1 = abs(R_matrix(2,2));

r2 = abs(R_matrix(2,1));

beta_angle = angle(R_matrix(1,2));

phi_angle = -beta_angle + pi;

if (r2/r0) > 1

rho_0 = r2/r0;

else

rho_0 = 1;

end

if (r2/r1) > 1

rho_1 = r2/r1;

else

rho_1 = 1;

end

w_mvdr2_r1_dl = V_matrix*R_matrix*[rho_0;rho_1*exp(1i*phi_angle)];

S_lcmv = [S_matrix v1 v2];

V_lcmv = Rxx2_dl\S_lcmv;

R_lcmv = inv(S_lcmv'*V_lcmv);

w_mvdr2_r1_lcmv_dl = V_lcmv*R_lcmv*[rho_0;rho_1*exp(1i*phi_angle);0;0];

constraint_check_fail = 0;

for num = 1:num_verify_angles

test_constraint = abs(w_mvdr2_r1_dl'*dir_sv_verify(:,num));

if test_constraint < 1.0

constraint_check_fail = constraint_check_fail + 1.0;

break;

end

end

if constraint_check_fail < 1.0

Page 68: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

65

iter_flag = true;

else

gamma_value = gamma_gain*gamma_value;

end

end % End of iter_flag = false

w_mvdr2_r1_dl_avg = w_mvdr2_r1_dl_avg + w_mvdr2_r1_dl;

w_mvdr2_r1_lcmv_dl_avg = w_mvdr2_r1_lcmv_dl_avg + w_mvdr2_r1_lcmv_dl;

% End of section to compute the Robust MVDR ver 1

% Secton for computing Robust MVDR ver 2

diag_load = load_factor*diag_load;

% No pointing mismatch

aa1 = vc*vc';

steering_vector_matrix = aa1 - eps_loading*eye(N,N);

[Eig_vect_rob Eig_val_rob] = eig((Rxx1_sub_avg+diag_load)\steering_vector_matrix);

if (Eig_val_rob(1) > Eig_val_rob(end))

w_mvdr1_r2_dl = Eig_vect_rob(:,1);

else

w_mvdr1_r2_dl = Eig_vect_rob(:,end);

end

w_mvdr1_r2_dl_avg = w_mvdr1_r2_dl_avg + w_mvdr1_r2_dl;

% Define Directional constraints for Interferers

C_matrix = [v1 v2];

Proj_C_matrix = (C_matrix/(C_matrix'*C_matrix))*C_matrix';

w_mvdr1_r2_lcmv_dl = (eye(N,N) - Proj_C_matrix)*w_mvdr1_r2_dl;

w_mvdr1_r2_lcmv_dl_avg = w_mvdr1_r2_lcmv_dl_avg + w_mvdr1_r2_lcmv_dl;

% With pointing mismatch

aa1 = vc*vc';

steering_vector_matrix = aa1 - eps_loading*eye(N,N);

[Eig_vect_rob Eig_val_rob] = eig((Rxx2_sub_avg+diag_load)\steering_vector_matrix);

if (Eig_val_rob(1) > Eig_val_rob(end))

w_mvdr2_r2_dl = Eig_vect_rob(:,1);

else

w_mvdr2_r2_dl = Eig_vect_rob(:,end);

end

Page 69: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

66

w_mvdr2_r2_dl_avg = w_mvdr2_r2_dl_avg + w_mvdr2_r2_dl;

w_mvdr2_r2_lcmv_dl = (eye(N,N) - Proj_C_matrix)*w_mvdr2_r2_dl;

w_mvdr2_r2_lcmv_dl_avg = w_mvdr2_r2_lcmv_dl_avg + w_mvdr2_r2_lcmv_dl;

% End of section to compute the Robust MVDR ver 2

end % End of for k = 1:num_runs

% SECTION WITHOUT POINTING MISMATCH %

%Generate average weight vector without mismatch

w_mvdr1_avg = w_mvdr1_avg/num_runs;

w_mvdr1_sub_avg = w_mvdr1_sub_avg/num_runs;

w_mvdr1_dl_avg = w_mvdr1_dl_avg/num_runs;

w_mvdr1_sub_dl_avg = w_mvdr1_sub_dl_avg/num_runs;

w_mvdr1_r1_dl_avg = w_mvdr1_r1_dl_avg/num_runs;

w_mvdr1_r2_dl_avg = w_mvdr1_r2_dl_avg/num_runs;

w_mvdr1_r1_lcmv_dl_avg = w_mvdr1_r1_lcmv_dl_avg/num_runs;

w_mvdr1_r2_lcmv_dl_avg = w_mvdr1_r2_lcmv_dl_avg/num_runs;

%Generate average Beam pattern without mismatch

Beam_mvdr1 = w_mvdr1_avg'*vv;

Beam_mvdr1_sub = w_mvdr1_sub_avg'*vv_sub;

Beam_mvdr1_dl = w_mvdr1_dl_avg'*vv;

Beam_mvdr1_sub_dl = w_mvdr1_sub_dl_avg'*vv_sub;

Beam_mvdr1_r1_dl = w_mvdr1_r1_dl_avg'*vv;

Beam_mvdr1_r2_dl = w_mvdr1_r2_dl_avg'*vv;

Beam_mvdr1_r1_lcmv_dl = w_mvdr1_r1_lcmv_dl_avg'*vv;

Beam_mvdr1_r2_lcmv_dl = w_mvdr1_r2_lcmv_dl_avg'*vv;

%Normalise the Beam patterns

Beam_mvdr1 = Beam_mvdr1/max(Beam_mvdr1);

Beam_mvdr1_dl = Beam_mvdr1_dl/max(Beam_mvdr1_dl);

Beam_mvdr1_r1_dl = Beam_mvdr1_r1_dl/max(Beam_mvdr1_r1_dl);

Beam_mvdr1_r2_dl = Beam_mvdr1_r2_dl/max(Beam_mvdr1_r2_dl);

Beam_mvdr1_r1_lcmv_dl = Beam_mvdr1_r1_lcmv_dl/max(Beam_mvdr1_r1_lcmv_dl);

Beam_mvdr1_r2_lcmv_dl = Beam_mvdr1_r2_lcmv_dl/max(Beam_mvdr1_r2_lcmv_dl);

% SECTION WITH POINTING MISMATCH %

%Generate average weight vector with mismatch

w_mvdr2_avg = w_mvdr2_avg/num_runs;

w_mvdr2_sub_avg = w_mvdr2_sub_avg/num_runs;

Page 70: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

67

w_mvdr2_dl_avg = w_mvdr2_dl_avg/num_runs;

w_mvdr2_sub_dl_avg = w_mvdr2_sub_dl_avg/num_runs;

w_mvdr2_r1_dl_avg = w_mvdr2_r1_dl_avg/num_runs;

w_mvdr2_r2_dl_avg = w_mvdr2_r2_dl_avg/num_runs;

w_mvdr2_r1_lcmv_dl_avg = w_mvdr2_r1_lcmv_dl_avg/num_runs;

w_mvdr2_r2_lcmv_dl_avg = w_mvdr2_r2_lcmv_dl_avg/num_runs;

%Generate average Beam pattern with mismatch

Beam_mvdr2 = w_mvdr2_avg'*vv;

Beam_mvdr2_sub = w_mvdr2_sub_avg'*vv_sub;

Beam_mvdr2_dl = w_mvdr2_dl_avg'*vv;

Beam_mvdr2_sub_dl = w_mvdr2_sub_dl_avg'*vv_sub;

Beam_mvdr2_r1_dl = w_mvdr2_r1_dl_avg'*vv;

Beam_mvdr2_r2_dl = w_mvdr2_r2_dl_avg'*vv;

Beam_mvdr2_r1_lcmv_dl = w_mvdr2_r1_lcmv_dl_avg'*vv;

Beam_mvdr2_r2_lcmv_dl = w_mvdr2_r2_lcmv_dl_avg'*vv;

%Normalise the Beam patterns

Beam_mvdr2 = Beam_mvdr2/max(Beam_mvdr2);

Beam_mvdr2_dl = Beam_mvdr2_dl/max(Beam_mvdr2_dl);

Beam_mvdr2_r1_dl = Beam_mvdr2_r1_dl/max(Beam_mvdr2_r1_dl);

Beam_mvdr2_r2_dl = Beam_mvdr2_r2_dl/max(Beam_mvdr2_r2_dl);

Beam_mvdr2_r1_lcmv_dl = Beam_mvdr2_r1_lcmv_dl/max(Beam_mvdr2_r1_lcmv_dl);

Beam_mvdr2_r2_lcmv_dl = Beam_mvdr2_r2_lcmv_dl/max(Beam_mvdr2_r2_lcmv_dl);

%Compute the SINRo (output) for all the MVDR implementations

%Compute SINRo for ideal MVDR implementation with known Actual Covariance Matrix

INR_SI = [INR(1) 0;0, INR(2)];

CM_actual = VI*INR_SI*VI' + eye(N_sub); %Actual Interference + Noise Covariance Matrix

RM_actual = CM_actual + SNR*vs(:,2)*vs(:,2)'; %Actual Spectral Covariance Matrix

w_mvdr_ideal = (vs(:,2)'/(RM_actual)/(vs(:,2)'/RM_actual*vs(:,2)))';

Beam_mvdr_ideal = w_mvdr_ideal'*vv;

Beam_mvdr_ideal = Beam_mvdr_ideal/max(Beam_mvdr_ideal);

SINRo_mvdr_ideal(j) = ((w_mvdr_ideal'*vs(:,2))*(vs(:,2)'*w_mvdr_ideal)*SNR)/(w_mvdr_ideal'*CM_actual*w_mvdr_ideal);

%Compute average SNR and Sample Covariance Matrix (SCM)

% SNR_avg = signal*signal'/data_len;

% SCM_avg = ((noise + VI*[inter_1;inter_2])*(noise + VI*[inter_1;inter_2])')/data_len;

SNR_avg = SNR;

SCM_avg = CM_actual;

%Compute SINRo for Standard MVDR (with DOA mismatch) computed using SCM

Page 71: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

68

SINRo_mvdr_doa(j) = ((w_mvdr2_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_avg)*SNR_avg)/(w_mvdr2_avg'*SCM_avg*w_mvdr2_avg);

%Compute SINRo for Standard MVDR with DL (with DOA mismatch) computed using SCM

SINRo_mvdr_dl(j) =

((w_mvdr2_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_dl_avg)*SNR_avg)/(w_mvdr2_dl_avg'*SCM_avg*w_mvdr2_dl_avg);

%Compute SINRo for Rob MVDR v1 (with DOA mismatch) computed using SCM

SINRo_mvdr_r1(j) =

((w_mvdr2_r1_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r1_dl_avg)*SNR_avg)/(w_mvdr2_r1_dl_avg'*SCM_avg*w_mvdr2_r1_dl_avg);

%Compute SINRo for Rob MVDR v1 with LCMV (with DOA mismatch) computed using SCM

SINRo_mvdr_r1_lcmv(j) =

((w_mvdr2_r1_lcmv_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r1_lcmv_dl_avg)*SNR_avg)/(w_mvdr2_r1_lcmv_dl_avg'*SCM_avg*w_mvdr

2_r1_lcmv_dl_avg);

%Compute SINRo for Rob MVDR v2 (with DOA mismatch) computed using SCM

SINRo_mvdr_r2(j) =

((w_mvdr2_r2_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r2_dl_avg)*SNR_avg)/(w_mvdr2_r2_dl_avg'*SCM_avg*w_mvdr2_r2_dl_avg);

%Compute SINRo for Rob MVDR v2 with LCMV (with DOA mismatch) computed using SCM

SINRo_mvdr_r2_lcmv(j) =

((w_mvdr2_r2_lcmv_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r2_lcmv_dl_avg)*SNR_avg)/(w_mvdr2_r2_lcmv_dl_avg'*SCM_avg*w_mvdr

2_r2_lcmv_dl_avg);

end

figure(2)

plot(theta*180/pi,10*log10(abs(Smvdr_xx1)),'b',theta*180/pi,10*log10(abs(Smvdr_xx2)),'r');

title('MVDR PS of Signal + Interferers (Array Snapshots)','Fontsize',13);

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('PSD (dB)','Fontsize',12)

grid;

h = legend('No mismatch','DOA mismatch',0);

set(h,'FontSize',6);

figure(3)

clf;

plot(theta*180/pi,10*log10(abs(Beam_mvdr1).^2),'b',theta*180/pi,10*log10(abs(Beam_mvdr1_dl).^2),'r');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr1_r1_dl).^2),'g',theta*180/pi,10*log10(abs(Beam_mvdr1_r2_dl).^2),'m');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr1_r1_lcmv_dl).^2),'c',theta*180/pi,10*log10(abs(Beam_mvdr1_r2_lcmv_dl).^2),'k--');

plot(180/pi*theta_inter(1)*[1 1],[-120 0],'m-');

plot(180/pi*theta_inter(2)*[1 1],[-120 0],'m-');

title('Average Beam Pattern (No pointing mismatch)','Fontsize',13);

grid on

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

Page 72: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

69

ylabel('Beam pattern (dB)','Fontsize',14)

h = legend('Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Southwest');

figure(4)

clf;

plot(theta*180/pi,10*log10(abs(Beam_mvdr_ideal).^2),'y--');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2).^2),'b',theta*180/pi,10*log10(abs(Beam_mvdr2_dl).^2),'r');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2_r1_dl).^2),'g',theta*180/pi,10*log10(abs(Beam_mvdr2_r2_dl).^2),'m');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2_r1_lcmv_dl).^2),'c',theta*180/pi,10*log10(abs(Beam_mvdr2_r2_lcmv_dl).^2),'k--');

plot(180/pi*theta_inter(1)*[1 1],[-120 0],'m-');

plot(180/pi*theta_inter(2)*[1 1],[-120 0],'m-');

title('Average Beam Pattern (With pointing mismatch)','Fontsize',13);

grid on

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('Beam pattern (dB)','Fontsize',14)

h = legend('Ideal','Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Southwest');

figure(5)

clf;

plot(10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_ideal)),'--',10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_doa)),'^--');

hold on

plot(10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_dl)),'v--',10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_r1)),'x--');

hold on

plot(10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_r2)),'o--',10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_r1_lcmv)),'s--');

hold on

plot(10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_r2_lcmv)),'*--');

title('SINR versus SNR without finite sample effect','Fontsize',13);

grid on

xlabel('SNR (dB)','Fontsize',12)

ylabel('SINR (dB)','Fontsize',14)

h = legend('Ideal','Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Northwest');

Page 73: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

70

Part 2 Example 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Simulation for Robust MVDR investigation

%

% Investigate for the following

% 1) Diagonal Loading

% 2) Robust MVDR (Rob MVDR1) Implementation as described in Ref[1]

% 3) Robust MVDR (Rob MVDR2) Implementation as described in Ref[2]

% 4) LCMV adaptations on the locations of interferers for both Rob MVDR1

% and Rob MVDR1

%

% Scenario 1: SNR = -20 to 30 dB, UI1 = 30 deg, INR1 = 40dB, UI2 = 75 deg, INR2 = 20dB

%

% Written By Peng Seng Tan

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear all

% close all

pack

clc

N = 10;%10; % Num of array elements

rng('default');

fb_averaging = 0; % To enable/disable forward backward averaging

overlap = 2; % Set value to 0, 1 or 2

if (overlap == 0) % The subarrays are non overlapping

if rem(N,5) == 0

N_sub = 5;

elseif rem(N,4) == 0

N_sub = 4;

elseif rem(N,3) == 0

N_sub = 3;

elseif rem(N,2) == 0

N_sub = 2;

else

N_sub = N;

end

num_sub_aperture = round(N/N_sub); % Number of subarrays

elseif (overlap == 1) % The subarrays are overlapping

N_sub = 4;

overlap = 6;

num_sub_aperture = fix((N-overlap)/(N_sub-overlap));

else % No subarrays implemented

N_sub = N;

Page 74: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

71

num_sub_aperture = round(N/N_sub); % Number of subarrays

end

d = 0.5; % D = 0.5*wavelength

n = ceil(-(N-1)/2:(N)/2)';

n_sub = ceil(-(N_sub-1)/2:(N_sub)/2)';

% data_len_vector = [20 40 100 150 200 250 300 350 400 450 500];

data_len_vector = [10 30 50 100 150 200 250 300 350 400 450 500];% 11 12 13 14 15 16 17 18 19 20 30 40 50 60 70 80 90 100

120 140 160 180 200];

% data_len = round(100*N); % Number of measured snapshots in time

theta = pi*(-0.5:0.0005:0.5); % Visible Theta space with convention of broadside = 0 degrees

vv = exp(1i*n*pi*sin(theta)); % Array manifold of steering vectors

vv_sub = exp(1i*n_sub*pi*sin(theta)); % Array manifold of SV (sub_apert)

theta_c = 1/180*pi*0;%0; % Desired signal direction in radians

theta_s = 1/180*pi*[0 2.0];%[0 2.0]; % Actual signal direction in radians

theta_inter = 1/180*pi*[-60 60]; % Direction of Interferers in radians

% theta_inter = 1/180*pi*[-52 57]; % Direction of Interferers in radians

% Section for Robust MVDR ver 1

angle_constraint = 3.0;%3.0;

angle_left = 1/180*pi*(-angle_constraint); % -angle_constraint degrees

angle_right = 1/180*pi*(angle_constraint); % +angle_constraint degrees

theta_left = theta_c + angle_left;

theta_right = theta_c + angle_right;

num_verify_angles = 5;

angle_verify = linspace(theta_left,theta_right,num_verify_angles);

gamma_gain = 2.0; %1.1;

% Creating the Array steering vectors

dir_sv1 = exp(1i*pi*n*sin(theta_left));

dir_sv2 = exp(1i*pi*n*sin(theta_right));

dir_sv_verify = zeros(N_sub,num_verify_angles);

for num = 1:num_verify_angles

dir_sv_verify(:,num) = exp(1i*pi*n*sin(angle_verify(num)));

end

% End of section for Robust MVDR ver 1

% Section for robust MVDR ver 2

% eps_loading = round(N_sub/2);

eps_loading = 4.7345;%3.0473;%4.7345; % Value is obtained from Ref[1]

% End of section for Robust MVDR ver 2

% Creating the Array steering vectors of signal and interferers

vc = exp(1i*pi*n*sin(theta_c)); % Steering vector of desired signal

Page 75: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

72

vc_sub = exp(1i*pi*n_sub*sin(theta_c)); % SV of desired signal (sub_aperture)

vs = exp(1i*pi*n*sin(theta_s)); % Steering vector of actual signal

v1 = exp(1i*n*pi*sin(theta_inter(1))); % Steering vector of interferer 1

v2 = exp(1i*n*pi*sin(theta_inter(2))); % Steering vector of interferer 2

VI = [v1 v2]; % Matrix of Steering vectors of Interferers

% wj = [0.6*pi 0.5*pi]; % Normalized Elect angular freq of Interferers (sinusoids)

wj = [0.30*pi 0.10*pi]; % Normalized Elect angular freq of Interferers (sinusoids)

wsig = 0.20*pi; % Normalized Elect angular freq of actual signal (sinusoid)

%Defining the Signal and Interferers power

SNR = 10.^([10]/10);

INR = 10.^([40 20]/10);

load_factor = 10;%10;

num_runs = 100;%200; % Set the number of trial runs

for j = 1:length(data_len_vector)

data_len = data_len_vector(j);

% Initialise the average weight vectors

w_mvdr1_avg = zeros(N,1);

w_mvdr1_sub_avg = zeros(N_sub,1);

w_mvdr1_dl_avg = zeros(N,1);

w_mvdr1_sub_dl_avg = zeros(N_sub,1);

w_mvdr2_avg = zeros(N,1);

w_mvdr2_sub_avg = zeros(N_sub,1);

w_mvdr2_dl_avg = zeros(N,1);

w_mvdr2_sub_dl_avg = zeros(N_sub,1);

w_mvdr1_r1_dl_avg = zeros(N,1);

w_mvdr2_r1_dl_avg = zeros(N,1);

w_mvdr1_r2_dl_avg = zeros(N,1);

w_mvdr2_r2_dl_avg = zeros(N,1);

w_mvdr1_r1_lcmv_dl_avg = zeros(N,1);

w_mvdr2_r1_lcmv_dl_avg = zeros(N,1);

w_mvdr1_r2_lcmv_dl_avg = zeros(N,1);

w_mvdr2_r2_lcmv_dl_avg = zeros(N,1);

for k = 1:num_runs

Page 76: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

73

% This section is for signal and interferers generation

%Generate the White Gaussian Noise signal

noise = (1/sqrt(2))*randn(1,data_len*N) + 1i*(1/sqrt(2))*randn(1,data_len*N);

%Generate a Sinusoidal desired signal

signal = sqrt(SNR*var(noise))*exp(-1i*wsig*[1:data_len]);

% %Generate a AutoRegressive signal with order 2

% a1 = 1.9114; % Coefficient 1 of 2nd order Autoregressive model

% a2 = -0.95; % Coefficient 2 of 2nd order Autoregressive model

% order_ar = length([a1 a2]);

% signal = zeros(1,data_len+2);

%

% for i=3:data_len+2

% signal(i) = noise(i) + a1*signal(i-1) + a2*signal(i-2);

% end

% signal = signal(3:end);

% signal = sqrt(SNR*var(noise)/var(signal))*signal; %Make SNR to be 0dB

% Generation of Interferer signals

inter_1 = sqrt(INR(1)*var(noise))*exp(-1i*wj(1)*(1:data_len));

inter_2 = sqrt(INR(2)*var(noise))*exp(-1i*wj(2)*(1:data_len));

num_interferer = 2;

% %Start of Debug Section

% inter_total = inter_1 + inter_2 + noise(1:data_len); %Total Interfering signals + noise

% % inter_total = inter_1 + inter_2; %Total Interfering signals

%

% column_len = min(50,round(0.25*data_len));

% num_col_x = data_len-column_len;

%

% x1 = zeros(column_len,num_col_x);

% y1 = zeros(column_len,num_col_x);

%

% for i=1:num_col_x

% x1(:,i) = signal(i:i+column_len-1);

% y1(:,i) = inter_total(i:i+column_len-1);

% end

%

% x1 = flipud(x1);

% y1 = flipud(y1);

%

% Rxx_test = 1/num_col_x*(x1*x1'); %Autocorrelation matrix of signal

% Ryy_test = 1/num_col_x*(y1*y1'); %Autocorrelation matrix of interferers

Page 77: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

74

%

% %Define num of frequency samples

% up_factor = 20; %Frequency oversampling factor

% freq_samp = up_factor*column_len; %Use freq_samp number of frequency bins

% u = -1.0+(1/freq_samp):1/freq_samp:1.0; %Normalised freq location for each freq sample

%

% %Create the array manifold vector for length(u) number of freq samples

% n_test = (0:column_len-1)'; %Assume ULA locations at lambda/2 spacing

% vv_test = exp(1i*n_test*pi*u);

%

% Rxx_inv = Rxx_test\eye(column_len,column_len);

% Smvdr_xx = zeros(size(vv_test,2),1);

% Ryy_inv = Ryy_test\eye(column_len,column_len);

% Smvdr_yy = zeros(size(vv_test,2),1);

%

% for i = 1:size(vv_test,2)

% Smvdr_xx(i) = 1./(vv_test(:,i)'*Rxx_inv*vv_test(:,i));

% Smvdr_yy(i) = 1./(vv_test(:,i)'*Ryy_inv*vv_test(:,i));

% end

%

% figure(1)

% plot(u,10*log10(abs(Smvdr_xx)),'b',u,10*log10(abs(Smvdr_yy)),'r');

% title('MVDR PS of Signal + Interferers (Time Domain Snapshots)','Fontsize',13);

% xlabel('{\itNormalized Angular Frequency}','Fontsize',12)

% ylabel('PSD (dB)','Fontsize',12)

% grid;

% h = legend('Signal', 'Interferers + Noise',0);

% set(h,'FontSize',7);

% %End of Debug section

%Define the Diagonal Loading matrix

diag_load = load_factor * var(noise) * diag(ones(N,1),0); %Compute diag loading

diag_load_sub = load_factor * var(noise) * diag(ones(N_sub,1),0); %Compute diag loading

%Arrange data/noise into snapshots to represent measurements from array

noise = reshape(noise,N,data_len);

meas_data1 = vs(:,1)*signal + noise + VI*[inter_1;inter_2]; %No DOA mismatch

meas_data2 = vs(:,2)*signal + noise + VI*[inter_1;inter_2]; %With DOA mismatch

Rxx1 = (1/data_len)*(meas_data1*meas_data1'); %Sample Covariance Matrix of measured data

Rxx2 = (1/data_len)*(meas_data2*meas_data2'); %Sample Covariance Matrix with DOA mismatch

%Divide Rxx into submatrix for subarrays

Rxx1_sub = zeros(N_sub,N_sub,num_sub_aperture);

Rxx1_sub_avg = zeros(N_sub);

Rxx2_sub = zeros(N_sub,N_sub,num_sub_aperture);

Page 78: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

75

Rxx2_sub_avg = zeros(N_sub);

%Define exchange matrix for Forward Backward Averaging for subarrays

J_matrix = fliplr(eye(N_sub));

if (overlap == 0) % No overlapping sub-arrays/sub_apertures

for i=1:num_sub_aperture

% Without any pointing mismatch

if (fb_averaging == 0) % No forward-backward averaging

Rxx1_sub(:,:,i) = 1/data_len*(meas_data1(1+(i-1)*N_sub:i*N_sub,:)*meas_data1(1+(i-1)*N_sub:i*N_sub,:)');

else

Rxx1_sub(:,:,i) = 1/(2*data_len)*(meas_data1(1+(i-1)*N_sub:i*N_sub,:)*meas_data1(1+(i-1)*N_sub:i*N_sub,:)' + ...

(J_matrix*conj(meas_data1(1+(i-1)*N_sub:i*N_sub,:))*transpose(meas_data1(1+(i-

1)*N_sub:i*N_sub,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx1_sub_avg = Rxx1_sub_avg + Rxx1_sub(:,:,i);

% With pointing mismatch

if (fb_averaging == 0)

Rxx2_sub(:,:,i) = 1/data_len*(meas_data2(1+(i-1)*N_sub:i*N_sub,:)*meas_data2(1+(i-1)*N_sub:i*N_sub,:)');

else

Rxx2_sub(:,:,i) = 1/(2*data_len)*(meas_data2(1+(i-1)*N_sub:i*N_sub,:)*meas_data2(1+(i-1)*N_sub:i*N_sub,:)' + ...

(J_matrix*conj(meas_data2(1+(i-1)*N_sub:i*N_sub,:))*transpose(meas_data2(1+(i-

1)*N_sub:i*N_sub,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx2_sub_avg = Rxx2_sub_avg + Rxx2_sub(:,:,i);

end

else % Overlapping sub-arrays/sub_aperures

for i=1:num_sub_aperture

% Without any pointing mismatch

if (fb_averaging == 0)

Rxx1_sub(:,:,i) = 1/data_len*(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*...

meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)');

else

Rxx1_sub(:,:,i) = 1/(2*data_len)*(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*meas_data1(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)' +...

(J_matrix*conj(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*transpose(meas_data1(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*J_matrix));

end

Page 79: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

76

%Compute the Spatial Smoothing process

Rxx1_sub_avg = Rxx1_sub_avg + Rxx1_sub(:,:,i);

% With pointing mismatch

if (fb_averaging == 0)

Rxx2_sub(:,:,i) = 1/data_len*(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*...

meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)');

else

Rxx2_sub(:,:,i) = 1/(2*data_len)*(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*meas_data2(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)' +...

(J_matrix*conj(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*transpose(meas_data2(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx2_sub_avg = Rxx2_sub_avg + Rxx2_sub(:,:,i);

end

end

%Compute the average covariance matrix for no/with direction mismatch

Rxx1_sub_avg = (1/num_sub_aperture)*Rxx1_sub_avg;

Rxx2_sub_avg = (1/num_sub_aperture)*Rxx2_sub_avg;

%Compute inverse of covariance matrix without diagonal loading

Rxx1_inv = Rxx1\eye(N);

Rxx2_inv = Rxx2\eye(N);

%Compute inverse without diagonal loading for average of sub apertures

Rxx1_sub_inv = Rxx1_sub_avg\eye(N_sub);

Rxx2_sub_inv = Rxx2_sub_avg\eye(N_sub);

Rxx1_inv_dl = (Rxx1+diag_load)\eye(N);

Rxx2_inv_dl = (Rxx2+diag_load)\eye(N);

Rxx1_sub_inv_dl = (Rxx1_sub_avg+diag_load_sub)\eye(N_sub);

Rxx2_sub_inv_dl = (Rxx2_sub_avg+diag_load_sub)\eye(N_sub);

%Compute the MVDR Power Spectrum as shown in figure 2

Smvdr_xx1 = zeros(size(vv,2),1);

Smvdr_xx2 = zeros(size(vv,2),1);

for i = 1:size(vv,2)

Smvdr_xx1(i) = 1./(vv(:,i)'*Rxx1_inv*vv(:,i));

Smvdr_xx2(i) = 1./(vv(:,i)'*Rxx2_inv*vv(:,i));

end

Page 80: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

77

%Generate the MVDR weight vector without mismatch

w_mvdr1 = (vc'*Rxx1_inv/(vc'*Rxx1_inv*vc))';

w_mvdr1_avg = w_mvdr1_avg + w_mvdr1;

w_mvdr1_sub = (vc_sub'*Rxx1_sub_inv/(vc_sub'*Rxx1_sub_inv*vc_sub))';

w_mvdr1_sub_avg = w_mvdr1_sub_avg + w_mvdr1_sub;

w_mvdr1_dl = (vc'*Rxx1_inv_dl/(vc'*Rxx1_inv_dl*vc))';

w_mvdr1_dl_avg = w_mvdr1_dl_avg + w_mvdr1_dl;

w_mvdr1_sub_dl = (vc_sub'*Rxx1_sub_inv_dl/(vc_sub'*Rxx1_sub_inv_dl*vc_sub))';

w_mvdr1_sub_dl_avg = w_mvdr1_sub_dl_avg + w_mvdr1_sub_dl;

%Generate the MVDR weight vector with mismatch

w_mvdr2 = (vc'*Rxx2_inv/(vc'*Rxx2_inv*vc))';

w_mvdr2_avg = w_mvdr2_avg + w_mvdr2;

w_mvdr2_sub = (vc_sub'*Rxx2_sub_inv/(vc_sub'*Rxx2_sub_inv*vc_sub))';

w_mvdr2_sub_avg = w_mvdr2_sub_avg + w_mvdr2_sub;

w_mvdr2_dl = (vc'*Rxx2_inv_dl/(vc'*Rxx2_inv_dl*vc))';

w_mvdr2_dl_avg = w_mvdr2_dl_avg + w_mvdr2_dl;

w_mvdr2_sub_dl = (vc_sub'*Rxx2_sub_inv_dl/(vc_sub'*Rxx2_sub_inv_dl*vc_sub))';

w_mvdr2_sub_dl_avg = w_mvdr2_sub_dl_avg + w_mvdr2_sub_dl;

% Section for computing Robust MVDR ver 1 without/with direction mismatch

% No pointing mismatch

gamma_value = 1.0;

iter_flag = false;

iter_count = 0;

% Reset diag_load matrix back to an Identity matrix

diag_load = (1/load_factor)*diag_load;

while iter_flag == false

iter_count = iter_count + 1.0;

Rxx1_dl = (Rxx1_sub_avg + gamma_value*diag_load);

Rxx1_inv = inv(Rxx1_dl);

S_matrix = [dir_sv1 dir_sv2];

V_matrix = Rxx1_dl\S_matrix;

R_matrix = inv(S_matrix'*V_matrix);

r0 = abs(R_matrix(1,1));

Page 81: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

78

r1 = abs(R_matrix(2,2));

r2 = abs(R_matrix(2,1));

beta_angle = angle(R_matrix(1,2));

phi_angle = -beta_angle + pi;

if (r2/r0) > 1

rho_0 = r2/r0;

else

rho_0 = 1;

end

if (r2/r1) > 1

rho_1 = r2/r1;

else

rho_1 = 1;

end

w_mvdr1_r1_dl = V_matrix*R_matrix*[rho_0;rho_1*exp(1i*phi_angle)];

S_lcmv = [S_matrix v1 v2];

V_lcmv = Rxx1_dl\S_lcmv;

R_lcmv = inv(S_lcmv'*V_lcmv);

w_mvdr1_r1_lcmv_dl = V_lcmv*R_lcmv*[rho_0;rho_1*exp(1i*phi_angle);0;0];

constraint_check_fail = 0;

for num = 1:num_verify_angles

test_constraint = abs(w_mvdr1_r1_dl'*dir_sv_verify(:,num));

if test_constraint < 1.0

constraint_check_fail = constraint_check_fail + 1.0;

break;

end

end

if constraint_check_fail < 1.0

iter_flag = true;

else

gamma_value = gamma_gain*gamma_value;

end

end % End of iter_flag = false

w_mvdr1_r1_dl_avg = w_mvdr1_r1_dl_avg + w_mvdr1_r1_dl;

w_mvdr1_r1_lcmv_dl_avg = w_mvdr1_r1_lcmv_dl_avg + w_mvdr1_r1_lcmv_dl;

% With pointing mismatch

gamma_value = 1.0;

Page 82: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

79

iter_flag = false;

iter_count = 0;

while iter_flag == false

iter_count = iter_count + 1.0;

Rxx2_dl = (Rxx2_sub_avg + gamma_value*diag_load);

Rxx2_inv = inv(Rxx2_dl);

S_matrix = [dir_sv1 dir_sv2];

V_matrix = Rxx2_dl\S_matrix;

R_matrix = inv(S_matrix'*V_matrix);

r0 = abs(R_matrix(1,1));

r1 = abs(R_matrix(2,2));

r2 = abs(R_matrix(2,1));

beta_angle = angle(R_matrix(1,2));

phi_angle = -beta_angle + pi;

if (r2/r0) > 1

rho_0 = r2/r0;

else

rho_0 = 1;

end

if (r2/r1) > 1

rho_1 = r2/r1;

else

rho_1 = 1;

end

w_mvdr2_r1_dl = V_matrix*R_matrix*[rho_0;rho_1*exp(1i*phi_angle)];

S_lcmv = [S_matrix v1 v2];

V_lcmv = Rxx2_dl\S_lcmv;

R_lcmv = inv(S_lcmv'*V_lcmv);

w_mvdr2_r1_lcmv_dl = V_lcmv*R_lcmv*[rho_0;rho_1*exp(1i*phi_angle);0;0];

constraint_check_fail = 0;

for num = 1:num_verify_angles

test_constraint = abs(w_mvdr2_r1_dl'*dir_sv_verify(:,num));

if test_constraint < 1.0

constraint_check_fail = constraint_check_fail + 1.0;

break;

end

Page 83: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

80

end

if constraint_check_fail < 1.0

iter_flag = true;

else

gamma_value = gamma_gain*gamma_value;

end

end % End of iter_flag = false

w_mvdr2_r1_dl_avg = w_mvdr2_r1_dl_avg + w_mvdr2_r1_dl;

w_mvdr2_r1_lcmv_dl_avg = w_mvdr2_r1_lcmv_dl_avg + w_mvdr2_r1_lcmv_dl;

% End of section to compute the Robust MVDR ver 1

% Secton for computing Robust MVDR ver 2

diag_load = load_factor*diag_load;

% No pointing mismatch

aa1 = vc*vc';

steering_vector_matrix = aa1 - eps_loading*eye(N,N);

[Eig_vect_rob Eig_val_rob] = eig((Rxx1_sub_avg+diag_load)\steering_vector_matrix);

if (Eig_val_rob(1) > Eig_val_rob(end))

w_mvdr1_r2_dl = Eig_vect_rob(:,1);

else

w_mvdr1_r2_dl = Eig_vect_rob(:,end);

end

w_mvdr1_r2_dl_avg = w_mvdr1_r2_dl_avg + w_mvdr1_r2_dl;

% Define Directional constraints for Interferers

C_matrix = [v1 v2];

Proj_C_matrix = (C_matrix/(C_matrix'*C_matrix))*C_matrix';

w_mvdr1_r2_lcmv_dl = (eye(N,N) - Proj_C_matrix)*w_mvdr1_r2_dl;

w_mvdr1_r2_lcmv_dl_avg = w_mvdr1_r2_lcmv_dl_avg + w_mvdr1_r2_lcmv_dl;

% With pointing mismatch

aa1 = vc*vc';

steering_vector_matrix = aa1 - eps_loading*eye(N,N);

[Eig_vect_rob Eig_val_rob] = eig((Rxx2_sub_avg+diag_load)\steering_vector_matrix);

if (Eig_val_rob(1) > Eig_val_rob(end))

w_mvdr2_r2_dl = Eig_vect_rob(:,1);

Page 84: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

81

else

w_mvdr2_r2_dl = Eig_vect_rob(:,end);

end

w_mvdr2_r2_dl_avg = w_mvdr2_r2_dl_avg + w_mvdr2_r2_dl;

w_mvdr2_r2_lcmv_dl = (eye(N,N) - Proj_C_matrix)*w_mvdr2_r2_dl;

w_mvdr2_r2_lcmv_dl_avg = w_mvdr2_r2_lcmv_dl_avg + w_mvdr2_r2_lcmv_dl;

% End of section to compute the Robust MVDR ver 2

end % End of for k = 1:num_runs

% SECTION WITHOUT POINTING MISMATCH %

%Generate average weight vector without mismatch

w_mvdr1_avg = w_mvdr1_avg/num_runs;

w_mvdr1_sub_avg = w_mvdr1_sub_avg/num_runs;

w_mvdr1_dl_avg = w_mvdr1_dl_avg/num_runs;

w_mvdr1_sub_dl_avg = w_mvdr1_sub_dl_avg/num_runs;

w_mvdr1_r1_dl_avg = w_mvdr1_r1_dl_avg/num_runs;

w_mvdr1_r2_dl_avg = w_mvdr1_r2_dl_avg/num_runs;

w_mvdr1_r1_lcmv_dl_avg = w_mvdr1_r1_lcmv_dl_avg/num_runs;

w_mvdr1_r2_lcmv_dl_avg = w_mvdr1_r2_lcmv_dl_avg/num_runs;

%Generate average Beam pattern without mismatch

Beam_mvdr1 = w_mvdr1_avg'*vv;

Beam_mvdr1_sub = w_mvdr1_sub_avg'*vv_sub;

Beam_mvdr1_dl = w_mvdr1_dl_avg'*vv;

Beam_mvdr1_sub_dl = w_mvdr1_sub_dl_avg'*vv_sub;

Beam_mvdr1_r1_dl = w_mvdr1_r1_dl_avg'*vv;

Beam_mvdr1_r2_dl = w_mvdr1_r2_dl_avg'*vv;

Beam_mvdr1_r1_lcmv_dl = w_mvdr1_r1_lcmv_dl_avg'*vv;

Beam_mvdr1_r2_lcmv_dl = w_mvdr1_r2_lcmv_dl_avg'*vv;

%Normalise the Beam patterns

Beam_mvdr1 = Beam_mvdr1/max(Beam_mvdr1);

Beam_mvdr1_dl = Beam_mvdr1_dl/max(Beam_mvdr1_dl);

Beam_mvdr1_r1_dl = Beam_mvdr1_r1_dl/max(Beam_mvdr1_r1_dl);

Beam_mvdr1_r2_dl = Beam_mvdr1_r2_dl/max(Beam_mvdr1_r2_dl);

Beam_mvdr1_r1_lcmv_dl = Beam_mvdr1_r1_lcmv_dl/max(Beam_mvdr1_r1_lcmv_dl);

Beam_mvdr1_r2_lcmv_dl = Beam_mvdr1_r2_lcmv_dl/max(Beam_mvdr1_r2_lcmv_dl);

% SECTION WITH POINTING MISMATCH %

Page 85: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

82

%Generate average weight vector with mismatch

w_mvdr2_avg = w_mvdr2_avg/num_runs;

w_mvdr2_sub_avg = w_mvdr2_sub_avg/num_runs;

w_mvdr2_dl_avg = w_mvdr2_dl_avg/num_runs;

w_mvdr2_sub_dl_avg = w_mvdr2_sub_dl_avg/num_runs;

w_mvdr2_r1_dl_avg = w_mvdr2_r1_dl_avg/num_runs;

w_mvdr2_r2_dl_avg = w_mvdr2_r2_dl_avg/num_runs;

w_mvdr2_r1_lcmv_dl_avg = w_mvdr2_r1_lcmv_dl_avg/num_runs;

w_mvdr2_r2_lcmv_dl_avg = w_mvdr2_r2_lcmv_dl_avg/num_runs;

%Generate average Beam pattern with mismatch

Beam_mvdr2 = w_mvdr2_avg'*vv;

Beam_mvdr2_sub = w_mvdr2_sub_avg'*vv_sub;

Beam_mvdr2_dl = w_mvdr2_dl_avg'*vv;

Beam_mvdr2_sub_dl = w_mvdr2_sub_dl_avg'*vv_sub;

Beam_mvdr2_r1_dl = w_mvdr2_r1_dl_avg'*vv;

Beam_mvdr2_r2_dl = w_mvdr2_r2_dl_avg'*vv;

Beam_mvdr2_r1_lcmv_dl = w_mvdr2_r1_lcmv_dl_avg'*vv;

Beam_mvdr2_r2_lcmv_dl = w_mvdr2_r2_lcmv_dl_avg'*vv;

%Normalise the Beam patterns

Beam_mvdr2 = Beam_mvdr2/max(Beam_mvdr2);

Beam_mvdr2_dl = Beam_mvdr2_dl/max(Beam_mvdr2_dl);

Beam_mvdr2_r1_dl = Beam_mvdr2_r1_dl/max(Beam_mvdr2_r1_dl);

Beam_mvdr2_r2_dl = Beam_mvdr2_r2_dl/max(Beam_mvdr2_r2_dl);

Beam_mvdr2_r1_lcmv_dl = Beam_mvdr2_r1_lcmv_dl/max(Beam_mvdr2_r1_lcmv_dl);

Beam_mvdr2_r2_lcmv_dl = Beam_mvdr2_r2_lcmv_dl/max(Beam_mvdr2_r2_lcmv_dl);

%Compute the SINRo (output) for all the MVDR implementations

%Compute SINRo for ideal MVDR implementation with known Actual Covariance Matrix

INR_SI = [INR(1) 0;0, INR(2)];

CM_actual = VI*INR_SI*VI' + eye(N_sub); %Actual Interference + Noise Covariance Matrix

RM_actual = CM_actual + SNR*vs(:,2)*vs(:,2)'; %Actual Spectral Covariance Matrix

w_mvdr_ideal = (vs(:,2)'/(RM_actual)/(vs(:,2)'/RM_actual*vs(:,2)))';

Beam_mvdr_ideal = w_mvdr_ideal'*vv;

Beam_mvdr_ideal = Beam_mvdr_ideal/max(Beam_mvdr_ideal);

SINRo_mvdr_ideal(j) = ((w_mvdr_ideal'*vs(:,2))*(vs(:,2)'*w_mvdr_ideal)*SNR)/(w_mvdr_ideal'*CM_actual*w_mvdr_ideal);

%Compute average SNR and Sample Covariance Matrix (SCM)

% SNR_avg = signal*signal'/data_len;

% SCM_avg = ((noise + VI*[inter_1;inter_2])*(noise + VI*[inter_1;inter_2])')/data_len;

SNR_avg = SNR;

Page 86: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

83

SCM_avg = CM_actual;

%Compute SINRo for Standard MVDR (with DOA mismatch) computed using SCM

SINRo_mvdr_doa(j) = ((w_mvdr2_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_avg)*SNR_avg)/(w_mvdr2_avg'*SCM_avg*w_mvdr2_avg);

%Compute SINRo for Standard MVDR with DL (with DOA mismatch) computed using SCM

SINRo_mvdr_dl(j) =

((w_mvdr2_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_dl_avg)*SNR_avg)/(w_mvdr2_dl_avg'*SCM_avg*w_mvdr2_dl_avg);

%Compute SINRo for Rob MVDR v1 (with DOA mismatch) computed using SCM

SINRo_mvdr_r1(j) =

((w_mvdr2_r1_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r1_dl_avg)*SNR_avg)/(w_mvdr2_r1_dl_avg'*SCM_avg*w_mvdr2_r1_dl_avg);

%Compute SINRo for Rob MVDR v1 with LCMV (with DOA mismatch) computed using SCM

SINRo_mvdr_r1_lcmv(j) =

((w_mvdr2_r1_lcmv_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r1_lcmv_dl_avg)*SNR_avg)/(w_mvdr2_r1_lcmv_dl_avg'*SCM_avg*w_mvdr

2_r1_lcmv_dl_avg);

%Compute SINRo for Rob MVDR v2 (with DOA mismatch) computed using SCM

SINRo_mvdr_r2(j) =

((w_mvdr2_r2_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r2_dl_avg)*SNR_avg)/(w_mvdr2_r2_dl_avg'*SCM_avg*w_mvdr2_r2_dl_avg);

%Compute SINRo for Rob MVDR v2 with LCMV (with DOA mismatch) computed using SCM

SINRo_mvdr_r2_lcmv(j) =

((w_mvdr2_r2_lcmv_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r2_lcmv_dl_avg)*SNR_avg)/(w_mvdr2_r2_lcmv_dl_avg'*SCM_avg*w_mvdr

2_r2_lcmv_dl_avg);

end

figure(2)

plot(theta*180/pi,10*log10(abs(Smvdr_xx1)),'b',theta*180/pi,10*log10(abs(Smvdr_xx2)),'r');

title('MVDR PS of Signal + Interferers','Fontsize',13);

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('PSD (dB)','Fontsize',12)

grid;

h = legend('No mismatch','DOA mismatch',0);

set(h,'FontSize',6);

figure(3)

clf;

plot(theta*180/pi,10*log10(abs(Beam_mvdr1).^2),'b',theta*180/pi,10*log10(abs(Beam_mvdr1_dl).^2),'r');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr1_r1_dl).^2),'g',theta*180/pi,10*log10(abs(Beam_mvdr1_r2_dl).^2),'m');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr1_r1_lcmv_dl).^2),'c',theta*180/pi,10*log10(abs(Beam_mvdr1_r2_lcmv_dl).^2),'k--');

plot(180/pi*theta_inter(1)*[1 1],[-120 0],'m-');

plot(180/pi*theta_inter(2)*[1 1],[-120 0],'m-');

Page 87: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

84

title('Average Beam Pattern (No pointing mismatch)','Fontsize',13);

grid on

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('Beam pattern (dB)','Fontsize',14)

h = legend('Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Southwest');

figure(4)

clf;

plot(theta*180/pi,10*log10(abs(Beam_mvdr_ideal).^2),'y--');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2).^2),'b',theta*180/pi,10*log10(abs(Beam_mvdr2_dl).^2),'r');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2_r1_dl).^2),'g',theta*180/pi,10*log10(abs(Beam_mvdr2_r2_dl).^2),'m');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2_r1_lcmv_dl).^2),'c',theta*180/pi,10*log10(abs(Beam_mvdr2_r2_lcmv_dl).^2),'k--');

plot(180/pi*theta_inter(1)*[1 1],[-120 0],'m-');

plot(180/pi*theta_inter(2)*[1 1],[-120 0],'m-');

title('Average Beam Pattern (With pointing mismatch)','Fontsize',13);

grid on

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('Beam pattern (dB)','Fontsize',14)

h = legend('Ideal','Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Southwest');

figure(5)

clf;

plot(data_len_vector,10*log10(abs(SINRo_mvdr_ideal)),'--',data_len_vector,10*log10(abs(SINRo_mvdr_doa)),'^--');

hold on

plot(data_len_vector,10*log10(abs(SINRo_mvdr_dl)),'v--',data_len_vector,10*log10(abs(SINRo_mvdr_r1)),'x--');

hold on

plot(data_len_vector,10*log10(abs(SINRo_mvdr_r2)),'o--',data_len_vector,10*log10(abs(SINRo_mvdr_r1_lcmv)),'s--');

hold on

plot(data_len_vector,10*log10(abs(SINRo_mvdr_r2_lcmv)),'*--');

title('SINR versus number of snapshots for SNR = 10 dB','Fontsize',13);

grid on

xlabel('Number of snapshots','Fontsize',12)

ylabel('SINR (dB)','Fontsize',14)

h = legend('Ideal','Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Northwest');

Page 88: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

85

Part 2 Example 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Simulation for Robust MVDR investigation

%

% Investigate for the following

% 1) Diagonal Loading

% 2) Robust MVDR (Rob MVDR1) Implementation as described in Ref[1]

% 3) Robust MVDR (Rob MVDR2) Implementation as described in Ref[2]

% 4) LCMV adaptations on the locations of interferers for both Rob MVDR1

% and Rob MVDR1

%

% Scenario 1: SNR = -20 to 30 dB, UI1 = 30 deg, INR1 = 40dB, UI2 = 75 deg, INR2 = 20dB

%

% Written By Peng Seng Tan

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear all

% close all

pack

clc

N = 6;%10; % Num of array elements

rng('default');

fb_averaging = 0; % To enable/disable forward backward averaging

overlap = 2; % Set value to 0, 1 or 2

if (overlap == 0) % The subarrays are non overlapping

if rem(N,5) == 0

N_sub = 5;

elseif rem(N,4) == 0

N_sub = 4;

elseif rem(N,3) == 0

N_sub = 3;

elseif rem(N,2) == 0

N_sub = 2;

else

N_sub = N;

end

num_sub_aperture = round(N/N_sub); % Number of subarrays

elseif (overlap == 1) % The subarrays are overlapping

N_sub = 4;

overlap = 6;

num_sub_aperture = fix((N-overlap)/(N_sub-overlap));

else % No subarrays implemented

N_sub = N;

Page 89: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

86

num_sub_aperture = round(N/N_sub); % Number of subarrays

end

d = 0.5; % D = 0.5*wavelength

n = ceil(-(N-1)/2:(N)/2)';

n_sub = ceil(-(N_sub-1)/2:(N_sub)/2)';

data_len = round(N*N); % Number of measured snapshots in time

theta = pi*(-0.5:0.0005:0.5); % Visible Theta space with convention of broadside = 0 degrees

vv = exp(1i*n*pi*sin(theta)); % Array manifold of steering vectors

vv_sub = exp(1i*n_sub*pi*sin(theta)); % Array manifold of SV (sub_apert)

theta_c = 1/180*pi*0;%0; % Desired signal direction in radians

theta_s = 1/180*pi*[0 2.00];%[0 2.0]; % Actual signal direction in radians

theta_inter = 1/180*pi*[-60 60]; % Direction of Interferers in radians

% theta_inter = 1/180*pi*[-52 57]; % Direction of Interferers in radians

% Section for Robust MVDR ver 1

angle_constraint = 3.0;%3.0;

angle_left = 1/180*pi*(-angle_constraint); % -angle_constraint degrees

angle_right = 1/180*pi*(angle_constraint); % +angle_constraint degrees

theta_left = theta_c + angle_left;

theta_right = theta_c + angle_right;

num_verify_angles = 5;

angle_verify = linspace(theta_left,theta_right,num_verify_angles);

gamma_gain = 2.0; %1.1;

% Creating the Array steering vectors

dir_sv1 = exp(1i*pi*n*sin(theta_left));

dir_sv2 = exp(1i*pi*n*sin(theta_right));

dir_sv_verify = zeros(N_sub,num_verify_angles);

for num = 1:num_verify_angles

dir_sv_verify(:,num) = exp(1i*pi*n*sin(angle_verify(num)));

end

% End of section for Robust MVDR ver 1

% Section for robust MVDR ver 2

% eps_loading = round(N_sub/2);

eps_loading = 3.0473;%4.7345; % Value is obtained from Ref[1]

% End of section for Robust MVDR ver 2

% Creating the Array steering vectors of signal and interferers

vc = exp(1i*pi*n*sin(theta_c)); % Steering vector of desired signal

vc_sub = exp(1i*pi*n_sub*sin(theta_c)); % SV of desired signal (sub_aperture)

vs = exp(1i*pi*n*sin(theta_s)); % Steering vector of actual signal

Page 90: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

87

v1 = exp(1i*n*pi*sin(theta_inter(1))); % Steering vector of interferer 1

v2 = exp(1i*n*pi*sin(theta_inter(2))); % Steering vector of interferer 2

VI = [v1 v2]; % Matrix of Steering vectors of Interferers

% wj = [0.6*pi 0.5*pi]; % Normalized Elect angular freq of Interferers (sinusoids)

wj = [0.30*pi 0.10*pi]; % Normalized Elect angular freq of Interferers (sinusoids)

% wj = [0.20*pi 0.20*pi]; % Normalized Elect angular freq of Interferers (sinusoids)

wsig = 0.2*pi; % Normalized Elect angular freq of actual signal (sinusoid)

%Defining the Signal and Interferers power

SNR_vector = 10.^([-20 -15 -10 -5 0 5 10 15 20 25 30]/10);

% SNR_vector = 10.^([-20 -15 -10 -5 0 5]/10);

INR = 10.^([40 40]/10);

load_factor = 10;%10;

num_runs = 100;%200; % Set the number of trial runs

% Initialise the variables for the various SINR parameters

num_plot_points = length(SNR_vector);

SINRo_mvdr_ideal = zeros(num_plot_points,1);

SINRo_mvdr_doa = zeros(num_plot_points,1);

SINRo_mvdr_dl = zeros(num_plot_points,1);

SINRo_mvdr_r1 = zeros(num_plot_points,1);

SINRo_mvdr_r1_lcmv = zeros(num_plot_points,1);

SINRo_mvdr_r2 = zeros(num_plot_points,1);

SINRo_mvdr_r2_lcmv = zeros(num_plot_points,1);

SINRo_mvdr_nodoa = zeros(num_plot_points,1);

SINRo_mvdr_nodl = zeros(num_plot_points,1);

SINRo_mvdr_nor1 = zeros(num_plot_points,1);

SINRo_mvdr_r1_nolcmv = zeros(num_plot_points,1);

SINRo_mvdr_nor2 = zeros(num_plot_points,1);

SINRo_mvdr_r2_nolcmv = zeros(num_plot_points,1);

for j = 1:length(SNR_vector)

SNR = SNR_vector(j);

% Initialise the average weight vectors

w_mvdr1_avg = zeros(N,1);

w_mvdr1_sub_avg = zeros(N_sub,1);

w_mvdr1_dl_avg = zeros(N,1);

w_mvdr1_sub_dl_avg = zeros(N_sub,1);

w_mvdr2_avg = zeros(N,1);

Page 91: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

88

w_mvdr2_sub_avg = zeros(N_sub,1);

w_mvdr2_dl_avg = zeros(N,1);

w_mvdr2_sub_dl_avg = zeros(N_sub,1);

w_mvdr1_r1_dl_avg = zeros(N,1);

w_mvdr2_r1_dl_avg = zeros(N,1);

w_mvdr1_r2_dl_avg = zeros(N,1);

w_mvdr2_r2_dl_avg = zeros(N,1);

w_mvdr1_r1_lcmv_dl_avg = zeros(N,1);

w_mvdr2_r1_lcmv_dl_avg = zeros(N,1);

w_mvdr1_r2_lcmv_dl_avg = zeros(N,1);

w_mvdr2_r2_lcmv_dl_avg = zeros(N,1);

for k = 1:num_runs

% This section is for signal and interferers generation

%Generate the White Gaussian Noise signal

noise = (1/sqrt(2))*randn(1,data_len*N) + 1i*(1/sqrt(2))*randn(1,data_len*N);

%Generate a Sinusoidal desired signal

signal = sqrt(SNR*var(noise))*exp(-1i*wsig*[1:data_len]);

% %Generate a AutoRegressive signal with order 2

% a1 = 1.9114; % Coefficient 1 of 2nd order Autoregressive model

% a2 = -0.95; % Coefficient 2 of 2nd order Autoregressive model

% order_ar = length([a1 a2]);

% signal = zeros(1,data_len+2);

%

% for i=3:data_len+2

% signal(i) = noise(i) + a1*signal(i-1) + a2*signal(i-2);

% end

% signal = signal(3:end);

% signal = sqrt(SNR*var(noise)/var(signal))*signal; %Make SNR to be 0dB

% Generation of Interferer signals

inter_1 = sqrt(INR(1)*var(noise))*exp(-1i*wj(1)*(1:data_len));

inter_2 = sqrt(INR(2)*var(noise))*exp(-1i*wj(2)*(1:data_len));

num_interferer = 2;

% %Start of Debug Section

% inter_total = inter_1 + inter_2 + noise(1:data_len); %Total Interfering signals + noise

% % inter_total = inter_1 + inter_2; %Total Interfering signals

Page 92: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

89

%

% column_len = min(50,round(0.25*data_len));

% num_col_x = data_len-column_len;

%

% x1 = zeros(column_len,num_col_x);

% y1 = zeros(column_len,num_col_x);

%

% for i=1:num_col_x

% x1(:,i) = signal(i:i+column_len-1);

% y1(:,i) = inter_total(i:i+column_len-1);

% end

%

% x1 = flipud(x1);

% y1 = flipud(y1);

%

% Rxx_test = 1/num_col_x*(x1*x1'); %Autocorrelation matrix of signal

% Ryy_test = 1/num_col_x*(y1*y1'); %Autocorrelation matrix of interferers

%

% %Define num of frequency samples

% up_factor = 20; %Frequency oversampling factor

% freq_samp = up_factor*column_len; %Use freq_samp number of frequency bins

% u = -1.0+(1/freq_samp):1/freq_samp:1.0; %Normalised freq location for each freq sample

%

% %Create the array manifold vector for length(u) number of freq samples

% n_test = (0:column_len-1)'; %Assume ULA locations at lambda/2 spacing

% vv_test = exp(1i*n_test*pi*u);

%

% Rxx_inv = Rxx_test\eye(column_len,column_len);

% Smvdr_xx = zeros(size(vv_test,2),1);

% Ryy_inv = Ryy_test\eye(column_len,column_len);

% Smvdr_yy = zeros(size(vv_test,2),1);

%

% for i = 1:size(vv_test,2)

% Smvdr_xx(i) = 1./(vv_test(:,i)'*Rxx_inv*vv_test(:,i));

% Smvdr_yy(i) = 1./(vv_test(:,i)'*Ryy_inv*vv_test(:,i));

% end

%

% figure(1)

% plot(u,10*log10(abs(Smvdr_xx)),'b',u,10*log10(abs(Smvdr_yy)),'r');

% title('MVDR PS of Signal + Interferers (Time Domain Snapshots)','Fontsize',13);

% xlabel('{\itNormalized Angular Frequency}','Fontsize',12)

% ylabel('PSD (dB)','Fontsize',12)

% grid;

% h = legend('Signal', 'Interferers + Noise',0);

% set(h,'FontSize',7);

% %End of Debug section

Page 93: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

90

%Define the Diagonal Loading matrix

diag_load = load_factor * var(noise) * diag(ones(N,1),0); %Compute diag loading

diag_load_sub = load_factor * var(noise) * diag(ones(N_sub,1),0); %Compute diag loading

%Arrange data/noise into snapshots to represent measurements from array

noise = reshape(noise,N,data_len);

meas_data1 = vs(:,1)*signal + noise + VI*[inter_1;inter_2]; %No DOA mismatch

meas_data2 = vs(:,2)*signal + noise + VI*[inter_1;inter_2]; %With DOA mismatch

Rxx1 = (1/data_len)*(meas_data1*meas_data1'); %Sample Covariance Matrix of measured data

Rxx2 = (1/data_len)*(meas_data2*meas_data2'); %Sample Covariance Matrix with DOA mismatch

%Divide Rxx into submatrix for subarrays

Rxx1_sub = zeros(N_sub,N_sub,num_sub_aperture);

Rxx1_sub_avg = zeros(N_sub);

Rxx2_sub = zeros(N_sub,N_sub,num_sub_aperture);

Rxx2_sub_avg = zeros(N_sub);

%Define exchange matrix for Forward Backward Averaging for subarrays

J_matrix = fliplr(eye(N_sub));

if (overlap == 0) % No overlapping sub-arrays/sub_apertures

for i=1:num_sub_aperture

% Without any pointing mismatch

if (fb_averaging == 0) % No forward-backward averaging

Rxx1_sub(:,:,i) = 1/data_len*(meas_data1(1+(i-1)*N_sub:i*N_sub,:)*meas_data1(1+(i-1)*N_sub:i*N_sub,:)');

else

Rxx1_sub(:,:,i) = 1/(2*data_len)*(meas_data1(1+(i-1)*N_sub:i*N_sub,:)*meas_data1(1+(i-1)*N_sub:i*N_sub,:)' + ...

(J_matrix*conj(meas_data1(1+(i-1)*N_sub:i*N_sub,:))*transpose(meas_data1(1+(i-

1)*N_sub:i*N_sub,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx1_sub_avg = Rxx1_sub_avg + Rxx1_sub(:,:,i);

% With pointing mismatch

if (fb_averaging == 0)

Rxx2_sub(:,:,i) = 1/data_len*(meas_data2(1+(i-1)*N_sub:i*N_sub,:)*meas_data2(1+(i-1)*N_sub:i*N_sub,:)');

else

Rxx2_sub(:,:,i) = 1/(2*data_len)*(meas_data2(1+(i-1)*N_sub:i*N_sub,:)*meas_data2(1+(i-1)*N_sub:i*N_sub,:)' + ...

(J_matrix*conj(meas_data2(1+(i-1)*N_sub:i*N_sub,:))*transpose(meas_data2(1+(i-

1)*N_sub:i*N_sub,:))*J_matrix));

end

Page 94: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

91

%Compute the Spatial Smoothing process

Rxx2_sub_avg = Rxx2_sub_avg + Rxx2_sub(:,:,i);

end

else % Overlapping sub-arrays/sub_aperures

for i=1:num_sub_aperture

% Without any pointing mismatch

if (fb_averaging == 0)

Rxx1_sub(:,:,i) = 1/data_len*(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*...

meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)');

else

Rxx1_sub(:,:,i) = 1/(2*data_len)*(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*meas_data1(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)' +...

(J_matrix*conj(meas_data1(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*transpose(meas_data1(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx1_sub_avg = Rxx1_sub_avg + Rxx1_sub(:,:,i);

% With pointing mismatch

if (fb_averaging == 0)

Rxx2_sub(:,:,i) = 1/data_len*(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*...

meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)');

else

Rxx2_sub(:,:,i) = 1/(2*data_len)*(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)*meas_data2(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:)' +...

(J_matrix*conj(meas_data2(1+(i-1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*transpose(meas_data2(1+(i-

1)*N_sub-(i-1)*overlap:i*N_sub-(i-1)*overlap,:))*J_matrix));

end

%Compute the Spatial Smoothing process

Rxx2_sub_avg = Rxx2_sub_avg + Rxx2_sub(:,:,i);

end

end

%Compute the average covariance matrix for no/with direction mismatch

Rxx1_sub_avg = (1/num_sub_aperture)*Rxx1_sub_avg;

Rxx2_sub_avg = (1/num_sub_aperture)*Rxx2_sub_avg;

%Compute inverse of covariance matrix without diagonal loading

Rxx1_inv = Rxx1\eye(N);

Rxx2_inv = Rxx2\eye(N);

%Compute inverse without diagonal loading for average of sub apertures

Rxx1_sub_inv = Rxx1_sub_avg\eye(N_sub);

Page 95: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

92

Rxx2_sub_inv = Rxx2_sub_avg\eye(N_sub);

Rxx1_inv_dl = (Rxx1+diag_load)\eye(N);

Rxx2_inv_dl = (Rxx2+diag_load)\eye(N);

Rxx1_sub_inv_dl = (Rxx1_sub_avg+diag_load_sub)\eye(N_sub);

Rxx2_sub_inv_dl = (Rxx2_sub_avg+diag_load_sub)\eye(N_sub);

%Compute the MVDR Power Spectrum as shown in figure 2

Smvdr_xx1 = zeros(size(vv,2),1);

Smvdr_xx2 = zeros(size(vv,2),1);

for i = 1:size(vv,2)

Smvdr_xx1(i) = 1./(vv(:,i)'*Rxx1_inv*vv(:,i));

Smvdr_xx2(i) = 1./(vv(:,i)'*Rxx2_inv*vv(:,i));

end

%Generate the MVDR weight vector without mismatch

w_mvdr1 = (vc'*Rxx1_inv/(vc'*Rxx1_inv*vc))';

w_mvdr1_avg = w_mvdr1_avg + w_mvdr1;

w_mvdr1_sub = (vc_sub'*Rxx1_sub_inv/(vc_sub'*Rxx1_sub_inv*vc_sub))';

w_mvdr1_sub_avg = w_mvdr1_sub_avg + w_mvdr1_sub;

w_mvdr1_dl = (vc'*Rxx1_inv_dl/(vc'*Rxx1_inv_dl*vc))';

w_mvdr1_dl_avg = w_mvdr1_dl_avg + w_mvdr1_dl;

w_mvdr1_sub_dl = (vc_sub'*Rxx1_sub_inv_dl/(vc_sub'*Rxx1_sub_inv_dl*vc_sub))';

w_mvdr1_sub_dl_avg = w_mvdr1_sub_dl_avg + w_mvdr1_sub_dl;

%Generate the MVDR weight vector with mismatch

w_mvdr2 = (vc'*Rxx2_inv/(vc'*Rxx2_inv*vc))';

w_mvdr2_avg = w_mvdr2_avg + w_mvdr2;

w_mvdr2_sub = (vc_sub'*Rxx2_sub_inv/(vc_sub'*Rxx2_sub_inv*vc_sub))';

w_mvdr2_sub_avg = w_mvdr2_sub_avg + w_mvdr2_sub;

w_mvdr2_dl = (vc'*Rxx2_inv_dl/(vc'*Rxx2_inv_dl*vc))';

w_mvdr2_dl_avg = w_mvdr2_dl_avg + w_mvdr2_dl;

w_mvdr2_sub_dl = (vc_sub'*Rxx2_sub_inv_dl/(vc_sub'*Rxx2_sub_inv_dl*vc_sub))';

w_mvdr2_sub_dl_avg = w_mvdr2_sub_dl_avg + w_mvdr2_sub_dl;

% Section for computing Robust MVDR ver 1 without/with direction mismatch

% No pointing mismatch

gamma_value = 1.0;

iter_flag = false;

Page 96: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

93

iter_count = 0;

% Reset diag_load matrix back to an Identity matrix

diag_load = (1/load_factor)*diag_load;

while iter_flag == false

iter_count = iter_count + 1.0;

Rxx1_dl = (Rxx1_sub_avg + gamma_value*diag_load);

Rxx1_inv = inv(Rxx1_dl);

S_matrix = [dir_sv1 dir_sv2];

V_matrix = Rxx1_dl\S_matrix;

R_matrix = inv(S_matrix'*V_matrix);

r0 = abs(R_matrix(1,1));

r1 = abs(R_matrix(2,2));

r2 = abs(R_matrix(2,1));

beta_angle = angle(R_matrix(1,2));

phi_angle = -beta_angle + pi;

if (r2/r0) > 1

rho_0 = r2/r0;

else

rho_0 = 1;

end

if (r2/r1) > 1

rho_1 = r2/r1;

else

rho_1 = 1;

end

w_mvdr1_r1_dl = V_matrix*R_matrix*[rho_0;rho_1*exp(1i*phi_angle)];

S_lcmv = [S_matrix v1 v2];

V_lcmv = Rxx1_dl\S_lcmv;

R_lcmv = inv(S_lcmv'*V_lcmv);

w_mvdr1_r1_lcmv_dl = V_lcmv*R_lcmv*[rho_0;rho_1*exp(1i*phi_angle);0;0];

constraint_check_fail = 0;

for num = 1:num_verify_angles

test_constraint = abs(w_mvdr1_r1_dl'*dir_sv_verify(:,num));

if test_constraint < 1.0

constraint_check_fail = constraint_check_fail + 1.0;

Page 97: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

94

break;

end

end

if constraint_check_fail < 1.0

iter_flag = true;

else

gamma_value = gamma_gain*gamma_value;

end

end % End of iter_flag = false

w_mvdr1_r1_dl_avg = w_mvdr1_r1_dl_avg + w_mvdr1_r1_dl;

w_mvdr1_r1_lcmv_dl_avg = w_mvdr1_r1_lcmv_dl_avg + w_mvdr1_r1_lcmv_dl;

% With pointing mismatch

gamma_value = 1.0;

iter_flag = false;

iter_count = 0;

while iter_flag == false

iter_count = iter_count + 1.0;

Rxx2_dl = (Rxx2_sub_avg + gamma_value*diag_load);

Rxx2_inv = inv(Rxx2_dl);

S_matrix = [dir_sv1 dir_sv2];

V_matrix = Rxx2_dl\S_matrix;

R_matrix = inv(S_matrix'*V_matrix);

r0 = abs(R_matrix(1,1));

r1 = abs(R_matrix(2,2));

r2 = abs(R_matrix(2,1));

beta_angle = angle(R_matrix(1,2));

phi_angle = -beta_angle + pi;

if (r2/r0) > 1

rho_0 = r2/r0;

else

rho_0 = 1;

end

if (r2/r1) > 1

rho_1 = r2/r1;

else

rho_1 = 1;

Page 98: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

95

end

w_mvdr2_r1_dl = V_matrix*R_matrix*[rho_0;rho_1*exp(1i*phi_angle)];

S_lcmv = [S_matrix v1 v2];

V_lcmv = Rxx2_dl\S_lcmv;

R_lcmv = inv(S_lcmv'*V_lcmv);

w_mvdr2_r1_lcmv_dl = V_lcmv*R_lcmv*[rho_0;rho_1*exp(1i*phi_angle);0;0];

constraint_check_fail = 0;

for num = 1:num_verify_angles

test_constraint = abs(w_mvdr2_r1_dl'*dir_sv_verify(:,num));

if test_constraint < 1.0

constraint_check_fail = constraint_check_fail + 1.0;

break;

end

end

if constraint_check_fail < 1.0

iter_flag = true;

else

gamma_value = gamma_gain*gamma_value;

end

end % End of iter_flag = false

w_mvdr2_r1_dl_avg = w_mvdr2_r1_dl_avg + w_mvdr2_r1_dl;

w_mvdr2_r1_lcmv_dl_avg = w_mvdr2_r1_lcmv_dl_avg + w_mvdr2_r1_lcmv_dl;

% End of section to compute the Robust MVDR ver 1

% Secton for computing Robust MVDR ver 2

diag_load = load_factor*diag_load;

% No pointing mismatch

aa1 = vc*vc';

steering_vector_matrix = aa1 - eps_loading*eye(N,N);

[Eig_vect_rob Eig_val_rob] = eig((Rxx1_sub_avg+diag_load)\steering_vector_matrix);

% tmp1 = diag(Eig_val_rob);

% [~, tmp3] = sort(real(tmp1));

%

% w_mvdr1_r2_dl = Eig_vect_rob(:,tmp3(end));

if (Eig_val_rob(1) > Eig_val_rob(end))

Page 99: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

96

w_mvdr1_r2_dl = Eig_vect_rob(:,1);

else

w_mvdr1_r2_dl = Eig_vect_rob(:,end);

end

w_mvdr1_r2_dl_avg = w_mvdr1_r2_dl_avg + w_mvdr1_r2_dl;

% Define Directional constraints for Interferers

C_matrix = [v1 v2];

Proj_C_matrix = (C_matrix/(C_matrix'*C_matrix))*C_matrix';

w_mvdr1_r2_lcmv_dl = (eye(N,N) - Proj_C_matrix)*w_mvdr1_r2_dl;

w_mvdr1_r2_lcmv_dl_avg = w_mvdr1_r2_lcmv_dl_avg + w_mvdr1_r2_lcmv_dl;

% With pointing mismatch

aa1 = vc*vc';

steering_vector_matrix = aa1 - eps_loading*eye(N,N);

[Eig_vect_rob Eig_val_rob] = eig((Rxx2_sub_avg+diag_load)\steering_vector_matrix);

% tmp1 = diag(Eig_val_rob);

% [~, tmp3] = sort(real(tmp1));

%

% w_mvdr2_r2_dl = Eig_vect_rob(:,tmp3(end));

if (Eig_val_rob(1) > Eig_val_rob(end))

w_mvdr2_r2_dl = Eig_vect_rob(:,1);

else

w_mvdr2_r2_dl = Eig_vect_rob(:,end);

end

w_mvdr2_r2_dl_avg = w_mvdr2_r2_dl_avg + w_mvdr2_r2_dl;

w_mvdr2_r2_lcmv_dl = (eye(N,N) - Proj_C_matrix)*w_mvdr2_r2_dl;

w_mvdr2_r2_lcmv_dl_avg = w_mvdr2_r2_lcmv_dl_avg + w_mvdr2_r2_lcmv_dl;

% End of section to compute the Robust MVDR ver 2

end % End of for k = 1:num_runs

% SECTION WITHOUT POINTING MISMATCH %

%Generate average weight vector without mismatch

w_mvdr1_avg = w_mvdr1_avg/num_runs;

w_mvdr1_sub_avg = w_mvdr1_sub_avg/num_runs;

w_mvdr1_dl_avg = w_mvdr1_dl_avg/num_runs;

w_mvdr1_sub_dl_avg = w_mvdr1_sub_dl_avg/num_runs;

Page 100: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

97

w_mvdr1_r1_dl_avg = w_mvdr1_r1_dl_avg/num_runs;

w_mvdr1_r2_dl_avg = w_mvdr1_r2_dl_avg/num_runs;

w_mvdr1_r1_lcmv_dl_avg = w_mvdr1_r1_lcmv_dl_avg/num_runs;

w_mvdr1_r2_lcmv_dl_avg = w_mvdr1_r2_lcmv_dl_avg/num_runs;

%Generate average Beam pattern without mismatch

Beam_mvdr1 = w_mvdr1_avg'*vv;

Beam_mvdr1_sub = w_mvdr1_sub_avg'*vv_sub;

Beam_mvdr1_dl = w_mvdr1_dl_avg'*vv;

Beam_mvdr1_sub_dl = w_mvdr1_sub_dl_avg'*vv_sub;

Beam_mvdr1_r1_dl = w_mvdr1_r1_dl_avg'*vv;

Beam_mvdr1_r2_dl = w_mvdr1_r2_dl_avg'*vv;

Beam_mvdr1_r1_lcmv_dl = w_mvdr1_r1_lcmv_dl_avg'*vv;

Beam_mvdr1_r2_lcmv_dl = w_mvdr1_r2_lcmv_dl_avg'*vv;

%Normalise the Beam patterns

Beam_mvdr1 = Beam_mvdr1/max(Beam_mvdr1);

Beam_mvdr1_dl = Beam_mvdr1_dl/max(Beam_mvdr1_dl);

Beam_mvdr1_r1_dl = Beam_mvdr1_r1_dl/max(Beam_mvdr1_r1_dl);

Beam_mvdr1_r2_dl = Beam_mvdr1_r2_dl/max(Beam_mvdr1_r2_dl);

Beam_mvdr1_r1_lcmv_dl = Beam_mvdr1_r1_lcmv_dl/max(Beam_mvdr1_r1_lcmv_dl);

Beam_mvdr1_r2_lcmv_dl = Beam_mvdr1_r2_lcmv_dl/max(Beam_mvdr1_r2_lcmv_dl);

% SECTION WITH POINTING MISMATCH %

%Generate average weight vector with mismatch

w_mvdr2_avg = w_mvdr2_avg/num_runs;

w_mvdr2_sub_avg = w_mvdr2_sub_avg/num_runs;

w_mvdr2_dl_avg = w_mvdr2_dl_avg/num_runs;

w_mvdr2_sub_dl_avg = w_mvdr2_sub_dl_avg/num_runs;

w_mvdr2_r1_dl_avg = w_mvdr2_r1_dl_avg/num_runs;

w_mvdr2_r2_dl_avg = w_mvdr2_r2_dl_avg/num_runs;

w_mvdr2_r1_lcmv_dl_avg = w_mvdr2_r1_lcmv_dl_avg/num_runs;

w_mvdr2_r2_lcmv_dl_avg = w_mvdr2_r2_lcmv_dl_avg/num_runs;

%Generate average Beam pattern with mismatch

Beam_mvdr2 = w_mvdr2_avg'*vv;

Beam_mvdr2_sub = w_mvdr2_sub_avg'*vv_sub;

Beam_mvdr2_dl = w_mvdr2_dl_avg'*vv;

Beam_mvdr2_sub_dl = w_mvdr2_sub_dl_avg'*vv_sub;

Beam_mvdr2_r1_dl = w_mvdr2_r1_dl_avg'*vv;

Beam_mvdr2_r2_dl = w_mvdr2_r2_dl_avg'*vv;

Page 101: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

98

Beam_mvdr2_r1_lcmv_dl = w_mvdr2_r1_lcmv_dl_avg'*vv;

Beam_mvdr2_r2_lcmv_dl = w_mvdr2_r2_lcmv_dl_avg'*vv;

%Normalise the Beam patterns

Beam_mvdr2 = Beam_mvdr2/max(Beam_mvdr2);

Beam_mvdr2_dl = Beam_mvdr2_dl/max(Beam_mvdr2_dl);

Beam_mvdr2_r1_dl = Beam_mvdr2_r1_dl/max(Beam_mvdr2_r1_dl);

Beam_mvdr2_r2_dl = Beam_mvdr2_r2_dl/max(Beam_mvdr2_r2_dl);

Beam_mvdr2_r1_lcmv_dl = Beam_mvdr2_r1_lcmv_dl/max(Beam_mvdr2_r1_lcmv_dl);

Beam_mvdr2_r2_lcmv_dl = Beam_mvdr2_r2_lcmv_dl/max(Beam_mvdr2_r2_lcmv_dl);

%Compute the SINRo (output) for all the MVDR implementations

%Compute SINRo for ideal MVDR implementation with known Actual Covariance Matrix

INR_SI = [INR(1) 0;0, INR(2)];

CM_actual = VI*INR_SI*VI' + eye(N_sub); %Actual Interference + Noise Covariance Matrix

RM_actual = CM_actual + SNR*vs(:,2)*vs(:,2)'; %Actual Spectral Covariance Matrix

w_mvdr_ideal = (vs(:,2)'/(RM_actual)/(vs(:,2)'/RM_actual*vs(:,2)))';

Beam_mvdr_ideal = w_mvdr_ideal'*vv;

Beam_mvdr_ideal = Beam_mvdr_ideal/max(Beam_mvdr_ideal);

SINRo_mvdr_ideal(j) = ((w_mvdr_ideal'*vs(:,2))*(vs(:,2)'*w_mvdr_ideal)*SNR)/(w_mvdr_ideal'*CM_actual*w_mvdr_ideal);

%Compute average SNR and Sample Covariance Matrix (SCM)

% SNR_avg = signal*signal'/data_len;

% SCM_avg = ((noise + VI*[inter_1;inter_2])*(noise + VI*[inter_1;inter_2])')/data_len;

SNR_avg = SNR;

SCM_avg = CM_actual;

% This section computes SINR with DOA mismatch

%Compute SINRo for Standard MVDR (with DOA mismatch) computed using SCM

SINRo_mvdr_doa(j) = ((w_mvdr2_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_avg)*SNR_avg)/(w_mvdr2_avg'*SCM_avg*w_mvdr2_avg);

%Compute SINRo for Standard MVDR with DL (with DOA mismatch) computed using SCM

SINRo_mvdr_dl(j) =

((w_mvdr2_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_dl_avg)*SNR_avg)/(w_mvdr2_dl_avg'*SCM_avg*w_mvdr2_dl_avg);

%Compute SINRo for Rob MVDR v1 (with DOA mismatch) computed using SCM

SINRo_mvdr_r1(j) =

((w_mvdr2_r1_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r1_dl_avg)*SNR_avg)/(w_mvdr2_r1_dl_avg'*SCM_avg*w_mvdr2_r1_dl_avg);

%Compute SINRo for Rob MVDR v1 with LCMV (with DOA mismatch) computed using SCM

SINRo_mvdr_r1_lcmv(j) =

((w_mvdr2_r1_lcmv_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r1_lcmv_dl_avg)*SNR_avg)/(w_mvdr2_r1_lcmv_dl_avg'*SCM_avg*w_mvdr

2_r1_lcmv_dl_avg);

%Compute SINRo for Rob MVDR v2 (with DOA mismatch) computed using SCM

Page 102: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

99

SINRo_mvdr_r2(j) =

((w_mvdr2_r2_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r2_dl_avg)*SNR_avg)/(w_mvdr2_r2_dl_avg'*SCM_avg*w_mvdr2_r2_dl_avg);

%Compute SINRo for Rob MVDR v2 with LCMV (with DOA mismatch) computed using SCM

SINRo_mvdr_r2_lcmv(j) =

((w_mvdr2_r2_lcmv_dl_avg'*vs(:,2))*(vs(:,2)'*w_mvdr2_r2_lcmv_dl_avg)*SNR_avg)/(w_mvdr2_r2_lcmv_dl_avg'*SCM_avg*w_mvdr

2_r2_lcmv_dl_avg);

% This section computes SINR without DOA mismatch

%Compute SINRo for Standard MVDR (with DOA mismatch) computed using SCM

SINRo_mvdr_nodoa(j) = ((w_mvdr1_avg'*vs(:,1))*(vs(:,1)'*w_mvdr1_avg)*SNR_avg)/(w_mvdr1_avg'*SCM_avg*w_mvdr1_avg);

%Compute SINRo for Standard MVDR with DL (with DOA mismatch) computed using SCM

SINRo_mvdr_nodl(j) =

((w_mvdr1_dl_avg'*vs(:,1))*(vs(:,1)'*w_mvdr1_dl_avg)*SNR_avg)/(w_mvdr1_dl_avg'*SCM_avg*w_mvdr1_dl_avg);

%Compute SINRo for Rob MVDR v1 (with DOA mismatch) computed using SCM

SINRo_mvdr_nor1(j) =

((w_mvdr1_r1_dl_avg'*vs(:,1))*(vs(:,1)'*w_mvdr1_r1_dl_avg)*SNR_avg)/(w_mvdr1_r1_dl_avg'*SCM_avg*w_mvdr1_r1_dl_avg);

%Compute SINRo for Rob MVDR v1 with LCMV (with DOA mismatch) computed using SCM

SINRo_mvdr_r1_nolcmv(j) =

((w_mvdr1_r1_lcmv_dl_avg'*vs(:,1))*(vs(:,1)'*w_mvdr1_r1_lcmv_dl_avg)*SNR_avg)/(w_mvdr1_r1_lcmv_dl_avg'*SCM_avg*w_mvdr

1_r1_lcmv_dl_avg);

%Compute SINRo for Rob MVDR v2 (with DOA mismatch) computed using SCM

SINRo_mvdr_nor2(j) =

((w_mvdr1_r2_dl_avg'*vs(:,1))*(vs(:,1)'*w_mvdr1_r2_dl_avg)*SNR_avg)/(w_mvdr1_r2_dl_avg'*SCM_avg*w_mvdr1_r2_dl_avg);

%Compute SINRo for Rob MVDR v2 with LCMV (with DOA mismatch) computed using SCM

SINRo_mvdr_r2_nolcmv(j) =

((w_mvdr1_r2_lcmv_dl_avg'*vs(:,1))*(vs(:,1)'*w_mvdr1_r2_lcmv_dl_avg)*SNR_avg)/(w_mvdr1_r2_lcmv_dl_avg'*SCM_avg*w_mvdr

1_r2_lcmv_dl_avg);

end

figure(2)

plot(theta*180/pi,10*log10(abs(Smvdr_xx1)),'b',theta*180/pi,10*log10(abs(Smvdr_xx2)),'r');

title('MVDR PS of Signal + Interferers','Fontsize',13);

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('PSD (dB)','Fontsize',12)

grid;

h = legend('No mismatch','DOA mismatch',0);

set(h,'FontSize',6);

figure(3)

clf;

Page 103: Study Conducted on Robust Adaptive MVDR Beamforming for ... · Study Conducted on Robust Adaptive MVDR Beamforming for Processing Radar Depth Sounder Data . Peng Seng Tan. University

Technical Report Simulation Source Codes

100

plot(theta*180/pi,10*log10(abs(Beam_mvdr1).^2),'b',theta*180/pi,10*log10(abs(Beam_mvdr1_dl).^2),'r');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr1_r1_dl).^2),'g',theta*180/pi,10*log10(abs(Beam_mvdr1_r2_dl).^2),'m');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr1_r1_lcmv_dl).^2),'c',theta*180/pi,10*log10(abs(Beam_mvdr1_r2_lcmv_dl).^2),'k--');

plot(180/pi*theta_inter(1)*[1 1],[-120 0],'m-');

plot(180/pi*theta_inter(2)*[1 1],[-120 0],'m-');

title('Average Beam Pattern (No pointing mismatch)','Fontsize',13);

grid on

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('Beam pattern (dB)','Fontsize',14)

h = legend('Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Southwest');

figure(4)

clf;

plot(theta*180/pi,10*log10(abs(Beam_mvdr_ideal).^2),'y--');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2).^2),'b',theta*180/pi,10*log10(abs(Beam_mvdr2_dl).^2),'r');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2_r1_dl).^2),'g',theta*180/pi,10*log10(abs(Beam_mvdr2_r2_dl).^2),'m');

hold on

plot(theta*180/pi,10*log10(abs(Beam_mvdr2_r1_lcmv_dl).^2),'c',theta*180/pi,10*log10(abs(Beam_mvdr2_r2_lcmv_dl).^2),'k--');

plot(180/pi*theta_inter(1)*[1 1],[-120 0],'m-');

plot(180/pi*theta_inter(2)*[1 1],[-120 0],'m-');

title('Average Beam Pattern (With pointing mismatch)','Fontsize',13);

grid on

xlabel('{Direction of Arrival (\theta) in degrees}','Fontsize',12)

ylabel('Beam pattern (dB)','Fontsize',14)

h = legend('Ideal','Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Southwest');

figure(5)

clf;

plot(10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_ideal)),'--',10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_doa)),'^--');

hold on

plot(10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_dl)),'v--',10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_r1)),'x--');

hold on

plot(10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_r2)),'o--',10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_r1_lcmv)),'s--');

hold on

plot(10*log10(SNR_vector),10*log10(abs(SINRo_mvdr_r2_lcmv)),'*--');

title('SINR versus SNR without finite sample effect','Fontsize',13);

grid on

xlabel('SNR (dB)','Fontsize',12)

ylabel('SINR (dB)','Fontsize',14)

h = legend('Ideal','Basic','LSMI','Rob ver 1','Rob ver 2','Rob ver 1 (lcmv)','Rob ver 2 (lcmv)');

set(h,'FontSize',6,'LOC','Northwest');