an adaptive system identification java simulation for

6
AN ADAPTIVE SYSTEM IDENTIFICATION JAVA SIMULATION FOR INTERNET BASED COURSEWARE ANAND XAVIER AND ANDREAS SPANIAS Distance Learning Initiative Department of Electrical Engineering Arizona State University Tempe, AZ 85287-7206, U.S.A [email protected], [email protected] Abstract - In this paper, an educational software tool on adaptive filters is presented. The simulation software is written in Java 1 and provides an interactive environment that allows students to investigate and understand adaptive filters. The program exposes students to the concepts and applications of adaptive filters with special emphasis on convergence properties. The different adaptive algorithms that are implemented include LMS, NLMS, BLMS, IIR-LMS and IIR-SHARF. A frequency response visualization module was also developed to observe the magnitude and phase response for the corresponding Pole-Zero placement in the z-domain. This software tool supports an online software laboratory in the digital signal processing class. The paper also provides examples of possible laboratory exercises. 1. INTRODUCTION 1.1 Motivation University education in the next century will rely more on a technology-based distributed environment interacting through electronic courseware rather than the traditional classroom environment. Science education research [1] supports this trend and has shown overwhelmingly that classical non-iterative lecturing is very ineffective. Moreover engineers in the industry form an important segment of the student population in a graduate level class and it is convenient for them to complete the software laboratory from work or home. Many classes use the internet to provide information about upcoming exams, assignments, etc., and also for electronic submission of homework. In this paper, we introduce a Java program to simulate adaptive filters. Several algorithms and some applications are discussed. The advantage of the Java environment is its inherent capability to display active simulations that can be integrated in a page on the worldwide web. 1.2 Software This work was supported in part by a grant from Arizona State University Distance Learning Initiative and in part by a grant from Intel Corporation, Chandler. 1 Java is a registered trademark of Sun, Inc. Information about Java can be found at http://java.sun.com Object oriented programs that allow the user to design and simulate systems are widely used due to ease of implementation, especially in the University level as it helps in better understanding the concepts rather than concentrating on low level programming. Programs such as SPW 2 and LabVIEW 3 are good examples, but they are expensive and lack in exportability. Internet offers a whole new range of possibilities as a medium for active simulations. Interactive educational tools for digital signal processing [2,3] have been developed and presented. These programs deal with active simulations of discrete time linear systems (for example, JDsp 4 by Clausen and Spanias). However in the field of adaptive signal processing, there has been very little work done for active simulations on the internet (for example, Adaptive Filter Algorithm Demo by Moritz Harteneck). The program was developed more to provide an insight into the adaptive filter algorithms rather than as an educational tool. The software we are presenting is written as a Java [4] applet. The advantage of Java is that it produces portable code that runs on almost any computer with a Java-enabled web browser. 1.3 Paper Organization The rest of the paper is organized as follows: Section 2 introduces the implementation aspects of the program in detail, then Section 3 discusses the online software lab supported by this tool for the digital signal processing course at Arizona State University. Concluding remarks and a discussion of our plans for future work are presented in the Section 4. Section 5 deals with the acknowledgement, while the list of References are provided in Section 6. 2 SPW is a registered trademark of Comdisco Systems, Inc. 3 LabVIEW is a registered trademark of National Instruments 4 http://www.public.asu.edu/~clausen/dsp/JDsp.html

Upload: others

Post on 16-Oct-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

AN ADAPTIVE SYSTEM IDENTIFICATION JAVA SIMULATION FORINTERNET BASED COURSEWARE

ANAND XAVIER AND ANDREAS SPANIASDistance Learning Initiative

Department of Electrical EngineeringArizona State University

Tempe, AZ 85287-7206, [email protected], [email protected]

Abstract - In this paper, an educational software tool onadaptive filters is presented. The simulation software iswritten in Java1 and provides an interactive environmentthat allows students to investigate and understand adaptivefilters. The program exposes students to the concepts andapplications of adaptive filters with special emphasis onconvergence properties. The different adaptive algorithmsthat are implemented include LMS, NLMS, BLMS, IIR-LMSand IIR-SHARF. A frequency response visualization modulewas also developed to observe the magnitude and phaseresponse for the corresponding Pole-Zero placement in thez-domain. This software tool supports an online softwarelaboratory in the digital signal processing class. The paperalso provides examples of possible laboratory exercises.

1. INTRODUCTION

1.1 Motivation

