CN117871994B - Rapid fault detection method and system for PLC (programmable logic controller) electric cabinet - Google Patents
Rapid fault detection method and system for PLC (programmable logic controller) electric cabinet Download PDFInfo
- Publication number
- CN117871994B CN117871994B CN202311783315.3A CN202311783315A CN117871994B CN 117871994 B CN117871994 B CN 117871994B CN 202311783315 A CN202311783315 A CN 202311783315A CN 117871994 B CN117871994 B CN 117871994B
- Authority
- CN
- China
- Prior art keywords
- fault
- search
- searching
- data
- detection scheme
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 96
- 239000011159 matrix material Substances 0.000 claims abstract description 53
- 238000012545 processing Methods 0.000 claims abstract description 52
- 230000009467 reduction Effects 0.000 claims abstract description 49
- 238000000034 method Methods 0.000 claims abstract description 39
- 238000011156 evaluation Methods 0.000 claims abstract description 11
- 238000010606 normalization Methods 0.000 claims description 17
- 230000008569 process Effects 0.000 claims description 15
- 238000004891 communication Methods 0.000 claims description 3
- 238000000354 decomposition reaction Methods 0.000 claims description 3
- 238000003860 storage Methods 0.000 abstract description 8
- 238000010276 construction Methods 0.000 abstract description 2
- 238000004519 manufacturing process Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 230000007613 environmental effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Testing And Monitoring For Control Systems (AREA)
Abstract
The invention discloses a rapid fault detection method and a rapid fault detection system for a PLC electric cabinet, wherein the method comprises the following steps: historical fault data acquisition, data dimension reduction processing, fault search positioning model construction, fault search detection scheme evaluation and fault alarm and processing. The invention belongs to the technical field of data processing, in particular to a rapid fault detection method and a rapid fault detection system for a PLC (programmable logic controller) electric cabinet, wherein the method calculates a state vector of a sample data set and a dimension-reducing objective function, calculates a covariance matrix, performs Lagrange multiplication, and reduces calculation and storage cost; calculating a dynamic step length based on local search, adjusting a search angle, updating a fault search range, rapidly positioning faults, and generating a fault search detection scheme set; defining an attribute set, normalizing attribute data, calculating a weighted normalized decision matrix, calculating the relative proximity of a fault search detection scheme and a positive ideal solution, selecting an optimal fault search detection scheme, and improving fault detection efficiency.
Description
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to a rapid fault detection method and system for a PLC (programmable logic controller) electric cabinet.
Background
The method for rapidly detecting the faults of the PLC electric cabinet is a method for rapidly identifying and positioning the faults of the system by collecting, storing and analyzing the data generated during the operation of the electric cabinet system, and aims to reduce the influence range of the faults of the PLC electric cabinet, reduce the time of production interruption and improve the reliability and stability of equipment. However, the existing rapid fault detection method of the PLC electric cabinet has the technical problems that the dimension of fault data is high, the cost of calculation and storage is huge, and the complexity of fault detection is increased; when the environment changes and the fault conditions are different, the fault searching speed is reduced, and the technical problem that faults cannot be accurately positioned in time is solved; the technical problems that the accuracy and the efficiency of fault processing are reduced and the production efficiency and the stability are affected due to inaccurate fault detection exist.
Disclosure of Invention
Aiming at the technical problems that the cost of calculation and storage is huge and the complexity of fault detection is increased due to higher fault data dimension, data dimension reduction processing is adopted, the state vector and the dimension reduction objective function of a sample data set are calculated, a covariance matrix is calculated, lagrange multiplication is performed, dimension reduction processing is realized, the calculation and storage cost is reduced, redundant information is removed, and representative characteristics are reserved; aiming at the technical problems that when environmental changes and fault conditions are different, the fault searching speed is reduced and faults cannot be accurately positioned in time, a fault searching positioning model is adopted, an fitness value is defined, fault searching is carried out from an initial position, a dynamic step length based on local searching is calculated, the searching angle is adjusted, the fault searching range is updated, and the fault positioning speed is improved; aiming at the technical problems that the accuracy and efficiency of fault processing are reduced and the production efficiency and stability are affected due to inaccurate fault detection, a defined attribute set is adopted, the attribute data are standardized, a weighted normalization decision matrix is calculated, the relative proximity of a fault search detection scheme and an ideal solution is calculated, an optimal fault search detection scheme is selected, and the fault processing efficiency is improved.
The technical scheme adopted by the invention is as follows: the invention provides a rapid fault detection method for a PLC electric cabinet, which comprises the following steps:
Step S1: historical fault data acquisition;
step S2: the data dimension reduction processing is specifically to project historical fault data onto a sub-main space, calculate a state vector of a sample data set and a dimension reduction objective function, calculate a covariance matrix, and perform Lagrange multiplication to realize dimension reduction processing;
step S3: constructing a fault searching and positioning model, namely defining a fitness value, performing fault searching from an initial position, calculating a dynamic step length based on local searching, adjusting a searching angle, updating a fault searching range, performing iterative searching, and generating a fault searching and detecting scheme set;
Step S4: the fault search detection scheme is evaluated, specifically, an attribute set is defined, the attribute data is standardized, a weighted normalization decision matrix is calculated, the relative proximity of the fault search detection scheme and the ideal solution is calculated, and the optimal fault search detection scheme is selected;
Step S5: and (5) alarming and processing faults.
Further, in step S1, the historical fault data is collected, specifically, various historical data information generated when the PLC electric cabinet system is in operation fault is collected, including an input/output state, a communication state, sensor data, a controller state, electric cabinet operation time and a mode switching record, and a fault reason and a fault possibility are used as data labels.
Further, in step S2, the data dimension reduction processing includes the following steps:
step S21: calculating a state vector of the sample data set, projecting the historical fault data onto a sub-main space to obtain the state vector of the sample data set, wherein the formula is as follows:
in the method, in the process of the invention, Is a sample dataset state vector representing projection of historical fault data, k is an index of a sample dataset, c is an index of a feature, B is a feature total number, a kc is a weight coefficient of a c-th feature of the kth sample dataset, and u c is a projection value of the c-th feature on a sub-main space;
step S22: calculating an objective function of dimension reduction, and measuring the degree of difference between a sample data set after dimension reduction and historical fault data, wherein the formula is as follows:
where J represents the objective function of dimension reduction, M is the total number of sample data sets, Is a target vector for reducing the dimension, represents the data projection after the dimension reduction,The square of the Euclidean distance representing the sample dataset state vector and the reduced dimension target vector;
Step S23: calculating a covariance matrix, and analyzing the relation between each feature in the sample data set by calculating the covariance matrix between the state vector of the sample data set and the mean vector of the sample data set by using the following formula:
where S is a covariance matrix, which is a matrix that measures the relationship between two random variables, Representing a mean vector of the sample dataset, T representing a transpose of the vector;
Step S24: lagrangian multiplication is performed, and the calculation of the feature vector is optimized, wherein the following formula is adopted:
F(uc)=uc TSuc+λ(1-uc Tuc);
where F (u c) is a Lagrangian function and λ is the Lagrangian multiplier;
Step S25: and performing dimension reduction, namely obtaining eigenvalues and eigenvectors of the covariance matrix through the singular value decomposition state sequence, and performing dimension reduction.
Further, in step S3, the constructing a fault searching and locating model includes the following steps:
step S31: initializing, namely setting a plurality of initial positions as possible fault occurrence points, namely possible fault reasons;
Step S32: a fitness value is defined that represents the percentage likelihood of each possible failure occurrence point using the following formula:
wherein A is an fitness value, namely the matching degree of fault occurrence points, omega is the Euclidean distance between each possible fault occurrence point and a fault position, and the smaller the distance is, the higher the matching degree is, and the larger the fitness value is;
step S33: performing fault searching, namely traversing a fault searching range from an initial position, wherein the fault searching range comprises the following steps of:
Step S331: calculating a dynamic step length based on local search, wherein the formula is as follows:
Where L is the dynamic step of the local search, V is the point closest to the fault location at the present time, Is an exponential function of the local search, t is an exponential parameter of the local search, p is a fault search dimension of the local search, τ is a random value in the (0, 1) range for generating small random perturbations;
Step S332: the search angle is adjusted and the next turn will turn to a new angle with the following formula:
in the method, in the process of the invention, Is a new search angle for the search result,Is the current fault search angle, r 1 is the radius of each turn, α max is the maximum angle of each turn;
Step S333: moving to the next position, the formula is as follows:
Where Y' is the next movement position, Y is the initial position, r 2 is the local optimum, L is the dynamic step size of the local search, D is the distance metric function in the fault search, Is a new search angle;
Step S334: updating the fault searching range, recalculating the fitness value according to the next moving position, reducing the searching range to the vicinity of the position with high fitness value, obtaining a more accurate fault position, and updating the fault possibility label;
Step S34: designing iterative search, presetting an adaptability threshold, and when the adaptability value is higher than the adaptability threshold, establishing a fault search positioning model; if the maximum iteration times are reached, resetting the initial position to perform fault searching; otherwise, continuing to iterate the search;
step S35: and generating a fault searching detection scheme set, and obtaining different fault searching detection schemes, namely the fault searching detection scheme set, in the fault searching positioning model iteration process.
Further, in step S4, the fault search detection scheme evaluation includes the steps of:
Step S41: defining an attribute set, defining an attribute set corresponding to the fault search detection scheme set, and evaluating each scheme in the fault search detection scheme according to the attribute set;
step S42: data normalization, namely normalizing the data corresponding to each attribute to obtain a normalized matrix, wherein the formula is as follows:
Where z ij is the value of the jth data point of the ith attribute in the normalized matrix, y ij is the value of the jth data point of the ith attribute in the historical fault data matrix, and n is the total number of attributes;
Step S43: calculating a weighted normalized decision matrix, focusing on the influence of key attributes on a solution, wherein the following formula is used:
Xij=wj×zij;
Where X ij is an element in the matrix and w j is a weight in the weighted normalized decision matrix;
step S44: the distances from each scheme to the positive ideal solution and the negative ideal solution are calculated, and the advantages and disadvantages of each fault search detection scheme are evaluated, wherein the following formula is used:
in the method, in the process of the invention, Is a negative ideal solution, is a data point with all attributes changed to 0 after weighted normalization,The method is positive ideal solution, namely data points with all attributes becoming maximum weight values after weighted normalization, m is the total number of the data points, d + is the distance from the fault search detection scheme to the positive ideal solution, and d - is the distance from the fault search detection scheme to the negative ideal solution;
step S45: selecting an optimal fault search detection scheme, and calculating the relative proximity of the fault search detection scheme and the ideal solution, wherein the formula is as follows:
Wherein, C + is the relative proximity of the fault searching detection scheme and the ideal solution, and the fault position detected by the fault searching detection scheme with the maximum relative proximity is the final fault reason.
Further, in step S5, the fault alarm and processing, specifically, performing fault searching and positioning by adopting an optimal fault searching and detecting scheme, once the fault position of the PLC electric cabinet is determined, the system automatically sends out an alarm to notify an operator, and provides corresponding fault processing suggestions.
The invention provides a rapid fault detection system for a PLC electric cabinet, which comprises a historical fault data acquisition module, a data dimension reduction processing module, a fault search positioning model building module, a fault search detection scheme evaluation module and a fault alarm and processing module, wherein the historical fault data acquisition module is used for acquiring the historical fault data of the PLC electric cabinet;
the historical fault data acquisition module is used for acquiring various historical data information generated when the PLC electric cabinet system runs and fails;
the data dimension reduction processing module is used for projecting the historical fault data onto a sub-main space, calculating a state vector of a sample data set and a dimension reduction objective function, calculating a covariance matrix, and carrying out Lagrange multiplication to realize dimension reduction processing;
The fault searching and positioning model building module is used for defining a fitness value, performing fault searching from an initial position, calculating a dynamic step length based on local searching, adjusting a searching angle, updating a fault searching range, and performing iterative searching to generate a fault searching and detecting scheme set;
the fault search detection scheme evaluation module is used for defining an attribute set, standardizing attribute data, calculating a weighted normalization decision matrix, calculating the relative proximity of a fault search detection scheme and an ideal solution, and selecting an optimal fault search detection scheme;
The fault alarming and processing module is particularly used for carrying out fault searching and positioning by adopting an optimal fault searching and detecting scheme, and once the fault position of the PLC electric cabinet is determined, the system automatically sends out an alarm to inform an operator and provides corresponding fault processing suggestions.
The beneficial results obtained by adopting the scheme of the invention are as follows:
(1) Aiming at the technical problems that the cost of calculation and storage is huge and the complexity of fault detection is increased due to higher fault data dimension, data dimension reduction processing is adopted, a state vector of a sample data set and a dimension reduction objective function are calculated, a covariance matrix is calculated, lagrange multiplication is performed, dimension reduction processing is realized, the cost of calculation and storage is reduced, redundant information is removed, and representative characteristics are reserved;
(2) Aiming at the technical problems that when environmental changes and fault conditions are different, the fault searching speed is reduced and faults cannot be accurately positioned in time, a fault searching positioning model is adopted, an fitness value is defined, fault searching is carried out from an initial position, a dynamic step length based on local searching is calculated, the searching angle is adjusted, the fault searching range is updated, and the fault positioning speed is improved;
(3) Aiming at the technical problems that the accuracy and efficiency of fault processing are reduced and the production efficiency and stability are affected due to inaccurate fault detection, a defined attribute set is adopted, the attribute data are standardized, a weighted normalization decision matrix is calculated, the relative proximity of a fault search detection scheme and an ideal solution is calculated, an optimal fault search detection scheme is selected, and the fault processing efficiency is improved.
Drawings
Fig. 1 is a schematic flow chart of a method for detecting a rapid fault of a PLC electrical cabinet according to the present invention;
FIG. 2 is a schematic diagram of a rapid fault detection system for a PLC electrical cabinet according to the present invention;
FIG. 3 is a flow chart of step S2;
FIG. 4 is a flow chart of step S3;
fig. 5 is a flow chart of step S4.
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention; all other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the present invention, it should be understood that the terms "upper," "lower," "front," "rear," "left," "right," "top," "bottom," "inner," "outer," and the like indicate orientation or positional relationships based on those shown in the drawings, merely to facilitate description of the invention and simplify the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus should not be construed as limiting the invention.
First embodiment, referring to fig. 1, the present invention provides a method for detecting a rapid fault of a PLC electric cabinet, the method comprising the following steps:
Step S1: historical fault data acquisition;
step S2: the data dimension reduction processing is specifically to project historical fault data onto a sub-main space, calculate a state vector of a sample data set and a dimension reduction objective function, calculate a covariance matrix, and perform Lagrange multiplication to realize dimension reduction processing;
step S3: constructing a fault searching and positioning model, namely defining a fitness value, performing fault searching from an initial position, calculating a dynamic step length based on local searching, adjusting a searching angle, updating a fault searching range, performing iterative searching, and generating a fault searching and detecting scheme set;
Step S4: the fault search detection scheme is evaluated, specifically, an attribute set is defined, the attribute data is standardized, a weighted normalization decision matrix is calculated, the relative proximity of the fault search detection scheme and the ideal solution is calculated, and the optimal fault search detection scheme is selected;
Step S5: and (5) alarming and processing faults.
Referring to fig. 1, in this embodiment, in step S1, the historical fault data is collected, specifically, various historical data information generated when the PLC electric cabinet system is in operation fault, including an input/output state, a communication state, sensor data, a controller state, an electric cabinet operation time and a mode switching record, and a fault cause and a fault possibility are used as data labels.
An embodiment III, referring to FIG. 1 and FIG. 3, is based on the above embodiment, and in step S2, the data dimension reduction process includes the following steps:
step S21: calculating a state vector of the sample data set, projecting the historical fault data onto a sub-main space to obtain the state vector of the sample data set, wherein the formula is as follows:
in the method, in the process of the invention, Is a sample dataset state vector representing projection of historical fault data, k is an index of a sample dataset, c is an index of a feature, B is a feature total number, a kc is a weight coefficient of a c-th feature of the kth sample dataset, and u c is a projection value of the c-th feature on a sub-main space;
step S22: calculating an objective function of dimension reduction, and measuring the degree of difference between a sample data set after dimension reduction and historical fault data, wherein the formula is as follows:
where J represents the objective function of dimension reduction, M is the total number of sample data sets, Is a target vector for reducing the dimension, represents the data projection after the dimension reduction,The square of the Euclidean distance representing the sample dataset state vector and the reduced dimension target vector;
Step S23: calculating a covariance matrix, and analyzing the relation between each feature in the sample data set by calculating the covariance matrix between the state vector of the sample data set and the mean vector of the sample data set by using the following formula:
where S is a covariance matrix, which is a matrix that measures the relationship between two random variables, Representing a mean vector of the sample dataset, T representing a transpose of the vector;
Step S24: lagrangian multiplication is performed, and the calculation of the feature vector is optimized, wherein the following formula is adopted:
F(uc)=uc TSuc+λ(1-uc Tuc);
where F (u c) is a Lagrangian function and λ is the Lagrangian multiplier;
Step S25: and performing dimension reduction, namely obtaining eigenvalues and eigenvectors of the covariance matrix through the singular value decomposition state sequence, and performing dimension reduction.
By executing the operation, the data dimension reduction processing is adopted, the state vector and the dimension reduction objective function of the sample data set are calculated, the covariance matrix is calculated, lagrange multiplication is performed, the dimension reduction processing is realized, the calculation and storage cost is reduced, redundant information is removed, representative characteristics are reserved, and the technical problems that the cost of calculation and storage is huge and the complexity of fault detection is increased due to higher fault data dimension are solved.
Fourth embodiment, referring to fig. 1 and 4, the method is based on the above embodiment, and in step S3, the constructing a fault search positioning model includes the following steps:
step S31: initializing, namely setting a plurality of initial positions as possible fault occurrence points, namely possible fault reasons;
Step S32: a fitness value is defined that represents the percentage likelihood of each possible failure occurrence point using the following formula:
wherein A is an fitness value, namely the matching degree of fault occurrence points, omega is the Euclidean distance between each possible fault occurrence point and a fault position, and the smaller the distance is, the higher the matching degree is, and the larger the fitness value is;
step S33: performing fault searching, namely traversing a fault searching range from an initial position, wherein the fault searching range comprises the following steps of:
Step S331: calculating a dynamic step length based on local search, wherein the formula is as follows:
Where L is the dynamic step of the local search, V is the point closest to the fault location at the present time, Is an exponential function of the local search, t is an exponential parameter of the local search, p is a fault search dimension of the local search, τ is a random value in the (0, 1) range for generating small random perturbations;
Step S332: the search angle is adjusted and the next turn will turn to a new angle with the following formula:
in the method, in the process of the invention, Is a new search angle for the search result,Is the current fault search angle, r 1 is the radius of each turn, α max is the maximum angle of each turn;
Step S333: moving to the next position, the formula is as follows:
Where Y' is the next movement position, Y is the initial position, r 2 is the local optimum, L is the dynamic step size of the local search, D is the distance metric function in the fault search, Is a new search angle;
Step S334: updating the fault searching range, recalculating the fitness value according to the next moving position, reducing the searching range to the vicinity of the position with high fitness value, obtaining a more accurate fault position, and updating the fault possibility label;
Step S34: designing iterative search, presetting an adaptability threshold, and when the adaptability value is higher than the adaptability threshold, establishing a fault search positioning model; if the maximum iteration times are reached, resetting the initial position to perform fault searching; otherwise, continuing to iterate the search;
step S35: and generating a fault searching detection scheme set, and obtaining different fault searching detection schemes, namely the fault searching detection scheme set, in the fault searching positioning model iteration process.
By executing the operation, adopting the fault search positioning model, defining the fitness value, carrying out fault search from the initial position, calculating the dynamic step length based on local search, adjusting the search angle, updating the fault search range, improving the fault positioning speed, and solving the technical problems that the fault search speed is reduced and the fault cannot be positioned accurately in time when the environment change and the fault condition are different.
Embodiment five, referring to fig. 1 and 5, based on the above embodiment, in step S4, the fault search detection scheme evaluation includes the following steps:
Step S41: defining an attribute set, defining an attribute set corresponding to the fault search detection scheme set, and evaluating each scheme in the fault search detection scheme according to the attribute set;
step S42: data normalization, namely normalizing the data corresponding to each attribute to obtain a normalized matrix, wherein the formula is as follows:
Where z ij is the value of the jth data point of the ith attribute in the normalized matrix, y ij is the value of the jth data point of the ith attribute in the historical fault data matrix, and n is the total number of attributes;
Step S43: calculating a weighted normalized decision matrix, focusing on the influence of key attributes on a solution, wherein the following formula is used:
Xij=wj×zij;
Where X ij is an element in the matrix and w j is a weight in the weighted normalized decision matrix;
step S44: the distances from each scheme to the positive ideal solution and the negative ideal solution are calculated, and the advantages and disadvantages of each fault search detection scheme are evaluated, wherein the following formula is used:
in the method, in the process of the invention, Is a negative ideal solution, is a data point with all attributes changed to 0 after weighted normalization,The method is positive ideal solution, namely data points with all attributes becoming maximum weight values after weighted normalization, m is the total number of the data points, d + is the distance from the fault search detection scheme to the positive ideal solution, and d - is the distance from the fault search detection scheme to the negative ideal solution;
step S45: selecting an optimal fault search detection scheme, and calculating the relative proximity of the fault search detection scheme and the ideal solution, wherein the formula is as follows:
Wherein, C + is the relative proximity of the fault searching detection scheme and the ideal solution, and the fault position detected by the fault searching detection scheme with the maximum relative proximity is the final fault reason.
Through executing the operation, the definition attribute set is adopted, the attribute data is standardized, the weighted normalization decision matrix is calculated, the relative proximity of the fault search detection scheme and the ideal solution is calculated, and the optimal fault search detection scheme is selected, so that the technical problems that the accuracy and efficiency of fault processing are reduced and the production efficiency and stability are affected due to inaccurate fault detection are solved.
In step S5, the fault alarm and processing, specifically, performing fault searching and positioning by using an optimal fault searching and detecting scheme, is performed, and once the position of the fault of the PLC cabinet is determined, the system automatically sends an alarm to notify the operator and provide corresponding fault processing advice, according to the embodiment described above with reference to fig. 1.
An embodiment seven, referring to fig. 2, based on the above embodiment, the rapid fault detection system for a PLC electric cabinet provided by the present invention includes a historical fault data acquisition module, a data dimension reduction processing module, a fault search positioning model building module, a fault search detection scheme evaluation module and a fault alarm and processing module;
the historical fault data acquisition module is used for acquiring various historical data information generated when the PLC electric cabinet system runs and fails;
the data dimension reduction processing module is used for projecting the historical fault data onto a sub-main space, calculating a state vector of a sample data set and a dimension reduction objective function, calculating a covariance matrix, and carrying out Lagrange multiplication to realize dimension reduction processing;
The fault searching and positioning model building module is used for defining a fitness value, performing fault searching from an initial position, calculating a dynamic step length based on local searching, adjusting a searching angle, updating a fault searching range, and performing iterative searching to generate a fault searching and detecting scheme set;
the fault search detection scheme evaluation module is used for defining an attribute set, standardizing attribute data, calculating a weighted normalization decision matrix, calculating the relative proximity of a fault search detection scheme and an ideal solution, and selecting an optimal fault search detection scheme;
The fault alarming and processing module is particularly used for carrying out fault searching and positioning by adopting an optimal fault searching and detecting scheme, and once the fault position of the PLC electric cabinet is determined, the system automatically sends out an alarm to inform an operator and provides corresponding fault processing suggestions.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
The invention and its embodiments have been described above with no limitation, and the actual construction is not limited to the embodiments of the invention as shown in the drawings. In summary, if one of ordinary skill in the art is informed by this disclosure, a structural manner and an embodiment similar to the technical solution should not be creatively devised without departing from the gist of the present invention.
Claims (5)
1. A rapid fault detection method for a PLC electric cabinet is characterized in that: the method comprises the following steps:
Step S1: historical fault data acquisition;
Step S2: the data dimension reduction processing is specifically to project the historical fault data onto a sub-main space, calculate a state vector of a sample data set and a dimension reduction objective function, calculate a covariance matrix and perform Lagrange multiplication;
step S3: constructing a fault searching and positioning model, specifically performing fault searching from an initial position, calculating a dynamic step length based on local searching, adjusting a searching angle, and updating a fault searching range;
Step S4: the fault search detection scheme evaluation is specifically to normalize attribute data, calculate a weighted normalized decision matrix, calculate the relative proximity of the fault search detection scheme to the ideal solution, and select an optimal fault search detection scheme;
step S5: alarming and processing faults;
In step S2, the data dimension reduction processing includes the following steps:
step S21: calculating a state vector of the sample data set, projecting the historical fault data onto a sub-main space to obtain the state vector of the sample data set, wherein the formula is as follows:
;
in the method, in the process of the invention, Is a sample dataset state vector representing projection of historical fault data, k is an index of a sample dataset, c is an index of a feature, B is a feature total number, a kc is a weight coefficient of a c-th feature of the kth sample dataset, and u c is a projection value of the c-th feature on a sub-main space;
step S22: calculating an objective function of dimension reduction, and measuring the degree of difference between a sample data set after dimension reduction and historical fault data, wherein the formula is as follows:
;
where J represents the objective function of dimension reduction, M is the total number of sample data sets, Is a dimension-reduced target vector, represents the projection of the dimension-reduced sample data,The square of the Euclidean distance representing the sample dataset state vector and the reduced dimension target vector;
Step S23: calculating a covariance matrix, and analyzing the relation between each feature in the sample data set by calculating the covariance matrix between the state vector of the sample data set and the mean vector of the sample data set by using the following formula:
;
where S is a covariance matrix, which is a matrix that measures the relationship between two random variables, Representing a mean vector of the sample dataset, T representing a transpose of the vector;
Step S24: lagrangian multiplication is performed, and the calculation of the feature vector is optimized, wherein the following formula is adopted:
;
Where F (u c) is a Lagrangian function and λ is the Lagrangian multiplier;
step S25: performing dimension reduction processing, namely obtaining eigenvalues and eigenvectors of a covariance matrix through a singular value decomposition state sequence, and performing dimension reduction processing;
In step S3, the constructing a fault searching and locating model includes the following steps:
step S31: initializing, namely setting a plurality of initial positions as possible fault occurrence points, namely possible fault reasons;
Step S32: a fitness value is defined that represents the percentage likelihood of each possible failure occurrence point using the following formula:
;
wherein A is an fitness value, namely the matching degree of fault occurrence points, omega is the Euclidean distance between each possible fault occurrence point and a fault position, and the smaller the distance is, the higher the matching degree is, and the larger the fitness value is;
step S33: performing fault searching, namely traversing a fault searching range from an initial position, wherein the fault searching range comprises the following steps of:
Step S331: calculating a dynamic step length based on local search, wherein the formula is as follows:
;
Where L is the dynamic step of the local search, V is the point closest to the fault location at the present time, Is an exponential function of the local search, t is an exponential parameter of the local search, p is a fault search dimension of the local search, τ is a random value in the (0, 1) range for generating small random perturbations;
Step S332: the search angle is adjusted and the next turn will turn to a new angle with the following formula:
;
in the method, in the process of the invention, Is a new search angle for the search result,Is the current fault search angle, r 1 is the radius of each turn, α max is the maximum angle of each turn;
Step S333: moving to the next position, the formula is as follows:
;
in the method, in the process of the invention, Is the next moving position, Y is the initial position, r 2 is the local optimum, L is the dynamic step of the local search, D is the distance metric function in the fault search,Is a new search angle;
Step S334: updating the fault searching range, recalculating the fitness value according to the next moving position, reducing the searching range to the vicinity of the position with high fitness value, obtaining a more accurate fault position, and updating the fault possibility label;
Step S34: designing iterative search, presetting an adaptability threshold, and when the adaptability value is higher than the adaptability threshold, establishing a fault search positioning model; if the maximum iteration times are reached, resetting the initial position to perform fault searching; otherwise, continuing to iterate the search;
step S35: and generating a fault searching detection scheme set, and obtaining different fault searching detection schemes, namely the fault searching detection scheme set, in the fault searching positioning model iteration process.
2. The rapid fault detection method for a PLC electrical cabinet according to claim 1, wherein: in step S4, the fault search detection scheme evaluation includes the steps of:
Step S41: defining an attribute set, defining an attribute set corresponding to the fault search detection scheme set, and evaluating each scheme in the fault search detection scheme according to the attribute set;
step S42: data normalization, namely normalizing the data corresponding to each attribute to obtain a normalized matrix, wherein the formula is as follows:
;
Where z ij is the value of the jth data point of the ith attribute in the normalized matrix, y ij is the value of the jth data point of the ith attribute in the historical fault data matrix, and n is the total number of attributes;
Step S43: calculating a weighted normalized decision matrix, focusing on the influence of key attributes on a solution, wherein the following formula is used:
;
Where X ij is an element in the matrix and w j is a weight in the weighted normalized decision matrix;
step S44: the distances from each scheme to the positive ideal solution and the negative ideal solution are calculated, and the advantages and disadvantages of each fault search detection scheme are evaluated, wherein the following formula is used:
;
;
in the method, in the process of the invention, Is a negative ideal solution, is a data point with all attributes changed to 0 after weighted normalization,The method is positive ideal solution, namely data points with all attributes becoming maximum weight values after weighted normalization, m is the total number of the data points, d + is the distance from the fault search detection scheme to the positive ideal solution, and d - is the distance from the fault search detection scheme to the negative ideal solution;
step S45: selecting an optimal fault search detection scheme, and calculating the relative proximity of the fault search detection scheme and the ideal solution, wherein the formula is as follows:
;
Wherein, C + is the relative proximity of the fault searching detection scheme and the ideal solution, and the fault position detected by the fault searching detection scheme with the maximum relative proximity is the final fault reason.
3. The rapid fault detection method for a PLC electrical cabinet according to claim 1, wherein: in step S1, the historical fault data is collected, specifically, various historical data information generated when the PLC electric cabinet system is in operation fault is collected, including an input/output state, a communication state, sensor data, a controller state, electric cabinet operation time and a mode switching record, and a fault reason and a fault possibility are used as data labels.
4. The rapid fault detection method for a PLC electrical cabinet according to claim 1, wherein: in step S5, the fault alarm and processing, specifically, performing fault searching and positioning by adopting an optimal fault searching and detecting scheme, once the fault position of the PLC electric cabinet is determined, the system automatically sends out an alarm to notify an operator, and provides corresponding fault processing advice.
5. A rapid fault detection system for a PLC electrical cabinet for implementing a rapid fault detection method for a PLC electrical cabinet according to any one of claims 1 to 4, characterized in that: the system comprises a historical fault data acquisition module, a data dimension reduction processing module, a fault searching and positioning module, a fault searching and detecting scheme evaluation module and a fault alarming and processing module;
the historical fault data acquisition module is used for acquiring various historical data information generated when the PLC electric cabinet system runs and fails;
the data dimension reduction processing module is used for projecting the historical fault data onto a sub-main space, calculating a state vector of a sample data set and a dimension reduction objective function, calculating a covariance matrix, and carrying out Lagrange multiplication to realize dimension reduction processing;
The fault searching and positioning model building module is used for defining a fitness value, performing fault searching from an initial position, calculating a dynamic step length based on local searching, adjusting a searching angle, updating a fault searching range, and performing iterative searching to generate a fault searching and detecting scheme set;
the fault search detection scheme evaluation module is used for defining an attribute set, standardizing attribute data, calculating a weighted normalization decision matrix, calculating the relative proximity of a fault search detection scheme and an ideal solution, and selecting an optimal fault search detection scheme;
The fault alarming and processing module is particularly used for carrying out fault searching and positioning by adopting an optimal fault searching and detecting scheme, and once the fault position of the PLC electric cabinet is determined, the system automatically sends out an alarm to inform an operator and provides corresponding fault processing suggestions.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311783315.3A CN117871994B (en) | 2023-12-22 | 2023-12-22 | Rapid fault detection method and system for PLC (programmable logic controller) electric cabinet |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311783315.3A CN117871994B (en) | 2023-12-22 | 2023-12-22 | Rapid fault detection method and system for PLC (programmable logic controller) electric cabinet |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117871994A CN117871994A (en) | 2024-04-12 |
CN117871994B true CN117871994B (en) | 2024-07-23 |
Family
ID=90576547
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311783315.3A Active CN117871994B (en) | 2023-12-22 | 2023-12-22 | Rapid fault detection method and system for PLC (programmable logic controller) electric cabinet |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117871994B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103927448A (en) * | 2014-04-18 | 2014-07-16 | 南京理工大学 | Determining method of criticality of fault mode of rail transit vehicle component |
CN104462846A (en) * | 2014-12-22 | 2015-03-25 | 山东鲁能软件技术有限公司 | Intelligent device failure diagnosis method based on support vector machine |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8301406B2 (en) * | 2008-07-24 | 2012-10-30 | University Of Cincinnati | Methods for prognosing mechanical systems |
CN105785232A (en) * | 2016-05-18 | 2016-07-20 | 成都理工大学 | Method for synthetically selecting lines of single-phase ground fault of small current ground system |
CN107590506B (en) * | 2017-08-17 | 2018-06-15 | 北京航空航天大学 | A kind of complex device method for diagnosing faults of feature based processing |
WO2023097026A2 (en) * | 2021-11-23 | 2023-06-01 | Strong Force TX Portfolio 2018, LLC | Transaction platforms where systems include sets of other systems |
CN115861823B (en) * | 2023-02-21 | 2023-05-09 | 航天宏图信息技术股份有限公司 | Remote sensing change detection method and device based on self-supervision deep learning |
CN117236809B (en) * | 2023-11-13 | 2024-02-27 | 宁德市天铭新能源汽车配件有限公司 | Automobile part production management method and system based on artificial intelligence |
-
2023
- 2023-12-22 CN CN202311783315.3A patent/CN117871994B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103927448A (en) * | 2014-04-18 | 2014-07-16 | 南京理工大学 | Determining method of criticality of fault mode of rail transit vehicle component |
CN104462846A (en) * | 2014-12-22 | 2015-03-25 | 山东鲁能软件技术有限公司 | Intelligent device failure diagnosis method based on support vector machine |
Also Published As
Publication number | Publication date |
---|---|
CN117871994A (en) | 2024-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11921169B2 (en) | Transformer fault diagnosis method and system using induced ordered weighted evidence reasoning | |
US7567878B2 (en) | Evaluating anomaly for one class classifiers in machine condition monitoring | |
CN110334726A (en) | A kind of identification of the electric load abnormal data based on Density Clustering and LSTM and restorative procedure | |
CN111538960B (en) | Alternating current asynchronous motor fault diagnosis method based on improved fuzzy C-means clustering | |
CN117332347A (en) | Intelligent operation and maintenance method and system for power grid by integrating machine patrol and AI | |
CN117390536A (en) | Operation and maintenance management method and system based on artificial intelligence | |
CN116520068B (en) | Diagnostic method, device, equipment and storage medium for electric power data | |
CN111723925A (en) | Method, device, equipment and medium for fault diagnosis of on-road intelligent train air conditioning unit | |
CN112651519A (en) | Secondary equipment fault positioning method and system based on deep learning theory | |
CN113850320A (en) | Transformer fault detection method based on improved support vector machine regression algorithm | |
CN115545280A (en) | Low-voltage distribution network topology generation method and device | |
CN116108371A (en) | Cloud service abnormity diagnosis method and system based on cascade abnormity generation network | |
CN108574290B (en) | Method, device, terminal and readable storage medium for positioning oscillation source of forced oscillation | |
CN117871994B (en) | Rapid fault detection method and system for PLC (programmable logic controller) electric cabinet | |
CN113986700A (en) | Data acquisition frequency optimization method, system, device and storage medium | |
CN116049638A (en) | Transformer vibration detection method, system, equipment and storage medium | |
CN114137915B (en) | Fault diagnosis method for industrial equipment | |
CN115408927A (en) | Data processing method and device for predicting rock mass parameters | |
CN112566055B (en) | Indoor positioning algorithm based on radio frequency fingerprint matching | |
CN118336878B (en) | Energy storage BMS passive equalization processing method, device, equipment and storage medium | |
CN118281388B (en) | Intelligent rapid discharge control method and related device for waste batteries | |
CN118485384A (en) | Inventory feedback device and inventory feedback method based on same | |
CN116916348A (en) | Base station sector intelligent selection method, device, equipment and storage medium | |
CN118301547A (en) | WiFi indoor positioning method for assembly workshop clustering layering | |
CN117113234A (en) | Power transmission line fault detection method and system based on machine learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |