I am using TMS320F28335 for motor control. Now I want to inject the 7th current harmonic into the motor and implement control of the current harmonic, but now I can control the amplitude of the current harmonic but not the phase of it. Maybe I can't understand how to use _IQsinPU().
For example, I use Ia=_IQmpy(_IQsinPU(7*Theta_VA_RA+1/360*30), Im) to make the 7th current harmonic offset by 30 degrees, but it doesn't work when I perform the experiment, I can't find the solution, can anyone help me?
Note: Theta_VA_RA is the electrical angle measured by resolver, its value is 0~1, and Im is the amplitude of current harmonics.