Friday, 22 April 2016

One dimensional application of DSP

The last experiment  was a group experiment. We were to perform signal processing on a 1-D signal and find out an application for the same.We selected the application of 'Noise cancellation uisng Adaptive Method.' The group members are Pratik Keny, Jayesh  Khandagle, Jaskirat Kaur and Vikita Jadhav.
We were asked to refer to different patents and papers.
Patent: Adaptive Noise Cancellation System
Summary of Patent: A power line adaptive noise cancellation system receives noise signals from power lines and adaptively cancels the received noise.The noise signals are inputed to adaptive filter that filter out noise based on adaptive weights. Output of adaptive filters are subtracted from a delayed baseband input signal to generate a received input signal.Received input signals are fed back to adaptive filters for updation of adaptive filters.
Paper: A Novel LMS Algorithm Applied to Adaptive Noise Cancellation
Summary of Paper:A least mean square (LMS) algorithm is proposed for filtering speech in adaptive noise cancellation (ANC). The proposed system method yeilds better tracking ability. In this method two different microphones are used to capture nature of noise and speech sound simultaneosly. There is correlation between aditive noise in reference input. This is necessary to adaptively cancel noise in the input/primary signal.Mainly two algorithms are used [1] NLMS -normalized least mean square [2] CSLMS algorithm


https://drive.google.com/open?id=0BxpSA0zcKUVjVldwejJQcV9lN3hJeUhwdlg4dS1WYlNZa2FJ

FIR filter design using Frequency Sampling method

In this experiment we design LPF and HPF using frequency sampling method. Input specifications similar to the other filter designing methods were taken and the magnitude response was plotted. In this method, desired frequency response is sampled and samples obtained are taken as DFT coefficients, and then h(n) is calculated using IDFT. 
It is seen that as order increases, number of lobes in stop band also increases. Since phase is linear the output signal won’t contain any distortions.
We also looked at the magnitude plots and observed the presence of lobes in the stop band for low pass filter. code:
https://drive.google.com/open?id=0BxpSA0zcKUVjMDZEU3h4UkpvR01TUjdwbm43d1RDMFYyLWpB

Linear phase FIR filter design using Window function

In this experiment we implemented FIR filter using Windowing method for LPF and BPF. In this method, the impulse response is multiplied to window function w(n) to get h(n) which after Z-transform results in the  transfer function H(z). The various inputs for designing are given such as pass band and stop band attenuation, passband and stopband frequencies and sampling frequency. We have to select an appropriate window function w(n) wrt the inputted values.The types of window function are [1] Rectangular [2] Bartlett [3] Hanning [4] Hamming [5] Blackman. We select the window function if its stopband attenuation is more than that of the given filter. The length of the signal i.e. N should always be odd. We selected the Hamming window function and the order of filter came to be 10 and length was 11 for LPF and 14 and 15 for BPF respectively.
code:

Chebyshev IIR Filter

The second filter we designed was Chebyshev filter.  BLT was used for converting the the generated analog Chebyshev filter to digital iir Chebyshev filter.
 It was noticed that in output magnitude response, there is ripple in pass band with the total number of valleys and peaks equal to order of the filter. 
The magnitude response that in the stop band, however, was monotonic (smooth). From the pole zero plot we come to a conclusion that digital Chebyshev filter poles lie inside the unit circle making it stable.

code:

Butterworth Filter Design

 The first experiment on Filters, required us to find output of a digital Butterworth filter. The Butterworth filter was designed by Transfer Domain Method - Bilinear Transformation (BLT). We were required to input the values of pass band frequency, stop band frequency, pass and stop band attenuation and sampling frequency. We used the Scilab software for programming instead of C program as it’s easy to get the plots which we require in scilab and also there are some predefined functions which make designing easier. 
 The theoretical and observed values were compared. Maginitude spectrum and pole zero plot was drawn and it was observed that butterworth filters are monotonic in its pass band and stop band.It was noticed that the magnitude response smooth in both pass band and stop band.We concluded that if the inputted values and observed vales are not matching, the order of filter needs to be increased. 



codes:

DSP Processor

The sixth experiment consisted of using a DSP processor for various operations like arithmetic, logical and shifting. The session was conducted by our seniors using the TMS320C5505 DSP board. We learnt about the operations as well as their syntax and addressing before and after the execution of a particular operation. The operations performed were as follows:[1] Arithmetic-add, subtract, multiply [2] Logical –and ,not [3] Shifting –left shift, right shift, rotate right and left.

A separate session was also conducted for our batch in which the real time audio processing was done using the dsp processor by our seniors during our lab session. 


OAM & OSM

The fourth experiment of the course was on Linear FIR Filtering Methods - Overlap Add Method & Overlap Save Method. The Fast Fourier Transform Algorithm had an important limitation in which it required all input values to be available for obtaining an output. For a real world signal which can be arbitrarily long, waiting for the entire signal to arrive and get stored would result in massive delays and also increase the cost of storage equipment. Here OAM and OSM come into picture.  A long input data sequence was taken and the impulse response was taken of a smaller length i.e. 3. The length of decomposed signal came to be 5 whereas the length of output decomposed signal came to be 8.

 We concluded that for inputs having large lengths OAM and OSM are useful for getting outputs with reduced delay.This experiment took some time as the concept was new to us.

codes:


FFT

The third experiment was of Fast Fourier Transform. A discrete signal with length of 4 was taken as the input i.e. x(k).We entered the values of real and imaginary part of x(k) and got x(n) using FFT. Also by the given formulae’s we got the following:[1] total complex multiplication [2] total real multiplication [3] total complex addition and [4] total real addition.We observed that from the perspective of arithmetic computations the number of arithmetic calculations is less than in DFT. Also due to parallel calculations FFT is faster than DFT.

codes:

DFT

The second experiment required us to take a signal x(n) and compute its Fourier Transform and observe the Magnitude Spectrum. Three cases were taken i.e. [1]4 point DFT [2]8 point DFT and [3] IDFT. We take an input signal of length 4 for 4 point DFT and add zero padding to it for 8 point DFT.  IDFT was calculated from the X[k]. It was observed that DFT always results in periodic results and increasing the length by zero padding gives better approximation of signal. We observe that as the value of N increases i.e. the length of signal, the frequency spacing reduces, resolution increases and approximation of error decreases.

codes:

Convolution and Correlation

Convolution and its types were studied in the previous semester. This experiment was all about brushing up our old skils of c language and the topic itself. 
The experiment required us to take a signal x(n) and impulse response h(n) and find the output signal y(n) using correlation and convolution techniques. There are 3 cases in this experiment namely for linear and circular convolution and other for auto correlation. We take x(n) and h(n) of lengths L and M respectively for linear convolution. For linear convolution the value was stored in y(n) with its length as N=L+M-1.Circular Convolution was done by taking x(n) and h(n) both of length N.  Correlation was implemented by taking values of L,M, x(n) and h(n).
This experiment took some time because of various programming techniques to be learnt and executed.

codes: