Air conditioner control method and device, air conditioner, storage medium and program product
By using a dynamic adjustment strategy network for air conditioning condensate, the compressor power and fan speed are dynamically adjusted, solving the problems of excessive condensate depth and temperature fluctuations. This achieves coordinated control of condensate management and user comfort, improving the intelligence level of the air conditioning system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GREE ELECTRIC APPLIANCE INC OF ZHUHAI
- Filing Date
- 2025-12-22
- Publication Date
- 2026-05-08
AI Technical Summary
Existing air conditioners produce a surge in condensate in high humidity environments, causing water depths to exceed the mosquito egg breeding threshold, increasing the risk of mosquito breeding. Furthermore, fixed threshold control strategies are difficult to adapt to dynamic environmental changes.
A dynamic condensate water regulation strategy network is adopted. By acquiring air conditioning environment status information, the compressor power and fan speed are dynamically adjusted using a pre-trained near-end strategy optimization network (such as the PPO algorithm) to ensure that the condensate water accumulation depth is within a preset threshold and control temperature fluctuations within a preset range.
It effectively controls the depth of condensate accumulation within a preset threshold, constrains temperature fluctuations within a preset range, reduces the risk of mosquito breeding, and improves user comfort and the intelligence level of the air conditioning system.
Smart Images

