DSPRelated.com
Forums

Spread Spectrum Correlation Question

Started by Ben October 30, 2005
Hi,

I am very new to this area of knowledge so I'm still trying to get a
good understanding of some things and I hope someone can help me. I am
doing a project where we will be doing position location using a Direct
Sequence Spread Spectrum signal from a transmitter. Several receivers
pick up the signal and calculate the time difference of arrival.

The part I am unsure about and i'm sure this shows up my poor
understanding of things, is that at each receiver we will be
correlating the incoming signal with a PN sequence the same as the one
contained within the transmitted signal, with the correlation peak
indicating the time of arrival.

My question is, how does the correlation peak equal the time of
arrival? Does the time taken to correlate the signal introduce error
into the time of arrival? Is this a real time operation or do you
'time-stamp' the received signal then post process it?

As I said this is a very new area for me, so please forgive me if these
are silly questions! Any help would be greatly appreciated.

Best Regards,
Ben.

Hi Ben,

Don't let the complexity of the system confound a simple problem. 

If an old friend shows up on your doortstep at 11pm, do you know
what time he left his house (let's say this is a VERY old friend and
you no longer know where he lives)? No, of course not. 

Unless you have some sort of known synchronization with the transmitter
(e.g., PN sequences with 1 second periods synchronous to GPS), you
can't get from here to there.

--Randy


"Ben" <ben@flatcube.org> writes:

> Hi, > > I am very new to this area of knowledge so I'm still trying to get a > good understanding of some things and I hope someone can help me. I am > doing a project where we will be doing position location using a Direct > Sequence Spread Spectrum signal from a transmitter. Several receivers > pick up the signal and calculate the time difference of arrival. > > The part I am unsure about and i'm sure this shows up my poor > understanding of things, is that at each receiver we will be > correlating the incoming signal with a PN sequence the same as the one > contained within the transmitted signal, with the correlation peak > indicating the time of arrival. > > My question is, how does the correlation peak equal the time of > arrival? Does the time taken to correlate the signal introduce error > into the time of arrival? Is this a real time operation or do you > 'time-stamp' the received signal then post process it? > > As I said this is a very new area for me, so please forgive me if these > are silly questions! Any help would be greatly appreciated. > > Best Regards, > Ben. >
-- % Randy Yates % "Remember the good old 1980's, when %% Fuquay-Varina, NC % things were so uncomplicated?" %%% 919-577-9882 % 'Ticket To The Moon' %%%% <yates@ieee.org> % *Time*, Electric Light Orchestra http://home.earthlink.net/~yatescr
Hi Randy,

Thanks for the response! I don't think I explained myself properly
before. I am not trying to determine the time of flight, only the time
of arrival. If I have this time at two different locations I can
subtract one from the other to determine the time difference between
them.

With this information I can then create a hyperbola, along which the
transmitter must be located. If I do this with two different sets of
receivers, eg receivers A and B, then receivers B and C, I get two
different hyperbolas. Where these two intersect is the location of my
transmitter.

This is basically exactly how LORAN navigation works, except that they
swap the receivers and transmitters, ie. determining the location of
the  receiver rather than the transmitter.

The bit I don't get is calculating the time of arrival from the
correlation function of the PN sequence. I'm assuming you kind of time
stamp the incoming signal then post process it to determine the
correlation?

Hope this makes my question a little more clear!

Thanks,
Ben.

Ben wrote:
> Hi Randy, > > Thanks for the response! I don't think I explained myself properly > before. I am not trying to determine the time of flight, only the time > of arrival. If I have this time at two different locations I can > subtract one from the other to determine the time difference between > them. > > With this information I can then create a hyperbola, along which the > transmitter must be located. If I do this with two different sets of > receivers, eg receivers A and B, then receivers B and C, I get two > different hyperbolas. Where these two intersect is the location of my > transmitter. > > This is basically exactly how LORAN navigation works, except that they > swap the receivers and transmitters, ie. determining the location of > the receiver rather than the transmitter. > > The bit I don't get is calculating the time of arrival from the > correlation function of the PN sequence. I'm assuming you kind of time > stamp the incoming signal then post process it to determine the > correlation? > > Hope this makes my question a little more clear! > > Thanks, > Ben.
Hi Ben, You've got no global knowledge of when the signal was transmitted, so you can't tell when the first signal is received with regards to anything else. It will just be received at some time. It's the next received signal that you care about. Assuming both receivers are the same, ie both run the correlation at roughly the same speed over the same sample length etc, then you can just designate one as being the base time reference. Say you have two receivers, A and B. Just designate the peak correlation of receiver A as being the reference time. Then the peak correlation of receiver B will be either lead or lag this reference time. Both receivers obviously have to be synchronized, but if they are geographically quite close this shouldn't be too difficult to do (or compensate for).
Hi Bevan,

Thanks for the reply. From what your suggesting I take it that the
correlation takes place in real time, is that correct? And as long as
both receivers run at the same speed, you should get a good time
difference between them?

Obviously in this discussion i'm not taking into account sources of
error, but I am aware there will be error in the time difference
measurment.

We are going to synchronise the receivers using a gps setup so they
should be fairly accurate.

