Top Banner
ECE251DN: Homework #3 Solutions Problem 3.7.2 (a) In this problem, we only have one null constraint. So C = V(ψ 0 )=[e j - N-1 2 ψ 0 ,..., 1,...,e j N-1 2 ψ 0 ] T The weights of the least squares approximation to the desired beam pattern B d (ψ) is given by W o =[I - C(C H C) -1 C H ] · W d where C H C = V H (ψ 0 )V(ψ 0 )= N then W o =[I - 1 N V(ψ 0 )V H (ψ 0 )] · W d For uniform weighing, the desired weighting W d is given by W d (m)= 1 N , m = - N - 1 2 ,..., 0,..., N - 1 2 . Thus the weights for the least squares approximation to the desire beam pattern are given by W o = 1 N I - 1 N 2 V(ψ 0 )V H (ψ 0 ) W d (b) Figure 1 shows the beam patterns for ψ 0 =3π/N , ψ 0 =2π/N , ψ 0 = π/N and ψ 0 =0.5π/N . When ψ 0 =3π/N , the null constraint is outside the mainlobe, the approximated beam pattern has very similar performance as the desired one within the mainlobe region. When ψ 0 =2π/N , the null constraint overlaps with a null point of the desired beam pattern, so the least squared approximation is exactly the same as the B d (ψ). When ψ 0 = π/N , the null constraint goes inside the mainlobe, which degrades the performance in the mainlobe. Similarly, when ψ 0 =0.5π/N , the null constraint goes further into the mainlobe and makes the mainlobe performance even worse. The matlab code for this problem is included at the end in Appendix B. 1
13

ECE251DN: Homework #3 Solutions

Feb 23, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ECE251DN: Homework #3 Solutions

ECE251DN: Homework #3 Solutions

Problem 3.7.2

(a) In this problem, we only have one null constraint. So

C = V(ψ0) = [ej−N−12

ψ0 , . . . , 1, . . . , ej N−12

ψ0 ]T

The weights of the least squares approximation to the desired beam pattern Bd(ψ) is given by

Wo = [I −C(CHC)−1CH ] ·Wd

whereCHC = VH(ψ0)V(ψ0) = N

thenWo = [I − 1

NV(ψ0)VH(ψ0)] ·Wd

For uniform weighing, the desired weighting Wd is given by

Wd(m) =1N

, m = −N − 12

, . . . , 0, . . . ,N − 1

2.

Thus the weights for the least squares approximation to the desire beam pattern are given by

Wo =(

1N

I − 1N2

V(ψ0)VH(ψ0))

Wd

(b) Figure 1 shows the beam patterns for ψ0 = 3π/N , ψ0 = 2π/N , ψ0 = π/N and ψ0 = 0.5π/N .

When ψ0 = 3π/N , the null constraint is outside the mainlobe, the approximated beam pattern hasvery similar performance as the desired one within the mainlobe region.

When ψ0 = 2π/N , the null constraint overlaps with a null point of the desired beam pattern, sothe least squared approximation is exactly the same as the Bd(ψ).

When ψ0 = π/N , the null constraint goes inside the mainlobe, which degrades the performance inthe mainlobe. Similarly, when ψ0 = 0.5π/N , the null constraint goes further into the mainlobe andmakes the mainlobe performance even worse.

The matlab code for this problem is included at the end in Appendix B.

1

Page 2: ECE251DN: Homework #3 Solutions

−4 −3 −2 −1 0 1 2 3 4−100

−50

0

50Beam pattern without null constraint

ψ

B(ψ

)

−4 −2 0 2 4−100

−50

0

ψ0=3π/N

ψ

B(ψ

)

−4 −2 0 2 4−100

−50

0

ψ0=2π/N

ψ

B(ψ

)

−4 −2 0 2 4−100

−50

0

ψ0=1π/N

ψ

B(ψ

)

−4 −2 0 2 4−100

−50

0

ψ0=0.5π/N

ψ

B(ψ

)

Figure 1: Beam patterns for ψ0 = 3π/N , ψ0 = 2π/N , ψ0 = π/N , ψ0 = 0.5π/N .

Problem 3

(a) The matlab code to generate snapshots with different values of ∆ is attached in Appendix C.The code computes both the spatial spectrum with uniform weighting and the spatial spectrumwith a Hamming weighted beamformer.

(b) For ∆ = 5◦, the spatial spectrum is plotted in Figures ?? and ?? in linear and dB scale,respectively. For ∆ = 15◦, the spatial spectrum is plotted in Figures ?? and ?? in linear and dBscale respectively.

