Improved documentation

Corrected issues #7 and #8
Removed duplicates
Started using Mathjax
pull/34/head
Christophe Favergeon 4 years ago
parent 6a7b8879f4
commit 5721f94b28

@ -1022,7 +1022,6 @@ table.markdownTable {
table.markdownTable td, table.markdownTable th {
border: 1px solid var(--arm_light_gray);
padding: 7px 10px 5px;
text-align:left;
}
table.markdownTable th {
@ -1048,6 +1047,18 @@ table.markdownTable th a:hover{
color: var(--arm_yellow);
}
th.markdownTableHeadLeft, td.markdownTableBodyLeft {
text-align: left
}
th.markdownTableHeadRight, td.markdownTableBodyRight {
text-align: right
}
th.markdownTableHeadCenter, td.markdownTableBodyCenter {
text-align: center
}
/* @end */

@ -104,10 +104,11 @@ extern "C"
q31_t * pSinVal,
q31_t * pCosVal);
/**
* @ingroup groupController
*/
/**
@ingroup groupController
*/
/**
* @defgroup PID PID Motor Control
*
@ -168,6 +169,7 @@ extern "C"
/**
* @ingroup PID
* @brief Instance structure for the Q15 PID Control.
*/
typedef struct
@ -186,6 +188,7 @@ extern "C"
} arm_pid_instance_q15;
/**
* @ingroup PID
* @brief Instance structure for the Q31 PID Control.
*/
typedef struct
@ -200,6 +203,7 @@ extern "C"
} arm_pid_instance_q31;
/**
* @ingroup PID
* @brief Instance structure for the floating-point PID Control.
*/
typedef struct
@ -271,12 +275,10 @@ extern "C"
/**
* @addtogroup PID
* @{
*/
/**
* @ingroup PID
* @brief Process function for the floating-point PID Control.
* @param[in,out] S is an instance of the floating-point PID Control structure
* @param[in] in input sample to process
@ -303,6 +305,7 @@ extern "C"
}
/**
@ingroup PID
@brief Process function for the Q31 PID Control.
@param[in,out] S points to an instance of the Q31 PID Control structure
@param[in] in input sample to process
@ -348,6 +351,7 @@ __STATIC_FORCEINLINE q31_t arm_pid_q31(
/**
@ingroup PID
@brief Process function for the Q15 PID Control.
@param[in,out] S points to an instance of the Q15 PID Control structure
@param[in] in input sample to process
@ -400,9 +404,7 @@ __STATIC_FORCEINLINE q15_t arm_pid_q15(
return (out);
}
/**
* @} end of PID group
*/
/**
* @ingroup groupController
@ -432,12 +434,10 @@ __STATIC_FORCEINLINE q15_t arm_pid_q15(
* Refer to the function specific documentation below for usage guidelines.
*/
/**
* @addtogroup park
* @{
*/
/**
* @ingroup park
* @brief Floating-point Park transform
* @param[in] Ialpha input two-phase vector coordinate alpha
* @param[in] Ibeta input two-phase vector coordinate beta
@ -467,6 +467,7 @@ __STATIC_FORCEINLINE q15_t arm_pid_q15(
/**
@ingroup park
@brief Park transform for Q31 version
@param[in] Ialpha input two-phase vector coordinate alpha
@param[in] Ibeta input two-phase vector coordinate beta
@ -512,9 +513,6 @@ __STATIC_FORCEINLINE void arm_park_q31(
*pIq = __QSUB(product4, product3);
}
/**
* @} end of park group
*/
/**
@ -538,12 +536,10 @@ __STATIC_FORCEINLINE void arm_park_q31(
* Refer to the function specific documentation below for usage guidelines.
*/
/**
* @addtogroup inv_park
* @{
*/
/**
* @ingroup inv_park
* @brief Floating-point Inverse Park transform
* @param[in] Id input coordinate of rotor reference frame d
* @param[in] Iq input coordinate of rotor reference frame q
@ -570,6 +566,7 @@ __STATIC_FORCEINLINE void arm_park_q31(
/**
@ingroup inv_park
@brief Inverse Park transform for Q31 version
@param[in] Id input coordinate of rotor reference frame d
@param[in] Iq input coordinate of rotor reference frame q
@ -615,9 +612,6 @@ __STATIC_FORCEINLINE void arm_inv_park_q31(
*pIbeta = __QADD(product4, product3);
}
/**
* @} end of Inverse park group
*/
/**
* @ingroup groupController
@ -645,13 +639,10 @@ __STATIC_FORCEINLINE void arm_inv_park_q31(
* Refer to the function specific documentation below for usage guidelines.
*/
/**
* @addtogroup clarke
* @{
*/
/**
*
* @ingroup clarke
* @brief Floating-point Clarke transform
* @param[in] Ia input three-phase coordinate <code>a</code>
* @param[in] Ib input three-phase coordinate <code>b</code>
@ -674,6 +665,7 @@ __STATIC_FORCEINLINE void arm_inv_park_q31(
/**
@ingroup clarke
@brief Clarke transform for Q31 version
@param[in] Ia input three-phase coordinate <code>a</code>
@param[in] Ib input three-phase coordinate <code>b</code>
@ -707,9 +699,6 @@ __STATIC_FORCEINLINE void arm_clarke_q31(
*pIbeta = __QADD(product1, product2);
}
/**
* @} end of clarke group
*/
/**
@ -732,12 +721,10 @@ __STATIC_FORCEINLINE void arm_clarke_q31(
* Refer to the function specific documentation below for usage guidelines.
*/
/**
* @addtogroup inv_clarke
* @{
*/
/**
* @ingroup inv_clarke
* @brief Floating-point Inverse Clarke transform
* @param[in] Ialpha input two-phase orthogonal vector axis alpha
* @param[in] Ibeta input two-phase orthogonal vector axis beta
@ -760,6 +747,7 @@ __STATIC_FORCEINLINE void arm_clarke_q31(
/**
@ingroup inv_clarke
@brief Inverse Clarke transform for Q31 version
@param[in] Ialpha input two-phase orthogonal vector axis alpha
@param[in] Ibeta input two-phase orthogonal vector axis beta
@ -793,9 +781,7 @@ __STATIC_FORCEINLINE void arm_inv_clarke_q31(
*pIb = __QSUB(product2, product1);
}
/**
* @} end of inv_clarke group
*/

@ -33,19 +33,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicAbs Vector Absolute Value
Computes the absolute value of a vector on an element-by-element basis.
<pre>
pDst[n] = abs(pSrc[n]), 0 <= n < blockSize.
</pre>
The functions support in-place computation allowing the source and
destination pointers to reference the same memory buffer.
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
*/
/**
@addtogroup BasicAbs

@ -32,17 +32,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicAdd Vector Addition
Element-by-element addition of two vectors.
<pre>
pDst[n] = pSrcA[n] + pSrcB[n], 0 <= n < blockSize.
</pre>
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
*/
/**
@addtogroup BasicAdd

@ -32,18 +32,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicDotProd Vector Dot Product
Computes the dot product of two vectors.
The vectors are multiplied element-by-element and then summed.
<pre>
sum = pSrcA[0]*pSrcB[0] + pSrcA[1]*pSrcB[1] + ... + pSrcA[blockSize-1]*pSrcB[blockSize-1]
</pre>
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
*/
/**
@addtogroup BasicDotProd

@ -32,17 +32,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicMult Vector Multiplication
Element-by-element multiplication of two vectors.
<pre>
pDst[n] = pSrcA[n] * pSrcB[n], 0 <= n < blockSize.
</pre>
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
*/
/**
@addtogroup BasicMult

@ -32,19 +32,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicNegate Vector Negate
Negates the elements of a vector.
<pre>
pDst[n] = -pSrc[n], 0 <= n < blockSize.
</pre>
The functions support in-place computation allowing the source and
destination pointers to reference the same memory buffer.
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
*/
/**
@addtogroup BasicNegate

@ -32,20 +32,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicOffset Vector Offset
Adds a constant offset to each element of a vector.
<pre>
pDst[n] = pSrc[n] + offset, 0 <= n < blockSize.
</pre>
The functions support in-place computation allowing the source and
destination pointers to reference the same memory buffer.
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
*/
/**
@addtogroup BasicOffset
@{

@ -32,32 +32,7 @@
@ingroup groupMath
*/
/**
@defgroup BasicScale Vector Scale
Multiply a vector by a scalar value. For floating-point data, the algorithm used is:
<pre>
pDst[n] = pSrc[n] * scale, 0 <= n < blockSize.
</pre>
In the fixed-point Q7, Q15, and Q31 functions, <code>scale</code> is represented by
a fractional multiplication <code>scaleFract</code> and an arithmetic shift <code>shift</code>.
The shift allows the gain of the scaling operation to exceed 1.0.
The algorithm used with fixed-point data is:
<pre>
pDst[n] = (pSrc[n] * scaleFract) << shift, 0 <= n < blockSize.
</pre>
The overall scale factor applied to the fixed-point data is
<pre>
scale = scaleFract * 2^shift.
</pre>
The functions support in-place computation allowing the source and destination
pointers to reference the same memory buffer.
*/
/**
@addtogroup BasicScale

@ -32,17 +32,6 @@
@ingroup groupMath
*/
/**
@defgroup BasicSub Vector Subtraction
Element-by-element subtraction of two vectors.
<pre>
pDst[n] = pSrcA[n] - pSrcB[n], 0 <= n < blockSize.
</pre>
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
*/
/**
@addtogroup BasicSub

@ -33,28 +33,6 @@
@ingroup groupCmplxMath
*/
/**
@defgroup cmplx_conj Complex Conjugate
Conjugates the elements of a complex data vector.
The <code>pSrc</code> points to the source data and
<code>pDst</code> points to the destination data where the result should be written.
<code>numSamples</code> specifies the number of complex samples
and the data in each array is stored in an interleaved fashion
(real, imag, real, imag, ...).
Each array has a total of <code>2*numSamples</code> values.
The underlying algorithm is used:
<pre>
for (n = 0; n < numSamples; n++) {
pDst[(2*n) ] = pSrc[(2*n) ]; // real part
pDst[(2*n)+1] = -pSrc[(2*n)+1]; // imag part
}
</pre>
There are separate functions for floating-point, Q15, and Q31 data types.
*/
/**
@addtogroup cmplx_conj

@ -35,32 +35,6 @@
@ingroup groupCmplxMath
*/
/**
@defgroup cmplx_dot_prod Complex Dot Product
Computes the dot product of two complex vectors.
The vectors are multiplied element-by-element and then summed.
The <code>pSrcA</code> points to the first complex input vector and
<code>pSrcB</code> points to the second complex input vector.
<code>numSamples</code> specifies the number of complex samples
and the data in each array is stored in an interleaved fashion
(real, imag, real, imag, ...).
Each array has a total of <code>2*numSamples</code> values.
The underlying algorithm is used:
<pre>
realResult = 0;
imagResult = 0;
for (n = 0; n < numSamples; n++) {
realResult += pSrcA[(2*n)+0] * pSrcB[(2*n)+0] - pSrcA[(2*n)+1] * pSrcB[(2*n)+1];
imagResult += pSrcA[(2*n)+0] * pSrcB[(2*n)+1] + pSrcA[(2*n)+1] * pSrcB[(2*n)+0];
}
</pre>
There are separate functions for floating-point, Q15, and Q31 data types.
*/
/**
@addtogroup cmplx_dot_prod

@ -33,29 +33,7 @@
@ingroup groupCmplxMath
*/
/**
@defgroup cmplx_mag Complex Magnitude
Computes the magnitude of the elements of a complex data vector.
The <code>pSrc</code> points to the source data and
<code>pDst</code> points to the where the result should be written.
<code>numSamples</code> specifies the number of complex samples
in the input array and the data is stored in an interleaved fashion
(real, imag, real, imag, ...).
The input array has a total of <code>2*numSamples</code> values;
the output array has a total of <code>numSamples</code> values.
The underlying algorithm is used:
<pre>
for (n = 0; n < numSamples; n++) {
pDst[n] = sqrt(pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2);
}
</pre>
There are separate functions for floating-point, Q15, and Q31 data types.
*/
/**
@addtogroup cmplx_mag

@ -32,29 +32,7 @@
@ingroup groupCmplxMath
*/
/**
@defgroup cmplx_mag Complex Magnitude
Computes the magnitude of the elements of a complex data vector.
The <code>pSrc</code> points to the source data and
<code>pDst</code> points to the where the result should be written.
<code>numSamples</code> specifies the number of complex samples
in the input array and the data is stored in an interleaved fashion
(real, imag, real, imag, ...).
The input array has a total of <code>2*numSamples</code> values;
the output array has a total of <code>numSamples</code> values.
The underlying algorithm is used:
<pre>
for (n = 0; n < numSamples; n++) {
pDst[n] = sqrt(pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2);
}
</pre>
There are separate functions for floating-point, Q15, and Q31 data types.
*/
/**
@addtogroup cmplx_mag

@ -34,29 +34,6 @@
@ingroup groupCmplxMath
*/
/**
@defgroup cmplx_mag_squared Complex Magnitude Squared
Computes the magnitude squared of the elements of a complex data vector.
The <code>pSrc</code> points to the source data and
<code>pDst</code> points to the where the result should be written.
<code>numSamples</code> specifies the number of complex samples
in the input array and the data is stored in an interleaved fashion
(real, imag, real, imag, ...).
The input array has a total of <code>2*numSamples</code> values;
the output array has a total of <code>numSamples</code> values.
The underlying algorithm is used:
<pre>
for (n = 0; n < numSamples; n++) {
pDst[n] = pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2;
}
</pre>
There are separate functions for floating-point, Q15, and Q31 data types.
*/
/**
@addtogroup cmplx_mag_squared

@ -34,27 +34,7 @@
@ingroup groupCmplxMath
*/
/**
@defgroup CmplxByCmplxMult Complex-by-Complex Multiplication
Multiplies a complex vector by another complex vector and generates a complex result.
The data in the complex arrays is stored in an interleaved fashion
(real, imag, real, imag, ...).
The parameter <code>numSamples</code> represents the number of complex
samples processed. The complex arrays have a total of <code>2*numSamples</code>
real values.
The underlying algorithm is used:
<pre>
for (n = 0; n < numSamples; n++) {
pDst[(2*n)+0] = pSrcA[(2*n)+0] * pSrcB[(2*n)+0] - pSrcA[(2*n)+1] * pSrcB[(2*n)+1];
pDst[(2*n)+1] = pSrcA[(2*n)+0] * pSrcB[(2*n)+1] + pSrcA[(2*n)+1] * pSrcB[(2*n)+0];
}
</pre>
There are separate functions for floating-point, Q15, and Q31 data types.
*/
/**
@addtogroup CmplxByCmplxMult

@ -34,28 +34,6 @@
@ingroup groupCmplxMath
*/
/**
@defgroup CmplxByRealMult Complex-by-Real Multiplication
Multiplies a complex vector by a real vector and generates a complex result.
The data in the complex arrays is stored in an interleaved fashion
(real, imag, real, imag, ...).
The parameter <code>numSamples</code> represents the number of complex
samples processed. The complex arrays have a total of <code>2*numSamples</code>
real values while the real array has a total of <code>numSamples</code>
real values.
The underlying algorithm is used:
<pre>
for (n = 0; n < numSamples; n++) {
pCmplxDst[(2*n)+0] = pSrcCmplx[(2*n)+0] * pSrcReal[n];
pCmplxDst[(2*n)+1] = pSrcCmplx[(2*n)+1] * pSrcReal[n];
}
</pre>
There are separate functions for floating-point, Q15, and Q31 data types.
*/
/**
@addtogroup CmplxByRealMult

@ -35,11 +35,6 @@
@ingroup groupFastMath
*/
/**
@defgroup divide Fixed point division
*/
/**
@addtogroup divide
@{

@ -29,6 +29,8 @@
#include "dsp/fast_math_functions.h"
#include "arm_common_tables.h"
#define Q12QUARTER 0x2000
/**
@ingroup groupFastMath
*/
@ -47,7 +49,6 @@
- \ref ARM_MATH_ARGUMENT_ERROR : input value is negative; *pOut is set to 0
*/
#define Q12QUARTER 0x2000
arm_status arm_sqrt_q15(
q15_t in,
q15_t * pOut)

