Interference elimination method and device for motor Hall sensor, equipment and medium
By obtaining motor motion parameters and Hall signals in real time, identifying and adjusting Hall interference, the problem of motor Hall sensors being susceptible to interference is solved, and the accuracy and stability of motor control are improved.
Patent Information
- Application Number
- CN202411653871.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-25
AI Technical Summary
The motor Hall sensor is susceptible to factors such as electromagnetic interference and temperature changes, which lead to deviations in the output signal, which in turn affects the accuracy and stability of the motor control.
By obtaining the motor motion parameters and Hall signals in real time, determine the motor Hall speed, and identify Hall interference based on the motor motion parameters and Hall speed. If interference is identified, adjust the motor Hall speed and Hall position to eliminate interference.
Effectively eliminate or mitigate Hall interference, improve the accuracy and stability of motor control, and avoid the cost of using additional hardware filters or sensors.
Smart Images

Figure CN119696264A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motor control technology, and in particular to a method, device, equipment and medium for eliminating interference of a motor Hall sensor. Background Art
[0002] The motor Hall sensor plays an important role in the motor control system. It is used to detect the rotor position of the motor, thereby achieving precise control of the motor. However, in practical applications, the Hall sensor is easily affected by factors such as electromagnetic interference and temperature changes, which causes the output signal to deviate, thereby affecting the accuracy and stability of the motor control. In related technologies, it is usually necessary to rely on harness shielding, hardware filtering or adding additional sensors to reduce interference, but these methods are often costly and complex to implement, and are difficult to implement for products that have already been mass-produced.
[0003] Therefore, how to eliminate the Hall interference of the Hall sensor is a problem that those skilled in the art need to solve. Summary of the invention
[0004] The present application provides a method, device, equipment and medium for eliminating interference of a motor Hall sensor to eliminate Hall interference of the Hall sensor.
[0005] In a first aspect, the present application provides a method for eliminating interference of a motor Hall sensor, comprising:
[0006] Acquire motor motion parameters and Hall signals in real time; wherein the Hall signals are signals output by the motor Hall sensors;
[0007] Determine the motor Hall speed using the Hall signal;
[0008] Identify Hall interference according to the motor motion parameters and the motor Hall speed;
[0009] If Hall interference is detected, the motor Hall speed and Hall position are adjusted.
[0010] Optionally, identifying Hall interference according to the motor motion parameter and the motor Hall speed includes:
[0011] Determining a motor state according to the motor motion parameters;
[0012] If the motor state is normal, the Hall interference is identified according to the motor Hall speed and the interference identification threshold; wherein the interference identification threshold is a pre-set parameter value for identifying Hall interference.
[0013] Optionally, identifying Hall interference according to the motor Hall speed and interference identification threshold includes:
[0014] Compare the motor Hall speed with the maximum Hall speed; if the motor Hall speed is greater than the maximum Hall speed, determine that there is positive Hall interference;
[0015] The motor Hall speed is compared with the minimum Hall speed; if the motor Hall speed is less than the minimum Hall speed, it is determined that negative Hall interference exists.
[0016] Optionally, identifying Hall interference according to the motor Hall speed and interference identification threshold includes:
[0017] Calculate a first fluctuation amplitude value by using the motor Hall speed and historical Hall speed;
[0018] Comparing the first fluctuation amplitude value with the maximum fluctuation amplitude value; if the first fluctuation amplitude value is greater than the maximum fluctuation amplitude value, determining that positive Hall interference exists;
[0019] The first fluctuation amplitude value is compared with the minimum fluctuation amplitude value; if the first fluctuation amplitude value is smaller than the minimum fluctuation amplitude value, it is determined that negative Hall interference exists.
[0020] Optionally, identifying Hall interference according to the motor Hall speed and interference identification threshold includes:
[0021] Determine a weighted average Hall velocity using historical Hall velocities;
[0022] Calculating a second fluctuation amplitude value according to the motor Hall speed and the weighted average Hall speed;
[0023] Compare the second fluctuation amplitude value with the interval working condition maximum value; if the second fluctuation amplitude value is greater than the interval working condition maximum value, it is determined that there is positive Hall interference;
[0024] The second fluctuation amplitude value is compared with the minimum value of the interval working condition; if the second fluctuation amplitude value is less than the minimum value of the interval working condition, it is determined that negative Hall interference exists.
[0025] Optionally, adjust the Hall position, including
[0026] If the Hall interference is positive Hall interference, the count of the Hall position is increased by one; if the Hall interference is negative Hall interference, the count of the Hall position is decreased by one.
[0027] Optionally, the motor Hall speed is adjusted, including
[0028] Determine the target Hall velocity based on the historical Hall velocity;
[0029] The motor Hall speed is replaced by the target Hall speed.
[0030] In a second aspect, the present application provides an interference elimination device for a motor Hall sensor, comprising:
[0031] An acquisition module is used to acquire motor motion parameters and Hall signals in real time; wherein the Hall signals are signals output by the motor Hall sensors;
[0032] A determination module, used for determining the motor Hall speed using the Hall signal;
[0033] An identification module, used for identifying Hall interference according to the motor motion parameters and the motor Hall speed;
[0034] The adjustment module is used to adjust the Hall speed and Hall position of the motor when Hall interference is identified.
[0035] In a third aspect, the present application provides an electronic device, including:
[0036] A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the above-mentioned interference elimination method of the present application through the computer program.
[0037] In a fourth aspect, the present application further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the steps of the above-mentioned interference elimination method of the present application.
[0038] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: The present application provides a solution for eliminating interference of the motor Hall sensor. This solution requires real-time acquisition of the motor motion parameters and the Hall signal output by the motor Hall sensor, determines the motor Hall speed using the Hall signal, and identifies the Hall interference based on the motor motion parameters and the motor Hall speed. If the Hall interference is identified, the motor Hall speed and Hall position are adjusted. It can be seen that the present application can calculate the motor Hall speed based on the Hall signal, and identify the Hall interference in combination with the motor motion parameters. If the Hall interference is identified, the output motor Hall speed and Hall position are adjusted. In this way, the Hall interference can be effectively eliminated or reduced, and the accuracy of motor control can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0041] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0042] Figure 1 A schematic flow chart of a method for eliminating interference of a motor Hall sensor provided in an embodiment of the present application;
[0043] Figure 2 A schematic flow chart of another method for eliminating interference of a motor Hall sensor provided in an embodiment of the present application;
[0044] Figure 3 A schematic flow chart of another method for eliminating interference of a motor Hall sensor provided in an embodiment of the present application;
[0045] Figure 4 A schematic diagram of an initialization module execution flow provided in an embodiment of the present application;
[0046] Figure 5 A schematic diagram of an execution flow of a Hall velocity calculation module provided in an embodiment of the present application;
[0047] Figure 6a A schematic diagram of an execution flow of an interference identification module and an interference elimination module provided in an embodiment of the present application;
[0048] Figure 6b A schematic diagram of another interference identification module and interference elimination module execution flow provided in an embodiment of the present application;
[0049] Figure 7 A schematic diagram of an output module execution flow provided in an embodiment of the present application;
[0050] Figure 8 A schematic diagram of the structure of an interference elimination device for a motor Hall sensor provided in an embodiment of the present application;
[0051] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0053] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0054] The embodiments of the present application provide a method, device, equipment and medium for eliminating interference of a motor Hall sensor to eliminate Hall interference of the Hall sensor.
[0055] See also Figure 1 , is a flow chart of a method for eliminating interference of a motor Hall sensor provided in an embodiment of the present application, the method specifically comprising the following steps:
[0056] S101, acquiring motor motion parameters and Hall signals in real time; wherein the Hall signals are signals output by the Hall sensors of the motors;
[0057] In this application, the motor motion parameters and the Hall signal output by the motor Hall sensor can be obtained in real time. The Hall speed can be calculated through the Hall signal, and the Hall interference can be monitored in combination with the motor motion parameters, so as to eliminate the influence of Hall interference in time. The motor motion parameters are various parameters of the motor in motion, including the motor's current, voltage, output direction, output duty cycle, Hall position, load, relative value of motor track friction, vehicle body vibration and other parameters. The Hall signal is a Hall signal obtained in real time by the motor Hall sensor, and the Hall signal includes the Hall level and the Hall interruption time.
[0058] S102, determining the motor Hall speed using the Hall signal;
[0059] In this application, after obtaining the Hall signal, the current motor Hall speed can be calculated based on the Hall signal. The unit of Hall speed is: X Halls / second, or: Y seconds / one Hall. The calculation method of the motor Hall speed is:
[0060] Motor Hall speed = interruption Hall number / interruption time difference.
[0061] S103, identifying Hall interference according to motor motion parameters and motor Hall speed;
[0062] In this embodiment, Hall interference is mainly identified by comprehensive recognition of motor motion parameters and motor Hall speed. If there is an abnormality in the motor operation parameters, it means that there is a problem with the current motor itself, and there is no need to identify Hall interference at this time; if there is no abnormality in the motor operation parameters, it means that the current motor is in a normal state, then Hall interference can be identified by the calculated motor Hall speed, for example: if the current motor Hall speed is too large and exceeds the motor Hall speed under normal circumstances, it means that Hall interference occurs at this time; if the current motor Hall speed is normal, there is no Hall interference, and the next calculated motor Hall speed is detected.
[0063] S104: If Hall interference is identified, adjust the motor Hall speed and Hall position.
[0064] After the present application identifies the Hall interference, in order to avoid the influence of the Hall interference on the Hall output signal, it is necessary to adjust the Hall output signal, which includes the motor Hall speed and Hall position. Among them, when the present application adjusts the motor Hall speed, the motor Hall speed of this time can be ignored, and the motor Hall speed can be replaced by the historical Hall speed; and for the Hall position, the Hall position count compensation can be performed, for example: if the motor Hall speed is too large and Hall interference occurs, then there is no need to count the Hall position. However, after the Hall interruption, the Hall position count is added by one by default. Therefore, when the present application detects the Hall interference and adjusts the Hall position, it is necessary to reduce the Hall position count by one to perform the count compensation.
[0065] In addition, after the present application obtains the Hall output signal after the interference is eliminated: the Hall position and the motor Hall speed, the Hall position and the motor Hall speed can be combined with the motor operating parameters pre-set by the program, and the control signal can be adjusted by PID (a method for adjusting the motor speed) feedback according to the actual operating state of the motor to generate an accurate control signal and realize precise control of the motor.
[0066] From the above, it can be seen that after the present application obtains the Hall signal output by the motor Hall sensor, the motor Hall speed can be calculated based on the Hall signal, and the Hall interference can be identified in combination with the motor motion parameters, and the output motor Hall speed and Hall position can be adjusted. In this way, the Hall interference can be effectively eliminated or reduced, and the accuracy of motor control can be improved.
[0067] See also Figure 2 , is a flow chart of another method for eliminating interference of a motor Hall sensor provided in an embodiment of the present application, the method specifically comprising the following steps:
[0068] S201, acquiring motor motion parameters and Hall signals in real time; wherein the Hall signals are signals output by the Hall sensors of the motors;
[0069] S202, determining the motor Hall speed using the Hall signal;
[0070] S203, determining the motor state according to the motor motion parameters; if the motor state is normal, executing S204;
[0071] S204, identifying Hall interference according to the motor Hall speed and the interference identification threshold; wherein the interference identification threshold is a pre-set parameter value for identifying Hall interference;
[0072] S205: If Hall interference is identified, adjust the motor Hall speed and Hall position.
[0073] In this application, the motor motion parameters include the motor's current, voltage, output direction, output duty cycle, Hall position, load, relative value of motor track friction, body vibration and other parameters. Before executing this solution, the seat motor can be controlled by software to perform full-stroke and multi-working-condition reciprocating motion, obtain the motor motion parameters of the motor in each stroke interval and under different working conditions, and save them in the data cache. In this way, the normal range of each parameter value under normal motor conditions can be understood. If it is detected that the value of a parameter in the currently acquired motor motion parameters exceeds the normal range, it means that the motor is abnormal at this time; if the parameter values of each parameter are within the normal range and there is no abnormality, Hall interference can be detected at this time.
[0074] This application mainly identifies Hall interference through the motor Hall speed and interference identification threshold, and the interference identification threshold is a pre-set parameter value for identifying Hall interference. The interference identification threshold is to analyze the collected and calculated Hall speed data using a self-learning algorithm, and autonomously calculate and store the interference identification threshold for each motor stroke interval and each working condition through a training model. The interference identification threshold may include: the maximum value of the Hall speed, the minimum value of the Hall speed, the fluctuation amplitude value of the Hall speed, etc., which are not specifically limited here, as long as the abnormal Hall speed can be identified. For example: set the maximum value of the Hall speed to 150. If the currently calculated motor Hall speed is 180, it means that the current motor Hall speed is abnormal, that is, there is Hall interference. At this time, it is necessary to continue to execute S205; if the current motor Hall speed is not abnormal, continue to detect the next calculated motor Hall speed.
[0075] In summary, when identifying Hall interference, the present application first determines the motor state through the motor motion parameters. When the motor is in a normal state, the Hall interference can be effectively identified through the motor Hall speed and the interference identification threshold. Moreover, the interference identification threshold in the present application can be continuously optimized through a self-learning algorithm, and the anti-interference effects before and after the modification are compared, and the best one is retained. In this way, the interference identification threshold of each travel range and working condition can be continuously improved to improve the overall performance and stability of the system.
[0076] See also Figure 3 , is a flow chart of another method for eliminating interference of a motor Hall sensor provided in an embodiment of the present application, the method specifically comprising the following steps:
[0077] S301, acquiring motor motion parameters and Hall signals in real time; wherein the Hall signals are signals output by the Hall sensors of the motors;
[0078] S302, determining the motor Hall speed using the Hall signal;
[0079] S303, identifying Hall interference according to the motor motion parameters and the motor Hall speed; if Hall interference is identified, executing S304;
[0080] S304, if the Hall interference is positive Hall interference, the count of the Hall position is increased by one; if the Hall interference is negative Hall interference, the count of the Hall position is decreased by one;
[0081] S305 , determining a target Hall speed according to the historical Hall speed, and replacing the motor Hall speed with the target Hall speed.
[0082] In the present application, if Hall interference is identified, it is first necessary to perform Hall position count compensation according to the type of Hall interference. The compensation method is: if the Hall interference is positive Hall interference, the Hall position count is increased by one; if the Hall interference is negative Hall interference, the Hall position count is decreased by one. In addition, when adjusting the motor Hall speed, the present application can first determine the target Hall speed based on the historical Hall speed. The target Hall speed is the adjusted Hall speed. After determining the target Hall speed, the current motor Hall speed can be replaced by the target Hall speed, thereby eliminating the influence of the Hall interference.
[0083] When determining the target Hall speed, it can be determined based on the historical Hall speed, which can be the previous Hall speed or the previous N Hall speeds. For example, the previous Hall speed can be used as the target Hall speed, or the target Hall speed can be determined based on the trend of the previous N Hall speeds. If the previous five Hall speeds increase in sequence, the target Hall speed can be determined based on the increase in the previous five Hall speeds.
[0084] From the above, it can be seen that after identifying different types of Hall interference, the present application can adjust the counting of the Hall position, determine the target Hall speed through the historical Hall speed, and replace the current motor Hall speed with the target Hall speed to eliminate the impact of the Hall speed.
[0085] Based on any of the above method embodiments, this embodiment can identify Hall interference according to different types of interference identification thresholds and motor Hall speeds. The process includes the following identification process:
[0086] Identification process 1: Compare the motor Hall speed with the maximum Hall speed; if the motor Hall speed is greater than the maximum Hall speed, it is determined that there is positive Hall interference; compare the motor Hall speed with the minimum Hall speed; if the motor Hall speed is less than the minimum Hall speed, it is determined that there is negative Hall interference.
[0087] Under normal circumstances, for motors with fixed duty cycle output or PID speed regulation, there is a maximum Hall speed value during operation on a fixed running track. This application defines the maximum Hall speed value as V_hall_max. This application can use a self-learning algorithm to analyze the collected and calculated Hall speed data, and calculate and store the maximum Hall speed value of the motor in each travel interval and each working condition through a training model. In addition, the minimum Hall speed value also exists, which generally approaches zero, so it is difficult to define. At this time, the minimum Hall speed value V_hall_min in each travel interval and each working condition can be captured from the perspective of the minimum starting voltage, current and output duty cycle of the motor from static to dynamic when the motor and the seat are unloaded, and the minimum operating voltage, current and output duty cycle of the motor from dynamic to static. This application needs to use a self-learning algorithm to analyze the collected and calculated Hall speed data, and through a training model, autonomously calculate and store the minimum Hall speed value of the motor in each travel interval and each working condition.
[0088] The self-learning algorithm strategy means that, without anti-pinch and stall restrictions, the software controls the seat motor to perform reciprocating motion in full stroke and multiple working conditions, obtains the motor motion parameters in full stroke and multiple working conditions and saves them in the data cache, and calculates the maximum Hall speed of the seat motor in each case in full stroke and multiple working conditions. For example, the maximum value of ten data is obtained as the maximum Hall speed of the motor in full stroke and stored in the database for backup; or the minimum value of ten data is obtained as the minimum Hall speed of the motor in full stroke and stored in the database for backup.
[0089] After determining the maximum and minimum Hall speed values, the present application can monitor and calculate the current motor Hall speed in real time. When the motor is in normal motion, if the current motor Hall speed is greater than the maximum Hall speed value, it indicates that positive Hall interference has occurred; if the current motor Hall speed is less than the minimum Hall speed value, it indicates that negative Hall interference has occurred. In addition, when identifying interference, the present application can use the corresponding sliding window + limiting filter algorithm to filter the Hall speed output by the Hall sensor to eliminate or reduce interference.
[0090] Identification process two: Use the motor Hall speed and historical Hall speed to calculate the first fluctuation amplitude value; compare the first fluctuation amplitude value with the maximum fluctuation amplitude value; if the first fluctuation amplitude value is greater than the maximum fluctuation amplitude value, it is determined that there is positive Hall interference; compare the first fluctuation amplitude value with the minimum fluctuation amplitude value; if the first fluctuation amplitude value is less than the minimum fluctuation amplitude value, it is determined that there is negative Hall interference.
[0091] Identification process three: Use historical Hall speed to determine the weighted average Hall speed; calculate the second fluctuation amplitude value based on the motor Hall speed and the weighted average Hall speed; compare the second fluctuation amplitude value with the maximum value of the interval operating condition; if the second fluctuation amplitude value is greater than the maximum value of the interval operating condition, it is determined that there is positive Hall interference; compare the second fluctuation amplitude value with the minimum value of the interval operating condition; if the second fluctuation amplitude value is less than the minimum value of the interval operating condition, it is determined that there is negative Hall interference.
[0092] In the present application, there is another situation for positive Hall interference, that is, the interference degree is small, or the Hall speed of the motor is relatively small at this time. Although the Hall speed will increase at this time, it is not enough to make the current Hall speed greater than the maximum value of the Hall speed. There is also another situation for negative Hall interference, that is, the interference degree is small, or the Hall speed of the motor is relatively large at this time, which will reduce the Hall speed, but it is not enough to make the current Hall speed less than the minimum value of the Hall speed. In the above two cases, a comprehensive judgment can be made based on the motor motion parameters. If the motor is judged to be in a normal state based on the motor motion parameters, the Hall speed of the motor must have a reasonable fluctuation range in this case. Therefore, the present application can identify the positive Hall interference and negative Hall interference in the above situation based on the fluctuation amplitude value.
[0093] Among them, the present application can calculate the first fluctuation amplitude value according to the motor Hall speed and the historical Hall speed. The historical Hall speed can be the Hall speed of the previous N times. The Hall average value is calculated according to the Hall speed of the previous N times, and the quotient of the current motor Hall speed and the Hall average value is calculated, and the quotient is used as the first fluctuation amplitude value; and, when calculating the Hall average value, in order to ensure the accuracy of the data, the present application can remove the maximum data value and the minimum data value from the Hall speed of the previous N times, and then calculate the Hall average value. If the first fluctuation amplitude value of the Hall speed of the current motor is greater than the maximum fluctuation amplitude + AFR_Fmax% of the previous N times of the Hall speed, it is determined that there is positive Hall interference, otherwise it is deemed that there is no positive Hall interference or mechanical consistency problem. If the first fluctuation amplitude value of the Hall speed of the current motor is less than the minimum fluctuation amplitude - AFR_Fmin% of the previous N times of the Hall speed, it is determined that there is positive Hall interference, otherwise it is deemed that there is no positive Hall interference or mechanical consistency problem.
[0094] In another embodiment of the present application, the weighted average Hall speed can also be determined using the historical Hall speed, and the second fluctuation amplitude value is calculated based on the motor Hall speed and the weighted average Hall speed. Among them, the historical Hall speed is the Hall speed of the previous N times, and the weighted value of the Hall speed closer to the current motor Hall speed is set to be larger, and the weighted value of the Hall speed farther from the current motor Hall speed is set to be smaller, and the weighted average Hall speed is calculated based on each Hall speed and the corresponding weighted value. Then, the current motor Hall speed is compared with the weighted average Hall speed to calculate the second fluctuation amplitude, such as: calculating the quotient of the current motor Hall speed and the weighted average Hall speed, and using the quotient as the second fluctuation amplitude value. If the current motor Hall speed is greater than the second fluctuation amplitude value of the weighted average Hall speed, and greater than the maximum value of the interval operating condition +SFR_Fmax%, it is considered that positive Hall interference has occurred, otherwise it is considered that there is no positive Hall interference or mechanical consistency problem; if the current motor Hall speed is less than the second fluctuation amplitude value of the weighted average Hall speed, and less than the minimum value of the interval operating condition -SFR_Fmin%, it is considered that negative Hall interference has occurred, otherwise it is considered that there is no negative Hall interference or mechanical consistency problem.
[0095] In the present application, the interference identification threshold includes: the maximum Hall speed V_hall_max, the minimum Hall speed V_hall_min, the fluctuation amplitude percentage threshold and the interval operating condition percentage threshold, wherein the fluctuation amplitude percentage threshold includes: the fluctuation amplitude maximum value +AFR_Fmax% and the fluctuation amplitude minimum value -AFR_Fmin%; the interval operating condition percentage threshold includes: the interval operating condition maximum value +SFR_Fmax% and the interval operating condition minimum value -SFR_Fmin%. In addition, the present application sets different interference identification thresholds under different travel intervals and operating conditions. Therefore, when the present application identifies Hall interference according to the interference identification threshold and the motor Hall speed, it is first necessary to determine the interference identification threshold corresponding to the travel interval and operating condition, and then detect the Hall interference through the interference identification threshold.
[0096] See also Figure 4 , which is a schematic diagram of an initialization module execution flow provided in an embodiment of the present application, see Figure 4 First, the system is initialized. If the initialization fails, the fault is reported and repaired. If the initialization succeeds, the Hall judgment related modules are initialized, including the Hall speed calculation module, interference identification module, interference elimination module, output module and learning module. After the initialization is completed, the Hall interrupt is triggered and the parameters are set. Figure 5 , which is a schematic diagram of the execution flow of the Hall velocity calculation module provided in the embodiment of the present application, see Figure 5 After the Hall interrupt is triggered, if the Hall voltage changes, the Hall interrupt time is read. If the reading fails, the fault is reported and repaired. After the Hall interrupt time is read successfully, the Hall speed is calculated and the Hall speed unit is converted. At this point, the Hall speed acquisition is completed. Among them, the Hall speed calculated at each moment needs to maintain a consistent Hall speed unit. At the same time, after the parameter collection starts, the motor current, voltage, output direction, duty cycle, load signal, relative value of full-stroke friction force, and body vibration amplitude signal need to be collected in sequence. If the collection fails, the fault is reported and repaired.
[0097] See also Figure 6a and Figure 6b , is a schematic diagram of the execution flow of the interference identification module and the interference elimination module provided in the embodiment of the present application. Figure 6a , when the Hall speed is detected to be greater than the maximum Hall speed V_hall_max and the Hall speed fluctuation amplitude is greater than the maximum fluctuation amplitude
[0098] +AFR_Fmax%, and the Hall speed is greater than the interval working condition maximum value +SFR_Fmax%, there is positive Hall interference, the Hall position count is compensated by +1, and the Hall speed is dynamically processed by sliding window + limiting filter, and the Hall position and Hall speed are output. If there is no Hall interference, the Hall position and Hall speed are directly output; see Figure 6b , when it is detected that the Hall speed is less than the minimum Hall speed value V_hall_min, the Hall speed fluctuation amplitude is less than the minimum fluctuation amplitude value -AFR_Fmin%, and the Hall speed is less than the minimum value of the interval working condition -SFR_Fmin%, there is negative Hall interference, the Hall position count compensation is -1, and the Hall speed is dynamically processed by sliding window + limiting filter, and the Hall position and Hall speed are output. If there is no Hall interference, the Hall position and Hall speed are directly output.
[0099] Among them, Figure 6a and Figure 6b In the process of interference detection, after the Hall position counting compensation, the interference time, type, parameters, number of times, etc. need to be recorded. Based on these data, the learning optimization module needs to perform learning optimization, optimize the configuration parameters of the interference identification and elimination algorithm, and improve the travel range and working condition database. If the interference identification threshold in the database is modified, the interference identification threshold in the interference identification module needs to be modified synchronously; see Figure 7 , which is a schematic diagram of an output module execution process provided in an embodiment of the present application. After the output module outputs the Hall position and Hall speed, PID scheduling will be performed to control the direction and duty cycle output value of the motor end.
[0100] This application processes the Hall signal output by the Hall sensor through a software algorithm to calculate the current Hall speed. Comprehensively analyze the motor motion parameters in each travel interval and each working condition, as well as the fluctuation amplitude of the previous N Hall speeds, the weighted average Hall speed and other parameters, learn and optimize in a self-learning manner, obtain and calculate the maximum and minimum values of the Hall speed, the interval working condition percentage threshold, the fluctuation amplitude percentage threshold and other parameters, and then perform interference identification and elimination processing to eliminate or reduce interference and improve the accuracy and stability of motor control. In addition, through the feedback and optimization mechanism, the Hall interference identification and elimination algorithm can be continuously optimized, the control signal and filtering parameters can be adjusted, and the stability and robustness of the system can be improved. This method is also applicable to other components using Hall motors. It can be seen that the present application has the following beneficial effects:
[0101] Improve accuracy: The Hall signal output by the Hall sensor is processed through software algorithms to effectively eliminate or reduce interference and improve the accuracy of motor control;
[0102] Reduced cost: Avoids the use of additional hardware filters or sensors, reducing costs;
[0103] Easy to implement: This method does not require physical modification of the motor and Hall sensor, and is easy to implement and maintain;
[0104] Improve stability: Through learning feedback and optimization mechanism, continuously optimize the Hall interference identification and elimination algorithm, adjust the control signal and filtering parameters, and improve the stability and robustness of the system.
[0105] See also Figure 8 , Figure 8 A schematic diagram of the structure of an interference elimination device for a motor Hall sensor provided in an embodiment of the present application, the device specifically comprises:
[0106] The acquisition module 11 is used to acquire the motor motion parameters and the Hall signal in real time; wherein the Hall signal is the signal output by the motor Hall sensor;
[0107] A determination module 12, configured to determine the motor Hall speed using the Hall signal;
[0108] An identification module 13, used for identifying Hall interference according to the motor motion parameters and the motor Hall speed;
[0109] The adjustment module 14 is used to adjust the Hall speed and Hall position of the motor when Hall interference is identified.
[0110] As an optional embodiment, the identification module includes:
[0111] A first determining unit, configured to determine a motor state according to the motor motion parameter;
[0112] An identification unit is used to identify Hall interference according to the Hall speed of the motor and the interference identification threshold when the motor state is normal; wherein the interference identification threshold is a pre-set parameter value for identifying Hall interference.
[0113] As an optional embodiment, the identification unit includes:
[0114] A first comparison subunit is used to compare the motor Hall speed with the maximum Hall speed; if the motor Hall speed is greater than the maximum Hall speed, it is determined that there is positive Hall interference;
[0115] The second comparison subunit is used to compare the motor Hall speed with the minimum Hall speed; if the motor Hall speed is less than the minimum Hall speed, it is determined that negative Hall interference exists.
[0116] As an optional embodiment, the identification unit includes:
[0117] A first calculation subunit, configured to calculate a first fluctuation amplitude value by using the motor Hall speed and the historical Hall speed;
[0118] a third comparison subunit, configured to compare the first fluctuation amplitude value with the maximum fluctuation amplitude value; if the first fluctuation amplitude value is greater than the maximum fluctuation amplitude value, it is determined that positive Hall interference exists;
[0119] The fourth comparison subunit is used to compare the first fluctuation amplitude value with the minimum fluctuation amplitude value; if the first fluctuation amplitude value is smaller than the minimum fluctuation amplitude value, it is determined that negative Hall interference exists.
[0120] As an optional embodiment, the identification unit includes:
[0121] A determination subunit, for determining a weighted average Hall velocity using historical Hall velocities;
[0122] A second calculation subunit, configured to calculate a second fluctuation amplitude value according to the motor Hall velocity and the weighted average Hall velocity;
[0123] a fifth comparison subunit, configured to compare the second fluctuation amplitude value with the interval working condition maximum value; if the second fluctuation amplitude value is greater than the interval working condition maximum value, it is determined that positive Hall interference exists;
[0124] The sixth comparison subunit is used to compare the second fluctuation amplitude value with the minimum value of the interval working condition; if the second fluctuation amplitude value is smaller than the minimum value of the interval working condition, it is determined that negative Hall interference exists.
[0125] As an optional embodiment, the adjustment module includes:
[0126] The adjustment unit is used to increase the count of the Hall position by one when the Hall interference is positive Hall interference; if the Hall interference is negative Hall interference, then the count of the Hall position is reduced by one.
[0127] As an optional embodiment, the adjustment module includes:
[0128] A second determining unit, configured to determine a target Hall speed according to a historical Hall speed;
[0129] A replacing unit is used to replace the motor Hall speed with the target Hall speed.
[0130] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0131] See also Fig. 9 , Fig. 9A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device specifically includes:
[0132] The processor 21, the memory 22 and the computer program stored in the memory 22 and executable on the processor 21, the processor 21 executes the steps of the interference elimination method described in any of the above method embodiments through the computer program.
[0133] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0134] The memory 22 may include one or more computer-readable storage media, which may be non-transitory. The memory 22 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 22 is at least used to store the following computer program 221, wherein the computer program, after being loaded and executed by the processor 21, can implement the relevant steps in the interference elimination method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 22 may also include an operating system 222 and data 223, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 222 may include Windows, Unix, Linux, etc.
[0135] In some embodiments, the electronic device may further include a display screen 23 , an input / output interface 24 , a communication interface 25 , a sensor 26 , a power source 27 , and a communication bus 28 .
[0136] certainly, Fig. 9 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual applications, the electronic device may include Fig. 9 More or fewer components than shown, or combinations of certain components.
[0137] In another exemplary embodiment, a computer storage medium is also provided, and when the program instructions are executed by the processor, the steps of the interference elimination method described in any of the above method embodiments are implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0138] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0139] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0140] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for eliminating interference of a motor Hall sensor, characterized in that: include: Acquire motor motion parameters and Hall signals in real time; wherein the Hall signals are signals output by the motor Hall sensors; Determine the motor Hall speed using the Hall signal; Identify Hall interference according to the motor motion parameters and the motor Hall speed; If Hall interference is detected, the motor Hall speed and Hall position are adjusted.
2. The adjustment method according to claim 1, characterized in that: The identifying Hall interference according to the motor motion parameter and the motor Hall speed includes: Determining a motor state according to the motor motion parameters; If the motor state is normal, the Hall interference is identified according to the motor Hall speed and the interference identification threshold; wherein the interference identification threshold is a pre-set parameter value for identifying Hall interference.
3. The adjustment method according to claim 2, characterized in that: Identifying Hall interference according to the motor Hall speed and interference identification threshold includes: Compare the motor Hall speed with the maximum Hall speed; if the motor Hall speed is greater than the maximum Hall speed, determine that there is positive Hall interference; The motor Hall speed is compared with the minimum Hall speed; if the motor Hall speed is less than the minimum Hall speed, it is determined that negative Hall interference exists.
4. The adjustment method according to claim 2, characterized in that: Identifying Hall interference according to the motor Hall speed and interference identification threshold includes: Calculate a first fluctuation amplitude value by using the motor Hall speed and historical Hall speed; Comparing the first fluctuation amplitude value with the maximum fluctuation amplitude value; if the first fluctuation amplitude value is greater than the maximum fluctuation amplitude value, determining that positive Hall interference exists; The first fluctuation amplitude value is compared with the minimum fluctuation amplitude value; if the first fluctuation amplitude value is smaller than the minimum fluctuation amplitude value, it is determined that negative Hall interference exists.
5. The adjustment method according to claim 2, characterized in that: Identifying Hall interference according to the motor Hall speed and interference identification threshold includes: Determine a weighted average Hall velocity using historical Hall velocities; Calculating a second fluctuation amplitude value according to the motor Hall speed and the weighted average Hall speed; Compare the second fluctuation amplitude value with the interval working condition maximum value; if the second fluctuation amplitude value is greater than the interval working condition maximum value, it is determined that there is positive Hall interference; The second fluctuation amplitude value is compared with the minimum value of the interval working condition; if the second fluctuation amplitude value is less than the minimum value of the interval working condition, it is determined that negative Hall interference exists.
6. The adjustment method according to any one of claims 1 to 5, characterized in that: Adjust the Hall position, including If the Hall interference is positive Hall interference, the count of the Hall position is increased by one; if the Hall interference is negative Hall interference, the count of the Hall position is decreased by one.
7. The adjustment method according to any one of claims 1 to 6, characterized in that: The motor Hall speed is adjusted, including Determine the target Hall velocity based on the historical Hall velocity; The motor Hall speed is replaced by the target Hall speed.
8. An interference elimination device for a motor Hall sensor, characterized in that: include: An acquisition module is used to acquire motor motion parameters and Hall signals in real time; wherein the Hall signals are signals output by the motor Hall sensors; A determination module, used for determining the motor Hall speed using the Hall signal; An identification module, used for identifying Hall interference according to the motor motion parameters and the motor Hall speed; The adjustment module is used to adjust the Hall speed and Hall position of the motor when Hall interference is identified.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the interference elimination method described in any one of claims 1 to 7 of the present application through the computer program.
10. A computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the steps of the interference elimination method described in any one of claims 1 to 7 of the present application.