beamforming a signal with random noise
5 次查看(过去 30 天)
显示 更早的评论
This is my code for beamforming:
close all
clear all
clc
m = 8;
signal=(sin(20* pi/180));
ad = exp (-1j * pi *[0: m-1]'*signal);% array response vector in the direction of desired signal. expect the direction of the array response vector
wop = ad;
thetas = [-90:90];
tm = thetas * pi/180;
am = exp (-1j * pi * [0: m-1]'* (sin (tm)));
A = abs (wop'* am);% array response array response
A = A / max (A);
figure, polar (tm, A)
A = 10 * log10 (A);% log figure log plot
title ('Normalized magnitude response array polar diagram, eight array elements')
figure, plot (thetas, A);
title ('eight microphones');
xlabel ('angle[degrees]');
ylabel ('Normalized Beam Power[dB]');
grid on
It works when signal is just a sinusoid. But does'nt work when i add noise to it, that is:
signal=(sin(20* pi/180)+randn(size(1000,1)));
What is the reason? How can i improve my code to get the result for above signal corrupted with noise?
1 个评论
采纳的回答
Honglei Chen
2011-12-15
Try the following code:
t = (0:999)'/1000;
s = sin(2*pi*t);
ad = exp(-1i*pi*(0:7)*sin(30*pi/180));
x = s*ad;
y = x*ad';
subplot(211),plot(t,s),subplot(212),plot(t,real(y));
It defines a signal, s, modulate it to simulate the return, x, for an 8-element half-wavelength ULA when the source is at 30 degrees, and then beamformed it to form output, y.
1 个评论
更多回答(2 个)
Honglei Chen
2011-12-15
Is your signal sin(20*pi/180) and also impinging from 20 degrees? I just want to make sure this is what you want. It looks like that you are putting signal itself in to the steering vector which is incorrect. The steering vector should contain sin(theta0) where theta0 is your signal incoming direction.
HTH
Honglei Chen
2011-12-15
Hi zozo,
It seems that you are using half wavelength spacing. If that's the case, your steering vector should be
ad = exp (-1j * pi *[0: m-1]'*sin(theta0*pi/180))
There is an issue in your signal definition
signal=(sin(20* pi/180)+randn(size(1000,1)));
Because you basically added a scalar onto the noise vector. You need a signal vector to combine with noise vector. If you really have a signal vector (assume a column vector), you can do
x = signal*ad
to get the signal at each element.
It is worth noting that what you do here is really narrowband and assuming plane wave. If you are doing audio signal, then it is by nature wideband and from your other post, you are using spherical wavefront. Therefore make sure you take these things into consideration when interpreting the result.
HTH
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Beamforming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!