An adaptive driving method, system, and storage medium based on magnetically encoded dual signals.
By integrating ABZ and PWM signals into a fusion architecture, using dynamic weight allocation and multi-level fault compensation technology, the real-time performance and anti-interference capabilities of traditional magnetic encoder signals under high-speed and strong interference conditions are solved, thereby improving the reliability of the magnetic encoder and the continuity of motor control.
Patent Information
- Application Number
- CN202511135383.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-08-14
AI Technical Summary
Traditional magnetic encoder signals suffer from insufficient real-time performance, weak anti-interference capability, and lack of redundancy and fault tolerance mechanisms under high-speed or strong interference conditions, leading to system malfunction when sensors fail.
A dual-signal fusion architecture based on ABZ and PWM is adopted, and stable signal control is achieved through dynamic weight allocation, multi-level fault compensation and switching technology.
It improves the reliability and signal stability of the magnetic encoder under extreme operating conditions, adapts to the needs of high dynamic motor control, and avoids system loss of control caused by single signal failure.
Smart Images

Figure CN120729121B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of magnetic encoders, and more specifically, to an adaptive driving method, system, and storage medium based on magnetic encoder dual signals. Background Technology
[0002] In modern motor control systems, magnetic encoders are widely used in high-dynamic scenarios such as industrial servos, UAV ESCs, and robot joints due to their high precision and strong anti-interference capabilities. However, traditional magnetic encoder signals employ a single detection scheme, such as ABZ, SPI, or SIN / COS, which has significant drawbacks under high-speed or strong interference conditions. ABZ signals rely on hardware decoding, offering high real-time performance, but their phase difference detection and Gray code sequence analysis are low-speed verification methods, making them difficult to adapt to high-speed motors, and they lack effective compensation methods when pulses are lost or increased. SPI communication suffers from insufficient real-time performance due to protocol stack latency; SIN / COS signals, as analog quantities, are susceptible to electromagnetic interference and have high computational complexity. Furthermore, existing solutions often use a single signal path, meaning that sensor failure can lead to system malfunction and a lack of redundancy and fault tolerance mechanisms.
[0003] Therefore, there is an urgent need for a magnetic encoder signal processing scheme that combines real-time performance, anti-interference capability, and fault self-recovery capability. Summary of the Invention
[0004] In view of the above problems, the purpose of this invention is to provide an adaptive driving method, system, and storage medium based on magnetic encoder dual signals. Based on an ABZ and PWM dual-signal fusion architecture, it achieves stable signal control under high-speed conditions through dynamic weight allocation, multi-level fault compensation, and switching technology. First, control accuracy is improved through quality assessment and dynamic weight optimization. Then, a pulse-level real-time compensation algorithm is designed to solve the problems of high-speed ABZ pulse loss and PWM duty cycle jumps. Furthermore, an adaptive adjustment mechanism is introduced to determine the effectiveness of adjustments based on historical data and solidify the optimal operating parameters. This invention improves the reliability of magnetic encoders under extreme conditions, thereby adapting to the needs of high-dynamic motor control.
[0005] The first aspect of this invention provides an adaptive driving method based on magnetically encoded dual signals, the method comprising:
[0006] Based on the preset capture unit, the ABZ signal and PWM signal are acquired synchronously;
[0007] Based on the preset ABZ evaluation, the first mass coefficient and the first rotational speed are obtained according to the ABZ signal;
[0008] Based on the preset PWM evaluation, the second quality coefficient and the second rotational speed are obtained according to the PWM signal;
[0009] Calculate the deviation between the first quality coefficient and the second quality coefficient to obtain the first deviation coefficient;
[0010] Determine whether the deviation coefficient is less than a preset deviation threshold;
[0011] If so, then enter equilibrium mode;
[0012] If not, then determine whether the first quality coefficient is greater than the second quality coefficient;
[0013] If so, then enter ABZ dominant mode;
[0014] If not, then enter PWM-dominated mode;
[0015] Based on the operating mode, the first weight and the second weight are obtained. Combining the first speed and the second speed, the fused speed is obtained and output.
[0016] In this scheme, the first mass coefficient and the first rotational speed are obtained based on the preset ABZ evaluation and the ABZ signal, specifically as follows:
[0017] The first phase difference is obtained based on the rising edge time difference of the ABZ signal.
[0018] A phase score is obtained based on the difference between the first phase difference and the standard phase difference;
[0019] The number of effective pulses is obtained based on the level relationship of the ABZ signals;
[0020] The pulse continuity score is obtained based on the ratio of the effective pulse number to the theoretical pulse number.
[0021] The first rotational speed is obtained based on the frequency of the ABZ signal;
[0022] The first speed score is obtained based on the deviation between the first speed and the preset open-loop speed.
[0023] Based on the preset ABZ weighted fusion algorithm, the first quality coefficient is obtained according to the phase score, the pulse continuity score and the first rotational speed score.
[0024] In this scheme, the step of obtaining the second quality coefficient and the second speed based on the preset PWM evaluation and the PWM signal is specifically as follows:
[0025] Calculate the frequency mean square error of the PWM signal to obtain a frequency stability score;
[0026] Calculate the mean square error of the duty cycle of the PWM signal to obtain the duty cycle jitter score;
[0027] Based on the preset number of magnetic pole pairs, the second rotational speed is obtained according to the PWM signal;
[0028] The second speed score is obtained based on the deviation between the second speed and the preset open-loop speed;
[0029] Based on a preset PWM weighted fusion algorithm, a second quality coefficient is obtained according to the frequency stability score, the duty cycle jitter score, and the second rotational speed score.
[0030] In this scheme, the first weight and the second weight are obtained according to the operating mode, and the fused speed is obtained and output by combining the first speed and the second speed. Specifically:
[0031] When the system is determined to be in equilibrium mode, the first weight is set according to the preset first reference weight.
[0032] If the mode is determined to be ABZ dominant, the first weight is set according to the preset second reference weight.
[0033] If the mode is determined to be PWM dominant, the first weight is set according to the preset third reference weight.
[0034] The second weight is obtained based on the first weight and the preset standard weight;
[0035] Calculate the product of the first weight and the first rotational speed, and then add the product of the second weight and the second rotational speed to obtain the fused rotational speed.
[0036] This plan also includes:
[0037] Determine whether the difference between the first phase difference and the standard phase difference is higher than a preset phase difference threshold;
[0038] If so, then adjust the first weight and the second weight according to the preset fourth reference weight;
[0039] Configure the ABZ signal as steering mode.
[0040] This plan also includes:
[0041] Determine whether the duty cycle mean square error is higher than a preset duty cycle mean square error threshold;
[0042] If so, then adjust the first weight and the second weight according to the preset fourth reference weight;
[0043] Record the PWM signal and analyze the fault characteristics.
[0044] A second aspect of the present invention provides an adaptive driving system based on magnetically encoded dual signals, including an adaptive driving method program based on magnetically encoded dual signals, wherein the adaptive driving method program based on magnetically encoded dual signals, when executed by the processor, implements the following steps:
[0045] Based on the preset capture unit, the ABZ signal and PWM signal are acquired synchronously;
[0046] Based on the preset ABZ evaluation, the first mass coefficient and the first rotational speed are obtained according to the ABZ signal;
[0047] Based on the preset PWM evaluation, the second quality coefficient and the second rotational speed are obtained according to the PWM signal;
[0048] Calculate the deviation between the first quality coefficient and the second quality coefficient to obtain the first deviation coefficient;
[0049] Determine whether the deviation coefficient is less than a preset deviation threshold;
[0050] If so, then enter equilibrium mode;
[0051] If not, then determine whether the first quality coefficient is greater than the second quality coefficient;
[0052] If so, then enter ABZ dominant mode;
[0053] If not, then enter PWM-dominated mode;
[0054] Based on the operating mode, the first weight and the second weight are obtained. Combining the first speed and the second speed, the fused speed is obtained and output.
[0055] In this scheme, the first mass coefficient and the first rotational speed are obtained based on the preset ABZ evaluation and the ABZ signal, specifically as follows:
[0056] The first phase difference is obtained based on the rising edge time difference of the ABZ signal.
[0057] A phase score is obtained based on the difference between the first phase difference and the standard phase difference;
[0058] The number of effective pulses is obtained based on the level relationship of the ABZ signals;
[0059] The pulse continuity score is obtained based on the ratio of the effective pulse number to the theoretical pulse number.
[0060] The first rotational speed is obtained based on the frequency of the ABZ signal;
[0061] The first speed score is obtained based on the deviation between the first speed and the preset open-loop speed.
[0062] Based on the preset ABZ weighted fusion algorithm, the first quality coefficient is obtained according to the phase score, the pulse continuity score and the first rotational speed score.
[0063] In this scheme, the step of obtaining the second quality coefficient and the second speed based on the preset PWM evaluation and the PWM signal is specifically as follows:
[0064] Calculate the frequency mean square error of the PWM signal to obtain a frequency stability score;
[0065] Calculate the mean square error of the duty cycle of the PWM signal to obtain the duty cycle jitter score;
[0066] Based on the preset number of magnetic pole pairs, the second rotational speed is obtained according to the PWM signal;
[0067] The second speed score is obtained based on the deviation between the second speed and the preset open-loop speed;
[0068] Based on a preset PWM weighted fusion algorithm, a second quality coefficient is obtained according to the frequency stability score, the duty cycle jitter score, and the second rotational speed score.
[0069] A third aspect of the present invention provides a computer-readable storage medium comprising an adaptive driving method program based on magnetically encoded dual signals, wherein when the adaptive driving method program based on magnetically encoded dual signals is executed by a processor, it implements the steps of the adaptive driving method based on magnetically encoded dual signals as described in any of the preceding claims.
[0070] This invention provides an adaptive driving method, system, and storage medium based on magnetic encoder dual signals. It proposes a dual-signal fusion architecture of ABZ and PWM based on a magnetic encoder. First, ABZ and PWM signals are acquired synchronously. The quality of the ABZ signal is quantified by phase consistency, pulse continuity, and speed deviation, while the quality of the PWM signal is quantified by frequency stability, duty cycle jitter intensity, and speed deviation. Then, dynamic weighted fusion decision-making is adopted, automatically selecting an equalization mode, ABZ-dominant mode, or PWM-dominant mode based on the quality coefficient deviation, achieving adaptive weight switching. Finally, the fused speed is output according to the adaptive weights. Furthermore, multi-level fault compensation is included to improve output accuracy. Under high-speed and strong interference conditions, the signal failure response time is shortened, and the continuity of motor control is improved, thus adapting to the needs of high-dynamic motor control. Attached Figure Description
[0071] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope.
[0072] Figure 1 A flowchart of an adaptive driving method based on magnetically encoded dual signals according to the present invention is shown;
[0073] Figure 2 A flowchart illustrating an ABZ signal quality evaluation method provided by an embodiment of the present invention is shown.
[0074] Figure 3 A flowchart illustrating a PWM signal quality evaluation method provided by an embodiment of the present invention is shown.
[0075] Figure 4 A block diagram of an adaptive driving system based on magnetically encoded dual signals according to the present invention is shown. Detailed Implementation
[0076] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0077] Unless otherwise defined, all terms (including technical and scientific terms) used in embodiments of this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in a common dictionary should be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and not as being interpreted in an idealized or highly formalized sense, unless expressly defined in this embodiment of the invention.
[0078] The terms "first," "second," and similar words used in the embodiments of this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "an," "a," or "the" do not indicate a quantity limitation, but rather indicate the presence of at least one. Similarly, terms such as "including" or "comprising" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The steps preceding or following the steps in the method of the embodiments of this invention are not necessarily performed precisely in sequence. Instead, various steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes.
[0079] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0080] Figure 1 A flowchart of an adaptive driving method based on magnetically encoded dual signals according to the present invention is shown.
[0081] like Figure 1 As shown, the first aspect of this invention discloses an adaptive driving method based on magnetically encoded dual signals, the method comprising:
[0082] S102, based on a preset capture unit, synchronously acquires ABZ signal and PWM signal;
[0083] S104, based on the preset ABZ evaluation, obtain the first mass coefficient and the first rotational speed according to the ABZ signal;
[0084] S106, Based on the preset PWM evaluation, the second quality coefficient and the second rotational speed are obtained according to the PWM signal;
[0085] S108, calculate the deviation between the first quality coefficient and the second quality coefficient to obtain the first deviation coefficient;
[0086] S110, determine whether the deviation coefficient is less than a preset deviation threshold;
[0087] S112, if so, then enter the equilibrium mode;
[0088] S114, if not, determine whether the first quality coefficient is greater than the second quality coefficient;
[0089] S116, if so, then enter ABZ dominant mode;
[0090] S118, if not, then enter PWM dominant mode;
[0091] S120: Based on the operating mode, obtain the first weight and the second weight, combine the first speed and the second speed to obtain and output the fused speed.
[0092] It should be noted that the ABZ signal is the level signal of phase A and phase B output by the magnetic encoder; the PWM signal is the speed pulse signal output by the magnetic encoder; the first quality coefficient represents the reliability of the ABZ signal; the second quality coefficient represents the reliability of the PWM signal; the first speed represents the speed calculated from the ABZ signal; and the second speed represents the speed calculated from the PWM signal.
[0093] In this embodiment, the ABZ quadrature pulse signal, i.e., the timing of the A / B phase edge transition level and the PWM period signal, is synchronously acquired by the hardware acquisition unit of the microcontroller. A three-dimensional evaluation is performed on the ABZ signal: a phase consistency score is calculated by detecting the rise time difference of the A / B phases; a pulse continuity score is generated by statistically analyzing the ratio of the actual effective pulse number to the theoretical pulse number; and a speed deviation score is obtained by inferring the rotational speed from the pulse frequency of the A / B phase signals and comparing it with the open-loop speed. The three indicators are weighted and fused to output the first quality coefficient. Simultaneously, frequency stability analysis and duty cycle jitter analysis are performed on the PWM signal, and the deviation value of the speed inferred from the PWM is combined to generate a second quality coefficient. The absolute deviation between the two quality coefficients is then calculated. If the deviation is below a threshold, the system enters an equalization mode; otherwise, the high-quality signal-dominated mode is selected, either the ABZ-dominated mode or the PWM-dominated mode. Based on the corresponding operating mode, a corresponding first weight α and second weight β are configured. The speed calculated from the ABZ signal and the speed calculated from the PWM signal are weighted, fused, and output to drive the motor control module. This embodiment employs a dual-signal redundancy design, automatically switching to the dominant mode in the event of a single-channel failure to avoid control interruption. Furthermore, the quality coefficient incorporates multiple dimensions of indicators, ensuring the selection of a reliable signal source even under electromagnetic interference conditions. This embodiment improves the reliability of the magnetic encoder under extreme operating conditions, thus meeting the requirements of high-dynamic motor control.
[0094] Figure 2 A flowchart illustrating an ABZ signal quality evaluation method provided by an embodiment of the present invention is shown.
[0095] According to embodiments of the present invention, such as Figure 2 As shown, the first mass coefficient and the first rotational speed are obtained based on the preset ABZ evaluation and the ABZ signal, specifically as follows:
[0096] S202, the first phase difference is obtained based on the rising edge time difference of the ABZ signal;
[0097] S204, obtain a phase score based on the difference between the first phase difference and the standard phase difference;
[0098] S206, Based on the level relationship of the ABZ signals, the number of effective pulses is obtained;
[0099] S208, Based on the ratio of the effective pulse number to the theoretical pulse number, a pulse continuity score is obtained;
[0100] S210, the first rotational speed is obtained based on the frequency of the ABZ signal;
[0101] S212, Based on the deviation between the first rotational speed and the preset open-loop rotational speed, a first rotational speed score is obtained;
[0102] S214, based on the preset ABZ weighted fusion algorithm, the first quality coefficient is obtained according to the phase score, the pulse continuity score and the first rotational speed score.
[0103] This embodiment provides an ABZ signal quality evaluation process, specifically as follows:
[0104] Based on the ABZ signal, the first phase difference, the number of effective pulses, and the first rotational speed are obtained;
[0105] A phase score is obtained based on the difference between the first phase difference and the standard phase difference;
[0106] The pulse continuity score is obtained based on the ratio of the effective pulse number to the theoretical pulse number.
[0107] The first speed score is obtained based on the deviation between the first speed and the preset open-loop speed.
[0108] The first quality coefficient is obtained based on the preset ABZ weighted fusion algorithm.
[0109] It should be noted that the first phase difference is the deviation of the phase angle between phase A and phase B; the number of consecutive effective pulses is the number of pulses in which the levels of phase A and phase B are orthogonal. In this embodiment, firstly, the phase difference of the ABZ signal is detected. The rising edge timestamps of phase A and phase B are captured, the actual phase angle is calculated, and it is compared with the standard 90° phase difference to obtain a deviation score, where the smaller the deviation, the higher the score. Next, the ABZ signal is checked for pulse integrity. The theoretical number of pulses is calculated based on the open-loop speed and the number of pole pairs, and compared with the actual number of captured pulses. A continuity score is generated according to the missing proportion, where the fewer the missing pulses, the higher the score. At the same time, the real-time speed is calculated by the number of ABZ pulses per unit time, and the deviation rate is calculated with the preset open-loop speed to obtain the speed score, where the smaller the deviation, the higher the score. The three sets of scores are linearly superimposed according to preset weights. As one implementation method, the phase weight is 0.4, the continuity weight is 0.4, and the speed consistency weight is 0.2; then normalized to a first quality coefficient in the range of [0,1]. This embodiment covers the core fault dimensions of signal distortion, pulse loss, and abnormal speed, and the weight ratio can be dynamically configured according to the motor operating conditions.
[0110] Figure 3 A flowchart illustrating an evaluation process for PWM signal quality provided by an embodiment of the present invention is shown.
[0111] According to embodiments of the present invention, such as Figure 3 As shown, the second quality coefficient and second speed are obtained based on the preset PWM evaluation and the PWM signal, specifically as follows:
[0112] S302, Calculate the frequency mean square error of the PWM signal to obtain a frequency stability score;
[0113] S304, Calculate the duty cycle mean square error of the PWM signal to obtain the duty cycle jitter score;
[0114] S306, based on a preset number of magnetic pole pairs, the second rotational speed is obtained according to the PWM signal;
[0115] S308, Based on the deviation between the second rotational speed and the preset open-loop rotational speed, a second rotational speed score is obtained;
[0116] S310, based on a preset PWM weighted fusion algorithm, obtains a second quality coefficient according to the frequency stability score, the duty cycle jitter score and the second rotational speed score.
[0117] It should be noted that in this embodiment, the frequency stability of the PWM signal is first analyzed by recording the frequency values of several consecutive PWM cycles, calculating their mean square error, and mapping it to a score, where a smaller variance results in a higher score. Secondly, the duty cycle of the PWM signal is analyzed for jitter by recording the duty cycle values of several consecutive PWM cycles, calculating the mean square error, and converting it into a stability score, where a smaller jitter results in a higher score. Subsequently, the rotational speed is inversely calculated based on the PWM frequency and a preset pole pair, and the deviation rate between this rotational speed and the open-loop rotational speed is calculated to generate a speed consistency score, where a lower deviation rate results in a higher score. The three scores are linearly superimposed according to preset weights. As one implementation method, the frequency stability weight is 0.6, the duty cycle jitter weight is 0.6, and the speed consistency weight is 0.2; these are then normalized to a second quality coefficient within the range of [0,1]. This embodiment is used to identify latent faults such as duty cycle distortion caused by power supply fluctuations and duty cycle jumps caused by electromagnetic interference, and the pole pair factor allows the scheme to adapt to different motor models.
[0118] According to an embodiment of the present invention, the step of obtaining a first weight and a second weight based on the operating mode, and combining the first speed and the second speed to obtain and output the fused speed specifically involves:
[0119] When the system is determined to be in equilibrium mode, the first weight is set according to the preset first reference weight.
[0120] If the mode is determined to be ABZ dominant, the first weight is set according to the preset second reference weight.
[0121] If the mode is determined to be PWM dominant, the first weight is set according to the preset third reference weight.
[0122] The second weight is obtained based on the first weight and the preset standard weight;
[0123] Calculate the product of the first weight and the first rotational speed, and then add the product of the second weight and the second rotational speed to obtain the fused rotational speed.
[0124] It should be noted that this embodiment provides three decision-making modes, operating according to the corresponding working mode based on the quality coefficient deviation results. The balanced mode command triggers equal weight allocation, where the first reference weight is set to 0.5 by default (i.e., the first weight α is set to 0.5, and the second weight β is set to 0.5). The ABZ-dominant mode command sets a high ABZ weight, where the second reference weight is set to 0.8 by default (i.e., the first weight α is set to 0.8, and the second weight β is set to 0.2). The PWM-dominant mode command sets a high PWM weight, where the third reference weight is set to 0.2 by default (i.e., the first weight α is set to 0.2, and the second weight β is set to 0.8). The weight allocation follows the constraint principle of α+β=1.0 to ensure that the fusion result has no gain distortion. The fusion execution module reads the real-time speed calculated by the ABZ channel and the reverse-engineered speed from the PWM channel, performs a weighted sum according to the weight coefficients, obtains the fused speed, and outputs it to the motor drive unit. Furthermore, when switching modes, an S-curve gradual adjustment algorithm is used to adjust the weights to avoid torque fluctuations caused by speed jumps.
[0125] According to an embodiment of the present invention, it further includes:
[0126] Determine whether the difference between the first phase difference and the standard phase difference is higher than a preset phase difference threshold;
[0127] If so, then adjust the first weight and the second weight according to the preset fourth reference weight;
[0128] Configure the ABZ signal as steering mode.
[0129] It should be noted that this embodiment provides a phase distortion compensation mechanism. During ABZ signal processing, the phase difference between phases A and B is monitored in real time. As one implementation method, when the detected phase offset continuously exceeds a 15° threshold, the compensation process is immediately initiated. First, the first weight α of the ABZ signal is forcibly reduced to below 0.1, while the second weight β of the PWM signal is simultaneously increased to above 0.9. Then, the ABZ signal function is downgraded to a dedicated channel for rotation direction detection; finally, the phase anomaly event code is recorded and uploaded to the diagnostic system. The entire process is completed within a preset time to avoid phase distortion contaminating the fusion results. After downgrading, the system retains basic steering control capabilities, providing a buffer time for subsequent maintenance.
[0130] According to an embodiment of the present invention, it further includes:
[0131] Determine whether the duty cycle mean square error is higher than a preset duty cycle mean square error threshold;
[0132] If so, then adjust the first weight and the second weight according to the preset fourth reference weight;
[0133] Record the PWM signal and analyze the fault characteristics.
[0134] It should be noted that this embodiment provides a duty cycle anomaly compensation mechanism. During PWM signal processing, the mean square error of the duty cycle is continuously calculated. As one implementation method, when the mean square error exceeds a 5% threshold, it is determined to be an abnormal duty cycle disturbance, and a protection strategy is immediately activated. First, the first weight α of the ABZ signal is forcibly reduced to above 0.9, and the second weight β of the PWM signal is simultaneously increased to below 0.1. Second, the current PWM signal is marked as an untrusted data source; at the same time, a reference waveform is generated based on historical normal PWM parameters for fault characteristic analysis. Abnormal duty cycles are common in power supply fluctuations, and this embodiment can avoid such risks.
[0135] It is worth mentioning that it also includes:
[0136] Calculate the ratio of the effective pulse count to the theoretical pulse count to obtain pulse ratio information;
[0137] Determine whether the pulse ratio information is lower than a preset pulse ratio threshold;
[0138] If so, the first virtual pulse is obtained based on the period of the PWM signal and the number of magnetic pole pairs;
[0139] Based on the first virtual pulse, the ABZ signal is inserted to compensate.
[0140] It should be noted that this embodiment provides a compensation method based on virtual pulses. By monitoring the effective pulse count and theoretical pulse count of the ABZ signal in real time, the pulse ratio information is calculated to obtain the pulse missing rate; the higher the pulse ratio information, the lower the pulse missing rate. As one implementation method, when the pulse missing rate is detected to be greater than 10%, virtual pulse compensation is triggered. First, the theoretical pulse interval time is calculated based on the PWM signal period; second, the rising edge positions of the A / B phases of the ABZ signal are compared to determine the location of the missing pulse; then, virtual edge events are inserted in the hardware capture unit; finally, a pulse sequence is generated and seamlessly injected into the original ABZ signal stream. After compensation, the pulse counter is automatically corrected, improving the adaptability of the ABZ signal under high-speed conditions.
[0141] It is worth mentioning that it also includes:
[0142] Calculate the difference between the first rotational speed and the second rotational speed to obtain the first rotational speed difference;
[0143] Calculate the ratio of the first speed difference to the preset open-loop speed to obtain the first speed deviation ratio;
[0144] Determine whether the first speed deviation ratio exceeds a preset first deviation ratio threshold;
[0145] If so, then enter the motor open-loop control mode;
[0146] If not, then maintain the motor closed-loop control mode.
[0147] It should be noted that this embodiment provides a speed conflict arbitration mechanism. Based on the ABZ speed and PWM speed continuously calculated using dual signal channels, the absolute deviation between the two speeds is calculated. As one implementation, when the deviation value is greater than 10% of the open-loop speed for five consecutive cycles, it is determined to be a dual-signal conflict, and the arbitration process is executed. The system immediately switches to open-loop control mode, calls the pre-stored speed mapping table to drive the motor, and simultaneously limits the output power to within a 70% safety threshold. Furthermore, a fault code for the dual-signal speed conflict is generated and uploaded to the cloud diagnostic platform; a fault root cause analysis program is started in the background to locate the faulty sensor or circuit board module based on historical data. The arbitration process preserves the basic operating capability of the motor to prevent system crashes.
[0148] It is worth mentioning that it also includes:
[0149] The second speed deviation ratio is obtained based on the deviation between the fusion speed and the open-loop speed;
[0150] Determine whether the second speed deviation ratio exceeds the preset second deviation ratio threshold;
[0151] If so, adjust the first and second weights, and calculate the optimization index based on the adjusted second speed deviation ratio;
[0152] If the optimization index exceeds a preset index threshold, then a first reference weight, a second reference weight, or a third reference weight is set according to the first weight.
[0153] It should be noted that this embodiment provides a reference weight adaptive optimization mechanism. During motor operation, the deviation rate between the fused speed and the open-loop speed is compared in real time. When the deviation rate continues to exceed the limit, the reference weight adaptive optimization mechanism is activated. By fine-tuning the current first weight α and second weight β, for example, increasing α by 0.05 and decreasing β by 0.05, the change in the deviation rate after adjustment is monitored. Based on the change in the deviation rate, an optimization index is calculated. If the optimization index is greater than the optimization index threshold, the adjustment is deemed effective, and the new weight value is written into the reference weight library of the corresponding mode. For example, in the ABZ dominant mode, the first reference weight is updated from 0.8 to 0.85. This embodiment optimizes the weight strategy based on historical data to adapt to equipment aging.
[0154] Figure 4 A block diagram of an adaptive driving system based on magnetically encoded dual signals according to the present invention is shown.
[0155] like Figure 4 As shown, the second aspect of the present invention discloses an adaptive driving system 4 based on magnetically encoded dual signals, including a memory 41 and a processor 42. The memory includes an adaptive driving method program based on magnetically encoded dual signals. When the processor executes the adaptive driving method program based on magnetically encoded dual signals, it performs the following steps:
[0156] Based on the preset capture unit, the ABZ signal and PWM signal are acquired synchronously;
[0157] Based on the preset ABZ evaluation, the first mass coefficient and the first rotational speed are obtained according to the ABZ signal;
[0158] Based on the preset PWM evaluation, the second quality coefficient and the second rotational speed are obtained according to the PWM signal;
[0159] Calculate the deviation between the first quality coefficient and the second quality coefficient to obtain the first deviation coefficient;
[0160] Determine whether the deviation coefficient is less than a preset deviation threshold;
[0161] If so, then enter equilibrium mode;
[0162] If not, then determine whether the first quality coefficient is greater than the second quality coefficient;
[0163] If so, then enter ABZ dominant mode;
[0164] If not, then enter PWM-dominated mode;
[0165] Based on the operating mode, the first weight and the second weight are obtained. Combining the first speed and the second speed, the fused speed is obtained and output.
[0166] It should be noted that the ABZ signal is the level signal of phase A and phase B output by the magnetic encoder; the PWM signal is the speed pulse signal output by the magnetic encoder; the first quality coefficient represents the reliability of the ABZ signal; the second quality coefficient represents the reliability of the PWM signal; the first speed represents the speed calculated from the ABZ signal; and the second speed represents the speed calculated from the PWM signal.
[0167] In this embodiment, the ABZ quadrature pulse signal, i.e., the timing of the A / B phase edge transition level and the PWM period signal, is synchronously acquired by the hardware acquisition unit of the microcontroller. A three-dimensional evaluation is performed on the ABZ signal: a phase consistency score is calculated by detecting the rise time difference of the A / B phases; a pulse continuity score is generated by statistically analyzing the ratio of the actual effective pulse number to the theoretical pulse number; and a speed deviation score is obtained by inferring the rotational speed from the pulse frequency of the A / B phase signals and comparing it with the open-loop speed. The three indicators are weighted and fused to output the first quality coefficient. Simultaneously, frequency stability analysis and duty cycle jitter analysis are performed on the PWM signal, and the deviation value of the speed inferred from the PWM is combined to generate a second quality coefficient. The absolute deviation between the two quality coefficients is then calculated. If the deviation is below a threshold, the system enters an equalization mode; otherwise, the high-quality signal-dominated mode is selected, either the ABZ-dominated mode or the PWM-dominated mode. Based on the corresponding operating mode, a corresponding first weight α and second weight β are configured. The speed calculated from the ABZ signal and the speed calculated from the PWM signal are weighted, fused, and output to drive the motor control module. This embodiment employs a dual-signal redundancy design, automatically switching to the dominant mode in the event of a single-channel failure to avoid control interruption. Furthermore, the quality coefficient incorporates multiple dimensions of indicators, ensuring the selection of a reliable signal source even under electromagnetic interference conditions. This embodiment improves the reliability of the magnetic encoder under extreme operating conditions, thus meeting the requirements of high-dynamic motor control.
[0168] According to an embodiment of the present invention, the step of obtaining a first mass coefficient and a first rotational speed based on a preset ABZ evaluation and the ABZ signal specifically involves:
[0169] The first phase difference is obtained based on the rising edge time difference of the ABZ signal.
[0170] A phase score is obtained based on the difference between the first phase difference and the standard phase difference;
[0171] The number of effective pulses is obtained based on the level relationship of the ABZ signals;
[0172] The pulse continuity score is obtained based on the ratio of the effective pulse number to the theoretical pulse number.
[0173] The first rotational speed is obtained based on the frequency of the ABZ signal;
[0174] The first speed score is obtained based on the deviation between the first speed and the preset open-loop speed.
[0175] Based on the preset ABZ weighted fusion algorithm, the first quality coefficient is obtained according to the phase score, the pulse continuity score and the first rotational speed score.
[0176] This embodiment provides an ABZ signal quality evaluation process, specifically as follows:
[0177] Based on the ABZ signal, the first phase difference, the number of effective pulses, and the first rotational speed are obtained;
[0178] A phase score is obtained based on the difference between the first phase difference and the standard phase difference;
[0179] The pulse continuity score is obtained based on the ratio of the effective pulse number to the theoretical pulse number.
[0180] The first speed score is obtained based on the deviation between the first speed and the preset open-loop speed.
[0181] The first quality coefficient is obtained based on the preset ABZ weighted fusion algorithm.
[0182] It should be noted that the first phase difference is the deviation of the phase angle between phase A and phase B; the number of consecutive effective pulses is the number of pulses in which the levels of phase A and phase B are orthogonal. In this embodiment, firstly, the phase difference of the ABZ signal is detected. The rising edge timestamps of phase A and phase B are captured, the actual phase angle is calculated, and it is compared with the standard 90° phase difference to obtain a deviation score, where the smaller the deviation, the higher the score. Next, the ABZ signal is checked for pulse integrity. The theoretical number of pulses is calculated based on the open-loop speed and the number of pole pairs, and compared with the actual number of captured pulses. A continuity score is generated according to the missing proportion, where the fewer the missing pulses, the higher the score. At the same time, the real-time speed is calculated by the number of ABZ pulses per unit time, and the deviation rate is calculated with the preset open-loop speed to obtain the speed score, where the smaller the deviation, the higher the score. The three sets of scores are linearly superimposed according to preset weights. As one implementation method, the phase weight is 0.4, the continuity weight is 0.4, and the speed consistency weight is 0.2; then normalized to a first quality coefficient in the range of [0,1]. This embodiment covers the core fault dimensions of signal distortion, pulse loss, and abnormal speed, and the weight ratio can be dynamically configured according to the motor operating conditions.
[0183] According to an embodiment of the present invention, the step of obtaining the second quality coefficient and the second speed based on the preset PWM evaluation and the PWM signal specifically involves:
[0184] Calculate the frequency mean square error of the PWM signal to obtain a frequency stability score;
[0185] Calculate the mean square error of the duty cycle of the PWM signal to obtain the duty cycle jitter score;
[0186] Based on the preset number of magnetic pole pairs, the second rotational speed is obtained according to the PWM signal;
[0187] The second speed score is obtained based on the deviation between the second speed and the preset open-loop speed;
[0188] Based on a preset PWM weighted fusion algorithm, a second quality coefficient is obtained according to the frequency stability score, the duty cycle jitter score, and the second rotational speed score.
[0189] It should be noted that in this embodiment, the frequency stability of the PWM signal is first analyzed by recording the frequency values of several consecutive PWM cycles, calculating their mean square error, and mapping it to a score, where a smaller variance results in a higher score. Secondly, the duty cycle of the PWM signal is analyzed for jitter by recording the duty cycle values of several consecutive PWM cycles, calculating the mean square error, and converting it into a stability score, where a smaller jitter results in a higher score. Subsequently, the rotational speed is inversely calculated based on the PWM frequency and a preset pole pair, and the deviation rate between this rotational speed and the open-loop rotational speed is calculated to generate a speed consistency score, where a lower deviation rate results in a higher score. The three scores are linearly superimposed according to preset weights. As one implementation method, the frequency stability weight is 0.6, the duty cycle jitter weight is 0.6, and the speed consistency weight is 0.2; these are then normalized to a second quality coefficient within the range of [0,1]. This embodiment is used to identify latent faults such as duty cycle distortion caused by power supply fluctuations and duty cycle jumps caused by electromagnetic interference, and the pole pair factor allows the scheme to adapt to different motor models.
[0190] According to an embodiment of the present invention, the step of obtaining a first weight and a second weight based on the operating mode, and combining the first speed and the second speed to obtain and output the fused speed specifically involves:
[0191] When the system is determined to be in equilibrium mode, the first weight is set according to the preset first reference weight.
[0192] If the mode is determined to be ABZ dominant, the first weight is set according to the preset second reference weight.
[0193] If the mode is determined to be PWM dominant, the first weight is set according to the preset third reference weight.
[0194] The second weight is obtained based on the first weight and the preset standard weight;
[0195] Calculate the product of the first weight and the first rotational speed, and then add the product of the second weight and the second rotational speed to obtain the fused rotational speed.
[0196] It should be noted that this embodiment provides three decision-making modes, operating according to the corresponding working mode based on the quality coefficient deviation results. The balanced mode command triggers equal weight allocation, where the first reference weight is set to 0.5 by default (i.e., the first weight α is set to 0.5, and the second weight β is set to 0.5). The ABZ-dominant mode command sets a high ABZ weight, where the second reference weight is set to 0.8 by default (i.e., the first weight α is set to 0.8, and the second weight β is set to 0.2). The PWM-dominant mode command sets a high PWM weight, where the third reference weight is set to 0.2 by default (i.e., the first weight α is set to 0.2, and the second weight β is set to 0.8). The weight allocation follows the constraint principle of α+β=1.0 to ensure that the fusion result has no gain distortion. The fusion execution module reads the real-time speed calculated by the ABZ channel and the reverse-engineered speed from the PWM channel, performs a weighted sum according to the weight coefficients, obtains the fused speed, and outputs it to the motor drive unit. Furthermore, when switching modes, an S-curve gradual adjustment algorithm is used to adjust the weights to avoid torque fluctuations caused by speed jumps.
[0197] According to an embodiment of the present invention, it further includes:
[0198] Determine whether the difference between the first phase difference and the standard phase difference is higher than a preset phase difference threshold;
[0199] If so, then adjust the first weight and the second weight according to the preset fourth reference weight;
[0200] Configure the ABZ signal as steering mode.
[0201] It should be noted that this embodiment provides a phase distortion compensation mechanism. During ABZ signal processing, the phase difference between phases A and B is monitored in real time. As one implementation method, when the detected phase offset continuously exceeds a 15° threshold, the compensation process is immediately initiated. First, the first weight α of the ABZ signal is forcibly reduced to below 0.1, while the second weight β of the PWM signal is simultaneously increased to above 0.9. Then, the ABZ signal function is downgraded to a dedicated channel for rotation direction detection; finally, the phase anomaly event code is recorded and uploaded to the diagnostic system. The entire process is completed within a preset time to avoid phase distortion contaminating the fusion results. After downgrading, the system retains basic steering control capabilities, providing a buffer time for subsequent maintenance.
[0202] According to an embodiment of the present invention, it further includes:
[0203] Determine whether the duty cycle mean square error is higher than a preset duty cycle mean square error threshold;
[0204] If so, then adjust the first weight and the second weight according to the preset fourth reference weight;
[0205] Record the PWM signal and analyze the fault characteristics.
[0206] It should be noted that this embodiment provides a duty cycle anomaly compensation mechanism. During PWM signal processing, the mean square error of the duty cycle is continuously calculated. As one implementation method, when the mean square error exceeds a 5% threshold, it is determined to be an abnormal duty cycle disturbance, and a protection strategy is immediately activated. First, the first weight α of the ABZ signal is forcibly reduced to above 0.9, and the second weight β of the PWM signal is simultaneously increased to below 0.1. Second, the current PWM signal is marked as an untrusted data source; at the same time, a reference waveform is generated based on historical normal PWM parameters for fault characteristic analysis. Abnormal duty cycles are common in power supply fluctuations, and this embodiment can avoid such risks.
[0207] It is worth mentioning that it also includes:
[0208] Calculate the ratio of the effective pulse count to the theoretical pulse count to obtain pulse ratio information;
[0209] Determine whether the pulse ratio information is lower than a preset pulse ratio threshold;
[0210] If so, the first virtual pulse is obtained based on the period of the PWM signal and the number of magnetic pole pairs;
[0211] Based on the first virtual pulse, the ABZ signal is inserted to compensate.
[0212] It should be noted that this embodiment provides a compensation method based on virtual pulses. By monitoring the effective pulse count and theoretical pulse count of the ABZ signal in real time, the pulse ratio information is calculated to obtain the pulse missing rate; the higher the pulse ratio information, the lower the pulse missing rate. As one implementation method, when the pulse missing rate is detected to be greater than 10%, virtual pulse compensation is triggered. First, the theoretical pulse interval time is calculated based on the PWM signal period; second, the rising edge positions of the A / B phases of the ABZ signal are compared to determine the location of the missing pulse; then, virtual edge events are inserted in the hardware capture unit; finally, a pulse sequence is generated and seamlessly injected into the original ABZ signal stream. After compensation, the pulse counter is automatically corrected, improving the adaptability of the ABZ signal under high-speed conditions.
[0213] It is worth mentioning that it also includes:
[0214] Calculate the difference between the first rotational speed and the second rotational speed to obtain the first rotational speed difference;
[0215] Calculate the ratio of the first speed difference to the preset open-loop speed to obtain the first speed deviation ratio;
[0216] Determine whether the first speed deviation ratio exceeds a preset first deviation ratio threshold;
[0217] If so, then enter the motor open-loop control mode;
[0218] If not, then maintain the motor closed-loop control mode.
[0219] It should be noted that this embodiment provides a speed conflict arbitration mechanism. Based on the ABZ speed and PWM speed continuously calculated using dual signal channels, the absolute deviation between the two speeds is calculated. As one implementation, when the deviation value is greater than 10% of the open-loop speed for five consecutive cycles, it is determined to be a dual-signal conflict, and the arbitration process is executed. The system immediately switches to open-loop control mode, calls the pre-stored speed mapping table to drive the motor, and simultaneously limits the output power to within a 70% safety threshold. Furthermore, a fault code for the dual-signal speed conflict is generated and uploaded to the cloud diagnostic platform; a fault root cause analysis program is started in the background to locate the faulty sensor or circuit board module based on historical data. The arbitration process preserves the basic operating capability of the motor to prevent system crashes.
[0220] It is worth mentioning that it also includes:
[0221] The second speed deviation ratio is obtained based on the deviation between the fusion speed and the open-loop speed;
[0222] Determine whether the second speed deviation ratio exceeds the preset second deviation ratio threshold;
[0223] If so, adjust the first and second weights, and calculate the optimization index based on the adjusted second speed deviation ratio;
[0224] If the optimization index exceeds a preset index threshold, then a first reference weight, a second reference weight, or a third reference weight is set according to the first weight.
[0225] It should be noted that this embodiment provides a reference weight adaptive optimization mechanism. During motor operation, the deviation rate between the fused speed and the open-loop speed is compared in real time. When the deviation rate continues to exceed the limit, the reference weight adaptive optimization mechanism is activated. By fine-tuning the current first weight α and second weight β, for example, increasing α by 0.05 and decreasing β by 0.05, the change in the deviation rate after adjustment is monitored. Based on the change in the deviation rate, an optimization index is calculated. If the optimization index is greater than the optimization index threshold, the adjustment is deemed effective, and the new weight value is written into the reference weight library of the corresponding mode. For example, in the ABZ dominant mode, the first reference weight is updated from 0.8 to 0.85. This embodiment optimizes the weight strategy based on historical data to adapt to equipment aging.
[0226] A third aspect of the present invention provides a computer-readable storage medium comprising an adaptive driving method program based on magnetically encoded dual signals, wherein when the adaptive driving method program based on magnetically encoded dual signals is executed by a processor, it implements the steps of the adaptive driving method based on magnetically encoded dual signals as described in any of the preceding claims.
[0227] In summary, this invention provides an adaptive driving method, system, and storage medium based on magnetic encoder dual signals. It proposes a dual-signal fusion architecture based on magnetic encoders for ABZ and PWM signals. First, ABZ and PWM signals are acquired synchronously. The quality of the ABZ signal is quantified by phase consistency, pulse continuity, and speed deviation, while the quality of the PWM signal is quantified by frequency stability, duty cycle jitter intensity, and speed deviation. Then, dynamic weighted fusion decision-making is employed, automatically selecting an equalization mode, ABZ-dominant mode, or PWM-dominant mode based on the quality coefficient deviation, achieving adaptive weight switching. Finally, the fused speed is output based on the adaptive weights. Furthermore, multi-level fault compensation is included to improve output accuracy. Under high-speed, high-interference conditions, signal failure response time is shortened, and the continuity of motor control is improved, thus adapting to the needs of high-dynamic motor control.
[0228] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0229] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. An adaptive driving method based on magnetically encoded dual signals, characterized in that, The method includes: Based on the preset capture unit, the ABZ signal and PWM signal are acquired synchronously; Based on the preset ABZ evaluation, the first mass coefficient and the first rotational speed are obtained according to the ABZ signal; Based on the preset PWM evaluation, the second quality coefficient and the second rotational speed are obtained according to the PWM signal; Calculate the deviation between the first quality coefficient and the second quality coefficient to obtain the first deviation coefficient; Determine whether the first deviation coefficient is less than a preset deviation threshold; If so, then enter equilibrium mode; If not, then determine whether the first quality coefficient is greater than the second quality coefficient; If so, then enter ABZ dominant mode; If not, then enter PWM-dominated mode; Based on the operating mode, the first weight and the second weight are obtained. Combining the first speed and the second speed, the fused speed is obtained and output. The preset ABZ evaluation, based on the ABZ signal, obtains a first mass coefficient and a first rotational speed, specifically as follows: The first phase difference is obtained based on the rising edge time difference of the ABZ signal. A phase score is obtained based on the difference between the first phase difference and the standard phase difference; The number of effective pulses is obtained based on the level relationship of the ABZ signals; The pulse continuity score is obtained based on the ratio of the effective pulse number to the theoretical pulse number. The first rotational speed is obtained based on the frequency of the ABZ signal; The first speed score is obtained based on the deviation between the first speed and the preset open-loop speed. Based on the preset ABZ weighted fusion algorithm, the first quality coefficient is obtained according to the phase score, the pulse continuity score and the first rotational speed score; The preset PWM evaluation, based on the PWM signal, yields a second quality coefficient and a second rotational speed, specifically as follows: Calculate the frequency mean square error of the PWM signal to obtain a frequency stability score; Calculate the mean square error of the duty cycle of the PWM signal to obtain the duty cycle jitter score; Based on the preset number of magnetic pole pairs, the second rotational speed is obtained according to the PWM signal; The second speed score is obtained based on the deviation between the second speed and the preset open-loop speed; Based on a preset PWM weighted fusion algorithm, a second quality coefficient is obtained according to the frequency stability score, the duty cycle jitter score, and the second rotational speed score.
2. The adaptive driving method based on magnetically encoded dual signals according to claim 1, characterized in that, The process involves obtaining a first weight and a second weight based on the operating mode, combining the first speed and the second speed to obtain and output the fused speed, specifically as follows: When the system is determined to be in equilibrium mode, the first weight is set according to the preset first reference weight. When the ABZ dominant mode is determined, the first weight is set according to the preset second reference weight; When the mode is determined to be PWM dominant, the first weight is set according to the preset third reference weight. The second weight is obtained based on the first weight and the preset standard weight; Calculate the product of the first weight and the first rotational speed, and then add the product of the second weight and the second rotational speed to obtain the fused rotational speed.
3. The adaptive driving method based on magnetically encoded dual signals according to claim 1, characterized in that, Also includes: Determine whether the difference between the first phase difference and the standard phase difference is higher than a preset phase difference threshold; If so, then adjust the first weight and the second weight according to the preset fourth reference weight; Configure the ABZ signal as steering mode.
4. The adaptive driving method based on magnetically encoded dual signals according to claim 1, characterized in that, Also includes: Determine whether the duty cycle mean square error is higher than a preset duty cycle mean square error threshold; If so, then adjust the first weight and the second weight according to the preset fourth reference weight; Record the PWM signal and analyze the fault characteristics.
5. An adaptive driving system based on magnetically encoded dual signals, characterized in that, The system includes a memory and a processor. The memory includes an adaptive driving method program based on magnetically encoded dual signals. When the processor executes the adaptive driving method program based on magnetically encoded dual signals, it performs the following steps: Based on the preset capture unit, the ABZ signal and PWM signal are acquired synchronously; Based on the preset ABZ evaluation, the first mass coefficient and the first rotational speed are obtained according to the ABZ signal; Based on the preset PWM evaluation, the second quality coefficient and the second rotational speed are obtained according to the PWM signal; Calculate the deviation between the first quality coefficient and the second quality coefficient to obtain the first deviation coefficient; Determine whether the first deviation coefficient is less than a preset deviation threshold; If so, then enter equilibrium mode; If not, then determine whether the first quality coefficient is greater than the second quality coefficient; If so, then enter ABZ dominant mode; If not, then enter PWM-dominated mode; Based on the operating mode, the first weight and the second weight are obtained. Combining the first speed and the second speed, the fused speed is obtained and output. The preset ABZ evaluation, based on the ABZ signal, obtains a first mass coefficient and a first rotational speed, specifically as follows: The first phase difference is obtained based on the rising edge time difference of the ABZ signal. A phase score is obtained based on the difference between the first phase difference and the standard phase difference; The number of effective pulses is obtained based on the level relationship of the ABZ signals; The pulse continuity score is obtained based on the ratio of the effective pulse number to the theoretical pulse number. The first rotational speed is obtained based on the frequency of the ABZ signal; The first speed score is obtained based on the deviation between the first speed and the preset open-loop speed. Based on the preset ABZ weighted fusion algorithm, the first quality coefficient is obtained according to the phase score, the pulse continuity score and the first rotational speed score; The preset PWM evaluation, based on the PWM signal, yields a second quality coefficient and a second rotational speed, specifically as follows: Calculate the frequency mean square error of the PWM signal to obtain a frequency stability score; Calculate the mean square error of the duty cycle of the PWM signal to obtain the duty cycle jitter score; Based on the preset number of magnetic pole pairs, the second rotational speed is obtained according to the PWM signal; The second speed score is obtained based on the deviation between the second speed and the preset open-loop speed; Based on a preset PWM weighted fusion algorithm, a second quality coefficient is obtained according to the frequency stability score, the duty cycle jitter score, and the second rotational speed score.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer-readable storage medium includes an adaptive driving method program based on magnetically encoded dual signals. When the adaptive driving method program based on magnetically encoded dual signals is executed by a processor, it implements the steps of the adaptive driving method based on magnetically encoded dual signals as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Processing circuitry
CN112514262A
Fan control utilizing bi-directional communication
US7141950B1