Photovoltaic air conditioner and power supply control method and device thereof, storage medium and program product

By using the BP neural network prediction model in the mixed power supply system of photovoltaic air conditioners, the control volume of the PWM signal of switch tube in the two -way DCDC converter is predicted to solve the output unstable output and slow control in the battery filling control control. The problem has achieved more efficient circuit work.

CN119341054APending Publication Date: 2025-01-21GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411393398.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In harsh environments, in the hybrid power supply system of photovoltaic air conditioners, the charging and discharging control of the battery uses PI control method, resulting in unstable output, slow control speed, low control accuracy, increasing circuit loss and reducing working efficiency.

Method used

Use the BP neural network prediction model to predict the control of the PWM signal of the switch tube in the two -way DCDC converter in a two -way DCDC converter to optimize in the charging and discharge control of the battery to ensure that the voltage is constant in the constant voltage charging mode. The current in the charging and discharge mode is constant.

Benefits of technology

The use of the BP neural network prediction model reduces the system circuit loss, improves the efficiency of the circuit, and solves the problem of output instability and slow control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119341054A_ABST
    Figure CN119341054A_ABST
Patent Text Reader

Abstract

The invention discloses a power supply control method and device of a photovoltaic air conditioner, the photovoltaic air conditioner, a storage medium and a computer program product, and the method comprises the steps that a BP neural network prediction model is obtained through pre-training, and input parameters of the BP neural network prediction model comprise charge and discharge control parameters of a storage battery; the output parameters comprise control parameters of PWM signals of the first MOS tube and the second MOS tube; acquiring a charging and discharging control mode of the storage battery, and acquiring a current charging and discharging control parameter of the storage battery according to a set period; and in the charge and discharge control mode of the storage battery, according to the current charge and discharge control parameters of the storage battery, the BP neural network prediction model is combined to control the charge and discharge process of the storage battery. According to the scheme, in the charge and discharge control of the storage battery, the BP neural network prediction model is used for predicting the control quantity of the duty ratio of the PWM signal of the switching tube in the bidirectional DCDC converter, so that the loss is reduced, and the working efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of photovoltaic air conditioners, and specifically relates to a power supply control method, device, photovoltaic air conditioner, storage medium and computer program product of a photovoltaic air conditioner, and more particularly to a control method, device, photovoltaic air conditioner, storage medium and computer program product of charging and discharging a photovoltaic air conditioner using a bidirectional DCDC converter energy storage battery. Background Art

[0002] In order to protect the environment and save energy, clean and renewable solar energy is applied to air conditioners. Among the related solutions, there are many air conditioner technologies that are powered by a combination of mains electricity, photovoltaics and energy storage batteries. Among them, the main method adopted by these solutions is to integrate the photovoltaic power generation system and the battery energy storage system into the DC side of the technically mature air conditioner power supply system, and form a hybrid power supply system with the mains electricity.

[0003] The air conditioning control in the relevant scheme is to control the energy storage battery by sampling the voltage value at both ends of the battery and the charge and discharge current value in the preset constant voltage or constant current mode and transmitting them to the PI (i.e. proportional-integral) control module for PI calculation and then outputting a control signal to control it. However, in fact, when the energy storage battery is charged by photovoltaics or the battery is discharged to supply power to the load, its output voltage and charge and discharge current will fluctuate greatly with many factors. For example, in a harsh operating environment, there may be problems such as unstable output, slow control speed, and low control accuracy, which will increase unnecessary circuit losses in the system and reduce circuit working efficiency.

[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The purpose of the present invention is to provide a power supply control method and device for a photovoltaic air conditioner, a photovoltaic air conditioner, a storage medium and a computer program product, so as to solve the problem that a hybrid power supply system of a photovoltaic air conditioner composed of a photovoltaic power generation system, a battery energy storage system and a mains supply adopts a PI control method in the charge and discharge control of a battery, and the output is unstable, the control speed is slow, the control accuracy is low, and the circuit loss is increased and the circuit working efficiency is reduced in a harsh environment. The effect of reducing the loss and improving the working efficiency is achieved by using a BP neural network prediction model to predict the control amount of the duty cycle of the PWM signal of the switch tube in the bidirectional DCDC converter in the charge and discharge control of the battery.

[0006] The present invention provides a power supply control method for a photovoltaic air conditioner. The power supply system of the photovoltaic air conditioner is a hybrid power supply system composed of a photovoltaic power generation system, an energy storage system and a mains supply. The electric energy provided by the photovoltaic power generation system and the mains supply is output to a DC bus. The energy storage system has a battery. A bidirectional DCDC converter is arranged between the DC bus and the battery. The bidirectional DCDC converter has a first MOS tube and a second MOS tube. The power supply control method for the photovoltaic air conditioner comprises: pre-training to obtain a BP neural network prediction model. The input parameters of the BP neural network prediction model include: the charge and discharge control parameters of the battery. The output parameters of the BP neural network prediction model include: the control parameters of the PWM signal of the first MOS tube and the control parameters of the PWM signal of the second MOS tube. When the battery needs to be charged and discharged, the charge and discharge control mode of the battery is obtained, and the current charge and discharge control parameters of the battery are obtained according to a set period. Under the charge and discharge control mode of the battery, the charge and discharge process of the battery is controlled according to the current charge and discharge control parameters of the battery in combination with the BP neural network prediction model.

[0007] In some embodiments, pre-training a BP neural network prediction model includes: collecting historical data of the charge and discharge control parameters of the battery and establishing an artificial neural network model; using the collected historical data of the charge and discharge control parameters of the battery to perform model training and update learning on the established artificial neural network to obtain the required BP neural network prediction model; wherein, among the input parameters of the BP neural network prediction model, the charge and discharge control parameters of the battery include: the voltage and current of the DC bus, the voltage or current of the battery, the outdoor ambient temperature of the photovoltaic air conditioner, and the battery temperature of the battery.

[0008] In some embodiments, the current charge and discharge control parameters of the battery include the following parameters currently acquired: the voltage and current of the DC bus, the voltage and current of the battery, the outdoor ambient temperature of the photovoltaic air conditioner, and the battery temperature of the battery; the charge and discharge control mode of the battery includes any one of the following: constant current charging mode, constant current discharging mode and constant voltage charging mode; in the charge and discharge control mode of the battery, according to the current charge and discharge control parameters of the battery, combined with the BP neural network prediction model, the charge and discharge process of the battery is controlled, including: determining the charge and discharge control mode of the battery; if the charge and discharge control mode of the battery is the constant voltage charging mode, then in the constant voltage charging mode, based on the current charge and discharge control parameters of the battery, combined with the BP neural network prediction model The control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model perform charging voltage constant control on the charging process of the battery; if the charging and discharging control mode of the battery is a constant current charging mode, then in the constant current charging mode, based on the current charging and discharging control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the charging current constant control is performed on the charging process of the battery; if the charging and discharging control mode of the battery is a constant current discharging mode, then in the constant current discharging mode, based on the current charging and discharging control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the discharging current constant control is performed on the discharging process of the battery.

[0009] In some embodiments, in the constant voltage charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model, the charging process of the battery is controlled to have a constant charging voltage, including: in the constant voltage charging mode, in the control logic of the voltage loop of the bidirectional DCDC converter, determining whether the absolute value of the difference between the voltage of the battery and a preset charging voltage threshold is greater than or equal to a preset charging voltage error; if it is determined that it is not satisfied, determining whether the current of the battery reaches a preset charging end current limit; if so, determining that the charging of the battery is completed and terminating the charging of the battery; if it is determined that it is satisfied, determining the charge and discharge control parameters of the battery according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and controlling the first MOS tube and the second MOS tube according to the determined charge and discharge control parameters of the battery; and repeating this cycle until it is determined that the absolute value of the difference between the voltage of the battery and the preset charging voltage threshold is less than the preset charging voltage error.

[0010] In some embodiments, in the constant current charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the charging process of the battery is controlled to be constant current, including: in the constant current charging mode, in the control logic of the current loop of the bidirectional DCDC converter, determining whether the absolute value of the difference between the current of the battery and a preset charging current threshold is greater than or equal to a preset charging current error; if it is determined that it is not satisfied, determining whether the voltage of the battery reaches a preset charging end voltage limit; if so, determining that the charging of the battery is completed and terminating the charging of the battery; if it is determined that it is satisfied, determining the charge and discharge control parameters of the battery according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and controlling the first MOS tube and the second MOS tube according to the determined charge and discharge control parameters of the battery; and repeating this cycle until it is determined that the absolute value of the difference between the current of the battery and the preset charging current threshold is less than the preset charging current error.

[0011] In some embodiments, in the constant current discharge mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the discharge process of the battery is subjected to discharge current constant control, including: in the constant current discharge mode, in the control logic of the current loop of the bidirectional DCDC converter, determining whether the absolute value of the difference between the current of the battery and a preset discharge current threshold is greater than or equal to a preset discharge current error; if it is determined that it is not satisfied, determining whether the voltage of the battery reaches a preset discharge end voltage limit; if so, determining that the discharge of the battery is completed and terminating the discharge of the battery; if it is determined that it is satisfied, determining the charge and discharge control parameters of the battery according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and controlling the first MOS tube and the second MOS tube according to the determined charge and discharge control parameters of the battery; and repeating this cycle until it is determined that the absolute value of the difference between the current of the battery and the preset discharge current threshold is less than the preset discharge current error.

[0012] Matching the above method, the present invention provides a power supply control device for a photovoltaic air conditioner on the other hand. The power supply system of the photovoltaic air conditioner is a hybrid power supply system composed of a photovoltaic power generation system, an energy storage system and a mains supply. The electric energy provided by the photovoltaic power generation system and the mains supply is output to a DC bus. The energy storage system has a battery. A bidirectional DCDC converter is arranged between the DC bus and the battery. The bidirectional DCDC converter has a first MOS tube and a second MOS tube. The power supply control device for the photovoltaic air conditioner comprises: a control unit configured to pre-train a BP neural network prediction model; wherein the input parameter of the BP neural network prediction model is , including: the charge and discharge control parameters of the battery; the output parameters of the BP neural network prediction model, including: the control parameters of the PWM signal of the first MOS tube, and the control parameters of the PWM signal of the second MOS tube; the acquisition unit is configured to acquire the charge and discharge control mode of the battery when the battery needs to be charged and discharged, and acquire the current charge and discharge control parameters of the battery according to a set period; the control unit is also configured to control the charge and discharge process of the battery according to the current charge and discharge control parameters of the battery in combination with the BP neural network prediction model under the charge and discharge control mode of the battery.

[0013] In some embodiments, the control unit is pre-trained to obtain a BP neural network prediction model, including: collecting historical data of the charge and discharge control parameters of the battery, and establishing an artificial neural network model; using the collected historical data of the charge and discharge control parameters of the battery to perform model training and update learning on the established artificial neural network to obtain the required BP neural network prediction model; wherein, among the input parameters of the BP neural network prediction model, the charge and discharge control parameters of the battery include: the voltage and current of the DC bus, the voltage or current of the battery, the outdoor ambient temperature of the photovoltaic air conditioner, and the battery temperature of the battery.

[0014] In some embodiments, the current charge and discharge control parameters of the battery include the following parameters currently acquired: the voltage and current of the DC bus, the voltage and current of the battery, the outdoor ambient temperature of the photovoltaic air conditioner, and the battery temperature of the battery; the charge and discharge control mode of the battery includes any one of the following: constant current charging mode, constant current discharging mode and constant voltage charging mode; the control unit, in the charge and discharge control mode of the battery, controls the charge and discharge process of the battery according to the current charge and discharge control parameters of the battery in combination with the BP neural network prediction model, including: determining the charge and discharge control mode of the battery; if the charge and discharge control mode of the battery is the constant voltage charging mode, then in the constant voltage charging mode, based on the current charge and discharge control parameters of the battery The method comprises the following steps: according to the embodiment of the present invention, the charging voltage of the battery is controlled to be constant in the charging process of the battery, in combination with the control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model; if the charging and discharging control mode of the battery is a constant current charging mode, then in the constant current charging mode, based on the current charging and discharging control parameters of the battery, in combination with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the charging current of the battery is controlled to be constant in the charging process of the battery; if the charging and discharging control mode of the battery is a constant current discharging mode, then in the constant current discharging mode, based on the current charging and discharging control parameters of the battery, in combination with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the discharging current of the battery is controlled to be constant in the discharging process of the battery.

[0015] In some embodiments, the control unit, in the constant voltage charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model, performs constant charging voltage control on the charging process of the battery, including: in the constant voltage charging mode, in the control logic of the voltage loop of the bidirectional DCDC converter, determining whether the absolute value of the difference between the voltage of the battery and a preset charging voltage threshold is greater than or equal to a preset charging voltage error; if it is determined that it is not satisfied, determining whether the current of the battery reaches a preset charging end current limit; if so, determining that the charging of the battery is completed and terminating the charging of the battery; if it is determined that it is satisfied, determining the charge and discharge control parameters of the battery according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and controlling the first MOS tube and the second MOS tube according to the determined charge and discharge control parameters of the battery; and repeating this cycle until it is determined that the absolute value of the difference between the voltage of the battery and the preset charging voltage threshold is less than the preset charging voltage error.

[0016] In some embodiments, the control unit, in the constant current charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, performs constant charging current control on the charging process of the battery, including: in the constant current charging mode, in the control logic of the current loop of the bidirectional DCDC converter, determining whether the absolute value of the difference between the current of the battery and a preset charging current threshold is greater than or equal to a preset charging current error; if it is determined that it is not satisfied, determining whether the voltage of the battery reaches a preset charging end voltage limit; if so, determining that the charging of the battery is completed and terminating the charging of the battery; if it is determined that it is satisfied, determining the charge and discharge control parameters of the battery according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and controlling the first MOS tube and the second MOS tube according to the determined charge and discharge control parameters of the battery; and repeating this cycle until it is determined that the absolute value of the difference between the current of the battery and the preset charging current threshold is less than the preset charging current error.

[0017] In some embodiments, the control unit, in the constant current discharge mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, performs discharge current constant control on the discharge process of the battery, including: in the constant current discharge mode, in the control logic of the current loop of the bidirectional DCDC converter, determining whether the absolute value of the difference between the current of the battery and a preset discharge current threshold is greater than or equal to a preset discharge current error; if it is determined that it is not satisfied, determining whether the voltage of the battery reaches a preset discharge end voltage limit; if so, determining that the discharge of the battery is completed and terminating the discharge of the battery; if it is determined that it is satisfied, determining the charge and discharge control parameters of the battery according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and controlling the first MOS tube and the second MOS tube according to the determined charge and discharge control parameters of the battery; and repeating this cycle until it is determined that the absolute value of the difference between the current of the battery and the preset discharge current threshold is less than the preset discharge current error.

[0018] Matching the above-mentioned device, the present invention further provides a photovoltaic air conditioner on the other hand, including: the power supply control device of the photovoltaic air conditioner mentioned above.

[0019] In accordance with the above method, the present invention provides a storage medium on the other hand, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the steps of the power supply control method for the photovoltaic air conditioner described above.

[0020] In accordance with the above method, the present invention provides a computer program product on another aspect, including a computer program, which implements the steps of the above-mentioned photovoltaic air conditioner power supply control method when executed by a processor.

[0021] Therefore, the scheme of the present invention pre-trains a BP neural network prediction model based on the change relationship of input parameters (i.e., bus voltage and current, ambient temperature and battery temperature, voltage and current of battery terminal charging and discharging) and output parameters (i.e., the control amount of the duty cycle of the PWM signal of the switch tube in the bidirectional DCDC converter); after the charging and discharging of the hybrid power supply system starts, in the constant current charging and discharging mode, the current loop outputs a control signal through the BP neural network prediction model to adjust the duty cycle of the PWM signal of the switch tube to control the battery terminal current to remain unchanged; in the constant voltage charging mode, the voltage loop outputs a control signal through the BP neural network prediction model to adjust the duty cycle of the PWM signal of the switch tube to control the battery terminal voltage to remain unchanged; thus, by using the BP neural network prediction model to predict the control amount of the duty cycle of the PWM signal of the switch tube in the bidirectional DCDC converter in the charging and discharging control of the battery, the voltage of the battery terminal is kept constant in the constant voltage charging mode, and the current of the battery terminal is kept constant in the constant current charging and discharging mode, thereby reducing the system circuit loss and improving the working efficiency of the circuit.

[0022] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present invention.

[0023] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a flow chart of an embodiment of a power supply control method of a photovoltaic air conditioner of the present invention;

[0025] Figure 2 A schematic diagram of a flow chart of an embodiment of a BP neural network prediction model obtained by pre-training in the method of the present invention;

[0026] Figure 3 A flow chart of an embodiment of controlling the charging and discharging process of the battery in combination with the BP neural network prediction model in the method of the present invention;

[0027] Figure 4It is a flow chart of an embodiment of controlling the charging and discharging process of the battery in the constant voltage charging mode in the method of the present invention;

[0028] Figure 5 It is a flow chart of an embodiment of controlling the charging and discharging process of the battery in the constant current charging mode in the method of the present invention;

[0029] Figure 6 A flow chart of an embodiment of controlling the charging and discharging process of the battery in the constant current discharge mode in the method of the present invention;

[0030] Figure 7 It is a structural schematic diagram of an embodiment of a power supply control device for a photovoltaic air conditioner of the present invention;

[0031] Figure 8 It is a schematic diagram of the topological structure of a bidirectional DCDC circuit;

[0032] Fig. 9 It is a flowchart of the battery charging and discharging control process;

[0033] Fig.10 It is a flow chart of the system control process;

[0034] Fig.11 A flowchart of the neural network learning process.

[0035] In conjunction with the accompanying drawings, the reference numerals in the embodiments of the present invention are as follows:

[0036] 102 - acquisition unit; 104 - control unit. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0038] Considering that for the hybrid power supply system of photovoltaic air conditioner composed of photovoltaic power generation system, battery energy storage system and mains, the PI control method is used in the charge and discharge control of the battery, and the output is unstable, the control speed is slow, the control accuracy is low, and the circuit loss is increased and the circuit working efficiency is reduced in harsh environment. Specifically, when the photovoltaic power generation system and the battery energy storage system are integrated into the DC side of the mature air conditioning power supply system and form a hybrid power supply system with the mains, the energy storage battery works in two working modes: one is that the photovoltaic DC voltage input passes through the boost chopper circuit (BoostChopper, BOOST boost circuit) and then passes through the bidirectional DCDC (i.e. DC to DC) buck-boost circuit to charge the battery, and the other is that the battery passes through the bidirectional DCDC buck-boost circuit to power the air conditioner. At the same time, when the battery is in charging mode, the user can choose two charging methods: constant voltage charging and constant current charging. When the battery is in discharging mode, the constant current discharge method can be selected. The control method adopts a dual closed-loop control method of current inner loop and voltage outer loop; in the related schemes, the battery charging and discharging control methods in the air-conditioning field such as P control (i.e. proportional control), PI control (i.e. proportional-integral control), PID control (i.e. proportional-integral-differential control) have simple control operations and are easy to implement. However, in the environment of smart grids and demand-responsive strategies, it is difficult to perform power conversion according to dynamic electricity prices to achieve energy-saving and emission reduction standards. For example, in terms of technical adaptability, user behavior, information sharing and communication, market mechanism, system flexibility, etc., any one or more may become obstacles to power conversion according to dynamic electricity prices to achieve energy-saving and emission reduction standards.

[0039] In addition, the air-conditioning system is a typical complex multivariable system with high nonlinearity, time-varying, coupled and uncertain characteristics. It is difficult to establish an accurate mathematical or physical model. When adopting the above control, it is often necessary to make linear assumptions based on the control object. Therefore, the battery charging and discharging control methods in the air-conditioning field in the relevant schemes are not effective in the air-conditioning control field.

[0040] Therefore, the scheme of the present invention relates to the field of air conditioning, and in particular refers to a power supply system used in solar air conditioning and variable frequency air conditioning. The scheme of the present invention proposes a power supply control method for photovoltaic air conditioning, specifically a control method for charging and discharging a photovoltaic air conditioning using a bidirectional DCDC converter energy storage battery, pre-training to obtain a BP neural network prediction model, after the charging and discharging of the hybrid power supply system starts, collecting the voltage and current of the battery end, the voltage and current of the bus end, the ambient temperature and the battery temperature, and performing voltage loop or current loop control, if the voltage at the battery end fluctuates under the voltage loop control, if the current at the battery end fluctuates under the current loop control, then the BP neural network prediction model is used to predict the control amount of the duty cycle of the PWM signal of the switch tube in the bidirectional DCDC converter, so as to make the voltage at the battery end constant under the voltage loop control, and make the current at the battery end constant under the current loop control, thereby reducing the system circuit loss and improving the circuit working efficiency.

