A method for controller fault detection and fault tolerance result output based on operational data

By collecting operational data in an embedded controller and generating residual morphological feature vectors using an extended Kalman filter model, the problems of insufficient residual disturbance rejection capability and insufficient mode consistency evaluation in existing technologies are solved. This achieves highly accurate fault detection and fault-tolerant result output, improving the reliability and deployment efficiency of the controller.

CN121613872BActive Publication Date: 2026-04-21NANJING MEIJUN ELECTRONICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING MEIJUN ELECTRONICS TECH CO LTD
Filing Date
2026-02-02
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing embedded controller operation data fault detection technologies suffer from insufficient residual disturbance immunity, lack of unified feature representation of residual morphology and mode consistency evaluation mechanism, resulting in frequent false alarms/missed alarms. Furthermore, the diagnostic conclusions and fault-tolerant outputs are difficult to directly interface with the fault-tolerant strategy library, reducing the efficiency of engineering deployment.

Method used

Within a preset sampling period, multiple operational quantities output from the internal sampling interface of the controller are collected to generate operational observation records. These records are then input into a multivariate state-space recursive prediction model based on extended Kalman filtering to generate residual morphological feature vectors. After consistency verification with the pre-stored pattern feature set, normal/fault labels and fault type labels are output to generate fault-tolerant result data.

Benefits of technology

By reducing the impact of asynchronous multi-source sampling, suppressing operating condition disturbances, enhancing the ability to distinguish fault types, improving the accuracy of fault identification, and achieving machine-readable fault-tolerant result output, the reliability of the controller and the efficiency of system integration are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121613872B_ABST
    Figure CN121613872B_ABST
Patent Text Reader

Abstract

This invention relates to the field of computer data processing technology, and in particular to a method for controller fault detection and fault-tolerant result output based on operational data. The method includes: collecting operational quantity measurements at a preset sampling period to generate operational observation records; inputting the operational observation records into a multivariate state-space recursive prediction model based on extended Kalman filtering to obtain corresponding predicted operational quantities; generating three residuals from the difference between measured and predicted values, and extracting residual morphological features within a sliding window of N consecutive sampling periods to form a feature vector; verifying the consistency of the feature vector with pre-stored feature sets of normal and two types of fault modes to obtain a consistency score; and outputting labels and generating fault-tolerant result output data based on a threshold and score comparison. This invention improves the accuracy of fault identification by performing recursive prediction, residual morphological feature extraction, and mode consistency verification on multiple operational quantities of the controller, and outputting fault-tolerant result data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer data processing technology, and in particular to a method for controller fault detection and fault tolerance result output based on operational data. Background Technology

[0002] As the digitalization and networking of embedded controller computing platforms continue to improve, controllers are gradually evolving from traditional closed-loop execution units into embedded computing nodes capable of data acquisition, state estimation, anomaly detection, and external information interaction. Online monitoring and fault diagnosis technologies for controller operating data have expanded from early threshold alarms and univariate statistical discrimination to recursive estimation based on state-space models, anomaly detection based on residuals, and pattern recognition for multiple operating conditions. Especially under engineering conditions of limited computing power, coexisting noise and drift, and frequent operating condition switching, how to structurally record and time-series align multiple operating quantities within a preset sampling period, further construct comparable residual signals based on recursive prediction, extract residual morphological features in a windowed manner, and evaluate their consistency with pre-stored patterns to output machine-readable fault labels and fault-tolerant result data has become crucial for improving controller reliability, maintainability, and system integration efficiency.

[0003] However, existing methods still have several drawbacks: First, residual generation and noise suppression often rely on instantaneous thresholds or single statistics, making them susceptible to short-term disturbances and parameter drift, leading to false alarms or missed alarms. Second, there is a lack of a unified representation of the evolution of residuals over time, and fault type differentiation often relies on empirical rules or offline analysis, making it difficult to form a reusable online discrimination link on the controller side. Third, there is a lack of standardized data structures and mapping mechanisms between diagnostic conclusions and fault-tolerant outputs, making it difficult to directly connect the results to the fault-tolerant strategy library and reducing the efficiency of engineering deployment.

[0004] Given the shortcomings of existing embedded controller operational data fault detection technologies, such as insufficient residual disturbance immunity, lack of unified feature representation of residual morphology and mode consistency evaluation mechanism, and difficulty in directly converting diagnostic conclusions into structured fault-tolerant output data, this invention proposes a controller fault detection and fault-tolerant result output method based on operational data: Multiple operational quantities output from the controller's internal sampling interface are collected within a preset sampling period and written into the sampling period index to generate operational observation records; the operational observation records are input into a multivariate state-space recursive prediction model based on extended Kalman filtering to output multiple predicted operational quantities; multiple residuals are generated from the difference between measured and predicted values, and residual morphological features are extracted within a sliding window consisting of N consecutive sampling periods to form a residual morphological feature vector; the residual morphological feature vector is compared with a pre-stored set of residual morphological features for normal mode and multiple fault modes to obtain a normal consistency score and a multi-fault consistency score; based on the comparison of the normal consistency score with a preset threshold, a normal / fault label is output, and under the fault label, a fault type label is determined based on the comparison of the multi-fault consistency score, thereby generating and outputting fault-tolerant result output data. Summary of the Invention

[0005] The purpose of this section is to outline some aspects of the embodiments of the present invention and to briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section, as well as in the abstract and title of the present application, to avoid obscuring the purpose of this section, the abstract and title of the invention. Such simplifications or omissions shall not be used to limit the scope of the present invention.

[0006] In view of the aforementioned existing problems, the present invention is proposed.

[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0008] In a first aspect, the present invention provides a method for controller fault detection and fault tolerance result output based on operating data, comprising: within a preset sampling period, collecting a first operating quantity measurement value, a second operating quantity measurement value and a third operating quantity measurement value output by the internal sampling interface of the controller, writing them into the sampling period index and generating an operating observation record;

[0009] The operation observation records are input into a multivariate state-space recursive prediction model constructed based on the extended Kalman filter algorithm, and the first predicted operation quantity, the second predicted operation quantity, and the third predicted operation quantity are output.

[0010] Based on the difference between the first measured operating volume and the first predicted operating volume, the difference between the second measured operating volume and the second predicted operating volume, and the difference between the third measured operating volume and the third predicted operating volume, a first residual, a second residual, and a third residual are generated respectively; and within a sliding window consisting of N consecutive preset sampling periods, a residual morphology feature vector is generated using a sliding window residual morphology feature extraction method.

[0011] The residual morphological feature vector is compared with the pre-stored normal mode residual morphological feature set, the first fault mode residual morphological feature set, and the second fault mode residual morphological feature set to obtain the normal consistency score, the first consistency score, and the second consistency score.

[0012] Based on the comparison between the normal consistency score and the preset fault discrimination threshold, a normal label or a fault label is output. When outputting a fault label, a first fault label or a second fault label is determined based on the comparison result between the first consistency score and the second consistency score. Fault tolerance result output data is generated and output based on the output label.

