This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
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.
HI
Did you run the IQMath example from C2000ware? Does it show the same result on the graph in CCS?
-Shantanu
Hi Shantanu,
Yes, I am using _iq24 library to define all variables.
No, It doesn't show the same result on the graph in CCS.
Thank you
Hi Ashok,
Apologies for the delay. I tested the IQsin API on my end and was able to get a clean wave. Can you just run the IQsin API on your input and send the input and output txt files?
-Shantanu
Hi Shantanu,
Can you please guide me how to create input and output text file of IQsin API.
Thank you.