Figure CN121993892A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent air conditioning control technology, specifically relating to an air conditioning control method, device, air conditioner, storage medium, and computer program product. Background Technology
[0002] When air conditioners operate in high humidity environments, the amount of condensate produced surges, easily leading to water accumulation in the drip tray. Under normal circumstances, water accumulation in the air conditioner drip tray can serve as an oviposition site for Aedes albopictus mosquitoes (the vector of Chikungunya heat), and mosquito eggs can hatch within 24 hours in 0.5 cm of accumulated water.
[0003] In existing air conditioning systems, condensate drainage control typically employs a fixed threshold-based strategy. For example, when indoor humidity exceeds 80%, compressor power and fan speed are usually forcibly reduced to decrease condensate generation. While this control method can suppress condensate accumulation to some extent, it presents the following technical problems:
[0004] Fixed thresholds are difficult to adapt to dynamically changing environmental conditions, and can easily lead to condensation depths exceeding the mosquito egg breeding threshold, potentially increasing the risk of mosquito breeding.
[0005] Therefore, how to improve the intelligent control of condensate water has become an urgent problem to be solved. Summary of the Invention
[0006] This invention provides a control method, device, air conditioner, storage medium, and computer program product for an air conditioner, which avoids the problem of controlling condensate water through a fixed threshold in related solutions. It can automatically control condensate water below a safe threshold while ensuring that temperature changes are within a preset range, thereby improving comfort.
[0007] This invention provides a method for controlling an air conditioner. The method includes: acquiring environmental state information, wherein the environmental state information includes the temperature value, humidity value, door and window status value of the current environment where the air conditioner is located, and the water depth value of the condensate generated by the air conditioner; inputting the environmental state information into a pre-trained dynamic adjustment strategy network for condensate, so that the dynamic adjustment strategy network for condensate determines the target operating state of the air conditioner based on the environmental state information, wherein the target operating state is used to control the water depth of the condensate generated by the air conditioner to be within a preset water depth threshold, and to control the temperature change of the current environment where the air conditioner is located to be within a preset range; and controlling the air conditioner to operate according to the target operating state.
[0008] In some embodiments, the target operating state of the air conditioner includes: the compressor power of the air conditioner, and / or the fan speed of the air conditioner;
[0009] Determining the target operating state of the air conditioner includes:
[0010] Determine the compressor power of the air conditioner, and / or determine the fan speed of the air conditioner.
[0011] In some implementations, the condensate dynamic regulation strategy network is obtained by training an initial proximal strategy optimization network in the following manner:
[0012] The objective function, constraints, state space, action space, and reward function of the initial proximal policy optimization network are determined. The objective function is used to define the goal to be achieved by training the initial proximal policy optimization network. The constraints are used to constrain the temperature change of the current environment of the air conditioner within a preset range. The state space is used to define the set of environmental parameters. The action space is a set of executable control actions. The reward function is used to represent the immediate benefit obtained under a specified action.
[0013] The initial proximal policy optimization network is trained and updated using the advantage function and pruning loss function until the convergence condition is met. The converged proximal policy optimization network is then used as the dynamic regulation strategy network for condensate.
[0014] In some implementations, the objective function and constraints of the initial proximal policy optimization network are determined, including:
[0015] The objective function and constraints of the initial proximal policy optimization network are determined by the following formula, where:
[0016] The objective function is:
[0017] ;
[0018] in, Indicates the expected value. As a discount factor, For the reward function;
[0019] The constraints are as follows:
[0020] ;
[0021] in, The constraints are used to represent the constraint mechanism of the action space;
[0022] 'a' is used to indicate an action. Used to indicate compressor power. To set the minimum compressor power corresponding to the set temperature value, The maximum compressor power corresponding to the set temperature value is defined by `fan`, where `f1` represents the minimum fan speed corresponding to the set temperature value, and `f2` represents the maximum fan speed corresponding to the set temperature value.
[0023] In some implementations, the state space, action space, and reward function of the initial proximal policy optimization network are determined, including:
[0024] The state space, action space, and reward function of the initial proximal policy optimization network are determined by the following formulas, where:
[0025] The state space is as follows:
[0026] ;
[0027] in, Used to indicate the current environmental state. Used to indicate indoor relative humidity, it is divided into three levels: low, medium, and high. Used to indicate indoor temperature, it is divided into three levels: low, medium, and high. Used to indicate historical water depth, it is divided into three levels: low, medium, and high. Used to indicate the status of doors and windows;
[0028] The state transition process corresponding to the state space is represented as follows:
[0029] ;
[0030] in, Used to indicate the state of the environment at the next moment. For system dynamic functions, To indicate the action being performed, This refers to environmental disturbances, which include changes in the status of doors and windows.
[0031] The parameters of the action space are calculated as follows:
[0032] ;
[0033] ;
[0034] in, Used to indicate the target power of the compressor Used to indicate the current power of the compressor. Used to indicate the amount of compressor power adjustment. Corresponding to the first step method; Used to indicate target power at fan speed Used to indicate the current power of the fan speed. Used to indicate the amount of fan speed adjustment. Corresponding to the second step method;
[0035] The reward function is:
[0036] ;
[0037] ;
[0038] ;
[0039] in, Used to represent the reward function This is indicated as a reward based on the depth of accumulated water. These are the weighting coefficients. The predicted water depth is Q, which is a set value related to the preset water depth threshold. Q is less than the preset water depth threshold. This is represented as a comfort reward. is the weighting coefficient, and T is the set temperature value.
[0040] In some implementations, training the initial proximal policy optimization network and updating it using an advantage function and a pruning loss function until convergence is met, and then using the converged proximal policy optimization network as the condensate dynamic regulation strategy network, includes:
[0041] Initialize the policy network, value network, and experience buffer in the initial proximal policy optimization network;
[0042] Repeat the following steps until the convergence condition is met;
[0043] Obtain the current environment state and input the current environment state into the policy network, wherein the current environment state is obtained from a pre-constructed state space;
[0044] The policy network outputs an action when the constraints are met.
[0045] The action is executed through the policy network, and the reward function value is determined based on the obtained next-time environmental state, wherein the difference between the acquisition time of the next-time environmental state and the acquisition time of the current environmental state is the preset time interval.
[0046] The current environment state, the action, the reward function value, and the environment state at the next moment are stored as an experience sample in the experience buffer pool.
[0047] According to the preset sampling method, an experience sample set is extracted from the experience buffer pool;
[0048] The advantage function and the pruning loss function are determined based on the empirical sample set, and the mean squared error loss function of the value network is determined based on the advantage function and the pruning loss function.
[0049] The policy network and the value network are updated based on the mean squared error loss function.
[0050] After completing the network update for the current training round, determine whether the convergence condition is met. If it is met, the training ends, and the near-end policy optimization network at the time of convergence is used as the dynamic regulation strategy network for condensate.
[0051] In some implementations, the convergence condition includes:
[0052] Provided that the number of consecutive training rounds meets the preset number of rounds, the following requirements are also met:
[0053] The cumulative reward standard deviation is less than or equal to a first preset threshold, wherein the cumulative reward standard deviation is determined by the reward function value obtained in each training round after a preset number of consecutive training rounds;
[0054] The water depth compliance rate is greater than or equal to the second preset threshold, wherein the water depth compliance rate is determined by the water depth value obtained in each training round after a preset number of consecutive training rounds;
[0055] The temperature fluctuation exceeding the standard rate is less than or equal to a third preset threshold, wherein the temperature fluctuation exceeding the standard rate is determined by the temperature value obtained in each training round after a preset number of consecutive training rounds.
[0056] In accordance with the above method, the present invention provides an air conditioner control device, comprising: an acquisition unit for acquiring environmental state information, wherein the environmental state information includes the temperature value, humidity value, door and window status value of the current environment in which the air conditioner is located, and the water depth value of the condensate generated by the air conditioner; a control unit for inputting the environmental state information into a pre-trained condensate dynamic adjustment strategy network, so that the condensate dynamic adjustment strategy network determines the target operating state of the air conditioner based on the environmental state information, wherein the target operating state is used to control the water depth of the condensate generated by the air conditioner to be within a preset water depth threshold, and to control the temperature change of the current environment in which the air conditioner is located to be within a preset range; the control unit is also used to control the air conditioner to operate according to the target operating state.
[0057] In accordance with the above method, the present invention provides an air conditioner control device, comprising: a processor and a memory interconnected thereto; the memory storing machine-readable instructions executable by the processor, the processor executing the machine-readable instructions to perform the method provided in any possible implementation of the above-described air conditioner control method.
[0058] In accordance with the above method, the present invention provides an air conditioner that includes the control device for the air conditioner described above.
[0059] In conjunction with the above method, the present invention provides a storage medium including a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to perform the above-described air conditioner control method.
[0060] In accordance with the above method, the present invention provides a computer program product comprising a computer program that, when processed and executed, implements the steps of the above-described air conditioner control method.
[0061] The present invention acquires environmental state information of the current environment in which the air conditioner is located. This environmental state information includes humidity, temperature, door and window status, and the depth of condensate water accumulation generated by the air conditioner. This environmental state information is input into a pre-trained dynamic condensate water control strategy network. Based on the environmental state information, this network outputs a target operating state for the air conditioner. This target operating state controls the condensate water depth within a preset threshold and the temperature variation of the current environment within a preset range. Finally, the air conditioner is controlled to operate according to the target operating state. Through this invention, on the one hand, the condensate water depth can be effectively controlled within a preset threshold; on the other hand, temperature fluctuations can be effectively constrained within a preset range, significantly improving user comfort. This achieves multi-objective coordinated control of condensate water management and user comfort, enhancing the intelligence level and overall performance of the air conditioning system. Attached Figure Description
[0062] Figure 1 A flowchart illustrating an air conditioner control method provided by the present invention;
[0063] Figure 2 A schematic diagram of the overall architecture of an air conditioning control system provided by the present invention;
[0064] Figure 3 A schematic diagram of the training process for a dynamic adjustment system for air conditioning condensate water provided by the present invention;
[0065] Figure 4 This invention provides a schematic diagram of a real-time closed-loop control process for an air conditioner.
[0066] Figure 5 This is a schematic diagram of the structure of an air conditioner control device provided by the present invention.
[0067] Referring to the accompanying drawings, the reference numerals in this invention are as follows:
[0068] 501 - Acquisition unit; 502 - Control unit. Detailed Implementation
[0069] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0070] In existing air conditioning systems, condensate drainage control typically employs a fixed threshold-based control strategy. For example, when indoor humidity exceeds 80%, the compressor power is forcibly reduced to decrease condensate generation. This approach results in water retention time exceeding 24 hours and a decrease in cooling efficiency. In other words, existing solutions suffer from technical problems such as fixed condensate control strategies, delayed response, and reduced user comfort.
[0071] To solve the above problems, Figure 1 A flowchart illustrating an air conditioner control method provided by the present invention is shown below. Figure 1 As shown, the method includes the following steps:
[0072] Step S101: Obtain environmental status information, including the temperature and humidity values of the current environment where the air conditioner is located, as well as the depth of condensate water generated by the air conditioner.
[0073] Step S102: Input the environmental state information into the pre-trained condensate dynamic regulation strategy network so that the condensate dynamic regulation strategy network can determine the target working state of the air conditioner based on the environmental state information. The target working state is used to control the condensate water accumulation depth generated by the air conditioner within a preset water accumulation depth threshold and to control the temperature change of the current environment of the air conditioner within a preset range.
[0074] Step S103: Control the air conditioner to operate according to the target working state.
[0075] Optionally, firstly, the air conditions surrounding the air conditioner are acquired, i.e., environmental condition information is obtained. This environmental condition information includes the temperature, humidity, door and window status, and the depth of condensate water accumulated by the air conditioner. The temperature can be obtained using the air conditioner's built-in temperature sensor, the humidity can be obtained using the air conditioner's built-in humidity sensor, and the condensate water depth can be obtained in real-time through a drain pipe pressure sensor.
[0076] The acquired environmental state information is input into a pre-trained dynamic condensate water regulation strategy network, which outputs the target operating state of the air conditioner based on the acquired environmental state information. In an optional embodiment, the target operating state of the air conditioner includes: the compressor power of the air conditioner, and / or the fan speed of the air conditioner; determining the target operating state of the air conditioner includes: determining the compressor power of the air conditioner, and / or determining the fan speed of the air conditioner.
[0077] Optionally, the core operating components of an air conditioner include a compressor and a fan (the fan being the indoor fan motor, which can be simply referred to as the indoor fan or internal fan). Correspondingly, the target operating state includes the compressor power and / or the fan speed. Determining the target operating state of an air conditioner mainly involves determining the compressor power and / or the fan speed.
[0078] The aforementioned condensate dynamic adjustment strategy network is a pre-trained model for dynamic condensate adjustment. During the training process, a preset water depth threshold is set. The target operating state output by the condensate dynamic adjustment strategy network can ensure that when the air conditioner operates under the target operating state, the water depth of the condensate generated by the air conditioner is within the preset water depth threshold. Here, "within the preset water depth threshold" means less than and not equal to the preset water depth threshold.
[0079] The dynamic condensate water regulation strategy network is trained based on constraints. These constraints are used to regulate the operating state of the air conditioner's core working components (i.e., the compressor and fan), specifically the compressor power and fan speed, to ensure that the temperature variation of the environment in which the air conditioner is located remains within a preset range. In other words, when the air conditioner operates according to the target operating state, it can ensure that the difference between the temperature change and the set temperature value is within the preset range.
[0080] The detailed training process for the dynamic regulation strategy network for condensate will be described later and will not be repeated here.
[0081] Finally, the target operating status is sent to the air conditioner, causing it to operate according to the target status.
[0082] Through this invention, on the one hand, the depth of condensate water accumulation can be effectively controlled within a preset water depth threshold; on the other hand, temperature fluctuations can be effectively constrained within a preset range, significantly improving user comfort. This invention achieves multi-objective coordinated control of condensate water management and user comfort, thereby enhancing the intelligence level and overall performance of the air conditioning system.
[0083] The training process of the dynamic condensate water regulation strategy network is described in detail below with reference to several examples.
[0084] In an optional embodiment, the condensate dynamic regulation strategy network is obtained by training an initial proximal strategy optimization network in the following manner: determining the objective function, constraints, state space, action space, and reward function of the initial proximal strategy optimization network, wherein the objective function is used to define the goal to be achieved by training the initial proximal strategy optimization network, the constraints are used to constrain the temperature change of the current environment of the air conditioner within a preset range, the state space is used to define the set of environmental parameters, the action space is the set of executable control actions, and the reward function is used to represent the immediate benefit obtained under a specified action; training the initial proximal strategy optimization network and updating the initial proximal strategy optimization network through the advantage function and the pruning loss function until the convergence condition is met, and using the converged proximal strategy optimization network as the condensate dynamic regulation strategy network.
[0085] Optionally, the aforementioned initial proximal policy optimization network is a proximal policy optimization (PPO) algorithm. The initial proximal policy optimization network will be referred to as the PPO algorithm below. The PPO algorithm is a reinforcement learning algorithm with the characteristics of high training stability and fast convergence speed, and can be adapted to real-time air conditioning control scenarios.
[0086] This invention sets the air conditioner condensate dynamic adjustment system as an intelligent agent in the initial near-end strategy optimization network. The core objective is to dynamically optimize the condensate discharge strategy, ensuring that the water depth is always lower than the preset water depth threshold, while strictly ensuring that the indoor temperature fluctuation is within the preset range (e.g., temperature change value ≤ ±0.5℃), and ensuring that the wind speed is gentle enough to meet the human comfort standard.
[0087] In practical applications, mosquito eggs can hatch within 24 hours in 0.5cm of standing water. To mitigate the risk, a preset water depth threshold of 0.5cm can be set to ensure that the water depth is always less than and not equal to the preset water depth threshold of 0.5cm. In other words, the target for controlling the water depth can be set as follows: the water depth is always less than and not equal to the preset water depth threshold of 0.5cm.
[0088] During training, the objective function, constraints, state space, action space, and reward function of the PPO algorithm must first be pre-defined. The objective function defines the goal to be achieved during the initial training of the proximal policy optimization network, controlling the water depth within a preset threshold. Constraints are used to limit the temperature fluctuation of the environment to a preset range; for example, constraints could be that the indoor temperature fluctuation during air conditioning operation is ≤ ±0.5℃, and the fan speed should be gentle to avoid a direct blowing sensation. The state space defines the possible combinations of perceived environmental parameters; that is, it defines the set of environmental parameters, including the currently perceived indoor relative humidity, current indoor temperature, current water depth, and current door and window status. The action space defines the set of control actions that the agent can execute, including parameters that directly affect the amount of condensate produced, such as compressor power adjustment and fan speed adjustment. The reward function represents the immediate reward given to the agent by the environment when it takes a specified action in a given state.
[0089] The PPO algorithm is a neural network that outputs the probability distribution of actions. It is essentially a policy gradient algorithm that aims to directly optimize the network parameters to maximize the expected cumulative reward (reward). Its core advantage lies in using the pruning probability ratio (i.e., the pruning loss function) to constrain the step size of each update, ensuring the stability of the training process.
[0090] The PPO algorithm consists of a policy network (Actor) and a value network (Critic). The policy network (Actor) maps states (s) to actions (a). In a system that dynamically optimizes air conditioning condensate production, the policy network (Actor) outputs the probability distribution of actions. The Critic value network estimates the state-value function and evaluates the state value. (See the explanation below for details).
[0091] During actual training, the initial proximal policy optimization network calculates the advantage function and updates the policy network by applying a pruning loss function, thereby obtaining the state-action policy that maximizes the cumulative reward. Using a set of environmental parameters generated from historical data on indoor humidity, temperature, and water depth, the initial proximal policy optimization network is trained until the convergence condition is met, thus obtaining the optimal state-action policy. The proximal policy optimization network at convergence is then used as the dynamic regulation policy network for condensate water.
[0092] Through the embodiments of the present invention, the PPO algorithm can be continuously optimized through joint training of the policy network and the value network until convergence, thus obtaining the final dynamic adjustment strategy network for condensate water. This lays the foundation for controlling the working state of the air conditioner through the dynamic adjustment strategy network for condensate water.
[0093] In one optional embodiment, determining the objective function and constraints of the initial proximal policy optimization network includes: determining the objective function, constraints, state space, action space, and reward function of the initial proximal policy optimization network using the following formulas, wherein:
[0094] The objective function is:
[0095] ;
[0096] in, Indicates the expected value. As a discount factor, For the reward function;
[0097] The constraints are:
[0098] ;
[0099] in, These are constraints, used to represent the constraint mechanism of the action space;
[0100] 'a' is used to indicate an action. Used to indicate compressor power. To set the minimum compressor power corresponding to the set temperature value, The maximum compressor power corresponding to the set temperature value is defined by `fan`, where `f1` represents the minimum fan speed corresponding to the set temperature value, and `f2` represents the maximum fan speed corresponding to the set temperature value.
[0101] A more detailed description of the objective function and constraints of the initial proximal policy optimization network will be provided later and will not be repeated here.
[0102] Through the embodiments of the present invention, defining the objective function enables the intelligent agent to determine the target of deep learning, laying the foundation for ensuring that the amount of condensate generated is lower than the preset water depth threshold; defining the constraint conditions enables the intelligent agent to learn how to output the working state of the air conditioner during the training process to ensure that the temperature change is within the preset range; that is, through the objective function and constraint conditions, the intelligent agent is trained for intelligent control of condensate, thereby improving the intelligence of air conditioner control.
[0103] In one alternative implementation, the state space, action space, and reward function of the initial proximal policy optimization network are determined, including:
[0104] The state space, action space, and reward function of the initial proximal policy optimization network are determined by the following formulas, where:
[0105] The state space is:
[0106] ;
[0107] in, Used to indicate the current environmental state. Used to indicate indoor relative humidity, it is divided into three levels: low, medium, and high. Used to indicate indoor temperature, it is divided into three levels: low, medium, and high. Used to indicate historical water depth, it is divided into three levels: low, medium, and high. Used to indicate the status of doors and windows;
[0108] The state transition process corresponding to the state space is represented as follows:
[0109] ;
[0110] in, Used to indicate the state of the environment at the next moment. For system dynamic functions, To indicate the action being performed, This refers to environmental disturbances, which include changes in the status of doors and windows.
[0111] The parameters of the action space are calculated as follows:
[0112] ;
[0113] ;
[0114] in, Used to indicate the target power of the compressor Used to indicate the current power of the compressor. Used to indicate the amount of compressor power adjustment. Corresponding to the first step method; Used to indicate target power at fan speed Used to indicate the current power of the fan speed. Used to indicate the amount of fan speed adjustment. Corresponding to the second step method;
[0115] The reward function is:
[0116] ;
[0117] ;
[0118] ;
[0119] in, Used to represent the reward function This is indicated as a reward based on the depth of accumulated water. These are the weighting coefficients. Q is the predicted water depth, and Q is a set value related to the preset water depth threshold. Q is less than the preset water depth threshold. This is represented as a comfort reward. is the weighting coefficient, and T is the set temperature value.
[0120] A more detailed description of the state space, action space, and reward function of the initial proximal policy optimization network will be provided later and will not be repeated here.
[0121] Through the embodiments of the present invention, setting a state space can provide the agent with a sufficiently information-rich and efficient observation window, providing a prerequisite for the agent to learn; setting an action space can provide the agent with clear behavioral capabilities, which can control the agent within a reasonable and efficient range; setting a reward function is the most important means of "instilling" the final training goal, value orientation, and behavioral norms into the agent; that is, through the state space, action space, and reward function, the foundation is laid for the finally trained condensate dynamic regulation strategy network.
[0122] In one optional embodiment, an initial proximal policy optimization network is trained based on a set of environmental parameters, and updated using an advantage function and a pruning loss function until a convergence condition is met. The converged proximal policy optimization network is then used as the dynamic regulation policy network for condensate. This includes: initializing the policy network, value network, and experience buffer in the initial proximal policy optimization network; repeating the following steps until the convergence condition is met; obtaining the current environmental state and inputting it into the policy network, wherein the current environmental state is obtained from a pre-constructed state space; outputting an action through the policy network under the condition that the action adjustment constraint is met; and executing the action through the policy network based on the obtained next-time environment. The system first determines the reward function value based on the state, where the difference between the acquisition time of the next environmental state and the current environmental state is a preset time interval. The current environmental state, action, reward function value, and next environmental state are stored as an experience sample in an experience buffer. An experience sample set is extracted from the experience buffer according to a preset sampling method. Based on the experience sample set, the dominance function and pruning loss function are determined, and based on the dominance function and pruning loss function, the mean squared error loss function of the value network is determined. Based on the mean squared error loss function, the policy network and value network are updated. After completing the network update for the current training round, it is determined whether the convergence condition is met. If it is met, training ends, and the proximal policy optimization network at convergence is used as the dynamic adjustment policy network for condensate.
[0123] Optionally, the specific training process for training the initial proximal strategy optimization network to obtain the condensate dynamic regulation strategy network is as follows:
[0124] Step 1: Initialize the parameters of the policy network, value network, and experience buffer pool of the initial near-end policy optimization network.
[0125] Step 2: Repeat steps 2.1 to 2.9 until the convergence condition is met:
[0126] Step 2.1: Obtain the current environment state and input the environment state information into the policy network. The current environment state information is obtained from the state space. When obtaining the current environment state information, it can be obtained at a preset time interval (such as 5 minutes).
[0127] Step 2.2: The policy network outputs actions based on the current environmental state input, showing the probability distribution of compressor power adjustment (e.g., {-5%, 0%, +5%}) and fan speed adjustment (e.g., {-10%, 0%, +10%}). The system performs greedy selection: selecting the action with the highest probability. Then, by adjusting the action constraints, it verifies whether the compressor power is within the preset power range (e.g., ...). Compressor power Within ) and whether the fan speed is within the preset speed range (e.g. Fan speed Within the range, ensure that the action is within the feasible domain. If the verification fails, take the boundary value (such as compressor power = 50%, fan speed = 30%) to ensure that the control command can be executed.
[0128] Among them, the action adjustment constraint is used to constrain the working state of the core working components of the air conditioner. The action is the adjustment amount of the core working components of the air conditioner, which includes the compressor power adjustment amount and the fan speed adjustment amount.
[0129] Step 2.3: The policy network performs the above actions and obtains the environmental state at the next moment within a preset time interval, and determines the reward function value based on the environmental state at the next moment. The reward function value includes water depth reward and comfort reward. The water depth reward and comfort reward can be determined based on the water depth value and temperature value in the environmental state at the next moment.
[0130] Step 2.4: Store the current environment state, action, reward function value, and next-time environment state as an experience sample in the experience buffer pool.
[0131] In the current training round, the experience samples stored in the experience buffer pool contain the current environment state information (denoted as environment state information 1). As the number of training rounds increases, in the next training round, environment state information 1 stored in the experience buffer pool becomes one of the historical environment parameters stored in the experience buffer pool. During training, each historical environment parameter is used to construct the experience replay pool to train the initial proximal policy optimization network.
[0132] Step 2.5: When the number of experience samples stored in the experience buffer pool reaches the fourth preset threshold (e.g., 10% of the buffer pool capacity), random sampling begins; if the number of samples is insufficient, the sampling step is skipped, and experience continues to be accumulated.
[0133] Step 2.6: Calculate the advantage function for each empirical sample in the empirical sample set, and determine the pruning loss function for the PPO algorithm based on the empirical sample set.
[0134] Step 2.7: Determine the mean squared error loss function of the value network based on the advantage function and the pruning loss function.
[0135] In one optional embodiment, determining the advantage function and the pruning loss function based on an empirical sample set includes:
[0136] The dominance function for each empirical sample in the empirical sample set is determined by the following formula:
[0137] ;
[0138] in, The advantage function is used to measure the advantage in a given state. Next action The relative value;
[0139] Used to measure the state Next action The relative value;
[0140] TD error (Temporal Difference Error) is the difference between the immediate reward and the state value.
[0141] This is a discount factor used to balance the importance of current rewards and future rewards;
[0142] To estimate the GAE parameters for generalized advantage, used to control the bias-variance tradeoff of the advantage function;
[0143] Used to indicate the current environmental state. Used to indicate the state of the environment at the next moment. Used to represent the reward function;
[0144] The clipping loss function is determined using the following formula:
[0145] ;
[0146] ;
[0147] ;
[0148] in, Used to represent the pruning loss function; E represents the expected value;
[0149] This is an indicator function used to ensure that the action is satisfied. ≤power≤ f1≤fan≤f2;
[0150] Used to indicate compressor power. To set the minimum compressor power corresponding to the set temperature value, The maximum compressor power corresponding to the set temperature value is defined by `fan`, where `f1` represents the minimum fan speed corresponding to the set temperature value, and `f2` represents the maximum fan speed corresponding to the set temperature value.
[0151] It represents the probability ratio, used to measure the relative probability change of the new strategy relative to the old strategy;
[0152] This is used to ensure that the update range of the policy network is within a controllable range;
[0153] These are the trimming parameters;
[0154] Used to represent the probability that the current policy network will choose action a in state s;
[0155] This is used to represent the probability that the old policy network will choose action a in state s.
[0156] A more detailed description of the advantage function and the pruning loss function will be provided later and will not be repeated here.
[0157] Through the embodiments of the present invention, the advantage function can evaluate the advantage of each action and provide specific suggestions for each action. The advantage function can obtain an efficient and low-variance learning signal. The pruning loss function can limit the magnitude of policy updates to a reliable range. By pruning the loss function, absolute stability can be ensured when updating using the signal given by the advantage function, thereby improving the efficiency and stability of training.
[0158] In one optional embodiment, the mean squared error loss function of the value network is determined based on the advantage function and the pruning loss function, including:
[0159] The mean squared error loss function is determined using the following formula:
[0160] ;
[0161] in, The mean squared error loss function used to represent the value network;
[0162] Used to represent the current state of the value network. The output value;
[0163] Used to represent the value network's next state. Output value.
[0164] A more detailed description of the mean squared error loss function will be provided later and will not be repeated here.
[0165] Through the embodiments of the present invention, the mean squared error loss function trains the value network to estimate the value of each state as accurately as possible in an efficient, stable and powerful way, and can provide a high-quality, low-variance baseline for the advantage function, thereby ensuring that the policy network can obtain reliable learning signals and make correct decisions.
[0166] Step 2.8: Update the policy network and value network based on the mean squared error loss function.
[0167] In one alternative embodiment, the value network parameters are updated based on the mean squared error loss function. Then, the value network parameters are softly updated, as follows:
[0168] ;
[0169] in, Used to represent a value network, where V is the value network parameter. This is the soft update coefficient.
[0170] A more detailed description of the above formula can be found below, and will not be repeated here.
[0171] By updating the policy network and value network using the above formulas through the embodiments of the present invention, training fluctuations can be reduced and training stability can be improved.
[0172] Step 2.9: After completing the network update for the current training round, determine whether the convergence condition is met. If it is met, the training ends, and the near-end policy optimization network at the time of convergence is used as the dynamic adjustment policy network for the condensate.
[0173] In an optional embodiment, the convergence condition includes: while the number of consecutive training rounds meets a preset number of rounds, the following requirements are also met simultaneously: the cumulative reward standard deviation is less than or equal to a first preset threshold, wherein the cumulative reward standard deviation is determined by the reward function value obtained in each training round after the preset number of consecutive training rounds; the water depth compliance rate is greater than or equal to a second preset threshold, wherein the water depth compliance rate is determined by the water depth value obtained in each training round after the preset number of consecutive training rounds; and the temperature fluctuation exceedance rate is less than or equal to a third preset threshold, wherein the temperature fluctuation exceedance rate is determined by the temperature value obtained in each training round after the preset number of consecutive training rounds.
[0174] Optionally, the preset number of rounds can be set according to the actual training situation, such as 100 rounds. After training for the preset number of rounds, if the following conditions are met simultaneously, it can be determined that the convergence condition has been met:
[0175] (1) The cumulative reward standard deviation is less than or equal to the first preset threshold. For example, the cumulative reward standard deviation σ can be set to 0.5, where the cumulative reward standard deviation is determined by the reward function value obtained in each training round after a preset number of consecutive training rounds.
[0176] (2) The water depth compliance rate is greater than or equal to the second preset threshold. For example, the water depth compliance rate can be set to ≥95%, where the water depth compliance rate is determined by the water depth value obtained in each training round after a preset number of consecutive training rounds.
[0177] (3) The temperature fluctuation exceeding the standard rate is less than or equal to the third preset threshold. For example, the temperature fluctuation exceeding the standard rate can be set to ≤5%, where the temperature fluctuation exceeding the standard rate is determined by the temperature value obtained in each training round after a preset number of consecutive training rounds.
[0178] If any metric fails to meet the target, training continues iteratively until the convergence condition is met. By setting convergence conditions, a reliable, high-performance, and deployable agent can be obtained.
[0179] The present invention, based on the PPO algorithm, has the advantages of high stability, fast convergence speed, and high adaptability to real-time air conditioning control scenarios.
[0180] The following example provides a detailed description of the system, training process, and specific implementation of the air conditioner control method of the present invention.
[0181] First, let's explain the air conditioning control system. Figure 2 This invention provides a schematic diagram of the overall architecture of an air conditioning control system, as shown below. Figure 2 As shown, the control system of this air conditioner can also be called an air conditioner dynamic adjustment system for condensate production, or an air conditioner dynamic adjustment system for condensate, without any limitation here. The sensing layer of this system is used for data transmission and includes a humidity sensor, a temperature sensor, and a water depth sensor. The humidity sensor is used to transmit the relative humidity of the environment where the air conditioner is located, the temperature sensor is used to transmit the indoor temperature of the environment where the air conditioner is located, and the water depth sensor is used to transmit the historical water depth of the condensate produced by the air conditioner. During data transmission, a timer can be used to keep track of the data, such as transmitting data every 5 minutes.
[0182] This air conditioning system for dynamically adjusting condensate production includes a microcontroller unit (MCU). The MCU deploys a Point-of-Purpose (PPO) algorithm, which comprises a policy network (Actor) and a value network (Critic). The policy network (Actor) acts as the policy output layer, outputting actions; the value network (Critic) acts as the state value output layer, acquiring state information and updating the policy network (Actor). The actions output by the policy network (Actor) control the compressor power and fan speed, thereby influencing the environmental conditions surrounding the air conditioner. The state information is obtained based on the environmental conditions around the air conditioner.
[0183] The specific steps of the above-mentioned air conditioner control method are as follows:
[0184] Step 1: Determine the goal and define the problem.
[0185] Traditional air conditioning condensate systems use a fixed drainage cycle (such as draining once per hour), which can easily lead to water accumulation and stagnation in scenarios with sudden changes in humidity, potentially causing mosquitoes to lay eggs.
[0186] This invention sets the air conditioner condensate dynamic adjustment system as a deep reinforcement learning agent. The core objective is to dynamically optimize the condensate discharge strategy to ensure that the water depth is always below 0.5cm (i.e., the preset water depth threshold), while strictly ensuring that the indoor temperature fluctuation is ≤±0.5℃ (i.e., the preset range) and that the wind speed and gentleness meet the human comfort standards.
[0187] A dynamic regulation model for air conditioner condensate was established, with the objective function set as optimizing the amount of condensate generated by the air conditioner to control the water accumulation depth. The constraints were: indoor temperature fluctuation during air conditioner operation ≤ ±0.5℃, and fan speed gentle to avoid a direct blowing sensation.
[0188] The objective function is defined as:
[0189] ;
[0190] in, Indicates the expected value. This is the discount factor, typically taken as 0.99. The instantaneous reward at time t is defined below.
[0191] The design of the air conditioner optimizes the constraints on condensate production. The safety constraints are set as follows: compressor power ≥ 50% (to avoid cooling failure) and fan speed ≥ 30% (to ensure basic airflow). The human comfort constraints prohibit any operation that causes the indoor temperature to deviate from the set value (default 25℃) by more than ±0.5℃, and the airflow speed is gentle.
[0192] Step 2: Design a reinforcement learning framework for the dynamic optimization of condensate production in an air conditioning system, including constructing the state space, designing the action space, designing the reward function, and determining the state-action value function.
[0193] 2.1 Constructing the state space:
[0194] The state space is defined as the set of environmental parameters sensed by the system in real time. In the dynamic optimization condensate generation system of air conditioning, data variables that can be continuously collected are obtained through the built-in humidity sensor (accuracy ±2%RH, where RH is relative humidity), temperature sensor (accuracy ±0.5℃), and door and window status monitoring module. The state variables include: indoor relative humidity reflecting the environmental moisture load. Indoor temperature The most recent water depth of the air conditioner (l) can be monitored in real time by the drain pipe pressure sensor.
[0195] The state space is:
[0196] ;
[0197] To balance computational efficiency and decision-making accuracy, continuous parameters are discretized in a hierarchical manner. A typical example is indoor relative humidity. Divided into three levels: Low (<70%), Medium (70-85%), and High (>85%); Indoor temperature Classified into three levels: Low (<24℃), Medium (24-26℃), High (>26℃); Historical water depth classified into three levels: Low (<0.3cm), Medium (0.3-0.5cm), High (≥0.5cm); Door and window status. It has two states: on and off. You can set 0 = off and 1 = on.
[0198] Status update mechanism: Sensor data is collected every 5 minutes. After an action is executed and a control cycle (5 minutes) is completed, the system obtains new parameters through the sensors (e.g., when the humidity rises to 85%, the change in condensate production is reflected in the historical water depth of the air conditioner). After normalization processing, a new status is formed. .
[0199] The state transition process is represented as follows:
[0200] ;
[0201] in For system dynamic functions, To indicate the action being performed, For environmental disturbances (such as sudden changes in outdoor humidity), including changes in the state of doors and windows, this system dynamic function ensures that the algorithm continuously perceives system changes.
[0202] 2.2 Designing the motion space:
[0203] Action space is defined as the set of control actions that an agent can execute, containing only parameters that directly affect the amount of condensate produced: compressor power adjustment. {-5%, 0%, +5%} (corresponding to a power range of 50%-100%, in 5% increments, i.e., the first increment method); fan speed adjustment amount {-10%, 0%, +10%} (corresponding to a speed range of 30%-100%, 10% increments, i.e., the second step mode).
[0204] The compressor power adjustment corresponds to the first step mode, which is the amount of action when the compressor power adjustment increases / holds / decreases each time. Each step can be set to 5%, corresponding to a power range of 50%-100%. The fan speed adjustment corresponds to the second step mode, which is the amount of action when the fan speed adjustment increases / holds / decreases each time. Each step can be set to 10%, corresponding to a speed range of 30%-100%. This invention does not limit the first or second step modes.
[0205] Human comfort constraints are manifested in the strict limitation of the movement space within the feasible domain to ensure that human comfort is not compromised.
[0206] ;
[0207] in, The value used to represent compressor power is 50% of the setting value of y1 mentioned above, and 100% of the setting value of y2 mentioned above. The value used to represent fan speed is 30% of the setting value of f1 mentioned above, and 100% of the setting value of f2 mentioned above. No limit is imposed here.
[0208] Constraint enforcement mechanism:
[0209] The controller only outputs the compressor's target power. and target fan speed The system will execute automatically:
[0210] ;
[0211] ;
[0212] Constraint verification: If If <50%, then set it to 50%; if If it is less than 30%, then set it to 30%.
[0213] Example: When the humidity suddenly rises to 85%, the system outputs... =+5% (power 75%) =+10% (speed 65%), at this time: compressor power = 75% (≥50%, safe), fan speed = 65% (≥30%, safe).
[0214] 2.3 Designing the Reward Function
[0215] The reward function represents the immediate benefit the agent receives from the environment when it takes a specified action in a given state. To minimize the amount of condensate produced by the air conditioner, the water depth is set to no more than 0.5 cm. The reward function is set as follows:
[0216] ;
[0217] ;
[0218] ;
[0219] in, This is indicated as a reward based on the depth of accumulated water. These are weighting coefficients, generally speaking. =100, The predicted water depth Q is a set value related to a preset water depth threshold, and Q is less than the preset water depth threshold. This is represented as a comfort reward. These are weighting coefficients, generally speaking. =50.
[0220] For example, in the reward function The effect is as follows:
[0221] like =0.4cm, then =9 (High reward).
[0222] like =0.5cm, then =-1 (critical penalty).
[0223] like =0.6cm, then =-10 (Severe penalty).
[0224] For example, in the reward function The effect is as follows:
[0225] like =25.2 ,So t=-1.
[0226] like =26.5 ,So =-75.
[0227] Complete reward function:
[0228] ;
[0229] Optimization logic: The system prioritizes using... Actions approaching 0.5 cm. For example, when =0.4cm and At 25.2℃, =9-1=8, which is a high reward; when =0.5cm or At 26.5℃, If the value is ≤0, a strategy adjustment will be triggered.
[0230] The convergence condition of the reward function, which is also the convergence condition of model training, is:
[0231] The algorithm is considered converged when the average cumulative reward fluctuation over 100 consecutive training rounds is ≤0.5, the water depth compliance rate is ≥95%, and the temperature fluctuation exceedance rate is ≤5%. For training to converge, the system must simultaneously satisfy the following conditions:
[0232] (1) Cumulative reward standard deviation σ≤0.5; (2) Water depth compliance rate≥95%; (3) Temperature fluctuation exceedance rate≤5%.
[0233] If any metric fails to meet the target, training continues iteratively until the convergence condition is met.
[0234] Step 3: Select and train the reinforcement learning algorithm. Train a policy network based on the PPO algorithm using historical temperature, humidity, and water depth data.
[0235] A proximal policy optimization (PPO) algorithm is adopted, which features high training stability, fast convergence speed, and adaptability to real-time air conditioning control scenarios. The PPO algorithm consists of a policy network (Actor) and a value network (Critic). The policy network (Actor) maps states s to actions a. In a system for dynamically optimizing condensate generation in air conditioning, the policy network (Actor) outputs the probability distribution of actions. The Critic value network estimates the state-value function and evaluates the state value. .
[0236] The PPO algorithm obtains the state-action policy that maximizes cumulative reward by calculating the advantage function and applying a pruned policy gradient to update the policy network. A dataset is generated using historical data on indoor humidity, temperature, and water depth to train a deep neural network for an air conditioning condensate control system, thereby acquiring the optimal state-action policy. The PPO training process for the air conditioning condensate dynamic regulation system is as follows: Figure 3 As shown, the specific steps of the air conditioner condensate water control method based on the PPO algorithm are as follows:
[0237] Step S301, Initialization: Initialize the policy network, value network, and experience buffer pool (also known as the experience replay pool).
[0238] The policy network (Actor) is initialized with the following parameters: input dimension: 9 (state space: 3 variables × 3 levels); output dimension: 6 (action space: 3+3); hidden layer: 128 neurons; activation function: ReLU; weight initialization: Xavier uniform distribution (mean 0, standard deviation 0.01).
[0239] Value network (Critic) initialization parameters: Input dimension: 9; Output dimension: 1; Hidden layer: 128 neurons; Activation function: ReLU; Weight initialization: same as policy network Actor.
[0240] Experience Buffer (Replay Buffer) initialization parameters: Buffer size: 10,000 (stores experience samples), stores tuples of state, action, reward, and next state; storage structure: (s, a, r, s'); initial state: empty queue.
[0241] Step S302, Sampling: Acquire and construct state variables, input the state into the policy network, output actions, and execute actions; and acquire the state variables at the next time step, and obtain empirical samples through sampling.
[0242] Repeat the following steps until the convergence condition is met:
[0243] Step S3021, obtain the current state The states are derived from the constructed state space: sensor data (humidity, temperature, water depth) are discretized into 3 levels, normalized, and then used as state inputs. For example, 85% humidity → high level, 26℃ temperature → medium level, and 0.4cm water depth → low level, which can be represented by a state vector.
[0244] Step S3022: Obtain the action through the policy network. The policy network is based on the state input and outputs the probability distribution of compressor power adjustment ({-5%, 0%, +5%) and fan speed adjustment ({-10%, 0%, +10%). The system performs greedy selection: selecting the action with the highest probability. Then, it verifies that the compressor power is ≥50% and the fan speed is ≥30% to ensure that the action is within the feasible region. If the verification fails, the boundary values (power = 50%, fan speed = 30%) are forcibly taken to ensure that the control command can be executed.
[0245] Step S3023: Execute the action and obtain the reward function value. and the state at the next moment ; Obtain rewards and the next state. Reward function calculation: Calculate water depth reward and comfort reward based on the current water depth and temperature. The next state comes from the state update mechanism (new sensor data acquired after 5 minutes).
[0246] Step S3024, will Store in the experience buffer pool;
[0247] Step S3025: Randomly select a small batch of experience samples from the experience buffer pool;
[0248] Step S303: Calculate the advantage function and the pruning loss function, and update the policy network and the value network;
[0249] Step S3031: Calculate the dominance function for each sample. For example, using Generalized Advantage Estimation (GAE):
[0250] ;
[0251] in, The advantage function is used to measure the advantage in a given state. Next action The relative value;
[0252] Used to measure the state Next action The relative value;
[0253] TD error (Temporal Difference Error) is the difference between the immediate reward and the state value.
[0254] This is a discount factor used to balance the importance of current rewards and future rewards; it is typically set to 0.99.
[0255] This is a GAE parameter used to control the bias-variance tradeoff of the dominance function, typically set to 0.95.
[0256] Step S3032, based on empirical samples, calculate the PPO pruning loss function:
[0257] ;
[0258] ;
[0259] Constraint embedding:
[0260] ; E represents the expected value;
[0261] in, This is an indicator function (ensuring the action satisfies 50%≤power≤100% and 30%≤fan≤100%). The indicator function... The "1" in the formula represents the numerical value 1, indicating the value of the indicator function when the condition is true. This function outputs a fixed value when the condition is true (outputs 0 when the condition is false), not a calculated result. For example: = 1 means "if the action satisfies the constraints", which requires no calculation and is a direct result of logical judgment.
[0262] in, Representing the probability ratio, it measures the relative probability change of the new strategy compared to the old strategy and is used in calculating the pruning loss function. ;
[0263] This ensures that the scope of strategy updates is controllable;
[0264] This is the trimming parameter, typically set to 0.2;
[0265] This represents the probability that the current policy network will choose action a in state s;
[0266] Let represent the probability that the old policy network chooses action a in state s.
[0267] Step S3033, calculate the mean squared error loss function of the value network:
[0268] ;
[0269] The gradient of the value network is updated based on this loss function.
[0270] in, The mean squared error loss function used to represent the value network; Used to represent the current state of the value network. The output value; Used to represent the value network's next state. Output value.
[0271] Step S3034: Perform a soft update on the value network parameters;
[0272] ;
[0273] in, Used to represent a value network, where V is the value network parameter. This is the soft update coefficient, typically set to 0.005, to reduce training fluctuations.
[0274] Step S304: Determine whether the convergence condition is met. If it is met, end the training and determine the PPO algorithm at the convergence point as the condensate dynamic regulation strategy network.
[0275] Step 4: Deploy the trained strategy neural network (i.e., the aforementioned condensate dynamic adjustment strategy network) in the air conditioning control system (i.e., the air conditioning condensate dynamic adjustment system) to dynamically adjust the amount of condensate generated in real time. The deployment phase involves real-time closed-loop control of the air conditioning system, as follows: Figure 4 As shown, the specific steps are as follows:
[0276] Step S401: Deploy the trained policy network program on the control terminal and set a timer on the control terminal;
[0277] Step S402: At the same time interval (5 minutes), use sensors to acquire information such as indoor temperature and humidity, and the depth of water accumulation in the air conditioner in real time;
[0278] Step S403, transfer the state variables The input is fed into the policy network to obtain the output action. ;
[0279] Step S404: The system automatically performs constraint verification. If the constraints are met, step S405 is executed; if the constraints are not met, the action is adjusted to the boundary values (e.g., compressor power = 50%, fan speed = 30%), and then step 403 is executed again.
[0280] Step S405: Output control commands (i.e., target operating state) based on PWM control technology (Pulse Width Modulation).
[0281] Optionally, control commands can be sent to the air conditioner via the air conditioning control system communication module (such as infrared transmission or Wi-Fi protocol) to adjust the compressor power and fan speed in real time, dynamically optimize condensate production, ensure that the water depth is always below the critical threshold of 0.5cm, and simultaneously ensure that indoor temperature fluctuations are ≤0.5cm. The wind speed is gentle, meeting the human body's comfort requirements.
[0282] Step S406, Status Update: Update the water depth and status (including temperature and humidity), and continue with step S401.
[0283] The actual effect of the air conditioner control method of the present invention will be illustrated below with an example.
[0284] I. Experimental Scenario Setting:
[0285] Environment: Using a simulated environment, the initial indoor humidity can be set to 70%, temperature to 25.0℃, and water depth to 0.2cm; the humidity suddenly increases to 85% within 10 minutes (simulating rainy / high humidity weather).
[0286] II. Comparison of Schemes:
[0287] The solution in this invention is a solution for dynamically adjusting condensate based on the PPO algorithm.
[0288] Traditional solution: fixed drainage cycle (drainage once per hour, power / fan fixed at 50% / 30%).
[0289] Evaluation indicators: water depth (cm), temperature fluctuation (T-25℃) |), the rate of water depth compliance (the percentage of water depths less than 0.5cm).
[0290] III. Experimental data and results are shown in Table 1 below (time interval: 5 minutes / time, 20 minutes in total).
[0291]
[0292] Table 1
[0293] As shown in Table 1, in scenarios of sudden increases in humidity, the system of this invention automatically adjusts the compressor power and fan speed to keep the water depth stable below the safe threshold, while controlling indoor temperature fluctuations within a comfortable range. Traditional solutions using fixed threshold control lead to decreased cooling efficiency and frequent water accumulation problems. This invention effectively balances equipment reliability with user comfort.
[0294] This invention dynamically adjusts the amount of condensate produced (without forced power reduction) to precisely prevent water accumulation while ensuring comfort, achieving a dual guarantee of prevention and control effectiveness and user experience.
[0295] Through the embodiments of this invention, by constructing a state space that includes indoor relative humidity, temperature, historical water depth, and door and window status, the control system can comprehensively perceive environmental changes. Based on a deep reinforcement learning agent (i.e., an air conditioning condensate dynamic adjustment system), it can dynamically generate adjustment actions for compressor power and fan speed to achieve real-time optimization of condensate volume. By keeping the water depth below 0.5 cm, the risk of mosquito egg breeding is effectively avoided. At the same time, by strictly controlling indoor temperature fluctuations to not exceed ±0.5°C, user comfort is significantly improved. This achieves multi-objective collaborative control of condensate management and user comfort, enhancing the intelligence level and overall performance of the air conditioning system.
[0296] This invention provides a control device for an air conditioner, such as... Figure 5 As shown, the device 50 includes an acquisition unit 501 and a control unit 502, wherein: the acquisition unit 501 is used to acquire environmental state information, including the temperature value, humidity value, door and window status value of the current environment where the air conditioner is located, and the water depth value of the condensate produced by the air conditioner; the control unit 502 is used to input the environmental state information into a pre-trained condensate dynamic adjustment strategy network, so that the condensate dynamic adjustment strategy network determines the target operating state of the air conditioner according to the environmental state information, wherein the target operating state is used to control the water depth of the condensate produced by the air conditioner to be within a preset water depth threshold, and to control the temperature change of the current environment where the air conditioner is located to be within a preset range; the control unit 502 is also used to control the air conditioner to operate according to the target operating state.
[0297] In one optional embodiment, the target operating state of the air conditioner includes: the compressor power of the air conditioner, and / or the fan speed of the air conditioner. The control unit 502 is specifically used to: determine the compressor power of the air conditioner, and / or determine the fan speed of the air conditioner.
[0298] In an optional embodiment, the condensate dynamic regulation strategy network is obtained by training an initial proximal strategy optimization network in the following manner: determining the objective function, constraints, state space, action space, and reward function of the initial proximal strategy optimization network, wherein the objective function is used to define the goal to be achieved by training the initial proximal strategy optimization network, the constraints are used to constrain the temperature change of the current environment of the air conditioner within a preset range, the state space is used to define the set of environmental parameters, the action space is the set of executable control actions, and the reward function is used to represent the immediate benefit obtained under a specified action; training the initial proximal strategy optimization network and updating the initial proximal strategy optimization network through the advantage function and the pruning loss function until the convergence condition is met, and using the converged proximal strategy optimization network as the condensate dynamic regulation strategy network.
[0299] In an optional embodiment, the objective function and constraints of the initial proximal policy optimization network are determined by the following formula, wherein:
[0300] The objective function is:
[0301] ;
[0302] in, Indicates the expected value. As a discount factor, For the reward function;
[0303] The constraints are:
[0304] ;
[0305] in, These are constraints, used to represent the constraint mechanism of the action space;
[0306] 'a' is used to indicate an action. Used to indicate compressor power. To set the minimum compressor power corresponding to the set temperature value, The maximum compressor power corresponding to the set temperature value is defined by `fan`, where `f1` represents the minimum fan speed corresponding to the set temperature value, and `f2` represents the maximum fan speed corresponding to the set temperature value.
[0307] In an optional embodiment, the state space, action space, and reward function of the initial proximal policy optimization network are determined by the following formulas, wherein:
[0308] The state space is:
[0309] ;
[0310] in, Used to indicate the current environmental state. Used to indicate indoor relative humidity, it is divided into three levels: low, medium, and high. Used to indicate indoor temperature, it is divided into three levels: low, medium, and high. Used to indicate historical water depth, it is divided into three levels: low, medium, and high. Used to indicate the status of doors and windows;
[0311] The state transition process corresponding to the state space is represented as follows:
[0312] ;
[0313] in, Used to indicate the state of the environment at the next moment. For system dynamic functions, To indicate the action being performed, This refers to environmental disturbances, which include changes in the status of doors and windows.
[0314] The parameters of the action space are calculated as follows:
[0315] ;
[0316] ;
[0317] in, Used to indicate the target power of the compressor Used to indicate the current power of the compressor. Used to indicate the amount of compressor power adjustment. Corresponding to the first step method; Used to indicate target power at fan speed Used to indicate the current power of the fan speed. Used to indicate the amount of fan speed adjustment. Corresponding to the second step method;
[0318] The reward function is:
[0319] ;
[0320] ;
[0321] ;
[0322] in, Used to represent the reward function This is indicated as a reward based on the depth of accumulated water. These are the weighting coefficients. Q is the predicted water depth, and Q is a set value related to the preset water depth threshold. Q is less than the preset water depth threshold. This is represented as a comfort reward. is the weighting coefficient, and T is the set temperature value.
[0323] In one optional embodiment, an initial proximal policy optimization network is trained and updated using an advantage function and a pruning loss function until a convergence condition is met. The converged proximal policy optimization network is then used as the dynamic regulation policy network for condensate. This includes: initializing the policy network, value network, and experience buffer in the initial proximal policy optimization network; repeating the following steps until the convergence condition is met; obtaining the current environment state and inputting it into the policy network, wherein the current environment state is obtained from a pre-constructed state space; outputting an action through the policy network under the condition of satisfying constraints; executing the action through the policy network and determining the reward based on the obtained environment state at the next time step. The reward function value is calculated, where the difference between the acquisition time of the next environmental state and the current environmental state is a preset time interval. The current environmental state, action, reward function value, and next environmental state are stored as an experience sample in the experience buffer pool. An experience sample set is extracted from the experience buffer pool according to a preset sampling method. The advantage function and pruning loss function are determined based on the experience sample set, and the mean squared error loss function of the value network is determined based on the advantage function and pruning loss function. The policy network and value network are updated based on the mean squared error loss function. After completing the network update for the current training round, it is determined whether the convergence condition is met. If it is met, the training ends, and the proximal policy optimization network at the time of convergence is used as the dynamic adjustment policy network for condensate.
[0324] In an optional embodiment, the convergence condition includes: while the number of consecutive training rounds meets a preset number of rounds, the following requirements are also met simultaneously: the cumulative reward standard deviation is less than or equal to a first preset threshold, wherein the cumulative reward standard deviation is determined by the reward function value obtained in each training round after the preset number of consecutive training rounds; the water depth compliance rate is greater than or equal to a second preset threshold, wherein the water depth compliance rate is determined by the water depth value obtained in each training round after the preset number of consecutive training rounds; and the temperature fluctuation exceedance rate is less than or equal to a third preset threshold, wherein the temperature fluctuation exceedance rate is determined by the temperature value obtained in each training round after the preset number of consecutive training rounds.
[0325] Through this invention, on the one hand, the depth of condensate water accumulation can be effectively controlled within a preset water depth threshold; on the other hand, temperature fluctuations can be effectively constrained within a preset range, significantly improving user comfort. This invention achieves multi-objective coordinated control of condensate water management and user comfort, thereby enhancing the intelligence level and overall performance of the air conditioning system.
[0326] Since the processing and functions implemented by the device in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned methods, any details not covered in the description of this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.
[0327] The present invention provides an air conditioner control device corresponding to an air conditioner control method, comprising: a processor and a memory interconnected thereto; the memory stores machine-readable instructions executable by the processor, and the processor executes the machine-readable instructions to perform the method provided in any possible implementation of the air conditioner control method described above.
[0328] Since the processing and functions implemented by the air conditioner control device in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned methods, any details not covered in this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.
[0329] The present invention provides an air conditioner corresponding to the control method of an air conditioner, the air conditioner including the control device of the above-mentioned air conditioner.
[0330] Since the processing and functions implemented by the air conditioner in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned device, any details not covered in the description of this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.
[0331] The present invention provides a storage medium corresponding to an air conditioner control method, the storage medium including a stored program, wherein, when the program is running, the device where the storage medium is located executes the above-mentioned air conditioner control method.
[0332] Since the processing and functions implemented by the storage medium in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned methods, any details not covered in this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.
[0333] The present invention provides a computer program product corresponding to an air conditioner control method. The computer program product includes a computer program that, when processed and executed, implements the steps of the air conditioner control method described above.
[0334] Since the processing and functions implemented by the computer program product in this embodiment are basically corresponding to the embodiments, principles and examples of the aforementioned methods, any details not covered in the description of this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.
[0335] In summary, it is readily understood by those skilled in the art that, without conflict, the technical features of the aforementioned advantageous methods can be freely combined and superimposed.
[0336] The above are merely embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of the claims of the present invention.
Claims
1. A method for controlling an air conditioner, characterized in that, The method includes: Obtain environmental status information, including the temperature, humidity, and door and window status of the current environment where the air conditioner is located, as well as the depth of condensate water generated by the air conditioner. The environmental state information is input into a pre-trained dynamic condensate water regulation strategy network so that the dynamic condensate water regulation strategy network determines the target operating state of the air conditioner based on the environmental state information. The target operating state is used to control the condensate water accumulation depth generated by the air conditioner within a preset water accumulation depth threshold and to control the temperature change of the environment in which the air conditioner is currently located within a preset range. Control the air conditioner to operate according to the target operating state.
2. The control method according to claim 1, characterized in that, The target operating state of the air conditioner includes: the compressor power of the air conditioner, and / or the fan speed of the air conditioner; Determining the target operating state of the air conditioner includes: Determine the compressor power of the air conditioner, and / or determine the fan speed of the air conditioner.
3. The control method according to claim 1 or 2, characterized in that, The condensate dynamic regulation strategy network was obtained by training the initial proximal strategy optimization network in the following manner: The objective function, constraints, state space, action space, and reward function of the initial proximal policy optimization network are determined. The objective function is used to define the goal to be achieved by training the initial proximal policy optimization network. The constraints are used to constrain the temperature change of the current environment of the air conditioner within a preset range. The state space is used to define the set of environmental parameters. The action space is a set of executable control actions. The reward function is used to represent the immediate benefit obtained under a specified action. The initial proximal policy optimization network is trained and updated using the advantage function and pruning loss function until the convergence condition is met. The converged proximal policy optimization network is then used as the dynamic regulation strategy network for condensate.
4. The control method according to claim 3, characterized in that, Determine the objective function and constraints of the initial proximal policy optimization network, including: The objective function and constraints of the initial proximal policy optimization network are determined by the following formula, where: The objective function is: ; in, Indicates the expected value. As a discount factor, For the reward function; The constraints are as follows: ; in, The constraints are used to represent the constraint mechanism of the action space; 'a' is used to indicate an action. Used to indicate compressor power. To set the minimum compressor power corresponding to the set temperature value, The maximum compressor power corresponding to the set temperature value is defined by `fan`, where `f1` represents the minimum fan speed corresponding to the set temperature value, and `f2` represents the maximum fan speed corresponding to the set temperature value.
5. The control method according to claim 3, characterized in that, Determine the state space, action space, and reward function of the initial proximal policy optimization network, including: The state space, action space, and reward function of the initial proximal policy optimization network are determined by the following formulas, where: The state space is as follows: ; in, Used to indicate the current environmental state. Used to indicate indoor relative humidity, it is divided into three levels: low, medium, and high. Used to indicate indoor temperature, it is divided into three levels: low, medium, and high. Used to indicate historical water depth, it is divided into three levels: low, medium, and high. Used to indicate the status of doors and windows; The state transition process corresponding to the state space is represented as follows: ; in, Used to indicate the state of the environment at the next moment. For system dynamic functions, To indicate the action being performed, This refers to environmental disturbances, which include changes in the status of doors and windows. The parameters of the action space are calculated as follows: ; ; in, Used to indicate the target power of the compressor Used to indicate the current power of the compressor. Used to indicate the amount of compressor power adjustment. Corresponding to the first step method; Used to indicate target power at fan speed Used to indicate the current power of the fan speed. Used to indicate the amount of fan speed adjustment. Corresponding to the second step method; The reward function is: ; ; ; in, Used to represent the reward function This is indicated as a reward based on the depth of accumulated water. These are the weighting coefficients. The predicted water depth is Q, which is a set value related to the preset water depth threshold. Q is less than the preset water depth threshold. This is represented as a comfort reward. is the weighting coefficient, and T is the set temperature value.
6. The control method according to claim 3, characterized in that, The process of training the initial proximal policy optimization network and updating it using the advantage function and pruning loss function until convergence is met, and then using the converged proximal policy optimization network as the condensate dynamic regulation strategy network, includes: Initialize the policy network, value network, and experience buffer in the initial proximal policy optimization network; Repeat the following steps until the convergence condition is met; Obtain the current environment state and input the current environment state into the policy network, wherein the current environment state is obtained from a pre-constructed state space; The policy network outputs an action when the constraints are met. The action is executed through the policy network, and the reward function value is determined based on the obtained next-time environmental state, wherein the difference between the acquisition time of the next-time environmental state and the acquisition time of the current environmental state is the preset time interval. The current environment state, the action, the reward function value, and the environment state at the next moment are stored as an experience sample in the experience buffer pool. According to the preset sampling method, an experience sample set is extracted from the experience buffer pool; The advantage function and the pruning loss function are determined based on the empirical sample set, and the mean squared error loss function of the value network is determined based on the advantage function and the pruning loss function. The policy network and the value network are updated based on the mean squared error loss function. After completing the network update for the current training round, determine whether the convergence condition is met. If it is met, the training ends, and the near-end policy optimization network at the time of convergence is used as the dynamic regulation strategy network for condensate.
7. The control method according to claim 6, characterized in that, The convergence conditions include: Provided that the number of consecutive training rounds meets the preset number of rounds, the following requirements are also met: The cumulative reward standard deviation is less than or equal to a first preset threshold, wherein the cumulative reward standard deviation is determined by the reward function value obtained in each training round after a preset number of consecutive training rounds; The water depth compliance rate is greater than or equal to the second preset threshold, wherein the water depth compliance rate is determined by the water depth value obtained in each training round after a preset number of consecutive training rounds; The temperature fluctuation exceeding the standard rate is less than or equal to a third preset threshold, wherein the temperature fluctuation exceeding the standard rate is determined by the temperature value obtained in each training round after a preset number of consecutive training rounds.
8. A control device for an air conditioner, characterized in that, include: The acquisition unit is used to acquire environmental status information, wherein the environmental status information includes the temperature value, humidity value, door and window status value of the current environment where the air conditioner is located, and the water depth value of the condensate water generated by the air conditioner. The control unit is used to input the environmental state information into a pre-trained condensate dynamic adjustment strategy network, so that the condensate dynamic adjustment strategy network determines the target operating state of the air conditioner based on the environmental state information. The target operating state is used to control the condensate water accumulation depth generated by the air conditioner within a preset water accumulation depth threshold, and to control the temperature change of the environment in which the air conditioner is currently located within a preset range. The control unit is also used to control the air conditioner to operate according to the target operating state.
9. A control device for an air conditioner, characterized in that, include: A processor and a memory are interconnected; the memory stores machine-readable instructions executable by the processor, and the processor executes the machine-readable instructions to implement the air conditioning control method as described in any one of claims 1 to 7.
10. An air conditioner, characterized in that, include: The air conditioning control device as described in claim 9.
11. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, the device containing the storage medium is controlled to perform the air conditioning control method according to any one of claims 1 to 7.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the air conditioning control method according to any one of claims 1 to 7.