Saturday, 23 April 2016

Signal Processing Application

This was a Group Experiment performed by Aishwarya Bannore, Varad Choudhari, Gauri Joijode, Amisha Khimani and Apoorva Laharia. We choose "Morse Code Generator from a given Analog Signal" as an application.
Problem Definition : 1) Accept Analogy input and convert it into Digital Signal(Binary).
2) Covert Binary to Morse and implement the dots and dashes as 0 and 1 respectively.
    (Dots = 1 = LED ON, Dash = 0 = LED OFF)
Patent Review :
Portable Morse Code Signaling Device
Application Numbe05/101693
Inventors :     Johnson, Donald W. (Linton, IN) 
                     Stovall, Ronald J. (Crane, IN) 
                     Wheelock, Larry A. (Bloomfield, IN) 
Publication Date:  06/06/1972
Filing Date :    12/28/1970
Summary:  The patent says about producing a device that is capable of producing a light that flashes a Morse code signal. light source is energized by a source of energy and circuit means are provided to energize the light source according to an output signal from a shift register comprised of a plurality of flip-flops. A diode encoder having a plurality of switches is provided to select flip-flops that are to be set which, upon clearing of the shift register, provides a Morse code signal. A first oscillator is provided to pulse the shift register and a second oscillator is provided to pulse the diode encoder for resetting the flip-flops.
IEEE Paper Review: An Idea of an Assistive Computer Input Device Using Morse Code Recognition Controlled by Nipple Switch for Quadriplegics.
Publisher:  C. H. Liang, C. M. Wu, C. H. Luo.
(4th Kuala Lumpur International Conference on Biomedical Engineering 2008)
Summary: An idea of a useful assistive computer input device for quadriplegics is proposed in this paper, which will be a bifunctional device: keyboard and mouse. A user can control both functions by clicking a nipple switch combined by nipple and micro-switch with Morse-code encoding. To keep a stable typing speed and ratio for quadriplegics is very difficult, so a fuzzy algorithm will be applied to recognize the unstable Morse-code. 
  (1) Acquire the input signals from the nipple switch;
 (2) Translate the input signals to Morse-codes by a fuzzy algorithm. 
(3) Send the control signals to drive the mouse or to input the data as a keyboard through USB interface.
     Since we’ll only use one microcontroller and one nipple switch in whole device, the dimension of the device will be very small with reasonable low price so that the person with disabilities can afford and use conveniently.

Linear Phase FIR Filter using Window Function

The objective of this experiment was to design digital filter using windowing technique and study the spectrum of filter.
Algorithm for this exp is as follows:

  • from the given parameters find Hd(W)
  • find hd(n) by using IDFT
  • from the given window function calculate h(n)=  hd(n) * w(n)

        In this experiment it was required to design an FIR filter using the Windowing method. In this method, the desired impulse response is multiplied with window function w(n) to obtain h(n) which after Z-transfrom yields the transfer function H(z).
        According to the value of As, the window function is selected. The desired impulse response is calculated depending on the filter type and it is multiplied element by element by the window function to obtain the output signal.
The magnitude and phase response is plotted by the cell2mag function. The phase response obtained for any h(n) is linear.

codes for this experiments are given below:
https://drive.google.com/open?id=0B-US8fsfaFQxMnJRY0lfdjhmcUk

FIR Filter Design using Frequency Sampling Method


       The objective of this experiment was to design a digital filter for the given input specifications using frequency sampling method.
Algorithm for this exp was as followed:

  • from the given parameters find Hd(W)
  • find out H(k) by using DFT
  • find h(n) by using IDFT

       During this lab session we needed to perform FIR using Frequency sampling for LPF and HPF. This algorithm was implemented in scilab again.  We learned that the number of lobes increases with order of the digital filter. As filter order increases, number of lobes in stop band also increases. The output is also symmetric in nature. After observing for both IIR and FIR we learn that for same parameters, order of FIR is higher than IIR.

scilab code for FIR Filter Design using Frequency Sampling Method :
https://drive.google.com/open?id=0B-US8fsfaFQxM2QwSkxYUjNtS28

DSPP Processor Applications

This was a demo experiment given by our Senior Jayganesh from BE EXTC. To start with the assembly language instructions was explained. This was followed by the instructions on using the code composer studio which is used for writing codes and debugging them.
A new project was created and a simple code was written to demonstrate various arithmetic and logical instructions in DSP processor.The DSP kit used was TMS320F28375.The output of the instructions was stored in the registers and these values were obtained in real-time using the debugging functionality of the software.

Filtering of Long Data Sequence


Overlap save method:

        The aim of this experiment to perform linear filtering of Long Data Sequence using Overlap Save Method. In this experiment, I gave long input sequence which further divided into 3 small and equal number of sequences. Output of each sequence was calculated by linear convolution of input sequence and h(n). Signals then passes through OSM algorithm and we get the final output. Complexity of overlap save method is more. 

