Convolution, GPS and the TigerSHARC XCORRS instr. - PowerPoint PPT Presentation

About This Presentation
Title:

Convolution, GPS and the TigerSHARC XCORRS instr.

Description:

Convolution, GPS and the TigerSHARC XCORRS instr. M. Smith Electrical Engineering, University of Calgary Smithmr _at_ ucalgary.ca – PowerPoint PPT presentation

Number of Views:69
Avg rating:3.0/5.0
Slides: 42
Provided by: Micha812
Category:

less

Transcript and Presenter's Notes

Title: Convolution, GPS and the TigerSHARC XCORRS instr.


1
Convolution, GPS and the TigerSHARC XCORRS instr.
  • M. Smith
  • Electrical Engineering, University of Calgary
  • Smithmr _at_ ucalgary.ca

2
Overview
  • Correlation and the FIR
  • Correlation and GPS
  • Correlation in the time domain
  • Correlation in the frequency domain
  • Some basic characteristics of the XCORRS
    instruction
  • Lab 3 do 2 taps of real FIR filter per cycle
  • XCORRS do 128 taps of complex FIR filter per
    cycle

3
Already discussed in class for Lab. 1
  • You have a signal with amplitude samplesA A 0 0
    A A 0 0 A A 0 0 A A 0 0 A A
  • You have 4 FIR filters with coefficients
  • 0 -1 0 1 0 -1 0 1
  • 0 0 -1 -1 0 0 1 1
  • -1 -1 0 0 1 1 0 0
  • -1 -1 1 1 1 0 0 0
  • Which FIR produces the maximum amplitude and
    when does that maximum amplitude occur?

4
Study 1 ReviewRemember to flip the coefficient
order
  • A A 0 0 A A 0 0 A A 0 0 A A 0 0 A A
    Incoming signals
  • 1 1 0 0 -1 -1 0 0
    Output 4A
  • 1 1 0 0 -1 -1 0 0
    Output 2A
  • 1 1 0 0 -1 -1 0 0
    Output 0
  • 1 1 0 0 -1 -1 0 0
    Output -2A
  • 1 1 0 0 -1 -1 0 0
    Output -4A
  • A A 0 0 A A 0 0 A A 0 0 A A 0 0 A A
    Incoming signals
  • 1 0 -1 0 -1 0 -1 0
    Output 2A
  • 1 0 -1 0 -1 0 -1 0
    Output 2A
  • 1 0 -1 0 1 0 -1 0
    Output 0
  • 1 0 -1 0 1 0 -1 0
    Output 0
  • etc

