Temperature adjusting method, device, equipment and computer storage medium

文档序号:1353529 发布日期:2020-07-24 浏览:7次 中文

阅读说明:本技术 一种温度调节的方法、装置、设备及计算机存储介质 (Temperature adjusting method, device, equipment and computer storage medium ) 是由 赵全鑫 黄瑞炉 于 2020-03-26 设计创作,主要内容包括:本申请适用于计算机技术领域,提供了一种温度调节的方法,包括:获取传感器采集到的实时测量温度;基于所述实时测量温度和参考温度,确定第一温度误差值;若所述第一温度误差值大于第一预设阈值,则根据所述第一温度误差值以及预设比例积分微分算法计算目标电压,根据所述目标电压对加热器进行控制;若所述第一温度误差值小于或等于第一预设阈值,则关闭加热器的电源。上述方案,考虑了加热过程中,负载温度上升存在延迟的情况,设置了第一预设阈值,当第一温度误差大于第一预设阈值时,基于目标电压对加热器进行控制,当第一温度误差小于或者等于第一预设阈值时,关闭加热器的电源,这样,负载温度不会超过参考温度,可以更准确的调节负载温度。(The application is applicable to the technical field of computers, and provides a temperature adjusting method, which comprises the following steps: acquiring real-time measured temperature acquired by a sensor; determining a first temperature error value based on the real-time measured temperature and a reference temperature; if the first temperature error value is larger than a first preset threshold value, calculating a target voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage; and if the first temperature error value is less than or equal to a first preset threshold value, the power supply of the heater is turned off. According to the scheme, the situation that delay exists in the rise of the load temperature in the heating process is considered, the first preset threshold is set, when the first temperature error is larger than the first preset threshold, the heater is controlled based on the target voltage, and when the first temperature error is smaller than or equal to the first preset threshold, the power supply of the heater is turned off, so that the load temperature cannot exceed the reference temperature, and the load temperature can be adjusted more accurately.)

1. A method of temperature regulation, comprising:

acquiring real-time measured temperature acquired by a sensor;

determining a first temperature error value based on the real-time measured temperature and a reference temperature;

if the first temperature error value is larger than a first preset threshold value, calculating a target voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage;

if the first temperature error value is less than or equal to the first preset threshold, the power supply of the heater is turned off.

2. The method of claim 1, wherein calculating a target voltage based on the first temperature error value and a predetermined pid algorithm, controlling a heater based on the target voltage comprises:

calculating the difference between the first temperature error value and the second temperature error value to obtain an initial error difference value; the second temperature error value is a first temperature error value obtained by previous calculation;

correcting the initial error difference value according to a preset error difference value range to obtain a target error difference value;

and calculating a target voltage according to the first temperature error value, the target error difference value and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage.

3. The method of claim 1, wherein calculating a target voltage based on the first temperature error value and a predetermined pid algorithm, controlling a heater based on the target voltage comprises:

when the first temperature error value is larger than a second preset threshold value, adding a first error value to a preset proportionality coefficient to obtain a target proportionality coefficient;

when the first temperature error value is smaller than a third preset threshold value, subtracting a second error value from a preset proportional coefficient to obtain a target proportional coefficient;

and calculating a target voltage according to the first temperature error value, the target proportional coefficient and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage.

4. The method of claim 3, wherein prior to said calculating a target voltage based on said first temperature error value, said target scaling factor and a predetermined pid algorithm, controlling a heater based on said target voltage, further comprises:

when the target proportionality coefficient is larger than a preset proportionality coefficient upper limit value, taking the preset proportionality coefficient upper limit value as the target proportionality coefficient;

and when the target proportionality coefficient is smaller than the preset proportionality coefficient lower limit value, taking the preset proportionality coefficient lower limit value as the target proportionality coefficient.

5. The method of claim 1, wherein calculating a target voltage based on the first temperature error value and a predetermined pid algorithm, controlling a heater based on the target voltage comprises:

calculating a target cumulative error value based on the first temperature error value;

when the target accumulative error value is larger than a preset accumulative error upper limit value, taking the preset accumulative error upper limit value as the target accumulative error value;

when the target accumulated error value is smaller than a preset accumulated error lower limit value, taking the preset accumulated error lower limit value as the target accumulated error value;

and calculating a target voltage according to the first temperature error value, the target accumulated error value and a preset proportional integral derivative algorithm, and controlling the heater according to the target voltage.

6. The method of temperature adjustment of claim 5, wherein calculating a target cumulative error value as a function of the first temperature error value comprises:

when the first temperature error value is larger than a fourth preset threshold value, calculating a target cumulative error value according to the first temperature error value and a preset cumulative error value; the preset accumulated error value is a target accumulated error value obtained by last calculation;

setting a target cumulative error value to 0 when the first temperature error value is less than or equal to the fourth preset threshold.

7. The method of claim 1, wherein calculating the target voltage based on the first temperature error value and a predetermined pid algorithm, controlling a heater based on the target voltage comprises:

calculating initial voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm;

when the initial output voltage is greater than or equal to a preset output voltage upper limit value, taking the output voltage upper limit value as a target voltage;

when the initial output voltage is smaller than or equal to a preset lower limit value of the output voltage, taking the lower limit value of the output voltage as a target voltage;

and controlling the heater according to the target voltage.

8. A temperature conditioning apparatus, comprising:

the first acquisition unit is used for acquiring the real-time measurement temperature acquired by the sensor;

a first determining unit for determining a first temperature error value based on the real-time measured temperature and a reference temperature;

the first processing unit is used for calculating a target voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm and controlling the heater according to the target voltage if the first temperature error value is greater than a first preset threshold value;

and the second processing unit is used for turning off the power supply of the heater if the first temperature error value is less than or equal to the first preset threshold value.

9. A temperature conditioning apparatus comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.

Technical Field

The present application belongs to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer storage medium for temperature adjustment.

Background

proportional-Integral-derivative (PID) algorithm is an integrated control algorithm combining three links of Proportion, Integral and derivative in industrial control. In the process of heating a pipeline, temperature needs to be adjusted, the existing temperature adjusting method mainly adopts a PID control algorithm, however, in the process of heating the pipeline, the temperature rise of a load has a large delay, the temperature is adjusted by adopting a standard PID control algorithm, and after the load temperature reaches a target temperature, although the output power is stopped, the load temperature can also rise at the moment, so that the actually reached temperature is higher than the target temperature. That is, the load temperature cannot be accurately regulated using a standard PID control algorithm.

Disclosure of Invention

The embodiment of the application provides a method, a device and equipment for regulating temperature and a computer storage medium, which can solve the problem that the load temperature cannot be accurately regulated by adopting a standard PID control algorithm.

In a first aspect, an embodiment of the present application provides a method for temperature adjustment, including:

acquiring real-time measured temperature acquired by a sensor;

determining a first temperature error value based on the real-time measured temperature and a reference temperature;

if the first temperature error value is larger than a first preset threshold value, calculating a target voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage;

if the first temperature error value is less than or equal to the first preset threshold, the power supply of the heater is turned off.

Further, the calculating a target voltage according to the first temperature error value and a preset pid algorithm, and controlling the heater according to the target voltage includes:

calculating the difference between the first temperature error value and the second temperature error value to obtain an initial error difference value; the second temperature error value is a first temperature error value obtained by previous calculation;

correcting the initial error difference value according to a preset error difference value range to obtain a target error difference value;

and calculating a target voltage according to the first temperature error value, the target error difference value and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage.

Further, the calculating a target voltage according to the first temperature error value and a preset pid algorithm, and controlling the heater according to the target voltage includes:

when the first temperature error value is larger than a second preset threshold value, adding a first error value to a preset proportionality coefficient to obtain a target proportionality coefficient;

when the first temperature error value is smaller than a third preset threshold value, subtracting a second error value from a preset proportional coefficient to obtain a target proportional coefficient;

and calculating a target voltage according to the first temperature error value, the target proportional coefficient and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage.

Further, before the calculating a target voltage according to the first temperature error value, the target proportionality coefficient and a preset proportional-integral-derivative algorithm and controlling the heater according to the target voltage, the method further includes:

when the target proportionality coefficient is larger than a preset proportionality coefficient upper limit value, taking the preset proportionality coefficient upper limit value as the target proportionality coefficient;

and when the target proportionality coefficient is smaller than the preset proportionality coefficient lower limit value, taking the preset proportionality coefficient lower limit value as the target proportionality coefficient.

Further, the calculating a target voltage according to the first temperature error value and a preset pid algorithm, and controlling the heater according to the target voltage includes:

calculating a target cumulative error value based on the first temperature error value;

when the target accumulative error value is larger than a preset accumulative error upper limit value, taking the preset accumulative error upper limit value as the target accumulative error value;

when the target accumulated error value is smaller than a preset accumulated error lower limit value, taking the preset accumulated error lower limit value as the target accumulated error value;

