CN118395187A - Training method and device for measuring and correcting model of capacitive voltage transformer - Google Patents

Training method and device for measuring and correcting model of capacitive voltage transformer Download PDF

Info

Publication number
CN118395187A
CN118395187A CN202410575516.2A CN202410575516A CN118395187A CN 118395187 A CN118395187 A CN 118395187A CN 202410575516 A CN202410575516 A CN 202410575516A CN 118395187 A CN118395187 A CN 118395187A
Authority
CN
China
Prior art keywords
voltage transformer
model
current
particle
population
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.)
Pending
Application number
CN202410575516.2A
Other languages
Chinese (zh)
Inventor
武霁阳
彭光强
陈礼昕
冯文昕
黄之笛
邵震
国建宝
彭茂兰
龚泽
雷园园
张翕
黄云丰
肖凯
曾少豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Southern Power Grid Corp Ultra High Voltage Transmission Co Electric Power Research Institute
Original Assignee
China Southern Power Grid Corp Ultra High Voltage Transmission Co Electric Power Research Institute
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Southern Power Grid Corp Ultra High Voltage Transmission Co Electric Power Research Institute filed Critical China Southern Power Grid Corp Ultra High Voltage Transmission Co Electric Power Research Institute
Priority to CN202410575516.2A priority Critical patent/CN118395187A/en
Publication of CN118395187A publication Critical patent/CN118395187A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a training method, a training device, computer equipment, computer readable storage media and computer program products for a capacitance type voltage transformer measurement correction model. The method comprises the following steps: according to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model, randomly generating a plurality of groups of model parameter values which are used as the position parameters of the particle individuals of the initial particle population in the particle swarm optimization model; adopting a particle swarm optimization model, and iteratively determining candidate model parameter values based on an initial particle swarm, an initial capacitance type voltage transformer measurement correction model and a capacitance type voltage transformer measurement sample set; obtaining a candidate capacitance type voltage transformer measurement correction model according to the candidate model parameter value; and (3) adopting a capacitance type voltage transformer measurement sample set, training a candidate capacitance type voltage transformer measurement correction model, and obtaining a target capacitance type voltage transformer measurement correction model. The method can help correct the measured value of the capacitive voltage transformer.

Description

