Method, device, equipment and medium for reducing simulation error of reactive power compensation device
By optimizing the BP neural network model using a fishing algorithm and combining it with signal processing and simulation platforms, the problem of large simulation errors in reactive power compensation devices in new energy power generation systems was solved, improving control accuracy and system stability, and optimizing power quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID BEIJING ELECTRIC POWER CO
- Filing Date
- 2025-05-13
- Publication Date
- 2026-06-19
AI Technical Summary
The simulation error of reactive power compensation devices in new energy power generation systems is relatively large, which affects the stability of the power system and the power quality. Existing technologies are unable to effectively reduce this error.
A BP neural network model optimized using a fishing algorithm is adopted, combined with a signal processor and a simulated SVG. The actual sampling process is simulated through a simulation platform, the error is calculated, and the intelligent algorithm is adjusted to reduce the simulation error. The Circle chaotic mapping and firefly perturbation algorithm are introduced to optimize the iterative process.
It improves the control accuracy of simulated SVG and the stability of dynamic reactive power compensation, enhances the static and transient stability of the power system, and optimizes power quality.
Smart Images

Figure CN120511692B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of new energy power generation technology, specifically relating to methods, devices, equipment and media for reducing simulation errors of reactive power compensation devices. Background Technology
[0002] Compared to traditional thermal power generation, new energy power generation has new characteristics. Its output characteristics are greatly affected by the environment, impacting the safe operation of the power system. Wind turbines, a type of new energy source, have limited reactive power regulation capabilities. Insufficient reactive power capacity in wind power generation can cause voltage flicker and fluctuations, leading to large-scale cascading grid disconnections of wind turbines, posing a serious threat to the stable operation of the power system. During wind farm construction, reactive power capacity is often required to exceed 50% of the installed capacity, necessitating the implementation of reactive power compensation devices to ensure the stable operation of wind farms. To meet the dynamic reactive power demands of the power system, static var generators (SVG) are widely used in transmission networks, distribution networks, and wind, solar, and energy storage systems. They play a significant role in the field of reactive power compensation in the power grid due to their strong dynamic reactive power compensation capabilities and fast response speed.
[0003] Due to limitations in the engineering application environment and actual operating condition simulation capabilities of SVG, building a hardware-in-the-loop real-time simulation platform allows for physical controller performance testing before equipment commissioning, providing strong data support for controller parameter tuning and control logic verification. SVG technology is rapidly evolving, with numerous customized products available. By simulating the operational characteristics and output responses of objects in the system in real time through the simulation platform, the physical processes under various operating conditions can be directly observed and test data obtained, facilitating new technology development, whole-system algorithm verification, and on-site fault analysis. Currently, simulation platforms used in electrical engineering mainly include Simulink, Pscad, and BPA. To meet production requirements, it is often necessary to limit the grid connection test errors of dynamic reactive power compensation devices to improve the stability and accuracy of dynamic reactive power compensation. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, equipment, and medium for reducing simulation errors of reactive power compensation devices, which can reduce grid-related test errors, improve the stability and accuracy of dynamic reactive power compensation, further improve power system stability, and optimize power quality.
[0005] To achieve the above objectives, the present invention employs the following technical solution:
[0006] According to one aspect of the present invention, a method for reducing simulation errors of a reactive power compensation device is provided, comprising the following steps:
[0007] The system collects signals, including the voltage and current at the SVG grid connection point and the target bus voltage sent by the AVC (Automatic Voltage Control) master station; and calculates the actual reactive power output of the SVG based on the voltage and current at the SVG grid connection point.
[0008] A simulation platform is built, which includes a signal processor, a simulated SVG, and an intelligent algorithm. The signal processor is used to simulate the actual sampling process to obtain the simulated signal. The simulated SVG simulates the main circuit of the SVG, and the intelligent algorithm controls the output of the simulated SVG to simulate reactive power based on the simulated signal. The intelligent algorithm includes a BP (Back Propagation) neural network model optimized using the Catch Fish Optimization Algorithm (CFOA). The BP neural network model is used to train the control parameters of the simulated SVG.
[0009] A signal processor is used to simulate the actual sampling process to obtain the simulation signal. The simulation signal is then input into an intelligent algorithm, which controls the simulated SVG to output the simulated reactive power based on the simulation signal.
[0010] Calculate the error between the actual reactive power and the simulated reactive power. If the power error does not meet the preset requirements, the fishing algorithm is initialized and adjusted, and the intelligent algorithm is used again to control the simulated SVG to output the simulated reactive power until the power error meets the requirements.
[0011] If the output power error meets the preset error requirements, the parameters of the AVC substation can be updated according to the target bus voltage value.
[0012] Furthermore, the simulation signals include the voltage and current at the grid connection point in the simulated SVG, and the target bus voltage sent by the AVC master station.
[0013] Furthermore, the control parameters for the simulated SVG include the firing angle and the amplitude of the modulation signal.
[0014] According to one embodiment of the present invention, the BP neural network model optimized by the fishing algorithm includes an input layer, a hidden layer, and an output layer; the fishing algorithm is used to obtain the structural parameters of the BP neural network model, the structural parameters including weights and thresholds.
[0015] The fishing algorithm exhibits significant advantages in global exploration, local utilization, robustness, stability, fast convergence, adaptability to complex optimization problems, and simple parameter settings. It can improve the prediction stability and accuracy of the optimized BP neural network model, thereby reducing network-related test errors and improving the control accuracy of the simulated SVG.
[0016] According to one embodiment of the present invention, the BP neural network model is optimized using a fishing algorithm, including the following steps:
[0017] Obtain the solution space of the fishing algorithm; the structural parameters of the BP neural network model constitute the position vector of the fishermen in the solution space.
[0018] The fitness value is obtained based on the fisherman's current position vector. The fisherman's position is updated using the fitness value. Based on the current position information of each fisherman, the fitness value is evaluated using a function. fobj The fitness values were calculated, resulting in the following fitness value matrix:
[0019] ;
[0020] In the fitness matrix fit 1 represents the fitness value of the first fisherman. fit 2 represents the fitness value of the second fisherman, and so on. N This refers to the number of fishermen. The ratio of development to exploration is fairly allocated at 0.5 throughout the entire iteration process. During this process, individuals in the first half of the phase (when...) EFs / MaxEFs Explore the global scope when <0.5, and then in the latter half of the phase (when EFs / MaxEFs Development is carried out when the value is ≥0.5. EFS This is the current number of assessments. MaxEF This is the maximum number of evaluations;
[0021] The global search is performed through multiple iterations to obtain the structural parameters of the BP neural network model.
[0022] If the obtained structural parameters do not meet the preset iteration count condition, the fishing algorithm is used again to perform a global search for fishermen; if the obtained structural parameters meet the preset iteration count condition, the obtained structural parameters are the optimal structural parameters of the BP neural network model.
[0023] According to one embodiment of the present invention, the fishing algorithm is divided into an exploration phase and a development phase;
[0024] The steps involved in obtaining the structural parameters of a BP neural network model by using a fishing algorithm to obtain a fitness value based on the fisherman's current location, updating the fisherman's location using the fitness value, and performing a global search through multiple iterations include:
[0025] When the fishermen's catch rate α is greater than the preset value, the exploration stage is transformed into the development stage. In the development stage, the Gaussian distribution function is used to simulate the distribution of fishermen and iterate to obtain structural parameters.
[0026] The capture rate α is a function of the current number of evaluations and the maximum number of evaluations, and is calculated using the following formula:
[0027] ;
[0028] In the formula, EFs This is the current number of assessments. MaxEFs This is the maximum number of evaluations.
[0029] According to one embodiment of the present invention, the step of updating the fisherman's position using fitness values and achieving a global search through multiple iterations further includes:
[0030] After each iteration, the fisherman's position in the fishing algorithm is perturbed using the firefly algorithm, and the fisherman's position is mapped to the firefly's position during the perturbation.
[0031] In the firefly algorithm, fireflies i Attracted to the fireflies j The distance traveled is affected by fireflies. i With fireflies j The distance between them, fireflies i With fireflies j The influence of mutual attraction between them.
[0032] According to one embodiment of the present invention, in the signal acquisition step, before the step of obtaining the actual reactive power output of the SVG based on the signal, the following step is further included:
[0033] Obtain the target bus voltage issued by the AVC master station, and calculate the difference between the voltage at the SVG grid connection point and the target bus voltage;
[0034] If the voltage difference between the SVG grid connection point and the target bus voltage does not exceed the dead zone, the voltage and current of the SVG grid connection point are re-acquired, and the voltage difference between the SVG grid connection point and the target bus voltage is recalculated. If the voltage difference between the SVG grid connection point and the target voltage exceeds the dead zone, the actual reactive power output of the SVG is obtained based on the signal. The dead zone can be set according to the actual situation, generally 0.03-0.05.
[0035] In the simulation platform, the step of obtaining the simulation signal by simulating the actual sampling process using a signal processor is also simulated in the same way as above. The voltage of the grid-connected point in the simulated SVG is compared with the target voltage of the bus, and the difference between the voltage of the grid-connected point in the simulated SVG and the target voltage of the bus is calculated. If the difference between the voltage of the grid-connected point in the simulated SVG and the target voltage of the bus does not cross the dead zone, the voltage and current of the grid-connected point in the simulated SVG are re-acquired. If the difference between the voltage of the grid-connected point in the simulated SVG and the target voltage crosses the dead zone, the actual reactive power output of the SVG is obtained according to the signal.
[0036] According to one aspect of the present invention, an apparatus for reducing simulation errors of a reactive power compensation device is provided, comprising:
[0037] The signal acquisition module is used to acquire signals, including the voltage and current of the SVG grid connection point, and to obtain the actual reactive power output of the SVG based on the signals.
[0038] The platform building module is used to build a simulation platform; the simulation platform includes a signal processor, a simulated SVG, and an intelligent algorithm; the simulated SVG simulates the main circuit part of the SVG; the intelligent algorithm includes a BP neural network model optimized for a fishing algorithm, and the BP neural network model is used to train the control parameters of the simulated SVG.
[0039] The simulation test module uses a signal processor to simulate the actual sampling process to obtain simulated signals. The simulated signals are then input into an intelligent algorithm, which controls the simulated SVG to output simulated reactive power based on the simulated signals. The module calculates the error between the actual reactive power and the simulated reactive power. If the power error does not meet the preset requirements, the fishing algorithm is initialized and adjusted, and the intelligent algorithm is used again to control the simulated SVG to output simulated reactive power until the power error meets the requirements.
[0040] According to another aspect of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described methods for reducing simulation errors of a reactive power compensation device.
[0041] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements any of the methods described above for reducing simulation errors of a reactive power compensation device.
[0042] Compared with the prior art, the present invention has at least the following beneficial effects:
[0043] 1. This paper provides a method to reduce the simulation error of reactive power compensation devices in new energy power plants. The method optimizes the structural parameters of the BP neural network model through the CFOA algorithm to control the simulated SVG. The control error of the SVG in the system operation state determines whether the intelligent algorithm needs to be adjusted. If the error is too large, the algorithm is adjusted to reduce the grid connection test error. This makes the intelligent algorithm have efficient global optimal search capability, high prediction stability, and improves the control accuracy of the simulated SVG, thereby improving the stability and accuracy of dynamic reactive power compensation. This helps to improve the static and transient stability of the power system and optimize power quality.
[0044] 2. The Circle chaotic mapping is introduced into the CFOA algorithm to ensure the randomness and uniformity of initialization. The firefly perturbation algorithm is added during the iteration process to perturb the iteration process in order to explore new optimal solutions. This improves the accuracy of the optimized BP neural network model, enhances the response speed to grid-connected test errors of dynamic reactive power compensation devices, and makes the simulated SVG output more accurate. Attached Figure Description
[0045] The accompanying drawings, which form part of this specification, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0046] Figure 1 This is a flowchart illustrating the operation of the BP neural network model optimized based on the fishing algorithm in Embodiment 1 of the present invention.
[0047] Figure 2 This is a schematic diagram of the topology of the SVG system of the ring simulation test platform according to Embodiment 1 of the present invention;
[0048] Figure 3 This is a structural diagram of the BP neural network model in Embodiment 1 of the present invention;
[0049] Figure 4 This is a graph showing the fitness function of the intelligent algorithm in Embodiment 1 of the present invention.
[0050] Figure 5 The figure shows the test results based on Embodiment 1 of the present invention. Detailed Implementation
[0051] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0052] The following detailed description is exemplary and intended to provide further detailed explanation of the invention. Unless otherwise specified, all technical terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this invention is for describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention.
[0053] Example 1
[0054] A method for reducing simulation errors in reactive power compensation devices includes the following steps:
[0055] The signals are collected, including the voltage and current at the SVG grid connection point, and the actual reactive power output of the SVG is obtained based on the signals.
[0056] A simulation platform is built; the simulation platform includes a signal processor, a simulated SVG, and intelligent algorithms; the simulated SVG simulates the main circuit of the SVG; the intelligent algorithms include a BP neural network model optimized for fishing algorithms, and the BP neural network model is used to train the control parameters of the simulated SVG.
[0057] A signal processor is used to simulate the actual sampling process to obtain the simulation signal. The simulation signal is then input into an intelligent algorithm, which controls the simulated SVG to output the simulated reactive power based on the simulation signal.
[0058] Calculate the error between the actual reactive power and the simulated reactive power. If the power error does not meet the preset requirements, the fishing algorithm is initialized and adjusted, and the intelligent algorithm is used again to control the simulated SVG to output the simulated reactive power until the power error meets the requirements.
[0059] The above scheme optimizes the structural parameters of the BP neural network model using the CFOA algorithm to control the simulated SVG. The control error of the SVG during system operation determines whether the intelligent algorithm needs adjustment. If the error is too large, the algorithm is adjusted to reduce grid-related testing errors. This results in the intelligent algorithm having efficient global optimal search capabilities, high prediction stability, and improved control accuracy of the simulated SVG, thereby enhancing the stability and accuracy of dynamic reactive power compensation. This contributes to improving the static and transient stability of the power system and optimizing power quality.
[0060] Specifically, in combination Figures 1-5 The method to reduce the simulation error of reactive power compensation devices in new energy power plants includes the following steps:
[0061] The system collects signals including the voltage and current at the SVG grid connection point and the target bus voltage sent by the AVC master station; it then calculates the actual reactive power output of the SVG based on the voltage and current at the SVG grid connection point.
[0062] The simulation platform is built, which includes a signal processor, a simulated SVG, and an intelligent algorithm. The signal processor is used to simulate the actual sampling process to obtain the simulation signal. The simulated SVG simulates the main circuit of the SVG, and the intelligent algorithm controls the output of the simulated SVG to simulate reactive power based on the simulation signal. The intelligent algorithm includes a BP neural network model optimized by a fishing algorithm, which is used to train the control parameters of the simulated SVG.
[0063] The collected signals, such as the voltage and current at the simulated SVG grid connection point and the target bus voltage sent by the AVC master station, are input into the controller of the simulation platform. The controller uses an intelligent algorithm to control the simulated SVG to output simulated reactive power. The error between the actual reactive power output by the SVG and the simulated reactive power is calculated. If the power error does not meet the preset error requirement, the fishing algorithm is initialized and adjusted, and the intelligent algorithm is used again to control the simulated SVG to output simulated reactive power until the power error meets the requirement. If the power error meets the preset error requirement, the parameters of the AVC substation are updated according to the target bus voltage value.
[0064] In the intelligent algorithm, the structural parameters of the BP neural network model are optimized through the CFOA algorithm to obtain the weights and thresholds of the BP neural network model. The simulated SVG grid connection point voltage is input into the optimized BP neural network model to obtain the control parameters of the simulated SVG in real time. The control parameters of the simulated SVG include the firing angle and the amplitude of the modulation signal; thereby controlling the output of the simulated reactive power of the simulated SVG.
[0065] Specifically, the method for reducing simulation errors of reactive power compensation devices includes the following steps:
[0066] S1. Acquire signals, acquire the voltage and current of the SVG grid connection point, and obtain the reactive power capacity, remaining capacity of the SVG, and upper and lower limits of the SVG adjustment of the new energy power station SVG grid connection system. Complete the judgment of the operating status of the SVG grid connection system and issue commands.
[0067] A simulation platform is built, comprising a signal processor, a simulated SVG, and an intelligent algorithm. The signal processor is used to simulate the actual sampling process to obtain the simulated signal. The simulated SVG simulates the main circuit of the SVG, and the intelligent algorithm controls the output of the simulated SVG to simulate reactive power based on the simulated signal. The intelligent algorithm includes a BP neural network model optimized using a fishing algorithm, which is used to train the control parameters of the simulated SVG.
[0068] A signal processor is used to simulate the actual sampling process, updating data in groups of five sampling steps, with each update representing one sampling step. Sensors are used to collect voltage and current data at the simulated SVG grid-connected point, and to obtain the reactive power capacity, remaining SVG capacity, and upper and lower adjustment limits of the simulated SVG grid-connected system. An arithmetic average filtering method is used to smooth the signals obtained from the high-precision sensors. The operating status of the SVG grid-connected system is determined by the system reactive power capacity, SVG reactive power adjustment capacity, adjustable upper limit, and adjustable lower limit.
[0069] Obtain the target bus voltage value sent by the AVC master station, and calculate the difference between the voltage at the simulated SVG grid connection point and the target bus voltage. If the difference between the voltage at the simulated SVG grid connection point and the target bus voltage does not exceed the dead zone, re-acquire the voltage and current at the simulated SVG grid connection point. If the difference between the voltage at the simulated SVG grid connection point and the target voltage exceeds the dead zone, obtain the actual reactive power output of the SVG based on the signal. The dead zone can be set according to actual conditions, generally 0.03-0.05.
[0070] S2. The structural parameters of the BP neural network model are determined by using the improved fishing algorithm. The BP neural network model with optimized parameters is then trained and the simulation SVG control parameters are determined.
[0071] Figure 2 The topology diagram of the SVG system is shown. A ring simulation platform is used to verify the method for reducing the error in the grid-connected test results of the dynamic reactive power compensation device. In this embodiment, the simulation platform is built as follows: Figure 2 The simulation test environment is shown. The main circuit of the simulated dynamic reactive power compensation device (SVG) sends sampled signals (voltage and current at the grid connection point of the simulated SVG, system reactive power capacity, SVG remaining capacity, and SVG adjustment upper and lower limits, etc.) to the controller of the simulation platform. The controller of the simulation platform is equipped with a BP neural network model optimized by the CFOA algorithm and used to train the control parameters of the simulated SVG. The improved CFOA algorithm determines the structural parameters of the BP neural network model, thereby determining the control parameters of the simulated SVG in the system. Through grid connection testing, the relevant parameters are continuously corrected to reduce the grid connection test error of the dynamic reactive power compensation device.
[0072] The core idea of the CFOA algorithm is to maximize fish catches through collaborative efforts within the group. Fishermen use tools and work together to fish in complex waters, sharing their fishing experience. Based on this experience, they can identify the best fishing directions and find more favorable fish gathering points.
[0073] The method for optimizing the weights and thresholds of a BP neural network model using the CFOA algorithm can be found in [link to relevant documentation]. Figure 1 In the initial stage of the CFOA algorithm, a chaotic mapping is used to initialize and adjust the algorithm, generating an initial population or solution space. The structural parameters of the BP neural network model constitute the position vectors of the fishermen in the solution space. Through the ergodicity and sensitivity of the chaotic mapping, the diversity and uniformity of the initial population can be ensured, thus helping the algorithm search for the optimal solution globally. In this embodiment, a Circle chaotic mapping is introduced into the CFOA algorithm to initialize the fishermen's positions. This mapping has characteristics such as randomness and uniformity. The Circle mapping can be represented as:
[0074] ;
[0075] In the formula, a , b The commonly used values for the control parameter are 0.5 and 0.2, and mod is the modulo function. r i+1 , r i , r k The chaotic orbital state value is a random number generated during each iteration of the chaotic mapping, ranging from (0,1).
[0076] The metaheuristic algorithm explores the global situation by continuously updating the position of the search agent, ultimately finding the optimal solution. In CFOA, each fisherman corresponds to a search agent, and its model is as follows:
[0077] ;
[0078] Fisher yes N A search agent in dimension d The spatial location information synthesis matrix is initialized using the following formula:
[0079] ;
[0080] Fisher i,j For the first i The fisherman in the first j The position of the dimension ub j and lb j The first j The upper and lower bounds of a dimension, r These are random numbers generated by the chaotic mapping.
[0081] Based on each fisherman's current location vector, the fitness value evaluation function is used. fobj The fitness values were calculated, resulting in the following fitness value matrix:
[0082] ;
[0083] In the fitness matrix fit 1 represents the fitness value of the first fisherman. fit 2 represents the fitness value of the second fisherman, and so on. The ratio of development to exploration is fairly distributed at 0.5 throughout the iteration. During this process, individuals in the first half of the phase (when...) EFs / MaxEFs Explore the global scope when <0.5, and then in the latter half of the phase (when EFs / MaxEFs Development is carried out when the value is ≥0.5. EFS This is the current number of assessments. MaxEF This is the maximum number of evaluations.
[0084] when EFs / MaxEFs When the tidal range is less than 0.5, fish resources are abundant in the early stages of fishing. As fishing gradually decreases, the fishing method shifts from primarily independent searching and establishing dominance by stirring the water surface, to collective encirclement as a secondary method. In the early stages of fishing, fish resources are most abundant, resulting in the highest catch rate. However, as the amount of fish caught by fishermen gradually decreases, the catch rate declines. Therefore, during the exploration process, fishermen initially rely primarily on independent searching and establishing dominance by stirring the water surface, with collective encirclement as a secondary method. As the search progresses, the environmental advantage gradually shifts from the fish to the fishermen. This shift manifests as increased water turbidity and decreased fish visibility. Continuous catching of fish schools during the search leads to a decrease in fish populations, resulting in a lower catch rate. Fishermen transition from independent exploration to primarily collective encirclement, with individual dominance as a secondary method. This shift in the fishing pattern is simulated using the catch rate parameter, denoted as α, and calculated according to the following formula:
[0085] ;
[0086] In the formula, EFs This is the current number of assessments. MaxEFs This is the maximum number of evaluations.
[0087] However, when the catch rate α is high, fishermen tend to use independent search methods, while when α decreases, they will switch to collective fishing methods. Therefore, when α > 100%, the catch rate will decrease. p Choose independent search, or choose collective capture. p Let be the probability, and be a number in the range (0,1).
[0088] When α > p At that time, each fisherman possessed some fishing experience and could independently determine the potential location of fish schools based on surface disturbances. They would adjust their exploration direction and position based on the catches of others. If the catch situation at their location was similar to the reference catch situation, they would focus on local exploration. If the reference catch situation was favorable, they would continue searching in that direction. If their own catch situation was good, they would conduct a reverse search. The update formula is as follows:
[0089] ;
[0090] ;
[0091] ;
[0092] in, Exp For fishermen With any pos th fishermen The empirical analysis value obtained for the reference object has a range of (-1, 1). pos =1 or 2 or... or N , pos ≠ i . fit max and fit min The first T The worst and best fitness values after the position update. T This indicates the number of iterations for the fisherman's location. and They represent the first T Second and third T+1 After the nth iteration i A fisherman j The position of the dimension. r s It is a random number between (0,1). Dis For the first i A fisherman and a reference pos th The Euclidean distance between fishermen. s For dimension is d A random unit vector; d This refers to the number of parameters that need to be optimized. In this embodiment, the parameters to be optimized are the structural parameters of the BP neural network model, namely the weights and thresholds. Based on empirical analysis, the main direction of travel (taking the direction the fisherman points to the reference person as the positive direction) and distance are determined. Exploration range. R Also follow Exp The absolute value and the current number of evaluations EFs It changes with the changes. R Less than or equal to Dis .
[0093] When α≤ p At that time, fishermen conduct individual, independent catches, and the location update principle is as follows:
[0094] ;
[0095] in, c It is a group of 3 to 4 fishermen, and its location has not yet been updated. Centre c for c The target point surrounded by the group. and They represent the first T +1 and T After the next update c Group 1 i A fishermanj The position of the dimension. r 2 represents the speed at which the fishermen approach the center, which varies from person to person and ranges from (0,1). r 3 represents the offset of the movement, with a value ranging from (-1, 1). EFs It gradually decreases as it increases.
[0096] when EFs / MaxEFs When the coefficient of variation is ≥0.5, all fishermen follow a unified strategy, purposefully driving stray and hidden fish to the same location for aggregation and encirclement. During the trapping process, the distribution of fishermen is as follows: the fish are centered on the school, with the aggregation gradually decreasing outwards, and the distribution range gradually shrinking. Fishermen in the center catch the school of fish, while those on the periphery catch the escaped fish. The fishermen employ strategic fishing, working together to increase the catch rate. A Gaussian distribution is used to simulate the distribution of fishermen during the trapping process, and the update formula is as follows:
[0097] ;
[0098] ;
[0099] in, GD The distribution function is Gaussian, and the overall mean is... μ The variance is 0, and the overall variance is zero. 𝜎 It increases with the number of evaluations, approaching 1 from 0. For the first i The fisherman in the first T +1 position after update. mean( Fisher ) is a matrix of the mean values of each dimension of the fishermen's center. Gbest To be the globally optimal position r 4 is a random number with values {1, 2, 3}, which distributes the fishermen across three ranges.
[0100] See Figure 1 The process involves optimizing the BP neural network model using an optimized fishing algorithm. After each iteration, the fisherman's position is perturbed using the firefly algorithm to explore new possible solutions. During the perturbation, the fisherman's position is mapped to the firefly's position. i Attracted to the fireflies j The formula for updating the position of a move is:
[0101] ;
[0102] ;
[0103] ;
[0104] In the formula,I The relative fluorescence intensity of fireflies. I 0 represents the inherent brightness of a firefly; γ The light absorption coefficient; r i,j The spatial distance between any two individuals; the inherent brightness of fireflies. I 0. Light absorption coefficient γ These parameters can be determined based on actual conditions and experience;
[0105] β Due to the mutual attraction of fireflies, β 0 represents the maximum attraction level; γ The light absorption coefficient; r i,j Spatial distance between any two individuals; maximum attraction. β 0 can be determined based on actual circumstances and experience;
[0106] x i ’ Fireflies i The updated location x i , x j Fireflies i and j The spatial location; λ is the step size factor, is a constant in (0,1); rand is a random number that follows a uniform distribution.
[0107] Satisfy the iteration conditions EFs ≤ MaxEFs At that time, the structural parameters and fitness values of the BP neural network model obtained by the fishing algorithm are output. The obtained structural parameters are input into the BP neural network model, that is, the weights and thresholds in the BP neural network model are determined. The BP neural network model is optimized through iteration, and the control parameters of SVG are trained using the optimized BP neural network model.
[0108] Figure 3 This is a diagram of the BP neural network model structure. The BP neural network model includes an input layer, hidden layers, and an output layer; the expression for the input layer is:
[0109] ;
[0110] The output of the nth neuron in the hidden layer w i The mathematical model is as follows:
[0111] ;
[0112] In the formula:c 𝑖 , b 𝑖 These are the vector values of the nth center point of the hidden layer neuron and the width vector value of the Gaussian function, respectively.
[0113] The expression for the output layer weight coefficients is:
[0114] ;
[0115] The expression for the hidden layer output is further obtained as follows:
[0116] ;
[0117] Figure 3 middle, ψ 1 ψ 2 ψ 3 is the hidden layer function;
[0118] The BP neural network model uses grid connection point voltage and reactive power error as input functions to obtain the firing angle and modulation signal amplitude in real time. The firing angle and modulation signal amplitude are the control parameters for the simulated SVG. The output layer activation function of the BP neural network model is expressed as:
[0119] ;
[0120] The mean squared error function of the BP neural network model is as follows:
[0121] ;
[0122] in, N For the sample size, and These are the actual value and the predicted value, respectively.
[0123] S3. Determine the permissible status of the SVG grid connection system, and determine whether the data error in the SVG grid connection test is qualified. If qualified, perform a blocking judgment to adjust the SVG output reactive power; otherwise, adjust the parameters of the intelligent algorithm to find the optimal solution again.
[0124] After the BP neural network model updates the control parameters of the simulated SVG, the simulated SVG outputs simulated reactive power. The error between the simulated reactive power obtained from the simulation test and the actual reactive power is used to determine if it meets the requirements. If the power error does not meet the requirements, meaning the control parameters of the simulated SVG do not meet the requirements, the structural parameters of the CFOA algorithm and the BP neural network model are adjusted and improved. This involves re-initializing the fisherman positions in the CFOA algorithm using Circle chaotic mapping, re-optimizing the weights and thresholds of the BP neural network model using the CFOA algorithm, and then using the optimized BP neural network model to adjust the control parameters of the SVG. The test error is then checked again to see if it meets the requirements. If the error meets the requirements, the process proceeds to the next stage.
[0125] S4. Check the reactive power interlocking conditions and update the dispatch information sent by the AVC substation (regulation capacity, interlocking signals, etc.).
[0126] This stage involves detecting the reactive power blocking signal conditions in the system and updating the dispatch information sent by the AVC substation, including but not limited to data such as regulating capacity and blocking signals.
[0127] The method for reducing the error of grid-connected test results of dynamic reactive power compensation devices was verified through a simulation platform.
[0128] Based on the simulation platform, relevant parameters are optimized and adjusted to adjust the simulation error of reactive power compensation devices in new energy power plants.
[0129] The fitness curve of the BP neural network model (ICFOA-BP neural network model) optimized using the improved fishing algorithm is shown below. Figure 4 As shown, the fitness function is the average mean squared error of the training and test datasets. A smaller value indicates better generalization ability and robustness of the model. Root mean squared error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE) are used as evaluation metrics for the neural network prediction model, with the following formulas:
[0130] ;
[0131] ;
[0132] ;
[0133] In the formula, n The number of samples; y i This is the actual value; These are predicted values.
[0134] Combination Figure 4As can be seen, ICFOA-BP escaped local optima and achieved better convergence accuracy, indicating that the improved BP neural network model has higher accuracy, better stability, and more efficient global optimum search capability.
[0135] Figure 5 The simulation results were compared and analyzed. The results show that the ICFOA-BP algorithm improves the grid connection test error of the dynamic reactive power compensation device, has a faster response speed, and makes the simulated SVG output more accurate and has a better supporting effect.
[0136] This embodiment provides a method for reducing simulation errors of reactive power compensation devices in new energy power plants. It introduces the CFOA algorithm, inspired by traditional rural fishing methods, simulating the process of fishermen catching fish in ponds. This process mainly consists of two stages: exploration and development. The CFOA algorithm exhibits significant advantages in global exploration, local utilization, robustness, stability, fast convergence, adaptability to complex optimization problems, and simple parameter settings, making it a powerful tool for solving various optimization problems. By improving the CFOA optimization algorithm, the optimal network structure of the BP neural network model is obtained, and the BP neural network model is optimized and trained to control the simulated SVG. Utilizing the ICFOA algorithm to optimize the BP neural network model gives the hybrid algorithm efficient global optimal search capabilities, high prediction stability, and higher accuracy.
[0137] Example 2
[0138] A device for reducing simulation errors in reactive power compensation devices, comprising:
[0139] The signal acquisition module is used to acquire signals, including the voltage and current of the SVG grid connection point, and to obtain the actual reactive power output of the SVG based on the signals.
[0140] The platform building module is used to build a simulation platform; the simulation platform includes a signal processor, a simulated SVG, and an intelligent algorithm; the simulated SVG simulates the main circuit part of the SVG; the intelligent algorithm includes a BP neural network model optimized for a fishing algorithm, and the BP neural network model is used to train the control parameters of the simulated SVG.
[0141] The simulation test module uses a signal processor to simulate the actual sampling process to obtain simulated signals. The simulated signals are then input into an intelligent algorithm, which controls the simulated SVG to output simulated reactive power based on the simulated signals. The module calculates the error between the actual reactive power and the simulated reactive power. If the power error does not meet the preset requirements, the fishing algorithm is initialized and adjusted, and the intelligent algorithm is used again to control the simulated SVG to output simulated reactive power until the power error meets the requirements.
[0142] Example 3
[0143] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a method for reducing simulation errors of a reactive power compensation device.
[0144] Example 4
[0145] A computer-readable storage medium storing a computer program that, when executed by a processor, implements a method for reducing simulation errors of a reactive power compensation device.
[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method of reducing simulation errors in a reactive power compensation device, characterized by, Includes the following steps: The system acquires signals including the voltage and current of the SVG grid connection point, obtains the target bus voltage sent by the AVC master station, and calculates the difference between the voltage of the SVG grid connection point and the target bus voltage. If the difference between the voltage of the SVG grid connection point and the target bus voltage does not cross the dead zone, the voltage and current of the SVG grid connection point are acquired again, and the difference between the voltage of the SVG grid connection point and the target bus voltage is calculated again. If the difference between the voltage of the SVG grid connection point and the target bus voltage crosses the dead zone, the actual reactive power output by the SVG is obtained based on the signals. A simulation platform is constructed; the simulation platform includes a signal processor, a simulated SVG, and an intelligent algorithm; the simulated SVG simulates the main circuit part of the SVG; the intelligent algorithm includes a BP neural network model optimized by a fishing algorithm, the BP neural network model being used to train the control parameters of the simulated SVG; the BP neural network model is optimized using the fishing algorithm, including the following steps: the fishing algorithm is initialized and adjusted using the Circle chaotic mapping to obtain the solution space of the fishing algorithm, the Circle mapping being represented as: In the formula, a , b The values are 0.5 and 0.2, which are control parameters; mod is the modulo function. r i+1 , r i , r k The chaotic orbital state value is a random number generated during each iteration of the chaotic mapping, ranging from (0,1). The structural parameters of the BP neural network model constitute the position vector of the fishermen in the solution space. The fitness value is obtained based on the current position vector of the fishermen, and the fishermen's position is updated using the fitness value. Global search is achieved through multiple iterations. When EFs / MaxEFs < 0.5, global exploration is performed; when EFs / MaxEFs ≥ 0.5, development is performed. EFS is the current number of evaluations, and MaxEFs is the maximum number of evaluations. After each iteration, the position of the fishermen in the fishing algorithm is perturbed using the firefly algorithm. During perturbation, the fishermen's position is mapped to the firefly's position. The structural parameters of the BP neural network model are optimized. If the obtained structural parameters do not meet the preset iteration count condition, the fishing algorithm is used again to perform a global search for the fishermen. If the obtained structural parameters meet the preset iteration count condition, the obtained structural parameters are the optimal structural parameters of the BP neural network model. A signal processor is used to simulate the actual sampling process to obtain the simulation signal. The simulation signal is then input into an intelligent algorithm, which controls the simulated SVG to output the simulated reactive power based on the simulation signal. Calculate the error between the actual reactive power and the simulated reactive power. If the power error does not meet the preset requirements, the fishing algorithm is initialized and adjusted, and the intelligent algorithm is used again to control the simulated SVG to output the simulated reactive power until the power error meets the requirements.
2. The method for reducing simulation error of reactive power compensation device according to claim 1, characterized in that, The simulated signals include the voltage and current at the grid connection point in the simulated SVG.
3. The method for reducing simulation errors of reactive power compensation devices according to claim 1, characterized in that, The control parameters of the simulated SVG include the firing angle and the amplitude of the modulation signal.
4. The method for reducing simulation errors of reactive power compensation devices according to claim 1, characterized in that, The optimized BP neural network model for the fishing algorithm includes an input layer, a hidden layer, and an output layer; The fishing algorithm is used to obtain the structural parameters of the BP neural network model, which include weights and thresholds.
5. The method for reducing simulation errors of reactive power compensation devices according to claim 1, characterized in that, In the firefly algorithm, fireflies i Attracted to the fireflies j The distance traveled is affected by fireflies. i With fireflies j The distance between them, fireflies i With fireflies j The influence of mutual attraction between them.
6. An apparatus for reducing simulation error in a reactive compensation device, comprising: include: The signal acquisition module is used to acquire signals, including the voltage and current of the SVG grid connection point, obtain the target bus voltage sent by the AVC master station, and calculate the difference between the voltage of the SVG grid connection point and the target bus voltage. If the difference between the voltage of the SVG grid connection point and the target bus voltage does not cross the dead zone, the voltage and current of the SVG grid connection point are reacquired, and the difference between the voltage of the SVG grid connection point and the target bus voltage is calculated again. If the difference between the voltage of the SVG grid connection point and the target bus voltage crosses the dead zone, the actual reactive power output by the SVG is obtained based on the signal. The platform construction module is used to build a simulation platform. The simulation platform includes a signal processor, a simulated SVG, and an intelligent algorithm. The simulated SVG simulates the main circuit part of the SVG. The intelligent algorithm includes a BP neural network model optimized by a fishing algorithm. The BP neural network model is used to train the control parameters of the simulated SVG. The optimization of the BP neural network model using the fishing algorithm includes the following steps: initializing and adjusting the fishing algorithm using the Circle chaotic mapping to obtain the solution space of the fishing algorithm. The Circle mapping is represented as: In the formula, a , b The values are 0.5 and 0.2, which are control parameters; mod is the modulo function. r i+1 , r i , r k The chaotic orbital state value is a random number generated during each iteration of the chaotic mapping, ranging from (0,1). The structural parameters of the BP neural network model constitute the position vector of the fishermen in the solution space. The fitness value is obtained based on the current position vector of the fishermen, and the fishermen's position is updated using the fitness value. Global search is achieved through multiple iterations. When EFs / MaxEFs < 0.5, global exploration is performed; when EFs / MaxEFs ≥ 0.5, development is performed. EFS is the current number of evaluations, and MaxEFs is the maximum number of evaluations. After each iteration, the position of the fishermen in the fishing algorithm is perturbed using the firefly algorithm. During perturbation, the fishermen's position is mapped to the firefly's position. The structural parameters of the BP neural network model are optimized. If the obtained structural parameters do not meet the preset iteration count condition, the fishing algorithm is used again to perform a global search for the fishermen. If the obtained structural parameters meet the preset iteration count condition, the obtained structural parameters are the optimal structural parameters of the BP neural network model. The simulation test module is used to obtain simulated signals by simulating the actual sampling process using a signal processor. The simulated signals are then input into an intelligent algorithm, which controls the simulated SVG to output simulated reactive power based on the simulated signals. The module calculates the error between the actual reactive power and the simulated reactive power. If the power error does not meet the preset requirements, the fishing algorithm is initialized and adjusted, and the intelligent algorithm is used again to control the simulated SVG to output simulated reactive power until the power error meets the requirements.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for reducing simulation error of a reactive power compensation device as described in any one of claims 1-5.
8. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for reducing simulation error of a reactive power compensation device as described in any one of claims 1-5.