Motor correction method based on angular velocity consistency detection

By using a motor calibration method based on angular velocity consistency detection and employing orthogonal Hall sensors for offline and elliptic calibration, the high hardware and computational complexity of traditional motor control is solved, achieving low-cost and simplified motor calibration and operation quality assessment.

CN122247278APending Publication Date: 2026-06-19SHINE OPTICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHINE OPTICS TECH CO LTD
Filing Date
2026-03-11
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Traditional high-performance FOC solutions have high hardware costs and computational complexity in motor control. Existing motor correction methods rely on current loop feedback, which increases system cost and complexity.

Method used

A motor correction method based on angular velocity consistency detection is adopted, which uses orthogonal Hall sensors for offline correction and calculates angular velocity consistency through elliptic correction compensation parameters, simplifying it into a motor control system without current loop feedback.

Benefits of technology

It reduces hardware costs and computational complexity, simplifies motor calibration and operational quality assessment, and is suitable for motor control systems without current loop feedback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122247278A_ABST
    Figure CN122247278A_ABST
Patent Text Reader

Abstract

This invention discloses a motor calibration method based on angular velocity consistency detection, comprising: pre-installing a pair of orthogonal Hall sensors on the stator of the motor and determining elliptic correction compensation parameters; in an offline state, rotating the motor forward and in reverse respectively to detect whether the angular velocity consistency of the motor meets the requirements; if the requirements are met, the motor is deemed qualified, and the current calibration angle is set as the mechanical angle compensation value; otherwise, the calibration angle is adjusted and the detection is repeated, and the adjustment is terminated when the conditions for ending the calibration angle adjustment are met, and the motor is deemed unqualified. In this invention, only two low-cost orthogonal Hall elements are used as the sole position sensors, resulting in extremely low hardware costs and reduced computational load. Using the consistency of the forward and reverse angular velocities at each sampling point as the basis for calibration and good product determination eliminates the reliance on current loop feedback for motor calibration and operational quality judgment, making it applicable to motor control systems without current loop feedback.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of motor calibration, and in particular relates to a motor calibration method based on angular velocity consistency detection. Background Technology

[0002] Traditional high-performance FOC (Field-Oriented Control) schemes (including current loop feedback) face the dual challenges of hardware cost and computational complexity. At the hardware level, they require at least two sets of high-precision current sampling circuits to capture phase current in real time, and rely on high-resolution encoders or resolvers to provide accurate rotor position and speed feedback. These dedicated sensors and analog links are prohibitively expensive. At the algorithm level, each control cycle must complete Clarke transform, Park transform, and their inverse transforms, and perform PI regulation calculations for two current loops. This intensive real-time mathematical operation places stringent demands on the microcontroller's computing power, forcing developers to choose higher-performance processors, ultimately leading to a significant increase in the overall system's material cost and development complexity. To simplify the motor control architecture and algorithm, a new architecture omitting current loop feedback has been proposed. However, existing technologies still require current loop feedback signals for motor correction and performance evaluation. Therefore, it is necessary to propose a motor correction method that does not rely on current loop feedback. Summary of the Invention

[0003] To address the shortcomings of the prior art, the technical problem to be solved by the present invention is to provide a motor correction method based on angular velocity consistency detection.

[0004] To solve the above-mentioned technical problems, the present invention provides the following technical solution: A motor calibration method based on angular velocity consistency detection includes the following steps: S100. Install a pair of quadrature Hall sensors on the stator of the motor in advance, and determine the elliptic correction compensation parameters of the quadrature Hall sensor pair through offline calibration. S200: In offline mode, use a stable quadrature-axis voltage to make the motor rotate forward and reverse respectively. Calculate the control angle and angular velocity of each sampling point based on elliptic correction and calibration angle, and check whether the consistency of the motor's angular velocity meets the requirements. If it meets the requirements, proceed to step S400; otherwise, proceed to step S300. S300: Determine whether the conditions for ending the calibration angle adjustment have been met. If the conditions are met, proceed to step S500; otherwise, adjust the calibration angle and return to step S200. S400: Determine that the motor is qualified, and set the current calibration angle to the mechanical angle compensation value; S500, adjustment ends, motor is deemed unqualified.

[0005] Furthermore, the quadrature Hall sensor pair includes a sine Hall sensor and a cosine Hall sensor, wherein the original output signal of the cosine Hall sensor is... The original output signal of the sinusoidal Hall sensor is ; The elliptic correction compensation parameters include a 2×1 DC offset matrix. and 2×2 affine transformation matrix ;in, , This represents the DC offset of the cosine Hall sensor. This represents the DC offset of the sinusoidal Hall sensor.

[0006] Furthermore, the method for determining the elliptic correction compensation parameters includes the following sub-steps: S110. Run the motor at a constant speed under no-load for at least one revolution at low to medium speed to collect the raw output signal of the cosine Hall sensor. The original output signal of the sinusoidal Hall sensor And calculate the DC offset of the cosine Hall sensor. DC offset of the sinusoidal Hall sensor ; S120, convert the original output signal and The corresponding DC offsets are removed to obtain the decentering signal. and decentralized signals ; S130, Decentering signals are processed using a whitening algorithm. and Mapping an ellipse to a unit circle of equal amplitude and orthogonality, the calculated whitening matrix is ​​then... As an affine transformation matrix .

[0007] Furthermore, the whitening matrix was calculated. The method includes the following sub-steps: S135, Based on the decentralization signal and Calculate the covariance matrix ; S136, Regarding the covariance matrix Eigenvalue decomposition yields orthogonal and diagonal matrices, as shown in the formula:

[0008] in, It is a 2×2 orthogonal matrix, and its column vectors point in the directions of the major and minor axes of the ellipse; It is a 2×2 diagonal matrix. , It is a diagonalization function; Represents the variance along the major axis. Represents the variance along the minor axis; S137. Calculate the whitening matrix. The calculation formula is: .

[0009] Furthermore, the compensation formula for elliptic correction of the original output signal of the orthogonal Hall sensor pair is as follows:

[0010] In the formula, This represents the original output signal of the cosine Hall sensor. The elliptic-corrected output signal obtained after elliptic correction; The original output signal of the sinusoidal Hall sensor is The elliptic-corrected output signal obtained after elliptic correction; Represents the original data matrix. ; Calculate the mechanical angle of the test The formula is:

[0011] in, This is an enhanced version of the standard arctangent function, representing the angle value between -180° and 180° in the calculation result of the standard arctangent function; This represents the zero-position alignment correction value for the mechanical angle.

[0012] Furthermore, step S200 includes the following sub-steps: S210. Set the direct-axis voltage Vd=0 and the quadrature-axis voltage Vq=+Vtest to make the motor rotate in the forward direction; Vtest is a predetermined test voltage value. S220. During the forward rotation of the motor, the original output signal of the orthogonal Hall sensor pair is sampled at each sampling point, and the sampling result is elliptical corrected according to the elliptical correction compensation parameter. The detection mechanical angle is calculated based on the elliptical corrected output signal. S230. Set the direct-axis voltage Vd=0 and the quadrature-axis voltage Vq=-Vtest to reverse the motor. S240. During the reverse rotation of the motor, the original output signal of the quadrature Hall sensor pair is sampled at each sampling point, and the sampling result is elliptical corrected according to the elliptical correction compensation parameter. The detection mechanical angle is calculated based on the elliptical corrected output signal. S250. The calibration angle is used to correct the detection mechanical angle to obtain the control angle. The forward rotation angular velocity of each sampling point is calculated based on the control angle of the sampling point when rotating forward, and the reverse rotation angular velocity of each sampling point is calculated based on the control angle of the sampling point when rotating in reverse. S260. Check whether the consistency of the motor's angular velocity meets the requirements based on the forward and reverse angular velocities of each sampling point.

[0013] Furthermore, in step S260, the method for detecting whether the consistency of the motor's angular velocity meets the requirements is as follows: S261. Calculate the forward deviation value, reverse deviation value, and bidirectional deviation value of the angular velocity at each sampling point compared with the forward and reverse angular velocities at the same sampling point. S262. Set a first stability threshold Thr1. If the forward deviation, reverse deviation, and bidirectional deviation values ​​of all sampling points are less than the first stability threshold Thr1, then the motor's angular velocity consistency is determined to meet the requirements; otherwise, the motor's angular velocity consistency is determined to not meet the requirements. Set a second stability threshold Thr2, and calculate the maximum forward deviation value of all sampling points. Sf The maximum value of the reverse deviation value Sr and the maximum value of the two-way deviation. Sb Define the total error Err = Sf+Sr+Sb If Err < Thr2, then the motor's angular velocity consistency is determined to meet the requirements; otherwise, the motor's angular velocity consistency is determined to not meet the requirements.

[0014] Furthermore, in step S300, an adjustment step value Step is preset; the method for adjusting the calibration angle includes the following sub-steps: S310. Calculate the total error Err(Delta+Step) when the calibration angle is (Delta+Step) and the total error Err(Delta-Step) when the calibration angle is (Delta-Step); Delta represents the current calibration angle. S320. Compare the magnitudes of Err(Delta+Step) and Err(Delta-Step). If Err(Delta+Step) < Err(Delta-Step), then step the calibration angle upward by Step; otherwise, step the calibration angle downward by Step.

[0015] Furthermore, in step S300, before adjusting the calibration angle, the following sub-steps are performed: S301. Check if the adjustment direction of the calibration angle has been reversed. If so, proceed to step S302; otherwise, proceed to step S310. S302, reduce the step value Step, and then execute step S310.

[0016] Furthermore, the conditions for ending the calibration angle adjustment are: Adjust the total number of attempts to reach a preset threshold or the step value (Step) is less than the minimum resolution.

[0017] In this invention, only two low-cost orthogonal Hall elements are used as the sole position sensor, resulting in extremely low hardware BOM costs. An elliptic correction method is employed to correct the output signals of the orthogonal Hall elements, requiring only one matrix multiplication and one subtraction to calculate the detected mechanical angle, significantly reducing computational load. The motor is driven with a fixed voltage (fixed Vq), and angular velocity sequences are obtained through sampling tests in both forward and reverse rotation states. The stability of the forward and reverse angular velocities at each sampling point, as well as the consistency of the absolute values ​​of the forward and reverse angular velocities, are used as the criteria for judging good performance. Therefore, bidirectional angular velocity consistency is used as the criterion for judging motor operating quality, eliminating reliance on current loop feedback for motor calibration and operating quality judgment, making it applicable to motor control systems without current loop feedback. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a block diagram of the SVPWM+FOC hardware architecture with current loop feedback in an existing motor control system.

[0019] Figure 2 This is a flowchart of an embodiment of the motor correction method based on angular velocity consistency detection according to the present invention.

[0020] Figure 3 This is a hardware architecture block diagram of the motor control system applicable to this embodiment. Detailed Implementation

[0021] The following specific examples illustrate the implementation of the present invention. The illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0022] Motor control systems typically employ FOC (Field-Oriented Control). and SVPWM (Space Vector Pulse Width Modulation) The combined approach generates corresponding motor control signals based on real-time electrical angles; the existing motor control system hardware architecture is as follows: Figure 1 As shown.

[0023] The core concept of FOC (Focus on Current Loop Feedback) is to control AC motors in the same way as DC motors. The working process of an FOC with current loop feedback includes the following parts: First, coordinate transformation: mapping AC to DC. First, a Clark transformation (i.e., 3-phase to 2-phase) is performed, converting the measured three-phase stationary coordinate system (a, b, c) to DC. The phase currents (Ia, Ib, Ic) are as follows Transform into an equivalent two-phase stationary coordinate system (α, β) Current under (Iα, Iβ) This reduces the number of variables, but the current is still an alternating current.

[0024] Then, a Park transformation (i.e., from stationary to rotating) is performed, using the real-time electrical angle θ of the motor rotor obtained from the sensor to transform (Iα, Iβ) Transform to a two-phase rotating coordinate system (d, q) that rotates synchronously with the rotor magnetic field. Below, we obtain (Id, Iq) In this coordinate system, the d-axis (direct axis) is aligned with the direction of the rotor's permanent magnet magnetic field, and Id controls the excitation component. The q-axis (quadrature axis) leads the d-axis by 90°, and Iq controls the torque component. In this coordinate system that rotates synchronously with the rotor, Id and Iq are no longer sinusoidal alternating currents, but adjustable direct currents.

[0025] Second, the core control: Controlled like a DC motor, in the dq rotating coordinate system, the control objective becomes very simple, as detailed below: (1) Torque control: The electromagnetic torque is proportional to Iq. Therefore, the motor torque can be directly and linearly controlled by controlling Iq. The output of the speed outer loop PI controller is the command value Iq_ref of Iq.

[0026] (2) Magnetic field control: For surface-mounted permanent magnet synchronous motors, Id=0 control is usually adopted, that is, the direct axis current command Id_ref=0. This makes the stator magnetic field perpendicular to the rotor permanent magnet magnetic field, realizing maximum torque control per unit current and the highest efficiency.

[0027] (3) Current loop (inner loop) feedback: Id_ref and Iq_ref are compared with the actual Id and Iq fed back from the Park transformation, and the error is sent to their respective PI controllers. The outputs of these two PI controllers are voltage commands Vd_ref and Vq_ref in the rotating coordinate system. Among them, Vd_ref is the control command for the direct-axis voltage (excitation voltage) Vd, and Vq_ref is the control command for the quadrature-axis voltage (torque voltage) Vq.