[0041] According to an embodiment of the present invention, a power supply control method for a photovoltaic air conditioner is provided. Figure 1 A flow chart of an embodiment of the method of the present invention is shown. The power supply system of the photovoltaic air conditioner is a hybrid power supply system composed of a photovoltaic power generation system, an energy storage system and a mains supply; the electric energy provided by the photovoltaic power generation system and the mains supply is output to a DC bus, the energy storage system has a battery, and a bidirectional DCDC converter is arranged between the DC bus and the battery; the bidirectional DCDC converter has a first MOS tube and a second MOS tube, and of course also has a first capacitor, a second capacitor and an inductor, the first MOS tube is such as a switch tube S1, the second MOS tube is such as a switch tube S2, the first capacitor is such as a capacitor C1, the second capacitor is such as a capacitor C2, and the inductor is such as an inductor L1; Figure 8 Figure 1 is a topological diagram of a bidirectional DCDC circuit. Figure 8The bidirectional DCDC circuit shown includes: capacitor C1, capacitor C2, switch tube S1, switch tube S2, and inductor L1. The first connection end of the DC input Vbus is connected to the second connection end of the DC input Vbus after passing through the capacitor C1. The first connection end of the DC input Vbus is also connected to the drain of the switch tube S1, and the drain of the switch tube S1 is connected to the cathode of the freewheeling diode of the switch tube S1. The source of the switch tube S1 is connected to the first connection end of the inductor L1; the source of the switch tube S1 is also connected to the drain of the switch tube S2, and the drain of the switch tube S2 is connected to the cathode of the freewheeling diode of the switch tube S2. The source of the switch tube S2 is connected to the second connection end of the DC input Vbus. The second connection end of the inductor L1 is connected to the second connection end of the DC input Vbus after passing through the capacitor C2. The energy storage battery is connected to the output side of the capacitor C2. The MCU has the following modules connected in sequence: a data acquisition processing module, a BP neural network prediction model and a PWM module; a graphical user interface (GUI) connected to the MCU module. The gate of the switch tube S1 and the gate of the switch tube S2 are respectively connected to the PWM module for receiving PWM signals. In the solution of the present invention, Figure 1 As shown, the power supply control method of the photovoltaic air conditioner includes: steps S110 to S130.

[0042] At step S110, a BP neural network prediction model is pre-trained; wherein, the input parameters of the BP neural network prediction model include: the charge and discharge control parameters of the battery; the output parameters of the BP neural network prediction model include: the control parameters of the PWM signal of the first MOS tube, and the control parameters of the PWM signal of the second MOS tube, specifically the control amount of the duty cycle of the PWM signal of the first MOS tube, and the control amount of the duty cycle of the PWM signal of the second MOS tube.

[0043] In some implementations, the specific process of pre-training the BP neural network prediction model in step S110 is described in the following exemplary embodiments.

[0044] Combine the following Figure 2 The flowchart of an embodiment of pre-training a BP neural network prediction model in the method of the present invention further illustrates the specific process of pre-training a BP neural network prediction model in step S110, including: steps S210 to S220.

[0045] Step S210, collecting historical data of the charging and discharging control parameters of the battery, and establishing an artificial neural network model.

[0046] Step S220, using the collected historical data of the charge and discharge control parameters of the battery, the established artificial neural network is trained and updated to obtain the required BP neural network prediction model.

[0047] Among the input parameters of the BP neural network prediction model, the charging and discharging control parameters of the battery include: the voltage and current of the DC bus, the voltage or current of the battery, the outdoor ambient temperature of the photovoltaic air conditioner, and the battery temperature of the battery.

[0048] Fig.11 This is a flowchart of the neural network learning process. Fig.11 The neural network learning process shown includes:

[0049] Step 31: First, the connection weights and bias values ​​in the neural network need to be randomly initialized. The neuron activation function of the hidden layer and output layer in the BP neural network model uses the sigmoid normalization function. The role of the activation function is to introduce nonlinear factors so that the neural network can handle complex nonlinear relationships. For the hidden layer output:

[0050]

[0051] Among them, x j is the jth node input of the input layer, y i is the output value of the i-th neuron in the hidden layer, ω ij is the weight value of the process from input layer nodes to hidden layer nodes, θ i is the deviation value from the input layer node to the hidden layer node process, It is the value of each input neuron in the hidden layer after adding the weight and bias.

[0052] For the output layer, it should satisfy:

[0053]

[0054] Among them, E k is the output value formula of the kth neuron in the output layer, and h() is the functional relationship; It is the value of each input neuron in the output layer after adding the weight and bias.

[0055] Step 32: Calculate the error between the output result and the true value to measure the accuracy of the neural network prediction. Commonly used error functions include mean square error and cross entropy. Through the BP algorithm (back propagation algorithm), calculate the contribution of each neuron to the error and pass the error back to each layer of neurons. The BP algorithm can quickly calculate the contribution of each neuron to the error E=W(ω ki ,αk ,ω ij ,θ j ), thereby updating the connection weights and bias values ​​in the neural network through the gradient descent method; according to the gradient information calculated by the BP algorithm, the connection weights and bias values ​​in the neural network are updated using the gradient descent method to gradually reduce the error:

[0056]

[0057] Repeatedly perform the forward propagation and back propagation process, continuously update the connection weights and bias values ​​of the neural network, so that the error gradually decreases until the preset stop condition is reached. ki , Δω ij , Δα k , Δθ j , indicating that the corresponding weights and bias values ​​will be updated after each learning, while Δ represents the change, and η represents the calculation coefficient.

[0058] The principle of BP neural network is to use the historical operation data of the system for analysis and fit the input-output relationship of the nonlinear system, that is, to use the known input data and output results of the system's previous operation for learning and training. In the learning and training process, the result of each calculation is compared with the result in the historical data. If the error is not met, the weights are updated. If the error is met, the learning and training results are saved. When a new set of data is input, the training results can be run for prediction.

[0059] The scheme of the present invention establishes a three-layer feedforward artificial neural network based on the variation relationship of input parameters (i.e., bus voltage and current, ambient temperature and battery temperature, battery terminal charging and discharging voltage and current) and output parameters (i.e., the control quantity of the duty cycle of the PWM signal for controlling the switch tube in the bidirectional DCDC converter) to obtain the variation relationship between system parameters (bus voltage, bus current, ambient temperature, battery temperature, battery terminal voltage, charging and discharging current, etc.) and the duty cycle of the PWM signal controlled by MCU for controlling the switch tube, pre-trains to obtain a BP neural network prediction model, uses the BP neural network prediction model to replace the PI control model in the relevant scheme, inputs the collected data into the BP neural network prediction model, and the BP neural network prediction model predicts the output control signal through training, controls the main chip MCU to adjust the duty cycle of the PWM signal for controlling the switch tube, and can solve the problem that the PI control model in the relevant scheme has unstable converter output and slow control speed during battery charging and discharging, thereby increasing circuit loss and reducing circuit working efficiency, and can reduce circuit loss and improve circuit working efficiency.

[0060] In step S120, when the storage battery needs to be charged and discharged, the charge and discharge control mode of the storage battery is obtained, and the current charge and discharge control parameters of the storage battery are obtained according to a set period.

[0061] At step S130, in the charge and discharge control mode of the battery, the charge and discharge process of the battery is controlled according to the current charge and discharge control parameters of the battery in combination with the BP neural network prediction model.

[0062] The solution of the present invention replaces the PI control model in the related solution with a BP neural network prediction model, establishes a three-layer feedforward artificial neural network to obtain the relationship between the system parameters and the duty cycle of the PWM signal controlled by the MCU for controlling the switch tube. After the charging and discharging of the hybrid power supply system starts, the BP neural network prediction model is used in the charging and discharging control of the battery to predict the control amount of the duty cycle of the PWM signal of the switch tube in the bidirectional DCDC converter, so that the voltage at the battery end is constant in the constant voltage charging mode and the current at the battery end is constant in the constant current charging and discharging mode, thereby reducing the system circuit loss and improving the working efficiency of the circuit.

[0063] In some embodiments, the current charge and discharge control parameters of the battery include the following parameters currently acquired: the voltage and current of the DC bus, the voltage and current of the battery, the outdoor ambient temperature of the photovoltaic air conditioner, and the battery temperature of the battery; the charge and discharge control mode of the battery includes any one of the following: constant current charging mode, constant current discharging mode, and constant voltage charging mode. In step S130, in the charge and discharge control mode of the battery, the specific process of controlling the charge and discharge process of the battery according to the current charge and discharge control parameters of the battery in combination with the BP neural network prediction model is described in the following exemplary description.

[0064] Combine the following Figure 3 The method of the present invention is shown as a flow chart of an embodiment of controlling the charging and discharging process of the battery in combination with the BP neural network prediction model, further illustrating the specific process of controlling the charging and discharging process of the battery in combination with the BP neural network prediction model in step S130, including: steps S310 to S340.

[0065] Step S310, determining the charge and discharge control mode of the battery.

[0066] Step S320, if the charge and discharge control mode of the battery is a constant voltage charging mode, then in the constant voltage charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model, the charging process of the battery is controlled to keep the charging voltage constant.

[0067] In some embodiments, in step S320, in the constant voltage charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model, the specific process of controlling the charging voltage of the battery to be constant is described in the following exemplary embodiment.

[0068] Combine the following Figure 4 The method of the present invention is a flow chart of an embodiment of controlling the charging and discharging process of the battery in the constant voltage charging mode, further illustrating the specific process of controlling the charging and discharging process of the battery in the constant voltage charging mode online in step S320, including: steps S410 to S430.

[0069] Step S410, in the constant voltage charging mode, in the control logic of the voltage loop of the bidirectional DCDC converter, determine whether the absolute value of the difference between the voltage of the battery and the preset charging voltage threshold is greater than or equal to a preset charging voltage error; wherein the preset charging voltage threshold is such as voltage V1, and the preset charging voltage error is such as voltage β.

[0070] Step S420, if it is determined that it is not satisfied, determine whether the current of the battery reaches the preset charging end current limit: if so, determine that the charging of the battery is completed and end the charging of the battery; otherwise, return to continue in the constant voltage charging mode, based on the current charging and discharging control parameters of the battery, combined with the control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model, to perform charging voltage constant control on the charging process of the battery; wherein the preset charging end current limit, such as the reference current I REF .

[0071] Step S430, if it is determined that the conditions are satisfied, the charge and discharge control parameters of the battery are determined according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and the first MOS tube and the second MOS tube are controlled according to the determined charge and discharge control parameters of the battery; this cycle is repeated until it is determined that the absolute value of the difference between the voltage of the battery and the preset charging voltage threshold is less than the preset charging voltage error, and then it is determined whether the current of the battery reaches the preset charging end current limit: if so, it is determined that the charging of the battery is completed and the charging of the battery is terminated; otherwise, it is returned to continue in the constant voltage charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model, to perform constant charging voltage control on the charging process of the battery.

[0072] The solution of the present invention is that the main circuit topology, that is, the battery charging and discharging circuit topology is Figure 8 The bidirectional DCDC circuit shown in the figure adopts a synchronous rectifier MOS tube to replace the freewheeling diode of the BUCK BOOST circuit (i.e., buck-boost circuit) in the related solution, and adopts voltage and current double closed-loop control. The battery charge and discharge mode control process is as follows: Fig. 9 shown. Fig. 9 The figure is a flow chart of the battery charging and discharging control process. Fig. 9 As shown in the figure, the battery charge and discharge control process includes:

[0073] Step 11, working mode selection: if the charging mode (ie, the bidirectional DCDC BUCK mode) is selected, then step 22 is executed; if the discharging mode (ie, the bidirectional DCDC BOOST mode) is selected, then step 23 is executed.

[0074] Step 22: In the charging mode, if the constant voltage charging mode is selected, the voltage control loop controls the charging voltage to be constant, and the detection value of the battery charging current must be less than or equal to the reference current I REF In charging mode, if the constant current mode is selected, the current control loop controls the charging current to be constant, which requires that the detection value of the battery charging voltage is greater than or equal to the reference voltage V REF1 .

[0075] Step 23: In the discharge mode, the constant current mode is adopted, and the current control loop controls the charging current to be constant. It is necessary to satisfy that the detection value of the battery charging voltage is greater than or equal to the reference voltage V REF2 .

[0076] Taking the constant voltage charging mode as an example, when the user selects the charging mode as constant voltage charging and sets the required charging voltage, the system detects the ambient temperature and battery temperature data through the temperature sensor, and the voltage and current sampling circuit collects the bus voltage and current and the battery end charging voltage data. At this time, the voltage loop plays a regulating role, and the collected data is fed back to the control end, and the collected data is input into the BP neural network prediction model. The BP neural network prediction model outputs the control signal through training prediction, and controls the main chip MCU to adjust the duty cycle of the PWM signal used to control the switch tube to ensure that the voltage is at the set value state. At the same time, the current loop assumes the overcurrent shutdown function. In this mode, the current will first reach the peak value and then begin to gradually decrease. At this time, if the detected current value reaches the set value, the charging is terminated, thereby solving the problem of unstable converter output and slow control speed during battery charging and discharging, and increasing unnecessary circuit loss of the system, resulting in low circuit working efficiency.

[0077] Step S330, if the charge and discharge control mode of the battery is a constant current charging mode, then in the constant current charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the charging process of the battery is controlled to keep the charging current constant.

[0078] In some embodiments, in step S330, in the constant current charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the specific process of performing constant charging current control on the charging process of the battery is described in the following exemplary description.

[0079] Combine the following Figure 5 The method of the present invention is shown as a flow chart of an embodiment of controlling the charging and discharging process of the battery in the constant current charging mode, further illustrating the specific process of controlling the charging and discharging process of the battery in the constant current charging mode in step S330, including: steps S510 to S530.

[0080] Step S510, in the constant current charging mode, in the control logic of the current loop of the bidirectional DCDC converter, determine whether the absolute value of the difference between the current of the battery and a preset charging current threshold is greater than or equal to a preset charging current error.

[0081] Step S520, if it is determined that it is not satisfied, determine whether the voltage of the battery reaches the preset charging end voltage limit; if so, determine that the charging of the battery is completed and end the charging of the battery; otherwise, return to continue in the constant current charging mode, based on the current charging and discharging control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, to perform constant charging current control on the charging process of the battery; wherein the preset charging end voltage limit, such as the reference voltage V REF1 .

[0082] Step S530, if it is determined that the condition is satisfied, then the charge and discharge control parameters of the battery are determined according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and the first MOS tube and the second MOS tube are controlled according to the determined charge and discharge control parameters of the battery; then, return to re-determine whether the absolute value of the difference between the current of the battery and the preset charging current threshold is greater than or equal to the preset charging current error, and repeat in this way until it is determined that the absolute value of the difference between the current of the battery and the preset charging current threshold is less than the preset charging current error, and then determine whether the voltage of the battery reaches the preset charging end voltage limit: if so, it is determined that the charging of the battery is completed and the charging of the battery is terminated; otherwise, return to continue in the constant current charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, to perform constant charging current control on the charging process of the battery.

[0083] The solution of the present invention replaces the PI control model in the related solution with the BP neural network prediction model, establishes a three-layer feedforward artificial neural network to obtain the relationship between the system parameters (bus voltage, bus current, ambient temperature, battery temperature, battery terminal voltage, charge and discharge current, etc.) and the duty cycle of the PWM signal controlled by the MCU for controlling the switch tube, so as to ensure that the voltage loop outputs the control signal through the BP neural network prediction model in the constant voltage mode of the energy storage battery, and the MCU controls and adjusts the duty cycle of the PWM signal used to control the switch tube, and controls the terminal voltage of the charging battery to remain unchanged. In the constant current charging and discharging mode, the current loop outputs the control signal through the BP neural network prediction model, and the MCU controls and adjusts the duty cycle of the PWM signal used to control the switch tube, and controls the terminal current of the battery to remain unchanged. Thus, the output of the circuit is stable and the control speed is fast during operation, and the problem of unstable output, slow control speed, low control accuracy, increased circuit loss and reduced circuit working efficiency in harsh environments is avoided, which is conducive to reducing system circuit loss and improving circuit working efficiency.

[0084] Step S340, if the charge and discharge control mode of the battery is a constant current discharge mode, then in the constant current discharge mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the discharge process of the battery is subjected to a discharge current constant control.

[0085] See also Figure 8 In the example shown, the bus voltage sampling circuit is arranged between the first connection terminal of the DC input Vbus and the second connection terminal of the DC input Vbus, and is used to sample the bus voltage Vbus and output it to the data collection processing module of the MCU. The DC bus terminal current sensor is arranged at the first connection terminal of the DC input Vbus, and is used to sample the DC bus terminal current Ibus and output it to the data collection processing module of the MCU. The battery terminal current sensor is arranged at the second connection terminal of the inductor L1, and is used to sample the battery terminal current I0, and output it to the current comparison circuit and the data collection processing module of the MCU. The battery voltage sampling circuit is located on the output side of the capacitor C2, and is arranged between the second connection terminal of the inductor L1 and the second connection terminal of the DC input Vbus, and is used to sample the battery voltage U0, and output it to the voltage comparison circuit and the data collection processing module of the MCU. The current comparison circuit is based on the battery terminal current I0 and the reference current I REF The voltage comparison circuit is based on the battery voltage U0 and the reference voltage U REF The comparison is performed and the voltage comparison result is output to the data acquisition processing module of the MCU. The data acquisition processing module is also used to receive the ambient temperature Q collected by the external temperature sensor. h and the current temperature of the energy storage battery Q bat , enter the working mode from the GUI and set the corresponding parameters.

[0086] The scheme of the present invention is mainly based on Figure 8The control of the DCDC main circuit topology shown is specifically based on the relevant data of the input and output ends of the acquisition circuit to control and change the operation mode of the circuit, so that the circuit output is stable during operation, the control speed is fast, the system circuit loss is reduced, and the circuit efficiency is improved. In the scheme of the present invention, the circuit topology adopted is a bidirectional DCDC circuit topology in which a synchronous rectifier MOS tube replaces the freewheeling diode in the related scheme. Its basic working principle is: when the battery needs to be charged, the bidirectional DCDC is in the BUCK buck mode, and the input DC voltage Vbus is from the photovoltaic input DC through the BOOST boost circuit or the city power through the PFC circuit output DC to the high-voltage side DC voltage input of the bidirectional DCDC. In one cycle, the switch tube S1 is first controlled to be turned on and the switch tube S2 is turned off, and the energy flows from the inductor L1 to the battery and charges the output capacitor C2. Then, the time when the switch tube S1 is turned off and the switch tube S2 is turned on is controlled. At this time, the high-voltage side is disconnected, and the inductor L1 and the capacitor C2 store electrical energy and flow to the battery, and the switch tube S2 is used for freewheeling. Conversely, when the battery needs to discharge to supply power to the load, the battery outputs voltage and supplies power to the load through the bidirectional DCDC boost mode. Its working principle is the same as the BUCK buck mode, except that the switch S1 and switch S2 have different conduction sequences. The current sampling circuit and the voltage sampling circuit collect the voltage and current data of the battery and input ends, as well as the temperature data collected by the external temperature sensor and the output signal after being compared with the reference value by the comparison circuit and transmitted to the MCU for data processing and control.

[0087] The solution of the present invention is based on a bidirectional DCDC circuit that uses a synchronous rectifier MOS tube to replace the freewheeling diode of the BUCK BOOST circuit in the related solution. Figure 8 A control method for charging and discharging energy storage batteries, using voltage and current double closed-loop control, the battery charging and discharging mode control process is as follows Fig. 9 When the user selects the constant voltage or constant current charging and discharging mode and sets the required constant value, the system detects the ambient temperature and battery temperature data through the temperature sensor, and the voltage and current sampling circuit collects the bus voltage and current and the battery terminal voltage and current data. At this time, the corresponding voltage or current loop plays a regulating role as shown in Fig.10, the collected data is fed back to the control end, and the collected data is input into the BP neural network prediction model. The BP neural network prediction model outputs a control signal through training prediction, and controls the main chip MCU to adjust the duty cycle of the PWM signal to ensure that the voltage or current is at the set value state. At the same time, another control loop is detected. When the charging and discharging voltage or current value reaches the set value, the charging and discharging ends. The BP neural network prediction model outputs a control signal through training prediction, and controls the main chip MCU to adjust the duty cycle of the PWM signal used to control the switch tube. This can solve the problem of unstable converter output and slow control speed in the PI control model in the related solution when the battery is charged and discharged, which increases circuit loss and reduces circuit working efficiency. It can reduce circuit loss and improve circuit working efficiency.

[0088] In some embodiments, in step S340, in the constant current discharge mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the specific process of performing constant discharge current control on the discharge process of the battery is described in the following exemplary description.

[0089] Combine the following Figure 6 The flowchart of an embodiment of controlling the charging and discharging process of the battery in the constant current discharge mode in the method of the present invention further illustrates the specific process of controlling the charging and discharging process of the battery in the constant current discharge mode in step S340, including: steps S610 to S630.

[0090] Step S610, in the constant current discharge mode, in the control logic of the current loop of the bidirectional DCDC converter, determine whether the absolute value of the difference between the current of the battery and a preset discharge current threshold is greater than or equal to a preset discharge current error.

[0091] Step S620, if it is determined that it is not satisfied, determine whether the voltage of the battery reaches the preset discharge end voltage limit; if so, determine that the discharge of the battery is completed and end the discharge of the battery; otherwise, return to continue in the constant current discharge mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, to perform a discharge current constant control on the discharge process of the battery; wherein the preset discharge end voltage limit, such as the reference voltage V REF2 .

[0092] Step S630, if it is determined that the condition is satisfied, then the charge and discharge control parameters of the battery are determined according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and the first MOS tube and the second MOS tube are controlled according to the determined charge and discharge control parameters of the battery; then, return to re-determine whether the absolute value of the difference between the current of the battery and the preset discharge current threshold is greater than or equal to the preset discharge current error, and repeat in this way until it is determined that the absolute value of the difference between the current of the battery and the preset discharge current threshold is less than the preset discharge current error, and then determine whether the voltage of the battery reaches the preset discharge end voltage limit: if so, determine that the discharge of the battery is completed and end the discharge of the battery; otherwise, return to continue in the constant current discharge mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, to perform discharge current constant control on the discharge process of the battery.

