From 96d6da4e252b06dcfdc041e7df23e86161c33007 Mon Sep 17 00:00:00 2001 From: rihab kouki Date: Tue, 28 Jul 2020 11:24:49 +0100 Subject: Official ARM version: v5.6.0 --- docs/DSP/html/group__PID.html | 131 +++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 71 deletions(-) (limited to 'docs/DSP/html/group__PID.html') diff --git a/docs/DSP/html/group__PID.html b/docs/DSP/html/group__PID.html index 7617f51..3c52850 100644 --- a/docs/DSP/html/group__PID.html +++ b/docs/DSP/html/group__PID.html @@ -32,7 +32,7 @@ Logo
CMSIS-DSP -  Version 1.5.2 +  Version 1.7.0
CMSIS DSP Software Library
@@ -116,16 +116,15 @@ $(document).ready(function(){initNavTree('group__PID.html','');}); - - - - - - - - - + + + + + + + + + @@ -152,7 +151,8 @@ Functions y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2] A0 = Kp + Ki + Kd A1 = (-Kp ) - (2 * Kd ) - A2 = Kd + A2 = Kd +
where Kp is proportional constant, Ki is Integral constant and Kd is Derivative constant
PID.gif @@ -170,12 +170,12 @@ Proportional Integral Derivative Controller
Instance structure cannot be placed into a const data section and it is recommended to use the initialization function.
Fixed-Point Behavior
Care must be taken when using the fixed-point versions of the PID Controller functions. In particular, the overflow and saturation behavior of the accumulator used in each function must be considered. Refer to the function specific documentation below for usage guidelines.

Function Documentation

- +

Functions

CMSIS_INLINE __STATIC_INLINE
-float32_t 
arm_pid_f32 (arm_pid_instance_f32 *S, float32_t in)
 Process function for the floating-point PID Control. More...
 
CMSIS_INLINE __STATIC_INLINE q31_t arm_pid_q31 (arm_pid_instance_q31 *S, q31_t in)
 Process function for the Q31 PID Control. More...
 
CMSIS_INLINE __STATIC_INLINE q15_t arm_pid_q15 (arm_pid_instance_q15 *S, q15_t in)
 Process function for the Q15 PID Control. More...
 
__STATIC_FORCEINLINE float32_t arm_pid_f32 (arm_pid_instance_f32 *S, float32_t in)
 Process function for the floating-point PID Control. More...
 
__STATIC_FORCEINLINE q31_t arm_pid_q31 (arm_pid_instance_q31 *S, q31_t in)
 Process function for the Q31 PID Control. More...
 
__STATIC_FORCEINLINE q15_t arm_pid_q15 (arm_pid_instance_q15 *S, q15_t in)
 Process function for the Q15 PID Control. More...
 
void arm_pid_init_f32 (arm_pid_instance_f32 *S, int32_t resetStateFlag)
 Initialization function for the floating-point PID Control. More...
 
