Friday, December 3, 2010

Class: 12/03/2010

  • Designing IIR filters
  • Introduction to multirate digital signal processing
  • Up-sampling and down-sampling
  • Noble identities
  • Polyphase representation of a decimating low-pass filter

Wednesday, December 1, 2010

Question

As far as I know a LTI system is caus...: "Dr.Gunther, As far as I know a LTI system is causal iff the ROC of a system function is the exterior part of the circle.Also a LTI system i..."

=======

Causal => ROC outside a circle in z-plane
Stable => ROC includes the unit circle in z-plane
ROC does not include poles

Putting all of this together, a causal and stable system must have all its poles inside the unit circle. Then all of the above requirements can be met.

Example: x(n) = 0.9^n u(n)

X(z) = 1/(1-0.9 z^{-1}), ROC = {z | |z| >= 0.9}

This is a causal and stable system. The pole is inside the unit circle. The ROC is everything in the z-plane outside a circle with radius 0.9. The unit circle is inside the ROC and the system is stable.

Class: 12/01/2010

  • Introduction to IIR filters
  • Impulse invariance
  • Bilinear transform
  • Butterworth
  • Chebyshev types I and II
  • Elliptic

Monday, November 29, 2010

Class: 11/29/2010

  • Four types of FIR filters with generalized linear phase
  • Windowed filter designs
  • Parks-McClellan equi-ripple filters

Saturday, November 20, 2010

Dr.Gunther,

As far as I know a LTI system is causal iff the ROC of a system function is the exterior part of the circle.Also a LTI system is stable iff ROC of a system function includes the unit circle.Then depending on this information, does it imply that the causal system can never be a stable system?
I request you to please explain me with the help of an example.
Thank you.

Tejas

Thursday, November 18, 2010

Lab 4 Questions

I have a few questions about lab 4.  I'm not sure exactly what is meant by all of the inputs and outputs of step 5.  Specifically:


INPUTS:
 - a window
 - an overlap factor


OUTPUTS:
 - the spectrogram in a 2D array
 - a time array
 - a frequency array


Would you mind elaborating on these?


Is the "window" meant to be some sort of windowing filter to be applied to the time-domain signal?

Yes.  One of the inputs is the FFT size.  Let's call this N.  The window is a length N array/vector of samples of the window that should be applied to the samples of the time-domain signal before the FFT is computed.  If no window is to be applied, then the array/vector will be filled with N ones.  We have talked about various types of windows in class including Kaiser, Hamming, etc.  There are many more in the textbook.

Is the "overlap factor" meant to imply that as we take the FFT of the signal in chunks, the chunks will have some samples overlapping?

Yes, this is exactly as you describe.  You split the signal into overlapping chunks of length N samples.  The overlap is specified by one of the inputs.  The window is applied to each chunk and the FFT computed.

Does "the spectrogram in a 2D array"  mean that we should attempt to make a graphical representation of the spectrum using a 2D array and some arbitrary ASCII character?  If so, should we plot the magnitude squared of the FFT output?

Each time you compute an FFT of a chunk of windowed data, you will get a spectrum array/vector out of the FFT.  Stack these side by side in a 2D array.

I'm not sure what the "time array" would be unless you just want us to output the time domain samples as an array of doubles.

The time array is an array/vector of times in seconds (this is why you need to know the sample rate) of the firsts sample in each of the signal chunks.  Given the sample rate, the FFT size N, and the number of samples of overlap, you should be able to compute the elements of the time array.

Is the "frequency array" just an array representing the outputs of the FFT?  Since we will be performing multiple FFTs on the signal in segments, should we average the results of all of the FFTs? It wouldn't seem to make much sense to concatenate them.  Also, since the FFT will yield a complex signal, should this array be an array of complex numbers, or should it be the real plus imaginary parts, or the magnitude, or the magnitude squared?

The frequency array/vector contains the FFT bin center frequencies multiplied by the sample rate.  This gives an array of frequencies in Hertz.  Remember that the FFT bin center frequencies are:
k/N for k=0, 1, 2, ..., N-1.

Monday, November 15, 2010

Lab 4 Question

Russ,

That's right.  Do NOT do the prime factor algorithm.

--Jake


Dr. Gunther,

The 4th instruction in the lab specification is as follows...

4.[SKIP] Write a prime factor FFT algorithm for N=N1 x N2 x ... x Nk where N1, N2, ..., Nk are a given list of relatively prime integers.

Does [SKIP] mean you don't want us to do this one?

Thanks,
Russ