[0093] The solution of the present invention adopts a double closed-loop control of voltage outer loop and current inner loop to achieve the effect of stable operation of the energy storage battery working in the corresponding mode. The specific control process is as follows Fig.10 shown. Fig.10 The flowchart of the system control process is shown in Figure 2.

[0094] like Fig.10 As shown, the system control process includes:

[0095] Step 21: The user selects a working mode, sets mode parameters and records and saves collected data under different working modes, and then executes step 22.

[0096] Step 22, the system starts to charge and discharge the battery and collect data, specifically, the battery terminal voltage and current, input terminal voltage and current during battery charging and discharging, external ambient temperature and battery temperature data collected by the external temperature sensor, and the control quantities of the voltage loop and current loop to keep the current and voltage constant under different working modes; the collected data is processed, specifically, the data records are saved each time the system works, and when the system is turned on, the historical data is preprocessed by data normalization, the BP neural network model is initialized and the input data is used for model training, and then step 23 is executed.

[0097] For example: Figure 8As shown, the input terminal current and voltage sampling circuit is used to collect the input terminal voltage and current, and the battery terminal current and voltage sampling circuit is used to collect the battery terminal voltage and current during battery charging and discharging. As for the ambient temperature and battery operating temperature, an external temperature sensor is required to obtain and transmit the data to the main chip. The solution of the present invention collects the battery charging and discharging circuit (topology is a bidirectional DCDC circuit), collects the current and voltage of the high-voltage input terminal and the low-voltage battery terminal of the circuit, and achieves the control effect of different charging and discharging modes through a single control.

[0098] Step 23, BP neural network model establishment: Based on the input and output data type analysis, the system collects the battery terminal voltage and current, input terminal voltage and current, external ambient temperature and battery temperature data collected by the external temperature sensor to predict the relationship between the voltage loop and the current loop in different working modes to maintain the constant voltage and constant current of the battery charging and discharging, and the duty cycle of the PWM signal output by the MCU for controlling the switching tube. Since only one value of the battery terminal voltage and current needs to be input in the constant voltage and constant current working modes, an artificial neural network model is established to set 5 input neurons, 2 output neurons, and 10-20 hidden layer neurons, and then execute step 24.

[0099] Among them, the input data of the artificial neural network model is the external ambient temperature and battery temperature data collected by the system through collecting the battery terminal voltage and current, input terminal voltage and current, and external temperature sensor; the output data is the control quantity of the MCU output control switch tube duty cycle in different working modes to maintain the constant voltage and constant current of battery charging and discharging by the voltage loop and the current loop.

[0100] Step 24: Train the established artificial neural network model. Fig.11 In the example shown, step 25 is then performed.

[0101] Step 25. After the neural network model training is completed, when the energy storage system needs to start battery charging and discharging, the user first selects the system working mode through the GUI and sets the corresponding parameters: constant voltage charging mode and sets the charging voltage and charging end current limit V1, I REF ; Constant current charging mode and set the charging current and charging end voltage limit I1, V REF1 ; Constant current discharge mode and set the discharge voltage and charge end current value I2, V REF2 .

[0102] Take the constant voltage charging mode as an example. In this mode, the instantaneous charging voltage quickly reaches the set value, the voltage loop plays a regulatory role, and the external temperature sensor collects the ambient temperature Q h and the current temperature of the energy storage battery Q batThe battery terminal voltage sampling circuit and current sensor detect the battery terminal voltage and current U0, I0, and the bus voltage sampling circuit and current sensor detect the bus voltage and current V bus ,I bus . In the control process, the temperature sensor is used to collect the temperature, and together with the voltage and current values, it is first converted into a digital signal through the main chip ADC module, and then used as the input layer node of the neural network model. First, the battery terminal voltage is compared with the set constant voltage charging voltage |U0-V1|≥β, indicating whether the battery terminal voltage fluctuates. If the battery terminal voltage is significantly different from the constant voltage charging voltage, it means that the DCDC output voltage fluctuates. At this time, the collected data is input into the trained BP neural network prediction model for prediction, and the control signal (controlled quantity) is output. The MCU receives the control signal and controls the PWM module according to the control signal to accurately adjust the duty cycle of the PWM signal used to control the switch tube to adjust the output voltage, and re-compares and detects with the constant voltage charging voltage to determine whether the adjusted voltage meets the requirements. If the requirements are still not met, the BP neural network model is used again for prediction to ensure that the battery keeps the charging voltage stable at the set voltage value in the constant voltage charging mode. At this time, the current loop assumes the role of overcurrent shutdown. Since the charging instantaneous voltage in this mode quickly reaches the set value, the current first reaches the peak and then begins to decline. By comparing with the set charging end current limit, when the set value is reached, it means that the battery is full and charging is terminated. The control method of the constant current charging mode and the constant current discharging mode is opposite to that of the constant voltage charging mode, that is, the current loop is used to control the current to remain constant during the charging and discharging process, and the voltage loop is used to control the end of charging and discharging.

[0103] In the scheme of the present invention, the circuit is controlled for the mode of charging and discharging the energy storage battery on the high voltage side of the bidirectional DCDC direct current. Specifically, a control method for charging and discharging the energy storage battery is provided based on the bidirectional DCDC circuit topology using a synchronous rectifier MOS tube to replace the freewheeling diode of the BUCK BOOST circuit in the related scheme. In the related scheme, the BUCK circuit includes a switch tube and a diode. The diode plays the role of freewheeling in the circuit. When the switch tube is disconnected, the energy of the inductor can be freewheeled through the diode, so it is also called a freewheeling diode. In the scheme of the present invention, the MOS tube is used instead. First, bidirectional voltage step-up and step-down can be achieved. Second, the MOS has a diode, which can also complete the freewheeling function. The voltage and current dual closed-loop control is adopted. Under the corresponding control mode, the temperature data, the voltage and current data of the bus terminal and the battery terminal are collected. After the collected data is processed, it is predicted by the BP neural network prediction model after training, and the corresponding control signal is output, so that the battery charging and discharging can be controlled accordingly under different modes, which solves the problem that the converter output is unstable and the control speed is slow during battery charging and discharging, resulting in unnecessary high circuit loss of the system and low circuit working efficiency, and can reduce circuit loss and improve circuit working efficiency.

[0104] By adopting the technical solution of this embodiment, a BP neural network prediction model is pre-trained based on the change relationship of input parameters (i.e., bus voltage and current, ambient temperature and battery temperature, voltage and current of battery terminal charging and discharging) and output parameters (i.e., the control amount of the duty cycle of the PWM signal of the switch tube in the bidirectional DCDC converter); after the charging and discharging of the hybrid power supply system starts, in the constant current charging and discharging mode, the current loop outputs a control signal through the BP neural network prediction model to adjust the duty cycle of the PWM signal of the switch tube to control the battery terminal current to remain unchanged; in the constant voltage charging mode, the voltage loop outputs a control signal through the BP neural network prediction model to adjust the duty cycle of the PWM signal of the switch tube to control the battery terminal voltage to remain unchanged; thus, by using the BP neural network prediction model to predict the control amount of the duty cycle of the PWM signal of the switch tube in the bidirectional DCDC converter in the charging and discharging control of the battery, the voltage of the battery terminal is kept constant in the constant voltage charging mode, and the current of the battery terminal is kept constant in the constant current charging and discharging mode, thereby reducing the system circuit loss and improving the working efficiency of the circuit.

[0105] According to an embodiment of the present invention, a power supply control device for a photovoltaic air conditioner corresponding to the power supply control method for the photovoltaic air conditioner is also provided. Figure 7The schematic diagram of the structure of an embodiment of the device of the present invention is shown. The power supply system of the photovoltaic air conditioner is a hybrid power supply system composed of a photovoltaic power generation system, an energy storage system and a mains supply; the electric energy provided by the photovoltaic power generation system and the mains supply is output to the DC bus, the energy storage system has a battery, and a bidirectional DCDC converter is arranged between the DC bus and the battery; the bidirectional DCDC converter has a first MOS tube and a second MOS tube, and of course also has a first capacitor, a second capacitor and an inductor, the first MOS tube is such as a switch tube S1, the second MOS tube is such as a switch tube S2, the first capacitor is such as a capacitor C1, the second capacitor is such as a capacitor C2, and the inductor is such as an inductor L1; Figure 8 Figure 1 is a topological diagram of a bidirectional DCDC circuit. Figure 8 The bidirectional DCDC circuit shown includes: capacitor C1, capacitor C2, switch tube S1, switch tube S2, and inductor L1. The first connection end of the DC input Vbus is connected to the second connection end of the DC input Vbus after passing through the capacitor C1. The first connection end of the DC input Vbus is also connected to the drain of the switch tube S1, and the drain of the switch tube S1 is connected to the cathode of the freewheeling diode of the switch tube S1. The source of the switch tube S1 is connected to the first connection end of the inductor L1; the source of the switch tube S1 is also connected to the drain of the switch tube S2, and the drain of the switch tube S2 is connected to the cathode of the freewheeling diode of the switch tube S2. The source of the switch tube S2 is connected to the second connection end of the DC input Vbus. The second connection end of the inductor L1 is connected to the second connection end of the DC input Vbus after passing through the capacitor C2. The energy storage battery is connected to the output side of the capacitor C2. The MCU has the following modules connected in sequence: a data acquisition processing module, a BP neural network prediction model and a PWM module; a graphical user interface (GUI) connected to the MCU module. The gate of the switch tube S1 and the gate of the switch tube S2 are respectively connected to the PWM module for receiving PWM signals. In the solution of the present invention, Figure 7 As shown, the power supply control device of the photovoltaic air conditioner includes: an acquisition unit 102 and a control unit 104.

[0106] The control unit 104 is configured to pre-train a BP neural network prediction model; the input parameters of the BP neural network prediction model include: the charge and discharge control parameters of the battery; the output parameters of the BP neural network prediction model include: the control parameters of the PWM signal of the first MOS tube, and the control parameters of the PWM signal of the second MOS tube, specifically the control amount of the duty cycle of the PWM signal of the first MOS tube, and the control amount of the duty cycle of the PWM signal of the second MOS tube. The specific functions and processing of the control unit 104 refer to step S110.

[0107] In some implementations, the control unit 104 pre-trains a BP neural network prediction model, including:

[0108] The control unit 104 is further configured to collect historical data of the charge and discharge control parameters of the battery and establish an artificial neural network model. The specific functions and processing of the control unit 104 are also shown in step S210.

[0109] The control unit 104 is also specifically configured to use the collected historical data of the charge and discharge control parameters of the battery to perform model training and update learning on the established artificial neural network to obtain the required BP neural network prediction model. The specific functions and processing of the control unit 104 are also shown in step S220.

[0110] Among the input parameters of the BP neural network prediction model, the charging and discharging control parameters of the battery include: the voltage and current of the DC bus, the voltage or current of the battery, the outdoor ambient temperature of the photovoltaic air conditioner, and the battery temperature of the battery.

