A Parallel SVPWM Modulation Method Based on FPGA
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DALIAN UNIV OF TECH
- Filing Date
- 2023-03-08
- Publication Date
- 2026-06-30
Smart Images

Figure CN116191981B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vector control technology for permanent magnet synchronous motors, and in particular to a parallel SVPWM modulation method based on FPGA (Field-Programmable Gate Array). Background Technology
[0002] In the field of motor control technology, space vector pulse width modulation (SVPWM) is often used for vector control of permanent magnet synchronous motors due to its low waveform distortion, high voltage utilization, and ease of implementation in control systems. Furthermore, with the development of multi-axis co-drive and integrated drive-control technologies, as well as the increase in motor speed, traditional microcontroller (MCU) design schemes are becoming increasingly difficult; while utilizing the parallel, high-speed, and scalable characteristics of FPGAs, real-time and accurate control of single or multiple motors can be achieved.
[0003] SVPWM modulation technology is a novel approach and control strategy for controlling a converter based on the switching of the converter's space voltage (current) vector. Its main idea is to use the switching of the inverter's space voltage vector to obtain a quasi-circular rotating magnetic field, thereby enabling the permanent magnet synchronous motor to achieve good control performance under relatively low switching frequencies. This method essentially corresponds to a special combination of switching trigger sequences and pulse widths for the power devices in a three-phase voltage source inverter of an AC motor. This switching trigger sequence and combination generates a sinusoidal current waveform with a 120° electrical angle difference between the three phases and low distortion in the stator coils. The main advantages of SVPWM modulation technology include: good harmonic elimination; high DC voltage utilization of the voltage source inverter; fast dynamic response speed of the motor; and better suitability for digital system implementation. Currently, with the development of MCU-based digital control systems, SVPWM modulation methods are widely used, and corresponding new solutions are constantly emerging.
[0004] Traditional SVPWM modulation methods are implemented using an MCU and employ a sequential computation structure. This requires multiple steps, including coordinate transformation, sector determination, and calculation of the action times of non-zero and zero vectors, to finally obtain the duty cycle of the three-phase center-symmetrical PWM wave. A timer then generates a 6-pulse wave to drive the power device. While the entire calculation process is suitable for sequential computation, it is not suitable for parallel processing. Using an FPGA to complete the traditional SVPWM modulation process would consume significant resources and time, failing to leverage the parallel computing capabilities of the FPGA. Therefore, designing a parallel SVPWM modulation method suitable for FPGAs is crucial for optimizing resource consumption and improving computational efficiency. Summary of the Invention
[0005] The purpose of this invention is to provide a high-efficiency, FPGA-based parallel SVPWM modulation method. It is applicable to programmable logic devices such as FPGAs that possess parallel computing capabilities, and can optimize resource consumption and improve computational efficiency.
[0006] The technical solution of the present invention:
[0007] A parallel SVPWM modulation method based on FPGA is proposed. This method abandons the traditional SVPWM method's multiple steps, including coordinate transformation, sector determination, and calculation of the action time of non-zero and zero vectors, to finally obtain the modulation PWM duty cycle. Instead, it directly obtains the voltage vector U synthesized as needed. out In the two-phase stationary coordinate system α-β, by utilizing the correspondence between the angle and magnitude of the target voltage vector and the phase and amplitude of the three-phase voltage on the motor stator, the duty cycle of the three-phase PWM wave is directly obtained, modulation is completed, and then a six-pulse PWM signal is output by the timer. The entire process includes the following steps:
[0008] S1, the FPGA obtains the components U of the target vector to be synthesized in the two-phase stationary coordinate system α-β through parallel port communication. α U β ;
[0009] S2, Calculate the target vector U out Modulus V out ;
[0010] Length U out For the target vector U out The magnitude of the magnetic field determines the strength of the magnetic field synthesized on the stator of the permanent magnet synchronous motor, and is directly related to the final torque output of the motor.
[0011] Based on the component U of the target vector in the two-phase stationary coordinate system α-β α U β The magnitude of the target vector can be obtained using the triangle rule for vector decomposition in the vertical coordinate system:
[0012]
[0013] S3, Calculate the target vector U out Angle θ;
[0014] Target vector U out The angle θ is the angle of the synthesized magnetic field on the stator of the permanent magnet synchronous motor, and this angle is directly related to the electrical angle of the rotor during motor operation. In the torque loop control of a permanent magnet synchronous motor, the desired ideal control effect is: the target vector U... out The angle θ leads the rotor electrical angle by 90 degrees. In this state, the target vector U...out The direction of the combined magnetic field on the stator interacts with the direction of the permanent magnet magnetic field on the motor rotor, and the forces form a 90-degree angle. This interaction occurs at the target vector U. out With the magnitude of the torque remaining constant, the motor torque output reaches its maximum at this time.
[0015] Based on trigonometric function relationships and the target vector U out The component U in the stationary coordinate system α-β α U β U can be obtained out The angle θ is:
[0016]
[0017] To ensure that the angle θ is a continuous function within a 2π period, a phase alignment operation needs to be performed on the angle θ, based on the target vector U. out Depending on the quadrant in the stationary coordinate system α-β, it can be divided into the first quadrant, the second and third quadrants, and the fourth quadrant.
[0018] When the target vector U out When in the first quadrant, the angle θ is:
[0019]
[0020] When the target vector U out When in the second or third quadrant, the angle θ is:
[0021]
[0022] When the target vector U out When in the fourth quadrant, the angle θ is:
[0023]
[0024] In an FPGA, the aforementioned phase alignment operation can be implemented using a data selector, determined by the target vector U. out The components along the α-β axes are compared with 0. In FPGAs, data is stored in two's complement form. Therefore, data cannot be directly compared with the value 0. Instead, the highest bit (sign bit) of the data is used as the comparison input, and a 2-to-1 data selector is used.
[0025] S4, the FPGA obtains the bus voltage V via parallel port communication. DC .
[0026] S5, based on bus voltage V DC Target vector magnitude V out The duty cycle of the modulated PWM wave is calculated by the target vector angle θ.
[0027] The ultimate goal of motor control is to synthesize three-phase alternating current on the motor stator through a three-phase inverter circuit, thereby forming a rotating magnetic field that drives the permanent magnet rotor to rotate. A typical two-level three-phase voltage source inverter circuit contains six power devices, and the inverter circuit output is controlled by switching these six power devices. Define the switching quantity S. a S b S c S ′ a S b ′ S c ′ , represents the switching state of 6 power switching devices, when S a S b S c When the value is 1, the switching device of the upper bridge arm of the inverter is turned on, and the switching device of the lower bridge arm is turned off, i.e., S. ′ a S b ′ S c ′ It is 0; conversely, when S is 0. a S b S c When the value is 0, the switching devices of the upper bridge arm of the inverter are closed, and the switching devices of its lower bridge arm are turned on, i.e., S... ′ a S b ′ S c ′ The value is 1. Since the upper and lower switching devices on the same bridge arm cannot be turned on simultaneously, there are a total of 8 possible switching combinations for the three inverter bridges of the above inverter. The switching devices control the synthesized vector output through the combination of these 8 states.
[0028] This invention focuses solely on the switching quantity S of a single bridge arm. a With S ′ a S b With S b ′ S c With S c ′ The state. With the vector magnitude and angle obtained in steps S2 and S3, the switching time coefficients k1, k2, and k3 of the upper and lower power devices of the single-phase bridge arm are obtained by using the phase relationship between the vector angle and the three-phase voltage with a phase difference of 120 degrees, as well as the relationship between the magnitude and the bus voltage and the amplitude of the three-phase voltage.
[0029] Calculate the single bridge arm S a With S ′ a Switching coefficient:
[0030]
[0031] Calculate the single bridge arm S b With S b ′ Switching coefficient:
[0032]
[0033] Calculate the single bridge arm S c With S c ′ Switching coefficient:
[0034]
[0035] Among them, V out V is the target vector magnitude. DC Here, θ represents the bus voltage, and θ represents the target vector angle. For phase compensation, they are 120 degrees apart. The specific value is adjusted according to different motor parameters, where n is the number of motor pole pairs.
[0036] S6: The PWM switching time is obtained by multiplying the switching time coefficients k1, k2, and k3 with the timer base number, and then written into the timer to generate a centrally symmetrical PWM wave.
[0037] The present invention has the following beneficial effects:
[0038] This invention provides a parallel SVPWM modulation method based on FPGA. Building upon traditional SVPWM modulation methods, it utilizes the correspondence between the target vector and the three-phase AC current synthesized on the motor stator to achieve a direct mapping from the vector to the PWM wave duty cycle. This avoids the sequential calculation process of traditional SVPWM modulation methods, allowing the main calculations to be implemented in parallel without interference. This method is more efficient and suitable for programmable logic devices with parallel computing capabilities, such as FPGAs, significantly optimizing device resource consumption and improving computational efficiency. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of an example framework in an embodiment of the present invention;
[0040] Figure 2 The target vector U in this embodiment of the invention out Component U in the α-β coordinate system α U β Schematic diagram;
[0041] Figure 3 The target vector U in this embodiment of the invention outSchematic diagram showing the relative relationship between the rotor and the motor rotor;
[0042] Figure 4 This is a schematic diagram of a three-phase voltage source inverter circuit in an embodiment of the present invention; Detailed Implementation
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative effort are all within the scope of protection of the present invention.
[0044] The purpose of this invention is to provide a high-efficiency, FPGA-based parallel SVPWM modulation method. It is applicable to programmable logic devices such as FPGAs that possess parallel computing capabilities, and can optimize resource consumption and improve computational efficiency.
[0045] This modulation method abandons the traditional SVPWM method's multiple steps, including coordinate transformation, sector determination, and calculation of the action time of non-zero and zero vectors, to finally obtain the modulation PWM duty cycle. Instead, it directly obtains the voltage vector U synthesized as needed. out In the two-phase stationary coordinate system α-β, the duty cycle of the three-phase PWM wave is directly obtained by utilizing the correspondence between the angle and magnitude of the target voltage vector and the phase and amplitude of the three-phase voltage on the motor stator, thus completing the modulation. A six-pulse PWM signal is then output by a timer. The overall structure diagram is shown below. Figure 1 As shown. The entire process includes the following steps.
[0046] S1, the FPGA obtains the components U of the target vector to be synthesized in the two-phase stationary coordinate system α-β through parallel port communication. α U β like Figure 2 As shown;
[0047] S2, Calculate the target vector U out Modulus V out ;
[0048] Modulus V out For the target vector U out The magnitude of the magnetic field determines the strength of the magnetic field synthesized on the stator of the permanent magnet synchronous motor, and is directly related to the final torque output of the motor.
[0049] Based on the component U of the target vector in the two-phase stationary coordinate system α-β α =10V, U β =10V, and the magnitude of the target vector can be obtained by the triangle rule of vector decomposition in the vertical coordinate system:
[0050]
[0051] S3, Calculate the target vector U out Angle θ;
[0052] Target vector U out The angle θ is the angle of the synthesized magnetic field on the stator of the permanent magnet synchronous motor, and this angle is directly related to the electrical angle of the rotor during motor operation. In the torque loop control of a permanent magnet synchronous motor, the desired ideal control effect is: the target vector U... out The angle θ leads the rotor electrical angle by 90 degrees, such as... Figure 3 As shown. In this state, the target vector U out The direction of the combined magnetic field on the stator interacts with the direction of the permanent magnet magnetic field on the motor rotor, and the forces form a 90-degree angle. This interaction occurs at the target vector U. out With the magnitude of the torque remaining constant, the motor torque output reaches its maximum at this time.
[0053] Based on trigonometric function relationships and the target vector U out The component U in the stationary coordinate system α-β α U β U can be obtained out The angle θ is:
[0054]
[0055] To ensure that the angle θ is a continuous function within a 2π period, a phase alignment operation needs to be performed on the angle θ, based on the target vector U. out Depending on the quadrant in the stationary coordinate system α-β, it can be divided into the first quadrant, the second and third quadrants, and the fourth quadrant.
[0056] When the target vector U out When in the first quadrant, the angle θ is:
[0057]
[0058] When the target vector U out When in the second or third quadrant, the angle θ is:
[0059]
[0060] When the target vector U out When in the fourth quadrant, the angle θ is:
[0061]
[0062] In an FPGA, the aforementioned phase alignment operation can be implemented using a data selector, determined by the target vector U. outThe components along the α-β axes are compared with 0. In FPGAs, data exists in two's complement form; therefore, data cannot be directly compared with the value 0. Instead, the highest bit (sign bit) is used as the comparison input, implemented using a 2-to-1 data selector. Since the target vector is located in the first quadrant, U can be obtained. out The angle θ is 45 degrees.
[0063] S4, the FPGA obtains the bus voltage V via parallel port communication. DC =48V.
[0064] S5, based on bus voltage V DC Target vector magnitude V out The duty cycle of the modulated PWM wave is calculated by the target vector angle θ.
[0065] The ultimate goal of motor control is to synthesize three-phase alternating current on the motor stator through a three-phase inverter circuit, thereby forming a rotating magnetic field that drives the permanent magnet rotor to rotate. A typical two-level three-phase voltage source inverter circuit contains six power devices, such as... Figure 4 As shown, the inverter circuit output is controlled by switching these six power devices. The switching quantity S is defined. a S b S c S ′ a S b ′ S c ′ , represents the switching state of 6 power switching devices, when S a S b S c When the value is 1, the switching device of the upper bridge arm of the inverter is turned on, and the switching device of the lower bridge arm is turned off, i.e., S. ′ a S b ′ S c ′ It is 0; conversely, when S is 0. a S b S c When the value is 0, the switching devices of the upper bridge arm of the inverter are closed, and the switching devices of its lower bridge arm are turned on, i.e., S... ′ a S b ′ S c ′ The value is 1. Since the upper and lower switching devices on the same bridge arm cannot be turned on simultaneously, there are a total of 8 possible switching combinations for the three inverter bridges of the above inverter. The switching devices control the synthesized vector output through the combination of these 8 states.
[0066] This invention focuses solely on the switching quantity S of a single bridge arm. a With S ′ a S b With S b ′ S c With S c ′ The state. With the vector magnitude and angle obtained in steps S2 and S3, the switching time coefficients k1, k2, and k3 of the upper and lower power devices of the single-phase bridge arm are obtained by using the phase relationship between the vector angle and the three-phase voltage with a phase difference of 120 degrees, as well as the relationship between the magnitude and the bus voltage and the amplitude of the three-phase voltage.
[0067] Calculate the single bridge arm S a With S ′ a Switching coefficient:
[0068]
[0069] Calculate the single bridge arm S b With S b ′ Switching coefficient:
[0070]
[0071] Calculate the single bridge arm S c With S c ′ Switching coefficient:
[0072]
[0073] Among them, V out V is the target vector magnitude. DC Here, θ represents the bus voltage, and θ represents the target vector angle. For phase compensation, they are 120 degrees apart. The specific value will be adjusted according to the different motor parameters. In this example, we take... n represents the number of pole pairs of the motor; in this example, there are 4 pole pairs.
[0074] S6: The PWM switching time is obtained by multiplying the switching time coefficients k1, k2, and k3 by the timer base number and then written into the timer. In this example, the timer base number is 10000, and the final three-phase timer PWM duty cycles are 3237, 4935, and 2194, respectively.
[0075] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the technical spirit of the present invention. The technical scope of the present invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A parallel SVPWM modulation method based on FPGA, characterized in that, This modulation method directly synthesizes the target vector as needed. In a two-phase stationary coordinate system - The position of the target vector is used to directly obtain the duty cycle of the three-phase PWM wave by utilizing the correspondence between the angle and magnitude of the target vector and the phase and amplitude of the three-phase voltage on the motor stator, thus completing the modulation, and then the timer outputs a six-pulse PWM signal; Specifically, the following steps are included: S1, the FPGA obtains the target vector to be synthesized in a two-phase stationary coordinate system via parallel port communication. - Components in , ; S2, Calculate the target vector Length of the module ; Length For the target vector The magnitude of the magnetic field determines the strength of the magnetic field synthesized on the stator of the permanent magnet synchronous motor, and is directly related to the final torque output of the motor. Based on the target vector in the two-phase stationary coordinate system - Components in , The magnitude of the target vector is obtained by using the triangle rule of vector decomposition in the vertical coordinate system: (1) S3, Calculate the target vector Angle ; Based on trigonometric function relationships and target vector In the stationary coordinate system - Components in , It can be obtained Angle for: (2) To ensure the angle In one It is a continuous function within the period, so the angle needs to be considered. Perform phase alignment operation based on the target vector. In the stationary coordinate system - Depending on the quadrant in which it is located, it is divided into the first quadrant, the second and third quadrants, and the fourth quadrant; When the target vector When in the first quadrant, the angle for: (3) When the target vector When in the second or third quadrant, the angle for: (4) When the target vector When in the fourth quadrant, the angle for: (5) In an FPGA, the aforementioned phase alignment operation is implemented using a data selector to select the target vector. exist - The axis components are compared with 0; in FPGA, data exists in two's complement form, so data cannot be directly compared with the value 0. Instead, the highest bit sign bit of the data is used as the comparison input, and a two-to-one data selector is used to achieve this. S4, the FPGA obtains the bus voltage via parallel port communication. ; S5, based on bus voltage Target vector magnitude Target vector angle Calculate the duty cycle of the modulated PWM wave; A two-level three-phase voltage source inverter circuit contains six power devices. The inverter circuit output is controlled by the switching of these six power devices, and the switching quantities are defined. , , , , , The symbols represent the switching states of the six power switching devices; individual bridge arm switching quantities are monitored separately. and , and , and Given the vector magnitude and angle obtained in steps S2 and S3, the switching time coefficients of the upper and lower power devices of a single-phase bridge arm are obtained by utilizing the phase relationship between the vector angle and the three-phase voltage with a 120-degree phase difference, as well as the relationship between the magnitude and the bus voltage and the amplitude of the three-phase voltage. , , ; Calculate a single bridge arm and Switching coefficient: Calculate a single bridge arm and Switching coefficient: Calculate a single bridge arm and Switching coefficient: in, For the target vector magnitude, Bus voltage For the target vector angle, , For phase compensation, they are 120 degrees out of phase; the specific value is adjusted according to the motor parameters. This represents the number of pole pairs of the motor. S6, utilizing the switching time coefficient , , The PWM switching time is obtained by multiplying the timer base number by the timer base number, and then written into the timer to generate a centrally symmetrical PWM wave.