Prefabricated cabin environment control method and system based on self-adaptive parameter adjustment

By using an adaptive parameter-tuning prefabricated cabin environment control method, the PID parameters are dynamically adjusted, which solves the problem of poor adaptability to environmental changes under fixed parameter control, achieves high precision and stability, has multiple safety protections, and improves the energy efficiency ratio.

CN121857348APending Publication Date: 2026-04-14QINGDAO TGOOD ELECTRIC
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-19
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

The existing prefabricated cabin environmental control system uses a fixed-parameter PID control algorithm, which cannot adapt to environmental changes, resulting in low control accuracy, high energy consumption, and a lack of effective safety protection mechanisms.

Method used

An adaptive parameter-tuning prefabricated cabin environmental control method is adopted. By collecting environmental parameters in real time, calculating environmental control performance, and dynamically adjusting PID control parameters based on performance evaluation results, combined with equipment switching state machines and safety protection mechanisms, the system stability and safety are ensured.

Benefits of technology

It achieves high-precision control of the prefabricated cabin environment, improves system stability and energy efficiency, has multiple safety protections, and avoids equipment conflicts and energy waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121857348A_ABST
    Figure CN121857348A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of environment control, and discloses a prefabricated cabin environment control method and system based on adaptive parameter adjustment, and the method comprises the steps: presetting environment control parameters, and collecting the real-time environment parameters of a prefabricated cabin; judging whether parameter adjustment time is reached or not and judging whether the collected data volume of the real-time environment parameters meets the data volume required by a real-time environment control performance calculation process or not; executing self-adaptive parameter adjustment to update the environment control parameters; the processing equipment switches the state machine; pID control calculation is executed according to the preset or updated environment control parameters, and environment control output is obtained; safety boundary check is carried out; and outputting a control decision of the execution equipment according to environment control. Self-adaptive parameter adjustment is adopted, PID control parameters can be automatically adjusted according to the operation performance, high-precision and self-adaptive PID control of the prefabricated cabin environment is achieved, and the stability and the energy efficiency ratio of a control system are improved; all parameters can be configured according to actual use requirements, and the method has good universality and adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of environmental control, and specifically to a prefabricated cabin environmental control method and system based on adaptive parameter tuning. Background Technology

[0002] Existing prefabricated cabin environmental control systems mostly employ fixed-parameter PID control algorithms, which cannot automatically adjust control parameters according to environmental changes and system performance. This results in low control accuracy, high energy consumption, and unstable control performance under different environmental conditions. In particular, in temperature and humidity control, fixed parameters are difficult to adapt to complex environmental changes, easily leading to problems such as control lag and overshoot.

[0003] Traditional PID control methods often fail to achieve ideal control results in confined spaces like prefabricated cabins due to dynamic changes in environmental parameters and the influence of external disturbances. This is especially true under seasonal variations or extreme weather conditions, where fixed PID parameters can lead to slow system response or over-adjustment, impacting environmental comfort and increasing energy consumption.

[0004] The main problems with existing technologies include: fixed control parameters that cannot adapt to environmental changes; low control accuracy that is prone to overshoot and lag; high energy consumption and lack of optimization and adjustment mechanisms; and lack of effective safety protection mechanisms.

[0005] In summary, there is a need to design an environmental control method and system for prefabricated cabins based on adaptive parameter tuning to solve the aforementioned problems in the existing technology. Summary of the Invention

[0006] This invention provides a prefabricated cabin environment control method and system based on adaptive parameter tuning, which can automatically adjust control parameters according to system operating performance, improve control accuracy and stability, and has multiple safety protection mechanisms to ensure system operation safety.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: The prefabricated cabin environment control method based on adaptive parameter tuning includes the following steps: S1. Preset environmental control parameters, including proportional coefficient P, integral coefficient I, and derivative coefficient D; collect real-time environmental parameters of the prefabricated cabin; the real-time environmental parameters include real-time temperature data and real-time humidity data; S2. Determine whether the parameter adjustment time has been reached and whether the amount of real-time environmental parameter data collected meets the data requirements of the real-time environmental control performance calculation process. S3. If all the judgment conditions in S2 are met, then perform adaptive parameter tuning; otherwise, proceed to S4. The adaptive parameter tuning includes: S31. Calculate the real-time environmental control performance using real-time environmental parameters; the calculation formula for the real-time environmental control performance is: PFM=α×RMSE+β×MAE+γ×AVC; Wherein, PFM is the real-time environmental control performance, RMSE is the root mean square error, MAE is the mean absolute error, and AVC is the average output rate of change; α, β, and γ are the performance evaluation weighting coefficients, and α+β+γ=1. The real-time environmental control performance includes temperature control performance and humidity control performance. The temperature control performance is calculated using real-time temperature data, and the humidity control performance is calculated using real-time humidity data. S32. Compare the real-time environmental control performance with the performance threshold; update the environmental control parameters based on the comparison results. When the real-time environmental control performance exceeds the upper limit of the first performance threshold, the adjusted proportional coefficient P * With differential coefficient D * The calculation formula is: P * =1+AF,D * =1+AF×K dW ; When the real-time environmental control performance exceeds the upper limit of the second performance threshold, the adjusted integral coefficient I... * The calculation formula is: I * =1+AF×K iW ; When the real-time environmental control performance is less than the lower limit of the performance threshold, the adjusted proportional coefficient P * With differential coefficient D * The calculation formula is: P * =1-AF×K pSW D * =1-AF×K dSW ; Where AF is the parameter adjustment factor; K dW For differential weights, K iW K represents the integral weight. pSW For proportional stability weights, K dSW The weights are differential stability weights; S4. Process the equipment switching state machine to ensure that the refrigeration equipment and the heating equipment operate in mutual exclusion. S5. Perform PID control calculations based on preset or updated environmental control parameters, and obtain the environmental control output; S6. Execute the control decision of the device according to the environmental control output.

[0008] In some embodiments of the present invention, the environmental control output includes temperature PID output and humidity PID output; S6 further includes a safety boundary check, which includes temperature boundary check and anti-condensation protection.

[0009] In some embodiments of the present invention, the anti-condensation protection includes: the temperature boundary check includes: when the real-time temperature data is less than the lower limit, the temperature PID output is a forced heating value; when the real-time temperature data is greater than the upper limit, the temperature PID output is a forced cooling value; The anti-condensation protection includes: when the dew point temperature is not less than the difference between the surface temperature of the prefabricated cabin and the dehumidification threshold, the humidity PID output is a forced dehumidification value.

[0010] In some embodiments of the present invention, the calculation process of the temperature PID output is as follows: Calculate the temperature error based on the real-time temperature data and the target temperature data; Update the temperature integral term using the temperature error, and calculate the temperature differential term; The temperature PID output is calculated using the following formula: t out =P t ×t e + I t ×t i + D t ×t d ; Among them, P t I is the temperature proportionality coefficient. t D is the temperature integral coefficient. t t is the temperature differential coefficient; e For temperature error, t i For the temperature integral term, t d This is the temperature differential term.

[0011] In some embodiments of the present invention, the calculation process of the humidity PID output is as follows: The humidity error is calculated based on the real-time humidity data and the target humidity data. Update the humidity integral term using the humidity error, and calculate the humidity differential term; The humidity PID output is calculated using the following formula: h out =P h ×h e + I h ×h i + D h ×h d ; Among them, P h I is the humidity proportionality coefficient.h D is the humidity integral coefficient. h h is the humidity differential coefficient. e For humidity error, h i h is the humidity integral term. d This is the differential term for humidity.

[0012] In some embodiments of the present invention, determining whether the parameter tuning time has been reached in step S2 includes: Determine whether the interval between the current time and the last time of parameter tuning has reached the parameter tuning interval.

[0013] In some embodiments of the present invention, the upper limit of the second performance threshold is greater than the upper limit of the first performance threshold.

[0014] In some embodiments of the present invention, an adaptive parameter tuning-based prefabricated cabin environmental control system is provided to implement the above-mentioned prefabricated cabin environmental control method, including: The environmental data acquisition module is used to collect real-time temperature and humidity data inside the prefabricated cabin. The PID control module includes a temperature PID controller and a humidity PID controller, which are used to calculate the temperature control output and the humidity control output, respectively. The adaptive parameter tuning module is used to adaptively adjust the PID control parameters according to the system performance. The equipment control module is used to control the execution equipment according to the temperature control output and humidity control output; The safety protection module is used to provide temperature boundary protection and anti-condensation protection for the prefabricated cabin environment.

[0015] In some embodiments of the present invention, an electronic device is provided, comprising: A processor, and a memory and a transceiver communicatively connected to the processor; The memory stores computer-executed instructions; the transceiver is used for sending and receiving data. The processor executes computer execution instructions stored in the memory to implement the above control method.

[0016] In some embodiments of the present invention, a computer-readable storage medium is provided, wherein computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are used to implement the above-described control method when executed by a processor.

[0017] The technical solution of the present invention has the following technical effects compared with the prior art: The adaptive parameter tuning method adopted in this invention can automatically adjust the PID control parameters according to the operating performance, realizing high-precision and adaptive PID control of the prefabricated cabin environment, effectively improving the stability and energy efficiency ratio of the control system; all parameters can be configured according to actual usage requirements, and have good versatility and adaptability. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic flowchart illustrating the control method of the present invention.

[0020] Figure 2 This is a flowchart illustrating the control method shown in Embodiment 1 of the present invention.

[0021] Figure 3 This is a schematic diagram of the adaptive parameter tuning process shown in Embodiment 1 of the present invention.

[0022] Figure 4 This is a schematic diagram of the switching state machine of the device shown in Embodiment 1 of the present invention.

[0023] Figure 5 This is a schematic diagram of the control method steps shown in Embodiment 2 of the present invention.

[0024] Figure 6 This is a schematic diagram of the control system shown in Embodiment 3 of the present invention.

[0025] Figure 7 This is a schematic diagram of the structure of the electronic device.

[0026] Reference numerals: 100, Control system; 110, Environmental acquisition module; 120, PID control module; 130, Adaptive parameter tuning module; 140, Equipment control module; 150, Safety protection module; 200, Electronic equipment; 210, Processor; 220, Memory; 230, Transceiver. Detailed Implementation

[0027] 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.

[0028] In the description of this application, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0029] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0030] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0031] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.

[0032] The following disclosure provides many different embodiments or examples for implementing various structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed. In addition, examples of various specific processes and materials are provided in this invention, but those skilled in the art will recognize the application of other processes and / or the use of other materials.

[0033] In order to overcome the problems in the existing technology, referring to Figure 1 As shown, this invention provides a prefabricated cabin environment control method based on adaptive parameter tuning, comprising the following steps: S1. Preset environmental control parameters, including proportional coefficient P, integral coefficient I, and derivative coefficient D; collect real-time environmental parameters of the prefabricated cabin; the real-time environmental parameters include real-time temperature data and real-time humidity data; S2. Determine whether the parameter adjustment time has been reached and whether the amount of real-time environmental parameter data collected meets the data requirements of the real-time environmental control performance calculation process; if both conditions are met, proceed to S3; otherwise, proceed to S4. S3. Perform adaptive parameter tuning to obtain updated environmental control parameters; S4. Process the equipment switching state machine to ensure that the refrigeration equipment and the heating equipment operate in mutual exclusion. S5. Perform PID control calculations based on preset or updated environmental control parameters, and obtain the environmental control output; S6. Execute the control decision of the device according to the environmental control output.

[0034] The adaptive parameter tuning method adopted in this invention can automatically adjust the PID control parameters according to the operating performance, realizing high-precision and adaptive PID control of the prefabricated cabin environment, effectively improving the stability and energy efficiency ratio of the control system; all parameters can be configured according to actual usage requirements, and have good versatility and adaptability.

[0035] The specific steps involved in this invention are described in detail through the following embodiments.

[0036] Example 1: Refer to Figure 2 As shown, the prefabricated cabin environment control method based on adaptive parameter tuning includes the following steps: S11, System Startup; i.e., preset environmental control parameters, including proportional coefficient P, integral coefficient I, and derivative coefficient D.

[0037] S12. After the environmental control of the prefabricated cabin is started, check the start-up delay and control interval to ensure that it can safely enter the working state.

[0038] Check if the minimum start-up delay (MSD) is met, i.e., confirm the system stabilization time, allowing the sensor to fully stabilize before proceeding with control. For example, the minimum start-up delay (MSD) is 60 seconds.

[0039] Check if the minimum control interval (MCI) is met, that is, check if the time since the last control meets the minimum control interval (MCI) to prevent excessively frequent control. For example, the minimum control interval (MCI) is 30 seconds.

[0040] Once the above two basic conditions are met, the next step of the control process will begin.

[0041] S13. Collect real-time environmental parameters of the prefabricated cabin to provide accurate data support for control decisions.

[0042] Real-time environmental parameters include real-time temperature data t c Real-time humidity data h c and external temperature data t ext .

[0043] S14. Determine whether to enable the adaptive parameter tuning function. If enabled, proceed to S21, which is the first judgment condition; otherwise, proceed to S4 to process the device switching state machine. In other embodiments, for the adaptive parameter tuning function, in order to ensure that parameter optimization is carried out as planned, it is usually checked periodically whether the preset parameter adjustment time point has been reached.

[0044] S21. Determine whether the parameter adjustment interval TI has been reached. If yes, proceed to the second judgment condition S22; otherwise, proceed to step S4.

[0045] The parameter tuning interval TI is a preset parameter; it can be determined by comparing the current time with the last tuning time. For example, the tuning interval TI is 300s.

[0046] Time synchronization management is achieved by accurately recording and comparing time points using the system clock.

[0047] In some embodiments of this application, the system will only initiate the adaptive parameter adjustment process when the parameter adjustment time is reached.

[0048] S22. Determine if there is sufficient historical data, i.e., whether the amount of data collected for real-time environmental parameters meets the data requirements for the real-time environmental control performance calculation process. If yes, proceed to step S3 to perform adaptive parameter tuning; otherwise, proceed to step S4.

[0049] In other words, it checks whether there is enough historical data (window size PWS) to ensure the accuracy of performance evaluation. The window size refers to the number of historical data points used for performance evaluation, specifically the data from the most recent PWS control cycles. The system continuously records historical data of control errors and control outputs. When the historical data exceeds PWS × 2 points, the oldest data will be automatically deleted to ensure that performance evaluation is always calculated based on the most recent PWS data points.

[0050] S3. Perform adaptive parameter tuning to obtain updated environmental control parameters. Refer to [link to specific tuning steps] for details. Figure 3 As shown.

[0051] S31. Calculate real-time environmental control performance using real-time environmental parameters; that is, calculate system performance indicators based on historical control data and quantify the current control effect.

[0052] The real-time environmental control performance includes temperature control performance and humidity control performance. The temperature control performance is calculated using real-time temperature data; the humidity control performance is calculated using real-time humidity data. The calculation formulas for the temperature control performance and the humidity control performance are the same, as follows: PFM=α×RMSE+β×MAE+γ×AVC; Wherein, PFM is the real-time environmental control performance, RMSE is the root mean square error, MAE is the mean absolute error, and AVC is the average output rate of change; α, β, and γ are the performance evaluation weighting coefficients, and α+β+γ=1. Specifically, control accuracy is measured by root mean square error (RMSE) and mean absolute error (MAE), while the stability of the control process is assessed by average output rate of change (AVC). ; ; ; Among them, e k Let k be the control error value, and output[k] be the PID output value within a certain control cycle; k is the data point sequence number, k=1,2,...,n, n=PWS.