[0111] Fig.11 This is a flowchart of the neural network learning process. Fig.11 The neural network learning process shown includes:

[0112] Step 31: First, the connection weights and bias values ​​in the neural network need to be randomly initialized. The neuron activation function of the hidden layer and output layer in the BP neural network model uses the sigmoid normalization function. The role of the activation function is to introduce nonlinear factors so that the neural network can handle complex nonlinear relationships. For the hidden layer output:

[0113]

[0114] Among them, x j is the jth node input of the input layer, y i is the output value of the i-th neuron in the hidden layer, It is the value of each input neuron in the hidden layer after adding the weight and bias.

[0115] For the output layer, it should satisfy:

[0116]

[0117] Among them, E k The output value formula of the kth neuron in the output layer; It is the value of each input neuron in the output layer after adding the weight and bias.

[0118] Step 32: Calculate the error between the output result and the true value to measure the accuracy of the neural network prediction. Commonly used error functions include mean square error and cross entropy. Through the BP algorithm (back propagation algorithm), calculate the contribution of each neuron to the error and pass the error back to each layer of neurons. The BP algorithm can quickly calculate the contribution of each neuron to the error E=W(ω ki ,α k ,ω ij ,θ j ), thereby updating the connection weights and bias values ​​in the neural network through the gradient descent method; according to the gradient information calculated by the BP algorithm, the connection weights and bias values ​​in the neural network are updated using the gradient descent method to gradually reduce the error:

[0119]

[0120] The forward propagation and back propagation processes are repeatedly performed to continuously update the connection weights and bias values ​​of the neural network so that the error gradually decreases until the preset stopping condition is reached.

[0121] The principle of BP neural network is to use the historical operation data of the system for analysis and fit the input-output relationship of the nonlinear system, that is, to use the known input data and output results of the system's previous operation for learning and training. In the learning and training process, the result of each calculation is compared with the result in the historical data. If the error is not met, the weights are updated. If the error is met, the learning and training results are saved. When a new set of data is input, the training results can be run for prediction.

[0122] The scheme of the present invention establishes a three-layer feedforward artificial neural network based on the variation relationship of input parameters (i.e., bus voltage and current, ambient temperature and battery temperature, battery terminal charging and discharging voltage and current) and output parameters (i.e., the control quantity of the duty cycle of the PWM signal for controlling the switch tube in the bidirectional DCDC converter) to obtain the variation relationship between system parameters (bus voltage, bus current, ambient temperature, battery temperature, battery terminal voltage, charging and discharging current, etc.) and the duty cycle of the PWM signal controlled by MCU for controlling the switch tube, pre-trains to obtain a BP neural network prediction model, uses the BP neural network prediction model to replace the PI control model in the relevant scheme, inputs the collected data into the BP neural network prediction model, and the BP neural network prediction model predicts the output control signal through training, controls the main chip MCU to adjust the duty cycle of the PWM signal for controlling the switch tube, and can solve the problem that the PI control model in the relevant scheme has unstable converter output and slow control speed during battery charging and discharging, thereby increasing circuit loss and reducing circuit working efficiency, and can reduce circuit loss and improve circuit working efficiency.

[0123] The acquisition unit 102 is configured to acquire the charge and discharge control mode of the battery when the battery needs to be charged and discharged, and acquire the current charge and discharge control parameters of the battery according to a set period. The specific functions and processing of the acquisition unit 102 refer to step S120.

[0124] The control unit 104 is also configured to control the charging and discharging process of the battery according to the current charging and discharging control parameters of the battery in combination with the BP neural network prediction model under the charging and discharging control mode of the battery. The specific functions and processing of the control unit 104 are also shown in step S130.

[0125] The solution of the present invention replaces the PI control model in the related solution with a BP neural network prediction model, establishes a three-layer feedforward artificial neural network to obtain the relationship between the system parameters and the duty cycle of the PWM signal controlled by the MCU for controlling the switch tube. After the charging and discharging of the hybrid power supply system starts, the BP neural network prediction model is used in the charging and discharging control of the battery to predict the control amount of the duty cycle of the PWM signal of the switch tube in the bidirectional DCDC converter, so that the voltage at the battery end is constant in the constant voltage charging mode and the current at the battery end is constant in the constant current charging and discharging mode, thereby reducing the system circuit loss and improving the working efficiency of the circuit.

[0126] In some embodiments, the current charge and discharge control parameters of the battery include the following parameters currently acquired: the voltage and current of the DC bus, the voltage and current of the battery, the outdoor ambient temperature of the photovoltaic air conditioner, and the battery temperature of the battery; the charge and discharge control mode of the battery includes any one of the following: constant current charging mode, constant current discharging mode and constant voltage charging mode. The control unit 104, in the charge and discharge control mode of the battery, controls the charge and discharge process of the battery according to the current charge and discharge control parameters of the battery in combination with the BP neural network prediction model, including:

[0127] The control unit 104 is further configured to determine the charge and discharge control mode of the battery. The specific functions and processing of the control unit 104 are also shown in step S310.

[0128] The control unit 104 is further configured to, if the charge and discharge control mode of the battery is a constant voltage charging mode, then in the constant voltage charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model, perform constant charging voltage control on the charging process of the battery. The specific functions and processing of the control unit 104 are also referred to step S320.

[0129] In some implementations, the control unit 104, in the constant voltage charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model, performs constant charging voltage control on the charging process of the battery, including:

[0130] The control unit 104 is further configured to determine whether the absolute value of the difference between the voltage of the battery and a preset charging voltage threshold is greater than or equal to a preset charging voltage error in the control logic of the voltage loop of the bidirectional DCDC converter in the constant voltage charging mode; wherein the preset charging voltage threshold is such as voltage V1, and the preset charging voltage error is such as voltage β. The specific functions and processing of the control unit 104 are also referred to step S410.

[0131] The control unit 104 is further configured to determine whether the current of the battery reaches a preset charging end current limit if it is determined that the condition is not satisfied: if so, determine that the charging of the battery is completed and end the charging of the battery; otherwise, return to continue in the constant voltage charging mode, based on the current charging and discharging control parameters of the battery, combined with the control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model, to perform charging voltage constant control on the charging process of the battery; wherein the preset charging end current limit, such as the reference current I REF The specific functions and processing of the control unit 104 can also be found in step S420.

[0132] The control unit 104 is also specifically configured to, if it is determined that the condition is satisfied, determine the charge and discharge control parameters of the battery according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and control the first MOS tube and the second MOS tube according to the determined charge and discharge control parameters of the battery; in this way, the absolute value of the difference between the voltage of the battery and the preset charge voltage threshold is determined to be less than the preset charge voltage error, and then determine whether the current of the battery reaches the preset charge end current limit: if so, determine that the charging of the battery is completed and end the charging of the battery; otherwise, return to continue in the constant voltage charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model, to perform constant charging voltage control on the charging process of the battery. The specific functions and processing of the control unit 104 are also shown in step S430.

[0133] The solution of the present invention is that the main circuit topology, that is, the battery charging and discharging circuit topology is Figure 8The bidirectional DCDC circuit shown in the figure adopts a synchronous rectifier MOS tube to replace the freewheeling diode of the BUCK BOOST circuit (i.e., buck-boost circuit) in the related solution, and adopts voltage and current double closed-loop control. The battery charge and discharge mode control process is as follows: Fig. 9 shown. Fig. 9 The figure is a flow chart of the battery charging and discharging control process. Fig. 9 As shown in the figure, the battery charge and discharge control process includes:

[0134] Step 11, working mode selection: if the charging mode (ie, the bidirectional DCDC BUCK mode) is selected, then step 22 is executed; if the discharging mode (ie, the bidirectional DCDC BOOST mode) is selected, then step 23 is executed.

[0135] Step 22: In the charging mode, if the constant voltage charging mode is selected, the voltage control loop controls the charging voltage to be constant, and the detection value of the battery charging current must be less than or equal to the reference current I REF In charging mode, if the constant current mode is selected, the current control loop controls the charging current to be constant, which requires that the detection value of the battery charging voltage is greater than or equal to the reference voltage V REF1 .

[0136] Step 23: In the discharge mode, the constant current mode is adopted, and the current control loop controls the charging current to be constant. It is necessary to satisfy that the detection value of the battery charging voltage is greater than or equal to the reference voltage V REF2 .

[0137] Taking the constant voltage charging mode as an example, when the user selects the charging mode as constant voltage charging and sets the required charging voltage, the system detects the ambient temperature and battery temperature data through the temperature sensor, and the voltage and current sampling circuit collects the bus voltage and current and the battery end charging voltage data. At this time, the voltage loop plays a regulating role, and the collected data is fed back to the control end, and the collected data is input into the BP neural network prediction model. The BP neural network prediction model outputs the control signal through training prediction, and controls the main chip MCU to adjust the duty cycle of the PWM signal used to control the switch tube to ensure that the voltage is at the set value state. At the same time, the current loop assumes the overcurrent shutdown function. In this mode, the current will first reach the peak value and then begin to gradually decrease. At this time, if the detected current value reaches the set value, the charging is terminated, thereby solving the problem of unstable converter output and slow control speed during battery charging and discharging, and increasing unnecessary circuit loss of the system, resulting in low circuit working efficiency.

[0138] The control unit 104 is further configured to, if the charge and discharge control mode of the battery is a constant current charging mode, then in the constant current charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, perform constant charging current control on the charging process of the battery. The specific functions and processing of the control unit 104 are also referred to step S330.

[0139] In some implementations, the control unit 104, in the constant current charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, performs constant charging current control on the charging process of the battery, including:

[0140] The control unit 104 is further configured to determine, in the control logic of the current loop of the bidirectional DCDC converter, whether the absolute value of the difference between the current of the battery and the preset charging current threshold is greater than or equal to a preset charging current error in the constant current charging mode. The specific functions and processing of the control unit 104 are also referred to step S510.

[0141] The control unit 104 is further configured to determine whether the voltage of the battery reaches a preset charging end voltage limit if it is determined that the condition is not satisfied: if so, determine that the charging of the battery is completed and end the charging of the battery; otherwise, return to continue in the constant current charging mode, based on the current charging and discharging control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, to perform constant charging current control on the charging process of the battery; wherein the preset charging end voltage limit, such as the reference voltage V REF1 The specific functions and processing of the control unit 104 can also be found in step S520.

[0142] The control unit 104 is also specifically configured to, if it is determined that the condition is satisfied, determine the charge and discharge control parameters of the battery according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and control the first MOS tube and the second MOS tube according to the determined charge and discharge control parameters of the battery; then return to re-determine whether the absolute value of the difference between the current of the battery and the preset charge current threshold is greater than or equal to the preset charge current error, and repeat in this way until it is determined that the absolute value of the difference between the current of the battery and the preset charge current threshold is less than the preset charge current error, and then determine whether the voltage of the battery reaches the preset charge end voltage limit: if so, determine that the charging of the battery is completed and end the charging of the battery; otherwise, return to continue in the constant current charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, to perform constant charging current control on the charging process of the battery. The specific functions and processing of the control unit 104 are also shown in step S530.

