Part Number: TMS320F28379D
Hi everyone,
I want to generate three values that are changing over time by changing "theta" as the phase. V2_ref is following the Cos waveform perfectly fine, but the "d" and "dd" values are fixed (If I exclude the "exp(h)" and "exp(hh)" functions, these two would also work). I would appreciate it if anyone could help me solve this problem.
Note: every parameter is a "float" except for the "h" and "hh" which are both double.
V2=40;
del_theta=((0xFFFF)*Freq*500*(0.00000001));
theta=theta+del_theta;
V2_ref[2]=(int16_t)V2*(cos((float)theta*0.000095875));
h=-b*pow(abs((float)theta*0.000095875-1),e);
d[2]=1-a*exp(h)+a*exp(-b*pow(1,e));
hh=-bb*pow(abs((float)theta*0.000095875-1),ee);
dd[2]=dd-aa*exp(hh);
if (theta==65535)
{
theta=0;
}