Foam mixing device fault diagnosis method based on variational Bayes
By synchronously collecting valve command and feedback quantities in the foam mixing device, constructing a causal adjacency matrix and a master/slave switching mode identifier, and combining it with a structured Bayesian diagnostic model, the problem of root cause confusion and difficulty in delimiting propagation effects in existing technologies is solved, and efficient fault source identification and alarm are achieved.
Patent Information
- Application Number
- CN202512042761.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-02-03
AI Technical Summary
Existing foam proportioning mixing devices suffer from root cause confusion, difficulty in defining the propagation impact, and insufficient interpretability in scenarios involving main/standby switching and multi-valve linkage. In particular, it is difficult to distinguish the cause of the deviation between valve command quantity and valve position feedback quantity in threshold alarms and general Bayesian diagnostic technology, resulting in an expanded fault location range and a lengthy handling path.
By synchronously collecting valve command quantities and valve position feedback quantities under a preset sampling period, and combining the main pump status quantity, standby pump status quantity and foam tank liquid level quantity to generate an aligned monitoring record set, a causal adjacency matrix and a main/standby switching mode identifier are constructed, a structured Bayesian diagnostic model is built, variational Bayesian update is performed, candidate fault sources are determined, and alarm information is output.
It reduces observation mismatch caused by transient switching between primary and backup systems, reduces ambiguity of multiple faults corresponding to the same phenomenon, improves the stability and interpretability of root cause identification, narrows the scope of fault investigation, and improves handling efficiency.
Smart Images