and calculating a target voltage according to the first temperature error value, the target accumulated error value and a preset proportional integral derivative algorithm, and controlling the heater according to the target voltage.

Further, the calculating a target cumulative error value as a function of the first temperature error value comprises:

when the first temperature error value is larger than a fourth preset threshold value, calculating a target cumulative error value according to the first temperature error value and a preset cumulative error value; the preset accumulated error value is a target accumulated error value obtained by last calculation;

setting a target cumulative error value to 0 when the first temperature error value is less than or equal to the fourth preset threshold.

Further, the calculating the target voltage according to the first temperature error value and a preset pid algorithm, and controlling the heater according to the target voltage includes:

calculating initial voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm;

when the initial output voltage is greater than or equal to a preset output voltage upper limit value, taking the output voltage upper limit value as a target voltage;

when the initial output voltage is smaller than or equal to a preset lower limit value of the output voltage, taking the lower limit value of the output voltage as a target voltage;

and controlling the heater according to the target voltage.

In a second aspect, an embodiment of the present application provides a temperature adjustment apparatus, including:

the first acquisition unit is used for acquiring the real-time measurement temperature acquired by the sensor;

a first determining unit for determining a first temperature error value based on the real-time measured temperature and a reference temperature;

the first processing unit is used for calculating a target voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm and controlling the heater according to the target voltage if the first temperature error value is greater than a first preset threshold value;

and the second processing unit is used for turning off the power supply of the heater if the first temperature error value is less than or equal to the first preset threshold value.

Further, the first processing unit is specifically configured to:

calculating the difference between the first temperature error value and the second temperature error value to obtain an initial error difference value; the second temperature error value is a first temperature error value obtained by previous calculation;

correcting the initial error difference value according to a preset error difference value range to obtain a target error difference value;

and calculating a target voltage according to the first temperature error value, the target error difference value and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage.

Further, the first processing unit is specifically configured to:

when the first temperature error value is larger than a second preset threshold value, adding a first error value to a preset proportionality coefficient to obtain a target proportionality coefficient;

when the first temperature error value is smaller than a third preset threshold value, subtracting a second error value from a preset proportional coefficient to obtain a target proportional coefficient;

and calculating a target voltage according to the first temperature error value, the target proportional coefficient and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage.

Further, the first processing unit is specifically further configured to:

when the target proportionality coefficient is larger than a preset proportionality coefficient upper limit value, taking the preset proportionality coefficient upper limit value as the target proportionality coefficient;

and when the target proportionality coefficient is smaller than the preset proportionality coefficient lower limit value, taking the preset proportionality coefficient lower limit value as the target proportionality coefficient.

Further, the first processing unit includes:

a calculation unit for calculating a target cumulative error value from the first temperature error value;

a third processing unit, configured to, when the target cumulative error value is greater than a preset cumulative error upper limit value, take the preset cumulative error upper limit value as the target cumulative error value;

a fourth processing unit, configured to, when the target cumulative error value is smaller than a preset cumulative error lower limit value, take the preset cumulative error lower limit value as the target cumulative error value;

and the fifth processing unit is used for calculating a target voltage according to the first temperature error value, the target accumulated error value and a preset proportional-integral-derivative algorithm and controlling the heater according to the target voltage.

Further, the computing unit is specifically configured to:

when the first temperature error value is larger than a fourth preset threshold value, calculating a target cumulative error value according to the first temperature error value and a preset cumulative error value; the preset accumulated error value is a target accumulated error value obtained by last calculation;

setting a target cumulative error value to 0 when the first temperature error value is less than or equal to the fourth preset threshold.

Further, the first processing unit is specifically configured to:

calculating initial voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm;

when the initial output voltage is greater than or equal to a preset output voltage upper limit value, taking the output voltage upper limit value as a target voltage;

when the initial output voltage is smaller than or equal to a preset lower limit value of the output voltage, taking the lower limit value of the output voltage as a target voltage;

and controlling the heater according to the target voltage.

In a third aspect, an embodiment of the present application provides a temperature adjustment apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor, when executing the computer program, implements the temperature adjustment method according to the first aspect.

In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including:

in a fifth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the temperature adjustment method according to the first aspect.

