Compressor control method and device, 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. This achieves fast and accurate temperature adjustment and improves the user experience.
Patent Information
- Application Number
- CN202410692604.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2025-12-02
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.
A method combining prior and posterior control models is adopted. 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 two models. The compressor frequency control is optimized by periodically adjusting the weights of the prior and posterior control frequencies.
It improves the response speed and tracking accuracy of air conditioner temperature adjustment, reduces the amplitude of control frequency jumps, ensures that the temperature reaches the set value quickly and accurately, and enhances the user experience.
Smart Images

Figure CN121048261A_ABST
Abstract
Description
Technical Field
[0001] This invention 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
[0002] 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 and poor temperature regulation tracking for indoor temperature adjustment. Summary of the Invention
[0003] The main objective of this invention is to provide a compressor control method, device, air conditioner, and computer-readable storage medium, aiming to solve the technical problem of poor temperature control performance in traditional temperature control strategies.
[0004] To achieve the above objectives, the present invention provides a compressor control method, the compressor control method comprising:
[0005] 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.
[0006] 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;
[0007] 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;
[0008] The compressor is controlled to operate based on the target control frequency.
[0009] In one embodiment, the step of determining the target control frequency based on the prior control frequency and the posterior control frequency includes:
[0010] 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.
[0011] In one embodiment, the preset duration includes multiple cycles;
[0012] The step of adjusting the value of the target control frequency based on the prior control frequency and the posterior control frequency includes:
[0013] Based on the cycle number within the preset duration, determine the prior weight and posterior weight corresponding to the current cycle;
[0014] 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.
[0015] In one embodiment, the step of determining the prior weight and posterior weight corresponding to the current period based on the period number within the preset duration of the current period includes:
[0016] Based on the preset mapping table between period number and weight, query the prior weight and posterior weight corresponding to the current period;
[0017] 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.
[0018] In one embodiment, 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:
[0019] Collect historical environmental information, historical operating condition information, and historical setting information to obtain multiple training data;
[0020] 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.
[0021] In one embodiment, 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:
[0022] Collect historical environmental information, historical operating condition information, and historical setting information;
[0023] 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.
[0024] In one embodiment, the compressor control method further includes:
[0025] 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;
[0026] After the compressor has been controlled to run for the preset duration 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.
[0027] Furthermore, to achieve the above objectives, the present invention also provides a compressor control device, the device comprising:
[0028] 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.
[0029] 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;
[0030] A frequency determination module is used to determine a target control frequency based on the prior control frequency and the posterior control frequency;
[0031] The control operation module is used to control the compressor operation 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.
[0032] Furthermore, to achieve the above objectives, the present invention 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.
[0033] Furthermore, to achieve the above objectives, the present invention also provides a readable storage medium, which is a computer-readable storage medium, on which a program implementing a 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 above.
[0034] In addition, to achieve the above objectives, the present invention 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.
[0035] This invention provides a compressor control method. In this method, firstly, current environmental information, current operating condition information, and current setting information are input into a preset prior control model. The prior control model predicts a prior control frequency, which is trained from historical environmental information, historical operating condition information, and historical setting information. Then, the current environmental information, current operating condition information, and current setting information are input into a preset posterior control model. The posterior control model determines a posterior control frequency, which is constructed based on a PID algorithm. Next, a target control frequency is determined based on the prior control frequency and the posterior control frequency. The prior control frequency and the posterior control frequency are acquired every preset period within a preset time interval. Finally, the compressor is controlled to operate based on the target control frequency. In the technical solution of this invention, 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 jumps in the traditional control frequency determination method based on error elimination to a certain extent and improve the response speed. Then, a posteriori estimation is performed through the posterior control model constructed based on the PID algorithm, which also takes the error elimination factors into account in the final determination of the target control frequency, thereby improving the prediction accuracy. The technical solution of this invention 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 adjustment tracking performance, making the temperature change more accurate after the user sets a new temperature, thus optimizing the user experience. Attached Figure Description
[0036] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart illustrating an embodiment of the compressor control method of the present invention.
[0039] Figure 2 This is a schematic diagram illustrating the determination of the target control frequency through prior control frequency and posterior control frequency in each cycle of an embodiment of the present invention.
[0040] Figure 3 This is a schematic diagram of the entire process of a feasible compressor control method in an embodiment of the present invention;
[0041] Figure 4 This is a schematic diagram of the structural composition of a compressor control device according to an embodiment of the present invention;
[0042] Figure 5 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the compressor control method in this embodiment of the invention.
[0043] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0044] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of the present invention and are not intended to limit the present invention.
[0046] To better understand the technical solution of the present invention, a detailed description will be provided below in conjunction with the accompanying drawings and specific embodiments.
[0047] The executing entity of the compressor control method embodiment of the present invention 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.
[0048] 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.
[0049] To overcome the technical problems and defects existing in the prior art, embodiments of the present invention provide a compressor control method, referring to... Figure 1 , Figure 1 This is a schematic flowchart of an embodiment of the compressor control method of the present invention, wherein the compressor control method includes:
[0050] 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.
[0051] 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 invention, 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.
[0052] Step S20: Input the current environment 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;
[0053] This invention also incorporates a posterior control model based on a PID algorithm to perform posterior estimation of the current control frequency. It should be noted that this posterior control model can be constructed using error feedback algorithms such as the PID algorithm. In this invention, the system's output variable (indoor temperature) is observed and fed back using a posterior estimation method with reference to a 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 invention, by acquiring both the prior and posterior control frequencies simultaneously, improves the accuracy of the final target control frequency, further enhancing temperature regulation efficiency and temperature control tracking performance.
[0054] 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 period;
[0055] Step S40: Control the compressor to operate based on the target control frequency.
[0056] After obtaining the prior control frequency and the posterior control frequency, 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.
[0057] For example, 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.
[0058] 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.
[0059] In the technical solution of this invention 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 jumps 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 jumps in the PID algorithm, the algorithm's later advantages are utilized to further improve the prediction accuracy. The technical solution of this invention 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 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 following performance, making the temperature change more accurate after the user sets a new temperature, thus optimizing the user experience.
[0060] In one feasible embodiment, the step of determining the target control frequency based on the prior control frequency and the posterior control frequency may include:
[0061] 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 the preset time period.
[0062] In this embodiment of the invention, a method for determining a target control frequency by taking the values of a priori control frequency and a posterior control frequency is specifically disclosed. It can be understood that the target control frequency is determined by the a priori control frequency and the posterior control frequency. By adjusting the proportions of the a priori control frequency and the posterior control frequency in determining the target control frequency, the influence of each on the final target control frequency is represented.
[0063] In one feasible embodiment, 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, frequency control commands are typically issued based on the error between the real-time ambient temperature and the set temperature. This often leads to overshooting in the early stages, resulting in large frequency jumps. Therefore, iterative updates of the posterior control frequency are needed over a period of time 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 of time, 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 invention, 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 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 performance and response speed of the air conditioner, and optimize the user experience.
[0064] Furthermore, in one feasible embodiment, the preset duration includes multiple cycles;
[0065] The step of adjusting the value of the target control frequency based on the prior control frequency and the posterior control frequency includes:
[0066] Step S32: Determine the prior weight and posterior weight corresponding to the current period based on the period number within the preset duration of the current period.
[0067] Step S33: Calculate the target control frequency value for the current period based on the prior control frequency value and prior weight in the current period, and the posterior control frequency value and posterior weight in the current period.
[0068] 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.
[0069] For example, the preset duration can be set to 11 minutes, and the number of cycles can be set to 11, meaning each cycle lasts 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 using 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. When the cycle number is 11, 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 the present invention.
[0070] For example, refer to Figure 2 In different periods, the target control frequencies are P1, P2, up to P11, the prior control frequencies are Pf1, Pf2, up to Pf11, and 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 weights for the current period, and the product of the posterior control frequency and the posterior weights for the current period are calculated separately. Finally, the sum of the two products is calculated to obtain the target control frequency.
[0071] Furthermore, in a feasible embodiment, the step of determining the prior weight and posterior weight corresponding to the current period based on the period sequence number within the preset duration of the current period may include:
[0072] Step S33: Based on the preset mapping relationship table between cycle number and weight, query the prior weight and posterior weight corresponding to the current cycle.
[0073] 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.
[0074] In this embodiment of the invention, the prior weight and posterior weight of each period can be determined by a pre-set mapping table.
[0075] For example, 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:
[0076] Periodic number 1 2 3 4 5 6 7 8 9 10 11 Prior weights 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 Posterior weights 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
[0077] Table 1
[0078] 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 embodiment of the invention 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.
[0079] To better understand the compressor control method provided in the embodiments of the present invention, in conjunction with the foregoing embodiments, refer to... Figure 3 A feasible compressor control method may include the following steps: 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 cycle (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). Finally, the compressor is controlled to operate according to the target control frequency P.
[0080] In one feasible embodiment, prior to 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:
[0081] Step A10: Collect historical environmental information, historical operating condition information, and historical setting information to obtain multiple training data.
[0082] Step A20: Based on the training data, a priori control model is trained and generated, wherein 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.
[0083] This invention 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 and blank values, and normalizing the data. 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.
[0084] 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.
[0085] For example, the air conditioner ran for a total of 60 minutes, comprising 60 cycles (each cycle being 1 minute);
[0086] 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.
[0087] Each period, as a training data point, includes at least independent and dependent variables;
[0088] Using a prior estimation algorithm, a prior control model f is trained, with the expression: y i (P)=f i (T s ,T4,t……), where y i(P) represents the a priori control frequency, and i represents the period number.
[0089] In one feasible embodiment, 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 may further include:
[0090] Step B10: Collect historical environmental information, historical operating condition information, and historical setting information;
[0091] Step B20: Determine PID control parameters based on the historical environmental information, the historical operating condition information, and the historical setting information, and construct a posterior control model based on the PID control parameters.
[0092] This invention also provides a method for pre-constructing a posterior control model. It should be noted that the posterior control model is based on existing PID control algorithms and an error feedback elimination approach. It is primarily used to effectively predict the current control frequency based on currently collected environmental, operating condition, and setpoint information to obtain the posterior control frequency, thereby minimizing the error between the actual detected ambient temperature and the setpoint temperature. 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.
[0093] 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 elements; 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.
[0094] In another feasible 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.
[0095] In one feasible embodiment, the compressor control method may further include:
[0096] 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;
[0097] Step S60: 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.
[0098] It is understood that the compressor control method in this embodiment of the invention 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°C and the user inputs a new set temperature of 21°C, a 5°C temperature difference is present. The compressor's operating frequency needs to be further increased 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 of this embodiment of the invention combines prior control frequencies based on historical experience with real-time a posteriori control frequencies to improve 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.
[0099] 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.
[0100] This invention also provides a compressor control device, see reference. Figure 4 The compressor control device includes:
[0101] The prior prediction module 10 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.
[0102] The posterior determination module 20 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;
[0103] 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 period;
[0104] The control operation module 40 is used to control the operation of the compressor based on the target control frequency.
[0105] In one embodiment, the frequency determination module 30 is further configured to:
[0106] 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.
[0107] In one embodiment, the preset duration includes multiple cycles;
[0108] The frequency determination module 30 is also used for:
[0109] Based on the cycle number within the preset duration, determine the prior weight and posterior weight corresponding to the current cycle;
[0110] 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.
[0111] In one embodiment, the frequency determination module 30 is further configured to:
[0112] Based on the preset mapping table between period number and weight, query the prior weight and posterior weight corresponding to the current period;
[0113] 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.
[0114] In one embodiment, the compressor control device further includes a priori training module, the priori training module being used for:
[0115] Collect historical environmental information, historical operating condition information, and historical setting information to obtain multiple training data;
[0116] 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.
[0117] In one embodiment, the compressor control device further includes a posterior training module, the posterior training module being used for:
[0118] Collect historical environmental information, historical operating condition information, and historical setting information;
[0119] 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.
[0120] In one embodiment, the control operation module 40 is further configured to:
[0121] 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;
[0122] 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.
[0123] The compressor control device provided by this invention, 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 the prior art, the beneficial effects of the compressor control device provided by this invention 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.
[0124] This invention 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 described in Embodiment 1 above.
[0125] The following is for reference. Figure 5 It shows a structural schematic diagram suitable for implementing an air conditioner according to embodiments of the present disclosure. Figure 5 The air conditioner shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.
[0126] like Figure 5 As shown, the air conditioner may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.) that 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 air conditioners 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.
[0127] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure 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 disclosure.
[0128] The air conditioner provided by this invention, 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 the prior art, the beneficial effects of the air conditioner provided by this invention 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.
[0129] It should be understood that various parts of this disclosure 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.
[0130] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0131] This invention 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.
[0132] The computer-readable storage medium provided in this embodiment of the invention may be, for example, a USB flash drive, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, 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.
[0133] 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.
[0134] The aforementioned computer-readable storage medium carries one or more programs. When the air conditioner executes these programs, the air conditioner causes the following actions: inputs current environmental information, current operating condition information, and current setting information into a preset prior control model; 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 the current environmental information, current operating condition information, and current setting information into a preset posterior control model; 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.
[0135] Computer program code for performing the operations of this disclosure 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).
[0136] 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 the present invention. 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.
[0137] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0138] The readable storage medium provided by this invention 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 the prior art, the beneficial effects of the computer-readable storage medium provided in this embodiment are the same as those of the compressor control method provided in Embodiment 1 above, and will not be repeated here.
[0139] This invention 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.
[0140] The computer program product provided by this invention can solve the technical problem of excessive fluctuations in control parameters in traditional air conditioning control methods. Compared with the prior art, the beneficial effects of the computer program product provided in this embodiment are the same as those of the compressor control method provided in Embodiment 1 above, and will not be repeated here.
[0141] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of the present invention.
Claims
1. A compressor control method, characterized in that, 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, characterized in that, 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, characterized in that, 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 sequence number within the preset duration of the current period 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 as described in claim 1, characterized in that, 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 as described in claim 1, characterized in that, 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 as described in claim 1, characterized in that, 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, characterized in that, 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, characterized in that, 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 enable 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, characterized in that, The readable storage medium is a computer-readable storage medium, on which a program implementing the compressor control method is stored, the program implementing the compressor control method being executed by a processor to implement the steps of the compressor control method as described in any one of claims 1 to 7.