Energy management and control method and device based on photovoltaic power generation

Through the intelligent control method based on PPO algorithm, combined with sensor data and reward function to optimize load control, the problem of low energy management efficiency and poor environmental adaptability of photovoltaic power generation systems in summer vacation booths and other places is solved, and efficient energy scheduling and environmental comfort guarantee are achieved.

CN120454051APending Publication Date: 2025-08-08ZHEJIANG NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510601037.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In actual application of existing photovoltaic power generation systems, there are problems such as low energy management efficiency, inaccurate load control, and poor environmental adaptability. Especially in places such as photovoltaic summer vacation booths, how to ensure the appropriate temperature and humidity of the environment and achieve optimal energy utilization under limited energy supply is still a technical problem that needs to be solved urgently.

Method used

The intelligent control method based on the PPO algorithm model is adopted to obtain the environmental status through the sensor group, a decision-making network and evaluation network are built, and the reward function is used to comprehensively consider environmental comfort, energy consumption and light intensity, and load control is optimized to achieve efficient energy scheduling and environmental comfort guarantee.

Benefits of technology

It realizes efficient energy dispatch and environmental comfort guarantee in the case of limited photovoltaic power generation resources, ensuring that electrical appliances in summer vacation booths and other places operate in the optimal state, and achieves a balance between energy conservation and comfort.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120454051A_ABST
    Figure CN120454051A_ABST
Patent Text Reader

Abstract

The invention discloses an energy management and control method and device based on photovoltaic power generation, and relates to the field of energy management and intelligent control, and the method comprises the steps: obtaining a current environment state and a historical environment state of a to-be-managed and controlled system; a PPO algorithm model is constructed; the PPO algorithm model comprises a decision network and an evaluation network; the decision network outputs a control action at the next moment based on the environment state; the evaluation network evaluates the control action at the next moment based on a reward function; the reward function is constructed based on environment comfort, energy consumption and illumination intensity; continuously iteratively optimizing the PPO algorithm model according to a historical environment state to obtain a trained PPO algorithm model; and according to the current environment state, the trained PPO algorithm model is adopted to perform energy management and control on the to-be-managed and controlled system. According to the invention, efficient energy scheduling and environmental comfort guarantee can be realized under the condition that photovoltaic power generation resources are limited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of energy management and intelligent control, and in particular to an energy management and control method and device based on photovoltaic power generation. Background Art

[0002] With the continuous advancement of renewable energy technology, photovoltaic power generation has become an important green energy source. However, existing photovoltaic power generation systems generally face problems in practical applications, such as low energy management efficiency, imprecise load control, and poor environmental adaptability. Especially in places like photovoltaic summer pavilions, how to simultaneously ensure suitable temperature and humidity while maintaining optimal energy utilization within a limited energy supply remains a pressing technical challenge.

[0003] While there are numerous intelligent control systems for photovoltaic power generation in existing technologies, these systems typically employ simple threshold control methods, are unable to dynamically adjust loads based on environmental changes, and lack sufficient intelligence and adaptability. Therefore, a more intelligent solution is urgently needed that can comprehensively consider multiple factors such as light, temperature and humidity, and power consumption to achieve precise control and achieve the dual goals of energy optimization and environmental comfort. Summary of the Invention

[0004] The purpose of this application is to provide an energy management and control method and device based on photovoltaic power generation, which can achieve efficient energy scheduling and environmental comfort guarantee when photovoltaic power generation resources are limited.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides an energy management and control method based on photovoltaic power generation, the energy management and control method based on photovoltaic power generation comprising:

[0007] Obtain the current and historical environmental status of the system to be controlled; the environmental status includes: temperature, humidity, light intensity, battery power, and photovoltaic power generation;

[0008] Construct a PPO algorithm model; the PPO algorithm model includes a decision network and an evaluation network; the decision network outputs the control action at the next moment based on the environmental state; the evaluation network evaluates the control action at the next moment based on a reward function; the reward function is constructed based on environmental comfort, energy consumption, and light intensity; the control action includes controlling the on / off state and operating power of the load in the system to be controlled;

[0009] According to the historical environmental status, the PPO algorithm model is continuously iterated and optimized to obtain a trained PPO algorithm model;

[0010] According to the current environmental status, the trained PPO algorithm model is used to perform energy management of the system to be managed.