Ben wrote:
> Hi Randy, > > Thanks for the response! I don't think I explained myself properly > before. I am not trying to determine the time of flight, only the time > of arrival. If I have this time at two different locations I can > subtract one from the other to determine the time difference between > them. > > With this information I can then create a hyperbola, along which the > transmitter must be located. If I do this with two different sets of > receivers, eg receivers A and B, then receivers B and C, I get two > different hyperbolas. Where these two intersect is the location of my > transmitter. > > This is basically exactly how LORAN navigation works, except that they > swap the receivers and transmitters, ie. determining the location of > the receiver rather than the transmitter. > > The bit I don't get is calculating the time of arrival from the > correlation function of the PN sequence. I'm assuming you kind of time > stamp the incoming signal then post process it to determine the > correlation? > > Hope this makes my question a little more clear!
Randy is saying that you have to start the reference PN sequence at precisely the same time at both receivers in order for the difference between the correlation peaks to equal the difference between arrival times. You need some /a priori/ information to make the scheme work. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Hi Jerry,

Ok so if I start the PN sequence at the receivers at the exact same
time (they are synchronised to each other via gps), one will reach
correlation then the other and this is my time difference, is that
correct?

How would you implement such a scheme? Have the receivers continously
trying to correlate even when no input signal is present just to keep
them in time?

How would superresolution algorithms like root MUSIC effect this
approach?

I'm also still a bit in the dark about how the correlation peak equals
time of arrival. Forgeting for the moment there are multiple receivers.
If we take the case of a single receiver, how does the correlation peak
equal time of arrival? If it takes time to calculate the correlation
wouldn't this mean the time of arrival has already passed?

Sorry if I'm not catching on here, but i'm still a bit confused and
thanks for all your help so far everyone!

Cheers,
Ben.

In article <1130713507.620536.230990@g14g2000cwa.googlegroups.com>,
 "Ben" <ben@flatcube.org> wrote:


|  My question is, how does the correlation peak equal the time of
|  arrival? Does the time taken to correlate the signal introduce error
|  into the time of arrival? Is this a real time operation or do you
|  'time-stamp' the received signal then post process it?

It typically is a real-time operation, but you still need to synchronize 
the operations across the receivers.  The easiest way to do this is to 
periodically time-stamp the incoming signal with a common time reference 
(you mention GPS), using the known sample rate to determine time offsets 
for each "chip" of the signal between the periodic timestamps.  Then the 
correlations can occur at any time or rate, even asynchronously.

   -- Tim Olson
Ben wrote:
> Hi Jerry, > > Ok so if I start the PN sequence at the receivers at the exact same > time (they are synchronised to each other via gps), one will reach > correlation then the other and this is my time difference, is that > correct?
Basically, yes.
> How would you implement such a scheme? Have the receivers continously > trying to correlate even when no input signal is present just to keep > them in time?
Correlate what?
> How would superresolution algorithms like root MUSIC effect this > approach?
I don't know. Probably someone else does.
> I'm also still a bit in the dark about how the correlation peak equals > time of arrival. Forgeting for the moment there are multiple receivers. > If we take the case of a single receiver, how does the correlation peak > equal time of arrival? If it takes time to calculate the correlation > wouldn't this mean the time of arrival has already passed?
Do you understand how correlation works? It isn't magic. Discrete correlation is simpler to explain than continuous. For the moment, ignore noise. Imagine that you multiply the samples by themselves (square them) and add the products. All products are positive, and the sum is large. Now multiply the samples by a shifted version of them. Some products will be negative, and even the positive ones will be smaller on the average. The sum of the products will be much smaller. Correlation consists of finding the time shift that maximized the sum of the products. If your received signals and are correlated with a test signal that has the same shape, each will show a relatively sharp correlation peal at some time peak. (You could also timestamp the received signals, and determine how much one must be shifted in time to match the other. That has the advantage of reducing the effect of noise.)
> Sorry if I'm not catching on here, but i'm still a bit confused and > thanks for all your help so far everyone!
Keep coming back with questions. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Ben wrote:
> Hi, > > I am very new to this area of knowledge so I'm still trying to get a > good understanding of some things and I hope someone can help me. I am > doing a project where we will be doing position location using a Direct > Sequence Spread Spectrum signal from a transmitter. Several receivers > pick up the signal and calculate the time difference of arrival. > > The part I am unsure about and i'm sure this shows up my poor > understanding of things, is that at each receiver we will be > correlating the incoming signal with a PN sequence the same as the one > contained within the transmitted signal, with the correlation peak > indicating the time of arrival. > > My question is, how does the correlation peak equal the time of > arrival? Does the time taken to correlate the signal introduce error > into the time of arrival? Is this a real time operation or do you > 'time-stamp' the received signal then post process it? > > As I said this is a very new area for me, so please forgive me if these > are silly questions! Any help would be greatly appreciated. > > Best Regards, > Ben.
Ben, What you're trying to do is actually fairly easy. What you need to do is synchronize each receiver and start the PN code at the same time for each, as others have stated. What you really need to do is not synchronize the PN code, but synchronize th PN code to time itself. Let's say each chip in the PN code is a unit of time: call it a micro-second or call it 10^-32 seconds, or what ever you want. The trick is to make the chip rate equal to this unit of time. If you know the present time, then you know how many units of time, or chips, have passed since 12:00 midnight. Start the transmitter's and receivers' PN code from their start point. Rapidly (i.e., much much greater than real time) "run up" the PN code to the present time (you know the present time from the GPS, you know how many chips there are from midnight to present time, i.e., piece of cake). Then advance each chip as a unit of real time and all are in sync. The displacement in the correlation matrix will tell you the time laspe from the transmitted signal to each receiver. Hope this helps. Maurice Givens, P.E. Givens Burnet, Inc. Chicago, IL