EEGR4124 Project 2, Convolution

Form the same groups of 3 as before.  Members of any group must be all graduate or all undergrad.

Use the "Write png" button on DSPsoundv55a for saving printouts for your project reports. 
Do NOT use "zoom" feature on any plots unless specifically requested.
It would be VERY ADVISABLE to copy/paste plots into your report as you proceed.
See the project report template below.

  • Preliminary tasks
  •        // inData1.writeraw("f1.txt");
           // inData2.writeraw("f2.txt");
           // dispData.writeraw("disp.txt");

  • Write your explanations on a seperate answer sheet as described in the report requirements below, 2 or 3 sentences should suffice for most explanations.
  • Use "Write PNG" buttun on the interface to save the plots as ".png" graphics files to be included in your reports. Do NOT chop off portions of the printout.  Do not use "print screen" or copy/paste, since this will cause you to lose resolution on the printouts.


  • Implement the convolution button using Eq. 2.49, and implement it as Myclass method "linconvolve(Myclass x, Myclass h)."
  • For the convolution method, assume that both files are the same size. Do the sum only from k=0 to k=N-1 (N=filesize), and assume x[n] and h[n] are zero for n<0 and for n>N. The result should be y[n] from n=0 to N-1. Do not implement "wraparound," and do not use the FFT or any other frequency domain methods to implement convolution. Implement this as a class function "linconvolve(Myclass x, Myclass h)". In your main routine, you would use this function as y.linconvolv(x,h). Hand in the code for "linconvolve(Myclass x, Myclass h)" 
  • Turn in the code for ONLY the method "linconvolve(myclass x, Myclass h)" and place it in your report as the answer to question ( Q1 )  Turn in ONLY the source code for your linconvolve(Myclass x, Myclass h), NOT ANYTHING ELSE!!
  •  Convolve box32.au with box64.au., plot the results ( P1 ).
    Explain how the maximum voltage value of this convolution compares with the theoretical maximum value (show a brief computation) ( Q2 )?
  • Convolve imp32.au with box64.au., plot the results ( P2 ). 
  • Convolve box16.au with sin3264.au, plot the results ( P3 ).
    Explain what is happening to the high frequency component of the original signal ( Q3 ).  Perhaps the 2lnFFT may help.
  • Assume that the file being displayed by DSPsoundv55a is the impulse response of a system, h[n].
    Then use equation 2.104 to compute |H(omega)|. (Do not use FFT.)    Implement this as function |H(w)| on the interface.
    Since |H(omega)| is periodic, plot it from omega=0 to 2 pi in steps of (2 pi)/N where N is the size of the file h[n]. Note: do NOT take log10(H), plot the linear magnitude. Your function should return a file of size/length N to the interface.
  • Using the above, plot |H(omega)| for box16.au ( P4 ).
    What is the theoretical value of |H(0)| ( Q4 )? Explain (show calculations) your results.
    What is the theoretical frequency of the first null in rad/sample ( Q5 )? Explain your results (show calculations for first null, as in Eq. 2.123).
  • What company was co-founded by Robert Noyce in 1968, ten years after he co-invented the integrated circuit?( Q6 )?

  • Report

    Use the Project Report Template  (also shown as pdf file)

    Include the plot numbers P1, P2, etc in captions, along with a short description!
    Write a cover sheet + 1 page executive summary ONLY!!!  Describe any unresolved issues.
    Place answers to all questions on one or more consequitive sheets of paper at the front of the report!
    Do NOT scatter the question answer sheets throughout the report, keep them together
    Do NOT use "zoom" feature on any plots unless specifically requested.
    Make sure that you include question numbers and plot numbers on all sheets!
    I will only look on the question answer-sheets for any discussion.
    All extraneous material WILL BE IGNORED!
    Do not write any discussion, except directly on the question answer-sheets or 1 page summary.
    Do not add extraneous pages.
    Do not put explanations on plots unless specifically directed to do so.
    Include any problems or unresolved issues in the summary.
     
    Copyright 2009 T.P. Weldon