Method and device for optimizing control strategy of power equipment, and electronic device

CN122219110BActive Publication Date: 2026-08-11HAIER ENERGY TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-04-28
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]本申请提供一种电力设备控制策略的优化方法、装置及电子设备,用以解决现有技术中电力设备控制策略研发依赖人工经验、迭代周期长,导致研发效率低的技术问题

Benefits of technology

[0064] This application provides a method, apparatus, and electronic device for optimizing power equipment control strategies. The method acquires the desired performance indicators of the power equipment, preset test scenarios, and hardware constraints, inputting them into a strategy generation model to automatically generate a control strategy containing initial control parameters. The control strategy is then deployed to a hardware-in-the-loop simulator for verification, driving the simulator to execute the operating conditions corresponding to the preset test scenario and collect feedback waveform data. Optimization iterations are performed based on the operating condition data and feedback waveform data of the current execution scenario until the feedback waveform data meets the desired performance indicators, resulting in an optimized control strategy that is then sent to the power equipment. This process utilizes a strategy generation model to automatically generate the initial control strategy, avoiding the subjectivity and experience differences inherent in manual design. The hardware-in-the-loop simulator simulates complex operating conditions such as grid fluctuations and load mutations, achieving comprehensive coverage of test scenarios. A reinforcement learning model autonomously adjusts the control parameters based on the deviation between the feedback waveform data and the desired performance indicators, and dynamically adjusts the decision-making strategy based on the deviation trends of each verification, achieving automated closed-loop iterative optimization of the control strategy. This method shortens the development cycle, reduces reliance on expert experience, and improves the field adaptability of power equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122219110B_ABST
    Figure CN122219110B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, and electronic device for optimizing control strategies of power equipment, relating to the field of power electronics technology. The method obtains the desired performance indicators of the power equipment, preset test scenarios, and hardware constraints, inputting them into a strategy generation model to automatically generate a control strategy containing initial parameters. The control strategy is then deployed to a hardware-in-the-loop simulator for verification, and feedback waveform data is collected. Operating condition data and feedback waveform data are input into a reinforcement learning model to obtain parameter adjustment amounts, updating the control strategy and redeploying for verification. This parameter adjustment and verification process is repeated until the feedback waveform data meets the desired performance indicators, resulting in an optimized control strategy. This method reduces human intervention, lowers reliance on expert experience, shortens the development cycle, and improves optimization efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power electronics technology, and in particular to a method, apparatus and electronic equipment for optimizing power equipment control strategies. Background Technology

[0002] Power equipment is widely used in new energy power generation and smart microgrids. The control strategy of this equipment determines its grid connection performance, dynamic response capability, and operational stability. Especially in the scenario of new energy grid connection, the control strategy needs to cope with complex operating conditions such as sudden voltage drops, frequency deviations, and load changes. Therefore, an efficient and stable control strategy is of great significance for improving the operational quality of power equipment and grid security.

[0003] In existing technologies, the optimization of power equipment control strategies heavily relies on manual intervention. Engineers design the control logic framework and initial parameters based on theoretical analysis, run test scenarios using offline simulation software, manually analyze the voltage and current waveform data output from the simulation, manually adjust the control parameters based on the analysis results, and repeat the "simulation test - manual analysis - manual adjustment" process until the control strategy performance meets the requirements. Throughout the entire optimization process, every parameter adjustment and performance judgment requires manual intervention.

[0004] Existing technologies rely heavily on engineers' experience, resulting in long development cycles and low efficiency. Summary of the Invention

[0005] This application provides a method, apparatus, and electronic device for optimizing power equipment control strategies, in order to solve the technical problem that the development of power equipment control strategies in the prior art relies on human experience and has a long iteration cycle, resulting in low development efficiency.

[0006] In a first aspect, this application provides a method for optimizing a power equipment control strategy, comprising:

[0007] Obtain the expected performance indicators, preset test scenarios, and hardware constraints of the power equipment;

[0008] The expected performance index, the preset test scenario and hardware constraints are input into the strategy generation model to obtain the control strategy output by the strategy generation model corresponding to the preset test scenario. The control strategy includes initial control parameters.

[0009] The control strategy is deployed to a hardware-in-the-loop simulator for verification, and the simulator is driven to execute the working conditions corresponding to the preset test scenario, and feedback waveform data is collected.

[0010] Input the current execution scenario's working condition data and the feedback waveform data into the reinforcement learning model to obtain the parameter adjustment amount output by the reinforcement learning model;

[0011] The control parameters in the control strategy are adjusted according to the parameter adjustment amount to obtain the updated control strategy;

[0012] The updated control strategy is redeployed to the hardware-in-the-loop simulator for verification, and new feedback waveform data is obtained. The parameter adjustment and verification are performed repeatedly until the new feedback waveform data meets the expected performance index, thus obtaining the optimized control strategy.

[0013] Optionally, the step of deploying the control strategy to a hardware-in-the-loop simulator for verification and collecting feedback waveform data includes:

[0014] The control strategy is sent to the controller electrically connected to the hardware-in-the-loop simulator via a communication interface;

[0015] The hardware-in-the-loop simulator is driven to run the simulated load model corresponding to the preset test scenario, output simulated electrical signals to the controller, and receive drive commands generated by the controller in response to the simulated electrical signals. The simulated load model is used to simulate the load conditions that the power equipment is subjected to in actual operation.

[0016] The operating status of the simulated load model is updated based on the driving command, and the updated voltage, current and power waveform data are collected as the feedback waveform data.

[0017] Optionally, inputting the current execution scenario's working condition data and the feedback waveform data into the reinforcement learning model includes:

[0018] The operating condition data and the feedback waveform data are integrated into input information reflecting the current operating status, and then input into the reinforcement learning model.

[0019] Calculate the degree of deviation between the feedback waveform data and the expected performance index;

[0020] The reinforcement learning model is controlled to determine the parameter adjustment amount based on the input information and the degree of deviation, and the parameter adjustment amount represents the adjustment range of the control parameter.

[0021] Optionally, integrating the operating condition data and the feedback waveform data into input information reflecting the current operating status includes:

[0022] The operating condition data is normalized to obtain a standardized operating condition vector;

[0023] Time-frequency domain feature extraction is performed on the feedback waveform data to obtain a feature vector containing the fundamental amplitude, harmonic distortion rate, and transient rate of change.

[0024] The standardized operating condition vector and the feature vector are aligned and concatenated in the time dimension to obtain the input information reflecting the current operating status.

[0025] Optionally, after determining the parameter adjustment amount, the method further includes:

[0026] Based on the parameter adjustment amount, the pre-operation parameters of the power equipment are estimated after adjustment to obtain the pre-operation parameters;

[0027] The pre-operation parameters are compared with the preset safe operating boundaries;

[0028] If the pre-operation parameters exceed the safe operating boundary, the parameter adjustment amount is adjusted to the maximum allowable adjustment amount corresponding to the safe operating boundary;

[0029] If the pre-running parameters do not exceed the safe operating boundary, then the parameter adjustment amount remains unchanged.

[0030] Optionally, the method further includes:

[0031] In a simulation environment, a training dataset containing various typical working conditions and extreme failure scenarios is constructed. The model is pre-trained until the average evaluation score of the model on the validation set meets the preset convergence condition, thus obtaining the pre-trained model.

[0032] The pre-trained model is deployed to the controller of the power equipment as an initial strategy;

[0033] During actual operation, real-time operating condition data and feedback waveform data are collected, and the pre-trained model is continuously optimized based on the online collected experience playback data.

[0034] Secondly, this application provides an optimization device for power equipment control strategies, comprising:

[0035] The acquisition module is used to acquire the expected performance indicators, preset test scenarios, and hardware constraints of the power equipment.

[0036] The processing module is used to input the expected performance indicators, preset test scenarios and hardware constraints into the strategy generation model;

[0037] The acquisition module is further configured to acquire the control strategy output by the strategy generation model corresponding to the preset test scenario, wherein the control strategy includes initial control parameters;

[0038] The processing module is also used to deploy the control strategy to a hardware-in-the-loop simulator for verification, drive the simulator to execute the working conditions corresponding to the preset test scenario, and collect feedback waveform data.

[0039] The processing module is also used to input the working condition data of the current execution scenario and the feedback waveform data into the reinforcement learning model to obtain the parameter adjustment amount output by the reinforcement learning model;