[0011] Optionally, obtaining the current and historical environmental states of the system to be controlled specifically includes:

[0012] The control system is monitored using a sensor group comprising a temperature and humidity sensor, an illumination sensor, and a current and voltage sensor;

[0013] The data acquisition card is used to obtain the environmental status monitored by the sensor group.

[0014] Optionally, the reward function specifically includes:

[0015] R total =ω comfort ·R comfort +ω energy ·R energy +ω light ·R light +ω adapt ·R adapt ;

[0016] Among them, R total is the reward function, R comfort is the environmental comfort reward function, R energy is the dynamic battery consumption reward function, R light is the time decay reward function, R adapt is the adaptive reward function, ω comfort 、ω energy 、ω light 、ω adapt are the weight coefficients of the corresponding rewards respectively.

[0017] Alternatively, using the formula R comfort =-α·(|T current -T target (t)|+|H cuurrent -H target (t)|)+β·CI determines the environmental comfort reward function;

[0018] Using formula R energy =-(|E current -E target |+γ·|P solar -P target_solar |) Determine the dynamic battery consumption reward function;

[0019] Using formula R light =(L current -L threshold )·ω lightlocal·T day Determine the time-decay reward function;

[0020] Using formula R adapt =λ·(Response Speed)+μ·(Error Correction Ability) to determine the adaptive reward function;

[0021] Among them, T current and H current are the current temperature and humidity respectively, T target (t) and H target (t) are the target temperature and target humidity that are dynamically adjusted according to the real-time environmental status, α and β are the weight coefficients for adjusting comfort and environmental changes, CI is the comprehensive comfort index, which is determined according to user needs and environmental factors, and E target is the target battery power range, P solar is the current photovoltaic power generation power, P target_solar is the target power of photovoltaic power generation, γ is the coefficient for adjusting the impact of solar power generation, T day is the time decay factor, representing the change between day and night, L current is the current light intensity, L threshold is the threshold light intensity for power generation, ω lightlocal To adjust the coefficient of illumination influence, Response Speed is the speed of response change, Error Correction Ability is the ability to correct the deviation of environmental state, and λ and μ are the weights corresponding to Response Speed and Error Correction Ability respectively.

[0022] Optionally, based on the current environmental status, a trained PPO algorithm model is used to perform energy management of the system to be managed, specifically including:

[0023] According to the current environmental state, the trained PPO algorithm model is used to determine the control action;

[0024] According to the control action, the on and off of the relay is controlled to realize the on and off of the load.

[0025] Optionally, the communication protocol of the relay is MODBUS.

[0026] In a second aspect, the present application provides an energy management and control device based on photovoltaic power generation, which is applied to the energy management and control method based on photovoltaic power generation. The energy management and control device based on photovoltaic power generation includes: a photovoltaic power generation device, a battery, a load, a sensor group, an intelligent control module, a remote transmission module, and an actuator;

[0027] The sensor group is used to connect to the photovoltaic power generation device, the battery and the load respectively, and collect data from the photovoltaic power generation device, the battery and the load to obtain the environmental status;

[0028] The remote transmission module is connected to the sensor group and is used to send environmental data to the intelligent control module;

[0029] The intelligent control module is used to carry the trained PPO algorithm model and output control actions;

[0030] The actuator is connected to the load and is used to control the switching state and operating power of the load according to the control action.

[0031] Optionally, the energy management and control device based on photovoltaic power generation further includes: a LabVIEW platform;

[0032] The LabVIEW platform is connected to the intelligent control module for real-time display of environmental status.

[0033] According to the specific embodiments provided in this application, this application has the following technical effects:

[0034] The present application provides an energy management and control method and device based on photovoltaic power generation. By constructing a reward function for the evaluation network in a proximal policy optimization (PPO) algorithm model based on environmental comfort, energy consumption, and light intensity, and optimizing load control through multi-sensor data fusion and reinforcement learning algorithms, efficient energy scheduling and environmental comfort assurance are achieved; ensuring that electrical appliances (such as air conditioners, electric fans, lights, etc.) in places such as summer pavilions can operate in the optimal state, achieving a balance between energy saving and comfort. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0036] Figure 1 This is a flow chart of an energy management and control method based on photovoltaic power generation in one embodiment of the present application;

[0037] Figure 2 This is a schematic diagram of the working principle of an energy management and control method based on photovoltaic power generation in one embodiment of the present application;