[0013] In a second aspect, the present invention provides a computer device, comprising: one or more processors;

[0014] The memory stores operable instructions that, when executed by the one or more processors, cause the one or more processors to perform operations, including the flow of the controller fault detection and fault tolerance result output method based on the aforementioned operating data.

[0015] Thirdly, the present invention provides a computer-readable medium for storing software, characterized in that: the software includes instructions executable by one or more computers, the instructions causing the one or more computers to perform operations, the operations including the flow of the controller fault detection and fault tolerance result output method based on the aforementioned operating data.

[0016] The beneficial effects of this invention are as follows: This invention generates operational observation records by collecting three operational quantities and writing them into the sampling period index, thereby obtaining alignable online monitoring data and reducing the impact of asynchronous multi-source sampling on subsequent discrimination; by inputting the operational observation records into a multivariate state-space recursive prediction model using an extended Kalman filter to output predicted operational quantities, a reference baseline with a suppressive effect on operating condition disturbances is formed; multiple residuals are generated by the difference between measured and predicted values, and residual morphological feature vectors are extracted within a sliding window, transforming instantaneous fluctuations into comparable time-domain morphological representations; multiple consistency scores are obtained by verifying consistency with the normal / fault mode feature sets, enhancing the ability to distinguish fault types; and labels are output by threshold discrimination and score comparison, and fault-tolerant result output data is generated, completing the distribution of machine-readable fault-tolerant results and improving the accuracy of fault identification. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0018] Figure 1 This is a flowchart illustrating the controller fault detection and fault tolerance result output method based on operational data as shown in this invention.

[0019] Figure 2 This is a schematic diagram of the process for generating runtime observation records as shown in this invention;

[0020] Figure 3 This is a schematic diagram of the process for outputting the first / second / third predicted running quantities as shown in this invention;

[0021] Figure 4 This is a schematic diagram of the difference operation shown in this invention;

[0022] Figure 5 This is a flowchart illustrating the consistency verification method of the present invention. Detailed Implementation

[0023] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0024] Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort should fall within the scope of protection of this invention.

[0025] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0026] According to an embodiment of the present invention, in combination Figure 1 The flowchart shown illustrates a method for controller fault detection and fault tolerance result output based on operational data, which specifically includes the following steps:

[0027] S1. Within a preset sampling period, collect the first, second, and third operational quantity measurements output from the controller's internal sampling interface, write them to the sampling period index, and generate an operational observation record. (Refer to...) Figure 2 In this step, it is important to note that:

[0028] S1.1 Within the sampling window corresponding to the sampling period index, the controller's internal sampling interface is triggered to synchronously sample the first operating quantity measurement value, the second operating quantity measurement value, and the third operating quantity measurement value, and the first operating quantity measurement value, the second operating quantity measurement value, and the third operating quantity measurement value are associated with the sampling period index.

[0029] In a preferred embodiment, the preset sampling period is 20 ms. The controller internally sets a local hardware timer as the sampling reference. The hardware timer increments the sampling period index once every sampling period to obtain the current sampling period index. The sampling window corresponding to the sampling period index is a time interval with the start time of the current sampling period as the window start time and the end time of the current sampling period as the window end time. For example, when the sampling period is 20 ms, the sampling window length is 20 ms, the window start time is the time of timer overflow interruption, and the window end time is the next interruption time.

[0030] Within this sampling window, the triggering condition is the arrival of a sampling interrupt and the controller being in running state; the running state can be represented by the running flag bit in the controller's internal status word; specifically, the method for triggering synchronous sampling through the controller's internal sampling interface is as follows: at the entry point of the sampling interrupt service routine, the current sampling period index is latched first, and then the synchronous conversion of multiple analog-to-digital conversion channels is triggered sequentially, and the update and writing of the three sampling values ​​are completed within the same sampling window; the controller's internal sampling interface can be a combination of the controller's internal analog-to-digital converter sampling channel, internal bus sampling register, or drive feedback sampling register; for example, the first running quantity measurement value comes from the latched value of the control output register, the second running quantity measurement value comes from the sampling value of ADC channel 1, and the third running quantity measurement value comes from the sampling value of ADC channel 2 or the current sampling register.

[0031] It should be noted that the specific method of associating the sampling period index with the sampling period index in this embodiment is to bind the fields within the same observation record entry: firstly, the current sampling period index is generated during the sampling interruption, and the three sampling values ​​are written to the temporary variable area; then, the current sampling period index is used as the primary key field of the observation record, and the first, second, and third operation quantity measurement values ​​are written as three numerical fields under the same primary key, so that each operation observation record corresponds to a unique sampling period index.

[0032] As an example, the controller could be an embedded controller used in industrial systems.

[0033] S1.2 Perform range consistency verification and validity mark generation on the first, second and third operating quantity measurement values ​​to obtain the corresponding first validity mark, second validity mark and third validity mark.

[0034] In a preferred embodiment, the range consistency verification includes two parts: range boundary verification and unit / scale consistency verification; wherein:

[0035] Range boundary verification: Set lower and upper threshold values ​​for the first, second, and third operating quantity measurements, and perform comparisons immediately after sampling. For example, the first operating quantity measurement value can be 0% to 100% when it is the duty cycle, the second operating quantity measurement value can be 0 to 6000 rpm when it is the speed, and the third operating quantity measurement value can be 18 V to 32 V when it is the bus voltage. If a measurement value is less than its lower threshold or greater than its upper threshold, it is determined that the measurement value does not meet the range boundary verification within the sampling period.

[0036] Unit / Scale Consistency Check: When there are multiple sources of the same type of quantity inside the controller (for example, the second operating quantity measurement value can be obtained by both ADC and communication message), the same scale source is selected first according to the data source identifier, or a conversion is performed according to the preset scale coefficient before writing, so that the same name fields in the written record maintain the same unit system; if the source switch is detected but the conversion is not completed, the corresponding measurement value is determined to not meet the consistency check.

[0037] Furthermore, in this embodiment, the validity marker generation is accomplished using a binary validity marker + cause code method. The binary validity marker is either 0 or 1: when a measurement value passes both the range boundary check and the unit / scale consistency check, and the measurement value does not contain a null value, a communication timeout placeholder value, or a sampling overflow flag within the sampling window, the corresponding validity marker is set to 1; otherwise, it is set to 0. The cause code can be incorporated into the label source field or a separate invalid cause field can be set, for example, 1 indicates over-range, 2 indicates source misalignment, 3 indicates sampling overflow, 4 indicates placeholder value, etc. Correspondingly, the first validity marker, the second validity marker, and the third validity marker are generated respectively.

[0038] It should be noted that in the subsequent step S2, a recursive prediction model is used to update the observation vector. Outliers in the observation vector will be amplified and propagated to the residuals during the recursive process, resulting in peak values ​​and sign reversals in the residual morphology that are unrelated to the actual faults, thereby reducing the interpretability of the mode consistency score. By completing the range consistency verification and writing validity tags before recording, subsequent steps can remove or reduce the weight of invalid observations based on the validity tags, suppressing the chain propagation of sampling anomalies, residual anomalies, and misjudged faults from the source. Compared with the existing technology that only performs anomaly filtering at the model end, this embodiment binds the traceable validity tags and sampling period indexes and writes them into the running observation records, so that each prediction update and each fault label output can be traced back to the validity status of the corresponding sampling period, which is convenient for online auditing and does not rely on additional offline manual investigation processes.

[0039] S1.3 Write the sampling period index, the first operational quantity measurement value, the second operational quantity measurement value, the third operational quantity measurement value, and the first validity flag, the second validity flag, and the third validity flag into the same operational observation record in the order of preset fields to generate an operational observation record.

[0040] In a preferred embodiment, the preset field order is arranged in the order of index field, numerical field, and tag field, specifically as follows: sampling period index field, first runtime measurement value field, second runtime measurement value field, third runtime measurement value field, first validity tag field, second validity tag field, and third validity tag field.

[0041] The operation observation record is a fixed-length array entry. When writing to the same operation observation record, the fields mentioned above are written sequentially and submitted at once. For example, when the sampling period index is 1050, the first operation quantity measurement value is 35 (duty cycle percentage), the second operation quantity measurement value is 1500 (speed), and the third operation quantity measurement value is 24.5 (voltage), and all three are valid, the operation observation record can be represented as: index = 1050, first operation quantity measurement value = 35, second operation quantity measurement value = 1500, third operation quantity measurement value = 24.5, first validity flag = 1, second validity flag = 1, third validity flag = 1. If the third operation quantity measurement value exceeds the upper limit threshold, the third validity flag is set to 0 and the invalidation reason field can be recorded as over-range.

[0042] S2. Input the operational observation records into the multivariate state-space recursive prediction model constructed based on the extended Kalman filter algorithm, and output the first predicted operational quantity, the second predicted operational quantity, and the third predicted operational quantity. (Refer to...) Figure 3 In this step, it is important to note that:

[0043] S2.1 Construct an observation vector according to the variable order of the first operational quantity measurement value, the second operational quantity measurement value, and the third operational quantity measurement value, and read the state estimation vector of the previous sampling period and the state estimation error covariance matrix of the previous sampling period corresponding to the sampling period index.

[0044] In a preferred embodiment, the controller maintains a state estimation buffer and a covariance buffer for each sampling period. When the current sampling period index arrives, the previous sampling period index corresponding to the current sampling period index is read first, and the state estimation vector and the state estimation error covariance matrix of the previous sampling period are read from the buffer. The reading method is as follows: the previous sampling period index is modulo the buffer length as the address offset, and the corresponding entry is read from the circular buffer, thereby avoiding buffer overflow.

[0045] The observation vector is constructed in the variable order of the first operational quantity measurement value, the second operational quantity measurement value, and the third operational quantity measurement value. The validity mark can be referenced when constructing the vector: when a certain validity mark is 0, the previous valid observation is retained, and the observation noise is set to a larger value to reflect the unreliability.

[0046] For example, the mathematical expression for the observation vector is:

[0047] ;

[0048] in, This is the observation vector corresponding to the current sampling period index; Index of the current sampling period; This is the first measured value of the running quantity; This is the second measured value of the operating quantity; This is the third operational measurement value.

[0049] For example, the mathematical expression for the state estimation vector of the previous sampling period and the covariance matrix of the state estimation error of the previous sampling period is:

[0050] ;

[0051] ;

[0052] in, This is the state estimation vector for the previous sampling period; For the previous sampling period Estimates of each state component; The state estimation error covariance matrix of the previous sampling period; For the first The and the first Covariance elements between state components.

[0053] S2.2. Based on the preset state transition function and its Jacobian matrix and process noise covariance matrix, perform time recursion operation on the state estimation vector of the previous sampling period and the state estimation error covariance matrix of the previous sampling period to obtain the prior state prediction vector and the prior state estimation error covariance matrix.

[0054] In a preferred embodiment, the time recursion operation includes two parts: one-step prediction of the state estimation vector of the previous sampling period based on a preset state transition function, and synchronous prediction of the covariance matrix based on the Jacobian matrix and the process noise covariance matrix; wherein the preset state transition function is a discrete state update with a first-order inertia term, used to describe the smooth evolution of the controller's operating quantity in adjacent sampling periods; for example, the state vector and the observation vector can be set to have the same dimension, and the state transition updates the previous state with a coefficient of 0.1 in each period, while introducing process noise to represent unmodeled disturbances.

[0055] As an example, the mathematical expression for time recursion is:

[0056] ;

[0057] ;

[0058] in, The prior state prediction vector; The prior state estimation error covariance matrix; This is a preset state transition function; For the preset state transition function in Jacobian matrix at the location; for The transpose of the matrix; Let be the process noise covariance matrix.

[0059] For example, It can be a first-order discrete model with a fixed sampling period, for example, setting an attenuation coefficient of 0.95 to 0.99 for each state component and superimposing a small bias term to allow slow drift; It can be a diagonal matrix and can be set according to the fluctuation range of the three operating quantities respectively. For example, the first component corresponds to a variance of 0.1, the second component corresponds to a variance of 10, and the third component corresponds to a variance of 0.05.

[0060] S2.3. Based on the preset observation function and its Jacobian matrix, the prior state prediction vector is mapped to the observation prediction vector, and the observation residual vector is generated by performing a difference operation between the observation vector and the observation prediction vector.

[0061] In a preferred embodiment, a preset observation function is used to map the prior state prediction vector to the observation prediction vector; if the state components and the observation components correspond one-to-one, the observation function is an identity mapping; if the state contains filtered latent variables, the observation function is a selection mapping that selects the corresponding components from the state.

[0062] Specifically, the mapping method in this embodiment is as follows: the first to third components of the prior state prediction vector are respectively used as the first to third observation prediction components according to the variable order to obtain the observation prediction vector; then the observation residual vector is generated by performing a difference operation between the observation vector and the observation prediction vector, and the observation residual vector is input to the correction step as the data of this sampling period.

[0063] To ensure consistency in residual direction, this embodiment uniformly adopts the order of difference between observation and prediction, and this order remains consistent in the subsequent S3 residual definition.

[0064] S2.4 Calculate the Kalman gain based on the prior state estimation error covariance matrix, the Jacobian matrix of the observation function, the observation noise covariance matrix, and the observation residual vector. Then, correct the prior state prediction vector according to the Kalman gain to obtain the state estimation vector for the current sampling period.

[0065] In a preferred embodiment, when calculating the Kalman gain, the residual covariance matrix is ​​first constructed based on the prior state estimation error covariance matrix, the observation function Jacobian matrix, and the observation noise covariance matrix, and then the Kalman gain matrix is ​​obtained.

[0066] In a preferred embodiment, the correction method is as follows: the observation residual vector is weighted by Kalman gain, and the prior state prediction vector is corrected to obtain the current sampling period state estimation vector. At the same time, the current sampling period state estimation error covariance matrix is ​​updated and written back to the buffer.

[0067] For example, its mathematical expression is as follows:

[0068] ;

[0069] ;

[0070] ;

[0071] in, The Kalman gain matrix; For the observation function in Jacobian matrix at the location; for The transpose of the matrix; To observe the noise covariance matrix; Invert a matrix; This is the state estimation vector for the current sampling period; To be determined by the observation function The observation prediction vector obtained through mapping; It is the identity matrix; This is the covariance matrix of the state estimation error for the current sampling period.

[0072] It should be noted that when the controller's operating data contains noise, quantization errors, and short-term disturbances, it is difficult to adaptively balance tracking performance and smoothness if only fixed filtering or simple moving average is used. This results in the predicted operating quantity being too sensitive to sudden disturbances or insufficiently tracking the actual changes. By adaptively adjusting the weight of the observation residuals in each sampling period based on the prior covariance and the observation noise covariance using Kalman gain, the state estimation vector of the current sampling period can simultaneously reflect the historical evolution trend and the current observation innovation information. This allows the subsequent S3 residual sequence to better characterize abnormal deviations that the model cannot explain, rather than measurement noise fluctuations.

[0073] Unlike common fixed-coefficient filtering, this embodiment encodes both prior uncertainty and observation uncertainty into the covariance matrix and participates in gain calculation. This allows the correction to automatically tend to reduce the impact of the observation when the observation validity decreases (e.g., validity is marked as 0 and the corresponding observation noise is increased), thereby reducing the risk of misjudgment.

[0074] S2.5 Perform variable mapping on the current sampling period state estimation vector and output the first predicted runtime, the second predicted runtime, and the third predicted runtime.

[0075] Furthermore, in this embodiment, the variable mapping is an output mapping from state to predicted runtime. If the state components correspond one-to-one with the predicted runtime, the variable mapping is to directly read the first to third components of the current sampling period's state estimation vector and output them as the first, second, and third predicted runtimes, respectively. If the state vector contains bias or disturbance terms, the variable mapping is to select runtime-related components from the state vector and restore them to the observation scale according to a preset scaling factor (e.g., 0.1), while maintaining the output order consistent with the observation vector order. After output, the predicted runtime of the sampling period and the sampling period index are associated and stored in the buffer so that S3 can retrieve them according to the index alignment.

[0076] S3. Based on the difference calculations between the first measured operating quantity and the first predicted operating quantity, the difference calculations between the second measured operating quantity and the second predicted operating quantity, and the difference calculations between the third measured operating quantity and the third predicted operating quantity, a first residual, a second residual, and a third residual are generated respectively; and within a sliding window consisting of N consecutive preset sampling periods, a residual morphology feature vector is generated using a sliding window residual morphology feature extraction method. (Refer to...) Figure 4 In this step, it is important to note that:

[0077] S3.1 Subtract the first predicted operating quantity from the first measured operating quantity to generate the first residual; subtract the second predicted operating quantity from the second measured operating quantity to generate the second residual; subtract the third predicted operating quantity from the third measured operating quantity to generate the third residual.

[0078] S3.2. Using the current sampling period index as the window termination index, select the first residual, the second residual, and the third residual corresponding to N consecutive sampling period indices in chronological order to form a sliding window residual sequence.

[0079] In a preferred embodiment, the sliding window uses the current sampling period index as the window termination index and the window start index as the window termination index, tracing back N-1 sampling period indices. Specifically, the first, second, and third residuals of each period are stored in the residual buffer in the order of the sampling period indices. When the window termination index is reached, the residual triplet corresponding to the window termination index, the index before the window termination index, and the window start index is read sequentially from the residual buffer and arranged in chronological order to form the sliding window residual sequence.

[0080] For example, N can be one of 8, 16 or 32; for example, if it is 16, then when the window termination index is 1050, the sliding window covers 16 sampling periods from index 1035 to 1050.

[0081] S3.3 Perform a window point consistency check on the sliding window residual sequence. When the number of window points is less than N, pad the sliding window residual sequence to N points according to the preset padding value to obtain a window consistent residual sequence; where N is an integer greater than or equal to 2.

[0082] In a preferred embodiment, the window point consistency check includes index continuity check and valid point count check; wherein: the index continuity check is performed by checking whether the sampling period index within the window is incremented sequentially without gaps; if gaps exist, the window point count is determined to be insufficient; the valid point count check is performed by marking the validity of the corresponding sampling period: when any of the three residuals in a certain period is generated by invalid observation and marked as invalid residual, that period can be excluded from the valid point count; if the valid point count is less than N, the window point count is determined to be less than N.

[0083] When the number of points in the window is less than N, it is padded to N points according to the preset padding value. In order to reduce the bias introduced by the morphological features, the preset padding value in this embodiment is the previous valid point value: search for the nearest valid residual point forward from the end direction of the window, and copy the first residual, second residual and third residual of the valid residual point to the missing position respectively, until the window length reaches N; if no valid point is found in the window, zero padding is used as a fallback; for example, when N=16 and only 10 sampling period residuals have been accumulated since the controller was just started, the 10th residual triplet can be copied 6 times to pad so that the window length reaches 16.

[0084] It should be noted that S3.4 requires calculating the peak amplitude, sign flip count, and cumulative absolute residual value over a fixed window length. Inconsistent window lengths can lead to incomparability of feature quantities between different sampling periods, thus ensuring that the cosine consistency score of S4 is affected by changes in window length rather than by fault modes. By uniformly padding the sliding window to N points, the dimension of the morphological feature vector is kept consistent with the statistics, facilitating consistency verification with the pre-stored feature set. Compared with the common strategy of ignoring insufficient windows, this embodiment still outputs comparable features during the startup phase and data intermittent phase, avoiding the system being in an undiscriminable state for a long time. Furthermore, the padding rules clearly control the source of feature deviation, making the pattern matching process more stable.

[0085] S3.4 Within the window-consistent residual sequence, calculate the peak amplitude, sign flip number, and cumulative absolute residual value for the first residual, second residual, and third residual respectively, to obtain the first morphological feature vector, the second morphological feature vector, and the third morphological feature vector.

[0086] In a preferred embodiment, the peak amplitude, the number of sign flips, and the cumulative absolute residual value are all calculated separately within the windowed consistent residual sequence; let the first residual sequence within the window be... The second residual sequence is The third residual sequence is The number in parentheses indicates the time sequence position within the window.

[0087] For example, the peak amplitude is the maximum absolute value within the window, and its mathematical calculation formula is as follows:

[0088] ;

[0089] ;

[0090] ;

[0091] in, The peak amplitude of the first residual; This represents the peak amplitude of the second residual; The peak amplitude of the third residual; Let be the value of the i-th residual at the t-th position within the window; This is for absolute value operations; This is for calculating the maximum value.

[0092] For example, the symbol flip count is the count of changes in symbols between adjacent samples, and its mathematical formula is as follows:

[0093] ;

[0094] ;

[0095] ;

[0096] in, The sign of the first residual has been flipped a number of times. The sign of the second residual has been flipped a number of times. The sign of the third residual has been flipped a number of times. This is an indicator function that takes the value 1 if the condition within the parentheses is true, and 0 otherwise.

