Encoder and Hall dual-mode redundancy closed-loop driving method and system

By combining real-time acquisition with machine learning models, the degraded control parameters are dynamically adjusted, solving the false alarm and response lag problems in dual-mode redundant closed-loop drive technology and achieving high-reliability and high-availability motion control.

CN120779699APending Publication Date: 2025-10-14SUZHOU JIULY INTELLIGENT TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202511231158.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-30
Publication Date
2025-10-14

AI Technical Summary

Technical Problem

The existing dual-mode redundant closed-loop drive technology has problems of false alarms and response lags in fixed threshold division and rule detection, making it difficult to meet the drive requirements of high reliability and high availability.

Method used

It uses real-time parallel acquisition of encoder and Hall sensor signals, performs anomaly screening through consistency detection and machine learning models, dynamically adjusts degradation control parameters, and performs intelligent fault-tolerant switching based on environmental risks and task priorities.

Benefits of technology

The accuracy and continuity of fault detection are improved, the smoothness of the switching process and the continuity of closed-loop performance are ensured, and the false alarm rate and switching delay are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120779699A_ABST
    Figure CN120779699A_ABST
Patent Text Reader

Abstract

The invention discloses an encoder and Hall dual-mode redundancy closed-loop driving method and system, and relates to the technical field of motion control and fault tolerance, and the method comprises the steps: collecting the dual-channel signal data of an encoder and a Hall sensor in parallel in real time, and monitoring the redundancy through consistency detection; carrying out abnormity screening based on a preset rule on the collected double-path signals, carrying out data health assessment by using a machine learning model, and carrying out abnormity identification on the screened double-path signals; and fusing screening and identification results, dividing risk levels, and when an abnormal value exceeds a risk level threshold value, performing intelligent fault-tolerant switching. The dynamic threshold rule, the online incremental learning decision tree and the multi-level fusion grading strategy adopted by the method have sensitive capture capability on progressive and hidden faults. In a high interference scene, the accuracy and continuity of fault detection are effectively ensured through concept drift monitoring and a streaming decision tree online updating mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of motion control and fault tolerance, in particular to an encoder and Hall dual-mode redundant closed-loop driving method and system. BACKGROUND

[0002] In recent years, with the rapid development of industrial automation and intelligent manufacturing, high-precision motion control systems have higher requirements for the reliability and anti-interference ability of feedback elements. Traditional servo driving systems mostly use rotary encoders or Hall effect sensors as position / angle feedback, both of which have their own advantages: encoders have high resolution and linear accuracy, and Hall sensors perform well in anti-vibration and dirt resistance. In order to improve system safety and fault tolerance, the industry has developed encoder and Hall dual-sensor redundant architecture, and introduced threshold judgment, weighted fusion and Kalman filtering algorithms to realize the fusion and switching of multi-source information. However, with the emergence of complex environments and variable working conditions, the switching strategy based on empirical threshold alone gradually exposes limitations in anti-interference and real-time, and is difficult to meet the driving requirements of high reliability and high availability.

[0003] In the prior art, most dual-channel redundancy schemes rely on fixed thresholds or offline calibration, which are easily affected by factors such as temperature drift, power fluctuations and sensor aging, which may lead to false positives, false negatives, and often cannot dynamically adjust the degradation strategy according to task priority and operating environment; in addition, the abnormality identification based on rules or fusion algorithms usually lacks real-time adaptive ability and is not sensitive enough when facing gradual or hidden faults, making it difficult to accurately quantify and manage the health status of the system. SUMMARY

[0004] In view of the above problems, the present application is proposed.

[0005] Therefore, the technical problem solved by the present application is that the existing dual-mode redundant closed-loop driving technology has false positives and response lag problems in fixed threshold division and rule detection.

[0006] To solve the above technical problems, the present application provides the following technical scheme: an encoder and Hall dual-mode redundant closed-loop driving method, comprising:

[0007] Real-time parallel acquisition of dual-channel signal data of the encoder and the Hall sensor, and monitoring of the redundancy degree through consistency detection;

[0008] Abnormal screening of the collected dual-channel signals based on preset rules, data health assessment using a machine learning model, and abnormal identification of the screened dual-channel signals;

[0009] Fusion of the screening and identification results, division of risk levels, and intelligent fault tolerance switching when the abnormal value exceeds the risk level threshold.

[0010] The intelligent fault-tolerant switching comprises automatically deciding whether to switch to a redundant signal channel according to a risk level, an environmental risk indicator and a task priority, adaptively adjusting a degraded control parameter and an operation mode, outputting through double-way interpolation when the main feedback channel is switched to the redundant channel, and switching back to the main channel when a fault risk is removed and consistency detection is completed.

[0011] As a preferred scheme of the encoder and the Hall dual-mode redundant closed-loop driving method, the monitoring redundancy comprises integrating two isolated signal acquisition channels in the controller, acquiring an encoder pulse signal and a magnetic field angle signal output by a Hall element;

[0012] Each channel comprises an analog front end, a high-speed A / D converter and a timestamp synchronization module; two signals are synchronously sampled at a fixed sampling frequency, a unified clock label is marked at a sampling frame header, and timing consistency comparison is performed.

[0013] As a preferred scheme of the encoder and the Hall dual-mode redundant closed-loop driving method, the abnormality screening based on a preset rule comprises performing normalization processing on the encoder and the Hall signal, and calculating statistical features of the two signals in a fixed-length sliding window;

[0014] The statistical features comprise an instantaneous frequency deviation of the encoder, an amplitude deviation of the Hall signal, and a standard deviation of the encoder signal and the Hall signal in the window; a change rate of an encoder count value, a Hall signal amplitude and an edge interval in each sampling period are compared with a preset threshold value;