[0038] Figure 3 This is a physical picture of the photovoltaic summer pavilion;

[0039] Figure 4 Schematic diagram of communication method for data transmission

[0040] Figure 5 This is a schematic structural diagram of an energy management and control device based on photovoltaic power generation in one embodiment of the present application. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0042] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0043] In an exemplary embodiment, Figure 1 and Figure 2 As shown, a method for energy management and control based on photovoltaic power generation is provided, which includes the following S101 to S104.

[0044] S101, obtaining the current and historical environmental status of the system to be controlled; the environmental status includes: temperature, humidity, light intensity, battery power, and photovoltaic power generation power;

[0045] S101 specifically includes:

[0046] S11, using a sensor group to monitor the system to be controlled; the sensor group includes: a temperature and humidity sensor, an illumination sensor, and a current and voltage sensor;

[0047] The placement of sensors depends on the specific environment and mainly on whether they can reflect the real situation of the environment. Figure 3 As shown, taking the summer pavilion as an example, since the internal space of the summer pavilion is relatively small, only one temperature and humidity sensor needs to be arranged in the middle section of the load-bearing column of the summer pavilion. The measured data can more completely reflect the temperature and humidity in the summer pavilion; the current and voltage sensors are arranged at the interface where the photovoltaic panel is connected to the inverter, which can more accurately reflect the real-time power generation power of the photovoltaic panel; the light sensor is arranged next to the photovoltaic panel on the top of the summer pavilion, which can accurately measure the light intensity.

[0048] S12, using a data acquisition card to obtain the environmental status monitored by the sensor group.

[0049] S102, constructing a PPO algorithm model; the PPO algorithm model includes a decision network and an evaluation network; the decision network outputs a control action at the next moment based on the environmental state; the evaluation network evaluates the control action at the next moment based on a reward function; the control action includes controlling the on / off state and operating power of a load in the system to be controlled;

[0050] The reward function is constructed based on environmental comfort (temperature and humidity deviation), energy consumption (battery power) and light intensity, and can automatically adjust the load control strategy under different environmental conditions;

[0051] The reward function specifically includes:

[0052] R total =ω comfort ·R comfort +ω energy ·R energy +ω light ·R light +ω adapt ·R adapt ;

[0053] Among them, R total is the reward function, R comfort is the environmental comfort reward function, R energy is the dynamic battery consumption reward function, R light is the time decay reward function, R adapt is the adaptive reward function, ω comfo rt, ω energy 、ω light 、ω adapt are the weight coefficients of the corresponding rewards, which can be tuned through experiments to achieve the best system performance.

[0054] This application uses the formula R comfort =-α·(|T current -T target (t)|+|H current -H target(t)|)+β·CI determines the environmental comfort reward function; the environmental comfort index is introduced into the home environment comfort reward function, and the comfort experience is optimized by adjusting the temperature and humidity target range in real time. Considering that each user may have different requirements for temperature and humidity, the system can dynamically adjust the target temperature and humidity range according to changes in the environment and load. The goal is to optimize temperature and humidity control based on the environmental conditions and user comfort needs at each moment (user input can be set). When the light intensity is strong, the temperature may be relatively high; at this time, the system can appropriately increase the target humidity range to make the air conditioning energy consumption more efficient. When the light intensity is weak, the temperature and humidity change slowly, and the system can appropriately lower the temperature and humidity target range to reduce the burden on the air conditioner or fan. The comprehensive environmental comfort index not only depends on the deviation of temperature and humidity, but also takes into account external factors such as light and climate change.

[0055] The comfort index (CI) can be calculated using a weighted average method or other algorithms. First, the value of each factor (temperature, humidity, illumination, etc.) is measured. A comfort score is calculated for each factor. This can be determined by looking up a predefined comfort table or empirical data. For example, a temperature of 24°C yields a high comfort score; however, if the temperature reaches 30°C, the comfort score drops rapidly. The scores of each factor are combined and weighted according to a certain weight to obtain an overall comfort index. For example, if the weight of temperature on comfort is set to 0.4, humidity to 0.4, and illumination to 0.2, then the CI = temperature score × 0.4 + humidity score × 0.4 + illumination score × 0.1. Based on the CI value, the system can decide whether to adopt energy-saving mode or adjust the operating status of electrical appliances to improve comfort.

