A controller abnormal condition self-diagnosis method
By employing a segmented and corrective self-diagnostic method, the problems of misjudgment and missed judgment under abnormal controller conditions are solved, achieving accurate diagnosis under abnormal conditions and ensuring the consistency and stability of diagnostic conclusions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 西安众望能源科技有限公司
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-05
AI Technical Summary
Existing self-diagnostic methods for abnormal controller conditions are prone to misjudgment or omission in scenarios with irregular signal fluctuations, leading to inconsistent diagnostic conclusions and difficulty in accurately identifying the true abnormal state of the controller.
The system generates operating condition segments in segments, marks transitional operating condition segments, trains an operating condition recognition model using historical stable operating condition segments, generates a normal reference sequence and aligns it with the relative deviation sequence, extracts morphological differences and frequency band structure information, performs logistic regression to correct deviations and outputs the results, and uses a hidden Markov model for consistency verification, outputting the final analysis results.
To reduce false positives and false negatives under abnormal controller conditions, ensure the consistency and reliability of diagnostic conclusions, adapt to the timing patterns of controller operation, and maintain the stability and traceability of diagnostic capabilities.
Smart Images

Figure CN122151822A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning, and more specifically, to a method for self-diagnosing abnormal operating conditions of a controller. Background Technology
[0002] During the operation of controllers in industrial automated production lines, process control devices, robot workstations, or vehicle-mounted electronic control units, controllers typically need to switch between different operating modes, including scenarios such as start-stop interlocking, process recipe switching, load step changes, and actuator entry / exit. Existing self-diagnostic solutions mostly collect operating information and a small amount of key status information on the controller side, organize the data to form training samples, and establish a diagnostic model. When the equipment is running online, the model is input based on the key status collected in real time to obtain prediction results. The prediction results are then compared with the actual key status collected, and diagnostic conclusions are output in combination with operating modes, alarm flags, or log information. This approach can complete automatic judgment with low computational overhead when the controller is in a stable operating condition and the signal fluctuation pattern is relatively fixed. It is easy to integrate into the controller body or edge-side diagnostic modules, thus forming a common technical route for intelligent controller diagnosis.
[0003] However, in scenarios involving controller self-diagnosis under abnormal operating conditions, such as production line cycle time adjustments leading to control strategy switching, equipment switching to backup execution links, rapid load changes causing temporary corrections to closed-loop parameters, and short-term mismatches between sensor feedback and execution response during mode switching, the change patterns of critical states are significantly different from those in stable operation phases. Existing diagnostic models at this stage tend to misjudge deviations caused by changes in normal operating conditions as faults or anomalies. Alternatively, by relaxing the judgment to suppress false alarms, they may fail to identify true early anomalies in a timely manner. This can lead to inconsistent diagnostic conclusions for the same equipment in adjacent time periods, fluctuating alarm levels, and difficulties in verifying conclusions. On-site maintenance personnel may find it difficult to quickly determine whether the controller is in a true abnormal state, and subsequent handling paths may be misled.
[0004] Therefore, it is necessary to propose a controller self-diagnosis method suitable for abnormal operating conditions. Summary of the Invention
[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a self-diagnosis method for abnormal operating conditions of a controller. This method generates operating condition segments by dividing the system into segments based on operating identifiers and key state variables, marks transitional operating condition segments, trains an operating condition identification model using historical stable operating condition segments, outputs the corresponding operating condition identifier, generates a normal reference sequence, and aligns these segments to obtain a relative deviation sequence. It then extracts morphological difference representations and frequency band structure fitting representations, performs quantile standard processing, obtains anomaly confidence coefficients through logistic regression, corrects the original discrimination output of the deviation discrimination model to obtain preliminary conclusions, locates adjacent operating condition segments according to time sequence, and uses a hidden Markov model for consistency verification. If the verification passes, the normal reference sequence and the deviation discrimination model are updated; if the verification fails, the final analysis result is output, thus solving the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: S1: Collect the operation identifier and key status quantities, generate operating condition segments according to the consistent interval of the operation identifier, generate operating condition segment identifiers and time sequence, and mark the operating condition segments on both sides of the change of the operation identifier as transition operating condition segments. S2: Non-transitional operating condition segments constitute historical stable operating condition segments. The operating condition identification model outputs the operating condition identifier of the current operating condition segment. Based on the operating condition identifier, a normal reference sequence is generated and aligned with the operating condition to obtain the relative deviation sequence. S3: The relative deviation sequence constructs the morphological sequence deviation information and the frequency domain structure fit information. It is processed according to the quantile standard of the corresponding working condition. Logistic regression is used to obtain the anomaly confidence coefficient. The anomaly confidence coefficient is used to correct the original discrimination output of the deviation discrimination model to obtain preliminary conclusions. S4: The working condition segment identifier and time sequence location of adjacent working condition segments are used to obtain the consistency verification result of the hidden Markov model. If the result passes, the normal reference sequence and the deviation discrimination model are updated. If the result fails, the final analysis result is output.
[0007] Furthermore, the operation identifier, key status variables, and timestamps form a continuous record sequence; the operation identifier is limited to a finite set of codes, and null values and values not in the set are written into unknown codes; the continuous record sequence is arranged in ascending order of timestamps; the operation identifier is subjected to sliding window mode filtering to obtain an integer operation identifier, and when the modes are parallel, the current record value is used, and when the current record is an unknown code, the non-unknown code value that is close in time is used.
[0008] Furthermore, the shaping operation identifier uses operation length encoding to generate operating condition segments; the operating condition segments are bound to the operating condition segment identifier, segment operation identifier, and time sequence; when the segment length is less than the minimum segment length, segment merging is performed, and the merging direction is determined based on the consistency of adjacent segment operation identifiers and time proximity; after the operating condition segment set is merged, transitional operating condition segments and non-transitional operating condition segments are marked according to the changes in adjacent segment operation identifiers; the segmentation result outputs the operating condition segment identifier, time sequence, segment type label, and key state quantity sequence.
[0009] Furthermore, the segmentation results are filtered to identify segments that are classified as non-transitional operating conditions, forming a set of historical stable operating condition segments. The segment operation identifier is mapped to an operating condition label according to the controller operation mode definition table, and the key state quantity sequence and the operating condition label form a training sample. The temporal convolutional network is trained with the training sample to obtain the operating condition recognition model, and the operating condition recognition model outputs the operating condition probability distribution.
[0010] Furthermore, the working condition identification model infers the working condition identifier from the key state quantity sequence of the current working condition segment; selects candidate sequences with the same working condition identifier from the set of historical stable working condition segments, and determines the candidate sequence corresponding to the minimum sum of dynamic time warping distances as the normal reference sequence; the dynamic time warping aligns the key state quantity sequence of the current working condition segment with the normal reference sequence to generate a relative deviation sequence, and outputs the working condition identifier and the relative deviation sequence.
[0011] Furthermore, the morphological sequence deviation information includes the sequence pattern dispersion; the relative deviation sequence is encoded using the sequence arrangement pattern, and when equal values appear within the window, a position priority rule is used to obtain a unique sequence pattern symbol sequence; the sequence pattern symbol sequence is statistically analyzed and normalized to obtain the current sequence pattern symbol distribution; the corresponding working condition identifier is located in the same working condition sequence pattern reference distribution; the current sequence pattern symbol distribution and the same working condition sequence pattern reference distribution are smoothed and then the sequence pattern dispersion is calculated.
[0012] Furthermore, the frequency domain structure fitting information includes the frequency energy fitting amount; the relative deviation sequence is subjected to discrete wavelet transform, the wavelet basis and the number of decomposition layers adopt fixed configuration terms, and the two ends of the sequence are symmetrically extended; the sub-band coefficients of each scale are used to calculate the sub-band energy and normalize it to obtain the current frequency energy distribution; the corresponding working condition identifier is used to locate the frequency energy benchmark distribution of the same working condition; the frequency energy fitting amount is calculated between the current frequency energy distribution and the frequency energy benchmark distribution of the same working condition.
[0013] Furthermore, the reference sample set for the identification of the corresponding working condition is provided, which provides a reference sequence of serial ridge dispersion and a reference sequence of frequency-energy misalignment. The serial ridge dispersion and frequency-energy misalignment are processed by quantile standard to obtain the rarity of the same working condition. The logistic regression model outputs anomaly confidence coefficients with two rarity values. The anomaly confidence coefficients are used to perform confidence scaling on the original discrimination output of the deviation discrimination model to obtain a corrected discrimination output and generate preliminary conclusions.
[0014] Furthermore, the working condition segment identifiers are located according to the time sequence to form a set of adjacent working condition segment identifiers with the preceding and subsequent working condition segment identifiers. The adjacent working condition segment identifiers marked as transitional working condition segments are deleted from the set of adjacent working condition segment identifiers. The adjacent working condition segment identifier set reads the correction and discrimination output sequence and the preliminary conclusion sequence to form a consistency verification input packet.
[0015] Furthermore, the consistency verification input package uses a hidden Markov model and Viterbi decoding to obtain the backtracking hidden state sequence. When the backtracking hidden state and the preliminary conclusion satisfy the semantic consistency rule, the consistency verification result is passed; when they do not satisfy the semantic consistency rule, the consistency verification result is failed. When the consistency verification result is passed, the sample to be updated is marked and the normal reference sequence and the bias discrimination model are updated. When the consistency verification result is failed, the final analysis result is output.
[0016] This invention provides a self-diagnostic method for abnormal operating conditions of a controller, which involves machine learning technology. Its technical effects and advantages are as follows: This invention segments operating conditions by using segmentation markers, and separately marks segments near the operating condition switching boundary. Based on this, it first identifies the corresponding operating condition, and then generates a relative deviation sequence by aligning it with a normal reference sequence for the same operating condition. This ensures that diagnostic comparisons always fall within the same operating condition context, mitigating the comparability decline caused by changes in operating status during abnormal operating condition phases from the outset. Subsequently, complementary characterization is used to characterize the relative deviation, and standardization is performed at the scale of the corresponding operating condition. An anomaly confidence coefficient is used to correct the discrimination output, ensuring consistent diagnostic conclusions during operating condition switching and fluctuation phases. This reduces the probability of misjudging normal operating condition changes as faults, while avoiding the risk of missed detections due to overly relaxed judgments in an attempt to suppress false alarms.
[0017] At the output level, this invention introduces consistency verification of adjacent operating condition segments to distinguish the occasional fluctuations of a single segment from the stable trends of consecutive segments, making the final analysis results more consistent with the timing patterns of the controller's operation. Furthermore, model updates and reference sequence updates are constrained by consistency verification, reducing the chance of unreliable segments entering the update process. This maintains the diagnostic capability while adjusting to changes in the field, ensuring stability and traceability, thus better adapting to the long-term online self-diagnosis needs of the controller under abnormal operating conditions. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a self-diagnosis method for abnormal operating conditions of a controller according to the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Please see Figure 1 This invention provides a self-diagnostic method for abnormal operating conditions of a controller, comprising: S1: Collect operation identifiers and key status quantities, generate operating condition segments according to the consistent interval of operation identifiers, generate operating condition segment identifiers and time sequence, and mark the operating condition segments on both sides of the change of operation identifier as transition operating condition segments.
[0021] S2: Non-transitional operating condition segments constitute historical stable operating condition segments. The operating condition identification model outputs the operating condition identifier of the current operating condition segment. Based on the operating condition identifier, a normal reference sequence is generated and aligned with the operating condition to obtain the relative deviation sequence.
[0022] S3: The relative deviation sequence constructs the morphological sequence deviation information and frequency domain structure fit information. Based on the corresponding working condition identification quantile standard, it is processed, and logistic regression is used to obtain the anomaly confidence coefficient. The anomaly confidence coefficient corrects the original discrimination output of the deviation discrimination model, and a preliminary conclusion is obtained.
[0023] S4: The working condition segment identifier and time sequence location of adjacent working condition segments are used to obtain the consistency verification result of the hidden Markov model. If the result passes, the normal reference sequence and the deviation discrimination model are updated. If the result fails, the final analysis result is output.
[0024] The approach of this invention is to first separate normal fluctuations caused by abnormal operating conditions from actual fault signs, and then complete a reliable judgment within the same operating condition context. The method first uses operational identifiers to segment continuous operating data into operating condition segments, and separately marks transitional operating condition segments near the operating condition switching boundary to prevent switching disturbances from directly entering stable references. Then, it trains an operating condition recognition model based on historical stable operating condition segments, determines the operating condition to which the current operating condition segment belongs online, and selects a normal reference sequence of the same operating condition for alignment, generating a relative deviation sequence to ensure consistent comparison objects. Next, it extracts complementary morphological difference information and frequency band structure fitting information from the relative deviation sequence, performs standardization at the same operating condition scale, and generates an anomaly confidence coefficient to correct the deviation discrimination model output, reducing misjudgments and omissions during abnormal operating condition stages. Finally, it introduces a consistency check between adjacent operating condition segments, using time continuity to constrain single-segment conclusions, and controls model updates by the consistency check, ensuring stable diagnostic conclusions and preventing the update process from being misled by occasional fluctuations.
[0025] Step S1 is the starting point for self-diagnosis of abnormal operating conditions of the controller. The controller's operating information arrives continuously on the time axis. The operating identifier is prone to short-term fluctuations near the switching of operating conditions. The key state quantities synchronously show transient changes during the switching period. The diagnostic method needs to organize the continuous data into operating condition segments that can be stably referenced, and distinguish the segments near the switching boundary from the stable segments to ensure that the same segment structure and the same index relationship are used for subsequent training and online discrimination.
[0026] S101: Collection record construction and value range constraints.
[0027] To enable the operating condition identification model to take segments as input and to avoid segment boundary drift caused by misalignment between the operating identifier and key state quantities, the operating identifier, key state quantities, and timestamp are first fixed into the same record during the acquisition phase, and then segmented processing is performed.
[0028] At each sampling moment, the operation identifier and key status variables are read and written with a timestamp, forming a continuous record sequence arranged in chronological order. The operation identifier value is limited to a predefined finite encoding set, which is obtained by mapping the controller operation mode code, task number, or status word. The key status variables are continuous variables or continuous variable vectors, and the timestamps are strictly incremented. When the operation identifier has a null value or a value that does not belong to the finite encoding set, the operation identifier is set to an unknown code and an unknown mark is recorded. The unknown code is also part of the finite encoding set, ensuring that subsequent shaping and segmentation are always completed within the same value domain, thus enabling the segmentation rules to have definite inputs and definite outputs.
[0029] S102: Running identifier shaping uses sliding window mode filtering.
[0030] The running identifier is prone to short-term jumps near the switching boundary. Directly comparing adjacent time points will produce fragmented segments. The shaping stage first suppresses short-term jumps so that the segment boundary is triggered by continuous changes.
[0031] The sliding window mode filter takes the running identifier sequence as input and the shaped running identifier sequence as output. The window coverage is represented by the number of consecutive records. The window coverage is determined by the relationship between the sampling cycle and the running identifier refresh cycle, ensuring that the window can still cover stable values before and after a short jump in the running identifier. For each record, all running identifier values within the window coverage are taken, and the frequency of each value is counted. The value with the most frequent occurrences is selected as the shaped running identifier. When there are ties for the most frequent values, the running identifier value of the current record is selected first. If the running identifier of the current record is an unknown code, the non-unknown code value that is closer to the current record in time is selected to ensure that the shaped running identifier does not produce uncertain results due to ties.
[0032] Example Description: The controller's operation identifier comes from the communication bus status word. When the production line is running continuously under a stable cycle time, the operation identifier remains in automatic operation. The on-site operator briefly enters the maintenance page on the host computer interface and then immediately exits. Within one sampling cycle, the communication bus briefly refreshes the operation identifier to maintenance preparation. In the next sampling cycle, it returns to automatic operation. The sliding window mode filter counts that automatic operation accounts for a higher proportion within the window at this brief refresh position. The shaping operation identifier remains in automatic operation. The segmentation results do not generate additional operating condition segments, and the transition operating condition segment marker is not triggered. Subsequent operating condition identification and alignment with the same operating condition still use the stable operating condition segment as input.
[0033] S103: The generation of working condition segments adopts the combination of running length encoding and minimum segment length.
[0034] The segmentation stage requires converting the changes in the run identifier after shaping into fragment boundaries, while providing stable fragments for the subsequent generation of normal reference sequences. Run length encoding is used to determine the boundaries, and minimum fragment length merging is used to eliminate residual fragments.
[0035] The runtime encoding scans the integer runtime identifier sequence in chronological order. The initial segment start point is the first record, and the initial segment runtime identifier is the integer runtime identifier of the first record. Then, the integer runtime identifier of the current record is compared with the segment runtime identifier. If they are the same, the current record is merged into the current segment. If they are different, the current segment is closed at the previous record, generating a working condition segment. The working condition segment includes the working condition segment identifier, segment runtime identifier, time sequence, and key state quantity sequence. Then, the current record is used as the starting point of the new segment and the segment runtime identifier is updated. The scanning continues until the last record closes the last segment.
[0036] The minimum segment length is integrated and the operating condition segments obtained by encoding the running length are used as input. The minimum segment length is represented by the number of consecutive records. The minimum segment length is determined based on the shortest consecutive holding time of the running identifier in the historical stable operating condition segments, so that segments shorter than the minimum segment length do not participate in the stable reference construction. The shortest consecutive holding time is obtained by statistically analyzing the length of the continuous unchanged interval of the running identifier in the historical stable operating condition segments and is represented by the number of consecutive records. The set of operating condition segments is traversed to locate the target segment whose segment length is shorter than the minimum segment length. Integration is performed according to deterministic rules: if there are adjacent segments with the same running identifier as the target segment on both sides, the target segment is merged into the adjacent segment with the same running identifier; if both adjacent segments on both sides are the same, the target segment is merged into the adjacent segment with a longer time span; if neither adjacent segment on both sides is the same, the target segment is merged into the adjacent segment that is more adjacent in time. After integration, the time order and key state quantity sequence of the affected segments are recalculated, and the operating condition segment identifiers are rearranged to ensure that the operating condition segment identifiers and time order still maintain a one-to-one correspondence and are strictly increasing.
[0037] The merging is performed after the runtime length encoding, and the fragment identifiers and time order are rearranged after merging to ensure that the subsequent transitional fragment markers are generated based on the final fragment boundaries and are not affected by the merging order.
[0038] S104: Transitional condition segment marking adopts the boundary neighborhood marking rule.
[0039] Transitional condition segment markers are used to identify segments near the condition switching boundary separately, so as to prevent subsequent stable reference sequences from treating switching disturbances as stable features.
[0040] The boundary neighborhood label takes the merged set of operating condition segments as input. First, it checks the segment operation identifiers of adjacent operating condition segments in chronological order. When the operating identifiers of adjacent segments are inconsistent, it is determined that there is an operating condition switching boundary. The two adjacent operating condition segments on both sides of the boundary are marked as transitional operating condition segments, and the remaining operating condition segments are marked as non-transitional operating condition segments. The segment type label is bound and stored with the operating condition segment identifier to form the segmented result output. The segmented result output includes the operating condition segment identifier, time sequence, segment type label, segment operation identifier, and key state quantity sequence.
[0041] Step S2 directly reads the non-transitional working condition segments from the segmented result output, constructs historical stable working condition segments and generates normal reference sequences, and at the same time reads the working condition segment identifier and time order as a unified index for training samples and online samples to avoid sample misalignment.
[0042] Step S1 outputs the working condition segment identifier, time sequence, segment type label, and key state quantity sequence. The working condition segment identifier enables unique segment-level positioning, the time sequence enables segment-level adjacency determination, the segment type label separates transitional working condition segments from non-transitional working condition segments, and the key state quantity sequence maintains the integrity of the time structure within the segment. The diagnostic process obtains structured segment input and reduces the risk of segment fragmentation and boundary offset caused by short-term disturbances during working condition switching.
[0043] Step S2 follows the working condition segment structure formed in step S1. The key state quantities in the abnormal working condition stage are significantly different from those in the stable stage. Directly comparing across working conditions will treat the normal deviation introduced by the working condition change as a fault. The diagnostic method needs to first determine the working condition to which the current working condition segment belongs, then construct a comparison benchmark within the same working condition range, and align the current working condition segment with the benchmark of the same working condition in terms of time position.
[0044] S201: Generation of operating condition labels and construction of a collection of historical stable operating condition segments.
[0045] Step S1 outputs segmented results that already include operating condition segment identifiers, time sequence, segment type labels, segment operation identifiers, and key state quantity sequences. Step S2 first converts the segmented results into training samples for the operating condition recognition model to avoid transitional operating condition segments writing switching disturbances into the training set. The operating condition labels are obtained by mapping segment operation identifiers, which come from the segmented results. The operating condition labels come from the operating condition label set, which is given by the controller operation mode definition table or control strategy configuration table. The mapping rule consists of a one-to-one correspondence between segment operation identifiers and operating condition labels. The historical stable operating condition segment set is obtained by filtering the segmented results. The filtering condition is that the segment type label is equal to the non-transitional operating condition segment. After filtering, each operating condition segment forms a training sample. The training sample includes key state quantity sequences and operating condition labels. The key state quantity sequences retain their original physical dimensions, and the operating condition labels retain their discrete encoding value range.
[0046] S202: The working condition recognition model is trained using a temporal convolutional network and cross-entropy loss.
[0047] The working condition identification model needs to extract the temporal structure from the key state quantity sequence and output the working condition category. The working condition identification model adopts a temporal convolutional network. The network structure consists of an input layer, multiple one-dimensional convolutional layers, activation layers, pooling layers, and fully connected layers. The input is the key state quantity sequence in the set of historical stable working condition segments. The key state quantity sequence is first composed into fixed-length segments in chronological order. If the segment length is insufficient, the tail is padded. If the segment length exceeds the limit, the sliding window is used to truncate it to ensure that the input dimension is consistent in each training. The one-dimensional convolutional layer kernel slides along the time axis to extract local temporal patterns. The pooling layer performs downsampling and compression representation along the time axis. The fully connected layer outputs the score value of each working condition label in the working condition label set. The score value is converted into a working condition probability distribution by a normalized exponential function. The normalized exponential function is processed by taking the exponent of each score value and then dividing it by the sum of the exponent values of all working condition labels to make the sum of the probabilities of each working condition equal to one.
[0048] The training objective employs cross-entropy loss, which is calculated by taking the probability of the corresponding working condition label for each training sample, calculating the negative logarithm, and summing it within a mini-batch. Parameter updates utilize stochastic gradient descent or adaptive moment estimation. Stochastic gradient descent employs batch sampling to construct mini-batches, updating parameters according to the gradient direction of the loss on the network parameters, and iterating cyclically. The learning rate, batch size, and number of training rounds are fixed into the model version as training configuration items. To improve convergence stability, amplitude normalization is performed on the key state quantity sequences during training. The normalization process uses a linear mapping between the training set mean and the training set range to ensure that key state quantities of different dimensions have a uniform scale at the network input. Furthermore, the normalization parameters are bound to the model version and saved, and the same normalization parameters are used during online inference.
[0049] For example: The historical stable operating condition segment set contains 3 types of operating condition labels, denoted as Operating Condition 1, Operating Condition 2, and Operating Condition 3. Each sample in the key state quantity sequence is uniformly truncated to a length of 128 sampling points, and the key state quantity dimension is 2. The temporal convolutional network uses two 1D convolutional layers. The first layer has 16 kernels, a kernel length of 5, and a stride of 1. The second layer has 32 kernels, a kernel length of 3, and a stride of 1. Each convolutional layer is followed by ReLU activation and max pooling with a pooling window of 2 and a stride of 2. The network is fully connected. The layer outputs three scores; the fully connected layer outputs a score of [2.1, 0.3, -1.2] for a certain sample, and the normalized exponential function outputs a probability distribution of the working condition of approximately [0.81, 0.13, 0.06]. When the label of the working condition is working condition 1, the negative logarithm of the cross-entropy loss is approximately 0.21. The training uses a batch size of 32, a learning rate of 0.01, and 50 training epochs. SGD is used to update the network parameters in mini-batch. Training stops and the model parameters are fixed when the validation set loss does not decrease for 5 consecutive epochs, thus obtaining the trained working condition recognition model.
[0050] S203: The determination of the operating condition identifier and the generation of the normal reference sequence adopt the selection of representative sequences.
[0051] The input object in the online diagnostic phase is the current operating condition segment, which comes from the segmentation result in step S1. The current operating condition segment includes a sequence of key state variables and a segment type label. The operating condition identification model outputs an operating condition probability distribution for the key state variable sequence of the current operating condition segment. The corresponding operating condition identifier is determined using the maximum probability criterion, which selects the operating condition label with the highest probability from the set of operating condition labels as the corresponding operating condition identifier. The normal reference sequence is selected from a set of historical stable operating condition segments, limited to operating condition segments whose operating condition label equals the corresponding operating condition identifier. The normal reference sequence generation process is also described. Representative sequence selection is performed using dynamic time warping distance for pairwise comparisons. The dynamic time warping distance is calculated by first defining the point-to-point distance, which is the sum of the absolute values of the differences between the critical state vectors or the Euclidean distance. The dimensions of the point-to-point distance are consistent with those of the critical state variables. Then, dynamic programming is used to find the path with the minimum cumulative distance on the time axis, while keeping the dimensions of the cumulative distance constant. The representative sequence selection rule is to calculate the sum of the dynamic time warping distances from each candidate critical state variable sequence to the other candidate sequences, and select the candidate critical state variable sequence with the smallest sum of distances as the normal reference sequence.
[0052] In one embodiment, taking an injection molding machine as an example, after the servo controller of the injection molding machine production line has been running for a long time, multiple segments of the same operating condition identifier have accumulated in the historical stable operating condition segment set. The operating condition identifier corresponds to the pressure holding stage. The key state quantity sequence consists of servo output commands and feedback current. Maintenance personnel export these pressure holding stage operating condition segments from the data storage during the shutdown maintenance window and send them to the representative sequence selection process in chronological order. The process performs dynamic time warping and alignment on any two segments of the pressure holding stage key state quantity sequence and calculates the distance. Then, it sums the distances of each sequence to the other sequences. The sequence with the smallest total distance is written into the normal reference sequence storage area and bound to the operating condition identifier. Subsequently, when the online diagnosis enters the pressure holding stage, the operating condition identification model outputs the operating condition identifier as the pressure holding stage. The diagnostic module directly reads the bound normal reference sequence, performs the same operating condition alignment with the current pressure holding stage operating condition segment, and generates a relative deviation sequence.
[0053] S204: The alignment process under the same working conditions adopts dynamic time warping and generates a relative deviation sequence.
[0054] Alignment with the same operating condition requires establishing a temporal correspondence between the key state quantity sequence of the current operating condition segment and the normal reference sequence. Dynamic time warping is used to generate warped paths, which consist of several index pairs arranged in chronological order. The warped paths satisfy the constraints of monotonically increasing indexes and continuous step progression. The dynamic programming recursive rule for dynamic time warping is to establish a cumulative distance table. The cumulative distance of each position in the cumulative distance table is equal to the sum of the point-to-point distance of the current position and the minimum cumulative distance of the three predecessor positions. The three predecessor positions are the left neighbor position on the time axis, the upper neighbor position on the time axis, and the upper left neighbor position on the time axis. After the cumulative distance table is filled, a regular path is obtained by backtracking from the endpoint along the minimum preceding path. The relative deviation sequence is generated pairwise according to the regular path. The generation rule is to subtract the corresponding key state quantity of the normal reference sequence from the key state quantity of the current working condition segment to obtain the difference sequence. Then, the relative deviation sequence is obtained by normalizing the sum of the absolute value of the corresponding key state quantity of the normal reference sequence and the stability term. The stability term adopts a positive number with the same dimension as the key state quantity to avoid the denominator being zero. Therefore, the relative deviation sequence becomes a dimensionless sequence. The working condition identifier and the relative deviation sequence are output together and passed to step S3.
[0055] Step S2 outputs the corresponding operating condition identifier and the relative deviation sequence. The corresponding operating condition identifier limits the comparison range and fixes the semantics of the same operating condition. The normal reference sequence provides the comparison benchmark of the same operating condition. The relative deviation sequence converts the differences in key state quantities into dimensionless expressions and eliminates time and position mismatches. The diagnostic process obtains comparable inputs of the same operating condition and weakens the interference of operating condition differences on deviation judgment, making the deviation in the abnormal operating condition stage closer to the real abnormal evidence.
[0056] Step S3 follows the output of step S2, which includes the operating condition identifier and relative deviation sequence. The relative deviation sequence may show both morphological changes and frequency band structure changes during abnormal operating conditions. A single feature domain is prone to bias. The diagnostic method needs to extract complementary characterization quantities and unify different characterization quantities to the same operating condition scale. Then, an anomaly confidence coefficient is generated to correct the output of the deviation discrimination model, ensuring that the preliminary conclusion has a stable discrimination caliber.
[0057] S301: Sequence pattern divergence calculation adopts sequence permutation pattern encoding and divergence measurement.
[0058] The relative deviation sequence has been aligned with the operating conditions. The overall upward and downward shifts in amplitude often manifest as continuous deviations in the relative deviation sequence. However, what truly affects the reliability of diagnosis during abnormal operating conditions is often not the amplitude deviation itself, but the change in the form of the deviation process. For example, the deviation appears more abruptly, the fallback is more discontinuous, and the order of local fluctuations is disrupted. If judgment is made solely based on amplitude magnitude or single-point deviation, it is easy to mistake normal transients caused by mode switching for abnormalities, and it is also easy to mask early abnormalities in normal fluctuations. Therefore, it is necessary to introduce a morphological characterization method that does not rely on absolute amplitude but only focuses on the relative size relationship between adjacent positions to describe whether the morphological distribution of the current relative deviation sequence deviates from the normal morphological distribution under the same operating conditions. The sequence pattern dispersion quantity is used to quantify this type of morphological deviation.
[0059] The sequential arrangement pattern encoding takes the relative deviation sequence as input, with the pattern order being a positive integer and a fixed configuration item. Continuous sampled values are truncated along the relative deviation sequence at a fixed step size to form a window vector. Within the window vector, values are sorted from smallest to largest to obtain the sequential arrangement pattern. When equal values appear within the window vector, a position priority rule is applied, with the sampled value at the earlier position considered smaller, ensuring the uniqueness of the sequential arrangement pattern. The sequential arrangement pattern is mapped to a sequence symbol. The occurrence frequency of the sequence symbol is counted and normalized to obtain the current sequence symbol distribution. The corresponding working condition identifier is used to read the benchmark distribution of the sequence symbol for the same working condition. The benchmark distribution of the sequence symbol for the same working condition is obtained by performing the same sequential arrangement pattern encoding on each relative deviation sequence with the same working condition identifier in the historical stable working condition segment set and taking the mean of the distribution.
[0060] In one embodiment, the pattern order is 3, the window step size is 1, the Laplace smoothing constant is 1e-6, and the sequence symbol distribution is obtained by normalizing the occurrence frequency of the pattern number.
[0061] The divergence measure is the Jensen-Shannon divergence. Before calculation, Laplace smoothing is performed on the current sequence symbol distribution and the baseline sequence distribution under the same working condition. The smoothing rule is to add the same smoothing constant to each sequence symbol count and then normalize. The smoothing constant is a dimensionless positive number and is used as a fixed configuration term to avoid zero probability terms. The Jensen-Shannon divergence calculation rule is to first calculate the mean distribution of the current sequence symbol distribution and the baseline sequence distribution under the same working condition, and then calculate the relative entropy of the two distributions relative to the mean distribution and take the average. The sequence divergence value belongs to the dimensionless non-negative real number domain.
[0062] S302: Frequency energy fit is calculated using discrete wavelet transform and coefficient fit measurement.
[0063] In addition to morphological changes, relative deviation sequences also exhibit fluctuation rhythm changes during abnormal operating conditions. These changes manifest as more or less dense fluctuations, enhanced or weakened periodic components, and energy migration from low to high frequencies or from high to low frequencies. It is difficult to stably characterize this rhythmic change simply by analyzing the morphological distribution in the time domain. Especially in transitional operating condition segments, the time domain waveforms may appear similar, but the frequency band structure has already changed, leading to unstable subsequent discrimination outputs. Therefore, it is necessary to introduce a structural characterization method that can reflect the multi-scale energy distribution to determine the degree of fit between the frequency band energy distribution of the current relative deviation sequence and the normal frequency band energy distribution under the same operating condition. The frequency-energy fit is used to quantify this type of structural fit.
[0064] Discrete wavelet transform takes the relative deviation sequence as input, and the wavelet basis and decomposition level are fixed configuration items. The wavelet basis and decomposition level are uniformly determined in the offline training stage and are fixed with the model version. Discrete wavelet transform uses symmetrical extension at both ends of the sequence to handle the boundary and outputs sub-band coefficients at each scale. The sum of squares of the sub-band coefficient sequence at each scale is used to obtain the sub-band energy. The sub-band energy is divided by the sum of the sub-band energies to obtain the current frequency energy distribution. The operating condition identifier is used to read the frequency energy benchmark distribution of the same operating condition. The frequency energy benchmark distribution of the same operating condition is obtained by performing the same discrete wavelet transform on each relative deviation sequence with the same operating condition identifier in the historical stable operating condition segment set and taking the mean value of the frequency energy distribution.
[0065] In one embodiment, the wavelet basis is Daubechies db4, the number of decomposition layers is 4, symmetric extension is used at both ends of the sequence, and the energy of each scale subband is calculated by sum of squared coefficients and normalized to obtain the frequency energy distribution.
[0066] The fit measurement uses the Bartlett coefficient. The Bartlett coefficient is calculated by taking the product of the current frequency energy distribution component and the frequency energy reference distribution component under the same operating condition for each sub-band index, taking the square root, and summing it over all sub-band indices. The frequency energy fit measurement value belongs to the dimensionless unit interval.
[0067] In one embodiment, the relative deviation sequence exhibits multiple dense oscillations near a certain operating condition switch, the distribution of sequence symbols changes significantly, the frequency energy distribution shows energy gathering towards the high-frequency subband, the sequence dispersion increases and the frequency energy overlap decreases, and subsequent standard processing results in both rarity values increasing simultaneously, thereby improving the anomaly confidence coefficient. After correction, the deviation discrimination model output is closer to the fault anomaly direction.
[0068] S303: Quantile standard processing generates the rarity of the same working condition and forms the anomaly confidence coefficient.
[0069] After the relative deviation sequence is aligned with the operating condition, the simultaneous participation of time-domain morphological representation and frequency band structure representation in the discrimination is more in line with the actual performance of the abnormal operating condition stage. However, the numerical scale and direction of change of the two types of representations are different, and they change with the change of the corresponding operating condition identifier. Directly inputting the two types of representations into the same discrimination stage is prone to scale dominance and discrimination caliber drift. Therefore, step S303 first unifies the two types of representations into the same semantic scale under the reference of the corresponding operating condition identifier, and then maps the unified result into a single abnormality confidence coefficient to correct the output of the deviation discrimination model.
[0070] Quantile standard processing locates the reference sample set based on the corresponding operating condition identifier. The reference sample set is formed by selecting samples with the same operating condition identifier from the historical stable operating condition segment set and is fixed with each model version. The reference sample set separately stores the sequence pattern dispersion reference sequence and the frequency-energy fit reference sequence. Rarity is used to represent the sparseness of the current operating condition segment's representation result among normal samples of the same operating condition identifier. Rarity is expressed as a proportion and falls within a unit interval. The closer the proportion is to the upper bound of the unit interval, the rarer the current representation result is among normal samples; the closer the proportion is to the lower bound of the unit interval, the less common the current representation result is among normal samples. The current characterization results are closer to the common range of normal samples. For the serial ripple dispersion of the current working condition segment, the rarity of the serial ripple dispersion is calculated using an empirical distribution function. The calculation rule is to count the proportion of samples in the serial ripple dispersion reference sequence that are less than or equal to the current serial ripple dispersion. For the frequency-energy fit of the current working condition segment, it is first converted into frequency-energy misfit, and then the rarity of the frequency-energy misfit is calculated using an empirical distribution function. The calculation rule is to count the proportion of samples in the frequency-energy misfit reference sequence that are less than or equal to the current frequency-energy misfit. Thus, the two types of characterization are unified into a rarity input that can be directly compared under the same working condition reference.
[0071] Logistic regression uses the rarity of the sequence pattern dispersion and the rarity of the frequency-energy mismatch as fixed input features. First, a linear score is calculated, which is obtained by multiplying the intercept term and the two rarity values by their corresponding coefficients and then summing them. Then, an anomaly confidence coefficient is output through a sigmoid mapping. The anomaly confidence coefficient falls within a unit interval and has probabilistic semantics. The logistic regression parameters are trained offline through maximum likelihood estimation. The training samples consist of the relative deviation sequences corresponding to historical stable operating condition segments and the relative deviation sequences corresponding to confirmed fault anomaly segments. The training input is generated strictly using the same sequence pattern dispersion, frequency-energy mismatch, and quantile standard processing flow. The training objective uses negative log-likelihood loss and is iteratively updated through gradient descent or quasi-Newton methods until the verification loss no longer decreases. In the online stage, the anomaly confidence coefficient is directly calculated using the two rarity values. The anomaly confidence coefficient is used as the correction input for the original discrimination output of the deviation discrimination model to ensure that the comprehensive discrimination under different operating condition labels maintains a uniform scale and consistent caliber.
[0072] S304: Deviation discrimination model output correction and preliminary conclusion generation.
[0073] Step S4 consistency verification requires reading the preliminary conclusions and correction discrimination outputs of fixed semantics. Step S3 merges the anomaly confidence coefficient and the deviation discrimination model output into the correction discrimination output, and then uses the diagnostic threshold to generate preliminary conclusions of operating condition changes or fault anomalies. The output objects keep the fields and names fixed.
[0074] The deviation discrimination model takes the relative deviation sequence as input and uses a one-dimensional convolutional neural network and global pooling to generate the original discrimination output. The original discrimination output value belongs to the dimensionless unit interval and represents the fault abnormality tendency. The confidence scaling correction rule is to multiply the abnormal confidence coefficient with the original discrimination output to obtain the corrected discrimination output. The corrected discrimination output keeps falling within the dimensionless unit interval. The diagnostic threshold belongs to the dimensionless unit interval and is determined by the verification of labeled samples. The discrimination rule is that if the corrected discrimination output is not less than the diagnostic threshold, it indicates a fault abnormality. If the corrected discrimination output is less than the diagnostic threshold, it indicates a change in operating condition. Step S3 outputs the operating condition segment identifier, the corresponding operating condition identifier, the preliminary conclusion, and the corrected discrimination output. Step S4 directly reads the operating condition segment identifier to complete the location of adjacent operating condition segments and reads the preliminary conclusion to execute the consistency rule.
[0075] For example: The bias discrimination model uses the relative bias sequence as the only input and the output is the original discrimination output. The model structure adopts a one-dimensional convolutional neural network plus global pooling plus a fully connected output layer. The input window length is 256 sampling points. The insufficient part of the window is padded at the end, and the part of the window that exceeds the limit is truncated to form multiple training samples. The network configuration is three one-dimensional convolutional layers with the number of convolutional kernels being 32, 64 and 128 respectively, the kernel length being 7, 5 and 3 respectively, and the stride being 1 for all layers. Each convolutional layer is followed by ReLU activation and max pooling with a pooling window of 2 and a stride of 2. After global average pooling, a fully connected layer is connected and the original discrimination output is output using Sigmoid. The training samples consist of operating condition segments that pass the consistency check. The labels are obtained by mapping back to the hidden state, and the labels are divided into two categories: operating condition change and fault / abnormality. The loss function is binary cross-entropy, the optimization method is Adam, the learning rate is 0.001, the batch size is 64, and the number of training rounds is 30. During training, samples of both classes are drawn in an equal manner within the batch to control class imbalance. The validation set uses the most recent sample segment reserved in chronological order. Training stops and the parameters are fixed when the validation set loss does not decrease for 5 consecutive rounds. During model inference, the original discriminant output is output for each operating condition segment. The original discriminant output is then subjected to credibility scaling by the anomaly credibility coefficient to obtain the corrected discriminant output.
[0076] Step S3 outputs the correction and judgment output and the preliminary conclusion. Sequence pattern dispersion quantity describes the deviation of the morphological distribution, frequency energy fit quantity describes the fit of the frequency band structure, quantile standard processing converts the two into the rarity of the same working condition, and the anomaly confidence coefficient maps the rarity to the confidence quantity and completes the output correction. The diagnostic process forms a more stable preliminary conclusion on the abnormal working condition disturbance and reduces the probability of misjudgment caused by sporadic fluctuations in a single segment.
[0077] Step S4 follows the preliminary conclusions and correction judgment outputs from step S3. During the abnormal operating condition stage, there are short-term fluctuations and boundary disturbances. The preliminary conclusions of a single operating condition segment may be inconsistent with the performance of adjacent operating condition segments. The diagnostic method needs to use the time sequence to determine adjacent operating condition segments and perform consistency verification. At the same time, the verification results are used to control the labeling of samples to be updated and the triggering of updates to ensure that the updates are based on verifiable segment sequence relationships.
[0078] S401: Input construction for adjacent working condition segment location and consistency verification.
[0079] Consistency verification relies on the adjacency relationship of the time sequence. The time sequence is already fixed in the segmentation results. The working condition segment identifier is used for unique positioning to avoid changes in the adjacency relationship with the reading order. During processing, the current working condition segment identifier output in step S3 is read first, and then the preceding and following working condition segment identifiers are located in the time sequence output in step S1, forming a set of adjacent working condition segment identifiers containing the preceding, current, and following working condition segment identifiers. The segment type label is read from the output of step S1. The preceding and following working condition segment identifiers with the segment type label of transition working condition segment are read from the adjacent working condition segment identifiers. When the set of condition segment identifiers is deleted, if only the current condition segment identifier is retained after deletion, the consistency check result is fixed as failing and the update trigger stops. If the preceding or subsequent condition segment identifiers are retained after deletion, the consistency check input package is constructed according to the retention order. The consistency check input package includes the set of adjacent condition segment identifiers, the correction and discrimination output sequence corresponding to the adjacent condition segments, the preliminary conclusion sequence corresponding to the adjacent condition segments, and the condition identifier to which the current condition segment belongs. The correction and discrimination output values range from a unit interval, the preliminary conclusion values range from condition changes and fault anomalies, and the value range of the condition identifier is the set of condition labels.
[0080] S402: Consistency verification uses a hidden Markov model and Viterbi decoding.
[0081] The conclusions of adjacent operating condition segments have temporal continuity. Hidden Markov Models (HMMs) express this continuity as state transition constraints. Viterbi decoding transforms the corrected discriminant output sequence into a backtracking hidden state sequence. During processing, the hidden state set is defined to include both operating condition change states and fault / abnormal states. Observations are defined as the corrected discriminant output. The observation likelihood uses a complementary mapping from the corrected discriminant output to the two types of hidden states. The observation likelihood for fault / abnormal states is taken from the corrected discriminant output, while the observation likelihood for operating condition change states is taken by subtracting the corrected discriminant output. The prior probability vector is obtained statistically from the historically verified operating condition segment sequence, with the statistical caliber being the count of the backtracking hidden states of the first segment of the sequence. After adding a Laplace smoothing constant to the count, normalization is performed to ensure the sum of all components of the prior probability vector is one. The state transition probability matrix is obtained statistically from the historically verified operating condition segment sequence, with the statistical caliber being the count of the backtracking hidden state transitions of adjacent segments. After adding a Laplace smoothing constant to the count, normalization is performed on each row to ensure the sum of the components within each row is one. Viterbi decoding is performed in chronological order of adjacent working condition segment identifier sets. For the first segment, a path score is calculated for each hidden state. The path score is the product of the prior probability and the observation likelihood. For subsequent segments, a candidate path score set is calculated for each hidden state. The candidate path score set is the product of the path score of each hidden state in the previous segment and the corresponding state transition probability. The maximum candidate path score is then multiplied by the observation likelihood of the current segment to obtain the path score of the current segment. At the same time, the predecessor hidden state corresponding to the maximum candidate path score is recorded. For the last segment, the hidden state with the largest path score is selected and backtracked along the recorded predecessor hidden state to obtain the backtracked hidden state sequence. The consistency verification result is generated according to the semantic consistency rule. The semantic consistency rule is defined as follows: when the backtracked hidden state is a working condition change state, the preliminary conclusion is a working condition change; when the backtracked hidden state is a fault / abnormal state, the preliminary conclusion is a fault / abnormal state. If the semantic consistency is satisfied, the consistency verification result is passed; if the semantic consistency is not satisfied, the consistency verification result is failed.
[0082] In one embodiment, the output of the preceding operating condition segment correction judgment remains close to the lower bound of the unit interval, the output of the current operating condition segment correction judgment briefly approaches the upper bound of the unit interval, and the output of the subsequent operating condition segment correction judgment returns to the lower bound of the unit interval. Under the state transition constraint, Viterbi decoding backtracks the hidden state of the current operating condition segment to the operating condition change state. The preliminary conclusion is that the consistency check result fails when there is a fault or abnormality, and the preliminary conclusion is that the consistency check result passes when the operating condition changes.
[0083] S403: Sample labels to be updated and normal reference sequences to be updated.
[0084] Update triggering requires avoiding writing unstable segments to the reference baseline. When the consistency check result is passed, the sample to be updated is marked and the normal reference sequence is updated. During processing, the current working condition segment identifier, the working condition identifier, the key state quantity sequence output in step S1, the relative deviation sequence output in step S2, the normal reference sequence output in step S2, and the backtracking hidden state obtained from the consistency check are encapsulated as the sample to be updated. The sample to be updated is written into the sample set to be updated corresponding to the working condition identifier. The sample set to be updated is grouped and stored by working condition label and the time order field is kept consistent with the working condition segment identifier. When the backtracking hidden state is a working condition change state, the normal reference sequence update is triggered. The normal reference sequence update adopts the representative sequence selection method. The candidate sequence set consists of the key state quantity sequence of the historical stable working condition segment corresponding to the working condition identifier and the key state quantity sequence in the sample set to be updated. The distance metric for representative sequence selection adopts the dynamic time warping distance. The candidate sequence with the smallest sum of distances is written into the normal reference sequence storage location bound to the working condition identifier and replaces the old normal reference sequence. When the consistency check result is failed, the marking of the sample to be updated and the normal reference sequence update are stopped.
[0085] S404: Incremental training and final analysis results output of the bias discrimination model.
[0086] The deviation discrimination model update requires a stable source of labels. The backtracking hidden states are derived from the consistency verification process. Using these backtracking hidden states to train labels avoids unverified preliminary conclusions directly driving updates. During processing, if the consistency verification result is passed, the relative deviation sequence and the backtracking hidden states are written into the incremental sample pool. The incremental sample pool is grouped by its operating condition identifier and stored hierarchically according to the backtracking hidden states. The incremental training trigger condition is defined as the incremental sample pool simultaneously containing both operating condition change state samples and fault / abnormal state samples within the same operating condition identifier group. After triggering, a training batch with equal numbers of samples from both classes is drawn from the incremental sample pool. The deviation discrimination model then uses the original training method to perform parameter updates. The network structure remains unchanged. After the parameters are updated, the parameters of the deviation discrimination model are replaced and the corresponding training batch sample records are cleared. If the consistency check result is not passed, the parameters of the deviation discrimination model remain unchanged. The final analysis result is obtained by backtracking hidden state semantic mapping. When the backtracking hidden state is the working condition change state, the final analysis result is the working condition change. When the backtracking hidden state is the fault abnormal state, the final analysis result is the fault abnormal state. The output fields include the working condition segment identifier, the working condition identifier, the final analysis result, the correction discrimination output, and the consistency check result. The output field names are consistent with the time sequence fields in step S1, which facilitates tracing adjacent working condition segments in time sequence.
[0087] Step S4 outputs the consistency verification result and the final analysis result. The Hidden Markov Model combined with Viterbi decoding transforms the corrected discriminant output sequence into a backtracking hidden state and forms the consistency verification result. The labeling of samples to be updated and the update trigger are constrained by the consistency verification result. The final analysis result is determined by the backtracking hidden state. The diagnostic process improves the consistency of conclusions at the fragment sequence level and suppresses the risk of occasional misjudgments being written into the reference benchmark or model parameters.
[0088] Specifically, the above are merely preferred embodiments of the present invention and are not intended to limit the present invention.
[0089] The aforementioned preset thresholds or other parameters can be pre-calibrated through offline simulation testing, or set to fixed values according to on-site operating procedures.
[0090] In the description of this specification, references to terms such as "an embodiment," "example," and "specific example" indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0091] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention.
Claims
1. A self-diagnostic method for abnormal operating conditions of a controller, characterized in that, Including the following steps: S1: Collect the operation identifier and key status quantities, generate operating condition segments according to the consistent interval of the operation identifier, generate operating condition segment identifiers and time sequence, and mark the operating condition segments on both sides of the change of the operation identifier as transition operating condition segments. S2: Non-transitional operating condition segments constitute historical stable operating condition segments. The operating condition identification model outputs the operating condition identifier of the current operating condition segment. Based on the operating condition identifier, a normal reference sequence is generated and aligned with the operating condition to obtain the relative deviation sequence. S3: The relative deviation sequence constructs the morphological sequence deviation information and the frequency domain structure fit information. It is processed according to the quantile standard of the corresponding working condition. Logistic regression is used to obtain the anomaly confidence coefficient. The anomaly confidence coefficient is used to correct the original discrimination output of the deviation discrimination model to obtain preliminary conclusions. S4: The working condition segment identifier and time sequence location of adjacent working condition segments are used to obtain the consistency verification result of the hidden Markov model. If the result passes, the normal reference sequence and the deviation discrimination model are updated. If the result fails, the final analysis result is output.
2. The self-diagnosis method for abnormal operating conditions of a controller according to claim 1, characterized in that, Step S1 includes: The operation identifier, key status variables, and timestamps form a continuous record sequence; the operation identifier is limited to a finite set of codes, and null values and values not in the set are written into unknown codes; the continuous record sequence is arranged in ascending order of timestamps; the operation identifier is subjected to sliding window mode filtering to obtain an integer operation identifier, and when the modes are parallel, the current record value is used, and when the current record is an unknown code, the non-unknown code value with the nearest time is used.
3. The self-diagnosis method for abnormal operating conditions of a controller according to claim 2, characterized in that, Step S1 also includes: The shaping operation identifier uses the operation length code to generate the operating condition segment; the operating condition segment is bound to the operating condition segment identifier, segment operation identifier and time sequence; when the segment length is less than the minimum segment length, segment merging is performed, and the merging direction is determined based on the consistency of the operation identifiers of adjacent segments and the time proximity; after the operating condition segment set is merged, the transitional operating condition segments and non-transitional operating condition segments are marked according to the changes in the operation identifiers of adjacent segments; the segmentation result outputs the operating condition segment identifier, time sequence, segment type label and key state quantity sequence.
4. The self-diagnosis method for abnormal operating conditions of a controller according to claim 3, characterized in that, Step S2 includes: The segmentation results are filtered to identify segments that are classified as non-transitional operating conditions, forming a set of historical stable operating condition segments. The segment operation identifier is mapped to the operating condition label according to the controller operation mode definition table. The key state quantity sequence and the operating condition label form the training sample. The temporal convolutional network is trained with the training sample to obtain the operating condition recognition model, and the operating condition recognition model outputs the operating condition probability distribution.
5. The self-diagnosis method for abnormal operating conditions of a controller according to claim 4, characterized in that, Step S2 also includes: The working condition identification model infers the working condition identifier from the key state quantity sequence of the current working condition segment; it selects candidate sequences with the same working condition identifier from the set of historical stable working condition segments, and determines the candidate sequence corresponding to the minimum sum of dynamic time warping distance as the normal reference sequence; it generates a relative deviation sequence by aligning the key state quantity sequence of the current working condition segment with the normal reference sequence through dynamic time warping, and outputs the working condition identifier and the relative deviation sequence.
6. The self-diagnosis method for abnormal operating conditions of a controller according to claim 5, characterized in that, Step S3 includes: The morphological sequence deviation information includes the sequence pattern dispersion; the relative deviation sequence is encoded using the sequence arrangement mode, and when equal values appear in the window, the position priority rule is used to obtain a unique sequence pattern symbol sequence; the sequence pattern symbol sequence is statistically analyzed and normalized to obtain the current sequence pattern symbol distribution; the corresponding working condition identifier is located in the same working condition sequence pattern reference distribution; the current sequence pattern symbol distribution and the same working condition sequence pattern reference distribution are smoothed and then the sequence pattern dispersion is calculated.
7. The self-diagnosis method for abnormal operating conditions of a controller according to claim 6, characterized in that, Step S3 also includes: The frequency domain structure fitting information includes the frequency energy fitting amount; the relative deviation sequence is subjected to discrete wavelet transform, the wavelet basis and the number of decomposition layers adopt fixed configuration terms, and the two ends of the sequence are symmetrically extended; the sub-band coefficients of each scale are used to calculate the sub-band energy and normalize it to obtain the current frequency energy distribution; the operating condition identifier is used to locate the frequency energy benchmark distribution of the same operating condition; the frequency energy fitting amount is calculated by comparing the current frequency energy distribution with the frequency energy benchmark distribution of the same operating condition.
8. The self-diagnosis method for abnormal operating conditions of a controller according to claim 7, characterized in that, Step S3 also includes: The reference sample set for the identification and positioning of the corresponding working condition provides a reference sequence of serial ridge dispersion and a reference sequence of frequency-energy misalignment. The serial ridge dispersion and frequency-energy misalignment are processed by quantile standard to obtain the rarity of the same working condition. The logistic regression model outputs anomaly confidence coefficients with two rarity values. The anomaly confidence coefficients are used to perform confidence scaling on the original discrimination output of the deviation discrimination model to obtain a corrected discrimination output and generate preliminary conclusions.
9. A self-diagnostic method for abnormal operating conditions of a controller according to claim 8, characterized in that, Step S4 includes: The operating condition segment identifiers are located according to the time sequence, and the preceding and subsequent operating condition segment identifiers form a set of adjacent operating condition segment identifiers. The adjacent operating condition segment identifiers marked as transitional operating condition segments are deleted from the set of adjacent operating condition segment identifiers. The adjacent operating condition segment identifier set reads the correction and discrimination output sequence and the preliminary conclusion sequence to form a consistency verification input packet.
10. A self-diagnostic method for abnormal operating conditions of a controller according to claim 9, characterized in that, Step S4 also includes: The consistency check input package uses a hidden Markov model and Viterbi decoding to obtain the backtracking hidden state sequence. The consistency check result is passed when the backtracking hidden state and the preliminary conclusion satisfy the semantic consistency rule, and the consistency check result is failed when they do not satisfy the semantic consistency rule. When the consistency check result is passed, the sample to be updated is marked and the normal reference sequence and the bias discrimination model are updated. When the consistency check result is failed, the final analysis result is output.