An electromagnetic transient model construction method and device, a terminal device and a storage medium

CN122655671APending Publication Date: 2026-08-28ELECTRIC POWER RES INST OF GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610844120.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-11
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

[0003]本发明实施例提供了一种电磁暂态模型构建方法、装置、终端设备和存储介质,能够解决现有从机电暂态模型转换为电磁暂态模型时,需要依赖人工对异常参数进行调参,降低模型转换效率的问题

Benefits of technology

本发明实施例提供了一种电磁暂态模型构建方法、装置、终端设备和存储介质,通过先获取机电暂态模型及其稳态与运行响应特性,并依据预定义映射关系生成初始电磁暂态模型,通过参数修正模型在训练过程中引入参数误差项和响应误差项的双重约束,使得参数修正模型能根据初始参数和响应特征,生成满足动态响应特性的最优参数。在线应用时,参数修正模型可将不符合响应特性或缺失的异常参数调整至满足机电暂态模型的动态响应特性的取值区间,实现了对参数的快速补偿,有效解决了人工调参复杂以及效率低下的问题,缩短了电磁暂态模型的建模周期。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122655671A_ABST
    Figure CN122655671A_ABST
Patent Text Reader

Abstract

The application discloses a kind of electromagnetic transient model construction method, device, terminal equipment and storage medium, belong to electric power model construction technical field, above-mentioned method first obtains the electromechanical transient model of to-be-converted electric power system and operating response characteristic;Electromechanical transient model is converted into corresponding initial electromagnetic transient model and determines initial electromagnetic transient model parameter;Initial electromagnetic transient model parameter and operating response characteristic are input into trained parameter correction model, so that parameter correction model outputs electromagnetic transient model candidate parameter;According to electromagnetic transient model candidate parameter, electromagnetic transient model is constructed;Parameter correction model is input with initial electromagnetic transient model parameter sample, operating response characteristic sample of electromechanical transient model and actual equivalent electromagnetic transient model parameter, and is obtained after iterative training with predicted equivalent electromagnetic transient model parameter as output;By implementing the present application, the problems of complex and low efficiency of manual parameter adjustment can be effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power model construction technology, and in particular to a method, apparatus, terminal equipment, and storage medium for constructing an electromagnetic transient model. Background Technology

[0002] Currently, with the large-scale application of new energy and power electronic devices in power systems, the electromagnetic transient characteristics of these systems are becoming increasingly significant. Electromagnetic transient simulation has become a key tool for planning, operation analysis, and equipment design. However, electromagnetic transient models have numerous parameters, high accuracy, and complex construction. In engineering, existing electromechanical transient models (such as BPA and PSASP) are often used as a basis, and converted into electromagnetic transient models (such as PSCAD) through empirical rules or database averages to inherit the network structure and achieve rapid modeling. However, electromechanical models themselves are simplified descriptions of electromagnetic transients, and the parameter system differs in granularity from that of electromagnetic models. During the conversion process, problems such as missing parameters, abnormal parameters, and insufficient applicability to operating conditions commonly occur. Existing model conversion methods mostly rely on empirical rules or database averages to supplement missing parameters, and abnormal parameters are mainly corrected by repeated manual parameter tuning, which is inefficient and reduces the efficiency of model conversion. Summary of the Invention

[0003] This invention provides a method, apparatus, terminal device, and storage medium for constructing an electromagnetic transient model, which can solve the problem that existing methods for converting electromechanical transient models to electromagnetic transient models require manual adjustment of abnormal parameters, thus reducing the efficiency of model conversion.

[0004] An embodiment of the present invention provides a method for constructing an electromagnetic transient model, comprising: acquiring an electromechanical transient model of a power system to be converted and the operational response characteristics of the electromechanical transient model under a given operating condition; According to the predefined mapping relationship, the electromechanical transient model is converted into the corresponding initial electromagnetic transient model, and the initial electromagnetic transient model parameters are determined. The initial electromagnetic transient model parameters and the operational response characteristics are input into a trained parameter correction model to output candidate electromagnetic transient model parameters that satisfy the operational response characteristics. The parameter correction model is obtained through iterative training, using initial electromagnetic transient model parameter samples, operational response characteristic samples of the electromechanical transient model, and actual equivalent electromagnetic transient model parameters as inputs, and predicted equivalent electromagnetic transient model parameters as outputs. During each training iteration, a parameter error term is constructed based on the difference between the predicted equivalent electromagnetic transient model parameters and the actual equivalent electromagnetic transient model parameters. A response error term is constructed based on the comparison between the response variable obtained after electromagnetic transient simulation of the predicted equivalent electromagnetic transient model parameters and the operational response characteristic samples. A loss function value is generated based on the parameter error term and the response error term. The network parameters of the parameter correction model are adjusted based on the loss function value. Based on the candidate parameters of the electromagnetic transient model, the final electromagnetic transient model is constructed.

[0005] Furthermore, the determination of the initial electromagnetic transient model parameter samples includes the following process: In the actual equivalent electromagnetic transient model parameters, several parameters are randomly shifted or deleted to generate an initial electromagnetic transient model parameter sample.

[0006] Furthermore, based on the comparison results between the response variables obtained after performing electromagnetic transient simulation on the predicted equivalent electromagnetic transient model parameters and the samples of operational response characteristics, including: The response variables obtained after electromagnetic transient simulation of the predicted equivalent electromagnetic transient model parameters are compared with the operating response characteristic samples according to the following formulas to obtain the power response error, speed response error, and power angle response error: ; ; ; ; The response error term is constructed based on the power response error, speed response error, and power angle response error. in, , , These are the power dynamic offset, speed dynamic offset, and power angle dynamic offset obtained by performing electromagnetic transient simulation under a given operating condition based on the predicted equivalent electromagnetic transient model parameters. , , These are the power dynamic offset, speed dynamic offset, and power angle dynamic offset obtained by the electromechanical transient model under a given operating condition, respectively. , , These represent power response error, speed response error, and power angle response error, respectively. , , These represent the permissible error thresholds for power, speed, and power angle, respectively. For the equivalence constraint judgment set, only , , When all three constraints are met simultaneously, It will take effect, otherwise, It is not effective.

