Zero self-learning method of permanent magnet synchronous motor
Through multiple injection current vectors and speed closed-loop control, combined with the d-axis current loop output results, the accurate self-learning of the zero position of the permanent magnet synchronous motor is achieved, the problem of insufficient zero position is solved, and the control accuracy is improved.
Patent Information
- Application Number
- CN202411599285.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-02-14
AI Technical Summary
The zero position of the permanent magnet synchronous motor is not accurate enough, resulting in a decrease in control accuracy.
By injecting the motor with a current vector with amplitude of the motor and an angle of 0° multiple times, the rotor position is obtained, and the initial value of the zero position is reached based on the average value, and the speed closed-loop control is performed. When the motor speed is stable, it is determined whether there is a deviation in the zero position based on the d-axis current loop output result, and the zero compensation value is determined through error correction, and the exact zero position is finally determined.
It improves the accuracy of the motor zero position, ensures the improvement of control accuracy, and solves the problem of insufficient zero position accuracy.
Smart Images

Figure CN119448856A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of motor control, and in particular to a zero-position self-learning method for a permanent magnet synchronous motor. Background Art
[0002] In recent years, permanent magnet synchronous motors have been widely used due to their high efficiency, high power density and other advantages. At present, the control of permanent magnet synchronous motors depends on precise position accuracy, and precise position accuracy requires precise zero position.
[0003] At present, the mainstream solution is to inject a positioning current vector into the permanent magnet synchronous motor to attract the permanent magnet synchronous motor to the zero position, and then read the rotor position and use the average value as the zero position. However, the initial position of the rotor is random. When the applied positioning current vector happens to form a small angle with the rotor position, the positioning torque will not be enough to overcome the inherent torque and the rotor cannot rotate to position. This feature determines that the position obtained only by current attraction is likely not to be an accurate zero position. Summary of the invention
[0004] The invention provides a zero position self-learning method for a permanent magnet synchronous motor to solve the problem of insufficient precision of the zero position.
[0005] According to one aspect of the present invention, a zero-position self-learning method for a permanent magnet synchronous motor is provided, and the zero-position self-learning method for a permanent magnet synchronous motor comprises:
[0006] A current vector with an amplitude of the rated current of the motor and an angle of 0° is injected into the motor multiple times, and multiple rotor positions are obtained, and a zero position initial value is obtained based on an average value of the multiple rotor positions;
[0007] Performing speed closed-loop control based on the zero position initial value;
[0008] When the motor speed is in a stable state, determine whether there is a deviation in the motor zero position based on the output result of the d-axis current loop;
[0009] When there is a deviation in the zero position of the motor, a rotor position error correction is performed based on the output result of the d-axis current loop to determine a zero position compensation value, and the zero position is determined based on the zero position compensation value and the zero position initial value.
[0010] In an optional embodiment of the present invention, performing rotor position error correction based on the output result of the d-axis current loop to determine the zero position compensation value includes:
[0011] The d-axis current loop output result is input into the PI regulator as an error signal, so that the PI regulator outputs a zero position compensation value.
[0012] In an optional embodiment of the present invention, determining whether there is a deviation in the motor zero position based on the output result of the d-axis current loop includes:
[0013] Determine whether the d-axis current loop output result is 0;
[0014] When the output result of the d-axis current loop is 0, it is determined that there is no deviation in the motor zero position;
[0015] When the d-axis current loop output result is not 0, it is determined that there is a deviation in the motor zero position.
[0016] In an optional embodiment of the present invention, the determining the zero position based on the zero position compensation value and the zero position initial value comprises:
[0017] The sum of the zero position compensation value and the zero position initial value is determined as the zero position.
[0018] In an optional embodiment of the present invention, the step of injecting a current vector having an amplitude of the rated current of the motor and an angle of 0° into the motor for multiple times, acquiring multiple rotor positions, and obtaining a zero position initial value based on an average value of the multiple rotor positions includes:
[0019] A current vector with an amplitude equal to the rated current of the motor and an angle of 0° is injected into the motor multiple times;
[0020] Injecting a current vector having an amplitude of the rated current of the motor and an angle of a preset angle into the motor at least once, wherein the preset angle is greater than or equal to -45° and less than or equal to 45°, and the preset angle is not 0°;
[0021] Get multiple rotor positions corresponding to an angle of 0°;
[0022] The average value of multiple rotor positions corresponding to an angle of 0° is determined as the zero position initial value.
[0023] In an optional embodiment of the present invention, when the motor speed is in a stable state, before determining whether the motor zero position has a deviation based on the d-axis current loop output result, the method further includes:
[0024] Get the motor speed and motor set speed;
[0025] Determining a speed deviation between the motor speed and the motor set speed;
[0026] When the speed deviations within the preset time period are all less than or equal to the preset speed deviations, it is determined that the motor speed is in a stable state;
[0027] When the speed deviation is greater than the preset speed deviation at any time within the preset time period, it is determined that the motor speed is not in a stable state.
[0028] In an optional embodiment of the present invention, the speed closed-loop control based on the zero position initial value further includes:
[0029] Get the analytical rotor position;
[0030] Determining an angle compensation value based on a difference between the analytical rotor position and the zero position initial value;
[0031] Performing an inverse Park transformation on the d-axis stator voltage component and the q-axis stator voltage component based on the angle compensation value to obtain an α-axis stator voltage component and a β-axis stator voltage component in a stationary coordinate system;
[0032] According to the α-axis stator voltage component and the β-axis stator voltage component, a voltage space vector control method is used to control the inverter to send a trigger pulse to perform closed-loop control on the motor.
[0033] In an optional embodiment of the present invention, when there is a deviation in the motor zero position, the d-axis stator voltage component and the q-axis stator voltage component are subjected to an inverse Park transformation based on the angle compensation value, including:
[0034] The d-axis stator voltage component and the q-axis stator voltage component are subjected to inverse Park transformation based on the zero position compensation value and the angle compensation value.
[0035] In an optional embodiment of the present invention, the speed closed-loop control based on the zero position initial value further includes:
[0036] Performing closed-loop PI regulation based on the difference between the d-axis current command value and the d-axis current feedback value of the motor to obtain a given value of the d-axis stator voltage component;
[0037] Performing closed-loop PI regulation based on the difference between the q-axis current command value and the q-axis current feedback value of the motor to obtain a given value of the q-axis stator voltage component;
[0038] The given value of the d-axis stator voltage component and the given value of the q-axis stator voltage component are feedforward decoupled to obtain the d-axis stator voltage component and the q-axis stator voltage component.
[0039] In an optional embodiment of the present invention, the feedforward decoupling of the given value of the d-axis stator voltage component and the given value of the q-axis stator voltage component to obtain the d-axis stator voltage component and the q-axis stator voltage component includes: obtaining the d-axis stator feedforward compensation voltage and the q-axis stator feedforward compensation voltage by the following formula:
[0040]
[0041] in, is the d-axis stator feedforward compensation voltage, is the q-axis stator feedforward compensation voltage; Rs is the stator resistance, L s is the stator inductance, ω r Electrical angular velocity feedback value, is the d-axis current command value, is the q-axis current command value, φ f is the motor flux;
[0042] Performing feedforward compensation on a given value of the d-axis stator voltage component according to the d-axis stator feedforward compensation voltage to obtain a d-axis stator voltage component;
[0043] The q-axis stator voltage component is obtained by performing feedforward compensation on a given value of the q-axis stator voltage component according to the q-axis stator feedforward compensation voltage.
[0044] The technical solution of the embodiment of the present invention is to inject a current vector with an amplitude of the motor rated current and an angle of 0° into the motor for multiple times, obtain multiple rotor positions, and obtain a zero position initial value based on the average value of the multiple rotor positions; perform closed-loop speed control based on the zero position initial value; when the motor speed is in a stable state, determine whether the motor zero position has a deviation based on the d-axis current loop output result; when the motor zero position has a deviation, perform rotor position error correction based on the d-axis current loop output result to determine the zero position compensation value, and determine the zero position based on the zero position compensation value and the zero position initial value. When the motor zero position has a deviation, perform rotor position error correction based on the d-axis current loop output result to determine the zero position compensation value, and finally obtain an accurate zero position through the zero position compensation value and the zero position initial value. Therefore, this solution solves the problem of inaccurate zero position.
[0045] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0047] Figure 1 is a flow chart of a zero-position self-learning method for a permanent magnet synchronous motor provided according to Embodiment 1 of the present invention;
[0048] Figure 2 yes Figure 1The step of injecting a current vector with an amplitude of the motor rated current and an angle of 0° into the motor multiple times, obtaining multiple rotor positions, and obtaining a flow chart of a zero position initial value based on the average value of the multiple rotor positions;
[0049] Figure 3 It is a control block diagram of injecting current into a motor provided by the present invention;
[0050] Figure 4 It is a control block diagram of a speed closed-loop control provided by the present invention;
[0051] Figure 5 It is a control block diagram of a speed closed loop with rotor position error correction provided by the present invention;
[0052] Figure 6 It is a partial control block diagram of a speed closed loop with feedforward decoupling provided by the present invention. DETAILED DESCRIPTION
[0053] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0054] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0055] When the motor is stationary, the motor has cogging force and friction force, which together constitute the inherent torque T0 of the motor. According to the torque formula of the motor, the positioning torque generated by the magnetic field depends on the current amplitude and power angle, that is, the stator current I s The angle θ between the rotor position srWhen the applied current amplitude is constant, the electromagnetic torque must overcome the inherent torque T0 before the motor can rotate. The initial position of the rotor is random. When the applied positioning current vector happens to form a small angle with the rotor position, the positioning torque will not be enough to overcome the inherent torque and the rotor cannot rotate to position. This limit angle θ limit It can be expressed as: Among them, n p is the number of motor pole pairs, I s is the positioning current, ψ f is the rotor flux.
[0056] For the applied current vector, if the rotor is at -θ limit <θ sr <θ limit or π-θ limit <θ sr <π+θ limit When the rotor is in the range, it cannot rotate, and this range can be called the positioning blind area.
[0057] The related technology is to inject a positioning current vector into the permanent magnet synchronous motor to attract the permanent magnet synchronous motor to the zero position, then read the rotor position and use the average value as the zero position. However, the initial position of the rotor is random. When the applied positioning current vector happens to form a small angle with the rotor position, the positioning torque will not be enough to overcome the inherent torque and the rotor cannot be rotated for positioning, so the zero position obtained is not accurate enough.
[0058] In order to solve the above problems, an embodiment of the present invention provides a flowchart of a zero-position self-learning method of a permanent magnet synchronous motor, as shown in FIG. Figure 1 As shown, the zero position self-learning method of the permanent magnet synchronous motor includes:
[0059] S110, injecting a current vector with an amplitude of the motor rated current and an angle of 0° into the motor multiple times, and obtaining multiple rotor positions, and obtaining a zero position initial value θ based on the average value of the multiple rotor positions Init-avg .
[0060] Wherein, the motor refers to a permanent magnet synchronous motor. The rated current of the motor refers to the current required by the motor when it is running at rated voltage and rated power. In some embodiments, the rotor position at this time can be detected by a displacement sensor. In other embodiments, the rotor position at this time is obtained by reading the motor encoder. The average rotor position refers to the average value of multiple rotor positions, and the zero position initial value θ is obtained based on the average value of multiple rotor positions. Init-avg . It can avoid the error existing in single detection and improve the initial value of zero position θ Init-avg accuracy.
[0061] In an optional embodiment of the present invention, Figure 2As shown, the current vector with an amplitude of the motor rated current and an angle of 0° is injected into the motor multiple times, and multiple rotor positions are obtained, and the zero position initial value is obtained based on the average value of the multiple rotor positions, including:
[0062] S111. Inject a current vector having an amplitude of the motor's rated current and an angle of 0° into the motor multiple times.
[0063] S112. Inject a current vector having an amplitude of the motor's rated current and an angle of a preset angle into the motor at least once, wherein the preset angle is greater than or equal to -45° and less than or equal to 45°, and the preset angle is not 0°.
[0064] S113, obtaining multiple rotor positions corresponding to an angle of 0°.
[0065] S114, determining the average value of multiple rotor positions corresponding to the angle of 0° as the zero position initial value θ Init-avg .
[0066] Among them, the order of step S111, injecting a current vector with an amplitude of the motor rated current and an angle of 0° into the motor for multiple times and step S112, injecting a current vector with an amplitude of the motor rated current and an angle of a preset angle into the motor at least once is not limited. In some embodiments, the motor may be first injected with a current vector with an amplitude of the motor rated current and an angle of a preset angle, and then the motor may be injected with a current vector with an amplitude of the motor rated current and an angle of 0°. Then, the motor may be injected with a current vector with an amplitude of the motor rated current and an angle of a preset angle again. In some embodiments, the step of injecting a current vector with an amplitude of the motor rated current and an angle of 0° into the motor may be performed in the steps of injecting a current vector with an amplitude of the motor rated current and an angle of 0° twice adjacently. It is understandable that in other embodiments, other orders may be used, which are not specifically limited here.
[0067] The motor may have a fault that causes the rotor to be fixed. When the motor is normal, the rotor may not rotate if a current vector with an amplitude of the motor's rated current and an angle of 0° is injected into the motor. If only a current vector with an amplitude of the motor's rated current and an angle of 0° is injected into the motor to obtain the zero position initial value θ Init-avg , the zero initial value θ is obtained at this time Init-avg Not accurate enough. By injecting a current vector with an amplitude equal to the rated current of the motor and an angle equal to a preset angle into the motor, the preset angle is not 0°. If the motor is normal, the rotor should rotate at this time, so that the rotor position at this time can reflect whether the motor has a fault. When the motor does not have a fault, the average value of multiple rotor positions corresponding to the angle of 0° is determined as the zero position initial value θ. Init-avg .
[0068] When the preset angle is large, the rotor moves for a long time, and the time taken is long. By making the preset angle greater than or equal to -45° and less than or equal to 45°, the zero position initial value θ can be increased while saving time. Init-avg accuracy.
[0069] In some embodiments, whether the motor has a fault is determined based on the rotor position corresponding to the preset angle when the angle of the current vector is a preset angle. When the difference between the corresponding rotor position and the preset angle when the angle of the current vector is a preset angle is greater than the preset difference, it is determined that the motor has a fault and a fault prompt message is issued; when the difference between the corresponding rotor position and the preset angle when the angle of the current vector is a preset angle is less than or equal to the preset difference, it is determined that the motor has no fault, and the average value of multiple rotor positions corresponding to the angle of 0° is determined as the zero position initial value θ. Init-avg In this way, the zero initial value θ can be increased. Init-avg accuracy.
[0070] The following is a specific example of how to inject a current vector into a motor. Figure 3 The control block diagram of injecting current vector into the motor is shown. The angle of the current vector θ r is 0 or a preset angle. In this embodiment, the current vector command value is the rated current of the motor. Figure 3 As shown, based on the angle θ of the current vector r And the current vector command value and the current vector feedback value i s The difference is adjusted by closed-loop PI to obtain the d-axis stator voltage component u d and the q-axis stator voltage component u q , based on the angle θ of the current vector r The d-axis stator voltage component u d and the q-axis stator voltage component u q Perform inverse Park transformation to obtain the α-axis stator voltage component u in the stationary coordinate system α and the β-axis stator voltage component u β ; According to the α-axis stator voltage component u α and the β-axis stator voltage component u β , use the voltage space vector control method to control the inverter to send trigger pulses to perform closed-loop control on the motor. When performing closed-loop control on the motor, the three-phase current i of the motor will be obtained. a 、i b and i c , and then perform Clark transformation to obtain the two-phase current According to the angle θ of the current vector r For two-phase current Perform park transformation to obtain the current vector feedback value i s .
[0071] S120, based on the zero position initial value θ Init-avg Perform closed-loop speed control.
[0072] In an optional embodiment of the present invention, Figure 4 As shown, the zero initial value θ Init-avg Perform speed closed-loop control, also including:
[0073] Obtain the analytical rotor position; based on the analytical rotor position and the zero position initial value θ Init-avg The difference between the angle compensation value and the Based on the angle compensation value The d-axis stator voltage component u d , q-axis stator voltage component u q Perform inverse Park transformation to obtain the α-axis stator voltage component u in the stationary coordinate system α and the β-axis stator voltage component u β According to the α-axis stator voltage component u α and the β-axis stator voltage component u β , using a voltage space vector control method to control the inverter to send a trigger pulse to perform closed-loop control on the motor.
[0074] The analytic rotor position can be detected by a displacement sensor. In other embodiments, the analytic rotor position is obtained by reading the motor encoder. The analytic rotor position minus the zero position initial value θ Init-avg The angle compensation value can be obtained
[0075] Based on the motor's electrical angular velocity command value and electrical angular velocity feedback value ω r The difference is closed-loop PI regulation to obtain the d-axis current command value and q-axis current command value Based on the d-axis current command value and d-axis current feedback value i d Perform closed-loop PI regulation to obtain the d-axis stator voltage component u d , based on the q-axis current command value and q-axis current feedback value i d Perform closed-loop PI regulation to obtain the q-axis stator voltage component u q , based on the angle compensation value The d-axis stator voltage component u d , q-axis stator voltage component u qPerform inverse Park transformation to obtain the α-axis stator voltage component u in the stationary coordinate system α and the β-axis stator voltage component u β ; According to the α-axis stator voltage component u α and the β-axis stator voltage component u β , using a voltage space vector control method to control the inverter to send a trigger pulse to perform closed-loop control on the motor.
[0076] When the motor is closed-loop controlled, the three-phase current i of the motor will be obtained. a 、i b and i c , and then perform Clark transformation to obtain the two-phase current According to the angle compensation value For two-phase current Perform park transformation to obtain the d-axis current feedback value i d and q-axis current feedback value i q In addition, the motor's electrical angular velocity feedback value ω r The analytical rotor position is obtained by processing the displacement and speed processing module. After the analytical rotor position is obtained, the analytical rotor position is subtracted from the zero position initial value θ Init-avg The angle compensation value can be obtained That is, the electrical angular velocity feedback value ω can be obtained through the displacement and velocity processing module r and angle compensation value
[0077] In a specific embodiment, the displacement and speed processing module includes a displacement sensor, which detects the motor to obtain the analytical rotor position, and then calculates the motor's electrical angular velocity feedback value ω through the control algorithm. r In another embodiment, the displacement and speed processing module includes a speed sensor, the motor speed is obtained through the speed sensor, and then the motor electrical angular velocity feedback value ω is calculated according to the motor speed. r , electrical angular velocity feedback value ω r =2πn / 60, where n is the motor speed in rpm (revolutions per minute), and 2π is pi. It can be understood that in other embodiments, any method of measuring the rotor position and electrical angular velocity in the relevant technology can also be used to obtain the analytical rotor position and electrical angular velocity feedback value ω r , no specific limitation is given here.
[0078] S130, when the motor speed is in a stable state, based on the d-axis current loop output result u d_err Determine if there is any deviation in the motor zero position.
[0079] Among them, when the rotor position is accurate, the d-axis current loop output result u d_erris a specific value, so the d-axis current loop output result u d_err Determine if there is any deviation in the motor zero position.
[0080] S140, when there is a deviation in the motor zero position, based on the d-axis current loop output result u d_err Perform rotor position error correction to determine the zero position compensation value θ Init-comp , and based on the zero compensation value θ Init-comp and the zero initial value θ Init-avg Determine the zero position.
[0081] When there is an error in the zero position, the motor reaction potential will produce a component on the d-axis, so the d-axis current loop output result u can be d_err The rotor position error is corrected to determine the zero position compensation value, and then the zero position is determined based on the zero position compensation value and the zero position initial value. Optionally, the zero position is determined based on the zero position compensation value and the zero position initial value, including: determining the sum of the zero position compensation value and the zero position initial value as the zero position. That is, the final accurate zero position θ ZeroPos =θ Init-avg +θ Init-comp .
[0082] The above scheme injects a current vector with an amplitude of the motor rated current and an angle of 0° into the motor multiple times, obtains multiple rotor positions, and obtains the zero position initial value θ based on the average value of multiple rotor positions. Init-avg Based on the zero initial value θ Init-avg Perform speed closed-loop control; when the motor speed is in a stable state, based on the d-axis current loop output result u d_err Determine whether there is a deviation in the motor zero position; when the motor zero position has a deviation, based on the d-axis current loop output result u d_err Perform rotor position error correction to determine the zero position compensation value θ Init-comp , and based on the zero compensation value θ Init-comp and the zero initial value θ Init-avg Determine the zero position, and when there is a deviation in the motor zero position, output the result u based on the d-axis current loop d_err Perform rotor position error correction to determine the zero position compensation value θ Init-comp , and finally through the zero compensation value θ Init-comp and the zero initial value θ Init-avg Get the exact zero position θ ZeroPos , so this solution solves the problem of inaccurate zero position.
[0083] When there is a deviation in the motor zero position, such as Figure 5 As shown, the d-axis current loop output result u will be corrected by the rotor position error correction module. d_errPerform rotor position error correction to determine the zero position compensation value θ Init-comp In an optional embodiment of the present invention, the rotor position error correction module includes a PI regulator. Accordingly, the output result u based on the d-axis current loop d_err Perform rotor position error correction to determine the zero position compensation value θ Init-comp , including: outputting the d-axis current loop result u d_err The error signal is input into the PI regulator to output the zero compensation value θ through the PI regulator. Init-comp .
[0084] Among them, the PI regulator is a linear controller, which forms a control deviation based on the given value and the actual output value, and forms the control quantity through linear combination of the proportion and integral of the deviation to control the controlled object. When there is an error in the zero position, the motor reaction force will produce a component on the d-axis, so the d-axis current loop output result u d_err It is related to the error between the current zero position and the true zero position, so by converting the d-axis current loop output result u d_err The error signal is input into the PI regulator, and the zero compensation value θ output by the PI regulator Init-comp The error between the initial value of the zero position and the true value of the zero position can be compensated to obtain the accurate zero position θ ZeroPos .
[0085] In an optional embodiment of the present invention, the output result u based on the d-axis current loop d_err Determine whether there is a deviation in the motor zero position, including:
[0086] Determine the d-axis current loop output result u d_err Is it 0? When the d-axis current loop outputs the result u d_err is 0, it is determined that there is no deviation in the motor zero position; when the d-axis current loop output result u d_err If it is not 0, it is determined that there is a deviation in the zero position of the motor.
[0087] Among them, in the case of accurate zero position, the d-axis current loop output result u d_err When there is an error in the zero position, the motor reaction potential will produce a component on the d-axis, so the d-axis current loop output result is u d_err is not 0. Therefore, when the d-axis current loop outputs the result u d_err is 0, it is determined that there is no deviation in the motor zero position; when the d-axis current loop output result u d_err is not 0, it is determined that there is a deviation in the zero position of the motor. In this way, the initial value of the zero position θ can be accurately determined. Init-avg Is there any error with the true zero position? If there is an error in the zero position, the zero position can be calibrated to obtain the accurate zero position.
[0088] In an optional embodiment of the present invention, when the motor speed is in a stable state, based on the d-axis current loop output result u d_err Before determining whether the motor zero position is deviated, it also includes:
[0089] Obtain the motor speed and the motor set speed; determine the speed deviation between the motor speed and the motor set speed; when the speed deviations within a preset time period are all less than or equal to the preset speed deviations, determine that the motor speed is in a stable state; when the speed deviation at any moment within the preset time period is greater than the preset speed deviation, determine that the motor speed is not in a stable state.
[0090] Among them, the motor speed refers to the real speed of the motor feedback during closed-loop control, the motor set speed refers to the speed that the motor should reach set in advance, and the preset speed deviation refers to the value that the speed deviation between the motor speed and the motor set speed should be less than when the motor speed is stable. Therefore, when the speed deviations within the preset time length are all less than or equal to the preset speed deviation, it is determined that the motor speed is in a stable state; when the speed deviation is greater than the preset speed deviation at any time within the preset time length, it is determined that the motor speed is not in a stable state. Through the above scheme, it is possible to conveniently determine whether the motor speed is in a stable state.
[0091] In an optional embodiment of the present invention, when there is a deviation in the zero position of the motor, the angle compensation value The d-axis stator voltage component u d and the q-axis stator voltage component u q Perform an inverse Park transform, including:
[0092] Based on the zero position compensation value θ Init-comp and the angle compensation value The d-axis stator voltage component u d , q-axis stator voltage component u q Perform an inverse Park transform.
[0093] When the motor zero position has a deviation, the output result u of the d-axis current loop will be d_err Correct the rotor position error to obtain the zero position compensation value θ Init-comp , due to the zero compensation value θ Init-comp is the initial value of the current zero position compensation θ Init-avg and the true zero position, so the zero position compensation value θ Init-comp It will also affect the d-axis stator voltage component u d , q-axis stator voltage component u q Through the inverse Park transformation, the α-axis stator voltage component u in the stationary coordinate system is obtained α and the β-axis stator voltage component uβ The accuracy of the zero compensation value γ Init-comp and the angle compensation value The d-axis stator voltage component u d , q-axis stator voltage component u q Perform an inverse Park transformation to convert the α-axis stator voltage component u α and the β-axis stator voltage component u β The accuracy is higher and the closed-loop control of the motor is more precise, making the zero position more accurate.
[0094] In an optional embodiment of the present invention, Figure 6 As shown, the zero initial value θ Init-avg Perform speed closed-loop control, also including:
[0095] Based on the d-axis current command value of the motor and d-axis current feedback value i d The difference is used to perform closed-loop PI regulation to obtain a given value of the d-axis stator voltage component; based on the q-axis current command value of the motor and q-axis current feedback value i q The difference is closed-loop PI regulation to obtain the given value of the q-axis stator voltage component; the given value of the d-axis stator voltage component and the given value of the q-axis stator voltage component are feedforward decoupled to obtain the d-axis stator voltage component u d and the q-axis stator voltage component u q .
[0096] Among them, motor feedforward decoupling can make the motor control response faster.
[0097] Based on the above embodiment, the given value of the d-axis stator voltage component and the given value of the q-axis stator voltage component are feedforward decoupled to obtain the d-axis stator voltage component u d and the q-axis stator voltage component u q , including: The d-axis stator feedforward compensation voltage is obtained by the following formula and q-axis stator feedforward compensation voltage
[0098]
[0099] Among them, R s is the stator resistance, L s is the stator inductance, φ f is the motor flux.
[0100] According to the d-axis stator feedforward compensation voltage The given value of the d-axis stator voltage component is feed-forward compensated to obtain the d-axis stator voltage component u d ; According to the q-axis stator feedforward compensation voltage The given value of the q-axis stator voltage component is fed forward and compensated to obtain the q-axis stator voltage component u q .
[0101] The above method can quickly perform feedforward decoupling on the motor and improve the response speed of the motor.
[0102] The following is a specific example to illustrate the feedforward decoupling process, based on the d-axis current command value of the motor and d-axis current feedback value i d The difference is used to perform closed-loop PI regulation to obtain a given value of the d-axis stator voltage component; based on the q-axis current command value of the motor and q-axis current feedback value i q The difference is adjusted by closed-loop PI to obtain the given value of the q-axis stator voltage component. The feedforward decoupling module is based on the electrical angular velocity feedback value ω r , the motor's d-axis current command value and q-axis current command value The d-axis stator feedforward compensation voltage is calculated by the above formula: and q-axis stator feedforward compensation voltage Then according to the d-axis stator feedforward compensation voltage The given value of the d-axis stator voltage component is feed-forward compensated to obtain the d-axis stator voltage component u d ; According to the q-axis stator feedforward compensation voltage The given value of the q-axis stator voltage component is fed forward and compensated to obtain the q-axis stator voltage component u q The zero position compensation value θ can be obtained later. Init-comp and the angle compensation value The d-axis stator voltage component u d , q-axis stator voltage component u q Perform inverse Park transformation to obtain the α-axis stator voltage component u in the stationary coordinate system α and the β-axis stator voltage component u β ; According to the α-axis stator voltage component u α and the β-axis stator voltage component u β , using a voltage space vector control method to control the inverter to send a trigger pulse to perform closed-loop control on the motor.
[0103] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0104] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A zero position self-learning method for a permanent magnet synchronous motor, characterized in that: include: A current vector with an amplitude of the rated current of the motor and an angle of 0° is injected into the motor multiple times, and multiple rotor positions are obtained, and a zero position initial value is obtained based on an average value of the multiple rotor positions; Performing speed closed-loop control based on the zero position initial value; When the motor speed is in a stable state, determine whether there is a deviation in the motor zero position based on the output result of the d-axis current loop; When there is a deviation in the zero position of the motor, a rotor position error correction is performed based on the output result of the d-axis current loop to determine a zero position compensation value, and the zero position is determined based on the zero position compensation value and the zero position initial value.
2. The zero position self-learning method of a permanent magnet synchronous motor according to claim 1, characterized in that: The performing of rotor position error correction based on the output result of the d-axis current loop to determine the zero position compensation value comprises: The d-axis current loop output result is input into the PI regulator as an error signal, so that the PI regulator outputs a zero position compensation value.
3. The zero position self-learning method of a permanent magnet synchronous motor according to claim 1, characterized in that: The determining whether there is a deviation in the motor zero position based on the output result of the d-axis current loop includes: Determine whether the d-axis current loop output result is 0; When the output result of the d-axis current loop is 0, it is determined that there is no deviation in the motor zero position; When the d-axis current loop output result is not 0, it is determined that there is a deviation in the motor zero position.
4. The zero position self-learning method of a permanent magnet synchronous motor according to claim 1, characterized in that: The determining of the zero position based on the zero position compensation value and the zero position initial value comprises: The sum of the zero position compensation value and the zero position initial value is determined as the zero position.
5. The zero position self-learning method of a permanent magnet synchronous motor according to any one of claims 1 to 4, characterized in that: The method of injecting a current vector having an amplitude of the rated current of the motor and an angle of 0° into the motor for multiple times, obtaining multiple rotor positions, and obtaining a zero position initial value based on an average value of the multiple rotor positions includes: A current vector with an amplitude equal to the rated current of the motor and an angle of 0° is injected into the motor multiple times; Injecting a current vector having an amplitude of the rated current of the motor and an angle of a preset angle into the motor at least once, wherein the preset angle is greater than or equal to -45° and less than or equal to 45°, and the preset angle is not 0°; Get multiple rotor positions corresponding to an angle of 0°; The average value of multiple rotor positions corresponding to an angle of 0° is determined as the zero position initial value.
6. The zero position self-learning method of a permanent magnet synchronous motor according to any one of claims 1 to 4, characterized in that: When the motor speed is in a stable state, before determining whether the motor zero position has a deviation based on the d-axis current loop output result, the method further includes: Get the motor speed and motor set speed; Determining a speed deviation between the motor speed and the motor set speed; When the speed deviations within the preset time period are all less than or equal to the preset speed deviations, it is determined that the motor speed is in a stable state; When the speed deviation is greater than the preset speed deviation at any time within the preset time period, it is determined that the motor speed is not in a stable state.
7. The zero position self-learning method of a permanent magnet synchronous motor according to any one of claims 1 to 4, characterized in that: The speed closed-loop control based on the zero position initial value also includes: Get the analytical rotor position; Determining an angle compensation value based on a difference between the analytical rotor position and the zero position initial value; Performing an inverse Park transformation on the d-axis stator voltage component and the q-axis stator voltage component based on the angle compensation value to obtain an α-axis stator voltage component and a β-axis stator voltage component in a stationary coordinate system; According to the α-axis stator voltage component and the β-axis stator voltage component, a voltage space vector control method is used to control the inverter to send a trigger pulse to perform closed-loop control on the motor.
8. The zero position self-learning method of a permanent magnet synchronous motor according to claim 7, characterized in that: When there is a deviation in the zero position of the motor, the d-axis stator voltage component and the q-axis stator voltage component are subjected to an inverse Park transformation based on the angle compensation value, including: The d-axis stator voltage component and the q-axis stator voltage component are subjected to inverse Park transformation based on the zero position compensation value and the angle compensation value.
9. The zero position self-learning method of a permanent magnet synchronous motor according to any one of claims 1 to 4, characterized in that: The speed closed-loop control based on the zero position initial value also includes: Performing closed-loop PI regulation based on the difference between the d-axis current command value and the d-axis current feedback value of the motor to obtain a given value of the d-axis stator voltage component; Performing closed-loop PI regulation based on the difference between the q-axis current command value and the q-axis current feedback value of the motor to obtain a given value of the q-axis stator voltage component; The given value of the d-axis stator voltage component and the given value of the q-axis stator voltage component are feedforward decoupled to obtain the d-axis stator voltage component and the q-axis stator voltage component.
10. The zero position self-learning method of a permanent magnet synchronous motor according to claim 9, characterized in that: The step of performing feedforward decoupling on the given value of the d-axis stator voltage component and the given value of the q-axis stator voltage component to obtain the d-axis stator voltage component and the q-axis stator voltage component comprises: obtaining the d-axis stator feedforward compensation voltage and the q-axis stator feedforward compensation voltage by the following formula: in, is the d-axis stator feedforward compensation voltage, is the q-axis stator feedforward compensation voltage; R s is the stator resistance, L s is the stator inductance, ω r Electrical angular velocity feedback value, is the d-axis current command value, is the q-axis current command value, φ f is the motor flux; Performing feedforward compensation on a given value of the d-axis stator voltage component according to the d-axis stator feedforward compensation voltage to obtain a d-axis stator voltage component; The q-axis stator voltage component is obtained by performing feedforward compensation on a given value of the q-axis stator voltage component according to the q-axis stator feedforward compensation voltage.