[0028] Thirdly, inverse transformation and modulation: the command is converted back into three-phase voltage, using the same electrical angle θ, to convert the voltage command (Vd_ref, Vq_ref) in the rotating coordinate system. Inverse transformation back to the stationary coordinate system, the voltage vector (Valpha, Vbeta) .

[0029] The core concept of SVPWM is to efficiently synthesize a continuously rotating voltage vector using the discrete states of the switching transistors. The SVPWM algorithm treats the switching states of a three-phase inverter (including six switching transistors) as voltage vectors in the α–β coordinate system. The six switching transistors of the three-phase inverter can combine to form eight basic switching states (six effective vectors and two zero vectors). Within each PWM cycle, the desired voltage vector can be synthesized by combining two adjacent effective vectors and one zero vector at different times. Its goal is to generate a rotating magnetic field in the motor stator that is as circular as possible, thereby reducing torque ripple and current harmonics, improving voltage utilization, and enhancing motor running smoothness.

[0030] In the methods described above, current sampling typically requires at least two high-precision, fast-response current sensors (such as a sampling resistor and an operational amplifier) ​​to measure the two-phase current of the motor in real time. Position / speed sensors require high-resolution encoders or resolvers to provide accurate real-time rotor position. θ (For Park transform and inverse transform) and velocity ω m (Used for speed loop feedback), its hardware cost is relatively high. In addition, due to the need to perform multiple coordinate transformations and PI calculations of two current loops in real time, its computational complexity is high, and it also places high demands on the computing power of the MCU.

[0031] Please see Figure 2 , Figure 2 This is a flowchart of an embodiment of the motor calibration method based on angular velocity consistency detection according to the present invention. The motor calibration method based on angular velocity consistency detection in this embodiment includes the following steps: S100. Install a pair of quadrature Hall sensors on the stator of the motor in advance, and determine the elliptic correction compensation parameters of the quadrature Hall sensor pair through offline calibration.

[0032] The quadrature Hall sensor pair includes a sine Hall sensor and a cosine Hall sensor, wherein the original output signal of the cosine Hall sensor is defined as... The original output signal of the sinusoidal Hall sensor is defined as follows: .

[0033] Ideally, two perfectly orthogonal Hall sensors at 90° to each other will output signals. and The data trajectories obtained by using the horizontal and vertical axes as coordinates should form a perfect unit circle. The detected mechanical angle can be calculated using the following formula. :

[0034] in, This is an enhanced version of the standard arctangent function, representing the angle value between -180° and 180° in the calculation result of the standard arctangent function.

[0035] However, due to factors such as Hall effect mounting misalignment and chip gain / bias inconsistency, the actual output signal... and The data trajectory obtained by using the horizontal and vertical axes as coordinates is a tilted, flattened, and offset ellipse. When directly using the above formula for calculation... This will introduce periodic angular errors, resulting in torque pulsation.

[0036] Therefore, the main defects of mass-produced Hall signals are unequal amplitudes, non-strict 90° phases, and signal distortion. The elliptic correction algorithm essentially performs real-time online calibration of the signals from orthogonal Hall sensor pairs, compensating for gain and phase deviations to make the two output signals as close as possible to ideal sine and cosine signals.

[0037] The elliptic correction compensation parameters may include a 2×1 DC offset matrix. and 2×2 affine transformation matrix ;in, , This represents the DC offset of the cosine Hall sensor. This represents the DC offset of the sinusoidal Hall sensor.

