Random Correlation Detector

Hi all,

The Project: Detect objects at some distance using Infarred emiter/detector system using pseudo random signal.

The Problem: Does some method already exist to correlate an incomming IR/PRN signal to detect it in the presence of other IR signals with other PRN sequences?

Luhan

Reply to
Luhan
Loading thread data ...

There are correlation methods that should work well in an IR environment. If you AC couple the signal from your detector and perform a linear correlation with your reference signal then that should do it. Keep in mind that you'll have to sweep the time offset, essentially searching for the signal in time.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google?  See http://cfaj.freeshell.org/google/
Reply to
Tim Wescott

Two methods can be used: simple and complex. The simple method uses a correlator with a frequency slightly different than the PRN signal which slides the corresponding pattern until the match is made. A 2nd (also 3rd?) correlator is used to measure where the correlation peak relative to the first. The ideal correlation will be a steep triangle from one bit period before to one bit period after the peak.

The complex method - but fun, fun, fun - is to take the FFT of the correlation pattern and multiply by the FFT of the observed data. The resulting spectrum is the correlated pattern. Inverse FFT that spectrum and you have your triangle function. If you have multiple targets, you'll have multiple overlapping triangles.

If you don't know the alignment and you only have a correlator, you have to search. If you're looking for distance in close proximity, the time offset of the PRN function is very small so you don't have much of a search to perform but you need to be precise in detecting the precise timing of the peak of that triangle.

Reply to
John_H

Interesting question. Closest analogy I know of: GPS satellite reception/decoding. There are multiple satellites, each working on their own PRN sequence in a "semi-independent" way, and the receiver tracks and pulls out the half-dozen visible satellites from the noise.

Note that with GPS sats that the sources are not truly independent PRN sequences, in that the whole system was designed for multiple reception and presumably the sequences do not step on each other too horribly.

I would guess that in the 70's/80's while the GPS system was being designed that the Navy paid a number of academic researchers to refine the theory of multiple PRN's going on simultaneously, and that at least some of the research was published to the world. Cellphone and wifi companies probably did similar in the 90's.

Tim.

Reply to
Tim Shoppa

I dont need to search for the PRN sequence since I'm generating it in the same device, and there is no time lag to speak of (speed of light). What IC and ciruit do I use to extract this signal.

Luhan

Reply to
Luhan

If there is no time lage, what do you expect to glean from the correlation?

"Yup, it's there!"

Are you using a 2D array such as a CMOS imager and trying to find the position in the frame?

The speed of light is roughly a nanosecond per foot so detecting distance with a retroreflector and high data rate light source is very doable. This distance measurement would require a short skew of the correlator to match up the precise correlation peak.

Reply to
John_H

I'm only looking for the presence of the signal. This is simple a version of an IR photobeam that ignores other signals.

This would be used in an environment with several signals in the same general space. In other words, I'm looking for an emitter/detector that only responds to its own signal.

Luhan

Reply to
Luhan

Exactly.

Luhan

Reply to
Luhan

As an interruptor with a low to moderate data rate, you can just add/sub your incoming photodetector signal by the outgoing PRBS (pseudo random bit sequence rather than pseudo random noise) sequence. You get a strong output from the add/sub or you don't. If you have no return path from your emitter, the background light will average to nearly 0.

If you have multiple targets where your detector will only see one target (you can't discern one reflector from another otherwise) you need only offset the PRBS sequence by more than one bit. Because a time-shifted correlator will have an extreme triangular peak that rises and falls within

2 bit periods, you only need to time shift the single PRBS pattern to avoid overlap.

If you don't have the ability to generate all the IR sources locally, you can use different PRBS patterns or do a google search on "gold codes" for PRBS style patterns that have limited overlap independent of alignment.

Reply to
John_H

The hardest part will be to find a circuit that multiplies your incoming signal by 1 everywhere that your PRN sequence has a 1, and -1 everywhere that your PRN sequence has a 0. You could do this by biasing your PRN sequence so it's symmetrical around ground and using an analog multiplier, but analog multipliers are hard to get these days. If it's slow enough you could do it with an analog switch like a 4051 or a 4052, followed by an op-amp. Or you could just use an appropriate microprocessor and do it in software.

formatting link
has a schematic that uses a 4052 to implement a multiply -- you'll have to read the circuit description that starts at
formatting link
to figure out what I'm doing and why.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google?  See http://cfaj.freeshell.org/google/
Reply to
Tim Wescott

I should have specified that, I only intended to do on/off of the emitter with a single PRN bit.

Real cool, is there a cheap IC that does this? I can easily generate PRN sequences that will not repeat before our sun goes nova with a PIC. Its only the receiving circuit that I need to design.

Luhan

Reply to
Luhan

Bingo! Thank you, Luhan

Reply to
Luhan

Then. Luhan, you already have everything you need. A simple detector-amplifier-comparator chain, into a digital input to your PIC, and do the detection in software. What's the problem?

John Perry

Reply to
John Perry

an exclusive or gate?

--
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU\'s LAIR web site at http://www.tinaja.com
Reply to
Don Lancaster

No cheap, dedicated ICs for an application this specific that I'm aware of. The PRBS doesn't need to be a 2^63-1 pattern but can be much shorter. I'd use a PRBS repetition rate and an accumulator bandwidth that corresponds roughly to my desired detection bandwidth. If you want to detect a 1 kHz chopper interrupting your beam your requirements are significantly different than noting when your car crosses your garage door boundary.

If Tim Wescott's multiplier approach (feeding an accumulator) doesn't work for you, there are many ways to go.

Do you want to use or avoid ADCs? (ambient to prbs power ratio is important) Do you want to run all your processing through a PIC? Are FPGAs your thing? Do you have a nice photodetector arrangement chosen?

An analog signal from your photo detector feeding a +/- switch that in turn feeds an integrator with a low frequency rolloff should provide the signal you need.

Reply to
John_H

The XOR is great if you're dealing with digital signals. The PRBS emitter/detector configuration allows rejection of significant background bias (sunlight, for instance) by processing the analog detector signal. The XOR is great if there isn't a bias to reject.

Reply to
John_H

I was hoping to pull very small signals out of a lot of ambiant and uncorrelated IR information. Very much what is done to despread a SS signal. In other words, a self-correlated IR receiver.

Luhan

Reply to
Luhan

One ought to do it.

Not set up for them.

Several, from my engineering stock.

Yes, this is what I got out of Tim's circuit. I am now working allong those lines.

Luhan

Reply to
Luhan

Appropriate if the incoming signal is digital, but here it's buried in noise -- squaring it up for an XOR gate would mangle it quite badly. The OP will, in fact, find that at low S/N ratios there's a lot of performance to be bought by fiddling with incoming signal levels vs. incoming noise, to find the best threshold levels.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google?  See http://cfaj.freeshell.org/google/
Reply to
Tim Wescott

Can the PIC's ADC keep up with the bit rate of the random generator? If so, doing it in software may be a very good way to go. You want to make sure that the sequences you use have an average value of zero, if you want your life to be simple.

You may want to place an AGC in the circuit to make sure that the signal uses a good portion of the ADC's range. You could also have the PIC set the gain.

Since the sequence is +1 and -1 only, the PIC can easily do the needed math. I'm thinking something like this will work.

While Something if PRNBit then A = A + ADC else A = A - ADC end if

end while if A > SomeNumber then print "We got it" else Print "no" end if

--
--
kensmith@rahul.net   forging knowledge
Reply to
Ken Smith

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.