[0040] The processing module is also used to adjust the control parameters in the control strategy according to the parameter adjustment amount to obtain the updated control strategy;

[0041] The processing module is further configured to redeploy the updated control strategy to the hardware-in-the-loop simulator for verification, and acquire new feedback waveform data until the new feedback waveform data meets the expected performance index, thereby obtaining the optimized control strategy.

[0042] Optionally, the processing module is further configured to send the control strategy to a controller electrically connected to the hardware-in-the-loop emulator via a communication interface;

[0043] The processing module is also used to drive the hardware-in-the-loop simulator to run the simulated load model corresponding to the preset test scenario, output simulated electrical signals to the controller, and receive drive instructions generated by the controller in response to the simulated electrical signals. The simulated load model is used to simulate the load conditions that the power equipment is subjected to in actual operation.

[0044] The processing module is also used to update the operating status of the simulated load model based on the driving instruction, and to collect the updated voltage, current and power waveform data as the feedback waveform data.

[0045] Optionally, the device further includes: a calculation module and a determination module;

[0046] The processing module is further configured to integrate the operating condition data and the feedback waveform data into input information reflecting the current operating status, and input it into the reinforcement learning model;

[0047] The calculation module is used to calculate the degree of deviation between the feedback waveform data and the expected performance index;

[0048] The determining module is used to control the reinforcement learning model to determine the parameter adjustment amount based on the input information and the degree of deviation, wherein the parameter adjustment amount represents the adjustment range of the control parameters.

[0049] Optionally, the processing module is further configured to normalize the operating condition data to obtain a standardized operating condition vector.

[0050] The processing module is also used to extract time-frequency domain features from the feedback waveform data to obtain a feature vector containing the fundamental amplitude, harmonic distortion rate and transient rate of change.

[0051] The processing module is further configured to align and concatenate the standardized operating condition vector and the feature vector in the time dimension to obtain the input information reflecting the current operating status.

[0052] Optionally, the processing module is further configured to estimate the adjusted operating parameters of the power equipment based on the parameter adjustment amount, and obtain the pre-operating parameters;

[0053] The processing module is also used to compare the pre-running parameters with preset safe operating boundaries;

[0054] The processing module is further configured to adjust the parameter adjustment amount to the maximum allowable adjustment amount corresponding to the safe operating boundary if the pre-running parameter exceeds the safe operating boundary;

[0055] The processing module is further configured to keep the parameter adjustment amount unchanged if the pre-running parameters do not exceed the safe operating boundary.

[0056] Optionally, the processing module is further configured to construct a training dataset containing various typical working conditions and extreme fault scenarios in a simulation environment, pre-train the model until the average evaluation score of the model on the validation set meets the preset convergence condition, and obtain the pre-trained model.

[0057] The processing module is also used to deploy the pre-trained model to the controller of the power equipment as an initial strategy;

[0058] The processing module is also used to collect real-time operating condition data and feedback waveform data during actual operation, and to continuously optimize the pre-trained model based on the online collected experience playback data.

[0059] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0060] The memory stores computer-executed instructions;

[0061] The processor executes computer execution instructions stored in the memory to implement the power equipment control strategy optimization method as described in the first aspect and various possible implementations of the first aspect above.

[0062] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions thereon, which, when executed by a processor, are used to implement the optimization method for power equipment control strategies as described in the first aspect and various possible implementations of the first aspect.

[0063] Fifthly, this application provides a program product, including a computer program, which, when executed by a processor, implements the optimization method for the power equipment control strategy as described above.

[0064] This application provides a method, apparatus, and electronic device for optimizing power equipment control strategies. The method acquires the desired performance indicators of the power equipment, preset test scenarios, and hardware constraints, inputting them into a strategy generation model to automatically generate a control strategy containing initial control parameters. The control strategy is then deployed to a hardware-in-the-loop simulator for verification, driving the simulator to execute the operating conditions corresponding to the preset test scenario and collect feedback waveform data. Optimization iterations are performed based on the operating condition data and feedback waveform data of the current execution scenario until the feedback waveform data meets the desired performance indicators, resulting in an optimized control strategy that is then sent to the power equipment. This process utilizes a strategy generation model to automatically generate the initial control strategy, avoiding the subjectivity and experience differences inherent in manual design. The hardware-in-the-loop simulator simulates complex operating conditions such as grid fluctuations and load mutations, achieving comprehensive coverage of test scenarios. A reinforcement learning model autonomously adjusts the control parameters based on the deviation between the feedback waveform data and the desired performance indicators, and dynamically adjusts the decision-making strategy based on the deviation trends of each verification, achieving automated closed-loop iterative optimization of the control strategy. This method shortens the development cycle, reduces reliance on expert experience, and improves the field adaptability of power equipment. Attached Figure Description

[0065] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0066] Figure 1 A flowchart illustrating a method for optimizing power control parameters provided in this application. Figure 1 ;

[0067] Figure 2 A flowchart illustrating a method for optimizing power control parameters provided in this application. Figure 2 ;

[0068] Figure 3 A schematic diagram of the structure of a power control parameter optimization device provided in this application;

[0069] Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application.

[0070] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0071] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0072] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse.

[0073] Power equipment is widely used in new energy power generation and smart microgrids. The control strategy of this equipment determines its grid connection performance, dynamic response capability, and operational stability. Especially in the scenario of new energy grid connection, the control strategy needs to cope with complex operating conditions such as sudden voltage drops, frequency deviations, and load changes. Therefore, an efficient and stable control strategy is of great significance for improving the operational quality of power equipment and grid security.

[0074] In existing technologies, the development of power equipment control strategies mainly relies on an iterative process driven by human experience. This involves engineers designing the control logic framework and initial parameters based on theoretical analysis. For example, when designing a proportional-integral controller for a photovoltaic inverter, engineers set the proportional and integral coefficients based on experience and design parameters such as limiting values. The designed control strategy is then deployed to an actual controller or an offline simulation environment for testing. For instance, offline simulation software can be used to simulate a 20% voltage drop in the grid, observing the inverter's response time, overshoot, and other performance indicators. Engineers analyze the voltage and current waveform data output from the tests and manually adjust the parameters in the control strategy, such as increasing the proportional and integral coefficients to optimize performance. This process is repeated until the control strategy performance meets the preset requirements.

[0075] However, the optimization of the aforementioned control strategies is highly dependent on the individual experience of engineers. Different engineers may yield different optimization results for the same control strategy, and this experience is difficult to systematically reuse, leading to unstable optimization outcomes. Furthermore, the long iteration cycle hinders the progress of research and development.

[0076] To address the aforementioned issues, this application proposes an optimization method for power equipment control strategies. This method involves inputting the desired performance indicators of the power equipment, a preset test scenario, and hardware constraints into a strategy generation model to obtain a control strategy corresponding to the preset test scenario, including initial control parameters. The control strategy is then deployed to a hardware-in-the-loop simulator for verification, driving the simulator to execute the operating conditions corresponding to the preset test scenario and collecting feedback waveform data. Optimization iterations are performed based on the operating condition data of the current execution scenario and the feedback waveform data until the feedback waveform data meets the desired performance indicators, resulting in the optimized control strategy. This application can be widely applied to the development of control strategies for power equipment such as photovoltaic inverters, energy storage converters, smart microgrids, and electric vehicle charging facilities. It is particularly suitable for developing high-performance control strategies that require coverage of complex grid operating conditions, rapid iterative optimization, and field adaptability. The execution entity of this application can be a server or edge computing device integrating a strategy generation model and a reinforcement learning model, or a lightweight model deployed in the local controller of the power equipment; this application does not limit the specific implementation.

[0077] It should be noted that the optimization method, apparatus and electronic equipment for power equipment control strategies provided in this application can be used in the field of power electronics technology, or in any field other than power electronics. This application does not limit the application field of the optimization method, apparatus and electronic equipment for power equipment control strategies.

[0078] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0079] Figure 1 A flowchart illustrating a method for optimizing a power equipment control strategy provided in this application embodiment. Figure 1 .like Figure 1 As shown, the method for optimizing the power equipment control strategy provided in this embodiment includes:

[0080] S101. Obtain the expected performance indicators, preset test scenarios, and hardware constraints of the power equipment.

[0081] Among them, power equipment refers to power electronic equipment that requires control strategy optimization, including but not limited to photovoltaic inverters, energy storage converters, electric vehicle charging facilities, etc.

