Stator winding inter-turn fault diagnosis method and system based on shap value
Patent Information
- Application Number
- CN202611187980.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-23
AI Technical Summary
[0003]针对上述问题,现有技术通常通过采集功率、功率因数、定子正序电压、定子负序电压、定子正序电流、定子负序电流等运行参数,并输入预先建立的故障识别模型,输出定子故障指数,以完成匝间故障诊断;但是,这种方式依赖的是资源量需求极大的故障识别模型,它无法部署于一些简易的处理器上,这就使得所有需要获取的数据,均需要上传至总端,再由总端处的高算力设备进行故障诊断,这中间产生的数据交互量极大,如何提供一种保证准度的轻量化故障识别模型,可以部署于低算力设备上,用以降低数据交互量,优化故障诊断架构是本发明技术方案想要解决的技术问题
[0061]与现有技术相比,本发明的有益效果是:本发明获取定子绕组的实时参数,在传统架构上应用故障识别大模型确定识别结果,基于实时参数和识别结果确定各类参数的Shap值,根据Shap值确定权重,结合现有的轻量化波动识别模型,搭建出一种线性识别模型,这均由简易的数学计算函数组成,可以直接包含于轻量化代码,识别准度较高的同时,对算力需求极低,可以作为前端诊断方案,与现有的传统架构相互配合,简化数据交互量。
Smart Images