University education in the next century will rely more on atechnology-based distributed environment interactingthrough electronic courseware rather than the traditionalclassroom environment. Science education research [1]supports this trend and has shown overwhelmingly thatclassical non-iterative lecturing is very ineffective. Moreoverengineers in the industry form an important segment of thestudent population in a graduate level class and it isconvenient for them to complete the software laboratory fromwork or home. Many classes use the internet to provideinformation about upcoming exams, assignments, etc., andalso for electronic submission of homework. In this paper,we introduce a Java program to simulate adaptive filters.Several algorithms and some applications are discussed. Theadvantage of the Java environment is its inherent capabilityto display active simulations that can be integrated in a pageon the worldwide web.

1.2 Software

This work was supported in part by a grant from Arizona StateUniversity Distance Learning Initiative and in part by a grantfrom Intel Corporation, Chandler. 1 Java is a registered trademark of Sun, Inc. Information aboutJava can be found at http://java.sun.com

Object oriented programs that allow the user to design andsimulate systems are widely used due to ease ofimplementation, especially in the University level as it helpsin better understanding the concepts rather than concentratingon low level programming. Programs such as SPW2 andLabVIEW3 are good examples, but they are expensive andlack in exportability. Internet offers a whole new range ofpossibilities as a medium for active simulations. Interactive educational tools for digital signal processing[2,3] have been developed and presented. These programsdeal with active simulations of discrete time linear systems(for example, JDsp4 by Clausen and Spanias). However inthe field of adaptive signal processing, there has been verylittle work done for active simulations on the internet (forexample, Adaptive Filter Algorithm Demo by MoritzHarteneck). The program was developed more to provide aninsight into the adaptive filter algorithms rather than as aneducational tool. The software we are presenting is written as a Java [4]applet. The advantage of Java is that it produces portablecode that runs on almost any computer with a Java-enabledweb browser.

1.3 Paper Organization

The rest of the paper is organized as follows: Section 2introduces the implementation aspects of the program indetail, then Section 3 discusses the online software labsupported by this tool for the digital signal processingcourse at Arizona State University. Concluding remarks anda discussion of our plans for future work are presented in theSection 4. Section 5 deals with the acknowledgement, whilethe list of References are provided in Section 6.

2 SPW is a registered trademark of Comdisco Systems, Inc.3 LabVIEW is a registered trademark of National Instruments4 http://www.public.asu.edu/~clausen/dsp/JDsp.html

2. IMPLEMENTATION

The program is written in Java and can either be included ina webpage or can be installed on a local system. It featuresan interactive graphical interface that enables users toexperiment and analyze the various parameters involved inadaptive signal processing. The program requires a newversion of a world wide web browser, like NetscapeNavigator5 4.0. Our Java implementations of algorithms foradaptive tracking of a time varying system, frequencyresponse visualization, system identification, and adaptivenoise cancellation are described in this section.

2.1 Adaptive tracking of a time varying system

This portion of the tool introduces the concept of time-varying system adaptation through z-plane animations inwhich a time-varying pair of zeros is tracked by an adaptivesystem consisting of a pair of zeros as shown in Fig. 1. Thespeed of adaptation is controlled by the gain, while a speedscrollbar controls the overall speed of the time-varyingsystem, in terms of the movement of the zeros. The time-varying system follows an arc, the radius of which can bevaried by the user.

Figure 1: Adaptive tracking of a time varying system

In conjunction with the adaptive tracking animation, aplot of magnitude and phase responses for the target systemis also animated in real-time to give the user some intuitionabout the association between zero placement and frequencyresponse.

2.2 Frequency Response visualization tool

5 Netscape Navigator is a registered trademark of Netscape, Inc.

A module to visualize the frequency response for thecorresponding pair of Poles or Zeros placed in the z-domainwas implemented and is shown in Fig. 2. Both themagnitude response and phase response, are displayed andthe frequency response of the system is updated in real timewith the movement of the mouse.

Figure 2: Real-time frequency response of a user-definedpair of poles or zeros

This module provides an option to view the frequency

response for either a pair of poles or zeros. Poles arerepresented using crosses while zeros are represented by filledcircles. The module also provides an option to view themagnitude response on either a linear or decibel scale. Thecursor location, which determines the position of the pair ofpoles or zeros, is displayed in terms of the real andimaginary plane of the z-domain.

This section of the tool helps in understanding theformation of peaks and valleys, and the locations at whichthey are formed due to the placement of the poles or zeros inthe z-domain.

A variation of the above module was developed todisplay the frequency response of Poles and Zeros as shownin Fig. 3. This module allowed the user to specify amaximum of 5 pairs of Poles and Zeros. The number of pairsof poles or zeros to be placed can be chosen using therespective scrollbars.

