This might not really be completely maths related, but more physics related, but I still hope someone might push me in the right direction or maybe give me some articles about this problem.
I'm doing a project at school involving a directional sound speaker, or a speaker that emits sound only in one direction, instead of nearly omni-directional.
We have achieved this by using a large number of small piezo-speakers (let's say 8 for the sake of simplicity), positioned in a line with the distance between each speaker exactly half the length of the wavelength of the sound that the speakers produce.
Because all the speakers are driven by the same function generator, they are exactly in phase with eachother.
If you would 'look' at the phase-difference exactly in front of the line of speakers, you would notice that all soundwaves are exactly in phase with eachother, producing constructive interference (adding up the waves).
If you look at a right angle to the line of speakers (on the side), all the soundwaves are exactly out of phase with eachother, producing destructive interference ('cancelling out' the sound).
Speakers 1 and 2, speakers 3 and 4, speakers 5 and 6 and speakers 7 and 8 cancel eachother out.
We have tested this system with 52 speakers in a hexagonal pattern and it works pretty well.
Now the hard part.
Between 'right infront of' (angle = 0) and 'at a right angle' (angle = 90), interference occurs aswell, only at a different scale, since the waves will not cancel out exactly or add up exactly.
Now, we would like to have some theoritical stuff in our project, in detail, we would like to calculate beforehand how loud the speakers will sound in any given angle (between -90 and 90 degrees), and then measure it with our device and compare the results.
However, we have not yet managed to work out how to do this...
We have thought about it, searched on the internet but couldn't really find anything.
Our main idea's are that, since the speakers are all in phase, the phase difference between two speakers depends only on the distance from the speakers.
If you would take one point and call the distance from that point to speaker 1 r1' and the distance from that point to speaker 2 r2, then I'm absolutely sure you could work out the phase difference between the two speakers.
The phase difference would in turn give us some idea of how the soundwaves will interfere.
So to sum it up, can you give me some advice, tips, help on how to calculate the phase difference from two sources, depending on the distance from those sources? I'm sure we can work out for ourselves how it would go with multiple sources.
I quickly racked up an illustrative image, see attachment.
Points A and B are what I talked about; point A is at a right angle (90 degrees) to the sound sources and the waves from both sources will have a phase difference of exactly pi rad (or 180 degrees) which means they will cancel out.
In point B, the phase difference will be 0, since the distance to both sources is equal, and the waves will add up.
In point P however, it is not directly obvious how the waves will interfere.
I'm sure the calculation here might be very simple but we are not seeing it... Perhaps we're thinking too complicated, or perhaps too simple...
I would be grateful if anyone had anything useful to say on this, thanks.
Well after writing all this I finally got some results that seem to be correct!
I was looking at the problem in the wrong way all the time. I was trying to calculate the phase difference from the difference in the length from point to source (r2 - r1) but I have only ever done this with a time difference.
Then it occured to me that I could easily calculate the time difference if I knew the length difference...
So I did, and I came to the conclusion that:
Phase diff. = ( (r2 - r1) * 2*pi*f ) / v
Where f is the frequency used and v is the speed of the sound.
When r2 = r1, the phase diff returns 0 which is right.
When r2 = r1 + 1/2*wavelength, then after some calculations the phase diff. returns pi, which is also right!
However, now I have finally done this, I found that using just the distance r in the formula makes it rather complicated since r is usually calculated with pythagoras, making it something like sqrt(a² + b²) etc...
Wouldn't it be far easier in cylinder coordinates?
Since we ultimately need to use the angle, instead of the distance...
Here's another explanation I wrote on a different forum, it might be more compact and easier to understand:
Please consider this image:
The point P can move along the circle with radius R as shown.
Points 1 and 2 are fixed, seperated by a distance d. They are also centered around the origin so the x-coordinate of point 1 will be -1/2d and the x-coordinate of point 2 will be +1/2d. You get the point.
I'll try to explain in detail what I need, but if you don't need that, I'll ask the question first:
How can I express the lengths r1 and r2 in the angle a0?
Explanation:
I need to find the distances r1 and r2, based on the angle between the line OP and the x-axis (a0).
I need this for a physics project, where points 1 and 2 are two sound sources. I need to find the phase difference between source 1 and 2 at point P. Both sound sources are in phase, but because r2 < r1, there will be a phase difference at point P.
To find the phase difference, I need to know the lengths of r1 and r2.
I know, I could simply apply pythagoras or something, but I need to express these lengths in the angle that r0 makes with the x-axis (a0).
The reason behind this is that the two sound sources form a kind of directional speaker. They are placed at exactly the right distance apart (1/2 * wavelength) so their waves cancel out at the sides and add up right infront. Now I want to create a graph of the soundpressure (which depends on the phase difference) of both speakers combined at point P, which will vary with the angle a0.
So I need to express both lengths r1 and r2 in the angle a0 alone.
If I understand correctly, you want to get the difference in length of your distances r1 and r2 in relation to d calculated by using the direction of r0 only. You are expecting a value of 0*d for r0=0° and 1*d for r=90°.[edit] which is not inline with your post #1, where you had a result of PI rad, which I believe to be false![/edit]
I'd use the Sinus of the angle r0 for that.
Last edited by opus; Mar 11th, 2008 at 03:08 PM.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button Wait, I'm too old to hurry!
I'm not sure if it's completely right how you say it but it might be.
All I want is to find the difference between r1 and r2 when I only know the angle a0 and radius R.
As said before, I found a nice way to do this using the normal distance formula.
The coordinates of point P are (in polar coords)
P: ( Rcos(a0), Rsin(a0) )
Points 1 and 2 are:
1: ( -(d/2) , 0 )
2: ( +(d/2), 0 )
Then using the distance formula:
r1 = sqrt( (xP-x1)² + (yP-y1)² ), similar for r2, I got:
Know, the distance "d" is actually 1/2*wavelength of the sound.
If I now use the formula to calculate phase difference at a point:
phase diff = ((r1 - r2)/wavelength) * 2pi
Then when a0 = 0 (right to the side of both sources) the phase diff is exactly pi (rad), which is 180 degrees, which is exactly out of phase, which is right.
When a0 = 90 (right infront of the sources) the phase diff = 0 which is exactly in phase, which is also right.
So I guess this is solved for now. The only thing that needs to be done now is how to calculate this for even more sources, like 8.
I guess I have to use the phase difference formula for each pair of sources or something? Ahh I think we will figure it out.
You are expecting a value of 0*d for r0=0° and 1*d for r=90°.[edit] which is not inline with your post #1, where you had a result of PI rad, which I believe to be false![/edit]
I am expecting a value of 1d, but d is actually 1/2*wavelength, so what it's actually saying is that the soundwaves from source 1 arriving at a point on the (positive) x-axis will always be 1/2*wavelength behind the soundwaves of source 2, which is a phase difference of Pi rad.
Know, the distance "d" is actually 1/2*wavelength of the sound.
If I now use the formula to calculate phase difference at a point:
phase diff = ((r1 - r2)/wavelength) * 2pi
All I was trying to point out is, that you could use the following formula instead of your formula above:
phase diff = Rsin(a0) * 2pi
[I understood your Rsin(a0) as the Sinus of the angle a0 given in Radians]
That should speed up your calculation!
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button Wait, I'm too old to hurry!
I don't understand how R*sin(a0) * 2pi gives me the phase difference? Could you explain?
R*sin(a0) just gives me the y-coordinate of point P, right? So you are saying that the y-coordinate of point P * 2pi is the phase difference? How did you work that out?
Still, it doesn't change my question. How does sin(a0)*2pi give me the phase difference? I don't understand... How did you work that out??
Sin(a0) is just the y-coordinate of point P, so what's it's correlation with the phase difference of the two sources?
As I said, I'm unable to give the full prove for that, however it is used often the opposite way around. When "detecting" a signal by two antennas, you can compute the direction by using the phase-difference.
If you compare the values you get for all possible angles a0 using your formula and my formula, you will find only very sligth differnces (with a radius of 100 and a wavelength of 1, I get a max difference of 4.6875E-06).
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button Wait, I'm too old to hurry!
If that's really the case that could be very interesting since it's alot easier to calculate.
I tried to calculate the phase difference with values we are facing:
R = 15 m
wavelength = 0.12 m
angle a0 = 60*
Using my own formula I got a phase difference of 1/2*pi (1,57079...)
Using yours, I got 5,44... which is about 1.73*pi
So unless I'm missing something where 1.73*pi and 1/2pi give the same phase difference, then it doesn't seem to be right??
EDIT
On further review, it cannot possibly be right.
If you take the angle a0 as 0*, then the phase difference would be caused by the distance d (= 1/2*wavelength) which would cause a phase difference of pi rad.
My formula gives a phase difference of pi rad; while calculating 2pi*sin(0) gives 0.
I was thinking maybe we had a different angle in mind.
In my calculations, a0 is the angle between r0 and the positive x-axis.
If you choose a0 as the angle between r0 and the positive y-axis, then:
a0 = 0 --> 2pi*sin(0) = 0 ==> phase diff = 0 = CORRECT
However:
a0 = 90 --> 2pi*sin(90) = 2pi*1 = 2pi which is NOT correct.
So I'm still stumped...?
Maybe the 'opposite of what im doing' is not what you meant with two antennas. Since antennas are usually used to listen to very large distances where the difference in length from antenna 1 to a point and antenna 2 to a point are much smaller than the actual distance?
Last edited by NickThissen; Mar 15th, 2008 at 06:31 AM.
It's a hard way, my mistake again (I'm sorry). The Factor 2 with PI is the problem, use just Sin(a0)*PI.
If I get my head free, I'll try to work out a proof.
And for the angle a0, YOU changed the way to calculate, in your post#1 you have "Between 'right infront of' (angle = 0) and 'at a right angle' (angle = 90), interference occurs aswell, only at a different scale, since the waves will not cancel out exactly or add up exactly." and now you are using the other way around. I'm using rigth in front=0° and at right angle =+/- 90°!
Last edited by opus; Mar 15th, 2008 at 12:20 PM.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button Wait, I'm too old to hurry!
From now on, the angle is between r0 and the positive x-axis, in the same way that the distances r1 and r2 are calculated using the polar cooridnates of point P (Rcos(a0), Rsin(a0)).
I tried some more calculations, this time using my old formula with the defination of a0 as stated above:
a0 = 60 deg --> phase diff = 1/2pi rad
Now with your formula it would be:
a0 = 60 deg --> phase diff = pi*sin(90-60) = pi*sin(30) = 1/2pi rad
It's also the same for 45 deg
So it seems to be the same for 0, 45, 60 and 90 deg.
I'm pretty confident now that my long formula is exactly the same as pi*sin(a0)
Since, my formula also uses the radius R, but whatever radius I use I get the same results so it is actually independent of R, making me think there is some simplification I'm not seeing.
After using the fact that the phase difference = 2pi*f*t
and t = (r1-r2)/v
and f = v/wavelength,
I got this formula for the phase difference:
(formula 1) R is the radius as shown in the last image.
The angle theta is the angle between the positive x-axis and r0.
and lambda = wavelength
So it seems now that:
formula 1 = pi*sin(90 - theta)
Can anybody show me that? I have tried to simplify my formula but it gets me nowhere...
I used the fact that (a-b)*(a+b) = (a²-b².
Then, if you take the first root as a and the second as b than it's not too hard to come to my formula.
But I can't get rid of the roots...
Now, since sin(90-theta) = cos(theta), and the phase difference should (probably) also be equal to pi*sin(90-theta),
That means that all my roots under the division sign should equal "2R".
In that case, my formula reads 2pi*R*cos(theta) / 2R = pi*cos(theta) = pi*sin(90-theta) = the formula you gave me...
Now, if I look at my image again, it's not too hard to conlude that the roots should indeed be 2R.
Since one of the roots is actually the length of r1, and the other is actually the length of r2. Combined, it would be very possible that it yields 2R.
Because r1 is R - a little bit, while r2 is R + a little bit... Now I'm going to guess that both "a little bits" are the same, than my roots equal 2R...
Can anybody verify this for me, algebraically if possible?
However, I have more graphical or visually approach.
Look at your drawing from post#3
Consider the situation if a0 is 90°, in that case Point is on the y-axis.
Now look at the points 1 and 2, consider them on a circle, centered on Point 0.
For all other angles of a0, don't move Point P, instead turn this cirlce with Point 1 and 2.
It is obvious that Point 1 moves the same amount toward P that Point 2 is moving away (or vice versa) [that is your your roots adding to ROUGHLY 2R, see NOTE].
Your phasedifference now is seen as the lateral-distance(along y-axis) between Point 1 and 2. This distance is only a function of the angle a0 and the radius of that small circle.
NOTE: In case of a0=90° the distances R1 and R2 are NOT the same as R0, they are "a bit larger" than that. I guess this bit is bugging us on the search for an algebraically proof.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button Wait, I'm too old to hurry!
Yes, it seems that my formula is not exactly the same as your's.
However, like you said, the difference is minimal.
Since, the distance d is very small compared to the radius R (d = 0,06m, R = 15m), the effect of your last note is probably neglectable.
I now recall also that using my formula, the phase difference was actually 4,9999999925*pi or something like that. While I first assumed this was simply due to the limits of my calculator, that doesn't make sense if the formula was actually the same as pi*cos...
This effect is so small that we can easily neglect it. We are merely looking for a theoretical approach to how the sound will cancel out, not an exact calculation.
We will probably use your formula (which in terms of how I defined the angle a0 will be pi*cos(a0)) to do any further calculations.
Now, while the main issue here is solved, we are now looking to do the same but with more sound sources, 8 to be exact.
I am still clueless as to how I'm going to approach this with more sources. While I could calculate the phase difference between two sources using the 'standard' formula 2pi*f*t (where t is now dependent of the distance r1 and r2), I have no clue how to do this with 4 sources for example...
By definition wouldn't the phase difference be between only two sources no matter what? For any point you could look at all of the phases of waves at that point and try to check for deviations from their mean, but I don't think that the problem as you've defined it can be generalized to multiple sources....
I think what you'll end up wanting is the average amplitude of the (superposed) sound wave at your point, which you can calculate if you've taken Calculus and think about it. Good luck
The time you enjoy wasting is not wasted time. Bertrand Russell
I did some search on Wicki (http://en.wikipedia.org/wiki/Phase_interferometry), it looks like they al ue the assumption that the waves come in parallel to our points 1 and 2. Such an assumption would be valid if the wavelength is much smaller then the distance R.
So you are correct in your last findings.
On the matter of calculating phasedifference between more then 2 points, you'd hsave to calculate all possible pairs of two.
But why are you doing this?
Are they all on a line?
To get a better bearing? (the longer the distance, the better the bearing, I guess)
To be able to neglect "bad" measurements (compute all posible bearings[between pairs], and then compare them, the ones that are nearly the same should be good)
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button Wait, I'm too old to hurry!
Opus, I want to calculate the phase difference between more sources, because we are using more sources in our project.
Basically, the more sources, the better the sound will be directed along one axis.
In practice, they are not all in one line. We have a hexagonal structure with speakers positioned on lines like this:
4 speakers
5 speakers
6 speakers
7 speakers
8 speakers
7 speakers
6 speakers
5 speakers
4 speakers.
This is done because it will then not only work in one direction (the direction of the line of speakers), but also in 2 more directions. So instead of a "plane" of sound, you get a "ray" of sound.
We tested it today actually and it works pretty well. We found a difference of about 40 dB (101 dB right at the front and 61 dB at the side, at a distance of roughly 10 meters) which is very good imo. A 3000-Hz tone at 101 dB is not very pleasant to hear, it's quite painful. At 60 dB however it is not painful in any way, so the basic goal of the experiment has been succesfull.
However, we think it will be too complicated to include this pattern in theory, so we want to do it with a single line of 8 speakers.
I don't think it will work however with the formula I found here.
We have however found another formula, which was described as "the expansion formula of a number of coherent soundsources with given position" which looks like to be exactly what we need.
I can't remember it fully anymore but it was something like this:
ri is the distance from the point you are calculating to the position of speaker i. p0 is the soundpressure level of one speaker k = 2*pi*f / c (f = frequency, c = speed of sound here)
And j is probably the complex number i (sqrt(-1))
However, we have not found any more explanation on this formula and we have no clue what it's called, where it is derived from etc... We have quite alot of questions about it, but we're trying to figure it out...
For example, we don't know what p0 is (measured from what distance??), and we don't know how to use the complex exponent.
We know a complex exponent is in fact a (cos + i*sin) function, but what do we do with the complex sine ??
Anyway... I will probably not find the answers here (unless there is someone who knows by coincidence lol) and we will try to figure it out.
The "absolute value" portions you posted in that formula are actually Complex Modulus symbols (the generalization of absolute value to complex numbers). In essence you'll get the inner sum to give some complex number, and then when you take the complex modulus of that number you'll get back a real number, which is what you want.
The time you enjoy wasting is not wasted time. Bertrand Russell
I just noticed something in that formula that's confusing me. The units don't work out.... The exponential portion must be unitless (since "e to the 3 inches" doesn't make sense), but then we have pressure = pressure / distance, which just doesn't work. I never was very good at Physics though; there's probably a unit distance that hasn't been written somewhere.
The time you enjoy wasting is not wasted time. Bertrand Russell
j*k*r = j*(2pi/wavelength)*r
[j] = 1 (complex number sqrt(-1) has no dimension obviously)
[2pi/wavelength] = 1/m
[r] = m
1*1/m*m = 1 = dimensionless.
However, you have got me thinking about the p0/r part.
I think p0 is some unit of pressure, like bar or pascal maybe, then the unit of ptot would be [pressure]/m.
While this does make sense (sound pressure falls off with distance ofcourse) it doesn't make sense to name it a pressure (p) then...
I have however found a very similar formula in a book about Optica (which also deals with waves).
It says, for a spherical wave (like a point-source soundwave) the wavefunction is:
wavefunction symbol = (A/r) * e^i(kr - wt)
I know the "- wt" (w is actually omega, or 2pi*f) part in the exponent can be evaluated as 0 in our case since we only want to look at an instantaneous moment, and the original phase shift of all sources is 0 (they are all in phase).
That leaves the same formula (except for the summation of multiple sources).
I however don't know what the dimension of "wavefunction symbol" should be, since I don't know what unit the amplitude "A" has...
I'll see if I can find some more (I was just browsing the book, haven't read the chapter fully yet)
EDIT
I don't know if this is relevant, but I quote:
It is important to note that 'wavefunction symbol' need not represent only physical displacements but could represent any quantity that varies in space and time such as the difference of air pressure from its equilibrium value (as in a sound wave) or the strength of an electric or magnetic field (as in a light wave).
So if it can represent any quantity that varies in space and time, I suppose that could also be the air pressure divided by the distance from the source?
Anyway, I am starting to think "ptot" is not really a pressure.. It cannot be, or the formula is plain wrong.
Last edited by NickThissen; Mar 19th, 2008 at 12:59 PM.
I decided to simply put a few of the formulas I had to the test using Maple (calculation program).
I know what the output should be when the formula is plotted, it should look something like this:
First, I defined a function for p as function of the angle theta.
The function I tried is simply the real part (or just the cosine) of the complex exponent I showed above:
The plot (angle theta from 0 to pi) resulted in this:
Then I realised the absolute value and added that. I also plotted the graph in polar coordinates, and to my own amazement and shock (lol), the output was:
Wohoo! That's exactly the same as we found numerous times in the theory, books etc..!
I guess we finally found it...
Now we are going to try to plot it in 3D. This graph is only for a number of speakers (8 in this case) on a line.
Our design however has 52 speakers, positioned in a hexagonal shape which should also give the same effect in the up/down direction. So this should be nicely visible in a 3D graph.
Anyway, thanks alot for all the help! Really appreciated and it was really worth it!