Friday, 22 April 2016

Signal Processing Application

EXPERIMENT 10: Signal Processing Application

The aim of this experiment was to implement any Signal Processing operation on one dimensional Signal.
We formed a group of 5 students. The members were Nikita Pagar, Golappagouda Patil, Anushree Mhatre, Apoorva Raut and Sahil Rai. The topic we selected was “Detection and Processing of Electromyography signals”.
The title of the paper is “Machine Learning Algorithms for Characterization of EMG Signals” written by Bekir Karlık, Member, IACSIT.
The patent selected was “Wearable electromyography-based controllers for human-computer interface”.

Inventors:
Tan; Desney (Kirkland, WA), Saponas; T. Scott (Seattle, WA), Morris; Dan (Bellevue, WA), Turner; Jim (Monroe, WA)
Assignee:
Microsoft Corporation (Redmond, WA) 
Family ID:
42729058
Appl. No.:
12/404,223
Filed:
March 13, 2009


Description: A "Wearable Electromyography-Based Controller" includes a plurality of Electromyography (EMG) sensors and provides a wired or wireless human-computer interface (HCl) for interacting with computing systems and attached devices via electrical signals generated by specific movement of the user's muscles.

Application: Simulate one type of EMG signal in MATLAB.                                                                                       Compare that signal with existing samples using cross-correlation.                                                        If the signal is similar to the samples available then display the output.
This was less of an experiment and more of research but nevertheless it was a wonderful experience. We got to read a lot of literature on DSPP which we otherwise would not have read. We also learned about the application of DSPP in the real-world and how it affects our lives.

Links:  PAPER
            PATENT

Basic Operations using DSP Processor

EXPERIMENT 9: Basic Operations using DSP Processor

Day 9 of DSPP practicals. This was a demo experiment which we observed from the comforts of our home-ground; our class. A senior explained the DSP processor and its applications quite thoroughly.  
The aim of this experiment was to perform operations using DSP Processor.
 We learned programming using DSP Hardware.
In this experiment, we took two, 4 point signal values performed addition, subtraction, multiplication and division using Processor.
We also performed bitwise logical operations and shifting of signal values. After performing each of these operations we verified the register values and compared them with the values of these registers before the execution of these instructions. 
We observed the practical implementation of the processor and its instructions. 


Digital FIR Filter Design using Frequency Sampling Method

EXPERIMENT 8: Design of FIR Filter

Day eight of DSPP practicals. This was the last experiment which was to be performed in the lab. Unfortunately, the session to perform this experiment was during our submissions. So we requested for extra hours to perform this experiment. This experiment was also quite tough. The brilliant minds of our class once again performed their magic.
The aim was FIR Filter design using Frequency Sampling Method.
We designed the digital filter using frequency sampling method.
The input specifications were given as
For LPF / HPF filter Design :
(1) Pass band Attenuation (Ap) (2) Stop band Attenuation (As )
(3) Pass band Frequency (Fp) in Hz (4) Stop band Frequency (Fs) in Hz
(5) Sampling Frequency in Hz
 For BPF / BSF filter Design :
(1) Pass band Attenuation (Ap) (2) Stop band Attenuation (As )
(3) Pass band Frequency (Fp1, Fp2) in Hz (4) Stop band Frequency (Fs) in Hz
(5) Sampling Frequency in Hz       
In this experiment we observed that phase response will be same for low pass and high pass filter if the orders are kept same. We also verified the values of Ap and As.
Buttons were loosened and hair-ties were removed. We had now performed all the experiment suceesfully. There was an atmosphere of celebration in the lab. By this experiment we had learned the importance of team-work and foes had now become friends again.
Program code: FSM

Digital FIR Filter Design using Windowing Method

EXPERIMENT 7: Design of FIR Filter

Day seven of DSPP practicals. The rivalries of the previous lab session had to be forgotten and all hatchets had to buried; for this was the most difficult experiment of all the DSPP practicals.
The aim was Linear Phase FIR Filter design using window function.
In this experiment we designed a digital filter using windowing technique and studied the spectrum of the filter.
The input specifications were given as
For LPF / HPF filter Design :
(1) Pass band Attenuation (Ap)
(2) Stop band Attenuation (As )
(3) Pass band Frequency (Fp) in Hz
(4) Stop band Frequency (Fs) in Hz
(5) Sampling Frequency in Hz
 For BPF / BSF filter Design :
(1) Pass band Attenuation (Ap)
(2) Stop band Attenuation (As )
(3) Pass band Frequency (Fp1, Fp2) in Hz
(4) Stop band Frequency (Fs) in Hz
(5) Sampling Frequency in Hz    Fro the phase spectrum we concluded that it is linear for FIR filter. Also the observed values of As and Ap are close to the input values.
We had to assemble all the brilliant minds of our class to complete this experiment. The round table in the lab resembled the conference table where all the Gods of the universe must have held a meeting and worked together to create the world as we know. The only difference here was that the Gods of knowledge were creating a world called FIR filter in the universe called DSPP.  

Program code:FIR
                        FIR.SCI

Digital Chebyshev Filter Design

EXPERIMENT 6: Design of Chebyshev IIR Filter

Day six of DSPP practicals. In theory, this topic was our favourite and we were excelling at solving numericals based on it. But the designing of this filter using SCILAB was just a difficult as designing  Butterworth filter.
The aim of this experiment was designing analog and digital Chebyshev Filter .
 In this experiment we designed a digital Chebyshev filter from analog Chebyshev filter using BLT.
The input specifications were given as
(1) Pass band Attenuation (Ap)
 (2) Stop band Attenuation (As )
