Efficient Software Implementation for the Upgrade of a ...

3 downloads 0 Views 1MB Size Report
Time-frequency signal analysis (TFSA) tools find important applications to many ... Algorithms included are the bilinear time-frequency distributions (TFOs) such.
Eighth Australian Joint Artificial Intelligence Conference

Applications Stream Proceedings Editors Laurie Lock Lee John Hough University College, University of New South Wales Australian Defence Force Academy 13·17 November, 1995

,

,

,-

'.

.. ,

ISBN 0 7317 0335 9

.

,

.J



Efficient Software Implementation for the Upgrade of a Time-Frequency Signal Analysis Package B. Boashash

Signal Processing Research Centre Queensland University of Technology Brisbane, Q. 4001, Australia ABSTRACT Time-frequency signal analysis (TFSA) tools find important applications to many fields including radar, sonar, geophysics and biomedicine. Their use is motivated by the fact that the time-frequency representation of a non-stationary signal often provides valuable insight and information over and above more traditional analysis methods which assume stationarity. In this paper, we describe a software package which has been developed to analyse non-stationary signals using TFSA tools.

1

Previous TFSA contributions and motivation for the new version

Previous versions of TFSA developed by the author were designed as separate software packages to be run on IBM compatible PCs under MS-DOS '. The current version of TFSA (TFSA 5.0) is an extension of these, and has been developed as a toolbox designed to run under MATLAB2 The worldwide use of MATLAB as an analysis package in both educational and industrial institutions has motivated this.

2

The TFSA 5.0 features

TFSA 5.0 is implemented by integrating efficient C code with Mathworks MATLAB programs. The main analysis routines have been coded in C for flexibility, portability and performance. The code is machine independent and can be run on any computer with a C compiler. The option exists for the user to integrate TFSA C code within their own projects. 1 MS· DOS is a trade mark of Microsoft 2MATLAB is a trade mark of Mathworks

- 26 -

C"""",,",.TI>o~-WIo~c'.e..~ obWT1 ..... ~ _ _.. t; ~;:lf&'d~":'dlhe""..t _ _ ......

""Vf)"'ftC_i'N ~ c:;

w-ro,,~"""

....

~"'_'\¢l.

"lM ..... ~~ .....

, ..-......",_..,.".,~ ,

n.e

I _(",","",_h'):! to r. 0aIhr= 0....:110:1-

'("""""""'..I-'P-

"""'''''''''','''''' "'lhc ......,.,.. ,,"',.... 3" . ,,i...,~

~~

b"""""" -·.'"

1titnl;t"" 1:~~-l'oo''''''~ lit "'" t!.'''':e ct"",

""'''I'" "'~ L"""

Figure 1: On-line help information for the WVO. The MATLAB MEX file interface facility is utilised to call the main C code routines from within MATLAB. This is incorporated with existing MATLAB M files and a graphical user interface (GUI) to give a powerful, user friendly package. Furthermore, the TFSA 5.0 MATLAB interface has been carefully designed to ensure maximum productivity and seamless integration with existing MATLAB functionality. An on-line help system describing most tools and utilities has been included in t his version for user convenience. This information is easily accessible through the help buttons which appear throughout the package. An example of help information regarding the Wigner-Ville distribution facility is shown in Fig. 1.

3

Time-frequency signal analysis tools in TFSA 5.0

T he TFSA 5.0 Toolbox provides many tools and utilities which are based on optimised algorithms. Algorit hms included are the bilinear time-frequency distributions (TFOs) such as the Wigner-Ville, smoothed Wigner-Ville, cross Wigner-Ville, spectrogram, RihaczekMargenau, Choi-Williams, Born-Jordan-Cohen and Zhao-Atlas-Marks distributions [1, 2]. Multi-linear time-frequency analysis is also available through the polynomial Wigner-Ville distribution of fourth and sixth order kernel [3], as is time-scale analysis which includes algorithms for Oaubechies coefficients computation. A substantial suite of instantaneous frequency (IF) estimation algorithms have also been included. These are: the general phase difference, weighted phase difference, adaptive, zero-crossing, least square polynomial fit , peak of spectrogram, peak of Wigner-Ville distributioJ and peak of polynomial WignerVille distribution IF estimators. Furthermore, additional tools are provided which can be used for non-stationary signal generation, data visualisation and plotting, as well as time-varying filtering. The current release of TFSA (TFSA 5.0) supports the following tools and ut ilities: 1. Generation of test signals and noise:

• Linear FM;

- 27 -

• Quadratic FM; • Cubic FM ; • Stepped FM; • Sinusoidal FM; • Hyperbolic FM; • Gaussian and uniform noise;

• A mixture of signal and noise is possible using matrix algebra utilities. 2. Generation of time-frequency distributions: • Wigner-Ville distribution; • Smoothed Wigner-Ville distribution; • Spectrogram • Rihaczek-Margenau distribution; • Choi-Williams distribution; • Born-jordan-Cohen distribution; • Zhao-Atlas-Marks distribution; • Cross Wigner-Ville distribution; • Polynomial Wigner-Ville distribution (order 6 kernel); • Polynomial Wigner-Ville distribution (order 4 kernel); 3. Generation of time-scale signal representations: • Daubechies 4, 12 and 20 coefficient wavelet transforms; 4. Instantaneous frequency estimation algorithms: • Finite phase difference: -

First order (FFD); Second order (CFD); Fourth order; Sixth order;

• Weighted phase difference;

• Zero crossing; • Adaptive LMS; • Adaptive RLS; • Least squares polynomial coefficients; • Peak of the spectrogram;

- 28 -

• Peak of the Wigner-Ville distribution; • Peak of the polynomial Wigner-Ville distribution; 5. Time-varying filtering; 6. Other OSP tools: • Analytic signal calculation; • Fast Fourier transform; • Power spectrum;

• Matrix algebra; 7. Data visualisation routines; 8. Reading and writing of files generated by previous versions of TFSA.

4

An Application

The TFSA 5.0 package was used to analyse some whale data. This example will demonstrate the potential power of the tools available. A record of 7000 points of data, which represents the cry of a whale, was collected at a sample rate of 8 KHz. The first 500 data points of the time trace was plotted using TFSA 5.0's visualisation tool and is displayed in Fig. 2. It is difficult to discern the time-frequency content of this data from such a plot. Therefore it is necessary to perform some time-frequency analysis. The Choi-Williams distribution was computed for the entire data record. The window length was 128 data points and the smoothing factor was set to a = 11. TFSA 5.0's visualisation utility was used to generate the plot (Fig. 3). Note that the sample frequency of the data was normalised to 1 Hz in all plots. From this figure it is easy to see that the signal consists of a narrowband component which varies with frequency and amplitude over time. The IF of this data was then estimated using the peak of the WVO and the recursive-least-squares (RLS) algorithm. The window length was chosen to be 256 data points for the WVO, and the forgetting factor for the RLS algorithm was set to 0.9875. The two plots of the IF estimates are shown in Figs. 4 and 5. These plots clearly show how the IF content of the data varies with time. This information, together with the CWO, gives a lucid display.of the time-frequency content of the signal.

5

Conclusions

We have described a powerful TFSA software analysis package that is able to analyse the class of non-stationary signals. The TFSA algorithms have been optimised for efficient implementation, where the code is written in such a way that it is able to be used independently for other projects. Furthermore, a user friendly GUI, which utilises the power

- 29 -

of MATLAB data visualisation , enables the package to be used from within MATLAB as a toolbox. Some whale data was analysed using the package. This resulted in a lucid display of the t ime-frequency content of the signal.

6

Acknowledgements

The author wishes to thank the those staff and students from the Signal P rocessing Research Centre who have contributed to the TFSA 5.0 package.

References [IJ B. Boashash. Methods and Applications of Time-Frequency Signal Analysis. Longman Cheshire, Melbourne, Australia, 1991. ISBN No. 582 86873 4.

[2J B. Boashash. Time-frequency signal analysis. In S. Haykin , editor, Advances in Spectral Estimation and Array Processing, volume 1 of 2, chapter 9, pages 418- 517. Prentice Hall , Englewood Cliffs, New Jersey, 1990.

[3J B. Boashash. Time-frequency analysis, present and future trends. In C. T Leondes, editor, Control and Dynamic Systems. Academic Press, 1994.

i 50

100

150

200

Figure 2: A record of whale data.

- 30 -

F... &IOlI:

"7~7

..... _ ,

w_ LM>;1I\o.7OSI':'''''''~~;;=1!!~~~ 7000 L

F

,

L...~J

Figure 3: The Choi-Williams distribut ion of the whale data.

Figure 4: The IF estimate using the peak of t he WVD.

O.Si'--~---~---~--~----' O.~5

0.'

0."

g: 0.3



r

0.25

I

0.2

,,,f~.

/

yo

oj ' .\"/

'" 0 0

1000

2000

3000

4000

SOOO

S«IO

7000

~

Figure 5: The IF estimate using t he RLS algorit hm .

- 31 -