[0053] S32. Compare the real-time environmental control performance with the performance threshold; update the environmental control parameters based on the comparison results.

[0054] Specifically, when PFM > P TH-H At that time, P TH-H The adjusted scaling factor P is the upper limit of the first performance threshold, i.e., the high-performance threshold parameter. * With differential coefficient D * The calculation formula is: P * =1+AF,D *=1+AF×K dW ; When PFM>P TH-VH At that time, P TH-VH This is the upper limit of the second performance threshold, i.e., a very high performance threshold parameter, which is satisfied when PFM > P. TH-H Under the premise of adjusting the proportional coefficient P and the differential coefficient D, the adjusted integral coefficient I * The calculation formula is: I * =1+AF×K iW ; When PFM <P TH-L At that time, P TH-L The adjusted scaling factor P is the lower limit of the performance threshold, i.e., the low performance threshold parameter. * With integral coefficient D * The calculation formula is: P * =1-AF×K pSW D * =1-AF×K dSW ; Where P, I, and D are the proportional, integral, and derivative coefficients before adjustment, respectively; P * I * D * These are the adjusted proportional, integral, and derivative coefficients, respectively; AF is the parameter adjustment factor, typically set to 0.05; K dW For differential weights, K iW K represents the integral weight. pSW For proportional stability weights, K dSW The second performance threshold is greater than the first performance threshold.

[0055] In some embodiments of the present invention, the low performance threshold parameter is set to 0.5, the high performance threshold parameter is set to 2.0, and the very high performance threshold parameter is set to 5.0.

[0056] In some embodiments of the present invention, the updated environmental control parameter P * I * D * It needs to be within a reasonable range, that is , , .

[0057] S33, Update parameter tuning time; S34. Record the updated environmental control parameters.

[0058] In some embodiments of the present invention, system performance traceability analysis is also supported by establishing parameter adjustment trajectories.

[0059] S4, continue to refer to Figure 2 As shown, the processing equipment switching state machine ensures that the refrigeration equipment and the heating equipment operate mutually exclusively; The process includes: identifying the operating status of air conditioners and electric heaters; operating according to a preset state machine process when switching devices is required; setting a delay between device shutdown and startup to ensure a smooth transition; and avoiding conflicting operation of devices to reduce energy consumption.

[0060] Specifically, refer to Figure 4 As shown, the device switching state machine includes: State 0 indicates no switching and the system is operating normally. State 1 is ready to turn off the electric heater. This state is entered when you need to switch from heating to cooling and the electric heater is running. Status 2 is waiting for the air conditioner to turn on. After the electric heater is turned off, the air conditioner will turn on after a delay of SDT. State 3 is the state of preparing to turn off the air conditioner. This state is entered when you need to switch from cooling to heating and the air conditioner is running. Status 4 indicates the heater is waiting to be turned on. After the air conditioner is turned off, the heater will be turned on after a delay of SDT. SDT is the switching delay, which is usually set to 10s. This parameter can be adjusted according to the specific characteristics of the device.

[0061] S5. Perform PID control calculations based on preset or updated environmental control parameters and obtain the environmental control output; simultaneously record performance data. Based on the deviation between the current state and the target value, a control algorithm is used to calculate the control quantity. The environmental control output includes temperature PID output and humidity PID output.

[0062] The calculation process for the temperature PID output is as follows: Based on real-time temperature data t c With target temperature data t tar Calculate temperature error t e The calculation formula is as follows: t e =t tar -t c .

[0063] Temperature error t e The integration yields the historical cumulative term, which is obtained using the temperature error t. e Update the temperature integral term t i :t i * = t i +t e ×dt.

[0064] Calculate temperature error t eThe rate of change yields the differential term, i.e., the temperature differential term t is calculated. d :(t e -prev te ) / dt; where, prev te The temperature error of the previous control cycle; the temperature differential term t d Used to indicate the rate of temperature change.

[0065] The temperature PID output is calculated using the following formula: t out =P t ×t e + I t ×t i * + D t ×t d ; Among them, P t I is the temperature proportionality coefficient. t D is the temperature integral coefficient. t t is the temperature differential coefficient; e For temperature error, t i For the temperature integral term before the update, t i * For the updated temperature integral term, t d This is the temperature differential term.

[0066] Temperature PID output t out It is the control command value calculated by the temperature PID controller, which comprehensively reflects the system's judgment on the current temperature control requirements: Temperature PID output t out The numerical value indicates the level of control required; the larger the absolute value, the stronger the control requirement. Temperature PID output t out Positive values ​​indicate that heating is needed (the larger the value, the stronger the heating requirement); negative values ​​indicate that cooling is needed (the smaller the value, the stronger the cooling requirement); values ​​close to zero indicate that the current temperature is close to the target temperature and no significant adjustment is needed.

[0067] The calculation process for the humidity PID output is as follows: Based on real-time humidity data h c Compared with target humidity data h tar Calculate humidity error h e The calculation formula is as follows: h e =h tar -h c .

[0068] Humidity error h e The integral yields the historical cumulative term, which is obtained by utilizing the humidity error h. eUpdate humidity integral term h i :h i * = h i +h e ×dt.