[0082] Expected performance indicators refer to the performance requirements that the control strategy of power equipment must achieve, such as dynamic response indicators and steady-state accuracy indicators. Expected performance indicators can be preset by users according to actual application scenarios and industry standards, serving as the basis for convergence judgment in subsequent optimization iterations.

[0083] Preset test scenarios refer to a set of preset operating conditions used to verify and optimize control strategies, covering various working conditions that power equipment may encounter in actual operation.

[0084] Hardware constraints refer to the range of parameter values ​​that are determined by physical hardware limitations in the actual operation of power equipment.

[0085] One possible implementation is to read the user-defined expected performance indicators through a human-machine interface or configuration file. For example, for the virtual synchronous machine control strategy of the energy storage converter, the user sets the grid connection response time ≤ 0.5ms and steady-state error ≤ 1% as the expected performance indicators.

[0086] Based on the application scenarios and testing requirements of power equipment, preset test scenarios can be selected or configured from a pre-set test scenario library. For example, for energy storage converters that need to verify grid fault ride-through capability, scenarios such as a 20% grid voltage drop lasting 100ms and a frequency offset of ±1Hz can be configured.

[0087] Based on the hardware specifications of the power equipment, obtain the hardware constraints. For example, read from the equipment technical manual that the upper limit of the switching frequency is 10kHz and the output current limit is 1.1 times the rated value.

[0088] By acquiring expected performance indicators, preset test scenarios, and hardware constraints, a complete input basis is provided for the subsequent generation and optimization of control strategies. Compared with the existing technology that relies solely on engineers' experience to set initial parameters, this embodiment quantifies performance indicators, systematizes test scenarios, and clarifies hardware boundaries, making the subsequent generation and optimization of control strategies based on evidence, thus laying a data foundation for the development of fully automated control strategies.

[0089] S102. Input the expected performance indicators, preset test scenarios and hardware constraints into the strategy generation model, and obtain the control strategy output by the strategy generation model corresponding to the preset test scenarios. The control strategy includes initial control parameters.

[0090] The policy generation model refers to a pre-trained artificial intelligence model used to generate control policies. This model can be a generative model based on deep learning or a rule-based generation model combined with an expert knowledge base. The policy generation model takes the desired performance index, a preset test scenario, and hardware constraints as input, and outputs a control policy adapted to that test scenario.

[0091] A control strategy refers to a control scheme used to control the operation of power equipment, including the control logic framework and initial control parameters.

[0092] Initial control parameters refer to the initial values ​​of parameters in the control strategy, automatically generated by the strategy generation model based on input conditions. These initial parameters are the starting point for subsequent iterative optimization. The initial control parameters satisfy hardware constraints, ensuring that the control strategy can run safely when deployed to a hardware-in-the-loop simulator.

[0093] One possible implementation involves encapsulating the desired performance metrics, preset test scenarios, and hardware constraints according to the format required by the strategy generation model. For example, the desired performance metrics can be encoded as vectors, the preset test scenarios can be converted into a sequence of scenario labels, and the hardware constraints can be converted into a parameter boundary matrix.

[0094] The encapsulated input data is fed into the policy generation model. Based on the mapping relationships learned during training, the policy generation model generates a control policy that matches the input conditions. For example, taking the maximum power point tracking control of a photovoltaic inverter as an example, when the desired performance index is "maximum power point tracking efficiency ≥ 99.5%", the preset test scenario is "sudden change in irradiance from 100W / m² to 1000W / m²", and the hardware constraint is "switching frequency ≤ 10kHz", the policy generation model outputs an initial control policy that includes the perturbation-observation control logic and parameters such as the initial perturbation step size and sampling frequency.

[0095] The output control strategy includes the control logic framework and initial control parameters. The output control strategy can be a structured file or a directly compileable code file, facilitating deployment in subsequent steps.

[0096] S103. Deploy the control strategy to the hardware-in-the-loop simulator for verification, drive the simulator to execute the working conditions corresponding to the preset test scenario, and collect feedback waveform data.

[0097] Hardware-in-the-loop (HIL) simulators are real-time simulation systems used to simulate the operating environment of power equipment. They are electrically connected to the controller of the power equipment under test, forming a closed-loop test circuit. The HIL simulator runs a mathematical model of the controlled object (such as a power grid model, load model, motor model, etc.) to simulate the electrical environment faced by the power equipment in actual operation in real time. HIL simulators can run in microsecond-level time steps, ensuring that the simulation timing is consistent with the real physical system, thereby verifying the performance of the control strategy under real-time conditions.

[0098] Operating conditions refer to the physical operating conditions simulated by the hardware-in-the-loop simulator, including grid parameters (voltage amplitude, frequency, phase, harmonic content, short-circuit ratio, etc.), load conditions (load type, power level, amplitude and rate of change, etc.), and environmental factors (temperature, aging degree, etc.). Operating conditions correspond to the specific execution parameters of a preset test scenario, such as a 20% sudden drop in grid voltage or a sudden increase in load from 0% to 100%.

[0099] Feedback waveform data refers to the electrical quantity waveform data collected in real time by the hardware-in-the-loop simulator during operation. The feedback waveform data reflects the actual response effect of the control strategy under the current operating conditions and serves as the basis for subsequent optimization and iteration.

[0100] One possible implementation involves automatically compiling the control strategy into an executable file via a communication interface, and then downloading the compiled executable file to the controller under test that is electrically connected to the hardware-in-the-loop simulator via the communication interface.

[0101] After the control strategy is deployed, a test start command is sent to the hardware-in-the-loop simulator, driving the simulator to execute the corresponding operating conditions according to the preset test scenario. Specifically,

[0102] Load the operating parameters of a 20% voltage drop into the power grid model of the hardware-in-the-loop simulator;

[0103] The hardware-in-the-loop simulator runs the power grid model in real-time simulation and outputs simulated electrical signals (such as three-phase voltage sampling values, current sampling values, power grid frequency, etc.) to the controller under test.

[0104] The controller under test receives analog electrical signals, calculates drive commands (such as duty cycle, switching signals, etc.) according to the control strategy, and outputs the drive commands to the hardware-in-the-loop simulator.

[0105] The hardware-in-the-loop simulator receives drive commands, acts on the running power grid model and load model, updates the operating state of the model, and simulates the response of power equipment in a real power grid.

[0106] The above process forms a complete closed-loop verification circuit. The controller under test outputs control commands based on the analog signals provided by the simulator. The simulator updates the state of the controlled object model based on the control commands and outputs new analog signals. This cycle repeats to verify the performance of the control strategy under real-time conditions.

[0107] During the simulator's operation, the system continuously acquires waveform data such as voltage, current, and power output from the hardware-in-the-loop simulator as feedback waveform data. Specifically, starting from the moment a voltage drop occurs, the system continuously acquires the inverter's output current waveform and active power waveform until the voltage recovers and the system reaches steady-state operation. The acquired waveform data includes key information such as the amplitude of the inrush current at the moment of the voltage drop, the power overshoot during the voltage recovery process, and the steady-state error after recovery.

[0108] By automatically deploying the control strategy to a hardware-in-the-loop simulator for verification, closed-loop performance testing of the control strategy under real-time conditions was achieved. Compared to existing technologies that rely on manual deployment and testing, this method shortens testing time and improves testing efficiency.

[0109] Specifically, the control strategy is sent to the controller that is electrically connected to the hardware-in-the-loop simulator via a communication interface.

[0110] The communication interface refers to the standardized interface used to enable data interaction between the policy generation system and the controller. The communication interface can be a physical interface, a protocol interface, or a dedicated communication interface. This application does not impose any limitations on this aspect.

[0111] The controller refers to the controller under test (DUT) that is electrically connected to the hardware-in-the-loop simulator; it is the hardware device that actually executes the control strategy. The controller and the hardware-in-the-loop simulator are connected via electrical wiring harnesses to form a closed-loop test circuit.

[0112] One possible implementation involves selecting a matching compilation toolchain based on the target controller's model and architecture. For example, the compilation tool is invoked to compile the control strategy into an executable file; a connection is established with the controller via a communication interface, such as an Ethernet interface, using the TCP / IP protocol; the compiled executable file is transmitted to the controller via the communication interface; the controller receives the completed executable file, automatically programs it, and performs a reset operation to start the control strategy.

