Lines Matching full:the

12  * Licensed under the Apache License, Version 2.0 (the License); you may
13 * not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
19 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
31 * This user manual describes the CMSIS DSP software library,
34 * The library is divided into a number of functions each covering a specific category:
46 * The library has separate functions for operating on 8-bit integers, 16-bit integers,
49 * Using the Library
52 …* The library installer contains prebuilt versions of the libraries in the <code>Lib</code> folder.
73 …* The library functions are declared in the public file <code>arm_math.h</code> which is placed in…
74 …imply include this file and link the appropriate library in the application and begin calling the
81 * The library ships with a number of examples which demonstrate how to use the library functions.
86 * The library has been developed and tested with MDK version 5.14.0.0
87 …* The library is being tested in GCC and IAR toolchains and updates on this activity will be made …
89 * Building the Library
92 …* The library installer contains a project file to rebuild libraries on MDK toolchain in the <code…
96 …* The libraries can be built by opening the arm_cortexM_math.uvprojx project in MDK-ARM, selecting…
105 …* Define macro ARM_MATH_BIG_ENDIAN to build the library for big endian targets. By default library…
109 * Define macro ARM_MATH_MATRIX_CHECK for checking on the input and output sizes of matrices
121 * Define macro ARM_MATH_NEON to enable Neon versions of the DSP functions.
123 * dependent on the compiler and target architecture.
129 * performances than the scalar versions.
135 … * The following files relevant to CMSIS-DSP are present in the <b>ARM::CMSIS</b> Pack directories:
140 …* |\b CMSIS\\DSP\\Examples | Example projects demonstrating the usage of the library func…
160 * As compared to most of the other functions in the CMSIS math library, the fast math functions
169 * The data in the complex arrays is stored in an interleaved fashion
171 * In the API functions, the number of samples in a complex array refers
172 * to the number of complex values; the array contains twice this number of
184 * The functions operate on matrix data structures. For example,
185 * the type
186 * definition for the floating-point matrix structure is shown
191 * uint16_t numRows; // number of rows of the matrix.
192 * uint16_t numCols; // number of columns of the matrix.
193 * float32_t *pData; // points to the data of the matrix.
198 * The structure specifies the size of the matrix and then points to
199 * an array of data. The array is of size <code>numRows X numCols</code>
200 * and the values are arranged in row order. That is, the
209 * The initialization function sets the values of the internal structure fields.
214 * Use of the initialization function is optional. However, if initialization function is used
215 * then the instance structure cannot be placed into a const data section.
216 * To place the instance structure in a const data
217 * section, manually initialize the data structure. For example:
223 * where <code>nRows</code> specifies the number of rows, <code>nColumns</code>
224 * specifies the number of columns, and <code>pData</code> points to the
228 * By default all of the matrix functions perform size checking on the input and
229 * output matrices. For example, the matrix addition function verifies that the
230 * two input matrices and the output matrix all have the same number of rows and
231 * columns. If the size check fails the functions return:
235 * Otherwise the functions return
240 * The matrix size checking is enabled via the \#define
244 * within the library project settings. By default this macro is defined
245 * and size checking is enabled. By changing the project settings and
246 * undefining this macro size checking is eliminated and the functions
247 * run a bit faster. With size checking disabled the functions always
372 * @brief Error status returned by some functions in the library.
380 … ARM_MATH_SIZE_MISMATCH = -3, /**< Size of matrices is not compatible with the operation */
581 But for MSVC compiler it is a bit special. The goal is very specific
582 to CMSIS-DSP and only to allow the use of this library from other
1195 * @brief Instance structure for the Q7 FIR filter.
1199 uint16_t numTaps; /**< number of filter coefficients in the filter. */
1200 …q7_t *pState; /**< points to the state variable array. The array is of length numTaps+b…
1201 …const q7_t *pCoeffs; /**< points to the coefficient array. The array is of length numTap…
1205 * @brief Instance structure for the Q15 FIR filter.
1209 uint16_t numTaps; /**< number of filter coefficients in the filter. */
1210 …q15_t *pState; /**< points to the state variable array. The array is of length numTaps+…
1211 …const q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTa…
1215 * @brief Instance structure for the Q31 FIR filter.
1219 uint16_t numTaps; /**< number of filter coefficients in the filter. */
1220 …q31_t *pState; /**< points to the state variable array. The array is of length numTaps+…
1221 …const q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTa…
1225 * @brief Instance structure for the floating-point FIR filter.
1229 uint16_t numTaps; /**< number of filter coefficients in the filter. */
1230 …float32_t *pState; /**< points to the state variable array. The array is of length numTaps+bloc…
1231 …const float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. …
1235 * @brief Processing function for the Q7 FIR filter.
1236 * @param[in] S points to an instance of the Q7 FIR filter structure.
1237 * @param[in] pSrc points to the block of input data.
1238 * @param[out] pDst points to the block of output data.
1248 * @brief Initialization function for the Q7 FIR filter.
1249 * @param[in,out] S points to an instance of the Q7 FIR structure.
1250 * @param[in] numTaps Number of filter coefficients in the filter.
1251 * @param[in] pCoeffs points to the filter coefficients.
1252 * @param[in] pState points to the state buffer.
1263 * @brief Processing function for the Q15 FIR filter.
1264 * @param[in] S points to an instance of the Q15 FIR structure.
1265 * @param[in] pSrc points to the block of input data.
1266 * @param[out] pDst points to the block of output data.
1276 * @brief Processing function for the fast Q15 FIR filter (fast version).
1277 * @param[in] S points to an instance of the Q15 FIR filter structure.
1278 * @param[in] pSrc points to the block of input data.
1279 * @param[out] pDst points to the block of output data.
1289 * @brief Initialization function for the Q15 FIR filter.
1290 * @param[in,out] S points to an instance of the Q15 FIR filter structure.
1291 …* @param[in] numTaps Number of filter coefficients in the filter. Must be even and greater …
1292 * @param[in] pCoeffs points to the filter coefficients.
1293 * @param[in] pState points to the state buffer.
1295 * @return The function returns either
1307 * @brief Processing function for the Q31 FIR filter.
1308 * @param[in] S points to an instance of the Q31 FIR filter structure.
1309 * @param[in] pSrc points to the block of input data.
1310 * @param[out] pDst points to the block of output data.
1320 * @brief Processing function for the fast Q31 FIR filter (fast version).
1321 * @param[in] S points to an instance of the Q31 FIR filter structure.
1322 * @param[in] pSrc points to the block of input data.
1323 * @param[out] pDst points to the block of output data.
1333 * @brief Initialization function for the Q31 FIR filter.
1334 * @param[in,out] S points to an instance of the Q31 FIR structure.
1335 * @param[in] numTaps Number of filter coefficients in the filter.
1336 * @param[in] pCoeffs points to the filter coefficients.
1337 * @param[in] pState points to the state buffer.
1348 * @brief Processing function for the floating-point FIR filter.
1349 * @param[in] S points to an instance of the floating-point FIR structure.
1350 * @param[in] pSrc points to the block of input data.
1351 * @param[out] pDst points to the block of output data.
1361 * @brief Initialization function for the floating-point FIR filter.
1362 * @param[in,out] S points to an instance of the floating-point FIR filter structure.
1363 * @param[in] numTaps Number of filter coefficients in the filter.
1364 * @param[in] pCoeffs points to the filter coefficients.
1365 * @param[in] pState points to the state buffer.
1376 * @brief Instance structure for the Q15 Biquad cascade filter.
1380 …int8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numSta…
1381 …q15_t *pState; /**< Points to the array of state coefficients. The array is of length 4…
1382 …const q15_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5…
1387 * @brief Instance structure for the Q31 Biquad cascade filter.
1391 …uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numSta…
1392 …q31_t *pState; /**< Points to the array of state coefficients. The array is of length 4…
1393 …const q31_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5…
1398 * @brief Instance structure for the floating-point Biquad cascade filter.
1402 …uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numSta…
1403 …float32_t *pState; /**< Points to the array of state coefficients. The array is of length 4…
1404 …const float32_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5…
1408 * @brief Processing function for the Q15 Biquad cascade filter.
1409 * @param[in] S points to an instance of the Q15 Biquad cascade structure.
1410 * @param[in] pSrc points to the block of input data.
1411 * @param[out] pDst points to the block of output data.
1421 * @brief Initialization function for the Q15 Biquad cascade filter.
1422 * @param[in,out] S points to an instance of the Q15 Biquad cascade structure.
1423 * @param[in] numStages number of 2nd order stages in the filter.
1424 * @param[in] pCoeffs points to the filter coefficients.
1425 * @param[in] pState points to the state buffer.
1426 …* @param[in] postShift Shift to be applied to the output. Varies according to the coefficient…
1436 …* @brief Fast but less precise processing function for the Q15 Biquad cascade filter for Cortex-M3…
1437 * @param[in] S points to an instance of the Q15 Biquad cascade structure.
1438 * @param[in] pSrc points to the block of input data.
1439 * @param[out] pDst points to the block of output data.
1449 * @brief Processing function for the Q31 Biquad cascade filter
1450 * @param[in] S points to an instance of the Q31 Biquad cascade structure.
1451 * @param[in] pSrc points to the block of input data.
1452 * @param[out] pDst points to the block of output data.
1462 …* @brief Fast but less precise processing function for the Q31 Biquad cascade filter for Cortex-M3…
1463 * @param[in] S points to an instance of the Q31 Biquad cascade structure.
1464 * @param[in] pSrc points to the block of input data.
1465 * @param[out] pDst points to the block of output data.
1475 * @brief Initialization function for the Q31 Biquad cascade filter.
1476 * @param[in,out] S points to an instance of the Q31 Biquad cascade structure.
1477 * @param[in] numStages number of 2nd order stages in the filter.
1478 * @param[in] pCoeffs points to the filter coefficients.
1479 * @param[in] pState points to the state buffer.
1480 …* @param[in] postShift Shift to be applied to the output. Varies according to the coefficient…
1490 * @brief Processing function for the floating-point Biquad cascade filter.
1491 * @param[in] S points to an instance of the floating-point Biquad cascade structure.
1492 * @param[in] pSrc points to the block of input data.
1493 * @param[out] pDst points to the block of output data.
1503 * @brief Initialization function for the floating-point Biquad cascade filter.
1504 * @param[in,out] S points to an instance of the floating-point Biquad cascade structure.
1505 * @param[in] numStages number of 2nd order stages in the filter.
1506 * @param[in] pCoeffs points to the filter coefficients.
1507 * @param[in] pState points to the state buffer.
1516 * @brief Instance structure for the floating-point matrix structure.
1520 uint16_t numRows; /**< number of rows of the matrix. */
1521 uint16_t numCols; /**< number of columns of the matrix. */
1522 float32_t *pData; /**< points to the data of the matrix. */
1527 * @brief Instance structure for the floating-point matrix structure.
1531 uint16_t numRows; /**< number of rows of the matrix. */
1532 uint16_t numCols; /**< number of columns of the matrix. */
1533 float64_t *pData; /**< points to the data of the matrix. */
1537 * @brief Instance structure for the Q15 matrix structure.
1541 uint16_t numRows; /**< number of rows of the matrix. */
1542 uint16_t numCols; /**< number of columns of the matrix. */
1543 q15_t *pData; /**< points to the data of the matrix. */
1547 * @brief Instance structure for the Q31 matrix structure.
1551 uint16_t numRows; /**< number of rows of the matrix. */
1552 uint16_t numCols; /**< number of columns of the matrix. */
1553 q31_t *pData; /**< points to the data of the matrix. */
1558 * @param[in] pSrcA points to the first input matrix structure
1559 * @param[in] pSrcB points to the second input matrix structure
1561 * @return The function returns either
1562 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1571 * @param[in] pSrcA points to the first input matrix structure
1572 * @param[in] pSrcB points to the second input matrix structure
1574 * @return The function returns either
1575 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1584 * @param[in] pSrcA points to the first input matrix structure
1585 * @param[in] pSrcB points to the second input matrix structure
1587 * @return The function returns either
1588 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1597 * @param[in] pSrcA points to the first input matrix structure
1598 * @param[in] pSrcB points to the second input matrix structure
1600 * @return The function returns either
1601 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1610 * @param[in] pSrcA points to the first input matrix structure
1611 * @param[in] pSrcB points to the second input matrix structure
1613 * @return The function returns either
1614 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1624 * @param[in] pSrcA points to the first input matrix structure
1625 * @param[in] pSrcB points to the second input matrix structure
1627 * @return The function returns either
1628 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1637 * @param[in] pSrc points to the input matrix
1638 * @param[out] pDst points to the output matrix
1639 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
1640 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
1648 * @param[in] pSrc points to the input matrix
1649 * @param[out] pDst points to the output matrix
1650 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
1651 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
1659 * @param[in] pSrc points to the input matrix
1660 * @param[out] pDst points to the output matrix
1661 * @return The function returns either <code>ARM_MATH_SIZE_MISMATCH</code>
1662 * or <code>ARM_MATH_SUCCESS</code> based on the outcome of size checking.
1670 * @param[in] pSrcA points to the first input matrix structure
1671 * @param[in] pSrcB points to the second input matrix structure
1673 * @return The function returns either
1674 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1683 * @param[in] pSrcA points to the first input matrix structure
1684 * @param[in] pSrcB points to the second input matrix structure
1686 * @param[in] pState points to the array for storing intermediate results
1687 * @return The function returns either
1688 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1698 * @param[in] pSrcA points to the first input matrix structure
1699 * @param[in] pSrcB points to the second input matrix structure
1701 * @param[in] pState points to the array for storing intermediate results
1702 * @return The function returns either
1703 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1713 * @param[in] pSrcA points to the first input matrix structure
1714 * @param[in] pSrcB points to the second input matrix structure
1716 * @return The function returns either
1717 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1726 * @param[in] pSrcA points to the first input matrix structure
1727 * @param[in] pSrcB points to the second input matrix structure
1729 * @return The function returns either
1730 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1739 * @param[in] pSrcA points to the first input matrix structure
1740 * @param[in] pSrcB points to the second input matrix structure
1742 * @return The function returns either
1743 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1752 * @param[in] pSrcA points to the first input matrix structure
1753 * @param[in] pSrcB points to the second input matrix structure
1755 * @return The function returns either
1756 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1765 * @param[in] pSrcA points to the first input matrix structure
1766 * @param[in] pSrcB points to the second input matrix structure
1768 * @return The function returns either
1769 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1778 * @param[in] pSrc points to the input matrix
1780 * @param[out] pDst points to the output matrix
1781 * @return The function returns either
1782 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1792 * @param[in] scaleFract fractional portion of the scale factor
1793 * @param[in] shift number of bits to shift the result by
1795 * @return The function returns either
1796 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1807 * @param[in] scaleFract fractional portion of the scale factor
1808 * @param[in] shift number of bits to shift the result by
1810 * @return The function returns either
1811 …* <code>ARM_MATH_SIZE_MISMATCH</code> or <code>ARM_MATH_SUCCESS</code> based on the outcome of siz…
1821 * @param[in,out] S points to an instance of the floating-point matrix structure.
1822 * @param[in] nRows number of rows in the matrix.
1823 * @param[in] nColumns number of columns in the matrix.
1824 * @param[in] pData points to the matrix data array.
1834 * @param[in,out] S points to an instance of the floating-point matrix structure.
1835 * @param[in] nRows number of rows in the matrix.
1836 * @param[in] nColumns number of columns in the matrix.
1837 * @param[in] pData points to the matrix data array.
1847 * @param[in,out] S points to an instance of the floating-point matrix structure.
1848 * @param[in] nRows number of rows in the matrix.
1849 * @param[in] nColumns number of columns in the matrix.
1850 * @param[in] pData points to the matrix data array.
1860 * @brief Instance structure for the Q15 PID Control.
1864 q15_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
1869 q31_t A1; /**< The derived gain A1 = -Kp - 2Kd | Kd.*/
1871 q15_t state[3]; /**< The state array of length 3. */
1872 q15_t Kp; /**< The proportional gain. */
1873 q15_t Ki; /**< The integral gain. */
1874 q15_t Kd; /**< The derivative gain. */
1878 * @brief Instance structure for the Q31 PID Control.
1882 q31_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
1883 q31_t A1; /**< The derived gain, A1 = -Kp - 2Kd. */
1884 q31_t A2; /**< The derived gain, A2 = Kd . */
1885 q31_t state[3]; /**< The state array of length 3. */
1886 q31_t Kp; /**< The proportional gain. */
1887 q31_t Ki; /**< The integral gain. */
1888 q31_t Kd; /**< The derivative gain. */
1892 * @brief Instance structure for the floating-point PID Control.
1896 float32_t A0; /**< The derived gain, A0 = Kp + Ki + Kd . */
1897 float32_t A1; /**< The derived gain, A1 = -Kp - 2Kd. */
1898 float32_t A2; /**< The derived gain, A2 = Kd . */
1899 float32_t state[3]; /**< The state array of length 3. */
1900 float32_t Kp; /**< The proportional gain. */
1901 float32_t Ki; /**< The integral gain. */
1902 float32_t Kd; /**< The derivative gain. */
1908 * @brief Initialization function for the floating-point PID Control.
1909 * @param[in,out] S points to an instance of the PID structure.
1910 …* @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the sta…
1918 * @brief Reset function for the floating-point PID Control.
1919 * @param[in,out] S is an instance of the floating-point PID Control structure
1926 * @brief Initialization function for the Q31 PID Control.
1927 * @param[in,out] S points to an instance of the Q15 PID structure.
1928 …* @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the sta…
1936 * @brief Reset function for the Q31 PID Control.
1937 * @param[in,out] S points to an instance of the Q31 PID Control structure
1945 * @brief Initialization function for the Q15 PID Control.
1946 * @param[in,out] S points to an instance of the Q15 PID structure.
1947 …* @param[in] resetStateFlag flag to reset the state. 0 = no change in state 1 = reset the sta…
1955 * @brief Reset function for the Q15 PID Control.
1956 * @param[in,out] S points to an instance of the q15 PID Control structure
1963 * @brief Instance structure for the floating-point Linear Interpolate function.
1970 float32_t *pYData; /**< pointer to the table of Y values */
1974 * @brief Instance structure for the floating-point bilinear interpolation function.
1978 uint16_t numRows; /**< number of rows in the data table. */
1979 uint16_t numCols; /**< number of columns in the data table. */
1980 float32_t *pData; /**< points to the data table. */
1984 * @brief Instance structure for the Q31 bilinear interpolation function.
1988 uint16_t numRows; /**< number of rows in the data table. */
1989 uint16_t numCols; /**< number of columns in the data table. */
1990 q31_t *pData; /**< points to the data table. */
1994 * @brief Instance structure for the Q15 bilinear interpolation function.
1998 uint16_t numRows; /**< number of rows in the data table. */
1999 uint16_t numCols; /**< number of columns in the data table. */
2000 q15_t *pData; /**< points to the data table. */
2004 * @brief Instance structure for the Q15 bilinear interpolation function.
2008 uint16_t numRows; /**< number of rows in the data table. */
2009 uint16_t numCols; /**< number of columns in the data table. */
2010 q7_t *pData; /**< points to the data table. */
2016 * @param[in] pSrcA points to the first input vector
2017 * @param[in] pSrcB points to the second input vector
2018 * @param[out] pDst points to the output vector
2030 * @param[in] pSrcA points to the first input vector
2031 * @param[in] pSrcB points to the second input vector
2032 * @param[out] pDst points to the output vector
2044 * @param[in] pSrcA points to the first input vector
2045 * @param[in] pSrcB points to the second input vector
2046 * @param[out] pDst points to the output vector
2058 * @param[in] pSrcA points to the first input vector
2059 * @param[in] pSrcB points to the second input vector
2060 * @param[out] pDst points to the output vector
2071 * @brief Instance structure for the Q15 CFFT/CIFFT function.
2075 uint16_t fftLen; /**< length of the FFT. */
2078 const q15_t *pTwiddle; /**< points to the Sin twiddle factor table. */
2079 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
2080 … /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor…
2081 … /**< bit reversal modifier that supports different size FFTs with the same bit reversal t…
2098 * @brief Instance structure for the Q15 CFFT/CIFFT function.
2102 uint16_t fftLen; /**< length of the FFT. */
2105 const q15_t *pTwiddle; /**< points to the twiddle factor table. */
2106 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
2107 … /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor…
2108 … /**< bit reversal modifier that supports different size FFTs with the same bit reversal t…
2124 * @brief Instance structure for the Radix-2 Q31 CFFT/CIFFT function.
2128 uint16_t fftLen; /**< length of the FFT. */
2131 const q31_t *pTwiddle; /**< points to the Twiddle factor table. */
2132 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
2133 … /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor…
2134 … /**< bit reversal modifier that supports different size FFTs with the same bit reversal t…
2150 * @brief Instance structure for the Q31 CFFT/CIFFT function.
2154 uint16_t fftLen; /**< length of the FFT. */
2157 const q31_t *pTwiddle; /**< points to the twiddle factor table. */
2158 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
2159 … /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor…
2160 … /**< bit reversal modifier that supports different size FFTs with the same bit reversal t…
2176 * @brief Instance structure for the floating-point CFFT/CIFFT function.
2180 uint16_t fftLen; /**< length of the FFT. */
2183 const float32_t *pTwiddle; /**< points to the Twiddle factor table. */
2184 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
2185 … /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor…
2186 … /**< bit reversal modifier that supports different size FFTs with the same bit reversal t…
2203 * @brief Instance structure for the floating-point CFFT/CIFFT function.
2207 uint16_t fftLen; /**< length of the FFT. */
2210 const float32_t *pTwiddle; /**< points to the Twiddle factor table. */
2211 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
2212 … /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor…
2213 … /**< bit reversal modifier that supports different size FFTs with the same bit reversal t…
2230 * @brief Instance structure for the fixed-point CFFT/CIFFT function.
2234 uint16_t fftLen; /**< length of the FFT. */
2235 const q15_t *pTwiddle; /**< points to the Twiddle factor table. */
2236 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
2247 * @brief Instance structure for the fixed-point CFFT/CIFFT function.
2251 uint16_t fftLen; /**< length of the FFT. */
2252 const q31_t *pTwiddle; /**< points to the Twiddle factor table. */
2253 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
2264 * @brief Instance structure for the floating-point CFFT/CIFFT function.
2268 uint16_t fftLen; /**< length of the FFT. */
2269 const float32_t *pTwiddle; /**< points to the Twiddle factor table. */
2270 const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
2281 * @brief Instance structure for the Q15 RFFT/RIFFT function.
2285 uint32_t fftLenReal; /**< length of the real FFT. */
2288 … /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor…
2289 const q15_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
2290 const q15_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
2291 const arm_cfft_instance_q15 *pCfft; /**< points to the complex FFT instance. */
2306 * @brief Instance structure for the Q31 RFFT/RIFFT function.
2310 uint32_t fftLenReal; /**< length of the real FFT. */
2313 … /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor…
2314 … const q31_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
2315 … const q31_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
2316 const arm_cfft_instance_q31 *pCfft; /**< points to the complex FFT instance. */
2331 * @brief Instance structure for the floating-point RFFT/RIFFT function.
2335 uint32_t fftLenReal; /**< length of the real FFT. */
2336 uint16_t fftLenBy2; /**< length of the complex FFT. */
2339 … /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor…
2340 … const float32_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
2341 … const float32_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
2342 arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
2358 * @brief Instance structure for the floating-point RFFT/RIFFT function.
2363 uint16_t fftLenRFFT; /**< length of the real sequence */
2394 * @brief Instance structure for the floating-point DCT4/IDCT4 function.
2398 uint16_t N; /**< length of the DCT4. */
2399 uint16_t Nby2; /**< half of the length of the DCT4. */
2401 const float32_t *pTwiddle; /**< points to the twiddle factor table. */
2402 const float32_t *pCosFactor; /**< points to the cosFactor table. */
2403 arm_rfft_instance_f32 *pRfft; /**< points to the real FFT instance. */
2404 arm_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
2409 * @brief Initialization function for the floating-point DCT4/IDCT4.
2413 * @param[in] N length of the DCT4.
2414 * @param[in] Nby2 half of the length of the DCT4.
2428 * @brief Processing function for the floating-point DCT4/IDCT4.
2429 * @param[in] S points to an instance of the floating-point DCT4/IDCT4 structure.
2431 * @param[in,out] pInlineBuffer points to the in-place input and output buffer.
2440 * @brief Instance structure for the Q31 DCT4/IDCT4 function.
2444 uint16_t N; /**< length of the DCT4. */
2445 uint16_t Nby2; /**< half of the length of the DCT4. */
2447 const q31_t *pTwiddle; /**< points to the twiddle factor table. */
2448 const q31_t *pCosFactor; /**< points to the cosFactor table. */
2449 arm_rfft_instance_q31 *pRfft; /**< points to the real FFT instance. */
2450 arm_cfft_radix4_instance_q31 *pCfft; /**< points to the complex FFT instance. */
2455 * @brief Initialization function for the Q31 DCT4/IDCT4.
2459 * @param[in] N length of the DCT4.
2460 * @param[in] Nby2 half of the length of the DCT4.
2474 * @brief Processing function for the Q31 DCT4/IDCT4.
2475 * @param[in] S points to an instance of the Q31 DCT4 structure.
2477 * @param[in,out] pInlineBuffer points to the in-place input and output buffer.
2486 * @brief Instance structure for the Q15 DCT4/IDCT4 function.
2490 uint16_t N; /**< length of the DCT4. */
2491 uint16_t Nby2; /**< half of the length of the DCT4. */
2493 const q15_t *pTwiddle; /**< points to the twiddle factor table. */
2494 const q15_t *pCosFactor; /**< points to the cosFactor table. */
2495 arm_rfft_instance_q15 *pRfft; /**< points to the real FFT instance. */
2496 arm_cfft_radix4_instance_q15 *pCfft; /**< points to the complex FFT instance. */
2501 * @brief Initialization function for the Q15 DCT4/IDCT4.
2505 * @param[in] N length of the DCT4.
2506 * @param[in] Nby2 half of the length of the DCT4.
2520 * @brief Processing function for the Q15 DCT4/IDCT4.
2521 * @param[in] S points to an instance of the Q15 DCT4 structure.
2523 * @param[in,out] pInlineBuffer points to the in-place input and output buffer.
2533 * @param[in] pSrcA points to the first input vector
2534 * @param[in] pSrcB points to the second input vector
2535 * @param[out] pDst points to the output vector
2547 * @param[in] pSrcA points to the first input vector
2548 * @param[in] pSrcB points to the second input vector
2549 * @param[out] pDst points to the output vector
2561 * @param[in] pSrcA points to the first input vector
2562 * @param[in] pSrcB points to the second input vector
2563 * @param[out] pDst points to the output vector
2575 * @param[in] pSrcA points to the first input vector
2576 * @param[in] pSrcB points to the second input vector
2577 * @param[out] pDst points to the output vector
2589 * @param[in] pSrcA points to the first input vector
2590 * @param[in] pSrcB points to the second input vector
2591 * @param[out] pDst points to the output vector
2603 * @param[in] pSrcA points to the first input vector
2604 * @param[in] pSrcB points to the second input vector
2605 * @param[out] pDst points to the output vector
2617 * @param[in] pSrcA points to the first input vector
2618 * @param[in] pSrcB points to the second input vector
2619 * @param[out] pDst points to the output vector
2631 * @param[in] pSrcA points to the first input vector
2632 * @param[in] pSrcB points to the second input vector
2633 * @param[out] pDst points to the output vector
2645 * @param[in] pSrc points to the input vector
2647 * @param[out] pDst points to the output vector
2648 * @param[in] blockSize number of samples in the vector
2659 * @param[in] pSrc points to the input vector
2660 * @param[in] scaleFract fractional portion of the scale value
2661 * @param[in] shift number of bits to shift the result by
2662 * @param[out] pDst points to the output vector
2663 * @param[in] blockSize number of samples in the vector
2675 * @param[in] pSrc points to the input vector
2676 * @param[in] scaleFract fractional portion of the scale value
2677 * @param[in] shift number of bits to shift the result by
2678 * @param[out] pDst points to the output vector
2679 * @param[in] blockSize number of samples in the vector
2691 * @param[in] pSrc points to the input vector
2692 * @param[in] scaleFract fractional portion of the scale value
2693 * @param[in] shift number of bits to shift the result by
2694 * @param[out] pDst points to the output vector
2695 * @param[in] blockSize number of samples in the vector
2707 * @param[in] pSrc points to the input buffer
2708 * @param[out] pDst points to the output buffer
2719 * @param[in] pSrc points to the input buffer
2720 * @param[out] pDst points to the output buffer
2731 * @param[in] pSrc points to the input buffer
2732 * @param[out] pDst points to the output buffer
2743 * @param[in] pSrc points to the input buffer
2744 * @param[out] pDst points to the output buffer
2755 * @param[in] pSrcA points to the first input vector
2756 * @param[in] pSrcB points to the second input vector
2769 * @param[in] pSrcA points to the first input vector
2770 * @param[in] pSrcB points to the second input vector
2783 * @param[in] pSrcA points to the first input vector
2784 * @param[in] pSrcB points to the second input vector
2797 * @param[in] pSrcA points to the first input vector
2798 * @param[in] pSrcB points to the second input vector
2810 * @brief Shifts the elements of a Q7 vector a specified number of bits.
2811 * @param[in] pSrc points to the input vector
2813 * @param[out] pDst points to the output vector
2814 * @param[in] blockSize number of samples in the vector
2824 * @brief Shifts the elements of a Q15 vector a specified number of bits.
2825 * @param[in] pSrc points to the input vector
2827 * @param[out] pDst points to the output vector
2828 * @param[in] blockSize number of samples in the vector
2838 * @brief Shifts the elements of a Q31 vector a specified number of bits.
2839 * @param[in] pSrc points to the input vector
2841 * @param[out] pDst points to the output vector
2842 * @param[in] blockSize number of samples in the vector
2853 * @param[in] pSrc points to the input vector
2854 * @param[in] offset is the offset to be added
2855 * @param[out] pDst points to the output vector
2856 * @param[in] blockSize number of samples in the vector
2867 * @param[in] pSrc points to the input vector
2868 * @param[in] offset is the offset to be added
2869 * @param[out] pDst points to the output vector
2870 * @param[in] blockSize number of samples in the vector
2881 * @param[in] pSrc points to the input vector
2882 * @param[in] offset is the offset to be added
2883 * @param[out] pDst points to the output vector
2884 * @param[in] blockSize number of samples in the vector
2895 * @param[in] pSrc points to the input vector
2896 * @param[in] offset is the offset to be added
2897 * @param[out] pDst points to the output vector
2898 * @param[in] blockSize number of samples in the vector
2908 * @brief Negates the elements of a floating-point vector.
2909 * @param[in] pSrc points to the input vector
2910 * @param[out] pDst points to the output vector
2911 * @param[in] blockSize number of samples in the vector
2920 * @brief Negates the elements of a Q7 vector.
2921 * @param[in] pSrc points to the input vector
2922 * @param[out] pDst points to the output vector
2923 * @param[in] blockSize number of samples in the vector
2932 * @brief Negates the elements of a Q15 vector.
2933 * @param[in] pSrc points to the input vector
2934 * @param[out] pDst points to the output vector
2935 * @param[in] blockSize number of samples in the vector
2944 * @brief Negates the elements of a Q31 vector.
2945 * @param[in] pSrc points to the input vector
2946 * @param[out] pDst points to the output vector
2947 * @param[in] blockSize number of samples in the vector
2956 * @brief Copies the elements of a floating-point vector.
2968 * @brief Copies the elements of a Q7 vector.
2980 * @brief Copies the elements of a Q15 vector.
2992 * @brief Copies the elements of a Q31 vector.
3053 * @param[in] pSrcA points to the first input sequence.
3054 * @param[in] srcALen length of the first input sequence.
3055 * @param[in] pSrcB points to the second input sequence.
3056 * @param[in] srcBLen length of the second input sequence.
3057 …* @param[out] pDst points to the location where the output result is written. Length srcALen+…
3069 * @param[in] pSrcA points to the first input sequence.
3070 * @param[in] srcALen length of the first input sequence.
3071 * @param[in] pSrcB points to the second input sequence.
3072 * @param[in] srcBLen length of the second input sequence.
3073 * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
3089 * @param[in] pSrcA points to the first input sequence.
3090 * @param[in] srcALen length of the first input sequence.
3091 * @param[in] pSrcB points to the second input sequence.
3092 * @param[in] srcBLen length of the second input sequence.
3093 …* @param[out] pDst points to the location where the output result is written. Length srcALen+…
3105 * @param[in] pSrcA points to the first input sequence.
3106 * @param[in] srcALen length of the first input sequence.
3107 * @param[in] pSrcB points to the second input sequence.
3108 * @param[in] srcBLen length of the second input sequence.
3109 * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
3121 * @param[in] pSrcA points to the first input sequence.
3122 * @param[in] srcALen length of the first input sequence.
3123 * @param[in] pSrcB points to the second input sequence.
3124 * @param[in] srcBLen length of the second input sequence.
3125 * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
3141 * @param[in] pSrcA points to the first input sequence.
3142 * @param[in] srcALen length of the first input sequence.
3143 * @param[in] pSrcB points to the second input sequence.
3144 * @param[in] srcBLen length of the second input sequence.
3145 * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
3157 * @param[in] pSrcA points to the first input sequence.
3158 * @param[in] srcALen length of the first input sequence.
3159 * @param[in] pSrcB points to the second input sequence.
3160 * @param[in] srcBLen length of the second input sequence.
3161 * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
3173 * @param[in] pSrcA points to the first input sequence.
3174 * @param[in] srcALen length of the first input sequence.
3175 * @param[in] pSrcB points to the second input sequence.
3176 * @param[in] srcBLen length of the second input sequence.
3177 * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
3193 * @param[in] pSrcA points to the first input sequence.
3194 * @param[in] srcALen length of the first input sequence.
3195 * @param[in] pSrcB points to the second input sequence.
3196 * @param[in] srcBLen length of the second input sequence.
3197 * @param[out] pDst points to the block of output data Length srcALen+srcBLen-1.
3209 * @param[in] pSrcA points to the first input sequence.
3210 * @param[in] srcALen length of the first input sequence.
3211 * @param[in] pSrcB points to the second input sequence.
3212 * @param[in] srcBLen length of the second input sequence.
3213 * @param[out] pDst points to the block of output data
3214 * @param[in] firstIndex is the first output sample to start with.
3215 * @param[in] numPoints is the number of output points to be computed.
3216 … either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the req…
3230 * @param[in] pSrcA points to the first input sequence.
3231 * @param[in] srcALen length of the first input sequence.
3232 * @param[in] pSrcB points to the second input sequence.
3233 * @param[in] srcBLen length of the second input sequence.
3234 * @param[out] pDst points to the block of output data
3235 * @param[in] firstIndex is the first output sample to start with.
3236 * @param[in] numPoints is the number of output points to be computed.
3239 … either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the req…
3255 * @param[in] pSrcA points to the first input sequence.
3256 * @param[in] srcALen length of the first input sequence.
3257 * @param[in] pSrcB points to the second input sequence.
3258 * @param[in] srcBLen length of the second input sequence.
3259 * @param[out] pDst points to the block of output data
3260 * @param[in] firstIndex is the first output sample to start with.
3261 * @param[in] numPoints is the number of output points to be computed.
3262 … either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the req…
3276 * @param[in] pSrcA points to the first input sequence.
3277 * @param[in] srcALen length of the first input sequence.
3278 * @param[in] pSrcB points to the second input sequence.
3279 * @param[in] srcBLen length of the second input sequence.
3280 * @param[out] pDst points to the block of output data
3281 * @param[in] firstIndex is the first output sample to start with.
3282 * @param[in] numPoints is the number of output points to be computed.
3283 … either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the req…
3297 * @param[in] pSrcA points to the first input sequence.
3298 * @param[in] srcALen length of the first input sequence.
3299 * @param[in] pSrcB points to the second input sequence.
3300 * @param[in] srcBLen length of the second input sequence.
3301 * @param[out] pDst points to the block of output data
3302 * @param[in] firstIndex is the first output sample to start with.
3303 * @param[in] numPoints is the number of output points to be computed.
3306 … either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the req…
3322 * @param[in] pSrcA points to the first input sequence.
3323 * @param[in] srcALen length of the first input sequence.
3324 * @param[in] pSrcB points to the second input sequence.
3325 * @param[in] srcBLen length of the second input sequence.
3326 * @param[out] pDst points to the block of output data
3327 * @param[in] firstIndex is the first output sample to start with.
3328 * @param[in] numPoints is the number of output points to be computed.
3329 … either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the req…
3343 * @param[in] pSrcA points to the first input sequence.
3344 * @param[in] srcALen length of the first input sequence.
3345 * @param[in] pSrcB points to the second input sequence.
3346 * @param[in] srcBLen length of the second input sequence.
3347 * @param[out] pDst points to the block of output data
3348 * @param[in] firstIndex is the first output sample to start with.
3349 * @param[in] numPoints is the number of output points to be computed.
3350 … either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the req…
3364 * @param[in] pSrcA points to the first input sequence.
3365 * @param[in] srcALen length of the first input sequence.
3366 * @param[in] pSrcB points to the second input sequence.
3367 * @param[in] srcBLen length of the second input sequence.
3368 * @param[out] pDst points to the block of output data
3369 * @param[in] firstIndex is the first output sample to start with.
3370 * @param[in] numPoints is the number of output points to be computed.
3373 … either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the req…
3389 * @param[in] pSrcA points to the first input sequence.
3390 * @param[in] srcALen length of the first input sequence.
3391 * @param[in] pSrcB points to the second input sequence.
3392 * @param[in] srcBLen length of the second input sequence.
3393 * @param[out] pDst points to the block of output data
3394 * @param[in] firstIndex is the first output sample to start with.
3395 * @param[in] numPoints is the number of output points to be computed.
3396 … either ARM_MATH_SUCCESS if the function completed correctly or ARM_MATH_ARGUMENT_ERROR if the req…
3409 * @brief Instance structure for the Q15 FIR decimator.
3414 uint16_t numTaps; /**< number of coefficients in the filter. */
3415 …const q15_t *pCoeffs; /**< points to the coefficient array. The array is of length num…
3416 …q15_t *pState; /**< points to the state variable array. The array is of length numTap…
3420 * @brief Instance structure for the Q31 FIR decimator.
3425 uint16_t numTaps; /**< number of coefficients in the filter. */
3426 …const q31_t *pCoeffs; /**< points to the coefficient array. The array is of length num…
3427 …q31_t *pState; /**< points to the state variable array. The array is of length numTap…
3436 uint16_t numTaps; /**< number of coefficients in the filter. */
3437 …const float32_t *pCoeffs; /**< points to the coefficient array. The array is of length num…
3438 …float32_t *pState; /**< points to the state variable array. The array is of length numTap…
3444 @param[in] S points to an instance of the floating-point FIR decimator structure
3445 @param[in] pSrc points to the block of input data
3446 @param[out] pDst points to the block of output data
3457 @brief Initialization function for the floating-point FIR decimator.
3458 @param[in,out] S points to an instance of the floating-point FIR decimator structure
3459 @param[in] numTaps number of coefficients in the filter
3461 @param[in] pCoeffs points to the filter coefficients
3462 @param[in] pState points to the state buffer
3478 * @brief Processing function for the Q15 FIR decimator.
3479 * @param[in] S points to an instance of the Q15 FIR decimator structure.
3480 * @param[in] pSrc points to the block of input data.
3481 * @param[out] pDst points to the block of output data
3492 … * @brief Processing function for the Q15 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
3493 * @param[in] S points to an instance of the Q15 FIR decimator structure.
3494 * @param[in] pSrc points to the block of input data.
3495 * @param[out] pDst points to the block of output data
3506 * @brief Initialization function for the Q15 FIR decimator.
3507 * @param[in,out] S points to an instance of the Q15 FIR decimator structure.
3508 * @param[in] numTaps number of coefficients in the filter.
3510 * @param[in] pCoeffs points to the filter coefficients.
3511 * @param[in] pState points to the state buffer.
3513 …* @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LEN…
3526 * @brief Processing function for the Q31 FIR decimator.
3527 * @param[in] S points to an instance of the Q31 FIR decimator structure.
3528 * @param[in] pSrc points to the block of input data.
3529 * @param[out] pDst points to the block of output data
3539 … * @brief Processing function for the Q31 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
3540 * @param[in] S points to an instance of the Q31 FIR decimator structure.
3541 * @param[in] pSrc points to the block of input data.
3542 * @param[out] pDst points to the block of output data
3553 * @brief Initialization function for the Q31 FIR decimator.
3554 * @param[in,out] S points to an instance of the Q31 FIR decimator structure.
3555 * @param[in] numTaps number of coefficients in the filter.
3557 * @param[in] pCoeffs points to the filter coefficients.
3558 * @param[in] pState points to the state buffer.
3560 …* @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_LEN…
3573 * @brief Instance structure for the Q15 FIR interpolator.
3579 …const q15_t *pCoeffs; /**< points to the coefficient array. The array is of length…
3580 …q15_t *pState; /**< points to the state variable array. The array is of length bl…
3584 * @brief Instance structure for the Q31 FIR interpolator.
3590 …const q31_t *pCoeffs; /**< points to the coefficient array. The array is of length…
3591 …q31_t *pState; /**< points to the state variable array. The array is of length bl…
3595 * @brief Instance structure for the floating-point FIR interpolator.
3601 …const float32_t *pCoeffs; /**< points to the coefficient array. The array is of length …
3602 …float32_t *pState; /**< points to the state variable array. The array is of length pha…
3607 * @brief Processing function for the Q15 FIR interpolator.
3608 * @param[in] S points to an instance of the Q15 FIR interpolator structure.
3609 * @param[in] pSrc points to the block of input data.
3610 * @param[out] pDst points to the block of output data.
3621 * @brief Initialization function for the Q15 FIR interpolator.
3622 * @param[in,out] S points to an instance of the Q15 FIR interpolator structure.
3624 * @param[in] numTaps number of filter coefficients in the filter.
3625 * @param[in] pCoeffs points to the filter coefficient buffer.
3626 * @param[in] pState points to the state buffer.
3628 …* @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH…
3629 …* the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</co…
3641 * @brief Processing function for the Q31 FIR interpolator.
3642 * @param[in] S points to an instance of the Q15 FIR interpolator structure.
3643 * @param[in] pSrc points to the block of input data.
3644 * @param[out] pDst points to the block of output data.
3655 * @brief Initialization function for the Q31 FIR interpolator.
3656 * @param[in,out] S points to an instance of the Q31 FIR interpolator structure.
3658 * @param[in] numTaps number of filter coefficients in the filter.
3659 * @param[in] pCoeffs points to the filter coefficient buffer.
3660 * @param[in] pState points to the state buffer.
3662 …* @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH…
3663 …* the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</co…
3675 * @brief Processing function for the floating-point FIR interpolator.
3676 * @param[in] S points to an instance of the floating-point FIR interpolator structure.
3677 * @param[in] pSrc points to the block of input data.
3678 * @param[out] pDst points to the block of output data.
3689 * @brief Initialization function for the floating-point FIR interpolator.
3690 …* @param[in,out] S points to an instance of the floating-point FIR interpolator structure.
3692 * @param[in] numTaps number of filter coefficients in the filter.
3693 * @param[in] pCoeffs points to the filter coefficient buffer.
3694 * @param[in] pState points to the state buffer.
3696 …* @return The function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH…
3697 …* the filter length <code>numTaps</code> is not a multiple of the interpolation factor <code>L</co…
3709 * @brief Instance structure for the high precision Q31 Biquad cascade filter.
3713 …uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numSta…
3714 …q63_t *pState; /**< points to the array of state coefficients. The array is of length 4…
3715 …const q31_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5…
3721 …* @param[in] S points to an instance of the high precision Q31 Biquad cascade filter str…
3722 * @param[in] pSrc points to the block of input data.
3723 * @param[out] pDst points to the block of output data
3734 …* @param[in,out] S points to an instance of the high precision Q31 Biquad cascade filter …
3735 * @param[in] numStages number of 2nd order stages in the filter.
3736 * @param[in] pCoeffs points to the filter coefficients.
3737 * @param[in] pState points to the state buffer.
3738 …* @param[in] postShift shift to be applied to the output. Varies according to the coefficient…
3749 …* @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
3753 …uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numS…
3754 …float32_t *pState; /**< points to the array of state coefficients. The array is of length…
3755 …const float32_t *pCoeffs; /**< points to the array of coefficients. The array is of length…
3759 …* @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
3763 …uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numS…
3764 …float32_t *pState; /**< points to the array of state coefficients. The array is of length…
3765 …const float32_t *pCoeffs; /**< points to the array of coefficients. The array is of length…
3769 …* @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
3773 …uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numS…
3774 …float64_t *pState; /**< points to the array of state coefficients. The array is of length…
3775 …float64_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*num…
3780 …* @brief Processing function for the floating-point transposed direct form II Biquad cascade filte…
3781 * @param[in] S points to an instance of the filter data structure.
3782 * @param[in] pSrc points to the block of input data.
3783 * @param[out] pDst points to the block of output data
3794 …* @brief Processing function for the floating-point transposed direct form II Biquad cascade filte…
3795 * @param[in] S points to an instance of the filter data structure.
3796 * @param[in] pSrc points to the block of input data.
3797 * @param[out] pDst points to the block of output data
3808 …* @brief Processing function for the floating-point transposed direct form II Biquad cascade filte…
3809 * @param[in] S points to an instance of the filter data structure.
3810 * @param[in] pSrc points to the block of input data.
3811 * @param[out] pDst points to the block of output data
3828 …* @brief Initialization function for the floating-point transposed direct form II Biquad cascade …
3829 * @param[in,out] S points to an instance of the filter data structure.
3830 * @param[in] numStages number of 2nd order stages in the filter.
3831 * @param[in] pCoeffs points to the filter coefficients.
3832 * @param[in] pState points to the state buffer.
3842 …* @brief Initialization function for the floating-point transposed direct form II Biquad cascade …
3843 * @param[in,out] S points to an instance of the filter data structure.
3844 * @param[in] numStages number of 2nd order stages in the filter.
3845 * @param[in] pCoeffs points to the filter coefficients.
3846 * @param[in] pState points to the state buffer.
3856 …* @brief Initialization function for the floating-point transposed direct form II Biquad cascade …
3857 * @param[in,out] S points to an instance of the filter data structure.
3858 * @param[in] numStages number of 2nd order stages in the filter.
3859 * @param[in] pCoeffs points to the filter coefficients.
3860 * @param[in] pState points to the state buffer.
3870 * @brief Instance structure for the Q15 FIR lattice filter.
3875 …q15_t *pState; /**< points to the state variable array. The array is of leng…
3876 …const q15_t *pCoeffs; /**< points to the coefficient array. The array is of l…
3880 * @brief Instance structure for the Q31 FIR lattice filter.
3885 …q31_t *pState; /**< points to the state variable array. The array is of leng…
3886 …const q31_t *pCoeffs; /**< points to the coefficient array. The array is of l…
3890 * @brief Instance structure for the floating-point FIR lattice filter.
3895 …float32_t *pState; /**< points to the state variable array. The array is of leng…
3896 …const float32_t *pCoeffs; /**< points to the coefficient array. The array is of l…
3901 * @brief Initialization function for the Q15 FIR lattice filter.
3902 * @param[in] S points to an instance of the Q15 FIR lattice structure.
3904 * @param[in] pCoeffs points to the coefficient buffer. The array is of length numStages.
3905 * @param[in] pState points to the state buffer. The array is of length numStages.
3915 * @brief Processing function for the Q15 FIR lattice filter.
3916 * @param[in] S points to an instance of the Q15 FIR lattice structure.
3917 * @param[in] pSrc points to the block of input data.
3918 * @param[out] pDst points to the block of output data.
3929 * @brief Initialization function for the Q31 FIR lattice filter.
3930 * @param[in] S points to an instance of the Q31 FIR lattice structure.
3932 * @param[in] pCoeffs points to the coefficient buffer. The array is of length numStages.
3933 * @param[in] pState points to the state buffer. The array is of length numStages.
3943 * @brief Processing function for the Q31 FIR lattice filter.
3944 * @param[in] S points to an instance of the Q31 FIR lattice structure.
3945 * @param[in] pSrc points to the block of input data.
3946 * @param[out] pDst points to the block of output data
3957 * @brief Initialization function for the floating-point FIR lattice filter.
3958 * @param[in] S points to an instance of the floating-point FIR lattice structure.
3960 * @param[in] pCoeffs points to the coefficient buffer. The array is of length numStages.
3961 * @param[in] pState points to the state buffer. The array is of length numStages.
3971 * @brief Processing function for the floating-point FIR lattice filter.
3972 * @param[in] S points to an instance of the floating-point FIR lattice structure.
3973 * @param[in] pSrc points to the block of input data.
3974 * @param[out] pDst points to the block of output data
3985 * @brief Instance structure for the Q15 IIR lattice filter.
3989 uint16_t numStages; /**< number of stages in the filter. */
3990 …q15_t *pState; /**< points to the state variable array. The array is of leng…
3991 …q15_t *pkCoeffs; /**< points to the reflection coefficient array. The array is…
3992 …q15_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of …
3996 * @brief Instance structure for the Q31 IIR lattice filter.
4000 uint16_t numStages; /**< number of stages in the filter. */
4001 …q31_t *pState; /**< points to the state variable array. The array is of leng…
4002 …q31_t *pkCoeffs; /**< points to the reflection coefficient array. The array is…
4003 …q31_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of …
4007 * @brief Instance structure for the floating-point IIR lattice filter.
4011 uint16_t numStages; /**< number of stages in the filter. */
4012 …float32_t *pState; /**< points to the state variable array. The array is of leng…
4013 …float32_t *pkCoeffs; /**< points to the reflection coefficient array. The array is…
4014 …float32_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of …
4019 * @brief Processing function for the floating-point IIR lattice filter.
4020 * @param[in] S points to an instance of the floating-point IIR lattice structure.
4021 * @param[in] pSrc points to the block of input data.
4022 * @param[out] pDst points to the block of output data.
4033 * @brief Initialization function for the floating-point IIR lattice filter.
4034 * @param[in] S points to an instance of the floating-point IIR lattice structure.
4035 * @param[in] numStages number of stages in the filter.
4036 …* @param[in] pkCoeffs points to the reflection coefficient buffer. The array is of length numSt…
4037 …* @param[in] pvCoeffs points to the ladder coefficient buffer. The array is of length numStages…
4038 … * @param[in] pState points to the state buffer. The array is of length numStages+blockSize-1.
4051 * @brief Processing function for the Q31 IIR lattice filter.
4052 * @param[in] S points to an instance of the Q31 IIR lattice structure.
4053 * @param[in] pSrc points to the block of input data.
4054 * @param[out] pDst points to the block of output data.
4065 * @brief Initialization function for the Q31 IIR lattice filter.
4066 * @param[in] S points to an instance of the Q31 IIR lattice structure.
4067 * @param[in] numStages number of stages in the filter.
4068 …* @param[in] pkCoeffs points to the reflection coefficient buffer. The array is of length numSt…
4069 …* @param[in] pvCoeffs points to the ladder coefficient buffer. The array is of length numStages…
4070 * @param[in] pState points to the state buffer. The array is of length numStages+blockSize.
4083 * @brief Processing function for the Q15 IIR lattice filter.
4084 * @param[in] S points to an instance of the Q15 IIR lattice structure.
4085 * @param[in] pSrc points to the block of input data.
4086 * @param[out] pDst points to the block of output data.
4097 * @brief Initialization function for the Q15 IIR lattice filter.
4098 * @param[in] S points to an instance of the fixed-point Q15 IIR lattice structure.
4099 * @param[in] numStages number of stages in the filter.
4100 * @param[in] pkCoeffs points to reflection coefficient buffer. The array is of length numStages.
4101 * @param[in] pvCoeffs points to ladder coefficient buffer. The array is of length numStages+1.
4102 * @param[in] pState points to state buffer. The array is of length numStages+blockSize.
4115 * @brief Instance structure for the floating-point LMS filter.
4119 uint16_t numTaps; /**< number of coefficients in the filter. */
4120 …float32_t *pState; /**< points to the state variable array. The array is of length numTaps+block…
4121 … float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
4128 * @param[in] S points to an instance of the floating-point LMS filter structure.
4129 * @param[in] pSrc points to the block of input data.
4130 * @param[in] pRef points to the block of reference data.
4131 * @param[out] pOut points to the block of output data.
4132 * @param[out] pErr points to the block of error data.
4146 * @param[in] S points to an instance of the floating-point LMS filter structure.
4148 * @param[in] pCoeffs points to the coefficient buffer.
4163 * @brief Instance structure for the Q15 LMS filter.
4167 uint16_t numTaps; /**< number of coefficients in the filter. */
4168 …q15_t *pState; /**< points to the state variable array. The array is of length numTaps+block…
4169 … q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
4176 * @brief Initialization function for the Q15 LMS filter.
4177 * @param[in] S points to an instance of the Q15 LMS filter structure.
4179 * @param[in] pCoeffs points to the coefficient buffer.
4180 * @param[in] pState points to the state buffer.
4197 * @param[in] S points to an instance of the Q15 LMS filter structure.
4198 * @param[in] pSrc points to the block of input data.
4199 * @param[in] pRef points to the block of reference data.
4200 * @param[out] pOut points to the block of output data.
4201 * @param[out] pErr points to the block of error data.
4214 * @brief Instance structure for the Q31 LMS filter.
4218 uint16_t numTaps; /**< number of coefficients in the filter. */
4219 …q31_t *pState; /**< points to the state variable array. The array is of length numTaps+block…
4220 … q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
4228 * @param[in] S points to an instance of the Q15 LMS filter structure.
4229 * @param[in] pSrc points to the block of input data.
4230 * @param[in] pRef points to the block of reference data.
4231 * @param[out] pOut points to the block of output data.
4232 * @param[out] pErr points to the block of error data.
4246 * @param[in] S points to an instance of the Q31 LMS filter structure.
4265 * @brief Instance structure for the floating-point normalized LMS filter.
4269 uint16_t numTaps; /**< number of coefficients in the filter. */
4270 …float32_t *pState; /**< points to the state variable array. The array is of length numTaps+bloc…
4271 … float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
4280 …* @param[in] S points to an instance of the floating-point normalized LMS filter structu…
4281 * @param[in] pSrc points to the block of input data.
4282 * @param[in] pRef points to the block of reference data.
4283 * @param[out] pOut points to the block of output data.
4284 * @param[out] pErr points to the block of error data.
4298 * @param[in] S points to an instance of the floating-point LMS filter structure.
4315 * @brief Instance structure for the Q31 normalized LMS filter.
4319 uint16_t numTaps; /**< number of coefficients in the filter. */
4320 …q31_t *pState; /**< points to the state variable array. The array is of length numTaps+bloc…
4321 … q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
4324 const q31_t *recipTable; /**< points to the reciprocal initial value table. */
4332 * @param[in] S points to an instance of the Q31 normalized LMS filter structure.
4333 * @param[in] pSrc points to the block of input data.
4334 * @param[in] pRef points to the block of reference data.
4335 * @param[out] pOut points to the block of output data.
4336 * @param[out] pErr points to the block of error data.
4350 * @param[in] S points to an instance of the Q31 normalized LMS filter structure.
4369 * @brief Instance structure for the Q15 normalized LMS filter.
4373 uint16_t numTaps; /**< Number of coefficients in the filter. */
4374 …q15_t *pState; /**< points to the state variable array. The array is of length numTaps+bloc…
4375 … q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
4378 const q15_t *recipTable; /**< Points to the reciprocal initial value table. */
4386 * @param[in] S points to an instance of the Q15 normalized LMS filter structure.
4387 * @param[in] pSrc points to the block of input data.
4388 * @param[in] pRef points to the block of reference data.
4389 * @param[out] pOut points to the block of output data.
4390 * @param[out] pErr points to the block of error data.
4404 * @param[in] S points to an instance of the Q15 normalized LMS filter structure.
4424 * @param[in] pSrcA points to the first input sequence.
4425 * @param[in] srcALen length of the first input sequence.
4426 * @param[in] pSrcB points to the second input sequence.
4427 * @param[in] srcBLen length of the second input sequence.
4428 * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
4440 @param[in] pSrcA points to the first input sequence
4441 @param[in] srcALen length of the first input sequence
4442 @param[in] pSrcB points to the second input sequence
4443 @param[in] srcBLen length of the second input sequence
4444 @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
4458 @param[in] pSrcA points to the first input sequence
4459 @param[in] srcALen length of the first input sequence
4460 @param[in] pSrcB points to the second input sequence
4461 @param[in] srcBLen length of the second input sequence
4462 @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
4474 @param[in] pSrcA points to the first input sequence
4475 @param[in] srcALen length of the first input sequence
4476 @param[in] pSrcB points to the second input sequence
4477 @param[in] srcBLen length of the second input sequence
4478 …@param[out] pDst points to the location where the output result is written. Length 2 * m…
4491 @param[in] pSrcA points to the first input sequence.
4492 @param[in] srcALen length of the first input sequence.
4493 @param[in] pSrcB points to the second input sequence.
4494 @param[in] srcBLen length of the second input sequence.
4495 @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
4509 * @param[in] pSrcA points to the first input sequence.
4510 * @param[in] srcALen length of the first input sequence.
4511 * @param[in] pSrcB points to the second input sequence.
4512 * @param[in] srcBLen length of the second input sequence.
4513 * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
4525 @param[in] pSrcA points to the first input sequence
4526 @param[in] srcALen length of the first input sequence
4527 @param[in] pSrcB points to the second input sequence
4528 @param[in] srcBLen length of the second input sequence
4529 @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
4541 * @param[in] pSrcA points to the first input sequence.
4542 * @param[in] srcALen length of the first input sequence.
4543 * @param[in] pSrcB points to the second input sequence.
4544 * @param[in] srcBLen length of the second input sequence.
4545 … * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
4561 * @param[in] pSrcA points to the first input sequence.
4562 * @param[in] srcALen length of the first input sequence.
4563 * @param[in] pSrcB points to the second input sequence.
4564 * @param[in] srcBLen length of the second input sequence.
4565 * @param[out] pDst points to the block of output data Length 2 * max(srcALen, srcBLen) - 1.
4576 * @brief Instance structure for the floating-point sparse FIR filter.
4580 uint16_t numTaps; /**< number of coefficients in the filter. */
4581 …nt16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buf…
4582 …float32_t *pState; /**< points to the state buffer array. The array is of length maxDel…
4583 …const float32_t *pCoeffs; /**< points to the coefficient array. The array is of length n…
4584 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
4585 …int32_t *pTapDelay; /**< points to the array of delay values. The array is of length nu…
4589 * @brief Instance structure for the Q31 sparse FIR filter.
4593 uint16_t numTaps; /**< number of coefficients in the filter. */
4594 …nt16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buf…
4595 …q31_t *pState; /**< points to the state buffer array. The array is of length maxDel…
4596 …const q31_t *pCoeffs; /**< points to the coefficient array. The array is of length n…
4597 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
4598 …int32_t *pTapDelay; /**< points to the array of delay values. The array is of length nu…
4602 * @brief Instance structure for the Q15 sparse FIR filter.
4606 uint16_t numTaps; /**< number of coefficients in the filter. */
4607 …nt16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buf…
4608 …q15_t *pState; /**< points to the state buffer array. The array is of length maxDel…
4609 …const q15_t *pCoeffs; /**< points to the coefficient array. The array is of length n…
4610 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
4611 …int32_t *pTapDelay; /**< points to the array of delay values. The array is of length nu…
4615 * @brief Instance structure for the Q7 sparse FIR filter.
4619 uint16_t numTaps; /**< number of coefficients in the filter. */
4620 …nt16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buf…
4621 …q7_t *pState; /**< points to the state buffer array. The array is of length maxDel…
4622 …const q7_t *pCoeffs; /**< points to the coefficient array. The array is of length n…
4623 uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
4624 …int32_t *pTapDelay; /**< points to the array of delay values. The array is of length nu…
4629 * @brief Processing function for the floating-point sparse FIR filter.
4630 * @param[in] S points to an instance of the floating-point sparse FIR structure.
4631 * @param[in] pSrc points to the block of input data.
4632 * @param[out] pDst points to the block of output data
4645 * @brief Initialization function for the floating-point sparse FIR filter.
4646 * @param[in,out] S points to an instance of the floating-point sparse FIR structure.
4647 * @param[in] numTaps number of nonzero coefficients in the filter.
4648 * @param[in] pCoeffs points to the array of filter coefficients.
4649 * @param[in] pState points to the state buffer.
4650 * @param[in] pTapDelay points to the array of offset times.
4665 * @brief Processing function for the Q31 sparse FIR filter.
4666 * @param[in] S points to an instance of the Q31 sparse FIR structure.
4667 * @param[in] pSrc points to the block of input data.
4668 * @param[out] pDst points to the block of output data
4681 * @brief Initialization function for the Q31 sparse FIR filter.
4682 * @param[in,out] S points to an instance of the Q31 sparse FIR structure.
4683 * @param[in] numTaps number of nonzero coefficients in the filter.
4684 * @param[in] pCoeffs points to the array of filter coefficients.
4685 * @param[in] pState points to the state buffer.
4686 * @param[in] pTapDelay points to the array of offset times.
4701 * @brief Processing function for the Q15 sparse FIR filter.
4702 * @param[in] S points to an instance of the Q15 sparse FIR structure.
4703 * @param[in] pSrc points to the block of input data.
4704 * @param[out] pDst points to the block of output data
4719 * @brief Initialization function for the Q15 sparse FIR filter.
4720 * @param[in,out] S points to an instance of the Q15 sparse FIR structure.
4721 * @param[in] numTaps number of nonzero coefficients in the filter.
4722 * @param[in] pCoeffs points to the array of filter coefficients.
4723 * @param[in] pState points to the state buffer.
4724 * @param[in] pTapDelay points to the array of offset times.
4739 * @brief Processing function for the Q7 sparse FIR filter.
4740 * @param[in] S points to an instance of the Q7 sparse FIR structure.
4741 * @param[in] pSrc points to the block of input data.
4742 * @param[out] pDst points to the block of output data
4757 * @brief Initialization function for the Q7 sparse FIR filter.
4758 * @param[in,out] S points to an instance of the Q7 sparse FIR structure.
4759 * @param[in] numTaps number of nonzero coefficients in the filter.
4760 * @param[in] pCoeffs points to the array of filter coefficients.
4761 * @param[in] pState points to the state buffer.
4762 * @param[in] pTapDelay points to the array of offset times.
4779 * @param[out] pSinVal points to the processed sine output.
4780 * @param[out] pCosVal points to the processed cos output.
4791 * @param[out] pSinVal points to the processed sine output.
4792 * @param[out] pCosVal points to the processed cosine output.
4802 * @param[in] pSrc points to the input vector
4803 * @param[out] pDst points to the output vector
4813 * @param[in] pSrc points to the input vector
4814 * @param[out] pDst points to the output vector
4825 * @param[in] pSrc points to the input vector
4826 * @param[out] pDst points to the output vector
4837 * @param[in] pSrc points to the complex input vector
4838 * @param[out] pDst points to the real output vector
4839 * @param[in] numSamples number of complex samples in the input vector
4849 * @param[in] pSrc points to the complex input vector
4850 * @param[out] pDst points to the real output vector
4851 * @param[in] numSamples number of complex samples in the input vector
4861 * @param[in] pSrc points to the complex input vector
4862 * @param[out] pDst points to the real output vector
4863 * @param[in] numSamples number of complex samples in the input vector
4880 * A PID controller is the most commonly used type of feedback controller.
4883 * for Q15, Q31, and floating-point data types. The functions operate on a single sample
4884 * of data and each call to the function returns a single processed value.
4885 * <code>S</code> points to an instance of the PID control data structure. <code>in</code>
4886 * is the input sample value. The functions return the output value.
4903 * The PID controller calculates an "error" value as the difference between
4904 * the measured output and the reference input.
4905 * The controller attempts to minimize the error by adjusting the process control inputs.
4906 * The proportional value determines the reaction to the current error,
4907 * the integral value determines the reaction based on the sum of recent errors,
4908 …* and the derivative value determines the reaction based on the rate at which the error has been c…
4911 …* The Gains A0, A1, A2 and state variables for a PID controller are stored together in an instance…
4913 * There are separate instance structure declarations for each of the 3 supported data types.
4916 * There is also an associated reset function for each data type which clears the state array.
4920 * The initialization function performs the following operations:
4921 * - Initializes the Gains A0, A1, A2 from Kp,Ki, Kd gains.
4922 * - Zeros out the values in the state buffer.
4925 …* Instance structure cannot be placed into a const data section and it is recommended to use the i…
4928 * Care must be taken when using the fixed-point versions of the PID Controller functions.
4929 …* In particular, the overflow and saturation behavior of the accumulator used in each function mus…
4930 * Refer to the function specific documentation below for usage guidelines.
4939 * @brief Process function for the floating-point PID Control.
4940 * @param[in,out] S is an instance of the floating-point PID Control structure
4965 @brief Process function for the Q31 PID Control.
4966 @param[in,out] S points to an instance of the Q31 PID Control structure
4971 The function is implemented using an internal 64-bit accumulator.
4972The accumulator has a 2.62 format and maintains full precision of the intermediate multiplication …
4973 Thus, if the accumulator result overflows it wraps around rather than clip.
4974 …In order to avoid overflows completely the input signal must be scaled down by 2 bits as there are…
4975 …After all multiply-accumulates are performed, the 2.62 accumulator is truncated to 1.32 format and…
5010 @brief Process function for the Q15 PID Control.
5011 @param[in,out] S points to an instance of the Q15 PID Control structure
5016 The function is implemented using a 64-bit internal accumulator.
5018 The 2.30 intermediate results are accumulated in a 64-bit accumulator in 34.30 format.
5019 …There is no risk of internal overflow with this approach and the full precision of intermediate mu…
5020 …After all additions have been performed, the accumulator is truncated to 34.15 format by discardin…
5021 Lastly, the accumulator is saturated to yield a result in 1.15 format.
5050 /* saturate the output */ in arm_pid_q15()
5069 * @param[in] src points to the instance of the input floating-point matrix structure.
5070 * @param[out] dst points to the instance of the output floating-point matrix structure.
5071 * @return The function returns ARM_MATH_SIZE_MISMATCH, if the dimensions do not match.
5072 …* If the input matrix is singular (does not have an inverse), then the algorithm terminates and re…
5081 * @param[in] src points to the instance of the input floating-point matrix structure.
5082 * @param[out] dst points to the instance of the output floating-point matrix structure.
5083 * @return The function returns ARM_MATH_SIZE_MISMATCH, if the dimensions do not match.
5084 …* If the input matrix is singular (does not have an inverse), then the algorithm terminates and re…
5098 …* Forward Clarke transform converts the instantaneous stator phases into a two-coordinate time inv…
5099 …* Generally the Clarke transform uses three-phase currents <code>Ia, Ib and Ic</code> to calculate…
5100 * in the two-phase orthogonal stator axis <code>Ialpha</code> and <code>Ibeta</code>.
5101 * When <code>Ialpha</code> is superposed with <code>Ia</code> as shown in the figure below
5106 …* The function operates on a single sample of data and each call to the function returns the proce…
5107 * The library provides separate functions for Q31 and floating-point data types.
5110 * where <code>Ia</code> and <code>Ib</code> are the instantaneous stator phases and
5111 * <code>pIalpha</code> and <code>pIbeta</code> are the two coordinates of time invariant vector.
5113 * Care must be taken when using the Q31 version of the Clarke transform.
5114 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
5115 * Refer to the function specific documentation below for usage guidelines.
5138 /* Calculate pIalpha using the equation, pIalpha = Ia */ in arm_clarke_f32()
5141 /* Calculate pIbeta using the equation, pIbeta = (1/sqrt(3)) * Ia + (2/sqrt(3)) * Ib */ in arm_clarke_f32()
5155 The function is implemented using an internal 32-bit accumulator.
5156The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplicati…
5157 There is saturation on the addition, hence there is no risk of overflow.
5176 /* pIbeta is calculated by adding the intermediate products */ in arm_clarke_q31()
5191 …* Inverse Clarke transform converts the two-coordinate time invariant vector into instantaneous st…
5193 …* The function operates on a single sample of data and each call to the function returns the proce…
5194 * The library provides separate functions for Q31 and floating-point data types.
5197 * where <code>pIa</code> and <code>pIb</code> are the instantaneous stator phases and
5198 * <code>Ialpha</code> and <code>Ibeta</code> are the two coordinates of time invariant vector.
5200 * Care must be taken when using the Q31 version of the Clarke transform.
5201 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
5202 * Refer to the function specific documentation below for usage guidelines.
5241 The function is implemented using an internal 32-bit accumulator.
5242The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplicati…
5243 There is saturation on the subtraction, hence there is no risk of overflow.
5262 /* pIb is calculated by subtracting the products */ in arm_inv_clarke_q31()
5279 * Forward Park transform converts the input two-coordinate vector to flux and torque components.
5280 …* The Park transform can be used to realize the transformation of the <code>Ialpha</code> and the
5281 * from the stationary to the moving reference frame and control the spatial relationship between
5282 * the stator vector current and rotor flux vector.
5283 * If we consider the d axis aligned with the rotor flux, the diagram below shows the
5284 * current vector and the relationship from the two reference frames:
5285 …* \image html park.gif "Stator current space vector and its component in (a,b) and in the d,q rota…
5287 …* The function operates on a single sample of data and each call to the function returns the proce…
5288 * The library provides separate functions for Q31 and floating-point data types.
5291 * where <code>Ialpha</code> and <code>Ibeta</code> are the stator vector components,
5292 …code>pIq</code> are rotor vector components and <code>cosVal</code> and <code>sinVal</code> are the
5295 * Care must be taken when using the Q31 version of the Park transform.
5296 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
5297 * Refer to the function specific documentation below for usage guidelines.
5315 * The function implements the forward Park transform.
5326 /* Calculate pId using the equation, pId = Ialpha * cosVal + Ibeta * sinVal */ in arm_park_f32()
5329 /* Calculate pIq using the equation, pIq = - Ialpha * sinVal + Ibeta * cosVal */ in arm_park_f32()
5345 The function is implemented using an internal 32-bit accumulator.
5346The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplicati…
5347 There is saturation on the addition and subtraction, hence there is no risk of overflow.
5373 /* Calculate pId by adding the two intermediate products 1 and 2 */ in arm_park_q31()
5376 /* Calculate pIq by subtracting the two intermediate products 3 from 4 */ in arm_park_q31()
5391 * Inverse Park transform converts the input flux and torque components to two-coordinate vector.
5393 …* The function operates on a single sample of data and each call to the function returns the proce…
5394 * The library provides separate functions for Q31 and floating-point data types.
5397 * where <code>pIalpha</code> and <code>pIbeta</code> are the stator vector components,
5398 …<code>Iq</code> are rotor vector components and <code>cosVal</code> and <code>sinVal</code> are the
5401 * Care must be taken when using the Q31 version of the Park transform.
5402 * In particular, the overflow and saturation behavior of the accumulator used must be considered.
5403 * Refer to the function specific documentation below for usage guidelines.
5429 /* Calculate pIalpha using the equation, pIalpha = Id * cosVal - Iq * sinVal */ in arm_inv_park_f32()
5432 /* Calculate pIbeta using the equation, pIbeta = Id * sinVal + Iq * cosVal */ in arm_inv_park_f32()
5448 The function is implemented using an internal 32-bit accumulator.
5449The accumulator maintains 1.31 format by truncating lower 31 bits of the intermediate multiplicati…
5450 There is saturation on the addition, hence there is no risk of overflow.
5476 /* Calculate pIalpha by using the two intermediate products 1 and 2 */ in arm_inv_park_q31()
5479 /* Calculate pIbeta by using the two intermediate products 3 and 4 */ in arm_inv_park_q31()
5496 …vely drawing a straight line between two neighboring samples and returning the appropriate point a…
5502 * A Linear Interpolate function calculates an output value(y), for the input(x)
5503 …* using linear interpolation of the input values x0, x1( nearest input values) and the output valu…
5514 * for Q7, Q15, Q31, and floating-point data types. The functions operate on a single
5515 * sample of data and each call to the function returns a single processed value.
5516 * <code>S</code> points to an instance of the Linear Interpolate function data structure.
5517 * <code>x</code> is the input sample value. The functions returns the output value.
5520 * if x is outside of the table boundary, Linear interpolation returns first value of the table
5530 * @brief Process function for the floating-point Linear Interpolation Function.
5531 * @param[in,out] S is an instance of the floating-point Linear Interpolation structure
5582 * @brief Process function for the Q31 Linear Interpolation Function.
5604 /* 12 bits for the table index */ in arm_linear_interp_q31()
5618 /* 20 bits for the fractional part */ in arm_linear_interp_q31()
5622 /* Read two nearest output values from the index in 1.31(q31) format */ in arm_linear_interp_q31()
5640 * @brief Process function for the Q15 Linear Interpolation Function.
5662 /* 12 bits for the table index */ in arm_linear_interp_q15()
5676 /* 20 bits for the fractional part */ in arm_linear_interp_q15()
5680 /* Read two nearest output values from the index */ in arm_linear_interp_q15()
5698 * @brief Process function for the Q7 Linear Interpolation Function.
5719 /* 12 bits for the table index */ in arm_linear_interp_q7()
5733 /* 20 bits for the fractional part */ in arm_linear_interp_q7()
5737 /* Read two nearest output values from the index and are in 1.7(q7) format */ in arm_linear_interp_q7()
5757 * @brief Fast approximation to the trigonometric sine function for floating-point data.
5766 * @brief Fast approximation to the trigonometric sine function for Q31 data.
5775 * @brief Fast approximation to the trigonometric sine function for Q15 data.
5784 * @brief Fast approximation to the trigonometric cosine function for floating-point data.
5793 * @brief Fast approximation to the trigonometric cosine function for Q31 data.
5802 * @brief Fast approximation to the trigonometric cosine function for Q15 data.
5818 * Computes the square root of a number.
5820 * The square root function is computed using the Newton-Raphson algorithm.
5821 * This is an iterative algorithm of the form:
5825 * where <code>x1</code> is the current estimate,
5826 * <code>x0</code> is the previous estimate, and
5827 * <code>f'(x0)</code> is the derivative of <code>f()</code> evaluated at <code>x0</code>.
5828 * For the square root function, the algorithm reduces to:
5885 …@param[in] in input value. The range of the input value is [0 +1) or 0x00000000 to 0x7FFFF…
5898 @param[in] in input value. The range of the input value is [0 +1) or 0x0000 to 0x7FFF
5913 …* @return The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUM…
5951 /* Copy the value of Index pointer that points in arm_circularWrite_f32()
5952 * to the current location where the input samples to be copied */ in arm_circularWrite_f32()
5955 /* Loop over the blockSize */ in arm_circularWrite_f32()
5960 /* copy the input sample to the circular buffer */ in arm_circularWrite_f32()
5963 /* Update the input pointer */ in arm_circularWrite_f32()
5971 /* Decrement the loop counter */ in arm_circularWrite_f32()
5975 /* Update the index pointer */ in arm_circularWrite_f32()
5999 /* Copy the value of Index pointer that points in arm_circularRead_f32()
6000 * to the current location from where the input samples to be read */ in arm_circularRead_f32()
6004 /* Loop over the blockSize */ in arm_circularRead_f32()
6009 /* copy the sample from the circular buffer to the destination buffer */ in arm_circularRead_f32()
6012 /* Update the input pointer */ in arm_circularRead_f32()
6028 /* Decrement the loop counter */ in arm_circularRead_f32()
6032 /* Update the index pointer */ in arm_circularRead_f32()
6052 /* Copy the value of Index pointer that points in arm_circularWrite_q15()
6053 * to the current location where the input samples to be copied */ in arm_circularWrite_q15()
6056 /* Loop over the blockSize */ in arm_circularWrite_q15()
6061 /* copy the input sample to the circular buffer */ in arm_circularWrite_q15()
6064 /* Update the input pointer */ in arm_circularWrite_q15()
6072 /* Decrement the loop counter */ in arm_circularWrite_q15()
6076 /* Update the index pointer */ in arm_circularWrite_q15()
6099 /* Copy the value of Index pointer that points in arm_circularRead_q15()
6100 * to the current location from where the input samples to be read */ in arm_circularRead_q15()
6105 /* Loop over the blockSize */ in arm_circularRead_q15()
6110 /* copy the sample from the circular buffer to the destination buffer */ in arm_circularRead_q15()
6113 /* Update the input pointer */ in arm_circularRead_q15()
6129 /* Decrement the loop counter */ in arm_circularRead_q15()
6133 /* Update the index pointer */ in arm_circularRead_q15()
6153 /* Copy the value of Index pointer that points in arm_circularWrite_q7()
6154 * to the current location where the input samples to be copied */ in arm_circularWrite_q7()
6157 /* Loop over the blockSize */ in arm_circularWrite_q7()
6162 /* copy the input sample to the circular buffer */ in arm_circularWrite_q7()
6165 /* Update the input pointer */ in arm_circularWrite_q7()
6173 /* Decrement the loop counter */ in arm_circularWrite_q7()
6177 /* Update the index pointer */ in arm_circularWrite_q7()
6200 /* Copy the value of Index pointer that points in arm_circularRead_q7()
6201 * to the current location from where the input samples to be read */ in arm_circularRead_q7()
6206 /* Loop over the blockSize */ in arm_circularRead_q7()
6211 /* copy the sample from the circular buffer to the destination buffer */ in arm_circularRead_q7()
6214 /* Update the input pointer */ in arm_circularRead_q7()
6230 /* Decrement the loop counter */ in arm_circularRead_q7()
6234 /* Update the index pointer */ in arm_circularRead_q7()
6240 * @brief Sum of the squares of the elements of a Q31 vector.
6242 * @param[in] blockSize is the number of samples to process
6252 * @brief Sum of the squares of the elements of a floating-point vector.
6254 * @param[in] blockSize is the number of samples to process
6264 * @brief Sum of the squares of the elements of a Q15 vector.
6266 * @param[in] blockSize is the number of samples to process
6276 * @brief Sum of the squares of the elements of a Q7 vector.
6278 * @param[in] blockSize is the number of samples to process
6290 * @param[in] blockSize is the number of samples to process
6302 * @param[in] blockSize is the number of samples to process
6314 * @param[in] blockSize is the number of samples to process
6326 * @param[in] blockSize is the number of samples to process
6336 * @brief Variance of the elements of a floating-point vector.
6338 * @param[in] blockSize is the number of samples to process
6348 * @brief Variance of the elements of a Q31 vector.
6350 * @param[in] blockSize is the number of samples to process
6360 * @brief Variance of the elements of a Q15 vector.
6362 * @param[in] blockSize is the number of samples to process
6372 * @brief Root Mean Square of the elements of a floating-point vector.
6374 * @param[in] blockSize is the number of samples to process
6384 * @brief Root Mean Square of the elements of a Q31 vector.
6386 * @param[in] blockSize is the number of samples to process
6396 * @brief Root Mean Square of the elements of a Q15 vector.
6398 * @param[in] blockSize is the number of samples to process
6408 * @brief Standard deviation of the elements of a floating-point vector.
6410 * @param[in] blockSize is the number of samples to process
6420 * @brief Standard deviation of the elements of a Q31 vector.
6422 * @param[in] blockSize is the number of samples to process
6432 * @brief Standard deviation of the elements of a Q15 vector.
6434 * @param[in] blockSize is the number of samples to process
6445 * @param[in] pSrc points to the complex input vector
6446 * @param[out] pDst points to the real output vector
6447 * @param[in] numSamples number of complex samples in the input vector
6457 * @param[in] pSrc points to the complex input vector
6458 * @param[out] pDst points to the real output vector
6459 * @param[in] numSamples number of complex samples in the input vector
6469 * @param[in] pSrc points to the complex input vector
6470 * @param[out] pDst points to the real output vector
6471 * @param[in] numSamples number of complex samples in the input vector
6481 * @param[in] pSrcA points to the first input vector
6482 * @param[in] pSrcB points to the second input vector
6484 * @param[out] realResult real part of the result returned here
6485 * @param[out] imagResult imaginary part of the result returned here
6497 * @param[in] pSrcA points to the first input vector
6498 * @param[in] pSrcB points to the second input vector
6500 * @param[out] realResult real part of the result returned here
6501 * @param[out] imagResult imaginary part of the result returned here
6513 * @param[in] pSrcA points to the first input vector
6514 * @param[in] pSrcB points to the second input vector
6516 * @param[out] realResult real part of the result returned here
6517 * @param[out] imagResult imaginary part of the result returned here
6529 * @param[in] pSrcCmplx points to the complex input vector
6530 * @param[in] pSrcReal points to the real input vector
6531 * @param[out] pCmplxDst points to the complex output vector
6543 * @param[in] pSrcCmplx points to the complex input vector
6544 * @param[in] pSrcReal points to the real input vector
6545 * @param[out] pCmplxDst points to the complex output vector
6557 * @param[in] pSrcCmplx points to the complex input vector
6558 * @param[in] pSrcReal points to the real input vector
6559 * @param[out] pCmplxDst points to the complex output vector
6572 * @param[in] blockSize is the number of samples to process
6574 * @param[in] index is the array index of the minimum value in the input buffer.
6586 * @param[in] blockSize is the number of samples to process
6588 * @param[in] pIndex is the array index of the minimum value in the input buffer.
6600 * @param[in] blockSize is the number of samples to process
6602 * @param[out] pIndex is the array index of the minimum value in the input buffer.
6614 * @param[in] blockSize is the number of samples to process
6616 * @param[out] pIndex is the array index of the minimum value in the input buffer.
6627 * @param[in] pSrc points to the input buffer
6628 * @param[in] blockSize length of the input vector
6641 * @param[in] pSrc points to the input buffer
6642 * @param[in] blockSize length of the input vector
6655 * @param[in] pSrc points to the input buffer
6656 * @param[in] blockSize length of the input vector
6669 * @param[in] pSrc points to the input buffer
6670 * @param[in] blockSize length of the input vector
6683 * @param[in] pSrcA points to the first input vector
6684 * @param[in] pSrcB points to the second input vector
6685 * @param[out] pDst points to the output vector
6697 * @param[in] pSrcA points to the first input vector
6698 * @param[in] pSrcB points to the second input vector
6699 * @param[out] pDst points to the output vector
6711 * @param[in] pSrcA points to the first input vector
6712 * @param[in] pSrcB points to the second input vector
6713 * @param[out] pDst points to the output vector
6724 * @brief Converts the elements of the floating-point vector to Q31 vector.
6725 * @param[in] pSrc points to the floating-point input vector
6726 * @param[out] pDst points to the Q31 output vector
6727 * @param[in] blockSize length of the input vector
6736 * @brief Converts the elements of the floating-point vector to Q15 vector.
6737 * @param[in] pSrc points to the floating-point input vector
6738 * @param[out] pDst points to the Q15 output vector
6739 * @param[in] blockSize length of the input vector
6748 * @brief Converts the elements of the floating-point vector to Q7 vector.
6749 * @param[in] pSrc points to the floating-point input vector
6750 * @param[out] pDst points to the Q7 output vector
6751 * @param[in] blockSize length of the input vector
6760 * @brief Converts the elements of the Q31 vector to floating-point vector.
6763 * @param[in] blockSize is the number of samples to process
6772 * @brief Converts the elements of the Q31 vector to Q15 vector.
6775 * @param[in] blockSize is the number of samples to process
6784 * @brief Converts the elements of the Q31 vector to Q7 vector.
6787 * @param[in] blockSize is the number of samples to process
6796 * @brief Converts the elements of the Q15 vector to floating-point vector.
6799 * @param[in] blockSize is the number of samples to process
6808 * @brief Converts the elements of the Q15 vector to Q31 vector.
6811 * @param[in] blockSize is the number of samples to process
6820 * @brief Converts the elements of the Q15 vector to Q7 vector.
6823 * @param[in] blockSize is the number of samples to process
6832 * @brief Converts the elements of the Q7 vector to floating-point vector.
6835 * @param[in] blockSize is the number of samples to process
6844 * @brief Converts the elements of the Q7 vector to Q31 vector.
6856 * @brief Converts the elements of the Q7 vector to Q15 vector.
6875 …* The underlying function <code>f(x, y)</code> is sampled on a regular grid and the interpolation …
6876 * determines values between the grid points.
6877 …ion is equivalent to two step linear interpolation, first in the x-dimension and then in the y-dim…
6879 …* The CMSIS DSP library provides bilinear interpolation functions for Q7, Q15, Q31, and floating-p…
6883 …* The instance structure used by the bilinear interpolation functions describes a two dimensional …
6884 * For floating-point, the instance structure is defined as:
6895 * where <code>numRows</code> specifies the number of rows in the table;
6896 * <code>numCols</code> specifies the number of columns in the table;
6898 …* The data table <code>pTable</code> is organized in row order and the supplied data values fall o…
6902 * Let <code>(x, y)</code> specify the desired interpolation point. Then define:
6908 * The interpolated output point is computed as:
6915 * Note that the coordinates (x, y) contain integer and fractional components.
6916 * The integer components specify which portion of the table to use while the
6917 * fractional components control the interpolation processor.
6920 * if (x,y) are outside of the table boundary, Bilinear interpolation returns zero output.
6931 * @param[in,out] S points to an instance of the interpolation structure.
6996 * @param[in,out] S points to an instance of the interpolation structure.
7015 /* 12 bits for the table index */ in arm_bilinear_interp_q31()
7020 /* 12 bits for the table index */ in arm_bilinear_interp_q31()
7031 /* 20 bits for the fractional part */ in arm_bilinear_interp_q31()
7035 /* Read two nearest output values from the index */ in arm_bilinear_interp_q31()
7039 /* 20 bits for the fractional part */ in arm_bilinear_interp_q31()
7043 /* Read two nearest output values from the index */ in arm_bilinear_interp_q31()
7070 * @param[in,out] S points to an instance of the interpolation structure.
7089 /* 12 bits for the table index */ in arm_bilinear_interp_q15()
7094 /* 12 bits for the table index */ in arm_bilinear_interp_q15()
7105 /* 20 bits for the fractional part */ in arm_bilinear_interp_q15()
7109 /* Read two nearest output values from the index */ in arm_bilinear_interp_q15()
7113 /* 20 bits for the fractional part */ in arm_bilinear_interp_q15()
7117 /* Read two nearest output values from the index */ in arm_bilinear_interp_q15()
7148 * @param[in,out] S points to an instance of the interpolation structure.
7167 /* 12 bits for the table index */ in arm_bilinear_interp_q7()
7172 /* 12 bits for the table index */ in arm_bilinear_interp_q7()
7183 /* 20 bits for the fractional part */ in arm_bilinear_interp_q7()
7187 /* Read two nearest output values from the index */ in arm_bilinear_interp_q7()
7191 /* 20 bits for the fractional part */ in arm_bilinear_interp_q7()
7195 /* Read two nearest output values from the index */ in arm_bilinear_interp_q7()