[0069] Calculate humidity error h e The rate of change yields the differential term, i.e., the humidity differential term h is calculated. d :(h e -prev he ) / dt; where, prev he The humidity error of the previous control cycle; the humidity differential term h d This is used to indicate the rate of change in humidity. For example, the time interval of the control cycle can be 5-30 seconds.

[0070] The humidity PID output is calculated using the following formula: h out =P h ×h e + I h ×h i * + D h ×h d ; Among them, P h I is the humidity proportionality coefficient. h D is the humidity integral coefficient. h h is the humidity differential coefficient. e For humidity error, h i For the humidity integral term before the update, h i * For the updated humidity integral term, h d This is the differential term for humidity.

[0071] Humidity PID output h out This is the control command value calculated by the humidity PID controller, which reflects the system's judgment on the current humidity control requirements: Humidity PID output h out The numerical value indicates the level of dehumidification control required; the larger the value, the stronger the dehumidification demand. Humidity PID output h out A positive value indicates that dehumidification is needed (the larger the value, the stronger the dehumidification requirement); a value close to zero indicates that the current humidity is close to the target and no dehumidification adjustment is needed.

[0072] Save key control process data to accumulate historical evidence for system performance evaluation. This includes temperature error t. e Humidity error h e Temperature control output t out and humidity control output hout .

[0073] At the same time, maintain the data window, that is, keep the most recent PWS data points and automatically clear any data points that exceed the limit.

[0074] S61. Conduct a security boundary check.

[0075] Specifically, the safety boundary check includes temperature boundary check and anti-condensation protection; a safety check is performed before the control command is executed, and protective measures are implemented when necessary.

[0076] The temperature boundary check includes: when the real-time temperature data is lower than the lower limit, the temperature PID output is a forced heating value; when the real-time temperature data is higher than the upper limit, the temperature PID output is a forced cooling value. The anti-condensation protection includes: when the dew point temperature is not less than the difference between the surface temperature of the prefabricated cabin and the dehumidification threshold, the humidity PID output is a forced dehumidification value.

[0077] For example, the dew point temperature of the current environment is calculated based on the Maglas formula, and the surface temperature is calculated based on the indoor and outdoor temperature difference and the thermal resistance parameters of the building envelope. When the dew point temperature is close to the surface temperature, the humidity PID output is a forced dehumidification value, that is, forced dehumidification is started.

[0078] S62. Execute the device's control decision based on the environmental control output; The temperature control output t calculated in step S5 out and humidity control output h out Issue specific operational orders to the implementing agency.

[0079] Specifically, when the temperature control output t out Heating is activated when the temperature exceeds the heating threshold HT; when the temperature control output t... out Cooling is activated when the CT value is below the cooling threshold; when the humidity control output h out Dehumidification is activated when the humidity exceeds the dehumidification threshold DST. This enables the mapping and conversion from control algorithm to equipment action.

[0080] In some embodiments of the present invention, the heating threshold HT is 100, the cooling threshold CT is -100, and the dehumidification threshold DST is 50.

[0081] S7. Determine if there is a control command. If so, proceed to S8 to output the control command; otherwise, proceed to S9 to perform no operation.

[0082] S8. The control flow ends after outputting the control command.

[0083] S9. The control flow ends after no operation is performed.

[0084] The present invention has the following beneficial effects: Adaptive parameter tuning: The system can automatically adjust PID control parameters according to actual operating performance, improving control accuracy and stability; Multi-layer safety protection: Multiple safety mechanisms such as temperature boundary protection and anti-condensation protection are set to ensure safe system operation; Equipment mutual exclusion control: The mutual exclusion operation of air conditioners and electric heaters is realized through equipment switching state machine, and the equipment is automatically switched to avoid energy waste; Performance optimization: Comprehensive performance indicators are used to evaluate the control effect, ensuring the scientific and effective adjustment of parameters.

[0085] Example 2: This example discloses the execution process of a prefabricated cabin environmental control method based on adaptive parameter tuning within a complete control cycle reaching the parameter tuning time point. During this cycle, sufficient historical system data is available to meet the triggering conditions for adaptive parameter tuning, fully demonstrating the closed-loop operation process from environmental data acquisition, PID control, safety protection to performance evaluation and dynamic parameter adjustment. The control steps and flow of the prefabricated cabin environment control method based on adaptive parameter tuning can also be referred to Figure 5 As shown, follow these steps: S1, System initialization; that is, setting the initial PID parameters and tuning parameters.

[0086] Specifically, set the following parameters: the temperature PID parameters include the temperature proportionality coefficient P. t Temperature integral coefficient I t Temperature differential coefficient D t The humidity PID parameter includes the humidity proportionality coefficient P. h Humidity integral coefficient I h Humidity differential coefficient D h ; Parameter tuning interval TI; Performance evaluation window size PWS; Minimum control interval MCI; Minimum startup delay MSD.

[0087] S2. Collect environmental parameters and check conditions. Specifically, real-time environmental parameters of the prefabricated cabin are collected, including the current real-time temperature data. c Real-time humidity data h c and external temperature data t ext Check the system's startup delay MSD and control interval MCI; S3. Perform PID control calculations to obtain the environmental control output.

[0088] Specifically, based on real-time temperature data t c With target temperature data t tar Calculate temperature error t e The calculation formula is as follows: t e =t tar -t c.

