|
List of experiments:
-
Matlab Experiments
To be completed by the end of FOUR-th week
-
8085 Microprocessor Experimetns
To be completed by the end of 12 or 13th week
-
DSP Experiments
- 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
-
Verification of sampling theorem
-
Differential and Difference Equations
-
Impulse Response
-
FFT and IFFT
-
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)
-
Define pi*N, which gives N/2 cycles of a sinusoidal signal. Select N=10
-
Define an array t between 0 and 1, with about 50 steps
-
Generate a cos (or sine) wave using these variables
-
Use plot command to see the continuous time signals and stem
command for discrete time signals
-
Repeat for t with steps 20, 10, and 5
-
Observe the plots.
-
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
-
Solve problem 2.43 on page 153 of Simon Haykin
-
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
-
Consider y[n] - 1.8cos(pi/16)y[n-1]+0.81y[n-2]=x[n]+0.5x[n-1]
-
Determine impulse response h[n] analytically and confirm the results for
0 < n < 100
-
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.
-
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?
- Repeat for
-
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]
-
y[n] - 0.268y[n-2] = 0.634x[n] -0.634x[n-2]
-
y[n] + 0.268y[n-2] = 0.0634x[n] - 0.0634x[n-2]
-
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
-
Solve problem 3.36 on page 254/243(a,e and f parts) of Simon Haykin
-
for x=[1,0,0,0,0,0,0,0]. Try 8 point FFT
-
for x=[1,1,1,1,1,1,1,1]. Try 8 and 16 point FFT
-
for x=[0,0,0,1,0,0,0,0]. Try 8 point FFT
-
for x=[1,1,1,0,0,0,0,0]. Try 8 and 4 point FFT
-
for x=[1,1,0,0,0,0,0,1]. Try 8 and 4 point FFT
-
Compare magnitudes of last two (5 & 6)
- 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
- Check and try the Example 8.10 (prog. 8_9) page 536 of Sanjit K Mitra
-
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
-
Try FFT for an AM signal. (page 386 of Simon Haykin)
- 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
- Solve any FIVE of problem 2.3 from Simon Haykin
- For any one of them, solve analytically and verify the results
- For another one, check a = b * c = c * c
- For circular convolution
- Solve example 9.1.2, page 694) from Proakis
- Any one of the examples from the linear convolution
- Compare the results from linear and circular convolutions
top
Optional Mini Projects:
- 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?
- 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
.
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.
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
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.
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)
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.
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.
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.
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;
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.
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.
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.
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)
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.
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.
Use
successive subtraction
Use the common method
for division (shift right hand subtract)
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
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.
Given two
integer numbers stored at memory locations X and X+1. Write a
programme for displaying the greatest common factor (GCF).
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
|