Correlation based GPS System Milestone 2 Team 4: Alex Cunningham Phillip Marks Andrew D. Falendysz Meghashyam Adoni ECE 6276 Final Project.

Slides:



Advertisements
Similar presentations
DSPs Vs General Purpose Microprocessors
Advertisements

Programmable FIR Filter Design
Practical techniques & Examples
Functions and Functional Blocks
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
CPT 310 Logic and Computer Design Instructor: David LublinerPhone Engineering Technology Dept.Cell
Software and Hardware Circular Buffer Operations First presented in ENCM There are 3 earlier lectures that are useful for midterm review. M. R.
Chapter 10.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 6 Functions.
Aug. 24, 2007ELEC 5200/6200 Project1 Computer Design Project ELEC 5200/6200-Computer Architecture and Design Fall 2007 Vishwani D. Agrawal James J.Danaher.
Contemporary Logic Design Arithmetic Circuits © R.H. Katz Lecture #24: Arithmetic Circuits -1 Arithmetic Circuits (Part II) Randy H. Katz University of.
Chapter 7 - Part 2 1 CPEN Digital System Design Chapter 7 – Registers and Register Transfers Part 2 – Counters, Register Cells, Buses, & Serial Operations.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 1 –
GODIAN MABINDAH RUTHERFORD UNUSI RICHARD MWANGI.  Differential coding operates by making numbers small. This is a major goal in compression technology:
1 CS 162 Introduction to Computer Science Chapter 5 ASCII to Integer Conversion Herbert G. Mayer, PSU Status 11/9/2014.
DARPA Digital Audio Receiver, Processor and Amplifier Group Z James Cotton Bobak Nazer Ryan Verret.
1 Chapter 1 Overview of Programming and Problem Solving Dale/Weems Slides based on work by Sylvia Sorkin, Community College of Baltimore County - Essex.
Aug Shift Operations Source: David Harris. Aug Shifter Implementation Regular layout, can be compact, use transmission gates to avoid threshold.
Processor Architecture Needed to handle FFT algoarithm M. Smith.
EGR 2261 Unit 5 Control Structures II: Repetition  Read Malik, Chapter 5.  Homework #5 and Lab #5 due next week.  Quiz next week.
A Computer Science Tapestry 1 Recursion (Tapestry 10.1, 10.3) l Recursion is an indispensable technique in a programming language ä Allows many complex.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Variables, Functions & Parameter Passing CSci 588 Fall 2013 All material not from online sources copyright © Travis Desell, 2011.
Conversion and Coding (12) 10. Conversion and Coding (12) Conversion.
 200 Total Points ◦ 74 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 36 Points Short Answer ◦ 30 Points Multiple Choice.
1 Huffman Codes Drozdek Chapter Objectives You will be able to Construct an optimal variable bit length code for an alphabet with known probability.
COP3530 Data Structures600 Stack Stack is one the most useful ADTs. Like list, it is a collection of data items. Supports “LIFO” (Last In First Out) discipline.
IT253: Computer Organization Lecture 3: Memory and Bit Operations Tonga Institute of Higher Education.
C++ Tutorial Hany Samuel and Douglas Wilhelm Harder Department of Electrical and Computer Engineering University of Waterloo Copyright © 2006 by Douglas.
Chapter 12 Transmission Control Protocol (TCP)
DSP Processors We have seen that the Multiply and Accumulate (MAC) operation is very prevalent in DSP computation computation of energy MA filters AR filters.
Copyright  Hannu Laine C++-programming Part 1 Hannu Laine.
Pointers OVERVIEW.
C++ History C++ was designed at AT&T Bell Labs by Bjarne Stroustrup in the early 80's Based on the ‘C’ programming language C++ language standardised in.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 17 Dr. Shi Dept. of Electrical and Computer Engineering.
Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers.
CS Midterm Study Guide Fall General topics Definitions and rules Technical names of things Syntax of C++ constructs Meaning of C++ constructs.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 6 Functions.
Starting Out with C++ Early Objects ~~ 7 th Edition by Tony Gaddis, Judy Walters, Godfrey Muganda Modified for CMPS 1044 Midwestern State University 6-1.
Module 4: I/O and Strings #1 2000/01Scientific Computing in OOCourse code 3C59 Module 4: I/O In this module we will cover Keyboard/screen input and output.
CS415 C++ Programming Takamitsu Kawai x4212 G11 CERC building WV Virtual Environments Lab West Virginia University.
1 Becoming More Effective with C++ … Day Two Stanley B. Lippman
Reading from a file, Sorting, and a little Searching Data Structures and Algorithms CS 244 Brent M. Dingle, Ph.D. Department of Mathematics, Statistics,
Lecturer: Nguyen Thi Hien Software Engineering Department Home page: hienngong.wordpress.com Chapter 2: Language C++
Searching CSE 103 Lecture 20 Wednesday, October 16, 2002 prepared by Doug Hogan.
C:\Temp\Templates 4 5 Use This Main Program 6.
Distortion Correction ECE 6276 Project Review Team 5: Basit Memon Foti Kacani Jason Haedt Jin Joo Lee Peter Karasev.
Distortion Correction ECE 6276 Project Review Team 5: Basit Memon Foti Kacani Jason Haedt Jin Joo Lee Peter Karasev.
Chapter 6 Functions. 6-2 Topics 6.1 Modular Programming 6.2 Defining and Calling Functions 6.3 Function Prototypes 6.4 Sending Data into a Function 6.5.
Logic Gates Dr.Ahmed Bayoumi Dr.Shady Elmashad. Objectives  Identify the basic gates and describe the behavior of each  Combine basic gates into circuits.
Reconfigurable Computing - Options in Circuit Design John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on Cockburn Sound,
CMSC 202 Lesson 26 Miscellaneous Topics. Warmup Decide which of the following are legal statements: int a = 7; const int b = 6; int * const p1 = & a;
Test Vectors First, an overview of the data coming from the satellites: GPS Message Consists of a NAV message modulated with a much higher-frequency code.
CHAPTER 18 Circuits for Arithmetic Operations
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Protection of System Resources
Basics of digital systems
Lecture 16 Arithmetic Circuits
Announcements Final Exam on August 17th Wednesday at 16:00.
Matlab as a Development Environment for FPGA Design
Trying to avoid pipeline delays
Convolution, GPS and the TigerSHARC XCORRS instr.
Explaining issues with DCremoval( )
ECE 434 Advanced Digital System L11
Instructor: Alexander Stoytchev
XOR Function Logic Symbol  Description  Truth Table 
Fundamental Programming
CHAPTER 18 Circuits for Arithmetic Operations
ULTRA-FAST BIQUAD FILTERING OPTIMIZED FOR CORTEX-M4/M7
Switch Case Structures
Presentation transcript:

Correlation based GPS System Milestone 2 Team 4: Alex Cunningham Phillip Marks Andrew D. Falendysz Meghashyam Adoni ECE 6276 Final Project

Goals Our goal is to use a correlator bank to determine which GPS satellite(s) are available at a given location. To design a high-sensitivity, fast acquisition system to provide accurate identification of weak GPS signals. The extra processing power will be used to integrate weak signals to the point where they can be used to provide a position or timing solution.

System Block Diagram Demodulated Input Shift Register Chip Clk Correlator Detect Header PRN Code Y > Threshold N Read New Code Shift Register Code

C Code Reference Design int main(int argc, char ** argv) { // Load Data // prep buffers // move CA code into an int buffer float ca_code[CA_CODE_SIZE]; for (int i = 0; i < CA_CODE_SIZE; i++) { ca_code[i] = (float) cacode.get(); } // clear shift register - possibly optional step float shift_reg[CA_CODE_SIZE]; // load encoded data into a buffer that can be circled float* encoded_msg = new float[DATA_CYCLE_SIZE]; for (int i = 0; i < DATA_CYCLE_SIZE; i++) { encoded_msg[i] = (float) encoded.get(); } // a pointer to use with the circular buffer float * encoded_msg_ptr = encoded_msg +INPUT_OFFSET; // while waiting on a lock cout << "Looking for lock..." << endl; bool haslock = false; while (!haslock) { // load a new piece of data //cout << "Load more data" << endl; float new_data = (float) *encoded_msg_ptr; // perform circular buffering on dataset if (encoded_msg_ptr = encoded_msg+CA_CODE_SIZE-1) encoded_msg_ptr = encoded_msg; else encoded_msg_ptr++; //cout 0; i--) { shift_reg[i] = shift_reg[i-1]; } // shift into the current register shift_reg[0] = new_data; // perform correlation //cout 0.5) haslock = true; } cout << "Lock found!" << endl; delete[] encoded_msg; cout << "Freeded Encode" << endl; return 0; }

Conversion to Catapult C All code and libraries have been modified by using AC Datatypes. Catapult C FFT library has been used in lieu of fftw library used in the C implementation. Loops have been identified and labeled for optimization. Problems arose with initial implementation New algorithm is proposed

Test Vectors A test-bench file has been created with the appropriate test vectors. (CA code and test message at the moment)‏ These test vectors remain the same as in the previous C implementation. Binary data files: –C/A Code (128 Bytes)‏ –NAV Message (38 Bytes)‏ –NAV Message Modulated with C/A Code (434 kB)‏

Initial Catapult C Implementation Top Level #pragma hls_design_top void my_gps (ac_channel &data_input, // sample data code_type cacode[CA_CODE_SIZE], // C/A code for the particular satellite bool *lock_out, // output for test whether a lock was found lag_type *lag_out) // time delay in signal for alignment with C/A code { static gps_correlator filter_1(); filter_1.test_for_lock(data_input, cacode, lock_out, lag_out); }

Initial Catapult C Implementation // initialize variables max = 0; cur_lag = 0; static CComplex cSinCosRom[64] = { #include "SinCos_256.tab" }; // create fft engines FFT_type fft(cSinCosRom); IFFT_type ifft(cSinCosRom); // shift in new data SHIFT:for(int z=(CA_CODE_SIZE-1);z>=0;z--) { data[z] = (z==0) ? CComplex (data_input.read()) : data[z-1] ; } FFT_type::MemoryType data_fft(data); // convert code to complex array LOAD:for(int z=0;z (cacode[z]); } FFT_type::MemoryType code_fft(code); // perform in-place FFT of input fft.Run(data_fft, 8); // perform FFT of code fft.Run(code_fft, 8); // conjugate and multiply CONJ:for(int ii=0; ii ( data[ii].Re() * code[ii].Re() + data[ii].Im() * code[ii].Im(), data[ii].Re() * code[ii].Im() - data[ii].Im() * code[ii].Re()); } IFFT_type::MemoryType corr_time(corr); // inverse FFT //FFTSimple (corr); //IFFT_type ifft(cSinCosRom); ifft.Run(corr_time, 8); // check that this is a good number // find max power and location of max power MAX:for(int ii=0; ii max) { max = corr[ii].Re(); cur_lag = ii; } } // load answers into results if (max > MIN_POWER_THRESH) { *lag_out = cur_lag; *lock_out = true; } else { *lag_out = 0; *lock_out = false; }

Optimization Focus and Plans Focus: Area Receivers need to be implemented in parallel, so individual GPS trackers need to be individually small Reduce the number of bits for the FFT algorithm Pre-calculate FFT of C/A code to remove optimizations from the main function Ensure that only one FFT module is created Unrolling load and maximum-finding loops

Coding Issues Synthesis engine optimizes out internals of design Very long synthesis times (~20 minutes)‏ Doing bit level operations on bytes. Not able to make FFT/IFFT a block and take advantage of hierarchical coding This feature isn't available in our version of Catapult C Problems using FFT examples in CatapultC

Coding Issues In the end couldn't get actual results Need a better algorithm that avoids complications of using the FFT A new algorithm is proposed in the next slides

XNOR Based Correlator An XNOR operation on the data and C/A code along with an accumulator Assume data and C/A code are binary signals with values of 1 and -1 The XNOR truth table is similar to 'standard' binary case Avoid use of FFT Much faster than FFT based method and smaller in area Actually implemented on the data bits

XNOR Based Correlator (Algorithm) START Load C/A code into a bit vector LOOP: Shift in a data bit For each bit in the C/A code and the data vector calculator XNOR Then add result to an accumulator Back to LOOP

XNOR Based Correlator

XNOR Based Correlator (Code) // returns true if code has been found, false otherwise #pragma hls_design top bool my_gps(bool data_sample, bool cacode[CODE_SIZE]) { static correlator corr; if(corr.init) { corr.load_code(cacode); return false; } else { return corr.correlate(data_sample); }

XNOR Based Correlator (Code) // constructor correlator() { // only initializes buffers as necessary CLEAR_DATA:for(int i = 0; i<CODE_SIZE; i++) { data[i] = false; } init = true; } // initialization function - just copies in the code void load_code(bool cacode[CODE_SIZE]) { LOAD_CODE:for(int i = 0; i < CODE_SIZE; i++) { code[i] = cacode[i]; } init = false; } //Main Function bool correlate(bool data_sample) { // reset counter counter = 0; // load data into shift register SHIFT:for(int z=(CODE_SIZE-1);z>=0;z--) { data[z] = (z==0) ? data_sample : data[z-1]; } // loop over registers and score ACC:for(int z=0;z<CODE_SIZE;z++) { counter += (!(code[z] ^ data[z])) ? 1 : -1; } // threshold the counter to set output return counter > DETECT_THRESH; }

Catapult C Resuts

New Optimization Focus and Plans Focus will remain on area Use adder tree or distributed arithmetic to cut down on area even more More unrolling/pipelining of ACC and SHIFT loops Reduce latency User doesn’t want to wait for a lock Parallel operation Use multiple correlators in parallel

References 1.Global Positioning System Standard Positioning Service Signal Specification, Peter H. Dana, Fast Acquisition, high sensitivity GPS receiver, Inventor: Norman F. Krasner, Assignee: Snaptrack, No , Issued: Sep 11, Parallel correlator for global positioning system receiver, Inventors: Glen W. Brooksby, Gerald J. Michon, Jerome J. Tiemann, Assignee: General Electric Company, No , Issued: Nov 26, Method and apparatus for computing signal correlation, Inventor: Charles Abraham et al, Assignee: Global Locate, Inc, No , Issued: Aug 12, Multiplexed digital correlator, Inventor: Lawrence M. Leibowitz, Assignee: The United States of America as represented by the Secretary of the Navy, No , Issued: Apr 21, Fast algorithms for digital signal processing / Richard E. Blahut. Reading, Mass. : Addison- Wesley Pub. Co., c Global Positioning System Overview Efficient Correlation over a sliding window, Inventor Paul W. Dent, Eric Wang, Assignee: Ericsson Inc, No , Issued: Aug. 3 rd 1999