[0097] For example, the cumulative absolute residual is the sum of absolute values, and its mathematical formula is as follows:

[0098] ;

[0099] ;

[0100] ;

[0101] in, This is the cumulative absolute residual value of the first residual; This is the cumulative absolute residual value of the second residual; This is the cumulative absolute residual value of the third residual.

[0102] Therefore, the first morphological feature vector can be derived from... The second morphological feature vector can be composed of... The third morphological feature vector can be composed of... For example, when N=16 and the peak amplitude of the first residual within the window is 2.5, the number of sign flips is 3, and the cumulative absolute residual value is 18.2, then the first morphological feature sub-vector is [2.5, 3, 18.2].

[0103] S3.5. Perform vector concatenation in the order of first morphological feature vector, second morphological feature vector, and third morphological feature vector to generate residual morphological feature vector.

[0104] S4. Perform consistency checks on the residual morphological feature vectors with the pre-stored sets of residual morphological features for normal mode, first fault mode, and second fault mode, respectively, to obtain the normal consistency score, the first consistency score, and the second consistency score. (Refer to...) Figure 5 In this step, it is important to note that:

[0105] S4.1. Perform vector consistency calculation on the residual morphological feature vector and each normal feature vector in the pre-stored normal mode residual morphological feature set according to cosine similarity to obtain the normal consistency score sequence; perform vector consistency calculation on the residual morphological feature vector and each first fault feature vector in the pre-stored first fault mode residual morphological feature set according to cosine similarity to obtain the first fault consistency score sequence; perform vector consistency calculation on the residual morphological feature vector and each second fault feature vector in the pre-stored second fault mode residual morphological feature set according to cosine similarity to obtain the second fault consistency score sequence.

[0106] In a preferred embodiment, the residual morphological feature vector is obtained by concatenating three morphological feature sub-vectors in a fixed order, with a fixed dimension of 9. The pre-stored normal mode residual morphological feature set, the first fault mode residual morphological feature set, and the second fault mode residual morphological feature set can be generated offline from historical operating data and stored in a fixed manner. Specifically, several known normal operating intervals, known first fault intervals, and known second fault intervals are selected respectively. For each interval, a feature vector is generated using the same window length N as S3 and the same feature extraction method, and these feature vectors are written into the corresponding sets respectively. To ensure comparability, the sampling period, N value, padding rules, and feature definition order used in offline generation are consistent with those used online.

[0107] As an example, the normal mode residual morphological feature set can contain 50 to 500 normal feature vectors; the first fault mode residual morphological feature set can contain 20 to 200 first fault feature vectors; the second fault mode residual morphological feature set can contain 20 to 200 second fault feature vectors; each feature vector can be accompanied by metadata fields such as source interval number, generation time, and window length N; for example, a normal feature vector is [0.8, 1, 6.5, 1.2, 0, 9.1, 0.5, 2, 4.3]; a first fault feature vector is [2.4, 5, 22.0, 3.1, 2, 28.5, 1.8, 4, 16.2]; a second fault feature vector is [1.6, 1, 14.0, 4.0, 6, 35.0, 0.9, 1, 8.5].

[0108] It should be noted that in this embodiment, the calculation results of the consistency calculation between vectors based on cosine similarity form a normal consistency score sequence, a first fault consistency score sequence, and a second fault consistency score sequence, respectively. The lengths of the three sequences are equal to the number of feature vector entries in the corresponding sets.

[0109] For example, let the residual morphological feature vector be... The pre-stored set of normal pattern residual morphological features is Then the normal consistency score sequence The The scores are:

[0110] ;

[0111] ;

[0112] Let the pre-stored set of residual morphological features for the first fault mode be... Then the first fault consistency score sequence The The scores are:

[0113] ;

[0114] ;

[0115] Let the pre-stored set of residual morphological features for the second fault mode be... Then the second fault consistency score sequence The The scores are:

[0116] ;

[0117] ;

[0118] in, The residual morphological feature vector, This is a pre-stored set of normal pattern residual morphological features. Let i be the i-th normal feature vector in the set of normal pattern residual morphological features. This represents the number of entries in the set of residual morphological features for the normal pattern. The cosine similarity score between the residual morphological feature vector and the i-th normal feature vector is given. This is a normal consistency score sequence; This is the pre-stored set of residual morphological features for the first failure mode. Let j be the j-th first fault feature vector in the first fault mode residual morphological feature set. The number of entries in the residual morphological feature set of the first failure mode. The cosine similarity score between the residual morphological feature vector and the j-th first fault feature vector is given. The first fault consistency score sequence; This is a pre-stored set of residual morphological features for the second failure mode. This represents the k-th second fault feature vector in the set of residual morphological features of the second fault mode. This represents the number of entries in the set of residual morphological features for the second failure mode. The cosine similarity score between the residual morphological feature vector and the k-th second fault feature vector is given. This is the second fault consistency score sequence; This is a vector transpose operation; Let L be the L2 norm of the vector; It is a preset, extremely small positive number used to avoid the denominator being zero.

[0119] S4.2 Perform sequence aggregation operation on the normal consistency score sequence, the first fault consistency score sequence, and the second fault consistency score sequence respectively to obtain the normal consistency score, the first consistency score, and the second consistency score; wherein, the sequence aggregation operation includes: selecting the K largest scores in the score sequence according to the preset Top-K number of entries and calculating their mean, where K is an integer greater than or equal to 1 and less than or equal to the length of the score sequence.

[0120] In a preferred embodiment, the sequence aggregation operation selects the K highest scores in the score sequence according to a preset Top-K number of entries and calculates their average to obtain the final consistency score; wherein, the value of K can be set according to the size of the set: when the set size is small (e.g., less than 30 entries), K can be 3 or 5; when the set size is large (e.g., more than 100 entries), K can be 5, 8 or 10; for example, when the normal mode set contains 200 feature vectors, K can be 8; when the first fault mode set contains 60 feature vectors, K can be 5; when the second fault mode set contains 60 feature vectors, K can be 5.

[0121] Specifically, in this embodiment, the execution order of the aggregation operation is as follows: first, sort the score sequence in descending order; then take the first K scores after sorting; and then calculate the average of the K scores as the final consistency score of the corresponding pattern.

[0122] It should be noted that a single maximum value is more sensitive to accidental matching or anomalous noise, and is prone to overestimating the score due to a single outlier feature vector; while Top-K mean requires high consistency among multiple similar samples, which can improve the robustness of pattern discrimination; compared with the common whole sequence mean method, Top-K mean weakens the dilution effect of historical samples far from the current state on the score, so that the consistency score more centrally reflects the cluster of samples closest to the current residual pattern, thereby improving the fault mode discrimination and reducing the misjudgment of boundary samples.

[0123] S5. Based on the comparison between the normal consistency score and the preset fault discrimination threshold, output a normal label or a fault label. When outputting the fault label, determine the first fault label or the second fault label based on the comparison result of the first consistency score and the second consistency score. Generate fault-tolerant result output data based on the output label and output it. Note that the following should be noted in this step:

