A harmonic current detection method based on brain emotion learning of PID optimization
Through the brain emotion learning method based on PID optimization, a self-organizing fuzzy brain emotion learning neural network model is constructed to detect harmonic currents in the power grid, which solves the problem of large errors in the existing technology and realizes the detection of harmonic currents in the power grid. Accuracy and real-time ensure the stability of power grid operation.
Patent Information
- Application Number
- CN202210393710.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-15
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-04-15
AI Technical Summary
The existing Fourier transform detection method has the problems of large error and poor real-time performance in harmonic current detection in the power grid, which affects line loss, sensing accuracy and operational stability.
Using the brain emotion learning method based on PID optimization, by constructing a self-organizing fuzzy brain emotion learning neural network model with five layers of mapping relationships, the voltage and current of the three-phase circuit of the power grid are sampled and detected, and the PID optimization algorithm and Lyapunov function are used Select the learning rate to implement supervised classification learning and error tracking control of the model.
It improves the accuracy and real-time performance of harmonic current detection, ensures fast and accurate convergence of the model during the training process, has good generalization ability and learning speed, and is suitable for real-time monitoring of harmonic currents in power grids.
Smart Images

Figure CN114839439B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power detection, and in particular to a harmonic current detection method based on PID optimized brain emotion learning. Background Art
[0002] Power supply, power transmission and distribution system, power equipment and power system are the four major sources of harmonic current in the power grid. Harmonic current in the power grid will lead to increased line loss, reduced sensor accuracy and operational stability, interference and temperature rise. Therefore, it is very important to accurately detect and monitor the harmonics in the power grid in real time. The existing Fourier transform detection method has problems such as large detection error.
[0003] To this end, the present invention proposes a harmonic current detection method based on brain emotion learning of PID optimization. Summary of the invention
[0004] In view of this, the purpose of the present invention is to propose a harmonic current detection method based on brain emotion learning of PID optimization to ensure the accuracy and real-time performance of harmonic current detection in the power grid.
[0005] To solve the above problems, the present invention adopts the following technical solutions:
[0006] A harmonic current detection method based on brain emotion learning of PID optimization includes the following steps:
[0007] S1: Voltage U for the three-phase circuit a, b, c of the power grid a , U b , U c and three-phase current i a ,i b ,i c Sampling is performed and a self-organizing fuzzy brain emotion learning neural network model with five-layer mapping relationships is constructed;
[0008] S2: Rewrite the constructed fuzzy brain emotion learning neural network model into the state space expression of the error tracking control system;
[0009] S3: Construct a PID optimization control algorithm to perform supervised classification learning training on the model, and select the PID optimization learning rate of the model through the Lyapunov function;
[0010] S4: using the training data as model input to train the fuzzy brain neural network model until the model converges;
[0011] S5: The three-phase voltage U of the three-phase circuit a, b, c of the current power grid is collected. a , U b , U cand three-phase current i a ,i b ,i c The model is fed as input data to detect the harmonic currents in the power grid.
[0012] Furthermore, S1 specifically includes the following steps:
[0013] S1.1: Voltage U from the three-phase circuit a, b, c of the power grid a ,U b ,U c and three-phase current i a ,i b ,i c Sampling is performed, and the sampled data is stored as a 4×1 matrix, represented by x1=U a ,x2=i a ,x3=i b ,x4=i c ;
[0014] S1.2: Construct a self-organizing fuzzy brain emotion learning neural network model with five-layer mapping relationship (5-layer signals are transmitted downward layer by layer), as follows:
[0015] Layer 1: The signal is transmitted to the next layer, and the expression is as follows:
[0016]
[0017] Layer 2: Use Gaussian function for normalization, the expression is as follows:
[0018]
[0019] in, They are respectively represented as the mean of the Gaussian function during the blurring process of the amygdala and orbitofrontal cortex, They are the standard deviation of the Gaussian function in the blurring process of the amygdala and orbitofrontal cortex, respectively; the symbol exp represents the exponential operation of e; p is the number of layers of the amygdala and orbitofrontal cortex model network;
[0020] Layer 3: This layer of neurons represents the preprocessing part of the fuzzy rules. The result is obtained by "multiplication" calculation, and its output is expressed as follows:
[0021]
[0022] Among them, the symbol Π represents the cumulative multiplication operator; i represents the sequence of periodic sampling, and j is the fuzzy set of the jth level;
[0023] Layer 4: Multiply the signal transmitted to this layer by the output signal of the function link network, as shown below:
[0024]
[0025] Among them, the expression of the function link network is as follows:
[0026]
[0027] in, and are the weight values of the function link network corresponding to the amygdala and orbitofrontal cortex model networks, is the input data x i The enhanced representation is, Q is the input dimension after the function is expanded, and p is the number of layers of the amygdala and orbitofrontal cortex model network;
[0028] Layer 5: The output Out of the fuzzy brain neural network model is expressed as:
[0029] Out=ao,
[0030] a=y a v,
[0031] o=y o ω,
[0032] Among them, a and o represent the outputs of the amygdala and orbitofrontal cortex models, respectively, and v and ω are the weights of the amygdala and orbitofrontal cortex models, respectively;
[0033] S1.3: The constructed fuzzy brain emotion learning neural network model is rewritten as follows:
[0034]
[0035] Where X = [x1, x2, …, x6] T , x1~x6 are the sampling voltages U of the three-phase circuits a, b, and c of the power grid respectively a ,U b ,U c And the sampled three-phase current i a ,i b ,i c , y represents the model's output Out, and v and ω are both updated weight values;
[0036] The update rule of weight value is as follows:
[0037]
[0038] v(n+1)=v(n)+Δv(n),
[0039] ω(n+1)=ω(n)+Δω(n),
[0040] in, and Δv(n) and Δω(n) are the increments of each iteration cycle;
[0041] S1.4: Further define the model output and reference output y d , so that the estimation error converges asymptotically to a small area near zero, the expression is as follows:
[0042] e(n)=y d -y(n).
[0043] Among them, y(n) is the value of function y at sampling time n;
[0044] The above formula can be further written as:
[0045] e(n+1)=y d -y(n+1) (1)
[0046] in,
[0047] The function y(n+1) is expanded using Taylor series and expressed as follows:
[0048]
[0049] where σ n is the residual, ΔX(n) is the increment of the acquired physical quantity;
[0050] Formula (1) can be further expressed as:
[0051]
[0052] Further, the state space expression of the error tracking control system described in S2;
[0053] e(n+1)=e(n)-B(n)u(n)+ω(n) (2)
[0054] in, B(n) represents the system matrix of control input, u(n) represents the control input, and ω(n) represents the disturbance;
[0055]
[0056] Furthermore, S3 specifically includes the following steps:
[0057] S3.1: Introduce the following PID optimization algorithm:
[0058]
[0059] Among them, Δe(n)=e(n)-e(n-1) / n-(n-1), K P ,K I ,K D is the parameter matrix for optimizing the learning rate, e(n) represents the difference between the reference value and the current value at time n, e(i) represents the difference between the reference value and the current value at time i, and Δe(n) represents the difference between the reference value difference and the current value difference at time n;
[0060] Expand formula (3) into a matrix and define a column matrix variable
[0061] S3.2: Definitions: is an augmented matrix variable. After substituting the PID optimization algorithm of formula (3) into the state space expression formula (2) of the error tracking control system, the following closed-loop control system is obtained:
[0062]
[0063] in,
[0064] S3.3: Establish the Lyapunov function as follows:
[0065]
[0066] Where P is a positive definite symmetric matrix;
[0067] The increment of the Lyapunov function is defined as ΔV(n)=V(n+1)-V(n), that is, V(n+1)=ΔV(n)+V(n); V(n+1) can be further expressed as:
[0068]
[0069] Among them, I3 is the third-order unit matrix, and γ is the anti-interference performance index;
[0070] S3.4: Define a matrix G. From equation (4), we can get:
[0071]
[0072] Substituting formula (6) into (5), we get:
[0073]
[0074] Select PID optimization learning rate parameter matrix KP, K I , K D , the above conditions are met to make the inequality hold, so as to ensure that the model converges quickly and accurately during the training process.
[0075] Furthermore, the training data in S4 is the three-phase voltage U of the three-phase circuit a, b, c of the power grid collected historically. a , U b , U c , three-phase current i a ,i b ,i c And the detection results of harmonic current.
[0076] Based on the above scheme, the present invention also provides a computer-readable storage medium, in which at least one instruction, at least one program, code set or instruction set is stored. The at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the above-mentioned harmonic current detection method based on PID optimization and brain emotion learning.
[0077] Beneficial effects:
[0078] The harmonic current detection method based on brain emotion learning of PID optimization provided by the present invention optimizes the learning rate parameter matrix K by PID P , K I , K D The reasonable selection of ensures that the model converges quickly and accurately during the training process. The harmonic current detection method provided by the present invention has good generalization ability and fast learning speed, can ensure the accuracy and real-time performance of harmonic current detection in the power grid, and is suitable for further promotion and application. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0080] Figure 1 It is a brief schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0081] The present invention will be further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present invention, but are not intended to limit the scope of the present invention. Similarly, the following examples are only partial embodiments of the present invention rather than all embodiments, and all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present invention.
[0082] like Figure 1As shown, the present embodiment provides a harmonic current detection method based on PID optimized brain emotion learning, comprising the following steps:
[0083] S1: Voltage U for the three-phase circuit a, b, c of the power grid a , U b , U c and three-phase current i a ,i b ,i c Sampling is performed and a self-organizing fuzzy brain emotion learning neural network model with five-layer mapping relationship is constructed; specifically:
[0084] S1.1: Voltage U from three-phase circuit a, b, c of the power grid a , U b , U c and three-phase current i a ,i b ,i c Sampling is performed, and the sampled data is stored as a 4×1 matrix, represented by x1=U a , x2=i a , x3=i b , x4=i c ;
[0085] S1.2: Construct a self-organizing fuzzy brain emotion learning neural network model with five-layer mapping relationship (5-layer signals are transmitted downward layer by layer), as follows:
[0086] Layer 1: The signal is transmitted to the next layer, and the expression is as follows:
[0087]
[0088] Layer 2: Use Gaussian function for normalization, the expression is as follows:
[0089]
[0090] in, They are respectively represented as the mean of the Gaussian function during the blurring process of the amygdala and orbitofrontal cortex, They are the standard deviation of the Gaussian function in the blurring process of the amygdala and orbitofrontal cortex, respectively; the symbol exp represents the exponential operation of e; p is the number of layers of the amygdala and orbitofrontal cortex model network;
[0091] Layer 3: This layer of neurons represents the preprocessing part of the fuzzy rules. The result is obtained by "multiplication" calculation, and its output is expressed as follows:
[0092]
[0093] Among them, the symbol Π represents the cumulative multiplication operator; i represents the sequence of periodic sampling, and j is the fuzzy set of the jth level;
[0094] Layer 4: Multiply the signal transmitted to this layer by the output signal of the function link network, as shown below:
[0095]
[0096] Among them, the expression of the function link network is as follows:
[0097]
[0098] in, and are the weight values of the function link network corresponding to the amygdala and orbitofrontal cortex model networks, is the input data x i The enhanced representation is, Q is the input dimension after the function is expanded, and p is the number of layers of the amygdala and orbitofrontal cortex model network;
[0099] Layer 5: The output Out of the fuzzy brain neural network model is expressed as:
[0100] Out=ao,
[0101] a=y a v,
[0102] o=y o ω,
[0103] Among them, a and o represent the outputs of the amygdala and orbitofrontal cortex models, respectively, and v and ω are the weights of the amygdala and orbitofrontal cortex models, respectively;
[0104] S1.3: Based on the expression of the five-layer model, we can know and v and ω are both weight values, which should be optimized and updated during the iterative training of the model. Therefore, the constructed fuzzy brain emotion learning neural network model can be rewritten as follows:
[0105]
[0106] Where X = x1, x2, …, x6 T , x1~x6 are the sampling voltages U of the three-phase circuits a, b, and c of the power grid respectively a ,U b ,U c And the sampled three-phase current i a ,i b ,i c , y represents the model's output Out, and v and ω are both updated weight values;
[0107] The update rule of weight value is as follows:
[0108]
[0109] v(n+1)=v(n)+Δv(n),
[0110] ω(n+1)=ω(n)+Δω(n),
[0111] and v(0) and ω(0) are arbitrary initial values; among them, and Δv(n) and Δω(n) are the increments of each iteration cycle;
[0112] S1.4: Further define the model output and reference output y d , so that the estimation error converges asymptotically to a small area near zero, the expression is as follows:
[0113] e(n)=y d -y(n).
[0114] Among them, y(n) is the value of function y at sampling time n;
[0115] The above formula can be further written as:
[0116] e(n+1)=y d -y(n+1) (1)
[0117] in,
[0118] The function y(n+1) can be expanded using Taylor series as follows:
[0119]
[0120]
[0121] where σ n is the residual, ΔX(n) is the increment of the acquired physical quantity;
[0122] Formula (1) can be further rewritten as:
[0123]
[0124] S2: Rewrite the constructed fuzzy brain emotion learning neural network model into the state space expression of the error tracking control system. The specific expression is as follows;
[0125] e(n+1)=e(n)-B(n)u(n)+ω(n) (2)
[0126] in, B(n) represents the system matrix of control input, u(n) represents the control input, and ω(n) represents the disturbance;
[0127]
[0128] S3: Construct a PID optimization control algorithm to perform supervised classification learning training on the model, and select the PID optimization learning rate of the model through the Lyapunov function; the details are as follows:
[0129] S3.1: In order to effectively train the fuzzy cerebellar neural network model, the following PID optimization algorithm is introduced:
[0130]
[0131] Among them, Δe(n)=e(n)-e(n-1) / n-(n-1), K P ,K I ,K D is the parameter matrix for optimizing the learning rate, e(n) represents the difference between the reference value and the current value at time n, e(i) represents the difference between the reference value and the current value at time i, and Δe(n) represents the difference between the reference value difference and the current value difference at time n;
[0132] Expand formula (3) into a matrix and define a column matrix variable
[0133] S3.2: Further definitions: is an augmented matrix variable. After substituting the PID optimization algorithm of formula (3) into the state space expression formula (2) of the error tracking control system, the following closed-loop control system is obtained:
[0134]
[0135] in,
[0136] S3.3: Establish the Lyapunov function as follows:
[0137]
[0138] Where P is a positive definite symmetric matrix;
[0139] The increment of the Lyapunov function is defined as ΔV(n)=V(n+1)-V(n), that is, V(n+1)=ΔV(n)+V(n); V(n+1) can be further expressed as:
[0140]
[0141] Among them, I3 is the third-order identity matrix, and γ is the anti-interference performance index;
[0142] S3.4: Define a matrix G, from formula (4) we can get:
[0143]
[0144] Substituting formula (6) into (5), we get:
[0145]
[0146] Select PID optimization learning rate parameter matrix K P , K I , K D , so that formula (7) holds true, to ensure that the model converges quickly and accurately during the training process.
[0147] S4: Use the training data as model input to train the fuzzy brain neural network model until the model converges; the training data is the three-phase voltage U of the three-phase circuit a, b, and c of the power grid collected historically. a , U b , U c , three-phase current i a ,i b ,i c And the detection results of harmonic current.
[0148] S5: The three-phase voltage U of the three-phase circuit a, b, c of the current power grid is collected. a , U b , U c and three-phase current i a ,i b ,i c As input data, the model is input to detect the harmonic current in the power grid, so as to realize the online application of harmonic current detection.
[0149] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0150] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0151] The above descriptions are only some embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any equivalent device or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A harmonic current detection method based on brain emotion learning of PID optimization, characterized in that: The steps include: S1: Voltage U for the three-phase circuit a, b, c of the power grid a ,U b ,U c and three-phase current i a ,i b ,i c Sampling is performed and a self-organizing fuzzy brain emotion learning neural network model with five-layer mapping relationships is constructed; S2: Rewrite the constructed fuzzy brain emotion learning neural network model into the state space expression of the error tracking control system; the state space expression of the error tracking control system is as follows: e(n+1)=e(n)-B(n)u(n)+ω(n) (2) in, B(n) represents the system matrix of control input, u(n) represents the control input, and ω(n) represents the disturbance; S3: Construct a PID optimization control algorithm to perform supervised classification learning and training on the model, and select the PID optimization learning rate of the model through the Lyapunov function, which specifically includes the following steps: S3.1: Introduce the following PID optimization algorithm: Among them, Δe(n)=e(n)-e(n-1) / n-(n-1), K P ,K I ,K D is the parameter matrix for optimizing the learning rate, e(n) represents the difference between the reference value and the current value at time n, e(i) represents the difference between the reference value and the current value at time i, and Δe(n) represents the difference between the reference value difference and the current value difference at time n; Expand formula (3) into a matrix and define a column matrix variable S3.2: Definitions: is an augmented matrix variable. After substituting the PID optimization algorithm of formula (3) into the state space expression formula (2) of the error tracking control system, the following closed-loop control system is obtained: in, S3.3: Establish the Lyapunov function as follows: Where P is a positive definite symmetric matrix; The increment of the Lyapunov function is defined as ΔV(n)=V(n+1)-V(n), that is, V(n+1)=ΔV(n)+V(n); V(n+1) can be further expressed as: Among them, I3 is the third-order unit matrix, and γ is the anti-interference performance index; S3.4: Define a matrix G. From equation (4), we can get: Substituting formula (6) into (5), we get: Select PID optimization learning rate parameter matrix K P ,K I ,K D ,The above conditions are met to make the inequality hold true, so as to ensure that the model converges quickly and accurately during the training process; S4: using the training data as model input to train the fuzzy brain neural network model until the model converges; S5: The three-phase voltage U of the three-phase circuit a, b, c of the current power grid is collected a ,U b ,U c and three-phase current i a ,i b ,i c The model is fed as input data to detect the harmonic currents in the power grid.
2. According to claim 1, a harmonic current detection method based on PID optimized brain emotion learning is characterized in that: S1 specifically includes the following steps: S1.1: Voltage U from the three-phase circuit a, b, c of the power grid a ,U b ,U c and three-phase current i a ,i b ,i c Sampling is performed, and the sampled data is stored as a 4×1 matrix, represented by x1=U a ,x2=i a ,x3=i b ,x4=i c ; S1.2: Construct a self-organizing fuzzy brain emotion learning neural network model with five-layer mapping relationships, as follows: Layer 1: The signal is transmitted to the next layer, and the expression is as follows: Layer 2: Use Gaussian function for normalization, the expression is as follows: in, They are respectively represented as the mean of the Gaussian function during the blurring process of the amygdala and orbitofrontal cortex, They are the standard deviations of the Gaussian functions during the blurring of the amygdala and orbitofrontal cortex, respectively; p is the number of layers in the amygdala and orbitofrontal cortex model networks; Layer 3: This layer of neurons represents the preprocessing part of the fuzzy rules. The result is obtained by "multiplication" calculation, and its output is expressed as follows: Among them, i represents the sequence of periodic sampling, j is the fuzzy set of the jth level; Layer 4: Multiply the signal transmitted to this layer by the output signal of the function link network, as shown below: Among them, the expression of the function link network is as follows: in, and are the weight values of the function link network corresponding to the amygdala and orbitofrontal cortex model networks, is the input data x i The enhanced representation is, Q is the input dimension after the function is expanded, and p is the number of layers of the amygdala and orbitofrontal cortex model network; Layer 5: The output Out of the fuzzy brain neural network model is expressed as: Out=ao, oh a v, o=y o oh, Among them, a and o represent the outputs of the amygdala and orbitofrontal cortex models, respectively, and v and ω are the weights of the amygdala and orbitofrontal cortex models, respectively; S1.3: The constructed fuzzy brain emotion learning neural network model is rewritten as follows: Where X = [x1, x2, …, x6] T , x1~x6 are the sampling voltages U of the three-phase circuits a, b, and c of the power grid respectively a ,U b ,U c And the sampled three-phase current i a ,i b ,i c , y represents the model's output Out, and v and ω are both updated weight values; The update rule of weight value is as follows: v(n+1)=v(n)+Δv(n), ω(n+1)=ω(n)+Δω(n), in, and Δv(n) and Δω(n) are the increments of each iteration cycle; S1.4: Further define the model output and reference output y d , so that the estimation error converges asymptotically to a small area near zero, the expression is as follows: e(n)y d -y(n). Among them, y(n) is the value of function y at sampling time n; The above formula can be further written as: e(n+1)=y d -y(n+1) (1) in, The function y(n+1) is expanded using Taylor series and expressed as follows: where σ n is the residual, ΔX(n) is the increment of the collected physical quantity; Formula (1) can be further expressed as:
3. The harmonic current detection method based on PID optimized brain emotion learning according to claim 1 is characterized in that: The training data in S4 is the three-phase voltage U of the three-phase circuit a, b, c of the power grid collected historically. a ,U b ,U c , three-phase current i a ,i b ,i c And the detection results of harmonic current.
4. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the harmonic current detection method based on PID optimized brain emotion learning as described in one of claims 1 to 3.
