Method and apparatus for controlling compressor, air conditioner, and computer-readable storage medium
By combining prior and posterior control models, the frequency control of the air conditioner compressor is optimized, solving the problems of slow temperature control response and poor tracking performance of traditional air conditioners, and achieving faster and more accurate temperature regulation.
Patent Information
- Application Number
- PCT/CN2025/094289
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-30
- Filing Date
- 2025-05-12
- Publication Date
- 2025-12-04
AI Technical Summary
In traditional air conditioning temperature control strategies, PID controllers suffer from slow response and poor temperature regulation when adjusting the set temperature, especially with large error jumps when the set temperature changes, resulting in untimely temperature control response.
By combining the prior control model and the posterior control model, the prior control model makes predictions based on historical data, while the posterior control model uses the PID algorithm for error feedback. The target control frequency is determined by combining the prior and posterior control frequencies and optimizing the compressor frequency control by adjusting the weights of the prior and posterior control frequencies.
It improves the response speed and tracking accuracy of air conditioning temperature control, reduces frequency adjustment jumps, optimizes the user experience, and ensures that the ambient temperature quickly reaches the set temperature.
Smart Images

Figure CN2025094289_04122025_PF_FP_ABST
Abstract
Description
Compressor control method, device, air conditioner, and computer-readable storage medium
[0001] Related applications
[0002] This application claims priority to Chinese patent application No. 202410692604.0, filed on May 30, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of compressor technology, and in particular to a compressor control method, device, air conditioner, and computer-readable storage medium. Background Technology
[0004] In the process of controlling ambient temperature through air conditioning, control commands regarding the compressor frequency are typically issued in real time based on information such as the current ambient temperature and operating conditions, combined with a PID (Proportion-Integral-Derivative) control algorithm. However, this control method is prone to certain errors in actual control scenarios. When the user adjusts the set temperature, the error between the actual ambient temperature and the set temperature can fluctuate to varying degrees. The PID controller needs to wait for the error to occur before gradually adjusting the compressor frequency to reduce the error, resulting in a slow response to indoor temperature adjustment and poor temperature regulation tracking. Summary of the Invention
[0005] The main objective of this application is to provide a compressor control method, device, air conditioner, and computer-readable storage medium, which aims to solve the technical problem of poor temperature control performance in traditional temperature control strategies.
[0006] To achieve the above objectives, this application provides a compressor control method, which includes:
[0007] The current environmental information, current operating condition information, and current setting information are input into the preset prior control model. The prior control frequency is predicted by the prior control model. The prior control model is trained by historical environmental information, historical operating condition information, and historical setting information.
[0008] The current environmental information, current operating condition information, and current setting information are input into the preset posterior control model. The posterior control frequency is determined through the posterior control model, which is constructed based on the PID algorithm.
[0009] The target control frequency is determined based on the prior control frequency and the posterior control frequency, wherein the prior control frequency and the posterior control frequency are acquired once every preset period within a preset time.
[0010] The compressor operation is controlled based on the target control frequency.
[0011] In some embodiments, the step of determining the target control frequency based on the prior control frequency and the posterior control frequency includes:
[0012] The target control frequency is adjusted based on the values of the prior control frequency and the posterior control frequency, wherein the value of the target control frequency changes from the value of the prior control frequency to the value of the posterior control frequency within a preset time period.
[0013] In some embodiments, the preset duration includes multiple cycles;
[0014] The steps for adjusting the target control frequency based on the prior and posterior control frequencies include:
[0015] Based on the cycle number of the current cycle within the preset duration, determine the prior weight and posterior weight corresponding to the current cycle;
[0016] The target control frequency for the current period is calculated based on the prior control frequency and its weight in the current period, and the posterior control frequency and its weight in the current period.
[0017] In some embodiments, the step of determining the prior weight and posterior weight corresponding to the current period based on the period number within a preset duration includes:
[0018] Based on the preset mapping table between period number and weight, query the prior weight and posterior weight corresponding to the current period;
[0019] Among them, the prior weight is inversely proportional to the period number, the posterior weight is directly proportional to the period number, and the sum of the prior weight and the posterior weight is 1.
[0020] In some embodiments, before the step of inputting current environmental information, current operating condition information, and current setting information into a preset a priori control model, the method further includes:
[0021] Collect historical environmental information, historical operating condition information, and historical setting information to obtain multiple training data;
[0022] Based on the training data, a priori control model is generated. The independent variables of the priori control model include at least environmental information, operating condition information, and setting information, while the dependent variable includes compressor frequency.
[0023] In some embodiments, before the step of inputting current environmental information, current operating condition information, and current setting information into a preset posterior control model, the method further includes:
[0024] Collect historical environmental information, historical operating condition information, and historical setting information;
[0025] The PID control parameters are determined based on historical environmental information, historical operating condition information, and historical setting information, and a posterior control model is constructed based on the PID control parameters.
[0026] In some embodiments, the compressor control method further includes:
[0027] When a change in the set temperature in the setting information is detected, the following steps are executed: input the current environmental information, current operating condition information and current setting information into the preset prior control model, predict the prior control frequency through the prior control model, until the target control frequency is obtained and the compressor is controlled to run at the target control frequency;
[0028] After the compressor has been controlled to run for a preset time by the target control frequency, the temperature regulation is determined to be successful, and the compressor is controlled to run according to the posterior control frequency output in real time by the posterior control model.
[0029] In addition, to achieve the above objectives, this application also provides a compressor control device, the device comprising:
[0030] The prior prediction module is used to input the current environmental information, current operating condition information and current setting information into the preset prior control model, and predict the prior control frequency through the prior control model. The prior control model is trained by historical environmental information, historical operating condition information and historical setting information.
[0031] The posterior determination module is used to input the current environmental information, current operating condition information and current setting information into a preset posterior control model, and determine the posterior control frequency through the posterior control model. The posterior control model is constructed based on the PID algorithm.
[0032] The frequency determination module is used to determine the target control frequency based on the prior control frequency and the posterior control frequency.
[0033] The control operation module is used to control the operation of the compressor based on the target control frequency, wherein the prior control frequency and the posterior control frequency are acquired once every preset period within a preset time.
[0034] In addition, to achieve the above objectives, this application also provides an air conditioner, which is a physical device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the steps of the compressor control method described above.
[0035] In addition, to achieve the above objectives, this application also provides a readable storage medium, which is a computer-readable storage medium storing a program that implements the compressor control method. The program that implements the compressor control method is executed by a processor to implement the steps of the compressor control method as described above.
[0036] In addition, to achieve the above objectives, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the compressor control method described above. Attached Figure Description
[0037] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0038] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0039] Figure 1 is a flowchart illustrating an embodiment of the compressor control method in this application.
[0040] Figure 2 is a schematic diagram of determining the target control frequency through prior control frequency and posterior control frequency in each cycle in the embodiments of this application;
[0041] Figure 3 is a schematic diagram of the entire process of a compressor control method in an embodiment of this application;
[0042] Figure 4 is a schematic diagram of the structural composition of a compressor control device in an embodiment of this application;
[0043] Figure 5 is a schematic diagram of the equipment structure of the hardware operating environment involved in the compressor control method in the embodiments of this application;
[0044] Figure 6 is a flowchart illustrating an embodiment of the compressor control method in this example.
[0045] Figure 7 is a flowchart illustrating an embodiment of the compressor control method in this study.
[0046] Figure 8 is a flowchart illustrating an embodiment of the compressor control method in this example.
[0047] Figure 9 is a flowchart illustrating an embodiment of the compressor control method.
[0048] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Embodiments of the present invention
[0049] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0050] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0051] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0052] The executing entity of the compressor control method embodiments of this application can be a computing service device with data processing, network communication, and program execution functions, such as an air conditioner controller, or an electronic device or control device capable of realizing the above functions. The following embodiments will be described using an air conditioner controller as an example.
[0053] Currently, the control of air conditioning compressors often employs a combination of PID and fuzzy rule control algorithms. This approach uses both PID and fuzzy controllers to control the compressor, but it has several drawbacks: First, it suffers from poor control tracking. In fuzzy rule control, the fuzzification process maps the values of input variables to a fuzzy set, increasing the granularity of input variable control. However, this process also loses some important input variable information, leading to insufficient response of the control system to certain changes and poor control tracking. Second, it suffers from slow control response. The core principle of traditional PID controllers is "to eliminate errors through error feedback." However, this method of directly adjusting the frequency based on the error between the set temperature and the actual ambient temperature has limitations. When the user sets a new set temperature, the error can fluctuate to varying degrees. The PID controller needs to wait for the error to occur and gradually change the frequency over a period of time, resulting in a slow temperature control response.
[0054] To overcome the technical problems and defects existing in the related technologies, this application provides a compressor control method. Referring to Figure 1, which is a flowchart of an embodiment of the compressor control method of this application, the compressor control method includes:
[0055] Step S10: Input the current environmental information, current operating condition information and current setting information into the preset prior control model, and predict the prior control frequency through the prior control model. The prior control model is trained by historical environmental information, historical operating condition information and historical setting information.
[0056] It should be noted that after the air conditioner is turned on, and the user sets a default temperature or inputs a new temperature setting, the compressor's operating frequency needs to be adjusted to ensure the ambient temperature reaches the set temperature as quickly as possible. In the technical solution of this application embodiment, the required control frequency is first predicted based on a priori estimation control model. Specifically, this requires parameters such as current environmental information, current operating condition information, and current setting information. Environmental information may include temperature, wind speed, and humidity; operating condition information may include parameters characterizing the air conditioner's operating state, such as start-up time, operating frequency, and current wind speed; and setting information may include the user's set temperature, set wind speed, and control model parameters. It can be understood that the priori control frequency predicted by the priori control model refers to the optimal compressor operating frequency, based on historical operating data, to ensure the ambient temperature (indoor environment) reaches the set temperature as quickly as possible under the current conditions. The priori control model is trained using historical environmental information, historical operating condition information, and historical setting information, learning the correlation and inherent patterns between environmental information, public information, setting information, and the optimal control frequency in historical operating data.
[0057] Step S20: Input the current environmental information, current operating condition information and current setting information into the preset posterior control model, and determine the posterior control frequency through the posterior control model. The posterior control model is constructed based on the PID algorithm.
[0058] This application embodiment also incorporates a posterior control model built based on a PID algorithm to perform posterior estimation of the current control frequency. This posterior control model can be constructed using error feedback algorithms such as the PID algorithm. In this application embodiment, the system's output variable (indoor temperature) is observed and fed back using a posterior estimation method with reference to the set temperature, thereby adjusting and controlling the system's control variable (compressor frequency). Because in the adjustment and control of the compressor frequency, the longer the adjustment time, the higher the accuracy of the posterior control frequency output by the posterior control model. This application embodiment obtains the posterior control frequency simultaneously with the prior control frequency, which improves the accuracy of the final target control frequency, further enhancing temperature regulation efficiency and temperature control tracking performance.
[0059] Step S30: Determine the target control frequency based on the prior control frequency and the posterior control frequency, wherein the prior control frequency and the posterior control frequency are acquired once every preset period within a preset time.
[0060] Step S40: Control the compressor operation based on the target control frequency.
[0061] After obtaining the prior and posterior control frequencies, the control frequency values obtained from the two different estimation and prediction methods can be comprehensively considered to maximize the accuracy of the final target control frequency. Since the traditional posterior control frequency based on the PID control model requires a period of error feedback adjustment to obtain an accurate control frequency, and the initial control frequency adjustment involves large jumps and a long adjustment time, the shortcomings of the initial posterior control method can be compensated by using the prior control frequency obtained through empirical prediction based on historical operating data.
[0062] In some embodiments, after obtaining the new set temperature input by the user, steps S10 to S40 are executed multiple times within a preset time period. Each time step S30 is executed, the corresponding latest target control frequency is calculated using the newly obtained prior control frequency and posterior control frequency. The proportions of the prior control frequency and posterior control frequency are different each time the target control frequency is calculated.
[0063] After determining the target control frequency, the compressor can be controlled at that frequency, and the changes in the indoor ambient temperature can be monitored in real time to assess the temperature control effect. If the ambient temperature still does not reach the set temperature after the compressor has been running at the target control frequency for a certain period of time, steps S10 to S40 are executed again until the ambient temperature matches the set temperature.
[0064] In the technical solution of this application embodiment, when determining the control frequency of the compressor, a priori estimation is first performed based on the constructed prior control model. Historical operating data is used as prior knowledge to predict the control frequency, which can overcome the excessive jump in the traditional control frequency determination method based on error elimination to a certain extent and improve the temperature regulation response speed. Then, a posteriori estimation is performed through the posteriori control model constructed based on the PID algorithm, taking the error elimination factor into account in the final target control frequency determination. While overcoming the defect of excessive amplitude jump in the PID algorithm, the later advantage of the algorithm is utilized to further improve the prediction accuracy. The technical solution of this application embodiment combines the advantages of the prior estimation scheme and the posteriori estimation scheme respectively. It can reduce the jump amplitude of the control frequency while ensuring the prediction accuracy, and determine the target control frequency that can adjust the ambient temperature to the set temperature more quickly. Compared with the traditional temperature control strategy, it effectively improves the temperature regulation follow-up, making the temperature change more accurate after the user sets a new temperature, thus optimizing the user experience.
[0065] In some embodiments, the step of determining the target control frequency based on the prior control frequency and the posterior control frequency may include:
[0066] Step S31: Adjust the target control frequency according to the value of the prior control frequency and the value of the posterior control frequency, wherein the value of the target control frequency changes from the value of the prior control frequency to the value of the posterior control frequency within a preset time period.
[0067] In this application embodiment, a method for determining a target control frequency by taking the values of a priori control frequency and a posteriori control frequency is specifically disclosed. It can be understood that the target control frequency is determined by the a priori control frequency and the posteriori control frequency. By adjusting the proportion of the a priori control frequency and the posteriori control frequency in determining the target control frequency, the influence of the two on the final target control frequency is represented.
[0068] In some embodiments, at the beginning of the preset duration, the target control frequency is equal to the prior control frequency, and at the end of the preset duration, the target control frequency is equal to the posterior control frequency. Within the preset duration, the proportion of the posterior control frequency in the target control frequency increases over time. This is because, in traditional PID-based control algorithms, the frequency control command is typically issued based on the error between the real-time ambient temperature and the set temperature. In the early stages, overshooting is common, resulting in large frequency jumps. Iterative updates of the posterior control frequency are needed over a period to obtain a more accurate frequency control command. For the prior control frequency obtained from the prior control model proposed in this embodiment, its value is a reasonable prediction based on historical operating data. Its prediction accuracy does not change significantly throughout the preset duration. Compared to the posterior control frequency, the prior control frequency has higher accuracy in the early stages of the preset duration. After iterative optimization of the posterior control frequency using the PID algorithm over a period, the accuracy of the posterior control frequency is higher than that of the prior control frequency, and the accuracy increases with the length of time. Therefore, in this embodiment of the application, the value of the target control frequency changes from the value of the prior control frequency to the value of the a posteriori control frequency within a preset time period to ensure the accuracy of the target control frequency, so that the ambient temperature can reach the user-input set temperature more quickly, improve the temperature control tracking and response speed of the air conditioner, and optimize the user experience.
[0069] Furthermore, in some embodiments, the preset duration includes multiple cycles;
[0070] Referring to Figure 6, the steps for adjusting the target control frequency based on the prior and posterior control frequencies include:
[0071] Step S32: Determine the prior weight and posterior weight corresponding to the current period based on the period number of the current period within the preset duration.
[0072] Step S33: Calculate the target control frequency value for the current period based on the prior control frequency value and prior weight, the posterior control frequency value and posterior weight for the current period.
[0073] It should be noted that within the preset duration, steps S10 to S40 can be repeated multiple times according to preset cycles. That is, in each different cycle, the prior control model and the posterior control model obtain new prior control frequency and posterior control frequency based on the current environmental information, operating condition information and setting information, and then calculate the real-time minimum target control frequency.
[0074] In some embodiments, the preset duration can be set to 11 minutes, and the number of cycles can be set to 11, meaning each cycle lasts for 1 minute. Every minute, the latest environmental information, operating condition information, and setting information are acquired, and the corresponding prior control frequency and posterior control frequency are predicted by combining them with the prior and posterior control models. The cycle number of the current cycle can be one from 1 to 11. The larger the cycle number, the smaller the prior weight and the larger the posterior weight. For example, when the cycle number is 1, the prior weight is 1 and the posterior weight is 0; when the cycle number is 2, the prior weight is 0.9 and the posterior weight is 0.1, and so on, until the cycle number is 11, where the prior weight is 0 and the posterior weight is 1. The number of cycles and the difference in weight between each cycle can be set according to actual needs. The above values are only examples and do not constitute a limitation on the technical solution of the embodiments of this application.
[0075] In some embodiments, referring to FIG2, the target control frequencies are P1, P2 up to P11 in different periods, the prior control frequencies are Pf1, Pf2 up to Pf11, the posterior control frequencies are Pg1, Pg2 up to Pg11, the prior weights are rf1, rf2 up to rf11, and the posterior weights are rg1, rg2 up to rg11. When calculating the target control frequency for the current period, the product of the prior control frequency and the prior weight in the current period, and the product of the posterior control frequency and the posterior weight in the current period are calculated respectively. Finally, the sum of the two products is calculated to obtain the target control frequency.
[0076] Furthermore, in some embodiments, the step of determining the prior weight and posterior weight corresponding to the current period based on the period number within a preset duration of the current period may include:
[0077] Based on the preset mapping table between period number and weight, query the prior weight and posterior weight corresponding to the current period;
[0078] Among them, the prior weight is inversely proportional to the period number, the posterior weight is directly proportional to the period number, and the sum of the prior weight and the posterior weight is 1.
[0079] In this embodiment of the application, the prior weight and posterior weight of each period can be determined by a pre-set mapping table.
[0080] In some embodiments, when the number of periods is 11, the prior weights rf in each period are 1, 0.9, 0.8, ..., 0.1, 0, and the corresponding posterior weights are 0, 0.1, 0.2, ..., 0.9, 1.0, respectively. The mapping relationship is shown in Table 1 below:
[0081] Periodic number 1 2 3 4 5 6 7 8 9 10 11 Prior weight 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.10 Posterior weight 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.91
[0082] Table 1
[0083] As shown in the table above, the prior weight gradually decreases until it reaches 0 over time, while the posterior weight gradually increases until it reaches 1 over time. Therefore, the technical solution of this application embodiment realizes the migration of the target control frequency from the prior control frequency to the posterior control frequency by controlling the change of the weight. It fully combines the advantages and disadvantages of the prior control frequency and the posterior control frequency, and refines the determination method of the target control frequency in each cycle of the preset duration, so that the value of the target control frequency in each cycle is as accurate as possible, so that the indoor ambient temperature can be adjusted to the set temperature more quickly, and meet the user's sensitive temperature control response requirements.
[0084] To better understand the compressor control method provided in this application, and in conjunction with the foregoing embodiments, referring to FIG3, the steps of the compressor control method may include: when the user adjusts the temperature (from Ts1 to Ts2), at each interval T, the corresponding prior control frequency Pf and posterior control frequency Pg are predicted by the prior control model f and posterior control model g, respectively, and a weight allocation is performed within the current period (rf, rg, representing the prior weight and posterior weight, respectively). Then, the target control frequency P is calculated according to the formula P=(rf×Pf)+(rg×Pg), and finally, the compressor is controlled to run according to the target control frequency P.
[0085] Referring to Figure 7, in some embodiments, before the step of inputting the current environmental information, current operating condition information, and current setting information into a preset priori control model, the method may further include:
[0086] Step A10: Collect historical environmental information, historical operating condition information, and historical setting information to obtain multiple training data.
[0087] Step A20: Based on the training data, train and generate a priori control model. The independent variables of the priori control model include at least environmental information, operating condition information, and setting information, and the dependent variable includes compressor frequency.
[0088] This application embodiment also provides a method for training a priori control model using historical operating data. First, historical operating data is collected periodically, including environmental information (such as outdoor temperature, indoor temperature, etc.), operating condition information (including parameters characterizing the compressor's operating status such as start-up time, operating frequency, etc.), and setting information (such as set temperature, set mode, set fan speed, etc.). Before constructing training data using the historical operating data, the original data can be preprocessed, such as removing abnormal data, blank values, and normalizing. The training data can include parameters of various dimensions, or combinations of two or more parameters as features, thereby forming a priori database. The priori database includes multiple training data.
[0089] In training the prior control model, prior estimation model training methods can be applied. During training, the model combines prior knowledge with information from the data (likelihood) to achieve more accurate estimation of unknown parameters or variables. Specifically, in constructing the model architecture of the prior control model, algorithms including but not limited to statistical methods, linear regression, decision trees, and neural network training can be used to model the relationship between independent variables (environmental information, operating condition information, and setting information, etc.) and the dependent variable (compressor operating frequency). This constructs the architecture of the prior control model. The prior control model is then trained using training data from a prior database, iteratively optimizing the model parameters. After a preset number of training iterations, the model's performance (including prediction accuracy and stability) is evaluated. Training stops when the model performance meets preset conditions, resulting in a completed prior control model. These preset conditions may include prediction accuracy and model loss convergence, which are not limited here. The role of the prior control model is to predict the compressor operating frequency that will allow the ambient temperature to reach the set temperature as quickly as possible based on the input dependent variable.
[0090] In some embodiments, the air conditioner runs for a total of 60 minutes, comprising 60 cycles (each cycle being 1 minute).
[0091] Collect data for each cycle and extract the corresponding features, such as: in the 5th cycle, set temperature Ts=26, time t=60, compressor frequency P=35, compressor exhaust temperature sensor temperature T4=30, etc.
[0092] Each period, as a training data point, includes at least independent and dependent variables;
[0093] Using a prior estimation algorithm, a prior control model f is trained, with the expression: ,in, is the a priori control frequency, and i is the period number.
[0094] Referring to Figure 8, in some embodiments, before the step of inputting the current environmental information, current operating condition information, and current setting information into a preset posterior control model, the method may further include:
[0095] Step B10: Collect historical environmental information, historical operating condition information, and historical setting information;
[0096] Step B20: Determine the PID control parameters based on historical environmental information, historical operating condition information, and historical setting information, and construct a posterior control model based on the PID control parameters.
[0097] This application also provides a method for pre-constructing a posterior control model. It should be noted that the posterior control model is a model built based on existing PID control algorithms and the idea of error feedback elimination. It is mainly used to effectively predict the current control frequency based on currently collected environmental information, operating condition information, and setting information, thereby obtaining the posterior control frequency to minimize the error between the actual detected ambient temperature and the set temperature each time. Furthermore, based on the PID control algorithm, the performance of the posterior control model can be further improved by combining it with the MPC (Model Predictive Control) algorithm.
[0098] Taking the PID control model as an example, the process of determining the parameters of the PID control model and obtaining the posterior control model based on historical environmental information, historical operating condition information, and historical setting information can include: First, data collection and preprocessing are performed, collecting historical data to ensure that the data covers the operating status of the air conditioning system under different operating conditions, including inputs (control variables), outputs (controlled variables), and external disturbances that may affect the system behavior; then, data cleaning is performed, removing outliers, filling in missing values, and performing necessary smoothing to ensure data quality; next, time series analysis is performed to analyze the time correlation of the data and identify trends, periodicities, or seasonal changes; for PID control, the basic model used can be a first-order or second-order system with proportional, integral, and derivative components; parameter estimation is performed using system identification techniques, such as least squares, recursive least squares, and Kalman filtering, to fit the model parameters based on historical data, specifically by optimizing the error between the model's predicted values and the actual measured values to determine the PID parameters and obtain the posterior control model; finally, model verification is performed, applying the identified posterior control model to historical data that was not involved in the identification, evaluating the model's predictive ability, and ensuring the predictive accuracy and generalization ability of the obtained posterior control model.
[0099] In another embodiment, after obtaining the posterior control model, PID parameter tuning can be further performed. The steps include: in a simulation environment, using the PID parameters of the obtained posterior control model to simulate the control of the compressor, observing the system response, and further adjusting the PID parameters to optimize the system performance based on the simulation results. Further iterative adjustments may be performed, which may require multiple iterations. By comparing the system response under different parameter combinations, the optimal or suboptimal PID parameter set is found, and finally, a posterior control model with better performance, greater stability, and higher prediction accuracy is obtained.
[0100] Referring to Figure 9, in some embodiments, the compressor control method may further include:
[0101] Step S50: When a change in the set temperature in the setting information is detected, the following steps are executed: Input the current environmental information, current operating condition information and current setting information into the preset prior control model, predict the prior control frequency through the prior control model, until the target control frequency is obtained and the compressor is controlled to run at the target control frequency.
[0102] Step S60: After controlling the compressor to run for a preset time by the target control frequency, control the compressor to run according to the posterior control frequency output in real time by the posterior control model.
[0103] It is understood that the compressor control method in this application embodiment is mainly applied in scenarios where the user has input a new set temperature, requiring readjustment of the indoor ambient temperature. In this case, there is a significant temperature difference between the ambient and set temperatures, necessitating adjustment of the compressor's operating frequency to control the air conditioner's ability to regulate the ambient temperature. For example, if the initial set temperature of the air conditioner is 26℃ and the user inputs a new set temperature of 21℃, a 5℃ temperature difference requires further increasing the compressor's operating frequency to lower the ambient temperature further. If only a PID control algorithm is used to adjust the operating frequency, the initial operating frequency may be too high. After error feedback adjustment, the operating frequency may suddenly drop, resulting in fluctuating cold air temperatures and a prolonged time required to adjust the indoor temperature. This poor temperature control performance leads to a negative user experience. Applying the compressor control method in this application embodiment, by combining prior control frequencies based on historical experience with real-time a posteriori control frequencies, improves the stability and responsiveness of the compressor's operating frequency, allowing the indoor ambient temperature to smoothly and quickly reach the set temperature under the compressor's target control frequency.
[0104] In addition, after obtaining the target control frequency and running the compressor for a preset time, the posterior estimation method based on PID control has been adjusted for a relatively long time. Therefore, the accuracy of the posterior control frequency output by the posterior control model is already high. Thus, the posterior control frequency can be used to control the compressor operation, ensuring the stability of the indoor temperature regulation.
[0105] This application embodiment also provides a compressor control device. Referring to FIG4, the compressor control device includes:
[0106] The prior prediction module 10 is used to input the current environmental information, current operating condition information and current setting information into the preset prior control model, and predict the prior control frequency through the prior control model. The prior control model is trained by historical environmental information, historical operating condition information and historical setting information.
[0107] The posterior determination module 20 is used to input the current environmental information, current operating condition information and current setting information into a preset posterior control model, and determine the posterior control frequency through the posterior control model. The posterior control model is constructed based on the PID algorithm.
[0108] The frequency determination module 30 is used to determine the target control frequency based on the prior control frequency and the posterior control frequency, wherein the prior control frequency and the posterior control frequency are acquired once every preset period within a preset time.
[0109] The control operation module 40 is used to control the operation of the compressor based on the target control frequency.
[0110] In some embodiments, the frequency determination module 30 is further configured to:
[0111] The target control frequency is adjusted based on the values of the prior control frequency and the posterior control frequency, wherein the value of the target control frequency changes from the value of the prior control frequency to the value of the posterior control frequency within a preset time period.
[0112] In some embodiments, the preset duration includes multiple cycles;
[0113] The frequency determination module 30 is also used for:
[0114] Based on the cycle number of the current cycle within the preset duration, determine the prior weight and posterior weight corresponding to the current cycle;
[0115] The target control frequency for the current period is calculated based on the prior control frequency and its weight in the current period, and the posterior control frequency and its weight in the current period.
[0116] In some embodiments, the frequency determination module 30 is further configured to:
[0117] Based on the preset mapping table between period number and weight, query the prior weight and posterior weight corresponding to the current period;
[0118] Among them, the prior weight is inversely proportional to the period number, the posterior weight is directly proportional to the period number, and the sum of the prior weight and the posterior weight is 1.
[0119] In some embodiments, the compressor control device further includes a priori training module, which is used for:
[0120] Collect historical environmental information, historical operating condition information, and historical setting information to obtain multiple training data;
[0121] Based on the training data, a priori control model is generated. The independent variables of the priori control model include at least environmental information, operating condition information, and setting information, while the dependent variable includes compressor frequency.
[0122] In some embodiments, the compressor control device further includes a posterior training module, which is used for:
[0123] Collect historical environmental information, historical operating condition information, and historical setting information;
[0124] The PID control parameters are determined based on historical environmental information, historical operating condition information, and historical setting information, and a posterior control model is constructed based on the PID control parameters.
[0125] In some embodiments, the control operation module 40 is further configured to:
[0126] When a change in the set temperature in the setting information is detected, the following steps are executed: input the current environmental information, current operating condition information and current setting information into the preset prior control model, predict the prior control frequency through the prior control model, until the target control frequency is obtained and the compressor is controlled to run at the target control frequency;
[0127] After controlling the compressor to run for a preset time by the target control frequency, the compressor is controlled to run according to the posterior control frequency output in real time by the posterior control model.
[0128] The compressor control device provided in this application, employing the compressor control method described in the above embodiments, can solve the technical problem of excessively large fluctuations in control parameters in traditional air conditioning control methods. Compared with related technologies, the beneficial effects of the compressor control device provided in this application are the same as those of the compressor control method provided in the above embodiments, and other technical features in the compressor control device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0129] This application also provides an air conditioner, which includes at least: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the compressor control method in the first embodiment described above.
[0130] Referring now to Figure 5, a structural schematic diagram of an air conditioner suitable for implementing embodiments of this application is shown. The air conditioner shown in Figure 5 is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0131] As shown in Figure 5, the air conditioner may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the air conditioner. The processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 allows the air conditioner to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows an air conditioner with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.
[0132] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of embodiments of this application.
[0133] The air conditioner provided in this application, employing the compressor control method described in the above embodiments, can solve the technical problem of excessively large fluctuations in control parameters in traditional air conditioner control methods. Compared with related technologies, the beneficial effects of the air conditioner provided in this application are the same as those of the compressor control method provided in the above embodiments, and other technical features of this air conditioner are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0134] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.
[0135] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0136] This application also provides a computer-readable storage medium having computer-readable program instructions stored thereon, the computer-readable program instructions being used to execute the compressor control method in the first embodiment described above.
[0137] The computer-readable storage medium provided in this application embodiment may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0138] The aforementioned computer-readable storage medium may be included in the air conditioner; or it may exist independently and not be installed in the air conditioner.
[0139] The aforementioned computer-readable storage medium carries one or more programs. When the air conditioner executes these programs, the air conditioner: inputs current environmental information, current operating condition information, and current setting information into a preset prior control model, and predicts a prior control frequency using the prior control model, wherein the prior control model is trained from historical environmental information, historical operating condition information, and historical setting information; inputs current environmental information, current operating condition information, and current setting information into a preset posterior control model, and determines a posterior control frequency using the posterior control model, wherein the posterior control model is constructed based on a PID algorithm; determines a target control frequency based on the prior control frequency and the posterior control frequency, wherein the prior control frequency and the posterior control frequency are acquired once every preset period within a preset time duration; and controls the compressor to operate based on the target control frequency.
[0140] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0141] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0142] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0143] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions for executing the above-described compressor control method, thereby solving the technical problem of excessively large fluctuations in control parameters in traditional air conditioning control methods. Compared with related technologies, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the compressor control method provided in Embodiment 1 above, and will not be repeated here.
[0144] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the compressor control method described above.
[0145] The computer program product provided in this application can solve the technical problem of excessive fluctuations in control parameters in traditional air conditioning control methods. Compared with related technologies, the beneficial effects of the computer program product provided in this application are the same as those of the compressor control method provided in Embodiment 1 above, and will not be repeated here.
[0146] The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.
Claims
1. A compressor control method, wherein, The compressor control method includes: The current environmental information, current operating condition information, and current setting information are input into a preset prior control model. The prior control frequency is predicted by the prior control model. The prior control model is trained by historical environmental information, historical operating condition information, and historical setting information. The current environmental information, the current operating condition information, and the current setting information are input into a preset posterior control model, and the posterior control frequency is determined through the posterior control model, wherein the posterior control model is constructed based on the PID algorithm; The target control frequency is determined based on the prior control frequency and the posterior control frequency, wherein the prior control frequency and the posterior control frequency are acquired once every preset period within a preset time period; The compressor is controlled to operate based on the target control frequency.
2. The compressor control method as described in claim 1, wherein, The step of determining the target control frequency based on the prior control frequency and the posterior control frequency includes: The target control frequency is adjusted based on the values of the prior control frequency and the posterior control frequency, wherein the value of the target control frequency changes from the value of the prior control frequency to the value of the posterior control frequency within the preset time period.
3. The compressor control method as described in claim 2, wherein, The preset duration includes multiple cycles; The step of adjusting the value of the target control frequency based on the prior control frequency and the posterior control frequency includes: Based on the cycle number within the preset duration, determine the prior weight and posterior weight corresponding to the current cycle; Based on the value of the prior control frequency and its prior weight in the current period, and the value of the posterior control frequency and its posterior weight in the current period, the value of the target control frequency in the current period is calculated.
4. The compressor control method as described in claim 3, wherein, The step of determining the prior weight and posterior weight corresponding to the current period based on the period number within the preset duration includes: Based on the preset mapping table between period number and weight, query the prior weight and posterior weight corresponding to the current period; Wherein, the prior weight is inversely proportional to the period number, the posterior weight is directly proportional to the period number, and the sum of the prior weight and the posterior weight is 1.
5. The compressor control method according to any one of claims 1 to 4, wherein, Before the step of inputting the current environmental information, current operating condition information, and current setting information into a preset priori control model, the method further includes: Collect historical environmental information, historical operating condition information, and historical setting information to obtain multiple training data; Based on the training data, a priori control model is trained and generated. The independent variables of the priori control model include at least environmental information, operating condition information, and setting information, and the dependent variable includes compressor frequency.
6. The compressor control method according to any one of claims 1 to 5, wherein, Before the step of inputting the current environmental information, the current operating condition information, and the current setting information into a preset posterior control model, the method further includes: Collect historical environmental information, historical operating condition information, and historical setting information; The PID control parameters are determined based on the historical environmental information, the historical operating condition information, and the historical setting information, and a posterior control model is constructed based on the PID control parameters.
7. The compressor control method according to any one of claims 1 to 6, wherein, The compressor control method further includes: When a change in the set temperature in the setting information is detected, the following steps are executed: input the current environmental information, current operating condition information and current setting information into the preset prior control model, predict the prior control frequency through the prior control model, until the target control frequency is obtained and the compressor is controlled to run at the target control frequency; After controlling the compressor to run for the preset duration through the target control frequency, the compressor is controlled to run according to the posterior control frequency output in real time by the posterior control model.
8. A compressor control device, wherein, The compressor control device includes: The prior prediction module is used to input the current environmental information, current operating condition information and current setting information into a preset prior control model, and predict the prior control frequency through the prior control model. The prior control model is trained by historical environmental information, historical operating condition information and historical setting information. The posterior determination module is used to input the current environmental information, the current operating condition information, and the current setting information into a preset posterior control model, and determine the posterior control frequency through the posterior control model, wherein the posterior control model is constructed based on the PID algorithm; The frequency determination module is used to determine the target control frequency based on the prior control frequency and the posterior control frequency, wherein the prior control frequency and the posterior control frequency are acquired once every preset period within a preset time period; The control operation module is used to control the compressor operation based on the target control frequency.
9. An air conditioner, wherein, The air conditioner includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to cause the at least one processor to perform the steps of the compressor control method as described in any one of claims 1 to 7.
10. A readable storage medium, wherein, The readable storage medium is a computer-readable storage medium, on which a program implementing the compressor control method is stored, and the program implementing the compressor control method is executed by a processor to implement the steps of the compressor control method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Posterior control and multi-sensor infusion method and central conditioner energy-saving control device
CN101078913A
Operation frequency control method of air conditioner, air conditioner and storage medium
CN114110998A
Fan coil control system and method for deep reinforcement learning based on priori knowledge
CN116989384A
Compressor control method in air conditioning system
JP2912604B1