List of experiments:
Lab starts from the first day (the day college reopens)

  1. Matlab Experiments
    To be completed by the end of FOUR-th week
  2. 8085 Microprocessor Experimetns
    To be completed by the end of 12 or 13th week

  3. DSP Experiments
  4. The expt list will be indicated later...


A small turotial on Matlab

I Matlab Experiments (to be finished by the end of fourth week)


Strongly suggested to download octave for these experiments. Octave is MatLab compatible free ware. Better to use a free ware with less features than a pirated software. Access Octave on line manual

Reference Books:

  • Signals and Systems Simon Haykin and Barry Van Veen Weily international, New York, 1998
  • Digital Signal Processing Sanjit K Mitra, TMH, New Delhi
  • Digital Signal Processing John G Proakis and Dimitris G Manolakis (II Ed.) PHI, New Delhi 1995
  • Digital Signal Processing with MatLab Ingle and Proakis Vikas Publishers, New Delhi
  • Highly recommended
    1. Verification of sampling theorem
    2. Differential and Difference Equations
    3. Impulse Response
    4. FFT and IFFT
    5. Convolution
    top

    Expt-1: Varification of Sampling Theorem

  • Prerequisites: Check MatLab Program in Simon Haykin Signals and systems on page 55
  • Theory should include derivation of Sampling theom (Page 283 Simon Haykin)
    1. Define pi*N, which gives N/2 cycles of a sinusoidal signal. Select N=10
    2. Define an array t between 0 and 1, with about 50 steps
    3. Generate a cos (or sine) wave using these variables
    4. Use plot command to see the continuous time signals and stem command for discrete time signals
    5. Repeat for t with steps 20, 10, and 5
    6. Observe the plots.
    7. Plot four graphs together (50, 20,10 and 5)
  • Suggested Variations: Try with some phase shift and an exponetially damped sinusoidal
  • top


    Expt-2 Difference Equations

  • Prerequisites: Write theory about differential and difference equations (refer to eqns 2.28 and 2.29) of Simon Haykin
  • Check-out the matlab program given on page 139 of Simon Haykin
    1. Solve problem 2.43 on page 153 of Simon Haykin
    2. Solve the same for stem response with and without initial conditions

    top


    Expt-3 Impulse Response

  • Prerequistes Theory: Page 118 of Simon Haykin "Signals and Systems"
  • Expt. 2

  • Try one of the problems for simple impulse response wiht x(1) = 1. Repeat it with impz function
    1. Consider y[n] - 1.8cos(pi/16)y[n-1]+0.81y[n-2]=x[n]+0.5x[n-1]
    2. Determine impulse response h[n] analytically and confirm the results for 0 < n < 100
    3. use freqz function to estimate the frequency response and plot them You can use plot(W,abs(H)) and plot(W,angle(W)) for 512 point filter.
    4. Try for both freqz(.,.,.,'whole') and freqz(.,.,.) plots. Plot all the four graphs together. What do you infer? What is the kind of filter does this equation simulate?
    5. Repeat for
      1. y[n] + 0.13y[n-1] + 0.52y[n-2] + 0.3y[n-3] = 0.16x[n] -0.48x[n-1] + 0.48x[n-2] - 0.16x[n-3]
      2. y[n] - 0.268y[n-2] = 0.634x[n] -0.634x[n-2]
      3. y[n] + 0.268y[n-2] = 0.0634x[n] - 0.0634x[n-2]
      4. 10y[n] -5 y[n-1] + y[n-2] = x[n] -5x[n-1] + 10x[n-2]

    top


    Expt-4 Fourier Transforms

  • Prerequisites: (refer to eqns 2.28 and 2.29) of Simon Haykin
  • Check-out the matlab program given on page 237 of Simon Haykin
    1. Solve problem 3.36 on page 254/243(a,e and f parts) of Simon Haykin
    2. for x=[1,0,0,0,0,0,0,0]. Try 8 point FFT
    3. for x=[1,1,1,1,1,1,1,1]. Try 8 and 16 point FFT
    4. for x=[0,0,0,1,0,0,0,0]. Try 8 point FFT
    5. for x=[1,1,1,0,0,0,0,0]. Try 8 and 4 point FFT
    6. for x=[1,1,0,0,0,0,0,1]. Try 8 and 4 point FFT
    7. Compare magnitudes of last two (5 & 6)
    8. Define a=[0,0,0,0,0,0,0,0,0,0]; b=[1,1,1,1]; c = [a,a,a,a,a,b,a,a,a,a,a] ; find the fft and plot the magnitude
    9. Check and try the Example 8.10 (prog. 8_9) page 536 of Sanjit K Mitra
    10. simulate a sine wave of 25 Hz sampled at 60 Hz, for 20 samples. Find the 20 Ptl FFT plot the magnitude. Now increase the signal length to 60 by padding it with 40 zeros. take a 60pt DFT. Plot the magnitude response. What is the difference? Give reasons
    11. Try FFT for an AM signal. (page 386 of Simon Haykin)
    12. Get time domain representation using ifft function for
      X[k] = cos(10*pi*k/21) + j sin(4*pi*k/21)
      Plot the time domain signal.

    top


    Expt-5 Convolution

  • Theory: Derive convolution equation (section 2.2 page 71 upto equation 2.3 from Simon Haykin) for linear convolution. For circular convolution, refer article 9.1.2 equations 9.1.32 to 9.1.39, Digital signal Processing John G Proakis
  • Check the convolution program given in section 2.7 in Simon Haykin

    1. Solve any FIVE of problem 2.3 from Simon Haykin
    2. For any one of them, solve analytically and verify the results
    3. For another one, check a = b * c = c * c
    4. For circular convolution
      1. Solve example 9.1.2, page 694) from Proakis
      2. Any one of the examples from the linear convolution
      3. Compare the results from linear and circular convolutions

    top



    Optional Mini Projects:

    1. Sampling Theory and Aliasing:
      Consider x(t) = sin(2*pi*f0t + phi). We can sample x(t) at a rate fs=1/Ts to obtain discrete-time singal
      x[n] = x(t)|t=nTs = x(t) |t=n/fs = sin(2*pi*n*f0 /fs + phi)
      If we plot x[n] for different combinations of f0 and fs aliasing can be illustrated. Take sampling frequency fs = 8kHz. Freq of sine wave be 300 Hz sampled at 10mS. Plot using stem. Now take a series of plots, varying frequency from 100 to 475 Hz. in steps of 125 Hz. Use subplot to plot all the four waveforms. Repeat it by varying frequency from 7525Hz to 7900 Hz, in steps of 125 Hz. Plot the four waveforms, What do you infer? Repeat for frequencies 32100 Hz to 32475Hz in 125 Hz steps. What do you expect?

    2. Convolution.
      Generate a sinusoidal signal and add noise to it. Now convolve the noisy signal with H=1/3[1, 1, 1]. Plot the output. What is convolution doing
    A few more may be added at a later date
    top


    II. 8085 Microprocessor Experiments: (To be completed by 15 Dec 2001)


    You can download 8085 simulator from my microprocessor-I web page.

    LIST OF SOFTWARE PROBLEMS TO BE WORKED OUT

  • MICROPROCESSOR PART WILL BE UPDATED SOON .
    1. Four unsigned Binary numbers are stored at consecutive data-memory locations starting at X. Compute the sum of these four numbers taking the possible overflow in to consideration and store it at loc. Y. Use the indirect addressing.

    2. A double precision number i.e. a 16 bit unsigned number is stored at X and X+1. (Low order byte at X), Another double precision number at Y and Y+1. Subtract the two numbers and store the result at W and W+1

    3. Two 2-digit BCD numbers are stored at consecutive memory locations X and X+1. Compute the difference of the two numbers and store the result at location Y. (Hint: Use decimal subtraction with the aid of DAA and 10's complement arithmetic's analogous to binary subtraction.

    4. A code word is stored at data-memory location X. Write a programme for testing whether the code word belongs to the 2 out of 5-code. Set loc. Y to FF if YES and 00 if NO. The code word is valid if the three MSBs are zero and if the number of 1's in the remaining 5 bits is 2 (=2 out of 5 code)

    5. Write a programme for a decimal counter to count up to a given count, given in a data memory, with programmable clock frequency (e.g. frequency specified at data-memory location X) and display the count in the data-field using the corresponding monitor subroutine.

    6. N Binary numbers are stored at consecutive data-memory locations starting at X, where N is defined at data-memory location `NUMBER'. Find the largest number and display it in the data field.

    7. N Binary numbers are stored consecutive data-memory locations starting at X, where N is defined at data-memory location `NUMBER'. Find the largest number and display it in the data feild.

    8. Four programmes are defined as follows:

      Programme 0 ; display AAAA ; (address feild)

      Programme 1; display BBBB ; (address field)

      Programme 1; display CCCC ; (address field)

      Programme 1 ; display DDDD ; (address field)

      The starting address of these programme are defined in a table (which is of the programme - memory in the following way)

      ADD DATA

      A Low ADD of progr.0

      A+1 High ADD of progr.0

      A+2 Low ADD of progr.1

      A+3 High ADD of progr.1

      Assume that a number 0, 1, 2, or 3 is stored at location `NUMBER'. Execute one of the programmes 0 - 3 corresponding to the stored number 0 - 3. There is a simple way to fetch the address of the corresponding programme using offset addressing;

    9. Write a programme for moving a data-block starting at address X to address Y. The address X, Y as well as the block-length (i.e. No. Of bytes) are specified at some suitable data-memory locations.

    10. In Computer communication data is often transmitted in ASCII format. This code consists of 128 symbols for numbers, letters and signals, out of which the hexa decimal characters have the following representation 0 as 30H, 1 as 31H etc, A as 41H, B as 42H . . . F as 46H.

      Assume that a hexa decimal character is stored in its ASCII at loc. X. Display the corresponding character in the data-field.

    11. Write the following programme

      If key `GO' command is depressed, the subsequent hexa decimal key entered will be displayed in the address field (as in problem No. 29 of Microprocessor Lab by S R Bhatt) and if key single step command is pressed, subsequent hexa decimal key entries will be displayed in the data field.

    12. A binary number is stored at data-memory location X. Multiply the number by 10 and display the result in the address field.

      (Hint: b*10 = b * (2*2*2)+b*2, a multiplication by 2 corresponds to a shift left by one bit)

    13. Two unsigned binary numbers are stored at data-memory locations X and X+1. Find the product and display it in the address field.

      Find the product by successive addition, i. e. the multiplier is added as often to itself as corresponding to the value of the address field.

    14. With the given conditions of previous problem, divide a 16 bit number by a 8 bit number and display the result in the data field.

    15. Use successive subtraction

    16. Use the common method for division (shift right hand subtract)


    17. Given: Two 2 digit decimal numbers at data memory locations X and X+1. Find the product of these using binary multiplication and display the result in decimal in the address field.

      The problem can thus be divided into 3 parts:

      BCD - Binary Conversion

      Binary multiplication

      Binary - BCD Conversion

    18. Generate a PRBS - sequence by the following methods:

      Simulate the hardware method using a 4 bit shift register (sequence - length = 15)and an EXOR-gate. The feed back taps are taken from the outputs of the first and last flip-flop and fed back through an EXOR-gate to the input of the first flip -flop.

    19. Given two integer numbers stored at memory locations X and X+1. Write a programme for displaying the greatest common factor (GCF).

    20. Write a programme for the simulation of a die: Throwing the die is simulated by pressing the vector key (or any other key, by using the keyboard subroutine) upon which a number 1 and 6 (all numbers with same probability is displayed).

    top


    DSP Experiments


    Will be updated later try this link http://www.bdti.com/faq/3.htm#36 Download TMS simulator
    Some notes U may try dsp2, dsp3.... also
    dspguru
    dsplab
    DSPLab1.0
    rice Univ. DSP group

    top




    Octave does not have stem by default . Use following subroutine instead
    function stem(startvect,endvect)
    plot(startvect,endvect,"^",startvect,endvect,"*");
    top




    Hosted by www.Geocities.ws

    1