[0113] The automatic compilation and distribution of control strategies are achieved through the communication interface, eliminating the tedious operation of manually selecting compilation toolchains and configuring compilation options, and reducing the technical requirements for operators; automatic distribution enables seamless connection from generation to deployment of control strategies, and greatly shortens the testing time.

[0114] The driver hardware-in-the-loop simulator runs a simulated load model corresponding to a preset test scenario, outputs simulated electrical signals to the controller, and receives drive commands generated by the controller in response to the simulated electrical signals. The simulated load model is used to simulate the load conditions that power equipment experiences in actual operation.

[0115] The simulated load model refers to a mathematical model running in a hardware-in-the-loop simulator to simulate the load borne by electrical equipment in actual operation. Simulated load models include, but are not limited to, power grid models (such as three-phase voltage sources and harmonic sources), load models (such as resistive loads, inductive loads, and motor loads), and fault models (such as voltage sags and short-circuit faults). The simulated load model runs in real-time and can accurately reflect the electrical characteristics of a real load.

[0116] One possible implementation involves sending a test start command to the hardware-in-the-loop emulator, specifying the currently executed preset test scenario. The hardware-in-the-loop emulator then loads the corresponding simulated load model parameters. For example, for the "20% voltage drop in the mains" test scenario, the emulator loads a three-phase power grid model, sets the rated voltage to 380V, the drop magnitude to 20%, and the duration to 100ms.

[0117] The hardware-in-the-loop simulator runs the simulated load model in real-time. The simulator performs iterative calculations in microsecond-level steps to simulate the dynamic response of controlled objects such as the power grid and the load. Through signal conditioning circuitry, the simulator converts the electrical states of the simulated load model (such as instantaneous three-phase voltage and current values) into analog electrical signals, which are then output to the controller.

[0118] The controller acquires analog electrical signals in real time and performs calculations based on the control strategy. Taking the control of an energy storage converter as an example, the controller calculates active and reactive power based on the acquired three-phase voltage and current signals, calculates the modulation wave signal through the control algorithm, and generates drive commands.

[0119] The controller outputs drive commands to the hardware-in-the-loop simulator. Upon receiving the drive commands, the simulator applies them to the running simulated load model, updating the model's electrical state (e.g., updating grid current and DC bus voltage). The updated state is then converted back into analog electrical signals and output to the controller, forming a complete closed-loop control circuit.

[0120] The operating status of the simulated load model is updated based on the driving instructions, and the updated voltage, current and power waveform data are collected as feedback waveform data.

[0121] Among them, drive commands refer to drive signals calculated and generated by the controller based on analog electrical signals and control strategies, such as duty cycle, switching state, modulation wave, etc.

[0122] One possible implementation involves a hardware-in-the-loop emulator receiving drive commands from the controller. Taking energy storage converter testing as an example, the controller outputs three-phase duty cycle signals (e.g., 0.3, 0.5, 0.7), and the emulator captures these signals in real time through the input interface.

[0123] The simulator substitutes the drive commands into the mathematical equations of the simulated load model for solution. For the inverter model, the drive commands are converted into switching states and applied to the DC-AC converter model to calculate the output current and voltage. For example, given a DC bus voltage of 700V and a duty cycle of 0.5, the calculated inverter output phase voltage is 350V. For the grid model, the inverter output current is injected into the grid, and the grid connection point voltage is calculated based on the grid impedance. For the load model, the load current and power are calculated based on the load impedance.

[0124] The above calculations are performed iteratively, continuously updating the operating state of the simulated load model. The update process meets the real-time requirements of hardware-in-the-loop simulation, ensuring that the simulation timing is consistent with the real physical system.

[0125] During the process of updating the operating status of the simulated load model, waveform data of key electrical quantities are collected in real time, such as:

[0126] Voltage waveforms: three-phase grid voltage, inverter output voltage, DC bus voltage;

[0127] Current waveforms: three-phase grid current, inverter output current, load current;

[0128] Power waveforms: active power, reactive power, apparent power.

[0129] The acquisition frequency is synchronized with the simulation step size, typically 10-100 μs, to ensure that the waveform data fully reflects the transient process. Specifically, in the grid voltage sag test, data acquisition begins 10 ms before the voltage sag occurs and continues until 50 ms after voltage recovery. The acquired waveforms fully record the current surge at the moment of the sag, the power overshoot during the recovery process, and the error after steady-state recovery. The acquired voltage, current, and power waveform data are organized into a structured format and used as feedback waveform data for subsequent performance evaluation and optimization iterations.

[0130] The simulation load model's operating state is updated based on drive commands, and feedback waveform data is collected. This fully simulates the physical response process of a real control system, and the verification results show a high degree of realism.

[0131] S104. Input the current execution scenario's working condition data and feedback waveform data into the reinforcement learning model to obtain the parameter adjustment amount output by the reinforcement learning model.

[0132] The operating condition data for the current execution scenario refers to the operating condition parameters used during the current test execution, including but not limited to grid voltage amplitude, frequency offset, voltage sag amplitude, load change amplitude, load change rate, and grid short-circuit ratio. The operating condition data corresponds to the preset test scenario and is a quantitative parameter describing the specific conditions of the test execution.

[0133] A reinforcement learning model refers to a pre-trained artificial intelligence model used for parameter optimization. Based on a state-action-reward mechanism, the reinforcement learning model learns the optimal policy to guide parameter adjustment. In this embodiment, the reinforcement learning model takes the integrated state of operating condition data and feedback waveform data as input, outputs the parameter adjustment amount as the action, and uses the deviation between the feedback waveform data and the desired performance index as the reward signal. Through continuous trial and error, it obtains the optimal parameter adjustment policy.

[0134] Parameter adjustment refers to the specific numerical value output by the reinforcement learning model used to adjust the control parameters in the control strategy. Parameter adjustment can be an absolute value or a relative value.

[0135] One possible implementation involves feeding operating condition data and feedback waveform data as input to a reinforcement learning model. The reinforcement learning model is pre-trained, including the mapping relationship of optimal parameter adjustment strategies under different input conditions. The model performs forward inference calculations based on the input information and outputs the parameter adjustment amount.

[0136] Specifically, when the input information includes operating condition data "grid voltage drops by 20%" and feedback waveform data "response time 0.65 milliseconds, overshoot 6.8%", the reinforcement learning model output parameter adjustment is as follows: the damping coefficient increases by 15, and the virtual inertia constant decreases by 1.5.

[0137] Reinforcement learning models learn the mapping relationship between input conditions and parameter adjustments based on a large amount of training data, and can quickly output reasonable parameter adjustment amounts, avoiding the trial-and-error process of manually analyzing waveforms and adjusting parameters based on experience.

[0138] S105. Adjust the control parameters in the control strategy according to the parameter adjustment amount to obtain the updated control strategy.

[0139] S106. The updated control strategy is redeployed to the hardware-in-the-loop simulator for verification, and new feedback waveform data is obtained. The parameter adjustment and verification are performed repeatedly until the new feedback waveform data meets the expected performance indicators, and the optimized control strategy is obtained.

[0140] The updated control strategy refers to the new version of the control strategy obtained by applying parameter adjustments to the current control strategy. The updated control strategy retains the original control logic framework and only modifies the control parameters.

[0141] Redeployment refers to the process of sending the updated control strategy back to the controller electrically connected to the hardware-in-the-loop simulator via the communication interface for a new round of verification.

[0142] Optimization iteration refers to the process of gradually optimizing the control parameters in the control strategy by repeatedly executing a closed-loop process of "verification-adjustment-re-verification", so that the feedback waveform data gradually approaches and ultimately meets the expected performance indicators.

[0143] An optimized control strategy refers to a control strategy whose performance indicators meet the expected performance requirements after multiple rounds of iterative optimization. The optimized control strategy includes the finalized control parameters and can be directly deployed to actual power equipment for operation.

[0144] One possible implementation is to modify the control parameters in the current control strategy based on the parameter adjustment amount. For example, if the current control strategy has a virtual inertia constant of 10 and a damping coefficient of 50, and the reinforcement learning model outputs a parameter adjustment amount of "increase the damping coefficient by 15 and decrease the virtual inertia constant by 1.5", then the control parameters are updated to virtual inertia constant = 8.5 and damping coefficient = 65, while other control logic remains unchanged, resulting in the updated control strategy.