[0038] The method for determining elliptic correction compensation parameters may include the following sub-steps: S110. Run the motor at a constant speed under no-load for at least one revolution (e.g., 1 to 2 revolutions) at a low to medium speed (e.g., 20% to 50% of the motor's rated speed) to collect the raw output signal from the cosine Hall sensor. The original output signal of the sinusoidal Hall sensor And calculate the DC offset of the cosine Hall sensor. DC offset of the sinusoidal Hall sensor Thus, the DC offset matrix is ​​obtained. .

[0039] S120, convert the original output signal and The corresponding DC offsets are removed to obtain the decentering signal. and decentralized signals Thus, a decentralized signal matrix is ​​obtained. ; .in, ; The original data matrix, The above calculations can eliminate the DC bias and move the center of the ellipse to the origin.

[0040] S130, Decentering signals are processed using a whitening algorithm. and Mapping an ellipse to a unit circle of equal amplitude and orthogonality, the calculated whitening matrix is ​​then... As an affine transformation matrix The calculated whitening matrix The method may include the following sub-steps: S131, Based on the decentralization signal and Calculate the covariance matrix Covariance matrix It is a 2×2 matrix containing the variance (diagonal) and covariance (off-diagonal, reflecting correlation and non-orthogonality) of the two signals.

[0041] S132, regarding the covariance matrix Eigenvalue decomposition yields orthogonal and diagonal matrices. Eigenvalue decomposition follows a conventional method, with the following formula:

[0042] in, It is a 2×2 orthogonal matrix (rotation matrix) whose column vectors point in the directions of the major and minor axes of the ellipse. Multiply by This is equivalent to rotating the coordinate system so that the coordinate axes align with the axis of the ellipse, thus eliminating the tilt. It is a 2×2 diagonal matrix (scaling matrix). .in, This is a diagonalization function, meaning that the elements inside the parentheses are placed on the diagonal, and the rest are filled with "0". Represents the variance along the major axis. This represents the variance along the minor axis.

[0043] S133, Calculate the whitening matrix The calculation formula is: .

[0044] The geometric meaning of whitening transformation is: first, rotate the ellipse to align it with the coordinate axes (eliminating correlation), then scale it along the two principal axes until both have a variance of 1. This achieves equal amplitude and orthogonality in one step, transforming the data distribution into a zero-mean, unit-variance, uncorrelated circular point cloud. The calculated whitening matrix... It can be used as an affine transformation matrix. .

[0045] S200: In offline mode, use a stable quadrature-axis voltage to make the motor rotate forward and reverse respectively. Calculate the control angle and angular velocity of each sampling point based on elliptic correction and calibration angle, and check whether the consistency of the motor's angular velocity meets the requirements. If it meets the requirements, proceed to step S400; otherwise, proceed to step S300.

[0046] Of course, before the first test of the motor's angular velocity consistency, the initial value of the calibration angle Delta needs to be set in advance; for example, the initial value of the calibration angle Delta can be set to 0, or the initial value of the calibration angle Delta can be set to other angles.

[0047] This step may include the following sub-steps: S210. Set the direct-axis voltage Vd=0 and the quadrature-axis voltage Vq=+Vtest to make the motor rotate in the forward direction; Vtest is a predetermined test voltage value. Since the input working voltage value is fixed, under ideal conditions, the motor speed remains constant after entering steady state.

[0048] S220. During the forward rotation of the motor, the original output signals of the quadrature Hall sensor pairs are sampled at each sampling point. The sampling results are then elliptic corrected according to the elliptic correction compensation parameters. The detection mechanical angle is calculated based on the elliptic-corrected output signal. Sampling points can be set at equal intervals of 2° to 5° to achieve equal-time sampling over one PWM cycle. Sampling can avoid the motor's start-up and stop phases, collecting only data when the motor is in a steady state to reduce sampling errors.

[0049] S230. Set the direct-axis voltage Vd=0 and the quadrature-axis voltage Vq=-Vtest to reverse the motor. Since the negative voltage applied in this step has the same amplitude as the positive voltage applied in step S210, ideally, the reverse speed of the motor after entering steady state should be the same as the forward speed in step S210.

[0050] S240. During the motor's reverse rotation, the original output signals of the quadrature Hall sensor pair are sampled at each sampling point to obtain the output signal. and And based on the elliptic correction compensation parameters, the sampling results (i.e., the output signal) are adjusted. and Perform elliptic correction and calculate the detection machine angle based on the output signal after elliptic correction. .

[0051] In this step, the compensation formula for elliptic correction of the original output signal of the orthogonal Hall sensor pair is as follows:

[0052] In the formula, This represents the original output signal of the cosine Hall sensor. The elliptic-corrected output signal obtained after elliptic correction; The original output signal of the sinusoidal Hall sensor is The elliptic-corrected output signal obtained after elliptic correction.

[0053] Calculate the mechanical angle of the test The formula is:

[0054] in, This represents the zero-position alignment correction value for the mechanical angle. Used for zero-position alignment to compensate for this absolute angular offset; calibration can be performed by combining mechanical positioning (e.g., locking the rotor in a known d-axis position) or electrical testing (e.g., injecting d-axis current and observing whether torque is generated). .

[0055] S250, uses calibration angle to detect mechanical angle Correction is performed to obtain the control angle. Based on the control angle of the sampling point during forward rotation Calculate the forward rotation angular velocity of each sampling point, and calculate the reverse rotation angular velocity of each sampling point based on the control angle of the sampling point during reverse rotation.

[0056] Correction yields control angle The following correction formula can be used:

[0057] The following formula can be used to calculate the positive rotational angular velocity:

[0058] In the formula, Indicates the index of the sampling point; Indicates the first time during forward rotation angular velocity of each sampling point; Indicates the first time during forward rotation Control angle of each sampling point; Indicates the ( )th time when rotating forward. The control angle of ) sampling points; Indicates the sampling time interval; This indicates that the differential of the angular velocity is processed by low-pass filtering, thereby estimating the smoothed angular velocity at the current moment.

