next up previous
Up: EEE 407/591 - Digital Previous: Lab 5 Main: Main Lab Page

Introduction to J-Dsp

 

The easiest way to explain some of the functionality of J-Dsp is to work through an example.

Push the ``Start''-Button below:

Your browser does not recognize the applet tag.

Press the "Sig Gen" button, move the mouse to the center of the window, and push the left mouse button. You have created an signal generator box. Similarly, create a filter, a cofficient box and plot box by pressing the "Filter", "Coeff" "Plot" buttons and then clicking on an empty space in the editor window. Be aware that you can not place boxes on top of one another. Your editor window should look like the following:



To select a box, click on it and it will become highlighted. Once a box is highlighted, you can move it by placing the mouse arrow over it, holding down the left mouse button and while holding the button down, dragging the box to a new location. To delete a box, select it and press the del key on your keyboard.

Next, click inside the small triangle on the right side of the input box and while holding the mouse button down, slide the mouse arrow to the triangle on the left side of the filter box. Release the mouse button to create a connection between the input and the filter box. Always make the connections in the direction of the signal flow. Outgoing signals, leave boxes on the right, incoming signals enter boxes from the left.

Now connect the coeff box with filter and filter to the output box. Your editor window should look like the following:

o

Next, we choose our input signal. Double click inside the Sig Gen box and a dialog window appears. If you do not see a dialog window, you are using an older internet browser and must download the newest version of Netscape Navigator and start over.

On the right side of the signal generator window, you see a preview of the signal. You may change the name of the signal(a default name appears when the signal generator is added to the editor window), the gain(amplitude), the pulsewidth,and Time shift.The signal type can be changed by clicking on the pop down menu and selecting a signal. If you select a self-defined signal, an edit signal button will appear allowing you to edit the signal.Non peiodic signals like rectagular signals can be made periodic by clicking the periodic box.

On the right, you can see a preview of the input signal. Create a sinusoid of freq 0.2*pi , pulsewidth=30 and gain=1.0 as shown in the figure below. When all of the parameters have been entered, press the update button to update the display at the right and remember that whenever chages are made to this box, the update button must be pressed in order for the changes to take affect.


Now push "Close" and the dialog window closes.

Next, we want to take a look at the output. Double-click inside the plot box and a new dialog window appears. You should again see the input signal because the filter is just letting the signal pass through without attenuation or delay.

To take a look at the output signal in the frequency-domain, we have to insert a Fast Fourier Transform (FFT) block. This block is available under the "Freq. Block" category under the scroll menu at the upper left corner of the main JDSP window. Click on the connection between the filter and the output box, to select it and delete it by pressing the ``Del''-key. Place an FFT block between the filter and the plot blocks. Connect the output of the filter to the FFT block and the FFT block to the plot block. Now, double click on the plot block and you will see the magnitude and phase of the of the signal in the frequency domain. You should see a peak at 0.2 * pi radians which is the frequency of the sinusoid in the Sig Gen block. To obtain the exact values of the FFT, push the "Values" button. If you double click on the FFT block, you can change the size of the FFT from its default of 256.

The ai's and bi's in the above equation are the filter coefficients for the filter block in JDSP. Close the plot dialog box and double click on the filter coefficeint block. To enter filter coefficients, select A0-A10 or B0-B10 and enter the coefficients in order. You must then press the update button at the bottom of the window for the changes to take effect. Enter the following filter coefficients in the filter block: B0=2, a0=1 and a2=-0.5 which are coefficients for a lowpass IIR filter. Remember that A0 must always be 1.

Now we will add a noise signal to the sinusoid. Place another signal generator box near the signal generator box already in place. Select random for the signal type and make the variance 4.0, the mean 0 and and the pulsewidth 256. Add the two signals together using an add box. Also, connect a junction box to the output of the filter and add an additional plot box so your diagram looks like the one shown below. Now the signal can be viewed in the time and the frequency domain at the same time by double clicking on the plot boxes.

In the time domain, the sinusoid may be a bit difficult to recognize, but in the frequency the presence of a sinusoid of frequency 0.2*pi radians is clear.


next up previous
Up: EEE 407/591 - Digital Previous: Lab 5 Main: Main Lab Page

Copyright 2000 Andreas Spanias, MIDL, Arizona State University JDSP and Report Submission Software Developed by ASU-MIDL For questions contact Prof. Spanias spanias@asu.edu.