[0089] Temperature error t e The integration yields the historical cumulative term, which is obtained using the temperature error t. e Update the temperature integral term t i :t i * = t i +t e ×dt.

[0090] Calculate temperature error t e The rate of change yields the differential term, i.e., the temperature differential term t is calculated. d :(t e -prev te ) / dt; where, prev te The temperature error of the previous control cycle; the temperature differential term t d Used to indicate the rate of temperature change.

[0091] The temperature PID output is calculated using the following formula: t out =P t ×t e + I t ×t i * + D t ×t d ; Among them, P t I is the temperature proportionality coefficient. t D is the temperature integral coefficient. t t is the temperature differential coefficient; e For temperature error, t i For the temperature integral term before the update, t i * For the updated temperature integral term, t d This is the temperature differential term.

[0092] Similarly, the calculations for humidity PID control are as follows: Based on real-time humidity data h c Compared with target humidity data h tar Calculate humidity error h e The calculation formula is as follows: h e =h tar -h c .

[0093] Humidity error h e The integral yields the historical cumulative term, which is obtained by utilizing the humidity error h. e Update humidity integral term h i :h i *= h i +h e ×dt.

[0094] Calculate humidity error h e The rate of change yields the differential term, i.e., the humidity differential term h is calculated. d :(h e -prev he ) / dt; where, prev he The humidity error of the previous control cycle; the humidity differential term h d This is used to indicate the rate of change in humidity. For example, the time interval of the control cycle can be 5-30 seconds.

[0095] The humidity PID output is calculated using the following formula: h out =P h ×h e + I h ×h i * + D h ×h d ; Among them, P h I is the humidity proportionality coefficient. h D is the humidity integral coefficient. h h is the humidity differential coefficient. e For humidity error, h i For the humidity integral term before the update, h i * For the updated humidity integral term, h d This is the differential term for humidity.

[0096] S4. Perform a safety boundary check: when t c <T MIN At that time, T MIN The lower limit is set, and the forced temperature PID output t is used. out =HFV, where HFV is the forced heating value; when t c >T MAX At that time, the forced temperature PID output t out =CFV, where CFV is the forced cooling value.

[0097] Dew point temperature is calculated using the Magnus formula, taking the current temperature and humidity as the starting point. First, the saturated vapor pressure is calculated based on the temperature; then, the actual vapor pressure is obtained by combining this with the relative humidity; finally, the dew point temperature is derived by inversely using the vapor pressure. Surface temperature is calculated using the temperature difference between indoors and outdoors and the thermal resistance parameters of the building envelope, applying the principles of heat conduction to obtain the inner surface temperature of the building envelope. When the dew point temperature is... p ≥t turf- When in DTH, force the humidity PID output h out = DFV, where t turf is the surface temperature, DTH is the dehumidification threshold, and DFV is the forced dehumidification value.

[0098] S5. Execute the device control decision: When the temperature PID output t out > HT, start heating, where HT is the heating threshold; when the temperature PID output t out < CT, start cooling, where CT is the cooling threshold; when the humidity PID output h out > DST, start dehumidifying, where DST is the dehumidification threshold.

[0099] S6. Check if it has reached the parameter adjustment time, that is, check if the parameter adjustment interval TI has been reached.

[0100] S7. If it has reached the parameter adjustment time, evaluate the control performance: that is, calculate the temperature control performance and the humidity control performance; use the performance evaluation formula: PFM = α × RMSE + β × MAE + γ × AVC; where PFM is the real-time environmental control performance, RMSE is the root mean square error, MAE is the mean absolute error, AVC is the average output change rate; α, β, and γ are the performance evaluation weight coefficients, and α + β + γ = 1.

[0101] S8. Adjust the PID parameters, that is, adjust the PID parameters according to the performance evaluation results; When PFM > P TH-H increase the proportional and derivative gains; the adjusted proportional coefficient P * and the derivative coefficient D * are calculated by the formula: P * = 1 + AF, D * = 1 + AF × K dW ; When PFM > P TH-VH increase the integral gain; the adjusted integral coefficient I * is calculated by the formula: I * = 1 + AF × K iW ; When PFM < P TH-L decrease the proportional and derivative gains; the adjusted proportional coefficient P * and the integral coefficient D * are calculated by the formula: P * = 1 - AF × K pSW , D* =1-AF×K dSW ; Where P, I, and D are the proportional, integral, and derivative coefficients before adjustment, respectively; P * I * D * These are the adjusted proportional, integral, and derivative coefficients, respectively; AF is the parameter adjustment factor, typically set to 0.05; K dW For differential weights, K iW K represents the integral weight. pSW For proportional stability weights, K dSW The weights are differential stability weights.

[0102] S9. Record performance data for future evaluation, keeping the historical data window size at PWS.

[0103] The adaptive parameter tuning method adopted in this invention can automatically adjust the PID control parameters according to the operating performance, realizing high-precision and adaptive PID control of the prefabricated cabin environment, effectively improving the stability and energy efficiency ratio of the control system; all parameters can be configured according to actual usage requirements, and have good versatility and adaptability.

[0104] Example 3, this example will be based on Figure 6 and Figure 7 Describes the prefabricated cabin environmental control system 100 and electronic equipment 200 based on adaptive parameter tuning.