@ -29,6 +29,8 @@
#include "dsp/fast_math_functions.h"
#include "arm_common_tables.h"
#define Q28QUARTER 0x20000000
/**
@ingroup groupFastMath
*/
@ -46,7 +48,6 @@
- \ref ARM_MATH_SUCCESS : input value is positive
- \ref ARM_MATH_ARGUMENT_ERROR : input value is negative; *pOut is set to 0
*/
#define Q28QUARTER 0x20000000
arm_status arm_sqrt_q31(
q31_t in,

@ -34,7 +34,18 @@
#include "arm_vec_math_f16.h"
/**
@addtogroup vexp
@{
*/
/**
@brief Floating-point vector of exp values.
@param[in] pSrc points to the input vector
@param[out] pDst points to the output vector
@param[in] blockSize number of samples in each vector
@return none
*/
void arm_vexp_f16(
const float16_t * pSrc,
float16_t * pDst,
@ -80,3 +91,6 @@ void arm_vexp_f16(
#endif /* #if defined(ARM_FLOAT16_SUPPORTED) */
/**
@} end of vexp group
*/

@ -33,6 +33,28 @@
#include "arm_vec_math.h"
#endif
/**
@ingroup groupFastMath
*/
/**
@defgroup vexp Vector Exponential
Compute the exp values of a vector of samples.
*/
/**
@addtogroup vexp
@{
*/
/**
@brief Floating-point vector of exp values.
@param[in] pSrc points to the input vector
@param[out] pDst points to the output vector
@param[in] blockSize number of samples in each vector
@return none
*/
void arm_vexp_f32(
const float32_t * pSrc,
float32_t * pDst,
@ -95,3 +117,7 @@ void arm_vexp_f32(
blkCnt--;
}
}
/**
@} end of vexp group
*/

@ -29,6 +29,18 @@
#include "dsp/fast_math_functions.h"
#include "arm_common_tables.h"
/**
@addtogroup vexp
@{
*/
/**
@brief Floating-point vector of exp values.
@param[in] pSrc points to the input vector
@param[out] pDst points to the output vector
@param[in] blockSize number of samples in each vector
@return none
*/
void arm_vexp_f64(
const float64_t * pSrc,
float64_t * pDst,
@ -49,3 +61,7 @@ void arm_vexp_f64(
blkCnt--;
}
}
/**
@} end of vexp group
*/

@ -78,6 +78,12 @@
@par Opt Versions
Opt versions are supported for Q15 and Q7. Design uses internal scratch buffer for getting good optimisation.
These versions are optimised in cycles and consumes more memory (Scratch memory) compared to Q15 and Q7 versions
@par Long versions:
For convolution of long vectors, those functions are
no more adapted and will be very slow.
An implementation based upon FFTs should be used.
*/
/**

@ -56,6 +56,12 @@
@par Opt Versions
Opt versions are supported for Q15 and Q7. Design uses internal scratch buffer for getting good optimisation.
These versions are optimised in cycles and consumes more memory (Scratch memory) compared to Q15 and Q7 versions of partial convolution
@par Long versions:
For convolution of long vectors, those functions are
no more adapted and will be very slow.
An implementation based upon FFTs should be used.
*/
/**

@ -33,51 +33,7 @@
@ingroup groupFilters
*/
/**
@defgroup Corr Correlation
Correlation is a mathematical operation that is similar to convolution.
As with convolution, correlation uses two signals to produce a third signal.
The underlying algorithms in correlation and convolution are identical except that one of the inputs is flipped in convolution.
Correlation is commonly used to measure the similarity between two signals.
It has applications in pattern recognition, cryptanalysis, and searching.
The CMSIS library provides correlation functions for Q7, Q15, Q31 and floating-point data types.
Fast versions of the Q15 and Q31 functions are also provided.
@par Algorithm
Let <code>a[n]</code> and <code>b[n]</code> be sequences of length <code>srcALen</code> and <code>srcBLen</code> samples respectively.
The convolution of the two signals is denoted by
<pre>
c[n] = a[n] * b[n]
</pre>
In correlation, one of the signals is flipped in time
<pre>
c[n] = a[n] * b[-n]
</pre>
@par
and this is mathematically defined as
\image html CorrelateEquation.gif
@par
The <code>pSrcA</code> points to the first input vector of length <code>srcALen</code> and <code>pSrcB</code> points to the second input vector of length <code>srcBLen</code>.
The result <code>c[n]</code> is of length <code>2 * max(srcALen, srcBLen) - 1</code> and is defined over the interval <code>n=0, 1, 2, ..., (2 * max(srcALen, srcBLen) - 2)</code>.
The output result is written to <code>pDst</code> and the calling function must allocate <code>2 * max(srcALen, srcBLen) - 1</code> words for the result.
@note
The <code>pDst</code> should be initialized to all zeros before being used.
@par Fixed-Point Behavior
Correlation requires summing up a large number of intermediate products.
As such, the Q7, Q15, and Q31 functions run a risk of overflow and saturation.
Refer to the function specific documentation below for further details of the particular algorithm used.
@par Fast Versions
Fast versions are supported for Q31 and Q15. Cycles for Fast versions are less compared to Q31 and Q15 of correlate and the design requires
the input signals should be scaled down to avoid intermediate overflows.
@par Opt Versions
Opt versions are supported for Q15 and Q7. Design uses internal scratch buffer for getting good optimisation.
These versions are optimised in cycles and consumes more memory (Scratch memory) compared to Q15 and Q7 versions of correlate
*/
/**
@addtogroup Corr

@ -76,6 +76,11 @@
@par Opt Versions
Opt versions are supported for Q15 and Q7. Design uses internal scratch buffer for getting good optimisation.
These versions are optimised in cycles and consumes more memory (Scratch memory) compared to Q15 and Q7 versions of correlate
@par Long versions:
For convolution of long vectors, those functions are
no more adapted and will be very slow.
An implementation based upon FFTs should be used.
*/
/**

@ -32,10 +32,7 @@
@ingroup groupFilters
*/
/**
@defgroup LD Levinson Durbin Algorithm
*/
/**
@addtogroup LD

@ -93,10 +93,7 @@ __STATIC_FORCEINLINE q31_t divide(q31_t n, q31_t d)
@ingroup groupFilters
*/
/**
@defgroup LD Levinson Durbin Algorithm
*/
/**
@addtogroup LD

@ -35,57 +35,6 @@
@ingroup groupInterpolation
*/
/**
* @defgroup BilinearInterpolate Bilinear Interpolation
*
* Bilinear interpolation is an extension of linear interpolation applied to a two dimensional grid.
* The underlying function <code>f(x, y)</code> is sampled on a regular grid and the interpolation process
* determines values between the grid points.
* Bilinear interpolation is equivalent to two step linear interpolation, first in the x-dimension and then in the y-dimension.
* Bilinear interpolation is often used in image processing to rescale images.
* The CMSIS DSP library provides bilinear interpolation functions for Q7, Q15, Q31, and floating-point data types.
*
* <b>Algorithm</b>
* \par
* The instance structure used by the bilinear interpolation functions describes a two dimensional data table.
* For floating-point, the instance structure is defined as:
* <pre>
* typedef struct
* {
* uint16_t numRows;
* uint16_t numCols;
* float16_t *pData;
* } arm_bilinear_interp_instance_f16;
* </pre>
*
* \par
* where <code>numRows</code> specifies the number of rows in the table;
* <code>numCols</code> specifies the number of columns in the table;
* and <code>pData</code> points to an array of size <code>numRows*numCols</code> values.
* The data table <code>pTable</code> is organized in row order and the supplied data values fall on integer indexes.
* That is, table element (x,y) is located at <code>pTable[x + y*numCols]</code> where x and y are integers.
*
* \par
* Let <code>(x, y)</code> specify the desired interpolation point. Then define:
* <pre>
* XF = floor(x)
* YF = floor(y)
* </pre>
* \par
* The interpolated output point is computed as:
* <pre>
* f(x, y) = f(XF, YF) * (1-(x-XF)) * (1-(y-YF))
* + f(XF+1, YF) * (x-XF)*(1-(y-YF))
* + f(XF, YF+1) * (1-(x-XF))*(y-YF)
* + f(XF+1, YF+1) * (x-XF)*(y-YF)
* </pre>
* Note that the coordinates (x, y) contain integer and fractional components.
* The integer components specify which portion of the table to use while the
* fractional components control the interpolation processor.
*
* \par
* if (x,y) are outside of the table boundary, Bilinear interpolation returns zero output.
*/
/**

@ -35,37 +35,6 @@
@ingroup groupInterpolation
*/
/**
* @defgroup LinearInterpolate Linear Interpolation
*
* Linear interpolation is a method of curve fitting using linear polynomials.
* Linear interpolation works by effectively drawing a straight line between two neighboring samples and returning the appropriate point along that line
*
* \par
* \image html LinearInterp.gif "Linear interpolation"
*
* \par
* A Linear Interpolate function calculates an output value(y), for the input(x)
* using linear interpolation of the input values x0, x1( nearest input values) and the output values y0 and y1(nearest output values)
*
* \par Algorithm:
* <pre>
* y = y0 + (x - x0) * ((y1 - y0)/(x1-x0))
* where x0, x1 are nearest values of input x
* y0, y1 are nearest values to output y
* </pre>
*
* \par
* This set of functions implements Linear interpolation process
* for Q7, Q15, Q31, and floating-point data types. The functions operate on a single
* sample of data and each call to the function returns a single processed value.
* <code>S</code> points to an instance of the Linear Interpolate function data structure.
* <code>x</code> is the input sample value. The functions returns the output value.
*
* \par
* if x is outside of the table boundary, Linear interpolation returns first value of the table
* if x is below input range and returns last value of table if x is above range.
*/
/**
* @addtogroup LinearInterpolate

@ -32,10 +32,7 @@
@ingroup groupMatrix
*/
/**
@defgroup MatrixInit Matrix Initialization
*/
/**
@addtogroup MatrixInit

@ -41,7 +41,27 @@
*
* Multiplies two matrices.
*
* \image html MatrixMultiplication.gif "Multiplication of two 3 x 3 matrices"
* @par Multiplication of two 3x3 matrices:
*
* \f[
* \begin{pmatrix}
* a_{1,1} & a_{1,2} & a_{1,3} \\
* a_{2,1} & a_{2,2} & a_{2,3} \\
* a_{3,1} & a_{3,2} & a_{3,3} \\
* \end{pmatrix}
*
* \begin{pmatrix}
* b_{1,1} & b_{1,2} & b_{1,3} \\
* b_{2,1} & b_{2,2} & b_{2,3} \\
* b_{3,1} & b_{3,2} & b_{3,3} \\
* \end{pmatrix}
* =
* \begin{pmatrix}
* a_{1,1} b_{1,1}+a_{1,2} b_{2,1}+a_{1,3} b_{3,1} & a_{1,1} b_{1,2}+a_{1,2} b_{2,2}+a_{1,3} b_{3,2} & a_{1,1} b_{1,3}+a_{1,2} b_{2,3}+a_{1,3} b_{3,3} \\
* a_{2,1} b_{1,1}+a_{2,2} b_{2,1}+a_{2,3} b_{3,1} & a_{2,1} b_{1,2}+a_{2,2} b_{2,2}+a_{2,3} b_{3,2} & a_{2,1} b_{1,3}+a_{2,2} b_{2,3}+a_{2,3} b_{3,3} \\
* a_{3,1} b_{1,1}+a_{3,2} b_{2,1}+a_{3,3} b_{3,1} & a_{3,1} b_{1,2}+a_{3,2} b_{2,2}+a_{3,3} b_{3,2} & a_{3,1} b_{1,3}+a_{3,2} b_{2,3}+a_{3,3} b_{3,3} \\
* \end{pmatrix}
* \f]
* Matrix multiplication is only defined if the number of columns of the
* first matrix equals the number of rows of the second matrix.

@ -32,23 +32,6 @@
* @ingroup groupMatrix
*/
/**
* @defgroup MatrixMult Matrix Multiplication
*
* Multiplies two matrices.
*
* \image html MatrixMultiplication.gif "Multiplication of two 3 x 3 matrices"
* Matrix multiplication is only defined if the number of columns of the
* first matrix equals the number of rows of the second matrix.
* Multiplying an <code>M x N</code> matrix with an <code>N x P</code> matrix results
* in an <code>M x P</code> matrix.
* When matrix size checking is enabled, the functions check: (1) that the inner dimensions of
* <code>pSrcA</code> and <code>pSrcB</code> are equal; and (2) that the size of the output
* matrix equals the outer dimensions of <code>pSrcA</code> and <code>pSrcB</code>.
*/
/**
* @addtogroup MatrixMult
* @{

@ -32,16 +32,6 @@
@ingroup groupMatrix
*/
/**
@defgroup MatrixSub Matrix Subtraction
Subtract two matrices.
\image html MatrixSubtraction.gif "Subraction of two 3 x 3 matrices"
The functions check to make sure that
<code>pSrcA</code>, <code>pSrcB</code>, and <code>pDst</code> have the same
number of rows and columns.
*/
/**
@addtogroup MatrixSub

@ -32,14 +32,7 @@
@ingroup groupMatrix
*/
/**
@defgroup MatrixTrans Matrix Transpose
Tranposes a matrix.
Transposing an <code>M x N</code> matrix flips it around the center diagonal and results in an <code>N x M</code> matrix.
\image html MatrixTranspose.gif "Transpose of a 3 x 3 matrix"
*/
/**
@addtogroup MatrixTrans

@ -33,20 +33,11 @@
#include <limits.h>
#include <math.h>
/**
* @defgroup groupSVM SVM Functions
*
*/
/**
@ingroup groupSVM
*/
/**
@defgroup linearsvm Linear SVM
Linear SVM classifier
*/
/**
* @addtogroup linearsvm

@ -37,11 +37,6 @@
@ingroup groupSVM
*/
/**
@defgroup polysvm Polynomial SVM
Polynomial SVM classifier
*/
/**
* @addtogroup polysvm

@ -37,11 +37,6 @@
@ingroup groupSVM
*/
/**
@defgroup rbfsvm RBF SVM
RBF SVM classifier
*/
/**

@ -37,11 +37,6 @@
@ingroup groupSVM
*/
/**
@defgroup sigmoidsvm Sigmoid SVM
Sigmoid SVM classifier
*/
/**
* @addtogroup sigmoidsvm

@ -35,18 +35,7 @@
@ingroup groupStats
*/
/**
@defgroup RMS Root mean square (RMS)
Calculates the Root Mean Square of the elements in the input vector.
The underlying algorithm is used:
<pre>
Result = sqrt(((pSrc[0] * pSrc[0] + pSrc[1] * pSrc[1] + ... + pSrc[blockSize-1] * pSrc[blockSize-1]) / blockSize));
</pre>
There are separate functions for floating point, Q31, and Q15 data types.
*/
/**
@addtogroup RMS

@ -467,99 +467,6 @@ void merge_rfft_f16(
@ingroup groupTransforms
*/
/**
@defgroup RealFFT Real FFT Functions
@par
The CMSIS DSP library includes specialized algorithms for computing the
FFT of real data sequences. The FFT is defined over complex data but
in many applications the input is real. Real FFT algorithms take advantage
of the symmetry properties of the FFT and have a speed advantage over complex
algorithms of the same length.
@par
The Fast RFFT algorithm relays on the mixed radix CFFT that save processor usage.
@par
The real length N forward FFT of a sequence is computed using the steps shown below.
@par
\image html RFFT.gif "Real Fast Fourier Transform"
@par
The real sequence is initially treated as if it were complex to perform a CFFT.
Later, a processing stage reshapes the data to obtain half of the frequency spectrum
in complex format. Except the first complex number that contains the two real numbers
X[0] and X[N/2] all the data is complex. In other words, the first complex sample
contains two real values packed.
@par
The input for the inverse RFFT should keep the same format as the output of the
forward RFFT. A first processing stage pre-process the data to later perform an
inverse CFFT.
@par
\image html RIFFT.gif "Real Inverse Fast Fourier Transform"
@par
The algorithms for floating-point, Q15, and Q31 data are slightly different
and we describe each algorithm in turn.
@par Floating-point
The main functions are \ref arm_rfft_fast_f16() and \ref arm_rfft_fast_init_f16().
@par
The FFT of a real N-point sequence has even symmetry in the frequency domain.
The second half of the data equals the conjugate of the first half flipped in frequency.
Looking at the data, we see that we can uniquely represent the FFT using only N/2 complex numbers.
These are packed into the output array in alternating real and imaginary components:
@par
X = { real[0], imag[0], real[1], imag[1], real[2], imag[2] ...
real[(N/2)-1], imag[(N/2)-1 }
@par
It happens that the first complex number (real[0], imag[0]) is actually
all real. real[0] represents the DC offset, and imag[0] should be 0.
(real[1], imag[1]) is the fundamental frequency, (real[2], imag[2]) is
the first harmonic and so on.
@par
The real FFT functions pack the frequency domain data in this fashion.
The forward transform outputs the data in this form and the inverse
transform expects input data in this form. The function always performs
the needed bitreversal so that the input and output data is always in
normal order. The functions support lengths of [32, 64, 128, ..., 4096]
samples.
@par Q15 and Q31
The real algorithms are defined in a similar manner and utilize N/2 complex
transforms behind the scenes.
@par
The complex transforms used internally include scaling to prevent fixed-point
overflows. The overall scaling equals 1/(fftLen/2).
Due to the use of complex transform internally, the source buffer is
modified by the rfft.
@par
A separate instance structure must be defined for each transform used but
twiddle factor and bit reversal tables can be reused.
@par
There is also an associated initialization function for each data type.
The initialization function performs the following operations:
- Sets the values of the internal structure fields.
- Initializes twiddle factor table and bit reversal table pointers.
- Initializes the internal complex FFT data structure.
@par
Use of the initialization function is optional **except for MVE versions where it is mandatory**.
If you don't use the initialization functions, then the structures should be initialized with code
similar to the one below:
<pre>
arm_rfft_instance_q31 S = {fftLenReal, fftLenBy2, ifftFlagR, bitReverseFlagR, twidCoefRModifier, pTwiddleAReal, pTwiddleBReal, pCfft};
arm_rfft_instance_q15 S = {fftLenReal, fftLenBy2, ifftFlagR, bitReverseFlagR, twidCoefRModifier, pTwiddleAReal, pTwiddleBReal, pCfft};
</pre>
where <code>fftLenReal</code> is the length of the real transform;
<code>fftLenBy2</code> length of the internal complex transform (fftLenReal/2).
<code>ifftFlagR</code> Selects forward (=0) or inverse (=1) transform.
<code>bitReverseFlagR</code> Selects bit reversed output (=0) or normal order
output (=1).
<code>twidCoefRModifier</code> stride modifier for the twiddle factor table.
The value is based on the FFT length;
<code>pTwiddleAReal</code>points to the A array of twiddle coefficients;
<code>pTwiddleBReal</code>points to the B array of twiddle coefficients;
<code>pCfft</code> points to the CFFT Instance structure. The CFFT structure
must also be initialized.
@par
Note that with MVE versions you can't initialize instance structures directly and **must
use the initialization function**.
*/
/**
@addtogroup RealFFT

@ -495,6 +495,8 @@ void merge_rfft_f32(
The main functions are \ref arm_rfft_fast_f32() and \ref arm_rfft_fast_init_f32().
The older functions \ref arm_rfft_f32() and \ref arm_rfft_init_f32() have been deprecated
but are still documented.
For f16, the functions are \ref arm_rfft_fast_f16() and \ref arm_rfft_fast_init_f16().
For f64, the functions are \ref arm_rfft_fast_f64() and \ref arm_rfft_fast_init_f64().
@par
The FFT of a real N-point sequence has even symmetry in the frequency domain.
The second half of the data equals the conjugate of the first half flipped in frequency.

@ -64,10 +64,34 @@ void arm_split_rifft_q15(
Internally input is downscaled by 2 for every stage to avoid saturations inside CFFT/CIFFT process.
Hence the output format is different for different RFFT sizes.
The input and output formats for different RFFT sizes and number of bits to upscale are mentioned in the tables below for RFFT and RIFFT:
@par
\image html RFFTQ15.gif "Input and Output Formats for Q15 RFFT"
@par
\image html RIFFTQ15.gif "Input and Output Formats for Q15 RIFFT"
@par Input and Output formats for RFFT Q15
| RFFT Size | Input Format | Output Format | Number of bits to upscale |
| ---------: | ------------: | -------------: | ------------------------: |
| 32 | 1.15 | 5.11 | 5 |
| 64 | 1.15 | 6.10 | 6 |
| 128 | 1.15 | 7.9 | 7 |
| 256 | 1.15 | 8.8 | 8 |
| 512 | 1.15 | 9.7 | 9 |
| 1024 | 1.15 | 10.6 | 10 |
| 2048 | 1.15 | 11.5 | 11 |
| 4096 | 1.15 | 12.4 | 12 |
| 8192 | 1.15 | 13.3 | 13 |
@par Input and Output formats for RIFFT Q15
| RIFFT Size | Input Format | Output Format | Number of bits to upscale |
| ----------: | ------------: | -------------: | ------------------------: |
| 32 | 1.15 | 5.11 | 0 |
| 64 | 1.15 | 6.10 | 0 |
| 128 | 1.15 | 7.9 | 0 |
| 256 | 1.15 | 8.8 | 0 |
| 512 | 1.15 | 9.7 | 0 |
| 1024 | 1.15 | 10.6 | 0 |
| 2048 | 1.15 | 11.5 | 0 |
| 4096 | 1.15 | 12.4 | 0 |
| 8192 | 1.15 | 13.3 | 0 |
@par
If the input buffer is of length N, the output buffer must have length 2*N.
The input buffer is modified by this function.

@ -64,10 +64,34 @@ void arm_split_rifft_q31(
Internally input is downscaled by 2 for every stage to avoid saturations inside CFFT/CIFFT process.
Hence the output format is different for different RFFT sizes.
The input and output formats for different RFFT sizes and number of bits to upscale are mentioned in the tables below for RFFT and RIFFT:
@par
\image html RFFTQ31.gif "Input and Output Formats for Q31 RFFT"
@par
\image html RIFFTQ31.gif "Input and Output Formats for Q31 RIFFT"
@par Input and Output formats for RFFT Q31
| RFFT Size | Input Format | Output Format | Number of bits to upscale |
| ---------: | ------------: | -------------: | ------------------------: |
| 32 | 1.31 | 5.27 | 5 |
| 64 | 1.31 | 6.26 | 6 |
| 128 | 1.31 | 7.25 | 7 |
| 256 | 1.31 | 8.24 | 8 |
| 512 | 1.31 | 9.23 | 9 |
| 1024 | 1.31 | 10.22 | 10 |
| 2048 | 1.31 | 11.21 | 11 |
| 4096 | 1.31 | 12.20 | 12 |
| 8192 | 1.31 | 13.19 | 13 |
@par Input and Output formats for RIFFT Q31
| RIFFT Size | Input Format | Output Format | Number of bits to upscale |
| ----------: | ------------: | -------------: | ------------------------: |
| 32 | 1.31 | 5.27 | 0 |
| 64 | 1.31 | 6.26 | 0 |
| 128 | 1.31 | 7.25 | 0 |
| 256 | 1.31 | 8.24 | 0 |
| 512 | 1.31 | 9.23 | 0 |
| 1024 | 1.31 | 10.22 | 0 |
| 2048 | 1.31 | 11.21 | 0 |
| 4096 | 1.31 | 12.20 | 0 |
| 8192 | 1.31 | 13.19 | 0 |
@par
If the input buffer is of length N, the output buffer must have length 2*N.
The input buffer is modified by this function.

Loading…
Cancel
Save