42 volatile uint16_t v_loop_ACoefficients_size = (
sizeof(v_loop_coefficients.ACoefficients)/
sizeof(v_loop_coefficients.ACoefficients[0]));
43 volatile uint16_t v_loop_BCoefficients_size = (
sizeof(v_loop_coefficients.BCoefficients)/
sizeof(v_loop_coefficients.BCoefficients[0]));
46 volatile uint16_t v_loop_ControlHistory_size = (
sizeof(v_loop_histories.ControlHistory)/
sizeof(v_loop_histories.ControlHistory[0]));
47 volatile uint16_t v_loop_ErrorHistory_size = (
sizeof(v_loop_histories.ErrorHistory)/
sizeof(v_loop_histories.ErrorHistory[0]));
63 volatile int32_t v_loop_ACoefficients [3] =
70 volatile int32_t v_loop_BCoefficients [4] =
79 volatile int16_t v_loop_pre_scaler = 3;
80 volatile int16_t v_loop_post_shift_A = 0;
81 volatile int16_t v_loop_post_shift_B = 0;
82 volatile fractional v_loop_post_scaler = 0x0000;
85 volatile int16_t v_loop_pterm_factor = 0x6188;
86 volatile int16_t v_loop_pterm_scaler = 0xFFFF;
103 volatile uint16_t v_loop_Initialize(
volatile struct NPNZ16b_s* controller)
105 volatile uint16_t i=0;
127 v_loop_coefficients.ACoefficients[i] = v_loop_ACoefficients[i];
128 v_loop_coefficients.ACoefficients[i] = v_loop_ACoefficients[i];
129 v_loop_coefficients.ACoefficients[i] = v_loop_ACoefficients[i];
135 v_loop_coefficients.BCoefficients[i] = v_loop_BCoefficients[i];
136 v_loop_coefficients.BCoefficients[i] = v_loop_BCoefficients[i];
137 v_loop_coefficients.BCoefficients[i] = v_loop_BCoefficients[i];
138 v_loop_coefficients.BCoefficients[i] = v_loop_BCoefficients[i];
142 v_loop_Reset(&v_loop);
volatile uint16_t value
Controller status full register access.
volatile int16_t normPostShiftA
Normalization of A-term control output to Q15 (R/W)
volatile int16_t PTermScaler
Q15 P-Term Coefficient Bit-Shift Scaler (R/W)
volatile fractional * ptrErrorHistory
Pointer to n+1 delay-line samples located in Y-space with first sample being the most recent.
volatile uint16_t ControlHistoryArraySize
Size of the control history array in Y-space.
volatile fractional * ptrControlHistory
Pointer to n delay-line samples located in Y-space with first sample being the most recent.
volatile int32_t * ptrACoefficients
Pointer to A coefficients located in X-space.
volatile uint16_t ACoefficientsArraySize
Size of the A coefficients array in X-space.
volatile uint16_t BCoefficientsArraySize
Size of the B coefficients array in X-space.
volatile int32_t * ptrBCoefficients
Pointer to B coefficients located in X-space.
volatile struct NPNZ_STATUS_s status
Control Loop Status and Control flags.
volatile uint16_t ErrorHistoryArraySize
Size of the error history array in Y-space.
volatile int16_t normPreShift
Normalization of ADC-resolution to Q15 (R/W)
volatile int16_t normPostScaler
Control output normalization factor (Q15) (R/W)
volatile int16_t normPostShiftB
Normalization of B-term control output to Q15 (R/W)
volatile struct NPNZ_FILTER_PARAMS_s Filter
Filter parameters such as pointer to history and coefficient arrays and number scaling.
volatile int16_t PTermFactor
Q15 P-Term Coefficient Factor (R/W)