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.
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.
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.
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.
4.3. Connect the load, enable the current loop, add the speed loop, and debug the speed loop parameters.
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
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.
Previous article:How to achieve precise motion control in industrial drives
Next article:Working principle and torque of brushless motor
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Thank you for your help + Thank you Mr. Zhu for your help
- 4 termination methods to teach you how to perfectly solve signal termination confusion
- Next, let's discuss whether the polished chips are real or fake.
- How to install virtual machine on SinA33 development board
- Newbie asks for advice on STC89c54RD+, RAM access value application
- The problem of sensor sampling value software returning to zero
- Several indoor wireless positioning technologies
- NXP Rapid IoT Review] +4. Learn the design ideas of POWER circuits
- HTS221 self-heating function test
- Understanding the configuration of C2000 series CMD files