The cursor position is displayed in terms of the real andimaginary plane of the z-domain. The zeros are placed firstfollowed by the poles. A button has been provided tobacktrack for any errors involved in placing the poles orzeros.

The frequency response can be displayed once thenumber of pairs of poles and zeros that were initially set areplaced in the z-plane. A reset button is also provided. As inthe previous module, the magnitude response can beobserved either in the decibel or linear scale. This modulehelps in understanding the design of filters by Pole-Zeroplacement.

Figure 3: Frequency response of poles and zeros

2.3 System Identification

In the third portion of the tool, several time-domain systemidentification [5] techniques are used to illustrate thebehavior of adaptive filters. The tool employs a genericsystem ID simulation architecture in which a coloredGaussian noise source is used to excite a parallelarrangement of two systems, one unknown and the otheradaptive (Fig. 4).

An error sequence is formed by comparing the outputs ofthe unknown and adaptive systems. The error sequence thendrives an adaptation process. The user is able to specify thedesired algorithm for adaptation, and may choose amongboth FIR and IIR approaches. For FIR solutions, theprogram includes the LMS, NLMS, and BLMS [6]algorithms. Currently available IIR adaptive filters includethe IIR-LMS and IIR-SHARF [7].

Other simulation parameters are also controlled fromJava windows. For example, the unknown system functionis specified in terms of moving average and autoregressivefilter coefficients [8], as shown in Fig. 5. This can either bespecified directly or the unknown filter can be modeled byplacing poles and zeros in the z-plane. A maximum of 5pairs of poles and zeros can be used to design the filter. Theposition of the poles and the zeros are displayed in a textwindow. Poles and Zeros can be deleted using the deletebutton after selecting its corresponding value from the textwindow. The filter settings can be initialized by using thereset button. The parameters are transferred to the mainwindow using the OK button.

Figure 4: System identification for various adaptive algorithms

Figure 5: Filter settings

A control window as shown in Fig. 6 is used to specifythe impulse response of the FIR "channel" which is used toshape (color) the excitation spectrum. Random coefficientscan be chosen for the coloring filter using the randomizebutton. The effect of the colored excitation on the differentadaptive algorithms can be observed.

Figure 6: Dialog box for setting channel parameters

The adaptive filter coefficients are displayed in a textbox, while the error is displayed as a time varying signal.The gain is variable depending on the algorithm used and

can be varied using the appropriate scrollbar.2.3 Adaptive Noise Cancellation

In the last portion of the tool, adaptive noise cancellation ispresented as an application of adaptive signal processing.An audio demonstration is also included with this program,which allows the users to choose the desired input speechand the corrupting noise source. The gain and the filter orderof the adaptive system can be varied using dropdown listboxes.

3. SOFTWARE LAB

The program is used to support and enhance the software labof the digital signal processing course at Arizona StateUniversity. In this section, we present the use of thisprogram for developing some active experiments for thiscourse.

3.1 Design of Digital Filters

Filter design is an important aspect of digital signalprocessing. The real-time frequency response visualizationtool for a pair of user-defined poles or zeros is first used toanalyze the relationship between the z-domain and thefrequency domain. Students are made to observe theformation of the peaks and valleys in the frequency domaincorresponding to the position of the pair of poles or zeros inthe z-domain. The increase in the amplitude of the

magnitude response for a pair of poles or zeros moving fromthe center to the unit circle along a fixed angle in the z-domain, is another important observation to be made.

The frequency response visualization tool is used for thedesign of digital filters. Pass band and stop bandcharacteristics are designed by the placement of poles andzeros. Students were asked to design different types of filterslike the low pass and high pass filters using a given numberof poles and zeros. The filter setting module is used toobserve the impulse response of the system, given the pole-zero locations or vice versa.

3.2 Adaptive tracking of a time varying system

The program can be used to explain the importance and effectof the gain of an adaptive system. A time varying system ofa pair of zeros is simulated and displayed on the z-plane.Another pair of zeros tracks this pair by using adaptivefilters. Experiments can be performed for various values ofthe gain to show how it affects the adaptive system. Studentsare exposed to the issue of stability by designing problemsusing a large value of the gain, thus making the adaptivesystem unstable. The tradeoff between convergence speed andmisadjustment is also demonstrated. The frequency responseof both the time varying system and the adaptive system areplotted to show the tracking in the frequency domain.

3.3 System Identification

