Convolution, GPS and the TigerSHARC XCORRS instr.

Slides:



Advertisements
Similar presentations
David Hansen and James Michelussi
Advertisements

Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering.
DSPs Vs General Purpose Microprocessors
Intel Pentium 4 ENCM Jonathan Bienert Tyson Marchuk.
GPS Signal Structure Sources: –GPS Satellite Surveying, Leick –Kristine Larson Lecture Notes 4519/asen4519.html.
Digital Kommunikationselektronik TNE027 Lecture 5 1 Fourier Transforms Discrete Fourier Transform (DFT) Algorithms Fast Fourier Transform (FFT) Algorithms.
LECTURE Copyright  1998, Texas Instruments Incorporated All Rights Reserved Use of Frequency Domain Telecommunication Channel |A| f fcfc Frequency.
Processor Architecture Needed to handle FFT algoarithm M. Smith.
Software and Hardware Circular Buffer Operations First presented in ENCM There are 3 earlier lectures that are useful for midterm review. M. R.
TigerSHARC CLU Closer look at the XCORRS M. Smith, University of Calgary, Canada
6/3/20151 This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items.
6/3/20151 Developing a multi-thread product – Introduction (ENCM491 – real time operating systems in 1 hr) M. Smith Electrical Engineering, University.
Sampling, Reconstruction, and Elementary Digital Filters R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002.
3/5/2004DSP Applied to GPS Algorithms1 of 14 DSP Applied to GPS Algorithms.
A SINGLE FREQUENCY GPS SOFTWARE RECEIVER
Connectivity Lab University of California, Berkeley Location and Timing with C/A code in GPS Wanbin Tang Jan 24, 2007.
GPS and other GNSS signals GPS signals and receiver technology MM10 Darius Plausinaitis
TigerSHARC CLU Closer look at the XCORRS M. Smith, University of Calgary, Canada
TigerSHARC processor General Overview. 6/28/2015 TigerSHARC processor, M. Smith, ECE, University of Calgary, Canada 2 Concepts tackled Introduction to.
Transforms: Basis to Basis Normal Basis Hadamard Basis Basis functions Method to find coefficients (“Transform”) Inverse Transform.
How The GPS System Works. How the GPS System Works 24 satellites + spares 6 orbital planes 55° inclination Each satellite orbits twice every 24 hours.
Microcomputer Systems 1 Introduction to DSP’s. 9 August 2015Veton Këpuska2 Introduction to DSP’s  Definition: DSP – Digital Signal Processing/Processor.
Using Programmable Logic to Accelerate DSP Functions 1 Using Programmable Logic to Accelerate DSP Functions “An Overview“ Greg Goslin Digital Signal Processing.
Real time DSP Professors: Eng. Julian Bruno Eng. Mariano Llamedo Soria.
Processor Architecture Needed to handle FFT algoarithm M. Smith.
Computational Technologies for Digital Pulse Compression
Digital Signal Processing – Chapter 10
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Under-Graduate Project Case Study: Single-path Delay Feedback FFT Speaker: Yu-Min.
Which one? You have a vector, a[ ], of random integers, which can modern CPUs do faster and why? //find max of vector of random ints max=0; for (inda=0;
A Mini Stereo Digital Audio Processor Design DINESH GUNDU VIGNESH SABARINATH.
Linear filtering based on the DFT
Sampling of Continuous-Time Signals Quote of the Day Optimist: "The glass is half full." Pessimist: "The glass is half empty." Engineer: "That glass is.
DEPARTMENTT OF ECE TECHNICAL QUIZ-1 AY Sub Code/Name: EC6502/Principles of digital Signal Processing Topic: Unit 1 & Unit 3 Sem/year: V/III.
Fast Fourier Transforms. 2 Discrete Fourier Transform The DFT pair was given as Baseline for computational complexity: –Each DFT coefficient requires.
1 SVY 207: Lecture 5 The Pseudorange Observable u Aim of this lecture: –To understand how a receiver extracts a pseudorange measurement from a GPS signal.
Real-time Digital Signal Processing Digital Filters.
Applied Research Laboratories The University of Texas at Austin Applied Research Laboratories The University of Texas at Austin Interfacing GPSTk to Existing.
Serial Communications
The content of lecture This lecture will cover: Fourier Transform
Signal Processing First
DIGITAL SIGNAL PROCESSING ELECTRONICS
Digital Signal Processing
CE Digital Signal Processing Fall Discrete-time Fourier Transform
FFT-based filtering and the
Embedded Systems Design
VLSI Testing Lecture 14: Built-In Self-Test
Fast Fourier Transforms Dr. Vinu Thomas
Developing a multi-thread Simulation of GPS system You’ll only need to add the threads – all functions (except correlation( )) provided M. Smith Electrical.
لجنة الهندسة الكهربائية
Subject Name: Digital Signal Processing Algorithms & Architecture
Software and Hardware Circular Buffer Operations
TigerSHARC processor General Overview.
Developing a multi-thread product -- Introduction
Lecture #17 INTRODUCTION TO THE FAST FOURIER TRANSFORM ALGORITHM
Lect5 A framework for digital filter design
Real-time 1-input 1-output DSP systems
4.1 DFT In practice the Fourier components of data are obtained by digital computation rather than by analog processing. The analog values have to be.
Trying to avoid pipeline delays
Developing a multi-thread product -- Introduction
The Beauty of Mathematics in
Chapter 9 Computation of the Discrete Fourier Transform
Single Value Processing Multi-Threaded Process
Explaining issues with DCremoval( )
General Optimization Issues
Lecture 26 Logic BIST Architectures
Understanding the TigerSHARC ALU pipeline
Working with the Compute Block
Lecture #17 INTRODUCTION TO THE FAST FOURIER TRANSFORM ALGORITHM
Electrical Communications Systems ECE
Presentation transcript:

Convolution, GPS and the TigerSHARC XCORRS instr. M. Smith Electrical Engineering, University of Calgary Smithmr @ ucalgary.ca 12/30/2018

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 12/30/2018

Already discussed in class for Lab. 1 You have a signal with amplitude samples A 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? 12/30/2018

Study 1 – Review Remember 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 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 12/30/2018

Already discussed in class for Lab Already discussed in class for Lab. 1 (Where I forget to flip coeff in examples You have a signal with amplitude samples A 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 12/30/2018

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 earth’s surface – are you really in the 515 class, or is it just a dream and you are “tucked up safe in bed” after last night’s party? 12/30/2018

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. 12/30/2018

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 12/30/2018

Determining Time Use the PRN code to determine time Signal send by satellite Signal 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 12/30/2018

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 multiplications 24 * 12 * N * N operations “each time N = 1024 then that’s around 300 M ops + all the other stuff you need to do 12/30/2018

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/30/2018

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) = DFT[x2(n)] Calculate Discrete Fourier Transform of data values – once for all 24 satellites X1(k) = DFT[x1(n)] --- requires N log(N) complex operations Perform multiplication in Fourier domain – requires N complex operations Perform Inverse discrete Fourier Transform 1/N F-1[X1(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 12/30/2018

Remember from previous lecture Know the customization issues The satellite data has a special format 1, -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 12/30/2018

Where does the CLU fit in? 12/30/2018

THEORY Mathematical definition XCORRS Uses registers TR D C And something called CUT THEORY Mathematical definition 12/30/2018

Standard XCORRS instruction 16 “special” correlations performed in 1 cycle 32 correlations if also using Y register Lower 46 bits ofTHR1:0 R7:3 Quad fetches will be needed TR0, TR1, TR2 ……. TR15 12/30/2018

TR15:0 = XCORRS(R7:4, THR3:0) TR0 += D7 * C22 + D6 * C21 +… 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 12/30/2018

TR15:0 = XCORRS(R7:4, THR3:0) (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 12/30/2018

TR15:0 = XCORRS(R7:4, THR3:0) (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 12/30/2018

TR15:0 = XCORRS(R7:4, THR3:0) (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 12/30/2018

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 12/30/2018

12/30/2018

12/30/2018

12/30/2018

12/30/2018

12/30/2018

6 OPS in 1 cycle in X – ditto in Y MULTIPLIES ADD REAL AND IMAG ACCUMULATE 6 OPS in 1 cycle in X – ditto in Y 12/30/2018

Special shifter operations 12/30/2018

12/30/2018

Bit reverse – essential for FFT operations You will find in any DSP processor 12/30/2018

12/30/2018

Program sequencer 12/30/2018

12/30/2018

12/30/2018

Get the fastest hardware loop Code goes on and on Why is all this information necessary? 12/30/2018

What exactly does all this mean? 12/30/2018

12/30/2018

12/30/2018

12/30/2018

12/30/2018

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 12/30/2018