[0145] The updated control strategy is redeployed to the hardware-in-the-loop simulator for verification. After deployment, the simulator is driven to execute the same preset test scenario and collect new feedback waveform data. For example, the updated control strategy is deployed to the controller, the voltage sag test is rerun, and the inverter output current waveform and active power waveform are collected.

[0146] Extract performance metric values ​​from the new feedback waveform data and compare them with the expected performance metric:

[0147] If all performance metrics meet the expected requirements (e.g., response time 0.48 ms ≤ 0.5 ms), then convergence is determined, the iteration is terminated, and the current control strategy is the optimized control strategy.

[0148] If performance metrics still fail to meet expectations (e.g., response time of 0.55 milliseconds is still greater than 0.5 milliseconds), new feedback waveform data is input into the reinforcement learning model again to obtain a new round of parameter adjustments. The closed-loop process of parameter update-redeployment-verification is repeated until convergence.

[0149] Once the iterations converge, the optimized control strategy is obtained. This control strategy includes the control parameters that have been determined after multiple rounds of optimization, and its performance has been verified by a hardware-in-the-loop simulator under a preset test scenario to meet the expected performance indicators.

[0150] Through a closed-loop process of parameter updates and iterative verification, the control strategy is automatically optimized and deployed without manual intervention, significantly improving optimization efficiency. Through multiple rounds of iterative verification, the optimized control strategy is ensured to meet the expected performance requirements under preset test scenarios, guaranteeing the reliability of the optimization results.

[0151] Optionally, a training dataset containing various typical working conditions and extreme failure scenarios can be constructed in a simulation environment to pre-train the model until the average evaluation score of the model on the validation set meets the preset convergence condition, thus obtaining the pre-trained model.

[0152] Extreme fault scenarios refer to the boundary or extreme operating conditions that power equipment may encounter during operation, used to train the model's ability to cope with sudden abnormal situations. Extreme fault scenarios include, but are not limited to: sudden drop in grid voltage, sudden rise in grid voltage, frequency deviation, three-phase voltage imbalance, sudden load change, grid short circuit, abnormal rise in equipment temperature, and DC bus overvoltage.

[0153] The training dataset refers to the collection of data samples used for model pre-training. Each training sample contains input data and label data. The input data includes operating parameters and corresponding expected performance indicators; the label data consists of optimized control parameters.

[0154] The validation set refers to a set of data samples that are separated from the training dataset and do not participate in the model parameter updates. It is used to evaluate the model's generalization ability.

[0155] The average evaluation score refers to the average score calculated based on preset evaluation metrics after the model has been run on the validation set. Evaluation metrics may include parameter fitting accuracy, performance indicator prediction error, optimization success rate, etc.

[0156] One possible approach is to build a controlled object model of the power equipment in simulation software to ensure that the accuracy of the simulation model can reflect the dynamic characteristics of the real power equipment; and to configure the operating parameters of the simulation environment, including simulation step size, simulation duration, solver type, etc.

[0157] Multiple typical operating conditions and extreme fault scenarios are run in batches in the simulation environment to collect training data. Specifically, the operating condition parameter space is defined. Taking the control of the energy storage converter as an example, the operating condition parameters include: grid voltage amplitude (0.8pu-1.2pu, step size 0.05pu), grid frequency (49Hz-51Hz, step size 0.2Hz), load power (0%-100%, step size 10%), etc.

[0158] For each set of operating parameters, run the simulation under that operating condition; use an optimization algorithm to search for the control parameters that optimize performance while satisfying hardware constraints; record the optimal control parameters under that operating condition as label data. Repeat the above process to traverse the operating parameter space and generate a large number of training samples.

[0159] Construct the model structure to be trained. For policy generation models, a deep neural network structure can be used, dividing the training dataset into a training set (80%) and a validation set (20%). Supervised learning is used to train the model. During training, after each training cycle, the average evaluation score is calculated on the validation set. When the average evaluation score on the validation set no longer decreases for several consecutive cycles or reaches a preset threshold, the model is considered to have met the convergence condition, and training is stopped.

[0160] After training, the model's structural and weight parameters are saved to obtain a pre-trained model. This pre-trained model has the ability to quickly generate or optimize control strategies based on input conditions and performance indicators, and can be directly used in subsequent automated optimization processes.

[0161] The pre-trained model is deployed to the controller of the power equipment as the initial strategy.

[0162] During actual operation, real-time operating condition data and feedback waveform data are collected, and the pre-trained model is continuously optimized based on the online collected experience playback data.

[0163] In this context, the controller refers to the hardware unit in power equipment that actually implements the control strategy, such as a digital signal processor or microcontroller. The controller is electrically connected to the main circuit of the power equipment, collects sensor signals such as voltage and current in real time, implements the control strategy, and outputs drive signals.

[0164] The initial strategy refers to the control strategy provided when the pre-trained model is first deployed to the controller. This initial strategy is obtained based on large-scale training data in the simulation environment, has good generalization ability, and can enable power equipment to operate normally under most operating conditions.

[0165] During the actual operation of power equipment, real-time operating condition data and feedback waveform data are continuously collected; the data from each operation is organized into experience samples and stored in the controller's experience pool; during idle periods of the equipment (such as when the load is light or in standby mode) or when optimization tasks are periodically triggered, the pre-trained model is continuously optimized based on the experience playback data in the experience pool to obtain the pre-trained model.

[0166] This embodiment provides a method for optimizing the control strategy of power equipment. The method obtains the expected performance indicators, preset test scenarios, and hardware constraints of the power equipment, inputs them into a strategy generation model to automatically generate a control strategy containing initial control parameters. The control strategy is then deployed to a hardware-in-the-loop simulator for verification, driving the simulator to execute the operating conditions corresponding to the preset test scenarios and collect feedback waveform data. The operating condition data and feedback waveform data are input into a reinforcement learning model to obtain parameter adjustment amounts, update the control strategy, and redeploy for verification. This parameter adjustment and verification process is repeated until the feedback waveform data meets the expected performance indicators, resulting in an optimized control strategy. This process only requires manual setting of the expected performance indicators, preset test scenarios, and hardware constraints in the initial stage. Subsequent strategy generation, verification, feedback acquisition, parameter adjustment, and iterative optimization are all automatically completed by the system, eliminating the need for manual waveform analysis or parameter adjustment. This reduces human involvement, decreases reliance on expert experience, shortens the development cycle, and improves optimization efficiency.

[0167] Figure 2A flowchart illustrating a method for optimizing a power equipment control strategy provided in this application embodiment. Figure 2 .like Figure 2 As shown, in Figure 1 Based on the embodiments, a possible implementation method for inputting the current execution scenario's working condition data and feedback waveform data into the reinforcement learning model is described in detail, including:

[0168] S201. Normalize the operating condition data to obtain a standardized operating condition vector.

[0169] Operating condition data refers to a set of quantitative parameters describing the test conditions in the execution scenario. These include, but are not limited to, grid voltage amplitude, frequency offset, voltage sag amplitude, load change amplitude, and load change rate. Operating condition data typically consists of parameters across multiple dimensions, each with different units and numerical ranges.

[0170] A standardized operating condition vector is a multi-dimensional vector composed of multiple operating condition parameter values ​​after normalization. Each dimension in the standardized operating condition vector corresponds to a single operating condition parameter, and the values ​​are all within a uniform range, making it easy to concatenate and calculate with other feature vectors.

[0171] One possible implementation is to normalize the collected operating condition data and convert it into a standardized operating condition vector. Specifically, the operating condition data of the current execution scenario is obtained. For example, the current operating condition data includes: the grid voltage amplitude is 0.85 times the rated value, the frequency offset is +1.2 Hz, the voltage drop is 25%, the load change is 50%, and the grid short-circuit ratio is 3.5.

[0172] Normalization calculations are performed for each operating condition parameter. Normalization uses a minimum-maximum normalization method: the original parameter value is subtracted from the minimum possible value of that parameter, and then divided by the difference between the maximum and minimum possible values. The result is the normalized value, ranging from 0 to 1. Taking the grid voltage amplitude as an example, its preset variation range is 0.8 times to 1.2 times the rated value; the current value is 0.85 times the rated value, and after normalization, it becomes 0.125. Similarly, taking the frequency offset as an example, its preset variation range is -2 Hz to +2 Hz; the current value is +1.2 Hz, and after normalization, it becomes 0.8.

