Bruger:Peh-herlev/sandkasse-Vinduesfunktion

Type af matematiske funktioner som typisk anvendes inden for signalbehandling. Vinduesfunktioner bruges sammen med signaler i tidsdomæne (Som signalet ser ud på et Oscilloskop).


Vinduesfunktionen kan anvendes ved konstruktionen af digitale filtre og ved beregning af frekvensindhold af et signal fouriertransformation (DFT, FFT).

Ved at tilføje (multiplicere) en vinduesfunktion på et signal tilfører man vinduesfunktionens frekvens respons og bestemmer derved selektiviteten og side-”laper” (engelsk lobs). For at forstå konsekvensen af vinduesfunktionen er man nødt til at forstå sammenhænget mellem enhedsrespons og frekvensindhold (Laplacetransformation).


Vinduesfunktionseksempler redigér

Terminology:

  •   Repræsenterer bredden, i samples, i et diskrete tids system. Når N er et ulige antal, vil et ikke fladt vindue have et enkelt toppunkt. Når N er lige, har det et dobbelt toppunkt.
  • Hver figur tekst inkluderer tidsfunktionen, den resulterende frekvens respons og ækvivalente støjbåndbredden (B), i DFT bins enheder.


Rektangulærlvindue redigér

 
Rectangular-vindue; B=1.00

Det rektangulærlvindue kaldes sometider også for Diracs deltafunktion. Det har værdien 1 for alle værdier fra n=0 til n=N. For værdier af n < 0 eller n > N er værdien 0.

 


Trekant-vindue redigér

 
Bartlett-vindue; B=1.33

Trekant-vindue med nul i enderne:

 


 
Triangular-vindue; B=1.33

Uden nul i enderne:

 


Hanning-vinduet (Hann-vindue) redigér

 
Hanning vindue; frekvens respons

Hanning-vinduet (eller Hanning vinduesfunktion) er en matematisk funktion der bruges indenfor digital signalbehandling. Den er opkaldt efter Julius Ferdinand von Hann. Dets matematisk form er

 [notes 1]


Hamming-vinduet redigér

 
Hamming-vindue; B=1,37.

Hamming-vinduet (eller Hamming vinduesfunktion) er en matematisk funktion der bruges indenfor digital signalbehandling. Den er opkaldt efter amerikaneren Richard Hamming. Dets matematisk form er

 

Hanning-vinduet er en funktion der har næsten sammen matematisk form, mens andre vinduesfunktioner er det rektangulære vindue, det triangulære vindue og Kaiser-vinduet. I forhold til det rektangulære og det triangulære vindue har Hamming-vinduet forholdsvis små "sidelapper" (engelsk: side lobes).

Tukey-vinduer redigér

 
Tukey-vindue, α=0.5; B=1.22

 

Tukey-vinduer,[1][2] også kendt som tapered cosine window, kan betragtes som et Hanning-vindue med breden   som er kombineret med et Rektangulærlvindue med breden    Ved α=0 bliver til det et Rektangulærlvindue, og ved α=1 bliver det et Hanning-vindue.

Cosine-vinduet redigér

 
Cosine-vindue; B=1.23
  [note 1]
  • også kendt som sine window
  • cosine-vindue  


Lanczos-vinduet redigér

 
Sinc eller Lanczos-vindue; B=1.30
 
  • brugt i [Lanczos resampling]
  • for Lanczos-vinduet, sinc(x) er defineret som sin(πx)/(πx)
  • også kendt som sinc window, fordi :
  is the main lobe of a normalized [sinc function]


Gaussian-vinduer redigér

 
Gauss-vindue, σ=0.4; B=1.45

The frequency response of a Gaussian is also a Gaussian (it is an eigenfunction of the Fourier Transform). Since the Gaussian function extends to infinity, it must either be truncated at the ends of the window, or itself windowed with another zero-ended window.[3]

Since the log of a Gaussian produces a parabola, this can be used for exact quadratic interpolation in frequency estimation.[4][5][6]

 
 



Bartlett–Hann window redigér

 
Bartlett-Hann window; B=1.46
 
 


Blackman windows redigér

 
Blackman window; α = 0.16; B=1.73

Blackman windows are defined as:[note 1]

 
 

By common convention, the unqualified term Blackman window refers to α=0.16.


Kaiser windows redigér

 
Kaiser window, α =2; B=1.5
 
Kaiser window, α =3; B=1.8
  Hovedartikel: Kaiser window.

A simple approximation of the DPSS window using Bessel functions, discovered by Jim Kaiser.[7][8]

 

