1 /* ----------------------------------------------------------------------
2 * Project: CMSIS DSP Library
3 * Title: arm_hft95_f64.c
4 * Description: Floating-point (f64) Hft95 window
5 *
6 * $Date: 14 December 2022
7 * $Revision: v1.15.0
8 *
9 * Target Processor: Cortex-M and Cortex-A cores
10 * -------------------------------------------------------------------- */
11 /*
12 * Copyright (C) 2010-2022 ARM Limited or its affiliates. All rights reserved.
13 *
14 * SPDX-License-Identifier: Apache-2.0
15 *
16 * Licensed under the Apache License, Version 2.0 (the License); you may
17 * not use this file except in compliance with the License.
18 * You may obtain a copy of the License at
19 *
20 * www.apache.org/licenses/LICENSE-2.0
21 *
22 * Unless required by applicable law or agreed to in writing, software
23 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
24 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 * See the License for the specific language governing permissions and
26 * limitations under the License.
27 */
28
29 #include "dsp/window_functions.h"
30 #include "dsp/fast_math_functions.h"
31 #include <math.h>
32 /**
33 @ingroup groupWindow
34 */
35
36
37
38
39 /**
40 @addtogroup WindowFlat
41 @{
42 */
43
44
45 /**
46 @ingroup WindowHFT95
47 */
48
49 /**
50 @brief Hft95 window generating function (f64).
51 @param[out] pDst points to the output generated window
52 @param[in] blockSize number of samples in the window
53
54 @par Parameters of the window
55
56 | Parameter | Value |
57 | ------------------------------------: | -----------------: |
58 | Peak sidelobe level | 95.0 dB |
59 | Normalized equivalent noise bandwidth | 3.8112 bins |
60 | 3 dB bandwidth | 3.7590 bins |
61 | Flatness | 0.0044 dB |
62 | Recommended overlap | 75.6 % |
63
64 Included in CMSIS-DSP with authorization from professor
65 Gerhard Heinzel.
66
67 @par Original article:
68 Spectrum and spectral density estimation by the Discrete Fourier
69 transform (DFT), including a comprehensive list of window
70 functions and some new
71 flat-top windows.
72
73 @par Authors:
74 G. Heinzel, A. Rudiger and R. Schilling,
75 Max-Planck-Institut fur Gravitationsphysik
76 (Albert-Einstein-Institut)
77 Teilinstitut Hannover
78 */
79
80
81
arm_hft95_f64(float64_t * pDst,uint32_t blockSize)82 ARM_DSP_ATTRIBUTE void arm_hft95_f64(
83 float64_t * pDst,
84 uint32_t blockSize)
85 {
86 float64_t k = 2. / ((float64_t) blockSize);
87 float64_t w;
88
89 for(uint32_t i=0;i<blockSize;i++)
90 {
91 w = PI_F64 * (i * k);
92 w =
93 (1.0 -
94 1.9383379 * cos (w) +
95 1.3045202 * cos (2 * w) -
96 0.4028270 * cos (3 * w) + 0.0350665 * cos (4 * w));
97
98
99 pDst[i] = w;
100 }
101 }
102
103 /**
104 @} end of WindowFlat group
105 */
106
107