Other Parts Discussed in Thread: C2000WARE
Hi,
I have generated sine 230V using Ramp library as per below:
#define GRID_FREQ 50
#define INV_FREQ 12800.0
RAMPGEN_IQ rgen1;
RAMPGEN_IQ_init(&rgen1);
rgen1.Freq = _IQ24(GRID_FREQ);
rgen1.StepAngleMax = _IQ24(1.0/INV_FREQ);
RAMPGEN_IQ_MACRO(rgen1);
IntSineRampgen = _IQsinPU(rgen1.Out);
duty_inv_pu=_IQ24mpy(IntSineRampgen,InvModIndex);
duty_inv_pu= (duty_inv_pu>_IQ24(1.0))?_IQ24(1.0):duty_inv_pu;
duty_inv_pu= (duty_inv_pu<_IQ24(-1.0))?_IQ24(-1.0):duty_inv_pu;
duty_inv = _IQ24mpy((long)(INV_PWM_PERIOD),_IQ24abs(duty_inv_pu));
As I can not get pure sine wave (attached image for reference) and i am getting some distrotion near zero crossing on both edge.
Please guide us to understand this issue. What may be the possible reason for this.
Thanks.