where   is the zero-th order modified Bessel function of the first kind, and usually  .

  • Note that:
 


Low-resolution (high-dynamic-range) windows redigér

Nuttall window, continuous first derivative redigér

 
Nuttall window, continuous first derivative; B=2.02
  [note 1]
 


Blackman–Harris window redigér

 
Blackman–Harris window; B=2.01

A generalization of the Hamming family, produced by adding more shifted sinc functions, meant to minimize side-lobe levels[9][10]

  [note 1]
 


Blackman–Nuttall window redigér

 
Blackman–Nuttall window; B=1.98
  [note 1]
 


Flat top window redigér

 
Flat top window; B=3.77
  [note 1]
 


Hann-Poisson window redigér

A Hann window multiplied by a Poisson window, which has no side-lobes, in the sense that the frequency response drops off forever away from the main lobe. It can thus be used in hill climbing algorithms like Newton's method.[11]

Exponential or Poisson window redigér

 
Exponential window, τ=N/2, B=1.08
 
Exponential window, τ=(N/2)/(60/8.69), B=3.46

The Poisson window, or more generically the exponential window increases exponentially towards the center of the window and decreases exponentially in the second half. Since the exponential function never reaches zero, the values of the window at its limits are non-zero (it can be seen as the multiplication of an exponential function by a rectangular window [12]). It is defined by

 

where   is the time constant of the function. The exponential function decays as e = 2.71828 or approximately 8.69 dB per time constant.[13] This means that for a targeted decay of D dB over half of the window length, the time constant   is given by

 



Comparison of windows redigér

When selecting an appropriate window function for an application, this comparison graph may be useful. The frequency axis has units of FFT "bins" when the window of length N is applied to data and a transform of length N is computed. For instance, the value at frequency ½ "bin" (third tick mark) is the response that would be measured in bins k and k+1 to a sinusoidal signal at frequency k+½. It is relative to the maximum possible response, which occurs when the signal frequency is an integer number of bins. The value at frequency ½ is referred to as the maximum scalloping loss of the window, which is one metric used to compare windows. The rectangular window is noticeably worse than the others in terms of that metric.

Other metrics that can be seen are the width of the main lobe and the peak level of the sidelobes, which respectively determine the ability to resolve comparable strength signals and disparate strength signals. The rectangular window (for instance) is the best choice for the former and the worst choice for the latter. What cannot be seen from the graphs is that the rectangular window has the best noise bandwidth, which makes it a good candidate for detecting low-level sinusoids in an otherwise white noise environment. Interpolation techniques, such as zero-padding and frequency-shifting, are available to mitigate its potential scalloping loss.

Overlapping windows redigér

When the length of a data set to be transformed is larger than necessary to provide the desired frequency resolution, a common practice is to subdivide it into smaller sets and window them individually. To mitigate the "loss" at the edges of the window, the individual sets may overlap in time. See Welch method of power spectral analysis and the Modified discrete cosine transform.


Vindue funktion og fouriertransformation redigér

En hoved anvendelse for vinduesfuntioner er sammen med fouriertransformation, uanset om det drejer sig om diskret fouriertransformation (FFT / DFT).

Illustration af Hanning-vindue ganget på signal før FFT funktion.  

Tabel over vindues-funktioner redigér

En given vindues-funktion påvirker det beregnet spektrum.