[0105] Reference Figure 6 As shown, the prefabricated cabin environmental control system 100, which provides adaptive parameter tuning, includes: Environmental acquisition module 110 is used to collect real-time temperature and humidity data inside the prefabricated cabin; The PID control module 120 includes a temperature PID controller and a humidity PID controller, which are used to calculate the temperature control output and humidity control output, respectively; wherein, the temperature PID controller is used for initial parameter setting and calculating the proportional coefficient P. t Integral coefficient I t Differential coefficient D t The humidity PID controller is used for initial parameter setting and calculating the proportional coefficient P. h Integral coefficient I h Differential coefficient D h These parameters can be set according to the specific application scenario.

[0106] The adaptive parameter tuning module 130 is used to adaptively adjust the PID control parameters according to the system performance. Specifically, the adaptive parameter tuning module 130 includes a performance evaluation unit, a parameter adjustment unit, and a historical data recording unit. The performance evaluation unit is used to calculate the control performance index, the parameter adjustment unit is used to adjust the PID parameters according to the performance index, and the historical data recording unit is used to record the control error and output historical data.

[0107] The equipment control module 140 is used to control the execution equipment according to the temperature control output and humidity control output; specifically, the equipment control module 140 is used to control the start and stop operations of the air conditioner, electric heater and dehumidifier to ensure that each device operates correctly according to the control instructions.

[0108] Safety protection module 150 is used for temperature boundary protection and anti-condensation protection of the prefabricated cabin environment. When the temperature is below T... MIN Forced heating starts when the temperature is higher than T. MAX Cooling is forced to start when the temperature is high; dehumidification is forced to start when the dew point temperature approaches the surface temperature. These parameters can be configured according to actual safety requirements.

[0109] The system adopts a parametric design, and all key parameters can be set according to actual usage needs, which has good adaptability and high flexibility. By defining general parameters, the system can be applied to prefabricated cabins of different specifications and different environmental control requirements.

[0110] It should be understood that the control system 100 here is embodied in the form of functional modules. The term "module" here can refer to application-specific integrated circuits (ASICs), electronic circuits, processors (e.g., shared processors, proprietary processors, or group processors, etc.) and memories for executing one or more software or firmware programs, integrated logic circuits, and / or other suitable components supporting the described functions. In an alternative example, those skilled in the art will understand that the control system 100 may be specifically the electronic device 200 in the above embodiments, or the functions of the electronic device 200 in the above embodiments may be integrated into the control system 100. The control system 100 may be used to execute the various processes and / or steps corresponding to the electronic device 200 in the above method embodiments; to avoid repetition, these will not be described further here.

[0111] The control system 100 described above has the function of implementing the corresponding steps executed by the electronic device 200 of the control method in Embodiment 1; the above functions can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. For example, the above acquisition module can be a communication interface, such as a transceiver interface.

[0112] In the embodiments of this application, Figure 6 The control system 100 in the text can also be a chip or a chip system, such as a system on chip (SoC).

[0113] Reference Figure 7 As shown, in this embodiment, an electronic device 200 is provided, including: Processor 210, and memory 220 and transceiver 230 communicatively connected to the processor; The memory 220 stores computer-executed instructions; the transceiver 230 is used for sending and receiving data. The processor 210 executes the computer execution instructions stored in the memory 220 to implement the solution algorithm in Embodiment 1.

[0114] It should be understood that the electronic device 200 can be used to perform the corresponding steps and / or processes in the above method embodiments. Optionally, the memory 220 may include read-only memory and random access memory, and provide instructions and data to the processor. A portion of the memory 220 may also include non-volatile random access memory. For example, the memory 220 may also store device type information. The processor 210 can be used to execute instructions stored in the memory 220, and when the processor 210 executes the instructions, the processor 210 can perform the corresponding steps and / or processes in the above method embodiments.

[0115] It should be understood that, in the embodiments of this application, the processor 210 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0116] In implementation, each step of the above method can be completed by the integrated logic circuitry of the hardware in the processor 210 or by instructions in software form. The steps of the method disclosed in the embodiments of this application can be directly embodied in the execution by the hardware processor, or by a combination of hardware and software modules in the processor 210. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor executes the instructions in the memory, combining them with its hardware to complete the steps of the above method. To avoid repetition, detailed descriptions are not provided here.

[0117] Example 4: In this example, a computer-readable storage medium is provided, which stores computer-executable instructions. When executed by a processor, the computer-executable instructions are used to implement the control method in Example 1.

[0118] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0119] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0120] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0121] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0122] 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.

[0123] The above are merely specific embodiments 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.

Claims