[0173] All normalized operating condition parameter values ​​are combined in a fixed order to form a standardized operating condition vector. Taking the example data above, the values ​​of each dimension in the standardized operating condition vector are 0.125, 0.8, 0.3125, 0.5, and 0.1875, respectively, corresponding to the grid voltage amplitude, frequency offset, voltage sag amplitude, load change amplitude, and grid short-circuit ratio.

[0174] By normalizing the operating data, the differences in the dimensions and numerical ranges of various operating parameters are eliminated, so that parameters of different dimensions have equal weight in subsequent model calculations.

[0175] S202. Extract time-frequency domain features from the feedback waveform data to obtain a feature vector containing the fundamental amplitude, harmonic distortion rate, and transient rate of change.

[0176] Time-frequency domain feature extraction refers to the process of extracting key indicators describing the time and frequency characteristics of waveform data. Through time-frequency domain feature extraction, the original waveform data is transformed into low-dimensional feature vectors, facilitating subsequent model processing.

[0177] The fundamental amplitude refers to the magnitude of the fundamental component in a waveform. The fundamental amplitude reflects the effective value of the output voltage or current of power equipment and is a key indicator for measuring steady-state performance.

[0178] Harmonic distortion rate (HCR) is the ratio of the effective value of all harmonic components in a waveform to the effective value of the fundamental component. It is used to measure the degree of waveform distortion. The lower the HCR, the closer the output voltage or current waveform is to a sine wave, and the better the power quality.

[0179] Transient rate of change refers to the magnitude of change of a waveform per unit time during a transient process, and is used to measure the dynamic response speed of a control strategy.

[0180] One possible implementation involves acquiring feedback waveform data, including three-phase output voltage waveforms, three-phase output current waveforms, and active power waveforms. The waveform that best reflects the control strategy's performance is then selected for feature extraction. For example, in a grid voltage sag test, the output current waveform is considered; in a load change test, the active power waveform is considered.

[0181] Frequency domain feature extraction is performed on the waveform data. The time-domain waveform is converted into a frequency domain spectrum using a Fast Fourier Transform (FFT), from which the fundamental amplitude and harmonic distortion rate are extracted. Specifically, taking the output current waveform as an example, a FFT is performed on the steady-state current waveform to obtain the current spectrum. The fundamental amplitude is the amplitude of the 50 Hz frequency component; for example, if the measured fundamental amplitude is 100 amperes. The harmonic distortion rate is calculated by taking the square root of the sum of the squares of the effective values ​​of all harmonic components (components whose frequencies are integer multiples of the fundamental frequency), dividing by the effective value of the fundamental component, and then multiplying by 100%. Time domain feature extraction is also performed on the waveform data to calculate the transient rate of change. Taking a grid voltage drop test as an example, the starting moment of the voltage drop is located, and the rate of increase of the output current after that moment is calculated. Specifically, the interval from the current's minimum value after the drop to its stable value is selected, and the ratio of the current change to the time change is calculated to obtain the transient rate of change. For load change tests, the transient rate of change can be expressed as the recovery rate of active power. For example, if the load suddenly increases from 20% to 80%, and the active power recovers from 20 kW to 78 kW within 8 milliseconds, then the transient rate of change is 7.25 kW per millisecond.

[0182] The extracted fundamental amplitude, harmonic distortion rate, and transient rate of change are combined in a fixed order to form a feature vector.

[0183] By extracting time-frequency domain features from the feedback waveform data, the high-dimensional original waveform data is compressed into a low-dimensional feature vector, which significantly reduces the amount of data processed by the subsequent model and improves computational efficiency.

[0184] S203. Align and concatenate the standardized operating condition vector and the feature vector in the time dimension to obtain input information reflecting the current operating status.

[0185] In this context, time dimension alignment refers to ensuring that the standardized operating condition vector and the feature vector correspond to the same moment or the same time period in time. Since the operating condition data reflects the input conditions of the test execution, and the waveform features reflect the response of the control strategy to the input conditions, the two have a causal relationship in time. Alignment is necessary to accurately reflect the correspondence between "input and response".

[0186] Concatenation refers to the operation of joining two or more vectors in sequence to form a new vector with a higher dimension. The input information obtained after concatenation contains information on both operating conditions and performance response, providing a complete decision-making basis for reinforcement learning models.

[0187] One possible implementation is to ensure the temporal consistency between standardized operating condition vectors and feature vectors. The operating condition data corresponds to the input conditions of the test execution, and the feature vector is a performance indicator extracted from the response waveform collected under those conditions. The two are associated through test timestamps and scenario identifiers.

[0188] The vectors are concatenated in a fixed order, typically with the standardized operating condition vector placed first and the feature vectors placed last. For example, if the standardized operating condition vector is [0.125,0.8,0.3125,0.5,0.1875] and the feature vector is [100,2.5,9], the concatenated vector will be the input information vector [0.125,0.8,0.3125,0.5,0.1875,100,2.5,9].

[0189] The concatenated input information is used as input to the reinforcement learning model for subsequent parameter adjustment calculations.

[0190] S204. Input the input information into the reinforcement learning model.

[0191] The input information refers to the comprehensive vector obtained by aligning and concatenating the standardized operating condition vector with the feature vector, which contains the current test operating conditions and the performance response information of the control strategy under that operating condition.

[0192] A reinforcement learning model is a pre-trained artificial intelligence model used for parameter optimization. Reinforcement learning models take input information as state input and output parameter adjustments as actions.

[0193] One possible implementation involves feeding the input information into a reinforcement learning model, which then performs forward inference computation. The network structure of a reinforcement learning model is typically a multilayer perceptron, with the number of input layer nodes corresponding to the dimension of the input information, and the number of output layer nodes corresponding to the number of adjustable parameters. The model calculates the values ​​of each output node based on the input information to obtain the parameter adjustment amount.

[0194] S205. Calculate the degree of deviation between the feedback waveform data and the expected performance indicators.

[0195] S206. The control reinforcement learning model determines the parameter adjustment amount based on the input information and the degree of deviation. The parameter adjustment amount represents the adjustment range of the control parameters.

[0196] The degree of deviation refers to the gap between the actual performance index extracted from the feedback waveform data and the expected performance index. The degree of deviation reflects the gap between the performance of the current control strategy and the target, and serves as the basis for the reinforcement learning model's decision-making.

[0197] Parameter adjustment refers to the specific numerical value output by the reinforcement learning model used to adjust the control parameters in the control strategy, such as increasing the damping coefficient by 15 or decreasing the virtual inertia constant by 1.5. Parameter adjustment represents the magnitude of adjustment to the control parameters.

[0198] One possible implementation is to extract actual performance index values ​​from the feedback waveform data. For example, from the feedback waveform of a voltage sag test, the measured response time is extracted to be 0.65 milliseconds and the measured overshoot is extracted to be 6.8%. The desired performance indexes are response time ≤ 0.5 milliseconds and overshoot ≤ 5%. The deviation of each performance index is then calculated.

[0199] Response time deviation: The measured value of 0.65 milliseconds minus the expected value of 0.5 milliseconds results in a deviation of 0.15 milliseconds;

[0200] Overshoot deviation: The measured value of 6.8% minus the expected value of 5% results in a deviation of 1.8%.

[0201] The input information and the calculated deviation level are used together as the basis for decision-making, controlling the reinforcement learning model to determine the parameter adjustment amount. Specifically, the reinforcement learning model has learned the mapping relationship of the optimal parameter adjustment strategy under different input states and deviation levels during the pre-training phase. Based on the input information (operating conditions and current performance characteristics) and the deviation level (performance gap), the model calculates the output parameter adjustment amount through forward inference; for example, the input information shows that the current operating condition is a 20% drop in grid voltage, the current performance characteristics are a response time of 0.65 milliseconds and an overshoot of 6.8%, and the deviation level is a response time difference of 0.15 milliseconds and an overshoot difference of 1.8%. The reinforcement learning model, combining the above information, outputs the following parameter adjustment amounts: the damping coefficient increases by 15, and the virtual inertia constant decreases by 1.5. The adjustment amount represents the magnitude of adjustment to the control parameters, used to narrow the gap between the current performance and the desired performance.

[0202] The degree of deviation quantifies the gap between the current control strategy and the target, providing clear directional guidance for parameter adjustment.

