0% found this document useful (0 votes)
19 views

An Advanced Signal Processing Toolkit For JAVA App

Uploaded by

smrititomer4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

An Advanced Signal Processing Toolkit For JAVA App

Uploaded by

smrititomer4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/221302980

An advanced signal processing toolkit for JAVA applications.

Conference Paper · January 2003


DOI: 10.1145/957289.957334 · Source: DBLP

CITATIONS READS
0 2,869

4 authors, including:

Vijay Shah N.H. Younan


Siemens Medical Solutions, USA Mississippi State University
55 PUBLICATIONS 2,812 CITATIONS 306 PUBLICATIONS 3,714 CITATIONS

SEE PROFILE SEE PROFILE

Anthony Skjellum
University of Tennessee at Chattanooga
259 PUBLICATIONS 9,121 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Realtime Research View project

Security of Additive Manufacturing (AM, a.k.a. 3D Printing) View project

All content following this page was uploaded by N.H. Younan on 21 May 2014.

The user has requested enhancement of the downloaded file.


AN ADVANCED SIGNAL PROCESSING TOOLKIT
FOR JAVA APPLICATIONS
V. P. Shah and N. H. Younan T. Alford and A. skjellum
Department of Electrical and Computer Engineering MPI Software Technolgy, Inc.
Mississippi State University 101 S. Lafayette St., Suite 33
Mississippi State, MS 39762 Starkville, MS 39759
1 (662) 325-3912 1 (662) 320-4300
[email protected], [email protected] [email protected], [email protected]

ABSTRACT slow for computational type applications, it has several


This paper examines the capability, performance, and relevance advantages such as simplicity, object-oriented programming,
of a signal processing toolkit in Java, a programming language for portability, robustness, security, exception handling capability,
Web-based applications. Due to the simplicity, ease and Internet-application language, simplifying the multiprocessing
application use of the toolkit and with the advanced Internet tasks of a signal processing system using Remote Method
technologies such as Remote Method Invocation (RMI), a spectral Interface (RMI), and last but not least its usefulness in developing
estimation applet has been created in the Java environment. This a teaching toolkit for signal processing applications.
toolkit also provides an interactive and visual approach in Current available packages in Java are customized, distinct, and
understanding the various theoretical concepts of spectral do not allow an easy creation of specific new applications for
estimation and shows the need to create more application applets signal processing [4]. Having a standard Java toolkit simplifies
to better understand the various concepts of signal and image the problems of developing new applications as well as improving
processing. the current applications. In this paper, an advanced signal
processing toolkit in the Java environment has been developed.
Categories and Subject Descriptors This toolkit provides an interactive and visual approach in
D.1.3 [Concurrent Programming]: Distributed programming understanding the various theoretical concepts of spectral
estimation and shows the need to create more application applets
G.4 [Mathematical Software]: Algorithm design and analysis, to better understand the various concepts of signal and image
Efficiency Reliability and robustness processing. A performance comparison of the Java package with
other standard packages using other high-level languages is also
General Terms made.
Algorithms, Performance, Design, Standardization, Languages.
2. Java
Keywords 2.1 Java Native Interface
Java, Algorithms, VSIPL, Signal Processing.

1. INTRODUCTION C Layer Java Layer


