-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemoLCMV.m
58 lines (42 loc) · 915 Bytes
/
demoLCMV.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
close all;
clear all;
% Diadpo 58
c = 300000000;
f0 = 10;
lambda = c/f0;
d = lambda/2;
N = 20;
tetha1 = 0;
tetha2 = -15;
thermalNoise = 0;
SNR = 0;
Ps = 1; % Puissance de la source
Pb = Ps/(10^(SNR/10));
SNRj1 = -30; %SNRJ Jammer (Source non voulue = interferences)
Pj1 = Ps/(10^(SNRj1/10));
SNRj2 = -20;
Pj2 = Ps/(10^(SNRj2/10));
R = spatialCovMatrix([deg2rad(0) deg2rad(20) deg2rad(-20)],[ Ps Pj1 Pj2],Pb);
% Nombre de contraintes
k = 30;
d = ones(k,1);
C = []
Thetatmp = 0:1:+30;
res = [];
for theta = Thetatmp
a = uniformLinearAntenna(c,f0,d,N,deg2rad(theta));
C = [C,a]
end
weight = (inv(R)*C)*inv(C'*inv(R)*C)*d;
a0 = uniformLinearAntenna(c,f0,d,N,deg2rad(10));
% TODO
% Interval
Theta = -90:1:+90;
res = [];
for theta = Theta
a = uniformLinearAntenna(c,f0,d,N,deg2rad(theta));
gain(weight,a);
res = [ res , beampattern(weight,a)];
end
plot(Theta,res);
% ylim([-20 30] );