1 /* ----------------------------------------------------------------------
2 * Project: CMSIS DSP Library
3 * Title: arm_hft116d_f64.c
4 * Description: Floating-point (f64) Hft116d 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 /**
34 @ingroup groupWindow
35 */
36
37
38
39
40 /**
41 @addtogroup WindowFlat
42 @{
43 */
44
45
46 /**
47 @ingroup WindowHFT116D
48 */
49
50 /**
51 @brief Hft116d window generating function (f64).
52 @param[out] pDst points to the output generated window
53 @param[in] blockSize number of samples in the window
54 @return none
55
56 @par Parameters of the window
57
58 | Parameter | Value |
59 | ------------------------------------: | -----------------: |
60 | Peak sidelobe level | 116.8 dB |
61 | Normalized equivalent noise bandwidth | 4.2186 bins |
62 | 3 dB bandwidth | 4.1579 bins |
63 | Flatness | -0.0028 dB |
64 | Recommended overlap | 78.2 % |
65
66 Included in CMSIS-DSP with authorization from professor
67 Gerhard Heinzel.
68
69 @par Original article:
70 Spectrum and spectral density estimation by the Discrete Fourier
71 transform (DFT), including a comprehensive list of window
72 functions and some new
73 flat-top windows.
74
75 @par Authors:
76 G. Heinzel, A. Rudiger and R. Schilling,
77 Max-Planck-Institut fur Gravitationsphysik
78 (Albert-Einstein-Institut)
79 Teilinstitut Hannover
80 */
81
82
83
arm_hft116d_f64(float64_t * pDst,uint32_t blockSize)84 void arm_hft116d_f64(
85 float64_t * pDst,
86 uint32_t blockSize)
87 {
88 float64_t k = 2. / ((float64_t) blockSize);
89 float64_t w;
90
91 for(uint32_t i=0;i<blockSize;i++)
92 {
93 w = PI_F64 * (i * k);
94 w =
95 (1.0 -
96 1.9575375 * cos (w) +
97 1.4780705 * cos (2 * w) -
98 0.6367431 * cos (3 * w) +
99 0.1228389 * cos (4 * w) - 0.0066288 * cos (5 * w));
100
101 pDst[i] = w;
102 }
103 }
104
105 /**
106 @} end of WindowFlat group
107 */
108
109