[0056] Using formula R energy =-(|E current -E target |+γ·|P solar -P target_solar |) Determine a dynamic battery consumption reward function; this function considers the interaction between battery charge, light intensity, and load, preventing battery levels from being too low or too high, and further optimizing energy management. Specifically, based on the PV system's real-time power generation, the system should appropriately increase load usage during the day and reduce it at night or on cloudy days. Furthermore, when the battery charge is too low, the system should immediately implement energy-saving measures.

[0057] Using formula R light =(L current -L threshold )·ω lightlocal ·T dayDetermine a time-decay reward function; introduce a time decay factor into the reward function to prevent light intensity from directly affecting photovoltaic power generation efficiency. Optimize system operation so that the reward function changes dynamically over time, reflecting the effects of day and night. During daytime periods of high light intensity, the system can increase load usage, while reducing load at night to avoid wasting battery power.

[0058] Using formula R adapt =λ·(Response Speed)+μ·(Error Correction Ability) to determine the adaptive reward function; in order to enhance the adaptability of the system, an adaptive reward mechanism is introduced in the adaptive reward function, that is, the "learning ability" of the reward system. When the application can quickly adapt to different lighting, environments and user needs, additional rewards will be given. For example, if the application can quickly adjust the load, temperature and humidity and other control strategies under different weather conditions, the reward can be added. The adaptability of the system is judged by calculating the "change response speed" and "error correction ability" of the application over the past period of time.

[0059] Among them, T current and H current are the current temperature and humidity respectively, T target (t) and H target (t) are the target temperature and target humidity that are dynamically adjusted according to the real-time environmental status, α and β are the weight coefficients for adjusting comfort and environmental changes, CI is the comprehensive comfort index, which is determined according to user needs and environmental factors, and E target is the target battery power range, P solar is the current photovoltaic power generation power, P target_solar is the target power of photovoltaic power generation, γ is the coefficient for adjusting the impact of solar power generation, T day is the time attenuation factor, which indicates the change between day and night. It is larger during the day and smaller at night. current is the current light intensity, L threshold is the threshold light intensity for power generation, ω lightlocal The coefficient for adjusting the influence of illumination, Response Speed, is the speed of response change, Error Correction Ability is the ability to correct environmental state deviations, and λ and μ are the weights corresponding to Response Speed and Error Correction Ability, respectively.

[0060] S103, continuously iteratively optimizing the PPO algorithm model according to the historical environmental status to obtain a trained PPO algorithm model;

[0061] The trained PPO algorithm model is derived using a reinforcement learning algorithm. This uses sensor-collected temperature and humidity, illumination, battery charge, and photovoltaic power generation as input. The PPO algorithm within the reinforcement learning algorithm calculates the optimal control decision (control action) (such as the on / off status of air conditioners, fans, and lamps) based on the current and historical environmental conditions (such as temperature and humidity, battery charge, and lighting conditions). Based on the decisions output by the reinforcement learning algorithm, the on / off status and operating power of electrical appliances are controlled to ensure maximum environmental comfort and energy efficiency within limited energy resources.

[0062] S104: Based on the current environmental status, the trained PPO algorithm model is used to perform energy control on the system to be controlled.

[0063] S104 specifically includes:

[0064] According to the current environmental state, the trained PPO algorithm model is used to determine the control action;

[0065] According to the control action, the on and off of the relay is controlled to realize the on and off of the load.

[0066] Among them, the communication protocol of the relay is MODBUS.

[0067] Based on the same inventive concept, the embodiments of the present application also provide a photovoltaic power generation-based energy management device for implementing the aforementioned photovoltaic power generation-based energy management method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of one or more photovoltaic power generation-based energy management device embodiments provided below can be found in the limitations of the photovoltaic power generation-based energy management method above and will not be repeated here.

[0068] In an exemplary embodiment, Figure 5 As shown, an energy management and control device based on photovoltaic power generation is provided, which includes: a photovoltaic power generation device, a battery, a load, a sensor group, an intelligent control module, a remote transmission module and an actuator;

[0069] The sensor group is used to connect to the photovoltaic power generation device, the battery and the load respectively, and collect data from the photovoltaic power generation device, the battery and the load to obtain the environmental status;

[0070] The remote transmission module is connected to the sensor group and is used to send environmental data to the intelligent control module;

[0071] The intelligent control module is used to carry the trained PPO algorithm model and output control actions;

