![](tilogo.gif) |
![](titagline.gif) |
Go to the documentation of this file.
18 #ifndef SPLL_1PH_SOGI_FLL_H
19 #define SPLL_1PH_SOGI_FLL_H
36 #ifndef __TMS320C28XX_CLA__
47 #ifndef C2000_IEEE754_TYPES
48 #define C2000_IEEE754_TYPES
56 #endif // C2000_IEEE754_TYPES
64 typedef volatile struct{
197 spll_obj->
w_dash = 2*3.14159265f*acFreq;
198 spll_obj->
wc = 2*3.14159265f*acFreq;
199 spll_obj->
delta_t=((1.0f)/isrFrequency);
201 spll_obj->
gamma=gamma;
222 spll_obj->
u[0]=acValue;
228 (spll_obj->
u[0]-spll_obj->
u[2])) +
244 spll_obj->
u[2]=spll_obj->
u[1];
245 spll_obj->
u[1]=spll_obj->
u[0];
258 spll_obj->
ylf[0]=spll_obj->
ylf[1] +
261 spll_obj->
ylf[1]=spll_obj->
ylf[0];
266 spll_obj->
u_Q[1]=spll_obj->
u_Q[0];
271 spll_obj->
fo=spll_obj->
fn+spll_obj->
ylf[0];
287 spll_obj->
ef2 = ((spll_obj->
u[0] - spll_obj->
osg_u[0])*spll_obj->
osg_qu[0])
290 spll_obj->
x3[0]=spll_obj->
x3[1] + spll_obj->
ef2;
295 spll_obj->
x3[1]=spll_obj->
x3[0];
297 spll_obj->
w_dash = spll_obj->
wc + spll_obj->
x3[0];
299 spll_obj->
fn = spll_obj->
w_dash / (2.0*3.1415926f);
327 #endif // end of _SPLL_1PH_SOGI_H_ definition
float32_t gamma
Gamma parameter for FLL.
Definition: spll_1ph_sogi_fll.h:107
float float32_t
Definition: sfra_f32.h:42
float32_t theta
Angle output (0-2*pi)
Definition: spll_1ph_sogi_fll.h:100
float32_t osg_qu[3]
Orthogonal signal generator quadrature data buffer.
Definition: spll_1ph_sogi_fll.h:93
float32_t fo
Output frequency of PLL(Hz)
Definition: spll_1ph_sogi_fll.h:97
float32_t fn
Nominal frequency (Hz)
Definition: spll_1ph_sogi_fll.h:98
SPLL_1PH_SOGI_FLL_OSG_COEFF osg_coeff
Orthogonal signal generator coefficient.
Definition: spll_1ph_sogi_fll.h:109
Defines the Orthogonal Signal Generator SPLL_1PH_SOGI_FLL structure.
Definition: spll_1ph_sogi_fll.h:90
float32_t x3[2]
FLL data storage.
Definition: spll_1ph_sogi_fll.h:105
float32_t u_Q[2]
Q-axis component.
Definition: spll_1ph_sogi_fll.h:94
float32_t k
K parameter for FLL.
Definition: spll_1ph_sogi_fll.h:108
float32_t osg_a1
Definition: spll_1ph_sogi_fll.h:67
float32_t osg_qb2
Definition: spll_1ph_sogi_fll.h:71
float32_t u_D[2]
D-axis component.
Definition: spll_1ph_sogi_fll.h:95
Defines the SPLL_1PH_SOGI_FLL_LPF_COEFF structure.
Definition: spll_1ph_sogi_fll.h:76
static void SPLL_1PH_SOGI_FLL_run(SPLL_1PH_SOGI_FLL *spll_obj, float32_t acValue)
Runs SPLL_1PH_SOGI_FLL module.
Definition: spll_1ph_sogi_fll.h:214
SPLL_1PH_SOGI_FLL_LPF_COEFF lpf_coeff
Loop filter coeffcient structure.
Definition: spll_1ph_sogi_fll.h:110
float32_t wc
Center (Nominal) frequency in radians.
Definition: spll_1ph_sogi_fll.h:99
float32_t osg_u[3]
Orthogonal signal generator data buffer.
Definition: spll_1ph_sogi_fll.h:92
Defines the SPLL_1PH_SOGI_FLL_OSG_COEFF structure.
Definition: spll_1ph_sogi_fll.h:64
float32_t osg_qb0
Definition: spll_1ph_sogi_fll.h:69
static void SPLL_1PH_SOGI_FLL_coeff_calc(SPLL_1PH_SOGI_FLL *spll_obj)
Calculates the SPLL_1PH_SOGI_FLL coefficients.
Definition: spll_1ph_sogi_fll.h:157
float32_t w_dash
Output frequency of PLL(radians)
Definition: spll_1ph_sogi_fll.h:106
float float32_t
Definition: spll_1ph_sogi_fll.h:53
float32_t osg_qb1
Definition: spll_1ph_sogi_fll.h:70
float32_t b1
Definition: spll_1ph_sogi_fll.h:77
float32_t u[3]
AC input data buffer.
Definition: spll_1ph_sogi_fll.h:91
static void SPLL_1PH_SOGI_FLL_config(SPLL_1PH_SOGI_FLL *spll_obj, float32_t acFreq, float32_t isrFrequency, float32_t lpf_b0, float32_t lpf_b1, float32_t k, float32_t gamma)
Configures the SPLL_1PH_SOGI_FLL coefficients.
Definition: spll_1ph_sogi_fll.h:188
float32_t osg_a2
Definition: spll_1ph_sogi_fll.h:68
float32_t sine
Sine value of the PLL angle.
Definition: spll_1ph_sogi_fll.h:102
float32_t ef2
FLL parameter.
Definition: spll_1ph_sogi_fll.h:104
float32_t b0
Definition: spll_1ph_sogi_fll.h:78
float32_t osg_b0
Definition: spll_1ph_sogi_fll.h:65
float32_t ylf[2]
Loop filter data storage.
Definition: spll_1ph_sogi_fll.h:96
float32_t delta_t
Inverse of the ISR rate at which module is called.
Definition: spll_1ph_sogi_fll.h:103
float32_t osg_b2
Definition: spll_1ph_sogi_fll.h:66
static void SPLL_1PH_SOGI_FLL_reset(SPLL_1PH_SOGI_FLL *spll_obj)
Resets internal data to zero,.
Definition: spll_1ph_sogi_fll.h:117
float32_t cosine
Cosine value of the PLL angle.
Definition: spll_1ph_sogi_fll.h:101
long double float64_t
Definition: spll_1ph_sogi_fll.h:54
Copyright 2023, Texas Instruments Incorporated