[0007] Furthermore, the formula for calculating the loss function value is as follows: ; In the formula, L is the value of the loss function; For parameter error; To predict the parameters of the equivalent electromagnetic transient model; These are the parameters of the actual equivalent electromagnetic transient model; The set of response errors includes: power response error, speed response error, and power angle response error; The error is the i-th response in the response set; , For the weighting coefficients, satisfying .

[0008] Furthermore, based on the candidate parameters of the electromagnetic transient model, an electromagnetic transient model is constructed, including: Based on the candidate parameters of the electromagnetic transient model, a candidate electromagnetic transient model is constructed; Under a given operating condition, electromagnetic transient simulation is performed on the candidate electromagnetic transient model, and the equivalent consistency verification is performed on the candidate electromagnetic transient model based on the simulation results and the operating response characteristics of the electromechanical transient model. If the equivalent consistency check is passed, the candidate electromagnetic transient model is adopted as the final electromagnetic transient model.

[0009] Furthermore, based on the simulation results and the operational response characteristics of the electromechanical transient model, an equivalent consistency verification is performed on the candidate electromagnetic transient model, including: Based on the simulation results and the operational response characteristics of the electromechanical transient model, the value of the comprehensive equivalent error function is calculated using the following formula: ; If the function value is less than a preset comprehensive error threshold, the equivalent consistency check is deemed to have passed; otherwise, the equivalent consistency check is deemed to have failed. in, The function value of the comprehensive equivalent error function, For the k-th response variable in the simulation results, Let K be the k-th response variable in the electromechanical transient model's operational response characteristics, where K is the total number of response variables. Here, T represents the weighting coefficient, and T represents the response time window. These are candidate parameters for the electromagnetic transient model.

[0010] Furthermore, it also includes: In the absence of passing the equivalence consistency check, a small perturbation is applied to each parameter in the candidate parameters of the electromagnetic transient model, and the change in the function value of the preset comprehensive equivalent error function before and after the perturbation is calculated. The change in the function value is used as the parameter sensitivity of the corresponding parameter. Based on parameter sensitivity, the candidate parameters of the electromagnetic transient model are sorted from largest to smallest, and a predetermined number of the top-ranked candidate parameters are determined as sensitive parameters. Calculate the gradient of the comprehensive equivalent error function with respect to each sensitive parameter, and iteratively update each sensitive parameter according to the gradient descent direction until the convergence condition is met or the maximum number of iterations is reached. An embodiment of the present invention provides an electromagnetic transient model construction device, comprising: The parameter acquisition module is used for the electromechanical transient model of the power system to be converted and the operating response characteristics of the electromechanical transient model under given operating conditions. The model structure generation module is used to convert the electromechanical transient model into the corresponding initial electromagnetic transient model based on the predefined mapping relationship, and to determine the initial electromagnetic model parameters of the initial electromagnetic transient model. The model parameter correction module is used to input the initial electromagnetic model parameters and the running response characteristics into the trained parameter correction model so that the parameter correction model outputs electromagnetic transient model candidate parameters that meet the running response characteristics. The model output module is used to construct an electromagnetic transient model based on the candidate parameters of the electromagnetic transient model.

[0011] An embodiment of the present invention provides a terminal device, including: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor; wherein, when the processor executes the computer program, it implements the electromagnetic transient model construction method according to any one of the present invention.

[0012] One embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to execute the electromagnetic transient model construction method according to any one of the present invention.

[0013] The embodiments of the present invention have the following beneficial effects: This invention provides a method, apparatus, terminal device, and storage medium for constructing an electromagnetic transient model. It first acquires the electromechanical transient model and its steady-state and operational response characteristics, and generates an initial electromagnetic transient model based on a predefined mapping relationship. During training, a parameter correction model introduces dual constraints of parameter error terms and response error terms, enabling the model to generate optimal parameters that satisfy the dynamic response characteristics based on the initial parameters and response features. In online applications, the parameter correction model can adjust abnormal parameters that do not conform to the response characteristics or are missing to a range that satisfies the dynamic response characteristics of the electromechanical transient model, achieving rapid parameter compensation. This effectively solves the problems of complexity and inefficiency in manual parameter tuning, and shortens the modeling cycle of the electromagnetic transient model. Attached Figure Description

[0014] Figure 1 This is a flowchart illustrating an electromagnetic transient model construction method provided in an embodiment of the present invention.

[0015] Figure 2 This is a comparison diagram of the reactive power response of a generator in the original electromechanical model before and after parameter optimization of the electromagnetic model provided in an embodiment of the present invention.

[0016] Figure 3 This is a comparison diagram of the active power response of a certain machine terminal of the electromagnetic model before and after parameter optimization and the original electromechanical model, provided in an embodiment of the present invention.

[0017] Figure 4 This is a comparison diagram of the voltage response of a certain terminal of an electromagnetic model before and after parameter optimization, and the original electromechanical model, provided in an embodiment of the present invention.

[0018] Figure 5 This is a schematic diagram of an electromagnetic transient model construction device provided in an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0021] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0022] Please see Figure 1 An embodiment of the present invention provides a method for constructing an electromagnetic transient model, comprising: S1: Obtain the electromechanical transient model of the power system to be converted and its operational response characteristics under given operating conditions. S1 includes the following sub-steps: S11: Read the electromechanical model parameters of the generator and other dynamic components, as well as the control system parameters related to the dynamic components, from the existing electromechanical transient simulation model or model dataset.

[0023] In this embodiment of the invention, the set of dynamic elements in the electromechanical transient model is defined as: ; Each of them This represents a model instance of a dynamic element. This indicates the total number of dynamic elements.

[0024] In this embodiment, for any dynamic element The parameter vector of dynamic elements Defined as: ; in, Represents the moment of inertia constant; Indicates the damping coefficient; These represent synchronous reactance, transient reactance, and next-state reactance, respectively. These represent the transient time constant and the next-state time constant, respectively.

[0025] In addition to the electromechanical parameters corresponding to the dynamic components mentioned above, the electromechanical transient model also includes network component parameters, which include the transformer turns ratio and impedance, the transmission line resistance, reactance, and ground capacitance, as well as the active power, reactive power, and load model parameters of the load.

[0026] Furthermore, in this embodiment, control system parameters related to the dynamic element are also read simultaneously, including excitation system parameters, speed regulation system parameters, and other dynamic control parameters. These control parameters are used for parameter initialization of the subsequent electromagnetic model control module.

[0027] In this embodiment of the invention, the above-mentioned model parameters and control parameters are mainly derived from existing electromechanical transient simulation model files or model databases, such as BPA format or other standard electromechanical simulation data files, which already contain parameter information of generators, power electronic equipment and their auxiliary control systems.

[0028] In some cases, if the electromechanical model data does not contain complete control parameters, the relevant control parameters can be initially set based on typical equipment parameters, equipment design data, or engineering experience to form the initial parameter set for the subsequent electromagnetic transient model. These initial parameters will be further optimized and corrected based on differences in system response during subsequent dynamic parameter tuning.

[0029] S12: Obtain the operating response characteristics of the electromechanical transient model of the power system to be converted under given operating conditions.

[0030] In one embodiment of the present invention, by applying given operating conditions or disturbance conditions to the electromechanical transient model for simulation calculation, the key dynamic response variables of the system are obtained. Specifically, the PSASP electromechanical transient simulation software is used to simulate the above operating conditions to obtain the characteristic curves of the key dynamic response variables of the system, including characteristic curves of generator speed deviation, power angle change, electromagnetic power change, and bus voltage dynamic response. The dynamic response characteristics are used to characterize the dynamic behavior of the electromechanical transient model under the above operating conditions and serve as a reference for model equivalence evaluation when constructing the electromagnetic transient model, so that the dynamic behavior of the electromagnetic model is consistent with or close to that of the electromechanical model, thereby achieving an equivalent conversion from the electromechanical model to the electromagnetic model.

[0031] S2: According to the predefined mapping relationship, convert the electromechanical transient model into the corresponding initial electromagnetic transient model, and determine the initial electromagnetic transient model parameters.

[0032] In one embodiment of the present invention, based on the type of prime mover speed control system, excitation system and stabilizer model used in the electromechanical transient model, a corresponding electromagnetic transient model structure is generated according to a predefined model correspondence.

[0033] In this embodiment of the invention, the mapping relationship is a well-known and widely used electromechanical-electromagnetic model mapping rule in engineering. It is used to map the functional modules describing the dynamic behavior of the generator in the electromechanical transient model to an executable equivalent model structure in the electromagnetic transient simulation environment. The electromagnetic transient simulation environment can be implemented using PSCAD / EMTDC, and the mapping relationship includes at least the following: The prime mover and speed control system in the electromechanical transient model are mapped to the equivalent speed control and power control structure in the electromagnetic transient model. For example, the classical second-order model in the electromechanical transient model is mapped to the detailed model of the sixth-order Park equation in the electromagnetic transient model, which includes the dynamic processes of the stator winding, excitation winding and damping winding. The excitation system in the electromechanical transient model is mapped to the corresponding electromagnetic excitation and voltage regulation model. For example, the standard excitation models such as IEEE ST1A / ST2A / ST3A are directly mapped to the corresponding standard excitation modules in PSCAD. Map the power system stabilizer in the electromechanical transient model to the additional control module in the electromagnetic transient model. For example, map the standard PSS model such as IEEE PSS1A / PSS2A to the corresponding additional control module in PSCAD. In this embodiment of the invention, the mapping relationship is a predefined and configurable set of rules, which is used to generate the structural topology of the electromagnetic model and the connection relationship of the control module, without involving the final determination of the model parameter values. That is, the initial electromagnetic model parameters are initial parameters that are directly assigned according to the mapping relationship and have not yet been corrected.

[0034] S3: Input the initial electromagnetic transient model parameters and the operational response characteristics into the trained parameter correction model so that the parameter correction model outputs electromagnetic transient model candidate parameters that satisfy the operational response characteristics; wherein, the parameter correction model is obtained by iterative training with the initial electromagnetic transient model parameter samples, the operational response characteristic samples of the electromechanical transient model, and the actual equivalent electromagnetic transient model parameters as inputs, and the predicted equivalent electromagnetic transient model parameters as outputs; in each training, a parameter error term is constructed based on the difference between the predicted equivalent electromagnetic transient model parameters and the actual equivalent electromagnetic transient model parameters, and a response error term is constructed based on the comparison result between the response variable obtained after electromagnetic transient simulation of the predicted equivalent electromagnetic transient model parameters and the operational response characteristic samples, and a loss function value is generated based on the parameter error term and the response error term; the network parameters of the parameter correction model are adjusted based on the loss function value.

[0035] In one embodiment of the present invention, a deep fully connected neural network (DNN) is used as a parameter correction model, which includes an input layer, three hidden layers and an output layer.

[0036] Input layer: Number of nodes = Initial parameter vector dimension + Response characteristic feature vector dimension. For a single generator, the initial parameter vector dimension is set to 15 (including key parameters of the generator body and excitation system), and the response characteristic feature vector dimension is 300 (100 sampling points are set for power, speed, and power angle respectively to construct the response characteristic curve), therefore the number of input layer nodes is 315.

[0037] Hidden layer 1: 256 nodes, ReLU activation function; Hidden layer 2: 128 nodes, ReLU activation function; Hidden layer 3: 64 nodes, activation function is ReLU.

[0038] Output layer: Number of nodes = Dimension of electromagnetic transient model parameters (15), activation function is a linear function, output the corrected electromagnetic transient model parameter vector.

[0039] In one embodiment of the present invention, during each training iteration, a parameter error term is constructed based on the difference between the predicted equivalent electromagnetic transient model parameters and the actual equivalent electromagnetic transient model parameters. The predicted equivalent electromagnetic transient model parameters are the electromagnetic model parameters to be verified output by the parameter correction neural network after forward inference in the current iteration. A response error term is constructed based on the comparison between the response variables obtained from electromagnetic transient simulation of the predicted equivalent electromagnetic transient model parameters and the running response characteristic samples. A loss function value is generated based on the parameter error term and the response error term; the network parameters of the parameter correction model are adjusted based on the loss function value. The comparison between the response variables obtained from electromagnetic transient simulation of the predicted equivalent electromagnetic transient model parameters and the running response characteristic samples includes the following process: In each iteration of the parameter correction model training process, electromagnetic transient simulations need to be performed on the currently predicted equivalent electromagnetic transient model parameters. The simulated dynamic response variables are then compared with the operational response characteristic samples of the electromechanical transient model to construct a response error term, thereby constraining the dynamic behavior of the electromagnetic model corresponding to the predicted parameters to remain consistent with that of the electromechanical model. Specifically, the power response error, speed response error, and power angle response error are calculated according to the following formulas: ; ; ; in, , , These are the power dynamic offset, speed dynamic offset, and power angle dynamic offset obtained by performing electromagnetic transient simulation under a given operating condition, based on the parameters of the predicted equivalent electromagnetic transient model, which are exactly the same as the electromechanical transient model. , , These are the power dynamic offset, speed dynamic offset, and power angle dynamic offset obtained by the electromechanical transient model under a given operating condition, respectively. , , These represent the power response error, speed response error, and power angle response error, respectively; T is the total simulation duration, t is the discrete simulation time step, and the summation range of the summation term in the formula is multiple discrete time points set within the time interval from t=0 to t=T.