Overlap add method:

    This method is advantage over convolution method. because convolution is limited to definite length signal.so it can not be used for real time signals. but overlap add method is useful in real time signal because in real time the length of signal is not fixed.


 C codes of this experiments are available in drive  :
https://drive.google.com/open?id=0B-US8fsfaFQxZW9HVWZrUEtHX1k

Butterworth Filter Design

The objective of this experiment was to design a digital butterworth filter from analog filter. program for this filter design was develop on scilab based on the algorithm taught in the class i.e 

  • from the given data calculate the necessary data for digital filter design 
  • calculate the order (N)
  • find out normalized LPH filter
  • from that calculate De-normalized filter
  • and after that by BLT or IIM we can calculate the H(z)
In this experiment we have studied that,
  1.  response in butterworth filter is monotonic. 
  2. As the order increases the response becomes more sharpen in both high pass filter and low pas filter.
  3.  In this designing we intially find order through passband and stopband frequency.and find normalized and denormalized transfer function and the find actual transfer function in z transform
from the image below we can understand about how filter behaves as the order increase and the difference between ideal and actual filter

 

scilab code for Butterworth filter design :
https://drive.google.com/open?id=0B-US8fsfaFQxbDhHMGdQMWRzRlE


Chebyshev Filter Design

The objective of this experiment was to design a digital chebyshev filter from analog chebyshev filter
       In this experiment we have taken inputs like pass band attenuation, stop band attenuation, pass band, stop band and sampling frequencies in hertz. We implemented calculations of all parameters of the chebyshev filter in scilab. following conclusions were obtained from this experiment

  1. If the order of the filter is say five (N=5) then in the magnitude plot of the filter number of ripple peaks represents order of the filter i.e spectrum will have 5 ripple points.
  2. the magnitude spectrum is equi-ripple in passband and monotonic in stopband  where as in butterworth its is opposite.
  3. there is a difference in values observed and calculated (theoretical) of Ap and As because of variations in constant values and inaccuracies .
the image below represents the spectrum of a low pass chebyshev filter with order (N) =6



- As we can see there is a ripple of around 20% in this plot ad 6 ripple points represents order=6.

scilab code for Chebyshev filter design :
https://drive.google.com/open?id=0B-US8fsfaFQxYWc1S2lNaWNFY0E

Friday, 22 April 2016

Fast Fourier Transform


 The aim of this experiment was to perform FFT of N point signal (N=4).From this experiment we studied that,

  1. we used a code in C to perform fast Fourier transform of a N point signal.We learnt that as the number of complex as well as real additions and multiplications reduces in FFT, the computational efficiency increases resulting to a shorter time required to compute the Fourier transform.
  2. The FFT algorithm is faster then DFT as it requires less number of iteration.
  3. we also generated code for the inverse FFT.

 C codes of this experiments are available in drive  :
https://drive.google.com/open?id=0B-US8fsfaFQxSkhGaURVYy1sYTA

Discrete Fourier Transform


    The objective of this experiment was to develop a function for calculating DFT of  N-point signal.
This experiment was performed in C. Two separate code were written, one for 4-point and one for 8-point DFT.     8-point  DFT was calculated using 4-point DFT code. From this experiment we studied that, 
  1. As the value of N increases the frequency spacing also increases, i.e for 4-point DFT we got only 4 points in the magnitude plot where as in 8-point DFT we got 8 points in the magnitude plot between the range of (0-2pi).
  2. for the same 4 pt the 8 points inoint signal in 8-point DFT format got additional zero padding for next 4 points and hence we have got 8 points in the magnitude spectrum
Link for the C codes of this experiments are in the bellow drive link:
https://drive.google.com/open?id=0B-US8fsfaFQxMUdNbzRDbXppbXc

Convolution and Correlation


Convolution : 

     The aim of the experiment was to study mathematical operations like convolution, circular convolution and linear convolution using circular convolution. We used Terminal platform in LINUX for C programming.
 From this experiment we studied that, 
  1. With the help of proper functions and algorithm we can develop the code for all types of convolution and get the correct output.
  2. In circular convolution aliasing effect occurs.
  3. In linear convolution length of the o/p signal is = L+M-1, where as in circular convolution length of the o/p signal is = max(L,M)

Correlation:

      The aim was to study correlation and measure the degree of correlation. We implemented a code for auto correlation and cross correlation.From this experiment we studied that, 
  1. The o/p signal is palindrome in case of auto-correlation 
  2. We also observed that output of  correlation is both sided, even if both the input signals X[n] and h[n] are causal.
Link for the C codes of this experiments are in the bellow drive link:
https://drive.google.com/open?id=0B-US8fsfaFQxb2piM1gxWlFxZGM