-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexperimental.m
79 lines (64 loc) · 1.93 KB
/
experimental.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
clc;clear;close all;
% data = csvread ('D:\OneDrive - Universiti Malaysia Pahang\Atik_Home\Data Files\fyp-velocity signals\Twist_3.csv');
% y = data(1:2500,:);
load('D:\OneDrive - ump.edu.my\Atik_Home\Writing\NEEEMD\nEEEMD\Data\237.mat');
k = 6000;
y = X237_DE_time(k:k+5999,:);
num_IMF = 6;
NR = 100;
NstdMax = 0.2;
NstdMin = 0.1;
[emdIMF,residual1] = emd(y,'MaxNumIMF',num_IMF);
[eemdIMF,residual2] = eemd(y, num_IMF, NR, NstdMax, NstdMin);
[ceemdIMF,residual3] = ceemd(y, num_IMF, NR, NstdMax, NstdMin);
[neeemdIMF,residual4] = neeemd(y, num_IMF, NR, NstdMax, NstdMin);
[tk1,kc1,kes1] = tesk(emdIMF);
[tk2,kc2,kes2] = tesk(eemdIMF);
[tk3,kc3,kes3] = tesk(ceemdIMF);
[tk4,kc4,kes4] = tesk(neeemdIMF);
cor1 = corR(y,emdIMF);
cor2 = corR(y,eemdIMF);
cor3 = corR(y,ceemdIMF);
cor4 = corR(y,neeemdIMF);
cor4 = var(neeemdIMF);
a = EnergyFun(neeemdIMF);
a = normalize(cor4, 'range');
cor = [(cor2); (cor3); (cor4)]';
L = 25;
%[y_final, f_final, kurtIter] = med2d(neeemdIMF(:,1),30,[],[],'valid',1);
[~, f, y_final] = momeda(neeemdIMF(:,1),L,[1 1 1],5:0.1:300,0);
%y_final = vertcat((0*ones(1,L))', y_final);
% [~, ~, emdIMF] = momeda(emdIMF(:,1),500,[1 1 1 1 1],5:0.1:300,1);
% [~, ~, eemdIMF] = momeda(eemdIMF(:,1),500,[1 1 1 1 1],5:0.1:300,1);
% [~, ~, ceemdIMF] = momeda(ceemdIMF(:,1),500,[1 1 1 1 1],5:0.1:300,1);
fs = 12000;
xmin = 0;
xmax = 1000;
% subplot(4,1,1)
% [es1,F1] = envspectrum(y,fs);
% plot(F1,es1.*1./max(es1))
% xlim([xmin xmax])
subplot(3,1,1)
[es2,F2] = envspectrum(eemdIMF(:,1),fs);
plot(F2,es2.*1./max(es2))
xlim([xmin xmax])
subplot(3,1,2)
[es3,F3] = envspectrum(ceemdIMF(:,1),fs);
plot(F3,es3.*1./max(es3))
xlim([xmin xmax])
subplot(3,1,3)
[es4,F4] = envspectrum(y_final,fs);
plot(F4,es4.*1./max(es4))
xlim([xmin xmax])
figure(2)
subplot(3,1,1)
plot(eemdIMF(:,1))
subplot(3,1,2)
plot(ceemdIMF(:,1))
subplot(3,1,3)
plot(y_final)
sp1 = sens(emdIMF);
sp2 = sens(eemdIMF);
sp3 = sens(ceemdIMF);
sp4 = sens(neeemdIMF);
sp = [(sp2); (sp3); (sp4)]'