[0040] The above response error adopts the normalized mean square error form, which can eliminate the influence of the difference in the amplitude of different response variables on the error calculation, more accurately reflect the shape consistency of the dynamic response curve, and avoid the error calculation result being dominated by the excessive amplitude of a certain variable.

[0041] To ensure that the electromagnetic model corresponding to the predicted parameters meets the basic engineering equivalence requirements, the following hard constraints are set: ; in, , , These represent the permissible error thresholds for power, speed, and power angle, respectively. This is the equivalence constraint judgment set, which is the constraint criterion for evaluating whether the dynamic characteristics of the electromagnetic transient model corresponding to the parameters of the currently predicted equivalent electromagnetic transient model meet the engineering equivalence standard. Only... , , When all three constraints are met simultaneously, If the prediction is successful, it determines that the dynamic characteristics of the electromagnetic transient model corresponding to the parameters of the currently predicted equivalent electromagnetic transient model meet the engineering equivalence standard, provided that any one of the response errors exceeds the set allowable error threshold. If it is ineffective, it is determined that the dynamic characteristics of the electromagnetic transient model corresponding to the parameters of the currently predicted equivalent electromagnetic transient model do not meet the engineering equivalence standard.

[0042] Based on the calculated power response error, speed response error, and power angle response error, a set of response errors is constructed, and the three response errors in the set are arithmetically summed to generate a response error term.

[0043] In the single-batch iterative training process of the parameter correction model The verification step is placed between the single parameter prediction and loss calculation stages: after each round of network parameter prediction, electromagnetic transient simulation is performed using the predicted parameters, and the above three errors are solved to complete the process. Verification, if If effective, calculate the total loss normally using the original weights and backpropagate to optimize the network; if If the equivalent accuracy does not meet the engineering lower limit, the training process automatically increases the proportion of the response error term in the total loss, increases the backpropagation gradient magnitude, and drives the neural network to significantly correct the parameter prediction pattern until the simulation results corresponding to the predicted equivalent electromagnetic transient model parameters in subsequent iterations meet the requirements. All constraints.

[0044] The loss function value is generated based on the parameter error term and the response error term. The network parameters of the parameter correction model are then adjusted based on the loss function value. The formula for calculating the loss function value is as follows: ; In the formula, L is the value of the loss function; For parameter error; To predict the parameters of the equivalent electromagnetic transient model; These are the parameters of the actual equivalent electromagnetic transient model; These are the parameters of the actual equivalent electromagnetic transient model; The set of response errors includes: power response error, speed response error, and power angle response error; The error is the i-th response in the response set; , For the weighting coefficients, satisfying .

[0045] For example, the training process of a parameter correction model includes: We collected 1200 sets of actual equivalent electromagnetic transient model parameters that have been verified by manual fine-tuning, covering steam turbine generators and hydro turbine generators with capacities ranging from 100MW to 1000MW, as well as the mainstream excitation system and speed control system types; For each set of actual equivalent electromagnetic transient model parameters, several parameters are randomly shifted or deleted to generate an initial electromagnetic transient model parameter sample, for example: Randomly select 10%-30% of the parameters and apply a uniform random offset of ±10%-±50% to simulate parameter transformation error; Randomly delete 5%-15% of the parameters and replace them with typical values ​​from similar devices to simulate parameter loss.

[0046] For each set of initial electromagnetic transient model parameter samples, the electromechanical transient model is simulated under the same given operating conditions as in step S12 to obtain the operating response characteristic samples. The runtime response characteristic samples were divided into training set, validation set and test set in a ratio of 8:1:1.

[0047] The Adam optimizer is used to iteratively train the parameter-corrected model using predefined training parameters until the maximum number of training iterations is reached or the loss function converges. The specific training parameters can be adjusted accordingly based on the actual training process.

[0048] S4: Construct a candidate electromagnetic transient model based on the candidate parameters of the electromagnetic transient model, including the following sub-steps: S41: Under a given operating condition, perform electromagnetic transient simulation on the candidate electromagnetic transient model, and perform equivalent consistency verification on the candidate electromagnetic transient model based on the simulation results and the operating response characteristics of the electromechanical transient model. In this embodiment of the invention, the candidate parameters of the electromagnetic transient model output by the parameter correction model are substituted into the electromagnetic transient simulation environment, and given operating conditions or disturbance conditions consistent with those of the electromechanical transient model are applied to simulate and calculate its dynamic response process, thereby obtaining multiple response variables.

[0049] Furthermore, based on the simulation results and the operational response characteristics of the electromechanical transient model, an equivalent consistency verification is performed on the candidate electromagnetic transient model, including: Based on the simulation results and the operational response characteristics of the electromechanical transient model, the value of the comprehensive equivalent error function is calculated using the following formula: ; If the function value is less than the preset comprehensive error threshold, the equivalent consistency check is deemed to have passed and the process proceeds to the next step; otherwise, the equivalent consistency check is deemed to have failed. in, The function value of the comprehensive equivalent error function, For the k-th response variable in the simulation results, Let K be the k-th response variable in the electromechanical transient model's operational response characteristics, where K is the total number of response variables. Here, T represents the weighting coefficient, and T represents the response time window. These are candidate parameters for the electromagnetic transient model. The response variables include: Active power response ; Reactive power response Q ; Node voltage amplitude V ; It can be expanded or tailored according to the system modeling requirements.