[0203] S207. Estimate the operating parameters of the power equipment after adjustment based on the parameter adjustment amount to obtain the pre-operation parameters.

[0204] Prediction refers to the process of estimating the possible operating parameters of the system after adjustment, based on the current operating status and the adjustment amount, using mathematical models or empirical formulas, before the actual application of parameter adjustments. The purpose of prediction is to verify the safety of parameter adjustments in advance.

[0205] Pre-operation parameters refer to the estimated operating parameter values ​​that power equipment may exhibit after parameter adjustments, based on the estimated parameter adjustment amounts.

[0206] One possible approach is to obtain the current operating status of the power equipment, including actual operating parameters such as current output voltage, output current, DC bus voltage, and power device temperature. Combining this with parameter adjustment amounts, and using a mathematical model of the power equipment or a pre-defined mapping relationship, the potential trends and final values ​​of these operating parameters after the parameter adjustments are calculated. For example, the current operating status is: RMS output current 80 amps, DC bus voltage 700 volts, and power device junction temperature 85 degrees Celsius. Based on the parameter adjustment amounts (damping coefficient increased by 15, virtual inertia constant decreased by 1.5), the estimated operating parameters after the adjustments are: the estimated RMS output current may rise to 95 amps, the DC bus voltage may decrease to 670 volts, and the power device junction temperature may rise to 92 degrees Celsius.

[0207] The adjusted output voltage response characteristics are estimated to obtain pre-operational parameters such as overshoot and response time. Estimating these parameter adjustments before actual application allows for the early detection of parameter combinations that could lead to equipment overload, overvoltage, or overheating.

[0208] S208. Compare the pre-run parameters with the preset safe operating boundaries.

[0209] S209. If the pre-operation parameters exceed the safe operating boundary, the parameter adjustment amount shall be adjusted to the maximum allowable adjustment amount corresponding to the safe operating boundary.

[0210] S210. If the pre-run parameters do not exceed the safe operating boundary, the parameter adjustment amount remains unchanged.

[0211] The safe operating boundary refers to the range of parameter values ​​allowed for power equipment under normal operating conditions. The safe operating boundary is determined by the equipment's hardware specifications, such as: output current not exceeding 1.2 times the rated value, DC bus voltage not exceeding 1.1 times the rated value, power device junction temperature not exceeding 125 degrees Celsius, and switching frequency not exceeding 10 kHz. Exceeding the safe operating boundary may lead to equipment damage.

[0212] One possible implementation is to obtain preset safe operating boundaries. For example, the safe operating boundaries are: the effective value of the output current does not exceed 100 amperes, the DC bus voltage is not lower than 600 volts and not higher than 800 volts, and the junction temperature of the power devices does not exceed 100 degrees Celsius.

[0213] The pre-operation parameters were compared item by item with the safe operating boundaries. The pre-operation parameters were: output current 95 amps, DC bus voltage 670 volts, and power device junction temperature 92 degrees Celsius. All pre-operation parameters were within the safe operating boundaries (95 amps ≤ 100 amps, 670 volts within the 600-800 volt range, 92 degrees Celsius ≤ 100 degrees Celsius). Therefore, it was determined that the safe operating boundaries were not exceeded, and the parameter adjustments were kept unchanged, operating according to the original values.

[0214] Another possible implementation is when the parameter adjustment is large, and the estimated output current is 105 amps, exceeding the safety boundary of 100 amps. In this case, the pre-operation parameters are determined to exceed the safe operating boundary, and the parameter adjustment needs to be corrected. The parameter adjustment that makes the output current exactly equal to 100 amps is calculated and used as the maximum allowable adjustment, replacing the original parameter adjustment. For example, if the original parameter adjustment is an increase of 20 in the damping coefficient with an estimated output current of 105 amps; calculation shows that an increase of 15 in the damping coefficient results in an output current of 100 amps, then the parameter adjustment is corrected to an increase of 15 in the damping coefficient, serving as the final adjustment command.

[0215] By verifying the safe operating boundary and correcting the parameter adjustment amount, a safety verification is performed before the parameter adjustment amount is actually applied to ensure that the optimization process does not generate operating parameters that exceed the equipment's tolerance range, thereby avoiding equipment damage or system instability. When the pre-operation parameters exceed the safety boundary, the parameter adjustment amount is corrected to the maximum allowable value, preserving the optimization effect as much as possible while ensuring safety.

[0216] This embodiment provides an optimization method for power equipment control strategies. The method normalizes operating data to obtain a standardized operating condition vector, extracts time-frequency domain features from feedback waveform data to obtain a feature vector containing fundamental amplitude, harmonic distortion rate, and transient rate of change, and aligns and concatenates the standardized operating condition vector and the feature vector in the time dimension to form input information reflecting the current operating state. This input information is then fed into a reinforcement learning model to calculate the deviation between the feedback waveform data and the desired performance index. The model determines parameter adjustment amounts based on the input information and the degree of deviation. Pre-operating parameters are estimated based on the parameter adjustment amounts to obtain pre-operating parameters. These pre-operating parameters are compared with preset safe operating boundaries. If the parameters exceed the boundaries, the parameter adjustment amounts are adjusted to the maximum allowable adjustment amount corresponding to the boundaries; otherwise, the parameter adjustment amounts remain unchanged. This process comprehensively captures the fundamental amplitude, harmonic distortion rate, and transient rate of change in the waveform through time-frequency domain feature extraction, enabling the input information to more accurately reflect the algorithm performance. It guides the reinforcement learning model to determine the parameter adjustment amount through the degree of deviation, achieving autonomous optimization. Through the safe operation boundary verification mechanism, it predicts the adjusted operating parameters and compares them with the safety boundary before parameter adjustment, avoiding dangerous parameter combinations that may lead to oscillation or overvoltage and overcurrent, thereby improving the accuracy of optimization and ensuring the safety and reliability of the optimization process.

[0217] Figure 3 This is a schematic diagram of a device for optimizing power equipment control strategies provided in this application. Figure 3 As shown, this application provides an optimization device for power equipment control strategies. The optimization device 300 for power equipment control strategies includes:

[0218] The acquisition module 301 is used to acquire the expected performance indicators, preset test scenarios, and hardware constraints of the power equipment.

[0219] Processing module 302 is used to input the expected performance indicators, preset test scenarios and hardware constraints into the strategy generation model;

[0220] The acquisition module 301 is also used to acquire the control strategy output by the strategy generation model that corresponds to the preset test scenario. The control strategy includes initial control parameters.

[0221] The processing module 302 is also used to deploy the control strategy to the hardware-in-the-loop simulator for verification, drive the simulator to execute the working conditions corresponding to the preset test scenario, and collect feedback waveform data.

[0222] The processing module 302 is also used to input the working condition data and feedback waveform data of the current execution scenario into the reinforcement learning model to obtain the parameter adjustment amount output by the reinforcement learning model;

[0223] The processing module 302 is also used to adjust the control parameters in the control strategy according to the parameter adjustment amount to obtain the updated control strategy;

[0224] The processing module 302 is also used to redeploy the updated control strategy to the hardware-in-the-loop simulator for verification, and to acquire new feedback waveform data until the new feedback waveform data meets the expected performance indicators, thereby obtaining the optimized control strategy.

[0225] Optionally, the processing module 302 is also used to send the control strategy to the controller electrically connected to the hardware-in-the-loop simulator via a communication interface;

[0226] The processing module 302 is also used to drive the hardware-in-the-loop simulator to run the simulated load model corresponding to the preset test scenario, output simulated electrical signals to the controller, and receive the drive command generated by the controller in response to the simulated electrical signals. The simulated load model is used to simulate the load conditions that the power equipment is subjected to in actual operation.

[0227] The processing module 302 is also used to update the operating status of the simulated load model based on the drive command, and to collect the updated voltage, current and power waveform data as feedback waveform data.

[0228] Optionally, the device may also include: a calculation module 303 and a determination module 304;

[0229] The processing module 302 is also used to integrate the operating condition data and feedback waveform data into input information reflecting the current operating status, and input it into the reinforcement learning model;

[0230] The calculation module 303 is used to calculate the degree of deviation between the feedback waveform data and the expected performance index;

[0231] The determination module 304 is used to control the reinforcement learning model to determine the parameter adjustment amount based on the input information and the degree of deviation. The parameter adjustment amount represents the adjustment range of the control parameters.

