EECS 206: Signals and Systems 1, W03

Lab section # 011 (Tue. 1:30pm - 3:30pm)
Lab section # 013 (Tue. 4:00pm - 6:00pm)

GSI: Dongsook Kim (E-mail:kimds@umich.edu)


Announcements for Lab7

  1. Correction: There is an error on handouts (pg.5). "6" button generates the sum of a 1477Hz and a 770Hz sinusoids.
  2. Your DTMF frequencies are continuous time frequencies. So, when you generate h[n] impulse responses of bandpass filters with freq. fc, you need discrete time sinusoids. That's why you get h[n]=sin(2*pi*fc*k/fs).
  3. Prob.2(b): Another usage for "freqz": H = freqz(h, 1, frq*2*pi/fs]; where frq is a vector containing some specific continuous-time frequencies in Hz. For example, if you have 770Hz and 1477Hz (continuous time frequencies), then the third parameter should be discrete time frequencies so that you can use that command in the following manner: H = freqz(h, 1, [770 1477]*2*pi/fs);
  4. Prob.2(d): "sort" function is useful.
  5. Prob.2(e): Take the first peak of gain ratio for optimal M value.
  6. Prob.2(e): [val, index] = max(vector)
  7. Prob.4: You need to test noise power from 1 to 1.5 with small intervals.
  8. dtmf_dial.m: All vectors are column vectors. When you append a column vector to sig, sig = [sig; column_vector]
  9. dtmf_decode.m: Your impulse response function h is given in Eqn.(7.1). Note that k is a vector 0:M. 39

Hints for Homework 11

  1. In your textbook, Example 6.1 will be very useful for prob.3 and 4.
  2. In LTI system, if your input is a sinusoid Acos(w_hat*n+theta), your output is |H(w_hat)|*A*cos(w_hat*n+thata+angle(H(w_hat))). Therefore, it is important to figure out which frequencies are present at an input signals. Once you have an input signal as a sum of sinusoids, you only need to know magnitues and angles of H(w_hat) at some frequencies corresponding to input.

Announcements for Lab6

  1. When you display images, you can make a function which does colormap, colorbar, and axis image. I made one which you can download now. (imglab.m) How to use this file? run imglab(x), where x is your image file to display.
  2. Median filtering: out = medfilt1(medfilt1(in, N)',N)'; Note that you need two transposes.
  3. Prob.2(c):take witdth from 0 to 3 with reasonably small interval.
  4. Prob.4(d):take the sharpening strength from 0 to 5 or 6 with reasona bly small interval.

Comments on Exam 2 Review

  1. Why don't you run sampling demo to see the effects of sampling. You need to download sampling_demo.m and sampling_demo.fig.
  2. When you sample at the Nyquist rate with fs = 2*fmax, aliasing might occur or not. Look at the note part4 (pp.10). With this sampling freque ncy, your discrete time radian frequency of a sinusoid with fmax is exac tly pi (the critical frequency).
  3. Sampling at the critical frequency (omega^ = pi) is considered to be aliased. This sampling can be aliased to zero signal. E.g. cos(pi*n - p i/2) = 0. If not aliased to zero signal, you still cannot determine ampl itude and phase. E.g. consider the example we had in class. Suppose you have 6 at omega^ = pi in the spectrum. Any amplitude and phase pair whic h satisfies 6=Acos(theta) can be a discrete time sinusoid. The signal co uld be 6cos(pi*n) or 12cos(pi*n+pi/3) or ... So, you cannot tell which s ignal reconstructed from these is the original continuous time signal as well.
  4. Ideal sinc interpolator can recunstruct a original signal if not ali ased.
  5. Good luck on your Exam!!

Correction on Exam 1 Review

  1. Signal value distribution of continuous time signals: Unlike discret e time signals which the limit of the number of bins are considered (we can count the number of occurences at values), continuous time signals h ave uncountable number of occurences so that their histograms are expres sed by ratio of time inverval lengths of signal values. If a signal has a slop or arbitrary shape, you need to consider lengths of the signal wi thin bins. Please refer the examples given in the note (pp.1.11). E.g. s inusoid signal, a signal of two lines with different slops.

Announcements for Lab5

  1. HW7s are available at the GSI room.
  2. Prob.1(b): To compute a statistic of an image which is in matrix for m, you need "vectorize" it first. Please refer your background section f or some Matlab commands. e.g.) hist(x(:), 0:255) 32
  3. Prob.2(b): Read the problem statement carefully. What is u in quanti ze_fcn(u, 64, 0, 255)? u is not an image, but a vector ranging from 0 to 255.
  4. Prob.2(d): Error image = original - quantized
  5. Prob.2(e): Predicted RMSE can be found by using approximated MSE giv en eqn.(5.21). For the last question asking the most accurate prediction , please calculate differences b/w actual and predicted RMSE values, NOT just by looking at the plot.