(c) The plots of the spatial spectrum of Hamming window based beamformer are also shown alongwith the plots of spatial spectrum of uniformly weighted beamformer data.

Note that uniform weighting has smaller mainlobe and hence better resolution. It is able to resolvethe closely spaced plane waves (∆ = 5◦). Also note that the beamformer have larger mainlobes aswe steer away from broadside leading to broad peaks in the spatial spectrum away from broadside.The noise variance at the beamformer output has decreased by a factor equal to the array gainfrom variance 1 to variance 1/32 for the uniform weighting. The Hamming beamformer has notbeen properly normalized and hence the lower power indicated in the spatial spectrum. Need tobe scaled by the energy in the Hamming window.

2

Page 3: ECE251DN: Homework #3 Solutions

0 20 40 60 80 100 120 140 160 1800

0.1

0.2

0.3

0.4

0.5

0.6

Azimuthal angle ( θ )

Spa

tial s

pect

rum

P(θ

)

Delta = 5

Uniform WeightingHamming Window

Figure 2: Spatial Spectrum for ∆ = 5◦

0 20 40 60 80 100 120 140 160 180

10−1

Azimuthal angle ( θ )

Spa

tial s

pect

rum

P(θ

)

Delta = 5

Uniform WeightingHamming Window

Figure 3: Spatial Spectrum in dB scale for ∆ = 5◦

A Matlab Code for Prob. 3.7.2

% matlab code for problem 3.7.2 in the text

clear all close all

N = 21; M = (N-1)/2; n = (-M:M).’; psi = pi*(-1:.001:1); v =

exp(j*n*psi); wd = ones(N,1)/N; Bd = wd’ * v;

warning off;

figure(1) subplot(3,2,[1 2]) plot(psi,20*log10(real(Bd)),’-b’);

hold on;

%plot([-pi pi], [1 1], ’:k’);

plot([-pi pi], [0 0], ’:k’); plot([0 0], [0 -100],’:k’); hold off;

%axis([-pi pi -.4 1.2]);

3

Page 4: ECE251DN: Homework #3 Solutions

0 20 40 60 80 100 120 140 160 1800

0.1

0.2

0.3

0.4

0.5

0.6

Azimuthal angle ( θ )

Spa

tial s

pect

rum

P(θ

)

Delta = 15

Uniform WeightingHamming Window

Figure 4: Spatial Spectrum for ∆ = 15◦

0 20 40 60 80 100 120 140 160 180

10−1

Azimuthal angle ( θ )

Spa

tial s

pect

rum

P(θ

)

Delta = 15

Uniform WeightingHamming Window

Figure 5: Spatial Spectrum in dB scale for ∆ = 15◦

title(’Beam pattern without null constraint’) xlabel(’\psi’);

ylabel(’B(\psi)’);

% psi0 = 3*pi/N

psi0 = 3*pi/N; v0 = exp(j*n*psi0); wo = (eye(N) - 1/N * v0*v0’) *

wd; B = wo’ * v;

figure(1) subplot(3,2,3) plot(psi,20*log10(real(B)),’-b’);

hold on;

%plot([-pi pi], [1 1], ’:k’);

plot([-pi pi], [0 0], ’:k’); plot([psi0 psi0], [0 -100],’:k’);

hold off;

%axis([-pi pi -.4 1.2]);

title(strcat(’\psi_0=’,num2str(psi0*N/pi),’\pi/N’))

xlabel(’\psi’); ylabel(’B(\psi)’);

4

Page 5: ECE251DN: Homework #3 Solutions

% psi0 = 2*pi/N

psi0 = 2*pi/N; v0 = exp(j*n*psi0); wo = (eye(N) - 1/N * v0*v0’) *

wd; B = wo’ * v;

figure(1) subplot(3,2,4) plot(psi,20*log10(real(B)),’-b’);

hold on;

%plot([-pi pi], [1 1], ’:k’);

plot([-pi pi], [0 0], ’:k’); plot([psi0 psi0], [0 -100],’:k’);

hold off;

%axis([-pi pi -.4 1.2]);

title(strcat(’\psi_0=’,num2str(psi0*N/pi),’\pi/N’))

xlabel(’\psi’); ylabel(’B(\psi)’);

% psi0 = pi/N

psi0 = pi/N; v0 = exp(j*n*psi0); wo = (eye(N) - 1/N * v0*v0’) *

wd; B = wo’ * v;

figure(1) subplot(3,2,5) plot(psi,20*log10(real(B)),’-b’);

hold on;

