Seizure prediction system(SPS)can predict ongoing seizure online,and then launch alarm in advance,which is important for preventing Sudden Unexpected Death in Epilepsy and building Epilepsy Diary automatically.Electroencephalogram(EEG)can reflect the electrophysiological activity of brain nerve cells during epileptic seizure,which is considered to be the most powerful tool in the diagnosis and treatment of epilepsy.In this context,EEG-based SPS has become the frontier research in the field of epilepsy diagnosis and treatment,the prerequisite for whose successful implementation mainly depends on the low-power and low-latency hardware implementation of high-precision seizure prediction algorithm(SPA).However,the existing research for SPS mainly concentrated on the SPA development,while little attention was paid to the hardware implementation.Thus,this thesis mainly focuses on the algorithm design and hardware implementation of EEG-based SPS.The main contributions and innovations are listed as below:(1)To suppress the noise in EEG while preserving detailed information,the EEG denoising technique(EDT)based on fractional wavelet transform has been proposed.First,the fractional Fourier transform is employed to suppress the time-frequency coupling of EEG and noise,in which the optimal order is obtained by particle swarm optimization.Second,the wavelet threshold denoising technique is used to suppress the noise information in high-frequency component,whose key parameters are determined by composite denoising evaluation index.Experimental results show that the proposed technique can improve the average signal-to-noise ratio(SNR)by 29.41 d B compared to the traditional wavelet threshold denoising technique.(2)To reduce computational complexity while guaranteeing the prediction accuracy,the hardware-friendly SPA has been investigated.The channel selection algorithm based on maximum relevance minimum redundancy and the criteria of area under curve(AUC)maximization has been proposed to reduce the number of channels.Then,the resampling algorithm based on synthetic minority over-sampling technique(SMOTE)and Tomek Link is introduced to overcome the imbalanced classification problem of epileptic EEG.Also,the classification prediction model based on long short-term memory(LSTM)network and gate recurrent unit(GRU)is designed.Furthermore,the post-processing model using a five-minute non-overlapping sliding window is constructed.Experimental results show that the segment-based evaluation indexes can achieve balanced performance with sensitivity of 90.86%,specificity of 90.99% and AUC of 0.91.Meanwhile,the event-based evaluation indexes can meet the requirements of low false prediction rate(FPR)and high prediction accuracy,with prediction rate of 95.83%,FPR of 0.0766/h and prediction time up to 50 min.(3)To achieve high-performance hardware deployment for SPA,the hardware implementation method of SPS based on field programmable gate array(FPGA)has been proposed.The IP core for EDT and feature extraction algorithm based on the theory of time-frequency analysis is designed,including the modules of radix-2 Fast Fourier Transform with different points,wavelet decomposition,threshold denoising and wavelet reconstruction.Also,the IP core for classification prediction model is designed based on high-level synthesis for machine learning(HLS4ML).Moreover,the parameter definition of 32-bit floating-point format and optimization instruction of loop structure and array are used to simplify the operation logic and reduce the storage resources.Finally,the overall hardware structure and DDR3 control module are designed by using state transfer diagram.Experimental results show that the total latency and power consumption of seizure prediction circuit are 26.496 ms and 2.663 W,respectively.The human-computer interaction software is designed by using application development framework,and then the test platform for SPS is built.The testing results show that the proposed hardware-software co-design method has the advantages of high prediction accuracy,low power consumption,low latency and low FPR,which lays a solid foundation for future clinical application of SPS. |