[0050] S42: If the equivalent consistency check is passed, the candidate electromagnetic transient model shall be adopted as the final electromagnetic transient model.

[0051] In one embodiment of the present invention, the candidate electromagnetic transient models that have passed the equivalence verification are manually reviewed and confirmed, and the final electromagnetic transient model is output, including the following process: Candidate electromagnetic transient models that pass the equivalence verification are submitted to the manual review stage, where the reasonableness of their parameters, engineering interpretability, and applicability to the application scenario are comprehensively evaluated. The manual review primarily confirms whether the candidate electromagnetic transient models conform to actual engineering experience and application requirements.

[0052] When the manual review confirms that the model meets the usage requirements, the candidate electromagnetic transient model is output as the final modeling result for subsequent electromagnetic transient simulation analysis. If the manual review believes that the model still needs adjustment, it can be returned to S3 to further revise the candidate electromagnetic transient model until it meets the modeling requirements.

[0053] In one embodiment of the present invention, if the equivalent consistency check fails, return to S3 to optimize the candidate electromagnetic transient model, including applying a small perturbation to each parameter in the candidate parameters of the electromagnetic transient model, calculating the change in the function value of the preset comprehensive equivalent error function before and after the perturbation, and using the change in the function value as the parameter sensitivity of the corresponding parameter. Based on parameter sensitivity, the candidate parameters of the electromagnetic transient model are sorted from largest to smallest, and a predetermined number of the top-ranked candidate parameters are determined as sensitive parameters. Calculate the gradient of the comprehensive equivalent error function with respect to each sensitive parameter, and iteratively update each sensitive parameter according to the gradient descent direction until the convergence condition is met or the maximum number of iterations is reached.

[0054] In this embodiment of the invention, each parameter in the candidate parameters of the electromagnetic transient model... Apply small perturbation The change in the error function before and after the disturbance is calculated to obtain the parameter sensitivity. The formula for calculating the parameter sensitivity is: ; in, Indicates parameters Sensitivity to the comprehensive equivalent error function; This represents the function value of the comprehensive equivalent error function.

[0055] Based on parameter sensitivity, candidate parameters of the electromagnetic transient model are sorted from largest to smallest, and a predetermined number of candidate parameters at the top of the sort are determined as sensitive parameters.

[0056] The gradient of the comprehensive equivalent error function with respect to the parameter vectors corresponding to each sensitive parameter is calculated using the following formula: ; in, To synthesize the equivalent error function in the parameter vector The gradient vector at a given point represents the rate of change and direction of descent of the overall error along each parameter. These are the 1st, 2nd, and so on up to the nth independent parameters to be optimized in the parameter vector, where n represents the total number of sensitive parameters selected in this round. To synthesize the equivalent error function for the nth sensitive parameter The partial derivatives of .

[0057] The sensitive parameters are then jointly iteratively updated based on the direction of the gradient vector, and the update formula is as follows: ; in, To optimize step size; This represents the number of iterations. This is the parameter vector before the k-th iteration of optimization; This is the updated parameter vector obtained after the k-th iteration of optimization; The parameter takes the value of The corresponding comprehensive equivalent error gradient is used to correct the model parameters along the gradient in the opposite direction using the gradient update formula, gradually reducing the comprehensive equivalent error until the function value corresponding to the comprehensive equivalent error function is lower than the comprehensive error threshold, thus completing the secondary optimization of the candidate parameters of the electromagnetic transient model.

[0058] Through the above sensitivity analysis and gradient optimization methods, multiple key parameters can be identified and adjusted together, thereby gradually reducing the response error between the electromagnetic model and the electromechanical model.

[0059] To further illustrate the above parameter sensitivity analysis and optimization process, in this embodiment, the parameters in the grid-side converter control system are selected as the adjustment objects, and the changes before and after parameter adjustment are compared, as shown in Table 1.

[0060] The sensitive parameters include the proportional-integral (PI) control parameters for the d-axis and q-axis of the current inner loop, the DC voltage outer loop control parameters, the reactive power control parameters, and the current limiting constraint parameters. These parameters were selected through sensitivity analysis and are considered to have a significant impact on the equivalent error. The results before and after parameter tuning are shown below. Figure 2 , Figure 3 and Figure 4 As shown, the response curves of the electromagnetic model and the electromechanical model are basically consistent after parameter adjustment.

[0061] Table 1: Comparison of key parameters before and after optimization When the optimized electromagnetic model meets the equivalence consistency judgment condition again, the judgment parameter determination is completed; if multiple optimizations still fail to meet the consistency requirements (i.e., fail), the current candidate electromagnetic transient model is marked as an unusable scheme, and S3 is rolled back to re-execute the electromagnetic transient model candidate parameter generation process.

[0062] In a specific embodiment of the present invention, a power system including a single synchronous generator and a new energy grid-connected device is taken as the object. First, its electromechanical transient model is established in BPA software. The model includes equivalent models of the synchronous generator, excitation system, speed regulation system and new energy grid-connected unit.

[0063] Under given operating conditions (such as three-phase short circuit or sudden load change), the key dynamic response curves of the system are obtained through electromechanical transient simulation, including the dynamic changes of generator active power, speed deviation, power angle change and grid connection point bus voltage.

[0064] Based on the above electromechanical transient model and its response characteristics, the electromagnetic transient model structure is constructed according to the method of this invention, and reasonable value ranges are established for the equivalent resistance, inductance, and capacitance parameters and control system parameters in the electromagnetic model. Furthermore, the key parameters are preliminarily predicted using a neural network model, and the parameters are optimized by combining the consistency evaluation function and sensitivity analysis method to obtain the final electromagnetic transient model parameter set.

[0065] The constructed electromagnetic transient model was imported into the PSCAD / EMTDC simulation platform to establish a single-unit-new energy system electromagnetic transient simulation model corresponding to the BPA model. Under the same disturbance conditions, electromagnetic transient simulations were performed on the system to obtain the corresponding power response, frequency change, and voltage dynamic process.

[0066] Comparing the simulation results of the electromechanical transient model and the electromagnetic transient model, it was found that the two maintain good consistency in the main dynamic characteristics. At the same time, the electromagnetic transient model can further reflect the rapid electromagnetic transient process and control details in the new energy grid-connected system, thus verifying the effectiveness and engineering applicability of the method of the present invention in the conversion of the electromechanical model to the electromagnetic model.

