Three-port converter switching control method and device, equipment and storage medium
By establishing a discrete state space averaging model and neural network training, the EMPC control law of the three-port converter is optimized, and the output voltage accuracy and adjustment time problems during mode switching are solved, achieving a more efficient control effect.
Patent Information
- Application Number
- CN202510582056.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-12
AI Technical Summary
The three-port converter has problems such as low output voltage accuracy and long adjustment time during mode switching, and the prior art has failed to effectively solve the control problems during mode switching.
Establish a discrete state space average model of the three-port converter, update the model weight using the backpropagation characteristics of the neural network, fit the regression state model, and design it through EMPC control law, collect training data for neural network training, and build a loss function to optimize the control signal.
Improves the output voltage accuracy of the three-port converter during mode switching, shortens the adjustment time and reduces the overshoot.
Smart Images

Figure CN120474332A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of converter switching control, and in particular to a three-port converter switching control method, apparatus, device, and storage medium. Background Art
[0002] Compared to two-port converters, three-port converters are more difficult to control due to their greater number of ports and more complex port energy relationships. When the port energy relationships change, the three-port converter operates in different operating conditions, causing changes in the control variables and the ports to be controlled. Therefore, it is necessary to control the switching between different operating conditions. For example, when the three-port converter operates in single-input dual-output (SIDO) mode (where renewable energy simultaneously supplies power to the energy storage element and the load), if the energy storage element does not reach its voltage or current limit, the renewable energy source should be controlled to maximize energy. When the energy storage element reaches its voltage or current limit, the control should switch to the energy storage element for protection. Simple mode switching is prone to oscillation during the switching process, has poor anti-interference capabilities, and cannot meet high-performance control requirements.
[0003] The model prediction method used in the prior art is mainly aimed at the decoupling control of three-port converters. For example, the prior art CN112366677 proposes a multiple phase-shift model predictive control method for a three-port power electronic transformer. On the basis of the traditional phase-shift modulation strategy, an intra-bridge phase shift is added to the H-bridge on the energy storage port side, and model predictive control is used to realize the voltage control of the load port and the SOC of the energy storage port, thereby improving the dynamic performance of the port and realizing the decoupling of the port power. The prior art CN114726196 provides a phase-shift discrete set model predictive decoupling control method and system for a TAB converter. Through real-time online control and without the need for a large data storage space, the control quantities such as port voltage and current are flexibly changed according to the reference value, and the port decoupling and the rapid suppression of voltage fluctuations are realized.
[0004] The above-mentioned prior arts are all directed to the decoupling control of the three-port converter, and do not study the control of the three-port converter during mode switching. Summary of the Invention
[0005] The present application provides a three-port converter switching control method, apparatus, device and storage medium to effectively improve the output voltage accuracy of the three-port converter during mode switching, shorten the adjustment time and reduce overshoot.
[0006] In a first aspect, the present application provides a three-port converter switching control method, comprising:
[0007] Determining an operating mode of a three-port converter; wherein the operating modes of the three-port converter include a SISO mode, a SIDO mode, and a DISO mode, wherein the SISO mode includes a power supply-load operating mode, a battery-load operating mode, and a power supply-battery operating mode, wherein the SIDO mode is a dual-output operating mode, and the DISO mode is a dual-input operating mode;
[0008] Establishing a discrete state space average model of a three-port converter as a first neural network, and obtaining inductor current and port voltage data of the three-port converter in SISO mode, SIDO mode, and DISO mode as a model training set;
[0009] Based on the model training set, the weights are updated using the back propagation characteristics of the first neural network to fit the regression state models under different working modes;
[0010] Adjust relevant parameters of the model under different operating modes, set cost functions and add constraints on state variables to design EMPC control laws;
[0011] Collect the EMPC control laws of SISO mode, SIDO mode and DISO mode as the training data of the second neural network input layer;
[0012] The second neural network is trained based on the training data. During training, the training data is normalized, an activation function is used, and the number of hidden layers is adjusted to obtain an output. The output is compared with a label value corresponding to the EMPC control law to obtain a loss function. The weights and biases are corrected using a gradient descent method and a chain rule. The process of minimizing the loss function is repeatedly calculated to obtain an optimal control signal for subsequent cycles.
[0013] In one possible design, the relationship between the input port and the output port in the power-load working mode is expressed as:
[0014]
[0015] Where V o Indicates the output load port voltage, V s Represents the input power port voltage, and D represents the duty cycle when the switch tube is turned on;
[0016] The relationship between the battery port and the output port in the battery-load working mode is expressed as:
[0017]
[0018] Where V B Indicates the battery terminal voltage;
[0019] The relationship between the input port and the battery port in the power supply-battery working mode is expressed as follows:
[0020]
[0021] The relationship between the output port, the output port and the battery port in the SIDO mode is expressed as follows:
[0022]
[0023] Wherein D1 and D2 represent the first duty cycle and the second duty cycle respectively.
[0024] In one possible design, the discrete state space average model of the three-port converter is expressed as:
[0025]
[0026] In formula (6), the sampling value i at the previous moment is L (k), v x (k) and duty cycle d(k) are used as the input nodes of the neural network, and the circuit parameter a 11 、a 12 、a 21 、a 22 , b1 and b2 are used as trainable weights, and the current sampling value i L (k+1), v x (k+1) serves as the output node of the neural network.
[0027] In one possible design, based on the model training set, the weights are updated using the back propagation characteristics of the first neural network to fit the regression state models under different operating modes, including:
[0028] The trainable weights are trained using the following error function:
[0029] E para =(i L_NN -i L ) 2 +(V x_NN -V x ) 2 (7)
[0030] Among them E para represents the error function of the first neural network, i L_NN represents the inductor current output of the first neural network, i L Represents the inductor current input of the first neural network at the corresponding moment, V x_NN Represents the port voltage output of the first neural network, V x Represents the port voltage input of the first neural network.
[0031] In one possible design, relevant parameters of the model under different operating modes are adjusted, and the cost function is set and constraints are added to the state variables to design the EMPC control law, including:
[0032] To adjust the port voltage of the three-port converter to the reference voltage V ref For control purposes, the cost function is set as:
[0033]
[0034] Where L represents the forecast period, v x (k+l|k) and i L (k+l|k) represents the predicted value at time k; q1 and q2 represent the penalty coefficients used to fine-tune the dynamic process, and J represents the cost function;
[0035] To ensure that the state variables do not exceed physical limits, add the following constraints to the state variables:
[0036]
[0037] Where V xmax and I Lmax Respectively represent v x and i L The maximum design value of
[0038] Under the constraint of formula (9), at the current kth switching cycle, the most controlled variables d(k|k), d(k+l|k)…d(k+Ll|k) for the next L switching cycles are obtained to ensure that the cost function J in formula (8) is minimized. The solved EMPC control law is divided into M segmented areas, each area corresponds to a set segmented radiation function. When the state variable [i L (k),v s (k)] falls into region r, d(k+l|k) is calculated according to the corresponding piecewise radiation function:
[0039]
[0040] Where, α r and β r denote the gain and bias matrices of region r, d opt (k+l|k) is the optimal control duty cycle.
[0041] In one possible design, the EMPC control laws for SISO mode, SIDO mode, and DISO mode are collected as training data for the second neural network input layer, including:
[0042] Determine the region where the operating point is divided by the control law and extract the gain matrix α corresponding to the region r and the bias matrix β r , calculate the corresponding d(k+l|k) value according to formula (10), and set i L (k), v x (k) and d(k+l|k) are combined to obtain a training sample;
[0043] The original two-dimensional state monitoring vector is reconstructed into a four-tuple consisting of inductor current, port voltage, load current and voltage reference value, so as to establish an injective mapping relationship between the input and output of the control system and eliminate the ambiguity of the control law caused by different operating points.
[0044] In one possible design, when the second neural network is trained based on the training data, the loss function is expressed as:
[0045] E off =[d opt (k+1|k)-d NN (k+1|k)] 2 (15)
[0046] Where, E off represents the loss function, d opt (k+l|k) represents the calculated value of the segmented radiation function in the corresponding segmented area of EMPC, d NN (k+1|k) represents the output value of the second neural network;
[0047] The weights are modified using the following formula:
[0048]
[0049] Where θ represents the connection weight between the hidden layer and the output layer, η represents the learning rate of the neural network, θ(k+1) represents, and θ(k) represents;
[0050] The process of the chain method is as follows:
[0051]
[0052] Where σ is the activation function of the hidden layer or output layer.
[0053] In a second aspect, the present application provides a three-port converter switching control device, the device comprising a controller, the controller being configured to:
[0054] an operating mode determination module configured to determine an operating mode of the three-port converter; wherein the operating modes of the three-port converter include a SISO mode, a SIDO mode, and a DISO mode, wherein the SISO mode includes a power supply-load operating mode, a battery-load operating mode, and a power supply-battery operating mode, wherein the SIDO mode is a dual-output operating mode, and the DISO mode is a dual-input operating mode;
[0055] a first network building module configured to establish a discrete state space average model of the three-port converter as a first neural network, and obtain inductor current and port voltage data of the three-port converter in SISO mode, SIDO mode, and DISO mode as a model training set;
[0056] A first training module is configured to update weights based on the model training set using the back propagation characteristics of the first neural network to fit the regression state models under different operating modes;
[0057] The control law design module is configured to adjust relevant parameters of the model under different operating modes, set cost functions, and add constraints on state variables to perform EMPC control law design;
[0058] a data acquisition module configured to acquire EMPC control laws in SISO mode, SIDO mode, and DISO mode as training data for the second neural network input layer;
[0059] The second training module is configured to train the second neural network based on the training data. During training, the training data is normalized, an activation function is used, and the number of hidden layers is adjusted to obtain an output. The output is compared with a label value corresponding to the EMPC control law to obtain a loss function. The weights and biases are corrected using a gradient descent method and a chain rule. The process of minimizing the loss function is repeatedly calculated to obtain an optimal control signal for subsequent cycles.
[0060] In a third aspect, an embodiment of the present application provides an electronic device comprising: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the three-port converter switching control method described in the first aspect and various possible designs of the first aspect.
[0061] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the three-port converter switching control method described in the first aspect and various possible designs of the first aspect is implemented.
[0062] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the three-port converter switching control method described in the first aspect and various possible designs of the first aspect.
[0063] The three-port converter switching control method, apparatus, device, and storage medium provided in this application have at least the following beneficial effects:
[0064] This application establishes a spatial state average model of a three-port converter, collects the inductor current and output voltage data of the three-port converter in single-input single-output (SISO), single-input dual-output (SIDO), and dual-input single-output (DISO) modes, substitutes them into the state equation, uses the back-propagation characteristics of the neural network to update the model weights, and uses the fitted state regression model for EMPC control law design; collects the generated EMPC control law as training data for a second neural network, uses the forward propagation of the neural network to calculate the output and compares it with the optimal duty cycle obtained by the EMPC control law to construct a loss function, and repeatedly calculates the process of minimizing the loss function to obtain the optimal control signal for subsequent cycles. This can effectively improve the output voltage accuracy of the three-port converter during mode switching, shorten the adjustment time, and reduce overshoot. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0066] Figure 1 A schematic diagram of a switching control method for a three-port converter according to an embodiment of the present invention;
[0067] Figure 2 A topological diagram of a three-port converter provided in an embodiment of the present application;
[0068] Figure 3 The power supply-load (V s →V o ) Schematic diagram of the operating mode, where (a) S1 and S2 are on and S3 is off; (b) S1, S2, and S3 are off;
[0069] Figure 4 The battery-load (V B →V o ) Schematic diagram of the operating mode, where (a) S2 and S3 are on and S1 is off; (b) S1 is on and S2 and S3 are off;
[0070] Figure 5 The power supply provided in the embodiment of the present application - battery (Vs →V B ) Schematic diagram of the operating mode, where (a) S1 and S2 are on and S3 is off; (b) S1 is on and S2 and S3 are off;
[0071] Figure 6 The dual output (V s →V B 、V o ) Schematic diagram of the operating mode, where (a) S1 and S2 are on and S3 is off; (b) S1 is on and S2 and S3 are off; (c) S1, S2, and S3 are off;
[0072] Figure 7 The dual input (V s 、V B →V o ) Schematic diagram of the operating modes, where (a) S1 and S2 are on and S3 is off; (b) S1, S2, and S3 are off; (c) S2 and S3 are on and S1 is off; (d) S1 is on and S2 and S3 are off;
[0073] Figure 8 A first neural network propagation flow chart provided in an embodiment of the present application;
[0074] Figure 9 EMPC control prediction schematic diagram provided in the embodiment of the present application;
[0075] Figure 10 Schematic diagram of the EMPC control law at different operating points provided in the embodiment of the present application;
[0076] Figure 11 A flowchart of the neural network fitting EMPC control law provided in an embodiment of the present application;
[0077] Figure 12 An online implementation flowchart provided for an embodiment of the present application;
[0078] Figure 13 The overall implementation flow chart provided for the embodiment of this application;
[0079] Figure 14 A schematic diagram of SIDO-SISO-SIDO mode switching provided in an embodiment of the present application;
[0080] Figure 15 A schematic diagram of the DISO-SISO-DISO mode switching provided in an embodiment of the present application;
[0081] Figure 16 A schematic diagram of the DISO-SIDO-DISO mode switching provided in an embodiment of the present application;
[0082] Figure 17 This is a structural diagram of a three-port converter switching control device provided in an embodiment of the present application.
[0083] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0084] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0085] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0086] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned. They should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0087] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0088] In response to the high dynamic requirements of the three-port converter during mode switching, on the one hand, the voltage overshoot is large during the conversion process, and on the other hand, the response time is long. The embodiment of the present application provides a three-port converter switching control method, which adopts a neural network fitting explicit model predictive control (EMPC) strategy. In general, first, a spatial state average model of the three-port converter is established, and the inductor current and output voltage data of the three-port converter in single-input single-output (SISO), single-input dual-output (SIDO) and dual-input single-output (DISO) modes are collected and substituted into the state equation. The model weights are updated using the back propagation characteristics of the neural network, and the fitted state regression model is used for EMPC design; the generated EMPC control law is collected as training data for the second neural network, and the output is calculated using the forward propagation of the neural network and compared with the optimal duty cycle obtained by the EMPC control law to construct a loss function. The process of minimizing the loss function is repeatedly calculated to obtain the optimal control signal for subsequent cycles.
[0089] Specifically, if Figure 1 , which is a flow chart of a three-port converter switching control method provided by an embodiment of the present application, the three-port converter switching control method includes the following steps S10 - S60 .
[0090] S10: Determine an operating mode of the three-port converter; wherein the operating modes of the three-port converter include SISO mode, SIDO mode, and DISO mode, the SISO mode includes a power supply-load operating mode, a battery-load operating mode, and a power supply-battery operating mode, the SIDO mode is a dual-output operating mode, and the DISO mode is a dual-input operating mode.
[0091] In a specific embodiment, if Figure 2 As shown in FIG, a topological structure diagram of a three-port converter provided in an embodiment of the present application. Figure 2 In, V s 、V B and V o They are input power port, battery port and output load port, i L and i o are the inductor current and output current respectively, and the output load R o The converter consists of three switches S1, S2 and S3, three diodes D1, D2 and D3, an inductor L and an output capacitor C o It consists of 8 components in total.
[0092] The SISO operating mode of the three-port converter is as follows Figure 3 、 Figure 4 and Figure 5 shown. Figure 3The power supply-load of the proposed converter (V s →V o ) Working mode modal diagram, Figure 3 In (a), S1 and S2 are turned on, S3 is turned off, and the power supply V s Charge the inductor L and the capacitor C o Give the load V o powered by, Figure 3 In (b), S1, S2, and S3 are turned off, and the inductor L provides power to the load V o powered by; Figure 4 is the battery-load of the proposed converter (V B →V o ) Working mode modal diagram, Figure 4 In (a), S2 and S3 are turned on, S1 is turned off, and the battery V B Charge the inductor L and the capacitor C o Give the load V o powered by, Figure 4 In (b), S2 is turned on, S1 and S2 are turned off, and the battery V b Give the load V o powered by; Figure 5 The power supply of the proposed converter - battery (V s →V B ) Working mode modal diagram, Figure 5 In (a), S1 and S2 are turned on, S3 is turned off, and the power supply V s Charge the inductor L, Figure 5 In (b), S1 is on, S2 and S3 are off, and the power supply V s and inductor L to the battery V B powered by.
[0093] Depend on Figure 3 It can be seen that the three-port converter has a power-load (V s →V o ) working mode is consistent with the working mode of the traditional Buck-Boost circuit, so the relationship between the input port and the output port in this mode can be expressed as:
[0094]
[0095] Where D is the duty cycle when the switch is on.
[0096] Depend on Figure 4 It can be seen that the three-port converter is B →V o ) working mode is consistent with the working mode of the traditional Boost circuit, so the relationship between the battery port and the output port in this mode can be expressed as:
[0097]
[0098] Depend on Figure 5 It can be seen that the three-port converter is in the power supply-battery (V s →V B ) working mode is consistent with the working mode of the traditional Boost circuit, so the relationship between the input port and the battery port in this mode can be expressed as:
[0099]
[0100] The SIDO operating mode of the three-port converter is as follows Figure 6 shown. Figure 6 The proposed converter has dual output (V s →V B 、V o ) Working mode modal diagram, Figure 6 (a) Figure 3 (a), Figure 6 In (b), S1 is on, S2 and S3 are off, and the power supply V s and inductor L to the battery V B Power supply, capacitor C o Give the load V o powered by, Figure 6 (c) Figure 3 (b).
[0101] Depend on Figure 6 It can be seen that the three-port converter has dual output (V s →V B 、V o ) working mode, the voltage across the inductor in L modes is analyzed. The relationship between the output port, the output port, and the battery port in this mode is obtained using the volt-second balance principle, which can be expressed as:
[0102]
[0103] Where D1 and D2 represent Figure 6 The duty cycle of S1 and S2 when they are turned on in (a) and Figure 6 The duty cycle when S2 is turned on in (b).
[0104] The DISO operating mode of the three-port converter is as follows Figure 7 shown. Figure 7 The proposed converter has dual input (V s 、V B →V o ) Working mode modal diagram, Figure 7 (a) Figure 6 (a), Figure 7 (b) Figure 3(b) and Figure 6 (c), Figure 7 (c) Figure 4 (a), Figure 7 (d) same Figure 4 (b).
[0105] Depend on Figure 7 As can be seen from (a) and (b), the working mode is as follows Figure 3 Power supply-load (V s →V o ) working mode. Figure 7 As can be seen from (c) and (d), the working mode is as follows Figure 4 Battery-load (V B →V o ) working mode.
[0106] S20: Establishing a discrete state space average model of the three-port converter as a first neural network, and obtaining the inductor current and port voltage data of the three-port converter in SISO mode, SIDO mode, and DISO mode as a model training set.
[0107] In a specific embodiment, the discrete state space equation of step S20 is expressed as follows:
[0108]
[0109] Where i L (k+1), v x (k+1) represents the inductor current, battery terminal voltage or output terminal voltage at time k+1, i L (k), v x (k) and d(k) represent the inductor current, battery terminal voltage or output terminal voltage, and duty cycle at time k, respectively. 11 、a 12 、a 21 、a 22 , b1 and b2 are the state coefficients of the state space equation.
[0110] Expanding formula (5) yields:
[0111]
[0112] According to the characteristics of formula (6), the sampling value i at the previous moment is L (k), v x (k) and duty cycle d(k) are used as the input nodes of the neural network, and the circuit parameter a 11 、a 12 、a 21 、a 22, b1 and b2 are defined as trainable weights, and the sampling value i at the current moment is L (k+1), v x (k+1) is the output node of the neural network. According to formula (6), since this form of node operation only uses weights without using bias and activation functions, it is similar to a neural network as a quasi-neural network, which is called the first neural network here.
[0113] When the three-port converter operates in SISO, SIDO and DISO modes, the inductor current i is collected in the dynamic process of each mode. L (k) and port voltage v x (k) Data, these data are stored to form a training data table, as shown in Table 1.
[0114] Table 1. First neural network parameter estimation model training set
[0115]
[0116]
[0117] S30: Based on the model training set, the weights are updated using the back propagation characteristics of the first neural network to obtain regression state models under different working modes.
[0118] In one embodiment, the first neural network propagation process in step S30 is as follows: Figure 8 As shown, according to the characteristics of formula (6), due to a 11 、a 12 、a 21 、a 22 The initial values of the trainable weights b1 and b2 are randomly assigned, so the network output i L_NN (k+1) and v x_NN (k+1) is not accurate. To train the weights, the error function is constructed as follows:
[0119] E para =(i L_NN -i L ) 2 +(V x_NN -V x ) 2 (7)
[0120] Among them E para represents the error function of the first neural network, i L_NN represents the inductor current output of the first neural network, i L Represents the inductor current input of the first neural network at the corresponding moment, V x_NN Represents the port voltage output of the first neural network, Vx Represents the port voltage input of the first neural network.
[0121] S40: adjusting relevant parameters of the model under different operating modes respectively, setting a cost function and adding constraints to state variables to design an EMPC control law.
[0122] In a specific embodiment, in the EMPC control law design of step S40, the control objective is to set the port voltage V x (V B / V o ) is adjusted to the reference voltage V ref , set the cost function to:
[0123]
[0124] Where L represents the forecast period, v x (k+l|k) and i L (k+l|k) represents the predicted value at time k; q1 and q2 are penalty coefficients used to fine-tune the dynamic process. Since EMPC can manage multiple control objectives in a single unit price function, the formula also includes i L (k) to achieve a smoother control process. In addition, in order to ensure that the state variables do not exceed their physical limits, constraints need to be added to them:
[0125]
[0126] Where V xmax and I Lmax Respectively represent v x and i L The purpose of EMPC design is to obtain the most controllable quantities d(k|k), d(k+l|k)…d(k+Ll|k) for the next L switching cycles under the constraints of Equation (9) at the current k-th switching cycle to ensure that the cost function J in Equation (9) is minimized.
[0127] The solved EMPC control law is divided into M segmented areas, each area corresponds to a specific segmented radiation function. L (k),v s (k)] falls into region r, d(k+l|k) can be calculated according to its corresponding piecewise radiation function:
[0128]
[0129] Where, α r and β r denote the gain and bias matrices of region r, d opt(k+l|k) is the optimal control duty cycle. EMPC divides the operating space into a large number of segmented areas. By adjusting the penalty coefficient and the value of the physical constraint, the number of segmented radial areas can be increased, thereby improving the control accuracy.
[0130] Figure 9 The visualization results and prediction effects of the EMPC's visual control laws are given. Figure 9 The horizontal axis in (a) represents i L , the vertical axis represents v o . Assume that the state variable [i L (k),v o (k)] is [3.2,72], and its corresponding d can be calculated according to formula (10) opt (k+l|k)=0.2807, the d opt (k+l|k) will act on the three-port converter in the next switching cycle.
[0131] S50: Collecting EMPC control laws in SISO mode, SIDO mode, and DISO mode as training data for the second neural network input layer.
[0132] In one embodiment, in step S50, in order to achieve the specific operating point (i.e. [i L (k), v o (k)]) is fitted to the EMPC control law, which requires sampling of the control law. First, determine which region the operating point is divided into by the control law, and then extract the gain matrix α corresponding to the region. r and the bias matrix β r , and then calculate the corresponding d(k+l|k) value according to formula (10). L (k), v o By combining d(k) and d(k+l|k), we can get a training sample.
[0133] The EMPC control strategy has limitations in operating conditions. Its effectiveness is limited to the equilibrium state under specific load conditions (i.e., fixed R o The circuit equation solution for the value of ). Figure 10 As shown, in the same state variable [i L (k), v o (k)] is [3.2, 72], the optimal duty cycle d corresponding to different load conditions opt(k+l|k) have significant differences, which are 0.2807 and 0.2943 respectively. As shown in Table 2, in order to distinguish the control laws under different working conditions, the input features of the control system need to be dimensionalized. The original two-dimensional state monitoring vector is reconstructed into a four-tuple containing inductor current, port voltage, load current and voltage reference value (i.e. [i L (k), v o (k), i o (k), V ref (k)]), which can effectively establish an injective mapping relationship between the input and output of the control system and eliminate the ambiguity of the control law caused by different operating points.
[0134] Table 2 Four-dimensional input neural network training set
[0135]
[0136] The step S50 further includes:
[0137] According to steps S10 to S40, the EMPC control laws of the three-port converter in the SISO, SIDO and DISO modes are sampled respectively, as shown in FIG. Figure 11 As shown in Figure 1, the control laws of different working conditions are combined into a training set and sent to the neural network for training.
[0138] S60: Training the second neural network based on the training data. During training, the training data is normalized, and an activation function is used and the number of hidden layers is adjusted to obtain an output. The output is compared with a label value corresponding to the EMPC control law to obtain a loss function. The weights and biases are corrected using a gradient descent method and a chain rule. The process of minimizing the loss function is repeatedly calculated to obtain an optimal control signal for subsequent cycles.
[0139] In step S60, the most basic fully connected neural network is selected to perform fitting operations on the above-mentioned training samples, which is named the second neural network here. Generally speaking, a fully connected neural network includes an input layer, one or more hidden layers, and an output layer. If a neural network has multiple hidden layers, it can be called a "deep" neural network; if there is only a single hidden layer, but the number of neurons in this hidden layer is large, it can be called a "wide" neural network. "Deep" neural networks are generally used to solve complex and large-scale problems. However, since the calculations between neural network layers are carried out serially, the more hidden layers there are, the longer the serial calculations take. In fact, as long as a single hidden layer neural network has enough neurons, it can fit any nonlinear function. Compared with deep neural networks, wide neural networks take less time to calculate and process, and can minimize online calculation time. Therefore, the second neural network of the present invention adopts a wide neural network structure.
[0140] Input layer: According to Table 2, the input of the training sample is [i L (k), v o (k), i o (k), V ref (k)], the input layer is designed to have 4 neurons. In order to avoid the scale difference of different inputs, the input needs to be normalized to x before being transmitted to the hidden layer. m (k)(m=1,2,3,4), whose interval range is (-1,1), is expressed as:
[0141]
[0142] Where x is the actual value of the one-dimensional input, X max 、X min are the maximum and minimum values in the one-dimensional input respectively.
[0143] Hidden layer: The neurons in the hidden layer first perform weighted summation on the input and then use the activation function σ h Get the nonlinear function h of the hidden layer n (n=1,…,N):
[0144]
[0145] Where w mn Defined as the connection weight between the mth neuron in the input layer and the nth neuron in the hidden layer, it determines the scaling ratio of the input signal when it is passed from the input layer to the hidden layer. n represents the bias value of the nth neuron in the hidden layer. Its function is to provide a basic offset for neuron activation, helping neurons to better respond to input information. The number of hidden layer neurons, N, is a key parameter. Its value is not determined arbitrarily but is closely related to the accuracy of neuron fitting. Generally speaking, reasonably increasing the value of N can improve the neural network's ability to fit complex patterns, but it may also increase the computational effort and the risk of overfitting. Determining its optimal value requires rigorous experimentation and analysis.
[0146] In addition, it is not difficult to find from the architectural principle of the neural network that the activation function plays a core role in the process of fitting various nonlinear functions in the neural network, and is the key to building a complex model. Among the many activation functions, the present invention uses the ReLU function as the activation function for the hidden layer, denoted by σ h The mathematical expression of the ReLU function is as follows
[0147]
[0148] Output layer: The neurons in the output layer first perform a weighted sum operation on the input, and then use the activation function to get the output d NN :
[0149]
[0150] Where w n represents the weight value between the nth neuron in the hidden layer and the neuron in the output layer; b n Represents the bias value of the output layer.
[0151] This embodiment selects the ReLU function as the activation function of the output layer. The lower limit of the ReLU function is 0, which is consistent with the characteristic of the lower limit of the control duty cycle being 0, making the network training process very stable. When training the neural network, the 4-dimensional input of the training data [i L (k), v o (k), i o (k), V ref (k)] is fed into the neural network and its corresponding output d is calculated forward. NN , and then compare it with the label value d in the training set table in Table 2 opt The loss function is obtained by comparing (k+1|k). In this embodiment, the loss function is defined as:
[0152] E off =[d opt (k+1|k)-d NN (k+1|k)] 2 (15)
[0153] Where, E off represents the loss function, d opt (k+l|k) represents the calculated value of the segmented radiation function in the corresponding segmented area of EMPC, d NN (k+1|k) represents the output value of the second neural network.
[0154] The principle of the neural network is to adjust the connection weights between the hidden layer and the output layer with the help of the gradient descent method to obtain the minimum error value E off During the network training phase, the neural network first performs a forward calculation process, and then performs a backpropagation operation on the generated error. This backpropagation error will serve as a key input for correcting the weight parameters. The weight correction process can be expressed by a specific mathematical expression:
[0155]
[0156] Here, θ is defined as the connection weight between the hidden layer and the output layer, and η represents the learning rate of the neural network. The entire learning process has a distinct characteristic: the weights of each layer are simultaneously corrected while the error is backpropagated.
[0157] The modification of weights strictly follows the chain rule. Specifically, the weights θ are updated and adjusted based on the back-propagated error information, combined with the learning rate η, according to the calculation method specified by the chain rule. Through this continuous cycle, the weights of each layer of the neural network are gradually optimized, effectively improving the network's fitting accuracy. The chain rule process is expressed as follows:
[0158]
[0159] Where σ is the activation function of the hidden layer or output layer.
[0160] like Figure 12 and Figure 13 As shown, Figure 12 For online implementation process, Figure 13 This is the overall implementation process. The overall implementation process includes:
[0161] Offline training: Circuit models under different operating conditions are sampled in MATLAB. The collected data is then calculated using EMPC to generate the corresponding control law diagram. The resulting data is integrated into training samples and input into the neural network for training. The learning and optimization generates the corresponding weights and biases, which are then extracted to the FPGA.
[0162] Online implementation: System state parameters, including inductor current, output voltage, and output current, are sampled in real time and fed into a neural network controller for processing and analysis. The neural network implementation consists of three serial submodules: normalization, input-to-hidden-layer, and hidden-to-output.
[0163] Normalization module: This module normalizes the sample value to x m (k)(m=1,2,3,4). The internal hardware structure is as follows Figure 12 As shown in (a), i o For example, first i o and constant -I omin Input to the adder to calculate the denominator, and then add the calculated result and the constant 2 / (I omax -I omin ) is input to the multiplier, and then the product and the constant -1 are input to the adder. After the entire calculation process is completed, the normalized I is obtained. o The normalized data is input to the D flip-flop, which sends xlk to the submodule on the next rising edge of the clock.
[0164] From the input layer to the hidden layer and from the hidden layer to the output layer: The calculations between neurons in the neural network are similar. The output of the previous neuron is sent to the multiplier together with the weight. The product and the bias are sent to the adder, and then the output passes through a zero-crossing comparator (i.e., RELU function). The calculation of each neuron repeats the above process to finally obtain the output d of the neural network.
[0165] The feasibility and advancement of the three-port converter switching control method provided by the present application will be fully illustrated below with reference to an example.
[0166] Based on the control method provided in this application, a control simulation is performed on the three-port converter, and the parameters of the three-port converter are shown in Table 3.
[0167] Table 3 Three-port converter parameters
[0168]
[0169] The penalty coefficients of EMPC are q1=30, q2=5000, the number of neurons in the second neural network is 15, the total number of sample data is 138726, and the learning rate is 0.00001. The output voltage V of the three-port converter switching in SIDO-SISO-SIDO mode is o and the inductor current i L The simulation of Figure 14 As shown. It can be seen that when the three-port converter is switching from SIDO to SISO mode, the output voltage V o The recovery time is 80μs and the voltage change amplitude is 0.4V. When the SISO-SIDO mode is switched, the output voltage V o The recovery time is 150 μs and the voltage variation is 0.4 V. It can be seen that the control strategy of the present invention can improve the accuracy of the output voltage when the three-port converter switches between SIDO-SISO-SIDO modes, and achieve a short steady-state time and small overshoot.
[0170] The penalty coefficients of EMPC are q1=30, q2=5000, the number of neurons in the second neural network is 25, the total number of sample data is 143165, and the learning rate is 0.00001. The output voltage V of the three-port converter switching in DISO-SISO-DISO mode is o and the inductor current i L The simulation of Figure 15 As shown. It can be seen that when the three-port converter is switching from DISO to SISO mode, the output voltage V o The recovery time is 100μs and the voltage change amplitude is 0.3V. When the SISO-DISO mode is switched, the output voltage V oThe recovery time is 100 μs and the voltage variation is 0.4 V. It can be seen that the control strategy of the present invention can improve the accuracy of the output voltage when the three-port converter switches between DISO-SISO-DISO modes, and achieve a short steady-state time and a small overshoot.
[0171] The penalty coefficients of EMPC are q1=30, q2=5000, the number of neurons in the second neural network is 30, the total number of sample data is 167892, and the learning rate is 0.00001. The output voltage V of the three-port converter switching in DISO-SIDO-DISO mode is o and the inductor current i L The simulation of Figure 16 As shown. It can be seen that when the three-port converter is switching in DISO-SIDO mode, the output voltage V o The recovery time is 160μs and the voltage change amplitude is 1.4V. When the SIDO-DISO mode is switched, the output voltage V o The recovery time is 350 μs and the voltage variation is 0.7 V. It can be seen that the control strategy of the present invention can improve the accuracy of the output voltage of the three-port converter when switching between the DISO-SIDO-DISO mode, and achieve a short steady-state time and a small overshoot.
[0172] The present application also provides a three-port converter switching control device. Figure 17 As shown, the three-port converter switching control device includes:
[0173] An operating mode determination module 1701 is configured to determine an operating mode of a three-port converter; wherein the operating modes of the three-port converter include a SISO mode, a SIDO mode, and a DISO mode, wherein the SISO mode includes a power supply-load operating mode, a battery-load operating mode, and a power supply-battery operating mode, wherein the SIDO mode is a dual-output operating mode, and the DISO mode is a dual-input operating mode;
[0174] A first network building module 1702 is configured to establish a discrete state space average model of the three-port converter as a first neural network, and obtain inductor current and port voltage data of the three-port converter in SISO mode, SIDO mode, and DISO mode as a model training set;
[0175] The first training module 1703 is configured to update weights based on the model training set using the back propagation characteristics of the first neural network to fit the regression state models under different operating modes;
[0176] The control law design module 1704 is configured to adjust relevant parameters of the model under different operating modes, set cost functions, and add constraints to state variables to perform EMPC control law design;
[0177] A data acquisition module 1705 is configured to acquire EMPC control laws in SISO mode, SIDO mode, and DISO mode as training data for the second neural network input layer;
[0178] The second training module 1706 is configured to train the second neural network based on the training data. During training, the training data is normalized, an activation function is used, and the number of hidden layers is adjusted to obtain an output. The output is compared with a label value corresponding to the EMPC control law to obtain a loss function. The weights and biases are corrected using a gradient descent method and a chain rule. The process of minimizing the loss function is repeatedly calculated to obtain an optimal control signal for subsequent cycles.
[0179] In some embodiments, the relationship between the input port and the output port in the power-load working mode is expressed as:
[0180]
[0181] Where V o Indicates the output load port voltage, V s Represents the input power port voltage, and D represents the duty cycle when the switch tube is turned on;
[0182] The relationship between the battery port and the output port in the battery-load working mode is expressed as:
[0183]
[0184] Where V B Indicates the battery terminal voltage;
[0185] The relationship between the input port and the battery port in the power supply-battery working mode is expressed as follows:
[0186]
[0187] The relationship between the output port, the output port and the battery port in the SIDO mode is expressed as follows:
[0188]
[0189] Wherein D1 and D2 represent the first duty cycle and the second duty cycle respectively.
[0190] In some embodiments, the discrete state space average model of the three-port converter is expressed as:
[0191]
[0192] In formula (6), the sampling value i at the previous moment is L (k), v x (k) and duty cycle d(k) are used as the input nodes of the neural network, and the circuit parameter a 11 、a 12 、a 21 、a 22 , b1 and b2 are used as trainable weights, and the current sampling value i L (k+1), v x (k+1) serves as the output node of the neural network.
[0193] In some embodiments, based on the model training set, the weights are updated using the back propagation characteristics of the first neural network to fit the regression state models under different operating modes, including:
[0194] The trainable weights are trained using the following error function:
[0195] E para =(i L_NN -i L ) 2 +(V x_NN -V x ) 2 (7)
[0196] Among them E para represents the error function of the first neural network, i L_NN represents the inductor current output of the first neural network, i L Represents the inductor current input of the first neural network at the corresponding moment, V x_NN Represents the port voltage output of the first neural network, V x Represents the port voltage input of the first neural network.
[0197] In some embodiments, relevant parameters of the model under different operating modes are adjusted respectively, and a cost function is set and constraints are added to the state variables to design the EMPC control law, including:
[0198] The port voltage V x 、V B or V o Regulated to the reference voltage V ref For control purposes, the cost function is set as:
[0199]
[0200] Where L represents the forecast period, v x (k+l|k) and iL (k+l|k) represents the predicted value at time k; q1 and q2 represent the penalty coefficients used to fine-tune the dynamic process, and J represents the cost function;
[0201] To ensure that the state variables do not exceed physical limits, add the following constraints to the state variables:
[0202]
[0203] Where V xmax and I Lmax Respectively represent v x and i L The maximum design value of
[0204] Under the constraint of formula (9), at the current kth switching cycle, the most controlled variables d(k|k), d(k+l|k)…d(k+Ll|k) for the next L switching cycles are obtained to ensure that the cost function J in formula (8) is minimized. The solved EMPC control law is divided into M segmented areas, each area corresponds to a set segmented radiation function. When the state variable [i L (k),v o (k)] falls into region r, d(k+l|k) is calculated according to the corresponding piecewise radiation function:
[0205]
[0206] Where, α r and β r denote the gain and bias matrices of region r, d opt (k+l|k) is the optimal control duty cycle.
[0207] In some embodiments, collecting the EMPC control laws of the SISO mode, the SIDO mode, and the DISO mode as training data for the second neural network input layer includes:
[0208] Determine the region where the operating point is divided by the control law and extract the gain matrix α corresponding to the region r and the bias matrix β r , calculate the corresponding d(k+l|k) value according to formula (10), and set i L (k), v x (k) and d(k+l|k) are combined to obtain a training sample;
[0209] The original two-dimensional state monitoring vector is reconstructed into a four-tuple consisting of inductor current, port voltage, load current and voltage reference value, so as to establish an injective mapping relationship between the input and output of the control system and eliminate the ambiguity of the control law caused by different operating points.
[0210] In some embodiments, when the second neural network is trained based on the training data, the loss function is expressed as:
[0211] E off =[d opt (k+1|k)-d NN (k+1|k)] 2 (15)
[0212] Where, E off represents the loss function, d opt (k+l|k) represents the calculated value of the segmented radiation function in the corresponding segmented area of EMPC, d NN (k+1|k) represents the output value of the second neural network;
[0213] The weights are modified using the following formula:
[0214]
[0215] Where θ represents the connection weight between the hidden layer and the output layer, η represents the learning rate of the neural network, θ(k+1) represents, and θ(k) represents;
[0216] The process of the chain method is as follows:
[0217]
[0218] Where σ is the activation function of the hidden layer or output layer.
[0219] An embodiment of the present application provides an electronic device, which may include a processor and a memory, wherein the processor and the memory can communicate with each other; illustratively, the processor and the memory communicate with each other via a communication bus.
[0220] The processor executes the computer-executable instructions stored in the memory, so that the processor implements the solutions in the above embodiments. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0221] The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. System buses can be categorized as address buses, data buses, and control buses. Transceivers enable communication between the database access device and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) or non-volatile memory.
[0222] The electronic device provided in the embodiment of the present application may be the terminal device of the above embodiment.
[0223] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions. When the computer instructions are executed on a computer, the computer executes the technical solution of the three-port converter switching control method of the above embodiment.
[0224] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, the technical solution of the three-port converter switching control method in the above embodiment can be implemented.
[0225] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or module, which can be electrical, mechanical or other forms.
[0226] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these modules may be selected to implement the solution of this embodiment based on actual needs.
[0227] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing unit, or each module may exist physically separately, or two or more modules may be integrated into a single unit. The above-mentioned modules may be implemented in the form of hardware or hardware plus software functional units.
[0228] The above-mentioned integrated module implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above-mentioned software functional module is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0229] It should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), or application-specific integrated circuits (ASICs). A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.
[0230] The memory may include a high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk.
[0231] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be divided into address buses, data buses, and control buses.
[0232] The storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0233] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application-specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.
[0234] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0235] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A three-port converter switching control method, characterized in that: The method comprises: Determining an operating mode of a three-port converter; wherein the operating modes of the three-port converter include a SISO mode, a SIDO mode, and a DISO mode, wherein the SISO mode includes a power supply-load operating mode, a battery-load operating mode, and a power supply-battery operating mode, wherein the SIDO mode is a dual-output operating mode, and the DISO mode is a dual-input operating mode; Establishing a discrete state space average model of a three-port converter as a first neural network, and obtaining inductor current and port voltage data of the three-port converter in SISO mode, SIDO mode, and DISO mode as a model training set; Based on the model training set, the weights are updated using the back propagation characteristics of the first neural network to fit the regression state models under different working modes; Adjust relevant parameters of the model under different operating modes, set cost functions and add constraints on state variables to design EMPC control laws; Collect the EMPC control laws of SISO mode, SIDO mode and DISO mode as the training data of the second neural network input layer; The second neural network is trained based on the training data. During training, the training data is normalized, an activation function is used, and the number of hidden layers is adjusted to obtain an output. The output is compared with a label value corresponding to the EMPC control law to obtain a loss function. The weights and biases are corrected using a gradient descent method and a chain rule. The process of minimizing the loss function is repeatedly calculated to obtain an optimal control signal for subsequent cycles.
2. The three-port converter switching control method according to claim 1, wherein: The relationship between the input port and the output port in the power-load working mode is expressed as: Where V o Indicates the output load port voltage, V s Represents the input power port voltage, and D represents the duty cycle when the switch tube is turned on; The relationship between the battery port and the output port in the battery-load working mode is expressed as: Where V B Indicates the battery terminal voltage; The relationship between the input port and the battery port in the power supply-battery working mode is expressed as follows: The relationship between the output port, the output port and the battery port in the SIDO mode is expressed as follows: Wherein D1 and D2 represent the first duty cycle and the second duty cycle respectively.
3. The three-port converter switching control method according to claim 2, wherein: The discrete state space average model of the three-port converter is expressed as: In formula (6), the sampling value i at the previous moment is L (k), v x (k) and duty cycle d(k) are used as the input nodes of the neural network, and the circuit parameter a 11 、a 12 、a 21 、a 22 , b1 and b2 are used as trainable weights, and the current sampling value i L (k+1), v x (k+1) serves as the output node of the neural network.
4. The three-port converter switching control method according to claim 3, wherein: Based on the model training set, the weights are updated using the back propagation characteristics of the first neural network to fit the regression state models under different working modes, including: The trainable weights are trained using the following error function: E para =(i L_NN -i L ) 2 +(V x_NN -V x ) 2 (7) Among them E para represents the error function of the first neural network, i L_NN represents the inductor current output of the first neural network, i L Represents the inductor current input of the first neural network at the corresponding moment, V x_NN Represents the port voltage output of the first neural network, V x Represents the port voltage input of the first neural network.
5. The three-port converter switching control method according to claim 4, wherein: Adjust relevant parameters of the model under different operating modes, set cost functions, and add constraints on state variables to design EMPC control laws, including: To adjust the port voltage of the three-port converter to the reference voltage V ref For control purposes, the cost function is set as: Where L represents the forecast period, v x (k+l|k) and i L (k+l|k) represents the predicted value at time k; q1 and q2 represent the penalty coefficients used to fine-tune the dynamic process, and J represents the cost function; To ensure that the state variables do not exceed physical limits, add the following constraints to the state variables: Where V xmax and I Lmax Respectively represent v x and i L The maximum design value of Under the constraint of formula (9), at the current kth switching cycle, the most controlled variables d(k|k), d(k+l|k)…d(k+Ll|k) for the next L switching cycles are obtained to ensure that the cost function J in formula (8) is minimized. The solved EMPC control law is divided into M segmented areas, each area corresponds to a set segmented radiation function. When the state variable [i L (k),v s (k)] falls into region r, d(k+l|k) is calculated according to the corresponding piecewise radiation function: Where, α r and β r denote the gain and bias matrices of region r, d opt (k+l|k) is the optimal control duty cycle.
6. The three-port converter switching control method according to claim 5, wherein: The EMPC control laws in SISO mode, SIDO mode, and DISO mode are collected as training data for the second neural network input layer, including: Determine the region where the operating point is divided by the control law and extract the gain matrix α corresponding to the region r and the bias matrix β r , calculate the corresponding d(k+l|k) value according to formula (10), and set i L (k), v x (k) and d(k+l|k) are combined to obtain a training sample; The original two-dimensional state monitoring vector is reconstructed into a four-tuple consisting of inductor current, port voltage, load current and voltage reference value, so as to establish an injective mapping relationship between the input and output of the control system and eliminate the ambiguity of the control law caused by different operating points.
7. The three-port converter switching control method according to claim 6, wherein: When the second neural network is trained based on the training data, the loss function is expressed as: E off =[d opt (k+1|k)-d NN (k+1|k)] 2 (15) Where, E off represents the loss function, d opt (k+l|k) represents the calculated value of the segmented radiation function in the corresponding segmented area of EMPC, d NN (k+1|k) represents the output value of the second neural network; The weights are modified using the following formula: Where θ represents the connection weight between the hidden layer and the output layer, η represents the learning rate of the neural network, θ(k+1) represents, and θ(k) represents; The process of the chain method is as follows: Where σ is the activation function of the hidden layer or output layer.
8. A three-port converter switching control device, characterized in that: The device comprises: an operating mode determination module configured to determine an operating mode of the three-port converter; wherein the operating modes of the three-port converter include a SISO mode, a SIDO mode, and a DISO mode, wherein the SISO mode includes a power supply-load operating mode, a battery-load operating mode, and a power supply-battery operating mode, wherein the SIDO mode is a dual-output operating mode, and the DISO mode is a dual-input operating mode; a first network building module configured to establish a discrete state space average model of the three-port converter as a first neural network, and obtain inductor current and port voltage data of the three-port converter in SISO mode, SIDO mode, and DISO mode as a model training set; A first training module is configured to update weights based on the model training set using the back propagation characteristics of the first neural network to fit the regression state models under different operating modes; The control law design module is configured to adjust relevant parameters of the model under different operating modes, set cost functions, and add constraints on state variables to perform EMPC control law design; a data acquisition module configured to acquire EMPC control laws in SISO mode, SIDO mode, and DISO mode as training data for the second neural network input layer; The second training module is configured to train the second neural network based on the training data. During training, the training data is normalized, an activation function is used, and the number of hidden layers is adjusted to obtain an output. The output is compared with a label value corresponding to the EMPC control law to obtain a loss function. The weights and biases are corrected using a gradient descent method and a chain rule. The process of minimizing the loss function is repeatedly calculated to obtain an optimal control signal for subsequent cycles.
9. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the three-port converter switching control method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the three-port converter switching control method according to any one of claims 1 to 7 when executed by a processor.