- lyapunovExponent: https://www.mathworks.com/help/predmaint/ref/lyapunovexponent.html
- boxcount: https://www.mathworks.com/matlabcentral/fileexchange/13063-boxcount
- correlationDimension: https://www.mathworks.com/help/predmaint/ref/correlationdimension.html
- wentropy: https://www.mathworks.com/help/wavelet/ref/wentropy.html
how to extract non-linear features like Lyapunov exponent or Fractal or correlation dimensions from an EEG signal?
조회 수: 18 (최근 30일)
이전 댓글 표시
Hi everyone,
i just started preprocessing process for applying on my EEG signal in matlab, i denoised it with 50Hz notch and [0.4 45] Hz bandpass filter, so actually, my signal has been denoised and now, its time to do feature extraction.
since its my graduation thesis, i need non-linear feature extraction such as Lyapunov exponent or Fractal or correlation dimensions and entropy but i've searched alot in youtube and learning websites but i couldn't find anything related.
is there someone who could help me?
I will be very thankful if someone could help me,
i will write my denoising code in here...
clc
clear all
close all
% -------------------------------------------------------------
% displaying the original Signal without preprocessing
% -------------------------------------------------------------
load('C:\Users\Alireza\Desktop\alireza\signal processing- payan name\data.mat')
signal1=c_memory(2,:);
clear c_baste_1; clear c_baz_1;
Fc=50;
Fs=256;
L=length(signal1);
T=1/Fs;
k=floor(L/256);
t=(0:L-1)/256;
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
f = Fs/2*linspace(0,1,NFFT/2);
fft_signal= fft(signal1,NFFT)/L;
figure;plot(f,2*abs(fft_signal(1:NFFT/2)))
title ('Noisy Signal');
xlabel('Frequency(Hz)'); ylabel('Voltage(mV)');
% ------------------------------------------------------------
% Denoising 50 Hz of Artifact
% ------------------------------------------------------------
wo = 50/(Fs/2); bw = wo/10;
[cf5,cf6] = iirnotch(wo,bw);
signal1_2=filtfilt(cf5,cf6,signal1);
fft_signal2= fft(signal1_2,NFFT)/L;
figure(2);plot(f,2*abs(fft_signal2(1:NFFT/2)))
title ('Denoising 50 Hz');
xlabel('Frequency(Hz)'); ylabel('Voltage(mV)');
% ------------------------------------------------------------
% applying [0.4 45]Hz Bandpass Filter
% ------------------------------------------------------------
f_filter = fdesign.bandpass('n,fc1,fc2',6,0.5,45,256);
Hd = design(f_filter, 'butter');
signal_filter_1=filter(Hd,signal1_2);
fft_signal_3= fft(signal_filter_1,NFFT)/L;
figure(3);plot(f,2*abs(fft_signal_3(1:NFFT/2)));
title ('Denoised Signal');
xlabel('Frequency(Hz)'); ylabel('Voltage(mV)');
clc;
% ------------------------------------------------------------
%
% ------------------------------------------------------------
댓글 수: 0
답변 (1개)
Prasanna
2024년 11월 4일 3:50
Hi Alireza,
To perform non-linear feature extraction on your EEG signal in MATLAB, you can use several methods present in various MATLAB toolboxes to obtain Lyapunov exponent, fractal dimension, correlation dimension, and entropy measures.
To extract Lyapunov experiment, you can use the Predictive Maintenance Toolbox’s ‘lyapunovExponent’ method to characterize the rate of separation of infinitesimally close trajectories.
% Example code to calculate Lyapunov Exponent
signal = signal_filter_1; % Your preprocessed signal
lyapExp = lyapunovExponent(signal, Fs);
disp(['Lyapunov Exponent: ', num2str(lyapExp)]);
To extract Fractal Dimension, you can use the ‘boxcount’ function from MATLAB file exchange to determine fractal properties of a 1D segment, 2D image or a 3D array.
% Example code to calculate Fractal Dimension
signal = signal_filter_1; % Your preprocessed signal
fd = boxcount(signal);
Similarly, the correlation dimension can be obtained by using the ‘correlationDimension’ function from the predictive maintenance toolbox to obtain a measure of chaotic signal complexity. Entropy can be obtained by using the ‘wentropy’ function from the signal processing toolbox. This function returns the normalized Shannon wavelet entropy of the signal.
Make sure to install any required toolboxes or functions from the MATLAB File Exchange if they are not already available in your MATLAB environment. For more information regarding the functions used, refer the following documentations:
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Biomedical Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!