Training method and device for measuring and correcting model of capacitive voltage transformer
Technical Field
The present application relates to the technical field of power systems, and in particular, to a training method, device, computer equipment, computer readable storage medium and computer program product for a measurement correction model of a capacitive voltage transformer.
Background
Currently, the quality of electric energy has become a key index for measuring the performance of a power grid, and the measurement of the quality of electric energy is actually the measurement of harmonic components in voltage. The capacitive voltage transformer (CAPACITIVE VOLTAGE TRANSFORMER, CVT) fully meets system requirements in fundamental voltage measurement, system protection and fundamental signal conversion. Thus, CVT has become increasingly widely used in the power grid, and it has gradually replaced electromagnetic voltage transformers for measurement, communication and protection of 110kV and above neutral point direct grounding systems.
However, since the CVT is made by superposition of capacitance plates, the capacitance is insensitive to voltage transients, and thus the CVT cannot react accurately to harmonic components, particularly higher harmonic components, present in the system. In making measurements of the system power quality harmonics, there is a large error in the signal measured through the CVT secondary side.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a training method, apparatus, computer device, computer-readable storage medium, and computer program product for a capacitive voltage transformer measurement correction model that can help correct the measured value of the capacitive voltage transformer.
In a first aspect, the present application provides a training method for a measurement correction model of a capacitive voltage transformer, including:
according to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model, randomly generating a plurality of groups of model parameter values;
Each group of model parameter values in the plurality of groups of model parameter values are respectively used as a position parameter of a particle individual of an initial particle population in the particle swarm optimization model; the speed parameter of one particle individual of the initial particle population is randomly determined based on an initial maximum speed limit parameter;
Adopting the particle swarm optimization model, and iteratively determining candidate model parameter values based on the initial particle swarm, the initial capacitance type voltage transformer measurement correction model and a capacitance type voltage transformer measurement sample set;
Adjusting model parameters in the initial capacitance type voltage transformer measurement correction model to the candidate model parameter values to obtain a candidate capacitance type voltage transformer measurement correction model;
Training the candidate capacitive voltage transformer measurement correction model by adopting the capacitive voltage transformer measurement sample set to obtain a target capacitive voltage transformer measurement correction model; the target capacitive voltage transformer measurement correction model is used for correcting measured values of the capacitive voltage transformer.
In one embodiment, the determining, by using the particle swarm optimization model, candidate model parameter values based on the initial particle swarm, the initial capacitive voltage transformer measurement correction model, and a capacitive voltage transformer measurement sample set includes:
taking the initial particle population as a current particle population of the first generation;
determining a current individual learning factor, a current population learning factor and a current maximum speed limiting parameter of the particle swarm optimization model aiming at the current particle swarm according to algebra of the current particle swarm;
Determining a new generation of current particle population according to the current individual learning factor, the current population learning factor, the current maximum speed limiting parameter, the current particle population, the initial capacitance type voltage transformer measurement correction model and a capacitance type voltage transformer measurement sample set;
Returning to execute the step of determining the current individual learning factor, the current population learning factor and the current maximum speed limiting parameter of the particle swarm optimization model aiming at the current particle swarm according to the algebra of the current particle swarm under the condition that the current particle swarm of the new generation does not accord with the preset iteration condition until the current particle swarm of the new generation accords with the preset iteration condition, and determining a target particle individual from the current particle swarm of the new generation;
and determining the model parameter value corresponding to the target particle individual as a candidate model parameter value.
In one embodiment, the determining, according to algebra of the current particle population, a current individual learning factor, a current population learning factor and a current maximum speed limiting parameter of the particle population optimization model for the current particle population includes:
Acquiring a preset maximum and minimum value of the individual learning factors, a preset maximum and minimum value of the group learning factors, a preset maximum and minimum value of the maximum speed limiting parameter and a preset maximum iteration number;
Determining a current individual learning factor of the particle swarm optimization model aiming at the current particle swarm according to a preset maximum and minimum value, a preset maximum iteration number and algebra of the current particle swarm of the individual learning factors; determining a current population learning factor of the particle swarm optimization model aiming at the current particle swarm according to a preset maximum and minimum value of the population learning factor, a preset maximum iteration number and algebra of the current particle swarm; and determining the current maximum speed limiting parameter of the particle swarm optimization model aiming at the current particle swarm according to the preset maximum and minimum values of the maximum speed limiting parameter, the preset maximum iteration times and the algebra of the current particle swarm.
In one embodiment, the determining a new generation of the current particle population according to the current individual learning factor, the current population learning factor, the current maximum speed limiting parameter, the current particle population, the initial capacitive voltage transformer measurement correction model and the capacitive voltage transformer measurement sample set includes:
According to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model and the current maximum speed limiting parameter, randomly updating each particle individual in the current particle population based on a preset variation probability to obtain a mutated current particle population;
taking the initial capacitance type voltage transformer measurement correction model as fitness information of any particle individual according to model error information of a measurement sample set of the capacitance type voltage transformer under a model parameter value corresponding to the any particle individual;
and determining a new generation of current particle population according to the current individual learning factors, the current population learning factors, the current maximum speed limiting parameters, the mutated current particle population and the fitness information of each particle individual in the mutated current particle population.
In one embodiment, the training the candidate capacitive voltage transformer measurement correction model to obtain the target capacitive voltage transformer measurement correction model by using the capacitive voltage transformer measurement sample set includes:
dividing the capacitive voltage transformer measurement sample set into a training set and a verification set;
performing iterative training on the candidate capacitive voltage transformer measurement correction model by adopting the training set to obtain a trained candidate capacitive voltage transformer measurement correction model;
adopting the test set to verify the measurement correction model of the candidate capacitor voltage transformer after training to obtain a verification result;
under the condition that the verification result meets the preset verification condition, taking the trained candidate capacitance type voltage transformer measurement correction model as a target capacitance type voltage transformer measurement correction model;
And under the condition that the verification result does not meet the preset verification condition, returning to execute the step of adopting the particle swarm optimization model, and iteratively determining candidate model parameter values based on the initial particle swarm, the initial capacitance type voltage transformer measurement correction model and the capacitance type voltage transformer measurement sample set until the target capacitance type voltage transformer measurement correction model is obtained.
In one embodiment, the step of obtaining the measurement sample set of the capacitive voltage transformer includes:
Inquiring and acquiring measurement data and corresponding real data of the capacitive voltage transformer according to a preset database;
integrating the measurement data of the capacitive voltage transformer and corresponding real data to obtain a measurement sample set of the capacitive voltage transformer;
And/or the number of the groups of groups,
Adopting a capacitance type voltage transformer measurement simulation model, and performing simulation aiming at different fundamental voltages, different harmonic duty ratios and different harmonic frequencies to obtain a capacitance type voltage transformer measurement data simulation result and a corresponding real data simulation result;
And integrating the measurement data simulation result of the capacitive voltage transformer and the corresponding real data simulation result to obtain the measurement sample set of the capacitive voltage transformer.
In a second aspect, the present application further provides a training device for measuring and correcting a model of a capacitive voltage transformer, including:
the random parameter generation module is used for randomly generating a plurality of groups of model parameter values according to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model;
The particle individual determining module is used for respectively taking each group of model parameter values in the plurality of groups of model parameter values as a position parameter of a particle individual of an initial particle population in the particle swarm optimization model; the speed parameter of one particle individual of the initial particle population is randomly determined based on an initial maximum speed limit parameter;
the particle population iteration module is used for adopting the particle population optimization model and iteratively determining candidate model parameter values based on the initial particle population, the initial capacitance voltage transformer measurement correction model and a capacitance voltage transformer measurement sample set;
The candidate model determining module is used for adjusting model parameters in the initial capacitance type voltage transformer measurement correction model to the candidate model parameter values to obtain a candidate capacitance type voltage transformer measurement correction model;
The target model determining module is used for training the candidate capacitive voltage transformer measurement correction model by adopting the capacitive voltage transformer measurement sample set to obtain a target capacitive voltage transformer measurement correction model; the target capacitive voltage transformer measurement correction model is used for correcting measured values of the capacitive voltage transformer.
In a third aspect, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
according to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model, randomly generating a plurality of groups of model parameter values;
Each group of model parameter values in the plurality of groups of model parameter values are respectively used as a position parameter of a particle individual of an initial particle population in the particle swarm optimization model; the speed parameter of one particle individual of the initial particle population is randomly determined based on an initial maximum speed limit parameter;
Adopting the particle swarm optimization model, and iteratively determining candidate model parameter values based on the initial particle swarm, the initial capacitance type voltage transformer measurement correction model and a capacitance type voltage transformer measurement sample set;
Adjusting model parameters in the initial capacitance type voltage transformer measurement correction model to the candidate model parameter values to obtain a candidate capacitance type voltage transformer measurement correction model;
Training the candidate capacitive voltage transformer measurement correction model by adopting the capacitive voltage transformer measurement sample set to obtain a target capacitive voltage transformer measurement correction model; the target capacitive voltage transformer measurement correction model is used for correcting measured values of the capacitive voltage transformer.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
according to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model, randomly generating a plurality of groups of model parameter values;
Each group of model parameter values in the plurality of groups of model parameter values are respectively used as a position parameter of a particle individual of an initial particle population in the particle swarm optimization model; the speed parameter of one particle individual of the initial particle population is randomly determined based on an initial maximum speed limit parameter;
Adopting the particle swarm optimization model, and iteratively determining candidate model parameter values based on the initial particle swarm, the initial capacitance type voltage transformer measurement correction model and a capacitance type voltage transformer measurement sample set;
Adjusting model parameters in the initial capacitance type voltage transformer measurement correction model to the candidate model parameter values to obtain a candidate capacitance type voltage transformer measurement correction model;
Training the candidate capacitive voltage transformer measurement correction model by adopting the capacitive voltage transformer measurement sample set to obtain a target capacitive voltage transformer measurement correction model; the target capacitive voltage transformer measurement correction model is used for correcting measured values of the capacitive voltage transformer.
In a fifth aspect, the application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
according to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model, randomly generating a plurality of groups of model parameter values;
Each group of model parameter values in the plurality of groups of model parameter values are respectively used as a position parameter of a particle individual of an initial particle population in the particle swarm optimization model; the speed parameter of one particle individual of the initial particle population is randomly determined based on an initial maximum speed limit parameter;
Adopting the particle swarm optimization model, and iteratively determining candidate model parameter values based on the initial particle swarm, the initial capacitance type voltage transformer measurement correction model and a capacitance type voltage transformer measurement sample set;
Adjusting model parameters in the initial capacitance type voltage transformer measurement correction model to the candidate model parameter values to obtain a candidate capacitance type voltage transformer measurement correction model;
Training the candidate capacitive voltage transformer measurement correction model by adopting the capacitive voltage transformer measurement sample set to obtain a target capacitive voltage transformer measurement correction model; the target capacitive voltage transformer measurement correction model is used for correcting measured values of the capacitive voltage transformer.
The training method, the training device, the training computer equipment, the training computer readable storage medium and the training computer program product for measuring and correcting the model by the capacitive voltage transformer comprise the steps of firstly, randomly generating a plurality of groups of model parameter values according to the value range of model parameters in the initial capacitive voltage transformer measurement and correction model, and randomly generating the plurality of groups of model parameter values to cover a plurality of possibilities in the value range of the parameters so that the subsequent optimization process can search in a wider parameter space; then, each group of model parameter values in the plurality of groups of model parameter values is used as a position parameter of one particle individual of the initial particle population in the particle swarm optimization model, wherein the speed parameter of one particle individual of the initial particle population is randomly determined based on the initial maximum speed limiting parameter; then, a particle swarm optimization model is adopted, candidate model parameter values are iteratively determined based on an initial particle swarm, an initial capacitance voltage transformer measurement correction model and a capacitance voltage transformer measurement sample set, efficient searching and optimization can be carried out in a multidimensional parameter space through the particle swarm optimization model so as to find an optimal model parameter combination, the particle swarm optimization model has better global searching capability and convergence, the model can be helped to jump out of a local optimal solution, and the optimal solution can be effectively found in the parameter space; in addition, model parameters in the initial capacitance type voltage transformer measurement correction model are adjusted to candidate model parameter values, so that a candidate capacitance type voltage transformer measurement correction model is obtained, better initial model parameters are obtained through a particle swarm optimization model, the model can be converged to a better solution more quickly in a conventional training process, the generalization performance of the model can be improved, and the model is better in performance; and finally, training a candidate capacitive voltage transformer measurement correction model by adopting a capacitive voltage transformer measurement sample set to obtain a target capacitive voltage transformer measurement correction model, wherein the target capacitive voltage transformer measurement correction model is used for correcting the measured value of the capacitive voltage transformer, and the model can be trained and the performance thereof can be evaluated by using the capacitive voltage transformer measurement sample set, and in the training process, the model learns how to correct according to the measured value of the capacitive voltage transformer so as to improve the accuracy and reliability of measurement correction. According to the method, the optimal model parameter combination is found through the iterative optimization process on the global of the particle swarm optimization model, so that the better correction model initial parameter combination can be obtained, the generalization performance of the model can be improved, the model can be converged to a better solution more quickly in the subsequent training process, the correction model capable of improving the measurement accuracy and reliability of the capacitive voltage transformer is obtained, and the correction model can be used for correcting the measurement value of the capacitive voltage transformer better, so that the measurement error is reduced, and the measurement accuracy of the electric energy quality is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are needed in the description of the embodiments of the present application or the related technologies will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other related drawings may be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 is a flow chart of a training method of a measurement correction model of a capacitive voltage transformer in one embodiment;
FIG. 2 is a flow chart of candidate model parameter value determination steps in one embodiment;
FIG. 3 is a flowchart of a training method of a measurement correction model of a capacitive voltage transformer according to another embodiment;
FIG. 4 is a block diagram of a training device for measuring and correcting a model of a capacitive voltage transformer in one embodiment;
Fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In one embodiment, as shown in fig. 1, a training method of a measurement correction model of a capacitive voltage transformer is provided, and this embodiment is illustrated by applying the method to a terminal, it can be understood that the method can also be applied to a server, and can also be applied to a system including the terminal and the server, and implemented through interaction between the terminal and the server. The terminal may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud computing service. In this embodiment, the method includes the steps of:
Step S101, according to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model, a plurality of groups of model parameter values are randomly generated.
Illustratively, first, the user needs to predefine the structure and parameters of the capacitive voltage transformer measurement correction model, such as weights, thresholds, biases, etc. of the neural network model. And, the user also needs to determine the value range of each parameter. Then, for each parameter, the terminal randomly generates a parameter value from its value range, and may use a uniform distribution or other suitable probability distribution for random generation. The terminal repeats the above process until a specified number of model parameter combinations are generated. The number of model parameter combinations generated may be determined according to requirements, and multiple sets of model parameter values are typically generated to cover the breadth of the parameter space.
Step S102, each set of model parameter values in the plurality of sets of model parameter values is used as a position parameter of a particle individual of the initial particle population in the particle swarm optimization model.
Wherein the speed parameter of an individual particle of the initial particle population is randomly determined based on the initial maximum speed limit parameter.
For each set of model parameter values, the terminal illustratively takes this as a location parameter for one individual particle in the particle swarm optimization model. The position vector for each individual particle may represent a combination of model parameters. Also, the speed parameter of an individual particle of the initial particle population may be randomly determined based on the initial maximum speed limit parameter. Typically, the initial velocity may be set to a random value within a range to ensure sufficient diversity within the search space. In addition, the maximum speed limiting parameter can be preset according to the characteristics of the problem and the actual requirements, and the maximum speed limiting parameter controls the speed range of particle movement, so that the convergence speed and the stability of the particle swarm algorithm can be influenced.
And step S103, adopting a particle swarm optimization model, and iteratively determining candidate model parameter values based on the initial particle swarm, the initial capacitance type voltage transformer measurement correction model and the capacitance type voltage transformer measurement sample set.
Illustratively, the particle swarm optimization algorithm is a heuristic optimization algorithm that performs parameter searching and optimization by simulating the foraging behavior of the bird swarm. In each iteration, the particles update their own position and velocity based on their current position and velocity, as well as information of surrounding particles, so as to gradually optimize the parameter values. In the particle swarm optimization process, an fitness function or an objective function needs to be defined for evaluating the merits of each particle, in this embodiment, the objective function may be defined as the error between the predicted value and the actual measured value of the correction model, that is, the fitting degree of the correction model, where a smaller objective function indicates a better fitting of the model. The user also needs to set iteration stop conditions, such as reaching a maximum number of iterations, the objective function converging to a certain threshold or meeting a certain convergence criterion, etc. And when the stopping condition is met, the algorithm stops iterating, and the terminal outputs the model parameter value corresponding to the optimal particle individual as a candidate model parameter value.
And step S104, adjusting model parameters in the initial capacitance type voltage transformer measurement correction model to candidate model parameter values to obtain a candidate capacitance type voltage transformer measurement correction model.
The terminal adjusts model parameters in the initial capacitive voltage transformer measurement correction model to these candidate values, such as parameters of weights, biases, etc. of the neural network model, and any other model parameters, illustratively, based on the determined candidate model parameter values. After the model parameters are adjusted, a candidate capacitance type voltage transformer measurement correction model is obtained, and the candidate capacitance type voltage transformer measurement correction model can provide better initial model parameter setting before model training.
And step 105, adopting a capacitance type voltage transformer measurement sample set, training a candidate capacitance type voltage transformer measurement correction model, and obtaining a target capacitance type voltage transformer measurement correction model.
The target capacitance type voltage transformer measurement correction model is used for correcting measured values of the capacitance type voltage transformer.
Illustratively, the terminal trains the candidate capacitive voltage transformer measurement correction model using the capacitive voltage transformer measurement sample set as training data. During training, the terminal adjusts the model parameters according to the loss function or objective function to minimize the error between the predicted value and the true measured value. Common loss functions include Mean Square Error (MSE) or Mean Absolute Error (MAE), etc., with the goal of improving the prediction accuracy of the model by optimizing these metrics. After training is completed, the terminal needs to evaluate the measurement correction model of the target capacitive voltage transformer obtained through training so as to ensure the generalization capability of the target capacitive voltage transformer on unseen data. Cross-validation, test set validation, etc. methods may be used to evaluate the performance of the model.
In the training method of the capacitance type voltage transformer measurement correction model, firstly, according to the value range of model parameters in the initial capacitance type voltage transformer measurement correction model, a plurality of groups of model parameter values are randomly generated, and a plurality of possibilities in the value range of the parameters can be covered by randomly generating a plurality of groups of model parameter values, so that the subsequent optimization process can search in a wider parameter space; then, each group of model parameter values in the plurality of groups of model parameter values is used as a position parameter of one particle individual of the initial particle population in the particle swarm optimization model, wherein the speed parameter of one particle individual of the initial particle population is randomly determined based on the initial maximum speed limiting parameter; then, a particle swarm optimization model is adopted, candidate model parameter values are iteratively determined based on an initial particle swarm, an initial capacitance voltage transformer measurement correction model and a capacitance voltage transformer measurement sample set, efficient searching and optimization can be carried out in a multidimensional parameter space through the particle swarm optimization model so as to find an optimal model parameter combination, the particle swarm optimization model has better global searching capability and convergence, the model can be helped to jump out of a local optimal solution, and the optimal solution can be effectively found in the parameter space; in addition, model parameters in the initial capacitance type voltage transformer measurement correction model are adjusted to candidate model parameter values, so that a candidate capacitance type voltage transformer measurement correction model is obtained, better initial model parameters are obtained through a particle swarm optimization model, the model can be converged to a better solution more quickly in a conventional training process, the generalization performance of the model can be improved, and the model is better in performance; and finally, training a candidate capacitive voltage transformer measurement correction model by adopting a capacitive voltage transformer measurement sample set to obtain a target capacitive voltage transformer measurement correction model, wherein the target capacitive voltage transformer measurement correction model is used for correcting the measured value of the capacitive voltage transformer, and the model can be trained and the performance thereof can be evaluated by using the capacitive voltage transformer measurement sample set, and in the training process, the model learns how to correct according to the measured value of the capacitive voltage transformer so as to improve the accuracy and reliability of measurement correction. According to the method, the optimal model parameter combination is found through the iterative optimization process on the global of the particle swarm optimization model, so that the better correction model initial parameter combination can be obtained, the generalization performance of the model can be improved, the model can be converged to a better solution more quickly in the subsequent training process, the correction model capable of improving the measurement accuracy and reliability of the capacitive voltage transformer is obtained, and the correction model can be used for correcting the measurement value of the capacitive voltage transformer better, so that the measurement error is reduced, and the measurement accuracy of the electric energy quality is improved.
In an exemplary embodiment, as shown in fig. 2, the step S103 uses a particle swarm optimization model, and iteratively determines candidate model parameter values based on an initial particle swarm, an initial capacitive voltage transformer measurement correction model, and a capacitive voltage transformer measurement sample set, which may also be implemented by:
Step S201, taking the initial particle population as the current particle population of the first generation;
Step S202, determining a current individual learning factor, a current population learning factor and a current maximum speed limiting parameter of a particle swarm optimization model aiming at a current particle swarm according to algebra of the current particle swarm;
Step S203, determining a current particle population of a new generation according to the current individual learning factor, the current population learning factor, the current maximum speed limiting parameter, the current particle population, the initial capacitance voltage transformer measurement correction model and the capacitance voltage transformer measurement sample set;
Step S204, when the current particle population of the new generation does not meet the preset iteration condition, returning to execute the step of determining the current individual learning factor, the current population learning factor and the current maximum speed limiting parameter of the particle swarm optimization model aiming at the current particle population according to the algebra of the current particle population until the current particle population of the new generation meets the preset iteration condition, and determining the target particle individual from the current particle population of the new generation;
in step S205, a model parameter value corresponding to the target particle is determined as a candidate model parameter value.
Illustratively, the terminal first takes the initial particle population as the first generation particle population of the particle swarm optimization algorithm, and takes the initial particle population as the starting point of the optimization process. And then, the terminal determines a current individual learning factor, a current population learning factor and a current maximum speed limiting parameter of the particle swarm optimization model aiming at the current particle swarm according to algebra of the current particle swarm. These parameters will influence the movement and search process of the particles, dynamically adjust according to algebra of the current iteration to improve the optimization efficiency, and individual learning factors influence the trade-off between individual optimal positions and global optimal positions of the particles in the search space; the population learning factor determines the extent to which the particles utilize global information in the search space; the maximum speed limiting parameter is used for limiting the moving speed of the particles in the search space, and avoiding oscillation and jump in the search process. And then, the terminal determines the current particle population of the new generation according to the current individual learning factor, the current population learning factor, the current maximum speed limiting parameter, the current particle population, the initial capacitance voltage transformer measurement correction model and the capacitance voltage transformer measurement sample set and the iterative process of the particle population optimization algorithm. And (3) under the condition that the current particle population of the new generation does not meet the preset iteration condition, returning to the step S202 until the current particle population of the new generation meets the preset iteration condition, and determining the target particle individual from the current particle population of the new generation. The preset iteration condition may be that the maximum iteration number is reached or the fitness of a certain particle individual in the current particle population of the new generation reaches a preset value. The target particle individual is the particle individual with the highest adaptability in the current particle population of the new generation. And finally, after the iteration is finished, the terminal selects the model parameter value corresponding to the target particle individual as a candidate model parameter value, and the candidate model parameter value is used as an optimal solution obtained by a particle swarm optimization algorithm.
In this embodiment, a particle swarm optimization algorithm is adopted to perform parameter searching, so that a parameter space can be effectively searched, and a better model parameter value can be obtained. The finally obtained candidate model parameter values can improve the accuracy and reliability of electric energy quality measurement, thereby improving the evaluation and management level of the power grid performance. In addition, by dynamically updating parameters, the particle swarm optimization algorithm can be more flexible and adaptive, can be better adapted to different optimization problems and search spaces, and improves the optimization efficiency and performance.
In an exemplary embodiment, the step S202 determines, according to algebra of the current particle population, a current individual learning factor, a current population learning factor, and a current maximum speed limiting parameter of the particle population optimization model for the current particle population, and further includes: acquiring a preset maximum and minimum value of an individual learning factor, a preset maximum and minimum value of a group learning factor, a preset maximum and minimum value of a maximum speed limiting parameter and a preset maximum iteration number; determining a current individual learning factor of the particle swarm optimization model aiming at the current particle swarm according to a preset maximum and minimum value of the individual learning factor, a preset maximum iteration number and algebra of the current particle swarm; determining a current population learning factor of the particle swarm optimization model aiming at the current particle swarm according to a preset maximum and minimum value of the population learning factor, a preset maximum iteration number and algebra of the current particle swarm; and determining the current maximum speed limiting parameter of the particle swarm optimization model aiming at the current particle swarm according to the preset maximum and minimum values of the maximum speed limiting parameter, the preset maximum iteration times and algebra of the current particle swarm.
Illustratively, in particle swarm optimization algorithms, individual learning factors affect the ability of each particle to search based on its own experience. The user can set the preset maximum and minimum values of the individual learning factors according to the characteristics and the optimization targets of the problems in advance so as to limit the value range of the individual learning factors, and the searching process is ensured not to deviate to the individual experience too much so as to lose the global searching capability. The population learning factor affects the extent to which particles are searched according to population information. The user can control the information sharing degree among particles by presetting the preset maximum and minimum values of the group learning factors, so that the capacity of global searching and local searching is balanced, and the optimization efficiency and stability are improved. The maximum speed limit parameter is used to limit the movement speed of the particles in the search space, avoiding excessive jumps and oscillations during the search. The user presets the preset maximum and minimum values of the maximum speed limiting parameters, and the speed range of particle movement in the searching process can be controlled, so that the searching stability and the convergence speed are improved. The user can control the running time and the searching precision of the algorithm by presetting the maximum iteration times, so that the algorithm can find a better solution in the limited iteration times. And then, the terminal dynamically determines the current three parameter values according to the preset maximum and minimum values, the preset maximum iteration times and algebra of the current particle population, which are respectively corresponding to the individual learning factors, the group learning factors and the maximum speed limiting parameters.
In a specific example, the current individual learning factorCurrent population learning factorAnd a current maximum speed limit parameterThe determination may be made by:
Wherein, The method comprises the steps of presetting a maximum individual learning factor parameter value; The method comprises the steps of presetting a minimum individual learning factor parameter value; t is the algebra of the current particle population; Presetting the maximum iteration times; the method comprises the steps of presetting a maximum group learning factor parameter value; The method comprises the steps of presetting a minimum group learning factor parameter value; Limiting parameter values for a preset maximum speed; The minimum speed limit parameter value is preset. The algebra of the maximum particle population is one more than the preset maximum iteration number, namely the n+1st generation particle population is obtained by the nth iteration; then the current individual learning factor, the current population learning factor, the current maximum speed limit parameter of the first generation particle population are respectively The current individual learning factor, the current population learning factor and the current maximum speed limiting parameter of the penultimate particle population are respectively. Based on the mode, the current individual learning factors, the current group learning factors and the current maximum speed limiting parameters are determined, the individual learning factors are in a linear decreasing trend, the group learning factors are in a linear increasing trend, and the maximum speed limiting parameters are in a linear decreasing trend. The dynamic adjustment of parameters enables the population to enhance global searching capability in the early stage, expands the searching range, enhances local searching capability in the later stage, accelerates convergence speed and is beneficial to searching the optimal solution.
In this embodiment, by setting the preset maximum and minimum values and the maximum iteration times, the search strategy and convergence speed of the algorithm can be adjusted within a certain range, so as to improve the optimization efficiency and performance. Meanwhile, the dynamic updating parameters can enable the algorithm to have stronger adaptability and flexibility, and the algorithm can show better optimizing capability in different optimizing stages and problem scenes.
In an exemplary embodiment, the step S203 determines a new generation of the current particle population according to the current individual learning factor, the current population learning factor, the current maximum speed limiting parameter, the current particle population, the initial capacitive voltage transformer measurement correction model, and the capacitive voltage transformer measurement sample set, and further includes: according to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model and the current maximum speed limiting parameters, randomly updating each particle individual in the current particle population based on the preset variation probability to obtain a mutated current particle population; under the model parameter value corresponding to any particle individual, the initial capacitance type voltage transformer measurement correction model is used for measuring model error information of a sample set aiming at the capacitance type voltage transformer and is used as fitness information of any particle individual; and determining a new generation of current particle population according to the current individual learning factors, the current population learning factors, the current maximum speed limiting parameters, the mutated current particle population and the fitness information of each particle individual in the mutated current particle population.
When determining the current particle population of the new generation, the terminal randomly updates each particle individual in the current particle population according to the preset mutation probability. The mutation operation can be realized in various modes, such as randomly redetermining the position and the speed of the particles, or adopting a specific mutation operator to mutate the particles, so that more randomness can be introduced, the diversity of the population is promoted, the local optimal solution can be jumped out, and the global searching capability is improved. In addition, the terminal also takes model error information of the initial capacitance type voltage transformer measurement sample set as fitness information of any particle individual under the model parameter value corresponding to any particle individual. The model error information may be calculated in various ways, for example using a weighted average of the model errors, a root mean square error, or the like. The fitness information reflects the quality of each individual particle under the current model parameter value, and can be used for evaluating and selecting the quality of the individual particle. And finally, the terminal determines a new generation of current particle population according to the current individual learning factor, the current population learning factor, the current maximum speed limiting parameter, the mutated current particle population and the fitness information of each particle individual. The new generation population contains the individual particles after variation and update, and the position and speed of the particles are adjusted according to the individual learning factors, the population learning factors and the fitness information so as to realize the evolution and iteration of the optimization process.
In this embodiment, the mutation operation is introduced to increase the diversity of particles, improve the explorability of the algorithm, help to jump out of the local optimal solution, and improve the global searching capability of the algorithm. Meanwhile, the fitness information is calculated, so that the quality degree of the particle individuals can be accurately estimated, and more excellent individuals can be selected for updating of the next generation.
In an exemplary embodiment, the step S105 uses a capacitive voltage transformer measurement sample set to train a candidate capacitive voltage transformer measurement correction model to obtain a target capacitive voltage transformer measurement correction model, and further includes: dividing a measuring sample set of the capacitive voltage transformer into a training set and a verification set; performing iterative training on the candidate capacitance type voltage transformer measurement correction model by adopting a training set to obtain a trained candidate capacitance type voltage transformer measurement correction model; verifying the measurement correction model of the candidate capacitor voltage transformer after training by adopting a test set to obtain a verification result; under the condition that the verification result meets the preset verification condition, taking the trained candidate capacitance type voltage transformer measurement correction model as a target capacitance type voltage transformer measurement correction model; and under the condition that the verification result does not meet the preset verification condition, returning to execute the step of adopting the particle swarm optimization model, and iteratively determining the candidate model parameter value based on the initial particle swarm, the initial capacitance type voltage transformer measurement correction model and the capacitance type voltage transformer measurement sample set until the target capacitance type voltage transformer measurement correction model is obtained.
Illustratively, first, the terminal divides the capacitive voltage transformer measurement sample set into a training set and a validation set. Typically, the training set is used to train the parameters of the model, while the validation set is used to evaluate the performance and generalization ability of the model. And then, the terminal adopts a training set to carry out iterative training on the candidate capacitance type voltage transformer measurement correction model. In the training process, the model continuously adjusts parameters according to samples in the training set to minimize errors of the model on the training set, so that the model can better fit training data. And then, the terminal uses the verification set to verify the measurement correction model of the candidate capacitor voltage transformer after training, and a verification result is obtained. And (3) evaluating the performance and generalization capability of the model by comparing the prediction result of the model on the verification set with the actual observation value. And if the verification result meets the preset verification condition, namely the model performs well on the verification set, taking the candidate capacitance type voltage transformer measurement correction model after training as a target model. This means that the model has been validated and can be used to correct the measurement of the capacitive voltage transformer. If the verification result does not meet the preset verification condition, i.e. the model does not perform well on the verification set, the previous step S103 is returned to, and the candidate model parameter values are determined again and iteratively until the target model meeting the preset verification condition is obtained.
In this embodiment, by dividing the sample set and the verification model, the performance of the model can be effectively evaluated, and timely adjustment and optimization can be performed when the verification result is not ideal. Therefore, the obtained target model is guaranteed to have better generalization capability and applicability, and the measured value of the capacitive voltage transformer can be accurately corrected, so that the measurement accuracy and stability of a power grid system are improved.
In an exemplary embodiment, the acquiring procedure of the measurement sample set of the capacitive voltage transformer may include: inquiring and acquiring measurement data and corresponding real data of the capacitive voltage transformer according to a preset database; integrating the measurement data of the capacitive voltage transformer and corresponding real data to obtain a measurement sample set of the capacitive voltage transformer; and/or adopting a capacitance type voltage transformer measurement simulation model to perform simulation aiming at different fundamental voltages, different harmonic duty ratios and different harmonic frequencies so as to obtain a capacitance type voltage transformer measurement data simulation result and a corresponding real data simulation result; and integrating the simulation result of the measurement data of the capacitive voltage transformer and the simulation result of the corresponding real data to obtain a measurement sample set of the capacitive voltage transformer.
The terminal queries and obtains the measurement data of the capacitive voltage transformer and the corresponding real data according to a preset database. These real data may be from measurement records or monitoring data in the actual grid system, including voltage values, current values, power values, etc. And integrating the measurement data of the capacitive voltage transformer obtained by inquiry with corresponding real data to form a measurement sample set of the capacitive voltage transformer. Or the terminal can also adopt a capacitive voltage transformer measurement simulation model to generate data, and through simulation, the capacitive voltage transformer measurement data under different fundamental wave voltages, different harmonic wave duty ratios and different harmonic wave frequencies can be simulated. And generating simulation results of the measurement data of the capacitive voltage transformer and corresponding real data simulation results according to the adopted simulation model and the set parameters. And integrating the generated simulation result of the measurement data of the capacitive voltage transformer with the corresponding simulation result of the real data to form a complete measurement sample set of the capacitive voltage transformer. Further, if the real data is insufficient or more data is needed to cover different situations and scenarios, the simulation results may be combined with the real data into a part of the capacitive voltage transformer measurement sample set.
In the embodiment, through independent use or combined use of real data and simulation data, abundant measurement data of the capacitive voltage transformer can be obtained, conditions under different working conditions and scenes are covered, performance of the capacitive voltage transformer under various conditions is considered more comprehensively, and therefore a correction model is trained and verified more accurately, generalization capability and applicability of the model are improved, and good effect and reliability of the correction model in practical application are ensured.
In another exemplary embodiment, as shown in fig. 3, the present application provides a training method of a measurement correction model of a capacitive voltage transformer, the method comprising the steps of:
Step S301, according to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model, a plurality of groups of model parameter values are randomly generated.
Step S302, each set of model parameter values in the plurality of sets of model parameter values is used as a position parameter of a particle individual of the initial particle population in the particle swarm optimization model.
Wherein the speed parameter of an individual particle of the initial particle population is randomly determined based on the initial maximum speed limit parameter.
Step S303, taking the initial particle population as the current particle population of the first generation.
Step S304, obtaining a preset maximum and minimum value of the individual learning factors, a preset maximum and minimum value of the group learning factors, a preset maximum and minimum value of the maximum speed limiting parameter and a preset maximum iteration number.
Step S305, determining a current individual learning factor of the particle swarm optimization model aiming at the current particle swarm according to a preset maximum and minimum value, a preset maximum iteration number and algebra of the current particle swarm of the individual learning factor; determining a current population learning factor of the particle swarm optimization model aiming at the current particle swarm according to a preset maximum and minimum value of the population learning factor, a preset maximum iteration number and algebra of the current particle swarm; and determining the current maximum speed limiting parameter of the particle swarm optimization model aiming at the current particle swarm according to the preset maximum and minimum values of the maximum speed limiting parameter, the preset maximum iteration times and algebra of the current particle swarm.
Step S306, according to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model and the current maximum speed limiting parameters, randomly updating each particle individual in the current particle population based on the preset variation probability to obtain the mutated current particle population.
Step S307, the initial capacitance type voltage transformer measurement correction model is used as the fitness information of any particle individual according to the model error information of the capacitance type voltage transformer measurement sample set under the model parameter value corresponding to any particle individual.
Step S308, determining a new generation of current particle population according to the current individual learning factors, the current population learning factors, the current maximum speed limiting parameters, the mutated current particle population and the fitness information of each particle individual in the mutated current particle population.
Step S309, if the current particle population of the new generation does not meet the preset iteration condition, the step S305 is executed again until the current particle population of the new generation meets the preset iteration condition, and then the target particle individual is determined from the current particle population of the new generation.
Step S310, determining the model parameter value corresponding to the target particle individual as a candidate model parameter value.
And step S311, adjusting model parameters in the initial capacitance type voltage transformer measurement correction model to candidate model parameter values to obtain a candidate capacitance type voltage transformer measurement correction model.
Step S312, the capacitive voltage transformer measurement sample set is divided into a training set and a verification set.
And step S313, performing iterative training on the candidate capacitive voltage transformer measurement correction model by adopting a training set to obtain a trained candidate capacitive voltage transformer measurement correction model.
And step S314, verifying the measurement correction model of the candidate capacitor voltage transformer after training by adopting a test set to obtain a verification result.
And step S315, taking the trained candidate capacitance type voltage transformer measurement correction model as a target capacitance type voltage transformer measurement correction model under the condition that the verification result meets the preset verification condition.
Step S316, if the verification result does not meet the preset verification condition, the step S303 is executed again until the measurement correction model of the target capacitive voltage transformer is obtained.
The target capacitance type voltage transformer measurement correction model is used for correcting measured values of the capacitance type voltage transformer.
Illustratively, in a particle swarm optimization iteration, the iterative process for each particle is as follows:
Wherein, Is an inertial weight; learning factors for an individual; is a group learning factor; And Is a random number in [0,1 ]; Is the speed of the ith particle at the t generation; the speed of the ith particle at the t+1st generation; is the position of the ith particle in the t generation; Is the position of the ith particle at the t+1st generation; the position of the searched individual extremum is from the ith particle to the tth generation (namely, the position of the individual with highest degree of fitness from the ith particle to the tth generation); global extremum locations searched for all particles to the t-th generation (i.e., individual locations for which the highest degree of fitness is achieved for all particles to the t-th generation).
The traditional particle swarm optimization algorithm is easy to converge to a local optimal value, so that the optimization effect is reduced. In order to improve the local searching capability and the global searching capability of the particle swarm optimization algorithm, the traditional particle swarm optimization algorithm is improved in terms of evolution strategy and parameter setting:
(1) In order to increase the diversity of the particles, the particles can jump out of the local optimal value, and mutation operation is introduced into a particle swarm optimization algorithm. In each iteration, each particle has a certain probability of mutation, and the position and the speed of the mutated particle are initialized randomly again.
(2) The individual learning factors, the group learning factors and the maximum speed are dynamically adjusted to better balance the local searching capability and the global searching capability of the particle swarm optimization algorithm. Current individual learning factorsCurrent population learning factorAnd a current maximum speed limit parameterThe determination may be made by:
Wherein, The method comprises the steps of presetting a maximum individual learning factor parameter value; The method comprises the steps of presetting a minimum individual learning factor parameter value; t is the algebra of the current particle population; Presetting the maximum iteration times; the method comprises the steps of presetting a maximum group learning factor parameter value; The method comprises the steps of presetting a minimum group learning factor parameter value; Limiting parameter values for a preset maximum speed; The minimum speed limit parameter value is preset. The algebra of the maximum particle population is one more than the preset maximum iteration number, namely the n+1st generation particle population is obtained by the nth iteration; then the current individual learning factor, the current population learning factor, the current maximum speed limit parameter of the first generation particle population are respectively The current individual learning factor, the current population learning factor and the current maximum speed limiting parameter of the penultimate particle population are respectively. Based on the mode, the current individual learning factors, the current group learning factors and the current maximum speed limiting parameters are determined, the individual learning factors are in a linear decreasing trend, the group learning factors are in a linear increasing trend, and the maximum speed limiting parameters are in a linear decreasing trend. The dynamic adjustment of parameters enables the population to enhance global searching capability in the early stage, expands the searching range, enhances local searching capability in the later stage, accelerates convergence speed and is beneficial to searching the optimal solution.
The capacitive voltage transformer measurement correction model may employ a back propagation algorithm (Backpropagation algorithm, BP algorithm). The harmonic duty ratio, the harmonic voltage and the test temperature are taken as inputs of the model, and the output is the per unit value of the corresponding harmonic voltage.
Then, the weight and the threshold value of each layer in the BP algorithm are used as the particle positions of the particle swarm optimization to carry out iterative optimization, and the method is concretely as follows:
And (1) determining a searching range of the particle swarm, and initializing the position and the speed of the particle swarm. The position of each particle represents the initial connection weight and the threshold value of the BP neural network, the input of the BP neural network is CVT harmonic transfer characteristic field test data, and the output is the data after the CVT harmonic transfer characteristic field test data is cleaned.
And (2) respectively initializing the connection weight and the threshold of the corresponding BP neural network according to each particle.
And (3) training each BP neural network by using a training set.
And (4) determining an individual extremum and a population extremum of the particle values according to the fitness function F of the particles.
And (5) updating the weight coefficient, the individual learning factor, the group learning factor and the upper speed limit.
And (6) judging whether the iteration times exceed the maximum value. If the maximum value is exceeded, outputting the optimal initial connection weight and the threshold value of the BP neural network; if the maximum value is not exceeded, the speed and position of the particles are updated and the position and speed of the particles are guaranteed to be within the set range, and then the process goes to step (2).
And (7) outputting an optimal initial connection weight and a threshold value of the BP neural network when the fitness function value is smaller than or equal to a set minimum error value or the iteration number exceeds a maximum value, initializing the connection weight and the threshold value of the BP neural network, training the BP neural network and testing the BP neural network.
For data of the training set, a simulation model may be employed to obtain:
Setting the fundamental wave voltage to 63.5kV, starting from 2 nd harmonic waves to 25 th harmonic waves, setting 1% of the fundamental wave voltage, 2% and 3% of the fundamental wave voltage for each harmonic wave, taking 27 groups of input and output as training values of the BP neural network, taking the harmonic wave duty ratio and the harmonic wave voltage as the input of the BP neural network, taking the per unit value of the output harmonic wave voltage as the output of the BP neural network, and carrying out network training on each harmonic wave. And 3 groups of input and output with the harmonic ratio of 5%,10% and 15% are used for model inspection.
In this embodiment, an optimal model parameter combination is found through an iterative optimization process on the global of the particle swarm optimization model, so that a better correction model initial parameter combination can be obtained, the generalization performance of the model can be improved, and a better solution can be converged more quickly in a subsequent training process, so that a correction model capable of improving the measurement accuracy and reliability of the capacitive voltage transformer is obtained, and the correction model can correct the measurement value of the capacitive voltage transformer better, thereby reducing measurement errors and improving the measurement accuracy of the electric energy quality. And the accurate correction of the measurement data of the capacitive voltage transformer is realized through the measurement correction model of the target capacitive voltage transformer.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a training device for the capacitance type voltage transformer measurement correction model, which is used for realizing the training method of the capacitance type voltage transformer measurement correction model. The implementation scheme of the device for solving the problem is similar to that described in the above method, so the specific limitation in the embodiments of the training device for measuring and correcting the model by using one or more capacitive voltage transformers provided below can be referred to the limitation of the training method for measuring and correcting the model by using the capacitive voltage transformers hereinabove, and will not be described herein.
In an exemplary embodiment, as shown in fig. 4, there is provided a training apparatus for measuring a correction model of a capacitive voltage transformer, including: a random parameter generation module 401, a particle individual determination module 402, a particle population iteration module 403, a candidate model determination module 404, and a target model determination module 405, wherein:
The random parameter generation module 401 is configured to randomly generate a plurality of groups of model parameter values according to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model;
a particle individual determining module 402, configured to use each of the plurality of sets of model parameter values as a position parameter of a particle individual of the initial particle population in the particle swarm optimization model; a speed parameter of a particle individual of the initial particle population is randomly determined based on the initial maximum speed limit parameter;
the particle population iteration module 403 is configured to iteratively determine candidate model parameter values based on the initial particle population, the initial capacitive voltage transformer measurement correction model, and the capacitive voltage transformer measurement sample set by using the particle population optimization model;
The candidate model determining module 404 is configured to adjust model parameters in the initial capacitive voltage transformer measurement correction model to candidate model parameter values, so as to obtain a candidate capacitive voltage transformer measurement correction model;
the target model determining module 405 is configured to train the candidate capacitive voltage transformer measurement correction model by using the capacitive voltage transformer measurement sample set to obtain a target capacitive voltage transformer measurement correction model; the target capacitive voltage transformer measurement correction model is used for correcting the measured value of the capacitive voltage transformer.
In one embodiment, the particle population iteration module 403 is further configured to take the initial particle population as the current particle population of the first generation; according to algebra of the current particle population, determining a current individual learning factor, a current population learning factor and a current maximum speed limiting parameter of a particle population optimization model aiming at the current particle population; determining a current particle population of a new generation according to the current individual learning factors, the current population learning factors, the current maximum speed limiting parameters, the current particle population, the initial capacitance type voltage transformer measurement correction model and the capacitance type voltage transformer measurement sample set; under the condition that the current particle population of the new generation does not meet the preset iteration condition, returning to execute the step of determining the current individual learning factor, the current population learning factor and the current maximum speed limiting parameter of the particle swarm optimization model aiming at the current particle population according to the algebra of the current particle population until the current particle population of the new generation meets the preset iteration condition, and determining a target particle individual from the current particle population of the new generation; and determining the model parameter value corresponding to the target particle individual as a candidate model parameter value.
In one embodiment, the particle population iteration module 403 is further configured to obtain a preset maximum and minimum value of an individual learning factor, a preset maximum and minimum value of a population learning factor, a preset maximum and minimum value of a maximum speed limiting parameter, and a preset maximum iteration number; determining a current individual learning factor of the particle swarm optimization model aiming at the current particle swarm according to a preset maximum and minimum value of the individual learning factor, a preset maximum iteration number and algebra of the current particle swarm; determining a current population learning factor of the particle swarm optimization model aiming at the current particle swarm according to a preset maximum and minimum value of the population learning factor, a preset maximum iteration number and algebra of the current particle swarm; and determining the current maximum speed limiting parameter of the particle swarm optimization model aiming at the current particle swarm according to the preset maximum and minimum values of the maximum speed limiting parameter, the preset maximum iteration times and algebra of the current particle swarm.
In one embodiment, the particle population iteration module 403 is further configured to randomly update each particle individual in the current particle population based on a preset variation probability according to a value range of a model parameter in the initial capacitance voltage transformer measurement correction model and a current maximum speed limiting parameter, so as to obtain a mutated current particle population; under the model parameter value corresponding to any particle individual, the initial capacitance type voltage transformer measurement correction model is used for measuring model error information of a sample set aiming at the capacitance type voltage transformer and is used as fitness information of any particle individual; and determining a new generation of current particle population according to the current individual learning factors, the current population learning factors, the current maximum speed limiting parameters, the mutated current particle population and the fitness information of each particle individual in the mutated current particle population.
In one embodiment, the target model determining module 405 is further configured to divide the capacitive voltage transformer measurement sample set into a training set and a verification set; performing iterative training on the candidate capacitance type voltage transformer measurement correction model by adopting a training set to obtain a trained candidate capacitance type voltage transformer measurement correction model; verifying the measurement correction model of the candidate capacitor voltage transformer after training by adopting a test set to obtain a verification result; under the condition that the verification result meets the preset verification condition, taking the trained candidate capacitance type voltage transformer measurement correction model as a target capacitance type voltage transformer measurement correction model; and under the condition that the verification result does not meet the preset verification condition, returning to execute the step of adopting the particle swarm optimization model, and iteratively determining the candidate model parameter value based on the initial particle swarm, the initial capacitance type voltage transformer measurement correction model and the capacitance type voltage transformer measurement sample set until the target capacitance type voltage transformer measurement correction model is obtained.
In one embodiment, the training device of the measurement correction model of the capacitive voltage transformer is further used for inquiring and acquiring measurement data and corresponding real data of the capacitive voltage transformer according to a preset database; integrating the measurement data of the capacitive voltage transformer and corresponding real data to obtain a measurement sample set of the capacitive voltage transformer; and/or adopting a capacitance type voltage transformer measurement simulation model to perform simulation aiming at different fundamental voltages, different harmonic duty ratios and different harmonic frequencies so as to obtain a capacitance type voltage transformer measurement data simulation result and a corresponding real data simulation result; and integrating the simulation result of the measurement data of the capacitive voltage transformer and the simulation result of the corresponding real data to obtain a measurement sample set of the capacitive voltage transformer.
The modules in the training device for measuring and correcting the model by the capacitive voltage transformer can be all or partially realized by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a terminal, and an internal structure diagram thereof may be as shown in fig. 5. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The Communication interface of the computer device is used for conducting wired or wireless Communication with an external terminal, and the wireless Communication can be realized through WIFI, a mobile cellular network, near field Communication (NEAR FIELD Communication) or other technologies. The computer program when executed by a processor implements a training method for a capacitive voltage transformer measurement correction model. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 5 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are both information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile memory and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (RESISTIVE RANDOM ACCESS MEMORY, reRAM), magneto-resistive Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computation, an artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) processor, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the present application.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A training method for a measurement correction model of a capacitive voltage transformer, the method comprising:
according to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model, randomly generating a plurality of groups of model parameter values;
Each group of model parameter values in the plurality of groups of model parameter values are respectively used as a position parameter of a particle individual of an initial particle population in the particle swarm optimization model; the speed parameter of one particle individual of the initial particle population is randomly determined based on an initial maximum speed limit parameter;
Adopting the particle swarm optimization model, and iteratively determining candidate model parameter values based on the initial particle swarm, the initial capacitance type voltage transformer measurement correction model and a capacitance type voltage transformer measurement sample set;
Adjusting model parameters in the initial capacitance type voltage transformer measurement correction model to the candidate model parameter values to obtain a candidate capacitance type voltage transformer measurement correction model;
Training the candidate capacitive voltage transformer measurement correction model by adopting the capacitive voltage transformer measurement sample set to obtain a target capacitive voltage transformer measurement correction model; the target capacitive voltage transformer measurement correction model is used for correcting measured values of the capacitive voltage transformer.
2. The method of claim 1, wherein iteratively determining candidate model parameter values based on the initial particle population, the initial capacitive voltage transformer measurement correction model, and a set of capacitive voltage transformer measurement samples using the particle population optimization model comprises:
taking the initial particle population as a current particle population of the first generation;
determining a current individual learning factor, a current population learning factor and a current maximum speed limiting parameter of the particle swarm optimization model aiming at the current particle swarm according to algebra of the current particle swarm;
Determining a new generation of current particle population according to the current individual learning factor, the current population learning factor, the current maximum speed limiting parameter, the current particle population, the initial capacitance type voltage transformer measurement correction model and a capacitance type voltage transformer measurement sample set;
Returning to execute the step of determining the current individual learning factor, the current population learning factor and the current maximum speed limiting parameter of the particle swarm optimization model aiming at the current particle swarm according to the algebra of the current particle swarm under the condition that the current particle swarm of the new generation does not accord with the preset iteration condition until the current particle swarm of the new generation accords with the preset iteration condition, and determining a target particle individual from the current particle swarm of the new generation;
and determining the model parameter value corresponding to the target particle individual as a candidate model parameter value.
3. The method of claim 2, wherein determining the current individual learning factor, the current population learning factor, and the current maximum speed limit parameter for the current particle population by the particle population optimization model based on algebra of the current particle population comprises:
Acquiring a preset maximum and minimum value of the individual learning factors, a preset maximum and minimum value of the group learning factors, a preset maximum and minimum value of the maximum speed limiting parameter and a preset maximum iteration number;
Determining a current individual learning factor of the particle swarm optimization model aiming at the current particle swarm according to a preset maximum and minimum value, a preset maximum iteration number and algebra of the current particle swarm of the individual learning factors; determining a current population learning factor of the particle swarm optimization model aiming at the current particle swarm according to a preset maximum and minimum value of the population learning factor, a preset maximum iteration number and algebra of the current particle swarm; and determining the current maximum speed limiting parameter of the particle swarm optimization model aiming at the current particle swarm according to the preset maximum and minimum values of the maximum speed limiting parameter, the preset maximum iteration times and the algebra of the current particle swarm.
4. The method of claim 2, wherein the determining a new generation of the current population of particles based on the current individual learning factor, the current population learning factor, the current maximum speed limit parameter, the current population of particles, the initial capacitive voltage transformer measurement correction model, and a set of capacitive voltage transformer measurement samples comprises:
According to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model and the current maximum speed limiting parameter, randomly updating each particle individual in the current particle population based on a preset variation probability to obtain a mutated current particle population;
taking the initial capacitance type voltage transformer measurement correction model as fitness information of any particle individual according to model error information of a measurement sample set of the capacitance type voltage transformer under a model parameter value corresponding to the any particle individual;
and determining a new generation of current particle population according to the current individual learning factors, the current population learning factors, the current maximum speed limiting parameters, the mutated current particle population and the fitness information of each particle individual in the mutated current particle population.
5. The method of claim 1, wherein training the candidate capacitive voltage transformer measurement correction model using the set of capacitive voltage transformer measurement samples to obtain a target capacitive voltage transformer measurement correction model comprises:
dividing the capacitive voltage transformer measurement sample set into a training set and a verification set;
performing iterative training on the candidate capacitive voltage transformer measurement correction model by adopting the training set to obtain a trained candidate capacitive voltage transformer measurement correction model;
adopting the test set to verify the measurement correction model of the candidate capacitor voltage transformer after training to obtain a verification result;
under the condition that the verification result meets the preset verification condition, taking the trained candidate capacitance type voltage transformer measurement correction model as a target capacitance type voltage transformer measurement correction model;
And under the condition that the verification result does not meet the preset verification condition, returning to execute the step of adopting the particle swarm optimization model, and iteratively determining candidate model parameter values based on the initial particle swarm, the initial capacitance type voltage transformer measurement correction model and the capacitance type voltage transformer measurement sample set until the target capacitance type voltage transformer measurement correction model is obtained.
6. The method of claim 1, wherein the step of obtaining a set of capacitive voltage transformer measurement samples comprises:
Inquiring and acquiring measurement data and corresponding real data of the capacitive voltage transformer according to a preset database;
integrating the measurement data of the capacitive voltage transformer and corresponding real data to obtain a measurement sample set of the capacitive voltage transformer;
And/or the number of the groups of groups,
Adopting a capacitance type voltage transformer measurement simulation model, and performing simulation aiming at different fundamental voltages, different harmonic duty ratios and different harmonic frequencies to obtain a capacitance type voltage transformer measurement data simulation result and a corresponding real data simulation result;
And integrating the measurement data simulation result of the capacitive voltage transformer and the corresponding real data simulation result to obtain the measurement sample set of the capacitive voltage transformer.
7. A training device for measuring and correcting a model of a capacitive voltage transformer, the device comprising:
the random parameter generation module is used for randomly generating a plurality of groups of model parameter values according to the value range of the model parameters in the initial capacitance type voltage transformer measurement correction model;
The particle individual determining module is used for respectively taking each group of model parameter values in the plurality of groups of model parameter values as a position parameter of a particle individual of an initial particle population in the particle swarm optimization model; the speed parameter of one particle individual of the initial particle population is randomly determined based on an initial maximum speed limit parameter;
the particle population iteration module is used for adopting the particle population optimization model and iteratively determining candidate model parameter values based on the initial particle population, the initial capacitance voltage transformer measurement correction model and a capacitance voltage transformer measurement sample set;
The candidate model determining module is used for adjusting model parameters in the initial capacitance type voltage transformer measurement correction model to the candidate model parameter values to obtain a candidate capacitance type voltage transformer measurement correction model;
The target model determining module is used for training the candidate capacitive voltage transformer measurement correction model by adopting the capacitive voltage transformer measurement sample set to obtain a target capacitive voltage transformer measurement correction model; the target capacitive voltage transformer measurement correction model is used for correcting measured values of the capacitive voltage transformer.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202410575516.2A 2024-05-10 2024-05-10 Training method and device for measuring and correcting model of capacitive voltage transformer Pending CN118395187A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410575516.2A CN118395187A (en) 2024-05-10 2024-05-10 Training method and device for measuring and correcting model of capacitive voltage transformer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410575516.2A CN118395187A (en) 2024-05-10 2024-05-10 Training method and device for measuring and correcting model of capacitive voltage transformer

