Electrical parameter learning method and system
By constructing electrical component functions and preset neural network acquisition coefficients in steady-state conditions, combining finite difference method and ordinary differential neural network, the problem of difficulty in obtaining electrical parameters of the power system in the existing technology is solved, and the efficient and accurate acquisition of electrical parameters is achieved, and the operation efficiency and safety of the power system are improved.
Patent Information
- Application Number
- CN202411814557.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art is difficult to quickly, accurately and conveniently obtain the electrical parameters of electrical equipment in the power system, resulting in increased system operation risks and reduced operational efficiency.
By constructing the first function corresponding to the target electrical components of the system to be tested in a steady state situation, and presetting the neural network to obtain the coefficients of these functions, and then obtaining the electrical parameter values in a transient situation. This method combines finite difference method and ordinary differential neural network to improve robustness, and achieves efficient and accurate acquisition of electrical parameters through the combination of steady-state and perturbation data.
It realizes efficient and accurate acquisition of electrical parameters of electrical equipment, and improves the operating efficiency and safety of the power system.
Smart Images

Figure CN120010241A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system control, and in particular to an electrical parameter learning method and system. Background Art
[0002] The existing power system operation and management model mainly relies on the electrical parameters marked on the electrical equipment when it leaves the factory. These parameters include rated voltage, rated current, impedance, etc., which are key basic data for the normal operation of electrical equipment.
[0003] However, in reality, due to the old electrical equipment and poor maintenance, many electrical equipment lack accurate electrical parameter records, which limits the operation management, fault diagnosis and safety control of the power system. The lack of accurate electrical parameter information will increase the risk of system operation and reduce operational efficiency.
[0004] At present, obtaining electrical parameters of electrical equipment mainly relies on manual measurement or equipment label information. Among them, manual measurement methods are time-consuming and labor-intensive, and require professional test instruments and operators, which are limited by actual operating conditions and personnel levels. And the accuracy of equipment label information is difficult to guarantee due to damage, loss or errors.
[0005] Therefore, it is very necessary to solve the problem that the existing technology cannot quickly, accurately and conveniently obtain the electrical parameters of electrical equipment in the power system. Summary of the invention
[0006] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0007] In view of the above existing problems, the present invention is proposed.
[0008] Therefore, the present invention provides an electrical parameter learning method and system, which can solve the problems mentioned in the background technology.
[0009] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0010] In a first aspect, the present invention provides an electrical parameter learning method, comprising:
[0011] Constructing a first function corresponding to a target electrical component of the system under test in a steady state;
[0012] Preset a first neural network, and obtain coefficients of a first function corresponding to the different target electrical components according to the first neural network, which are recorded as a second function;
[0013] The electrical parameter value of the target electrical component of the system to be tested under transient conditions is obtained according to the second function.
[0014] As a preferred solution of the electrical parameter learning method of the present invention, wherein: the first function corresponding to the target electrical element of the system to be tested under steady-state conditions is constructed, including:
[0015] The system to be tested includes a first series system and a second parallel system;
[0016] The state variables of the first function of the first series system and the first function of the second parallel system are different and are respectively recorded as the first state variable and the second state variable;
[0017] The number of the first functions depends only on the number of target electrical components of the system to be tested.
[0018] As a preferred solution of the electrical parameter learning method of the present invention, wherein: the preset first neural network, obtaining the coefficients of the first function corresponding to the different target electrical components according to the first neural network includes:
[0019] The first neural network is any type of network whose input is state variable related parameters and whose output is the time derivative of the state variable;
[0020] The state variable related parameters at least include a first state variable and several orders of derivatives of the first state variable and a second state variable and several orders of derivatives of the second state variable.
[0021] As a preferred solution of the electrical parameter learning method of the present invention, wherein: the first function corresponding to the target electrical element of the system to be tested under the steady state condition is constructed further comprising:
[0022] When the system to be measured is a second parallel system, the port current is selected as the state variable, and the first-order derivative and the second-order derivative of the port voltage are calculated using the finite difference method; wherein the first-order derivative and the second-order derivative of the port voltage are both constructed first functions;
[0023] or,
[0024] When the system to be measured is a first series system, the port voltage is selected as the state variable, and the first-order derivative and the second-order derivative of the port current are calculated using the finite difference method; wherein the first-order derivative and the second-order derivative of the port current are both constructed first functions.
[0025] As a preferred solution of the electrical parameter learning method of the present invention, wherein: the preset first neural network, obtaining the coefficients of the first function corresponding to the different target electrical components according to the first neural network also includes:
[0026] When the system to be tested is a second parallel system, the port current, the port voltage, and the first-order derivative and the second-order derivative of the port voltage are input into a pre-trained first neural network to obtain the first-order derivative of the port current with respect to time;
[0027] Using the automatic differentiation function of the first neural network, the partial derivative of the first-order derivative of the port current with respect to the network input is obtained;
[0028] The partial derivatives are used to perform a first-order Taylor expansion on the first neural network, and coefficients of the first function corresponding to different elements are obtained by fitting.
[0029] As a preferred solution of the electrical parameter learning method of the present invention, wherein: the preset first neural network, obtaining the coefficients of the first function corresponding to the different target electrical components according to the first neural network also includes:
[0030] When the system to be measured is a first series system, the port voltage, the port current, and the first-order derivative and the second-order derivative of the port current are input into a pre-trained first neural network to obtain the first-order derivative of the port voltage with respect to time;
[0031] Using the automatic differentiation function of the first neural network, the partial derivative of the port voltage with respect to the network input is obtained;
[0032] The partial derivatives are used to perform a first-order Taylor expansion on the first neural network, and coefficients of the first function corresponding to different elements are obtained by fitting.
[0033] As a preferred solution of the electrical parameter learning method of the present invention, the step of obtaining the electrical parameter value of the target electrical component of the system under test in a transient state according to the second function includes:
[0034] The second function is the first function after the coefficient is determined;
[0035] When the system to be tested is in a transient state, a capacitance value is obtained by fitting according to the collected transient data;
[0036] Based on the proportional relationship between the corresponding coefficients of different first functions, the inductance value is calculated according to the capacitance value;
[0037] The capacitance value and the inductance value are both included in the electrical parameter value.
[0038] In a second aspect, the present invention provides an electrical parameter learning system comprising:
[0039] A function construction module, used to construct a first function corresponding to a target electrical element of the system under test in a steady state;
[0040] A coefficient determination module, used for presetting a first neural network, obtaining coefficients of the first function corresponding to the different target electrical components according to the first neural network, recorded as a second function;
[0041] A parameter acquisition module is used to obtain the electrical parameter value of the target electrical component of the system to be tested under transient conditions according to the second function.
[0042] In a third aspect, the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method when executing the computer program.
[0043] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method described above when executed by a processor.
[0044] Compared with the prior art, the present invention has the following beneficial effects: the present invention proposes an electrical parameter learning method and system, constructs a first function corresponding to the target electrical element of the system to be tested under steady-state conditions; presets a first neural network, obtains the coefficients of the first function corresponding to the different target electrical elements according to the first neural network, recorded as a second function; obtains the electrical parameter values of the target electrical elements of the system to be tested under transient conditions according to the second function. This method can effectively improve the robustness of the ordinary differential neural network by using the finite difference method to construct the basis functions corresponding to different elements. At the same time, by combining steady-state data and disturbance data to identify the electrical parameter values of some elements, efficient and accurate acquisition of electrical parameters of electrical equipment is achieved, thereby improving the operating efficiency of the power system and ensuring power safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0046] Figure 1 It is a flowchart of an electrical parameter learning method and system provided by an embodiment of the present invention.
[0047] Figure 2 It is a schematic diagram of the overall flow of an electrical parameter learning method and system provided by an embodiment of the present invention.
[0048] Figure 3 Schematic diagram of an RLC parallel system provided by an embodiment of the present invention.
[0049] Figure 4 It is a fitting effect diagram of the ordinary differential neural network coefficients of the RLC parallel system 1 provided in an embodiment of the present invention.
[0050] Figure 5 It is a fitting effect diagram of the ordinary differential neural network coefficients of the RLC parallel system 2 provided in an embodiment of the present invention.
[0051] Figure 6 It is a fitting effect diagram of the ordinary differential neural network coefficients of the RLC parallel system 3 provided in an embodiment of the present invention.
[0052] Figure 7 It is a diagram of the learning effect of the ordinary differential neural network of the RLC parallel system 1 containing disturbance provided in an embodiment of the present invention.
[0053] Figure 8 It is a fitting effect diagram of ordinary differential neural network coefficients of the disturbance-containing RLC parallel system 1 provided in an embodiment of the present invention.
[0054] Fig. 9 It is a diagram of the learning effect of the ordinary differential neural network of the RLC parallel system 2 containing disturbance provided in an embodiment of the present invention.
[0055] Fig.10 It is a fitting effect diagram of ordinary differential neural network coefficients of the disturbed RLC parallel system 2 provided in an embodiment of the present invention.
[0056] Fig.11 It is a schematic diagram of an RLC series system provided by an embodiment of the present invention.
[0057] Fig.12 It is a graph showing the learning effect of an ordinary differential neural network of a disturbance-free RLC series system provided by an embodiment of the present invention.
[0058] Fig.13 It is a fitting effect diagram of ordinary differential neural network coefficients of an undisturbed RLC series system provided by an embodiment of the present invention.
[0059] Fig.14 It is a diagram of the learning effect of the ordinary differential neural network of the RLC series system with disturbance provided by an embodiment of the present invention.
[0060] Fig.15 It is a fitting effect diagram of ordinary differential neural network coefficients of a disturbed RLC series system provided by an embodiment of the present invention.
[0061] Fig.16 It is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0062] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0063] Example 1
[0064] Reference Figure 1-Figure 16 , is the first embodiment of the present invention, which provides an electrical parameter learning method and system, including:
[0065] In the existing related technologies, obtaining electrical parameters of electrical equipment mainly relies on manual measurement or equipment label information. Among them, the manual measurement method is time-consuming and labor-intensive, and requires professional test instruments and operators, which is limited by actual operating conditions and personnel level. And the accuracy of equipment label information is difficult to guarantee due to damage, loss or errors.
[0066] This application provides a method that can effectively solve the above-mentioned problems. Next, how to implement the electrical parameter learning method will be described in detail in combination with multiple embodiments;
[0067] Figure 1 A schematic diagram of a flow chart of an electrical parameter learning method and system is shown, including:
[0068] S101, constructing a first function corresponding to a target electrical component of the system under test in a steady state;
[0069] In the embodiment of the present application, the first function corresponding to the target electrical element of the system under test in the steady state is constructed, including:
[0070] The system to be tested includes a first series system and a second parallel system;
[0071] The state variables of the first function of the first series system and the first function of the second parallel system are different and are respectively recorded as the first state variable and the second state variable;
[0072] The number of first functions depends only on the number of target electrical components in the system under test.
[0073] In an optional embodiment, the system to be tested may be an RLC system, or may be other types of electrical systems, such as an LC system, an RC system, etc. In the RLC system, R represents resistance, L represents inductance, and C represents capacitance.
[0074] In an optional embodiment, the system to be tested should include different connection methods of series and parallel. Therefore, the system to be tested considered in this application needs to be considered both in series and in parallel. No matter what system is selected, it is necessary to divide it into series and parallel, and design the corresponding first function for the specific series and parallel connection.
[0075] In an optional embodiment, the first function may be various algebraic equations containing target electrical components of the system to be tested. In subsequent embodiments of the present application, the first function is described using a basis function.
[0076] In the embodiment of the present application, a relatively complex RLC system is selected. The RLC system refers to a circuit including three basic electrical components, namely resistance (R), inductance (L) and capacitance (C), which shows how to control the behavior of current and voltage through these components. The RLC system in this step can be an RLC series system or an RLC parallel system, which is not specifically limited here.
[0077] In an optional embodiment, in an RLC series system, the three elements of resistance, inductance and capacitance are connected in series in sequence, and the total impedance of the entire system / circuit changes with frequency. The RLC series system has a natural resonant frequency, at which energy exchange occurs between the inductor and the capacitor without requiring additional energy from the external power supply.
[0078] In an optional embodiment, in the RLC parallel system, the three elements of resistance, inductance and capacitance are connected in parallel. The RLC parallel circuit also has a resonant frequency, at which the system / circuit appears as a pure resistance characteristic to the outside.
[0079] It is easy to understand that in order to extract electrical parameters, the neural network needs to be expressed as a combination of different electrical devices, as shown in equation (1). The basis function g on the right side of equation (1) is i represents the equation corresponding to the basic component, θ i Represents the parameters required to describe the characteristics of the component, a i It may also contain the parameters of the components. According to the ordinary differential neural network, we can get a i and θ i Finally, based on the relationship between these parameters and component parameters, the composition and some electrical parameters of the original system can be obtained.
[0080]
[0081] Formula (1) puts forward a requirement for the basic components used for decomposition, that is, the component equation can be described by differential equations. However, in actual systems, the equations of some components are not differential equations. For example, the component equation of resistor is an algebraic equation. To ensure that the decomposition effect of formula (1) is good, the basis function needs to contain various functional relationships of the original equation, that is, the selected basic components need to include various components of the original system. Resistors are ubiquitous in almost all systems, so they are inevitable when selecting basic components. When constructing basis functions, how to deal with such components whose characteristics cannot be described by differential equations is a problem.
[0082] In an embodiment of the present application, in order to solve the aforementioned problem, this embodiment chooses to use the finite difference method to construct basis functions corresponding to different components in the electrical equipment when the RLC system is in a steady state. These basis functions represent the states of the state variables at different times, and the state of the entire RLC system can be represented by these basis functions and their coefficients.
[0083] Among them, the RLC system is in a steady state, which means that all electrical quantities (such as voltage, current, power, etc.) in the RLC system change very slowly or remain basically unchanged over time. In this state, the operating parameters of the system are usually considered to be constant. For example, under normal operating conditions without sudden load changes or faults, the voltage and frequency of the power system will fluctuate within a small range close to the rated value, which means that the power system / RLC system is in a steady state.
[0084] It should be noted that the finite difference method (FDM) is a numerical method for approximately solving differential equations. It discretizes the continuous problem domain into a series of grid points and replaces the derivatives at these points with difference quotients, thereby converting the differential equations into a system of algebraic equations.
[0085] In an optional embodiment, the RLC system is an RLC parallel system, and the port current is selected as the state variable. Under a certain port voltage, the differential of the port current can be shown in the following formula (2).
[0086]
[0087] In formula (2), i represents the port current, t represents the time, u represents the port voltage, L represents the value of the inductance, R represents the value of the resistance, and C represents the value of the capacitance.
[0088] Formula (2) can be regarded as an ordinary differential neural network used to represent the power system dynamics equation. C is the coefficient to be solved, u, That is, the basis functions corresponding to different components.
[0089] In the embodiment of the present application, the first function corresponding to the target electrical element of the system under test in the steady state is constructed, and further includes:
[0090] When the system to be measured is the second parallel system, the port current is selected as the state variable, and the first-order derivative and the second-order derivative of the port voltage are calculated using the finite difference method; wherein the first-order derivative and the second-order derivative of the port voltage are both the first functions constructed;
[0091] or,
[0092] When the system to be measured is the first series system, the port voltage is selected as the state variable, and the first-order derivative and the second-order derivative of the port current are calculated using the finite difference method; wherein the first-order derivative and the second-order derivative of the port current are both constructed first functions.
[0093] In the embodiment of the present application, the finite difference method is used to construct the basis functions (i.e., the first function) corresponding to different components in the electrical equipment, and the RLC system needs to satisfy an assumption that the state variables satisfy additivity. Therefore, to use the electrical parameter learning method based on ordinary differential neural network provided by the present invention, it is first necessary to have a certain understanding of the topological structure of the RLC system, and then select the state variables according to the topological structure. Selecting power as the state variable has good versatility and is applicable to various topological relationships, but selecting voltage, current, etc. as state variables when the system topology meets the requirements will bring convenience in calculation.
[0094] In an optional embodiment, the RLC system is an RLC parallel system, in which case the port current is selected as the state variable. Under a certain port voltage, the differential of the port current can be referred to in the above formula (2).
[0095] When the simulation step is Δt, the finite difference method can be used to obtain the first and second derivatives of the port voltage except for the time series endpoints. For details, please refer to the first formula (3) and the second formula (4). The first-order derivative here uses forward difference instead of the central difference with higher theoretical accuracy. The current derivative value output by the ordinary differential neural network is actually the result of forward difference, so the port voltage here should also use the forward difference method.
[0096] That is, the first-order derivative and the second-order derivative of the port voltage are calculated using the finite difference method, which specifically includes: calculating the first-order derivative of the port voltage by a first formula, and calculating the second-order derivative of the port voltage by a second formula.
[0097] The first formula is defined as follows:
[0098]
[0099] The second formula is defined as follows:
[0100]
[0101] In equations (3)-(4), t represents time, k represents the time series index, u represents the port voltage, and Δt represents the simulation step size.
[0102] It should be noted that in formula (3) Compared with the formula (4) is the constructed basis function, which is equivalent to the and When the voltage measurement data at the current moment is known, the calculation result of the basis function can be obtained.
[0103] In an optional embodiment, the RLC system is an RLC series system, in which case the port voltage is selected as the state variable. Under a certain port current, the differential of the port voltage can be obtained, and the details can be referred to the following formula (5).
[0104]
[0105] When the simulation step is Δt, the finite difference method can be used to obtain the first-order derivative and second-order derivative of the port current except the time series endpoints, as shown in the third formula (6) and the fourth formula (7). The first-order derivative here uses forward difference instead of the central difference with higher theoretical accuracy. The voltage derivative value output by the ordinary differential neural network is actually the result of forward difference, so the port current here should also use the forward difference method.
[0106] That is, the first-order derivative and the second-order derivative of the port current are calculated using the finite difference method, specifically including: calculating the first-order derivative of the port current by the third formula, and calculating the second-order derivative of the port current by the fourth formula.
[0107] The third formula is defined as follows (6).
[0108]
[0109] The fourth formula is defined as follows (7).
[0110]
[0111] It should be noted that in formula (6) Compared with the formula (7) is the constructed basis function, which is equivalent to the and When the current measurement data at the current moment is known, the calculation result of the basis function can be obtained.
[0112] Based on the above, the basis functions corresponding to different components in the electrical equipment can be constructed.
[0113] It should be noted that, by using the finite difference method to construct the basis functions corresponding to different components in the electrical equipment when the RLC system is in a steady state, and based on the pre-trained ordinary differential neural network, the coefficients of the basis functions corresponding to different components are obtained, and then when the RLC system is in a transient state, the electrical parameter values of the target components are calculated according to the coefficients of different basis functions. This method can effectively improve the robustness of the ordinary differential neural network by using the finite difference method to construct the basis functions corresponding to different components. At the same time, by combining steady-state data and disturbance data to identify the electrical parameter values of some components, the electrical parameters of the electrical equipment can be obtained efficiently and accurately, thereby improving the operating efficiency of the power system and ensuring power safety.
[0114] S102, presetting a first neural network, and obtaining coefficients of a first function corresponding to different target electrical components according to the first neural network, recorded as a second function;
[0115] In the embodiment of the present application, a first neural network is preset, and obtaining coefficients of a first function corresponding to different target electrical components according to the first neural network includes:
[0116] The first neural network is any type of network whose input is state variable related parameters and whose output is the time derivative of the state variable. The automatic differentiation function of the neural network is used to calculate the partial derivative of the output with respect to the input.
[0117] The state variable related parameters at least include a first state variable and several orders of derivatives of the first state variable and a second state variable and several orders of derivatives of the second state variable.
[0118] In an optional embodiment, the first neural network can be constructed based on a deep learning framework, such as a convolutional neural network (CNN), a recurrent neural network (RNN), or a long short-term memory network (LSTM), etc. These neural networks can process sequence data and can capture complex patterns of dynamic changes in the power system.
[0119] In an optional embodiment, the first neural network can also be a neural network based on a fully connected layer. Since the dynamic changes of the power system may involve multiple time scales, the first neural network can be designed as a deep network with multiple hidden layers to enhance its modeling ability for complex dynamic patterns.
[0120] In an optional embodiment, the first neural network can also be a simple ordinary differential neural network (CDNN), which has a simple structure, is easy to implement, and can effectively model the dynamic changes of the power system. By learning the state variables of the target power system and their changing laws, the CDNN can output the partial derivatives of the corresponding state variables, providing data support for further learning and optimization of the linear model.
[0121] In the embodiment of the present application, the first neural network is designed by selecting an ordinary differential neural network.
[0122] In the embodiment of the present application, a first neural network is preset, and obtaining coefficients of the first function corresponding to different target electrical components according to the first neural network also includes:
[0123] When the system to be measured is the second parallel system, the port current, the port voltage, and the first-order derivative and the second-order derivative of the port voltage are input into a pre-trained first neural network to obtain the first-order derivative of the port current with respect to time;
[0124] Using the automatic differentiation function of the first neural network, the partial derivative of the first-order derivative of the port current with respect to the network input is obtained;
[0125] The first neural network is subjected to first-order Taylor expansion using partial derivatives, and the coefficients of the first function corresponding to different components are obtained by fitting.
[0126] In the embodiment of the present application, a first neural network is preset, and obtaining coefficients of the first function corresponding to different target electrical components according to the first neural network also includes:
[0127] When the system to be measured is a first series system, the port voltage, the port current, and the first-order derivative and the second-order derivative of the port current are input into a pre-trained first neural network to obtain the first-order derivative of the port voltage with respect to time;
[0128] Using the automatic differentiation function of the first neural network, the partial derivative of the port voltage with respect to the network input is obtained;
[0129] The first neural network is subjected to first-order Taylor expansion using partial derivatives, and the coefficients of the first function corresponding to different components are obtained by fitting.
[0130] In an optional embodiment, the RLC system is an RLC parallel system, and the port current, port voltage, and the first-order derivative and second-order derivative of the port voltage are input into a pre-trained ordinary differential neural network to obtain the first-order derivative of the port current with respect to time; the automatic differentiation function of the ordinary differential neural network is used to obtain the partial derivative of the first-order derivative of the port current with respect to the network input; the ordinary differential neural network is subjected to a first-order Taylor expansion using the partial derivatives to fit the coefficients of the basis functions corresponding to different components.
[0131] It is easy to understand that the first-order derivative and the second-order derivative of the port voltage are calculated by the above formulas (3)-(4), and then the port current and the port voltage are measured in real time by sensors and other equipment, and the measured port current, port voltage and the calculated first-order derivative and the second-order derivative of the port voltage are spliced, and the spliced vector is used as the network input. The network input is directly input into the pre-trained ordinary differential neural network to obtain the first-order derivative of the port current with respect to time.
[0132] Then, the automatic differentiation function of the ordinary differential neural network is used to obtain the partial derivative of the port current with respect to the network input according to the first-order inverse of the port current with respect to time.
[0133] Finally, the first-order Taylor expansion of the ordinary differential neural network is performed using partial derivatives to fit the coefficients of the basis functions corresponding to different components in the electrical equipment.
[0134] In an optional embodiment, the RLC system is an RLC series system, and the port voltage, port current, and first-order derivative and second-order derivative of the port current are input into a pre-trained ordinary differential neural network to obtain the first-order derivative of the port voltage with respect to time; the automatic differentiation function of the ordinary differential neural network is used to obtain the partial derivative of the port voltage with respect to the network input; the ordinary differential neural network is subjected to a first-order Taylor expansion using the partial derivatives to fit the coefficients of the basis functions corresponding to different components.
[0135] It is easy to understand that the first-order derivative and the second-order derivative of the port current are calculated by the above formulas (6)-(7), and then the port current and the port voltage are measured in real time by sensors and other equipment, and the measured port voltage, port current and the calculated first-order derivative and the second-order derivative of the port current are spliced, and the spliced vector is used as the network input. The network input is directly input into the pre-trained ordinary differential neural network to obtain the first-order derivative of the port voltage with respect to time.
[0136] Then, the automatic differentiation function of the ordinary differential neural network is used to obtain the partial derivative of the port voltage with respect to the network input according to the first-order inverse of the port voltage with respect to time.
[0137] Finally, the first-order Taylor expansion of the ordinary differential neural network is performed using partial derivatives to fit the coefficients of the basis functions corresponding to different components in the electrical equipment.
[0138] It should be noted that the coefficients of the basis functions corresponding to different components are obtained based on the pre-trained ordinary differential neural network, and then the electrical parameter values of the target components are calculated according to the coefficients of different basis functions when the RLC system is in a transient state. This method can effectively improve the robustness of the ordinary differential neural network by constructing the basis functions corresponding to different components using the finite difference method. At the same time, by combining steady-state data with disturbance data to identify the electrical parameter values of some components, the electrical parameters of electrical equipment can be obtained efficiently and accurately, thereby improving the operating efficiency of the power system and ensuring power safety.
[0139] S103, obtaining electrical parameter values of target electrical components of the system to be tested under transient conditions according to the second function.
[0140] In the embodiment of the present application, obtaining the electrical parameter value of the target electrical component of the system under test in a transient state according to the second function includes:
[0141] The second function is the first function after the coefficients are determined;
[0142] When the system under test is in a transient state, the capacitance value is obtained by fitting based on the collected transient data;
[0143] Based on the proportional relationship between the corresponding coefficients of different first functions, the inductance value is calculated according to the capacitance value;
[0144] Among them, the capacitance value and the inductance value are both included in the electrical parameter value.
[0145] In an optional embodiment, when the RLC system is in a transient state, the electrical parameter value of the target element is calculated according to the coefficients of different basis functions, including: when the RLC is in a transient state, the capacitance value is obtained by fitting the collected transient data; based on the proportional relationship between the corresponding coefficients of different basis functions, the inductance value is calculated according to the capacitance value; wherein the capacitance value and the inductance value are both included in the electrical parameter value.
[0146] It is understandable that after learning and linearizing the system characteristics using ordinary differential neural networks (the process of solving the system of basis functions corresponding to different components), the proportional relationship between the corresponding coefficients of different basis functions can be obtained. Further considering the relationship between the corresponding coefficients of the basis functions and some electrical parameters (such as inductance L, capacitance C), the numerical relationship between different electrical parameters can be obtained. Therefore, it is only necessary to confirm the value of one of the electrical parameters to obtain the electrical parameter values of each of these components (target components).
[0147] For example, according to formula (2), the basis function corresponding coefficient The relationship between the basis function corresponding coefficient C and the electrical parameter C is inverse. The proportional relationship between L and C is fixed, so as long as the value of any electrical parameter between L and C is confirmed, the value of the other electrical parameter can be obtained.
[0148] It should be noted that in order to confirm this electrical parameter value, the characteristics of the system itself are considered. Taking the RLC system as a parallel system as an example, when the system is disturbed, due to the parallel connection of the capacitor, the voltage cannot change suddenly but the current can change suddenly. The current of the inductor element itself cannot change quickly, and because the voltage cannot jump, the current of the resistor element cannot change quickly. Therefore, as long as the system is disturbed, most of the current changes during the disturbance process come from the capacitor. Assuming that the learning effect of the neural network is good, the capacitance fitted by the ordinary differential neural network during the disturbance process should be an accurate value. Based on the obtained capacitance value, the proportional relationship can be further used to obtain the electrical parameter values of other components, such as the inductance value.
[0149] It should be noted that, when RLC is in a transient state, the capacitance value is obtained by fitting the collected transient data, and based on the proportional relationship of the corresponding coefficients of different basis functions, the inductance value is calculated according to the capacitance value, thereby obtaining the electrical parameter value of the target component. This method can effectively improve the robustness of the ordinary differential neural network by using the finite difference method to construct the basis functions corresponding to different components. At the same time, by combining steady-state data and disturbance data to identify the electrical parameter values of some components, the electrical parameters of electrical equipment can be obtained efficiently and accurately, thereby improving the operating efficiency of the power system and ensuring power safety.
[0150] In an alternative embodiment, Figure 2 A flow chart of an electrical parameter learning method and system provided by an embodiment of the present invention is shown.
[0151] like Figure 2 As shown, the finite difference method is used to construct the basis functions corresponding to different components (selected from the basic component library) in the electrical equipment, and the calculation results of the basis functions and the measurement data (such as voltage data and current data) are used as the network input of the ordinary differential neural network. Among them, the state variable is selected according to the system topology. If the RLC system is a parallel system, the corresponding state variable is selected as current; if the RLC system is a series system, the corresponding state variable is selected as voltage.
[0152] Then, the network input is forward propagated in the ordinary differential neural network, and the ordinary differential neural network is linearized to obtain the coefficients corresponding to each basis function, and then the component parameters, that is, the electrical parameter values of the target component, are calculated based on the obtained coefficients.
[0153] In other embodiments, tests are performed on RLC parallel systems.
[0154] Figure 3 A schematic diagram of an RLC parallel system provided by an embodiment of the present invention is shown.
[0155] exist Figure 3 In the RLC parallel system shown, the voltage of each component is the same, and the sum of the currents is the port current. The port voltage and port current are sampled, and each set of samples contains 3000 data points; the system corresponding to the first set of samples will jump at a specified number of times, causing the port current in the measured data to jump, and each sample is 10 seconds long and contains 1001 data as transient data; the system corresponding to the second set of samples is the same as the first set of samples, and the system also jumps, but the time period without jumps is selected for sampling, and each sample is 1 second long and contains 1001 data as steady-state data.
[0156] When the RLC system is a parallel system, the port current is selected as the state variable. The equations satisfied by the variables in the RLC parallel system can be found in equation (2). The input of the ordinary differential neural network is the measured port current and port voltage, as well as the first-order derivative and second-order derivative of the port voltage calculated according to equations (3)-(4). The output of the ordinary differential neural network is the first-order derivative of the port current with respect to time.
[0157] The RLC parallel system was tested under three different parameter values. In RLC parallel system 1, the resistance value is 1, the inductance value is 2, and the capacitance value is 1; in RLC parallel system 2, the resistance value is 1, the inductance value is 1, and the capacitance value is 4; in RLC parallel system 3, the resistance value is 2, the inductance value is 2, and the capacitance value is 4.
[0158] Figure 4 The figure shows the effect of fitting the ordinary differential neural network coefficients of the RLC parallel system 1 provided in the embodiment of the present invention.
[0159] According to formula (2), the coefficients obtained by ordinary differential neural network fitting should be the reciprocal of the resistance value, the reciprocal of the inductance value, and the capacitance value. Figure 4 The lines marked with R, L, and C are actually the coefficients of the equations corresponding to each component, that is, Figure 4 The corresponding values of the black dotted line, blue solid line, and red dotted line should be 1, 1 / 2, and 1. Obviously, the obtained coefficients are completely inconsistent with expectations, but the ratio of capacitance to inductance is basically maintained at 2 throughout the whole process, that is, the two maintain the correct coefficient ratio.
[0160] Figure 5 FIG. 2 shows the effect diagram of the ordinary differential neural network coefficient fitting of the RLC parallel system 2 provided by the embodiment of the present invention. Figure 5 As shown, the ratio of capacitance to inductance is basically maintained at 4 throughout the entire process, that is, the two maintain the correct coefficient ratio.
[0161] Figure 6 FIG. 2 shows the effect diagram of the ordinary differential neural network coefficient fitting of the RLC parallel system 3 provided by the embodiment of the present invention. Figure 6 As shown, the ratio of capacitance to inductance is basically maintained at 8 throughout the entire process, that is, the two maintain the correct coefficient ratio.
[0162] During the data collection process, the first sample set collected for each system is the data containing jumps. The test system has four jumps within 10 seconds, which occurred at the 2nd, 4th, 6th and 8th seconds respectively. The amplitude of each jump is a random value within 20% of the initial value. The data of RLC parallel system 1 and RLC parallel system 2 are used to train the ordinary differential neural network.
[0163] in, Figure 7 The figure shows the learning effect of the ordinary differential neural network of the RLC parallel system 1 with disturbance provided by the embodiment of the present invention. Figure 8 The ordinary differential neural network coefficient fitting effect diagram of the disturbance-containing RLC parallel system 1 provided by the embodiment of the present invention is shown. The actual capacitance value of the RLC parallel system is 1F, and the fitting result is 1.03F to 1.1F, and the parameter fitting effect is close to the original system parameters.
[0164] Fig. 9 The figure shows the learning effect of the ordinary differential neural network of the RLC parallel system 2 with disturbance provided by the embodiment of the present invention. Fig.10 The ordinary differential neural network coefficient fitting effect diagram of the disturbance-containing RLC parallel system 2 provided by the embodiment of the present invention is shown. The actual capacitance value of the RLC parallel system 2 is 4F, and the fitting result is about 4.2F, and the parameter fitting effect is close to the original system parameters.
[0165] In some other embodiments, tests are performed on RLC series systems.
[0166] Fig.11 A schematic diagram of an RLC series system provided by an embodiment of the present invention is shown.
[0167] When the RLC system is a series system, the basic principle and calculation method are the same as those of the RLC parallel system, and the port voltage and port current are also sampled. However, the port voltage is selected as the state variable. The equations satisfied by the variables in the RLC series system can be found in equation (5). The input of the ordinary differential neural network is the measured port voltage and port current, as well as the first-order derivative and second-order derivative of the port voltage calculated according to equations (6)-(7). The output of the ordinary differential neural network is the first-order derivative of the port voltage with respect to time.
[0168] In the RLC series system, the resistance value is 2, the capacitance value is 4, and the inductance value is 2.
[0169] Use the system steady-state data to train and optimize the ordinary differential neural network. Fig.12 The figure shows the learning effect of the ordinary differential neural network of the disturbance-free RLC series system provided by the embodiment of the present invention. Fig.13 The ordinary differential neural network coefficient fitting effect diagram of the disturbance-free RLC series system provided by the embodiment of the present invention is shown. The ratio of the capacitance value to the inductance value should be maintained at 8, which is consistent with the result in the figure.
[0170] Use system transient state data to train and optimize the ordinary differential neural network. Fig.14 The figure shows the learning effect of the ordinary differential neural network of the RLC series system with disturbance provided by the embodiment of the present invention. Fig.15 The ordinary differential neural network coefficient fitting effect diagram of the perturbation RLC series system provided by the embodiment of the present invention is shown. The actual inductance value of the RLC series system is 2H, and the fitting result is about 2.1H~2.2H, and the parameter fitting effect is close to the original system parameters.
[0171] This embodiment also provides an electrical parameter learning system, including:
[0172] A function construction module, used to construct a first function corresponding to a target electrical element of the system under test in a steady state;
[0173] A coefficient determination module, used for presetting a first neural network, obtaining coefficients of a first function corresponding to different target electrical components according to the first neural network, recorded as a second function;
[0174] The parameter acquisition module is used to obtain the electrical parameter value of the target electrical component of the system to be tested under transient conditions according to the second function.
[0175] The above-mentioned unit modules may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to the above-mentioned modules.
[0176] Fig.16 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.16As shown, the electronic device may include: a processor 1710, a communication interface 1720, a memory 1730 and a communication bus 1740, wherein the processor 1710, the communication interface 1720 and the memory 1730 communicate with each other through the communication bus 1740. The processor 1710 may call the logic instructions in the memory 1730 to execute the electrical parameter learning method based on the ordinary differential neural network, the method comprising: constructing a first function corresponding to the target electrical element of the system to be tested under steady-state conditions; presetting a first neural network, obtaining the coefficients of the first function corresponding to different target electrical elements according to the first neural network, recorded as a second function; obtaining the electrical parameter value of the target electrical element of the system to be tested under transient conditions according to the second function.
[0177] In addition, the logic instructions in the above-mentioned memory 1630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0178] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the electrical parameter learning method based on an ordinary differential neural network provided by the above-mentioned methods. The method includes: constructing a first function corresponding to the target electrical component of the system to be tested under steady-state conditions; presetting a first neural network, and obtaining the coefficients of the first function corresponding to different target electrical components according to the first neural network, recorded as a second function; and obtaining the electrical parameter values of the target electrical components of the system to be tested under transient conditions according to the second function.
[0179] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the electrical parameter learning method based on an ordinary differential neural network provided by the above-mentioned methods. The method includes: constructing a first function corresponding to the target electrical component of the system to be tested under steady-state conditions; presetting a first neural network, and obtaining coefficients of the first function corresponding to different target electrical components according to the first neural network, recorded as a second function; and obtaining the electrical parameter values of the target electrical components of the system to be tested under transient conditions according to the second function.
[0180] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0181] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0182] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, and they should all be included in the scope of the claims of the present invention.
[0183] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0184] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0185] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0186] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0187] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0188] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An electrical parameter learning method, characterized in that: include: Constructing a first function corresponding to a target electrical component of the system under test in a steady state; Preset a first neural network, and obtain coefficients of a first function corresponding to the different target electrical components according to the first neural network, which are recorded as a second function; The electrical parameter value of the target electrical component of the system to be tested under transient conditions is obtained according to the second function.
2. The electrical parameter learning method according to claim 1, characterized in that: The first function corresponding to the target electrical element of the system under test in the steady state is constructed as follows: The system to be tested includes a first series system and a second parallel system; The state variables of the first function of the first series system and the first function of the second parallel system are different and are respectively recorded as the first state variable and the second state variable; The number of the first functions depends only on the number of target electrical components of the system to be tested.
3. The electrical parameter learning method according to claim 2, characterized in that: The preset first neural network, obtaining coefficients of the first function corresponding to the different target electrical components according to the first neural network includes: The first neural network is any type of network whose input is state variable related parameters and whose output is the time derivative of the state variable; The state variable related parameters at least include a first state variable and several orders of derivatives of the first state variable and a second state variable and several orders of derivatives of the second state variable.
4. The electrical parameter learning method according to claim 3, characterized in that: The first function corresponding to the target electrical element of the system under test under the steady state condition is also constructed: When the system to be measured is a second parallel system, the port current is selected as the state variable, and the first-order derivative and the second-order derivative of the port voltage are calculated using the finite difference method; wherein the first-order derivative and the second-order derivative of the port voltage are both constructed first functions; or, When the system to be measured is a first series system, the port voltage is selected as the state variable, and the first-order derivative and the second-order derivative of the port current are calculated using the finite difference method; wherein the first-order derivative and the second-order derivative of the port current are both constructed first functions.
5. The electrical parameter learning method according to claim 4, characterized in that: The preset first neural network, and obtaining the coefficients of the first function corresponding to the different target electrical components according to the first neural network, further comprises: When the system to be tested is a second parallel system, the port current, the port voltage, and the first-order derivative and the second-order derivative of the port voltage are input into a pre-trained first neural network to obtain the first-order derivative of the port current with respect to time; Using the automatic differentiation function of the first neural network, the partial derivative of the first-order derivative of the port current with respect to the network input is obtained; The partial derivatives are used to perform a first-order Taylor expansion on the first neural network, and coefficients of the first function corresponding to different elements are obtained by fitting.
6. The electrical parameter learning method according to claim 5, characterized in that: The preset first neural network, and obtaining the coefficients of the first function corresponding to the different target electrical components according to the first neural network, further comprises: When the system to be measured is a first series system, the port voltage, the port current, and the first-order derivative and the second-order derivative of the port current are input into a pre-trained first neural network to obtain the first-order derivative of the port voltage with respect to time; Using the automatic differentiation function of the first neural network, the partial derivative of the port voltage with respect to the network input is obtained; The partial derivatives are used to perform a first-order Taylor expansion on the first neural network, and coefficients of the first function corresponding to different elements are obtained by fitting.
7. The electrical parameter learning method according to claim 6, characterized in that: The step of obtaining the electrical parameter value of the target electrical component of the system under test in a transient state according to the second function includes: The second function is the first function after the coefficient is determined; When the system to be tested is in a transient state, a capacitance value is obtained by fitting according to the collected transient data; Based on the proportional relationship between the corresponding coefficients of different first functions, the inductance value is calculated according to the capacitance value; The capacitance value and the inductance value are both included in the electrical parameter value.
8. An electrical parameter learning system, characterized in that: include: A function construction module, used to construct a first function corresponding to a target electrical element of the system under test in a steady state; A coefficient determination module, used for presetting a first neural network, obtaining coefficients of the first function corresponding to the different target electrical components according to the first neural network, recorded as a second function; A parameter acquisition module is used to obtain the electrical parameter value of the target electrical component of the system to be tested under transient conditions according to the second function.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.