Apriori controller fault diagnosis method adaptive to battery energy storage frequency modulation
By using the Apriori controller fault diagnosis method, a full matrix Q is generated and matrix pruning is performed to diagnose faults in the battery energy storage frequency regulation control system, solving the stability and safety issues of the control system and improving the efficiency of fault diagnosis.
Patent Information
- Application Number
- CN202410759519.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-10-15
AI Technical Summary
During the process of battery energy storage-assisted frequency regulation, the controller's frequent and significant participation in peak shaving and frequency regulation affects the stability and safety of the control system. Existing technologies are unable to effectively diagnose and eliminate potential faults in the control system.
A fault diagnosis method for the Apriori controller adapted to battery energy storage frequency regulation is adopted. By generating the full matrix Q, frequent 1-itemsets, frequent 2-itemsets, etc., matrix pruning is performed using causal matrix and transaction matrix to eliminate non-causal terms, reduce computational complexity, and diagnose control system faults.
It improves the efficiency of fault diagnosis in the control system, reduces the amount of computation and complexity, and enhances the safety and stability of unit operation.
Smart Images

Figure CN118778593A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power system control methods, and in particular relates to an Apriori controller fault diagnosis method adapted to battery energy storage frequency modulation. Background Art
[0002] In recent years, with the rapid increase in the proportion of renewable energy power generation, and due to the intermittent, volatile, and random characteristics of renewable energy power generation, thermal power units often participate in peak and frequency regulation. Therefore, in order to improve the peak and frequency regulation capabilities of thermal power units, battery energy storage assisted frequency regulation technology has emerged. However, when the unit is operating under complex working conditions, the controller needs to frequently and significantly participate in frequent peak and frequency regulation. In the long run, it will bring safety hazards to the control system and seriously affect the stability and safety of the control system. Based on this, an improved Apriori controller fault diagnosis method adapted to battery energy storage frequency regulation is proposed to timely diagnose control system faults, eliminate safety hazards of the control system, and improve the safety and stability of unit operation. Summary of the invention
[0003] The purpose of the present invention is to provide an Apriori controller fault diagnosis method adapted to battery energy storage frequency modulation, which can timely diagnose control system faults and improve the safety and stability of unit operation.
[0004] The technical scheme adopted by the present invention is an Apriori controller fault diagnosis method adapted to battery energy storage frequency modulation, taking a coal-fired unit control system as an object, collecting n samples from a control system database, and counting different events contained in each sample, and all different events contained in the n samples to form an original database of the control system; generating a full matrix Q based on the information of the original database of the scanned control system, and then calculating frequent 1-item sets, frequent 2-item sets and frequent 3-item sets according to the causal relationship between events in the samples ... until a frequent k-item set, and judging whether the number of item sets in the frequent k-item set set is less than k+2, if it is less than k+2, the calculation iteration ends, otherwise the iteration continues; iterative calculation of all item sets in the final frequent K+1-item set is a non-fault set; other non-frequent item sets generated during the calculation process are all fault sets, and the specific operation steps are as follows:
[0005] Step 1: Set the sampling period, and slide to search the control system database within a certain period of time. A total of n samples are sampled within this period of time. The sample set consisting of n samples within this period of time is represented by T, where the i-th sample is represented by T i It means that T={T|T1,T2,…,T i ,…,T n}, 1≤i≤n; the different event sets of all sampling periods n samples are counted and represented by R. The set R contains a total of k different events, which are represented by the event set: R={R|R1,R2,…,R k};
[0006] Further statistics of each sample T i Contains different events, let T i The set of different events contained in samples is J i , J i is a subset of R, namely J i ∈R;
[0007] At this time, the sample set is T, the event set is R, and the subset of R is J i It constitutes the original database of the control system;
[0008] Step 2: Scan the original database of the control system to generate the full matrix Q. The elements on the main diagonal of the full matrix are the number of occurrences of 1-item set events in the full matrix Q, and the remaining position elements are the number of occurrences of 2-item set element events with causal relationships in the full matrix Q. If one event can lead to the occurrence of another event, it is called a causal relationship between the two, which is recorded as 1; otherwise, it is a non-causal relationship, which is recorded as 0.
[0009] Step 3: Set the minimum support threshold min-sup1 of the frequent 1-item set, query the main diagonal elements of the full matrix Q, find the events whose occurrence times are greater than or equal to the minimum support threshold min-sup1, and obtain the frequent 1-item set M1; the minimum support refers to the minimum number of occurrences of the 1-item set event in the full matrix Q;
[0010] Step 4: Construct the causal matrix Θ according to the definition of causal operation, pre-prune the full matrix Q based on the causal matrix Θ, and remove non-causal terms. The pre-pruned matrix Q′ is: Q′=Q·Θ T
[0011] Step 5: Set the lift threshold, coupling measure threshold, and minimum support min-sup2 of the frequent 2-itemset; calculate the lift, coupling measure, and minimum support min-sup2 of all causal 2-itemset events, and further prune the matrix Q′ according to whether they meet the lift threshold, coupling measure threshold, and minimum support min-sup2 set for the frequent 2-itemset, and obtain the frequent 2-itemset M2;
[0012] Step 6: Construct the frequent 1-itemset transaction matrix P1 based on the calculated frequent 1-itemset M1. The row vector of the frequent 1-itemset transaction matrix P1 represents the sample to which the frequent 1-itemset belongs, and the column vector represents whether the frequent 1-itemset belongs to the sample. When a frequent 1-item belongs to the sample, the position value is 1, otherwise it is 0.
[0013] Step 7: Construct the frequent 2-itemset transaction matrix P2 based on the calculated frequent 2-itemset M2. The row vector of the frequent 2-itemset transaction matrix P2 represents the sample to which the frequent 2-itemset belongs, and the column vector represents whether the frequent 2-itemset belongs to the sample. When a frequent 2-item belongs to the sample, the corresponding position takes the value of 1, otherwise it takes the value of 0.
[0014] Step 8: Perform AND operations on the frequent 2-itemset transaction matrix P2 and the frequent 1-itemset transaction matrix P1 in column vector order, and the elements whose operation result is 1 constitute the candidate 3-itemset; calculate the lift, coupling measure, and minimum support min-sup3 of the candidate 3-itemset event according to the method in step 5, and further prune the matrix according to its threshold requirements to obtain the frequent 3-itemset M3;
[0015] Step 9: Continue to calculate the frequent k-itemsets according to the method in step 9, and determine whether the number of itemsets in the frequent k-itemsets is less than k+2. If it is less than k+2, the calculation iteration ends, otherwise return to step 3 and continue the iteration;
[0016] Step 10: Iterate and calculate all the item sets in the final frequent K+1-item set as non-fault sets; other non-frequent item sets generated during the calculation process are all fault sets.
[0017] The present invention is also characterized in that:
[0018] The calculation method of uplift (A, B) is:
[0019]
[0020] In the formula, A represents an event in set R, and B represents another event in set R.
[0021] The specific calculation formula of coupling metric couple(A,B) is as follows:
[0022]
[0023] In step 10, the frequent item set database is queried, and the item sets in the final frequent (K+1)-item set set are diagnosed as non-fault sets, that is, non-fault states; other non-frequent item sets generated during the operation are classified as fault sets, that is, fault states.
[0024] The beneficial effects of the present invention are as follows: the Apriori controller fault diagnosis method adapted to battery energy storage frequency modulation proposed by the present invention adopts a cause-effect matrix to determine the correlation between different events in the control system database; the full matrix, cause-effect matrix, and transaction matrix proposed by the fault diagnosis method can record all events of the control system while reducing the amount of algorithm operations; the matrix is pruned by lifting degree and coupling measurement to eliminate interference events and reduce the complexity of algorithm operations. In summary, the present invention can reduce the amount of operations and complexity in the fault diagnosis process, and improve the efficiency of fault diagnosis to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flow chart of the Apriori controller fault diagnosis method adapted to battery energy storage frequency modulation of the present invention. DETAILED DESCRIPTION
[0026] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0027] Example 1
[0028] The present invention is suitable for the Apriori controller fault diagnosis method of battery energy storage frequency modulation, such as Figure 1 As shown in the figure, taking the control system of the coal-fired unit as the object, n samples are collected from the control system database, and the different events contained in each sample and all the different events contained in the n samples are counted to form the original database of the control system; the full matrix Q is generated according to the information of the original database of the scanned control system, and then the frequent 1-item sets, frequent 2-item sets and frequent 3-item sets are calculated according to the causal relationship between the events in the samples... until the frequent k-item sets, and it is determined whether the number of item sets in the frequent k-item set set is less than k+2. If it is less than k+2, the calculation iteration ends, otherwise it continues to iterate; all item sets in the frequent K+1-item set finally obtained by iterative calculation are non-fault sets; other non-frequent item sets generated during the calculation process are all fault sets.
[0029] Example 2
[0030] The present invention is suitable for the Apriori controller fault diagnosis method of battery energy storage frequency modulation, and the specific operation steps are as follows:
[0031] Step 1: Set the sampling period, and slide to search the control system database within a certain period of time. A total of n samples are sampled within this period of time. The sample set consisting of n samples within this period of time is represented by T, where the i-th sample is represented by T i It means that T={T|T1,T2,…,T i ,…,T n}, 1≤i≤n; the different event sets of all sampling periods n samples are counted and represented by R. The set R contains a total of k different events, which are represented by the event set: R={R|R1,R2,…,R k};
[0032] Further statistics of each sample T i Contains different events, let T i The set of different events contained in samples is J i , J i is a subset of R, namely J i ∈R;
[0033] At this time, the sample set is T, the event set is R, and the subset of R is J i It constitutes the original database of the control system;
[0034] Step 2: Scan the original database of the control system to generate the full matrix Q. The elements on the main diagonal of the full matrix are the number of occurrences of 1-item set events in the full matrix Q, and the remaining position elements are the number of occurrences of 2-item set element events with causal relationships in the full matrix Q. If one event can lead to the occurrence of another event, it is called a causal relationship between the two, which is recorded as 1; otherwise, it is a non-causal relationship, which is recorded as 0.
[0035] Step 3: Set the minimum support threshold min-sup1 of the frequent 1-item set, query the main diagonal elements of the full matrix Q, find the events whose occurrence times are greater than or equal to the minimum support threshold min-sup1, and obtain the frequent 1-item set M1; the minimum support refers to the minimum number of occurrences of the 1-item set event in the full matrix Q;
[0036] Step 4: Construct the causal matrix Θ according to the definition of causal operation, pre-prune the full matrix Q based on the causal matrix Θ, and remove non-causal terms. The pre-pruned matrix Q′ is: Q′=Q·Θ T
[0037] Step 5: Set the lift threshold, coupling measure threshold, and minimum support min-sup2 of the frequent 2-itemset; calculate the lift, coupling measure, and minimum support min-sup2 of all causal 2-itemset events, and further prune the matrix Q′ according to whether they meet the lift threshold, coupling measure threshold, and minimum support min-sup2 set for the frequent 2-itemset, and obtain the frequent 2-itemset M2;
[0038] The calculation method of uplift (A, B) is:
[0039]
[0040] In the formula, A represents an event in set R, and B represents another event in set R;
[0041] The specific calculation formula of coupling metric couple(A,B) is as follows:
[0042]
[0043] Step 6: Construct the frequent 1-itemset transaction matrix P1 based on the calculated frequent 1-itemset M1. The row vector of the frequent 1-itemset transaction matrix P1 represents the sample to which the frequent 1-itemset belongs, and the column vector represents whether the frequent 1-itemset belongs to the sample. When a frequent 1-item belongs to the sample, the position value is 1, otherwise it is 0.
[0044] Step 7: Construct the frequent 2-itemset transaction matrix P2 based on the calculated frequent 2-itemset M2. The row vector of the frequent 2-itemset transaction matrix P2 represents the sample to which the frequent 2-itemset belongs, and the column vector represents whether the frequent 2-itemset belongs to the sample. When a frequent 2-item belongs to the sample, the position value is 1, otherwise it is 0.
[0045] Step 8: Perform AND operations on the frequent 2-itemset transaction matrix P2 and the frequent 1-itemset transaction matrix P1 in column vector order, and the elements whose operation result is 1 constitute the candidate 3-itemset; calculate the lift, coupling measure, and minimum support min-sup3 of the candidate 3-itemset event according to the method in step 5, and further prune the matrix according to its threshold requirements to obtain the frequent 3-itemset M3;
[0046] Step 9: Continue to calculate the frequent k-itemsets according to the method in step 9, and determine whether the number of itemsets in the frequent k-itemsets is less than k+2. If it is less than k+2, the calculation iteration ends, otherwise return to step 3 and continue the iteration;
[0047] Step 10: Iteratively calculate all item sets in the final frequent K+1-item set as non-fault sets; other non-frequent item sets generated during the calculation process are all fault sets; query the obtained frequent item set database, and diagnose the item sets in the final frequent (K+1)-item set set as non-fault sets, that is, non-fault state; other non-frequent item sets generated during the calculation process are divided into fault sets, that is, fault state.
[0048] Example 3
[0049] Step 1: Set the sampling period, and slide to search the control system database within a certain period of time. A total of 10 samples are sampled within this period of time. The sample set consisting of the 10 samples within this period of time is represented by T, where the i-th sample is represented by T i It means that T={T|T1,T2,…,T i,…,T n}, 1≤i≤10; the different event sets of all sampling periods n samples are counted and represented by R, and the set R contains a total of 5 different events, which are represented by the event set: R={R|R1,R2,…,R5};
[0050] Further statistics of each sample T i Contains different events, let T i The set of different events contained in samples is J i , J i is a subset of R, namely J i ∈R; at this time, the sample set is T, the event set is R, and the subset of R is J i The original database of the control system is formed; the original database is shown in Table 1:
[0051] Table 1 Original database
[0052]
[0053] Step 2: Scan the original database of the control system to generate the full matrix Q. The elements on the main diagonal of the full matrix are the number of occurrences of 1-item set events in the full matrix Q, and the remaining position elements are the number of occurrences of 2-item set element events with causal relationships in the full matrix Q. If one event can lead to the occurrence of another event, it is called a causal relationship between the two, which is recorded as 1; otherwise, it is a non-causal relationship, which is recorded as 0. The full matrix Q is shown below:
[0054]
[0055] Step 3: Set the minimum support threshold min-sup1 of the frequent 1-item set, query the main diagonal elements of the full matrix Q, find the events whose occurrence times are greater than or equal to the minimum support threshold min-sup1, and obtain the frequent 1-item set M1; the minimum support refers to the minimum number of occurrences of the 1-item set event in the full matrix Q;
[0056] Based on this, setting the minimum support threshold min-sup1 to 30%, we get the frequent 1-item set M1 = {I1 I2 I3 I4I5}
[0057] Step 4: Construct the causal matrix Θ according to the definition of causal operation, pre-prune the full matrix Q based on the causal matrix Θ, and remove non-causal terms. The pre-pruned matrix Q′ is: Q′=Q·Θ T
[0058] If I1 can lead to I2, there is a causal relationship between the two, which is recorded as 1; otherwise, it is a non-causal relationship, which is recorded as 0. Based on this, the causal matrix Θ is constructed. Based on the causal matrix Θ, the full matrix Q is pre-pruned to remove non-causal terms and simplify the amount of calculation. The pre-pruned matrix Q′ is:
[0059] Q′=Q·Θ T
[0060] Step 5: Set the lift threshold, coupling metric threshold, and minimum support min-sup2 of the frequent 2-itemset; calculate the lift, coupling metric, and minimum support min-sup2 of all causal 2-itemset events according to formula (1) and formula (2) in Example 2, and further prune the matrix Q′ according to whether it meets the lift threshold, coupling metric threshold, and minimum support min-sup2 set for the frequent 2-itemset, and obtain the frequent 2-itemset M2 = {I1I3 I3I4 I3I5 I4I5};
[0061] Step 6: Construct the frequent 1-itemset transaction matrix P1 based on the calculated frequent 1-itemset M1. The row vector of the frequent 1-itemset transaction matrix P1 represents the sample to which the frequent 1-itemset belongs, and the column vector represents whether the frequent 1-itemset belongs to the sample. When a frequent 1-item belongs to the sample, the corresponding position takes the value of 1, otherwise it takes the value of 0.
[0062]
[0063] Step 7: Construct the frequent 2-itemset transaction matrix P2 based on the calculated frequent 2-itemset M2. The row vector of the frequent 2-itemset transaction matrix P2 represents the sample to which the frequent 2-itemset belongs, and the column vector represents whether the frequent 2-itemset belongs to the sample. When a frequent 2-item belongs to the sample, the position value is 1, otherwise it is 0.
[0064] Based on this, a frequent 2-itemset transaction statistics table is established, as shown in the following table:
[0065] Table 3 Frequent 2-itemset transaction statistics
[0066]
[0067]
[0068] According to the frequent 2-itemset transaction statistics table, the frequent 2-itemset transaction matrix P2 is obtained:
[0069]
[0070] Step 8: Perform AND operations on the frequent 2-itemset transaction matrix P2 and the frequent 1-itemset transaction matrix P1 in column vector order, and the elements whose operation result is 1 constitute the candidate 3-itemset; calculate the lift, coupling measure, and minimum support min-sup3 of the candidate 3-itemset event according to the method in step 5, and further prune the matrix according to its threshold requirements to obtain the frequent 3-itemset M3;
[0071] Step 9: Continue to calculate the frequent k-item sets according to the method of steps 5-8 above, and determine whether the number of itemsets in the frequent k-item set is less than k+2. If it is less than k+2, the calculation iteration ends, otherwise return to step 3 and continue the iteration;
[0072] Step 10: Iteratively calculate all item sets in the final frequent K+1-item set as non-fault sets; other non-frequent item sets generated during the calculation process are all fault sets; query the obtained frequent item set database, and diagnose the item sets in the final frequent (K+1)-item set set as non-fault sets, that is, non-fault state; other non-frequent item sets generated during the calculation process are divided into fault sets, that is, fault state.
Claims
1. Apriori controller fault diagnosis method adapted to battery energy storage frequency modulation, characterized in that: Taking the coal-fired unit control system as the object, n samples are collected from the control system database, and the different events contained in each sample and all the different events contained in the n samples are counted to form the original database of the control system; the full matrix Q is generated according to the scanning control system original database information, and then the frequent 1-item sets, frequent 2-item sets and frequent 3-item sets are calculated according to the causal relationship between the events in the samples... until the frequent k-item sets, and it is judged whether the number of item sets in the frequent k-item set set is less than k+2. If it is less than k+2, the calculation iteration ends, otherwise it continues to iterate; all item sets in the frequent K+1-item set finally obtained by iterative calculation are non-fault sets; other non-frequent item sets generated during the calculation process are all fault sets.
2. The Apriori controller fault diagnosis method adapted to battery energy storage frequency modulation according to claim 1 is characterized in that: The specific steps are as follows: Step 1: Set the sampling period, and slide to search the control system database within a certain period of time. A total of n samples are sampled within this period of time. The sample set consisting of n samples within this period of time is represented by T, where the i-th sample is represented by T i It means that T={TT1,T2,…,T i ,…,T n }, 1≤i≤n; the different event sets of all sampling periods n samples are counted and represented by R. The set R contains a total of k different events, which are represented by the event set: R={RR1,R2,…,R k }; Further statistics of each sample T i Contains different events, let T i The set of different events contained in samples is J i , J i is a subset of R, namely J i ∈R; At this time, the sample set is T, the event set is R, and the subset of R is J i It constitutes the original database of the control system; Step 2: Scan the original database of the control system to generate the full matrix Q. The elements on the main diagonal of the full matrix are the number of occurrences of 1-item set events in the full matrix Q, and the remaining position elements are the number of occurrences of 2-item set element events with causal relationships in the full matrix Q. If one event can lead to the occurrence of another event, there is a causal relationship between the two, which is recorded as 1; otherwise, there is a non-causal relationship, which is recorded as 0; Step 3: Set the minimum support threshold min-sup1 of the frequent 1-item set, query the main diagonal elements of the full matrix Q, find the events whose occurrence times are greater than or equal to the minimum support threshold min-sup1, and obtain the frequent 1-item set M1; the minimum support refers to the minimum number of occurrences of the 1-item set event in the full matrix Q; Step 4: Construct the causal matrix Θ according to the definition of causal operation, pre-prune the full matrix Q based on the causal matrix Θ, and remove non-causal terms. The pre-pruned matrix Q′ is: Q′=Q·Θ T ; Step 5: Set the lift threshold, coupling measure threshold, and minimum support min-sup2 of the frequent 2-itemset; calculate the lift, coupling measure, and minimum support min-sup2 of all causal 2-itemset events, and further prune the matrix Q′ according to whether it meets the lift threshold, coupling measure threshold, and minimum support min-sup2 set for the frequent 2-itemset, and obtain the frequent 2-itemset M2; Step 6: Construct a frequent 1-itemset transaction matrix P1 based on the calculated frequent 1-itemset M1. The row vector of the frequent 1-itemset transaction matrix P1 represents the sample to which the frequent 1-itemset belongs, and the column vector represents whether the frequent 1-itemset belongs to the sample. When a frequent 1-item belongs to the sample, the corresponding position takes the value 1, otherwise it takes the value 0; Step 7: Construct a frequent 2-itemset transaction matrix P2 based on the calculated frequent 2-itemset M2. The row vector of the frequent 2-itemset transaction matrix P2 represents the sample to which the frequent 2-itemset belongs, and the column vector represents whether the frequent 2-itemset belongs to the sample. When a frequent 2-item belongs to the sample, the value of the position is 1, otherwise it is 0; Step 8: Perform AND operations on the frequent 2-itemset transaction matrix P2 and the frequent 1-itemset transaction matrix P1 in column vector order, and the elements whose operation result is 1 constitute the candidate 3-itemset; calculate the lift, coupling measure, and minimum support min-sup3 of the candidate 3-itemset event according to the method in step 5, and further prune the matrix according to its threshold requirements to obtain the frequent 3-itemset M3; Step 9: Continue to calculate the frequent k-item sets according to the above method, and determine whether the number of itemsets in the frequent k-item set is less than k+2. If it is less than k+2, the calculation iteration ends, otherwise return to step 3 and continue the iteration; Step 10: Iterate and calculate all the item sets in the final frequent K+1-item set as non-fault sets; other non-frequent item sets generated during the calculation process are all fault sets.
3. The Apriori controller fault diagnosis method adapted to battery energy storage frequency modulation according to claim 2 is characterized in that: The calculation method of the uplift (A, B) is: In the formula, A represents an event in set R, and B represents another event in set R.
4. The Apriori controller fault diagnosis method adapted to battery energy storage frequency modulation according to claim 3 is characterized in that: The specific calculation formula of the coupling metric couple(A,B) is as follows:
5. The Apriori controller fault diagnosis method adapted to battery energy storage frequency modulation according to claim 4 is characterized in that: In step 10, the frequent itemset database is queried, and the itemsets in the frequent (K+1)-itemset set finally obtained are diagnosed as non-fault sets, that is, non-fault states; Other infrequent item sets generated during the operation are classified as fault sets, i.e., fault states.