[0067] Please see Figure 5 Based on the same inventive concept as the above embodiments, the present invention also provides a device for converting an electromechanical transient model to an electromagnetic transient model, comprising at least: The parameter acquisition module is used to acquire the electromechanical transient model of the power system to be converted and the operating response characteristics of the electromechanical transient model under given operating conditions; In one embodiment of the present invention, the parameter acquisition module includes a data acquisition unit and a simulation unit, wherein the data acquisition unit and the simulation unit are configured to perform the following process: The data acquisition unit is used to read the electromechanical model parameters of the generator and other dynamic components, as well as the control system parameters related to the dynamic components, from the existing electromechanical transient simulation model or model dataset. The control system parameters related to the dynamic components include excitation system parameters, speed regulation system parameters, and other dynamic control parameters.

[0068] The simulation unit is used to perform simulation analysis on the electromechanical transient model under various given operating conditions. The given operating conditions include at least steady-state operating conditions, small disturbance operating conditions, and large disturbance operating conditions, in order to obtain the dynamic response characteristics of the electromechanical model at different time scales.

[0069] In one embodiment of the present invention, the simulation unit performs simulation calculations by applying given operating conditions or disturbance conditions to the electromechanical transient model to obtain the key dynamic response variables of the system. Specifically, the parameter acquisition module has a built-in PSASP electromechanical transient simulation program calling interface, imports the IEEE 39-node system electromechanical model stored in a BPA format .dat file, and can automatically perform simulation analysis under multiple given operating conditions. The given operating conditions specifically include steady-state operating conditions, small disturbance operating conditions, and large disturbance operating conditions. Simulations are performed on the above operating conditions to obtain the characteristic curves of the key dynamic response variables of the system, including characteristic curves of generator speed deviation, power angle change, electromagnetic power change, and bus voltage dynamic response. The dynamic response characteristics are used to characterize the system dynamic behavior of the electromechanical transient model under the stated operating conditions and serve as a reference for model equivalence evaluation when constructing the electromagnetic transient model, so that the dynamic behavior of the electromagnetic model is consistent with or close to that of the electromechanical model, thereby achieving an equivalent conversion from the electromechanical model to the electromagnetic model.

[0070] The model structure generation module is used to convert the electromechanical transient model into the corresponding initial electromagnetic transient model based on the predefined mapping relationship, and to determine the initial electromagnetic model parameters of the initial electromagnetic transient model.

[0071] In one embodiment of the present invention, based on the type of prime mover speed control system, excitation system and stabilizer model used in the electromechanical transient model, a corresponding electromagnetic transient model structure is generated according to a predefined model correspondence.

[0072] In this embodiment of the invention, the mapping relationship is a well-known and widely used electromechanical-electromagnetic model mapping rule in engineering. It is used to map the functional modules describing the dynamic behavior of the generator in the electromechanical transient model to an executable equivalent model structure in the electromagnetic transient simulation environment. The electromagnetic transient simulation environment can be implemented using PSCAD / EMTDC, and the mapping relationship includes at least the following: The prime mover and speed control system in the electromechanical transient model are mapped to the equivalent speed control and power control structure in the electromagnetic transient model. For example, the classical second-order model in the electromechanical transient model is mapped to the detailed model of the sixth-order Park equation in the electromagnetic transient model, which includes the dynamic processes of the stator winding, excitation winding and damping winding. The excitation system in the electromechanical transient model is mapped to the corresponding electromagnetic excitation and voltage regulation model. For example, the standard excitation models such as IEEE ST1A / ST2A / ST3A are directly mapped to the corresponding standard excitation modules in PSCAD. Map the power system stabilizer in the electromechanical transient model to the additional control module in the electromagnetic transient model. For example, map the standard PSS model such as IEEE PSS1A / PSS2A to the corresponding additional control module in PSCAD. In this embodiment of the invention, the mapping relationship is a predefined and configurable set of rules, which is used to generate the structural topology of the electromagnetic model and the connection relationship of the control module, without involving the final determination of the model parameter values. That is, the initial electromagnetic model parameters are initial parameters that are directly assigned according to the mapping relationship and have not yet been corrected.

[0073] The model parameter correction module is used to input the initial electromagnetic model parameters and operational response characteristics into the trained parameter correction model, so that the parameter correction model outputs electromagnetic transient model candidate parameters that satisfy the operational response characteristics. Specifically, the parameter correction model is obtained through iterative training, taking initial electromagnetic transient model parameter samples, operational response characteristic samples of the electromechanical transient model, and actual equivalent electromagnetic transient model parameters as inputs, and predicted equivalent electromagnetic transient model parameters as outputs. During each training iteration, a parameter error term is constructed based on the difference between the predicted and actual equivalent electromagnetic transient model parameters. A response error term is constructed based on the comparison between the response variable obtained after electromagnetic transient simulation of the predicted equivalent electromagnetic transient model parameters and the operational response characteristic samples. A loss function value is generated based on the parameter error term and the response error term. The network parameters of the parameter correction model are then adjusted based on the loss function value.

[0074] In one embodiment of the present invention, a set of response errors is constructed based on the calculated power response error, speed response error and power angle response error, and the three response errors in the set are arithmetically summed to generate a response error term.

[0075] In one embodiment of the present invention, the exemplary training process of the parameter correction model includes: We collected 1200 sets of actual equivalent electromagnetic transient model parameters that have been verified by manual fine-tuning, covering steam turbine generators and hydro turbine generators with capacities ranging from 100MW to 1000MW, as well as the mainstream excitation system and speed control system types; For each set of actual equivalent electromagnetic transient model parameters, several parameters are randomly shifted or deleted to generate an initial electromagnetic transient model parameter sample, for example: Randomly select 10%-30% of the parameters and apply a uniform random offset of ±10%-±50% to simulate parameter transformation error; Randomly delete 5%-15% of the parameters and replace them with typical values ​​from similar devices to simulate parameter loss.

[0076] For each set of initial electromagnetic transient model parameter samples, the electromechanical transient model is simulated under the same given operating conditions as in step S12 to obtain the operating response characteristic samples. The runtime response characteristic samples were divided into training set, validation set and test set in a ratio of 8:1:1.

