Extended tecdat|matlab uses empirical mode decomposition EMD to denoise the signal

Time:2021-12-8

Original link:http://tecdat.cn/?p=12486

Original source:Tuo end data tribal official account


Variable modulus decomposition of dial tone signal

Create a signal sampled at 4 kHz, similar to all keys for making a digital phone call. Save signal as MATLAB ® Time data.

fs = 4e3;
t = 0:1/fs:0.5-1/fs;

Draw the variational modal decomposition of the schedule.

Extended tecdat|matlab uses empirical mode decomposition EMD to denoise the signal

VMD of multicomponent signal

A multi-component signal consisting of three sine waves with frequencies of 2 Hz, 10 Hz and 30 Hz is generated. The sine wave is sampled at 1 kHz for 2 seconds. Embed the signal with a variance of 0.01 ² In Gaussian white noise.

Calculate the IMF of noise signals and visualize them in 3-D diagram.

plot3(p,q,imf)
grid on
xlabel('Time Values')
ylabel('Mode Number')
zlabel('Mode Amplitude')

Extended tecdat|matlab uses empirical mode decomposition EMD to denoise the signal

The Hilbert spectrum of multi-component signal is plotted using the calculated IMF. Limit the frequency range to [0, 40] Hz.

Extended tecdat|matlab uses empirical mode decomposition EMD to denoise the signal

VMD of segmented signal

Generate a piecewise composite signal composed of quadratic trend, linear frequency modulation signal and cosine_ t_  = At 0.5, a sharp transition occurs between two constant frequencies   。

x(t)= 6t2 + cos(4πt+10πt2)+ {cos(60πt),cos(100πt-10π),t≤0.5,t> 0.5。

The signal is sampled at 1 kHz for 1 second. Plot each individual component and composite signal.

plot(t,6*t.^2)
xlabel('Time (s)')
ylabel('Quadratic trend')

nexttile(5,\[1 2\])
plot(t,x)
xlabel('Time (s)')
ylabel('Signal')

Extended tecdat|matlab uses empirical mode decomposition EMD to denoise the signal

A variational modal decomposition is performed to calculate four eigenmode functions. Four different components of the signal are recovered.

The signal is reconstructed by adding mode function and residual. Draw and compare the original signal and reconstructed signal.

plot(t,x,':','LineWidth',2)
xlabel('Time (s)')
ylabel('Signal')
hold off
legend('Reconstructed signal','Original signal', ...
       'Location','northwest')

Extended tecdat|matlab uses empirical mode decomposition EMD to denoise the signal

Calculate the norm of the difference between the original signal and the reconstructed signal.

Removing noise from ECG signal using VMD

In this example, the labeled signal is from the MIT-BIH arrhythmia database     (signal processing toolbox). The signals in the database are sampled at 360 Hz.

The MIT database signal corresponding to the record 200 is loaded and plotted.

plot(tm,ecgsig)
ylabel('Time (s)')
xlabel('Signal')

Extended tecdat|matlab uses empirical mode decomposition EMD to denoise the signal

The ECG signal contains spikes driven by the rhythm of the heartbeat and the low-frequency mode of oscillation. Different spokes of ECG will produce important high-order harmonics.

Nine inherent mode functions of windowed signal are calculated to visualize IMF.

Extended tecdat|matlab uses empirical mode decomposition EMD to denoise the signal

The first mode contains the most noise, and the second mode oscillates at the frequency of the heartbeat. By adding all modes except the first and last VMD modes, a clean ECG signal is constructed to discard the low-frequency baseline oscillation and most of the high-frequency noise.

Extended tecdat|matlab uses empirical mode decomposition EMD to denoise the signal


Extended tecdat|matlab uses empirical mode decomposition EMD to denoise the signal

reference

1.Matlab uses empirical mode decomposition EMD to denoise the signal

2.Partial least squares regression (PLSR) and principal component regression (PCR) in MATLAB

3.Matlab uses Hampel filter to remove outliers

4.Matlab predicts arma-garch conditional mean and variance model

5.Matlab uses copula simulation to optimize market risk

6.Matlab measures and calculates the similarity of signals

7.Deep learning using Bayesian Optimization in MATLAB

8.Matlab uses moving average filter, resampling and Hampel filter for signal smoothing

9.Matlab implementation of Markov switching ARMA – GARCH model estimation of MCMC