Pump set fault diagnosis method and system fusing fuzzy rules and LLM iterative optimization
Patent Information
- Application Number
- CN202610933492.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-10-23
AI Technical Summary
[0006]为了解决现有泵组故障诊断系统无法在保留专家知识可解释性的前提下,充分发挥数据驱动方法与LLM语义理解能力的优势,同时规避统计相关性带来的虚假关联风险的技术问题,本发明提供了一种融合模糊规则与LLM迭代优化的泵组故障诊断方法及系统
1、本发明将专家定义的模糊隶属度规则与大语言模型智能权重推理相结合,形成“可解释基座+LLM调优”的泵组故障诊断新范式,兼顾诊断准确性与决策透明度;
Smart Images

Figure CN122964756A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial equipment fault diagnosis technology, and in particular to a pump set fault diagnosis method and system that integrates fuzzy rules and LLM iterative optimization. Background Technology
[0002] In industrial production, centrifugal pump sets are critical fluid transport equipment, and their operating status directly affects the stability and efficiency of the entire production process. Because centrifugal pump sets operate under high loads and continuous conditions for extended periods, and are frequently affected by complex factors such as media corrosion and fluctuating operating conditions, their key components (such as bearings, impellers, and sealing devices) are highly susceptible to wear, fatigue, or failure. Without timely fault diagnosis and early warning, minor hidden dangers can escalate into sudden equipment shutdowns, causing not only production interruptions and soaring maintenance costs, but also potentially serious consequences such as media leaks and safety accidents. Therefore, conducting systematic fault diagnosis for centrifugal pump sets aims to accurately identify early fault characteristics, assess equipment health status, and predict potential risks through real-time monitoring and data analysis. This approach is not only a core means of achieving predictive maintenance and reducing operating costs, but also a crucial foundation for ensuring production continuity, improving enterprise safety levels, and promoting the intelligent and digital transformation of industry.
[0003] Traditional fault diagnosis methods are mainly divided into three categories: quantitative methods based on analytical models, qualitative methods based on expert experience, and semi-quantitative methods that combine both. Among these, expert systems, with their interpretability and full utilization of domain knowledge, have been widely used in industrial settings. However, the performance of expert systems is highly dependent on the completeness and accuracy of the knowledge base. As system complexity increases or operating conditions change, the maintenance cost of the knowledge base rises sharply, and the inherent ambiguity and subjectivity of expert experience make it difficult to guarantee the objectivity and consistency of diagnostic results. Meanwhile, with the rapid development of sensing technology and data acquisition capabilities, multi-source heterogeneous data provides a rich information foundation for data-driven methods. While purely data-driven models such as neural networks demonstrate powerful capabilities in pattern recognition, their "black box" nature leads to a lack of physical interpretability in the decision-making process, making it difficult to meet the stringent reliability requirements of industrial scenarios. Engineers often develop a trust barrier because they cannot understand the basis of the model's judgments.
[0004] To strike a balance between interpretability and data utilization, Belief Rule Base (BRB) has emerged as a semi-quantitative modeling tool. It integrates expert knowledge with observational data and generates transparent decisions through Evidence-Based Reasoning (ER), demonstrating unique advantages in the field of fault diagnosis. However, BRB faces two major challenges in practical applications: first, as the system becomes more complex and the number of sensors increases, the number of rules grows exponentially, leading to a "combinatorial explosion"; second, the setting of initial parameters heavily relies on expert experience, making it difficult to guarantee objectivity and accuracy.
[0005] Meanwhile, Large Language Models (LLMs) have demonstrated powerful capabilities in complex semantic understanding and knowledge reasoning, opening up new technical pathways for intelligent diagnostics. LLMs can generate context-aware adjustment suggestions based on statistical summaries and gradually approach optimal parameter configurations through iterative feedback mechanisms. Their flexibility and semantic understanding capabilities offer new possibilities for weight optimization. However, LLMs also face challenges in practical applications: the randomness of the output results may lead to instability in the optimization process; more importantly, the decision-making nature of LLMs is still based on statistical regularities in the corpus, rather than the causal logic of the physical world. Unrestricted reliance on LLMs for adjustments may introduce new interpretability risks. Summary of the Invention
[0006] To address the technical challenge that existing pump fault diagnosis systems cannot fully leverage the advantages of data-driven methods and LLM semantic understanding capabilities while preserving the interpretability of expert knowledge, and simultaneously avoid the risk of false associations caused by statistical correlation, this invention provides a pump fault diagnosis method and system that integrates fuzzy rules and LLM iterative optimization.
[0007] To achieve the above objectives, the present invention adopts the following technical solution, including: A pump set fault diagnosis method integrating fuzzy rules and LLM iterative optimization includes the following steps: S11 collects data from the device in real time through multiple sensors, and the readings from multiple sensors constitute the operating status parameters of the device. S12, based on the operating status parameters, determine whether the current operating status of the device deviates from the expected normal behavior mode according to the preset normal state range of each sensor reading. If not, continue to collect data. If so, calculate the membership degree of each sensor reading for each fault according to the preset requirement range of each fault for each sensor reading. S13, Based on the membership degree of each sensor reading for each fault and the confidence weight parameter of the sensor, calculate the overall confidence of the operating status parameters for each fault category; S14. The fault category with the highest overall confidence level is selected as the predicted fault category for the pump set.
[0008] Preferably, the steps for obtaining the confidence weight of the sensor in step S13 are as follows: S21, Obtain the dataset, which includes multiple samples and the real fault categories corresponding to each sample. Each sample is an operating status parameter composed of data collected by multiple sensors at a single sampling time. S22, Initialize the sensor confidence weights corresponding to each fault category; S23, Under the current sensor confidence weight, calculate the prediction accuracy, error sample distribution, and average confidence of each sensor for each fault category on the dataset; S24. Based on the results of the previous round of adjustments, the current weight status of the sensors, the prediction accuracy of each fault category, the distribution of error samples, the average confidence of the sensors, and the historical adjustment results, construct task prompt words that are adapted to the reasoning of the large language model. S25, based on task prompt words, uses a large language model to perform semantic analysis on the rationality of the current confidence weights, and outputs adjustment suggestions for the confidence weights of each sensor; S26. Adjust the confidence weights of each sensor according to the weight adjustment suggestions, and use the adjusted sensor confidence weights to obtain the prediction accuracy, error sample distribution, and average confidence of each sensor for each fault category on the dataset. S27. Compare the prediction accuracy and confidence of each fault category before and after adjustment. If neither decreases, the adjustment is accepted; otherwise, the adjustment is rejected. If a fault category is rejected for adjustment for a preset number of consecutive rounds, or if the weight does not change, the category is marked as terminated. S28. Repeat steps S23 to S27 until all fault categories have ended or the preset maximum number of iterations has been reached, and output the final sensor confidence weight parameters.
[0009] Preferably, step S11 specifically involves: collecting the device's operating status parameters in real time using S sensors, and then... The readings of the sensors at time t are denoted as follows: The operating status parameters of the equipment at time t are denoted as ,in, .
[0010] Preferably, the specific operation of step S12 is as follows: S121, Obtain the operating status parameters of the device at time t. , For the first Readings collected by each sensor ; S122: Determine whether the current operating state of the device deviates from the expected normal behavior mode based on the preset normal state range of each sensor reading. If not, continue to collect data; if so, the device malfunctions. S123, based on the engineering experience of domain experts, predefine K types of fault states, denoted as set. , will the Each fault state is denoted as , The K types of fault states include the normal operating state. S124, calculate at time t, the... The sensor is for the k-th type of fault. membership degree : ; in, For time t, the first Readings from each sensor For sensors In fault category The lower limit of the range; For sensors In fault category The upper limit of the range; For sensors In fault category The left boundary of the core interval below, For sensors In fault category The right boundary of the core interval below.
[0011] Preferably, step S13 specifically involves: based on the membership degree calculated in step S12, calculating the overall confidence level of the device's operating parameters at time t for the k-th type of fault. : ; in, For the equipment in The running status parameters at any given time. For the first The sensor is for the k-th type of fault. The confidence weight parameter, for At that moment, the The membership degree of a sensor reading to the k-th type of fault. For time t, the first Readings from each sensor, This represents the total number of sensors.
[0012] Preferably, step S14 specifically involves: selecting the fault category with the highest confidence level as the diagnosed fault. ; in, For the equipment in The types of faults that are constantly diagnosed. For the equipment in The runtime parameters at any given time. To find the independent variable that maximizes the objective function, This represents the total number of fault categories. For the equipment in The overall confidence level of fault k at any given time.
[0013] Preferably, step S23 performs the same operation on each sample, as follows: S231, Calculate prediction accuracy: Under the current sensor confidence weight configuration, through steps S11-S14, obtain the predicted fault category of each sample in the dataset, count the number of samples that are correctly predicted, and obtain the prediction accuracy of each fault category.
[0014] S232, Calculate the distribution of incorrect samples: In the process of calculating the accuracy, record the samples in the dataset that are incorrectly predicted, including their sample index, the true fault category, the category predicted by the model, and the total confidence of the sample belonging to each category; count the number of incorrectly predicted samples, the error rate, and the specific distribution of incorrect samples under each fault category. S233, Calculate the average confidence score: The average confidence score is the average membership score. Extract all samples corresponding to the same fault category in the dataset, and calculate it using step S12. In the nth sample, the nth The sensor reading for the first... Type of fault membership degree Calculate the first The sensor for the first Average membership degree of each type of fault : ; in, The fault category in the dataset is The total number of samples, Label all real faults as The set of sample indices, For the first The true fault label of each sample; For the first In the nth sample The readings of each sensor.
[0015] Preferably, in step S26, based on the adjustment suggestion output in step S25, the confidence weight of the sensor is adjusted according to a fixed amplitude. Let the first... The sensor corresponds to the first The initial confidence weights for class-specific faults are: , No. The confidence weights before the round of iteration adjustment are: The adjusted confidence weights are : .
[0016] Preferably, for the first After round of iterative adjustments The sensor corresponds to the first The confidence weights for class-specific faults are: Perform normalization to obtain the first... The first iteration The sensor corresponds to the first Confidence weights for different types of faults : .
[0017] A pump set fault diagnosis system integrating fuzzy rules and LLM iterative optimization is provided, applicable to the aforementioned pump set fault diagnosis method integrating fuzzy rules and LLM iterative optimization. The pump set fault diagnosis system includes: Multiple sensors: collect data from the device in real time to form the device's operating status parameters; Fault warning module: Based on the operating status parameters, it determines whether the current operating status of the equipment deviates from the expected normal behavior pattern according to the preset normal state range of each sensor reading. If not, it continues to collect data; if so, the equipment is faulty. The fault location module includes: Membership Unit: Calculates the membership degree of each sensor reading for each fault based on the preset required range for each sensor reading for each fault. Confidence Unit: Based on the membership degree of each sensor reading for each fault and the confidence weight parameter of the sensor, calculate the overall confidence of the operating status parameters for each fault category; Classification unit: The fault category with the highest overall confidence level is selected as the predicted fault category for the pump set; Weighting module: Obtains the confidence weight parameters of each sensor for various fault categories.
[0018] The advantages of this invention are: 1. This invention combines expert-defined fuzzy membership rules with intelligent weighted reasoning of large language models to form a new paradigm for pump group fault diagnosis: "interpretable base + LLM optimization", which balances diagnostic accuracy and decision transparency. 2. This invention designs a sensor confidence statistic based on average membership degree, enabling large language models to accurately perceive the ability of each sensor to distinguish different faults, thereby generating weight adjustment suggestions that conform to physical intuition. 3. This invention establishes an iterative control strategy that includes acceptance / rejection judgment with dual indicators (the sum of accuracy and confidence) and automatic termination upon continuous rejection, ensuring smooth convergence of the weight optimization process and avoiding ineffective iterations. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the pump set fault diagnosis method provided in Example 1.
[0020] Figure 2 for Figure 2 Flowchart for weight optimization.
[0021] Figure 3 This is a schematic diagram of the pump set fault diagnosis system provided in Example 2.
[0022] Figure 4 Example diagram of interactive recording of prompt words for large language models.
[0023] Figure 5 A schematic diagram showing the visualization output of fault diagnosis results and sensor contribution values. Detailed Implementation
[0024] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.
[0025] Example 1
[0026] Please see Figure 1 , Figure 1 This is a flowchart illustrating a pump group fault diagnosis method that integrates fuzzy rules and LLM iterative optimization, as provided in this embodiment. The operation steps of the pump group fault diagnosis method are as follows: S11 collects data from the device in real time through multiple sensors, and the readings from multiple sensors constitute the operating status parameters of the device. In this embodiment, step S11 specifically involves: collecting data from the device in real time using S sensors, with the readings from the S sensors constituting the device's operating status parameters; and then... The readings of the sensors at time t are denoted as follows: The operating status parameters of the equipment at time t are denoted as ,in, .
[0027] The sensors can cover a variety of physical quantities such as vibration, temperature, pressure, and flow rate, and the data collected by multiple sensors at a single sampling moment are treated as a complete monitoring sample.
[0028] S12, based on the operating status parameters, determine whether the current operating status of the device deviates from the expected normal behavior mode according to the preset normal state range of each sensor reading. If not, continue to collect data. If so, calculate the membership degree of each sensor reading for each fault according to the preset requirement range of each fault for each sensor reading. In this embodiment, step S12 specifically involves the following steps: S121, Obtain the operating parameters of the device at time t. .
[0029] S122, determine whether the readings of each sensor are all within the preset normal range. If yes, the equipment is normal; otherwise, the equipment is faulty. Determining whether the readings of each sensor are all within the preset normal range is a fault warning. As the first line of defense in equipment health management, the core task of fault warning is to promptly issue warning signals to maintenance personnel when the equipment's operating status is abnormal but has not yet developed into a serious fault, thus gaining valuable time for preventive maintenance.
[0030] The early warning method proposed in this embodiment is based on a threshold judgment table to construct an early warning mechanism. By comparing real-time monitoring data with preset threshold boundaries, online monitoring of equipment status and abnormal triggering are realized.
[0031] The effectiveness of the threshold method is based on the following assumptions: Under normal operating conditions, the monitored parameters should be stably distributed within a finite and predictable range; when the equipment experiences performance degradation or potential failure, the relevant parameters will exhibit observable shifts, and the degree of these shifts is positively correlated with the severity of the failure. This assumption has been verified in numerous industrial practices and is the theoretical basis for many international standards to adopt the threshold method for condition assessment.
[0032] For each sensor reading, the threshold judgment table predefines two state intervals: Normal range: When the sensor reading falls within this range, the sensor is considered to be in normal working range. Abnormal Range: When the sensor reading exceeds the normal range threshold (one-sided) or exceeds the normal range (both-sided), an alarm is triggered. This is the minimum value within the normal range. This represents the maximum value within the normal range.
[0033] These thresholds are determined primarily based on industry standards, equipment design specifications, and long-term engineering experience, and are stored in a structured configuration file.
[0034] S123, based on the engineering experience of domain experts, predefine K types of fault states, denoted as set. The k-th fault state is denoted as , The K types of fault states include the normal operating state. For each fault state Experts provided corresponding diagnostic rules, which are stored in the form of a sensor-fault association table.
[0035] Specifically, for each fault and each sensor The rules define the following two key intervals: core area : indicates when the first When the reading of a sensor falls within this range, the sensor detects a fault. It has the strongest support (usually considered an exact match); among them, For sensors In fault category The left boundary of the core interval below, For sensors In fault category The right boundary of the core interval below.
[0036] Full range : Indicates sensor In the fault The theoretical boundary values are usually determined by the sensor's physical range or historical observation extreme values. For sensors In fault category The lower limit of the range, For sensors In fault category The upper limit of the range.
[0037] In addition, each fault It is also associated with a weight vector. ,in, Indicates sensor In diagnosing the fault The importance of time This is the transpose. The weights satisfy the normalization condition: ; Initially, the weights can be allocated by experts on an average basis or set based on experience. Let the initial weight vector for the k-th fault be denoted as . .
[0038] S124, calculate at time t, the... Readings from each sensor For the kth type of fault membership degree : ; in, For time t, the first Readings from each sensor; For sensors In fault category The lower limit of the range; For sensors In fault category The upper limit of the range; For sensors In fault category The left boundary of the core interval below, For sensors In fault category The right boundary of the core interval below.
[0039] Fuzzy logic provides a powerful mathematical tool for handling uncertainty. Its core idea is to characterize the degree of membership of an element to a set through membership functions, rather than traditional binary attribution. In fault diagnosis, the relationship between sensor readings and fault modes is often not clear-cut. Therefore, introducing fuzzy membership functions can more naturally express progressive support relationships.
[0040] Piecewise linear membership functions have the following advantages: 1. Piecewise linear membership functions intuitively reflect the physical intuition that "the further the deviation, the weaker the support," making the model easier for engineers to understand and accept, thus ensuring good interpretability.
[0041] 2. Piecewise linear membership functions have a simple form, which facilitates rapid calculation of large-scale samples and can meet the efficiency requirements of real-time diagnosis.
[0042] 3. Piecewise linear membership function core interval boundary It can be read directly from the expert rule table without additional learning, preserving the authority of prior knowledge and avoiding a complex data fitting process.
[0043] 4. Although the piecewise linear membership function is not differentiable at the nodes, it does not affect the final decision-making effect in engineering applications. Furthermore, the subsequent weight optimization mechanism can compensate for the uncertainty near the boundary and ensure the robustness of the overall reasoning.
[0044] The piecewise linear membership function outputs 1 within the core range, indicating that the sensor reading fully matches the fault characteristics; it linearly decays to 0 outside the core range, indicating that the support gradually weakens; and it sets directly to 0 outside the range, indicating no support at all. This design retains the characterization of the "typical range" from expert experience while smoothing out uncertainties through continuous transitions. This allows the model to provide reasonable partial support for samples deviating from the core range, thus more accurately reflecting the gradual process in actual working conditions.
[0045] S13, Based on the membership degree of each sensor reading to each fault and the confidence weight parameter of the sensor, calculate the overall confidence of the equipment's operating status parameters to each fault category; In this embodiment, step S13 specifically involves: based on the membership degree calculated in step S12, calculating the overall confidence level of the device's operating state parameters at time t for the k-th type of fault. : ; in, For the equipment in The running status parameters at any given time. For the first The sensor is for the k-th type of fault. The confidence weight parameter, for At that moment, the The membership degree of each sensor reading to the k-th type of fault. For time t, the first Readings from each sensor This represents the total number of sensors.
[0046] The physical meaning of this confidence level can be interpreted as: for the k-th fault Each sensor independently provides a certain level of supporting evidence, which is then weighted according to its importance (weight) to form the overall confidence level regarding the fault.
[0047] Weight The larger the sensor In diagnosing the fault The higher one's voice, the more influence one has. Membership degree The higher the value, the stronger the support for the sensor's current reading.
[0048] The product of the two constitutes the sensor's marginal contribution to the total confidence, a mechanism consistent with the intuition of multi-source information fusion.
[0049] S14, take the fault category with the highest overall confidence as the fault category of the pump set.
[0050] In this embodiment, step S14 specifically involves: selecting the fault category with the highest confidence level as the diagnosed fault. ; in, For the equipment in Faults that are constantly being diagnosed. For the equipment in The runtime parameters at any given time. To find the independent variable that maximizes the objective function, This represents the total number of fault categories. For the equipment in The confidence level of fault k at any given time.
[0051] When multiple categories have similar confidence levels, the system can output a candidate list and prompt engineers to make a comprehensive judgment based on other information. This soft decision-making approach provides flexibility for human intervention and further enhances the reliability of the system.
[0052] To enhance the interpretability of diagnostic results, for predicted categories The contribution value of each sensor is defined as follows: ; The contribution value has a clear physical meaning: it represents the sensor's... Support category in the current diagnosis. The "strength of evidence" provided is displayed by sorting and showing the top 3-5 sensors with the highest contribution values. This allows maintenance personnel to quickly locate potentially abnormal measurement points. For example, if the contribution value of a vibration sensor is significantly higher than that of other sensors, it suggests checking the mechanical components corresponding to that measurement point. This mechanism transforms abstract mathematical results into intuitive maintenance guidelines, which is a key step in establishing human-machine trust and provides data support for subsequent root cause analysis of faults.
[0053] The performance of the above-mentioned pump set fault diagnosis method is highly dependent on the weight vector. Settings. Initial weight vector. Fixed weights are typically assigned equally by experts or roughly set based on experience, but they are difficult to adapt to the diversity of fault behaviors under complex operating conditions. For example, some faults may mainly manifest as changes in vibration characteristics in the early stages, while later they may be accompanied by an increase in temperature; fixed weights cannot dynamically adjust for this temporal change. Therefore, it is necessary to learn a better weight configuration from the data so that the model can adaptively highlight the sensors that are most discriminative of the current fault.
[0054] Please see Figure 2 , Figure 2 The following is a schematic diagram illustrating the process of obtaining the confidence weight parameters of the sensor. The specific steps are as follows: S21, Obtain the dataset, which includes multiple samples and the real fault categories corresponding to each sample. Each sample is an operating status parameter composed of data collected by multiple sensors at a single sampling time. Define dataset ,in, The sample was collected at time t. The true fault label is the sample collected at time t.
[0055] The optimization objective of the weights in this embodiment is to maximize the average accuracy on the validation set. : ; in, For the characteristic function, when hour, , The total number of samples.
[0056] Accuracy is the most direct measure of model performance, but it presents two difficulties as an optimization objective: The accuracy function is non-convex and non-differentiable, making it difficult to optimize using gradient-based methods. Accuracy only considers whether the final prediction is correct, ignoring the model's confidence level in each category.
[0057] Therefore, this embodiment introduces the sum of confidence levels as an auxiliary indicator: ; Fault Category The sum of confidence levels (auxiliary indicators); Fault Category The corresponding weight vectors of all sensors; The sample was collected at time t; The true fault label for the sample collected at time t; The validation dataset; the set of samples used to evaluate model performance; For the sample Fault Category The overall confidence level (weighted membership sum).
[0058] This metric reflects the model's understanding of categories. The overall confidence level. During the optimization process, an increase in the sum of confidence usually means that the model's ability to distinguish this type of sample is enhanced. Even if the accuracy does not improve immediately, it lays a good foundation for subsequent iterations.
[0059] Weight optimization must meet the following constraints: 1. Normalization constraint requirements: Ensure that confidence levels are comparable across different categories.
[0060] 2. The weights must be non-negative, i.e. This aligns with the physical meaning of weights.
[0061] 3. The optimized weights should not deviate excessively from the initial values to avoid compromising the interpretability of the rules. This constraint will be achieved through the LLM's hint design and accept / reject mechanism, thereby improving accuracy while retaining the guidance of expert prior knowledge.
[0062] S22, Initialize the sensor confidence weights corresponding to each fault category; In this embodiment, the sensor confidence weight vector corresponding to each fault category is initialized as follows: .
[0063] S23, Under the current sensor confidence weight, calculate the prediction accuracy, error sample distribution, and average confidence of each fault category on the dataset; S231, Calculate prediction accuracy: Under the current sensor confidence weight configuration, through steps S11-S14, obtain the predicted fault category of each sample in the dataset, count the number of samples that are correctly predicted, and obtain the prediction accuracy of each fault category.
[0064] S232, Calculate the distribution of incorrect samples: In the process of calculating the accuracy, record the samples in the dataset that are incorrectly predicted, including their sample index, the true fault category, the category predicted by the model, and the total confidence of the sample belonging to each category; count the number of incorrectly predicted samples, the error rate, and the specific distribution of incorrect samples under each fault category. S233, Calculate the average confidence score: The average confidence score is the average membership score. Extract all samples corresponding to the same fault category in the dataset, and calculate it using step S12. In the nth sample, the nth The sensor reading for the first... Type of fault membership degree Calculate the first The sensor for the first Average membership degree of each type of fault : ; in, The fault category in the dataset is The total number of samples, Label all real faults as The set of sample indices, For the first The true fault label of each sample; For the first In the nth sample The readings of each sensor.
[0065] S24. Based on the results of the previous round of adjustments, the current confidence weight parameters of the sensor, the prediction accuracy of each fault category, the distribution of error samples, the average confidence of the sensor, and the historical adjustment results, construct task prompt words that are adapted to the reasoning of the large language model. The prompts designed in this embodiment contain the following structured components to guide the LLM in logical reasoning: S241, define the role and task description, clearly informing the LLM of their identity as a fault diagnosis expert and the current goal of optimizing weights for specific fault categories.
[0066] S242 provides a specification of the input data format, including sensor name, average confidence level, and current weight, to ensure that the LLM can accurately parse the provided information.
[0067] S243, if the current iteration round is greater than 1, the prompt will also include the adjustment record of the previous round, including the adjusted sensors, changes in the total confidence level, changes in accuracy, and whether the previous round of adjustments was accepted, for LLM reference and reflection.
[0068] In the internal thought process guidance section, the prompts require the LLM to perform analysis in three steps: determining the correlation between sensors and faults based on domain priors, checking the average confidence level to verify statistical evidence, and synthesizing the findings to determine the adjustment direction. However, it explicitly requires that the reasoning process not be output, only the conclusion. Finally, through strict output format constraints, the LLM is required to output a brief analysis conclusion and a JSON-formatted list of adjustments; sensors not mentioned indicate that their original weights will remain. This refined prompt design provides sufficient context while ensuring the standardized and parsable output, laying the foundation for subsequent automated processing.
[0069] S25, based on task prompts, uses a large language model to perform semantic analysis on the rationality of the current confidence weights and outputs suggestions for adjusting the confidence weights of each sensor; S26, Adjust the confidence weights of each sensor according to the weight adjustment suggestions; Use the adjusted sensor confidence weights to obtain the prediction accuracy, error sample distribution, and average confidence of each sensor for each fault category on the dataset; Based on the adjustment suggestions output in step S25, the confidence weights of the sensor are adjusted according to a fixed amplitude. Let the first... The sensor corresponds to the first The initial confidence weights for class-specific faults are: , No. The confidence weights before each iteration adjustment are: The adjusted confidence weights are : .
[0070] The reason for fixing the adjustment range at ±20% is that excessive adjustments may cause weight oscillations, while excessively small adjustments result in slow convergence. The 20% step size has shown good balance in multiple experiments.
[0071] After adjustment, the weights of the adjusted sensors may no longer meet the normalization conditions, therefore it is necessary to renormalize all weights, i.e., to normalize the weights of the _th_ sensor. After round of iterative adjustments The sensor corresponds to the first The confidence weights for class-specific faults are: Perform normalization to obtain the value for the first... The first iteration The sensor corresponds to the first Confidence weights for different types of faults : ; After normalization, the weights still sum to 1, and the non-negativity is automatically satisfied.
[0072] S27. Compare the prediction accuracy and confidence of each fault category before and after adjustment. If neither decreases, the adjustment is accepted; otherwise, the adjustment is rejected. If a fault category is rejected for adjustment for a preset number of consecutive rounds, or if the weight does not change, the category is marked as terminated. In the After each iteration, the prediction accuracy and total confidence score for each fault category on the validation set are recalculated using the new confidence weights. The decision-making logic employs a dual criterion: the adjustment is accepted only if the adjusted prediction accuracy and total confidence score for each fault category are both greater than before the adjustment; otherwise, it is rejected.
[0073] The consideration behind using dual metrics is that accuracy is the ultimate goal, but it may fluctuate due to validation set noise; the total confidence score, as a continuous metric, is more sensitive to subtle improvements. Combining the two can capture performance improvements while smoothing out misclassifications caused by random fluctuations. When accuracy remains stable while the total confidence score significantly improves, accepting adjustments can still lay a good foundation for subsequent iterations, because an increase in confidence score often means that the model's ability to distinguish classes is enhanced, which may later translate into an increase in accuracy. If a class is rejected twice consecutively, it is determined that the weights of that class have converged or are difficult to optimize, and it is marked as "terminated." Subsequent iterations will not adjust this class to save computational resources. This mechanism is similar to early stopping, preventing invalid iterations from running indefinitely and improving optimization efficiency.
[0074] S28. Repeat steps S23 to S27 until all fault categories have ended or the preset maximum number of iterations has been reached, and output the final sensor confidence weight parameters.
[0075] The optimization process continues until either of the following conditions is met: all fault categories are marked as "end", or the preset maximum number of iterations is reached. The final output sensor confidence weight parameters will be embedded in the system for real-time diagnostics. It's important to note that only accepted adjustments will update the weight file during optimization; rejected adjustments will not change the current weights. This ensures model stability and prevents a sharp performance drop due to a single poor adjustment.
[0076] To enhance the transparency and auditability of the optimization process, this invention designs a comprehensive debugging log mechanism. In each iteration, the following information is fully recorded: metadata including timestamps, the current iteration number, and the type of fault processed; LLM interaction records including the full text of sent prompts, the original text returned by the LLM, and the parsed adjustment list; weight changes including the weight vectors before and after adjustment and the magnitude of changes for each sensor; evaluation results including the sum of confidence scores on the validation set, accuracy, confusion matrix, and prediction details for each sample; and decision information including the accept / reject status and its basis.
[0077] Logs are stored in a designated directory in structured JSON format, with filenames including timestamps for traceability. A visual debugging interface was developed based on Streamlit, supporting an overview panel displaying the final accuracy, iteration rounds, and current status for each category; a trend view plotting the curves of accuracy and total confidence as a function of iterations; a detailed expansion function allowing viewing of LLM output, weight changes, and sample prediction lists round by round; and an anomaly detection module automatically identifying and highlighting samples with excessively low confidence or frequent misjudgments. This visualization tool not only facilitates researchers' analysis of the optimization process but also provides on-site engineers with an entry point for review and intervention. When an unreasonable adjustment is found in a particular round, the weights can be manually rolled back and readjusted, achieving human-machine collaborative optimization and further enhancing the system's usability and reliability.
[0078] Example 2
[0079] Please see Figure 3 , Figure 3 This is a schematic diagram of a pump group fault diagnosis system that integrates fuzzy rules and LLM iterative optimization as described in this embodiment. The pump group fault diagnosis system includes: Multiple sensors: collect data from the device in real time to form the device's operating status parameters; Fault warning module: Based on the operating status parameters, it determines whether the current operating status of the equipment deviates from the expected normal behavior pattern according to the preset normal state range of each sensor reading. If not, it continues to collect data; if so, the equipment is faulty. The fault location module includes: Membership Unit: Calculates the membership degree of each sensor reading for each fault based on the preset required range for each sensor reading for each fault. Confidence Unit: Based on the membership degree of each sensor reading for each fault and the confidence weight parameter of the sensor, calculate the overall confidence of the operating status parameters for each fault category; Classification unit: The fault category with the highest overall confidence level is selected as the predicted fault category for the pump set; Weighting module: Obtains the confidence weight parameters of each sensor for various fault categories.
[0080] Example 3
[0081] To verify the effectiveness of the method described in Example 1, this example establishes an experimental platform based on a general pump set testing system. The platform mainly consists of a centrifugal pump, a drive motor, sensors, and a data acquisition unit. During the experiment, typical pump set failure conditions were simulated by replacing impellers in different states. The experimental dataset is a pump set vibration dataset, containing vibration sensor data from pump sets under different operating conditions. Data acquisition was performed every minute, with 8192 data points collected each time, and each set of 8192 data points was considered a single sample. The dataset covers three operating states: normal impeller, worn impeller, and damaged impeller, with 14 samples in each state, totaling 42 samples.
[0082] according to Figure 4 and Figure 5 The experimental results shown can intuitively verify the effectiveness of the proposed method in terms of the transparency of the optimization process and the interpretability of the diagnostic results. Figure 4 The "Prompt" section of the Streamlit debug interface fully displays the prompts sent to the large language model by the system in a particular iteration, including core elements such as task objectives, expert constraints, and input data structures. This record not only demonstrates the system's ability to completely archive LLM interaction information but also illustrates that the debug log mechanism can faithfully preserve the detailed context of each iteration, providing reliable data support for subsequent parameter backtracking and optimization process review.
[0083] Figure 5 This demonstrates the system's diagnostic output for a single pump unit sample during the testing phase. The sample was accurately identified as belonging to the "Impeller Normal" category with a confidence level of 0.8464, while the confidence levels for the "Impeller Wear" and "Impeller Damage" categories were only 0.0330 and 0.1365, respectively, fully demonstrating the model's strong ability to distinguish between normal and fault states. Crucially, the system simultaneously output detailed contribution values of each sensor to the predicted category. Under the "Impeller Normal" category, the sensor contribution values for key measuring points such as inlet vibration and the pump drive end are close to 1.0, while the contribution values for secondary measuring points such as the motor outer Y-axis (referring to vibration sensor measuring points installed on the outside of the motor housing along the horizontal radial direction) are relatively low. This highly aligns with the engineering experience that vibration levels at each measuring point are low under normal conditions. This interpretable output provides maintenance personnel with clear clues for tracing anomalies: sensors with high contribution values indicate good equipment operation, while sensors with abnormally low contribution values may indicate measuring point failure or potential faults, thus guiding subsequent detailed inspections. The experimental phenomena described above fully demonstrate that the method presented in this paper not only achieves high-precision fault location, but also enhances the interpretability of the diagnostic results through the sensor contribution value visualization mechanism, which has good practical value in complex industrial scenarios.
[0084] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A pump set fault diagnosis method integrating fuzzy rules and LLM iterative optimization, characterized in that, Includes the following steps: S11 collects data from the device in real time through multiple sensors, and the readings from multiple sensors constitute the operating status parameters of the device. S12, based on the operating status parameters, determine whether the current operating status of the device deviates from the expected normal behavior mode according to the preset normal state range of each sensor reading. If not, continue to collect data. If so, calculate the membership degree of each sensor reading for each fault according to the preset requirement range of each fault for each sensor reading. S13, Based on the membership degree of each sensor reading for each fault and the confidence weight parameter of the sensor, calculate the overall confidence of the operating status parameters for each fault category; S14. The fault category with the highest overall confidence level is selected as the predicted fault category for the pump set.
2. The pump group fault diagnosis method integrating fuzzy rules and LLM iterative optimization according to claim 1, characterized in that, The steps for obtaining the confidence weight of the sensor in step S13 are as follows: S21, Obtain the dataset, which includes multiple samples and the real fault categories corresponding to each sample. Each sample is an operating status parameter composed of data collected by multiple sensors at a single sampling time. S22, Initialize the sensor confidence weights corresponding to each fault category; S23, Under the current sensor confidence weight, calculate the prediction accuracy, error sample distribution, and average confidence of each sensor for each fault category on the dataset; S24. Based on the results of the previous round of adjustments, the current weight status of the sensors, the prediction accuracy of each fault category, the distribution of error samples, the average confidence of the sensors, and the historical adjustment results, construct task prompt words that are adapted to the reasoning of the large language model. S25, based on task prompt words, uses a large language model to perform semantic analysis on the rationality of the current confidence weights, and outputs adjustment suggestions for the confidence weights of each sensor; S26. Adjust the confidence weights of each sensor according to the weight adjustment suggestions, and use the adjusted sensor confidence weights to obtain the prediction accuracy, error sample distribution, and average confidence of each sensor for each fault category on the dataset. S27. Compare the prediction accuracy and confidence level of each fault category before and after the adjustment. If neither of them decreases, the adjustment is accepted; otherwise, the adjustment is rejected. If a fault category is rejected for adjustment for a consecutive preset number of rounds, or if the weight remains unchanged, then the category is marked as terminated. S28. Repeat steps S23 to S27 until all fault categories have ended or the preset maximum number of iterations has been reached, and output the final sensor confidence weight parameters.
3. The pump group fault diagnosis method integrating fuzzy rules and LLM iterative optimization according to claim 1, characterized in that, The specific operation of step S11 is as follows: The operating status parameters of the device are collected in real time through S sensors, and the... The readings of the sensors at time t are denoted as follows: The operating status parameters of the equipment at time t are denoted as follows: ,in, .
4. The pump group fault diagnosis method integrating fuzzy rules and LLM iterative optimization according to claim 1, characterized in that, The specific operation of step S12 is as follows: S121, Obtain the operating status parameters of the device at time t. , For the first Readings collected by each sensor ; S122: Determine whether the current operating state of the device deviates from the expected normal behavior pattern based on the preset normal state range of each sensor reading. If not, continue to collect data; if so, the device malfunctions. S123, based on the engineering experience of domain experts, predefine K types of fault states, denoted as set. , will the Each fault state is denoted as , The K types of fault states include the normal operating state. S124, calculate at time t, the... The sensor is for the k-th type of fault. membership degree : ; in, For time t, the first Readings from each sensor, For sensors In fault category The lower limit of the range; For sensors In fault category The upper limit of the range; For sensors In fault category The left boundary of the core interval below, For sensors In fault category The right boundary of the core interval below.
5. The pump group fault diagnosis method integrating fuzzy rules and LLM iterative optimization according to claim 1, characterized in that, The specific operation of step S13 is as follows: Based on the membership degree calculated in step S12, calculate the overall confidence of the device's operating parameters at time t for the k-th type of fault. : ; in, For the equipment in The running status parameters at any given time. For the first The sensor is for the k-th type of fault. The confidence weight parameter, for At that moment, the The membership degree of each sensor reading to the k-th type of fault. For time t, the first Readings from each sensor, This represents the total number of sensors.
6. The pump group fault diagnosis method integrating fuzzy rules and LLM iterative optimization according to claim 1, characterized in that, The specific operation of step S14 is as follows: Take the fault category with the highest confidence level as the diagnosed fault. ; in, For the equipment in The types of faults that are constantly diagnosed. For the equipment in The runtime parameters at any given time. To find the independent variable that maximizes the objective function, This represents the total number of fault categories. For the equipment in The overall confidence level of fault k at any given time.
7. The pump group fault diagnosis method integrating fuzzy rules and LLM iterative optimization according to claim 2, characterized in that, Step S23 performs the same operation on each sample, as follows: S231, Calculate prediction accuracy: Under the current sensor confidence weight configuration, through steps S11-S14, obtain the predicted fault category of each sample in the dataset, count the number of samples that are correctly predicted, and obtain the prediction accuracy of each fault category. S232, Calculate the distribution of incorrect samples: In the process of calculating accuracy, record the samples in the dataset that are incorrectly predicted, including their sample index, the true fault category, the category predicted by the model, and the total confidence score of the sample belonging to each category; The number of incorrect prediction samples, the error rate, and the specific distribution of incorrect samples were statistically analyzed for each fault category. S233, Calculate the average confidence score: The average confidence score is the average membership score. Extract all samples corresponding to the same fault category in the dataset, and calculate it using step S12. In the nth sample, the nth The sensor reading for the first... Type of fault membership degree Calculate the first The sensor for the first Average membership degree of each type of fault : ; in, The fault category in the dataset is The total number of samples, Label all real faults as The set of sample indices, For the first The true fault label of each sample; For the first In the nth sample The readings of each sensor.
8. The pump group fault diagnosis method integrating fuzzy rules and LLM iterative optimization according to claim 2, characterized in that, Step S26 adjusts the confidence weights of the sensor according to the adjustment suggestions output in step S25, using a fixed amplitude. Let the first... The sensor corresponds to the first The initial confidence weights for class-specific faults are: , No. The confidence weights before each iteration adjustment are: The adjusted confidence weights are : 。 9. The pump set fault diagnosis method integrating fuzzy rules and LLM iterative optimization according to claim 8, characterized in that, For the first After round of iterative adjustments The sensor corresponds to the first The confidence weights for class-specific faults are: Perform normalization to obtain the first The first iteration The sensor corresponds to the first Confidence weights for different types of faults : 。 10. A pump set fault diagnosis system integrating fuzzy rules and LLM iterative optimization, characterized in that, A pump group fault diagnosis method integrating fuzzy rules and LLM iterative optimization, applicable to any one of claims 1-9, comprises: Multiple sensors: collect data from the device in real time to form the device's operating status parameters; Fault warning module: Based on the operating status parameters, it determines whether the current operating status of the equipment deviates from the expected normal behavior pattern according to the preset normal state range of each sensor reading. If not, it continues to collect data; if so, the equipment is faulty. The fault location module includes: Membership Unit: Calculates the membership degree of each sensor reading for each fault based on the preset required range for each sensor reading for each fault. Confidence Unit: Based on the membership degree of each sensor reading for each fault and the confidence weight parameter of the sensor, calculate the overall confidence of the operating status parameters for each fault category; Classification unit: The fault category with the highest overall confidence level is selected as the predicted fault category for the pump set; Weighting module: Obtains the confidence weight parameters of each sensor for various fault categories.