In the embodiment of the application, the real-time measured temperature acquired by the sensor is acquired; determining a first temperature error value based on the real-time measured temperature and a reference temperature; if the first temperature error value is larger than a first preset threshold value, calculating a target voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage; if the first temperature error value is less than or equal to the first preset threshold, the power supply of the heater is turned off. According to the scheme, the situation that delay exists in the rise of the load temperature in the heating process is considered, the first preset threshold is set, when the first temperature error is larger than the first preset threshold, the heater is controlled based on the target voltage, and when the first temperature error is smaller than or equal to the first preset threshold, the power supply of the heater is turned off, so that the load temperature cannot exceed the reference temperature, and the load temperature can be adjusted more accurately.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.

FIG. 1 is a schematic flow chart diagram of a method of temperature regulation provided in a first embodiment of the present application;

FIG. 2 is a schematic flow chart of a step of a method for temperature adjustment, according to a first embodiment of the present application, for calculating a target voltage according to the first temperature error value and a predetermined PID algorithm, and for controlling a heater according to the target voltage;

FIG. 3 is a schematic flow chart of a step of a method for temperature adjustment, according to a first embodiment of the present application, for calculating a target voltage according to the first temperature error value and a predetermined PID algorithm, and for controlling a heater according to the target voltage;

FIG. 4 is a schematic flow chart of a step of a method for temperature adjustment, according to a first embodiment of the present application, for calculating a target voltage according to the first temperature error value and a predetermined PID algorithm, and for controlling a heater according to the target voltage;

FIG. 5 is a schematic flow chart of a step of a method for temperature adjustment, according to a first embodiment of the present application, for calculating a target voltage according to the first temperature error value and a predetermined PID algorithm, and for controlling a heater according to the target voltage;

fig. 6 is a detailed schematic flowchart of S10312 in a method of temperature adjustment provided in the first embodiment of the present application;

FIG. 7 is a schematic flow chart of a step of a method for temperature adjustment, wherein a target voltage is calculated according to the first temperature error value and a predetermined PID algorithm, and a heater is controlled according to the target voltage;

FIG. 8 is a schematic view of a temperature regulating apparatus provided in a second embodiment of the present application;

fig. 9 is a schematic diagram of a temperature regulating apparatus provided in a third embodiment of the present application.

Detailed Description

In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.

It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.

It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".

Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.

Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.

Referring to fig. 1, fig. 1 is a schematic flow chart of a temperature adjustment method according to a first embodiment of the present application. The main execution body of the temperature adjusting method in this embodiment is a device with a temperature adjusting function, such as a desktop computer, a server, and the like. The method of temperature regulation as shown in fig. 1 may comprise:

s101: and acquiring the real-time measured temperature acquired by the sensor.

In this embodiment, the temperature of the heater is adjusted by the PID control algorithm, the target voltage is calculated by the PID control algorithm, and the voltage is adjusted based on the target voltage, so that the current can be changed to adjust the temperature.

In this embodiment, the device may acquire a real-time measured temperature acquired by the sensor, where the real-time measured temperature is a real temperature acquired at the current time, and the real-time measured temperature may be acquired by the sensor and sent to the local device by the sensor. For example, during the heating of the pipeline, a sensor installed inside the pipeline acquires a real-time measured temperature, and the device acquires a real-time measured temperature at the current moment.

S102: a first temperature error value is determined based on the real-time measured temperature and a reference temperature.

The device obtains a reference temperature, where the reference temperature may be stored in the device in advance, or may be calculated according to a calculation rule preset by the device, and this is not limited here.

The essence of the PID algorithm is that operation is carried out according to the input deviation value and the functional relation of proportion, integral and differential, so as to obtain an operation result, and the operation result is used for controlling output. In this embodiment, the real-time measured temperature and the reference temperature are the deviation values, so the device calculates the first temperature error value based on the real-time measured temperature and the reference temperature. Setting the first temperature error value as e (k), then e (k) is the real-time measured temperature-reference temperature.

S103: if the first temperature error value is larger than a first preset threshold value, calculating a target voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage.

A first preset threshold is prestored in the device, and is used for judging whether the heater can be controlled according to the target voltage. In the heating process, the load temperature rises with a delay, that is, in order to ensure that the real-time measured temperature rises with a certain delay and can be equal to or less than the reference temperature, a first preset threshold value can be set, when the first temperature error value is greater than the first preset threshold value, the heater can be controlled according to the target voltage at present, and then the target voltage is calculated according to the first temperature error value and a preset proportional-integral-derivative algorithm, and the heater is controlled according to the target voltage.

In this embodiment, the preset pid algorithm is:

U(k)=Kp×E(k)+Ki×Esum+Kd×[E(k)-E(k-1)];

wherein k is the PID control sampling period number, and in the first sampling period, k is 1; u (k) is a target voltage, Kp is a proportionality coefficient, E (k) is a first temperature error value, Ki is an integral coefficient, Esum is an accumulated error value, Kd is a derivative coefficient, and E (k) -E (k-1) is an error difference value.

The equipment can correct and adjust various parameters in a preset proportional-integral-derivative algorithm according to the first temperature error value, so that the calculated target voltage is more accurate, and the load temperature is accurately adjusted.

Further, in order to more accurately obtain the target voltage and thus accurately adjust the temperature, when the first temperature error value is greater than a first preset threshold, the step of calculating the target voltage according to the first temperature error value and a preset pid algorithm may include S1031 to S1033, where S1031 to S1033 are specifically as follows, as shown in fig. 2:

s10301: calculating the difference between the first temperature error value and the second temperature error value to obtain an initial error difference value; the second temperature error value is a first temperature error value obtained by previous calculation.

In this embodiment, in order to improve the accuracy of the calculated target voltage, the device corrects the initial error difference. And calculating the difference between the first temperature error value and the second temperature error value to obtain an initial error difference value, wherein the initial error difference value is the difference between the first temperature error value and the second temperature error value, and the second temperature error value is the first temperature error value obtained by previous calculation, namely the first temperature error value corresponding to the previous sampling period. E (k) is the first temperature error value, E (k-1) is the second temperature error value, and assuming the initial error difference value as Eo, the initial error difference value Eo ═ E (k) -E (k-1).

S10302: and correcting the initial error difference value according to a preset error difference value range to obtain a target error difference value.

The method comprises the steps that an error difference range is preset in the equipment, the error difference range comprises an error difference maximum value and an error difference minimum value, namely the error difference maximum value cannot exceed the error difference maximum value, the error difference minimum value cannot be smaller than the error difference minimum value, and the equipment corrects an initial error difference value according to the error difference range to obtain a target error difference value. For example, the maximum error difference value is 200 and the minimum error difference value is-200, if the initial error difference value is greater than 200, then the target error difference value is 200, and if the initial error difference value is less than-200, then the target error difference value is-200.

S10303: and calculating a target voltage according to the first temperature error value, the target error difference value and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage.

And after the initial error difference value is adjusted by the equipment, a target error difference value is obtained, a target voltage is calculated according to the first temperature error value, the target error difference value and a preset proportional-integral-derivative algorithm, and the heater is controlled according to the target voltage. For specific details, reference may be made to the related description in S103, and details are not described here.

Further, in order to more accurately obtain the target voltage and thus accurately adjust the temperature, when the first temperature error value is greater than the first preset threshold, the step of calculating the target voltage according to the first temperature error value and a preset pid algorithm may include steps S10304 to S10306, where, as shown in fig. 3, steps S10304 to S10306 are specifically as follows:

s10304: and when the first temperature error value is larger than a second preset threshold value, adding a first error value to a preset proportionality coefficient to obtain a target proportionality coefficient.

In this embodiment, in order to improve the accuracy of the calculated target voltage, the device corrects the preset scaling factor to obtain a target scaling factor, and calculates the target voltage according to the target scaling factor. And when the first temperature error value is greater than the second preset threshold value, adding the first error value to the preset proportionality coefficient to obtain a target proportionality coefficient. For example, when the first temperature error value is greater than 30, the preset scaling factor is increased by 1 to obtain the target scaling factor.

S10305: and when the first temperature error value is smaller than a third preset threshold value, subtracting a second error value from a preset proportional coefficient to obtain a target proportional coefficient.

And when the first temperature error value is greater than the third preset threshold value, adding the second error value to the preset proportionality coefficient to obtain a target proportionality coefficient. For example, when the first temperature error value is less than 15, the preset scaling factor is subtracted by 8 to obtain the target scaling factor.

S10306: and calculating a target voltage according to the first temperature error value, the target proportional coefficient and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage.

And after the equipment adjusts the preset proportional coefficient, obtaining a target proportional coefficient, calculating a target voltage according to the first temperature error value, the target proportional coefficient and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage. For specific details, reference may be made to the related description in S103, and details are not described here.

Further, in order to more accurately obtain the target proportionality coefficient, accurately calculate the target voltage, and thus accurately adjust the temperature, when the first temperature error value is greater than the first preset threshold, the step of calculating the target voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage may include S10307 to S10311, where S10307 to S10308 are the same as S10304 to S10305, and S10311 is the same as S10306, in this embodiment, S10309 to S10310 may be performed before S10311, as shown in fig. 4, S10309 to S10310 are specifically as follows:

s10309: and when the target proportionality coefficient is larger than a preset proportionality coefficient upper limit value, taking the preset proportionality coefficient upper limit value as the target proportionality coefficient.

After the device corrects the preset scaling factor according to the first temperature error value to obtain the target scaling factor, the device may further correct the target scaling factor based on an upper limit value and a lower limit value of the preset scaling factor, where the upper limit value and the lower limit value of the target scaling factor are preset in the device, and the target scaling factor may not be greater than the upper limit value of the preset scaling factor nor less than the lower limit value of the preset scaling factor. When the target scaling factor is greater than the preset scaling factor upper limit value, the device takes the preset scaling factor upper limit value as the target scaling factor, for example, the preset scaling factor upper limit value is 128, and when the target scaling factor is greater than 128, takes 128 as the target scaling factor.

S10310: and when the target proportionality coefficient is smaller than the preset proportionality coefficient lower limit value, taking the preset proportionality coefficient lower limit value as the target proportionality coefficient.

When the target scaling factor is smaller than the preset scaling factor lower limit value, the device takes the preset scaling factor lower limit value as the target scaling factor, for example, the preset scaling factor lower limit value is 2, and when the target scaling factor is smaller than 2, takes 2 as the target scaling factor.

Further, in order to more accurately obtain the target voltage and thus accurately adjust the temperature, when the first temperature error value is greater than a first preset threshold, the step of calculating the target voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm may include steps S10312 to S10315, as shown in fig. 5, where steps S10312 to S10315 are specifically as follows:

s10312: a target cumulative error value is calculated based on the first temperature error value.

In this embodiment, the device corrects the cumulative error value. The device calculates a target cumulative error value based on the first temperature error value, the target cumulative error value being a sum of error values calculated over a plurality of samplings. The device can obtain a target accumulated error obtained by last sampling calculation, accumulate the first temperature error value and a preset accumulated error obtained by last calculation, and correct the preset accumulated error to obtain a target accumulated error value.

Further, in order to more accurately acquire the target voltage and thus accurately adjust the temperature, S10312 may include S103121 to S103122, as shown in fig. 6, where S103121 to S103122 are specifically as follows:

s103121: when the first temperature error value is larger than a fourth preset threshold value, calculating a target cumulative error value according to the first temperature error value and a preset cumulative error value; the preset accumulated error value is a target accumulated error value obtained by last calculation.

A fourth preset threshold is preset in the device and used for determining the target cumulative error value. When the first temperature error value is greater than the fourth preset threshold value, a target cumulative error value is calculated according to the first temperature error value and a preset cumulative error value, wherein the preset cumulative error value is the target cumulative error value obtained by the last calculation. For example, the fourth preset threshold is set to 110, and when the first temperature error value is greater than 110, the device may calculate the target cumulative error value through a preset formula, where the preset formula may be:

Esum=Esum0+(Ki×E(k)/32)

esum is the target cumulative error value, Esum0 is the last calculated target cumulative error value.

S103122: setting a target cumulative error value to 0 when the first temperature error value is less than or equal to the fourth preset threshold.

The target cumulative error value is set to 0 when the first temperature error value is less than or equal to a fourth preset threshold, e.g., the fourth preset threshold is set to 110, and the target cumulative error value is set to 0 when the first temperature error value is less than 110.

S10313: and when the target accumulated error value is larger than a preset accumulated error upper limit value, taking the preset accumulated error upper limit value as the target accumulated error value.

The device presets a preset accumulated error upper limit value and a preset accumulated error lower limit value, and corrects a target accumulated error based on the preset accumulated error upper limit value and the preset accumulated error lower limit value, wherein the target accumulated error cannot be greater than the preset accumulated error upper limit value or smaller than the preset accumulated error lower limit value. When the target cumulative error value is greater than the preset cumulative error value upper limit value, the device takes the preset cumulative error value upper limit value as the target cumulative error value, for example, the preset cumulative error value upper limit value is 1200, and when the target cumulative error value is greater than 1200, the device takes 1200 as the target cumulative error value.

S10314: and when the target accumulated error value is smaller than a preset accumulated error lower limit value, taking the preset accumulated error lower limit value as the target accumulated error value.

When the target cumulative error value is smaller than the preset cumulative error value lower limit value, the device takes the preset cumulative error value lower limit value as the target cumulative error value, for example, the preset cumulative error lower limit value is-1200, and when the target cumulative error value is smaller than-1200, the device takes-1200 as the target cumulative error value.

S10315: and calculating a target voltage according to the first temperature error value, the target accumulated error value and a preset proportional integral derivative algorithm, and controlling the heater according to the target voltage.

And after the device adjusts the preset accumulated error value, obtaining a target accumulated error value, calculating a target voltage according to the first temperature error value, the target accumulated error value and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage. For specific details, reference may be made to the related description in S103, and details are not described here.

Further, in order to more accurately obtain the target voltage and thus accurately adjust the temperature, when the first temperature error value is greater than a first preset threshold, the step of calculating the target voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm may include steps S10316 to S10319, as shown in fig. 7, where steps S10316 to S10319 are specifically as follows:

s10316: and calculating initial voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm.

Details of calculating the initial voltage in S10316 may refer to the relevant description in S103, and are not described herein again.

S10317: and when the initial voltage is greater than or equal to a preset output voltage upper limit value, taking the output voltage upper limit value as a target voltage.

The device is preset with a preset output voltage upper limit value and a preset output voltage lower limit value, the device corrects a target accumulated error based on the preset output voltage upper limit value and the preset output voltage lower limit value, and the target accumulated error cannot be larger than the output voltage upper limit value or smaller than the output voltage lower limit value. When the initial voltage is greater than the output voltage upper limit value, the device takes the output voltage upper limit value as a target voltage.

S10318: and when the initial output voltage is less than or equal to a preset lower limit value of the output voltage, taking the lower limit value of the output voltage as a target voltage.

And when the initial output voltage is less than or equal to the preset lower limit value of the output voltage, taking the lower limit value of the output voltage as the target voltage.

S10319: and controlling the heater according to the target voltage.

S10319 may refer to the related description in S103, and is not described herein again.

In this embodiment, the preset scaling factor, the accumulated error value, the error difference value, and the initial voltage may also be corrected at the same time, or one or more of them may also be corrected, which is not limited herein.

S104: if the first temperature error value is less than or equal to the first preset threshold, the power supply of the heater is turned off.

The device compares the first temperature error value with a first preset threshold value, and if the first temperature error value is smaller than or equal to the first preset threshold value, the power supply of the heater is turned off to prevent the temperature from exceeding the reference temperature.

In the embodiment of the application, the real-time measured temperature acquired by the sensor is acquired; determining a first temperature error value based on the real-time measured temperature and a reference temperature; if the first temperature error value is larger than a first preset threshold value, calculating a target voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage; if the first temperature error value is less than or equal to the first preset threshold, the power supply of the heater is turned off. According to the scheme, the situation that delay exists in the rise of the load temperature in the heating process is considered, the first preset threshold is set, when the first temperature error is larger than the first preset threshold, the heater is controlled based on the target voltage, and when the first temperature error is smaller than or equal to the first preset threshold, the power supply of the heater is turned off, so that the load temperature cannot exceed the reference temperature, and the load temperature can be adjusted more accurately.

It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

Referring to fig. 8, fig. 8 is a schematic view of a temperature adjustment device according to a second embodiment of the present application. The units included are used to perform the steps in the embodiments corresponding to fig. 1-7. Please refer to the related description of the embodiments corresponding to fig. 1 to fig. 7. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 8, the temperature adjusting device 8 includes:

the first obtaining unit 810 is configured to obtain a real-time measured temperature collected by the sensor;

a first determining unit 820 for determining a first temperature error value based on the real-time measured temperature and a reference temperature;

a first processing unit 830, configured to calculate a target voltage according to the first temperature error value and a preset pid algorithm if the first temperature error value is greater than a first preset threshold, and control the heater according to the target voltage;

the second processing unit 840 is configured to turn off the power supply of the heater if the first temperature error value is less than or equal to the first preset threshold.

Further, the first processing unit 830 is specifically configured to:

calculating the difference between the first temperature error value and the second temperature error value to obtain an initial error difference value; the second temperature error value is a first temperature error value obtained by previous calculation;

correcting the initial error difference value according to a preset error difference value range to obtain a target error difference value;

and calculating a target voltage according to the first temperature error value, the target error difference value and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage.

Further, the first processing unit 830 is specifically configured to:

when the first temperature error value is larger than a second preset threshold value, adding a first error value to a preset proportionality coefficient to obtain a target proportionality coefficient;