[0232] Optionally, the processing module 302 is also used to normalize the operating condition data to obtain a standardized operating condition vector.

[0233] The processing module 302 is also used to extract time-frequency domain features from the feedback waveform data to obtain a feature vector containing the fundamental amplitude, harmonic distortion rate and transient rate of change.

[0234] The processing module 302 is also used to align and concatenate the standardized operating condition vector and the feature vector in the time dimension to obtain input information reflecting the current operating status.

[0235] Optionally, the processing module 302 is also used to estimate the operating parameters of the power equipment after adjustment based on the parameter adjustment amount, and obtain the pre-operating parameters;

[0236] The processing module 302 is also used to compare the pre-run parameters with the preset safe operating boundary;

[0237] The processing module 302 is also used to adjust the parameter adjustment amount to the maximum allowable adjustment amount corresponding to the safe operating boundary if the pre-run parameters exceed the safe operating boundary;

[0238] The processing module 302 is also used to keep the parameter adjustment amount unchanged if the pre-run parameters do not exceed the safe operating boundary.

[0239] Optionally, the processing module 302 is also used to construct a training dataset containing various typical working conditions and extreme fault scenarios in the simulation environment, pre-train the model until the average evaluation score of the model on the validation set meets the preset convergence condition, and obtain the pre-trained model.

[0240] Processing module 302 is also used to deploy the pre-trained model to the controller of the power equipment as an initial strategy;

[0241] The processing module 302 is also used to collect real-time operating condition data and feedback waveform data during actual operation, and to continuously optimize the pre-trained model based on the online collected experience playback data.

[0242] The power equipment control strategy optimization device provided in this application embodiment has a similar implementation principle and technical effect to the implementation of each part of the aforementioned power equipment control strategy optimization method, and will not be described again here.

[0243] Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 4As shown, the electronic device 400 includes: a receiver 401, a transmitter 402, a processor 403, and a memory 404.

[0244] Receiver 401 is used to receive instructions and data;

[0245] Transmitter 402 is used to send commands and data;

[0246] Memory 404 is used to store instructions executed by the computer;

[0247] Processor 403 is used to execute computer execution instructions stored in memory 404 to implement the various steps of the power equipment control strategy optimization method in the above embodiments. For details, please refer to the relevant descriptions in the foregoing embodiments of the power equipment control strategy optimization method.

[0248] Optionally, the memory 404 can be either standalone or integrated with the processor 403.

[0249] When the memory 404 is set up independently, the electronic device also includes a bus for connecting the memory 404 and the processor 403.

[0250] The implementation principle and technical effects of the electronic device provided in this embodiment can be found in the foregoing embodiments, and will not be repeated here.

[0251] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method of any of the foregoing embodiments.

[0252] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the method of any of the foregoing embodiments.

[0253] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0254] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0255] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.

[0256] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.

[0257] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0258] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0259] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.

[0260] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for optimizing the control strategy of power equipment, characterized in that, include: Obtain the expected performance indicators, preset test scenarios, and hardware constraints of the power equipment; The expected performance indicators, preset test scenarios and hardware constraints are input into the strategy generation model to obtain the control strategy output by the strategy generation model corresponding to the preset test scenario. The control strategy refers to the control scheme used to control the operation of power equipment, including the control logic framework and initial control parameters. The control strategy is deployed to a hardware-in-the-loop simulator for verification, and the simulator is driven to execute the working conditions corresponding to the preset test scenario, and feedback waveform data is collected. The current execution scenario's working condition data and the feedback waveform data are input into the reinforcement learning model to obtain the parameter adjustment amount output by the reinforcement learning model. The reinforcement learning model includes the mapping relationship of the optimal parameter adjustment strategy under different input conditions. The control parameters in the control strategy are adjusted according to the parameter adjustment amount to obtain the updated control strategy; The updated control strategy is redeployed to the hardware-in-the-loop simulator for verification, and new feedback waveform data is obtained. The parameter adjustment and verification are performed repeatedly until the new feedback waveform data meets the expected performance index, and the optimized control strategy is obtained. The step of inputting the current execution scenario's working condition data and the feedback waveform data into the reinforcement learning model includes: The operating condition data is normalized to obtain a standardized operating condition vector; Time-frequency domain feature extraction is performed on the feedback waveform data to obtain a feature vector containing the fundamental amplitude, harmonic distortion rate, and transient rate of change. The standardized operating condition vector and the feature vector are aligned and concatenated in the time dimension to obtain input information reflecting the current operating status; Calculate the degree of deviation between the feedback waveform data and the expected performance index; The reinforcement learning model is controlled to determine the parameter adjustment amount based on the input information and the degree of deviation, and the parameter adjustment amount represents the adjustment range of the control parameter.

2. The method according to claim 1, characterized in that, The step of deploying the control strategy to a hardware-in-the-loop simulator for verification and collecting feedback waveform data includes: The control strategy is sent to the controller electrically connected to the hardware-in-the-loop simulator via a communication interface; The hardware-in-the-loop simulator is driven to run the simulated load model corresponding to the preset test scenario, output simulated electrical signals to the controller, and receive drive commands generated by the controller in response to the simulated electrical signals. The simulated load model is used to simulate the load conditions that the power equipment is subjected to in actual operation. The operating status of the simulated load model is updated based on the driving command, and the updated voltage, current and power waveform data are collected as the feedback waveform data.

3. The method according to claim 1, characterized in that, After determining the parameter adjustment amount, the method further includes: Based on the parameter adjustment amount, the pre-operation parameters of the power equipment are estimated after adjustment to obtain the pre-operation parameters; The pre-operation parameters are compared with the preset safe operating boundaries; If the pre-operation parameters exceed the safe operating boundary, the parameter adjustment amount is adjusted to the maximum allowable adjustment amount corresponding to the safe operating boundary; If the pre-running parameters do not exceed the safe operating boundary, then the parameter adjustment amount remains unchanged.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: In a simulation environment, a training dataset containing various typical working conditions and extreme failure scenarios is constructed. The model is pre-trained until the average evaluation score of the model on the validation set meets the preset convergence condition, thus obtaining the pre-trained model. The pre-trained model is deployed to the controller of the power equipment as an initial strategy; During actual operation, real-time operating condition data and feedback waveform data are collected, and the pre-trained model is continuously optimized based on the online collected experience playback data.

5. An optimization device for power equipment control strategy, characterized in that, include: The acquisition module is used to acquire the expected performance indicators, preset test scenarios, and hardware constraints of the power equipment. The processing module is used to input the expected performance indicators, preset test scenarios and hardware constraints into the strategy generation model; The acquisition module is further configured to acquire the control strategy output by the strategy generation model corresponding to the preset test scenario. The control strategy refers to a control scheme for controlling the operation of power equipment, including a control logic framework and initial control parameters. The processing module is also used to deploy the control strategy to a hardware-in-the-loop simulator for verification, drive the simulator to execute the working conditions corresponding to the preset test scenario, and collect feedback waveform data. The processing module is further configured to input the working condition data of the current execution scenario and the feedback waveform data into the reinforcement learning model to obtain the parameter adjustment amount output by the reinforcement learning model. The reinforcement learning model includes the mapping relationship of the optimal parameter adjustment strategy under different input conditions. The processing module is also used to adjust the control parameters in the control strategy according to the parameter adjustment amount to obtain an updated control strategy; The processing module is also used to redeploy the updated control strategy to the hardware-in-the-loop simulator for verification, and obtain new feedback waveform data until the new feedback waveform data meets the expected performance index, thereby obtaining the optimized control strategy. When inputting the current execution scenario's working condition data and the feedback waveform data into the reinforcement learning model, the processing module is used to: The operating condition data is normalized to obtain a standardized operating condition vector; Time-frequency domain feature extraction is performed on the feedback waveform data to obtain a feature vector containing the fundamental amplitude, harmonic distortion rate, and transient rate of change. The standardized operating condition vector and the feature vector are aligned and concatenated in the time dimension to obtain input information reflecting the current operating status; Calculate the degree of deviation between the feedback waveform data and the expected performance index; The reinforcement learning model is controlled to determine the parameter adjustment amount based on the input information and the degree of deviation, and the parameter adjustment amount represents the adjustment range of the control parameter.

6. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 4.

8. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • Hardware-in-the-loop test method and device and electronic equipment

    CN121277152A