[0059] The following formula can be used to calculate the angular velocity of reversal:

[0060] In the formula, Indicates the reversal of the first... angular velocity of each sampling point; Indicates the reversal of the first... Control angle of each sampling point; Indicates the ( ) when reversing The control angle of ) sampling points.

[0061] S260. Check whether the consistency of the motor's angular velocity meets the requirements based on the forward and reverse angular velocities at each sampling point. The method for checking the consistency of the motor's angular velocity in this step is as follows: S261. Calculate the forward and reverse deviation values ​​of the angular velocity at each sampling point, as well as the bidirectional deviation value between the forward and reverse angular velocities at the same sampling point, to facilitate subsequent judgment.

[0062] The forward deviation of the angular velocity at the sampling point can be calculated using the following formula:

[0063] in, Indicates the index of the sampling point; Indicates the first time during forward rotation The forward deviation of the angular velocity at each sampling point; Indicates the first time during forward rotation angular velocity of each sampling point; The standard value representing the forward deviation can be the mean or median of the angular velocities of all sampling points during forward rotation.

[0064] The reversal deviation of the angular velocity at the sampling point can be calculated using the following formula:

[0065] in, Indicates the reversal of the first... The inversion deviation of the angular velocity at each sampling point; Indicates the reversal of the first... angular velocity of each sampling point; The standard value representing the reversal deviation can be the mean or median of the absolute values ​​of the angular velocities of all sampling points during reversal.

[0066] The bidirectional deviation of the angular velocity at the sampling point can be calculated using the following formula:

[0067] in, Indicates the first The bidirectional deviation of the angular velocity at each sampling point.

[0068] S262. Set a first stability threshold Thr1. If the forward deviation, reverse deviation, and bidirectional deviation values ​​at all sampling points are all less than the first stability threshold Thr1, then the motor's angular velocity consistency is determined to meet the requirements; otherwise, the motor's angular velocity consistency is determined to not meet the requirements. The maximum forward deviation value at all sampling points can be calculated. Sf The maximum value of the reverse deviation value Sr and the maximum value of the two-way deviation. Sb Then, directly use the maximum value of the forward deviation. Sf The maximum value of the reverse deviation value Sr and the maximum value of the two-way deviation. Sb Compare with the first stability threshold Thr1.

[0069] Calculate the maximum value of forward deviation. Sf The formula is as follows:

[0070] in, This indicates the number of sampling points.

[0071] Calculate the maximum value of the reversal deviation. Sr The formula is as follows:

[0072] Calculate the maximum value of the two-way deviation. Sb The formula is as follows: .

[0073] if , , If both conditions are met, the motor's angular velocity consistency is determined to meet the requirements; otherwise, the motor's angular velocity consistency is determined to fail to meet the requirements.

[0074] Of course, the following methods can also be used to determine the consistency of angular velocities in this step: Set a second stability threshold Thr2, and calculate the maximum forward deviation value of all sampling points. Sf The maximum value of the reverse deviation value Sr and the maximum value of the two-way deviation. Sb .

[0075] Define the total error Err = Sf+Sr+Sb If Err < Thr2, then the motor's angular velocity consistency is determined to meet the requirements; otherwise, the motor's angular velocity consistency is determined to not meet the requirements.

[0076] S300: Determine if the conditions for ending the calibration angle adjustment have been met. If the conditions are met, proceed to step S500; otherwise, adjust the calibration angle and return to step S200. The conditions for ending the calibration angle adjustment can be: the total number of adjustments reaches a preset threshold or the step value Step is less than the minimum resolution.

[0077] In this step, the adjustment step value Step can be preset; the method for adjusting the calibration angle may include the following sub-steps: S310. Calculate the total error Err(Delta+Step) when the calibration angle is (Delta+Step) and the total error Err(Delta-Step) when the calibration angle is (Delta-Step); Delta represents the current calibration angle.

[0078] S320. Compare the magnitudes of Err(Delta+Step) and Err(Delta-Step). If Err(Delta+Step) < Err(Delta-Step), then step the calibration angle upwards by Step, i.e., Delta = Delta+Step. Otherwise, step the calibration angle downwards by Step, i.e., Delta = Delta-Step.

[0079] To increase the stepping speed, you can initially set a larger step value Step, and then scale the step value Step (in this case, reduce it) as needed. Before adjusting the calibration angle, perform the following sub-steps: S301. Check whether the adjustment direction of the calibration angle has been reversed (i.e., the calibration angle was previously stepping upwards, but suddenly becomes stepping downwards; or the calibration angle was previously stepping downwards, but suddenly becomes stepping upwards). If so, proceed to step S302; otherwise, proceed to step S310.

[0080] S302. Reduce the step value Step by multiplying the adjustment step value Step by the scaling factor. α ,0< α <1, for example, can be taken as α= 0.5, that is: Step = Step × 0.5; then execute step S310.

[0081] S400, determine that the motor is qualified (i.e., the motor operation quality is qualified), and set the current calibration angle to the mechanical angle compensation value Delta_final; that is: Delta_final = Delta.

[0082] S500, end adjustment, motor deemed unqualified. At this point, the current calibration angle Delta can also be output as the optimal adjustment value for traceability.

[0083] Please see Figure 3 This is a hardware architecture block diagram of the motor control system applicable to this embodiment. It can be seen that since the motor operation quality determination in this embodiment does not rely on current loop feedback, it can be applied to motor control systems without current loop feedback, greatly simplifying its hardware structure and thus reducing hardware costs.

[0084] In this embodiment, only two low-cost orthogonal Hall elements are used as the sole position sensor, resulting in extremely low hardware BOM costs. An elliptic correction method is employed to correct the output signals of the orthogonal Hall elements, requiring only one matrix multiplication and one subtraction to calculate the detected mechanical angle, significantly reducing computational load. The motor is driven with a fixed voltage (fixed Vq), and angular velocity sequences are obtained through sampling tests in both forward and reverse rotation states. The stability of the forward and reverse angular velocities at each sampling point, as well as the consistency of the absolute values ​​of the forward and reverse angular velocities, are used as the criteria for judging good performance. Therefore, bidirectional angular velocity consistency is used as the criterion for judging motor operation quality, eliminating reliance on current loop feedback for motor correction and operation quality judgment, making it applicable to motor control systems without current loop feedback.

[0085] The above embodiments merely illustrate preferred implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention should be determined by the appended claims.

Claims

1. A motor correction method based on angular velocity consistency detection, characterized in that, Includes the following steps: S100. Install a pair of quadrature Hall sensors on the stator of the motor in advance, and determine the elliptic correction compensation parameters of the quadrature Hall sensor pair through offline calibration. S200: In offline mode, use a stable quadrature-axis voltage to make the motor rotate forward and reverse respectively. Calculate the control angle and angular velocity of each sampling point based on elliptic correction and calibration angle, and check whether the consistency of the motor's angular velocity meets the requirements. If it meets the requirements, proceed to step S400; otherwise, proceed to step S300. S300: Determine whether the conditions for ending the calibration angle adjustment have been met. If the conditions are met, proceed to step S500; otherwise, adjust the calibration angle and return to step S200. S400: Determine that the motor is qualified, and set the current calibration angle to the mechanical angle compensation value; S500, adjustment ends, motor is deemed unqualified.

2. The motor calibration method based on angular velocity consistency detection as described in claim 1, characterized in that: The orthogonal Hall sensor pair includes a sine Hall sensor and a cosine Hall sensor, a raw output signal of the cosine Hall sensor is ; and a raw output signal of the sine Hall sensor is ; The ellipse correction compensation parameter includes a 2x1 direct current offset matrix and a 2x2 affine transformation matrix ; wherein , represents a direct current offset of the cosine Hall sensor, represents a direct current offset of the sine Hall sensor.

3. The motor correction method based on angular velocity consistency detection according to claim 2, wherein The method for determining elliptic correction compensation parameters includes the following sub-steps: S110, make the motor rotate at least one circle at low speed and constant speed, collect the original output signal of the cosine Hall sensor and the original output signal of the sine Hall sensor , and calculate the DC offset of the cosine Hall sensor and the DC offset of the sine Hall sensor ; S120, removing the corresponding DC offset from the original output signal and respectively, to obtain a decentered signal and the decentered signal ; S130, whiten the decentering signal by a whitening algorithm and From the elliptical mapping to the equal amplitude, orthogonal unit circle, the calculated whitening matrix as an affine transformation matrix .