A problem on System Identification is dealt with next. Thisis a time domain approach and helps in the visualization ofthe importance of the order of the adaptive filter. A FIR or anIIR filter can be used to model the unknown system. This ismodeled using the filter setting module, by placing the polesand zeros in the z-plane. This unknown system is tracked byan adaptive FIR system. Students are asked to observe thecharacteristics of the adaptive system for different filter tapsand for different values of the gain. The input to the overallsystem can be varied using the channel parameters dialogbox and the characteristics of the adaptive system for differenteigenvalue spread [9] of the input can be observed.

3.4 Comparison of Adaptive algorithms

After the different adaptive algorithms are explained in thelecture, a comparison between these algorithms can beperformed using an active Java simulation. By suitablydesigning some problems with a high gain, the stabilityissue of an adaptive system with IIR filter can bedemonstrated. The performance of the adaptive IIR filter canbe compared to the adaptive FIR filter for an unknownARMA model system. The students are asked to observe theperformance of the Normalized LMS algorithm over theLMS algorithm for both white noise and colored excitation.The convergence for the NLMS algorithm is much faster asthe gain factor of the NLMS algorithm depends on the powerof the input signal.

3.5 Adaptive Noise Cancellation

In the applications, a problem based on adaptive noisecancellation can be designed, with the input as a sinusoidalwave or a speech waveform. This is corrupted by either awhite or colored noise source. The waveforms at the inputand the output of the canceller are displayed and observationscan be made for different values of the gain and filter order.

An audio demonstration is included in this lab, to helpin understanding the working of an adaptive noise canceller.The desired signal and the interfering signal can be chosenfrom a drop-down list box. The noisy input signal and theenhanced output can be played back and the improvementobtained can be observed. The enhancement of the signaldepends on the order of the filter chosen and the gain of theadaptive system, which can be varied using a dropdown listbox as shown in Fig. 7.

Figure 7: Audio demonstration of adaptive noisecancellation

3.6 Further Experiments

Some more labs are to be added to explain variousapplications of adaptive filters such as linear prediction andchannel equalization. Different adaptive algorithms, both inthe time and frequency domain are to be incorporated andcompared.

4. CONCLUSION

A Java based tool on adaptive signal processing has beenpresented. The program is intended to be used as aneducational aid for the digital signal processing course. Javais used to implement the different adaptive algorithms andtheir related applications. A preliminary version of the toolwas used successfully in our DSP course during the Fall1997 semester. Our experiences with Java have revealed several details.On the positive side, Java is object-oriented and thereforeextensible to cover the various aspects and applications ofdigital signal processing. Unfortunately, however, thelimitation of Java due to security reasons restricts any data tobe downloaded at the client end. Once this drawback isovercome, simulations can be made with the data at theclient end. These results could be downloaded and theperformance of the different adaptive algorithms can be testedout for a particular application. This program represents our first step towardsimplementing a complete internet-based solution on adaptivefilters. In future this program will be extended to performreal-time adaptive noise cancellation and echo cancellation.These applications are particularly useful for videoconferencing purposes in a noisy environment.

5. ACKNOWLEDGEMENT

The authors would like to thank Painter, E, Arizona StateUniversity, for his valuable comments on the educationaltool and the paper.

6. REFERENCES

[1] Hake, R, "Interactive-engagement versus traditionalmethods: A six-thousand-student survey of mechanicstest data for introductory physics courses," AmericanJournal of Physics, v 66 n 1., January 1998, 64.

[2] Rahkila, M, and Karjalainen, M, "An Interactive DSPTutorial on the Web," in Proc. Int. Conf. Acoustics,Speech and Signal Processing, May 1997, 2253-2256.

[3] Clausen, A, Spanias, A, Xavier, A, and Tampi, M, "AJava Signal Analysis tool for Signal Processing," toappear in Proc. Int. Conf. Acoustics, Speech andSignal Processing, May 1998.

[4] Campione, M, and Walrath, K, The Java Tutorial(Massachusetts; Addison-Wesley, 1996)

[5] Mulgrew, B, and Cowan, C, Adaptive Filters andEqualisers (Massachusetts; Kluwer AcademicPublishers, 1988)

[6] Haykin, S, Adaptive Filter Theory, third edition (NewJersey; Prentice-Hall Inc., 1996)

[7] Widrow, B, and Stearns, S, Adaptive SignalProcessing (New Jersey; Prentice-Hall Inc., 1985)

[8] Oppenheim, A, and Schafer, R, Discrete-Time SignalProcessing (New Jersey; Prentice-Hall Inc., 1989)

[9] Narayan, S, Peterson, A, and Narasimha, M,"Transform Domain LMS Algorithms," IEEE Trans.Acoustics Speech and Signal Processing, v 31, n 3,1983, 609-615.