[0143] The solution of the present invention replaces the PI control model in the related solution with the BP neural network prediction model, establishes a three-layer feedforward artificial neural network to obtain the relationship between the system parameters (bus voltage, bus current, ambient temperature, battery temperature, battery terminal voltage, charge and discharge current, etc.) and the duty cycle of the PWM signal controlled by the MCU for controlling the switch tube, so as to ensure that the voltage loop outputs the control signal through the BP neural network prediction model in the constant voltage mode of the energy storage battery, and the MCU controls and adjusts the duty cycle of the PWM signal used to control the switch tube, and controls the terminal voltage of the charging battery to remain unchanged. In the constant current charging and discharging mode, the current loop outputs the control signal through the BP neural network prediction model, and the MCU controls and adjusts the duty cycle of the PWM signal used to control the switch tube, and controls the terminal current of the battery to remain unchanged. Thus, the output of the circuit is stable and the control speed is fast during operation, and the problem of unstable output, slow control speed, low control accuracy, increased circuit loss and reduced circuit working efficiency in harsh environments is avoided, which is conducive to reducing system circuit loss and improving circuit working efficiency.

[0144] The control unit 104 is further configured to, if the charge and discharge control mode of the battery is a constant current discharge mode, then in the constant current discharge mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, perform a discharge current constant control on the discharge process of the battery. The specific functions and processing of the control unit 104 are also referred to step S340.

[0145] See also Figure 8In the example shown, the bus voltage sampling circuit is arranged between the first connection terminal of the DC input Vbus and the second connection terminal of the DC input Vbus, and is used to sample the bus voltage Vbus and output it to the data collection processing module of the MCU. The DC bus terminal current sensor is arranged at the first connection terminal of the DC input Vbus, and is used to sample the DC bus terminal current Ibus and output it to the data collection processing module of the MCU. The battery terminal current sensor is arranged at the second connection terminal of the inductor L1, and is used to sample the battery terminal current I0, and output it to the current comparison circuit and the data collection processing module of the MCU. The battery voltage sampling circuit is located on the output side of the capacitor C2, and is arranged between the second connection terminal of the inductor L1 and the second connection terminal of the DC input Vbus, and is used to sample the battery voltage U0, and output it to the voltage comparison circuit and the data collection processing module of the MCU. The current comparison circuit is based on the battery terminal current I0 and the reference current I REF The voltage comparison circuit is based on the battery voltage U0 and the reference voltage U REF The comparison is performed and the voltage comparison result is output to the data acquisition processing module of the MCU. The data acquisition processing module is also used to receive the ambient temperature Q collected by the external temperature sensor. h and the current temperature Q of the energy storage battery bat , enter the working mode from the GUI and set the corresponding parameters.

[0146] The scheme of the present invention is mainly based on Figure 8The control of the DCDC main circuit topology shown is specifically based on the relevant data of the input and output ends of the acquisition circuit to control and change the operation mode of the circuit, so that the circuit output is stable during operation, the control speed is fast, the system circuit loss is reduced, and the circuit efficiency is improved. In the scheme of the present invention, the circuit topology adopted is a bidirectional DCDC circuit topology in which a synchronous rectifier MOS tube replaces the freewheeling diode in the related scheme. Its basic working principle is: when the battery needs to be charged, the bidirectional DCDC is in the BUCK buck mode, and the input DC voltage Vbus is from the photovoltaic input DC through the BOOST boost circuit or the city power through the PFC circuit output DC to the high-voltage side DC voltage input of the bidirectional DCDC. In one cycle, the switch tube S1 is first controlled to be turned on and the switch tube S2 is turned off, and the energy flows from the inductor L1 to the battery and charges the output capacitor C2. Then, the time when the switch tube S1 is turned off and the switch tube S2 is turned on is controlled. At this time, the high-voltage side is disconnected, and the inductor L1 and the capacitor C2 store electrical energy and flow to the battery, and the switch tube S2 is used for freewheeling. Conversely, when the battery needs to discharge to supply power to the load, the battery outputs voltage and supplies power to the load through the bidirectional DCDC boost mode. Its working principle is the same as the BUCK buck mode, except that the switch S1 and switch S2 have different conduction sequences. The current sampling circuit and the voltage sampling circuit collect the voltage and current data of the battery and input ends, as well as the temperature data collected by the external temperature sensor and the output signal after being compared with the reference value by the comparison circuit and transmitted to the MCU for data processing and control.

[0147] The solution of the present invention is based on a bidirectional DCDC circuit that uses a synchronous rectifier MOS tube to replace the freewheeling diode of the BUCK BOOST circuit in the related solution. Figure 8 A control method for charging and discharging energy storage batteries, using voltage and current double closed-loop control, the battery charging and discharging mode control process is as follows Fig. 9 When the user selects the constant voltage or constant current charging and discharging mode and sets the required constant value, the system detects the ambient temperature and battery temperature data through the temperature sensor, and the voltage and current sampling circuit collects the bus voltage and current and the battery terminal voltage and current data. At this time, the corresponding voltage or current loop plays a regulating role as shown in Fig.10, the collected data is fed back to the control end, and the collected data is input into the BP neural network prediction model. The BP neural network prediction model outputs a control signal through training prediction, and controls the main chip MCU to adjust the duty cycle of the PWM signal to ensure that the voltage or current is at the set value state. At the same time, another control loop is detected. When the charging and discharging voltage or current value reaches the set value, the charging and discharging ends. The BP neural network prediction model outputs a control signal through training prediction, and controls the main chip MCU to adjust the duty cycle of the PWM signal used to control the switch tube. This can solve the problem of unstable converter output and slow control speed in the PI control model in the related solution when the battery is charged and discharged, which increases circuit loss and reduces circuit working efficiency. It can reduce circuit loss and improve circuit working efficiency.

[0148] In some implementations, the control unit 104, in the constant current discharge mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, performs a discharge current constant control on the discharge process of the battery, including:

[0149] The control unit 104 is further configured to determine, in the control logic of the current loop of the bidirectional DCDC converter, whether the absolute value of the difference between the current of the battery and the preset discharge current threshold is greater than or equal to a preset discharge current error in the constant current discharge mode. The specific functions and processing of the control unit 104 are also shown in step S610.

[0150] The control unit 104 is further configured to determine whether the voltage of the battery reaches a preset discharge end voltage limit if it is determined that the condition is not satisfied: if so, determine that the discharge of the battery is completed and end the discharge of the battery; otherwise, return to continue in the constant current discharge mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, to perform a discharge current constant control on the discharge process of the battery; wherein the preset discharge end voltage limit, such as the reference voltage V REF2 The specific functions and processing of the control unit 104 can also be found in step S620.

[0151] The control unit 104 is also specifically configured to, if it is determined that the condition is satisfied, determine the charge and discharge control parameters of the battery according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and control the first MOS tube and the second MOS tube according to the determined charge and discharge control parameters of the battery; then return to re-determine whether the absolute value of the difference between the current of the battery and the preset discharge current threshold is greater than or equal to the preset discharge current error, and cycle in this way until it is determined that the absolute value of the difference between the current of the battery and the preset discharge current threshold is less than the preset discharge current error, and then determine whether the voltage of the battery reaches the preset discharge end voltage limit: if so, determine that the discharge of the battery is completed and end the discharge of the battery; otherwise, return to continue in the constant current discharge mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, to perform discharge current constant control on the discharge process of the battery. The specific functions and processing of the control unit 104 are also shown in step S630.

[0152] The solution of the present invention adopts a double closed-loop control of voltage outer loop and current inner loop to achieve the effect of stable operation of the energy storage battery working in the corresponding mode. The specific control process is as follows Fig.10 shown. Fig.10 The flowchart of the system control process is shown in Figure 2.

[0153] like Fig.10 As shown, the system control process includes:

[0154] Step 21: The user selects a working mode, sets mode parameters and records and saves collected data under different working modes, and then executes step 22.

[0155] Step 22, the system starts to charge and discharge the battery and collect data, specifically, the battery terminal voltage and current, input terminal voltage and current during battery charging and discharging, external ambient temperature and battery temperature data collected by the external temperature sensor, and the control quantities of the voltage loop and current loop to keep the current and voltage constant under different working modes; the collected data is processed, specifically, the data records are saved each time the system works, and when the system is turned on, the historical data is preprocessed by data normalization, the BP neural network model is initialized and the input data is used for model training, and then step 23 is executed.

[0156] For example: Figure 8As shown, the input terminal current and voltage sampling circuit is used to collect the input terminal voltage and current, and the battery terminal current and voltage sampling circuit is used to collect the battery terminal voltage and current during battery charging and discharging. As for the ambient temperature and battery operating temperature, an external temperature sensor is required to obtain and transmit the data to the main chip. The solution of the present invention collects the battery charging and discharging circuit (topology is a bidirectional DCDC circuit), collects the current and voltage of the high-voltage input terminal and the low-voltage battery terminal of the circuit, and achieves the control effect of different charging and discharging modes through a single control.

[0157] Step 23, BP neural network model establishment: Based on the input and output data type analysis, the system collects the battery terminal voltage and current, input terminal voltage and current, external ambient temperature and battery temperature data collected by the external temperature sensor to predict the relationship between the voltage loop and the current loop in different working modes to maintain the constant voltage and constant current of the battery charging and discharging, and the duty cycle of the PWM signal output by the MCU for controlling the switching tube. Since only one value of the battery terminal voltage and current needs to be input in the constant voltage and constant current working modes, an artificial neural network model is established to set 5 input neurons, 2 output neurons, and 10-20 hidden layer neurons, and then execute step 24.

[0158] Among them, the input data of the artificial neural network model is the external ambient temperature and battery temperature data collected by the system through collecting the battery terminal voltage and current, input terminal voltage and current, and external temperature sensor; the output data is the control quantity of the MCU output control switch tube duty cycle in different working modes to maintain the constant voltage and constant current of battery charging and discharging by the voltage loop and the current loop.

[0159] Step 24: Train the established artificial neural network model. Fig.11 In the example shown, step 25 is then performed.

[0160] Step 25. After the neural network model training is completed, when the energy storage system needs to start battery charging and discharging, the user first selects the system working mode through the GUI and sets the corresponding parameters: constant voltage charging mode and sets the charging voltage and charging end current limit V1, I REF ; Constant current charging mode and set the charging current and charging end voltage limit I1, V REF1 ; Constant current discharge mode and set the discharge voltage and charge end current value I2, V REF2 .

