Are there any PMSM examples for the F283x series of controllers. I know there are some that exist for the F2808 and F2812.
Thanks.
The best explanation is in the system documentation, but it is essentially
ADC Result, normalized into pu, adjust for offset, normalize to +/-1 pu, scale to 3.3V from 3V ADC input
Level 2C – Calibrating the Phase Current Offset
Note that especially the low power motors draw low amplitude current after closing the speed loop under no-load. The performance of the sensorless control algorithm becomes prone to phase current offset which might stop the motors or cause unstable operation. Therefore, the phase current offset values need to be minimized at this step. Set VqTesting, VdTesting and SpeedRef to zero in the code, recompile and run the system and watch the clarke1.As & clarke1.Bs from watch window. Ideally the measured phase currents should be zero in this case. Make sure that the clarke1.As & clarke1.Bs values are less than 0.001 or minimum possible. If not, adjust the offset value in the code by going to: clarke1.As= ((AdcMirror.ADCRESULT0)*0.00024414-0.5524)*2*(3.0/3.3); and changing IQ15(0.55) offset value (e.g. IQ15(0.5587) or IQ15(0.5488) depending on the sign and amount of the offset). Rebuild the project and then repeat the calibration procedure again until the clarke1.As and clarke1.Bs offset values are minimum. Note: 2833x devices have 12-bit ADC and the result is can be read from the 16-bit ADC registers, AdcMirror.ADCRESULTn. The current sense result is therefore divided by 2^12 to normalize it in per unit format, and offset subtracted to get an ac quantity. The offset added to the current signal on the HVDMC kit is 1.65V for 3.3 V ADCs. Since the 2833x devices have 3.0V ADCs, 0.55 pu offset (=1.65V / 3.0V) is subtracted from the current measurement in the code. Finally, it is multiplied by two to normalize the measured phase current to ± 1.0 pu. Note that the components on the HVDMC kit scales down 20A peak current to 3.3V, therefore the measurement is rescaled for 3.0V ADCs. Make sure that the ADC input does not exceed 3.0V when 2833x is used.
Note that especially the low power motors draw low amplitude current after closing the speed loop under no-load. The performance of the sensorless control algorithm becomes prone to phase current offset which might stop the motors or cause unstable operation. Therefore, the phase current offset values need to be minimized at this step.
Set VqTesting, VdTesting and SpeedRef to zero in the code, recompile and run the system and watch the clarke1.As & clarke1.Bs from watch window. Ideally the measured phase currents should be zero in this case. Make sure that the clarke1.As & clarke1.Bs values are less than 0.001 or minimum possible. If not, adjust the offset value in the code by going to:
clarke1.As= ((AdcMirror.ADCRESULT0)*0.00024414-0.5524)*2*(3.0/3.3);
and changing IQ15(0.55) offset value (e.g. IQ15(0.5587) or IQ15(0.5488) depending on the sign and amount of the offset).
Rebuild the project and then repeat the calibration procedure again until the clarke1.As and clarke1.Bs offset values are minimum.
Note: 2833x devices have 12-bit ADC and the result is can be read from the 16-bit ADC registers, AdcMirror.ADCRESULTn. The current sense result is therefore divided by 2^12 to normalize it in per unit format, and offset subtracted to get an ac quantity. The offset added to the current signal on the HVDMC kit is 1.65V for 3.3 V ADCs. Since the 2833x devices have 3.0V ADCs, 0.55 pu offset (=1.65V / 3.0V) is subtracted from the current measurement in the code. Finally, it is multiplied by two to normalize the measured phase current to ± 1.0 pu. Note that the components on the HVDMC kit scales down 20A peak current to 3.3V, therefore the measurement is rescaled for 3.0V ADCs. Make sure that the ADC input does not exceed 3.0V when 2833x is used.
Thanks Chris for this additional information.
But my problem with the ADC doesn't come from this. In fact, I realized that the EPWMs don't work well. If I send a signal only on EPwm1Regs.CMPA.half.CMPA, the motor turns (and only one phase is undervoltage). The ADCMirror shows that the current isn't a sinus, that's why I thought it was the ADC that didn't work well.
If I send a signal only on EPwm1Regs.CMPB or only on EPwm2Regs.CMPA.half.CMPA, there is no current in the motor. I compared my code with the example you gave me, but I really can't see the difference.
"I realized that the EPWMs don't work well"
I really don't think this is the issue.
If you connect a bus voltage through an upper switch to the motor, and through a lower switch to ground you will have current through the motor.
Recommend you look at the code and perhaps the documentation for the ePWM module if you think you aren't setting the PWM outputs correctly.
Hi Chris;
I am writing MRAS sensorless code for Low Voltage Dual Axis Motor Control + PFC Kit with 28035. I have some problems interested in IQmath and per unit values. Briefly, the problem is below:
***The floating point value (3.9) has to be added to Vd (pid1_id.Out) and the floating point value (0.9) has to be added to id (park1.Ds). After these additions, I can perform MRAS code to estimate speed and angle.
I have tried to succeed in this, but i couldnt. Because, Vd and id are in their own per unit values with global _IQ24 format. If i knew to know base values of id and Vd, i would calculate the per unit values (0.9/idbase) and (3.9/Vdbase).
How can i calculate these base values, in other words, what should i do to add these floating point values to the per unit Vd and id values?
bluehash Are there any PMSM examples for the F283x series of controllers. I know there are some that exist for the F2808 and F2812. Thanks.
Wang Jihu,If your question is the same as "bluehash"'s original question, I would recommend taking a look at the TMDSHVMTRPFCKIT. There is an example specifically designed to control a PMSM motor on this hardware with a F28335 .The kit's software can be downloaded for free within controlSUITE. (http://www.ti.com/controlsuite)Thank you,Brett