[0124] S5.1 When the normal consistency score is greater than or equal to the preset fault discrimination threshold, a normal label is generated; when the normal consistency score is less than the preset fault discrimination threshold, a fault label is generated.

[0125] In this embodiment, the preset fault discrimination threshold is used to determine whether the current residual pattern is still consistent with the normal mode. The threshold can be obtained by offline calibration: calculate the normal consistency score sequence on known normal operation data, and take its percentile as the threshold to control the false alarm rate. For example, the 5th percentile or 10th percentile of the normal consistency score can be taken as the threshold, so that only a small number of windows on normal data will be judged as faults.

[0126] For example, offline statistics show that the normal consistency score is mostly distributed between 0.85 and 0.98 on normal data, with a small number of low values ​​distributed around 0.78. Therefore, the threshold can be set to 0.82. When running online, a normal label is generated when the normal consistency score is greater than or equal to 0.82, and a fault label is generated when the normal consistency score is less than 0.82.

[0127] For example, the normal label is denoted as NORMAL, and the fault label is denoted as FAULT; where the first fault label is denoted as FAULT_1, and the second fault label is denoted as FAULT_2.

[0128] S5.2 When generating fault labels, the first consistency score and the second consistency score are compared. When the first consistency score is greater than or equal to the second consistency score, the first fault label is generated; when the first consistency score is less than the second consistency score, the second fault label is generated.

[0129] S5.3. Associate the generated normal or faulty labels with the window termination index and write them into the label record entry, wherein the label record entry includes at least the label type field and the label source field.

[0130] In a preferred embodiment, the tag record entry is a fixed-length record structure, which includes at least a window termination index field, a tag type field, and a tag source field.

[0131] Specifically, the associated writing method is as follows: the window termination index is used as the index field to write the first field of the tag record entry; the generated normal tag or fault tag is written to the tag type field; the tag source field is written as the source identifier that generated the tag, such as writing residual morphology matching or writing the corresponding algorithm version number / feature version number; then the tag record entry is written to the circular tag log area, and the tag sequence number is incremented during writing to trace the output order.

[0132] S5.4. Based on the tag type field in the tag record entry, read the target fault tolerance code and target fault tolerance action index from the pre-stored tag fault tolerance mapping table, and generate fault tolerance result output data; wherein, when the tag type field is a normal tag, the target fault tolerance code is the preset default fault tolerance code, and the target fault tolerance action index is the preset default action index; when the tag type field is a first fault tag, the target fault tolerance code is the first fault fault tolerance code, and the target fault tolerance action index is the first fault action index; when the tag type field is a second fault tag, the target fault tolerance code is the second fault fault tolerance code, and the target fault tolerance action index is the second fault action index; and write the window termination index and the tag type field into the index field and tag field of the fault tolerance result output data.

[0133] In a preferred embodiment, the pre-stored tag fault tolerance mapping table is a key-value table structure, where the key is the tag type field and the value is the target fault tolerance code and the target fault tolerance action index. The reading method is as follows: after generating the tag, the corresponding entry is searched in the mapping table using the tag type field as the query key, and the target fault tolerance code and the target fault tolerance action index are read. The fault tolerance code can be an integer or an enumerated code, and the fault tolerance action index can be the entry number in the action library.

[0134] For example, the default fault tolerance code can be 0, and the default action index can be 0; the first fault fault tolerance code can be 101, and the first fault action index can be 3; the second fault fault tolerance code can be 102, and the second fault action index can be 5; for example, the action library entries corresponding to the action index are: action index 3 corresponds to limiting the upper limit of the first running quantity output and entering the degradation control configuration, and action index 5 corresponds to switching to the backup sensor channel and freezing the output change rate.

[0135] It should also be noted in this embodiment that the above action description is an example. The actual action library can be configured according to the controller type, but the action index and action item correspond one-to-one and are fixed.

[0136] The fault tolerance result output data is a fixed-length data frame, which includes at least an index field, a tag field, a fault tolerance code field, an action index field, and a verification field. Among them, the index field is written to the window termination index; the tag field is written to the tag type field; the fault tolerance code field is written to the target fault tolerance code; the action index field is written to the target fault tolerance action index; and the verification field is written to the cyclic redundancy check result. In order to maintain the consistency of the fields, the values ​​of the index field and the tag field are both derived from the same tag record entry to avoid inconsistencies caused by repeated generation in different modules.

[0137] S5.5 Write the fault-tolerant result output data into the output buffer entry associated with the preset output interface, and write the output sequence number synchronously when writing the output buffer entry; wherein, the output sequence number is generated by incrementing according to the number of writes, and the output buffer entry is marked as a valid entry; the preset output interface reads the output buffer entry marked as a valid entry and outputs the fault-tolerant result output data.

[0138] In a preferred embodiment, the preset output interface can be an internal communication interface or a peripheral interface of the controller, such as one of a CAN interface, a serial port interface or a shared memory interface; the controller internally sets the output buffer as a ring buffer structure, and each output buffer entry includes an output sequence number field, a valid flag field and a fault-tolerant result output data field.

[0139] Specifically, the writing method in this embodiment is as follows: after generating the fault-tolerant result output data, first select the next write position in the output buffer; generate the output sequence number by incrementing the number of writes and write it into the output sequence number field; write the fault-tolerant result output data into the data field as a whole; set the valid flag field to valid; to avoid read and write conflicts, the order of writing data and sequence number first and then setting the valid flag can be adopted; when reading from the output interface, only read the entries with valid flags, and after reading, the valid flag of the entry can be cleared to zero.

[0140] For example, when the window termination index is 1050, the label is FAULT_1, the target fault tolerance code is 101, and the target fault tolerance action index is 3, the fault tolerance result output data may include: index field = 1050, label field = FAULT_1, fault tolerance code field = 101, action index field = 3, and verification field = the verification value calculated based on the aforementioned fields; if it is a normal label, then the label field = NORMAL, the fault tolerance code field = 0, and the action index field = 0.

[0141] In one example application scenario, the monitored object is an embedded control computing node of industrial equipment. The preset sampling period is 20 ms. The first operational quantity measurement value is taken as the load demand command (unit: percentage, range: 0-100), the second operational quantity measurement value is taken as the measurement value of a pressure / torque sensor (unit: bar or N·m, range: 0-200), and the third operational quantity measurement value is taken as the actuator drive current measurement value (unit: A, range: 0-120). When the current sampling period index is 1050, the sampling interface synchronously samples and obtains: the first operational quantity measurement value is 35, the second operational quantity measurement value is 72, and the third operational quantity measurement value is 48. The sampling period index is then compared with the three measurement values. The validity marker is written into the running observation record. Then, the running observation record is input into the multivariate state space recursive prediction model to obtain the first prediction run quantity as 35, the second prediction run quantity as 70, and the third prediction run quantity as 46. Based on this, the first residual is 0, the second residual is 2, and the third residual is 2. Using the current sampling period index as the window termination index, three residual sequences are formed within a sliding window consisting of N consecutive sampling periods (N=16). The residual morphology features such as peak amplitude, number of sign flips, and cumulative absolute residual value are extracted to obtain the residual morphology feature vector.

