Other Parts Discussed in Thread: MOTORWARE
Good afternoon,
I've modified lab01b in order to further understand my hardware and the FOC methods in motorware. I've connected an encoder to my board so that I have a direct measurement of the electric angle, and I'm now using this value for commutation in the FOC methods in lab01b. There are a few interesting observations from this test.
First, the Vd and Vq voltages do not appear to match the gAdcData.V recorded by my datalogger. Based on my configuration, Vs is 0.18376 and Vd and Vq are calculated as 0.055 and 0.0735 based on Vdq_gains of 0.3 and 0.4 (we'll revisit this in my next question), however, I'm seeing a voltage waveform amplitude of roughly 0.025 pu, which corresponds to 0.6 volts. If Vd and Vq are reported in pu based on IQ full-scale, then how come I'm seeing such a large discrepancy between Vq and measured voltages? I believe my voltage IQ and ADC scale factors are correct as I'm reading the correct 10V DC bus voltage.
Second, the motor speed is commanded at 10 kRPM (or 500Hz in electric frequency), but my period is ~163 samples @ 20kHz = 8.15ms or ~ 122Hz. You can see the period either from my electric angle in the first graph, or the two voltage waveforms in the following two graphs. I've confirmed that vs_freq.Freq = 0.408 which based on 1225Hz full-scale IQ speed, should be a commanded 500Hz. Since lab01b is driven open-loop, how can the commanded voltage waveform not match the input speed/frequency?
Third, I'm measuring the gAdcData.I as a sinusoidal waveform with a magnitude of approximately 0.25 pu, which based on 81.25 amp full-scale IQ value, should be ~20 amps. However, I'm only seeing ~1.9 A continuous on my power supply. Any suggestions as to why the measured current is not matching my supply? The first plot below shows the voltage waveform, and the following two plots show the current waveforms for phases A and B.
Lastly, I found that the lab sets the Vd voltage to _IQ(0.3) on line 100 in vs_freq.c, and I found that running this lab at 10 kRPM, it pulls 1.9 A from my supply. From my understanding of FOC, shouldn't Vd be set to 0.0 to minimize wasted energy. After I change line 100 to set Vd equal to 0.2 and then 0.0, I'm seeing only ~1 A and then 0.4 A at the command speed of 10 kRPM, a huge improvement in performance! How come Vd is fixed to IQ(0.3) in this lab?
Thank you again for your support.
Best regards,
Chris