לדלג לתוכן

קובץ:DFT approximation to Hilbert filter.png

תוכן הדף אינו נתמך בשפות אחרות.
מתוך ויקיפדיה, האנציקלופדיה החופשית

DFT_approximation_to_Hilbert_filter.png(665 × 523 פיקסלים, גודל הקובץ: 24 ק"ב, סוג MIME‏: image/png)

ויקישיתוף זהו קובץ שמקורו במיזם ויקישיתוף. תיאורו בדף תיאור הקובץ המקורי (בעברית) מוצג למטה.

תקציר

תיאור The green graph is a section of the infinitely long Hilbert transform filter impulse response. The blue graph is a shorter section, produced by the Scilab function hilb() for use as an FIR filter. hilb() apparently just applies a simple rect() window, but other windows are also possible. When the filtering (convolution) is performed by multiplication of DFTs in the frequency domain (circular convolution), people sometimes replace the DFT of hilb() with samples of the DTFT (discrete-time Fourier transform) of h[n] = 2/(πn), whose real and imaginary components are all just 0 or ±1, thereby avoiding actual multiplications. But in that case, the convolution is actually being done with the periodic summation of h[n], shown in red. Unlike hilb(), it never goes to zero, which means that the "edge effects" of circular convolution affect (distort) every output sample. They can't simply be eliminated by discarding a few corrupted samples. That effect is generally worse than the distortion caused by windowing the h[n] sequence, even with the crude rectangular window. (example)
תאריך יצירה
מקור נוצר על־ידי מעלה היצירה
יוצר Bob K
אישורים והיתרים
(שימוש חוזר בקובץ זה)
Public domain ברצוני, בעלי זכויות היוצרים על יצירה זו, לשחרר יצירה זו לנחלת הכלל. זה תקף בכל העולם.
יש מדינות שבהן הדבר אינו אפשרי על פי חוק, אם כך:
אני מעניק לכל אחד את הזכות להשתמש בעבודה זו לכל מטרה שהיא, ללא תנאים כלשהם, אלא אם כן תנאים כאלה נדרשים על פי חוק.
PNGהתפתחות 
InfoField
 
LibreOffice עם‎‎ נוצרה ה PNG תמונת מפת סיביות
Scripts
InfoField
Do it in two languages (for fun).

Scilab code

N = 512;        % DFT size
L = N/2;        % length of plots
odd = 1:2:L;

// Create a segment of the IIR filter and its periodic summation
  h_IIR = zeros(1,L);
  h_periodic = zeros(1,L);
  for n = odd
    h_IIR(n) = 2/(%pi*n);
    h_periodic(n) = 2/(N*tan(%pi*n/N));      % periodic summation
  end

// Equivalent method
// M = 2*L+1;         
// h_IIR = hilb(M);  //513-tap, FIR Hilbert transform filter
// h_IIR = h_IIR(L+2:M);

// Create a 65-tap, FIR Hilbert transform filter
  minimum_display_value = 0.0001;
  M = 65;         
  M2 = (M-1)/2;
// The next 2 statements are equivalent to the one commented out below them
  h_65 = hilb(M);
  h_65 = [h_65(M2+2:M) ones(1,L-M2)*minimum_display_value];   // align with h_IIR
//h_65 = [h_IIR(1:M2)  ones(1,L-M2)*minimum_display_value];   // align with h_IIR

// Create another filter (equivalent to h_periodic) by sampling the DTFT
  H_DFT = %i*[0 -ones(1,L-1) ones(1,L)];
  h_DFT = real(fft(H_DFT, 1));    // inverse FFT
  h_DFT = h_DFT(2:$);             // align with h_IIR

// Display the results
  r=5; g=3; b=2;  // based on a call to getcolor()
  plot2d(odd', [h_IIR(odd)' h_DFT(odd)' h_65(odd)'], logflag="nl", style=[g r b],..
        rect=[0,minimum_display_value,256,1], frameflag=1, axesflag=1);

  title("Hilbert filter (green) and two approximations", "fontsize", 4);
  ylabel("impulse response (for n > 0)", "fontsize", 3);
  xlabel("n (odd values only)", "fontsize", 3);

  a = gca();
//a.box = "on";         included in frameflag=1
  a.font_size=3;        //set the tics label font size
  a.x_ticks = tlist(["ticks", "locations", "labels"], [1 51 101 151 201 251],..
  ["1" "51" "101" "151" "201" "251"]);

// Set line thickness of plots
  a.children.children.thickness=3;

// This works too
//f = gcf();
//f.children.children.children.thickness=3;

// Can do it this way when the thicknesses are not all the same:
// pb = a.children.children(1);    // Note that the order (compared to "style") is LIFO
// pr = a.children.children(2);
// pg = a.children.children(3);
// pg.thickness = 3;
// pr.thickness = 3;       // equivalent to set(pr,'thickness',3);
// pb.thickness = 3;