Java Layer
The introduction of Java by Sun Microsystems has brought
revolution into the computing world. Java is the most effective Exceptions
Functions
programming language for web-based applications. Java
technology is not limited to the workstations and servers, but it JNI Classes
also targets a wide range of platforms such as pagers, hand-held
Libraries
devices, cellular phones, screen phones, digital set-top boxes, and
VM
car navigation systems as well.
Standard signal processing libraries, such as Vector Signal and
Image processing library (VSIPL) in C [1], Signal Processing in
Figure 1. JNI Layout
C++ (SPUC) [2], IEEE DSP program (McMaster) in Fortran [3]
are available. With these libraries, why should a toolkit be
developed for Java? Although Java is considered to be relatively The Java Native Interface (JNI) provides the standard interface to
integrate native code (written using C, C++, or assembly) into a
Java code [5]. JNI acts as the “glue” between native and Java
applications. JNI saves the time of rewriting high performance
applications that already exist in native language. Figure 1 shows
the JNI layout.
The native implementations are compiled into a dynamic link
library (known shared objects (.so) in Solaris and dynamic link
libraries (.dll) in Win32). The operating system loads and links 3.2 Data Manipulation in Library
this library into the process that is running the Java Virtual Sample, Block, and View are the base classes for storage and
Machine. operation of the user data. Sample and its subclass provide the
support for storing and retrieving the real and complex values of
2.2 Remote Method Invocation different primitive data types, including double, float, integer, and
Boolean. Block is the basic unit of the inAspect package and the
Application concept of allocating continuous memory similar to a “block” of
VSIPL. The data type specific classes ComplexBlock and
RealBlock extend the Block class. These classes are extended
Client Server
according to the available primitive data types, double and float.
Currently Java does not support complex data types. Hence, the
Stubs Skeletons ComplexBlock is formed by interleaved format or split format
ways of storing complex values in arrays of primitives.
RMI
System Remote Reference Layer (RRL)
For an example consider a real block of size = 25
Transport Network Transport
0 1 2 3 4 5 …………… 20 21 22 23 24
Figure 2. RMI Architecture Overview
Let us form a Vector View with
The Remote Method Invocation facilitates writing an application offset = 3 ( 4th element of the block)
to distribute computing across the networking environment. RMI
length = 6 (number of elements it can access froma given block)
takes a step further in object-oriented design by selecting the
stride = 3 ( space between consecutive element in vector view (3, 6, 9, ...))
appropriate machine for performing a specific task [6]. The RMI
architecture consists of three layers: the stubs/skeleton layer, the The Resultant view is : 3 6 9 12 15 18
remote reference layer (RRL), and the transport layer. Figure 2
shows the relationships among these layers [7]. Figure 4. Example for Creating a Specific View from a Block
The stubs/skeletons layer maintains a connection between the
objects of client-servers. The remote reference layer (RRL)
View is the base class for the manipulation of data in the inAspect
provides the data stream to stubs and skeletons, and it deals with
package. VectorView, MatrixView, and TensorView extend View
the transport layer. It thus manages the “liveliness” and
to represent a form that is more specific. VectorView,
communication between the client/server. The transport layer is
MatrixView, and TensorView represent the block in 1-D, 2-D,
the layer that creates and maintains the actual connection between
and 3-D forms respectively. A User can attach more than one
client and server, sending information over wire.
view to a single block and can manipulate either part of or the
whole block using the Views attached to that block or by
3. inAspect LIBRARY rebinding the whole set of data to the block. Figure 4 shows an
3.1 inApsect’s Programming Model example of creating a different type of view from a real block of
size 25.

Application, Applet, Servlet, Bean


4. SPECTRAL ESTIMATION
Java Platform Advanced Signal Processing Toolkit (inAspect) APPLICATION
JNI One topic of interest in signal processing applications is spectral
Java Virtual Machnine analysis, a process that involves the estimation of the spectral
VSIPL/VSI-PRO
content, i.e. the distribution of power over frequency, of a time
Operating System
series data from a finite set of measurements. Traditional
Figure 3. Programming Model methods, based solely on Fourier transforms, are mainly used for
relating the time domain representation of a signal to its
frequency domain. In addition, since most signals have noisy or
inAspect has been designed to provide a portable, high- random components, statistics play a major role in characterizing
performance library for signal processing in Java. Considering the these signals. Accordingly, robust and reliable signal processing
fact that Java is computationally slow, inAspect uses native algorithms are needed to improve the overall performance, such
libraries on supported platforms. Currently, it provides the as better frequency or spectral resolution and higher signal
interface to the native library developed by VSIPL and VSI/PRO detection ability. The Spectral Estimation package layout is
[1, 8]. The programming model of inAspect using JNI is shown in shown in Figure 5. The estimation algorithms, identified for this
Figure 3, which also shows the utility and importance of the task, are grouped as Classical, Parametric, and Statistical
VSIPL-VSI/PRO native library in the Aspect package. estimation [9-10].
WindowData
EquationSolver SpectralEstimation Box, Hanning,
Base Class Hamming, Bartlett,
Method : Gen Levinson and
Black.
Solver of Cubic Equation.
uses