Class: 11/15/2010

  • Inverse z-transform
  • Matlab functions: residuez, poly, roots, fliplr, flipud, zplane, filter(num,den,[1 0 0 0])
  • Synthetic long division (filter)

Friday, November 12, 2010

Class: 11/12/2010

  • Z-transform examples
  • Inverting the Z-transform
  • Partial fraction expansion

Friday, November 5, 2010

Class: 11/05/2010

  • Finished discussing bandpass sampling
  • Introduction to the z-transform
  • Relation to the DTFT and the DFT
  • Region of convergence

Wednesday, November 3, 2010

Monday, November 1, 2010

Exporting class notes to PDF

I've noticed that in the PDF version of the class notes, the highlighted parts are illegible because the highlighter color isn't transparent to the text behind it. A solid yellow rectangle is covering up what was intended as the most important points of the lecture. Does anyone know of a way to recover what is behind the yellow in the PDFs? Has anyone tried it with other PDF readers besides Adobe?



Class: 11/01/2010

  • Discrete-time processing of continuous-time signals
  • Introduction to bandpass sampling

Friday, October 29, 2010

Class: 10/29/2010

  • Discussed stereo decoding (Lab 3)
  • Sampling rate conversion by integer factor
  • Filter design for sampling rate conversion by an integer factor

Monday, October 25, 2010

Class: 10/25/2010

  • Sampling and reconstruction
  • Anti-alias filter design
  • Reconstruction filter design
  • Discussion of Midterm 1

Friday, October 22, 2010

Class: 10/22/2010

  • Began discussion of sampling of continuous-time signals.
  • Aliasing.
  • Filtering prior to sampling to avoid aliasing.

Wednesday, October 20, 2010

Class: 10/20/2010

  • Goertzel algorithm
  • Chirp transform algorithm

Lab 3 Question

Dr. Gunther,
I am working on Lab3.  I have some questions, I think I have confused myself.
1.    In regards to the equations given in class to develop the AGC.
a.      In “mt” and “qt”: is “t” value the sample number and “xt” is the value coming out of the second band pass filter?

Yes.  xt is x(t) which is the sample value at time t of the signal that you want to compute statistics on.
b.    Both mt and qt depend on the previous value of mt and qt, so we can assume mt and qt start at out with values of zero?

Yes. That will be fine.

c.     For every point coming out of the 2nd band pass filter should be multiplied by (1/sqrt(2))*(1/sqrt(qt-mt^2))*xt for qt and mt at t? 

Yes. This is the scaling that you want to apply to the signal that you want to normalize.  Note that you apply the scaling after you have used x(t) in the computation of the statistics m(t) and q(t).  If you apply the scale factor before you insert x(t) into the updates, it will goof everything up.
2.    After the gain control (question one) I need to sum this row with the filter and delayed L-R path.  Why does it need to be put through another Filter?

a. Remember that there is delay associated with all filtering operations.
b. In this application, signals need to stay "time aligned".  Because a filter in one branch of the processing introduces delay, we have to insert an equivalent amount of delay into the other branch of processing to keep signals time aligned.
c. A filter can be used to implement a pure delay.  For example, if filter A introduces d samples of delay, then a filter with impulse response [0 0 ... 0 1] is a pure delay all-pass filter, where the number of zeros inserted is equal to d, the delay.  No zeros gives no delay, one zero gives a delay of one sample, and so on.  The filter [0 0 ... 0 1] is delay matched to the other filter so that if you put filter A in one branch of processing, then you need to put the pure delay filter in the other branch of processing so that the signals stay time aligned at the filter outputs.


3.    If I am using n=500 for my filters, the delay filter should have 499 zero and then a 1? Or should be only have 498 zeros and then the one?

Use odd length FIR filters that are symmetric about the center tap.  Then the delay is easy to calculate.  If the length of the filter is N (where the filter has a symmetric impulse response and N is odd), then the delay is (N-1)/2.  So a filter with matching delay will have impulse response of:

[0 0 <--- (N-1)/2 zeros ---> 0 0 1].


4.    On the request to turn in the frequency response plot of the filter, does plot in the attachment met this requirement?

Yes, it looks fine, but I'd prefer that you use the fft function in Matlab and produce your own plot instead of using the freqz function.  The frequency axis should go from 0 to 0.5 or from -0.5 to 0.5 [cycles/sample].

Thursday, October 14, 2010

Class: 10/14/2010

  • Radix-2 FFT
  • Decimation in time and decimation in frequency
  • Bit reversed indexing
  • In place computation
  • Computational complexity: O( [N/2] log_2(N) )
  • Split radix algorithms mentioned

Wednesday, October 13, 2010

Class: 10/11/2010

  • Short-time Fourier transform
  • Spectrograms
  • Initial discussion of fast Fourier transform (FFT)

Class: 10/13/2010

  • FFT discussion - understanding divide and conquer.
  • 2-way and 4-way butterfly circuits.

Tuesday, October 12, 2010

Lab 3

Lab 3 about filtering techniques to separate left and right audio channels is due this Friday Oct. 15, 2010. Are we going to talk about in class how to do this? We were going to do it last week, but we never did.

Friday, October 8, 2010

Class: 10/08/2010

  • Computing the DFT in Matlab via the FFT function.
  • Window functions in Matlab
  • Discussion of Midterm Exam 1 (due Monday, 11 October 2010)
  • Overlap-add and overlap-save convolution

Wednesday, October 6, 2010

Class: 10/06/2010

  • Linear and circular convolution.
  • Linear convolution via the DFT.
  • Matrix-vector representations of linear and circular convolution.

Monday, October 4, 2010

Class: 10/04/2010

  • Windows (shape and length)
  • Spectral leakage
  • Spectral resolution
  • Zero padding

Wednesday, September 29, 2010

Class: 9/29/2010

  • DTFT-like plots using the DFT
  • DFT symmetries
  • Using taper windows to reduce spectral leakage
  • Homework due Friday

Monday, September 27, 2010

Class: 9/27/2010

  • Four-way decomposition of a signal and the DFT.
  • Matrix representation of the DFT.
  • DFT example illustrating spectral leakage.
  • DFT equal to samples of DTFT of the same finite length signal.

Friday, September 24, 2010

Class: 9/24/2010

  • Derived cyclic time reversal property of DFT.
  • Derived modulation property of the DFT.
  • Looked at cyclic convolution examples in Matlab.
  • Cyclic even and odd sequences.
  • Used 10-point DFT of cosine to illustrate DFT properties of the DFT including spectral leakage due to time-domain truncation of infinite length signal.

Student question: review transforms

Q: "I would also request a review of the material we have covered so far.  I am getting confused about what and how each of the transforms are different than each other and why we need them."

A: About the transforms, please see page 1 of the transforms notes posted on the Resources page.  This picture was provided to help all of us keep these transforms straight in our mind.  So far, we have talked about the CTFT and CTFS (briefly) and the DTFT and DTFS in more detail.  We are now starting to talk about the DFT.  Later in the semester we will discuss the FFT and the z-transform.  Which transform you use depends on situation.  If you are analyzing a continuous time signal or system, use the CTFT.  If the signal is periodic, then the CTFT does not really exist, but can be obtained by first expanding the signal in a Fourier series (CTFS) and then transforming using the CTFT.  On the other hand, if you are analyzing a discrete-time signal or system, use the DTFT.  If the signal is periodic (or a power signal), then the DTFT does not exist at some frequencies.  Delta functions are used in expressing the DTFT of these signals.  Fourier series expansions can be used for periodic signals.  We have defined the DFT of a finite length signal as the DTFS of the periodic signal obtained by periodically replicating the given signal.

Wednesday, September 22, 2010

Class: 9/22/2010

  • Discussion of Lab 3 (including demo)
  • Lab 2 due date extended to Friday
  • Introduced the DFT as one period of the DTFS in both time and frequency
  • Started discussing properties of the DFT

Monday, September 20, 2010

Filter Code

Dr. Gunther,
Have you posted the filter code that you showed us in class last week. I couldn't find it on the website.

Class: 9/20/2010

  • Discrete-time Fourier series (DTFS) examples
  • Periodic replication in the time-domain leads to sampling in the frequency domain

Friday, September 17, 2010

Class: 9/17/2010

  • Impulse response and frequency response (magnitude and phase) in discrete-time.
  • Discrete-time Fourier series (DTFS) introduction

Wednesday, September 15, 2010

Class: 9/15/2010

  • With the DTFT, multiplication in time corresponds to circular convolution in frequency.
  • Worked several examples of circular convolution.

Friday, September 10, 2010

Class: 9/10/2010

Discussed three classes of signals (absolutely summable, energy and power) and the characteristics of the DTFT of these classes of signals.

C code to evaluate the magnitude response of an FIR filter was reviewed.  The code appears on the page with the assignment.

Class: 9/8/2010

The programming assignment was discussed.  A procedure for computing the frequency (magnitude) response was discussed.

Introduced the DTFT and discussed some of its properties.

Wednesday, September 8, 2010

Problem 2.20