%plot([-pi pi], [1 1], ’:k’);

plot([-pi pi], [0 0], ’:k’); plot([psi0 psi0], [0 -100],’:k’);

hold off;

%axis([-pi pi -.5 1.2]);

title(strcat(’\psi_0=’,num2str(psi0*N/pi),’\pi/N’))

xlabel(’\psi’); ylabel(’B(\psi)’);

% psi0 = 0.5*pi/N

psi0 = 0.5*pi/N; v0 = exp(j*n*psi0); wo = (eye(N) - 1/N * v0*v0’)

* wd; B = wo’ * v;

figure(1) subplot(3,2,6) plot(psi,20*log10(real(B)),’-b’);

hold on;

%plot([-pi pi], [1 1], ’:k’);

plot([-pi pi], [0 0], ’:k’); plot([psi0 psi0], [0 -100],’:k’);

hold off;

%axis([-pi pi -.4 1.2]);

title(strcat(’\psi_0=’,num2str(psi0*N/pi),’\pi/N’))

xlabel(’\psi’); ylabel(’B(\psi)’);

warning on;

B Matlab Code for Prob. 3

% File: tp3.m

% Created: Tue 10/19/04 15:58:32 -0700

% Last Updated: Thu 10/26/04 10:15:30 -0700

% Description: ECE 251D - Fa04 - HW3 - Prob. 3

%

clear all; close all;

DELTA = 5; % offset of third plane wave

N = 32; % number of elements in the ULA

numPts = 512;

M = 100; % number of samples

L = 6; % number of plane waves

5

Page 6: ECE251DN: Homework #3 Solutions

antenna = [0:N-1]’; % N x 1

THETAL = [45 60 60+DELTA 90 110 150]; % Angle of incidence

THETAL = THETAL * pi/180; % in radians

s = sqrt([0.5 0.1 0.1 0.2 0.15 0.1]); % signal powers

data = zeros(M, N); P = zeros(numPts, 1); PH =

zeros(numPts, 1);

X = hamming(2*N-1); % hamming window

Y = X(N:end);

thetas = linspace(0,pi,numPts); % 1 x numPts, x-axis for plotting

Vtheta = exp(j*pi*antenna*cos(thetas)); % N x numPts

for iter=1:L

V(:,iter) = exp(j*pi*cos(THETAL(iter))*antenna);

end

for m=1:M,

y = zeros(N,1);

for l=1:L,

y = y + s(l)*randn*V(:,l); % generate signal

end

y = y + randn(N,1); % add noise y is N x 1

%f = (Vtheta’*y)/N; % numPts x 1;

f = fftshift(fft(y, numPts))/N; % this is the fft way

P = P + abs(f).^2;

y = y.*conj(Y);

%f = (Vtheta’*y)/N; % numPts x 1

f = fftshift(fft(y, numPts))/N; % this is the fft way

PH = PH + abs(f).^2;

end P = P/M; PH = PH/M;

%x = [1:numPts]*180/numPts;

x = acos(linspace(-1,1,numPts))*180/pi; hold off

%plot(x, P,’r-.’)

semilogy(x, P,’r-.’) hold on

%plot(x, PH,’g--’)

semilogy(x, PH,’g--’) axis tight v = axis; axis([v(1) v(2) 0

1.25*v(4)]) legend(’Uniform Weighting’, ’Hamming

Window’,’Location’, ’Best’) xlabel(’Azimuthal angle ( \theta )’)

ylabel(’Spatial spectrum P(\theta)’) grid on; return

6

Page 7: ECE251DN: Homework #3 Solutions
Page 8: ECE251DN: Homework #3 Solutions

3.10.1a 3.10.1 (1)

0|)( == ubsd uVW

323)|(

==

ubs uVC

( ) HHc CCCCIP ⊥⊥ −=

Null constraint

dcn WPW ⊥=

Null within beamspace region causes little deviation from Bd

(Eq. 3.330 – 3.333)

(Eq. 3.251)

(Eq. 3.269)

(Eq. 3.268)

Page 9: ECE251DN: Homework #3 Solutions

b). Nulls outside Beamspace region are harder to form, causing large deviations from desired pattern – have to suppress beam pattern over large region to get the null.

3.10.1 (2)

Page 10: ECE251DN: Homework #3 Solutions

c) Steering causes large drop-off in side lobes. Null is formed with little degradation to Bd.

3.10.1 (3)

Page 11: ECE251DN: Homework #3 Solutions
Page 12: ECE251DN: Homework #3 Solutions
Page 13: ECE251DN: Homework #3 Solutions