4. The motor calibration method based on angular velocity consistency detection as described in claim 3, characterized in that, The whitening matrix is calculated The method comprises the following sub-steps: S135. In response to the decentering signal and computing the covariance matrix ; S136、to the covariance matrix Eigenvalue decomposition is performed to obtain an orthogonal matrix and a diagonal matrix, with the formula: wherein is a 2x2 orthogonal matrix whose column vectors point in the directions of the major and minor axes of the ellipse; is a 2x2 diagonal matrix, , is a diagonalization function; denotes the variance in the direction of the major axis, denotes the variance in the direction of the minor axis; S137、calculating the whitening matrix The calculation formula is: 。 5. The motor correction method based on angular velocity consistency detection according to claim 2, wherein, The compensation formula for elliptic correction of the original output signal of the orthogonal Hall sensor pair is as follows: wherein denotes the raw output signal of a cosine Hall sensor denotes the elliptically corrected output signal after elliptical correction; denotes the raw output signal of a sine Hall sensor denotes the elliptically corrected output signal after elliptical correction; denotes the raw data matrix, ; Computing the mechanical angle of detection The formula is: in, This is an enhanced version of the standard arctangent function, representing the angle value between -180° and 180° in the calculation result of the standard arctangent function; This represents the zero-position alignment correction value for the mechanical angle.

6. The motor calibration method based on angular velocity consistency detection as described in any one of claims 1 to 5, characterized in that, Step S200 includes the following sub-steps: S210. Set the direct-axis voltage Vd=0 and the quadrature-axis voltage Vq=+Vtest to make the motor rotate in the forward direction; Vtest is a predetermined test voltage value. S220. During the forward rotation of the motor, the original output signal of the orthogonal Hall sensor pair is sampled at each sampling point, and the sampling result is elliptical corrected according to the elliptical correction compensation parameter. The detection mechanical angle is calculated based on the elliptical corrected output signal. S230. Set the direct-axis voltage Vd=0 and the quadrature-axis voltage Vq=-Vtest to reverse the motor. S240. During the reverse rotation of the motor, the original output signal of the quadrature Hall sensor pair is sampled at each sampling point, and the sampling result is elliptical corrected according to the elliptical correction compensation parameter. The detection mechanical angle is calculated based on the elliptical corrected output signal. S250. The calibration angle is used to correct the detection mechanical angle to obtain the control angle. The forward rotation angular velocity of each sampling point is calculated based on the control angle of the sampling point when rotating forward, and the reverse rotation angular velocity of each sampling point is calculated based on the control angle of the sampling point when rotating in reverse. S260. Check whether the consistency of the motor's angular velocity meets the requirements based on the forward and reverse angular velocities of each sampling point.

7. The motor calibration method based on angular velocity consistency detection as described in claim 6, characterized in that, In step S260, the method for detecting whether the consistency of the motor's angular velocity meets the requirements is as follows: S261. Calculate the forward deviation value, reverse deviation value, and bidirectional deviation value of the angular velocity at each sampling point compared with the forward and reverse angular velocities at the same sampling point. S262. Set a first stability threshold Thr1. If the forward deviation, reverse deviation, and bidirectional deviation values ​​of all sampling points are less than the first stability threshold Thr1, then the motor's angular velocity consistency is determined to meet the requirements; otherwise, the motor's angular velocity consistency is determined to not meet the requirements. Set a second stability threshold Thr2, and calculate the maximum forward deviation value of all sampling points. Sf The maximum value of the reverse deviation value Sr and the maximum value of the two-way deviation. Sb Define the total error Err = Sf+Sr+Sb If Err < Thr2, then the motor's angular velocity consistency is determined to meet the requirements; otherwise, the motor's angular velocity consistency is determined to not meet the requirements.

8. The motor calibration method based on angular velocity consistency detection as described in claim 7, characterized in that, In step S300, an adjustment step value Step is preset; the method for adjusting the calibration angle includes the following sub-steps: S310. Calculate the total error Err(Delta+Step) when the calibration angle is (Delta+Step) and the total error Err(Delta-Step) when the calibration angle is (Delta-Step); Delta represents the current calibration angle. S320. Compare the magnitudes of Err(Delta+Step) and Err(Delta-Step). If Err(Delta+Step) < Err(Delta-Step), then step the calibration angle upward by Step; otherwise, step the calibration angle downward by Step.

9. The motor calibration method based on angular velocity consistency detection as described in claim 8, characterized in that, In step S300, before adjusting the calibration angle, the following sub-steps are performed: S301. Check if the adjustment direction of the calibration angle has been reversed. If so, proceed to step S302; otherwise, proceed to step S310. S302, reduce the step value Step, and then execute step S310.

10. The motor calibration method based on angular velocity consistency detection as described in any one of claims 1 to 5, characterized in that, The conditions for ending the calibration angle adjustment are: Adjust the total number of attempts to reach a preset threshold or the step value (Step) is less than the minimum resolution.