[0077] The Adam optimizer is used to iteratively train the parameter-corrected model using predefined training parameters until the maximum number of training iterations is reached or the loss function converges. The specific training parameters can be adjusted accordingly based on the actual training process.

[0078] The model output module is used to construct an electromagnetic transient model based on the candidate parameters of the electromagnetic transient model.

[0079] In one embodiment of the present invention, the model output module is configured to perform the following process: Based on the candidate parameters of the electromagnetic transient model, a candidate electromagnetic transient model is constructed; Under a given operating condition, electromagnetic transient simulation is performed on the candidate electromagnetic transient model, and the equivalent consistency verification is performed on the candidate electromagnetic transient model based on the simulation results and the operating response characteristics of the electromechanical transient model. If the equivalent consistency check is passed, the candidate electromagnetic transient model is adopted as the final electromagnetic transient model.

[0080] In one embodiment of the present invention, the candidate electromagnetic transient models that have passed the equivalence verification are manually reviewed and confirmed, and the final electromagnetic transient model is output, including the following process: Candidate electromagnetic transient models that pass the equivalence verification are submitted to the manual review stage, where the reasonableness of their parameters, engineering interpretability, and applicability to the application scenario are comprehensively evaluated. The manual review primarily confirms whether the candidate electromagnetic transient models conform to actual engineering experience and application requirements.

[0081] When the manual review confirms that the model meets the usage requirements, the candidate electromagnetic transient model is output as the final modeling result for subsequent electromagnetic transient simulation analysis. If the manual review believes that the model still needs adjustment, the model parameter correction module can be returned to further correct the candidate electromagnetic transient model until it meets the modeling requirements.

[0082] If the equivalence consistency check fails, the system returns to the model parameter correction module to optimize the model parameters, including: Apply a small perturbation to each parameter in the candidate parameters of the electromagnetic transient model, calculate the change in the function value of the preset comprehensive equivalent error function before and after the perturbation, and use the change in function value as the parameter sensitivity of the corresponding parameter.

[0083] In one embodiment of the present invention, a small perturbation (set to 1% of the original parameter value) is applied to the candidate parameters of the electromagnetic transient model. After each single parameter perturbation, the electromagnetic simulation is repeated under the original operating conditions. The combined equivalent error function is solved by substituting the parameters before and after the perturbation. The change in the error function before and after the perturbation is used as the parameter sensitivity corresponding to that parameter. The total parameter sensitivity is obtained by iterating through all the candidate parameters of the electromagnetic transient model.

[0084] Based on parameter sensitivity, candidate parameters of the electromagnetic transient model are sorted from largest to smallest, and a predetermined number of candidate parameters at the top of the sort are determined as sensitive parameters.

[0085] In one embodiment of the present invention, the candidate parameters of the all-electromagnetic transient model are sorted from largest to smallest according to the value corresponding to the parameter sensitivity. A preset number of electromagnetic transient model candidate parameters at the top of the sort are determined as sensitive parameters. In this embodiment, 20% of the total number of electromagnetic transient model candidate parameters is used as the preset number, and the remaining low-sensitivity parameters maintain the original candidate parameter values ​​unchanged, thereby simplifying the optimization dimension and reducing the computational cost of simulation iteration.

[0086] Calculate the gradient of the comprehensive equivalent error function with respect to each sensitive parameter, and iteratively update each sensitive parameter according to the gradient descent direction until the convergence condition is met or the maximum number of iterations is reached.

[0087] In one embodiment of the present invention, the gradient of the comprehensive equivalent error function with respect to each sensitive parameter is calculated, and the sensitive parameters are iteratively updated according to the gradient descent direction, including the following process: The gradient of the comprehensive equivalent error function with respect to the parameter vectors corresponding to each sensitive parameter is calculated using the following formula: ; in, To synthesize the equivalent error function in the parameter vector The gradient vector at a given point represents the rate of change and direction of descent of the overall error along each parameter. These are the 1st, 2nd, and so on up to the nth independent parameters to be optimized in the parameter vector, where n represents the total number of sensitive parameters selected in this round. To synthesize the equivalent error function for the nth sensitive parameter The partial derivatives of .

[0088] The sensitive parameters are then jointly iteratively updated based on the direction of the gradient vector, and the update formula is as follows: ; in, To optimize step size; This represents the number of iterations. This is the parameter vector before the k-th iteration of optimization; This is the updated parameter vector obtained after the k-th iteration of optimization; The parameter takes the value of The corresponding comprehensive equivalent error gradient is used to correct the model parameters along the gradient in the opposite direction using the gradient update formula, gradually reducing the comprehensive equivalent error until the function value corresponding to the comprehensive equivalent error function is lower than the comprehensive error threshold, thus completing the secondary optimization of the candidate parameters of the electromagnetic transient model.

[0089] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0090] Those skilled in the art will clearly understand that, for convenience and simplicity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0091] One embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the electromagnetic transient model construction method of any one of the present invention.

[0092] Terminal devices can be computing devices such as desktop computers, laptops, handheld computers, and cloud servers. Electronic devices may include, but are not limited to, processors and memory.

[0093] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device through various interfaces and lines.

[0094] Memory can be used to store computer programs. The processor implements various functions of electronic devices by running or executing computer programs stored in memory and accessing data stored in memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, applications required for at least one function, etc.; the data storage area can store data created based on the use of the mobile phone, etc. In addition, memory can include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart media cards (SMC), secure digital cards (SD cards), flash cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.

[0095] One embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the storage medium is located to execute the electromagnetic transient model construction method of any one of the present invention.

[0096] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0097] The electromagnetic transient model construction method, apparatus, terminal device, and storage medium provided in this invention first acquire the electromechanical transient model and its steady-state and operational response characteristics, and then generate an initial electromagnetic transient model based on a predefined mapping relationship. During training, a parameter correction model introduces dual constraints of parameter error terms and response error terms, enabling the model to learn the mapping relationship from initial parameters and response characteristics to optimal parameters. In online applications, the parameter correction model can adjust abnormal parameters that do not conform to the response characteristics or are missing to a range that satisfies the dynamic response characteristics of the electromechanical transient model, achieving rapid parameter compensation. This effectively solves the problems of complexity and inefficiency in manual parameter tuning, and shortens the modeling cycle of the electromagnetic transient model.

