Position acquisition method based on flux observer and motor driver
By using voltage pulses to identify the initial position and the magnetic relay observer to determine the current position in a permanent magnet synchronous motor, the problems of inversion and poor low-speed performance during motor start-up are solved, and fast and stable zero-speed closed-loop start is achieved.
Patent Information
- Application Number
- CN202411517525.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-28
AI Technical Summary
The existing inductive FOC control algorithm of permanent magnet synchronous motors has a probability of inversion during startup, and the low-speed performance is poor, making it difficult to achieve zero-speed closed-loop start.
By selecting two phases from the three-phase stator windings multiple times, applying voltage pulses of one positive and one reverse to the two phases, sampling phase current, determining the initial position of the rotor, and obtaining the current position correlation value based on the magnetic relay observer, adjusting the position difference value, realizing the inductive magnetic field orientation control of the motor.
It avoids the reversal of the motor when finding the initial position in the traditional way, improves the starting speed of the motor, achieves zero-speed closed-loop start, and enhances the stability and starting efficiency of the motor.
Smart Images

Figure CN119543726A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a position acquisition method and a motor driver based on a flux observer. Background Art
[0002] The sensorless FOC (Field-Oriented Control) technology of permanent magnet synchronous motors is widely used in the fields of cost-sensitive and volume-sensitive household appliances and power tools. At present, common sensorless FOC control algorithms include observers such as back-EMF observation method, flux observation method, and high-frequency injection method. The back-EMF method is the most commonly used observer algorithm. This algorithm has strong load capacity, but it cannot start in a closed loop at zero speed, and its low-speed performance is poor. It is only suitable for medium and high-speed application scenarios. The high-frequency injection method can realize the observation of the position at zero speed, and has good low-speed performance, but there will be obvious current whistling during operation. The flux observation method is not restricted by the speed. At low, medium and high speeds, the flux of the permanent magnet synchronous motor is basically the same, and the low-speed performance is better; although the flux observer cannot estimate the rotor position at zero speed, because the observed position tends to converge during the startup process, it can achieve zero-speed closed-loop startup.
[0003] The current mainstream permanent magnet synchronous motor sensorless FOC algorithm is mainly based on back electromotive force. The startup process of this method is complicated and requires three-stage startup of pre-positioning, IF (current strong drag), open loop and closed loop to achieve sensorless speed closed loop control of permanent magnet synchronous motor. First of all, during the pre-positioning process, there is a 50% probability of the motor reversing, which is unacceptable for the control of the position loop. For traditional nonlinear flux observers, if you want to start, you need to pre-position the rotor to a fixed position before starting, and then start the motor. During the pre-positioning process, the motor may reverse. Summary of the invention
[0004] Based on this, it is necessary to provide a position acquisition method and a motor driver based on a flux observer to address the above technical problems.
[0005] A position acquisition method based on a flux observer, the method comprising:
[0006] Selecting two phases from the three-phase stator winding multiple times, applying a positive and a negative voltage pulse to the two phases respectively, and sampling the phase current after each pulse ends;
[0007] Taking the position corresponding to the maximum current value in the phase current as the initial position of the rotor;
[0008] Obtain the current position related value determined based on the flux observer;
[0009] Adjusting based on the position difference between the initial position and the current position related value to obtain the current observed position of the motor;
[0010] Based on the current observed position, sensorless field oriented control of the motor is performed.
[0011] A field programmable gate array having a computer program stored thereon, characterized in that the field programmable gate array is used to implement the steps of each embodiment of a position acquisition method based on a flux observer.
[0012] A motor driver comprises a memory, a processor and a three-phase inverter, wherein the memory stores a computer program, and the processor implements the steps of each embodiment of a position acquisition method based on a flux observer when executing the computer program, and the three-phase inverter is used to drive a motor.
[0013] A computer-readable storage medium stores a computer program, which implements the steps of each embodiment of a position acquisition method based on a flux observer when executed by a processor.
[0014] The above-mentioned position acquisition method and motor driver based on the flux observer obtain the position of the motor during operation through the flux observer, but the initial position is difficult to obtain. Two phases are selected from the three-phase stator winding multiple times, and a positive and a negative voltage pulse are applied to the two phases respectively. The phase current after the pulse ends is used, and the position corresponding to the maximum current value is used as the initial position of the rotor. The initial position with an error within an acceptable range can be obtained through simple operations, avoiding the situation where the motor reverses when finding the initial position in the traditional method; the current observed position of the motor is obtained by adjusting based on the difference between the initial position and the current position related values, and the motor is subjected to non-inductive magnetic field oriented control based on the current observed position. There is no need for three-stage starting, which improves the starting speed of the motor. In addition, during the starting process, the observed position of the flux observer tends to converge, so zero-speed closed-loop starting can be achieved, thereby improving the starting speed of the motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 2. It is a diagram of an application environment of a position acquisition method based on a flux observer in one embodiment;
[0016] Figure 2 1 is a flow chart of a method for obtaining a position based on a flux observer in one embodiment;
[0017] Figure 3 Schematic diagram of the relationship between the A-phase inductance, the rotor position and the magnetic flux acting on the A-phase winding in one embodiment;
[0018] Figure 4 Schematic diagram of the switching states of six switching tubes of a three-phase inverter in one embodiment;
[0019] Figure 5 is a schematic diagram of a phase-locked loop in one embodiment;
[0020] Figure 6 A schematic diagram of the structure of a non-inductive magnetic field oriented control system in one embodiment;
[0021] Figure 7 is a functional relationship diagram between an observer gain and a reference speed in one embodiment;
[0022] Figure 8 It is a schematic diagram of the actual speed of the towing motor when the reference speed is 300 rpm and the observer gain γ=2000 in one embodiment;
[0023] Fig. 9 It is a schematic diagram of the actual speed of the towing motor when the reference speed is 500 rpm and the observer gain γ=2000 in one embodiment;
[0024] Fig.10 It is a schematic diagram of the actual speed of the towing motor when the reference speed is 600 rpm and the observer gain γ=2200 in one embodiment;
[0025] Fig.11 It is a schematic diagram of the actual speed of the towing motor when the reference speed is 1000 rpm and the observer gain γ is 2800 in one embodiment;
[0026] Fig.12 It is a schematic diagram of the actual speed of the towing motor when the reference speed is 1500rpm and the observer gain γ=3500 in one embodiment;
[0027] Fig.13 It is a schematic diagram of the actual speed of the towing motor when the reference speed is 2000rpm and the observer gain γ=4400 in one embodiment;
[0028] Fig.14 It is a schematic diagram of the actual speed of the towing motor when the reference speed is 2500rpm and the observer gain γ=5100 in one embodiment;
[0029] Fig.15 It is a schematic diagram of the actual speed of the towing motor when the reference speed is 3000 rpm and the observer gain γ=6000 in one embodiment. DETAILED DESCRIPTION
[0030] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0032] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly. The connection can be a direct connection or an indirect connection.
[0033] In addition, in this application, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0034] The terms "first", "second", etc. used in this application may be used herein to describe various data, but these data are not limited by these terms. These terms are only used to distinguish a first data from another data. For example, without departing from the scope of this application, a first preset number may be referred to as a second preset number, and similarly, a second preset number may be referred to as a first preset number. Both the first preset number and the second preset number are preset numbers, but they are not the same preset number.
[0035] It can be understood that the “connection” in the following embodiments should be understood as “electrical connection”, “communication connection”, etc. if the connected circuits, modules, units, etc. have electrical signals or data transmission between each other.
[0036] The position acquisition method based on the flux observer provided in this application can be applied to Figure 1 application environment. Figure 1 FIG. 1 is a diagram of an application environment of a position acquisition method based on a flux observer in an embodiment. Figure 1The motor driver 100 and the motor 200 are included, and the motor driver 100 is used to control the operation of the motor 200. The motor driver 100 includes a processor 110, and the processor 110 includes a flux observer 120 and a magnetic field oriented control system 130. The flux observer 120 and the magnetic field oriented control system 130 can be software modules. The processor 110 can specifically be an FPGA (Field Programmable Gate Array), a CPU (Central Processing Unit), an MCU (Microcontroller Unit), etc. The motor can specifically be a permanent-magnet synchronous motor (PMSM), an induction motor, a brushless direct current motor (BLDC), etc. The processor can be used to execute the position acquisition method of the flux observer in each embodiment of the present application.
[0037] In one embodiment, Figure 2 FIG. 1 is a flow chart of a method for obtaining a position based on a flux observer in an embodiment, and the method is described by taking the method applied to a processor as an example, and includes the following steps:
[0038] Step 202, select any two phases from the three-phase stator winding multiple times, apply a positive and a negative voltage pulse to the two phases respectively, and sample the phase current after each pulse ends.
[0039] Specifically, two phases are selected from the three-phase stator windings for multiple times, and the other phase is left hanging. A positive and a negative voltage pulse are applied to the two phases respectively, and the phase current after each pulse ends is sampled. For example, the three phases are U phase, V phase and W phase, then 2 phases are selected to apply voltage pulses, which can be in the following order but not limited to: UV, UW, VW, VU, WU, WV, that is, a total of 6 high-frequency voltage pulses are applied to identify the initial position of the rotor. The initial position of the rotor can be represented by an angle (in degrees), or by a displacement, etc., depending on the unit of the motor. Then the corresponding speed can be an angular velocity, etc. The corresponding phase current is sampled at the end of the voltage pulse, and 6 phase current values are obtained. It can be understood that 12, 18, 24, etc. voltage pulses can also be applied to identify the initial position of the rotor to improve the accuracy of initial position recognition.
[0040] Step 204: taking the position corresponding to the maximum current value in the phase current as the initial position of the rotor.
[0041] Specifically, multiple pulses are used to detect the initial position of the rotor. This method is based on the inductance saturation effect to identify the initial position of the rotor. The inductance saturation effect can be simply understood as follows: when the N-pole direction of the rotor permanent magnet is closer to the axis of the stator winding, the magnetic flux component φ of the rotor on the winding is larger, resulting in a smaller stator phase inductance, that is, the rotor position affects the winding magnetic flux, and the winding magnetic flux affects the phase inductance. Select the A-phase stator winding inductance for analysis, Figure 3 The figure is a schematic diagram of the relationship between the A-phase inductance, the rotor position and the magnetic flux acting on the A-phase winding in an embodiment. When θ=π / 2 and θ=3π / 2, the rotor permanent magnet magnetic circuit is orthogonal to the winding axis, the magnetic flux component φ of the rotor on the winding is 0, the saturation of the winding magnetic circuit is the lowest, and the phase inductance is the largest at this time. When θ=0, the magnetic flux component of the rotor on the winding is the largest, and the direction of the magnetomotive force generated by the phase current is consistent with the direction of the rotor magnetomotive force, which plays a magnetizing role, the saturation of the winding magnetic circuit is the highest, and the inductance is the smallest at this time. When θ=π, although the magnetic flux component of the rotor on the winding is the largest, the direction of the magnetomotive force generated by the phase current is opposite to the direction of the rotor magnetomotive force, which plays a demagnetizing role, and the inductance value is larger than when θ=0.
[0042] In order to use the pulse injection method to identify the initial position of the rotor, the inductance saturation effect is further expanded: when the N pole direction of the rotor permanent magnet is closer to the line current direction, the magnetic flux component of the rotor on the two-phase winding is larger, and the line inductance is smaller. Because the rate of change of the line current is inversely proportional to the size of the line inductance, the faster the line current changes, the smaller the line inductance. When the rotor is stationary, the voltage equation of the PMSM in the three-phase coordinate system can be simplified to:
[0043]
[0044] Further, the relationship between line current i(t) and line inductance L can be obtained:
[0045]
[0046] Where R is resistance and t is time. It can be seen from the above formula that the larger the line inductance, the slower the line current changes; the smaller the line inductance, the faster the line current changes. When obtaining multiple phase current values, the larger the response current value at the end of the voltage pulse, the smaller the line inductance, the closer the N pole direction of the rotor permanent magnet is to the line current direction, and the closer the rotor is to the actual position. Therefore, the electrical position corresponding to the voltage pulse corresponding to the maximum current value is the closest position of the rotor. The corresponding electrical position is used as the initial position of the rotor for the first control of the current loop, and as the initial value of the subsequent nonlinear flux observer observation position.
[0047] Then, the position corresponding to the voltage pulse corresponding to the maximum current value is the current closest position of the rotor, and the position corresponding to the maximum current value is used as the initial position of the rotor.
[0048] Step 206: Obtain a current position related value determined based on the flux observer.
[0049] Among them, the flux observer estimates the stator flux in the stationary coordinate system. And the current position (such as the current angle) and current speed (such as the current angular velocity) of the motor can be estimated through the flux.
[0050] The flux observer expression is:
[0051]
[0052] Where k represents the kth calculation, T s is the sampling period, i α and i β is the current component of the stator current on the α-axis and the current component on the β-axis in the stationary coordinate system of the motor, U α and U β is the voltage component of the stator voltage on the α-axis and the voltage component on the β-axis in the stationary coordinate system of the motor, L s is the stator inductance, ψ f is the permanent magnet flux, and θ is the current position. is the stator flux component on the α axis, is the stator flux component on the β axis, γ is the observer gain, and Y is the discretization of the state space expression of the flux.
[0053] Then, combining the vector function and the estimated flux, the current position related value determined by the flux observer is
[0054]
[0055] It is understandable that the current position-related value can be directly the current angle value It can also be the trigonometric function value corresponding to the current angle value, for example Wait, it can also be wait.
[0056] Step 208, adjusting based on the position difference between the initial position and the current position related value to obtain the current observed position of the motor.
[0057] Specifically, the initial position and current position related values are known Then we can make a difference and get the position error, which is used as the input of the PI (proportional-integral) regulator to get the current observed position of the motor. The current observed position of the motor is also the estimated position of the current motor. It can be understood that the current position related value is the value calculated by the flux observer; the current observed position of the motor is the value after PI adjustment.
[0058] Or, for the above By performing inverse trigonometric calculations, the estimated position can also be obtained, thereby obtaining the position error.
[0059] Step 210: Perform sensorless field oriented control of the motor based on the current observation position.
[0060] Among them, sensorless field oriented control refers to sensorless field oriented control, which is a motor control technology.
[0061] Specifically, the current observation position is used as an input value of the non-inductive magnetic field oriented control to perform the non-inductive magnetic field oriented control of the motor. During the operation of the motor, after obtaining the current observation position of the motor, the phase current and phase voltage are sampled, and the next observation position is calculated. The non-inductive magnetic oriented control of the motor is performed according to the current observation position and the next observation position, thereby realizing closed-loop control.
[0062] In this embodiment, the position of the motor during operation is obtained by a flux observer, but the initial position is difficult to obtain. By selecting any two phases from the three-phase stator winding multiple times, applying a positive and a negative voltage pulse to the two phases respectively, using the phase current after the pulse ends, and taking the position corresponding to the maximum current value as the initial position of the rotor, the initial position with an acceptable error can be obtained through simple operations, avoiding the situation where the motor reverses when finding the initial position in the traditional method; the current observed position of the motor is obtained by adjusting based on the difference between the initial position and the current position related values, and the motor is subjected to non-inductive magnetic field oriented control based on the current observed position, so there is no need for three-stage starting, which improves the starting speed of the motor. During the starting process, the observed position of the flux observer tends to converge, so zero-speed closed-loop starting can be achieved, thereby improving the operating efficiency of the motor.
[0063] In one embodiment, a positive voltage pulse and a negative voltage pulse are applied to two phases respectively, and the phase current after each pulse is sampled includes:
[0064] A positive and a negative voltage pulse are applied to the two phases respectively to turn on the upper and lower tubes of the corresponding phases of the inverter, and the phase current after each pulse ends is sampled.
[0065] Specifically, the processor applies a positive and a negative voltage pulse to two phases of the three-phase stator winding, respectively, to turn on the upper and lower tubes of the corresponding phases of the inverter. For example, when a positive and a negative voltage pulse are applied to the U phase and the V phase, the upper tube of the U phase and the lower tube of the V phase are turned on. The three phases are U phase, V phase and W phase, so 2 phases are selected to apply voltage pulses in the following order: UV, UW, VW, VU, WU, WV, that is, a total of 6 high-frequency voltage pulses are applied to identify the initial position of the rotor. When applying a voltage pulse, such as Figure 4As shown, it is a schematic diagram of the switching state of 6 switching tubes of a three-phase inverter in an embodiment. Among them, UH refers to the U-phase upper tube, UL refers to the U-phase lower tube; VH refers to the V-phase upper tube, VL refers to the V-phase lower tube; WH refers to the W-phase upper tube, and WL refers to the W-phase lower tube. Then, when a positive and a negative voltage pulse are applied to the UV phase, the U-phase upper tube and the V-phase lower tube of the inverter are turned on. When a positive and a negative voltage pulse are applied to the UW phase, the U-phase upper tube and the W-phase lower tube of the inverter are turned on. Similarly, when the remaining voltage pulses are applied, the corresponding upper and lower tubes of the inverter are turned on.
[0066] In this embodiment, a positive and a negative voltage pulse are applied to the two phases respectively to turn on the upper tube and the lower tube of the corresponding phase of the inverter, and the phase current after the pulse ends is sampled. The initial position with an acceptable error range can be obtained through simple operations, thereby improving the starting speed of the motor.
[0067] In one embodiment, the duration of the voltage pulse is a first preset number of three-phase inverter switching cycles, and the time interval between adjacent voltage pulses is a second preset number of three-phase inverter switching cycles.
[0068] Specifically, the first preset number may be smaller than the second preset number. The first preset number is at least 1, and the second preset number is greater than 1.
[0069] In this embodiment, the switching period of the three-phase inverter is used as the reference time, so that the duration of the voltage pulse can be accurately controlled, so that the conduction time of the upper and lower tubes of the two phases is sufficient and the motor starting time is short.
[0070] In one embodiment, control adjustment is performed based on the difference between the initial position and the current position related value to obtain the current observed position of the motor, including:
[0071] Get the position difference between the initial position and the current position;
[0072] The product of the position difference and the permanent magnet flux is input into the proportional-integral regulator for adjustment, and the initial position is added to obtain the current observed position of the motor.
[0073] Specifically, the current position related value
[0074]
[0075] The observation position is extracted using a PLL (Phase Locked Loop). Figure 5 Schematic diagram of a phase-locked loop in one embodiment. The phase-locked loop mainly includes a PI regulator and an integrator. The PI regulator and the integrator are mainly used to extract the observed speed. and observation location Figure 5 It means that the permanent magnet flux is removed from the PI regulator. Figure 5 middle and represents the trigonometric function value of the angle at the previous moment, that is, the trigonometric function value of the initial angle, ψ f sin(θ) and ψ f cos(θ) are all values related to the current angle. In order to reduce the amount of calculation, the permanent magnet flux is input into the PI regulator as part of the observed position, and then divided by the permanent magnet flux when setting the PI regulator parameters. According to the sum and difference formula:
[0076]
[0077] When the position error value is very small,
[0078]
[0079] In the first calculation of the motor, the position error Δθ between the current angle and the initial angle and the permanent magnet flux ψ are calculated. f The product is used as the input of the PI regulator, and the position error is controlled by the PI regulator to output the current observed value of the speed. Subsequently, the position error between the current angle and the previous observed angle and the product of the permanent magnet flux are used as the input of the PI regulator to perform magnetic field oriented control of the motor. When the speed stabilizes, the position error also remains almost stable.
[0080] Since the permanent magnet flux is a constant, the constant does not change when the hardware is fixed. Therefore, the parameters in the proportional-integral regulator should be divided by the permanent magnet flux when setting, that is, the parameters in the proportional-integral regulator are the parameters that have removed the permanent magnet flux. Therefore, in the process of calculating the position error between the current angle and the initial angle, it is not necessary to divide by the permanent magnet flux separately. The processor inputs the product of the position difference and the permanent magnet flux into the proportional-integral regulator for control and adjustment, and then accumulates the initial position to obtain the current observed position. Alternatively, the PI regulator may include an addition term that accumulates the initial position to obtain the current observed position.
[0081] In this embodiment, during the calculation process, performing division alone is time-consuming, so the product of the position difference and the permanent magnet flux is input into the proportional-integral regulator, which is adjusted by the proportional-integral regulator taking the permanent magnet flux into consideration, thereby increasing the calculation speed and thus improving the motor operating efficiency.
[0082] In one embodiment, adjusting based on the position difference between the initial position and the current position related value to obtain the current observed position of the motor includes:
[0083] Proportional integral adjustment is performed based on the position difference between the initial position and the current position related value to obtain the current observation speed;
[0084] The current observed speed is integrated to obtain the current observed position of the motor; wherein the current observed position is used to input the Park inverse transform module of the sensorless magnetic field oriented control system, and the current observed speed is used to input the speed loop control of the sensorless magnetic field oriented control system.
[0085] Specifically, the observed speed and observed position are both important parameters for the motor's non-inductive field oriented control. The output of the PI regulator can be the observed speed, which is then integrated to obtain the observed position. Figure 6 FIG. 1 is a schematic diagram of the structure of a non-inductive magnetic field oriented control system in one embodiment. Figure 6 The output of the flux observer includes the observed position Used for input to Park transform (Park) and inverse Park transform (Anti_park); observe the velocity Used for input speed loop control to match the target speed n ref The speed difference is obtained by differential calculation for PI regulation.
[0086] Figure 6 The specific process is that the motor rotates and collects the three-phase current I a ,I b and I c , after Clark transformation, the current component I on the α axis is obtained α and the current component I on the β axis β , and I α and I β is the input of the flux observer. The output of the flux observer is the observed speed With target speed n ref The difference is made and passes through the PI regulator to output I q The target value. α and I β After Park transformation, the output is I d and I q , respectively with target I d_ref (Figure I d_ref The value is 0) and the target I q_ref The difference is made and input into the PI regulator, and then the level is converted to obtain V d and V q . V d 、V q and observation location Input the Park inverse transformation module to obtain the voltage U α and U β , thereby performing SVPWM (Space Vector Pulse Width Modulation), and then inputting into the three-phase inverter to drive the motor to run.
[0087] In this embodiment, the current observed position and the current observed speed output by the flux observer are used as the current values of the motor for non-inductive field oriented control, which can avoid the problem of motor starting reversal, achieve 100% probability of non-reversal starting, and improve the stability of the motor.
[0088] In one embodiment, after completing the construction of the nonlinear flux observer, it is necessary to select a suitable observer gain γ. Increasing γ can increase the convergence speed of the observation position, but the output fluctuation will become larger in steady state; reducing γ can reduce the fluctuation in steady state, but it will reduce the convergence speed. Therefore, it is necessary to select a suitable γ to balance the convergence speed and the output fluctuation in steady state. After many actual measurements, the present application found that there is a certain relationship between the reference speed and the observer gain, which can greatly reduce the fluctuation and has a weak impact on the convergence speed. Therefore, the method for determining the observer gain in the flux observer includes: obtaining the reference speed of the motor; determining the observer gain in the flux observer according to the reference speed and the preset gain rule;
[0089] Acquiring a current position related value determined based on a flux observer includes: acquiring a current position related value determined based on a flux observer including an observer gain.
[0090] The reference speed may be a speed input by a user, a speed selected from a motor, etc. The observer gain is used to replace the original fixed observer gain in the magnetic observer.
[0091] Specifically, the preset gain determination rule contains a functional relationship between the reference speed and the corresponding observer gain. And the functional relationship may include a linear relationship. The processor substitutes the reference speed into the preset gain determination rule for calculation to obtain the current observer gain corresponding to the reference speed. Then the value of the observer gain is assigned to the flux observer, and the current position related value is determined by the flux observer containing the observer gain.
[0092] In this embodiment, by obtaining the reference speed of the motor, determining the observer gain in the flux observer according to the reference speed, and determining the current position related value based on the observer gain, an accurate observer gain is obtained, which can greatly reduce the steady-state output fluctuation of the motor and has a weak impact on the convergence speed.
[0093] In one embodiment, determining the observer gain in the flux observer according to the reference speed and a preset gain determination rule includes:
[0094] When the reference speed is less than or equal to the preset speed, the preset gain is used as the observer gain;
[0095] When the reference speed is greater than the preset speed, the observer gain in the flux observer is determined according to the product of the preset proportional coefficient and the reference speed plus the preset bias coefficient.
[0096] Specifically, after many actual measurements, it was found that the reference speed and the observer gain follow a certain pattern, such as Figure 7 As shown in FIG. 1 , a functional relationship diagram between the observer gain and the reference speed in one embodiment is shown. The observer gain γ has a linear relationship with the speed within a certain reference speed range, as follows:
[0097]
[0098] Among them, n ref is the reference speed, n0 is the preset speed, γ0 is the preset gain value, k is the preset proportional coefficient, b is the preset bias coefficient, n max is the rated speed.
[0099] That is, when the reference speed is less than or equal to the preset speed, the preset gain value is used as the observer gain; when the reference speed is greater than the preset speed, the observer gain in the flux observer is determined according to the product of the preset proportional coefficient and the reference speed plus the preset bias coefficient. The above relationship shows that when the reference speed is less than n0, the observer gain γ can be selected as a fixed value γ0. This is because under low speed conditions, the control of the motor is more obviously affected by nonlinear factors such as the dead zone of the three-phase inverter. At this time, no matter how the observer gain is adjusted, the control effect has almost no change. When it is greater than the preset speed, there is a nearly linear relationship between the observer gain and the speed.
[0100] Figure 8 It is a schematic diagram of the actual speed of the towing motor when the reference speed is 300 rpm and the observer gain γ=2000 in one embodiment. Figure 8 The horizontal axis is time, and the vertical axis is speed. △T is the time difference between the two selected time points. MAX is the maximum speed, MIN is the minimum speed, AVG is the average speed, and RMS is the root mean square value. Fig. 9 The figure is a schematic diagram of the actual speed of the towing motor when the reference speed is 500 rpm and the observer gain γ=2000 in one embodiment. γ=2000 is the optimal observer gain corresponding to the speed of 300 rpm and the speed of 500 rpm, and the speed fluctuation is the smallest at this time. Figure 8 and Fig. 9 It can be seen that when the speed is less than or equal to 500rpm, the same observer gain γ is used, and the control effect on the motor is the same, that is, using the same observer gain, the speed fluctuations of the two are almost the same, and the optimal observer gain of the two is the same. After actual measurement, when the reference speed is less than or equal to 500rpm, the optimal observer gain γ = 2000.
[0101] When the reference speed is greater than 500rpm and less than or equal to the motor rated speed n maxWhen , reference speeds such as 600rpm, 1000rpm, 1500rpm, 2000rpm, 2500rpm, and 3000rpm are selected to test the suitable observer gain γ under different reference speeds. Fig.10 The figure is a schematic diagram of the actual speed of the towing motor when the reference speed is 600 rpm and the observer gain γ=2200 in one embodiment. γ=2200 is the optimal observer gain corresponding to the reference speed of 600 rpm, and the speed fluctuation is minimal at this time. Fig.11 The figure is a schematic diagram of the actual speed of the towing motor when the reference speed is 1000 rpm and the observer gain γ=2800 in one embodiment. γ=2800 is the optimal observer gain corresponding to the reference speed of 1000 rpm, and the speed fluctuation is minimal at this time. Fig.12 The figure is a schematic diagram of the actual speed of the towing motor when the reference speed is 1500 rpm and the observer gain γ=3500 in one embodiment. γ=3500 is the optimal observer gain corresponding to the reference speed of 1500 rpm, and the speed fluctuation is minimal at this time. Fig.13 The figure is a schematic diagram of the actual speed of the towing motor when the reference speed is 2000 rpm and the observer gain γ=4400 in one embodiment. γ=4400 is the optimal observer gain corresponding to the reference speed of 2000 rpm, at which the speed fluctuation is minimal. Fig.14 The figure is a schematic diagram of the actual speed of the towing motor when the reference speed is 2500 rpm and the observer gain γ=5100 in one embodiment. γ=5100 is the optimal observer gain corresponding to the reference speed of 2500 rpm, at which the speed fluctuation is minimal. Fig.15 The figure is a schematic diagram of the actual speed of the towing motor when the reference speed is 3000rpm and the observer gain γ=6000 in an embodiment. γ=6000 is the optimal observer gain corresponding to the reference speed of 3000rpm, and the speed fluctuation is the smallest at this time. Therefore, it can be concluded from the above results that when the reference speed is greater than 500rpm, the suitable observer gain γ increases with the increase of the reference speed, showing a linear relationship. The proportional coefficient k and the bias coefficient b are fitted by the above data, and the above k=1.6, and the bias b=1200. For this motor, when other reference speeds are given, the appropriate observer gain can be calculated according to γ=1.6n+1200. It should be noted that the proportional coefficient and bias are different for motors with different parameters, and actual testing and calculation are required.
[0102] In this embodiment, the motor control effect of the same observer gain is almost the same under low speed conditions. Therefore, when the reference speed is less than or equal to the preset speed, the preset gain value is used as the observer gain; when the reference speed is greater than the preset speed, there is a linear relationship between the speed and the observer gain. Therefore, the observer gain in the flux observer is determined based on the product of the preset proportional coefficient and the reference speed plus the preset bias coefficient, which can greatly reduce the steady-state output fluctuation of the motor and has a weak impact on the convergence speed.
[0103] In one embodiment, a conventional permanent magnet synchronous motor may reverse during the pre-positioning process. Secondly, for some motors, the same observer gain cannot be used to achieve stable control within the rated speed of the motor. In response to the above problems, the purpose of this embodiment is to solve the following problems: 1. To solve the problem that the permanent magnet synchronous motor may reverse at startup under the control of the sensorless FOC; 2. To solve the problem of observer gain adaptation within the rated speed; 3. To solve the problem that the sensorless FOC based on back electromotive force cannot achieve forward and reverse switching during operation. The following explanation is given with position as the angle and speed as the angular velocity.
[0104] Step 1: Select any two phases from the three-phase stator winding, leave the other phase hanging, and inject voltage pulses in the positive and negative directions in the following order: UV, UW, VW, VU, WU, WV. Apply voltage to the two phases, that is, inject 6 high-frequency voltage pulses to identify the initial position of the rotor. The electrical angle corresponding to each voltage pulse is: 150°, 210°, 270°, 330°, 30°, 90°. The duration of each voltage pulse is one switching cycle of the three-phase inverter, and the time interval between adjacent voltage pulses is three switching cycles of the inverter. When the voltage pulse is injected, the switching states of the 6 switching tubes of the three-phase inverter are as follows: Figure 4 As shown. At the end of the voltage pulse, the corresponding phase current is sampled to obtain 6 response current values. The larger the response current value at the end of the voltage pulse, the smaller the line inductance and the closer the N pole direction of the rotor permanent magnet is to the line current direction. Therefore, the electrical angle corresponding to the voltage pulse corresponding to the maximum current value is the closest position of the rotor. The corresponding electrical angle is used as the initial position of the rotor for the first control of the current loop and as the initial value of the subsequent nonlinear flux observer observation angle.
[0105] Step 2: Establish the voltage equation of PMSM in the stationary coordinate system:
[0106]
[0107] In the above formula, i α and i β is the current component of the stator current on the α-axis and the current component on the β-axis in the stationary coordinate system of the motor, U α and Uβ is the voltage component of the stator voltage on the α-axis and the voltage component on the β-axis in the stationary coordinate system of the motor; R is the stator resistance, L s is the stator inductance, ψ f is the permanent magnet flux, w e is the rotor angular velocity.
[0108] Step 3: Establish the stator flux equation of PMSM in the stationary coordinate system:
[0109]
[0110] The nonlinear flux observer estimates the stator flux in the stationary coordinate system, so the state variables of the flux observer are selected as:
[0111]
[0112] Step 4: Take the first-order derivative of the observer state variable (3) in step 3 and combine it with the voltage equation (1) in step 2 to obtain the state space equation of the PMSM about the flux in the stationary coordinate system:
[0113]
[0114] Define the following vector function:
[0115]
[0116] Combining the flux equation (3) in step 3, the vector function is equivalent to estimating the flux:
[0117]
[0118] According to the Euclidean norm, the modulus of the vector function is calculated as:
[0119]
[0120] Step 5: Use the gradient descent method to construct a nonlinear observer of the following form:
[0121]
[0122] in
[0123]
[0124] y 12 is the state space expression of magnetic flux in the stationary coordinate system.
[0125] is the gradient step size, which determines the speed of gradient descent; γ alone is called the observer gain.
[0126]
[0127] is the observation equation gradient.
[0128]
[0129] Observation equation is the square of a vector function.
[0130] y3=ψ f 2 ……(12)
[0131] y3 is the square of the actual permanent magnet flux.
[0132] Substituting equations (9), (10), (11) and (12) into equation (8), we can finally construct a nonlinear position observer based on flux linkage:
[0133]
[0134] Step 6: Discretize the nonlinear flux observer (13) in step 5 to obtain equation (14)
[0135]
[0136] Where k represents the kth calculation, T s is the sampling period, Y1 and Y2 are the discretization of y12 in equation (9), is the stator flux component on the α axis, is the stator flux component on the β axis.
[0137] Combining the vector function (5) in step 4 with the estimated flux (6), we can get
[0138]
[0139] Step 7: Use PLL (phase-locked loop) to extract the observed speed and angle. The structure of the phase-locked loop is as follows: Figure 1-3 As shown, it mainly includes PI regulator and integrator. In order to reduce the amount of calculation, the permanent magnet flux is input into the PLL as part of the observation angle, and then divided by the permanent magnet flux when setting the PI regulator parameters. According to the sum and difference formula:
[0140]
[0141] When the electrical angle error is very small,
[0142]
[0143] The angle error Δθ and the permanent magnet flux ψ f The product is used as the input of the PI regulator. The angle error is controlled by the PI regulator and approaches zero continuously. This means that the observed angle approaches the actual angle continuously and finally converges to the actual angle. The output of the PI regulator is the observed electrical angular velocity. After integration and accumulation with the initial position of the rotor detected by the 6-pulse injection method, the observed angle can be obtained. The observed speed and angle are used instead of the actual speed and angle to perform the sensorless FOC control of the PMSM. The sensorless FOC control block diagram based on the nonlinear flux observer is shown in the figure. Figure 6 shown.
[0144] Through steps 2 to 7, a position observer based on a nonlinear flux observer is constructed, and the observed speed and angle are extracted through PLL.
[0145] After completing the construction of the nonlinear flux observer, it is necessary to select a suitable observer gain γ. Increasing γ can increase the convergence speed of the observation angle, but the output fluctuation will become larger in the steady state; reducing γ can reduce the fluctuation in the steady state, but it will reduce the convergence speed. Therefore, it is necessary to select a suitable γ to balance the convergence speed and the output fluctuation in the steady state.
[0146] According to the results of multiple actual tests, Figures 8 to 15 The motor speeds under different reference speeds and different observer gains are found to conform to certain rules between the reference speed and the observer gain, and the observer gain γ has a linear relationship with the speed within a certain reference speed range. Therefore, this embodiment proposes a method for dynamically adjusting the observer gain γ based on the reference speed to achieve high-performance sensorless FOC control within the rated speed of the PMSM.
[0147] Step 8: Construct the following observer gain γ and reference speed n ref Absolute value relationship:
[0148]
[0149] The above relationship shows that when the reference speed is less than n0, the observer gain γ can be selected as a fixed value (preset gain parameter) γ0. This is because under low speed conditions, the control of the motor is more obviously affected by nonlinear factors such as the dead zone of the three-phase inverter. At this time, no matter how the observer gain is adjusted, the control effect has almost no change. After actual testing, it was found that Figure 8 and 9 As shown in , when the reference speed is less than or equal to 500 rpm, that is, n0 = 500, the appropriate observer gain is γ0 = 2000. Figures 10 to 15 As shown, when the reference speed is greater than 500rpm and less than or equal to the rated speed n of the motor maxWhen , select reference speeds such as 600rpm, 1000rpm, 1500rpm, 2000rpm, 2500rpm, and 3000rpm, test the suitable observer gain γ under different reference speeds, and then fit the proportional coefficient k and bias b. When other reference speeds are given, the suitable observer gain can be calculated according to the above formula. After calculation, the proportional coefficient k = 1.6, and the bias b = 1200. It should be noted that the proportional coefficient and bias are different for motors with different parameters, and actual testing and calculation are required.
[0150] In this embodiment, the problem of a certain probability of slight reversal during the PMSM sensorless FOC starting phase based on a nonlinear flux observer is solved, and a 100% probability of non-reversal starting can be achieved; the PMSM sensorless FOC starting load capacity is improved, and at different speeds, the appropriate observer gain can be automatically calculated, thereby improving the stability and accuracy of the motor within the rated speed. After multiple actual motor operations, it has been proven that non-reversal starting can be achieved at any position of the rotor, with a 100% success rate of starting, a small starting current, and a smooth start. The observed position converges quickly and can converge to the actual position within one electrical position cycle; the motor can operate stably at different reference speeds, and when the rotor speed is greater than 500rpm, the error between the actual speed and the reference speed is between ±1%. The rotor switches between forward and reverse directions quickly, and the switching process is smooth and jitter-free.
[0151] In one embodiment, a position acquisition method based on a flux observer includes:
[0152] Step (a1), multiple times, select any two phases from the three-phase stator winding, apply a positive and a negative voltage pulse to the two phases respectively, for turning on the upper tube and the lower tube of the corresponding phase of the inverter, and sample the phase current after each pulse ends; the voltage pulse duration is a first preset number of three-phase inverter switching cycles, and the time interval between adjacent voltage pulses is a second preset number of three-phase inverter switching cycles.
[0153] Step (a2), taking the position corresponding to the maximum current value in the phase current as the initial position of the rotor.
[0154] Step (a3), obtaining the reference speed of the motor.
[0155] Step (a4), when the reference speed is less than or equal to the preset speed, the preset gain is used as the observer gain.
[0156] Step (a5), when the reference speed is greater than the preset speed, the observer gain in the flux observer is determined according to the product of the preset proportional coefficient and the reference speed plus the preset bias coefficient.
[0157] Step (a6), obtaining a current position related value determined based on a flux observer including an observer gain.
[0158] Step (a7), obtaining the position difference between the initial position and the current position correlation value.
[0159] Step (a8), input the product of the position difference and the permanent magnet flux into the proportional-integral regulator for adjustment to obtain the current observed speed.
[0160] Step (a9), integrate the current observed speed, add the initial position, and obtain the current observed position of the motor. The current observed position is used to input the Park inverse transform module of the sensorless magnetic field oriented control system, and the current observed point position speed is used to input the speed loop control of the sensorless magnetic field oriented control system.
[0161] Step (a10), performing non-inductive magnetic field oriented control of the motor based on the current observed position.
[0162] In this embodiment, the problem of a certain probability of slight reversal during the motor startup phase based on the nonlinear flux observer is solved, and a 100% probability of non-reversal startup can be achieved; the motor's non-inductive field oriented control starting load capacity is improved, and at different speeds, the appropriate observer gain can be automatically calculated, thereby improving the stability and accuracy of the motor within the rated speed.
[0163] It should be understood that although the above Figure 2 In the flowchart, each step is shown in sequence as indicated by the arrows, and each step in step (a1) to step (a10) is shown in sequence as indicated by the numbers, but these steps are not necessarily performed in the order indicated by the arrows or numbers. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be performed in other orders. Moreover, Figure 2 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0164] In one embodiment, a field programmable gate array is provided, on which a computer program is stored. The field programmable gate array is used to implement the steps of the above-mentioned method embodiments.
[0165] In one embodiment, a motor driver is provided, including a memory, a processor and a three-phase inverter. A computer program is stored in the memory. When the processor executes the computer program, the steps of the above-mentioned method embodiments are implemented. The three-phase inverter is used to drive the motor.
[0166] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method embodiments are implemented.
[0167] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.
[0168] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes in the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0169] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A position acquisition method based on a flux observer, characterized in that: The method comprises: Selecting two phases from the three-phase stator winding multiple times, applying a positive and a negative voltage pulse to the two phases respectively, and sampling the phase current after each pulse ends; Taking the position corresponding to the maximum current value in the phase current as the initial position of the rotor; Obtain the current position related value determined based on the flux observer; Adjusting based on the position difference between the initial position and the current position related value to obtain the current observed position of the motor; Based on the current observed position, sensorless field oriented control of the motor is performed.
2. The method according to claim 1, characterized in that The step of applying a positive voltage pulse and a negative voltage pulse to the two phases respectively and sampling the phase current after each pulse ends includes: A positive voltage pulse and a negative voltage pulse are applied to the two phases respectively to turn on the upper tube and the lower tube of the corresponding phase of the inverter, and the phase current after each pulse ends is sampled.
3. The method according to claim 2, characterized in that The duration of the voltage pulse is a first preset number of three-phase inverter switching cycles, and the time interval between adjacent voltage pulses is a second preset number of three-phase inverter switching cycles.
4. The method according to claim 1, characterized in that: The step of adjusting based on the position difference between the initial position and the current position related value to obtain the current observed position of the motor includes: Obtaining a position difference between the initial position and the current position correlation value; The product of the position difference and the permanent magnet flux is input into a proportional-integral regulator for adjustment, and the initial position is added to obtain the current observed position of the motor.
5. The method according to claim 1, characterized in that The step of adjusting based on the position difference between the initial position and the current position related value to obtain the current observed position of the motor includes: Perform proportional-integral adjustment based on the position difference between the initial position and the current position related value to obtain the current observation speed; The current observed speed is integrated and added to the initial position to obtain the current observed position of the motor; wherein the current observed position is used to input the Park transformation module and the Park inverse transformation module of the non-inductive magnetic field oriented control system, and the current observed speed is used to input the speed loop control of the non-inductive magnetic field oriented control system.
6. The method according to claim 1, characterized in that The observer gain determination method in the flux observer includes: Obtaining a reference speed of the motor; Determining an observer gain in the flux observer according to the reference speed and a preset gain determination rule; The obtaining of the current position related value determined based on the flux observer includes: A current position related value determined based on a flux observer including the observer gain is obtained.
7. The method according to claim 6, characterized in that The step of determining the observer gain in the flux observer according to the reference speed and a preset gain determination rule comprises: When the reference speed is less than or equal to a preset speed, using a preset gain as an observer gain; When the reference speed is greater than the preset speed, the observer gain in the flux observer is determined according to the product of a preset proportional coefficient and the reference speed plus a preset bias coefficient.
8. A field programmable gate array having a computer program stored thereon, characterized in that: The field programmable gate array is used to implement the steps of the method according to any one of claims 1 to 7.
9. A motor driver, comprising a memory, a processor and a three-phase inverter, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented, and the three-phase inverter is used to drive a motor.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.