[0015] The maximum allowed pulse interval is dynamically calculated according to a current motor speed, and whether the time interval of the encoder pulse and the Hall level flip is out of limit, whether the Hall amplitude mutation exceeds a threshold value, and whether too many jitter pulses appear in the sliding window are detected in sequence; when any of the conditions that the signal amplitude mutation exceeds a set range and continuous jitter pulses appear is met, a hard fault is determined, and a hard fault alarm flag R=1 is output.

[0016] As a preferred scheme of the encoder and the Hall dual-mode redundant closed-loop driving method, the data health assessment comprises performing health assessment on signals not intercepted by the rule screening; every L frames, all feature samples in a current sliding window are aggregated, and a probability distribution model is constructed through kernel density estimation;

[0017] A reference probability distribution model is obtained from initial training data; a difference value between new data and a historical mode is quantified by calculating the KL divergence between the two distributions; when the difference value exceeds a preset threshold value, it is determined that drift occurs;

[0018] When the drift is detected, the online incremental learning module is activated; using the adaptive streaming decision tree supporting local structure update, for the new samples in the current window, for each leaf node, the statistics are updated according to the new samples, for each candidate split attribute, the Hoeffding bound is calculated based on the sample number of the current node and the information gain difference to judge whether splitting and replacing the sub-tree are needed, if the gain of the upper attribute is better than that of the sub-optimal attribute, splitting is performed;

[0019] After the model is updated, the reference distribution is adjusted and smoothed, the updated reference distribution is obtained by weighted mixing of the reference distribution and the estimated distribution, and the decision tree model using the updated reference distribution is used to give a new fault probability score for the feature vector of the current frame.

[0020] As a preferred scheme of the encoder and the Hall dual-mode redundant closed-loop driving method, wherein: the risk level includes checking the flag bit obtained by the anomaly screening, if R=1, it is determined that a hard fault occurs, the state is updated and the intelligent fault-tolerant switching process is entered; if R<1, the fault probability score is obtained by using the decision tree model updated by the probability distribution; the flag bit R of the fast screening and the fault probability score are weighted and fused, and compared with a preset threshold; wherein T soft , T prog represent the first detection threshold and the second identification threshold, which are obtained by adjusting parameters according to system risk tolerance and experimental data;

[0021] If S>T soft , it is determined that a soft fault occurs, if T prog <S≤T soft , it is determined that a gradual fault occurs; otherwise, it is determined to be normal; the frame number of the state machine is set to L, and the intelligent fault-tolerant switching is triggered only when the judgment results of the continuous L frames are the same.

[0022] As a preferred scheme of the encoder and the Hall dual-mode redundant closed-loop driving method, wherein: the intelligent fault-tolerant switching further includes that at the fault evaluation moment, the controller reads the current risk level, the environmental risk index and the task priority from the state machine;

[0023] The task priority includes emergency shutdown, safety protection, accurate control and energy saving mode;

[0024] The environmental risk index includes reading temperature sensor data, vibration sensor amplitude, power voltage fluctuation data, and mapping to corresponding risk coefficients;

[0025] If it is determined that a hard fault occurs, the control is switched to the Hall channel, a hard fault alarm is issued on the bus, the task priority is adjusted to the safety protection mode, and the state is adjusted until the hard fault state is removed;

[0026] If the soft fault is determined, the controller continues to use the encoder channel, calculates a speed limiting factor and an acceleration limiting factor according to a risk coefficient, dynamically reduces the position loop bandwidth and the speed upper limit according to the speed limiting factor and the acceleration limiting factor, and issues a soft fault flag;

[0027] If the gradual fault is determined, the controller outputs a weighted fusion signal between the encoder and the Hall signal according to a preset weight, and temporarily switches to the pure Hall channel for consistency verification every certain number of frames; if the verification fails, the fault level is adjusted to a soft fault; in the gradual fault mode, the controller makes a slight adjustment to the bandwidth and the speed according to the speed limiting factor and the acceleration limiting factor, and issues a gradual fault flag.

[0028] As a preferred scheme of the encoder and Hall dual-mode redundant closed-loop driving method, wherein: the parameter automatic adjustment to the safety mode includes, if it is determined to be normal, the pure encoder closed loop and the optimal bandwidth and speed limiting setting are restored; after the decision is made, the controller issues new bandwidth, speed limiting and fusion weight parameters to the motion driver, and the new parameters take effect in the next control cycle; for the soft fault and the gradual fault, if the urgency and the risk are both reduced to 0 in multiple continuous evaluation cycles, the degradation state is automatically cleared, and the normal mode is restored; the whole process is repeatedly executed in each evaluation cycle to ensure that the system makes timely and smooth switching and adaptive degradation to the fault evolution and the environmental change.

[0029] As a preferred scheme of the encoder and Hall dual-mode redundant closed-loop driving system, wherein: the system comprises a signal acquisition module, a rule screening module, a health assessment module and a fault decision module.

[0030] The signal acquisition module is used for real-time and parallel acquisition of the encoder pulse and the Hall angle signal, and ensures strict time sequence alignment of the two data.

[0031] The rule screening module is used for hard fault rapid determination of the two signals according to a dynamic threshold.

[0032] The health assessment module is used for soft / gradual fault detection of the rule-uncaught data, and online adaptive optimization of the model.

[0033] The fault decision module is used for dividing a risk level, and driving a redundancy switching and a degradation strategy.

[0034] A computer device comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the steps of the encoder and Hall dual-mode redundant closed-loop driving method.