Figure CN122964528A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power equipment diagnostic technology, specifically a method and system for diagnosing stator winding inter-turn faults based on the Shap value. Background Technology
[0002] The stator winding is the core component for electromagnetic energy conversion in a motor. During long-term operation, it is prone to inter-turn short-circuit faults due to factors such as insulation aging, local overheating, electromagnetic shock, or mechanical vibration. In the early stages, inter-turn faults usually only manifest as minor fluctuations in local operating parameters such as current, voltage, or temperature. The fault characteristics are insidious, and there is a strong coupling relationship between different parameters. Therefore, accurately identifying the key parameters that have the greatest impact on inter-turn faults has always been an important technical problem in the field of stator winding fault diagnosis.
[0003] To address the aforementioned issues, existing technologies typically collect operating parameters such as power, power factor, stator positive-sequence voltage, stator negative-sequence voltage, stator positive-sequence current, and stator negative-sequence current, input them into a pre-established fault identification model, and output a stator fault index to complete inter-turn fault diagnosis. However, this approach relies on a fault identification model with extremely high resource requirements, which cannot be deployed on some simple processors. This means that all the data that needs to be acquired must be uploaded to the central terminal, where high-computing-power devices perform fault diagnosis. This generates a massive amount of data interaction. The technical problem that this invention aims to solve is how to provide a lightweight fault identification model that ensures accuracy and can be deployed on low-computing-power devices to reduce the amount of data interaction and optimize the fault diagnosis architecture. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for diagnosing stator winding inter-turn faults based on the Shap value, so as to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] A method for diagnosing stator winding inter-turn faults based on Shap values, the method comprising:
[0007] Global data and local data containing position information of the stator winding are acquired based on a preset acquisition device. The acquired global and local data are then normalized to obtain parameter sequences. The parameter sequences corresponding to the global data contain type labels, and the parameter sequences corresponding to the local data contain type and position labels. All parameter sequences have the same dimension.
[0008] The parameter sequence is input into a preset fault identification model, and the stator fault index sequence is output; the stator fault index sequence has the same dimension as the parameter sequence.
[0009] The parameter sequences are paired up in pairs, mutual information is calculated, sequence priority is determined based on the mutual information, and information analysis order is determined based on sequence priority.
[0010] The parameter sequence is read sequentially based on the information analysis order, and the Shap value of the read parameter sequence is determined based on the stator fault index sequence.
[0011] A simplified model is distilled based on the Shap value, which serves as a simplified identification model for the PLC system.
[0012] As a further aspect of the present invention: the step of acquiring global data and local data containing position information of the stator winding based on a preset acquisition device, and performing normalization processing on the acquired global and local data to obtain a parameter sequence includes:
[0013] Establish a connection channel with the motor cabinet, acquire global data in real time, and determine the type label; the global data includes power, power factor, stator positive sequence voltage, stator negative sequence voltage, stator positive sequence current, and stator negative sequence current;
[0014] Establish a connection channel with the preset sensor, acquire local data containing the sensor number, and determine the location label and type label based on the sensor number;
[0015] For any global or local data, the data is normalized based on the historical maximum and minimum values to obtain a data sequence;
[0016] All data are upsampled and dimensionally calibrated based on the same time axis and time step to obtain a parameter sequence; labels are retained during the generation of the parameter sequence.
[0017] As a further aspect of the present invention: the steps of pairing parameter sequences, calculating mutual information, determining sequence priority based on the mutual information, and determining the information analysis order based on the sequence priority include:
[0018] For the parameter sequence corresponding to the global data, pair it with the parameter sequences corresponding to each local data.
[0019] For the parameter sequence corresponding to local data, pair it with the parameter sequence corresponding to local data at different locations;
[0020] For paired parameter sequences, calculate mutual information and determine the matching degree based on the mutual information;
[0021] For any parameter sequence, calculate the mean of its matching degree with other parameter sequences, and determine the sequence priority based on the proportionality of the mean.
[0022] The analysis order of the parameter sequences is determined by the descending order of sequence priority.
[0023] As a further aspect of the present invention: the step of sequentially reading the parameter sequence based on the information analysis order and determining the Shap value of the read parameter sequence based on the stator fault index sequence includes:
[0024] The parameter sequence is read sequentially based on the information analysis order, and used as the sequence to be analyzed.
[0025] Query the matching degree between the sequence to be analyzed and other parameter sequences, and determine the selection probability of other parameter sequences based on the inverse ratio of the matching degree;
[0026] A parameter sequence is randomly selected based on the selection probability. Then, the matching degree of each selected parameter sequence with other parameter sequences is queried. The maximum matching degree is selected, and the selection probability of other parameter sequences is determined based on the maximum matching degree.
[0027] The process is repeated a preset number of times to obtain a sequence set, and the Shap value of the sequence to be analyzed is determined based on the sequence set.
[0028] As a further aspect of the present invention: the step of determining the Shap value of the sequence to be analyzed based on the sequence set includes:
[0029] Combine parameter sequences in the sequence set based on a preset minimum number of combinations;
[0030] Increase the number of combinations and repeat the combination process cyclically to obtain a combination sequence;
[0031] For any combination sequence, input the combination sequence into the preset fault identification model and output the first identification result;
[0032] Input the sequence to be analyzed and the combined sequence into the preset fault identification model, and output the second identification result;
[0033] Compare the first identification result and the second identification result, determine the difference in the results, and use it as the result difference of the combined sequence;
[0034] The difference between the results of all combined sequences is calculated and used as the Shap value of the sequence to be analyzed.
[0035] As a further aspect of the present invention: the step of distilling a simplified model based on the Shap value as a simplified identification model for the PLC system includes:
[0036] Query the Shap value for any parameter sequence and use the Shap value as the weight;
[0037] Obtain the fluctuation identification model for each parameter sequence;
[0038] The fluctuation identification model and its weights for all parameter sequences are statistically analyzed and used as a simplified identification model for the PLC system.
[0039] The present invention also provides a stator winding inter-turn fault diagnosis system based on Shap value, the system comprising:
[0040] The normalization processing module is used to acquire global data and local data containing position of the stator winding based on a preset acquisition device, and to perform normalization processing on the acquired global data and local data to obtain parameter sequences. Among them, the parameter sequences corresponding to the global data contain type labels, and the parameter sequences corresponding to the local data contain type labels and position labels. All parameter sequences have the same dimension.
[0041] The large model application module is used to input the parameter sequence into a preset fault identification model and output a stator fault index sequence; the stator fault index sequence has the same dimension as the parameter sequence.
[0042] The analysis order determination module is used to pair parameter sequences in pairs, calculate mutual information, determine sequence priority based on the mutual information, and determine the information analysis order based on the sequence priority;
[0043] The Shap value calculation module is used to read the parameter sequence sequentially based on the information analysis order, and determine the Shap value of the read parameter sequence based on the stator fault index sequence.
[0044] A simplified model is distilled based on the Shap value, which serves as a simplified identification model for the PLC system.
[0045] As a further aspect of the present invention: the standardization processing module includes:
[0046] The global data acquisition unit is used to establish a connection channel with the motor cabinet, acquire global data in real time, and determine the type label; the global data includes power, power factor, stator positive sequence voltage, stator negative sequence voltage, stator positive sequence current, and stator negative sequence current;
[0047] The local data acquisition unit is used to establish a connection channel with a preset sensor, acquire local data containing sensor numbers, and determine the location label and type label based on the sensor number;
[0048] The data sequence generation unit is used to normalize any global or local data based on historical maximum and minimum values to obtain a data sequence.
[0049] The calibration unit is used to upsample all data based on the same time axis and the same time step, perform dimensional calibration, and obtain a parameter sequence; the labels are retained during the generation of the parameter sequence.
[0050] As a further aspect of the present invention: the analysis order determination module includes:
[0051] The first pairing unit is used to pair the parameter sequence corresponding to the global data with the parameter sequences corresponding to each local data.
[0052] The second pairing unit is used to pair the parameter sequence corresponding to the local data with the parameter sequence corresponding to the local data at different positions.
[0053] The matching degree calculation unit is used to calculate mutual information for paired parameter sequences and determine the matching degree based on the mutual information.
[0054] The priority determination unit is used to calculate the mean of the matching degree between any parameter sequence and other parameter sequences, and determine the sequence priority according to the direct proportion of the mean.
[0055] The sequential output unit is used to determine the analysis order of the parameter sequence based on the descending order of the sequence priority.
[0056] As a further aspect of the present invention: the Shap value calculation module includes:
[0057] The sequence reading unit is used to sequentially read the parameter sequence based on the information analysis order, as the sequence to be analyzed.
[0058] The probability determination unit is used to query the matching degree between the sequence to be analyzed and other parameter sequences, and to determine the selection probability of other parameter sequences based on the inverse ratio of the matching degree.
[0059] The comprehensive selection unit is used to randomly select a parameter sequence based on the selection probability, then query the matching degree of each selected parameter sequence with other parameter sequences, select the maximum matching degree, and determine the selection probability of other parameter sequences based on the maximum matching degree.
[0060] The loop execution unit is used to execute the loop a preset number of times to obtain a sequence set, and to determine the Shap value of the sequence to be analyzed based on the sequence set.
[0061] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention obtains real-time parameters of the stator winding, applies a large fault identification model to determine the identification results on a traditional architecture, determines the Shap values of various parameters based on real-time parameters and identification results, determines the weights based on the Shap values, and builds a linear identification model by combining it with existing lightweight fluctuation identification models. All of these are composed of simple mathematical calculation functions, which can be directly included in lightweight code. While having high identification accuracy, it has extremely low computational power requirements and can be used as a front-end diagnostic solution to cooperate with existing traditional architectures and simplify data interaction. Attached Figure Description
[0062] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention.
[0063] Figure 1 This is a flowchart of a stator winding inter-turn fault diagnosis method based on Shap values.
[0064] Figure 2 This is the first sub-flowchart of the stator winding inter-turn fault diagnosis method based on Shap values.
[0065] Figure 3 This is the second sub-flowchart of the stator winding inter-turn fault diagnosis method based on Shap values.
[0066] Figure 4 This is the third sub-flowchart of the stator winding inter-turn fault diagnosis method based on Shap values.
[0067] Figure 5 This is the fourth sub-flowchart of the stator winding inter-turn fault diagnosis method based on Shap value.
[0068] Figure 6 This is a block diagram of the structure of a stator winding inter-turn fault diagnosis system based on the Shap value. Detailed Implementation
[0069] To make the technical problems to be solved, the technical solutions, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.
[0070] Figure 1 This is a flowchart of a stator winding inter-turn fault diagnosis method based on Shap values. In this embodiment of the invention, a stator winding inter-turn fault diagnosis method based on Shap values includes:
[0071] Step S100: Based on the preset acquisition device, acquire global data and local data containing position of the stator winding, and perform normalization processing on the acquired global data and local data to obtain parameter sequences; wherein, the parameter sequence corresponding to the global data contains type labels, the parameter sequence corresponding to the local data contains type labels and position labels, and all parameter sequences have the same dimension;
[0072] Before data processing, the acquired data needs to be standardized. Different types of parameters are obtained from different acquisition devices, and their formats are generally more or less different. Therefore, overall standardization is required to enable calculations between data acquired by different devices. Thus, the purpose of the above is to establish a unified data input foundation, providing a consistent data format for subsequent fault identification model calculations and Shap value analysis. The acquired data is divided into two categories: global data and local data. Global data refers to operating parameters that reflect the overall stator operating state, such as power, power factor, stator positive-sequence voltage, stator negative-sequence voltage, stator positive-sequence current, and stator negative-sequence current, etc., which are controlled by the motor control system. The data is directly acquired from the system. Local data refers to data collected by sensors installed at different locations on the stator winding, such as local temperature, local vibration, local magnetic field, or local current. These data reflect the local operating status at different locations and therefore have both type and location labels to identify the corresponding winding area. Since the sampling frequency, dimensions, and time reference of different acquisition devices may differ, all data needs to be standardized and synchronously calibrated according to a unified time axis to ensure that all parameters form a parameter sequence with consistent dimensions. The final parameter sequence retains the data source information and ensures that different sequences can directly perform mutual information calculation, combined analysis, and fault identification, providing a data foundation for establishing a unified analysis process.
[0073] Step S200: Input the parameter sequence into the preset fault identification model and output the stator fault index sequence; the stator fault index sequence has the same dimension as the parameter sequence;
[0074] The parameter sequence is the raw data after normalization. Since the normalization process is essentially dimensionless removal and mapping of numerical ranges to a certain interval, its information content is almost not lost. Analyzing all parameter sequences yields the stator fault index. It should be noted that the data in the parameter sequence contains time information, representing data collected at different times. After normalization, different parameter sequences have the same dimension. Identifying them yields the stator fault index, which is obtained at each time point, thus resulting in a stator fault index sequence. Furthermore, regarding the fault identification model, it refers to an existing mature identification model that can be applied to high-end computer equipment for fault identification. This could include proprietary identification models within the industry or large AI models. For the technical solution of this invention, this fault identification model is considered an existing model with strong identification capabilities and large scale, applicable to high-end computer equipment.
[0075] Specifically, the preset fault identification model can be constructed using existing mature winding fault diagnosis models, such as classification models, regression models, or neural network models trained based on historical fault samples. The output of these models is uniformly defined as the stator fault index. The stator fault index is used to represent the probability or severity of inter-turn faults in the winding at the current moment. The larger the index, the higher the fault risk. Since the input parameters are in time series form, the model outputs the corresponding fault index at each sampling moment, thus forming a stator fault index sequence with the same length as the parameter sequence. This fault index sequence not only serves as the predicted output for subsequent Shap value calculations but also as a unified evaluation object for measuring the contribution of each parameter. This allows different types of parameters to be analyzed for importance using the same standard, thereby avoiding relying solely on experience to judge the magnitude of each parameter's role and improving the objectivity and interpretability of subsequent parameter selection and model distillation processes.
[0076] Step S300: Pair the parameter sequences together, calculate mutual information, determine the sequence priority based on the mutual information, and determine the information analysis order based on the sequence priority;
[0077] Mutual information is used to measure the amount of information shared between two parameter sequences. The larger the value, the more information one parameter can provide about the other. First, global parameters are paired with local parameters, and local parameters at different positions are paired again, with their corresponding mutual information calculated. Then, the average mutual information between any parameter sequence and all other parameter sequences is calculated. This average value is used as the information correlation degree of the parameter sequence, and sequence priority is determined based on the correlation degree. The higher the information correlation degree, the more information the parameter can reflect from other parameters, and therefore it participates in subsequent analysis first. Finally, an information analysis order is generated based on sequence priority, prioritizing parameters with higher information content in Shap value calculation, while parameters with lower information content or high repetition with other parameters are processed later. This method not only reduces the randomness in combinatorial analysis but also reduces the participation of duplicate information in calculation, improving overall analysis efficiency and providing a basis for subsequent combinatorial sampling strategies. Furthermore, mutual information is an existing parameter used for sequence alignment, and its calculation method is known. Given that the parameter sequences have already been constructed, the calculation process is very simple and mature, and will not be elaborated further here.
[0078] Step S400: Read the parameter sequence sequentially based on the information analysis order, and determine the Shap value of the read parameter sequence based on the stator fault index sequence;
[0079] Based on the information analysis sequence generated by the technical solution of this invention, the Shap value is calculated. The information analysis sequence represents the importance of different parameter sequences. The important parameter sequences are calculated first, so that even if the calculation process of the Shap value is interrupted, the calculation results already obtained still have enough information. In fact, the calculation process of the Shap value takes a long time and is prone to interruption. In addition, the calculation process of the Shap value can be simplified by combining the calculated mutual information.
[0080] Step S500: Distill a simplified model based on the Shap value, which serves as a simplified identification model for the PLC system;
[0081] After obtaining the Shap values for each parameter sequence, the Shap value corresponding to each parameter sequence is used as its importance weight. The larger the Shap value, the higher the contribution of the parameter to the fault identification result, so it is retained with a higher weight in the simplified model. For parameters with low Shap values, the participation frequency and sampling frequency can be reduced, or they can be directly eliminated. Subsequently, a corresponding fluctuation identification model is established for each parameter to describe the correspondence between the parameter itself and the fault state as it changes over time. Then, the fluctuation identification models are weighted and fused according to the Shap value to form a unified simplified identification model. Since this model retains the parameters that contribute the most in the original fault identification model and their corresponding relationships, it can significantly reduce the model size and computational complexity while maintaining high diagnostic accuracy. This makes it easy to deploy on control equipment with limited computing resources, such as PLCs, to achieve online real-time stator winding inter-turn fault diagnosis.
[0082] In summary, the technical solution of this invention is essentially a model distillation process, which distills some weights from a complex fault identification model deployed on complex equipment with higher accuracy. These weights are used to construct a linear calculation function, which can be directly applied to PLC systems (or even simpler CPUs), with extremely low computing power requirements and sufficiently high accuracy.
[0083] Figure 2 The first sub-flowchart of the stator winding inter-turn fault diagnosis method based on Shap values includes the following steps: acquiring global data and local data containing position information of the stator winding using a preset acquisition device, and standardizing the acquired global and local data to obtain a parameter sequence.
[0084] Step S101: Establish a connection channel with the motor cabinet, acquire global data in real time, and determine the type label; the global data includes power, power factor, stator positive sequence voltage, stator negative sequence voltage, stator positive sequence current, and stator negative sequence current;
[0085] Step S102: Establish a connection channel with the preset sensor, acquire local data containing the sensor number, and determine the location label and type label based on the sensor number;
[0086] Step S103: For any global data and local data, perform normalization processing based on historical maximum and historical minimum values to obtain a data sequence;
[0087] Step S104: Upsample all data based on the same time axis and the same time step, perform dimensional calibration, and obtain the parameter sequence; wherein, the labels are retained during the generation of the parameter sequence.
[0088] The above content provides a detailed explanation of step S100, which serves to provide consistent data input for subsequent mutual information calculation and Shap value analysis. First, global data reflecting the overall operating status of the motor is acquired in real time through the motor cabinet. Simultaneously, local data at corresponding locations is acquired through sensors deployed in different areas of the stator windings. The global data describes the overall operating condition of the motor, while the local data reflects local state changes in different winding areas. Type and location labels are assigned to each type of data to ensure traceability during subsequent analysis. Then, all collected data is standardized according to unified historical maximum and minimum values, mapping data with different dimensions and value ranges to a unified numerical interval to avoid bias in subsequent calculation results due to differences in dimensions. Furthermore, since the sampling frequency and sampling time of different acquisition devices may differ, time alignment and dimensional calibration are performed on various types of data based on a unified time axis and time step. Missing sampling points are supplemented through upsampling or interpolation, ensuring that all data form parameter sequences with consistent length and sampling time, and retaining corresponding type and location labels within the parameter sequences. The resulting parameter sequence not only fully preserves the global operating status and local spatial distribution information, but also has a unified data format and a unified time dimension. It can be directly used as the standard input for fault identification models, mutual information analysis, and Shap value calculation, providing a reliable data foundation for establishing the information correlation between parameters and interpreting the contribution of each parameter to the stator fault index.
[0089] Figure 3 This is a second sub-flowchart of the stator winding inter-turn fault diagnosis method based on Shap values. The steps of pairing parameter sequences, calculating mutual information, determining sequence priority based on the mutual information, and determining the information analysis order based on the sequence priority include:
[0090] Step S301: Pair the parameter sequence corresponding to the global data with the parameter sequences corresponding to each local data.
[0091] Step S302: Pair the parameter sequence corresponding to the local data with the parameter sequences corresponding to local data at different positions;
[0092] Step S303: For the paired parameter sequences, calculate the mutual information and determine the matching degree based on the mutual information;
[0093] Step S304: For any parameter sequence, calculate the mean of its matching degree with other parameter sequences, and determine the sequence priority based on the proportionality of the mean.
[0094] Step S305: Determine the analysis order of the parameter sequences according to the descending order of sequence priority.
[0095] The above describes the process of generating the information analysis order. A reasonable information analysis order is established by utilizing the degree of information correlation between parameter sequences, thereby reducing computational redundancy caused by duplicate information in the Shap value calculation and improving the efficiency and stability of subsequent feature contribution analysis. First, the parameter sequences corresponding to global data are paired with the parameter sequences corresponding to each local data point. Simultaneously, parameter sequences corresponding to local data at different locations are paired again, establishing information correlations between global and local operating states, as well as between local regions. Then, mutual information is calculated for each pair of paired parameter sequences. Mutual information characterizes the amount of shared information between two parameter sequences; the larger the value, the closer the effective information contained in the two sequences, and the higher the degree of correlation. Further, the average matching degree between any parameter sequence and all other parameter sequences is calculated, and this average value is used as the information correlation capability of that parameter sequence. The larger the average value, the more the parameter can reflect the changing characteristics of other parameters, thus assigning a higher sequence priority. Finally, the information analysis order of the parameter sequences is generated in descending order according to the sequence priority, allowing parameters with richer information and stronger representativeness to participate in subsequent Shap value calculations first, while parameters with higher information overlap or weaker supplementary effects are delayed in the analysis. Through the above processing, not only can a hierarchical data analysis process be established, but it can also provide a basis for the subsequent parameter combination process, avoid a large number of similar parameters repeatedly participating in the combination calculation, improve the representativeness and computational efficiency of Shap value estimation, and provide a reliable feature importance ranking basis for the subsequent construction of a simplified PLC identification model.
[0096] Figure 4 This is the third sub-flowchart of the stator winding inter-turn fault diagnosis method based on Shap values. The step of sequentially reading the parameter sequence based on the information analysis order and determining the Shap value of the read parameter sequence based on the stator fault index sequence includes:
[0097] Step S401: Read the parameter sequence sequentially based on the information analysis order, and use it as the sequence to be analyzed;
[0098] Step S402: Query the matching degree between the sequence to be analyzed and other parameter sequences, and determine the selection probability of other parameter sequences based on the inverse ratio of the matching degree;
[0099] Step S403: Randomly select a parameter sequence based on the selection probability, then query the matching degree of each selected parameter sequence with other parameter sequences, select the maximum matching degree, and determine the selection probability of other parameter sequences based on the maximum matching degree;
[0100] Step S404: Execute the loop a preset number of times to obtain a sequence set, and determine the Shap value of the sequence to be analyzed based on the sequence set.
[0101] Steps S401 to S404 are the core of the technical solution of this invention, used to calculate the Shap value of each parameter sequence. The purpose is to quantify the contribution of each parameter sequence based on the existing fault identification model, thereby determining the actual influence of different parameters on the stator fault index. Specifically, firstly, the parameter sequences are read sequentially according to the information analysis order obtained in step S300, and the currently read parameter sequence is taken as the sequence to be analyzed, while the remaining parameter sequences are taken as candidate sequences. Then, the selection probability of each candidate sequence is determined according to the matching degree between the sequence to be analyzed and other parameter sequences. The lower the matching degree, the less overlap of the information contained in the two sequences is, and therefore a higher selection probability is assigned to prioritize the construction of parameter combinations containing complementary information. After completing one parameter selection, the selection probability of each candidate sequence is dynamically updated by combining the matching relationship between the selected parameters and the remaining parameters, and new parameter sequences are randomly selected again. This process is repeated a preset number of times, eventually forming multiple different sequence sets. Since each sequence set has different information composition, it can cover more types of parameter combinations, avoid the information duplication problem caused by random combination in traditional Shap value calculation, and enable the Shap value calculated later to more realistically reflect the contribution of each parameter to the stator fault index. At the same time, it reduces the number of combinations, improves the overall calculation efficiency, and provides a more reliable weight basis for the construction of simplified PLC models.
[0102] Regarding the specific processing details, firstly, the sequences to be analyzed are selected sequentially according to the information analysis order. Then, the selection probability of other parameter sequences is determined based on mutual information. Among them, parameters with lower mutual information with the sequence to be analyzed have a higher selection probability, so that the combination contains as much complementary information as possible, while avoiding a large amount of duplicate information entering the same combination. Subsequently, the selection probability of the remaining parameters is recalculated based on the selected parameters, and multiple different sequence sets are constructed in a loop to make the combination methods sufficiently diverse. This involves a cyclical process. For the sequence to be analyzed, after randomly selecting another parameter sequence, there are now two parameter sequences as selected sequences. When determining the selection probability, it is necessary to comprehensively compare with these selected sequences, which have two matching degrees. The maximum matching degree is selected (there can be more for the selected sequences), representing the closest degree to the selected sequences. Finally, the matching degree of all unselected parameter sequences is counted, the total matching degree is calculated, and then the ratio of each matching degree to the total matching degree is calculated. The selection probability is determined based on the inverse relationship of the ratio. The higher the matching degree of a sequence with a selected sequence, the more difficult it is to be selected.
[0103] It is worth mentioning that the number of parameter sequences selected for a given sequence to be analyzed as source data for calculating the Shap value is also preset, that is, the number of iterations. After the number of iterations, a set of parameter sequences can be selected, which is called the sequence set. The subsequent Shap value calculation process is based on the selected sequence set.
[0104] As a preferred embodiment of the technical solution of the present invention, the step of determining the Shap value of the sequence to be analyzed based on the sequence set includes:
[0105] Combine parameter sequences in the sequence set based on a preset minimum number of combinations;
[0106] Increase the number of combinations and repeat the combination process cyclically to obtain a combination sequence;
[0107] For any combination sequence, input the combination sequence into the preset fault identification model and output the first identification result;
[0108] Input the sequence to be analyzed and the combined sequence into the preset fault identification model, and output the second identification result;
[0109] Compare the first identification result and the second identification result, determine the difference in the results, and use it as the result difference of the combined sequence;
[0110] The difference between the results of all combined sequences is calculated and used as the Shap value of the sequence to be analyzed.
[0111] In one example of the technical solution of this invention, the calculation process of the Shap value is described. It involves processing each sequence to be analyzed, with the aim of accurately quantifying the marginal contribution of the sequence to the fault identification result using parameter combinations of different scales. First, an initial combination sequence is constructed from the generated sequence set according to a preset minimum number of combinations. Then, the number of parameters included in the combination is gradually increased, and combination sequences of different scales are generated iteratively to cover fault identification scenarios with different levels of information completeness. For any combination sequence, only the combination sequence is first input into a preset fault identification model to obtain the corresponding first identification result. Then, while keeping the combination sequence unchanged, the sequence to be analyzed is added to the combination sequence and input into the fault identification model again. The corresponding second identification result is obtained. Since the two inputs differ only in the sequence to be analyzed, the difference between the two identification results can represent the contribution of the sequence to be analyzed to the fault identification result under the current combination conditions. Further, the differences of all results corresponding to different combination sequences are statistically analyzed and comprehensively calculated (such as the mean of the result differences). The comprehensive result is determined as the Shap value of the sequence to be analyzed. In this way, the contribution of the same parameter can be repeatedly evaluated under different parameter combination backgrounds, thereby reducing the random error caused by a single combination. The calculated Shap value has better stability, repeatability and interpretability, providing an accurate parameter contribution basis for the subsequent establishment of a simplified PLC identification model based on Shap value weights.
[0112] The overall explanation of the above calculation process is as follows:
[0113] First, the calculation process of the Shap value needs to be explained. Assume there is a function with six independent variables and one dependent variable. To calculate the Shap value of a certain independent variable, the other five independent variables need to be freely combined. The number of free combinations is not fixed; it can be any number from two to five. For each combination, it is input into the function to obtain the result. Then, the independent variable to be calculated is added to it, and the result is input into the function again. These two results give the degree of influence of the added independent variable on the dependent variable, thus determining the Shap value. It is conceivable that there are numerous combinations, and the more independent variables there are, the greater the increase in combinations. Since combination involves factorials, it is even more exaggerated than exponential growth, making efficiency extremely important. Through the above processing, on the one hand, for any sequence to be analyzed, the number of elements in the corresponding sequence set can be set to a relatively small value. Under the selection framework based on the inverse matching degree relationship, even with a small number of elements in the sequence set, high sequence quality can still be obtained.
[0114] Then, for each sequence to be analyzed, a sequence set is assigned. The output results of the fault identification model are calculated for both cases where the sequence to be analyzed is included and cases where it is not included. The difference between the two results represents the contribution of the sequence to be analyzed to the current combined prediction result. Finally, the contribution values corresponding to all combinations are statistically analyzed, and the comprehensive result is taken as the Shap value of the sequence to be analyzed. In addition, the fault identification model used to calculate the output results is the same as the fault identification model in step S200, which is a large model. The obtained result difference is actually the difference sequence of the stator fault index sequence, which is essentially an array. All arrays are statistically analyzed, and the mean array is calculated. If the data in the mean array are all greater than the mean, the mean value is calculated. If the values are relatively large, it means that the sequence being analyzed has a significant impact on the results. One way to assess whether the data in the mean array are all relatively large is to use the mean, that is, the mean of the mean array. Normalizing the mean (for example, using a maximum-minimum normalization scheme to obtain values in the range of 0 to 1) converts it into a Shap value. In fact, in the process of calculating the mean array, weights based on the number of combinations can be introduced (for example, the more combinations, the greater the weight). When calculating the mean, weights based on the stator fault index itself can also be introduced (for example, the larger the stator fault index, the greater the weight). These can be determined by those skilled in the art based on the actual situation, and will not be elaborated here.
[0115] Figure 5 This is the fourth sub-flowchart of the stator winding inter-turn fault diagnosis method based on the Shap value. The step of distilling a simplified model based on the Shap value as a simplified identification model for the PLC system includes:
[0116] Step S501: Query the Shap value of any parameter sequence and use the Shap value as the weight;
[0117] Step S502: Obtain the fluctuation identification model for each parameter sequence;
[0118] Step S503: Statistically analyze the fluctuation identification model and its weights for all parameter sequences, as a simplified identification model for the PLC system.
[0119] The above scheme is the final output scheme, aiming to construct a simplified identification model suitable for real-time operation of PLC systems using the previously calculated Shap values, reducing model complexity and computational resource consumption while ensuring fault diagnosis accuracy. The specific process is as follows: First, query the Shap values corresponding to each parameter sequence and use the Shap values as the importance weights of the corresponding parameters. The larger the Shap value, the higher the contribution of the parameter to the stator fault index, and the greater its decision weight should be in the subsequent model; conversely, its participation can be appropriately reduced. Then, establish a corresponding fluctuation identification model for each parameter sequence. This fluctuation identification model describes the correspondence between the parameter sequence and the stator fault index as the sequence changes over time. It can output corresponding local identification results based on the changing trend, amplitude, and rate of change of the parameter sequence, thereby forming an independent fault characterization capability for each parameter (this fluctuation...). The dynamic identification model can use existing fluctuation identification functions, which are simplified existing identification models (basically just a single function that can be directly written into the program for calculation). Furthermore, based on the Shap values corresponding to each parameter, all fluctuation identification models are weighted and fused, giving higher decision weight to the identification results corresponding to important parameters, while parameters with lower contributions only participate in the final judgment as auxiliary correction information. This constructs a simplified identification model for the PLC system. Compared to directly deploying the original fault identification model, this simplified identification model retains the main influencing factors and their corresponding relationships, while reducing the frequency or computational load of low-contribution parameters in real-time calculations. This significantly reduces the online computational load of the PLC, improves the fault diagnosis response speed, and maintains high identification accuracy and stability. It is more suitable for deployment in industrial control equipment with limited computing resources, enabling real-time online diagnosis of stator winding inter-turn faults.
[0120] Figure 6 The diagram shows the structural composition of a stator winding inter-turn fault diagnosis system based on Shap values. As a preferred embodiment of the technical solution of this invention, a stator winding inter-turn fault diagnosis system based on Shap values is also provided, the system 10 comprising:
[0121] The normalization processing module 11 is used to acquire global data and local data containing position of the stator winding based on a preset acquisition device, and to perform normalization processing on the acquired global data and local data to obtain a parameter sequence; wherein, the parameter sequence corresponding to the global data contains a type label, the parameter sequence corresponding to the local data contains a type label and a position label, and all parameter sequences have the same dimension;
[0122] The large model application module 12 is used to input the parameter sequence into a preset fault identification model and output a stator fault index sequence; the stator fault index sequence has the same dimension as the parameter sequence.
[0123] The analysis order determination module 13 is used to pair the parameter sequences in pairs, calculate mutual information, determine the sequence priority based on the mutual information, and determine the information analysis order based on the sequence priority.
[0124] Shap value calculation module 14 is used to read the parameter sequence sequentially based on the information analysis order and determine the Shap value of the read parameter sequence based on the stator fault index sequence.
[0125] The model simplification module 15 is used to distill a simplified model based on the Shap value, which serves as a simplified identification model for the PLC system.
[0126] Furthermore, the normalization processing module 11 includes:
[0127] The global data acquisition unit is used to establish a connection channel with the motor cabinet, acquire global data in real time, and determine the type label; the global data includes power, power factor, stator positive sequence voltage, stator negative sequence voltage, stator positive sequence current, and stator negative sequence current;
[0128] The local data acquisition unit is used to establish a connection channel with a preset sensor, acquire local data containing sensor numbers, and determine the location label and type label based on the sensor number;
[0129] The data sequence generation unit is used to normalize any global or local data based on historical maximum and minimum values to obtain a data sequence.
[0130] The calibration unit is used to upsample all data based on the same time axis and the same time step, perform dimensional calibration, and obtain a parameter sequence; the labels are retained during the generation of the parameter sequence.
[0131] Specifically, the analysis order determination module 13 includes:
[0132] The first pairing unit is used to pair the parameter sequence corresponding to the global data with the parameter sequences corresponding to each local data.
[0133] The second pairing unit is used to pair the parameter sequence corresponding to the local data with the parameter sequence corresponding to the local data at different positions.
[0134] The matching degree calculation unit is used to calculate mutual information for paired parameter sequences and determine the matching degree based on the mutual information.
[0135] The priority determination unit is used to calculate the mean of the matching degree between any parameter sequence and other parameter sequences, and determine the sequence priority according to the direct proportion of the mean.
[0136] The sequential output unit is used to determine the analysis order of the parameter sequence based on the descending order of the sequence priority.
[0137] Furthermore, the Shap value calculation module 14 includes:
[0138] The sequence reading unit is used to sequentially read the parameter sequence based on the information analysis order, as the sequence to be analyzed.
[0139] The probability determination unit is used to query the matching degree between the sequence to be analyzed and other parameter sequences, and to determine the selection probability of other parameter sequences based on the inverse ratio of the matching degree.
[0140] The comprehensive selection unit is used to randomly select a parameter sequence based on the selection probability, then query the matching degree of each selected parameter sequence with other parameter sequences, select the maximum matching degree, and determine the selection probability of other parameter sequences based on the maximum matching degree.
[0141] The loop execution unit is used to execute the loop a preset number of times to obtain a sequence set, and to determine the Shap value of the sequence to be analyzed based on the sequence set.
[0142] The hardware architecture of the system provided by the technical solution of this invention is described as follows:
[0143] The fault identification model and the simplified identification model of the PLC system are preferably deployed in an edge computing architecture. The edge computing node establishes communication connections with the motor cabinet and local sensors, receives global and local data in real time, and completes calculations such as parameter sequence generation, fault identification model inference, and Shap value analysis. The edge computing node can complete data processing close to the data acquisition end, reducing the communication latency caused by the transmission of raw data to the cloud and improving the real-time performance of fault diagnosis. After completing the Shap value calculation and simplified identification model distillation, the updated model can be synchronously deployed to the PLC control system, enabling the PLC to complete online fault diagnosis based on the simplified identification model. At the same time, the edge computing node continues to retain the complete fault identification model, performs periodic analysis on newly acquired data, and recalculates the Shap values of each parameter sequence based on the new operating data, iteratively updates the simplified identification model, and then sends the updated model down to the PLC. This achieves a collaborative working mode in which the edge computing node is responsible for model training and optimization, and the PLC is responsible for real-time inference and fault early warning. This reduces the computational load of the PLC while ensuring real-time performance and improves the adaptability of the stator winding inter-turn fault diagnosis model to different operating conditions.
[0144] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for diagnosing stator winding inter-turn faults based on Shap values, characterized in that, The method includes: Global data and local data containing position information of the stator winding are acquired based on a preset acquisition device. The acquired global and local data are then normalized to obtain parameter sequences. The parameter sequences corresponding to the global data contain type labels, and the parameter sequences corresponding to the local data contain type and position labels. All parameter sequences have the same dimension. The parameter sequence is input into a preset fault identification model, and the stator fault index sequence is output; the stator fault index sequence has the same dimension as the parameter sequence. The parameter sequences are paired up in pairs, mutual information is calculated, sequence priority is determined based on the mutual information, and information analysis order is determined based on sequence priority. The parameter sequence is read sequentially based on the information analysis order, and the Shap value of the read parameter sequence is determined based on the stator fault index sequence. A simplified model is distilled based on the Shap value, which serves as a simplified identification model for the PLC system.
2. The stator winding inter-turn fault diagnosis method based on Shap value according to claim 1, characterized in that, The steps of acquiring global data and local data containing position information of the stator winding based on a preset acquisition device, and normalizing the acquired global and local data to obtain a parameter sequence include: Establish a connection channel with the motor cabinet, acquire global data in real time, and determine the type label; the global data includes power, power factor, stator positive sequence voltage, stator negative sequence voltage, stator positive sequence current, and stator negative sequence current; Establish a connection channel with the preset sensor, acquire local data containing the sensor number, and determine the location label and type label based on the sensor number; For any global or local data, the data is normalized based on the historical maximum and minimum values to obtain a data sequence; All data are upsampled and dimensionally calibrated based on the same time axis and time step to obtain a parameter sequence; labels are retained during the generation of the parameter sequence.
3. The stator winding inter-turn fault diagnosis method based on Shap value according to claim 1, characterized in that, The steps of pairing parameter sequences, calculating mutual information, determining sequence priority based on the mutual information, and determining the information analysis order based on the sequence priority include: For the parameter sequence corresponding to the global data, pair it with the parameter sequences corresponding to each local data. For the parameter sequence corresponding to local data, pair it with the parameter sequence corresponding to local data at different locations; For paired parameter sequences, calculate mutual information and determine the matching degree based on the mutual information; For any parameter sequence, calculate the mean of its matching degree with other parameter sequences, and determine the sequence priority based on the proportionality of the mean. The analysis order of the parameter sequences is determined by the descending order of sequence priority.
4. The stator winding inter-turn fault diagnosis method based on Shap value according to claim 1, characterized in that, The step of sequentially reading the parameter sequence based on the information analysis order and determining the Shap value of the read parameter sequence based on the stator fault index sequence includes: The parameter sequence is read sequentially based on the information analysis order, and used as the sequence to be analyzed. Query the matching degree between the sequence to be analyzed and other parameter sequences, and determine the selection probability of other parameter sequences based on the inverse ratio of the matching degree; A parameter sequence is randomly selected based on the selection probability. Then, the matching degree of each selected parameter sequence with other parameter sequences is queried. The maximum matching degree is selected, and the selection probability of other parameter sequences is determined based on the maximum matching degree. The process is repeated a preset number of times to obtain a sequence set, and the Shap value of the sequence to be analyzed is determined based on the sequence set.
5. The stator winding inter-turn fault diagnosis method based on Shap value according to claim 4, characterized in that, The step of determining the Shap value of the sequence to be analyzed based on the sequence set includes: Combine parameter sequences in the sequence set based on a preset minimum number of combinations; Increase the number of combinations and repeat the combination process cyclically to obtain a combination sequence; For any combination sequence, input the combination sequence into the preset fault identification model and output the first identification result; Input the sequence to be analyzed and the combined sequence into the preset fault identification model, and output the second identification result; Compare the first identification result and the second identification result, determine the difference in the results, and use it as the result difference of the combined sequence; The difference between the results of all combined sequences is calculated and used as the Shap value of the sequence to be analyzed.
6. The stator winding inter-turn fault diagnosis method based on Shap value according to claim 1, characterized in that, The step of distilling a simplified model based on the Shap value as a simplified identification model for the PLC system includes: Query the Shap value for any parameter sequence and use the Shap value as the weight; Obtain the fluctuation identification model for each parameter sequence; The fluctuation identification model and its weights for all parameter sequences are statistically analyzed and used as a simplified identification model for the PLC system.
7. A stator winding inter-turn fault diagnosis system based on Shap value, characterized in that, The system includes: The normalization processing module is used to acquire global data and local data containing position of the stator winding based on a preset acquisition device, and to perform normalization processing on the acquired global data and local data to obtain parameter sequences. Among them, the parameter sequences corresponding to the global data contain type labels, and the parameter sequences corresponding to the local data contain type labels and position labels. All parameter sequences have the same dimension. The large model application module is used to input the parameter sequence into a preset fault identification model and output a stator fault index sequence; the stator fault index sequence has the same dimension as the parameter sequence. The analysis order determination module is used to pair parameter sequences in pairs, calculate mutual information, determine sequence priority based on the mutual information, and determine the information analysis order based on the sequence priority; The Shap value calculation module is used to read the parameter sequence sequentially based on the information analysis order, and determine the Shap value of the read parameter sequence based on the stator fault index sequence. The model simplification module is used to distill a simplified model based on the Shap value, which serves as a simplified identification model for the PLC system.
8. The stator winding inter-turn fault diagnosis system based on Shap value according to claim 7, characterized in that, The normalization processing module includes: The global data acquisition unit is used to establish a connection channel with the motor cabinet, acquire global data in real time, and determine the type label; the global data includes power, power factor, stator positive sequence voltage, stator negative sequence voltage, stator positive sequence current, and stator negative sequence current; The local data acquisition unit is used to establish a connection channel with a preset sensor, acquire local data containing sensor numbers, and determine the location label and type label based on the sensor number; The data sequence generation unit is used to normalize any global or local data based on historical maximum and minimum values to obtain a data sequence. The calibration unit is used to upsample all data based on the same time axis and the same time step, perform dimensional calibration, and obtain a parameter sequence; the labels are retained during the generation of the parameter sequence.
9. The stator winding inter-turn fault diagnosis system based on Shap value according to claim 7, characterized in that, The analysis order determination module includes: The first pairing unit is used to pair the parameter sequence corresponding to the global data with the parameter sequences corresponding to each local data. The second pairing unit is used to pair the parameter sequence corresponding to the local data with the parameter sequence corresponding to the local data at different positions. The matching degree calculation unit is used to calculate mutual information for paired parameter sequences and determine the matching degree based on the mutual information. The priority determination unit is used to calculate the mean of the matching degree between any parameter sequence and other parameter sequences, and determine the sequence priority according to the direct proportion of the mean. The sequential output unit is used to determine the analysis order of the parameter sequence based on the descending order of the sequence priority.
10. The stator winding inter-turn fault diagnosis system based on Shap value according to claim 7, characterized in that, The Shap value calculation module includes: The sequence reading unit is used to sequentially read the parameter sequence based on the information analysis order, as the sequence to be analyzed. The probability determination unit is used to query the matching degree between the sequence to be analyzed and other parameter sequences, and to determine the selection probability of other parameter sequences based on the inverse ratio of the matching degree. The comprehensive selection unit is used to randomly select a parameter sequence based on the selection probability, then query the matching degree of each selected parameter sequence with other parameter sequences, select the maximum matching degree, and determine the selection probability of other parameter sequences based on the maximum matching degree. The loop execution unit is used to execute the loop a preset number of times to obtain a sequence set, and to determine the Shap value of the sequence to be analyzed based on the sequence set.