1. A prefabricated cabin environmental control method based on adaptive parameter tuning, characterized in that, Includes the following steps: S1. Preset environmental control parameters, including proportional coefficient P, integral coefficient I, and derivative coefficient D; collect real-time environmental parameters of the prefabricated cabin; the real-time environmental parameters include real-time temperature data and real-time humidity data; S2. Determine whether the parameter adjustment time has been reached and whether the amount of data collected for real-time environmental parameters meets the data requirements for the real-time environmental control performance calculation process. S3. If all the judgment conditions in S2 are met, then perform adaptive parameter tuning; otherwise, proceed to S4. The adaptive parameter tuning includes: S31. Calculate the real-time environmental control performance using real-time environmental parameters; the calculation formula for the real-time environmental control performance is: PFM=α×RMSE+β×MAE+γ×AVC; Wherein, PFM is the real-time environmental control performance, RMSE is the root mean square error, MAE is the mean absolute error, and AVC is the average output rate of change; α, β, and γ are the performance evaluation weighting coefficients, and α+β+γ=1. The real-time environmental control performance includes temperature control performance and humidity control performance. The temperature control performance is calculated using real-time temperature data, and the humidity control performance is calculated using real-time humidity data. S32. Compare the real-time environmental control performance with the performance threshold; update the environmental control parameters based on the comparison results. When the real-time environmental control performance exceeds the upper limit of the first performance threshold, the adjusted proportional coefficient P * With differential coefficient D * The calculation formula is: P * =1+AF,D * =1+AF×K dW ; When the real-time environmental control performance exceeds the upper limit of the second performance threshold, the adjusted integral coefficient I... * The calculation formula is: I * =1+AF×K iW ; When the real-time environmental control performance is less than the lower limit of the performance threshold, the adjusted proportional coefficient P * With differential coefficient D * The calculation formula is: P * =1-AF×K pSW ,D * =1-AF×K dSW ; Where AF is the parameter adjustment factor; K dW For differential weights, K iW K represents the integral weight. pSW For proportional stability weights, K dSW The weights are differential stability weights; S4. Process the equipment switching state machine to ensure that the refrigeration equipment and the heating equipment operate in mutual exclusion. S5. Perform PID control calculations based on preset or updated environmental control parameters, and obtain the environmental control output; S6. Execute the control decision of the device according to the environmental control output.

2. The prefabricated cabin environmental control method according to claim 1, characterized in that, The environmental control output includes temperature PID output and humidity PID output; S6 also includes a safety boundary check, which includes temperature boundary check and anti-condensation protection.

3. The prefabricated cabin environmental control method according to claim 2, characterized in that, The temperature boundary check includes: when the real-time temperature data is lower than the lower limit, the temperature PID output is a forced heating value; when the real-time temperature data is higher than the upper limit, the temperature PID output is a forced cooling value. The anti-condensation protection includes: when the dew point temperature is not less than the difference between the surface temperature of the prefabricated cabin and the dehumidification threshold, the humidity PID output is a forced dehumidification value.

4. The prefabricated cabin environmental control method according to claim 2, characterized in that, The calculation process for the temperature PID output is as follows: Calculate the temperature error based on the real-time temperature data and the target temperature data; Update the temperature integral term using the temperature error, and calculate the temperature differential term; The temperature PID output is calculated using the following formula: t out =P t ×t e + I t ×t i + D t ×t d ; Among them, P t I is the temperature proportionality coefficient. t D is the temperature integral coefficient. t The temperature differential coefficient; t e For temperature error, t i For the temperature integral term, t d This is the temperature differential term.

5. The prefabricated cabin environmental control method according to claim 2, characterized in that, The calculation process for the humidity PID output is as follows: The humidity error is calculated based on the real-time humidity data and the target humidity data. Update the humidity integral term using the humidity error, and calculate the humidity differential term; The humidity PID output is calculated using the following formula: h out =P h ×h e + I h ×h i + D h ×h d ; Among them, P h I is the humidity proportionality coefficient. h D is the humidity integral coefficient. h h is the humidity differential coefficient. e For humidity error, h i h is the humidity integral term. d This is the differential term for humidity.

6. The prefabricated cabin environmental control method according to claim 1, characterized in that, The step S2, which determines whether the parameter tuning time has been reached, includes: Determine whether the interval between the current time and the last time of parameter tuning has reached the parameter tuning interval.

7. The prefabricated cabin environmental control method according to claim 1, characterized in that, The upper limit of the second performance threshold is greater than the upper limit of the first performance threshold.

8. A prefabricated cabin environmental control system based on adaptive parameter tuning, characterized in that, To achieve the prefabricated cabin environmental control method as described in any one of claims 1-7; comprising: The environmental acquisition module is used to collect real-time temperature and humidity data inside the prefabricated cabin. The PID control module includes a temperature PID controller and a humidity PID controller, which are used to calculate the temperature control output and the humidity control output, respectively. The adaptive parameter tuning module is used to adaptively adjust the PID control parameters according to the system performance. The equipment control module is used to control the execution equipment according to the temperature control output and humidity control output; The safety protection module is used to provide temperature boundary protection and anti-condensation protection for the prefabricated cabin environment.

9. An electronic device, characterized in that, include: A processor, and a memory and a transceiver communicatively connected to the processor; The memory stores computer-executed instructions; the transceiver is used for sending and receiving data. The processor executes computer execution instructions stored in the memory to implement the prefabricated cabin environmental control method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the prefabricated cabin environmental control method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Server prefabricated cabin temperature and humidity control system and method and storage medium

    CN119088140A

  • Power converter control method and device based on neural network PID, and storage medium

    CN119945104A

  • Tunnel modular prefabricated cabin power supply and distribution intelligent substation self-adaptive regulation and control system based on edge calculation

    CN120657962A

  • Multi-region hierarchical PID parameter adaptive adjustment method and device

    CN120779704A

  • Semiconductor heater temperature control method based on adaptive PID (Proportion Integration Differentiation)

    CN120928886A