[0035] A computer readable storage medium, having stored thereon a computer program, the computer program being executed by a processor to implement steps of an encoder and Hall dual-mode redundant closed-loop driving method.

[0036] The encoder and Hall dual-mode redundant closed-loop driving method provided by the present application adopts a dynamic threshold rule, an online incremental learning decision tree and a multi-level fusion grading strategy, which fully exhibit the sensitive capture ability for progressive and hidden faults in experiments, and realize adaptive degradation and intelligent switching in combination with environmental risks and task priorities. Especially in a high interference scene, the traditional scheme often produces a high false alarm / misreporting rate due to threshold mismatch or model aging, while the present application effectively guarantees the accuracy and continuity of fault detection through concept drift monitoring and online updating mechanism of the streaming decision tree; at the same time, the dual-mode switching and dual-path interpolation output guarantee the smoothness of the switching process and the continuity of the closed-loop performance. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0038] Figure 1 The present application provides an encoder and Hall dual-mode redundant closed-loop driving method. DETAILED DESCRIPTION

[0039] In order to make the above-mentioned purposes, features and advantages of the present application more apparent and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0040] Embodiment 1, refer to Figure 1 For an embodiment of the present application, an encoder and Hall dual-mode redundant closed-loop driving method is provided, comprising:

[0041] S1: Real-time parallel acquisition of dual-channel signal data of the encoder and the Hall sensor, and monitoring of the redundancy by consistency detection.

[0042] Further, the monitoring of the redundancy comprises integrating two isolated signal acquisition channels inside the controller to acquire the encoder pulse signal and the magnetic field angle signal output by the Hall element.

[0043] Each channel includes analog front end, high-speed A / D converter and time stamp synchronization module; two signals are synchronously sampled at fixed sampling frequency, and uniform clock label is marked at the head of sampling frame for timing consistency comparison.

[0044] Inside the drive controller, a completely isolated acquisition channel is designed for each of the encoder pulse signal and the Hall element magnetic field angle signal, each channel contains: analog front end: first filter out high-frequency interference by anti-aliasing low-pass filter, then improve signal common-mode rejection ratio by differential amplifier; high-speed A / D conversion: adopt sampling rate f s (like 1 kHz) to quantize the analog signal synchronously; time stamp synchronization: accurate clock label t n = n / f s is marked at the beginning of each frame sampling to ensure one-to-one correspondence of timing of two signals. After sampling, discrete sequences are obtained:

[0045] e n = e(t n ), h n = h(t n )

[0046] Where h n represents the Hall signal sampling value; e n represents the encoder sampling value; t n represents the sampling time of the nth frame.

[0047] And a frame sliding window is maintained in the controller for subsequent fault judgment and feature calculation. At the same time, in order to design dynamic threshold value, instantaneous pulse frequency and average speed need to be calculated after each frame sampling. At each sampling time t n , the system reads two original signals: encoder pulse signal and Hall output amplitude signal.

[0048] At the same time, the current motor speed v n (unit: rpm) is obtained from the motion control module, and the maximum allowed pulse interval T p is calculated according to the pulse number constant N max and the margin coefficient α:

[0049]

[0050] The encoder pulse interval is calculated, and the time stamp difference Δt e,n between this time and the last time of encoder pulse trigger is recorded, which is expressed as:

[0051]

