Docstoc

EECS 452 Digital Signal Processi

Document Sample
EECS 452 Digital Signal Processi Powered By Docstoc
					              EECS 452
    Digital Signal Processing Lab

                Lecture 1: Class introduction

           Handouts:
           • Lecture notes
           • Schedule
           • HW1, HW3a
           • (Also have prelab 1 to think about)
One must learn by doing the thing; for though you think you know it, you have no
certainty, until you try. — Sophocles
                       Agenda
• Course overview
• What is a Digital Signal Processor?
  – And what are we using in lab?
• Lab hardware
• Start on C
• Review DSP basics
       "Tell me and I forget. Show me and I remember.
       Have me do and I understand.” –Chinese proverb*


                          *Also attributed to lots of old Greek guys, so who knows. 2
Course overview



                          What is 452?
    • Apply the concepts from systems classes (216,
      451, 455 etc.) to real problems in an embedded
      environment.
         – You will be learning about a specific embedded
           environment using specific tools.
             • DSP using TI C5515 DSP microcomputer and Altera FPGA.
             • Verilog and C will be the hardware and software languages
               of choice
         – We will also focus on the generic application of the
           theory.
             • So emphasis on how to apply the theory in the face of real
               world challenges.

                                                                            3
Course overview



                        Who am I?
    • Dr. Mark Brehob
         – Lecturer (full-time teacher) in EECS
         – My background is on the embedded systems and
           architecture side
         – I’ve been picking up DSP in the last few years.




                                                             4
              Who else is there?
• Chao Yuan                        • These are great folks.
   – Was also GSI for the class      – Dr. Metzger is here out
     last Fall.
                                       of the kindness of his
   – Very strong interest in the
     area.                             heart.
• Dr. Kurt Metzger                   – You’re going to end up
   – Emeritus faculty member           relying on him a lot.
   – Will be heavily involved in        • Be nice!
     the class




                                                             5
Course overview



                  Class organization (1/2)
    • For the first six weeks the focus will be on
      teaching you how to do useful things with the
      DSK* found in lab.
         – In lab you’ll be doing six directed lab assignments
           (one a week).
               • Learn generic ideas/issues associated with implementing
                 DSP applications.
               • Learn how to work with the DSK.
               • These are fairly long and you can count on not finishing them
                 in lab.
         – In lecture we will be:
               • Teaching about the DSK
                     – Including reviewing C and teaching Verilog basics
               • Teaching about the generic ideas/issues associated with
                 implementing DSP applications in the lab.
                     – A2D, digital waveform generation, filter implementation, etc.
      * “Digital Signal Processing Kit”. Don’t ask where the P went.                   6
Course overview



                  Class organization (2/2)
    • In the last eight weeks the class will diverge a bit
         – The lab will be purely for the class project.
         – The lecture will cover a variety of material.
             • Some generic DSP stuff
                   – More on filters and sampling, DSP architecture and assembly,
                     etc.
             • Some project-specific stuff
                   – When I can find things that apply to a fair number of the
                     projects.

    • Note: we will be getting started on the projects in
      parallel with the first six weeks!

                                                                                    7
Course overview

                  Expected Background /
                     Learning Curve
    • Requirements are 216, 451, 280
         – So a background with continuous signals,
           digital signals, and programming (C and
           Matlab) is assumed.
             • Lots of Matlab and C is in your future.
    • There will a large emphasis on hardware
      design (270/370/373/470) and low-level
      software design (373).
         – We won’t assume any background in this
           material, but we will be expecting you to pick
           up a lot of it in a fairly short time.           8
Course overview



                            Grading
    • Breakdown:
         – Lab 20%
             • 6 labs.
         – Homework 10%
             • 5-7 homework assignments, not all weighted
               equally.
         – Exams 30%
             • 15% for midterm and final.
         – Final Project 40%
    • Median will likely be a B+
                                                            9
Course overview



                            Projects
    • Groups of 4 to 5
    • 40% of the class grade
    • Target of 452 projects is to be useful.
         – Should be thinking product prototype
    • Needs to use DSP techniques
         – Vast majority will use our lab set-up.
         – Some projects have been largely theoretical with a
           DSK-based verification.
    • Grading is largely subjective
         – Based on difficulty, functionality and general value of
           design.

                                                                     10
                        Labs (1/2)
• 6 labs in the first 6 weeks
   – Covers
      • C5515, FPGA, using both together
      • Direct digital synthesis, FIR filtering, IIR filtering, FFTs, basic
        analog circuits and more
   – Pre-labs done individually
   – In-lab/Post-lab done in groups of 2
• The labs are very time consuming
   – I’d expect you are looking at 6-10 hours per lab
     depending on your background
• The labs are new this term
                                                                          11
   – Expect some bumps and glitches
                     Labs (2/2)
• Pre-labs are due at the beginning of lab
  – 25% of the lab grade
• In-lab/Post-lab are due at the beginning of the
  next lab.
  – In-lab
     • Has sign-off points (where the GSI signs off you’ve got that
       part working).
     • Questions which you’ll want or need to do in lab
  – Post-lab
     • Just more questions
     • Should be able to do outside of lab
                                                                      12
Course overview



      Schedule and Important Dates
    • Some important dates:
         –   Oct. 6th 7pm+            Project group formation
         –   Oct. 27th 6:45-8:45pm    Midterm exam
         –   Dec. 8th (maybe?)        Design expo (required, afternoon)
         –   Dec. 13th 4pm+:          Project presentations
         –   Dec 20th 4-6pm:          Final
    • And some are soon:
         – Homework 1 is due Monday.
         – Lab1 prelab is also due at the start of lab next week.
    • Please be aware that the topic list for the class is
      approximate, especially as the semester goes on.
         – Things vary by project choices
         – Also each semester people seem to struggle with different
           topics.
                                                                          13
Course overview


  Some projects from the last few years
    • Vision, motion, control
         – Camera-directed robot (following pre-specfied color/path).
         – Real-time automobile lane change detector.
    • Audio, sound processing, and control
         –   Feel the music: a glove that turns music into vibration.
         –   Dance floor: floor lighting controlled by music and pressure.
         –   Beat matching: smooth transition between songs of different tempos.
         –   Guitar auto-tuner.
         –   Audio controlled stage lighting.
    • Sensing, communication and networking
         – Wireless body-worn soldier health monitoring.
         – Stroke-Pro: racing boat stroke monitoring.
    • DSP and communication fundamentals
         – Filter direct form I optimizer for car stereo systems.
         – OFDM modem.
         – Active noise cancellation headset.                                      14
What is a DSP?


     What is a Digital Signal Processor?
    • Wikipedia Lede:
           – A digital signal processor is a
             specialized microprocessor
             designed specifically for digital
             signal processing, generally in real-
             time computing.                                                         • Why process as
    • OK, but what does that mean?                                                     digital, not
           – Optimized to handle things like                                           analog?
             FFTs and other similar algorithms
             while using as little power and at a
             low of cost as possible.
           – Think about the requirements of a
             hearing aid for example…
                  • Cost, power, size, etc.




  Large parts of this section taken from Wikipedia’s article on Digital Signal Processors, including the above figure.
                                                                                                                         15
What is a DSP?



           DSP architectural features
    • Hardware modulo addressing
        – Allows circular buffers to be implemented without
          having to constantly test for wrapping.
    • Special arithmetic operations, such as fast
      multiply-accumulates (MACs).
        – Many DSP algorithms, such as FIR filters, matrix
          operations, and the Fast Fourier transform (FFT)
          depend heavily on multiply-accumulate performance.
    • Fixed-point (integer) arithmetic
        – Faster/smaller than floating point.
                                                              16
What is a DSP?



                 The Basic DSP paradigm




                                                          17
     Physical signal  Digital signal  Physical signal
Lab hardware



                         DSK++
    • We’ve got the DSK
        – Programmed via C
    • We’ve also got an FPGA board
        – We’ll use Verilog
    • Some custom (to 452) boards to connect
      the two.
        – Dr. Metzger designed them.


                                               18
Lab hardware



                      DSK image




               TMS320 C5515 eZDSP USB Stick Dev Tool   19
                         Costs about $100.
Lab hardware



     DSP development environment
• Code Composer Studio
  (CCS) from Texas
  Instruments
    – Fairly complete GUI
    – C and assembly
    – Debugger and performance
      tools
    – Runs program on hardware
    – In-circuit debug.
    – Lots of fairly good tutorials.
    – Can download and run
      evaluation version for
      free…
                                       20
Lab hardware


           C55xx/C5515 documentation




               Obviously neither you nor the instructor nor the GSI are going
               to be able read and assimilate all this material in the time
               available. We will have to pick our battles, learn what is needed
               for the battle at hand and leave the rest for some other time.      21
Lab hardware



                Verilog on the FPGA
 • FPGA board                             • Verilog
     – Field Programmable Gate Array         – A way to describe hardware
     – Used to design custom                 – Looks like a programming
       hardware on the fly.                    language
     – Really is hardware design, not a         • Isn’t though.
       processor pretending.                 – We’ll spend some time
                                               teaching it.




                                                                       22
C “introduction”



       C programming “review” (start)
     • You’ve all done C++ programming at one point.
          – Some 2 years ago, some last semester.
     • Embedded systems typically use C rather than C++
          – We want a lot of control of exactly what happens.
          – C gives us that, while C++ can have a lot of “magic”
            (constructors, destructors, overloading)
          – Assembly is ideal for control, but that’s more effort than we want
            at this point.
     • C and C++ are fairly similar, but we’re going to need to
       teach/review some stuff anyways.
          –   printf
          –   pointers
          –   casting
          –   the volatile keyword
          –   a few other things
                                                                             23
C “introduction”



           There is a lot to learn/review
     • Today we’ll just do a little bit




                                            24
C “introduction”



                               C++ to C
     • No classes, but structs exist (just without
       function members)
          – This isn’t a big deal.
     • cout doesn’t work
          – This sucks a bit more




                                                                      25
    See: http://www.eecs.umich.edu/courses/eecs452/Handout/ccc.html
C “introduction”



                                   printf()
     • printf() prints characters to the
       screen.                                          #include <stdio.h>
          – printf() has a variable number of
                                                        int main() {
            arguments, the first of which is a format       printf("Hello World");
            string.                                     }
          – The format string can contain both
            ordinary characters (what you want to
            appear on the screen like 'Hello World')
            and conversion character sequences.
     • You can think of conversion
       characters as placeholders for a
       specific type formatted in a particular
       way.
          – Conversion character sequences begin
            with % and end with a conversion
            character.                                  int i;
                                                        for (i=0; i<10; i++) {
          – Printing out the integers from 0 to 9.         printf("i is: %d", i);
                                                        }
                                                                             26
C “introduction”



                   Memory mapped I/O
     • We need to review pointers, but first let’s talk a
       bit about memory.
          – In EECS 280 the details of memory were largely
            skipped past.
          – But in an embedded environment we often desire to
            talk to specific memory locations as they hold special
            values.
               • For example, on our DSK byte at memory location
                 0x300000 holds the value of the dipswitches and the LEDs.
               • We’ll occasionally want to talk to those devices, so we need
                 to read (or write) that location.
               • We’ll be doing things like that a lot…

                                                                            27
     note: 0x300000 is 300000 base 16 or 3145728 base 10.
C “introduction”



                         Type casting
     • C is one of the few languages to allow coercion,
       that is forcing one variable of one type to be
       another type. C allows this using the cast
       operator ().
               int i;
               float fp =4.27;
               i=(int) fp;
          – assigns 4 (the fractional part is thrown away) to “i”.
     • In this case, the casting would have happened
       automatically.

                                                                     28
C “introduction”



                    Pointer fun!
      unsigned * ptr = (unsigned *)0x300000;
     • What the heck is that?
     • How do I use it?




                                               29
DSP review

             Review of some basic DSP
                     concepts
    • A potpourri of signals and systems.
        – Basic definitions of a linear system, linear time-invariant system,
          causal system.
    • Transforms:
        – Fourier transform and Fourier series.
        – Discrete Fourier transform (DFT).
        – Z-transform.
    • Delta functions.
    • Lowpass signals and bandpass signals.
        – Frequency conversion.
        – Sampling and reconstruction.
        – Frequency aliasing and anti-aliasing filters
                                                                            30
DSP review

                     Linear systems
    • Given two time functions x1(t), x2(t) and a function
      (or system) h( ) such that

                     y1(t) = h[x1(t)] and y2(t) = h[x2(t)]

       then the system is linear if and only if for all a and b

                   ay1(t) + by2(t) = h[ax1(t) + bx2(t)].

    • This leads to the principle of superposition. We can
      decompose a signal or filter into components, solve for
      the responses to the individual components and then
      construct the overall response by adding up the
                                                                  31
      individual responses.
DSP review


      Stable, time invariant, causal systems

    • We say that a system is stable if for all bounded inputs
      the system's output is bounded.

    • We say that h( ) is time-invariant if for y(t) = h[x(t)] we
      have y(t-τ) = h[x(t-τ)].

    • We say that a system is causal if the output never
      precedes the input.

             Often, but not always, DSP systems are linear,
                 stable, time-invariant, causal systems.
                                                                    32
DSP review

        Transforms and why we need them




                                          33
                               So…
Computing the response y(t) of LTI systems to exponential
inputs x(t) = Aej2πft is very easy.

• It is thus both natural and desirable in linear systems
  analysis to derive methods of expanding signals as sums
  of complex exponentials.

• We know two such methods:
   – Fourier series (FS);
   – Fourier transform (FT).


                                                        34
 We’ll finish up this review next time…

• And start on direct digital synthesis (DDS)




                                            35
                 TODO
                (for you)
1. You have a (fairly short) homework due
   on Friday
2. You have a prelab due before the start of
   lab next week.




                                           36

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:62
posted:3/18/2012
language:English
pages:36