- + @@ -200,9 +200,7 @@ Proportional Integral Derivative Controller
CMSIS_INLINE __STATIC_INLINE float32_t arm_pid_f32 __STATIC_FORCEINLINE float32_t arm_pid_f32 ( arm_pid_instance_f32 S,
-
Returns
out processed output sample.
- -

References arm_pid_instance_f32::A0, arm_pid_instance_f32::A1, arm_pid_instance_f32::A2, and arm_pid_instance_f32::state.

+
Returns
processed output sample.
@@ -231,17 +229,18 @@ Proportional Integral Derivative Controller
Parameters
- - + +
[in,out]*Spoints to an instance of the PID structure.
[in]resetStateFlagflag to reset the state. 0 = no change in state & 1 = reset the state.
[in,out]Spoints to an instance of the PID structure
[in]resetStateFlag
    +
  • value = 0: no change in state
  • +
  • value = 1: reset state
  • +
+
-
Returns
none.
-
Description:
-
The resetStateFlag specifies whether to set state to zero or not.
-The function computes the structure fields: A0, A1 A2 using the proportional gain( Kp), integral gain( Ki) and derivative gain( Kd) also sets the state variables to all zeros.
- -

References arm_pid_instance_f32::A0, arm_pid_instance_f32::A1, arm_pid_instance_f32::A2, arm_pid_instance_f32::Kd, arm_pid_instance_f32::Ki, arm_pid_instance_f32::Kp, and arm_pid_instance_f32::state.

+
Returns
none
+
Details
The resetStateFlag specifies whether to set state to zero or not.
+ The function computes the structure fields: A0, A1 A2 using the proportional gain( Kp), integral gain( Ki) and derivative gain( Kd) also sets the state variables to all zeros.
@@ -270,17 +269,18 @@ The function computes the structure fields: A0, A1
Parameters
- - + +
[in,out]*Spoints to an instance of the Q15 PID structure.
[in]resetStateFlagflag to reset the state. 0 = no change in state 1 = reset the state.
[in,out]Spoints to an instance of the Q15 PID structure
[in]resetStateFlag
    +
  • value = 0: no change in state
  • +
  • value = 1: reset state
  • +
+
-
Returns
none.
-
Description:
-
The resetStateFlag specifies whether to set state to zero or not.
-The function computes the structure fields: A0, A1 A2 using the proportional gain( Kp), integral gain( Ki) and derivative gain( Kd) also sets the state variables to all zeros.
- -

References __PKHBT, __QADD16(), arm_pid_instance_q15::A0, arm_pid_instance_q15::A1, arm_pid_instance_q15::A2, arm_pid_instance_q15::Kd, arm_pid_instance_q15::Ki, arm_pid_instance_q15::Kp, and arm_pid_instance_q15::state.

+
Returns
none
+
Details
The resetStateFlag specifies whether to set state to zero or not.
+ The function computes the structure fields: A0, A1 A2 using the proportional gain( Kp), integral gain( Ki) and derivative gain( Kd) also sets the state variables to all zeros.
@@ -309,26 +309,27 @@ The function computes the structure fields: A0, A1
Parameters
- - + +
[in,out]*Spoints to an instance of the Q31 PID structure.
[in]resetStateFlagflag to reset the state. 0 = no change in state 1 = reset the state.
[in,out]Spoints to an instance of the Q31 PID structure
[in]resetStateFlag
    +
  • value = 0: no change in state
  • +
  • value = 1: reset state
  • +
+
-
Returns
none.
-
Description:
-
The resetStateFlag specifies whether to set state to zero or not.
-The function computes the structure fields: A0, A1 A2 using the proportional gain( Kp), integral gain( Ki) and derivative gain( Kd) also sets the state variables to all zeros.
- -

References __QADD(), arm_pid_instance_q31::A0, arm_pid_instance_q31::A1, arm_pid_instance_q31::A2, clip_q63_to_q31(), arm_pid_instance_q31::Kd, arm_pid_instance_q31::Ki, arm_pid_instance_q31::Kp, and arm_pid_instance_q31::state.

+
Returns
none
+
Details
The resetStateFlag specifies whether to set state to zero or not.
+ The function computes the structure fields: A0, A1 A2 using the proportional gain( Kp), integral gain( Ki) and derivative gain( Kd) also sets the state variables to all zeros.
- +
- + @@ -353,20 +354,17 @@ The function computes the structure fields: A0, A1 -
Returns
out processed output sample.
-

Scaling and Overflow Behavior:

-
The function is implemented using a 64-bit internal accumulator. Both Gains and state variables are represented in 1.15 format and multiplications yield a 2.30 result. The 2.30 intermediate results are accumulated in a 64-bit accumulator in 34.30 format. There is no risk of internal overflow with this approach and the full precision of intermediate multiplications is preserved. After all additions have been performed, the accumulator is truncated to 34.15 format by discarding low 15 bits. Lastly, the accumulator is saturated to yield a result in 1.15 format.
- -

References __SIMD32_CONST, __SMLALD(), __SMUAD(), arm_pid_instance_q15::A0, arm_pid_instance_q15::A1, arm_pid_instance_q15::A2, and arm_pid_instance_q15::state.

+
Returns
processed output sample.
+
Scaling and Overflow Behavior
The function is implemented using a 64-bit internal accumulator. Both Gains and state variables are represented in 1.15 format and multiplications yield a 2.30 result. The 2.30 intermediate results are accumulated in a 64-bit accumulator in 34.30 format. There is no risk of internal overflow with this approach and the full precision of intermediate multiplications is preserved. After all additions have been performed, the accumulator is truncated to 34.15 format by discarding low 15 bits. Lastly, the accumulator is saturated to yield a result in 1.15 format.
- +
CMSIS_INLINE __STATIC_INLINE q15_t arm_pid_q15 __STATIC_FORCEINLINE q15_t arm_pid_q15 ( arm_pid_instance_q15 S,
- + @@ -391,11 +389,8 @@ The function computes the structure fields: A0, A1 -
Returns
out processed output sample.
-

Scaling and Overflow Behavior:

-
The function is implemented using an internal 64-bit accumulator. The accumulator has a 2.62 format and maintains full precision of the intermediate multiplication results but provides only a single guard bit. Thus, if the accumulator result overflows it wraps around rather than clip. In order to avoid overflows completely the input signal must be scaled down by 2 bits as there are four additions. After all multiply-accumulates are performed, the 2.62 accumulator is truncated to 1.32 format and then saturated to 1.31 format.
- -

References arm_pid_instance_q31::A0, arm_pid_instance_q31::A1, arm_pid_instance_q31::A2, and arm_pid_instance_q31::state.

+
Returns
processed output sample.
+
Scaling and Overflow Behavior
The function is implemented using an internal 64-bit accumulator. The accumulator has a 2.62 format and maintains full precision of the intermediate multiplication results but provides only a single guard bit. Thus, if the accumulator result overflows it wraps around rather than clip. In order to avoid overflows completely the input signal must be scaled down by 2 bits as there are four additions. After all multiply-accumulates are performed, the 2.62 accumulator is truncated to 1.32 format and then saturated to 1.31 format.
@@ -414,14 +409,12 @@ The function computes the structure fields: A0, A1
Parameters
CMSIS_INLINE __STATIC_INLINE q31_t arm_pid_q31 __STATIC_FORCEINLINE q31_t arm_pid_q31 ( arm_pid_instance_q31 S,
- +
[in]*SInstance pointer of PID control data structure.
[in,out]Spoints to an instance of the floating-point PID structure
-
Returns
none.
-
Description:
The function resets the state buffer to zeros.
- -

References arm_pid_instance_f32::state.

+
Returns
none
+
Details
The function resets the state buffer to zeros.
@@ -440,14 +433,12 @@ The function computes the structure fields: A0, A1
Parameters
- +
[in]*SInstance pointer of PID control data structure.
[in,out]Spoints to an instance of the Q15 PID structure
-
Returns
none.
-
Description:
The function resets the state buffer to zeros.
- -

References arm_pid_instance_q15::state.

+
Returns
none
+
Details
The function resets the state buffer to zeros.
@@ -466,14 +457,12 @@ The function computes the structure fields: A0, A1
Parameters
- +
[in]*SInstance pointer of PID control data structure.
[in,out]Spoints to an instance of the Q31 PID structure
-
Returns
none.
-
Description:
The function resets the state buffer to zeros.
- -

References arm_pid_instance_q31::state.

+
Returns
none
+
Details
The function resets the state buffer to zeros.
@@ -482,7 +471,7 @@ The function computes the structure fields: A0, A1