|
AM263x Digital Power SDK
09.01.00
|
|
Go to the documentation of this file.
41 #ifndef SPLL_1PH_NOTCH_H
42 #define SPLL_1PH_NOTCH_H
77 #endif // IEEE754_TYPES
160 notch_freq=2*3.14159265f*spll_obj->
fn;
167 wn2=2*Fs*tanf(notch_freq* ((
float32_t)3.141592653589)*Ts);
169 temp1= 4*Fs*Fs + 4* wn2 * c2 * Fs + wn2*wn2;
170 temp2= 1/ ( 4*Fs*Fs + 4* wn2 * c1 * Fs + wn2*wn2);
174 spll_obj->
notch_coeff.
b2 = (4*Fs*Fs-4*wn2*c2*Fs+wn2*wn2)*temp2;
176 spll_obj->
notch_coeff.
a2 = (4*Fs*Fs-4*wn2*c1*Fs+wn2*wn2)*temp2;
199 spll_obj->
delta_t=((1.0f)/isrFrequency);
219 spll_obj->
upd[0] = acValue*spll_obj->
cosine;
239 spll_obj->
ylf[0] = spll_obj->
ylf[1]
249 spll_obj->
upd[2] = spll_obj->
upd[1];
250 spll_obj->
upd[1] = spll_obj->
upd[0];
258 spll_obj->
ylf[1] = spll_obj->
ylf[0];
263 spll_obj->
fo = spll_obj->
fn+spll_obj->
ylf[0];
284 #endif // end of _SPLL_1PH_NOTCH_H_ definition
float32_t delta_t
Inverse of the ISR rate at which module is called.
Definition: spll_1ph_notch.h:115
float32_t theta
Angle output (0-2*pi)
Definition: spll_1ph_notch.h:112
float32_t fn
Nominal frequency (Hz)
Definition: spll_1ph_notch.h:111
float32_t a2
Definition: spll_1ph_notch.h:87
Defines the SPLL_1PH_NOTCH_LPF_COEFF structure.
Definition: spll_1ph_notch.h:93
float float32_t
Definition: spll_1ph_notch.h:75
float32_t a1
Definition: spll_1ph_notch.h:96
static void SPLL_1PH_NOTCH_config(SPLL_1PH_NOTCH *spll_obj, float32_t acFreq, float32_t isrFrequency, float32_t lpf_b0, float32_t lpf_b1, float32_t c1, float32_t c2)
Configures the SPLL_1PH_NOTCH module.
Definition: spll_1ph_notch.h:189
SPLL_1PH_NOTCH_LPF_COEFF lpf_coeff
Loop filter coeffcient structure.
Definition: spll_1ph_notch.h:117
float32_t sine
Sine value of the PLL angle.
Definition: spll_1ph_notch.h:114
float32_t b1
Definition: spll_1ph_notch.h:85
float32_t b2
Definition: spll_1ph_notch.h:84
float32_t y_notch1[3]
Notch filter1 data storage.
Definition: spll_1ph_notch.h:107
float32_t b0
Definition: spll_1ph_notch.h:95
float32_t ylf[2]
Loop filter data storage.
Definition: spll_1ph_notch.h:109
float32_t fo
Output frequency of PLL(Hz)
Definition: spll_1ph_notch.h:110
float32_t upd[3]
Phase detect buffer.
Definition: spll_1ph_notch.h:106
float32_t a1
Definition: spll_1ph_notch.h:88
float32_t b1
Definition: spll_1ph_notch.h:94
float32_t b0
Definition: spll_1ph_notch.h:86
static void SPLL_1PH_NOTCH_reset(SPLL_1PH_NOTCH *spll_obj)
Resets internal data to zero,.
Definition: spll_1ph_notch.h:123
float32_t cosine
Cosine value of the PLL angle.
Definition: spll_1ph_notch.h:113
Defines the SPLL_1PH_NOTCH_COEFF structure.
Definition: spll_1ph_notch.h:83
SPLL_1PH_NOTCH_COEFF notch_coeff
Notch filter coeffcient structure.
Definition: spll_1ph_notch.h:116
double float64_t
Definition: spll_1ph_notch.h:76
float float32_t
Defines single,double precision data type. Note: Assumes ABI to be TI_EABI, does not support legacy T...
Definition: dcl_common.h:54
static void SPLL_1PH_NOTCH_run(SPLL_1PH_NOTCH *spll_obj, float32_t acValue)
Runs the SPLL_1PH_NOTCH module.
Definition: spll_1ph_notch.h:213
float32_t y_notch2[3]
Notch filter2 data storage.
Definition: spll_1ph_notch.h:108
static void SPLL_1PH_NOTCH_coeff_calc(SPLL_1PH_NOTCH *spll_obj, float32_t c1, float32_t c2)
Calculates the coefficients for SPLL_1PH_NOTCH filter.
Definition: spll_1ph_notch.h:152
Defines the SPLL_1PH_NOTCH structure.
Definition: spll_1ph_notch.h:105