Bonjour,
Je constate des modifications de la phase de la TFD, calculée sous matlab avec la fonction fft(), avec et sans zero padding.
Code MATLAB : Sélectionner tout - Visualiser dans une fenêtre à part
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 clear all close all fs = 100 ; t = 0:1/fs:10-1/fs; % Time vector x = sin(2*pi*15*t) + sin(2*pi*40*t); % Signal y = fft(x); % Compute DFT of x m = abs(y); % Magnitude y(m<1e-6) = 0; p = unwrap(angle(y)); % Phase f = (0:length(y)-1)*fs/length(y); % Frequency vector figure() subplot(2,1,1) plot(f,m) title('Magnitude sans zero padding') ax = gca; ax.XTick = [15 40 60 85]; subplot(2,1,2) plot(f,p*180/pi) title('Phase sans zero padding') ax = gca; ax.XTick = [15 40 60 85]; % overlap n = length(x)*2; y = fft(x,n); m = abs(y); y(m<1e-6) = 0; p = unwrap(angle(y)); f = (0:length(y)-1)*fs/length(y); figure() subplot(2,1,1) plot(f,m) title('Magnitude avec zero padding') ax = gca; ax.XTick = [15 40 60 85]; subplot(2,1,2) plot(f,p*180/pi) title('Phase avec zero padding') ax = gca; ax.XTick = [15 40 60 85];
Il me semblait que le zero padding permettait seulement un sur-échantillonnage de la TFD et ainsi une meilleure approximation de la TF. Le problème est-il lié à l'utilisation de la fonction unwrap?
Merci de votre aide.
Partager