Figure CN121456432A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of operation monitoring and fault diagnosis of fire-fighting foam mixing devices, and in particular to a method for fault diagnosis of foam mixing devices based on variational Bayes. Background Technology
[0002] With the development of intelligent and networked fire-fighting equipment, foam proportioning devices have gradually evolved from traditional mechanical proportioners to a system form that integrates sensor acquisition, electronic valve regulation, and closed-loop proportioning. Redundancy of main / standby pumps and multi-valve linkage (foam valves, inlet valves, mixing valves, etc.) are widely used in fire trucks and fixed foam extinguishing systems to improve the continuity and reliability of liquid supply. However, current fault diagnosis on the operation and maintenance side mainly relies on threshold comparison, rule matching, or single-point limit exceedance alarms. Under dynamic conditions such as main / standby switching and valve mutual exclusion / synchronous operation, diagnostic uncertainties easily arise: on the one hand, the deviation between valve command quantities and valve position feedback quantities may be caused by various reasons such as valve jamming, execution lag, pump operating condition fluctuations, or upstream disturbances, exhibiting similar characteristics and being difficult to distinguish; on the other hand, the impact of faults propagates along the liquid supply path, and single-point thresholds often fail to distinguish between the fault-causing valve / pump and the affected valve / pump, leading to an expanded location range, lengthy handling paths, and even unnecessary main / standby switching and secondary disturbances, failing to meet the needs of fire-fighting scenarios for rapid and interpretable diagnosis.
[0003] CN103816633A discloses an intelligent foam proportioning mixing system. This scheme is mainly based on operation control, but it has defects in fault diagnosis under main and backup redundancy and multi-valve linkage conditions. In particular, it lacks a processing mechanism to structurally attribute the relationship between valve command quantity, valve position feedback quantity deviation and liquid supply path, making it difficult to distinguish the root cause and cascading effects during switching transients.
[0004] CN109032872A discloses a device fault diagnosis method and system based on Bayesian networks. This scheme has a general uncertain reasoning approach, but it does not provide a gating constraint modeling method for the main / standby switching and valve linkage characteristics of foam mixing devices, nor does it provide an output strategy for quantifying the affected range based on propagation weights. Therefore, in the scenario of strong valve-pump coupling, there may still be problems such as dispersed root cause candidates and difficulty in defining the range of affected devices.
[0005] Given the problems of root cause confusion, difficulty in delimiting propagation effects, and insufficient interpretability in existing threshold alarms and general Bayesian diagnostic techniques for foam proportioning mixing devices under main / standby switching and multi-valve linkage scenarios, this invention proposes a variational Bayes-based fault diagnosis method for foam mixing devices. This method synchronously collects valve command quantities and valve position feedback quantities, as well as main pump status quantities, standby pump status quantities, and foam tank liquid level quantities from multiple valves at a preset sampling period to form an aligned monitoring record set. A causal adjacency matrix is generated by combining the main / standby connection relationship and valve linkage rules, and a main / standby switching mode identifier is generated. Under causal structure constraints, a structured Bayesian diagnostic model containing valve fault latent variable sets and pump fault latent variable sets is constructed. After gating the inference structure with the main / standby switching mode identifier, a variational Bayesian update is performed to obtain a posterior fault probability set and a propagation posterior weight set. Based on this, candidate fault sources and the set of affected devices are determined, and alarm information is output, thereby elevating the diagnosis from single-point exceedance to structured attribution and propagation localization. Summary of the Invention
[0006] 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.
[0007] In view of the aforementioned existing problems, the present invention is proposed.
[0008] To solve the above-mentioned technical problems, the present invention provides the following technical solution: As a preferred embodiment of the variational Bayes-based fault diagnosis method for foam mixing devices described in this invention, the method involves: collecting valve command quantities and valve position feedback quantities of the main pump foam valve, main pump inlet valve, standby pump foam valve, standby pump inlet valve, main pump mixing valve, and standby pump mixing valve under a preset sampling period, and simultaneously collecting the main pump status quantity, standby pump status quantity, and foam tank liquid level quantity to obtain an aligned monitoring record set. Based on the primary and backup connection relationship of the foam mixing device and the valve linkage rules, a causal adjacency matrix and a primary and backup switching mode identifier are generated, and the set of deviation features corresponding to each valve and each pump is extracted from the alignment monitoring record set. Based on the causal adjacency matrix and the deviation feature set, a structured Bayesian diagnostic model containing the valve fault latent variable set and the pump fault latent variable set is constructed. The master / standby switching mode identifier is used as the gate variable to perform variational Bayesian update to obtain the posterior fault probability set and the propagation posterior weight set. The target valve or target pump with the highest fault contribution is determined as the fault source candidate based on the posterior fault probability set, and the set of affected devices associated with the fault source candidate is determined based on the propagation posterior weight set. When the posterior fault probability corresponding to the fault source candidate is greater than the alarm probability threshold, a fault alarm message containing the fault source candidate and the set of affected devices is output.
[0009] The beneficial effects of this invention are as follows: By synchronously collecting valve command quantities and valve position feedback quantities of each valve under a preset sampling period and combining them with the status quantities of the main pump, the standby pump, and the liquid level of the foam tank to generate an aligned monitoring record set, this invention reduces the observation mismatch caused by the transient of the main / standby switchover, thereby providing a unified time reference for deviation judgment; by generating a causal adjacency matrix and generating a main / standby switchover mode identifier based on the main / standby connection relationship and valve linkage rules, and extracting a deviation feature set by combining the aligned monitoring record set, the deviation attribution is limited by the liquid supply path and linkage constraints, reducing the ambiguity of multiple faults corresponding to the same phenomenon; by gating the structured Bayesian diagnostic model with the main / standby switchover mode identifier and performing variational Bayesian updates, the posterior fault probability set and the propagation posterior weight set are output, improving the stability and interpretability of root cause identification; finally, based on the fault contribution degree, candidate fault sources are determined and a set of affected equipment is given, and alarm information is output under threshold triggering, narrowing the investigation scope and improving the handling efficiency. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. 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: Figure 1 This is a flowchart illustrating the fault diagnosis method for a foam mixing device based on variational Bayes, as shown in this invention. Detailed Implementation
[0011] 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.
[0012] 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.
[0013] 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.
[0014] According to an embodiment of the present invention, in combination Figure 1 The flowchart shown illustrates a method for fault diagnosis of a foam mixing device based on variational Bayes, which specifically includes the following steps: S1. Under a preset sampling period, collect valve command quantities and valve position feedback quantities of the main pump foam valve, main pump inlet valve, standby pump foam valve, standby pump inlet valve, main pump mixing valve, and standby pump mixing valve, and simultaneously collect the main pump status quantity, standby pump status quantity, and foam tank liquid level quantity to obtain an aligned monitoring record set. Note that the following should be noted in this step: S1.1 Generate a sampling period index at the beginning of each sampling period and write the sampling period index into the buffer identifier corresponding to that sampling period.
[0015] In a preferred embodiment, the preset sampling period is 100 milliseconds. The sampling period index is generated as a monotonically increasing integer, with the initial index recorded as 0. At the beginning of each sampling period, the controller writes the current index into the sampling period index register unit and maps the index to the cache area identifier of the circular buffer. The circular buffer consists of cache pages of fixed length. The cache area identifier is taken from the cache page number, and the page number range is, for example, 0 to 255. The mapping method is to obtain the page number by taking the remainder of the sampling period index divided by 256.
[0016] For example, when the sampling period index is 257, the buffer is identified as 1. The buffer page records the original set of entries for valve command quantity, valve position feedback quantity, main pump status quantity, standby pump status quantity and foam tank liquid level quantity within the sampling window, and writes the sampling period index and sampling start and end time in the page header.
[0017] S1.2 Within the sampling window corresponding to the sampling period index (e.g., from the start time of the sampling period to 100 milliseconds after the start time), collect the valve command quantities and valve position feedback quantities of the main pump foam valve, main pump inlet valve, standby pump foam valve, standby pump inlet valve, main pump mixing valve, and standby pump mixing valve, and simultaneously collect the main pump status quantity, standby pump status quantity, and foam tank liquid level quantity to obtain the original monitoring item set.
[0018] In a preferred embodiment, the valve command measure is the opening command output by the controller, with the dimension being percentage (0-100); the valve position feedback measure is the actual opening read back by the position sensor of the valve actuator, with the dimension also being percentage (0-100).
[0019] For example, the valve command quantity of the main pump foam valve is 60, and the valve position feedback quantity is 54; the valve command quantity of the main pump inlet valve is 80, and the valve position feedback quantity is 79; the valve command quantity of the standby pump foam valve is 0, and the valve position feedback quantity is 2; the valve command quantity of the standby pump inlet valve is 0, and the valve position feedback quantity is 1; the valve command quantity of the main pump mixing valve is 70, and the valve position feedback quantity is 68; the valve command quantity of the standby pump mixing valve is 0, and the valve position feedback quantity is 0.
[0020] For example, the status parameters of the main pump and the standby pump are taken from the operating contact of the pump driver, and the value is a binary value of operating state / non-operating state; for example, the status parameter of the main pump is operating state and the status parameter of the standby pump is non-operating state; the liquid level of the foam tank is taken as the liquid level percentage (0~100) output by the liquid level transmitter; for example, the liquid level of the foam tank is 43.
[0021] All of the above quantities are written into the same original monitoring entry within the same sampling window. The sampling period index and data source identifier (valve actuator identifier, pump driver identifier, liquid level sensor identifier) are written into the entry simultaneously.
[0022] S1.3 Write each item in the original monitoring item set into the sampling period index, and summarize the valve command quantity, valve position feedback quantity, main pump status quantity, standby pump status quantity and foam tank liquid level quantity under the same index according to the sampling period index to obtain the periodic monitoring items.
[0023] In a preferred embodiment, the original set of monitoring entries is aggregated into periodic monitoring entries after being written into the sampling period index: for the valve command quantity and valve position feedback quantity of the same valve under the same sampling period index, the last stable readback value in the sampling window is taken as the valve position feedback quantity of that period, and the command value that remains unchanged in the window is taken as the valve command quantity of that period; for the main pump status quantity and the standby pump status quantity, the status that appears most frequently in the window is taken as the status of that period; for the foam tank level quantity, the median in the window is taken as the level of that period.
[0024] For example, within the sampling window with a sampling period index of 120, if the main pump foam valve position feedback is read back as 52, 53, and 54, then 54 is written into the monitoring entry for that period; if the foam tank level is read back as 43, 43, and 44, then 43 is written into the monitoring entry for that period; after the period monitoring entry is generated, the entry structure shall at least include: sampling period index, valve command quantities of the six valves, valve position feedback quantities of the six valves, main pump status quantity, standby pump status quantity, foam tank level quantity, and generation timestamp.
[0025] S1.4 When a main pump status variable and a standby pump status variable have a main / standby switching edge between two adjacent sampling period indices, the valve position feedback quantity in the period monitoring entry is mapped to the sampling period index where the switching edge is located according to the alignment compensation rule, and the compensated period monitoring entry is output.
[0026] Specifically, the main pump status quantity and the standby pump status quantity are compared under two adjacent sampling period indices. When the main pump status quantity changes from running to non-running and the standby pump status quantity changes from non-running to running, or the main pump status quantity changes from non-running to running and the standby pump status quantity changes from running to non-running, the sampling period index corresponding to the main / standby switching edge is recorded as the switching index. The valve position feedback change rate is calculated for each valve in the periodic monitoring entry. The valve position feedback change rate is the ratio of the difference in valve position feedback quantity under two adjacent sampling period indices to the preset sampling period. Alignment is established. The compensation rules, including the valve position feedback change rate threshold and index assignment rules, stipulate that when the valve position feedback change rate of a valve is greater than or equal to the valve position feedback change rate threshold (e.g., 150 opening percentages per second), the valve position feedback of that valve in the next sampling period is assigned to the periodic monitoring entry corresponding to the switching index. For valves that meet the index assignment rules, the sampling period index of their valve position feedback is updated according to the switching index, and the updated valve position feedback is written into the periodic monitoring entry corresponding to the switching index, thus obtaining the compensated periodic monitoring entry.
[0027] For example, the switching occurs between indices 200 and 201. The valve position feedback of the main pump foam valve jumps from 20 to 55. When the rate of change reaches the threshold, the value of 55 in index 201 is assigned to the periodic monitoring entry corresponding to the switching index 201, and its original value is retained in the corresponding entry in index 200. This ensures that the switching index entry is consistent with the standby pump operating state at the valve position feedback level, reducing mismatched entries when the main pump operating segment / standby pump operating segment is segmented.
[0028] S1.5. The compensated periodic monitoring entries corresponding to each sampling period index are concatenated in index order to form an aligned monitoring record set.
[0029] In a preferred embodiment, the compensated period monitoring entries corresponding to each sampling period index are written into the aligned monitoring record set in ascending order of the index. The set storage structure is preferably a time-series table sorted by index. When a cache page is overwritten, the sampling period index is used as the primary key to write back to persistent storage. To facilitate subsequent segmented feature extraction, a record validity flag is appended to the end of each record. When a period entry has a missing valve position feedback or an abnormal liquid level jump exceeding a preset range, the validity flag is marked as invalid and skipped during subsequent feature extraction. For example, 61 consecutive records from index 300 to 360 are spliced together to form a continuous running record. Subsequently, in S2, this record is segmented into running segments according to the main pump status and the standby pump status.
[0030] It should be noted that the data collection objects in this embodiment are limited to the valve command quantities and valve position feedback quantities of six valves, the status quantities of the main pump and the standby pump, and the liquid level of the foam tank. This is because the typical failure modes of foam mixing devices are mostly manifested in three types of problems: inconsistency between commands and feedback, mismatch of status during the switching between main and standby operating conditions, and changes in supply-side constraints caused by changes in liquid level. Compared with existing solutions that only collect pressure and flow or only collect pump electrical parameters, the above collection combination forms a synchronous record of execution, operating conditions, and supply under the same sampling period index, so that subsequent deviation feature extraction and gating inference have the same time reference, thereby reducing the risk of misjudgment caused by data asynchrony during the main and standby switching transition.
[0031] S2. Generate a causal adjacency matrix and a master / slave switching mode identifier based on the master / slave connection relationship of the foam mixing device and the valve linkage rules, and extract the deviation feature set corresponding to each valve and each pump from the alignment monitoring record set. Note that the following should be noted in this step: S2.1 Read the main and backup connection relationship of the foam mixing device and establish a set of equipment nodes. The set of equipment nodes includes the main pump foam valve, the main pump inlet valve, the backup pump foam valve, the backup pump inlet valve, the main pump mixing valve, the backup pump mixing valve, the main pump, the backup pump, and the foam tank liquid level.
[0032] In a preferred embodiment, the primary and backup connection relationship is stored locally on the controller in the form of a device configuration file or a drawing parameter table. The content includes at least: the device serial connection sequence of the primary pump liquid supply path, the device serial connection sequence of the backup pump liquid supply path, the inlet connection point and outlet connection point of each device, and the confluence connection point of the primary pump liquid supply path and the backup pump liquid supply path at the mixing branch.
[0033] For example, the main pump supply path is connected in series at the following order: main pump inlet valve inlet connection point, main pump inlet valve outlet connection point, main pump inlet connection point, main pump outlet connection point, main pump mixing valve inlet connection point, main pump mixing valve outlet connection point, and mixing branch confluence connection point; the foam branch is connected in series at the following order: foam tank outlet connection point, foam branch inlet connection point, main pump foam valve inlet connection point, main pump foam valve outlet connection point, and mixing branch confluence connection point; the backup pump path is configured according to the same structure.
[0034] As an example, the set of equipment nodes is established according to the equipment identifier in the configuration table. The nodes include at least: main pump foam valve, main pump inlet valve, standby pump foam valve, standby pump inlet valve, main pump mixing valve, standby pump mixing valve, main pump, standby pump, and foam tank level. The foam tank level node is associated with the foam tank outlet connection point and written into the node attribute for reference when S2.2 determines upstream / downstream.
[0035] S2.2 Construct a causal adjacency matrix based on the primary and backup connection relationship. The elements of the causal adjacency matrix are either 0 or 1. When the first device node is located upstream of the second device node in the same liquid supply path and there is a continuous pipeline connection between them, the corresponding element is set to 1. When the first device node and the second device node do not belong to the same liquid supply path or there is no continuous pipeline connection between them, the corresponding element is set to 0.
[0036] In a preferred embodiment, the causal adjacency matrix is generated according to a fixed order of the device node set, and the matrix elements are either 0 or 1. The device node set is defined as follows. The causal adjacency matrix is denoted as Its construction rules are as follows: When a node With nodes Belonging to the same liquid supply path or the same branch, and from The outlet connection point can be connected to the continuous pipeline in sequence along the liquid supply direction to reach the outlet connection point. The entry connection point is then set. Otherwise, set Its expression is as follows:
[0037] Where A is the causal adjacency matrix; V represents the matrix elements; V is the set of device nodes. For the i-th device node; For the j-th device node; This indicates that there is a flow from along the liquid supply direction. arrive Reachability relationship; From Export connection point to The sequence of connection points at the entry connection point.
[0038] It should be further noted that, in this embodiment, the continuous pipeline connectivity is determined according to the sequence of connection points: when If all adjacent connection points in the sequence have direct connection records in the configuration table, and there are no cross-path jumps in the sequence (e.g., jumping from the main pump path to the backup pump path without passing through the hybrid branch merging connection point), then it is determined to be continuous; otherwise, it is determined to be discontinuous.
[0039] For example, foam tank level node node with main pump foam valve If there exists a continuous sequence of connection points between the foam tank outlet, the foam branch inlet, and the main pump foam valve inlet, then... If the main pump inlet valve and the standby pump inlet valve belong to different paths and have no continuous sequence, then the corresponding element is set to 0.
[0040] S2.3 Read the valve linkage rules and form a valve linkage constraint set. The valve linkage rules include the mutually exclusive opening and closing relationship between the main pump foam valve and the standby pump foam valve, the mutually exclusive opening and closing relationship between the main pump inlet valve and the standby pump inlet valve, the mutually exclusive opening and closing relationship between the main pump mixing valve and the standby pump mixing valve, and the synchronous opening and closing relationship between the inlet valve and the foam valve corresponding to the same pump.
[0041] It should be noted that the valve linkage rules are stored in the form of a control logic table, and the rule items include at least two categories: mutually exclusive opening and closing and synchronous opening and closing.
[0042] As an example, the mutually exclusive opening and closing relationships include: when the valve command quantity of the main pump foam valve is greater than 0, the valve command quantity of the standby pump foam valve is fixed at 0; when the valve command quantity of the standby pump foam valve is greater than 0, the valve command quantity of the main pump foam valve is fixed at 0; the same applies to the inlet valve and the mixing valve.
[0043] As an example, the synchronous opening and closing relationship includes: when the valve command quantity of the main pump inlet valve changes from 0 to greater than 0, the valve command quantity of the main pump foam valve changes from 0 to greater than 0 within the same sampling period index, and the direction of the command change of the two is consistent; the same applies when closing.
[0044] Furthermore, the valve linkage constraint set is written with a structure of constraint identifier, constraint type, involved valve pair, trigger condition, and constraint action. For example, mutual exclusion constraint C1: involves the main pump foam valve and the standby pump foam valve; the trigger condition is that the command quantity of either valve is greater than 0; the constraint action is that the command quantity of the other valve is 0.
[0045] S2.4. Based on the alignment monitoring record set, compare the main pump status quantity and the standby pump status quantity under two adjacent sampling period indices. When the main pump status quantity is in the running state and the standby pump status quantity is in the non-running state, determine the main / standby switching mode identifier as the main pump running mode. When the main pump status quantity is in the non-running state and the standby pump status quantity is in the running state, determine the main / standby switching mode identifier as the standby pump running mode. When the main pump status quantity and the standby pump status quantity exchange between the running state and the non-running state between two adjacent sampling period indices, determine the main / standby switching mode identifier as the main / standby switching transition mode.
[0046] It should be noted that the transition length is preferably 3 sampling period indices to cover the response delay of the pump driver and valve actuator.
[0047] S2.5 Determine the edge pairs that need to be constrained by the master / standby switching transition mode from the valve linkage constraint set and generate a gated edge set. Each edge pair in the gated edge set corresponds to an edge in the causal adjacency matrix and is associated with at least one valve linkage constraint. When the master / standby switching mode is identified as the master / standby switching transition mode, set the causal adjacency matrix element corresponding to the gated edge set to 0. When the master / standby switching mode is identified as the master pump operation mode or the standby pump operation mode, restore the causal adjacency matrix element corresponding to the gated edge set to 1.
[0048] For example, the edge pair associated with the mutual exclusion constraint "main pump mixing valve - standby pump mixing valve mutual exclusion" includes the main pump mixing valve → mixing branch junction connection point and the standby pump mixing valve → mixing branch junction connection point. In the main / standby switching transition mode, the matrix elements corresponding to the above edge pair are set to 0, so that the main and standby paths do not introduce cross-influences to each other through the junction point in the transition section. When the mode is the main pump operation mode or the standby pump operation mode, the above zeroed elements are restored to 1, so that the steady-state operation section propagates according to the original connection relationship.
[0049] Specifically, generating a set of deviation features includes: calculating the valve deviation for each periodic monitoring item, where the valve deviation is the difference between the valve command quantity and the valve position feedback quantity for the same valve under the same sampling period index, and writing the valve deviation for each valve into the deviation record item; calculating the pump deviation from the deviation record item, where the pump deviation includes the main pump deviation and the standby pump deviation, wherein when the main pump status is in the running state, the sum of the valve deviations of the corresponding valves of the main pump is taken as the main pump deviation, and when the standby pump status is in the running state, the sum of the valve deviations of the corresponding valves of the standby pump is taken as the standby pump deviation; dividing the deviation record item into the main pump running segment, the standby pump running segment, and the main / standby switching transition segment according to the main pump status and the standby pump status, and calculating the mean and peak deviation of each valve and the mean and peak deviation of each pump in each segment to obtain the set of deviation features.
[0050] In a preferred embodiment, the valve deviation of the six valves is first calculated for each cycle monitoring item and written into the deviation record item; then, the deviation record item is divided into segments according to the main pump status and the standby pump status: when several consecutive indices meet the main pump operation mode, they form a main pump operation segment; when they meet the standby pump operation mode, they form a standby pump operation segment; consecutive indices that identify the main / standby switching transition mode form a main / standby switching transition segment; the segment division adopts the rule that only segments with a continuous length of no less than 5 indices with the same pattern are formed, and segments shorter than 5 indices are merged into adjacent transition segments to reduce jitter.
[0051] For example, for any segment S and any valve m, suppose there are a total of The deviation record contains [number] entries, and the valve deviation sequence is as follows: The mean deviation and the peak deviation are defined as follows:
[0052]
[0053] For any segment S and pump r ∈ {main pump, standby pump}, let the set of valves corresponding to the pump be . The pump deviation sequence is defined as the sum of the valve deviations at each moment within a segment. The mean and peak values of the pump deviation are defined as follows:
[0054]
[0055] Where S represents a certain operating segment or transition segment; This represents the number of entries in this section; m represents the valve identifier. This represents the valve deviation of valve m at index t. This represents the average valve deviation. 'r' represents the peak value of the valve deviation; 'r' represents the pump identifier. Let r be the set of valves corresponding to pump r; This is the pump deviation. This represents the average value of the pump deviation. This represents the peak value of the pump deviation.
[0056] For example, the deviation feature set includes: the average deviation of the main pump foam valve, the peak deviation of the main pump foam valve, the average deviation of the main pump, and the peak deviation of the main pump during the main pump operation section; similarly, one set is used for the standby pump operation section and the main / standby switching transition section.
[0057] S3. Based on the causal adjacency matrix and the deviation feature set, construct a structured Bayesian diagnostic model containing the latent variable sets of valve faults and pump faults. Perform variational Bayesian update using the master / standby switchover mode identifier as a gating variable to obtain the posterior fault probability set and the propagation posterior weight set. Note the following in this step: S3.1. Determine the parent-child relationship between equipment nodes based on the causal adjacency matrix, and use the set of observed variables corresponding to the deviation feature set as the observation end. Set the valve fault latent variable set corresponding to each valve and the pump fault latent variable set corresponding to each pump to construct a structured Bayesian diagnostic model.
[0058] In a preferred embodiment, the parent-child relationship is derived from a causal adjacency matrix: when At that time, the node denoted as node The parent node; the set of observed variables is taken from the set of deviation features. The observed variables consist of the mean value of valve deviation, the peak value of valve deviation, the mean value of pump deviation, and the peak value of pump deviation. For example, the peak value of the main pump foam valve deviation during the main pump operation section, and the mean value of the standby pump deviation during the main / standby switching transition section. They are expanded into a dimension vector according to the section type; the set of valve fault latent variables is set separately for each of the six valves, and each latent variable takes a binary value of normal state / fault state; the set of pump fault latent variables is set separately for the main pump and the standby pump, and both are binary values; for example, there are eight latent variables: main pump foam valve fault latent variable, main pump inlet valve fault latent variable, main pump mixing valve fault latent variable, standby pump foam valve fault latent variable, standby pump inlet valve fault latent variable, standby pump mixing valve fault latent variable, main pump fault latent variable, and standby pump fault latent variable.
[0059] S3.2 Read the master / standby switching mode identifier. When the master / standby switching mode identifier is master pump operation mode, retain the master pump related nodes and their incoming edges and close the standby pump related incoming edges. When the master / standby switching mode identifier is standby pump operation mode, retain the standby pump related nodes and their incoming edges and close the master pump related incoming edges. When the master / standby switching mode identifier is master / standby switching transition mode, close the cross incoming edges between the master pump related nodes and the standby pump related nodes to obtain the gated structured Bayesian diagnostic model.
[0060] In a preferred embodiment, the structured Bayesian diagnostic model consists of a latent variable layer and an observation layer, with the gating variable being the primary / backup switching mode identifier; let the set of latent variables be... The set of observed variables is Let g ∈ {main pump operation, standby pump operation, transition} be the gated variable, and let the set of directed edges after gated operation be denoted as . The structured Bayesian diagnostic model is jointly decomposed by the following formula, denoted as:
[0061] Where Z represents the set of latent variables for valve failures and the set of latent variables for pump failures; X represents the set of observed variables corresponding to the set of deviation characteristics; Primary / backup switchover mode identifier; This is the set of valid edges after gating; Hidden variables after gating The set of parent nodes; For observed variables after gating The set of parent nodes; This is the conditional probability term.
[0062] Specifically, when When the main pump is in operation mode, retain the main pump-related nodes and their incoming edges, and close the incoming edges of the standby pump-related nodes; example incoming edges include "main pump foam valve fault latent variable → main pump foam valve deviation peak observation variable" and "main pump fault latent variable → main pump deviation mean observation variable", and close incoming edges such as "standby pump fault latent variable → standby pump deviation observation variable"; when The same procedure applies when the pump is in standby mode; when When switching from primary to backup mode, the cross-inbound edges between the primary pump-related nodes and the backup pump-related nodes are closed. Examples of cross-inbound edges include "primary pump fault latent variable → backup pump deviation observation variable" and "backup pump fault latent variable → primary pump deviation observation variable", so that cross-path fault propagation is not introduced within the transition section.
[0063] S3.3 Input the set of deviation features into the gated structured Bayesian diagnostic model, initialize the variational distribution parameters of the valve fault latent variable set and the pump fault latent variable set, and iteratively update the variational distribution parameters of each latent variable according to the parent-child relationship of the causal adjacency matrix to obtain the posterior distribution parameters of each latent variable.
[0064] Specifically, a maximum number of iterations and a convergence difference are set, and initial variational distribution parameters are assigned to the valve fault latent variable set and the pump fault latent variable set respectively during the first iteration. In each iteration, for any latent variable in the valve fault latent variable set and the pump fault latent variable set, the parent node set and child node set corresponding to that latent variable are read, and a subset of deviation features corresponding to the child node set is selected from the deviation feature set. Based on the current variational distribution parameters corresponding to the parent node set, the expectation operation is performed on the conditional probability expression of that latent variable in the structured Bayesian diagnostic model. The expectation operation is performed on the value distribution of the parent node set. The weighted summation is performed, and the subset of deviation features is substituted into the conditional probability expression to complete the logarithmic operation, obtaining the expected logarithmic value of the conditional probability term. The variational distribution parameters corresponding to the latent variables are updated according to the expected logarithmic value, and the updated variational distribution parameters are written back to the valve fault latent variable set or the pump fault latent variable set. The difference in variational distribution parameters between two adjacent iterations is calculated. The iteration is terminated when the difference in variational distribution parameters is less than the convergence difference, or when the number of iterations reaches the maximum number of iterations. The posterior distribution parameters used to generate the posterior fault probability set and the propagation posterior weight set are output.
[0065] In a preferred embodiment, the maximum number of iterations is 50, and the convergence difference is taken as... The parameter change threshold at each level; the initial variational distribution parameters take the same prior tendency for each latent variable, for example, the initial fault posterior takes a uniform starting point in the range of 1% to 5%; the parent node set and child node set are read from the gated edge set, such as the parent node set of the latent variable of the main pump mixing valve fault includes the latent variable of the main pump fault, and the child node set includes the observed variable of the mean deviation of the main pump mixing valve and the observed variable of the peak deviation of the main pump mixing valve; the difference of the variational distribution parameters between two adjacent iterations is calculated in this embodiment as the maximum value of the absolute difference of all latent variable parameters: after each iteration, all latent variables are traversed, and the absolute difference between the current iteration parameter and the previous iteration parameter is taken, and the largest difference is taken; when the maximum difference is less than the convergence difference, the iteration is terminated.
[0066] S3.4 Calculate the posterior fault probability set from the posterior distribution parameters. The posterior fault probability set includes the posterior fault state probability of each valve fault latent variable and the posterior fault state probability of each pump fault latent variable.
[0067] In a preferred embodiment, each latent variable is a binary variable, and the posterior fault probability is the probability that the latent variable is in a fault state under the variational distribution. Let the variational distribution of the k-th latent variable be... Then its posterior failure probability is defined as:
[0068] in, Let be the posterior failure probability of the k-th latent variable; It is a variational distribution; Let k be the k-th latent variable; 1 represents the fault state. For the valve posterior probability subset, k corresponds to the latent variable for each valve fault; for the pump posterior probability subset, k corresponds to the latent variable for the main pump fault and the latent variable for the standby pump fault; if the latent variable for the main pump foam valve fault... If the value is 0.23, then its posterior failure probability is 23%.
[0069] S3.5. Calculate the propagation posterior weight set for each valid edge based on the causal adjacency matrix. Each propagation posterior weight in the propagation posterior weight set is the product of the fault state posterior probability of the latent variable at the starting point of the edge and the log likelihood contribution of the observed variable at the ending point of the edge to the latent variable at the starting point under the posterior distribution parameters. The weights are then summarized in the order of the edges to form the propagation posterior weight set.
[0070] In a preferred embodiment, for each valid edge Calculate the propagation posterior weights; let the latent variable of the edge origin be... The observed variable at the edge endpoint is The posterior weight of the edge propagation is defined as:
[0071] in, For the edge The propagation posterior weights; Hidden variables as the starting point The posterior probability of the fault state; The difference in log-likelihood contribution of the endpoint observed variable to the starting latent variable.
[0072] In this embodiment, The following rules apply: Under the condition that the distribution parameters of the remaining parent nodes of the fixed endpoint observed variable remain unchanged, calculate the log-likelihood of the endpoint observed variable when the starting latent variable takes the fault state and the non-fault state respectively, and take the absolute value of the difference between the two as the contribution value difference.
[0073] For example, if for a certain observed variable ,when The log-likelihood is -2.1 when... If the log-likelihood is -3.0, then... Take 0.9, if ,but All valid edges are aggregated in the order of edges to form a propagation posterior weight set, and the starting device node identifier and the ending device node identifier are written into each weight.
[0074] S4. Based on the posterior fault probability set, determine the target valve or target pump with the highest fault contribution as a fault source candidate, and determine the set of affected devices associated with the fault source candidate based on the propagation posterior weight set. When the posterior fault probability corresponding to the fault source candidate is greater than the alarm probability threshold, output fault alarm information containing the fault source candidate and the set of affected devices. Note that the following should be noted in this step: S4.1 Read the posterior fault probability set and divide it into valve posterior probability subset and pump posterior probability subset according to equipment type, and write the posterior fault probability corresponding to each equipment node into the equipment node identifier.
[0075] In a preferred embodiment, after reading the posterior failure probability set, it is split into a valve posterior probability subset and a pump posterior probability subset according to the equipment type corresponding to the latent variable; the equipment type includes two categories: valve and pump; the equipment node identifier is consistent with the identifier in the equipment node set, such as main pump foam valve, main pump inlet valve, main pump mixing valve, standby pump foam valve, standby pump inlet valve, standby pump mixing valve, main pump, and standby pump; for each posterior probability record, the following fields are written: equipment node identifier, posterior failure probability, iteration termination index number, and corresponding main / standby switching mode identifier, which facilitates subsequent table filtering with the propagation weight set.
[0076] S4.2 Calculate the fault contribution for each device node based on the propagation posterior weight set. The fault contribution is the product of the posterior fault probability of the device node and the sum of the propagation posterior weights starting from the device node.
[0077] S4.3 Select the equipment node with the largest fault contribution from the valve posterior probability subset and the pump posterior probability subset, respectively, as valve candidate and pump candidate, and compare the fault contribution of the valve candidate and the pump candidate.
[0078] S4.4 When the failure contribution of a valve candidate is greater than or equal to that of a pump candidate, the valve candidate is determined as the target valve and used as a failure source candidate. When the failure contribution of a pump candidate is greater than that of a valve candidate, the pump candidate is determined as the target pump and used as a failure source candidate.
[0079] S4.5 Read the device node identifier of the fault source candidate, and filter the propagation posterior weights in the propagation posterior weight set where the starting device node identifier is equal to the propagation posterior weight of the fault source candidate to obtain the source propagation weight subset.
[0080] For example, if the candidate fault source is the main pump foam valve, then the source propagation weight subset includes records such as the observation variables related to the main pump foam valve → main pump mixing valve and the observation variables related to the main pump foam valve → mixing branch.
[0081] S4.6. Summarize the source propagation weight subset according to the endpoint device node identifier, calculate the cumulative propagation posterior weight corresponding to each endpoint device node identifier, and form a candidate affected table.
[0082] In a preferred embodiment, the source propagation weight subset is aggregated according to the endpoint device node identifier, and the cumulative propagation posterior weight is defined as the sum of the propagation posterior weights of the same endpoint:
[0083] in, The endpoint device node is identified as The cumulative propagation posterior weight; For the source propagation weight subset, fault source candidates The set of edges originating from; For the edge The propagation posterior weights; This is the identifier for the endpoint device node.
[0084] The candidate affected table is written in the structure of endpoint device node identifier, cumulative propagation posterior weight, path identifier, and segment identifier; for example, the cumulative propagation posterior weight of the endpoint being the main pump mixing valve is 0.62, and the cumulative propagation posterior weight of the endpoint being the foam tank level is 0.18.
[0085] S4.7. Add path attributes to each record in the candidate affected table: main pump supply path, standby pump supply path, or common mixed branch. Read the main / standby switchover mode identifier. When the main / standby switchover mode identifier is the main pump operation mode, remove the equipment node identifier of the standby pump supply path from the candidate affected table. When the main / standby switchover mode identifier is the standby pump operation mode, remove the equipment node identifier of the main pump supply path from the candidate affected table. When the main / standby switchover mode identifier is the main / standby switchover transition mode, retain the equipment node identifiers of the main pump supply path and the standby pump supply path.
[0086] S4.8. Collect the endpoint device node identifiers in the candidate affected table whose cumulative propagation posterior weight is greater than or equal to the preset affected threshold into an affected device set.
[0087] In a preferred embodiment, the preset affected threshold is 0.20, which is defined as the minimum selection value of the cumulative propagation posterior weight. Specifically, it is determined by: statistically analyzing the distribution quantiles of the cumulative propagation posterior weight within the historical normal sample segment, preferably taking the 95th quantile of the normal distribution as the threshold, so that the number of candidate affected devices under normal fluctuations is controlled; the affected device set is formed by traversing the candidate affected table, adding the endpoint device node identifiers with a cumulative propagation posterior weight greater than or equal to 0.20 to the affected device set, and sorting and outputting them in descending order of cumulative propagation posterior weight.
[0088] In a preferred embodiment, the alarm triggering condition is that the posterior fault probability corresponding to the fault source candidate is greater than the alarm probability threshold, wherein the alarm probability threshold is 10% and can be displayed as 10 on the interface; when the triggering condition is met, fault alarm information is output, and the alarm information includes at least: fault source candidate device node identifier, fault source candidate posterior fault probability, primary / backup switching mode identifier, affected device set, the first few items of the candidate affected table and the corresponding cumulative propagation posterior weight.
[0089] It should be noted that the purpose of setting the threshold to 10% in this embodiment is as follows: under the condition that there is short-term noise in the valve actuator and pump status variables, the posterior fault probability of less than 10% mostly corresponds to occasional deviations and transient deviations in the transition section; limiting the threshold to 10% can concentrate alarm triggering outside the low probability range where the posterior probability has deviated significantly from the prior probability, thus controlling the number of alarms and the false alarm rate, while still retaining a certain sensitivity in the early stage of the fault, so that the maintenance location can provide a candidate range at a stage where the set of affected equipment is small.
[0090] In a preferred embodiment, after the controller updates the posterior fault probability set after indexing in each sampling period, it reads the device node identifier of the fault source candidate and its posterior fault probability, and fixes the alarm probability threshold as a percentage of 10%, wherein the alarm probability threshold is recorded as 10 in the alarm field; when the posterior fault probability of the fault source candidate is greater than the alarm probability threshold, the alarm event status corresponding to the current sampling period index is set to the triggered state, and the fault source candidate, the set of affected devices and their key supporting fields are encapsulated as fault alarm information and written to the alarm queue; when the posterior fault probability of the fault source candidate is less than or equal to the alarm probability threshold, the alarm event status is set to the non-triggered state, and only the posterior fault probability snapshot for traceability is retained without being written to the alarm queue.
[0091] To avoid alarm events frequently appearing and disappearing between adjacent sampling period indices due to short-term fluctuations during the primary / standby switchover transition, this embodiment further introduces a continuity constraint on the trigger state: the fault alarm information is marked as a valid alarm only when the posterior fault probability of the fault source candidate is greater than the alarm probability threshold in two consecutive sampling period indices; if it is greater than the alarm probability threshold only in a single sampling period index, the output is marked as a pre-alarm and accompanied by a status field that needs to be reviewed in the next period, so that the alarm output is consistent with the temporal stability of the posterior probability.
[0092] In a preferred embodiment, the fault alarm information is represented by structured fields with consistent field names, and includes at least: alarm number, sampling period index, alarm generation timestamp, primary / backup switchover mode identifier, fault source candidate device node identifier, fault source candidate posterior fault probability, alarm probability threshold, affected device set, candidate affected table summary, and maintenance suggestion order field. The candidate affected table summary includes at least the identifiers of the first few endpoint device nodes in the affected device set and their cumulative propagation posterior weights, arranged in descending order of cumulative propagation posterior weights. The maintenance suggestion order field is generated according to the rules of fault source candidate priority, priority of the node with the largest cumulative propagation posterior weight, and priority of the path consistent with the current primary / backup switchover mode, so that the output content can directly correspond to on-site verification. The affected device set consists of endpoint device node identifiers in the candidate affected table whose cumulative propagation posterior weight is greater than or equal to a preset affected threshold, and is written in the alarm information in list form. Each item in the list carries the corresponding cumulative propagation posterior weight and path attribute identifier, avoiding the lack of sorting criteria by only providing the device name.
[0093] As an example, when the sampling period index is 3601, the main / standby switching mode is identified as the main pump operation mode. The fault source candidate output by the structured Bayesian diagnostic model is the main pump foam valve, with a posterior fault probability of 23% and an alarm probability threshold of 10%. At the same time, the source propagation weight subset is summarized to obtain a candidate affected table, in which the cumulative propagation posterior weight of the main pump mixing valve is 0.62, the cumulative propagation posterior weight of the main pump is 0.41, the cumulative propagation posterior weight of the foam tank level is 0.18, and the cumulative propagation posterior weight of the standby pump mixing valve is 0.27. Since the main / standby switching mode is identified as the main pump operation mode, this embodiment removes the standby pump mixing valve record with the path attribute of the standby pump liquid supply path from the candidate affected table. Then, the set of affected devices is obtained by filtering with a preset affected threshold of 0.20 as {main pump mixing valve, main pump} and sorted according to the cumulative propagation posterior weight.
[0094] The controller further reads the posterior fault probability of the candidate fault source under index 3600 of the adjacent previous sampling period. This probability is 21%, which is also greater than 10%, satisfying the continuity constraint. Therefore, a valid fault alarm is output at index 3601. The alarm information is written as follows: Alarm number: ALM-20251218-3601; Main / standby switching mode identifier: main pump operation mode; Fault source candidate device node identifier: main pump foam valve; Fault source candidate posterior fault probability: 23%; Alarm probability threshold: 10%; Affected device set: {main pump} The candidate affected items are: mixing valve (0.62), main pump (0.41). The summary of the candidate affected items is the mixing valve 0.62, main pump 0.41, and foam tank level 0.18. The recommended maintenance sequence is to first check the actuator and feedback loop of the main pump foam valve, then check the valve position feedback and valve action lag of the main pump mixing valve, and finally check the main pump operating status signal. Through the above output structure, the alarm information gives the candidate fault source and affected range in the same record, and gives the sorting basis and the consistency information of the working condition path, so that the field personnel can verify each item by field.
[0095] 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 fault diagnosis of a foam mixing device based on variational Bayes, characterized in that, include: Under a preset sampling period, valve command quantities and valve position feedback quantities of the main pump foam valve, main pump inlet valve, standby pump foam valve, standby pump inlet valve, main pump mixing valve, and standby pump mixing valve are collected, and the main pump status quantity, standby pump status quantity, and foam tank liquid level quantity are collected simultaneously to obtain an aligned monitoring record set. Based on the primary and backup connection relationship of the foam mixing device and the valve linkage rules, a causal adjacency matrix and a primary and backup switching mode identifier are generated, and the set of deviation features corresponding to each valve and each pump is extracted from the alignment monitoring record set. Based on the causal adjacency matrix and the deviation feature set, a structured Bayesian diagnostic model containing the valve fault latent variable set and the pump fault latent variable set is constructed. The master / standby switching mode identifier is used as the gate variable to perform variational Bayesian update to obtain the posterior fault probability set and the propagation posterior weight set. The target valve or target pump with the highest fault contribution is determined as the fault source candidate based on the posterior fault probability set, and the set of affected devices associated with the fault source candidate is determined based on the propagation posterior weight set. When the posterior fault probability corresponding to the fault source candidate is greater than the alarm probability threshold, a fault alarm message containing the fault source candidate and the set of affected devices is output.
2. The method for fault diagnosis of a foam mixing device based on variational Bayes as described in claim 1, characterized in that, The alignment monitoring record set is obtained, including: At the beginning of each sampling period, a sampling period index is generated, and the sampling period index is written into the buffer identifier corresponding to that sampling period. Within the sampling window corresponding to the sampling period index, valve command quantities and valve position feedback quantities of the main pump foam valve, main pump inlet valve, standby pump foam valve, standby pump inlet valve, main pump mixing valve, and standby pump mixing valve are collected, and the main pump status quantity, standby pump status quantity, and foam tank liquid level quantity are collected simultaneously to obtain the original monitoring item set. Each item in the original monitoring item set is written into the sampling period index, and the valve command quantity, valve position feedback quantity, main pump status quantity, standby pump status quantity and foam tank liquid level quantity under the same index are summarized according to the sampling period index to obtain the periodic monitoring items. When the main pump status quantity and the standby pump status quantity have a main / standby switching edge between two adjacent sampling period indices, the valve position feedback quantity in the period monitoring entry is mapped to the sampling period index where the switching edge is located according to the alignment compensation rule, and the compensated period monitoring entry is output. The compensated periodic monitoring entries corresponding to each sampling period index are concatenated in index order to form the aligned monitoring record set.
3. The method for fault diagnosis of a foam mixing device based on variational Bayes as described in claim 2, characterized in that, The output of the compensated periodic monitoring entries includes: Under two adjacent sampling period indices, the main pump status quantity and the standby pump status quantity are compared. When the main pump status quantity changes from running state to non-running state and the standby pump status quantity changes from non-running state to running state, or the main pump status quantity changes from non-running state to running state and the standby pump status quantity changes from running state to non-running state, the sampling period index corresponding to the main / standby switching edge is recorded as the switching index. For each valve in the periodic monitoring item, the valve position feedback change rate is calculated. The valve position feedback change rate is the ratio of the difference between the valve position feedback values under two adjacent sampling period indices to the preset sampling period. The alignment compensation rule is established, which includes a valve position feedback change rate threshold and an index assignment rule. When the valve position feedback change rate of a certain valve is greater than or equal to the valve position feedback change rate threshold, the valve position feedback of the valve in the next sampling period is assigned to the period monitoring entry corresponding to the switching index. For valves that meet the index attribution rules, update the sampling period index of their valve position feedback according to the switching index, and write the updated valve position feedback into the period monitoring entry corresponding to the switching index to obtain the compensated period monitoring entry.
4. The method for fault diagnosis of a foam mixing device based on variational Bayes as described in claim 1 or 2, characterized in that, Generating the causal adjacency matrix and the primary / standby switchover mode identifier includes: Read the main and backup connection relationship of the foam mixing device and establish a set of equipment nodes. The set of equipment nodes includes the main pump foam valve, the main pump inlet valve, the backup pump foam valve, the backup pump inlet valve, the main pump mixing valve, the backup pump mixing valve, the main pump, the backup pump, and the foam tank liquid level. A causal adjacency matrix is constructed based on the primary and backup connection relationship. The elements of the causal adjacency matrix are either 0 or 1. When the first device node is located upstream of the second device node in the same liquid supply path and there is a continuous pipeline connection between them, the corresponding element is set to 1. When the first device node and the second device node do not belong to the same liquid supply path or there is no continuous pipeline connection between them, the corresponding element is set to 0. Read the valve linkage rules and form a valve linkage constraint set. The valve linkage rules include the mutually exclusive opening and closing relationship between the main pump foam valve and the standby pump foam valve, the mutually exclusive opening and closing relationship between the main pump inlet valve and the standby pump inlet valve, the mutually exclusive opening and closing relationship between the main pump mixing valve and the standby pump mixing valve, and the synchronous opening and closing relationship between the inlet valve and the foam valve corresponding to the same pump. Based on the alignment monitoring record set, the status values of the main pump and the standby pump are compared under two adjacent sampling period indices. When the status value of the main pump is in the running state and the status value of the standby pump is in the non-running state, the main / standby switching mode is identified as the main pump running mode. When the status value of the main pump is in the non-running state and the status value of the standby pump is in the running state, the main / standby switching mode is identified as the standby pump running mode. When the status values of the main pump and the standby pump are interchanged between the running and non-running states between two adjacent sampling period indices, the main / standby switching mode is identified as the main / standby switching transition mode. The edge pairs that need to be constrained by the master / slave switching transition mode are determined from the valve linkage constraint set and a gated edge set is generated. Each edge pair in the gated edge set corresponds to an edge in the causal adjacency matrix and is associated with at least one valve linkage constraint. When the master / slave switching mode is identified as a master / slave switching transition mode, the causal adjacency matrix element corresponding to the gated edge set is set to 0. When the master / slave switching mode is identified as a master pump operation mode or a standby pump operation mode, the causal adjacency matrix element corresponding to the gated edge set is restored to 1.
5. The method for fault diagnosis of a foam mixing device based on variational Bayes as described in claim 4, characterized in that, The main and backup connection relationship includes the equipment serial connection sequence of the main pump liquid supply path and the backup pump liquid supply path, the inlet connection point and outlet connection point of each equipment, and the confluence connection point of the main pump liquid supply path and the backup pump liquid supply path at the mixing branch.
6. The method for fault diagnosis of a foam mixing device based on variational Bayes as described in claim 2, characterized in that, Generating the set of deviation features includes: For each period monitoring item, the valve deviation is calculated. The valve deviation is the difference between the valve command quantity and the valve position feedback quantity of the same valve under the same sampling period index. The valve deviation of each valve is written into the deviation record item. The pump deviation is calculated from the deviation record entries. The pump deviation includes the main pump deviation and the standby pump deviation. When the main pump status is in the running state, the sum of the valve deviations of the valves corresponding to the main pump is taken as the main pump deviation. When the standby pump status is in the running state, the sum of the valve deviations of the valves corresponding to the standby pump is taken as the standby pump deviation. The deviation record entries are divided into the main pump operation segment, the standby pump operation segment, and the main / standby switching transition segment according to the main pump status quantity and the standby pump status quantity. In each segment, the mean and peak deviation of each valve and the mean and peak deviation of each pump are calculated to obtain the deviation feature set.
7. The method for fault diagnosis of a foam mixing device based on variational Bayes as described in claim 6, characterized in that, Obtaining the posterior fault probability set and the propagation posterior weight set includes: The parent-child relationship between device nodes is determined based on the causal adjacency matrix, and the set of observation variables corresponding to the deviation feature set is used as the observation end. The set of valve fault latent variables corresponding to each valve and the set of pump fault latent variables corresponding to each pump are set to construct a structured Bayesian diagnostic model. Read the primary / standby switching mode identifier. When the primary / standby switching mode identifier is the primary pump operation mode, retain the primary pump related nodes and their incoming edges and close the standby pump related incoming edges. When the primary / standby switching mode identifier is the standby pump operation mode, retain the standby pump related nodes and their incoming edges and close the primary pump related incoming edges. When the primary / standby switching mode identifier is the primary / standby switching transition mode, close the cross incoming edges between the primary pump related nodes and the standby pump related nodes to obtain the gated structured Bayesian diagnostic model. The deviation feature set is input into the gated structured Bayesian diagnostic model to initialize the variational distribution parameters of the valve fault latent variable set and the pump fault latent variable set. The variational distribution parameters of each latent variable are iteratively updated according to the parent-child relationship of the causal adjacency matrix to obtain the posterior distribution parameters of each latent variable. The posterior failure probability set is calculated from the posterior distribution parameters. The posterior failure probability set includes the posterior failure state probability of each valve failure latent variable and the posterior failure state probability of each pump failure latent variable. For each valid edge, a propagation posterior weight set is calculated based on the causal adjacency matrix. Each propagation posterior weight in the propagation posterior weight set is the product of the fault state posterior probability of the latent variable at the starting point of the edge and the log likelihood contribution of the observed variable at the ending point of the edge to the latent variable at the starting point under the posterior distribution parameters. The weights are then summarized in the order of the edges to form the propagation posterior weight set.
8. The method for fault diagnosis of a foam mixing device based on variational Bayes as described in claim 7, characterized in that, The iterative update includes: Set the maximum number of iterations and the convergence difference, and assign initial variational distribution parameters to the valve fault latent variable set and the pump fault latent variable set respectively during the first iteration; In each iteration, for any latent variable in the valve fault latent variable set and the pump fault latent variable set, the parent node set and child node set corresponding to the latent variable are read, and a subset of deviation features corresponding to the child node set is selected from the deviation feature set. Based on the current variational distribution parameters corresponding to the set of parent nodes, the expectation operation is performed on the conditional probability expression of the latent variable in the structured Bayesian diagnostic model. The expectation operation is to perform a weighted summation of the value distribution of the set of parent nodes and substitute the deviation feature subset into the conditional probability expression to complete the logarithmic operation, thereby obtaining the expected logarithmic value of the conditional probability term. Update the variational distribution parameters corresponding to the latent variables according to the expected logarithmic value to obtain the updated variational distribution parameters, and write the updated variational distribution parameters back to the valve fault latent variable set or the pump fault latent variable set; Calculate the difference in variational distribution parameters between two adjacent iterations. If the difference in variational distribution parameters is less than the convergence difference, the iteration is terminated. Alternatively, if the number of iterations reaches the maximum number of iterations, the iteration is terminated. Output the posterior distribution parameters used to generate the posterior fault probability set and the propagation posterior weight set.
9. The method for fault diagnosis of a foam mixing device based on variational Bayes as described in claim 7, characterized in that, The candidate fault sources are obtained as follows: Read the set of posterior failure probabilities and divide it into a subset of valve posterior probabilities and a subset of pump posterior probabilities according to equipment type, and write the posterior failure probability corresponding to each equipment node into the equipment node identifier. The fault contribution is calculated for each device node based on the propagation posterior weight set. The fault contribution is the product of the posterior fault probability of the device node and the sum of the propagation posterior weights starting from the device node. In the valve posterior probability subset and the pump posterior probability subset, the equipment node with the largest fault contribution is selected as the valve candidate and the pump candidate, respectively, and the fault contribution of the valve candidate and the pump candidate is compared. When the failure contribution of the valve candidate is greater than or equal to the failure contribution of the pump candidate, the valve candidate is determined as the target valve and used as the failure source candidate. When the failure contribution of the pump candidate is greater than the failure contribution of the valve candidate, the pump candidate is determined as the target pump and used as the failure source candidate.
10. The method for fault diagnosis of a foam mixing device based on variational Bayes as described in claim 9, characterized in that, The set of affected devices is obtained, including: Read the device node identifier of the fault source candidate, and filter the propagation posterior weights in the propagation posterior weight set so that the starting device node identifier is equal to the propagation posterior weight of the fault source candidate to obtain the source propagation weight subset; The source propagation weight subset is summarized according to the endpoint device node identifier, and the cumulative propagation posterior weight corresponding to each endpoint device node identifier is calculated to form a candidate affected table; Read the primary / standby switching mode identifier. When the primary / standby switching mode identifier is the primary pump operation mode, remove the device node identifier of the standby pump liquid supply path from the candidate affected table. When the primary / standby switching mode identifier is the standby pump operation mode, remove the device node identifier of the primary pump liquid supply path from the candidate affected table. When the primary / standby switching mode identifier is the primary / standby switching transition mode, retain the device node identifiers of the primary pump liquid supply path and the standby pump liquid supply path. The endpoint device node identifiers in the candidate affected table whose cumulative propagation posterior weight is greater than or equal to the preset affected threshold are aggregated into an affected device set.
Citation Information
Patent Citations
Intelligent proportionally-mixing system for foam
CN103816633A
Equipment fault diagnosis method and system based on bayesian network
CN109032872A
Nuclear power main pump fault diagnosis method based on Bayesian network
CN111664083A
Water chilling unit fault diagnosis method based on Bayesian network integrating decision boundary
CN117029179A