Hardware-in-loop simulation method based on high-order generalized average model and related device
By using a high-order generalized average model, the problem of step size and accuracy in power electronic converter simulation is solved, and accurate simulation of circuits with large step sizes is achieved, which is suitable for power electronic converter simulation of complex systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-10
AI Technical Summary
In the existing technology, the simulation model of power electronic converter has a large step size but low accuracy, making it difficult to accurately predict the transient and steady-state behavior of the converter, especially in the case of multiple converters in parallel systems where dynamic problems are difficult to handle.
By employing a high-order generalized average model, the piecewise linear state equations of the power electronic converter are written, Fourier expansion is performed, the moving Fourier coefficients of the switching signal and the input signal are calculated, and the time-domain waveforms of the circuit variables are reconstructed to achieve high-precision simulation.
With a large simulation step size, it can accurately predict the steady-state and transient behavior of circuits, is suitable for hardware-in-the-loop simulation platforms, saves computing resources, and can handle dynamic problems of complex systems.
Smart Images

Figure CN121634883A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power electronic converter simulation technology, and relates to a hardware-in-the-loop simulation method and related devices based on a high-order generalized average model. Background Technology
[0002] With the rapid development of technologies such as renewable energy, electric vehicles, and smart grids, power electronic converters, as core components of energy conversion, are experiencing increasingly complex topologies and stringent performance requirements. Simulation technology plays a crucial role in the research and verification of these converters. While traditional pure digital simulations (such as offline simulations) offer high accuracy, they cannot accurately reflect the hardware characteristics, computational latency, and timing logic of the actual controller. To address this issue, hardware-in-the-loop (HIL) simulation technology has emerged and has become an indispensable key verification method in the power electronics industry.
[0003] HIL (Hardware-In-the-Loop) technology creates a highly realistic and flexible test environment by establishing a closed-loop connection between a real hardware controller (such as a DSP or FPGA) and a virtual controlled object (i.e., a power electronic main circuit model) running in a real-time simulator (such as a CPU or FPGA). This method offers two major advantages: firstly, it retains all the real characteristics of the hardware controller; secondly, it can safely and economically simulate various operating conditions in the simulation environment, including normal operation, load surges, and fault switching, and can even accurately reproduce the impact of parasitic parameters and heat dissipation characteristics of switching devices on system performance. However, to ensure the real-time performance of the hardware-in-the-loop simulation, the step size of the model simulated in the CPU is generally required to be no greater than 10 μs. When using an FPGA coprocessor, the minimum step size can reach 100 ns. But with the trend towards higher frequency power electronic converters and continuously increasing switching frequencies, even smaller step sizes are needed to achieve accurate converter simulation.
[0004] In summary, there is an urgent need for a new modeling and simulation method that can achieve high-precision simulation of power electronic converters within the large simulation step size allowed by the HIL platform. This method should be able to accurately predict their steady-state and transient behavior, retain key switching ripple information, and effectively handle dynamic problems in complex system scenarios such as multiple converters in parallel. Summary of the Invention
[0005] The purpose of this invention is to provide a hardware-in-the-loop simulation method and related apparatus based on a high-order generalized average model, so as to solve the technical problem that the model has a large step size but low accuracy, making it difficult to accurately predict the transient and steady-state behavior of the converter.
[0006] To achieve the above objectives, the present invention employs the following technical solution: In a first aspect, the present invention provides a hardware-in-the-loop simulation method based on a high-order generalized average model, comprising the following steps: Write the piecewise linear state equations of the target power electronic converter; The piecewise linear state equations are expanded using Fourier expansion to obtain the higher-order generalized average model of the power electronic converter. Calculate the moving Fourier coefficients of the switching signal and input signal of the power electronic converter, and substitute them into the higher-order generalized average model of the power electronic converter to obtain the differential equations of the moving Fourier coefficients of each order of the circuit variables. The differential equations are solved to calculate the moving Fourier coefficients of each variable in the circuit, and then the time-domain waveforms of each circuit variable at the center moment are reconstructed to realize the simulation of the target power electronic converter.
[0007] Furthermore, the target power electronic converter is a DAB converter.
[0008] Furthermore, the piecewise linear state equation of the DAB converter is expressed as follows:
[0009] In the formula, Indicates the power inductance in the circuit; Indicates the output capacitance of the circuit; This is the equivalent resistance in the DAB circuit; Indicates the transformer turns ratio; This represents the output resistance of the circuit; This represents the current flowing through the power inductor; This represents the capacitor voltage, and also the circuit's output voltage. Indicates the switching transistor arrive Boolean signal.
[0010] Furthermore, the step of performing a Fourier expansion of the piecewise linear state equations to obtain the higher-order generalized average model of the power electronic converter specifically includes: The piecewise linear state equation is in the interval Performing a Fourier expansion yields the large-signal model of the power electronic converter:
[0011] In the formula, This is the central moment of Fourier's development; Represents the -n to nth order shifted Fourier coefficients of the circuit variables; Indicates the switching cycle of the switching transistor; Represents a 2n+1 order identity matrix. It is a diagonal matrix with elements from -n to n. This represents the convolution of two vectors.
[0012] Furthermore, the calculation process of the moving Fourier coefficients of the switching signal specifically includes: Based on the primary side internal phase shift angle of the target power electronic converter α p Outward phase angle α and the secondary side inward phase angle α s Determine the phase angles corresponding to the turn-on and turn-off times of each switch. , , and :
[0013] When the duty cycle of each switch is 0.5, the moving Fourier coefficients of the switching signal are calculated based on the phase angle:
[0014] In the formula, The moving Fourier coefficients represent the switching signal. .
[0015] Furthermore, the calculation process of the moving Fourier coefficients of the input signal, when the input signal is a DC signal, only includes the 0th-order moving Fourier coefficient component, and is calculated as follows:
[0016] In the formula, This represents the moving Fourier coefficients of the input signal.
[0017] Furthermore, in the process of solving the differential equation, the differential equation is truncated, and differential equations of order -n to n are taken for calculation.
[0018] Secondly, the present invention provides a hardware-in-the-loop simulation system based on a high-order generalized average model, comprising: The state equation module is used to write the piecewise linear state equations of the target power electronic converter. The model building module is used to perform Fourier expansion on the piecewise linear state equations to obtain a high-order generalized average model of the power electronic converter. The differential equation module is used to calculate the moving Fourier coefficients of the switching signals and input signals of the power electronic converter, and substitute them into the higher-order generalized average model of the power electronic converter to obtain differential equations for the moving Fourier coefficients of various orders of circuit variables. The simulation module is used to solve differential equations, calculate the moving Fourier coefficients of each variable in the circuit, and then reconstruct the time-domain waveforms of each circuit variable at the center moment to realize the simulation of the target power electronic converter.
[0019] Thirdly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the hardware-in-the-loop simulation method based on a high-order generalized average model as described above.
[0020] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the hardware-in-the-loop simulation method based on a high-order generalized average model as described above.
[0021] Compared with the prior art, the present invention has the following beneficial effects: This invention discloses a hardware-in-the-loop simulation method and related apparatus based on a high-order generalized average model. It can first write out the piecewise linear equations of the converter, and then perform simulations on the piecewise linear equations in the interval... Fourier expansion and Fourier transform yield a high-order generalized average model of the power electronic converter. Substituting the moving Fourier coefficients of the switching and input signals into this high-order generalized average model, differential equations for the moving Fourier coefficients of the circuit variables are obtained. Finally, solving these truncated differential equations yields the values of the moving Fourier coefficients for each variable in the circuit, thus providing the waveforms of each circuit variable at time τ. This allows for modeling and simulation of the power electronic converter under large step sizes. The model established in this invention is suitable for hardware-in-the-loop (HIL) simulation platforms, enabling simulations with switching cycles shorter than the minimum step size in HIL simulations. This significantly improves the simulation step size and saves computational resources while meeting accuracy requirements, allowing for accurate prediction of the circuit's steady-state and transient behavior. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a schematic diagram of the system of the present invention; Figure 3This is the main circuit diagram of the DAB converter in an embodiment of the present invention; Figure 4 The transient and steady-state waveforms of the DAB converter in an embodiment of the present invention are shown. Figure 5 The waveform of the beat frequency oscillation of the parallel DAB converter in an embodiment of the present invention is shown. Detailed Implementation
[0024] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0025] The following detailed description is exemplary and intended to provide further detailed explanation of the invention. Unless otherwise specified, all technical terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this invention is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention.
[0026] See Figure 1 This invention discloses a hardware-in-the-loop simulation method based on a high-order generalized average model, comprising the following steps: S1, Write the piecewise linear state equations of the target power electronic converter; The target power electronic converter is a DAB converter, such as... Figure 3 As shown; the expression for the piecewise linear state equation of the DAB converter is:
[0027] In the linear piecewise equations of a DAB circuit, Indicates the power inductance in the circuit. Indicates the output capacitance of the circuit. The equivalent resistance in a DAB circuit mainly includes the on-resistance of the switching transistor, the resistance of the power inductor, and the equivalent resistance of the transformer to the primary side. This indicates the transformer's turns ratio. This represents the output resistance of the circuit. This represents the current flowing through the power inductor. This represents the capacitor voltage, and also the circuit's output voltage. Indicates the switching transistor arrive Boolean signal.
[0028] S2, Perform a Fourier expansion on the piecewise linear state equation to obtain the high-order generalized average (HOGA) model of the power electronic converter. For the piecewise linear state equations written in intervals Performing a Fourier expansion yields the high-order generalized average (HOGA) model of the power electronic converter:
[0029] In the formula, This is the central moment of Fourier's development; This represents the switching period of the switching transistor. Consider expanding the circuit to order -n to n. Represents a 2n+1 order identity matrix. It is a diagonal matrix with elements from -n to n. Represents the -n to nth order shifted Fourier coefficients of switching signals, input signals, and circuit variables.
[0030] S3. Calculate the moving Fourier coefficients of the switching signal and input signal of the power electronic converter, and substitute the moving Fourier coefficients of the switching signal and input signal into the high-order generalized average (HOGA) model of the power electronic converter to obtain the differential equations of the moving Fourier coefficients of each order of the circuit variables. In a DAB converter, The phase shift angle of the primary circuit switching transistor is the inner phase angle. The phase shift angle of the primary and secondary switching transistors. Let be the internal phase shift angle of the secondary circuit. In the HOGA model of the circuit, the turn-on and turn-off times of each switch are of great interest. The following matrix can be used to transform the phase shift angle in the circuit into the phase angles corresponding to the turn-on and turn-off times of the circuit. , , and .
[0031]
[0032] The above matrix uses the turn-on time of switch S1 as a reference, thus obtaining the turn-on phase of each switch. The moving Fourier coefficients of each switch are shown below:
[0033] In the above formula, ; When the input signal is a DC signal, it only contains the 0th order moving Fourier coefficient component, and can be calculated as follows:
[0034] S4, Solving differential equations; For differential equations from -n to n, the moving Fourier coefficients of each variable in the circuit are calculated, and then the time-domain waveforms of each circuit variable at the center time are reconstructed to realize the simulation of the target power electronic converter.
[0035] A high-order generalized average model of the circuit was built in Simulink, with n ranging from -5 to 5, and compared with a switching model. The results are as follows. Figure 4 As shown. The high-order generalized average model of the circuit of this invention can accurately predict the transient response and switching ripple of the circuit, requiring only 1 / 20 of the switching period; however, under the same simulation step size, the traditional switching model cannot accurately predict the transient response of the circuit.
[0036] When multiple converters are connected in parallel, differences in the switching transistor drive signals due to different system controllers may cause different switching frequencies of the parallel converters, resulting in frequency interference, known as beat frequency oscillation. To analyze this oscillation, a simulation step size of one-thousandth of the switching cycle is usually required. Using the method proposed in this paper, parallel converters can be modeled with large step sizes, and the beat frequency oscillation of the system can be accurately predicted.
[0037] Assuming converter 1 operates at Converter 2 operates at , This indicates the switching period corresponding to converter 1. This represents the switching period corresponding to converter 2. The transformation matrix using the Fourier coefficients can be used to... The Fourier coefficients expanded to the fundamental frequency are converted to... The Fourier coefficients of the fundamental frequency expansion are given by the matrix T as follows:
[0038] The sinc function expression in the above formula is:
[0039] Using the above formula, we can... Fourier coefficients expanded to the fundamental frequency are transformed into... Let be the Fourier coefficients expanded from the fundamental frequency. The condition for the above equation to hold is: .
[0040] Taking a two-stage parallel DAB converter as an example, the beat frequency oscillation generated by the circuit is analyzed, and the results are as follows: Figure 5 As shown, the proposed model can obtain accurate results using only a step size of 1 / 20 of the switching cycle.
[0041] See Figure 2This invention discloses a hardware-in-the-loop simulation system based on a high-order generalized average model, comprising a state equation module, a model building module, a differential equation module, and a simulation module. The state equation module is used to write the piecewise linear state equations of the target power electronic converter; the model building module is used to perform Fourier expansion of the piecewise linear state equations to obtain the high-order generalized average model of the power electronic converter; the differential equation module is used to calculate the moving Fourier coefficients of the switching signals and input signals of the power electronic converter, and substitute them into the high-order generalized average model of the power electronic converter to obtain differential equations for the moving Fourier coefficients of the circuit variables; the simulation module is used to solve the differential equations, calculate the moving Fourier coefficients of each variable in the circuit, and then reconstruct the time-domain waveforms of each circuit variable at the center moment, thereby realizing the simulation of the target power electronic converter.
[0042] In one embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions from the computer storage medium to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used for the operation of a hardware-in-the-loop simulation method based on a high-order generalized average model.
[0043] This invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the hardware-in-the-loop simulation method based on a high-order generalized average model in the above embodiments.
[0044] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0045] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0046] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The function specified in one or more boxes.
[0047] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0048] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A hardware-in-the-loop simulation method based on a high-order generalized average model, characterized in that, The method comprises the following steps: writing a piecewise linear state equation of a target power electronic converter; Fourier expanding the piecewise linear state equation to obtain a high-order generalized average model of the power electronic converter; calculating moving Fourier coefficients of a switching signal and an input signal of the power electronic converter and substituting the moving Fourier coefficients into the high-order generalized average model of the power electronic converter to obtain differential equations of moving Fourier coefficients of each order with respect to circuit variables; solving the differential equations to calculate the moving Fourier coefficients of each variable in the circuit and then reconstructing time-domain waveforms of each circuit variable at a center time point to realize simulation of the target power electronic converter.
2. The hardware-in-the-loop simulation method based on a high-order generalized average model according to claim 1, characterized in that, The target power electronic converter is a DAB converter.
3. The hardware-in-the-loop simulation method based on a high-order generalized average model according to claim 2, characterized in that, An expression of the piecewise linear state equation of the DAB converter is: wherein, represents the power inductance in the circuit; represents the output capacitance of the circuit; is the equivalent resistance in the DAB circuit; represents the turns ratio of the transformer; represents the output resistance of the circuit; represents the current flowing through the power inductance; represents the capacitor voltage, which is also the output voltage of the circuit; represents the switch to the Boolean signal.
4. The hardware-in-the-loop simulation method based on a high-order generalized average model according to claim 1, characterized in that, The step of Fourier expanding the piecewise linear state equation to obtain the high-order generalized average model of the power electronic converter specifically comprises: The piecewise linear state equation is applied in the interval The Fourier expansion is performed to obtain a large signal model of the power electronic converter: wherein is the center time instant of the Fourier expansion; denotes the -n to n order moving Fourier coefficients of the circuit variable; denotes the switching period of the switching transistor; denotes the 2n+1 order unit matrix, is the diagonal matrix with elements -n to n, denotes the convolution of two vectors.
5. The hardware-in-the-loop simulation method based on a high-order generalized average model according to claim 1, characterized in that, The calculation process of the moving Fourier coefficients of the switching signal specifically comprises: According to the primary side inner phase angle of the target power electronic converter α p , the outer phase angle α and the secondary side inner phase angle α s , the phase angle corresponding to the turn-on and turn-off time of each switch tube is determined , , and : When a duty cycle of each switching tube is 0.5, the moving Fourier coefficients of the switching signal are calculated based on the phase angle: In the formula, denotes the moving Fourier coefficients of the switching signal, .
6. The hardware-in-the-loop simulation method based on a high-order generalized average model according to claim 1, wherein, The calculation process of the moving Fourier coefficients of the input signal, when the input signal is a direct current, only contains a 0-order moving Fourier coefficient component and is calculated as: wherein denotes the moving Fourier coefficients of the input signal.
7. The hardware-in-the-loop simulation method based on a high-order generalized average model according to claim 1, characterized in that, In the process of solving the differential equations, the differential equations are truncated and differential equations of -n to n orders are calculated.
8. A hardware-in-the-loop simulation system based on a high-order generalized average model, characterized in that, comprise: a state equation module configured to write a piecewise linear state equation of a target power electronic converter; a model construction module configured to Fourier expand the piecewise linear state equation to obtain a high-order generalized average model of the power electronic converter; a differential equation module configured to calculate moving Fourier coefficients of a switching signal and an input signal of the power electronic converter and substitute the moving Fourier coefficients into the high-order generalized average model of the power electronic converter to obtain differential equations of moving Fourier coefficients of each order with respect to circuit variables; a simulation module configured to solve the differential equations to calculate the moving Fourier coefficients of each variable in the circuit and then reconstruct time-domain waveforms of each circuit variable at a center time point to realize simulation of the target power electronic converter.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor realizes the steps of the hardware-in-the-loop simulation method based on the high-order generalized average model according to any one of claims 1-7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1-9. The computer program realizes the steps of the hardware-in-the-loop simulation method based on the high-order generalized average model according to any one of claims 1-7 when executed by the processor.