Tuesday, 26 April 2016

Analog and Digital Butterworth Design

This was the first experiment implemented on scilab. The objective of this experiment was to design a digital Butterworthfilter from analog filter.

The Butterworth filter was designed using Transfer Domain Method - Bilinear Transformation (BLT).

The user had to just enter input values like Attenuation in Stop band (As) and Pass band (Ap) as well as Pass band frequency, Stop band frequency and sampling frequency.  
The order of the filter was calculated along with the cut-off frequency. Then the normalised H(s) and denormalised H(s) was calculated. From this the transfer function H[z] was calculated for both low pass and high pass filter design.

We observed the magnitude and frequency graphs and learnt that the graph in monotonic and without any ripple for both low pass and high pass designs.

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

Friday, 22 April 2016

Signal Processing Application - Speech Recognition

Patent Review :
 
Selective enablement of speech recognition grammars 
US 9196252 B2
ABSTRACT
A method for processing speech audio in a network connected client device can include selecting a speech grammar for use in a speech recognition system in the network connected client device; characterizing the selected speech grammar; and, based on the characterization, determining whether to process the speech grammar locally in the network connected client device, or remotely in a speech server in the network. In one aspect of the invention, the selecting step can include establishing a communications session with a speech server; and, querying the speech server for a speech grammar over the established communications session. Additionally, the selecting step can further include registering the speech grammar in the speech recognition system.
 
Publication number -  US9196252 B2
 
https://google.com/patents/US9196252
 
IEEE Paper Review:
 
Speech: A Challenge to Digital Signal Processing Technology
for Human-to-Computer Interaction
Urmila Shrawankar
Dept. of Information Technology
Govt. Polytechnic, Nagpur Institute
Sadar, Nagpur – 440001 (INDIA)
urmilas@rediffmail.com
Cell : (+91) 9422803996

Anjali Mahajan
Dept. of Computer Sci & Engg.
G H Raisoni College of Engg.,
Hingna, Nagpur 440016 – (INDIA)
armahajan@rediffmail.com
Phone: (0712)-2241509 
Abstract - This software project based paper is for a vision of the
near future in which computer interaction is characterised by
natural face-to-face conversations with lifelike characters that
speak, emote, and gesture. The first step is speech. The dream of
a true virtual reality, a complete human-computer interaction
system will not come true unless we try to give some perception to
machine and make it perceive the outside world as humans
communicate with each other. This software project is under
development for “listening and replying machine (Computer)
through speech”.
The Speech interface is developed to convert speech input into
some parametric form (Speech-to-Text) for further processing
and the results, text output to speech synthesis (Text-to-Speech)
 

Convolution and Correlation

The aim of this experiment was to study mathematical operations like linear and circular convolution and correlation. Programming of this was done using C language.  All the programs included a standard layout i.e. taking inputs and printing the output in the main function.
1) In linear convolution, we took x(n) (length M) and h(n)(length N) values and obtained y(n) of lenth L+M-1.
 
2)In circular convolution, we took x(n)  and h(n) of each N length. We changed the values of N for different cases (zero padding).  Circular correlation gives aliased output. For N>L+M-1, zeroes get added to the output of linear convolution of the same signal. 
We came across Aliasing(end terms got added to the first term ).
 
3) Correlation- In Auto Correlation, at n=0, output is sum of squared values of the signal. In Cross Correlation of a delayed input signal, the output was both-sided.
 
Different codes had to be done for linear, circular and correlation in one experiment. This Experiment took around 2 weeks to complete since we had forgotten some C Programming techniques. But after get fimilar with C techniques, we were able implement them faster. 

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

Perform Operations Using DSP Processor

  This experiment was demonstrated by our seniors who explained it really well and made sure that we got our doubts cleared about the experiment. The DSP Processor used was the Texas Instruments TMS320C5505 DSP processor. The DSP processor was programmed using Code Composer Studio (CCS).
 We learnt General instruction format in asm ..For e.g("OPERATION REGISTER,#IMMEDIATE DATA");. Addition is performed as asm("ADD XAR1,#0X08");
We performed basic arithmatic and logical operation such as ADD, SUBTRACT , MULTIPLY, AND ,NOT , LSL using DSP Processor.
The results were later verified that were stored in registers before and after the execution of that particular operation.
https://drive.google.com/open?id=0B2dvoOHjY9tfLUF2UVNtSDIyMHM

FFT

FFT and Inverse FFT was the second experiment of the course. FFT produces same result as DFT but it is fast as compared to  DFT due to parallel calculations.
For 4 pt FFT, two stages would be required which are executed using separate array multiplications. Like DFT, real and imaginary part calculations are done separately using two for loops. Finally results are displayed as (real)+j(imaginary part).
We also performed IFFT to verfy our original signal.
https://drive.google.com/open?id=0B2dvoOHjY9tfLUF2UVNtSDIyMHM

Discrete Fourier Transform

The DFT formula incorporates summation and twiddle factor, both of which took time to implement on C Code . 
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.
 Real coefficient values of x[n] were taken as input array along with length of x[n]. Header file math.h  required for using sin() and cos().Real and imaginary parts of X[k] are computed independently using two different for loops and values are stored in two arrays. PI is defined globally for the C program. X[k] is finally displayed by retrieving the stored values for a particular value of 'k' from both arrays simultaneously. IDFT code is obtained by just reversing the process described above to obtain real coefficient values of x[n].


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

OAM and OSM

Linear convolution was performed first by using OAM method and then OSM Method. There were 4 decomposed signals and N=8.
It was learnt that OAM and OSM are methods used to evaluate the discrete convolution between a very long signal x(n) and a finite impulse response h(n) using FFT and hence reduces the complexity.
The breaking down of a longer sequence makes the convolution of the entire sequence accurate and easier.
We learned that FFT is used due to its fast computation efficiency. OAM is a practical method to process real-time infinite length sequences.
Overlap add method is used to process a long signal .

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

Designing Digital filters using FSM

In this experiment, we were required to design a digital FIR filter using Frequency Sampling Method (FSM). Scilab was used to implement it.

We implemented a digital FIR filter using Frequency sampling method. The input specifications were taken as usual and the magnitude response was plotted. 

In frequency response of the obtained output signals of Frequency Sampling Method, ripples in the Stop Band obtained are of decreasing amplitudes. Phase plot of HPF and LPF are same if the order of both of them are same. Phase varies linearly with frequency , hence output will not be distracted.  Also that as order increases number of side lobe increases.

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

Digital Chebyshev filter design

This was the second experiment using scilab. It was similar to the previous experiment but here we were designing a chebyshev filter.

The Chebyshev filter was designed using the algorithm discussed in class. Input specifications are Pass band frequency,Stop band frequency, Pass band attenuation, Stop band attenuation, Sampling frequency. Filter order is  calculated as N  for LPF & for HPF. Analog Chebyshev filter design requires computing ε,μ, a,b, Φk, poles, quadrature polynomial, constant and finally denormalized filter H(s) from H^(s).
In chebyshev, the number of ripple peaks represent the order of the filter. Magnitude and pole zero plot was plotted of both LPF and HPF chebyshev filters. The poles were within the unit cirle.


The magnitude spectrum is equi-ripple in passband and monotonic in stop band. In butterworth filter, it was observed the opposite. For the same parameters the order of chebyshev filter is less than of butterworth filters.
It was noticed that in the output magnitude response, there is a ripple in the pass band with the total number of valleys and peaks equal to order of the filter. 
https://drive.google.com/open?id=0B2dvoOHjY9tfLUF2UVNtSDIyMHM

Design digital filter using windowing technique

In this lab experiment,used a particular windowing function based upon the attenuation in stop band.The different types of windowing functions we have learnt in class were Rectangular,Bartlett,Hamming,Hanning, and Blackman.
The specifications of As,Ap, stop band frequency, passband frequency and sampling frequency are taken from the user.
It is observed that as the order of the filter increases the number of lobes in frequency response increase.The attenuation depends upon the type of window used where the attenuation is maximum for the Blackman window and minimum for rectangular window.
 Phase response varies linearly with frequency, thus no ditortin is observed at the output of the filter. Output is same as input delayed by some constant.
https://drive.google.com/open?id=0B2dvoOHjY9tfLUF2UVNtSDIyMHM