Building electrical safety detection method and detection system
By using compression sensing algorithms and morphological filters in high-rise buildings to process and identify electrical equipment data, the problem of fault detection accuracy of electrical equipment under the influence of electromagnetic interference is solved, and high-accuracy fault detection is achieved in complex environments.
Patent Information
- Application Number
- CN202510154739.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2045-02-12
AI Technical Summary
In high-rise buildings, the accuracy of electrical equipment failure detection is affected by electromagnetic interference, resulting in a decrease in the accuracy of the detection data, making it difficult to accurately judge the true operating status of electrical equipment.
The compression perception algorithm is used to compress and reconstruct real-time electrical equipment data, and combine morphological filters to remove noise and interference signals to build an electrical fault recognition model for fault identification.
In the complex electromagnetic environment of high-rise buildings, the accuracy of electrical equipment failure detection is improved, the impact of electromagnetic interference on detection data is reduced, and electrical equipment failures can be detected in a timely manner and corresponding maintenance measures can be taken to ensure the safe and stable operation of the electrical system.
Smart Images

Figure CN119622604A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electrical detection technology, and in particular to a building electrical safety detection method and detection system. Background Art
[0002] Electrical systems are widely used in various fields such as industrial production, transportation, commercial operations, and daily life. They are key infrastructure for the normal operation of modern society. Once an electrical system fails, it may cause production stagnation, equipment damage, and even endanger people's lives. Therefore, electrical system detection is extremely important as a core means to ensure its safe and stable operation. Nowadays, electrical system detection uses intelligent sensors to accurately collect electrical parameters in real time, and accurately evaluates the operating status of electrical equipment based on the collected data to determine whether there are potential fault hazards.
[0003] The Chinese invention patent with application publication number CN117970005A provides an electrical automation equipment fault detection system. The patent collects multiple different numerical values, calculates the corresponding fluctuation value based on the numerical value, and compares the fluctuation value with the preset threshold value to determine whether the relevant numerical value of the electrical automation equipment is abnormal. The electrical automation equipment is analyzed based on multiple numerical values, and the status of the electrical automation equipment is analyzed in multiple dimensions. It can promptly issue an early warning signal when the electrical automation equipment is about to or has an abnormality.
[0004] With respect to the above technical solution, fault detection of electrical equipment is realized. However, in actual application, traditional electrical detection technology is mainly used, such as collecting electrical parameters through various sensors to obtain detection data such as current and voltage values of electrical equipment during operation, so as to preliminarily determine whether the equipment is in normal working condition. When in a high-rise building, due to the large number of electrical equipment, electromagnetic interference will be generated between different equipment and lines. The detected signal is easily affected by electromagnetic interference during transmission, resulting in reduced accuracy of detection data, making it difficult to accurately judge the true operating status of electrical equipment, and further reducing the accuracy of fault detection of electrical equipment, which brings huge hidden dangers to the normal operation of high-rise buildings and the safety of staff. Summary of the invention
[0005] In order to reduce the impact of electromagnetic interference on detection data and improve the accuracy of electrical equipment fault detection in high-rise buildings, the present application provides a building electrical safety detection method and detection system.
[0006] In the first aspect, the present application provides a building electrical safety detection method, which adopts the following technical solution: A building electrical safety detection method comprises the following steps: First collection: collect real-time electrical equipment data; Second collection: collect historical electrical equipment data and corresponding fault type labels; First processing: based on a preset observation matrix and a preset sparse basis, a compressed sensing algorithm is used to compress the collected real-time electrical equipment data to obtain first data; Second processing: reconstructing the first data using a reconstruction algorithm based on a preset sparse basis to obtain second data; Third processing: using a preset morphological filter to filter the second data to obtain third data; Build model: Build electrical fault identification model; Model training: Input the collected historical electrical equipment data and the corresponding fault type labels into the electrical fault recognition model, perform model training, obtain an optimized electrical fault recognition model, and use the optimized electrical fault recognition model as a new electrical fault recognition model; Fault identification: The third data is input into the electrical fault identification model to obtain a fault type label of the third data.
[0007] By adopting the above technical solution and using the compressed sensing algorithm, data is collected at a sampling rate far lower than the Nyquist rate, which greatly reduces the amount of data that needs to be transmitted and processed, reduces the impact of electromagnetic interference and signal distortion on data during transmission, and improves the quality of data transmission. In addition, the compressed data is reconstructed through the reconstruction algorithm to compensate for the interference loss of the data. At the same time, the morphological filter is used to effectively remove the noise and interference signals in the data, highlight the characteristics of the data, make the collected data smoother and clearer, and improve the accuracy of electrical equipment fault detection in the complex electromagnetic environment of high-rise buildings. It helps to detect electrical equipment faults in a timely manner and take corresponding maintenance measures, ensuring the safe and stable operation of the electrical system.
[0008] Optionally, after performing the second acquisition step and before performing the first processing step, the method further includes: Matrix modeling: Building electrical vector matrices based on collected real-time electrical equipment data; First decomposition: Use component analysis to decompose the electrical vector matrix to obtain the component matrix; Generate basis vectors: record the vectors in the component matrix as candidate basis vectors; Filtering basis vectors: clustering the candidate basis vectors using a clustering algorithm, and filtering out the candidate basis vectors based on the clustering results. The filtered candidate basis vectors are recorded as filtered basis vectors. Combined basis vectors: Combine the filtered basis vectors and use the combined basis vectors as the new sparse basis.
[0009] By adopting the above technical solution, the component analysis method is used to construct candidate basis vectors, which helps to remove the noise and redundant information contained in the collected data, and realizes the filtering and feature extraction of electromagnetic interference data. After that, the candidate basis vectors are clustered and screened based on the clustering algorithm, and the abnormal basis vectors that may be affected by electromagnetic interference are further removed, and the basis vectors that best represent the essential characteristics of the data are retained, thereby improving the quality and stability of the basis vectors. Optimizing the sparse basis based on the screened basis vectors helps to make the collected data have a sparser representation under the optimized sparse basis, and helps to accurately retain the key information related to the operating status and faults of the electrical equipment during the data compression process, and filter out the redundant and noise information generated by electromagnetic interference. In addition, the optimized sparse basis can correct the errors caused by the electromagnetic interference lock in the subsequent reconstruction process, so that the reconstructed data is closer to the real equipment operation data, improves the anti-interference ability in the reconstruction process, and makes the reconstruction results more stable and accurate, thereby improving the reliability of fault detection.
[0010] Optionally, after performing the second acquisition step and before performing the first processing step, the method further includes: Dimension setting: set the original signal dimension and measurement value dimension; Ratio setting: Set the ratio of random elements and deterministic elements, and calculate the number of random elements and the number of deterministic elements based on the preset number of elements; First generation: Based on the number of random elements, random elements are generated using a random matrix generation method; Second generation: Corresponding and associating important features of preset electrical equipment with deterministic elements, and assigning values to the deterministic elements; Construct a matrix: Based on the random elements and the assigned deterministic elements, construct an observation matrix, and use the constructed observation matrix as the new observation matrix.
[0011] By adopting the above technical solution, the important features of the preset electrical equipment are associated with the deterministic elements, and the deterministic elements are assigned values, so that the observation matrix can focus on the key features of the electrical equipment, and collect information closely related to the equipment operation status in a more targeted manner among many interference signals, thereby enhancing the ability to capture effective signals and improving the accuracy of the detection data. At the same time, random elements and deterministic elements are set to construct the observation matrix, so that the observation matrix is not easily affected by specific patterns of electromagnetic interference during data collection, further enhancing the ability to extract effective signals from electromagnetic interference, improving the anti-interference of data collection, reducing the errors and uncertainties caused by electromagnetic interference, and providing a more accurate data basis for subsequent fault detection, thereby improving the accuracy of electrical equipment fault detection, helping to more timely and accurately discover potential faults of electrical equipment, and ensuring the safe operation of electrical systems in high-rise buildings.
[0012] Optionally, after executing the step of constructing the matrix and before executing the step of the first processing, the method further includes: First calculation: calculate the mutual correlation coefficient between the observation matrix and the sparse basis; First optimization: define the optimization goal as minimizing the mutual correlation coefficient, define the objective function based on the optimization goal, use the optimization algorithm to minimize the objective function, iteratively optimize the observation matrix, and use the optimized observation matrix as the new observation matrix.
[0013] By adopting the above technical solution, the mutual correlation coefficient between the observation matrix and the sparse basis is calculated and optimized, so that the correlation between the observation matrix and the sparse basis can reach the optimal state, which helps to more accurately extract effective information related to the operating status of the electrical equipment and reduce the interference of irrelevant information and noise, thereby improving the accuracy of the detection data and making the data more truly reflect the actual operation of the electrical equipment.
[0014] Optionally, after performing the second processing step and before performing the third processing step, the method further includes: The third collection: collecting different types of compressed sensing reconstruction data and the corresponding optimal structural element parameters; First labeling: using the best structural element parameters collected as structural labels, labeling the compressed sensing reconstructed data, and recording the labeled data as structural data; Model construction: construct a structural selection model; First training: input the structural data into the structure selection model for model training to obtain an optimized structure selection model, and use the optimized structure selection model as a new structure selection model; Structure selection: inputting the second data into the structure selection model to obtain the structural element parameters of the second data; Structural optimization: The morphological filter is optimized based on the structural element parameters of the second data, and the optimized morphological filter is used as a new morphological filter.
[0015] By adopting the above technical solution, the structural element parameters of the collected data are selected based on the structural selection model, which can more accurately capture the fault signal and reduce the occurrence of misjudgment and missed judgment caused by electromagnetic interference. In addition, by selecting accurate structural element parameters for the collected data based on the structural selection model, the optimized morphological filter can better highlight the data features related to the fault and suppress the interference features, thereby improving the recognition accuracy of the fault features of the electrical equipment and helping to more accurately judge the real operating status of the electrical equipment.
[0016] Optionally, after performing the third acquisition step and before performing the first marking step, the method further includes: Fourth collection: collecting compressed sensing reconstruction data of different scales and the corresponding optimal structural element parameters; Data merging: merging the collected compressed sensing reconstruction data of different types with compressed sensing reconstruction data of different scales, and using the merged data as new compressed sensing reconstruction data; First label: Based on the type and scale of the compressed sensing reconstructed data, the compressed sensing reconstructed data is labeled with the corresponding compressed sensing reconstructed data type label and compressed sensing reconstructed data scale label, and the labeled data is used as new compressed sensing reconstructed data.
[0017] By adopting the above technical solution, compressed sensing reconstruction data of different scales and types are used to select accurate structural element parameters for the collected data, and a multi-scale morphological filter is constructed based on the structural element parameters. It can filter interference of different scales as the operating status of the electrical equipment and the electromagnetic interference environment are constantly changing, making the characteristic signal more obvious, improving the accuracy of the data, facilitating the subsequent fault identification model to analyze and judge, and helping to improve the accuracy of fault detection.
[0018] Optionally, after performing the second processing step and before performing the third processing step, the method further includes: Wavelet decomposition: The second data is decomposed by wavelet transform, and the decomposed data is used as new second data.
[0019] By adopting the above technical solution, it is helpful to separate the electromagnetic interference signal from the detection data of the electrical equipment at different scales, which helps to clearly display the data characteristics of the signal and the interference signal, and improves the purity of the detection data. In addition, the wavelet decomposition method helps to reduce the dimension of the collected data, reduce the amount of data calculation and storage requirements, and improve the processing speed.
[0020] Optionally, after executing the step of building the model and before executing the step of training the model, the method further includes: First acquisition: collecting electrical equipment data when the electrical equipment is in normal operation and recording it as first reference data; First sorting: sorting the first reference data in chronological order to obtain a reference sequence; Second sorting: sorting the collected historical electrical equipment data in chronological order to obtain several comparison sequences; Second calculation: calculate the grey correlation degree between the reference sequence and the comparison sequence; First judgment: judge whether the calculated grey correlation degree is greater than the preset correlation degree threshold: If so, no action will be taken; If not, the comparison sequence whose grey correlation degree is not greater than the preset correlation degree threshold is marked as an interference sequence, and then the step of data elimination is performed; Data elimination: Delete the historical electrical equipment data corresponding to the sequence marked as interference, and use the remaining historical electrical equipment data after deletion as new historical electrical equipment data.
[0021] By adopting the above technical solution, the noise and outliers in the data are removed, the purity and quality of the collected historical electrical equipment data are improved, the interference of noise data on the training of the electrical fault identification model is reduced, and the accuracy and reliability of the model are improved.
[0022] In a second aspect, the present application provides a building electrical safety detection system, the system being applicable to the building electrical safety detection method described in any one of the first aspects above, the system comprising: adopting the following technical solution: A building electrical safety detection system, the system comprising: The first acquisition module is used to collect real-time electrical equipment data; The second acquisition module is used to collect historical electrical equipment data and corresponding fault type labels; A first processing module, configured to compress the collected real-time electrical equipment data using a compression sensing algorithm based on a preset observation matrix and a preset sparse basis to obtain first data; A second processing module, configured to reconstruct the first data using a reconstruction algorithm based on a preset sparse basis to obtain second data; A third processing module, used for filtering the second data using a preset morphological filter to obtain third data; A model building module for building an electrical fault identification model; A model training module is used to input the collected historical electrical equipment data and the corresponding fault type labels into the electrical fault recognition model, perform model training, obtain an optimized electrical fault recognition model, and use the optimized electrical fault recognition model as a new electrical fault recognition model; The fault identification module is used to input the third data into the electrical fault identification model to obtain a fault type label of the third data.
[0023] By adopting the above technical solution, based on the first processing module, using the compressed sensing algorithm, data is collected at a sampling rate far lower than the Nyquist rate, which greatly reduces the amount of data that needs to be transmitted and processed, reduces the impact of electromagnetic interference and signal distortion on the data during transmission, and improves the data transmission quality. In addition, based on the second processing module, the compressed data is reconstructed through the reconstruction algorithm to compensate for the interference loss of the data. At the same time, based on the third processing module, the morphological filter is used to effectively remove the noise and interference signals in the data, highlight the characteristics of the data, and make the collected data smoother and clearer, which improves the accuracy of electrical equipment fault detection in the complex electromagnetic environment of high-rise buildings, helps to timely discover electrical equipment faults and take corresponding maintenance measures, and ensures the safe and stable operation of the electrical system.
[0024] In summary, the present application includes at least one of the following beneficial technical effects: 1. Using the compressed sensing algorithm, data is collected at a sampling rate far below the Nyquist rate, which greatly reduces the amount of data that needs to be transmitted and processed, reduces the impact of electromagnetic interference and signal distortion on data during transmission, and improves the quality of data transmission. In addition, the compressed data is reconstructed through the reconstruction algorithm to compensate for the interference loss of the data. At the same time, the morphological filter is used to effectively remove the noise and interference signals in the data, highlight the characteristics of the data, make the collected data smoother and clearer, and improve the accuracy of electrical equipment fault detection in the complex electromagnetic environment of high-rise buildings. It helps to detect electrical equipment faults in a timely manner and take corresponding maintenance measures, ensuring the safe and stable operation of the electrical system.
[0025] 2. Using component analysis to construct candidate basis vectors helps to remove noise and redundant information contained in the collected data, and realizes the filtering and feature extraction of electromagnetic interference data. Then, the candidate basis vectors are clustered and screened based on the clustering algorithm to further remove abnormal basis vectors that may be affected by electromagnetic interference, retain the basis vectors that best represent the essential characteristics of the data, and improve the quality and stability of the basis vectors. Optimizing the sparse basis based on the screened basis vectors helps to make the collected data have a sparser representation under the optimized sparse basis, and helps to accurately retain key information related to the operating status and faults of electrical equipment during data compression, and filter out redundant and noise information generated by electromagnetic interference. In addition, the optimized sparse basis can correct the errors caused by electromagnetic interference locks in the subsequent reconstruction process, making the reconstructed data closer to the real equipment operation data, improving the anti-interference ability during the reconstruction process, and making the reconstruction results more stable and accurate, thereby improving the reliability of fault detection.
[0026] 3. Based on the preset important features of electrical equipment and the corresponding deterministic elements, and assigning values to the deterministic elements, the observation matrix can focus on the key features of electrical equipment, and more specifically collect information closely related to the equipment operation status among many interference signals, thereby enhancing the ability to capture effective signals and improving the accuracy of detection data. At the same time, random elements and deterministic elements are set to construct the observation matrix, so that the observation matrix is not easily affected by specific patterns of electromagnetic interference during data collection, further enhancing the ability to extract effective signals from electromagnetic interference, improving the anti-interference ability of data collection, reducing the errors and uncertainties caused by electromagnetic interference, and providing a more accurate data basis for subsequent fault detection, thereby improving the accuracy of electrical equipment fault detection, helping to more timely and accurately discover potential faults of electrical equipment, and ensuring the safe operation of electrical systems in high-rise buildings.
[0027] 4. Calculating and optimizing the mutual correlation coefficient between the observation matrix and the sparse basis can make the correlation between the observation matrix and the sparse basis reach the optimal state, which helps to more accurately extract effective information related to the operating status of electrical equipment and reduce the interference of irrelevant information and noise, thereby improving the accuracy of detection data and making the data more truly reflect the actual operation of electrical equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 is a flow chart of Example 1 of the present application; Figure 2 is a flowchart of the sparse basis setting of S31 in Example 1 of the present application; Figure 3 It is a flowchart of S32 observation matrix setting of Example 1 of the present application; Figure 4 is a flow chart of the morphological filter setting in S52 of Example 1 of the present application; Figure 5 This is a flowchart of the S71 elimination setting of Example 1 of the present application. DETAILED DESCRIPTION
[0029] The following combination Figures 1 to 5 This application is described in further detail.
[0030] Embodiment 1: This embodiment discloses a building electrical safety detection method, such as Figure 1As shown, the method includes: collecting real-time electrical equipment data, collecting historical electrical equipment data and corresponding fault type labels, compressing the collected real-time electrical equipment data based on a preset observation matrix and a preset sparse basis using a compressed sensing algorithm to obtain first data; reconstructing the first data based on a preset sparse basis using a reconstruction algorithm to obtain second data; filtering the second data using a preset morphological filter to obtain third data; constructing an electrical fault recognition model; inputting the collected historical electrical equipment data and the corresponding fault type labels into the electrical fault recognition model, performing model training, obtaining an optimized electrical fault recognition model, and using the optimized electrical fault recognition model as a new electrical fault recognition model; inputting the third data into the electrical fault recognition model to obtain a fault type label for the third data. This embodiment includes the following steps: S1 first collection: collect real-time electrical equipment data.
[0031] Real-time electrical equipment data includes voltage data, current data, power data, temperature data, humidity data, pressure data, switch status data, and equipment vibration data.
[0032] S2 Second collection: Collect historical electrical equipment data and corresponding fault type labels.
[0033] The historical real-time electrical equipment data includes historical voltage data, historical current data, historical power data, historical temperature data, historical humidity data, historical pressure data, historical switch status data and historical equipment vibration data.
[0034] Fault type labels include: short circuit fault, overload fault, overheat fault, insulation fault, mechanical fault, and overvoltage fault.
[0035] In this embodiment, data preprocessing is performed on the collected data, and the data preprocessing includes cleaning, and cleaning includes removing missing values and abnormal values therein.
[0036] S3 basic settings: including S31 sparse basis settings and S2 observation matrix settings.
[0037] S31 sparse basis setting: including S311 matrix modeling, S312 first decomposition, S313 generating basis vectors, S314 screening basis vectors and S315 combining basis vectors, such as Figure 2 shown.
[0038] S311 Matrix modeling: constructing an electrical vector matrix based on the collected real-time electrical equipment data. The corresponding electrical vector matrix can be constructed according to the component analysis method used in the first decomposition in S312.
[0039] In this embodiment, based on the collection time and the measurement value of the collected real-time electrical device data, the collected real-time electrical device data is used to construct an electrical vector matrix in a tensor form.
[0040] Construct an electrical vector matrix, where each row of the matrix represents a measurement value sequence of an electrical device data at a certain moment, and each column represents a measurement value set of all electrical device data at a certain moment.
[0041] S312 First decomposition: Decompose the electrical vector matrix using component analysis methods such as independent component analysis, tensor principal component analysis, and kernel principal component analysis to obtain a component matrix.
[0042] In this embodiment, a tensor principal component analysis method is used. The tensor principal component analysis method includes a high-order singular value decomposition method and a Tucker decomposition method, etc. In this embodiment, a high-order singular value decomposition method is used.
[0043] Each electrical vector matrix is expanded, and singular value decomposition is performed on each expanded electrical vector matrix to obtain the corresponding left singular matrix, singular value matrix and right singular matrix. According to the size of the preset singular value, the main singular value and its corresponding left singular vector are selected, and the component matrix is constructed based on the left singular vector.
[0044] S313 Generate basis vectors: record the vectors in the component matrix as candidate basis vectors.
[0045] S314 basis vector screening: clustering the candidate basis vectors using a clustering algorithm such as a K-means clustering algorithm or a hierarchical clustering algorithm, and based on the clustering results, screen out the most representative candidate basis vectors from each cluster, and record the screened candidate basis vectors as screening basis vectors.
[0046] In this embodiment, the K-means clustering algorithm is used for clustering. For example, the candidate basis vectors are divided into 5 clusters by the K-means clustering algorithm, and the candidate basis vector closest to the cluster center is selected from each cluster as the most representative candidate basis vector, and the selected candidate basis vector is recorded as the selected basis vector.
[0047] S315 Combine basis vectors: Combine the selected basis vectors and use the combined basis vectors as new sparse basis. Direct concatenation or optimization methods such as genetic algorithm and particle swarm optimization algorithm can be used to select the concatenation order and weight between basis vectors for concatenation to obtain a sparse basis.
[0048] In this embodiment, the screened basis vectors are concatenated, and the concatenated basis vectors are used as new sparse bases.
[0049] S32 Observation matrix setting: including S321 dimension setting, S322 scale setting, S323 first generation, S324 second generation, S325 matrix construction, S326 first calculation and S327 first optimization, such as Figure 3 shown.
[0050] S321 Dimension setting: Set the original signal dimension and measurement value dimension.
[0051] The original signal dimension is the dimension before compression, and the measurement value dimension is the dimension after compression.
[0052] S322 Ratio Setting: Set the ratio of random elements to deterministic elements, and calculate the number of random elements and the number of deterministic elements based on the preset number of elements.
[0053] Set the ratio of random elements to deterministic elements in the observation matrix. Generally speaking, random elements account for a larger proportion, and the matrix has high versatility and reconfigurability; while deterministic elements account for a smaller proportion, but can highlight specific signal characteristics. The ratio of random elements to deterministic elements can be set as needed.
[0054] S323 First Generation: Based on the number of random elements, random elements are generated by using a random matrix generation method such as a Gaussian random matrix or a Bernoulli random matrix.
[0055] S324 Second generation: Correspondingly associating important features of preset electrical equipment with deterministic elements and assigning values to the deterministic elements.
[0056] Based on the structure and working principle of the electrical equipment, the important characteristics of the electrical equipment are determined, and a corresponding relationship is established between the determined important characteristics of the electrical equipment and the deterministic elements. Then, the physical principles and operating laws of the electrical equipment or the historical electrical equipment data are used to assign values to the deterministic elements.
[0057] S325 constructs a matrix: constructs an observation matrix based on random elements and assigned deterministic elements, and uses the constructed observation matrix as a new observation matrix.
[0058] S326 First calculation: Calculate the inner product of the column vectors of the observation matrix and the sparse basis, take the absolute value of all column vector inner products, and take the maximum value as the mutual correlation coefficient between the observation matrix and the sparse basis.
[0059] S327 First Optimization: Define the optimization goal as minimizing the mutual correlation coefficient, define the objective function based on the optimization goal, use optimization algorithms such as gradient descent or genetic algorithm to solve, iteratively update the observation matrix until the change in the objective function is less than a certain threshold or reaches the maximum number of iterations, stop the iterative optimization, obtain the optimized observation matrix, and use the optimized observation matrix as the new observation matrix.
[0060] In this embodiment, the gradient descent method is used for optimization.
[0061] S4 first processing: based on a preset observation matrix and a preset sparse basis, a compressed sensing algorithm is used to compress the collected real-time electrical equipment data to obtain first data.
[0062] The collected real-time electrical equipment data is sparsely represented based on a sparse basis, and the real-time electrical equipment data is projected using a preset observation matrix to obtain a low-dimensional observation vector, which is recorded as the first data.
[0063] S5 second processing: based on a preset sparse basis, a reconstruction algorithm such as an orthogonal matching pursuit algorithm or a basis pursuit algorithm is used to reconstruct the first data to obtain second data.
[0064] In this embodiment, an orthogonal matching pursuit algorithm is used to reconstruct the first data. An initial residual, an initial support set, and an initial current solution are set, the inner product of the current residual and each atom in the dictionary matrix is calculated, the atom most relevant to the current residual is selected, the index of the atom in the dictionary matrix is obtained, and the obtained index is added to the support set. On the current support set, the coefficient vector is solved by the least squares method, and the signal estimation value under the current support set is calculated according to the solved coefficient vector. The residual is updated by subtracting the calculated signal estimation value from the first data until the residual is less than a preset threshold or the maximum number of iterations is reached, the iteration is terminated, and the coefficient vector is used as the second data obtained.
[0065] S51 Wavelet decomposition: Decomposing the second data by using wavelet transform, and using the decomposed data as new second data.
[0066] Based on the second data, a wavelet basis function is selected, a decomposition layer of the wavelet basis function is defined, and the second data is decomposed using a discrete wavelet transform algorithm. The second data is convolved with a low-pass filter to obtain a low-frequency part; the second data is convolved with a high-pass filter to obtain a high-frequency part, and the obtained low-frequency part and high-frequency part are downsampled to obtain approximate coefficients and detail coefficients. The obtained low-frequency part is continued to be decomposed by the wavelet of the next layer, and the above operation is repeated until the predetermined number of decomposition layers is reached, the iterative decomposition is completed, and all the obtained approximate coefficients and detail coefficients are collected as new second data.
[0067] S52 Morphological filter settings: including S521 third acquisition, S522 fourth acquisition, S523 data merging, S524 first labeling, S525 first annotation, S526 model building, S527 first training, S528 structure selection and S529 structure optimization, such as Figure 4 shown.
[0068] S521 Third acquisition: collecting different types of compressed sensing reconstruction data and corresponding optimal structural element parameters.
[0069] Determine the type of compressed sensing reconstruction data that needs to be collected, prepare the corresponding original signal based on the determined type of compressed sensing reconstruction data, and reconstruct it using the corresponding compressed sensing reconstruction algorithm. For the obtained compressed sensing reconstruction data, use different structural element parameters to perform morphological operations on it, preset evaluation standards, and traverse different structural element parameters to select the structural element parameters that have the best evaluation index as the optimal structural element parameters for this type of reconstructed data.
[0070] S522 Fourth collection: collecting compressed sensing reconstruction data of different scales and corresponding optimal structural element parameters.
[0071] Determine the scale range of the compressed sensing reconstruction data to be collected, perform compressed sensing sampling of different scales on the original signal, and then reconstruct it through the reconstruction algorithm to obtain compressed sensing reconstruction data of different scales. For the obtained compressed sensing reconstruction data, use different structural element parameters to perform morphological operations on it, preset evaluation standards, and traverse different structural element parameters to select the structural element parameters that have the best evaluation index as the optimal structural element parameters for the reconstruction data of this scale.
[0072] S523 Data merging: merging the collected compressed sensing reconstruction data of different types with the compressed sensing reconstruction data of different scales, and using the merged data as new compressed sensing reconstruction data.
[0073] S524 First label: Based on the type and scale of the compressed sensing reconstructed data, label the compressed sensing reconstructed data with a corresponding compressed sensing reconstructed data type label and a compressed sensing reconstructed data scale label, and use the labeled data as new compressed sensing reconstructed data. Each compressed sensing reconstructed data is labeled with a corresponding compressed sensing reconstructed data scale label and a compressed sensing reconstructed data type label.
[0074] S525 First labeling: using the collected optimal structural element parameters as structural labels, labeling the compressed sensing reconstructed data, and recording the labeled data as structural data. Each structural data is labeled with a corresponding compressed sensing reconstructed data scale label, a compressed sensing reconstructed data type label, and a structural label.
[0075] S526 Model construction: A structure selection model can be constructed based on a machine learning model or a deep learning model as a basic model.
[0076] In this embodiment, a convolutional neural network model is used to construct a structure selection model.
[0077] S527 First training: inputting the structural data into the structure selection model for model training to obtain an optimized structure selection model, and using the optimized structure selection model as a new structure selection model.
[0078] A structure selection sample training set is constructed based on the structure data, and the structure selection sample training set is used as a sample input into the structure selection model for forward propagation and back propagation. The mean square error function is defined as the loss function, and the model parameters of the structure selection model are updated using stochastic gradient descent. The above steps are repeated for iterative training until the preset number of iterative training times is reached. The model training is completed and the optimized structure selection model is obtained. The optimized structure selection model is used as the new structure selection model.
[0079] S528 Structure selection: input the second data into the structure selection model to obtain the structural element parameters of the second data.
[0080] S529 structure optimization: applying the structural element parameters of the second data to the morphological filter to obtain an optimized morphological filter, and using the optimized morphological filter as a new morphological filter.
[0081] S6: The third processing: using a preset morphological filter, performing an opening operation on the second data to obtain a filtering result, which is recorded as the third data.
[0082] S7 builds a model: builds an electrical fault identification model. The electrical fault identification model can use a decision tree model, a support vector machine model, a multi-layer perceptron, a convolutional neural network, a recurrent neural network, a random forest model, and a gradient boosting model as basic models.
[0083] In this embodiment, a multi-layer perceptron is used to construct an electrical fault identification model.
[0084] S71 elimination setting: including S711 first acquisition, S712 first sorting, S713 second sorting, S714 second calculation, S715 first judgment and S716 data elimination, such as Figure 5 shown.
[0085] S711 First acquisition: Collect the electrical equipment data when the electrical equipment is in normal operation and record it as the first reference data. When all the data of the electrical equipment fluctuate within the prescribed normal range, it indicates that the electrical equipment is in normal state.
[0086] S712 First sorting: Record the timestamp corresponding to the first reference data, and sort the first reference data in chronological order to obtain a reference sequence.
[0087] S713 Second sorting: sorting the historical electrical equipment data collected in different time periods in chronological order to obtain several comparison sequences.
[0088] S714 Second calculation: Calculate the correlation coefficient between each reference sequence and the comparison sequence at each moment, and perform weighted average of the correlation coefficient at each moment to obtain the grey correlation degree between the reference sequence and the comparison sequence.
[0089] S715 First judgment: set a preset correlation threshold according to actual conditions, and judge whether the calculated grey correlation is greater than the preset correlation threshold.
[0090] If so, no processing is done.
[0091] If not, the comparison sequence whose grey correlation degree is not greater than the preset correlation degree threshold is marked as an interference sequence, and then the step of data elimination is performed; S716 Data elimination: according to the marked interference sequence, the data corresponding to the marked interference sequence is deleted from the historical electrical equipment data, and the remaining historical electrical equipment data after the deletion is used as the new historical electrical equipment data.
[0092] S72 Historical data processing: Based on the preset observation matrix and the preset sparse basis, the compressed sensing algorithm is used to compress the collected historical electrical equipment data to obtain the first historical data. Based on the preset sparse basis, the orthogonal matching pursuit algorithm is used to reconstruct the first historical data to obtain the second historical data. The discrete wavelet transform algorithm is used to decompose the second historical data, and the decomposed data is used as the new second historical data. The preset morphological filter is used to perform an open operation on the second historical data to obtain the filtering result, which is recorded as the third historical data, and the third historical data is used as the new historical electrical equipment data.
[0093] S8 model training: The collected historical electrical equipment data and the corresponding fault type labels are input into the electrical fault recognition model for model training. The cross entropy loss function is defined as the loss function of the electrical fault recognition model. By minimizing the cross entropy loss function, the optimized electrical fault recognition model is obtained. The optimized electrical fault recognition model is used as the new electrical fault recognition model.
[0094] S9 Fault identification: input the third data into the electrical fault identification model to obtain a fault type label of the third data.
[0095] In this embodiment, a compressed sensing algorithm is used to collect data at a sampling rate far lower than the Nyquist rate, which greatly reduces the amount of data that needs to be transmitted and processed, reduces the impact of electromagnetic interference and signal distortion on the data during transmission, and improves the data transmission quality. In addition, the compressed data is reconstructed by a reconstruction algorithm to compensate for the interference loss of the data. At the same time, a morphological filter is used to effectively remove noise and interference signals in the data, highlight the characteristics of the data, make the collected data smoother and clearer, and improve the accuracy of electrical equipment fault detection in the complex electromagnetic environment of high-rise buildings, which helps to timely discover electrical equipment faults and take corresponding maintenance measures, ensuring the safe and stable operation of the electrical system.
[0096] Embodiment 2: This embodiment discloses a building electrical safety detection system, the system comprising: The first acquisition module is used to acquire real-time electrical equipment data.
[0097] The second acquisition module is used to collect historical electrical equipment data and corresponding fault type labels.
[0098] The first processing module is used to compress the collected real-time electrical equipment data by using a compressed sensing algorithm based on a preset observation matrix and a preset sparse basis to obtain first data.
[0099] The second processing module is used to reconstruct the first data based on a preset sparse basis by using a reconstruction algorithm to obtain second data.
[0100] The wavelet decomposition module is used to decompose the second data by adopting wavelet transform, and use the decomposed data as new second data.
[0101] The third processing module is used to filter the second data using a preset morphological filter to obtain third data.
[0102] Model building module, used to build electrical fault identification models.
[0103] The model training module is used to input the collected historical electrical equipment data and the corresponding fault type labels into the electrical fault identification model, perform model training, obtain an optimized electrical fault identification model, and use the optimized electrical fault identification model as a new electrical fault identification model.
[0104] The fault identification module is used to input the third data into the electrical fault identification model to obtain a fault type label of the third data.
[0105] In this embodiment, based on the use of the compressed sensing algorithm in the first processing module, data is collected at a sampling rate far lower than the Nyquist rate, which greatly reduces the amount of data that needs to be transmitted and processed, reduces the impact of electromagnetic interference and signal distortion on the data during transmission, and improves the data transmission quality. In addition, based on the second processing module, the compressed data is reconstructed through the reconstruction algorithm to compensate for the interference loss of the data. At the same time, based on the third processing module, the morphological filter is used to effectively remove the noise and interference signals in the data, highlight the characteristics of the data, and make the collected data smoother and clearer, which improves the accuracy of electrical equipment fault detection in the complex electromagnetic environment of high-rise buildings, helps to timely discover electrical equipment faults and take corresponding maintenance measures, and ensures the safe and stable operation of the electrical system.
[0106] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A building electrical safety detection method, characterized in that: include: First collection: collect real-time electrical equipment data; Second collection: collect historical electrical equipment data and corresponding fault type labels; First processing: based on a preset observation matrix and a preset sparse basis, a compressed sensing algorithm is used to compress the collected real-time electrical equipment data to obtain first data; Second processing: reconstructing the first data using a reconstruction algorithm based on a preset sparse basis to obtain second data; Third processing: using a preset morphological filter to filter the second data to obtain third data; Build model: Build electrical fault identification model; Model training: Input the collected historical electrical equipment data and the corresponding fault type labels into the electrical fault recognition model, perform model training, obtain an optimized electrical fault recognition model, and use the optimized electrical fault recognition model as a new electrical fault recognition model; Fault identification: The third data is input into the electrical fault identification model to obtain a fault type label of the third data.
2. The building electrical safety detection method according to claim 1, characterized in that: After executing the second acquisition step and before executing the first processing step, the method further includes: Matrix modeling: Building electrical vector matrices based on collected real-time electrical equipment data; First decomposition: Use component analysis to decompose the electrical vector matrix to obtain the component matrix; Generate basis vectors: record the vectors in the component matrix as candidate basis vectors; Filtering basis vectors: clustering the candidate basis vectors using a clustering algorithm, and filtering out the candidate basis vectors based on the clustering results. The filtered candidate basis vectors are recorded as filtered basis vectors. Combined basis vectors: Combine the filtered basis vectors and use the combined basis vectors as the new sparse basis.
3. The building electrical safety detection method according to claim 2, characterized in that: After executing the second acquisition step and before executing the first processing step, the method further includes: Dimension setting: set the original signal dimension and measurement value dimension; Ratio setting: Set the ratio of random elements and deterministic elements, and calculate the number of random elements and the number of deterministic elements based on the preset number of elements; First generation: Based on the number of random elements, random elements are generated using a random matrix generation method; Second generation: Corresponding and associating important features of preset electrical equipment with deterministic elements, and assigning values to the deterministic elements; Construct a matrix: Based on the random elements and the assigned deterministic elements, construct an observation matrix, and use the constructed observation matrix as the new observation matrix.
4. The building electrical safety detection method according to claim 3, characterized in that: After executing the step of constructing the matrix and before executing the step of the first processing, the method further includes: First calculation: calculate the mutual correlation coefficient between the observation matrix and the sparse basis; First optimization: define the optimization goal as minimizing the mutual correlation coefficient, define the objective function based on the optimization goal, use the optimization algorithm to minimize the objective function, iteratively optimize the observation matrix, and use the optimized observation matrix as the new observation matrix.
5. The building electrical safety detection method according to claim 1, characterized in that: After executing the second processing step and before executing the third processing step, the method further includes: The third collection: collecting different types of compressed sensing reconstruction data and the corresponding optimal structural element parameters; First labeling: using the best structural element parameters collected as structural labels, labeling the compressed sensing reconstruction data, and recording the labeled data as structural data; Model construction: construct a structural selection model; First training: input the structural data into the structure selection model for model training to obtain an optimized structure selection model, and use the optimized structure selection model as a new structure selection model; Structure selection: inputting the second data into the structure selection model to obtain the structural element parameters of the second data; Structural optimization: The morphological filter is optimized based on the structural element parameters of the second data, and the optimized morphological filter is used as a new morphological filter.
6. The building electrical safety detection method according to claim 5, characterized in that: After executing the third acquisition step and before executing the first marking step, the method further includes: Fourth collection: collecting compressed sensing reconstruction data of different scales and the corresponding optimal structural element parameters; Data merging: merging the collected compressed sensing reconstruction data of different types with compressed sensing reconstruction data of different scales, and using the merged data as new compressed sensing reconstruction data; First label: Based on the type and scale of the compressed sensing reconstructed data, the compressed sensing reconstructed data is labeled with the corresponding compressed sensing reconstructed data type label and compressed sensing reconstructed data scale label, and the labeled data is used as new compressed sensing reconstructed data.
7. The building electrical safety detection method according to claim 1, characterized in that: After executing the second processing step and before executing the third processing step, the method further includes: Wavelet decomposition: The second data is decomposed by wavelet transform, and the decomposed data is used as new second data.
8. The building electrical safety detection method according to claim 1, characterized in that: After executing the step of building the model and before executing the step of model training, it also includes: First acquisition: collecting electrical equipment data when the electrical equipment is in normal operation and recording it as first reference data; First sorting: sorting the first reference data in chronological order to obtain a reference sequence; Second sorting: sorting the collected historical electrical equipment data in chronological order to obtain several comparison sequences; Second calculation: calculate the grey correlation degree between the reference sequence and the comparison sequence; First judgment: judge whether the calculated grey correlation degree is greater than the preset correlation degree threshold: If so, no action will be taken; If not, the comparison sequence whose grey correlation degree is not greater than the preset correlation degree threshold is marked as an interference sequence, and then the step of data elimination is performed; Data elimination: Delete the historical electrical equipment data corresponding to the sequence marked as interference, and use the remaining historical electrical equipment data after deletion as new historical electrical equipment data.
9. A building electrical safety detection system, characterized in that: The system is applicable to the method according to any one of claims 1 to 8, and the system comprises: The first acquisition module is used to collect real-time electrical equipment data; The second acquisition module is used to collect historical electrical equipment data and corresponding fault type labels; A first processing module, configured to compress the collected real-time electrical equipment data using a compression sensing algorithm based on a preset observation matrix and a preset sparse basis to obtain first data; A second processing module, configured to reconstruct the first data using a reconstruction algorithm based on a preset sparse basis to obtain second data; A third processing module, used for filtering the second data using a preset morphological filter to obtain third data; A model building module for building an electrical fault identification model; A model training module is used to input the collected historical electrical equipment data and the corresponding fault type labels into the electrical fault recognition model, perform model training, obtain an optimized electrical fault recognition model, and use the optimized electrical fault recognition model as a new electrical fault recognition model; The fault identification module is used to input the third data into the electrical fault identification model to obtain a fault type label of the third data.
Citation Information
Patent Citations
Electric automation equipment fault detection system
CN117970005A
Measurement method for time-varying non-stationary network flow
CN103200043A
Efficient intelligent sensing and collecting method for micro-seismic signal detection
CN111046737A
MOMEDA and compressed sensing rolling bearing fault diagnosis method
CN113780055A
Edge computing data processing method, device and equipment and readable storage medium
CN114491403A
Cited By
Digital small hydropower station fault identification device and method
CN121164907A