Summary of debugging experience of foc motor control algorithm

Publisher:huanxinLatest update time:2023-09-06 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

This article shares the debugging experience of foc motor control algorithm, targeting the scenario of transplanting a set of motor control software to a new control board.


The specific debugging process is wave generation => current feedback => loop => angle


Break down the debugging process into the following steps.

  • Confirm that the pwm module is normal

  • Confirm that svpwm is transmitting normally

  • Confirm that the current feedback is normal

  • Motor angle

  • Evaluating angular accuracy

The following article breaks down the steps of transplant debugging and gives a software block diagram of each debugging step.

1. Confirm that the pwm module is normal

1.1. Confirm that the bus voltage is consistent with the actual test value.

1.2. The three-phase output is suspended, and the three-phase output registers are given fixed duty cycles respectively. Measure the waveforms of each phase to see if they are consistent with the given duty cycle.


2. Confirm that svpwm is transmitting normally

2.1. Connect the motor or other three-phase symmetrical load.

2.2. Refer to the following block diagram, select a lower frequency, and generate a fixed speed forced angle. Give voltage to, for the working condition of using the motor as a load, it is recommended that the forced angle frequency be 10% of the rated speed or lower, set the voltage to 0, and gradually increase the voltage from a small value to see the current waveform. Under normal circumstances, the current waveform should be a sine wave. In addition, it should be noted that the voltage should not be too large. At low speeds, most of the voltage generates current, which can easily burn out the motor or driver.

picture

3. Confirm that the current feedback is normal

3.1、The software block diagram is as follows. Set the forced angle to 0 degrees. When setting the voltage, there should be; , where is the motor phase resistance. The sampled value and the oscilloscope measurement value can also be compared here. It should be noted that because the inverter output has a certain nonlinearity, when it is small, the relationship between the actual output current and voltage may be nonlinear, and there is an error between the current calculated by the above method and the actual output current.

picture

This method can be used to verify whether the current sampling is normal, and can also be used to identify the direction of current sampling and the three-phase sampling channel.

Modify the forced angle to be fixed to 120 degrees, give the voltage, when set, there should be;

Modify the forced angle to be fixed at -120 degrees, and give the voltage. When set, there should be;


3.2. Refer to the following block diagram, keep the angle fixed, enable the current loop, make the axis reference current about 20% of the rated current, set the axis current to 0, confirm, and adjust the current loop parameters to ensure that the current rise speed and overshoot meet the requirements.

picture

3.3. According to the method in 2.2, set the angle, enable the current loop, give the shaft reference current about 20% of the rated current, give the shaft current 0, confirm that the motor rotates normally, and confirm that the actual output current is equal to the given current size.

4. Introduce motor angle

4.1. Keep the wave transmission mode of 3.3, obtain the speed and angle through the sensorless estimation algorithm or encoder, and confirm that the forced angle and given speed in 3.3 are close to the estimated speed angle or the speed angle obtained by the encoder.

4.2. Refer to the following block diagram, introduce the estimated speed angle or the speed angle obtained by the encoder into the loop, maintain control, close the shaft current loop, and directly apply voltage from small to large to confirm that the motor is working normally.

picture

4.3. Connect the load, enable the current loop, add the speed loop, and debug the speed loop parameters.

picture

At this point, the entire debugging process of porting speed control to the new drive is completed.


5. Evaluate angular accuracy

The ability to decompose the motor's three-phase circuit into excitation current and torque current is based on the premise of knowing the rotor position accurately. If the rotor position is inaccurate, the torque current given in the program will not generate all the torque. The following is a method for evaluating angle accuracy.


The synchronous motor voltage equation is based on the premise that the angle information is accurate. Assuming the angle is accurate and the motor parameters are accurate, the shaft voltage and current have the following relationship:

When the motor works in steady state, the voltage equation can be written as follows:

Considering angle error

picture

Through current sampling and coordinate transformation, the motor parameters and speed are substituted into the voltage equation, and the estimated shaft voltage is calculated and recorded as and compared with the pi adjustment in the program. The closer the angle is to the real angle $, the closer and are.


6. Summary

This article shares the foc debugging experience, first confirm whether the driver is normal, then confirm whether the signal is normal, and finally debug the loop. Ensure that you have a good grasp of the entire system and have a clear idea of ​​each link.


Reference address:Summary of debugging experience of foc motor control algorithm

Previous article:How to achieve precise motion control in industrial drives
Next article:Working principle and torque of brushless motor

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号