AR MA Classical ARMA Statistical


Estimation Estimation Estimation Estimation Estimation
Method : Method : Method : Method : Method :
Autocorrelation, Durbin Periodogram, Yule-Walker RLME,
Covariance, Correlogram, Levinson, Minimum
Modified Average Least Square. Variance
Covariance, Burg Periodogram

Figure 5. Layout of the Spectral Estimation

Create Blocks, Views,


Create Object of
Process Queue and
Spectral Estimation Method
other object required
For PSD estimation.

Call Method

Function used for


Process Queue estimating PSD queued.

Non -
P er Persistent
sis
ten
t Queue Type
Estimate
New PSD
Yes
Bind New
No Data
Destroy Object

Figure 6. General Function Block Diagram


queue object, eliminating the need for switching between C and
4.1 General Functional Block Diagram Java for each operation. Thus, all operations are performed
The JNI introduces the overhead of transferring data from the
using the single native call [11]. Figure 6 illustrates the concept
native side to Java. This overhead may be large enough to
of Queuing, used in implementing the Spectral Estimation
reduce the high performance obtained using the native approach.
Package.
With this issue in mind, inAspect uses the concept of queuing.
All the operations to be performed on data are queued in the
swing
graph
JDialog Jpanel JApplet

armaParameters inaspectSignalPanel inaspectInputPanel inaspectS pectrumAnalysis

<<binding>>
inApsect S pectralEstimation spectEstImp spectServ
spectEst

Figure 7. Main Applet Structure

4.2 Spectral Estimation Applet Design


The class inaspectSpectrumAnalysis extends the JApplet class
and uses spectImp to call library functions that are bundled in
the SpectralEstimation package. Class
inaspectSpectrumAnalysis is the main applet class and is also
the client application. Class inaspectInputPanel provides
functions to obtain inputs from the user. Class
inaspectSignalPanel displays the input and output results. Class
armaParameters provides a dialog box for entering various
parameters required by the AR, MA, ARMA and Statistical
Methods. Figure 7 shows the class relationships for the main
applet.
The RMI structure for the applet is shown in Figure 8. Class
spectEst provides the interface for calculating the power spectral
density, depending upon the selected method. Class spectEstImp Figure 8. RMI Model Structure
provides the implementation of the interface defined in spectEst.
Classes spectEstImp_Stub and spectEstImp_Skel help in
maintaining the connection between the objects of client applet 4.3.2 Computational Module
and server. Class spectServ is the server application and helps This module is used to compute an estimate of the power
binding the server name to the object spectEstImp. spectral density (PSD) of a time series data according to a
certain set of parameters as defined in the User Input Module.
4.3 Screen Shot of the JAVA Applet These parameters are then passed to the server (spectServ) to
The main JAVA applet is divided into three modules; user- obtain the corresponding PSD. The results are then returned to
input, computational, and display modules. A brief description the client.
of each module follows:
4.3.3 Display Module
4.3.1 User Input Module This module displays the input signal and outputs the
The user-input module is divided into menus and it lets the user corresponding PSD in dB. Figure 9 shows the actual screen-
select different methods, signal type, and window type from the shots of the display module. The output results are obtained for
Method menu, Signal menu, and Window menu, respectively. a set of 1500 data samples that consists of a 50 Hz sinusoid with
The user can draw or clear the spectrum plot from the Spectrum a unit amplitude in additive white noise of unit variance (SNR =
menu. Furthermore, the user is able to input the various -3 dB), sampled at 800 Hz, using a rectangular window, and
parameters of a signal, such as sampling frequency, number of taking a 1024 point FFT.
samples, FFT length, window size, and overlap length for the
Average Periodogram. A separate dialog box is provided to
enter the model orders for the AR, MA, and ARMA methods.
User Input
Display Module

Figure 9. Screen Shot of the Java Applet.

100 160
08

Correlogram
44

90 Correlogram
2.
7

140
15
.3

Periodogram Periodogram
94

80
120
70
Time (ms)

60 100
Time (ms)

50 80
52

40
1

60
.6
.5

41
24

96

30
7
6

.7

40
.9

36
25
44

20
52
11

.7
8
29
91

84

12

20
64