[0142] In this example, the residual morphological feature vector is checked for consistency with the pre-stored normal mode residual morphological feature set, the first fault mode residual morphological feature set, and the second fault mode residual morphological feature set, and Top-K aggregation is used to obtain three types of scores. For example, if the calculated normal consistency score is 0.91, the first consistency score is 0.42, and the second consistency score is 0.38, and the preset fault discrimination threshold is 0.82, then if the normal consistency score is greater than or equal to the preset fault discrimination threshold, a normal label is output. At this time, the label type field is NORMAL, and a label record entry is written. The preset default fault tolerance code and the preset default action index are read from the label fault tolerance mapping table, and the preset default fault tolerance code is set to 0 and the preset default action index is set to 0. Action index 0 corresponds to maintaining the current control strategy and not entering degradation.

[0143] In the example with sampling period index 1096, if sensor drift causes the second operational quantity measurement value to be too high, the observation is: the first operational quantity measurement value is still 35, the second operational quantity measurement value becomes 95, and the third operational quantity measurement value is 47. The prediction is: the first predicted operational quantity is 35, the second predicted operational quantity is 71, and the third predicted operational quantity is 46. Then, the peak value of the second residual and the cumulative absolute residual within the residual window increase significantly, and the final normal consistency score is 0.61 (lower than 0.82), the first consistency score is 0.88, and the second consistency score is 0.54. At this time, the fault label is output first, and then the first consistency score and the second consistency score are compared. The first consistency score is larger, so the first fault label is output. This first fault label can correspond to the pressure sensor offset / drift type fault mode in this example scenario. Its characteristics are that the second residual is positively biased for a long time, the sign flip is less, and the cumulative absolute residual increases.

[0144] Based on the above label results, the label fault tolerance mapping table provides examples of corresponding fault tolerance codes and action indices: When it is a normal label, the target fault tolerance code is 0 and the target fault tolerance action index is 0; when it is a first fault label, the first fault fault tolerance code example is 101, the first fault action index example is 3, and action index 3 corresponds to freezing the second running quantity measurement value channel and switching to the backup estimated value (output by the model status) to participate in subsequent calculations, while limiting the rate of change of the instruction quantity corresponding to the second running quantity; when it is a second fault label, the second fault fault tolerance code example is 102, the second fault action index example is 5, and action index 5 corresponds to entering a safety degradation when the third running quantity channel is abnormal: limiting the upper limit of the execution output associated with the third running quantity and triggering an alarm; accordingly, fault tolerance result output data is generated, and the example uses fixed-length fields: the index field writes the window termination index, the label field writes the label type, the fault tolerance code field writes the target fault tolerance code, the action index field writes the target fault tolerance action index, and an output sequence number is attached.

[0145] Taking the first fault tag with sampling period index 1096 as an example, the output sequence number is incremented to obtain the output sequence number 2501. Then the fault tolerance result output data can be represented as: index field = 1096, tag field = FAULT_1, fault tolerance code field = 101, action index field = 3, output sequence number = 2501. This data is written to the output buffer and output to the fault management module through the preset output interface. If a second fault tag appears later, the output index field = 1132, tag field = FAULT_2, fault tolerance code field = 102, action index field = 5, and the corresponding degradation action indication is output synchronously so that the external system can perform consistent processing and recording based on the fault tolerance code and action index.

[0146] In the application of the above embodiments, other aspects of the present invention also disclose a computer device, including: one or more processors and a memory.

[0147] The memory is used to store operable instructions that, when executed by the one or more processors, cause the one or more processors to perform operations, including the flow of the controller fault detection and fault tolerance result output method based on runtime data in the foregoing embodiments, especially... Figure 1 The flowchart of the method is shown.

[0148] Other aspects disclosed in the embodiments of the present invention also propose a computer-readable medium for storing software including instructions executable by one or more computers, which, upon execution, cause the one or more computers to perform operations including the flow of the controller fault detection and fault tolerance result output method based on runtime data of the foregoing embodiments, particularly... Figure 1 The flowchart of the method is shown.

[0149] It should be recognized that embodiments of the present invention may be implemented or carried out by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable storage medium.

[0150] The method can be implemented using standard programming techniques, including a non-transitory computer-readable storage medium configured with a computer program in the computer program, wherein the storage medium is configured such that the computer operates in a specific and predefined manner.

[0151] Each program can be implemented in a high-level procedural or object-oriented programming language to communicate with the computer system; however, if required, the program can be implemented in assembly or machine language.

[0152] In any case, the language can be either compiled or interpreted.

[0153] Furthermore, for this purpose, the program can run on programmed application-specific integrated circuits.

[0154] The processes described herein (or variations and / or combinations thereof) can be executed under the control of one or more computer systems configured with executable instructions, and can be implemented by hardware or a combination thereof as code (e.g., executable instructions, one or more computer programs, or one or more applications) that commonly executes on one or more processors. The computer program includes a plurality of instructions executable by one or more processors.

[0155] Furthermore, the method can be implemented in any suitable computing platform, including but not limited to personal computers, minicomputers, mainframes, workstations, networked or distributed computing environments, standalone or integrated computer platforms, or in communication with charged particle tools or other imaging devices.

[0156] Various aspects of the present invention can be implemented in machine-readable code stored on a non-transitory storage medium or device, whether portable or integrated into a computing platform, such as a hard disk, optical read and / or write storage medium, RAM, ROM, etc., such that it can be read by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the processes described herein.

[0157] Furthermore, machine-readable code, or parts thereof, can be transmitted via wired or wireless networks.

[0158] When such media includes instructions or programs that combine with a microprocessor or other data processor to implement the steps described above, the invention described herein includes these and other different types of non-transitory computer-readable storage media.

[0159] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for controller fault detection and fault tolerance result output based on operational data, characterized in that, include: Within a preset sampling period, the first, second, and third operational quantity measurement values ​​output by the internal sampling interface of the controller are collected, written into the sampling period index, and operational observation records are generated. The operation observation records are input into a multivariate state-space recursive prediction model constructed based on the extended Kalman filter algorithm, and the first predicted operation quantity, the second predicted operation quantity, and the third predicted operation quantity are output. Based on the difference between the first measured operating volume and the first predicted operating volume, the difference between the second measured operating volume and the second predicted operating volume, and the difference between the third measured operating volume and the third predicted operating volume, a first residual, a second residual, and a third residual are generated respectively; and within a sliding window consisting of N consecutive preset sampling periods, a residual morphology feature vector is generated using a sliding window residual morphology feature extraction method. The residual morphological feature vector is compared with the pre-stored normal mode residual morphological feature set, the first fault mode residual morphological feature set, and the second fault mode residual morphological feature set to obtain the normal consistency score, the first consistency score, and the second consistency score. Based on the comparison between the normal consistency score and the preset fault discrimination threshold, a normal label or a fault label is output. When outputting a fault label, a first fault label or a second fault label is determined based on the comparison result between the first consistency score and the second consistency score. Fault tolerance result output data is generated and output based on the output label.