[0161] Take the constant voltage charging mode as an example. In this mode, the instantaneous charging voltage quickly reaches the set value, the voltage loop plays a regulatory role, and the external temperature sensor collects the ambient temperature Q h and the current temperature of the energy storage battery Q batThe battery terminal voltage sampling circuit and current sensor detect the battery terminal voltage and current U0, I0, and the bus voltage sampling circuit and current sensor detect the bus voltage and current V bus ,I bus . First, compare the battery terminal voltage with the set constant voltage charging voltage |U0-V1|≥β, indicating whether the battery terminal voltage fluctuates. If the battery terminal voltage is significantly different from the constant voltage charging voltage, it indicates that the DCDC output voltage fluctuates. At this time, the collected data is input into the trained BP neural network prediction model for prediction, and the control signal (controlled quantity) is output. The MCU receives the control signal and controls the PWM module to accurately adjust the duty cycle of the PWM signal used to control the switch tube according to the control signal to adjust the output voltage, and re-compare and detect with the constant voltage charging voltage to determine whether the adjusted voltage meets the requirements. If the requirements are still not met, the BP neural network model is used again for prediction to ensure that the battery keeps the charging voltage stable at the set voltage value in the constant voltage charging mode. At this time, the current loop assumes the role of overcurrent shutdown. Since the charging instantaneous voltage in this mode quickly reaches the set value, the current first reaches the peak and then begins to decline. By comparing with the set charging end current limit, when the set value is reached, it means that the battery is full and charging is terminated. The control method of the constant current charging mode and the constant current discharging mode is opposite to that of the constant voltage charging mode, that is, the current loop is used to control the current to remain constant during the charging and discharging process, and the voltage loop is used to control the end of charging and discharging.

[0162] In the scheme of the present invention, the circuit is controlled for the mode of charging and discharging the energy storage battery on the high voltage side of the bidirectional DCDC direct current. Specifically, a control method for charging and discharging the energy storage battery is provided based on the bidirectional DCDC circuit topology that uses a synchronous rectifier MOS tube to replace the freewheeling diode of the BUCK BOOST circuit in the related scheme. The method adopts voltage and current double closed-loop control. Under the corresponding control mode, temperature data, bus terminal and battery terminal voltage and current data are collected. After the collected data is processed, it is predicted by the trained BP neural network prediction model, and the corresponding control signal is output, so that the battery charging and discharging is controlled accordingly under different modes. The problem of unstable converter output and slow control speed during battery charging and discharging, which leads to unnecessary high circuit loss of the system and low circuit working efficiency, can be solved, and the circuit loss can be reduced and the circuit working efficiency can be improved.

[0163] Since the processing and functions implemented by the device of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned method, for the details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments, and no further elaboration will be made here.

[0164] According to an embodiment of the present invention, a photovoltaic air conditioner corresponding to a power supply control device of the photovoltaic air conditioner is also provided. The photovoltaic air conditioner may include: the power supply control device of the photovoltaic air conditioner described above.

[0165] Since the processing and functions implemented by the photovoltaic air conditioner of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned devices, for the details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments and will not be repeated here.

[0166] According to an embodiment of the present invention, a computer program product corresponding to a photovoltaic air conditioner is also provided, including a computer program, which implements the steps of the power supply control method of the photovoltaic air conditioner described above when executed by a processor.

[0167] Since the processing and functions implemented by the product of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned photovoltaic air conditioner, for the details not described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments and will not be repeated here.

[0168] According to an embodiment of the present invention, a storage medium corresponding to a power supply control method for a photovoltaic air conditioner is also provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the steps of the power supply control method for the photovoltaic air conditioner described above.

[0169] Since the processing and functions implemented by the storage medium of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned method, for the details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments, and no further elaboration will be made here.

[0170] In summary, it is easy for those skilled in the art to understand that, under the premise of no conflict, the above-mentioned advantageous methods can be freely combined and superimposed.

[0171] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of the claims of the present invention.

Claims

1. A power supply control method for a photovoltaic air conditioner, characterized in that: The power supply system of the photovoltaic air conditioner is a hybrid power supply system composed of a photovoltaic power generation system, an energy storage system and a mains supply. The power provided by the photovoltaic power generation system and the mains supply are both output to a DC bus. The energy storage system has a battery. A bidirectional DCDC converter is provided between the DC bus and the battery. The bidirectional DCDC converter has a first MOS tube and a second MOS tube. The power supply control method of the photovoltaic air conditioner includes: Pre-training to obtain a BP neural network prediction model; wherein the input parameters of the BP neural network prediction model include: the charge and discharge control parameters of the battery; the output parameters of the BP neural network prediction model include: the control parameters of the PWM signal of the first MOS tube, and the control parameters of the PWM signal of the second MOS tube; When the storage battery needs to be charged and discharged, the charging and discharging control mode of the storage battery is obtained, and the current charging and discharging control parameters of the storage battery are obtained according to a set period; In the charge and discharge control mode of the battery, the charge and discharge process of the battery is controlled according to the current charge and discharge control parameters of the battery in combination with the BP neural network prediction model.

2. The power supply control method of photovoltaic air conditioner according to claim 1, characterized in that: The BP neural network prediction model is pre-trained, including: Collecting historical data of the charge and discharge control parameters of the battery and establishing an artificial neural network model; Using the collected historical data of the charge and discharge control parameters of the storage battery, the established artificial neural network is trained and updated to obtain the required BP neural network prediction model; Among the input parameters of the BP neural network prediction model, the charging and discharging control parameters of the battery include: the voltage and current of the DC bus, the voltage or current of the battery, the outdoor ambient temperature of the photovoltaic air conditioner, and the battery temperature of the battery.

3. The power supply control method of the photovoltaic air conditioner according to claim 1 or 2, characterized in that: in, The current charge and discharge control parameters of the battery include the following parameters currently acquired: the voltage and current of the DC bus, the voltage and current of the battery, the outdoor ambient temperature of the photovoltaic air conditioner, and the battery temperature of the battery; the charge and discharge control mode of the battery includes any one of the following: constant current charging mode, constant current discharging mode and constant voltage charging mode; In the charge and discharge control mode of the battery, the charge and discharge process of the battery is controlled according to the current charge and discharge control parameters of the battery in combination with the BP neural network prediction model, including: Determining a charge and discharge control mode of the battery; If the charge and discharge control mode of the battery is a constant voltage charging mode, then in the constant voltage charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model, the charging process of the battery is controlled to maintain a constant charging voltage; If the charge and discharge control mode of the battery is a constant current charging mode, then in the constant current charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the charging process of the battery is controlled to have a constant charging current; If the charge and discharge control mode of the battery is a constant current discharge mode, then in the constant current discharge mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the discharge process of the battery is controlled to keep the discharge current constant.

4. The power supply control method of the photovoltaic air conditioner according to claim 3, characterized in that: In the constant voltage charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the voltage loop of the bidirectional DCDC converter and the BP neural network prediction model, the charging process of the battery is controlled to maintain a constant charging voltage, including: In the constant voltage charging mode, in the control logic of the voltage loop of the bidirectional DCDC converter, determining whether the absolute value of the difference between the voltage of the battery and a preset charging voltage threshold is greater than or equal to a preset charging voltage error; If it is determined that the condition is not satisfied, determining whether the current of the battery reaches a preset charging end current limit; if so, determining that the charging of the battery is completed, and ending the charging of the battery; If it is determined that the conditions are met, the charge and discharge control parameters of the battery are determined according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and the first MOS tube and the second MOS tube are controlled according to the determined charge and discharge control parameters of the battery; this cycle is repeated until it is determined that the absolute value of the difference between the voltage of the battery and the preset charge voltage threshold is less than the preset charge voltage error.

5. The power supply control method of photovoltaic air conditioner according to claim 3, characterized in that: In the constant current charging mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the charging process of the battery is subjected to constant charging current control, including: In the constant current charging mode, in the control logic of the current loop of the bidirectional DCDC converter, determining whether the absolute value of the difference between the current of the battery and a preset charging current threshold is greater than or equal to a preset charging current error; If it is determined that the condition is not satisfied, determining whether the voltage of the battery reaches a preset charging end voltage limit; if so, determining that the charging of the battery is completed, and ending the charging of the battery; If it is determined that the conditions are met, the charge and discharge control parameters of the battery are determined according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and the first MOS tube and the second MOS tube are controlled according to the determined charge and discharge control parameters of the battery; this cycle is repeated until it is determined that the absolute value of the difference between the current of the battery and the preset charging current threshold is less than the preset charging current error.

6. The power supply control method of photovoltaic air conditioner according to claim 3, characterized in that: In the constant current discharge mode, based on the current charge and discharge control parameters of the battery, combined with the control logic of the current loop of the bidirectional DCDC converter and the BP neural network prediction model, the discharge process of the battery is subjected to constant discharge current control, including: In the constant current discharge mode, in the control logic of the current loop of the bidirectional DCDC converter, determining whether the absolute value of the difference between the current of the battery and a preset discharge current threshold is greater than or equal to a preset discharge current error; If it is determined that the condition is not satisfied, determining whether the voltage of the battery reaches a preset discharge end voltage limit; if so, determining that the discharge of the battery is completed, and ending the discharge of the battery; If it is determined that the conditions are met, the charge and discharge control parameters of the battery are determined according to the current charge and discharge control parameters of the battery using the BP neural network prediction model, and the first MOS tube and the second MOS tube are controlled according to the determined charge and discharge control parameters of the battery; this cycle is repeated until it is determined that the absolute value of the difference between the current of the battery and the preset discharge current threshold is less than the preset discharge current error.

7. A power supply control device for a photovoltaic air conditioner, characterized in that: The power supply system of the photovoltaic air conditioner is a hybrid power supply system composed of a photovoltaic power generation system, an energy storage system and a mains supply. The electric energy provided by the photovoltaic power generation system and the mains supply is output to a DC bus. The energy storage system has a battery. A bidirectional DCDC converter is provided between the DC bus and the battery. The bidirectional DCDC converter has a first MOS tube and a second MOS tube. The power supply control device of the photovoltaic air conditioner includes: A control unit is configured to pre-train a BP neural network prediction model; wherein the input parameters of the BP neural network prediction model include: the charge and discharge control parameters of the battery; the output parameters of the BP neural network prediction model include: the control parameters of the PWM signal of the first MOS tube, and the control parameters of the PWM signal of the second MOS tube; an acquisition unit, configured to acquire a charge and discharge control mode of the battery when the battery needs to be charged and discharged, and to acquire a current charge and discharge control parameter of the battery according to a set period; The control unit is further configured to control the charging and discharging process of the battery in the charging and discharging control mode of the battery according to the current charging and discharging control parameters of the battery in combination with the BP neural network prediction model.

8. A photovoltaic air conditioner, characterized in that: include: The power supply control device for the photovoltaic air conditioner as described in claim 7.

9. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the power supply control method of the photovoltaic air conditioner according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the power supply control method of the photovoltaic air conditioner described in any one of claims 1 to 6 are implemented.