Oversigt over sammenhæng mellem vindues-funktion og selektivitet
Vidues-funktion højeste
"sidelapper"
(lobes)
[dB]
"sidelapper"
fald
[dB/okt]
Forstærkning
[bin]
Støjbåndbrede
[bin]
(-3dB)
båndbrede
[bin]
(-6dB)
båndbrede
[bin]
Retangulær -13 -6 1.0 1.0 0.89 1.21
Trekant -27 -12 0.5 1.33 1.28 1.78
Cos -23 -12 0.64 1.23 1.20 1.65
Hanning (Cos^2) -32 -18 0.5 1.50 1.44 2.00
Cos^3 -39 -24 0.42 1.73 1.66 2.32
Cos^4 -47 -30 0.38 1.94 1.86 2.59
Hamming -43 -6 0.54 1.36 1.30 1.81
Riesz -21 -12 0.67 1.20 1.16 1.59
Riemann -26 -12 0.59 1.30 1.26 1.74
De La Valle-poussin -53 -24 0.38 1.92 1.82 2.55
Tukey a = 0.25
a = 0.50
a = 0.75
-14
-15
-19
-18
-18
-18
0.88
0.75
0.63
1.10
1.22
1.36
1.01
1.15
1.31
1.38
1.57
1.80
Bohman -46 -24 0.41 1.79 1.71 2.38
Poisson a = 2.0
a = 3.0
a = 4.0
-19
-24
-31
-6
-6
-6
0.44
0.32
0.25
1.30
1.85
2.08
1.21
1.15
1.75
1.69
2.08
2.58
Hanning-
poisson
a=0.5
a=1.0
a=2.0
-35
-39
NONE
-18
-18
-18
0.43
0.38
0.29
1.61
1.73
2.02
1.54
1.64
a.87
2.14
2.30
2.65
Cauchy a=3.0
a=4.0
a=5.0
-31
-35
-30
-6
-6
-6
0.42
0.33
0.28
1.48
1.76
2.06
1.34
1.50
1.68
1.90
2.20
2.53
Gaussian a=2.5
a=3.0
a=3.5
-42
-55
-69
-6
-6
-6
0.51
0.43
0.37
1.39
1.64
1.90
1.33
1.55
1.79
1.86
2.18
2.52
Dolph-
Chebyshev
a=2.5
a=3.0
a=3.5
a=4.0
-50
-60
-70
-80
0
0
0
0
0.53
0.48
0.45
0.42
1.39
1.51
1.62
1.73
1.33
1.44
1.55
1.65
1.85
2.01
2.17
2.31
Kaisser-
Bessel
a=2.0
a=2.5
a=3.0
a=3.5
-46
-57
-69
-82
-6
-6
-6
-6
0.49
0.44
0.40
0.37
1.50
1.65
1.80
1.93
1.43
1.57
1.71
1.83
1.99
2.20
2.39
2.57

[1]

Eksterne henvisninger redigér

  1. ^ a b Harris, Fredric j. (jan. 1978). "On the use of Windows for Harmonic Analysis with the Discrete Fourier Transform" (PDF). Proceedings of the IEEE. 66 (1): 51-83. doi:10.1109/PROC.1978.10837. {{cite journal}}: Cite har en ukendt tom parameter: |coauthors= (hjælp)CS1-vedligeholdelse: Dato automatisk oversat (link) Article on FFT windows which introduced many of the key metrics used to compare windows.
  2. ^ Tukey, J.W. (1967). "An introduction to the calculations of numerical spectrum analysis". Spectral Analysis of Time Series: 25-46.
  3. ^ https://ccrma.stanford.edu/~jos/sasp/Gaussian_Window_Transform.html
  4. ^ https://ccrma.stanford.edu/~jos/sasp/Matlab_Gaussian_Window.html
  5. ^ https://ccrma.stanford.edu/~jos/sasp/Quadratic_Interpolation_Spectral_Peaks.html
  6. ^ https://ccrma.stanford.edu/~jos/sasp/Gaussian_Window_Transform_I.html
  7. ^ https://ccrma.stanford.edu/~jos/sasp/Kaiser_Window.html
  8. ^ https://ccrma.stanford.edu/~jos/sasp/Kaiser_DPSS_Windows_Compared.html
  9. ^ https://ccrma.stanford.edu/~jos/sasp/Blackman_Harris_Window_Family.html
  10. ^ https://ccrma.stanford.edu/~jos/sasp/Three_Term_Blackman_Harris_Window.html
  11. ^ https://ccrma.stanford.edu/~jos/sasp/Hann_Poisson_Window.html
  12. ^ Smith, Julius O. III (April 23), Spectral Audio Signal Processing, hentet November 22, 2011 {{citation}}: Tjek datoværdier i: |date= og |year= / |date= mismatch (hjælp)
  13. ^ Gade, Svend; Herlufsen, Henrik (1987). "Technical Review No 3-1987: Windows to FFT analysis (Part I)" (PDF). Brüel & Kjær. Hentet november 22, 2011.{{cite web}}: CS1-vedligeholdelse: Dato automatisk oversat (link)

Noter redigér

  1. ^ Vinduer med formen:
     
    har kun 2K+1 ikke-nul DFT koefficienter, hvilket gør dem gode valg for applikationer der kræver windowing by convolution in the frequency-domain. I de applikationer er DFT af den vinduesløse data vektor påkrævet til et andet formål end ved spektralanalyse.
 Spire
Denne artikel om matematik er en spire som bør udbygges. Du er velkommen til at hjælpe Wikipedia ved at udvide den.



Fodnotefejl: <ref>-tags eksisterer for en gruppe betegnet "note", men der blev ikke fundet et tilsvarende {{reflist|group="note"}}, eller et afsluttende </ref>-tag mangler