Motor encoder bias detection and zero speed start method and device, equipment and medium
By acquiring line voltage and zero-position signals during motor de-energized coasting, and correcting the encoder pulse count value, the interference problem in encoder zero-position deviation detection is solved, and high-precision zero-speed start is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEBEI JIAHUI DENTSU TECHNOLOGY CO LTD
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-12
AI Technical Summary
In the field of flywheel energy storage, encoder zero-position deviation detection is easily affected by electromagnetic interference and drive current fluctuations when the motor is driven by electricity, resulting in low position recognition accuracy, which in turn affects the stability and accuracy of the motor's zero-speed start.
When the motor speed reaches the target value, the inverter PWM output is blocked, causing the motor to enter a power-off coasting state. The line voltage signal and the incremental encoder zero position signal are acquired, and the encoder pulse count value is corrected by calculating the phase deviation to determine the rotor magnetic pole spatial electrical angle, thereby achieving zero-speed start.
Under conditions of no external interference, it accurately corrects encoder deviations, improves position recognition accuracy and zero-speed start reliability, simplifies operation, reduces the impact of electromagnetic interference, and improves start-up accuracy and stability.
Smart Images

Figure CN122203901A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of encoder calibration technology, and more specifically, relates to a method, device, equipment, and medium for detecting motor encoder deviation and zero-speed start. Background Technology
[0002] In fields such as flywheel energy storage, permanent magnet synchronous motors often rely on encoders for rotor position identification to achieve zero-speed start. Currently, encoder zero-position deviation detection is mostly performed when the motor is energized. In this state, the PWM output of the converter is prone to electromagnetic interference, and the motor speed is easily affected by fluctuations in the drive current, resulting in instability between the acquired electrical signal and the encoder zero-position signal. This leads to a large error in the phase deviation calculation between the zero-position signal and the motor electrical signal, resulting in low position identification accuracy of the encoder installation deviation. Consequently, the determination of the rotor magnetic pole spatial electrical angle is inaccurate, ultimately causing the motor to be prone to jitter and delayed start-up response during zero-speed start-up, making it difficult to effectively improve the position identification accuracy, zero-speed start reliability, and speed accuracy. Summary of the Invention
[0003] The purpose of this application is to provide a method, apparatus, device, and medium for motor encoder deviation detection and zero-speed start that can improve position recognition accuracy, reliability of zero-speed start, and speed accuracy. To achieve the above objective, the technical solution provided by this application is as follows: Firstly, a method for detecting motor encoder deviation and starting at zero speed is provided, including: For the motor's coasting state, within the current rotation cycle of the motor rotor, the line voltage signal of the motor stator winding and the zero position signal of the motor are acquired; the coasting state is when the motor speed reaches the target value, the PWM output of the converter is blocked, so that the motor enters the power-off state; the zero position signal is a signal acquired based on the incremental encoder. Based on the line voltage signal and the zero position signal, determine the first target phase deviation between the zero position signal and the line voltage signal; Based on the first target phase deviation, the second target phase deviation between the zero-position signal and the target's opposite potential zero-crossing point from positive to negative is determined; the target phase includes phase A, phase B, or phase C. Based on the second target phase deviation, the number of deviation pulses installed on the incremental encoder is determined, and the current pulse count value of the incremental encoder is corrected based on the number of deviation pulses to determine the rotor magnetic pole spatial electrical angle of the motor, so as to achieve zero-speed start of the motor.
[0004] Secondly, a motor encoder deviation detection and zero-speed start device is provided, comprising: The data acquisition module is used to acquire the line voltage signal of the motor stator winding and the zero position signal of the motor during the current rotation cycle of the motor rotor in the coasting state. The coasting state is when the motor speed reaches the target value, the PWM output of the converter is blocked, and the motor enters the power-off state. The zero position signal is a signal acquired based on the incremental encoder. The first calculation module is used to determine the first target phase deviation between the zero-position signal and the line voltage signal based on the line voltage signal and the zero-position signal; The second calculation module is used to determine the second target phase deviation between the zero-position signal and the target's opposite potential zero-crossing point from positive to negative, based on the first target phase deviation; the target phase includes phase A, phase B, or phase C; The detection module is used to determine the number of deviation pulses of the incremental encoder based on the phase deviation of the second target, and to correct the current pulse count value of the incremental encoder based on the number of deviation pulses, thereby determining the rotor magnetic pole spatial electrical angle of the motor to achieve zero-speed start of the motor.
[0005] Thirdly, embodiments of this application also provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the motor encoder deviation detection and zero-speed start method provided in any possible implementation of the first aspect.
[0006] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the motor encoder deviation detection and zero-speed start method provided in any possible implementation of the first aspect.
[0007] The beneficial effects of the technical solution provided in this application are as follows: Compared with related technologies, the motor encoder deviation detection and zero-speed start method, device, equipment, and medium provided in this application embodiment, by blocking the inverter PWM output in a coasting state when the motor speed reaches the target value, acquires the line voltage signal and the zero-position signal collected by the incremental encoder within the current rotation cycle of the motor rotor. This power-off coasting state has no external drive interference, ensuring the stability of the acquired signal and providing a premise for accurately determining the first target phase deviation between the zero-position signal and the line voltage signal. Based on the first target phase deviation, a second target phase deviation between the zero-position signal and the zero-crossing point of the target opposite electromotive force is further determined, establishing a direct correlation between the zero-position signal and the actual position of the rotor magnetic pole, accurately capturing the encoder zero-position installation deviation. Then, the deviation pulse number is determined according to the second target phase deviation, and the current pulse count value of the encoder is corrected to obtain the accurate rotor magnetic pole spatial electrical angle. Zero-speed start can be achieved without additional magnetic pole identification, which simplifies the operation and reduces the impact of electromagnetic interference due to signal stability and accurate deviation calculation, effectively improving the position identification accuracy, the reliability of zero-speed start, and the accuracy of speed. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.
[0009] Figure 1 A circuit diagram for peak detection and phase comparison of line back EMF provided in an embodiment of this application; Figure 2 A schematic flowchart illustrating the motor encoder deviation detection and zero-speed start method provided in this application embodiment; Figure 3 This is a structural block diagram of the motor encoder deviation detection and zero-speed start device provided in the embodiments of this application; Figure 4 A schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0010] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.
[0011] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.” When describing multiple (two or more) items, if the relationship between the multiple items is not explicitly defined, the multiple items can refer to one, several or all of the multiple items. For example, the description of "parameter A includes A1, A2, A3" can be implemented as parameter A includes A1 or A2 or A3, or it can be implemented as parameter A includes at least two of the three items A1, A2 and A3.
[0012] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.
[0013] The hardware components of this embodiment include a flywheel energy storage permanent magnet synchronous motor body, an incremental encoder, a line back EMF peak detection and phase comparison circuit, a DSP control unit, and a converter; The wheel-type energy storage permanent magnet synchronous motor is equipped with a three-phase stator winding (A-phase, B-phase, and C-phase) and rotor poles. The stator windings generate a rotating magnetic field, and the rotor poles provide a permanent magnet magnetic field. The number of pole pairs of the motor is denoted as... For fixed design parameters; the motor's operating state (stationary, accelerating, coasting) is controlled by the converter. In the coasting state, when the motor speed reaches the target value, the PWM output of the converter is blocked and the motor enters the power-off rotation state. This state provides working condition support for the stable acquisition of line voltage signal and zero position signal. An incremental encoder is mounted on the motor rotor shaft and rotates synchronously with the rotor. It is used to acquire the motor's zero-position signal and pulse count value. The zero-position signal is the Z signal of the incremental encoder, which outputs one rising edge pulse per revolution as the motor's zero-position reference signal. This signal is connected to the capture pin CAP2 of the DSP control unit via a circuit for reference. Figure 1 As shown; the pulse count value includes the current pulse count value. (The cumulative number of pulses that reflect the rotor's rotational position in real time) and the total number of pulses per revolution N (an inherent parameter of the encoder, referring to the total number of pulses output per revolution of the rotor). N is a fixed value and is a parameter for calculating the deviation pulse count. The line back EMF peak detection and phase comparison circuit is used to acquire the line voltage signal of the motor stator winding and perform phase comparison. The circuit structure is as follows: Figure 1 As shown, it consists of a line back EMF sensor, a single-phase half-wave rectifier circuit, a comparator circuit, a power supply (+VCC), and ground (GND). The line back EMF sensor is installed at the output terminals of the A-phase and B-phase windings of the motor stator to collect the line voltage signal between phases A and B (denoted as ). This signal serves as the base line voltage signal for subsequent phase deviation calculations; the single-phase half-wave rectifier circuit is composed of diode D1, and the input terminal of diode D1 is connected to the back EMF sensor output. The signal output is connected to the inverting input of comparator U1, and is used to... The signal is half-wave rectified and extracted. The positive half-cycle waveform of the signal; the comparison circuit consists of comparator U1 and resistor R1. The non-inverting input of comparator U1 is connected to the reference voltage Vref (Vref is set to the line back EMF sensor voltage corresponding to 20% of the motor's rated speed). The peak value), the output terminal is connected to the capture pin CAP1 of the DSP control unit through resistor R1 (pull-up resistor to ensure stable output level); when the motor speed increases to the target value (20% of rated speed). When the peak value of the signal is higher than Vref, comparator U1 outputs a low-level pulse signal; +VCC provides the operating voltage for comparator U1, and GND provides a common ground terminal for the circuit to ensure stable and interference-free circuit signals; The DSP control unit captures the low-level pulse signal output by the back EMF peak detection and phase comparison circuit through the CAP1 pin, and captures the Z signal of the incremental encoder through the CAP2 pin, realizing signal count value reading, data calculation and control command output; its output terminal is connected to the converter to send PWM pulse control signals and lockout commands.
[0014] This application provides a method for motor encoder deviation detection and zero-speed start, which can be executed by electronic devices, such as... Figure 2 As shown, the method may include: S101: For the motor coasting state, within the current rotation cycle of the motor rotor, acquire the line voltage signal of the motor stator winding and the zero position signal of the motor; the coasting state is when the motor speed reaches the target value, the PWM output of the converter is blocked, so that the motor enters the power-off state; the zero position signal is a signal acquired based on the incremental encoder.
[0015] In this embodiment, the coasting state refers to the state where, after the motor accelerates to the target value (set as 20% of the motor's rated speed) under the drive of the converter, the converter's PWM output is blocked, and the motor is disconnected from external power drive, maintaining stable rotation solely by inertia. This state is free from external drive interference, ensuring the stability of the line voltage signal and zero-position signal acquisition. The converter is a power conversion device connecting the DSP control unit and the motor body. It can receive PWM control signals to convert DC power into three-phase AC power to drive the motor, and can also receive a blocking command to stop the output. The line voltage signal of the motor stator winding refers to the back EMF voltage signal between any two phases of the three-phase stator winding (such as between phases A and B). The first signal, acquired by the line back EMF sensor, is an electrical signal carrier reflecting the rotational position of the rotor magnetic poles. The second signal, the Z signal acquired by the incremental encoder, is a rising edge pulse signal output by the incremental encoder for each revolution, serving as the encoder's own zero-position reference.
[0016] In this embodiment, the motor is first driven by the converter to accelerate to a preset target value. Once the speed stabilizes at this target value, the PWM output of the converter is immediately blocked. At this point, the motor no longer receives external power and enters a power-off coasting state. In this state, the motor rotor maintains stable rotation solely due to inertia, without external drive interference, providing a stable operating condition for signal acquisition. During this process, the line back EMF sensor installed at the stator winding output terminal of the motor collects the line voltage signal of the motor stator winding (e.g., ...). The signal is processed by a half-wave rectifier and comparator circuit to output a level signal that can be recognized by the DSP pulse capture unit; at the same time, the zero position signal (i.e., the encoder's Z signal, which outputs one rising edge pulse for each revolution) is acquired by an incremental encoder installed on the motor rotor shaft end, and this signal is input to another capture pin of the DSP.
[0017] S102: Determine the first target phase deviation between the zero-position signal and the line voltage signal based on the line voltage signal and the zero-position signal.
[0018] In this embodiment, the first target phase deviation refers to the offset of the zero-position signal and the line voltage signal in terms of phase angle, which is calculated by converting the count values of the characteristic points (peak values) of the line voltage signal and the characteristic points (rising edges) of the zero-position signal.
[0019] In one embodiment of this application, the rotation period includes multiple cycles; The line voltage signal includes a first line voltage signal and a second line voltage signal; For each rotation cycle, the calculation method for the first initial phase deviation corresponding to that rotation cycle includes: Within this rotation cycle, the first instantaneous count value of the first line voltage signal at the falling edge and the second instantaneous count value of the second line voltage signal at the falling edge are identified, as well as the third instantaneous count value of the zero position signal at the rising edge are identified; Based on the first instantaneous count value, the second instantaneous count value, and the third instantaneous count value, and through the first formula, the first initial phase deviation between the zero-position signal and the line voltage signal is determined; The first formula is: ; in, Indicates the first initial phase deviation. This represents the count value at the first instant. This represents the second instantaneous count value. This represents the count value at the third instant.
[0020] In this embodiment, multiple rotation cycles refer to at least two or more complete mechanical rotation cycles of the motor rotor. In this embodiment, k rotation cycles can be selected, where k is a positive integer and can be set to a specific value according to the actual detection accuracy requirements. The first line voltage signal is the signal corresponding to the first falling edge of the line voltage signal when the motor is coasting. The second line voltage signal is the signal corresponding to the second falling edge of the line voltage signal within the same rotation cycle. Both are line voltage signals processed by half-wave rectification and comparator circuits. The falling edge is the critical point where the signal voltage value changes abruptly from high level to low level. The first instantaneous count value is the real-time count when the DSP pulse capture unit detects the falling edge of the first line voltage signal. The count value is a digital value of the pulse count, synchronized with the signal acquisition time; the second instantaneous count value is the real-time count value when the DSP pulse capture unit detects the falling edge of the second line voltage signal within the same rotation cycle; the rising edge of the zero position signal is the critical point where the zero position signal output by the incremental encoder changes abruptly from low level to high level, and is the determination node of the encoder's zero position; the third instantaneous count value is the real-time count value when the DSP pulse capture unit detects the rising edge of the zero position signal; the first formula is a mathematical formula used to calculate the first initial phase deviation. Through the difference calculation and proportional conversion of the three instantaneous count values, the offset of the pulse count value is converted into the offset of the phase angle, thereby realizing the calculation of the phase deviation.
[0021] In this embodiment, within a single rotation cycle of the motor in coasting mode, the processed line voltage signal is monitored in real time by a DSP pulse capture unit. When the falling edge of the first line voltage signal is detected, the first instantaneous count value Tcnt1 is immediately recorded. Monitoring continues until the falling edge of the second line voltage signal, at which point the second instantaneous count value Tcnt2 is recorded. Simultaneously, within this rotation cycle, the level change of the zero-position signal is monitored synchronously by the DSP pulse capture unit. When the rising edge of the zero-position signal is detected, the third instantaneous count value Tcnt3 is recorded. Substituting the three instantaneous count values into a pre-set first formula, the count value offset of the rising edge of the zero-position signal relative to the falling edge of the first line voltage signal is obtained by calculating (Tcnt3-Tcnt1). The count value difference between the two falling edges of the line voltage signal is obtained by (Tcnt2-Tcnt1), which corresponds to a 360° phase angle. The count value offset is then converted into a phase angle offset by a proportional conversion, ultimately obtaining the first initial phase deviation corresponding to this rotation cycle. .
[0022] As can be seen from the above, this embodiment clarifies the specific calculation nodes and formulas for the first initial phase deviation within a single rotation cycle, achieving accurate calculation of the phase deviation and ensuring the accuracy and consistency of the calculation results. By capturing the edge features of the signal for count value acquisition, the signal edge features have high recognition accuracy, reducing acquisition errors caused by signal level fluctuations. Utilizing count values for calculation results in fast data acquisition response speed and high accuracy, further improving the calculation accuracy of the first initial phase deviation. The calculation formula is simple, requiring no complex computational processing, reducing the computational load on the control motherboard and improving the real-time performance of the detection.
[0023] In one embodiment of this application, Based on the line voltage signal and the zero-position signal, the first target phase deviation between the zero-position signal and the line voltage signal is determined, which also includes: Obtain the line voltage signal and the zero position signal of the motor for each cycle other than the current cycle; The first initial phase deviation is determined based on the line voltage signal and the zero position signal of the motor corresponding to each cycle. Among them, determining the first target phase deviation between the zero-position signal and the line voltage signal based on the line voltage signal and the zero-position signal includes: Based on the line voltage signal and the zero-position signal, determine the first initial phase deviation corresponding to the current cycle; Based on the first initial phase deviation corresponding to the current cycle and their respective first initial phase deviations, the average value of the first initial phase deviation is determined as the first target phase deviation.
[0024] In this embodiment, "other cycles" refers to all rotation cycles participating in data acquisition and calculation, excluding the current rotation cycle for phase deviation calculation. Each cycle is a stable rotation cycle when the motor is in a coasting state. The first initial phase deviation is the phase deviation value between the zero-position signal and the line voltage signal calculated based on the line voltage signal and zero-position signal acquired in a single rotation cycle. Each rotation cycle corresponds to an independent first initial phase deviation. The first initial phase deviation corresponding to the current cycle is the phase deviation value corresponding to the last rotation cycle for signal acquisition and calculation among the selected multiple rotation cycles. The average value is the value obtained by arithmetically averaging all the first initial phase deviations corresponding to the current cycle and all other cycles. The sum of all the first initial phase deviation values is divided by the total number of rotation cycles participating in the calculation. The calculation formula is: , This is the average of all first initial phase deviations.
[0025] In this embodiment, while the motor maintains a stable coasting state, line voltage signals and zero-position signals are continuously acquired for k rotation cycles. Each rotation cycle independently completes signal acquisition and calculation of the first initial phase deviation, resulting in k independent first initial phase deviation values. These k first initial phase deviation values are then arithmetically averaged to offset numerical errors caused by instantaneous electromagnetic interference and minor speed fluctuations during signal acquisition and calculation within a single cycle. The calculated average value is used as the final first target phase deviation. This filtered first target phase deviation is used as the basis for subsequent calculation of the second target phase deviation, replacing the phase deviation value of a single cycle, thus reducing the impact of single-cycle data fluctuations on the overall deviation calculation.
[0026] As can be seen from the above, this embodiment effectively offsets the numerical errors caused by instantaneous interference in single-cycle detection through multi-cycle data acquisition and average value filtering, thereby improving the calculation accuracy of the first target phase deviation. Subsequent calculations based on the high-precision first target phase deviation can improve the calculation accuracy of the second target phase deviation and the encoder deviation pulse count, thus improving the correction accuracy of the rotor magnetic pole space electrical angle. The improved electrical angle accuracy after correction allows for more precise vector control of the motor, further enhancing the smoothness and reliability of zero-speed start-up. The number of rotation cycles can be set according to actual needs, adapting to different detection accuracies and application scenarios.
[0027] S103: Based on the first target phase deviation, determine the second target phase deviation between the zero-position signal and the target opposite potential from positive to negative zero crossing point; the target phase includes phase A, phase B or phase C.
[0028] In this embodiment, the zero-crossing point of the target back electromotive force (EMF) from positive to negative refers to the critical point where the back EMF voltage value of the motor stator target phase (phase A, phase B, or phase C) winding drops from a positive value to zero and then turns to a negative value. It is a reference point characterizing the actual zero position of the rotor magnetic pole (such as the rotor d-axis position corresponding to the zero-crossing point of the A back EMF).
[0029] The second target phase deviation refers to the offset in phase angle between the zero position signal (Z signal) and the target opposite electromotive force from positive to negative zero crossing point. It is obtained by subtracting the inherent phase difference (e.g., 120°) between the line voltage and the target opposite electromotive force and correcting the angle range (0~360°) from the first target phase deviation, and directly reflects the deviation between the encoder zero position and the rotor magnetic pole zero position.
[0030] In one embodiment of this application, the target phase is phase A, and the line voltage signal is the line voltage signal between phase A and phase B; Based on the first target phase deviation, the second target phase deviation between the zero-position signal and the zero-crossing point of the opposite potential of A from positive to negative is obtained, including: Based on the first target phase deviation, and using the second formula, the second initial phase deviation is determined; The second formula is: ; in, Indicates the second initial phase deviation. This represents the average value of the first initial phase deviation; Based on the second initial phase deviation, the second target phase deviation between the zero-position signal and the opposite potential of A from positive to negative zero crossing point is obtained.
[0031] In this embodiment, phase A is the A-phase winding of the three-phase stator winding of the motor, which is the target phase selected in this embodiment and the reference phase for rotor magnetic pole position identification; the line voltage signal between phase A and phase B is the line back EMF voltage signal between the A-phase winding and the B-phase winding of the motor stator, which is obtained by collecting the voltage between phases A and B by a line back EMF sensor; the second formula is a mathematical formula used to convert the first target phase deviation into the second initial phase deviation, where 120 is the inherent phase difference between the line voltage signal between phases A and B and the back EMF of phase A, which is a fixed angle determined by the structure and electromagnetic characteristics of the motor stator winding; the average value of multiple first initial phase deviations is the first target phase deviation. , is the phase deviation value after multi-cycle average filtering; the second initial phase deviation is the preliminary phase deviation value of the zero-position signal relative to the opposite potential of A from positive to negative zero-crossing point obtained by the second formula, which provides the basis for determining the subsequent second target phase deviation.
[0032] In this embodiment, based on the electromagnetic characteristics and structural design of the three-phase stator windings of the motor, there is a fixed phase difference of 120° between the line voltage signal between phases A and B and the opposite electromotive force of phase A. This phase difference is an inherent electrical parameter of the motor and does not change with the operating state of the motor. The first target phase deviation obtained after multi-cycle filtering is... As the basis for conversion, this is substituted into the second formula, and the inherent phase difference of 120° is subtracted. This subtraction operation cancels out the phase shift between the line voltage signal and the opposite potential of A, yielding the initial phase deviation value of the zero-point signal relative to the opposite potential of A from positive to negative zero-crossing point, i.e., the second initial phase deviation. Based on this second initial phase deviation, the final second target phase deviation can be obtained through subsequent angle correction processing.
[0033] As can be seen from the above, this embodiment establishes a specific conversion relationship between the first target phase deviation and the zero-position signal and the phase deviation of the A-phase back potential zero-crossing point. It utilizes the inherent electrical parameters of the motor to achieve accurate deviation conversion. The conversion formula is simple and can be completed by subtraction only, with a small amount of computation, thus improving the real-time performance of the conversion. Using the filtered first target phase deviation as the conversion basis ensures the calculation accuracy of the second initial phase deviation. Selecting phase A as the target phase and the line voltage signal between phases A and B as the detection signal conforms to the conventional electrical detection design of the flywheel energy storage permanent magnet synchronous motor and is adapted to the actual operating characteristics of the motor.
[0034] In one embodiment of this application, a second target phase deviation is obtained based on a second initial phase deviation between the zero-position signal and the zero-crossing point of the opposite potential A from positive to negative, including: If the second initial phase deviation is greater than 360, then the second target phase deviation between the zero-position signal and the opposite potential of A from positive to negative zero crossing point is obtained based on the third formula; The third formula is: ; If the second initial phase deviation is less than 360°, the second target phase deviation between the zero-position signal and the opposite potential of A from positive to negative zero-crossing point is obtained based on the fourth formula. The fourth formula is: ; in, This indicates the phase deviation of the second target.
[0035] In this embodiment, 360° represents a complete electrical phase angle cycle and is the upper limit of the conventional value of the motor phase angle. If the phase angle exceeds this range, it will not match the actual electrical rotation characteristics. The third formula is the angle correction formula when the second initial phase deviation is greater than 360°. By subtracting 360°, the corrected angle value falls into the conventional phase angle range. The fourth formula is the angle correction formula when the second initial phase deviation is less than 360°. By adding 360°, the corrected angle value is adjusted to the phase angle range that conforms to the actual electrical characteristics. The second target phase deviation is the final phase deviation value between the zero position signal and the opposite electromotive force of A from positive to negative zero-crossing point after angle correction, providing an accurate angle reference for calculating the encoder deviation pulse number.
[0036] In this embodiment, after obtaining the second initial phase deviation Next, the value is first determined to be within a range, either greater than or less than 360. If the determination result is that the second initial phase deviation is greater than 360, it means that the deviation value exceeds the range of a single electrical phase cycle. Substituting this value into the third formula and subtracting the phase cycle value of 360, the corrected second target phase deviation is obtained. This process ensures the corrected angle value falls within a single phase cycle. If the initial phase deviation is less than 360°, it indicates the deviation value has not reached the range of a single electrical phase cycle. Substituting this value into the fourth formula and adding the 360° phase cycle value completes the angle correction, yielding the final target phase deviation. The corrected phase deviation of the second target The effective angle value, which conforms to the actual electrical phase characteristics of the motor, can be directly used for subsequent encoder deviation pulse count calculation.
[0037] As can be seen from the above, this embodiment corrects the second initial phase deviation to a phase angle range that conforms to the electrical characteristics of the motor by setting clear angle correction rules and formulas, ensuring the effectiveness and practicality of the deviation value; the correction formula is completed only by addition and subtraction operations, with a small amount of computation, without increasing the computational load of the control motherboard, thus improving the real-time performance of the correction; the corrected second target phase deviation is a precise effective angle value, and the encoder deviation pulse number is calculated based on this, which can improve the calculation accuracy of the pulse number, thereby improving the correction accuracy of the rotor magnetic pole space electrical angle; the judgment conditions for angle correction are clear and easy to implement in the control program, adapting to the real-time detection and control requirements of the motor.
[0038] S104: Based on the second target phase deviation, determine the number of deviation pulses installed on the incremental encoder, and correct the current pulse count value of the incremental encoder based on the number of deviation pulses to determine the rotor magnetic pole space electrical angle of the motor, so as to realize the zero-speed start of the motor.
[0039] In this embodiment, the deviation pulse count is the pulse count offset of the incremental encoder converted from the second target phase deviation. It is related to the total number of pulses per encoder revolution and the number of motor pole pairs, and serves as the basis for calibrating the encoder pulse count value. The current pulse count value of the incremental encoder refers to the number of pulses collected and accumulated by the incremental encoder in real time, reflecting the current rotational position of the motor rotor, but it does not eliminate installation deviations and needs to be corrected by the deviation pulse count. The rotor magnetic pole spatial electrical angle is an electrical angle value characterizing the position of the motor rotor magnetic pole in space. It is an input parameter for motor vector control, and correction ensures accurate magnetic field orientation. Zero-speed start refers to the direct start of the motor rotor from a stationary state without additional rotor magnetic pole position identification procedures. Precise vector control is achieved through the corrected rotor magnetic pole spatial electrical angle, directly driving the motor rotation.
[0040] In one embodiment of this application, determining the number of deviation pulses for the incremental encoder installation based on the second target phase deviation includes: Based on the second target phase deviation, and using the fifth formula, determine the number of deviation pulses for the incremental encoder installation; The fifth formula is: ; in, Indicates the number of deviation pulses. This indicates the phase deviation of the second target. This indicates the total number of pulses per revolution of the incremental encoder. This indicates the number of pole pairs of the motor.
[0041] In this embodiment, the fifth formula is a mathematical formula used to convert the angle value of the second target phase deviation into the number of incremental encoder installation deviation pulses. This formula achieves the quantitative conversion from angle deviation to pulse count deviation. The deviation pulse count is the pulse count offset of the incremental encoder due to zero-position installation deviation, and is the core parameter for encoder pulse count value correction. It can be positive or negative, corresponding to different installation offset directions. The total number of pulses per revolution N of the current incremental encoder is an inherent parameter of the incremental encoder, referring to the total number of pulses output by the encoder as the motor rotor rotates one revolution. This parameter varies for different encoder models. In practical applications, a specific value can be set according to the selected encoder model; this embodiment does not limit this. The number of motor pole pairs... The inherent electrical parameter of a flywheel energy storage permanent magnet synchronous motor refers to the number of pairs of magnetic poles on the motor rotor, which is determined by the motor's design and manufacturing process and remains constant.
[0042] In this embodiment, the total number of pulses N per revolution of the incremental encoder and the number of pole pairs of the motor are first obtained. These two inherent parameters simultaneously determine the phase deviation of the second target after angle correction. Substitute the above parameters into the fifth formula and calculate first. The corrected angle deviation value is obtained, and then this value is multiplied by the total number of pulses N per encoder revolution to obtain the total pulse number offset corresponding to the angle deviation; then the calculation is performed. The total number of electrical angles corresponding to one revolution of the motor is obtained, which is the electrical phase characteristic parameter corresponding to the number of pole pairs of the motor. Finally, the total offset of the number of pulses corresponding to the angle deviation is divided by the total number of electrical angles per revolution of the motor, and the deviation pulse number caused by the zero-position installation of the incremental encoder is obtained by proportional conversion. This enables precise conversion from angle deviation to pulse count deviation.
[0043] As can be seen from the above, this embodiment establishes a specific conversion relationship between the second target phase deviation and the encoder installation deviation pulse number, realizing a precise conversion from angle deviation to pulse number deviation. The conversion formula combines the inherent parameters of the encoder and the motor, adapting to different models of incremental encoders and flywheel energy storage permanent magnet synchronous motors with different pole pairs, thus having wide applicability. The calculation steps of the conversion formula are simple, with a small amount of computation, improving the real-time performance of the conversion and meeting the real-time control requirements of the motor. The obtained deviation pulse number is a parameter that the encoder can directly recognize, providing a precise and effective quantitative basis for the subsequent correction of the encoder pulse count value, thus improving the accuracy of the correction.
[0044] In one embodiment of this application, the current pulse count value of the incremental encoder is corrected based on the deviation pulse count to determine the rotor magnetic pole spatial electrical angle of the motor, including: Based on the deviation pulse count, and by correcting the current pulse count value of the incremental encoder using the sixth formula, the spatial electrical angle of the motor's rotor magnetic poles is determined. The sixth formula is: ; in, This indicates the spatial electrical angle of the rotor magnetic poles of the motor. This indicates the current pulse count value of the incremental encoder. Indicates the number of deviation pulses. Indicates the number of pole pairs of the motor. This represents the total number of pulses per revolution of the current incremental encoder. If the calculated... Then for Perform normalization processing, that is ,make sure It falls within the effective electrical angle range of 0~360 degrees.
[0045] In this embodiment, the sixth formula is a mathematical formula used to correct the current pulse count value of the encoder and calculate the rotor magnetic pole space electrical angle. Through the logic of pulse count value correction, total electrical angle conversion, and single-pulse electrical angle decomposition, the quantitative conversion from pulse count to electrical angle is achieved; the current pulse count value of the incremental encoder... The number of pulses collected and accumulated by the encoder in real time is directly output by the encoder's pulse counting module, reflecting the real-time rotational position of the motor rotor. This value continuously increases as the rotor rotates; the rotor magnetic pole spatial electrical angle... The precise electrical angle value, which characterizes the spatial position of the motor rotor magnetic poles (such as the d-axis), is a core input parameter of the motor vector control system. Vector control requires determining the output phase of the voltage vector based on this angle. The accuracy of the motor's torque control directly determines the smoothness of the motor's torque control and the accuracy of its speed control; the number of motor pole pairs The inherent parameters of the flywheel energy storage permanent magnet synchronous motor (such as 2 pairs or 4 pairs of poles) are determined by the number of rotor magnetic poles during motor design and manufacturing; the total number of pulses per revolution N of the incremental encoder is the inherent parameter of the encoder (such as 1024p / r or 2048p / r). In practical applications, different models can be selected according to the control accuracy requirements. This application does not limit this.
[0046] In this embodiment, the current pulse count value output in real time is first read through the signal output interface of the incremental encoder. Simultaneously, the encoder installation deviation pulse count calculated earlier is retrieved from the register of the DSP control unit. ;Will and By adding the "real-time pulse count + deviation compensation count", the error caused by encoder zero-position installation deviation is eliminated. The offset error between the actual rotor position and the actual rotor position is used to obtain the corrected pulse count value. ; Then, substitute the corrected pulse count value into the sixth formula to first calculate " ":in" "The total electrical angle corresponding to one revolution of the motor rotor (e.g., the total electrical angle per revolution for a 4-pole motor is 360 × 4 = 1440) is multiplied by the corrected pulse count value to obtain the total electrical angle value corresponding to the corrected pulse count; then, the total electrical angle value is divided by the total number of pulses N per revolution of the encoder, and the electrical angle value corresponding to a single pulse is obtained through proportional conversion, finally yielding the rotor magnetic pole space electrical angle." ; If calculated >360 (If caused by the accumulation of pulse count values) If the value is 400, then normalization is performed, and 360 is subtracted to obtain the result. =40, ensuring the electrical angle meets the phase range requirements of the motor vector control; the corrected angle will be... The vector control module input to the converter serves as the phase reference for the voltage vector output, driving the motor to achieve zero-speed start.
[0047] As can be seen from the above, this embodiment establishes a complete process for pulse count correction, electrical angle calculation, and range correction, eliminating rotor position detection errors caused by encoder zero-position installation deviation, improving the calculation accuracy of rotor magnetic pole space electrical angle, and avoiding problems such as motor torque fluctuations and starting jitter caused by angle deviation; the sixth formula has a simple calculation logic, does not rely on external testing equipment, and can be calculated using only the encoder's inherent parameters and the number of deviation pulses, reducing equipment setup costs and time costs, and improving correction efficiency; the electrical angle normalization process ensures... It always remains within the effective range of 0~360 degrees, avoiding converter output abnormalities caused by phase out-of-range in vector control, and improving the reliability of motor zero-speed start; after correction It can be directly used as the spatial angle for vector control, without relying on historical data or repeated iterations as in existing technologies, which simplifies the control logic and shortens the startup preparation time.
[0048] Based on the same principle as the motor encoder deviation detection and zero-speed start method provided in the embodiments of this application, the embodiments of this application also provide a motor encoder deviation detection and zero-speed start device, such as... Figure 3 As shown, the motor encoder deviation detection and zero-speed start device 20 may specifically include: a data acquisition module 21, a first calculation module 22, a second calculation module 23, and a detection module 24. The data acquisition module 21 is used to acquire the line voltage signal of the motor stator winding and the zero-position signal of the motor within the current rotation cycle of the motor rotor, for the motor in its coasting state. The coasting state occurs when the motor speed reaches the target value, at which point the PWM output of the converter is blocked, causing the motor to enter a power-off state. The zero-position signal is a signal acquired based on an incremental encoder. The first calculation module 22 is used to determine the first target phase deviation between the zero-position signal and the line voltage signal based on the line voltage signal and the zero-position signal; The second calculation module 23 is used to determine the second target phase deviation between the zero-position signal and the target opposite potential from positive to negative zero-crossing point based on the first target phase deviation; the target phase includes phase A, phase B or phase C; The detection module 24 is used to determine the number of deviation pulses of the incremental encoder based on the second target phase deviation, and to correct the current pulse count value of the incremental encoder based on the number of deviation pulses, so as to determine the rotor magnetic pole space electrical angle of the motor and realize the zero-speed start of the motor.
[0049] In one embodiment of this application, the rotation period includes multiple cycles; Before determining the first target phase deviation between the zero-position signal and the line voltage signal based on the line voltage signal and the zero-position signal, the system also includes a third calculation module, specifically used for: Obtain the line voltage signal and the zero position signal of the motor for each cycle other than the current cycle; The first initial phase deviation is determined based on the line voltage signal and the zero position signal of the motor corresponding to each cycle. Based on the line voltage signal and the zero-position signal, determine the first initial phase deviation corresponding to the current cycle; Based on the first initial phase deviation corresponding to the current cycle and their respective first initial phase deviations, the average value of the first initial phase deviation is determined as the first target phase deviation.
[0050] In one embodiment of this application, the line voltage signal includes a first line voltage signal and a second line voltage signal; For each rotation cycle, the third calculation module is specifically used for: Within this rotation cycle, the first instantaneous count value of the first line voltage signal at the falling edge and the second instantaneous count value of the second line voltage signal at the falling edge are identified, as well as the third instantaneous count value of the zero position signal at the rising edge are identified; Based on the first instantaneous count value, the second instantaneous count value, and the third instantaneous count value, and through the first formula, the first initial phase deviation between the zero-position signal and the line voltage signal is determined; The first formula is: ; in, Indicates the first initial phase deviation. This represents the count value at the first instant. This represents the second instantaneous count value. This represents the count value at the third instant.
[0051] In one embodiment of this application, the target phase is phase A, and the line voltage signal is the line voltage signal between phase A and phase B; the second calculation module 23 is specifically used for: Based on the first target phase deviation, and using the second formula, the second initial phase deviation is determined; The second formula is: ; in, Indicates the second initial phase deviation. This represents the average value of the first initial phase deviation; Based on the second initial phase deviation, the second target phase deviation between the zero-position signal and the opposite potential of A from positive to negative zero crossing point is obtained.
[0052] In one embodiment of this application, the second calculation module 23 is further configured to: If the second initial phase deviation is greater than 360, then the second target phase deviation between the zero-position signal and the opposite potential of A from positive to negative zero crossing point is obtained based on the third formula; The third formula is: ; If the second initial phase deviation is less than 360°, the second target phase deviation between the zero-position signal and the opposite potential of A from positive to negative zero-crossing point is obtained based on the fourth formula. The fourth formula is: ; in, This indicates the phase deviation of the second target.
[0053] In one embodiment of this application, the detection module 24 is specifically used for: Based on the second target phase deviation, and using the fifth formula, determine the number of deviation pulses for the incremental encoder installation; The fifth formula is: ; in, Indicates the number of deviation pulses. This indicates the phase deviation of the second target. This indicates the total number of pulses per revolution of the incremental encoder. This indicates the number of pole pairs of the motor.
[0054] In one embodiment of this application, the detection module 24 is further configured to: Based on the deviation pulse count, and by correcting the current pulse count value of the incremental encoder using the sixth formula, the spatial electrical angle of the motor's rotor magnetic poles is determined. The sixth formula is: ; in, This indicates the spatial electrical angle of the rotor magnetic poles of the motor. This indicates the current pulse count value of the incremental encoder. Indicates the number of deviation pulses. Indicates the number of pole pairs of the motor. This indicates the total number of pulses per revolution of the current incremental encoder.
[0055] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0056] Figure 4 A schematic diagram of the structure of an electronic device to which this application embodiment applies is shown, such as... Figure 4 As shown, the electronic device can be used to implement the methods provided in any embodiment of this application.
[0057] like Figure 4 As shown, the electronic device 300 may primarily include at least one processor 301. Figure 4 The diagram shows components such as a memory 302, a communication module 303, and an input / output interface 304. Optionally, these components can be connected and communicate with each other via a bus 305. It should be noted that... Figure 4 The structure of the electronic device 300 shown is merely illustrative and does not constitute a limitation on the electronic devices to which the methods provided in the embodiments of this application are applicable.
[0058] The memory 302 can be used to store operating systems and applications, etc. The applications can include computer programs that implement the methods shown in the embodiments of this application when invoked by the processor 301, and can also include programs for implementing other functions or services. The memory 302 can be ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices that can store information and computer programs, or it can be EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
[0059] Processor 301 is connected to memory 302 via bus 305 and implements corresponding functions by calling the application programs stored in memory 302. Processor 301 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 301 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0060] Electronic device 300 can connect to a network via communication module 303 (which may include, but is not limited to, components such as a network interface) to communicate with other devices (such as user terminals or servers) through the network and achieve data interaction, such as sending data to or receiving data from other devices. Communication module 303 may include wired network interfaces and / or wireless network interfaces, meaning the communication module may include at least one of wired or wireless communication modules.
[0061] The electronic device 300 can connect to necessary input / output devices, such as a keyboard or display device, via the input / output interface 304. The electronic device 300 itself may have a display device, and other display devices can also be connected externally via the interface 304. Optionally, a storage device, such as a hard drive, can also be connected via the interface 304, allowing data from the electronic device 300 to be stored, read, or transferred to the memory 302. It is understood that the input / output interface 304 can be a wired or wireless interface. Depending on the specific application scenario, the device connected to the input / output interface 304 can be an integral part of the electronic device 300 or an external device connected to the electronic device 300 when needed.
[0062] The bus 305 used to connect the components may include a path for transmitting information between the components. The bus 305 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Depending on its function, the bus 305 may be divided into an address bus, a data bus, a control bus, etc.
[0063] Optionally, for the solution provided in the embodiments of this application, the memory 302 can be used to store a computer program that executes the solution of this application, and the processor 301 runs the computer program. When the processor 301 runs the computer program, it implements the operation of the method or apparatus provided in the embodiments of this application.
[0064] Based on the same principle as the method provided in the embodiments of this application, the embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the corresponding content of the aforementioned method embodiments.
[0065] This application also provides a computer program product, which includes a computer program that, when executed by a processor, can implement the corresponding content of the aforementioned method embodiments.
[0066] It should be noted that the terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the figures or text.
[0067] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0068] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.
[0069] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.
Claims
1. A method for detecting motor encoder deviation and starting at zero speed, characterized in that, include: For the motor's coasting state, within the current rotation cycle of the motor rotor, the line voltage signal of the motor stator winding and the zero position signal of the motor are acquired; The coasting state is when the motor speed reaches the target value, the PWM output of the inverter is blocked, and the motor enters the power-off state; the zero-position signal is a signal collected based on an incremental encoder; Based on the line voltage signal and the zero-position signal, a first target phase deviation between the zero-position signal and the line voltage signal is determined; Based on the first target phase deviation, a second target phase deviation is determined between the zero-position signal and the target opposite potential zero-crossing point from positive to negative; the target phase includes phase A, phase B, or phase C. Based on the second target phase deviation, the number of deviation pulses installed on the incremental encoder is determined, and the current pulse count value of the incremental encoder is corrected based on the number of deviation pulses to determine the rotor magnetic pole spatial electrical angle of the motor, so as to realize the zero-speed start of the motor.
2. The method for motor encoder deviation detection and zero-speed start as described in claim 1, characterized in that, The rotation cycle includes multiple cycles; Based on the line voltage signal and the zero-position signal, a first target phase deviation between the zero-position signal and the line voltage signal is determined, prior to which the following steps are included: Obtain the line voltage signal and the zero position signal of the motor for each cycle other than the current cycle; The first initial phase deviation is determined based on the line voltage signal and the zero position signal of the motor corresponding to each cycle. The step of determining the first target phase deviation between the zero-position signal and the line voltage signal based on the line voltage signal and the zero-position signal includes: Based on the line voltage signal and the zero-position signal, determine the first initial phase deviation corresponding to the current cycle; Based on the first initial phase deviation corresponding to the current period and the respective first initial phase deviations, the average value of the first initial phase deviation is determined as the first target phase deviation.
3. The method for motor encoder deviation detection and zero-speed start as described in claim 2, characterized in that, The line voltage signal includes a first line voltage signal and a second line voltage signal; For each rotation cycle, the calculation method for the first initial phase deviation corresponding to that rotation cycle includes: Within this rotation cycle, the first instantaneous count value of the first line voltage signal at the falling edge and the second instantaneous count value of the second line voltage signal at the falling edge are identified, as well as the third instantaneous count value of the zero position signal at the rising edge are identified; Based on the first instantaneous count value, the second instantaneous count value, and the third instantaneous count value, and using the first formula, the first initial phase deviation between the zero-position signal and the line voltage signal is determined; The first formula is: ; in, Indicates the first initial phase deviation. This represents the count value at the first instant. This represents the second instantaneous count value. This represents the count value at the third instant.
4. The method for motor encoder deviation detection and zero-speed start as described in claim 2, characterized in that, The target phase is phase A, and the line voltage signal is the line voltage signal between phase A and phase B; The step of obtaining the second target phase deviation between the zero-position signal and the zero-crossing point of the opposite potential of A from positive to negative based on the first target phase deviation includes: Based on the first target phase deviation, and using the second formula, the second initial phase deviation is determined; The second formula is: ; in, Indicates the second initial phase deviation. This represents the average value of the first initial phase deviation; Based on the second initial phase deviation, the second target phase deviation between the zero-position signal and the opposite potential of A at the zero-crossing point from positive to negative is obtained.
5. The method for motor encoder deviation detection and zero-speed start as described in claim 4, characterized in that, The step of obtaining the second target phase deviation between the zero-position signal and the opposite potential of A from positive to negative zero-crossing point based on the second initial phase deviation includes: If the second initial phase deviation is greater than 360, then the second target phase deviation between the zero-position signal and the opposite potential of A from positive to negative zero-crossing point is obtained based on the third formula; The third formula is as follows: ; If the second initial phase deviation is less than 360°, then the second target phase deviation between the zero-position signal and the opposite potential of A from positive to negative zero-crossing point is obtained based on the fourth formula; The fourth formula is: ; in, This indicates the phase deviation of the second target.
6. The method for motor encoder deviation detection and zero-speed start as described in claim 1, characterized in that, The step of determining the number of deviation pulses installed on the incremental encoder based on the second target phase deviation includes: Based on the second target phase deviation, and using the fifth formula, the number of deviation pulses installed on the incremental encoder is determined; The fifth formula is: ; in, Indicates the number of deviation pulses. This indicates the phase deviation of the second target. This indicates the total number of pulses per revolution of the incremental encoder. This indicates the number of pole pairs of the motor.
7. The method for motor encoder deviation detection and zero-speed start as described in claim 6, characterized in that, The step of correcting the current pulse count value of the incremental encoder based on the deviation pulse count to determine the rotor magnetic pole spatial electrical angle of the motor includes: Based on the deviation pulse count, and by correcting the current pulse count value of the incremental encoder using the sixth formula, the rotor magnetic pole spatial electrical angle of the motor is determined. The sixth formula is: ; in, This indicates the spatial electrical angle of the rotor magnetic poles of the motor. This indicates the current pulse count value of the incremental encoder. Indicates the number of deviation pulses. Indicates the number of pole pairs of the motor. This indicates the total number of pulses per revolution of the current incremental encoder.
8. A motor encoder deviation detection and zero-speed start device, characterized in that, include: The data acquisition module is used to acquire the line voltage signal of the motor stator winding and the zero-position signal of the motor within the current rotation cycle of the motor rotor in the coasting state of the motor. The coasting state is when the motor speed reaches the target value, the PWM output of the converter is blocked, and the motor enters the power-off state. The zero-position signal is a signal acquired based on an incremental encoder. The first calculation module is used to determine a first target phase deviation between the zero-position signal and the line voltage signal based on the line voltage signal and the zero-position signal; The second calculation module is used to determine the second target phase deviation between the zero-position signal and the target opposite potential zero-crossing point from positive to negative, based on the first target phase deviation; the target phase includes phase A, phase B, or phase C; The detection module is used to determine the number of deviation pulses installed on the incremental encoder based on the second target phase deviation, and to correct the current pulse count value of the incremental encoder based on the number of deviation pulses, thereby determining the rotor magnetic pole spatial electrical angle of the motor to achieve zero-speed start of the motor.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and the processor executes the motor encoder deviation detection and zero-speed start method according to any one of claims 1 to 7 when running the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the motor encoder deviation detection and zero-speed start method according to any one of claims 1 to 7.