阵列信号处理仿真,延时求和滤波器
问题导入
假设原点处的阵列传感器接收的信号为平面波,表达式如下
f
(
t
)
=
c
o
s
(
2
π
f
0
t
+
θ
0
)
f(t) = cos(2\pi f_0t+\theta_0)
f(t)=cos(2πf0t+θ0)
其中
θ
0
=
π
3
\theta_0 = \frac{\pi}{3}
θ0=3π ,
f
0
=
300
H
z
f_0=300Hz
f0=300Hz
平面波入射的角度
θ
=
3
0
∘
\theta=30^{\circ}
θ=30∘,
ϕ
=
6
0
∘
\phi=60^{\circ}
ϕ=60∘阵列的采样频率
f
s
=
20000
H
z
f_s = 20000Hz
fs=20000Hz
假设在Z轴上存在5个阵列关于原点对称,间隔0.1m,试画出 f 1 , f 2 , f 3 , f 4 , f 5 f_1,f_2,f_3,f_4,f_5 f1,f2,f3,f4,f5接受到的平面波
解
f
(
t
,
p
)
=
[
f
(
t
−
τ
1
)
f
(
t
−
τ
2
)
f
(
t
−
τ
3
)
f
(
t
−
τ
4
)
f
(
t
−
τ
5
)
]
f(t,p)=\begin{bmatrix} f(t-\tau_1) \\ f(t-\tau_2)\\ f(t-\tau_3)\\ f(t-\tau_4)\\ f(t-\tau_5)\\ \end{bmatrix}
f(t,p)=⎣⎢⎢⎢⎢⎡f(t−τ1)f(t−τ2)f(t−τ3)f(t−τ4)f(t−τ5)⎦⎥⎥⎥⎥⎤
不同位置的阵列接受到的波形为原点处的波形的延时
其中
τ
n
=
a
T
p
n
c
\tau_n=\frac{a^Tp_n}{c}
τn=caTpn
a
=
[
−
s
i
n
(
θ
)
c
o
s
(
ϕ
)
−
s
i
n
(
θ
)
s
i
n
(
ϕ
)
−
c
o
s
(
θ
)
]
a = \begin{bmatrix} -sin(\theta)cos(\phi)\\ -sin(\theta)sin(\phi)\\ -cos(\theta) \end{bmatrix}
a=⎣⎡−sin(θ)cos(ϕ)−sin(θ)sin(ϕ)−cos(θ)⎦⎤
t = 0:0.00005:0.007;%采样频率为20000hz,绘制两个周期的长度
a = [-sin(pi/6)*cos(pi/3);
-sin(pi/6)*sin(pi/3);
-cos(pi/6) ];%初始化a
Pn = [0,0,0.2;
0,0,0.1;
0,0,0;
0,0,-0.1;
0,0,-0.2]';%设置位置坐标
tao = a.'* Pn / 340;%计算延时
矩阵的赋值需要维度和大小相同,所以事先初始化新的平面波函数f和时间T
f = [0:0.00005:0.007;0:0.00005:0.007;0:0.00005:0.007;0:0.00005:0.007;0:0.00005:0.007];
T = [0:0.00005:0.007;0:0.00005:0.007;0:0.00005:0.007;0:0.00005:0.007;0:0.00005:0.007];
绘制波形
for i = 1:5
subplot(5,1,i)
T(i,:) = tao(i):0.00005:0.007+tao(i);
f(i,:) = cos(2*pi*300*T(i,:) + pi/3);
plot(T(i,:),f(i,:));
end
效果展示
从上图可以看到,第一幅图和第二幅图在0时刻之前就出现了波形,说明时延
τ
n
<
0
\tau_n<0
τn<0,
f
3
f_3
f3的图形为原点处接收到的波形,第四幅图形和第五幅图形延时
τ
n
>
0
\tau_n>0
τn>0所以波形出现时刻在0时刻之后
对这个阵列实现延时——求和波束形成
解
由上图可知,延时求和波束形成就是将各个阵元接收到的信号的时延通过处理将时延补齐然后求和赋值上取
1
N
\frac{1}{N}
N1后输出
matlab中我们只需将f的各行向量的相位对齐求和即可实现
delays =[];
for i = 1:5
delays(i) = tao(5)-tao(i);%计算时延的差值
end
lattic = round(delays/0.00005)%时延的差值除以采样间隔的到采样点的差值
F = f(1,21:141) + f(2,16:136)+f(3,11:131)+f(4,6:126)+f(5,1:121);%通过从阵元接受信号的不同时刻进行取样以得到相同的相位
F = 0.2*F;%1/N = 1/5 =0.2
figure
plot(T(5,1:121),F)%时域上的相位和f5的相位对齐,所以取T(5)
lattic的结果为{20,15,10,5,0},所以不同阵元的取样取值选择了{21,16.11,6,1}
t = 0:0.00005:0.007;
a = [-sin(pi/6)*cos(pi/3);
-sin(pi/6)*sin(pi/3);
-cos(pi/6) ];
Pn = [0,0,0.2;
0,0,0.1;
0,0,0;
0,0,-0.1;
0,0,-0.2]';
tao = a.'* Pn / 340;
f = [0:0.00005:0.007;0:0.00005:0.007;0:0.00005:0.007;0:0.00005:0.007;0:0.00005:0.007];
T = [0:0.00005:0.007;0:0.00005:0.007;0:0.00005:0.007;0:0.00005:0.007;0:0.00005:0.007];
for i = 1:5
subplot(5,1,i)
T(i,:) = tao(i):0.00005:0.007+tao(i);
f(i,:) = cos(2*pi*300*T(i,:) + pi/3);
plot(T(i,:),f(i,:));
end
delays =[];
for i = 1:5
delays(i) = tao(5)-tao(i);
end
lattic = round(delays/0.00005)
F = f(1,21:141) + f(2,16:136)+f(3,11:131)+f(4,6:126)+f(5,1:121);
F = 0.2*F;
figure
plot(T(5,1:121),F)