PROGRAM FOR UP SAMPLING AND DOWN SAMPLING Aim: To perform up sampling or interpolation and down sampling or decimation of a given

sequence. Algorithm: Enter the length of the sequence. Enter the up sampling factor. Enter the down sampling factor. Enter the sequence. Input: N=8, L=3, X=[0 1 2 3 4 5 6] Theory: The sampling process is also known as up sampling rate. The sampling process of increasing the sampling rate expansion. Let l be the integer interpolation factor. TI/T = 1/2 FI = 1/ TI = 2/T = IF y(n) = ∑ h(n-k)w(k) Result: Up sampling and Down sampling of a given sequence are performed.

Theory: According to sampling theorem which states that band limited signal h(t) having no frequency components alone fb hertz is completely specified by samples that are taken at a uniform rate greater than 2fn. Initiate the time vector. Result: Thus the sampling theorem is programmed and verified.VERIFICATION OF SAMPLING THEOROM Aim: To write a program for verifying the sampling theorem. . Algorithm: Define input sequence which has two frequency components w1 & w2. Use the sampling rates are above and below the nyquist sampling rate Observe that from over sampling we can more accurately reconstruct the original signal and reconstruction from an under sampled signal.

Get the order of filters. FIR filters with linear phase can be determined by windows method. hanning and Kaiser windows. Draw the magnitude and phase response. blackmann. hamming. Calculate sampling frequency. hamming. barlett. Corresponding functions for calculation of window oscillators in pass band and stop band are used. Get the pass band and stop band ripples. Algorithm: Get the pass band and stop band edge frequencies. . barlett.PROGRAM FOR WINDOWING TECHNIQUES Aim: To write a program for windowing techniques such as rectangular. hanning and Kaiser windows are obtained and plotted. barlett. Theory: Rectangular. The oscillations in the pass band and stop band can be reduced through the useful of less abrupt truncation of the fourier series. hamming. blackman. hanning and Kaiser windows. blackmann. Result: The o/p response of the rectangular. This can be achieved by multiplying the infinite impulse response with a finite weighing sequence w(n) called a window.

.PROGRAM FOR CONVOLUTION Aim: To write a program for linear convolution with and without shift. Enter the second sequence. Let x(n) be the i/p to an LTI system. Plot he graphs for the two sequences and the convoluted o/ signal. Theory: Linear convolution: The convolution of two sequences is known as discrete convolution or linear convolution. Get the convolution of two sequences using the function. X2(f) Xs(f) = ∑ x1(n)x2(n-3)N Exponential convolution: This is similar as obtaining the exponential response with reference to the length of the sequence i/p multiplied by a factor ‘a’ and impulse sequences are made under the process convolution. As impulse response y(n) of discrete time system can be expressed as convolutional sum of the i/p sequence x(n) impulse y(n) = ∑ X(k)h(n-k) Circular convolution: In circular convolution if x(n) contains the L no.m) samples Let x1(n) and x2(n) are finite duration sequences then DFT is X1(f). of samples and h(n) with m samples. Then N = max(L. circular convolution and exponential convolution Algorithm: Enter the first sequence. G(n) be the o/p and H(n) be the response of the system. Result: Thus the linear convolution with and without shift. circular convolution and exponential convolution of a given sequence are performed and o/p is observed.

k) in MATLAB. impulse response of a given difference equation is solved and results are plotted. Solving difference equation. Exponential response: An exponential sequence/signal is that varies exponentially with time using the filter function in MATLAB we can able to solve the difference equation. Using the function =filter(p. . Result: The step response. impulse response of a given difference equation.exponential response. Algorithm: Enter the length of the sequence.d. Enter the numerator coefficients. exponential response. Enter the denominator coefficients.PROGRAM FOR DIFFERENCE EQUATION Aim: To determine the step response. Impulse response: An impulse signal is that varies or having amplitude only at t=0 or n=0 using the filter function in MATLAB we can able to solve the difference equation. Theory: Step response: The function filter process the i/p data vector x using the system characterised by the coefficients vector p.

Plot the graphs for the input sequence and output sequence. x = [1 2 3 4] h =[4 3 2 1] Theory: The correlation is a measure of the degree to which 2 sequences are coincide. Algorithm: Enter the input sequence.PROGRAM FOR AUTO CORRELATION & CROSS CORRELATION Aim: To write a program for computing auto correlation and cross correlation between two sequences. Result: The auto correlation and cross correlation between the sequences are computed. . If the correlation is between i/p sequence and it’s time delay version then it is auto correlation and cross correlation is between two different sequences. Input. Enter the auto correlation and cross correlation functions.

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.