1 Introduction

The diagnosis of epilepsy relies mainly on clinical history, and EEG can be used as a valuable diagnostic tool. This paper selects the DSP chip development platform based on TI's TMS320C54X series. With the advantages of DSP fast data processing, wavelet transform is performed on epileptic EEG signals, then small-scale (high-frequency) components are filtered out, large-size (low-frequency) components are retained, and the processed signals are reconstructed. The implementation process is shown in Figure 1.

2 Discrete wavelet transform algorithm

A breakthrough result of the discrete wavelet transform is the fast algorithm proposed by S. Mallat in 1989 on the basis of multi-resolution analysis - the Mallat algorithm [2]. The role of Mallat algorithm in wavelet analysis is equivalent to the role of Fast Fourier Transform (FFT) in Fourier analysis. It marks that wavelet analysis has embarked on a wide application field. The Mallat algorithm, also known as the tower algorithm, decomposes and reconstructs the signal by wavelet filters H, G and h, g [3]. The decomposition algorithm is:

Where t is a discrete time series number, t=1, 2,..., N; f(t) is the original signal; j is the number of layers or wavelet scale, j=1, 2,..., J, J=log2N; H, G

The wavelet decomposition filter in the time domain is actually the filter coefficient; Aj is the wavelet coefficient of the approximating part of the signal f(t) in the jth layer (ie, the low frequency component); Dj is the signal f(t) in the jth The wavelet coefficient of the detail part of the layer (ie the high frequency part).

The meaning of equation (1) is: assume that the detected discrete signal f(t) is A. The signal, the signal f(t) is in the approximate part of the 2jth scale (jth layer), that is, the wavelet coefficient Aj of the low frequency part is the wavelet coefficient Aj-1 passing through the approximating part of the 2j-1 scale (j-1th layer) Convolution with filter H, and then the result of the convolution is sampled; and the signal f(t) is in the detail part of the 2jth scale (jth layer), that is, the wavelet coefficient Dj of the high frequency part is passed through the 2j The wavelet coefficients of the approximating portion of the -1 scale (the j-1th layer) are convoluted with the decomposition filter G, and then the result of the convolution is sampled at intervals.

By decomposition of equation (1), the signal f(t) is decomposed into an approximate partial wavelet coefficient Aj (on the low frequency subband) and a detail portion of the wavelet coefficient D on each scale 2j (or on the jth layer), (on the high frequency sub-band).

The reconstruction algorithm is:

In the formula, j is the number of layers to be decomposed. If the highest layer of decomposition is the depth of decomposition, then j=J-1, J-2,...,1,0;h,g is the wavelet reconstruction in the time domain. The filter is actually the filter coefficient.

The meaning of equation (2) is: the wavelet coefficient of the approximate portion of the signal f(t) at the 2jth scale (jth layer), that is, the wavelet coefficient Aj of the low frequency portion is passed through the 2j+1 scale (j+1th layer) The wavelet coefficient Aj+1 of the approximating part is interpolated with the reconstructed filter h and the wavelet coefficient Dj+1 of the detail part of the 2j+1th scale (j+1th layer) is inserted and zeroed. The reconstruction filter g is convolved and then summed. This process is repeated until the 2° scale, and the reconstructed signal is obtained.

3 DSP implementation of wavelet transform

3.1 Input and output of EEG signals on CCS 2.2

CCS 2.2 (Code Composer Studio) is an integrated development environment (IDE) for TI's standard TMS320 debug interface. With CCS integrated development environment, users can complete project definition, program editing, compile link, debug and data analysis. Waiting for the work link [4]. We use decimal hexadecimal numbers to represent decimal floating-point numbers, which are implemented in C language.

Then use File->Load Data in CCS to import the hexadecimal data into the corresponding memory of the DSP.

In turn, the data processed by the DSP is saved in the form of a text file using CCS data export File->Save, and then the C language is used to inversely transform the data, and the two hexadecimal numbers are converted into decimal floating point numbers.

The result array is a decimal floating point type, and the origin array is a hexadecimal floating point type.

HOT SALE

HOT SALE,All In One Pc,All In One Pc Gaming,All In One Pc As Monitor,All In One Pc For Business

Guangzhou Bolei Electronic Technology Co., Ltd. , https://www.nzpal.com