Tool/software: Code Composer Studio
Hello community
I have tried to use "PARK_MACRO" in my code for controlling a motor. First when I use "IPARK_MACRO" to transform VdTesting and VqTesting to Alpha-Beta and vise versa (i.e. transfeorming VAlpha and Vbeta to the DQ coordinates using "PARK_MACRO" ) it works fine. But when I want to transform real measured currents (IAlpha and IBeta) to th DQ frame using "PARK_MACRO" it doesn't work. I am using the "rg1.Out" which is the output of "RG_MACRO" to simulate the waveform angles:
park1.Angle = rg1.Out;
park1.Sine = __sinpuf32(park1.Angle);
park1.Cosine = __cospuf32(park1.Angle);
park1.Alpha = clarke1.Alpha;
park1.Beta = clarke1.Beta;
PARK_MACRO(park1)
I have outputted the "A" phase measured current in DAC. which shows that it is exactly in the frequency of rg1.Out. (attached to this post)
In the other photo, I Channel #2 of oscilloscope shows the "park1.Qs" while channel #1 shows the "A" phase current. (attached)
I don't know why "park1.Qs" is oscillating ! it should be a DC signal.
Please help me on this.
regards

