beamforming a signal with random noise
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
zozo
el 15 de Dic. de 2011
Comentada: Harriet Vickers
el 28 de Nov. de 2016
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 comentario
vijay
el 31 de Oct. de 2013
do u have code with noise signal ...please send me ...asap i need it urgent
Respuesta aceptada
Honglei Chen
el 15 de Dic. de 2011
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 comentario
Más respuestas (2)
Honglei Chen
el 15 de Dic. de 2011
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
el 15 de Dic. de 2011
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
Ver también
Categorías
Más información sobre Beamforming en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!