10
06
4.
2.

6.
0.

2.

0 0
Pure Java Non-Persistent Queue Persistent Queue Pure Java Non-Persistent Queue Persistent Queue
Implementation Implementation

Figure 10. Timing under Window 2000 Figure 11. Timing under SunOS 5.8
compared to pure Java. Furthermore, the creation of a spectrum
4.4 Performance Comparison analysis applet using the inAspect package shows the ease of
The inAspect package provides two types of queuing; persistent
using this toolkit for the development of various signal processing
and non-persistent. If the queue is declared as persistent, all the
applications.
required operations are queued and they remain in the queue until
the queue is destroyed or a specific command is given to remove
it. Queuing is processed using a specific function. The same set of
6. ACKNOWLEDGMENT
The authors would like to first acknowledge the National Science
operations can be performed on new data by processing the same
Foundation for their funding under NSF Phase II SBIR Grant
queue. While in the non-persistent queue, each operation is
0078563. Also special thanks go to Dr. Anthony Skjellum and
processed immediately and a specific operation is removed from
Mr. Torey Alford of MPI software Technology, Inc. for their help
the queue. In order to perform the same set of operations on new
in developing the application toolkit.
data, all the operations are required to be enqueued.
Figures 10 and 11 show the timing of two Classical Estimation
7. REFERENCES
methods, Periodogram and Correlogram, under Windows 2000
Professional (Hardware: Intel Pentium III ~500 MHz, 256 MB
[1] VSIPL Forum
http://www.vsipl.org.
RAM), SunOS 5.8 (Hardware: Sun Ultra 5/10 UPA/PCI
(UltraSPAR, C-IIi 333MHz), System clock frequency: 83 MHz, [2] SPUC C++ Library
Memory size: 256 Megabytes) operating systems respectively and http://spuc.sourceforge.net/.
Sun Microsystems’s J2SE 1.4.1 SDK. A comparison is also made
[3] MCMaster Signal Processing Library in Fortran
between the algorithms implemented in pure Java, using the Non-
ftp://nimios.eng.mcmaster.ca/pub/IEEE/software/dsp.zip.
persistent queue and persistent queue of the inAspect package. In
order to thoroughly test the performance of each implementation, [4] Douglas A. Lyon and Hayagriva V. Rao, “ Java DSP”, M &
random data is generated, a 1024 point FFT is taken, and an T Books, 1998.
average time for 1250 cycles is calculated.
[5] Java Native Interface
These figures clearly show the advantage of using the inAspect http://java.sun.com/docs/books/tutorial/native1.1/concepts/in
package with the persistent queue and native libraries (if available dex.html.
for that platform). It can be seen that the implementation using
non-persistent queuing is slower due to the extra overhead
[6] Sun Microsystems website
http://java.sun.com/
involved in transferring data from the C layer to the Java layer for
each operation. Furthermore, the pure Java version is even much [7] RMI Concept
slower due to the overhead and extra checking which Java http://www.edm2.com/0601/rmi1.html.
performs during execution. For this reason, the design of such
[8] VSI-PRO product
algorithms is essential, to maintain an acceptable level of
http://dri.mpi-softtech.com/servlet/MPI/products/vsi-pro
performance.
[9] S.L. Marple, Jr., Digital Spectral Analysis with Applications,
5. CONCLUSION Prentice Hall, Inc., Englewood Cliffs, NJ, 1987.
Various independent and customized signal processing packages [10] S.M. Kay, Modern Spectral Estimation Theory and
in Java are available, but developing a new application from these Application, Prentice Hall Signal Processing Series,
packages is limited. Hence, the development of a signal Englewood Cliffs, NJ, 1988.
processing toolkit provides more usability and better
performance. inAspectTM provides the high performance Signal [11] T. Alford, V. Shah, D. Whitcomb, A. Skjellum, N. Younan,
Processing and Image Processing toolkit in Java. A performance A. Watkins, “inAspect™ – Interfacing Java and VSIPL”,
comparison shows the advantage of the queuing function for Proceedings of the 2002 joint ACM-ISCOPE conference on
specific applications and also the advantage of using the JNI Java Grande, ACM Press, pp 148-155, 2002.

View publication stats

You might also like