[0098] The above are preferred embodiments of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for constructing an electromagnetic transient model, characterized in that, include: Obtain the electromechanical transient model of the power system to be converted and the operating response characteristics of the electromechanical transient model under given operating conditions; According to the predefined mapping relationship, the electromechanical transient model is converted into the corresponding initial electromagnetic transient model, and the initial electromagnetic transient model parameters are determined. The initial electromagnetic transient model parameters and the operational response characteristics are input into a trained parameter correction model to output candidate electromagnetic transient model parameters that satisfy the operational response characteristics. The parameter correction model is obtained through iterative training, using initial electromagnetic transient model parameter samples, operational response characteristic samples of the electromechanical transient model, and actual equivalent electromagnetic transient model parameters as inputs, and predicted equivalent electromagnetic transient model parameters as outputs. During each training iteration, a parameter error term is constructed based on the difference between the predicted equivalent electromagnetic transient model parameters and the actual equivalent electromagnetic transient model parameters. A response error term is constructed based on the comparison between the response variable obtained after electromagnetic transient simulation of the predicted equivalent electromagnetic transient model parameters and the operational response characteristic samples. A loss function value is generated based on the parameter error term and the response error term. The network parameters of the parameter correction model are adjusted based on the loss function value. Based on the candidate parameters of the electromagnetic transient model, the final electromagnetic transient model is constructed.

2. The electromagnetic transient model construction method as described in claim 1, characterized in that, The determination of the initial electromagnetic transient model parameter samples includes the following process: In the actual equivalent electromagnetic transient model parameters, several parameters are randomly shifted or deleted to generate an initial electromagnetic transient model parameter sample.

3. The electromagnetic transient model construction method as described in claim 1, characterized in that, The comparison results between the response variables obtained after performing electromagnetic transient simulation on the predicted equivalent electromagnetic transient model parameters and the samples of operational response characteristics include: The response variables obtained after electromagnetic transient simulation of the predicted equivalent electromagnetic transient model parameters are compared with the operating response characteristic samples according to the following formulas to obtain the power response error, speed response error, and power angle response error: ; ; ; ; The response error term is constructed based on the power response error, speed response error, and power angle response error. in, , , These are the power dynamic offset, speed dynamic offset, and power angle dynamic offset obtained by performing electromagnetic transient simulation under a given operating condition based on the predicted equivalent electromagnetic transient model parameters. , , These are the power dynamic offset, speed dynamic offset, and power angle dynamic offset obtained by the electromechanical transient model under a given operating condition, respectively. , , These represent power response error, speed response error, and power angle response error, respectively. , , These represent the permissible error thresholds for power, speed, and power angle, respectively. For the equivalence constraint judgment set, only , , When all three constraints are met, It will take effect, otherwise, It is not effective.

4. The electromagnetic transient model construction method as described in claim 3, characterized in that, The formula for calculating the loss function value is as follows: ; In the formula, L is the value of the loss function; For parameter error; To predict the parameters of the equivalent electromagnetic transient model; These are the parameters of the actual equivalent electromagnetic transient model; The set of response errors includes: power response error, speed response error, and power angle response error; The error is the i-th response in the response set; , For the weighting coefficients, satisfying .

5. The electromagnetic transient model construction method as described in claim 1, characterized in that, Based on the candidate parameters of the electromagnetic transient model, an electromagnetic transient model is constructed, including: Based on the candidate parameters of the electromagnetic transient model, a candidate electromagnetic transient model is constructed; Under a given operating condition, electromagnetic transient simulation is performed on the candidate electromagnetic transient model, and the equivalent consistency verification is performed on the candidate electromagnetic transient model based on the simulation results and the operating response characteristics of the electromechanical transient model. If the equivalent consistency check is passed, the candidate electromagnetic transient model is adopted as the final electromagnetic transient model.

6. The electromagnetic transient model construction method as described in claim 5, characterized in that, Based on the simulation results and the operational response characteristics of the electromechanical transient model, an equivalent consistency verification is performed on the candidate electromagnetic transient model, including: Based on the simulation results and the operational response characteristics of the electromechanical transient model, the value of the comprehensive equivalent error function is calculated using the following formula: ; If the function value is less than a preset comprehensive error threshold, the equivalent consistency check is deemed to have passed; otherwise, the equivalent consistency check is deemed to have failed. in, The function value of the comprehensive equivalent error function, For the k-th response variable in the simulation results, Let K be the k-th response variable in the electromechanical transient model's operational response characteristics, where K is the total number of response variables. Here, T represents the weighting coefficient, and T represents the response time window. These are candidate parameters for the electromagnetic transient model.

7. The electromagnetic transient model construction method as described in claim 6, characterized in that, Also includes: In the absence of passing the equivalent consistency verification, a small perturbation is applied to each parameter in the candidate parameters of the electromagnetic transient model, and the change in the function value of the preset comprehensive equivalent error function before and after the perturbation is calculated. The change in the function value is used as the parameter sensitivity of the corresponding parameter. Based on parameter sensitivity, the candidate parameters of the electromagnetic transient model are sorted from largest to smallest, and a predetermined number of the top-ranked candidate parameters are determined as sensitive parameters. Calculate the gradient of the comprehensive equivalent error function with respect to each sensitive parameter, and iteratively update each sensitive parameter according to the gradient descent direction until the convergence condition is met or the maximum number of iterations is reached.

8. An electromagnetic transient model construction device, characterized in that, include: The parameter acquisition module is used to acquire the electromechanical transient model of the power system to be converted and the operating response characteristics of the electromechanical transient model under given operating conditions; The model structure generation module is used to convert the electromechanical transient model into the corresponding initial electromagnetic transient model based on the predefined mapping relationship, and to determine the initial electromagnetic model parameters of the initial electromagnetic transient model. The model parameter correction module is used to input the initial electromagnetic model parameters and the running response characteristics into the trained parameter correction model so that the parameter correction model outputs electromagnetic transient model candidate parameters that meet the running response characteristics. The model output module is used to construct an electromagnetic transient model based on the candidate parameters of the electromagnetic transient model.

9. A terminal device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and configured to be executed by the processor; wherein, when the processor executes the computer program, it implements the electromagnetic transient model construction method as described in any one of claims 1-7.

10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform the electromagnetic transient model construction method as described in any one of claims 1-7.