2. The controller fault detection and fault tolerance result output method based on operational data according to claim 1, characterized in that, The method for generating operational observation records includes: Within the sampling window corresponding to the sampling period index, the internal sampling interface of the controller is triggered to synchronously sample the first operating quantity measurement value, the second operating quantity measurement value, and the third operating quantity measurement value, and associate the first operating quantity measurement value, the second operating quantity measurement value, and the third operating quantity measurement value with the sampling period index; Perform range consistency verification and validity mark generation on the first operational quantity measurement value, the second operational quantity measurement value and the third operational quantity measurement value to obtain the corresponding first validity mark, second validity mark and third validity mark; The sampling period index, the first operational quantity measurement value, the second operational quantity measurement value, the third operational quantity measurement value, the first validity flag, the second validity flag, and the third validity flag are written into the same operational observation record in a preset field order to generate the operational observation record.

3. The controller fault detection and fault tolerance result output method based on operational data according to claim 2, characterized in that, Outputting the first predicted runtime, the second predicted runtime, and the third predicted runtime includes: An observation vector is constructed according to the variable order of the first operational quantity measurement value, the second operational quantity measurement value, and the third operational quantity measurement value, and the state estimation vector and the state estimation error covariance matrix of the previous sampling period corresponding to the sampling period index are read. Based on the preset state transition function and its Jacobian matrix and process noise covariance matrix, a time recursive operation is performed on the state estimation vector of the previous sampling period and the state estimation error covariance matrix of the previous sampling period to obtain the prior state prediction vector and the prior state estimation error covariance matrix. Based on the preset observation function and its Jacobian matrix, the prior state prediction vector is mapped to the observation prediction vector, and the observation residual vector is generated by performing a difference operation between the observation vector and the observation prediction vector. The Kalman gain is calculated based on the prior state estimation error covariance matrix, the Jacobian matrix of the observation function, the observation noise covariance matrix, and the observation residual vector. The prior state prediction vector is then corrected based on the Kalman gain to obtain the current sampling period state estimation vector. Perform variable mapping on the current sampling period state estimation vector to output the first predicted running quantity, the second predicted running quantity, and the third predicted running quantity.

4. The controller fault detection and fault tolerance result output method based on operational data according to claim 3, characterized in that, The difference operation includes: Subtract the first predicted operating amount from the first measured operating amount to generate the first residual; Subtract the second predicted operating amount from the second measured operating amount to generate the second residual; The third residual is generated by subtracting the third predicted operating quantity from the third measured operating quantity.

5. The controller fault detection and fault tolerance result output method based on operational data according to claim 1, characterized in that, The method for generating residual morphological feature vectors includes: Using the current sampling period index as the window termination index, select the first, second, and third residuals corresponding to N consecutive sampling period indices in chronological order to form a sliding window residual sequence; A window point consistency check is performed on the sliding window residual sequence. When the number of window points is less than N, the sliding window residual sequence is padded to N points according to a preset padding value to obtain a window-consistent residual sequence; where N is an integer greater than or equal to 2. Within the window-consistent residual sequence, the peak amplitude, sign flip number, and cumulative absolute residual value are calculated for the first residual, the second residual, and the third residual, respectively, to obtain the first morphological feature vector, the second morphological feature vector, and the third morphological feature vector; The residual morphological feature vector is generated by concatenating the first morphological feature sub-vector, the second morphological feature sub-vector, and the third morphological feature sub-vector in the concatenation order.

6. The controller fault detection and fault tolerance result output method based on operational data according to claim 5, characterized in that, The method for performing consistency verification includes: The consistency between the residual morphological feature vector and each normal feature vector in the pre-stored normal mode residual morphological feature set is calculated using cosine similarity to obtain a normal consistency score sequence; the consistency between the residual morphological feature vector and each first fault feature vector in the pre-stored first fault mode residual morphological feature set is calculated using cosine similarity to obtain a first fault consistency score sequence; the consistency between the residual morphological feature vector and each second fault feature vector in the pre-stored second fault mode residual morphological feature set is calculated using cosine similarity to obtain a second fault consistency score sequence. Sequence aggregation operations are performed on the normal consistency score sequence, the first failure consistency score sequence, and the second failure consistency score sequence to obtain the normal consistency score, the first consistency score, and the second consistency score; wherein, the sequence aggregation operation includes: selecting K maximum scores from the score sequence according to a preset Top-K number of entries and calculating their mean, where K is an integer greater than or equal to 1 and less than or equal to the length of the score sequence.

7. The controller fault detection and fault tolerance result output method based on operational data according to claim 6, characterized in that, The method for comparing the normal consistency score with the preset fault discrimination threshold includes: When the normal consistency score is greater than or equal to the preset fault discrimination threshold, a normal label is generated; when the normal consistency score is less than the preset fault discrimination threshold, a fault label is generated. When generating the fault label, the first consistency score and the second consistency score are compared. When the first consistency score is greater than or equal to the second consistency score, a first fault label is generated; when the first consistency score is less than the second consistency score, a second fault label is generated. The generated normal label or fault label is associated with the window termination index and written into a label record entry, wherein the label record entry includes at least a label type field and a label source field.

8. The controller fault detection and fault tolerance result output method based on operational data according to claim 7, characterized in that, The method for generating and outputting fault-tolerant result output data includes: Based on the tag type field in the tag record entry, the target fault tolerance code and target fault tolerance action index are read from the pre-stored tag fault tolerance mapping table, and fault tolerance result output data is generated. Specifically, when the tag type field is a normal tag, the target fault tolerance code is a preset default fault tolerance code, and the target fault tolerance action index is a preset default action index; when the tag type field is a first fault tag, the target fault tolerance code is a first fault fault tolerance code, and the target fault tolerance action index is a first fault action index; when the tag type field is a second fault tag, the target fault tolerance code is a second fault fault tolerance code, and the target fault tolerance action index is a second fault action index. The window termination index and the tag type field are then written into the index field and tag field of the fault tolerance result output data. The fault-tolerant result output data is written into the output buffer entry associated with the preset output interface, and the output sequence number is written synchronously when the output buffer entry is written; wherein, the output sequence number is generated by incrementing according to the number of writes, and the output buffer entry is marked as a valid entry; the preset output interface reads the output buffer entry marked as a valid entry and outputs the fault-tolerant result output data.

9. A computer device, characterized in that, include: One or more processors; The memory stores operable instructions that, when executed by the one or more processors, cause the one or more processors to perform operations, including the flow of the controller fault detection and fault tolerance result output method based on runtime data as described in any one of claims 1 to 8.

10. A computer-readable medium for storing software, characterized in that: The software includes instructions executable by one or more computers, which cause the one or more computers to perform operations, including the flow of the controller fault detection and fault tolerance result output method based on operating data as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • CAN bus intrusion detection method based on adaptive unscented Kalman filtering

    CN120528633A

  • Distributed intelligent front-end multichannel thermocouple data analysis method and system

    CN121275164A