[0072] The actuator is connected to the load and is used to control the switching state and operating power of the load according to the control action.

[0073] The system in this application collects environmental data in real time through various sensors, including temperature, humidity, illumination, current and voltage. The system collects this data periodically or in real time and inputs it into the intelligent algorithm as the current environmental state. The PPO algorithm selects an optimal action based on the current state and historical data, that is, whether to turn on / off a device or adjust the device's operating parameters (such as fan speed, air conditioning temperature, etc.). The system provides a reward or penalty for each action based on whether the action taken optimizes comfort (assessed by the CI value) and energy use (whether electricity is saved), thereby training the PPO algorithm to optimize the decision-making strategy. Based on the decision and CI value calculated by the intelligent algorithm, the system transmits the control signal to the relay control system in the summer pavilion through the remote transmission module, thereby controlling the on / off status of electrical equipment (such as air conditioners, electric fans, lamps, etc.). During the dynamic adjustment process of the system, the PPO algorithm and the calculation of the comfort index work together to achieve the optimization goals of energy saving and high comfort. After each control decision, the system collects new data through sensors and feeds this data back to the intelligent algorithm. The intelligent algorithm will fine-tune the control strategy to cope with environmental changes. The PPO algorithm will accumulate more environmental data and operating experience over time, gradually optimizing the decision-making process and improving the adaptability and efficiency of the system under different conditions.

[0074] Specifically, the remote transmission module transmits the signals output by the intelligent control module back to the building, controlling the power on and off of electrical appliances via relays, achieving precise control of air conditioners, fans, lamps, and other appliances. Control actions are based on the system's real-time environmental status and the results of a trained PPO algorithm model, dynamically adjusting the operating state of the equipment to achieve a balance between energy conservation and comfort. Load control is achieved by turning individual loads on and off via relays, which also use the MODBUS communication protocol. The system first reads the load power output, and then, based on the trained PPO algorithm model, determines which loads to operate.

[0075] In order to be able to understand the status of the system to be controlled in real time, the energy control device based on photovoltaic power generation also includes: a LabVIEW platform;

[0076] The LabVIEW platform is connected to the intelligent control module for real-time display of environmental status.

[0077] The LabVIEW platform is a program development environment developed by National Instruments (NI) of the United States. It is similar to the C and BASIC development environments. However, the significant difference between LabVIEW and other computer languages is that other computer languages use text-based languages to generate codes, while the LabVIEW platform uses the graphical editing language G to write programs, and the generated programs are in the form of block diagrams.

[0078] like Figure 4 As shown, data acquisition is performed through data acquisition equipment, which includes a data acquisition card, a temperature and humidity transmitter, a light transmitter, and a current and voltage transmitter. The temperature and humidity transmitter is used to monitor the temperature difference between the inside and outside of the building, as well as the temperature field distribution inside the building; the light transmitter is used to collect the light intensity of the photovoltaic module in real time; and the current and voltage transmitter is used to collect the voltage and current data of the photovoltaic module to provide a basis for analyzing its power generation performance. Through the collaborative work of these devices, environmental data can be comprehensively constructed. In this embodiment, a data transmission radio using industrial-grade low-power wide area network modulation technology is used to send real-time environmental status to the terminal for centralized processing. Since the sensor, data acquisition card, and remote transmission module all use RS485 communication, a USB to RS485 module is used to interact with the computer. The initial data collected is a code under the MODBUS protocol, and subsequent programming is required to decode the protocol code. The data collection and recording environment is built using the LabVIEW platform. Data is received through the serial port and indexed. The data format is then converted from the MODBUS protocol to the real value measured by the sensor. The real value is then converted into a directly readable and required value. Finally, the data is saved and recorded.

[0079] This application has the following effects:

[0080] (1) Intelligent control: Through reinforcement learning algorithms, this application can make adaptive decisions based on real-time environmental data to achieve optimal management of energy and environment.

[0081] (2) Energy saving and high efficiency: Intelligent algorithms optimize load scheduling, maximizing the utilization of photovoltaic energy while ensuring environmental comfort, reducing the frequency of battery charging and discharging, and extending the service life of the system.

[0082] (3) Strong environmental adaptability: This application can dynamically adjust the control strategy according to multiple factors such as temperature and humidity, light, and battery power to ensure that places such as summer pavilions are always in the best comfortable state.

