
Hilbert Filter Coefficient Calculation
Type : Uncle Hilbert References : Posted by Christian[at]savioursofsoul[dot]de
Notes : This is the delphi code to create the filter coefficients, which are needed to phaseshift a signal by 90°
This may be useful for an evelope detector...
By windowing the filter coefficients you can trade phase response flatness with magnitude response flatness.
I had problems checking its response by using a dirac impulse. White noise works fine.
Also this introduces a latency of N/2!
Code : type TSingleArray = Array of Single;
procedure UncleHilbert(var FilterCoefficients: TSingleArray; N : Integer);
var i,j : Integer;
begin
SetLength(FilterCoefficients,N);
for i:=0 to (N div 4) do
begin
FilterCoefficients[(N div 2)+(2*i1)]:=+2/(PI*(2*i1));
FilterCoefficients[(N div 2)(2*i1)]:=2/(PI*(2*i1));
end;
end; 
Comments
There are no comments on this item 
Add your own comment
Comments are displayed in fixed width, no HTML code allowed! 