when the first temperature error value is smaller than a third preset threshold value, subtracting a second error value from a preset proportional coefficient to obtain a target proportional coefficient;

and calculating a target voltage according to the first temperature error value, the target proportional coefficient and a preset proportional-integral-derivative algorithm, and controlling the heater according to the target voltage.

Further, the first processing unit is specifically further configured to:

when the target proportionality coefficient is larger than a preset proportionality coefficient upper limit value, taking the preset proportionality coefficient upper limit value as the target proportionality coefficient;

and when the target proportionality coefficient is smaller than the preset proportionality coefficient lower limit value, taking the preset proportionality coefficient lower limit value as the target proportionality coefficient.

Further, the first processing unit 830 includes:

a calculation unit for calculating a target cumulative error value from the first temperature error value;

a third processing unit, configured to, when the target cumulative error value is greater than a preset cumulative error upper limit value, take the preset cumulative error upper limit value as the target cumulative error value;

a fourth processing unit, configured to, when the target cumulative error value is smaller than a preset cumulative error lower limit value, take the preset cumulative error lower limit value as the target cumulative error value;

and the fifth processing unit is used for calculating a target voltage according to the first temperature error value, the target accumulated error value and a preset proportional-integral-derivative algorithm and controlling the heater according to the target voltage.

Further, the computing unit is specifically configured to:

when the first temperature error value is larger than a fourth preset threshold value, calculating a target cumulative error value according to the first temperature error value and a preset cumulative error value; the preset accumulated error value is a target accumulated error value obtained by last calculation;

setting a target cumulative error value to 0 when the first temperature error value is less than or equal to the fourth preset threshold.

Further, the first processing unit 830 is specifically configured to:

calculating initial voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm;

when the initial output voltage is greater than or equal to a preset output voltage upper limit value, taking the output voltage upper limit value as a target voltage;

when the initial output voltage is smaller than or equal to a preset lower limit value of the output voltage, taking the lower limit value of the output voltage as a target voltage;

and controlling the heater according to the target voltage.

Fig. 9 is a schematic diagram of a temperature regulating apparatus provided in a third embodiment of the present application. As shown in fig. 9, the temperature-regulated apparatus 9 of this embodiment includes: a processor 90, a memory 91 and a computer program 92, such as a temperature regulating program, stored in said memory 91 and executable on said processor 90. The processor 90, when executing the computer program 92, implements the steps in the various temperature-adjusted method embodiments described above, such as steps 101-104 shown in fig. 1. Alternatively, the processor 90, when executing the computer program 92, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 810 to 840 shown in fig. 8.

Illustratively, the computer program 92 may be partitioned into one or more modules/units that are stored in the memory 91 and executed by the processor 90 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 92 in the temperature regulated device 9. For example, the computer program 92 may be divided into a first acquiring unit, a first determining unit, a first processing unit, and a second processing unit, and the specific functions of each unit are as follows:

the first acquisition unit is used for acquiring the real-time measurement temperature acquired by the sensor;

a first determining unit for determining a first temperature error value based on the real-time measured temperature and a reference temperature;

the first processing unit is used for calculating a target voltage according to the first temperature error value and a preset proportional-integral-derivative algorithm and controlling the heater according to the target voltage if the first temperature error value is greater than a first preset threshold value;

and the second processing unit is used for turning off the power supply of the heater if the first temperature error value is less than or equal to the first preset threshold value.

The temperature regulating device may include, but is not limited to, a processor 90, a memory 91. It will be appreciated by those skilled in the art that fig. 9 is merely an example of a temperature regulated device 9 and does not constitute a limitation of the temperature regulated device 9 and may include more or fewer components than shown, or some components may be combined, or different components, e.g. the temperature regulated device may also include input output devices, network access devices, buses, etc.

The Processor 90 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

The memory 91 may be an internal storage unit of the temperature regulated device 9, such as a hard disk or a memory of the temperature regulated device 9. The memory 91 may also be an external storage device of the temperature-adjusting device 9, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the temperature-adjusting device 9. Further, the temperature-regulated device 9 may also include both an internal storage unit and an external storage device of the temperature-regulated device 9. The memory 91 is used for storing the computer program and other programs and data required by the temperature regulated device. The memory 91 may also be used to temporarily store data that has been output or is to be output.

It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.

It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

An embodiment of the present application further provides a network device, where the network device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the various method embodiments described above when executing the computer program.

The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.

The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), random-access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.

In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.

Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.

In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种应用于红薯贮藏保鲜的智能控制系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!