[0083] (4) Remote monitoring and management: Through the remote transmission module, users can monitor the system's operating status in real time and perform remote management and adjustments.

[0084] (5) Strong scalability: This application is not only suitable for photovoltaic summer pavilions, but can also be widely used in photovoltaic homes, commercial buildings and other places, with strong adaptability and scalability.

[0085] The following uses a photovoltaic summer pavilion as an example to demonstrate how this application can be used to manage energy and ensure that environmental parameters such as temperature and humidity within the pavilion remain within appropriate ranges. The pavilion is equipped with a photovoltaic power generation system, air conditioners, electric fans, lamps, and other electrical appliances, and this application optimizes management.

[0086] The energy management and control device based on photovoltaic power generation includes: a photovoltaic power generation system, a battery, an inverter, an air conditioner, an electric fan, a lamp, a water pump, etc.; this application uses temperature and humidity sensors, illumination sensors, and current and voltage sensors to monitor the real-time data of the summer pavilion; each sensor in the summer pavilion is connected to a data acquisition card, which can realize up to 12 channels of signal acquisition (currently using 7 channels of data acquisition, including temperature inside the pavilion, temperature outside the pavilion, humidity, illumination, current, voltage, and battery level, which can be reduced or expanded according to usage), the data acquisition card is connected to a signal transmission module, and the remote transmission module adopts industrial-grade low-power wide area network modulation technology to communicate with the communication module in the laboratory 500 meters away from the summer pavilion. The signal adopts RS485 communication, and the communication module on the laboratory side is connected to the RS485 to USB data module to transmit the data to the PC side for processing and analysis. While using the Labview platform for real-time working condition visualization, this embodiment uses the PPO algorithm in reinforcement learning to optimize energy use. The specific process is as follows:

[0087] 1. State observation: The intelligent system collects sensor data (temperature, humidity, illumination, power, etc.) in real time and inputs it into the PPO algorithm as the current system state.

[0088] 2. Action selection: The PPO algorithm selects the appropriate control action based on the current environmental conditions. For example, if the temperature is too high, the system will turn on the air conditioner; if the illumination is too low, the system will turn on the lights.

[0089] 3. Reward function: The reward function evaluates each decision based on environmental changes and energy efficiency. If the system successfully conserves energy while maintaining comfortable temperature and humidity (for example, turning off lights when there's ample sunlight), the reward increases. If the system consumes too much energy (for example, leaving the air conditioner on for extended periods), it is penalized.

[0090] The execution instructions are transmitted to the summer pavilion in the same manner, and the various loads in the pavilion are controlled by switching relays on and off. Sensors provide feedback on new data such as temperature, humidity, and power consumption. The PPO algorithm then makes decisions based on the new environmental conditions, forming a closed-loop feedback control system. This ultimately enables the rational management and distribution of energy across multiple sources, including batteries and photovoltaic power generation, and across multiple loads across various electrical appliances.

[0091] When the device in this embodiment is operated during the day with sufficient sunlight, the specific operation process is as follows:

[0092] 1. Photovoltaic power generation system is charged by sunlight and generates sufficient electricity.

[0093] 2. The illumination sensor detects that there is sufficient light in the room and chooses to turn off the lights to save energy.

[0094] 3. The temperature and humidity sensor detects that the indoor temperature has risen, so turn on the air conditioner to cool down.

[0095] 4. The PPO algorithm optimizes control and determines whether to continue turning on the air conditioner or adjust the fan speed to achieve energy saving goals based on the current environmental conditions (temperature, humidity, light, and battery power).

[0096] 5. Battery energy storage stores the excess electricity from photovoltaic power generation for use on cloudy days or at night.

[0097] The above process, through continuous learning and adjustment, ensures that a comfortable environment can be maintained and energy can be used efficiently under different environmental conditions.

[0098] In an exemplary embodiment, a computer device is provided, which may be a server or a terminal. The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for energy management and control based on photovoltaic power generation is implemented.

[0099] In an exemplary embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0100] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0101] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0102] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.

[0103] In this application, all actions to obtain signals, information or data are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.