Publications (1)

Publication Number Publication Date
CN118395187A true CN118395187A (en) 2024-07-26

Family

ID=92007673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410575516.2A Pending CN118395187A (en) 2024-05-10 2024-05-10 Training method and device for measuring and correcting model of capacitive voltage transformer

Country Status (1)

Country Link
CN (1) CN118395187A (en)

Similar Documents

Publication Publication Date Title
CN111327377B (en) Method, device, equipment and storage medium for field intensity prediction
CN113505490B (en) Digital twin body parameter correction method and device for power system based on GMM
CN112884236B (en) Short-term load prediction method and system based on VDM decomposition and LSTM improvement
CN111951901A (en) Optimization apparatus, optimization system, optimization method, and recording medium
CN111432368A (en) Ranging and positioning method suitable for sparse anchor node WSN
CN113887845A (en) Extreme event prediction method, apparatus, device, medium, and computer program product
CN111461443B (en) Optimal design method and system for wind power plant, electronic device and storage medium
CN114971078A (en) Path planning method based on constrained multi-objective particle swarm optimization and related equipment
Wang et al. Investigation of RBFNN Based on Improved PSO Optimization Algorithm for Performance and Emissions Prediction of a High‐Pressure Common‐Rail Diesel Engine
CN117454668A (en) Method, device, equipment and medium for predicting failure probability of parts
CN115859765B (en) Urban expansion prediction method, device, equipment and storage medium
CN118395187A (en) Training method and device for measuring and correcting model of capacitive voltage transformer
CN116523001A (en) Method, device and computer equipment for constructing weak line identification model of power grid
CN115392594A (en) Electrical load model training method based on neural network and feature screening
CN115310709A (en) Power engineering project information optimization method based on particle swarm optimization
CN111062159B (en) Virtual test method for unmanned aerial vehicle
Ding et al. A modified reptile search algorithm for parametric estimation of fractional order model of lithium battery
CN109726805B (en) Method for designing neural network processor by using black box simulator
CN112712202A (en) Short-term wind power prediction method and device, electronic equipment and storage medium
CN114509730B (en) ELM-based interference frequency domain state online prediction method
CN117557067B (en) Distributed energy collaborative optimization system
CN113256055B (en) Power distribution network multi-access body planning method and terminal equipment
CN117933667B (en) Resource scheduling method and device for virtual power plant, computer equipment and storage medium
Xia et al. Study on the Prediction of Short-term Power Load Based on ECGWO-WDESN Combined Model
CN118428398A (en) Battery remaining life prediction method, device, equipment and storage medium

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