Announcements for Lab4-2

  1. This lab had covered DFT which are the last parts of Lab4. The lab a ssignment is due Tuesday after the spring break. and includes Problems 4, 5 and 6.
  2. The graded hws (HW#4) were not distributed during the lab session. Y ou have to visit the GSI room (EECS 4338) to get yours back. Available now! 32 You may want to bring your HW#2 next week to get it regraded.
  3. Indexing the DFT: DFT coefficients S[k] conta ins only N elements where k = 0,1, ...., N-1. But, MATLAB begins its ind exing from 1 rather than 0. So, remember to use the vector X(k+1) which contains DFT coefficients in MATLAB in order to access S[k].
  4. Have a nice spring break!!

Announcements for Lab4-1

  1. This lab had covered only Fourier Series which is upto your background secti on 4.2.2. The lab assignment is due next week and inclu des Prob.1, 2, and 3 only.
  2. Next week, we will cover the last parts of the lab4 which is DFT.
  3. The graded hws (HW#4) were not distributed during the lab session. You have to visit the GSI room (EECS 4338) to get yours back. Available n ow!
  4. HW#2 1(e) correction: E(x) = infinity, M(x)=0, MX(x) = 1/2, RMS(x) = 1/sqrt(2). You may want to bring your HW#2 next week to get it regraded. C
  5. Prob.1: the default value of argument of sinsum function is 0. When you excu te sinsum without argument, you are using the type 0 signal which is a sawtooth signal. This is only one you have to match in the problem. Don't need to do sins um(1), sinsum(2), and sinsum(3).
  6. Prob.2: stem the magnitude of CC with kk. The magnitude of CC is obtained by abs(CC).
  7. Prob.3: when you use fourier_synthesis command, Ns is specified in the probl em unlike Prob.2. Ns is the number of samples per period. Therefore, you use Ns = 2^14 in the command.

Topics Covered in Exam 1 Review

  1. Properties of signals
  2. Correlation
  3. Sinusoidal signals
  4. Complex numbers
  5. Complex exponential
  6. Trig Identities
  7. Lab related tasks: for example, signal detection: concept, threshold, decisi on statistics
  8. Lecture notes, Homeworks, old exams, DSP first resources....
  9. Other GSI's websites: find something useful to you ^^
  10. Good luck on your exam !!

Announcements for Lab3

  1. In Lab#1, if you lost some points (4 points) due to missing small si gnal on Prob.4 (c), please bring your Lab#1 to me during the lab session next week. I want to regrade that problem.
  2. There will be exam reviews in the next week, NOT Lab4. But, Lab3 is still due at the beginning of regularly scheduled lab sections in the next week.
  3. Prob.1(a), Prob.2(a): find phase in between -pi and pi. If your phas e is not in this range, you can add an integer multiple of 2*pi to your phase. Example: cos(wt+4*pi/3) = cos(wt-2*pi/3) where -2*pi/3 in [-pi,pi ].
  4. Prob.2 apc.m: When you calculate the correlation value b/w your sign al and the reference signal, you have to realize that both signals are d iscrete-time signals sampled with Ts. Therefore, look at page 56 in your manual. C(s,c) is approximately equal to Cd(s,c)*Ts!! (Cd(s,c) denotes the correlation b/w discrete-time signals) Then you determine A and phas e based on C(s,c) in eqn 3.30. Here, t2-t1 is equal to N*Ts when you fin d A, where N is the number of samples of s.

Announcements for Lab2

  1. The graded hws (HW#1) were distributed during the lab session. If yo u didn't get yours, stop by GSI room (EECS 4331) during office hours and ask it to GSIs.
  2. Refer above Lab policy 6. If you need any correction on graded HW#1( returned on Tuesday), you have to see me by this Thu. Please come to my office hours.
  3. Jason, Chad, Matt: I found your homeworks and put them in the GSI ro om.
  4. Why do we need normalized correlation? Because correlation between t wo signals depends on their energy as well as their similarity. When we want to measure similarity between signals with different energies, the normalized correlation is more useful. Big energy causes correlation to be big even though signals are dissimilar!!

Announcements for Lab1

  1. All figures should include appropriate x-axis and y-axis labels.
  2. Prob #1 (c) Consider the signal 's' as a sampled one with a sampling interva l Ts = 1/100. The signal s is defined in the beginning of Prob. #1 like: s = sin (2*pi*(1:50)/50); Therefore, the continuous signal we are estimating has NOT inf inite duration!
  3. Prob #2 (c) The variable clarinet was recorded at a sampling frequency of 22,050Hz.
  4. Prob #4 (a) For the verification of your completed function with a threshold 0.2 and a block size of 512, compare its output to that of sig_nosig_demo.dll. Call it like this: [detection, n] = sig_nosig_demo(mboc);