Now do it in Octave.

Octave code

pkg load signal
  N = 512;        % DFT size
  L = N/2;        % length of plots
  odd = 1:2:L;

% Create a segment of the IIR filter and its periodic summation
  h_IIR = zeros(1,L);
  h_periodic = zeros(1,L);
  for n = odd
    h_IIR(n) = 2/(pi*n);
    h_periodic(n) = 2/(N*tan(pi*n/N));      % periodic summation
  endfor

% Create a 65-tap, FIR Hilbert transform filter
  minimum_display_value = 0.0001;
  M = 65;         
  M2 = (M-1)/2;
  h_65 = [h_IIR(1:M2)  ones(1,L-M2)*minimum_display_value];   % align with h_IIR

% Create another filter (equivalent to h_periodic) by sampling the DTFT
  H_DFT = i*[0 -ones(1,L-1) ones(1,L)];
  h_DFT = real(ifft(H_DFT));        % inverse FFT
  h_DFT = h_DFT(2:end);             % align with h_IIR

% Display the results
  figure
  semilogy(odd', h_IIR(odd)', 'color', 'green', 'linewidth', 2)
  hold on
% The next two statements are eqivalent
  semilogy(odd', h_DFT(odd)', 'color', 'red', 'linewidth', 2)
% semilogy(odd', h_periodic(odd)', 'color', 'red', 'linewidth', 2)

  semilogy(odd', h_65(odd)', 'color', 'blue', 'linewidth', 2)

  xlim([0 256])
  ylim([minimum_display_value 1])
  set(gca, 'xtick', [1:50:251]);

  title("Hilbert filter (green) and two approximations", "fontsize", 14);
  ylabel("impulse response (for n > 0)", "fontsize", 12);
  xlabel("n (odd values only)", "fontsize", 12);

LaTex


La bildo estas kopiita de wikipedia:en. La originala priskribo estas (The image is copied from wikipedia: en. The original description is):

date/time username edit summary source
23:55, 7 December 2005 en:User:Bob K (I created this image myself, using Matlab tools.) http://en.wikipedia.org/wiki/Image:DFT_approximation_to_Hilbert_filter.png

en:Image:DFT approximation to Hilbert filter.png

כיתובים

נא להוסיף משפט שמסביר מה הקובץ מייצג

פריטים שמוצגים בקובץ הזה

מוצג

checksum אנגלית

95ee1586c240f8bb958d25b4147898071aea7ae4

הוגדר לפי: SHA-1 אנגלית

25,042 בית

523 פיקסל

665 פיקסל

היסטוריית הקובץ

ניתן ללחוץ על תאריך/שעה כדי לראות את הקובץ כפי שנראה באותו זמן.

תאריך/שעהתמונה ממוזערתממדיםמשתמשהערה
נוכחית23:52, 28 במרץ 2015תמונה ממוזערת לגרסה מ־23:52, 28 במרץ 2015‪523 × 665‬ (24 ק"ב)Bob KThis one depicts the truncated part of the FIR filter as on the x-axis, which is slightly above zero. The actual value of the truncated part is exactly zero., of course.
23:27, 28 במרץ 2015תמונה ממוזערת לגרסה מ־23:27, 28 במרץ 2015‪518 × 659‬ (24 ק"ב)Bob KImprovements to the script caused some minor changes to the figure.
05:37, 28 במרץ 2015תמונה ממוזערת לגרסה מ־05:37, 28 במרץ 2015‪559 × 587‬ (27 ק"ב)Bob KAdd periodic summation formulation of the DFT approximation. Also, overlay an FIR approximation computed with the Scilab hilb() function. Surprisingly, it appears to be just a truncated version of the IIR function, with no windowing.
03:49, 28 בספטמבר 2007תמונה ממוזערת לגרסה מ־03:49, 28 בספטמבר 2007‪420 × 560‬ (6 ק"ב)Bob K{{Information |Description= approximation error when Hilbert transform is implemented in frequency domain |Source=self-made |Date=27-Sep-2007 |Author= Bob K }}
00:04, 19 במרץ 2006תמונה ממוזערת לגרסה מ־00:04, 19 במרץ 2006‪409 × 546‬ (6 ק"ב)MaksimLa bildo estas kopiita de wikipedia:en. La originala priskribo estas: == Summary == I created this image myself, using Matlab tools. == Licensing == {{PD-self}} {| border="1" ! date/time || username || edit summary |---- | 23:55, 7 December 2005 || [[:e

אין בוויקיפדיה דפים המשתמשים בקובץ זה.

שימוש גלובלי בקובץ

אתרי הוויקי השונים הבאים משתמשים בקובץ זה:

מטא־נתונים