[0104] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0105] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. An energy management and control method based on photovoltaic power generation, characterized in that: The energy management and control method based on photovoltaic power generation includes: Obtain the current and historical environmental status of the system to be controlled; the environmental status includes: temperature, humidity, light intensity, battery power, and photovoltaic power generation; Construct a PPO algorithm model; the PPO algorithm model includes a decision network and an evaluation network; the decision network outputs the control action at the next moment based on the environmental state; the evaluation network evaluates the control action at the next moment based on a reward function; the reward function is constructed based on environmental comfort, energy consumption, and light intensity; the control action includes controlling the on / off state and operating power of the load in the system to be controlled; According to the historical environmental status, the PPO algorithm model is continuously iterated and optimized to obtain a trained PPO algorithm model; According to the current environmental status, the trained PPO algorithm model is used to perform energy management of the system to be managed.

2. The energy management and control method based on photovoltaic power generation according to claim 1, characterized in that: The acquisition of the current and historical environmental status of the system to be controlled specifically includes: The control system is monitored using a sensor group comprising a temperature and humidity sensor, an illumination sensor, and a current and voltage sensor; The data acquisition card is used to obtain the environmental status monitored by the sensor group.

3. The energy management and control method based on photovoltaic power generation according to claim 1, characterized in that: The reward function specifically includes: R total =ω comfort ·R comfort +oh energy ·R energy +oh light ·R light +oh adapt ·R adapt ; Among them, R total is the reward function, R comfort is the environmental comfort reward function, R energy is the dynamic battery consumption reward function, R light is the time-decay reward function, R adapt is the adaptive reward function, ω comfort 、ω energy 、ω light 、ω adapt are the weight coefficients of the corresponding rewards respectively.

4. The energy management and control method based on photovoltaic power generation according to claim 3, characterized in that: Using formula R comfort =-α·(|T current -T target (t)|+|H current -H target (t)|)+β·CI determines the environmental comfort reward function; Using formula R energy =-(|E current -E target |+γ·|P solar -P target_solar |) Determine the dynamic battery consumption reward function; Using formula R light =(L current -L threshold )·ω lightlocal ·T day Determine the time-decay reward function; Using formula R adapt =λ·(Response Speed)+μ·(Error Correction Ability) to determine the adaptive reward function; Among them, T current and H current are the current temperature and humidity respectively, T target (t) and H target (t) are the target temperature and target humidity that are dynamically adjusted according to the real-time environmental status, α and β are the weight coefficients for adjusting comfort and environmental changes, CI is the comprehensive comfort index, which is determined according to user needs and environmental factors, and E target is the target battery power range, P solar is the current photovoltaic power generation power, P target_solar is the target power of photovoltaic power generation, γ is the coefficient for adjusting the impact of solar power generation, T day is the time decay factor, representing the change between day and night, L current is the current light intensity, L threshold is the threshold light intensity for power generation, ω lightlocal To adjust the coefficient of illumination influence, Response Speed is the speed of response change, Error Correction Ability is the ability to correct the deviation of environmental state, and λ and μ are the weights corresponding to Response Speed and Error Correction Ability respectively.

5. The energy management and control method based on photovoltaic power generation according to claim 1, characterized in that: Based on the current environmental status, the trained PPO algorithm model is used to perform energy management of the system to be managed, specifically including: According to the current environmental state, the trained PPO algorithm model is used to determine the control action; According to the control action, the on and off of the relay is controlled to realize the on and off of the load.

6. The energy management and control method based on photovoltaic power generation according to claim 5, characterized in that: The communication protocol of the relay is MODBUS.

7. An energy management and control device based on photovoltaic power generation, applied to the energy management and control method based on photovoltaic power generation according to any one of claims 1 to 6, characterized in that: The energy management and control device based on photovoltaic power generation includes: a photovoltaic power generation device, a battery, a load, a sensor group, an intelligent control module, a remote transmission module and an actuator; The sensor group is used to connect to the photovoltaic power generation device, the battery and the load respectively, and collect data from the photovoltaic power generation device, the battery and the load to obtain the environmental status; The remote transmission module is connected to the sensor group and is used to send environmental data to the intelligent control module; The intelligent control module is used to carry the trained PPO algorithm model and output control actions; The actuator is connected to the load and is used to control the switching state and operating power of the load according to the control action.

8. The energy management and control device based on photovoltaic power generation according to claim 7, characterized in that: The energy management and control device based on photovoltaic power generation further includes: a LabVIEW platform; The LabVIEW platform is connected to the intelligent control module for real-time display of environmental status.