5
Already discussed in class for Lab. 1(Where I
forget to flip coeff in examples
  • You have a signal with amplitude samplesA A 0 0
    A A 0 0 A A 0 0 A A 0 0 A A
  • You have 4 FIR filters with coefficients
  • 0 -1 0 1 0 -1 0 1
  • 0 0 -1 -1 0 0 1 1 MATCHED FILTER
  • -1 -1 0 0 1 1 0 0 MATCHED FILTER
  • -1 -1 1 1 1 0 0 0
  • Now imagine that the FIR filter length is 1024
    the differences between the maximums of the
    outputs will increase
  • Now imagine that the data characteristics are so
    that the matches between one given filter is
    maximized and the matches between all the other
    filters is minimized ORTHO-NORMAL
  • Now we are talking about the basics of GPS
  • Not talking about FIR any more, we are talking
    about cross-correlation vector products
    inner products. Same mathematics, different
    application

6
GPS
  • Number of satellites circling in the earth 24?
  • Each are transmitting a unique binary signal
  • The binary signals are carefully chosen and
    carefully synchronized clocks
  • You have a cheap local receiver, you know the
    unique binary signals from each satellite
  • You have the FIR code from Lab. 1 which you are
    going to use for cross-correlation
  • Laboratory 5 determine where you are on the
    earths surface are you really in the 515
    class, or is it just a dream and you are tucked
    up safe in bed after last nights party?

7
GPS Positioning Concepts
(1)
  • For now make 2 assumptions
  • We know the distance to each satellite
  • We know where each satellite is
  • With this information from 2 satellites you
    know you are on a plane of intersection.
  • Require 3 satellites for a 3-D position in this
    ideal scenario
  • Requires 4 satellites to account for local
    receiver clock drift.

8
GPS Signal Structure
  • Each satellite transmits 2 carrier frequencies
    referred to as L1 (1575 MHz) and L2 (1227 MHz)
  • Each carrier frequency is BPSK modulated with a
    unique PRN (pseudo random number) code
  • The PRN code on L1 is called CA code (coarse
    acquisition), The PRN code on L2 is called P code
    (precise)
  • CA code takes 1 ms for full PRN transmission at
    1MHz chip (bit) rate. P code takes 1.5 s for full
    PRN transmission at 10MHz chip rate
  • Also modulated on each carrier is 50 Hz data that
    includes the current position of the satellite

9
Determining Time
Signal send by satelliteSignal received by
you You know the signal sent Perform
correlations till you get a match
(1)
  • Use the PRN code to determine time
  • Use time to determine distance to the satellite
    distance speed of light time

10
Algorithms to Find PRN Phase
  • Time-domain Cross correlation 1/N ? x1 (n)
    x2(n)
  • Coding equivalent to FIR filter, Lab. 1
  • For each of the possible 24 satellites do
  • For each of the N possible
    shift positions of the data do
  • For N points of data
    and N point of filter do
    complex FIR filter of N points
  • 24 N N complex multiplications and
    additions
  • complex add (A jB) (C jD)
    (A B) j(C D) 2 adds complex mult
    (A jB) (C jD) (AC - BC) j(AD
    BC)
    2 adds and 4 multiplications24 12
    N N operations each time N 1024 then
    thats around 300 M ops all the other stuff
    you need to do

11
Algorithms to Find PRN Phase
  • Time-domain Cross correlation 1/N ? x1 (n)
    x2(n)
  • Coding equivalent to FIR filter, but need to
    filter N sets of data, each shifted by one data
    point
  • Correlation of perfectly matching signals gives a
    maximum value
  • Correlation of 2 random data sequences tends to 0
  • PRN code from different satellites are designed
    to correlate to 0.

D
12
Algorithms to Find PRN Phase
  • Time-domain Cross correlation 1/N ? x1 (n)
    x2(n)
  • Correlation in time domain equates to
    multiplication in frequency domain
  • Pre- calculate Discrete Fourier Transform of
    Filter coefficients X2(k) DFTx2(n)
  • Calculate Discrete Fourier Transform of data
    values once for all 24 satellitesX1(k)
    DFTx1(n) --- requires N log(N) complex
    operations
  • Perform multiplication in Fourier domain
    requires N complex operations
  • Perform Inverse discrete Fourier Transform 1/N
    F-1X1(k)X2(k) -- N log(N) complex operations
  • Total N( 24 25 log(N) ) complex operations
    compared to 24 N N
  • N N 1024 1024 --- N log N 1024
    log(1024) 1024 10
  • The long approach is faster

D
13
Remember from previous lectureKnow the
customization issues
  • The satellite data has a special format1, -1, j,
    -j, 1 j, 1 j etc, and nothing else
  • Essentially doing 1 bit complex arithmetic
  • Do the ASP (application specific processor)
    thing on the TigerSHARC
  • XCORRs instruction

14
Where does the CLU fit in?
15
THEORYMathematicaldefinition
XCORRS Uses registers TR D C And something
called CUT
16
Standard XCORRS instruction16 special
correlations performed in 1 cycle32 correlations
if also using Y register
Lower 46 bits ofTHR10
R73
Quad fetches will be needed
TR0, TR1, TR2 . TR15
17
TR150 XCORRS(R74, THR30)
TR0 D7 C22 D6 C21 8 taps TR1 D7
C21 D6 C20 8 taps .. .. TR15 D7
C7 D6 C6 8 taps 64 taps each cycles on
both x and y compute blocks if set up
properly 128 taps each cycle these are
complex taps compared to 2 real taps / cycle
after lab. 3
18
TR150 XCORRS(R74, THR30) (CUT -7)
TR0 D7 C22 D6 C21 8 taps TR1 D7
C21 D6 C20 8 taps .. .. TR14 D7
C8 D6 C7 2 taps TR15 D7 C7
1 taps
19
TR150 XCORRS(R74, THR30) (CUT -15)
TR0 D7 C22 D6 C21 8 taps TR1 D7
C21 D6 C20 7 taps .. TR7 D7 C15
1 taps TR0 0
0 taps .. TR15 0 0 taps
20
TR150 XCORRS(R74, THR30) (CUT 15)
TR0 0 0
taps TR1 D0 C14 1 taps .. TR7
D6 C14 D5 C13 7 taps TR0 D7 C14
D6 C13 8 taps .. TR15 D7 C7 D6
C7 8 taps
21
CLU
  • Interesting possibilities for independent study
  • Q9 on final you will always find a make up
    your own question and answer it
  • Bring in your head
  • Relevant to 4th year course
  • Not something we have done in the class or the
    labs, or presented by your colleagues (or self)
    as those topics are covered else where

22
(No Transcript)
23
(No Transcript)
24
(No Transcript)
25
(No Transcript)
26
(No Transcript)
27
  • MULTIPLIES
  • ADD REAL AND IMAG
  • ACCUMULATE
  • 6 OPS in 1 cycle in X ditto in Y

28
Special shifter operations
29
(No Transcript)
30
Bit reverse essential for FFT operationsYou
will find in any DSP processor
31
(No Transcript)
32
Program sequencer
33
(No Transcript)
34
(No Transcript)
35
Get the fastest hardware loopCode goes on and on
Why is all thisinformationnecessary?
36
What exactly does all this mean?
37
(No Transcript)
38
(No Transcript)
39
(No Transcript)
40
(No Transcript)
41
Overview
  • Correlation and the FIR
  • Correlation and GPS
  • Correlation in the time domain
  • Correlation in the frequency domain
  • Some basic characteristics of the XCORRS
    instruction
  • Lab 3 do 2 taps of real FIR filter per cycle
  • XCORRS do 128 taps of complex FIR filter per
    cycle
  • Next class looking at using the XCORRS
    instruction this was 2005 Lab. 4 exercise
Write a Comment
User Comments (0)
About PowerShow.com