[0052] If Δt e,n is detected to exceed T max (v nIf the encoder signal is lost or too slow, the encoder signal is determined to be lost or too slow, and a "hard fault" is immediately marked.

[0053] The Hall signal edge interval is calculated, and the time difference between the current and previous Hall signal level flip is detected:

[0054]

[0055] Similarly, if Δt h,n > T max (v n ), the Hall signal is determined to be lost, and a "hard fault" flag is triggered.

[0056] Amplitude mutation detection, the current Hall signal amplitude h n is normalized and the difference is calculated after the previous amplitude h n-1 is normalized:

[0057]

[0058] If δh n exceeds the set amplitude mutation threshold Δ amp (v n ), a "hard fault" is immediately determined.

[0059] Continuous jitter monitoring, the Hall or encoder signal is monitored for abnormal small amplitude pulses or noise in a fixed length sliding window (such as the last W frames). If more than N j jitter pulses (e.g. very short pulse interval or level flip) occur in this window, it is also considered a hard fault.

[0060] Fault flag output, the hard fault flag R is set to 1 and a "hard fault alarm" is immediately reported to the fault management module if any of the above detection sub-items is triggered.

[0061] If none of the detection sub-items is triggered, R is kept less than 1, and the subsequent soft fault and gradual fault detection process is continued.

[0062] It should be noted that the dynamic threshold is associated with the instantaneous speed of the motor to avoid misjudgment at low speed; the amplitude threshold can be fine-tuned according to the ambient temperature or power supply voltage to ensure robustness; the sliding window jitter detection provides a secondary guarantee against signal interference and jitter. The algorithm is targeted at low computational complexity and high real-time performance, and is suitable for online execution on embedded controllers.

[0063] S2: Perform abnormal screening on the collected double-channel signals based on preset rules, use a machine learning model to perform data health assessment, and perform abnormal identification on the screened double-channel signals.

[0064] The abnormality screening based on preset rules comprises: normalizing the encoder and the Hall signal, and calculating statistical features of the two signals in a fixed-length sliding window.

[0065] The statistical features comprise: instantaneous frequency deviation of the encoder, amplitude deviation of the Hall signal, standard deviation of the encoder signal and the Hall signal in the window; the encoder count rate in each sampling period, the Hall signal amplitude and the edge interval are compared with preset thresholds.

[0066] The maximum allowed pulse interval is dynamically calculated according to the current speed of the motor, and whether the time interval of the encoder pulse and the Hall level flip is out of limit, whether the Hall amplitude mutation exceeds the threshold, and whether too many jitter pulses appear in the sliding window is detected in turn; when either of the conditions that the signal amplitude mutation exceeds the set range and the continuous jitter pulses appears is met, the hard fault is determined, and the hard fault alarm flag R=1 is output.

[0067] Further, when each sampling frame arrives, the encoder pulse frequency and the Hall signal amplitude are first normalized respectively to ensure that the two signals are in the same dimension. Then, in the sliding window of the last N frames, the following four types of statistical features are calculated:

[0068] Instantaneous frequency deviation: the difference between the reciprocal of the current pulse interval and the reference frequency reflects the rate anomaly of the encoder signal; amplitude deviation: comparing the normalized Hall output with the long-term average value captures the amplitude drift; encoder signal standard deviation: the fluctuation degree of the encoder reading in the window, which is used to identify irregular oscillation; Hall signal standard deviation: the fluctuation degree of the Hall amplitude in the window, which helps to find amplitude jitter.

[0069] The data health assessment comprises: performing health assessment on signals not intercepted by the rule screening; every L frames, all feature samples in the current sliding window are aggregated, and a probability distribution model is constructed through kernel density estimation.

[0070] The reference probability distribution model is obtained from the initial training data; the difference value between the new data and the historical pattern is quantified by calculating the KL divergence between the two distributions; when the difference value exceeds the pre-set threshold, it is determined that drift occurs.

[0071] When drift is detected, the online incremental learning module is activated; using an adaptive streaming decision tree that supports local structure update, for new samples in the current window, for each leaf node, updating the statistics according to the new samples, for each candidate split attribute, calculating the Hoeffding bound based on the number of samples in the current node and the information gain difference to determine whether splitting and replacing the sub-tree are needed, if the gain of the upper attribute is better than that of the sub-optimal attribute, splitting is performed.

[0072] After the model is updated, the reference distribution is adjusted smoothly, and the updated reference distribution is obtained by weighted mixing of the reference distribution and the estimated distribution; the decision tree model using the updated reference distribution gives a new fault probability score for the feature vector of the current frame.

[0073] The new and old distribution estimates every K frames, and all feature samples in the current sliding window are used to construct the "new distribution". Since the features are continuous multi-dimensional vectors, kernel density estimation (KDE) method is used to smooth model these samples to obtain the probability density function P new (x). At the same time, the system maintains a "reference distribution" P ref (x), which is initially obtained by statistical analysis of the offline training set and slowly evolves in a weighted manner after each online update.

[0074] Concept drift detection (KL divergence calculation) is based on the new and old distributions obtained by kernel density estimation, and the Kullback-Leibler divergence between them is calculated:

[0075]

[0076] If the divergence exceeds the preset threshold D thr , it can be determined that the recent data distribution has changed significantly, which means that the model may no longer adapt to the current signal characteristics.

[0077] Online incremental model updating triggers model fine-tuning as soon as concept drift is detected. The model used is Hoeffding adaptive decision tree (HAT) that supports incremental learning.

[0078] All feature samples in the sliding window are input into the current tree model one by one.

[0079] For each leaf node, update the statistics (such as class count, mean, variance) according to the new sample, and determine whether to split or replace the subtree according to the Hoeffding bound.

[0080] This process does not need to retrain the entire tree, only local structure optimization is performed at necessary positions, which is efficient and has theoretical guarantee.

[0081] Smooth updating of reference distribution To make the subsequent drift detection more sensitive and stable, after each online update, the new and old distributions are fused in proportion:

[0082] P ref ← αP ref +(1-α)P new

[0083] where a controls the memory decay rate, making the reference distribution preserve historical information while reflecting recent trends. N denotes the sliding window size for feature statistics and distribution estimation; K denotes the drift detection period, which calculates the KL divergence every K frames; D thr denotes the KL divergence trigger threshold; a denotes the reference distribution update coefficient, which controls the fusion ratio of new and old distributions.

[0084] The updated decision tree model of the output health score can give a new fault probability estimate M n for the current frame feature vector. This score is constantly online adaptive with the evolution of data distribution, without the need for offline retraining, greatly improving the detection accuracy of weak and progressive faults.

[0085] It should be noted that when a hard fault occurs, the system immediately switches to the Hall sensor closed loop without human intervention, reducing the redundancy switching delay; when a soft fault or a progressive fault occurs, the system is smoothly degraded through bandwidth and speed limiting, avoiding excessive system shock and sudden shutdown. The periodic reevaluation mechanism dynamically links with task priority and environmental risk, ensuring that the system can quickly respond to safety needs under different working conditions without frequent switching causing instability.

[0086] S3: Fuse the results of screening and identification, divide the risk level, and when the abnormal value exceeds the risk level threshold, perform intelligent fault-tolerant switching.

[0087] Furthermore, after each sampling frame arrives, the system first checks the flag R obtained by the rule-based fast screening. If R = 1 at this time, it means that a clear hardware failure (such as pulse loss or amplitude dramatic mutation) has occurred, and there is no need to consider other information at this time. The current state is immediately marked as "hard fault", and the redundancy switching process is entered.

[0088] The risk level division includes checking the flag obtained by the anomaly screening, if R = 1, it is determined that a hard fault has occurred, the state is updated and the intelligent fault-tolerant switching process is entered; if R < 1, the decision tree model of the probability distribution is used to score the fault probability M; the flag R of the fast screening and the fault probability score are weighted and fused, and compared with the preset threshold; where T soft , T prog denote the first detection threshold and the second identification threshold, which are obtained by adjusting the system risk tolerance and experimental data.

[0089] In order to comprehensively utilize the judgment results of experience rules and learning models, the system calculates a fusion score

[0090] S = w r × R + w m × N

[0091] Since when R < 1, the fusion score is simplified as S = wm M, so the fusion result is largely dominated by the model output.

[0092] Next, the system compares the fusion score S with two preset thresholds: if S > T soft , it is determined as a "soft failure", meaning that there is a relatively obvious but not yet leading to hardware failure anomaly; if T prog < S ≤ T soft , it is determined as a "progressive failure", indicating that it is developing towards failure, which needs close monitoring but does not need to be switched immediately; if S ≤ T prog , the state is considered "normal".

[0093] In order to prevent occasional noise from causing frequent jitter of the failure level, the system also retains the grading results of the last few frames in the state machine, and only when the same failure level remains consistent for consecutive multiple frames, a state jump is truly triggered. In this way, the multi-level grading mechanism that combines the experience threshold and the wisdom of the model can quickly capture serious hardware failures, and can also make subtle distinctions between soft failures and progressive failures, providing reliable and stable basis for subsequent adaptive switching and degradation decisions.

[0094] w r ,w m represents the fusion weight, satisfying w r + w m = 1, usually w m > w r to enhance the discrimination ability of ML. T soft , T prog represent the soft failure and progressive failure thresholds, which are obtained by adjusting parameters according to system risk tolerance and experimental data.

[0095] The number of frames remembered by the state machine can be set to L, and only when the judgment results of consecutive L frames are the same, the state jump is truly triggered.

[0096] Intelligent fault-tolerant switching includes automatically deciding whether to switch to a redundant signal channel according to the risk level, environmental risk indicators and task priority, and adaptively adjusting the degradation control parameters and operation mode; interpolating output through dual channels when switching the main feedback channel to the redundant channel; switching back to the main channel when the failure risk is removed and consistency detection is completed.

[0097] The intelligent fault-tolerant switching further includes that at the moment of failure evaluation, the controller reads the current risk level, environmental risk indicators and task priority from the state machine.

[0098] The task priority includes emergency shutdown, safety protection, precise control and energy saving mode.

[0099] The environmental risk indicators include reading temperature sensor data, vibration sensor amplitude, power supply voltage fluctuation data, and mapping to corresponding risk coefficients.

[0100] If it is determined as a hard fault, the control switches to the Hall channel, issues a hard fault alarm on the bus, adjusts the task priority to a safety protection mode, and until the hard fault state is removed.

[0101] If it is determined as a soft fault, the controller continues to use the encoder channel, calculates the speed limiting factor and the acceleration limiting factor according to the risk coefficient; according to the speed limiting factor and the acceleration limiting factor, dynamically down-regulates the position loop bandwidth and the speed upper limit, and simultaneously issues a soft fault flag.

[0102] If it is determined as a gradual fault, the controller outputs a weighted fusion between the encoder and the Hall signal according to a preset weight, and temporarily switches to the pure Hall channel for consistency verification every certain number of frames; if the verification fails, the fault level is adjusted to a soft fault; in the gradual fault mode, the controller makes a slight adjustment to the bandwidth and the speed according to the speed limiting factor and the acceleration limiting factor, and issues a gradual fault flag.

[0103] Read the input parameters, the current fault level level∈{normal, gradual fault, soft fault, hard fault}; environmental risk indicators ρ∈[0,1] (normalized by temperature, vibration, etc. sensors); task priority indicators π∈[0,1] (delivered by the controller task queue or the upper computer).

[0104] Calculate the decision urgency, which is expressed by the formula:

[0105] U=w ρ ρ+w π π,w ρ =0.5,w π =0.5

[0106] Where U∈[0,1] represents the comprehensive urgency, which is used to dynamically adjust the degradation strength.

[0107] State machine branch decision, hard fault, switch channel: immediately switch the closed-loop control input to the Hall signal channel. Alarm output: issue a “FAULT_HARD” alarm flag on the system bus. Parameter locking: prohibit switching back to the encoder until manual reset.

[0108] Soft fault, keep main channel: continue to perform closed-loop control with the encoder channel. Bandwidth degradation: adjust the position loop bandwidth B p ′ to B p ′:

[0109] B p ′=(1-k s U)B p

[0110] Speed ​​limit: Set the maximum speed V max Reduced to V max ′:

[0111] V max ′=(1-k v U)V max

[0112] Alarm mark: Issue the "FAULT_SOFT" flag, but do not switch channels. Gradual fault, enable hybrid fusion, and use weight w between encoder and Hall signals. e w h Fusion output:

[0113] y ctrl =w e y e +w h y h

[0114] Periodic switching detection: Every K frames (for example, K=50), the system switches to the Hall channel for a short period of time to verify consistency. If the signal is inconsistent, it is upgraded to a "soft fault".

[0115] Mild bandwidth and speed adjustments:

[0116] B′ p =(1-k p U / 2)B p ,V′ max =(1-k v U / 2)V max

[0117] where k p =0.2,k v = 0.2. Flag: Issue the "FAULT_PROG" flag.

[0118] If normal, restore all parameters. The formula is:

[0119] B′ p =B p ,V′ max =V max

[0120] Apply control parameters and send bandwidth B′ to the motion controller p , speed upper limit V′ max and fusion weight w e ,w h .

[0121] Update alarm register: Set or clear the corresponding soft / hard fault flag. The controller immediately adopts the new parameters and channels at the beginning of the next control cycle.

[0122] For "progressive failure" or "soft failure", the follow-up recovery mechanism is reserved: if U and p,pi both fall back to 0 within consecutive M evaluation periods, the degradation is automatically cleared and the normal parameters are restored.

[0123] Wait for the next evaluation period and start again from reading the input parameters, ensuring real-time response to failure evolution and environmental changes.

[0124] Each coefficient k s ,k v ,k p It can be adjusted online or offline according to the performance and safety requirements of the device. The acquisition method of environmental risk p and task priority o should be consistent with the upper computer protocol or local sensor interface. The mixed fusion weight (w e ,w h ) can also be dynamically fine-tuned according to the failure level to balance accuracy and reliability.

[0125] The automatic adjustment of the parameters of the closed-loop control to the safety mode includes: if it is determined to be normal, it is restored to the pure encoder closed loop and the optimal bandwidth and speed limit setting; after making a decision, the controller sends the new bandwidth, speed limit and fusion weight parameters to the motion driver, and they take effect in the next control period; for soft failure and progressive failure, if the urgency and risk of the system both fall to 0 within multiple consecutive evaluation periods, the degradation state is automatically cleared and the normal mode is restored; the entire process is repeated in each evaluation period to ensure that the system makes timely and smooth switching and adaptive degradation to failure evolution and environmental changes.

[0126] It should be noted that the incremental decision tree is used to realize online model updating, without the need for complete retraining, significantly reducing the computational overhead and storage requirements, and being suitable for embedded device deployment. The environmental risk quantification and automatic parameter adjustment mechanism enables the system to automatically adjust the diagnostic sensitivity according to physical quantities such as vibration and temperature, reducing the cost of manual calibration and operation and maintenance. In the failure level state machine, the task priority and environmental risk double decision are introduced to dynamically adjust the bandwidth, speed limit and function module disable range, and smooth and jitter-free degradation and recovery control is realized through an adjustable period.

[0127] Embodiment 2 provides an encoder and Hall dual-mode redundant closed-loop driving method as an embodiment of the present application, in order to verify the beneficial effects of the present application, economic benefit calculation and simulation experiments are carried out for scientific demonstration.

[0128] Firstly, seven same type servo motor test benches (referred to as test benches 1-7) are selected to carry out comparative experiments. The test environment temperature is 25±2℃, and the relative humidity is 50±5%. Each test bench is equipped with: a high-resolution photoelectric encoder (pulse number 20000P / R), a three-phase servo driver, a Hall position sensor (resolution 0.1°), a double-channel isolated analog-to-digital conversion channel, and a unified sampling main control unit. The experiment first goes through a hardware preparation stage: in the controller, an analog front end (anti-aliasing filter, differential amplifier), a high-speed A / D converter, and a timestamp synchronization module are deployed for the encoder and the Hall sensor respectively; the double-channel signals are sampled synchronously at a sampling frequency of 1kHz, and a unified clock marker of 1μs level is stamped at the head of each frame. Then, through a special signal injector, known amplitude disturbances, noise interference, and low-speed and high-speed running states are introduced to simulate the interference sources such as temperature drift, power fluctuation, and mechanical vibration in the real industrial scene.

[0129] Multi-channel acquisition and consistency detection The encoder count value and the Hall angle value are synchronously acquired every 1ms, and the maximum allowed pulse interval T is dynamically calculated according to the instantaneous motor speed max (v) After time alignment of the two signals in a sliding window (N=50 frames), the consistency is judged by the time difference and the amplitude difference.

[0130] Rule-based anomaly screening The instantaneous frequency deviation Δf, the amplitude deviation ΔA, and the window standard deviation are calculated for the normalized signals respectively; then the pulse interval, the Hall level flip interval, and the amplitude mutation are detected in turn according to the dynamic threshold, and if any rule is triggered, the "hard fault" alarm flag is output and the triggering time is recorded.

[0131] Online incremental learning and drift detection For the channels not captured by the rules, a four-dimensional feature vector is extracted to input an adaptive streaming decision tree (HoeffdingTree); every K=100 frames, the KL divergence of the new and old distributions is calculated based on the multivariate Gaussian model of kernel density estimation, and if D KL >0.2, the model is triggered for online updating; during the incremental updating process, the statistics of each leaf node are corrected in real time, and the necessary splitting or subtree replacement is completed according to the Hoeffding bound.

[0132] Multi-level risk grading The rule anomaly flag R and the model output probability M are weighted and fused into a hybrid score S=0.3R+0.7M, which is compared with the soft fault threshold 0.6 and the gradual fault threshold 0.3 in turn to realize "four-level classification" (hard fault, soft fault, gradual fault, normal) judgment. The state machine requires that the results are consistent for L=5 consecutive frames before switching states, in order to avoid occasional jitter.

[0133] Intelligent fault-tolerant switching and degradation control In the case of hard fault, the controller immediately switches to Hall closed loop and issues a fault alarm; in the case of soft fault, the speed limiting factor α is automatically calculated according to the risk coefficientV with an acceleration limiting factor a A , the maximum speed is down-regulated from 1000 rpm to 600 rpm, and the position loop bandwidth is reduced from 200 Hz to 120 Hz; in the gradual fault mode, the encoder and the Hall signal are fused according to a weight of 0.8:0.2, and the pure Hall channel is temporarily switched every 200 ms for consistency verification.

[0134] The performance of the seven test benches on multiple indicators intuitively reflects the excellent performance of the method in the present application in terms of fault detection accuracy, switching response speed, closed-loop precision, and system stability. First, in terms of "detection delay", the average is about 2.3 ms, which is about 60% higher than the traditional system based on a single rule threshold (usually 5-8 ms), thereby ensuring a rapid response to sudden faults; this is due to the consistent detection mechanism of parallel dual-channel 1 kHz real-time sampling and unified clock marking. Secondly, the "false alarm rate" is always between 0.4-0.7%, which is much lower than the 2% or more of similar redundant control schemes on the market, indicating that the online incremental learning and drift detection module effectively suppresses false judgments caused by environmental interference and noise, and further reduces the false alarm probability through continuous multi-frame anti-shake strategy.

[0135] The "switching delay" indicator is about 5.3 ms, which is about 30% lower than the traditional software switching method, indicating that the control switching and dual-channel interpolation mechanism can realize channel conversion in milliseconds after a hard fault is triggered, avoiding the transient instability of the driver caused by excessive delay. The "recovery time" that cooperates with it is in the range of 120-128 ms, which shows that the system can quickly recover to the optimal closed-loop state after the risk is removed, ensuring that the control performance does not decrease for a long time due to a fault switching.

[0136] In the two precision and stability indicators of "position deviation" and "system stability margin", the test values remain at the levels of 0.02-0.035° and 98.0-98.5%, respectively, proving that the amplitude limiting degradation and weighted fusion in the execution of soft fault and gradual fault modes do not significantly lose the motion precision, and the system stability is maintained at a high level. Finally, in terms of the "energy consumption" indicator, the average is about 151 J / cycle, which is basically the same as the energy consumption of a pure encoder closed-loop system, indicating that the intelligent fault-tolerant degradation does not bring additional significant energy consumption overhead.

[0137] Embodiment 3, which is an embodiment of the present application, provides an encoder and Hall dual-mode redundant closed-loop drive system, comprising a signal acquisition module, a rule screening module, a health assessment module, and a fault decision module.

[0138] The signal acquisition module is configured to acquire the encoder pulse and the Hall angle signal in real time and in parallel, and ensure that the two-way data are strictly time-aligned.

[0139] The rule screening module is used for hard fault rapid judgment of the two-way signals according to a dynamic threshold.

[0140] The health assessment module is used for soft / progressive fault detection of rule uncaptured data, and online adaptive optimization model.

[0141] The fault decision module is used for dividing risk levels, and driving redundancy switching and degradation strategies.

[0142] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0143] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered a list of executable instructions for implementing logical functions, and can be specifically embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, a system including a processor, or other system that can fetch the instructions from an instruction execution system, apparatus, or device and execute the instructions, or in conjunction with these instructions. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport programs for use by or in connection with an instruction execution system, apparatus, or device, or in conjunction with these instructions.

[0144] More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection having one or more wires (electrical devices), a portable computer diskette (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium can even be paper or other suitable medium on which the program can be printed, because the program can be electronically obtained, for example, by optical scanning of the paper or other medium, followed by editing, interpretation, or necessary processing, if necessary, in other suitable ways, and then stored in a computer memory.

[0145] It should be understood that portions of the present application can be implemented with hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, implementation can be with any or a combination of the following technologies, which are all well known in the art: a discrete logic circuit having logic gates for implementing logic functions upon an application of data signals, an application specific integrated circuit having appropriate combinational logic gates, a programmable gate array (PGA), a field programmable gate array (FPGA), etc. It should be understood that the foregoing embodiments are merely illustrative of the present application and are not to be used to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, it will be apparent to those skilled in the art that various changes and modifications can be contributed to the present application without departing from the spirit and scope of the present application, and such changes and modifications should be encompassed within the scope of the appended claims.

[0146] It should be understood that the foregoing embodiments are merely illustrative of the present application and are not to be used to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, it will be apparent to those skilled in the art that various changes and modifications can be contributed to the present application without departing from the spirit and scope of the present application, and such changes and modifications should be encompassed within the scope of the appended claims.

Claims

1. A closed-loop drive method for encoder and Hall dual-mode redundancy, characterized in that: include: Real-time parallel acquisition of dual-channel signal data from encoders and Hall sensors, and monitoring of redundancy through consistency detection; The collected dual-channel signals are screened for anomalies based on preset rules, and a machine learning model is used to assess data health and identify anomalies in the screened dual-channel signals. The results of screening and identification are integrated to classify risk levels. When the outlier value exceeds the risk level threshold, intelligent fault-tolerant switching is performed. The intelligent fault-tolerant switching includes automatically deciding whether to switch to a redundant signal channel and adaptively adjusting degradation control parameters and operating modes based on risk level, environmental risk indicators, and task priority; When the main feedback channel is switched to the redundant channel, the output is obtained through dual-path interpolation. When the fault risk is eliminated and the consistency check is completed, the output is switched back to the main channel.

2. The encoder and Hall dual-mode redundant closed-loop driving method according to claim 1, characterized in that: The monitoring redundancy includes integrating two isolated signal acquisition channels inside the controller to collect encoder pulse signals and magnetic field angle signals output by Hall elements; Each channel includes an analog front end, a high-speed A / D converter, and a timestamp synchronization module; The two signals are sampled synchronously at a fixed sampling frequency, and a unified clock mark is added to the sampling frame header for timing consistency comparison.

3. The encoder and Hall dual-mode redundant closed-loop driving method according to claim 2, wherein: The abnormality screening based on preset rules includes normalizing the encoder and Hall signals and calculating statistical features for the two signals in a sliding window of fixed length; The statistical features include the instantaneous frequency deviation of the encoder, the amplitude deviation of the Hall signal, and the standard deviation of the encoder signal and the Hall signal within the window; the rate of change of the encoder count value, the amplitude of the Hall signal and the edge interval within each sampling period are compared with the preset threshold value; The maximum allowable pulse interval is dynamically calculated using the current motor speed, and the time interval between the encoder pulse and the Hall level flip is detected in turn to see if it exceeds the limit, whether the Hall amplitude mutation exceeds the threshold, and whether there are too many jitter pulses in the sliding window; when any of the conditions of the signal amplitude mutation exceeding the set range and continuous jitter pulses are met, it is determined to be a hard fault and the hard fault alarm flag R=1 is output.

4. The encoder and Hall dual-mode redundant closed-loop driving method according to claim 3, characterized in that: The data health assessment includes performing a health assessment on signals that are not intercepted by rule screening; aggregating all feature samples in the current sliding window every L frames and constructing a probability distribution model through kernel density estimation; A reference probability distribution model is derived from the initial training data. The difference between the new data and the historical pattern is quantified by calculating the KL divergence between the two distributions. When the difference exceeds a pre-set threshold, drift is considered to have occurred. When drift is detected, the online incremental learning module is activated. Using an adaptive streaming decision tree that supports local structure updates, statistics are updated for each leaf node based on the new samples in the current window. For each candidate split attribute, the Hoeffding bound is calculated based on the number of samples at the current node and the information gain difference to determine whether the subtree needs to be split and replaced. If the gain of the upper-level attribute is better than the suboptimal attribute, the split is performed. After the model is updated, the reference distribution is smoothly adjusted, and the reference distribution and the estimated distribution are weightedly mixed to obtain an updated reference distribution; the decision tree model of the updated reference distribution is used to give a new fault probability score to the feature vector of the current frame.

5. The encoder and Hall dual-mode redundant closed-loop driving method according to claim 4, characterized in that: The risk level classification includes checking the flag bit obtained from the abnormal screening. If R=1, it is determined that a hard fault has occurred, the status is updated and the intelligent fault-tolerant switching process is entered; if R<1, the decision tree model updated by the probability distribution is used to score the fault probability; the flag bit R of the rapid screening and the fault probability score are weighted and fused, and compared with the preset threshold; where T soft 、T prog It represents the first detection threshold and the second recognition threshold, which are obtained based on the system risk tolerance and experimental data; If S>T soft , it is judged as a soft fault, if T prog <S≤T soft , it is judged as a gradual fault; otherwise it is judged as normal; the number of state machine memory frames is set to L, and the intelligent fault-tolerant switching is triggered only when the judgment results of consecutive L frames are the same.

6. The encoder and Hall dual-mode redundant closed-loop driving method according to claim 5, characterized in that: The intelligent fault-tolerant switching further includes, at the moment of fault assessment, the controller reading the current risk level, environmental risk index and task priority from the state machine; The task priorities include emergency shutdown, safety protection, precise control and energy saving mode; The environmental risk indicators include reading temperature sensor data, vibration sensor amplitude, and power supply voltage fluctuation data, and mapping them to corresponding risk coefficients; If it is determined to be a hard fault, the control is switched to the Hall channel, a hard fault alarm is issued on the bus, and the task priority is adjusted to the safety protection mode until the hard fault state is resolved; If it is determined to be a soft fault, the controller continues to use the encoder channel and calculates the speed limit factor and acceleration limit factor based on the risk factor; Dynamically lower the position loop bandwidth and speed upper limit based on the speed limit factor and acceleration limit factor, and issue a soft fault flag at the same time; If it is determined to be a progressive fault, the controller performs weighted fusion output between the encoder and Hall signals according to the preset weights, and briefly switches to the pure Hall channel every certain number of frames for consistency check; If the test fails, the fault level is adjusted to a soft fault; in the progressive fault mode, the controller makes slight adjustments to the bandwidth and speed according to the speed limit factor and acceleration limit factor, and issues a progressive fault flag.

7. The encoder and Hall dual-mode redundant closed-loop driving method according to claim 6, characterized in that: The parameters of the closed-loop control are automatically adjusted to a safe mode, including, if determined to be normal, reverting to a pure encoder closed loop and optimal bandwidth and speed limit settings; after making a decision, the controller sends the new bandwidth, speed limit, and fusion weight parameters to the motion driver, which take effect in the next control cycle; for soft faults and progressive faults, if the system's urgency and risk are reduced to 0 over multiple consecutive evaluation cycles, the degraded state is automatically cleared and restored to normal mode; the entire process is repeated in each evaluation cycle to ensure that the system makes timely and smooth switching and adaptive degradation to fault evolution and environmental changes.

8. A system using the encoder and Hall dual-mode redundant closed-loop drive method according to any one of claims 1 to 7, characterized in that: Including signal acquisition module, rule screening module, health assessment module, and fault decision module; The signal acquisition module is used to collect encoder pulses and Hall angle signals in real time and in parallel to ensure that the two data are strictly aligned in time sequence; The rule screening module is used to quickly determine hard faults of two signals based on dynamic thresholds; The health assessment module is used to perform soft / progressive fault detection on data not captured by the rules and to adaptively optimize the model online; The fault decision module is used to divide risk levels and drive redundancy switching and degradation strategies.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the encoder and Hall dual-mode redundant closed-loop driving method described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the encoder and Hall dual-mode redundant closed-loop driving method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Double-shaft high-power density servo driver, control method, system and equipment and storage medium

    CN121485521A

  • Sensor fault tolerance method, device, equipment, medium and program product

    CN121522988A

  • Hardware-in-loop pulse frequency adaptive measurement simulation device and method

    CN121595951A