(3) Pass band Frequency (Fp) in Hz
(4) Stop band Frequency (Fs) in Hz
(5) Sampling Frequency in Hz
In the end we concluded that in both low pass and high pass filters, poles are inside the unit circle and hence they are stable. For low pass filter there is a definite zero at z=-1 while for high pass filter there is a definite zero at z=1. The values of Ap and As as input are approximately same.
The scene of the previous practical session was recreated. Our lab looked less like a lab and more like a brokerage firm's office and we resembled the stockbrokers. Tempers flaring and voices rising, we finally completed the experiment. By the time we exited the lab, a few members of our batch had become rivals.
Program code: CHEBYSHEV


Digital Butterworth Filter Design

EXPERIMENT 5: Design of Butterworth Filter

Day five of DSPP practicals. This one was an uphill battle. This was the first experiment which was performed using SCILAB. This meant we had to modify our codes. But this also produced a lot of errors.
The aim of this experiment was designing analog and digital Butterworth filter.
We designed a digital filter from analog filter and studied the aliasing effect due to sampling in Impulse Invariant Method and the frequency warping effect in BLT Method.
The Input Specifications were given as
(1) Pass band Attenuation (Ap< 3 dB)
(2) Stop band Attenuation (As> 40 dB)
(3) Pass band Frequency (Fp) in Hz
(4) Stop band Frequency (Fs) in Hz
(5) Sampling Frequency (F) in Hz     
We arrived at a conclusion that for both low pass and high pass filter, poles lie inside the unit circle. Hence both the filters are stable. But we also observed in the result that the values of Ap and As are not approximately same. Hence for better stability the order of the filter needs to be increased.
After much discussions, debates and flying tempers, we finally obtained the required the output.  

Program code: BUTTERWORTH

Overlap Add Method / Overlap Save Method

EXPERIMENT 4: Filtering of long Data Sequence

Day four of DSPP practicals. Take the name of the devil and the devil appears. We talked about challenges in the previous practical session and here was one in the form of this experiment.
This particular experiment took some research and studying some theory. It also took the collective efforts of our entire batch.
The aim of this experiment was to perform filtering of Long Data Sequence using Overlap Add Method and Overlap Save Method.
We implemented the filtering of Long Input Sequence using Overlap Add / Overlap Save Algorithm.
The Input Specifications were given as length of long data sequence and signal values and length of impulse response M and Signal values.
We concluded that Overlap Add Method(OAM) and Overlap Save Method(OSM) are efficient methods to calculate the convolution between long length signal and finite impulse signal.
It was one of the longest practical sessions in this semester but we finally got our rewards. Wiping the proverbial sweat from our foreheads,  we exited the lab. 

Program code: OAM
                         OSM


Fast Fourier Transform

EXPERIMENT 3: Fast Fourier Transform

Day three of DSPP practicals. We were slowly becoming professionals in completing these experiments. We were also learning to work as a team.
The aim of this experiment was to perform Fast Fourier Transform. In this experiment, we developed a program to perform FFT of N point signal. For this we gave input specifications as length of signal N and signal values. 
After performing this experiment we concluded that from perspective of arithmetic computations, the number of arithmetic calculations in FFT are less than DFT. 
Therefore, FFT is preferred over DFT. 
We realised that this experiment was similar to the DFT experiment. We were now feeling extremely confident and were ready to face any challenge that was thrown our way.

Program code: FFT



Discrete Fourier Transform

EXPERIMENT 2: Discrete Fourier Transform

Day two of DSPP practicals. We know knew what to expect and braced ourselves for the same. We were even encouraged by our previous successful experiment. So we entered the lab with a spring in our steps and a song on our lips.
The aim of this experiment was to perform Discrete Fourier Transform.
Initially, we studied the theory of DFT and solved a sum for the same. Using these formulae and results, we proceeded with the experiment.
We developed a function to perform DFT of N point signal and concluded on the effect of zero padding on magnitude spectrum.  We found that as N increases, frequency spacing reduces, approximation of error in representation of spectrum decreases and resolution of spectrum increases. Therefore, the visual appearance of the spectrum increases.
With that we completed two experiments of DSPP. Our joy knew no bounds.


Program codes:  DFT
                           IDFT

Convolution and Correlation Algorithms


EXPERIMENT 1:  Convolution and Correlation Algorithms
Day one of DSPP practicals. Although we were given an idea about how things worked during those two hours, we did not know what to expect. Ours was just the second batch of the week since we had our lab time on Tuesday mornings. We tried to satisfy our curiosity by asking for feedback from the students of the previous batch. But the tired and frustrated faces told us little and did nothing to lift our hopes. The suspense continued.
At sharp 9 a.m. on Tuesday we entered the lab with our sleepy eyes and jittery nerves. Opening the lab manual given to us, we read the title of the first experiment. That brought a smile to our faces because this was related to something we studied even in the previous semester. We sighed with relief and sat ourselves in front of our respective computers.
The aim of this experiment was to study mathematical operation such as Linear convolution, Circular convolution, Linear convolution using circular convolution.
We developed a function to find Linear Convolution and Circular Convolution
We calculated Linear Convolution, Circular Convolution and Linear Convolution using Circular Convolution and verified the results using mathematical formulation.
We then concluded on aliasing effect in Circular convolution.
The aim of the second part of the experiment was to study mathematical operation of correlation and measure degree of similarity between two signals.
We wrote a function to find correlation operation.                                                                               We calculated correlation of a DT signals and verify the results using mathematical formulae. We also measured the degree of similarity using Carl’s Correlation Coefficient formula in time domain.
All done in a day's work, we congratulated ourselves. With beaming smiles on our faces and hope in our heart, we moved onto the next experiment.
Program code: Correlation