DspEdu
v2.1 - CONVOLVE Module
1. What does it do ?
This module implements Linear Convolution, Circular Convolution and Circular Convolution by Inverse DFT Calculation for two finite duration sequences with sequence length upto 256 points.The sequences , called x1(n) and x2(n) can be generated in four ways - by loading them from preloaded example files , by opening a previously stored project file , by editing interactively in the main window itself and by invoking the sequence generation module from File menu.
The sequences can be saved into *.prj file in the default project directory. The convolution output sequences also can be stored in *.txt file and the plots can be saved in *.ps (Postscript Format) files in the default project directory.
The program allows various options to slow down or speed up the convolution dispaly , single-step through the convolution calculation etc to help the student user to assimilate the basic steps involved in convolution and to enable the instructors to use the program as a teaching aid.
2. Main Window Components
2.1 'Data Points' Pulldown Box
This is a Browse Entry Box. When an example file or project file is opened the length of the sequences (both sequences are assumed to be of same length everywhere in this program) will appear in this box. User can choose an entry here by pulling down the entry box.This will result in resetting all the plots , pushing all powers of 2 upto 256 and above the selected value into the DFT Points box and setting the CC Number (i.e the number of points that will be calculated in Circular Convolution by default) to the sequence length.
2.2 'DFT Points' Pulldown Box
This will contain the choices for the number of DFT points that should be calculated when Circular Convolution is carried out as Inverse DFT of product of DFTs of the input sequences.The value here gets automatically set at the sequence length and can only be increased by making another choice.
2.3 'CC Number' Pulldown Box
This box will contain the choices for the number of Circular Convolution points that will be calculated when Circular Convolution by defining equation is carried out. The default value will be set to the sequence length.The value can be changed by typing in new value.
2.4 The 'n' and 'x1(n)' Boxes
These box entries decide the index of x1(n) open for editing currently and the value that is desired at that value of index.The first pulldown box will contain choices depending on the choice made in the 'Data Points' box above.The result of choices made will be visible immediately in the plot which appears in the first plot area in the first row.
2.5 The 'n' and 'x2(n)' Boxes
These box entries decide the index of x2(n) open for editing currently and the value that is desired at that value of index.The first pulldown box will contain choices depending on the choice made in the 'Data Points' box above.The result of choices made will be visible immediately in the plot which appears in the second plot area in the first row.
2.6 The 'Reset' Buttons
Clean reset the two sequences to 'empty' and reset the 'Data Points' number to zero.
3. Menubar Items
3.1 File Menu
3.1.1 Load Example
-Choose and load one of the 10 example sequence pairs included in the program.
3.1.2 Load Project
-Load a sequence pair by opening a *.prj file saved in an earlier session.The default directory will be '/Projects/convolve'
3.1.3 Generate DT Sequences
-Brings up a new window with options to generate and set x1(n) and x2(n) to sinusoidal,step and ramp sequences.The frequency and decrement of damped sinusoids can be chosen by using a pair of slider controls which appear in that window.The sequences can be examined and edited before final acceptance.The sequence length can be between 8 and 256.
3.1.4 Save Project
-Brings up a standard Windows Save Dialog box which opens into '/Projects/convolve' by default and shows *.prj as the default extension.The number of points in the sequences and sequence data will be stored as an ascii file with selected name and 'prj' extension.The program assumes write permission in the chosen directory , overwrites with prompt and does not provide confirmation dialog.
3.1.5 Save Convolution Output
-Brings up a standard Windows Save Dialog box which opens into '/Projects/convolve' by default and shows *.txt as the default extension.The number of points in the sequences, the sequence data , linear convolution output data , circular convolution output data etc.will be stored as an ascii file with selected name and 'txt' extension.The number of points calculated in circular convolution will be as per the current values in 'DFT Points' box and 'CC Number' box.The program assumes write permission in the chosen directory , overwrites with prompt and does not provide confirmation dialog.
3.1.6 Save Plots
-Brings up a standard Windows Save Dialog box which opens into '/Projects/convolve' by default and shows *.ps as the default extension.The four plots which currently appear in the four plot areas will be saved as four postscript files with selected names and 'ps' extension.The number of points calculated in circular convolution will be as per the current values in 'DFT Points' box and 'CC Number' box.The program assumes write permission in the chosen directory , overwrites with prompt and does not provide confirmation dialog.
3.2 Convolution Menu
3.2.1 Linear Convolution x1(n)*x2(n)
-Carries out the linear convolution and plots the result in first plot area in the second row.The default action is as follows - the plots are re-scaled for (2N-1) where N is the number of data points , x1(n) is redrawn to new scale i.e zero appended and kept static after that,x2(n) is mirror-imaged and shifted into the x1(n) space in first plot using a different color (white by default) one step at a time, the progress of scanning of x1(n) by mirror-image of x2(n) moving in from left is shown in second plot area too and the evolving values of linear convolution is shown in first plot area in second row.A dialog box which appears at the start of convolution process will let the user stop the convolution calculation and reset the plots before all the calculations are over.
3.2.2 Linear Convolution x2(n)*x1(n)
-Same as above , but the role of the two sequences will be interchanged.Of course the final convolution result will be the same.
3.2.3 Circular Convolution
-Similar to linear convolution , but x2(n) is circular shifted properly instead of mirror-imaging.The modulo used in circular shift will be the current entry value in the 'CC Number' box.The result appears in second plot area in second row and will be same as linear convolution if that entry is suitably chosen.Otherwise we get an aliased version of linear convolution.
3.2.4 Circular Convolution by IDFT
-X1(k) and X2(k) are calculted and Inverse DFT of X1(k)X2(k) is shown in second plot area in second row and will be same as linear convolution if the number of points in DFT calculation is suitably chosen.Otherwise we get an aliased version of linear convolution.
3.3 Options Menu
3.3.1 Convolution Options
Show Final Result - Do not show the grahical interpretation of Linear and Circular Convolution and show the final result only
Show Scanning Function Progress - Show the grahical interpretation of Linear and Circular Convolution - Default Choice
Speedup/down Display Ctrl+Up - Speedup the display when 'Show Scanning Function Progress' is selected. Hitting Ctrl+Up a few times before the convolution commands are invoked will speed up the graphical progress of convolution.Ctrl+Down has the opposite effect.
Single Step ON/OFF - When 'Show Scanning Function Progress' is selected choosing 'Single Step ON' will bring up a dialog box after computing every single value in the convolution result - next value will be calculated only on receiving confirmation. Default-OFF
3.3.2 Numeric Result Windows Enable/Disable
-Enabling will result in a window containing the convolution results popping up after every convolution computation. Default - Disable
3.3.3 Display Mode
Data Points - The plots will be line plots , a line representing the data value.
Data Envelope - A piece-wise linear curve joining the data points will be shown. Changing this option comes into effect immediately in the existing plots.
3.3.4 Display Color Options
Normal Plot Color - The color used to draw x1(n) , x2(n) and convolution outputs.
Second Plot Color - The color used to draw a second plot in the same plot area.
Background Color - The color used as background for all the four plot areas. These three options bring up standard windows color selection dialog and changes take immediate effect
Schemes - Three color schemes in addition to default scheme are provided.Changes take immediate effect.
3.4 Magnify
Magnify the x-axis by various fixed factors. F2 key will expand the x-axis and F3 key will compress it.However this menu provides fixed scale factors for convenience.
3.5 Redraw
Re-scale all the four plot areas and redraw all the plots - needed after a resize of the main window.
3.6 Help
-This page.
3.7 Exit
4. Restrictions in the Evaluation Version
The Module can be run only 15 times and each session will last only for 10 minutes.
There are no feature limits.
5. Author
Suresh Kumar K.S
Department of Electrical Engineering
National Institute of Technology,Calicut-673601,Kerala,India
sureshks (at) nitc (dot) ac (dot) in
29th April 2004
Home
|