**Description**

In Part 2, we introduce a delay being swept through the loudspeaker array from Part 1. This causes the main lobe to move back and forth along the azimuth plane. We will make the array sweep from 90 degrees to -90 degrees along the azimuth plane. The program shown below will calculate and provide plots for:

- the radiation pattern as the array is swept back and forth along the azimuth axis
- the envelope of the signal as a function of time.

The program will also create a .wav file simulating what the tone will sound like to the observer as it is being swept back and forth along the azimuth angle.

**M-File P2a.m**

%Constants

%Frequency emitted, speed of sound, angles, wavelength, wave number

f=1500; c=344; b=-.5:(1/200):.5; bpi=b*pi; l=1; wl=c./f; k=2*pi*f/c;

%2a

for i=0:720

cs=c/sin(pi*i/180);

ks=2*pi*f/cs;

lambdas=2*pi./ks;

for j=1:length(bpi)

P0(j)=sinc(l*sin(bpi(j))/wl-l/lambdas);

P1(j)=sinc(l*sin(bpi(j))/wl-l/lambdas+1);

P2(j)=sinc(l*sin(bpi(j))/wl-l/lambdas-1);

P(j)=P0(j)+P1(j)+P2(j);

end

polar(bpi, abs(P));

title('Radiation Pattern of Tapered Loudspeaker Array (Sweeping)');

pause(.001);

end

%2b

fs=4000;

t=1/fs:1/fs:4;

p=1/fs:720/length(t):720;

cs=c./sin(pi.*p./180);

ks=2*pi*f./cs;

lambdas=2.*pi./ks;

x=4.33; y=2.5;

R=sqrt((x.^2)+(y.^2));

sin=y./sqrt(x.^2+y.^2);

m=sin/wl;

s=1./lambdas;

u=m-s;

dis=(sinc(l*u)+0.5*sinc(l*(u+1))+0.5*sinc(l*(u-1))).*cos(k*R)./R;

figure(2)

plot(t, abs(dis)); axis tight; grid on;

title('Envelope of Received Signal');

xlabel('Time, sec');

%2c

x=cos(2*pi*1500.*t);

obstone=abs(dis).*x;

soundsc(obstone, fs);

wavwrite(obstone, fs, 'Proj2Part2c');

**Plots and Results**

Screen Shots of the Radiation Function as it sweeps from 90 to -90 degrees

Plot of observed envelope of signal

**Generated Wave File : Proj2Part2c.wav**

**Conclusion**

As a delay is swept through the loudspeaker array, the angle at which the main lobe points shifts back and forth along the azimuth angle. The observer in this part is in the same position as part 1. Therefore, the tone will be most apparent when the main lobe is pointed directly at the observer. This is shown in the plot of the envelope according to the observer. The position of the observer compared to the source maps out a right triangle. From this mapping, X and Y coordinates of the observer are obtained by multiplying the hypotenuse (5m) by either cosine (X) or sine (Y) of the angle (30 degrees). By plugging these values into the particle displacement equation, we can model the relative amplitude in which the observer will hear the emitted tone. The sweeping time is 1 second, which is verified by the envelope plot shown above. Notice that the envelope's maximas or periodic of 2 second, the main lobe sweeps across the positive azimuth and then the negative, with the length of each sweep taking 1 second. Therefore, the observer hears the maximum amplitude every 2 seconds. This can be verified by the .wav file provided above.

## Comments (0)

You don't have permission to comment on this page.