Tool/software: Code Composer Studio
hello,
I am using solar library for my project in which I used PI controller CNTL_PI as described in solar library but when I check output of controller it is same as saturation limit and fixed. for my voltage controller upper and lower saturation limits are 10 and -10. the output VC.Out; is -10 similarly for current controller output is IL.Out; is -30 (limits are 30 and -30). My reference for output is VC.Ref=30*sintheta so the output of controller should change with sintheta but its fixed .
// voltage(PI Regulator)
#define KP_VI 5
#define KI_VI 500
#define UMAX_VI 10
#define UMIN_VI -10
// current(PI Regulator)
#define KP_I 0.005
#define KI_I 6000
#define UMAX_I 30
#define UMIN_I -30
//module structure
CNTL_PI_F VC;
CNTL_PI_F IL;
// Initialize module
/******voltage PI Regulator*****/
CNTL_PI_F_init(&VC);
VC.Ki = KI_VI;
VC.Kp = KP_VI;
VC.Umax= UMAX_VI;
VC.Umin= UMIN_VI;
/******Current PI Regulator*****/
CNTL_PI_F_init(&IL);
IL.Ki = KI_I;
IL.Kp = KP_I;
IL.Umax= UMAX_I;
IL.Umin= UMIN_I;
//Using the module
/*****voltage PI Regulator*****/
VC.Ref=30*sintheta;
VC.Fbk=vo[2];
CNTL_PI_F_FUNC(&VC);
/*****Current PI Regulator*****/
IL.Ref=VC.Out;
IL.Fbk= ia[2];
CNTL_PI_F_FUNC(&IL);
d=IL.Out;