So after computing all of the parts for this problem, you get the sam digits used for each operation. Is there a particular lesson peratining to DSP that we should learn from this?

Tuesday, September 7, 2010

Question about filtering program

The following question came to me in e-mail.

"With regards to the FIR filter class that we are writing: Are we expected to design the class so that it polls a real-time value and produces a filtered signal "On the fly", or is it sufficient for the class to accept a pre-made input signal in the form of a large buffer and return the filtered form of that signal in another buffer?"

I want to respond to several points raised in the question above.
  • There is no requirement to write a class for this assignment.  You can you whatever data structure you like.  However, the assignment was to write two functions: one that implements convolution using a shift buffer and one that implements convolution using a circularly indexed buffer.
  • As far as what gets passed into and out of the function, that depends on the data structure you use.  For example, if you use a class structure and the class has member arrays for the filter coefficients and data buffer, then you do not need to pass these into the member functions that perform convolution.  On the other hand, if you are using straight C, then you may need to pass the filter coefficient and data arrays into the function.  Other alternatives are also possible.  Examples are given below.
=========================
// C++ class example
class fir {
private:
   float *h; // coefficients
   float *b; // buffer
public:
   void conv1(float *inbuff, float *outbuff, int len);
   void conv2(float *iobuff, int len);
};
// The conv1 function passes an array of values in and
// receives an array of values out of the function.
// The length of the input and output arrays is "len".
// The conv2 function passes a single array.  The values
// on the way in are the inputs and the values coming
// out are the outputs with the inputs being overwritten.

==========================
// C example
float *h; // coefficients
float *b; // coefficients

void conv1(float* inbuff, float *outbuff, int len, float *h, float *b, int num);

// In this example, the filter coefficients and the
// data buffer have to be passed into the function.
// The length of these two arrays is "num".

==========================
// As a third example, you could use a C structure
// to hold all the information associated with a filter:
// the filter coefficients, the buffer, and the length.
// Then the structure could be passed into the function
// as a single entity instead of passing in all the elements
// separately.

Friday, September 3, 2010

Class: 9/3/2010

Topics discussed in class.
  • Sampling and aliasing of sinusoidal signals.
  • Discrete time convolution
  • Simple low pass filter design by IDTFT of the desired response followed by truncation.
  • CTFT, CTFS, CTFT of periodic signals (Hint: use the CTFS expansion).

Wednesday, September 1, 2010

Homework 1

Just wanted to clarify after our discussion in class, that the homework problems are still due Friday?

Class: 9/1/2010

The following were discussed in class today.
  • Homework assignment 1 and Lab assignment 1 will be due next week, not this Friday.
  • Discussed the differences between sin/cosine/complex exponential functions in continuous time and discrete time.
  • DT frequencies are limited to the fundamental range -1/2 <= f < 1/2.
  • Sinusoids are periodic when the frequencies are rational.
  • The "envelope" of a sinusoidal signal appears periodic for any frequency.
  • The period of a discrete time sinusoid is not necessarily the reciprocal of the frequency.
  • The period is the denominator in f=K/N when the fraction is reduced.
  • Aliasing of frequencies outside the fundamental range.
  • Sampling of sinusoidal signals.
  • Discrete time convolution.  Shift register (delay line) versus circular buffer.
  • Designing simple low pass filters.

Monday, August 30, 2010

Class: 8/30/2010

First day of class.  Topics covered include the following.
  • Class administration, syllabus, assignment format, blog, resources, etc.
  • Look over the first homework assignment.
  • Refresh your C programming skills for the programming assignments.  At a minimum, you will need to do the following: allocate and free memory for arrays (calloc/free in C or new/delete in C++), file I/O (binary and text), and pass arrays into and out of functions.
  • Discussed topics that we will touch upon: CTFT, CTFS, Laplace transform, DTFT, DTFS, z-transform, DFT, FFT, (DWT?, DCT?); sampling and reconstruction, up and down sampling plus general sample rate conversion; analysis, design, implementation of FIR and IIR filters; multirate systems and filter banks.

Wednesday, August 25, 2010

Welcome

Greetings.  In ECE 5630, we shall try using this blog as a means for communicating among the teacher and members of the class. I encourage the use of this blog for at least the following purposes.
  • Each day after we meet for class, I will (try) to post a list of what I thought were the most important topics that we covered that day.
  • If you have questions, this blog would be a good place to post them. Questions could be about material that we covered (or didn't cover) in class, the homework or computer programming assignments, etc.
  • This blog would be a good place to raise points for discussion. I'll try to stay abreast of what is going on in the blog and address in class issues that are raised here. 
  • What did I miss?