CN116577979A - Method and device for calculating control variable based on environment variable - Google Patents

Method and device for calculating control variable based on environment variable Download PDF

Info

Publication number
CN116577979A
CN116577979A CN202310854174.3A CN202310854174A CN116577979A CN 116577979 A CN116577979 A CN 116577979A CN 202310854174 A CN202310854174 A CN 202310854174A CN 116577979 A CN116577979 A CN 116577979A
Authority
CN
China
Prior art keywords
variable
value
trend
interval
environment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310854174.3A
Other languages
Chinese (zh)
Inventor
樊海军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hozon New Energy Automobile Co Ltd
Original Assignee
Hozon New Energy Automobile Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hozon New Energy Automobile Co Ltd filed Critical Hozon New Energy Automobile Co Ltd
Priority to CN202310854174.3A priority Critical patent/CN116577979A/en
Publication of CN116577979A publication Critical patent/CN116577979A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
    • G05B13/0205Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric not using a model or a simulator of the controlled system
    • G05B13/024Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric not using a model or a simulator of the controlled system in which a parameter or coefficient is automatically adjusted to optimise the performance
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The invention discloses a method and a device for calculating a control variable based on an environment variable and a computer readable storage medium. The method comprises the steps of judging the change trend of the environmental variable acquisition value; determining a section of the environment variable collection value in the environment variable section, wherein the jth uplink critical value is larger than the jth downlink critical value; and outputting a control quantity output value associated with the determined section. If the change trend of the environment variable changes, because the interval section of the uplink trend and the interval section of the downlink trend are in a cross design, the jth uplink critical value is larger than the jth downlink critical value, and when the environment variable is at the uplink critical value or the downlink critical value, after the change trend changes, the ith interval section of the uplink trend is related to the ith control quantity output value and the ith interval section of the downlink trend is related to the ith control quantity output value, so that the probability of change can be reduced, and the continuous jump phenomenon is reduced.

Description

Method and device for calculating control variable based on environment variable
Technical Field
The present invention relates to the field of computer and automatic control technologies, and in particular, to a method and apparatus for calculating a control variable based on an environmental variable, and a computer readable storage medium.
Background
Electronic products become necessary articles for life, and in work, interaction with people and environment is not enough. There is always a difference from the digital control of electronic products, whether it is a human operation or a change in the environment. This difference is essentially the control of the threshold. That is, in realizing the function of the electronic product, it is necessary to control the critical value.
For example, the function of changing the brightness of a large-screen backlight of a computer for a vehicle running along with the intensity of ambient light needs to sense the intensity of the ambient light through a photoresistor and control the brightness of the backlight according to a certain algorithm. However, since the change in ambient light is continuous and the calculation of the algorithm is discrete, when the light intensity reaches a certain level, an abrupt change in the backlight brightness occurs, which is an effect of the threshold value.
For another example, in a conventional key operation of an electronic product, a human cannot feel a shake of a pressing process, and the digital chip can completely detect the shake. For the anti-shake design of the key, there is a mechanical anti-shake method: such as bistable anti-shake techniques and filtered anti-shake techniques. There is also a software anti-shake method for keys. The software anti-shake method is to continuously detect the key value until the key value is stable.
Critical value optimization control is one of the key issues of electronic product interaction with people and the environment. At present, the critical value control has the problem of low experience. If the brightness of the computer large-screen backlight lamp for the vehicle driving is changed along with the high-frequency intensity of the ambient light, the problem of frequent jumping occurs. The critical value control needs to be further optimized, so that the critical value control is better suitable for different application scenes, and the performance and stability of the electronic product are improved.
Disclosure of Invention
The object of the present invention is to solve at least to some extent one of the above-mentioned technical problems.
To this end, a first object of the present invention is to propose a method for calculating a control variable based on an environmental variable, mainly aimed at achieving the aim of obtaining an accurate control variable finally by optimal control of a critical value.
To achieve the above object, an embodiment of the first aspect of the present invention provides a method for calculating a control variable based on an environmental variable, the method including:
judging a change trend of an environment variable acquisition value, wherein the environment variable acquisition value is acquired in a range of an environment variable interval, the change trend comprises an uplink trend and a downlink trend, the environment variable interval is divided into interval sections of M uplink trends by M-1 ascending critical values under the uplink trend, the environment variable interval is divided into interval sections of M downlink trends by M-1 descending critical values under the downlink trend, and M is more than or equal to 2 and is a positive integer;
Determining that the variable value of the environment variable acquisition value is in a section of an environment variable section, wherein the determined section is a section under a determined change trend, the ith section of an uplink trend is associated with the ith control quantity output value, the ith section of a downlink trend is associated with the ith control quantity output value, the jth uplink critical value is larger than the jth downlink critical value, M is more than or equal to 1 and is a positive integer, and M-1 is more than or equal to 1 and is a positive integer;
and outputting a control quantity output value associated with the determined section.
According to the method for calculating the control variable based on the environment variable, if the change trend of the environment variable is changed, as the interval section of the uplink trend and the interval section of the downlink trend are in a cross design, the j-th uplink critical value is larger than the j-th downlink critical value, and when the environment variable is in the uplink critical value or the downlink critical value, after the change trend is converted, the i-th interval section of the uplink trend is related to the i-th control quantity output value and the i-th interval section of the downlink trend is related to the i-th control quantity output value, so that the probability of change can be reduced, and the occurrence of continuous jump phenomenon is reduced.
According to one embodiment of the present invention, the jth upstream threshold is less than the jth +1th downstream threshold.
According to one embodiment of the invention, the environment variable interval includes N incremental partition thresholds; m-1 ascending critical values and M-1 descending critical values are respectively selected from the N ascending dividing critical values, the kth ascending critical value in the M-1 ascending critical values and the kth descending critical value in the M-1 descending critical values are adjacent dividing critical values in the N ascending dividing critical values, and M-1 is more than or equal to k and is more than or equal to 1 and is a positive integer.
According to one embodiment of the present invention, the environmental variables are at least three environmental variables collected at intervals, and the determining the trend of the environmental variable collection value includes:
if the variable values of at least three environmental variables acquired at intervals are continuously increased, judging that the change trend of the environmental variables is in an uplink trend;
if the variable values of at least three environmental variables acquired at intervals are continuously reduced, judging that the change trend of the environmental variables is in a downlink trend;
the determining the interval section where the variable value of the environment variable acquisition value is in the environment variable interval comprises the following steps:
and determining the interval section of the environment variable interval of the finally acquired environment variable acquisition value.
According to one embodiment of the present invention, the variation trend includes a parallel trend, and the determining the variation trend of the environmental variable collection value includes:
If the at least three environment variables acquired at intervals comprise variable value increase and variable value decrease, judging that the variation trend of the environment variables is in parallel trend, and canceling the step of determining the interval section of the environment variable interval where the variable value of the environment variable acquisition value is.
According to one embodiment of the present invention, the ambient variable collection value is an ambient brightness value, and the control amount output value is a display brightness value.
According to one embodiment of the present invention, the environment variable collection value is an environment sound value, and the control quantity output value is a speaker sound value.
To achieve the above object, an embodiment of the second aspect of the present invention provides an apparatus for calculating a control variable based on an environmental variable, the apparatus including:
the judging unit is used for judging the change trend of the environment variable acquisition value, wherein the environment variable acquisition value is acquired in the range of an environment variable interval, the change trend comprises an uplink trend and a downlink trend, the environment variable interval is divided into interval sections of M uplink trends by M-1 ascending critical values under the uplink trend, and the environment variable interval is divided into interval sections of M downlink trends by M-1 descending critical values under the downlink trend, wherein M is more than or equal to 2 and is a positive integer;
The determining unit is used for determining that the variable value of the environment variable acquisition value is located in a section of an environment variable section, wherein the determined section is a section under the determined change trend, the ith section of the uplink trend is associated with the ith control quantity output value, the ith section of the downlink trend is associated with the ith control quantity output value, the jth uplink critical value is larger than the jth downlink critical value, M is larger than or equal to 1 and is a positive integer, and M-1 is larger than or equal to 1 and is a positive integer;
and an output unit configured to output a control amount output value associated with the determined section.
To achieve the above object, an electronic device according to an embodiment of a third aspect of the present invention includes: the method for calculating the control variable based on the environment variable according to the embodiment of the first aspect of the invention is realized by a memory, a processor and a computer program stored in the memory and capable of running on the processor when the processor executes the computer program.
To achieve the above object, a fourth aspect of the present invention provides a computer readable storage medium, where the computer program is executed by a processor to implement the method for calculating a control variable based on an environmental variable according to the first aspect of the present invention.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart of a method of calculating a threshold control;
FIG. 2 is a flow chart of a method of calculating a control variable based on an environmental variable according to one embodiment of the invention;
FIG. 3 is a flow chart of a method of calculating a control variable based on an environmental variable in accordance with another embodiment of the present invention;
FIG. 4 is a flow chart of a method of calculating a control variable based on an environmental variable in accordance with yet another embodiment of the present invention;
FIG. 5 is a schematic diagram of an apparatus for calculating a control variable based on an environmental variable in accordance with one embodiment of the invention;
FIG. 6 is a schematic diagram of an apparatus for calculating a control variable based on an environmental variable in accordance with another embodiment of the present invention;
fig. 7 is a schematic structural view of an electronic device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
FIG. 1 is a flow chart of a method of calculating a threshold control. In the method for calculating the threshold control, as shown in fig. 1, the following algorithm may be used:
s1: the sensor collects the environmental variable collection value of the environmental factors, and converts the environmental variable collection value into a dividing digital signal critical value and outputs the dividing digital signal critical value. The collected environmental factor values are divided into I0, I1, I2, I3, I4, I5, I6 and I7, and divided into four sections (first sections I0-I2, second sections I2-I4, third sections I4-I6 and fourth sections I6-I7), wherein the external environmental factors can be the intensity of the environmental light or the speed of the vehicle as in the case.
S2: and (3) converting the four sections of sensor acquisition values (environmental variable acquisition values are converted into divided digital signal critical values) input by the S1 into control output quantities (C1, C2, C3 and C4), wherein the control output quantities correspond to the brightness of the large-screen backlight lamp or the loudness of the sound output of the vehicle.
In the method, if the variable value of the environment variable acquisition value is a digital signal critical value between two segments, the external environment factors are easy to control the repeated fluctuation of the output quantity under the condition of repeated fluctuation. The brightness of the large-screen backlight lamp is high or low, or the vehicle sound output is high or low.
To this end, the present invention proposes a method and apparatus and a computer-readable storage medium for calculating a control variable based on an environmental variable.
In particular, a method and apparatus for calculating a control variable based on an environmental variable and a computer-readable storage medium according to embodiments of the present invention are described below with reference to the accompanying drawings.
FIG. 2 is a flow chart of a method of calculating a control variable based on an environmental variable in accordance with one embodiment of the present invention. It should be noted that, the method for calculating the control variable based on the environment variable according to the embodiment of the present invention may be applied to the device for calculating the control variable based on the environment variable according to the embodiment of the present invention, and the device may be configured on the device for calculating the control variable based on the environment variable or may be configured in a server. The device for calculating the control variable based on the environment variable may be an in-vehicle device. The embodiment of the present invention is not limited thereto.
As shown in fig. 2, a method of calculating a control variable based on an environmental variable, the method comprising:
s110, judging a change trend of an environment variable acquisition value, wherein the environment variable acquisition value is acquired in a range of an environment variable interval, the change trend comprises an uplink trend and a downlink trend, the environment variable interval is divided into interval sections of M uplink trends by M-1 ascending critical values under the uplink trend, and the environment variable interval is divided into interval sections of M downlink trends by M-1 descending critical values under the downlink trend, wherein M is more than or equal to 2 and is a positive integer;
The environment variable interval is an interval in which environment variables can be identified, namely, the environment variables in the interval range are acquired and identified.
The environmental variable acquisition value can be an environmental variable acquired by a sensor and converted into a numerical value which is output as a digital signal.
In the process of judging the change trend of the environment variable, the analysis can be performed through the environment variable acquisition values acquired at intervals. The environmental variable acquisition value is at least two values acquired at intervals. If the values acquired at least at two intervals are gradually increased, the change trend can be judged to be in an uplink trend. If the at least two continuously collected values are gradually reduced, the change trend can be judged to be in a downlink trend.
S120, determining that the variable value of the environment variable acquisition value is in a section of an environment variable section, wherein the determined section is a section under a determined change trend, the ith section of an uplink trend is associated with the ith control quantity output value, the ith section of a downlink trend is associated with the ith control quantity output value, the jth uplink critical value is larger than the jth downlink critical value, M is more than or equal to 1 and is a positive integer, and M-1 is more than or equal to 1 and is a positive integer;
if the environment variable acquisition value is judged to be an uplink trend, the environment variable acquisition value is matched and determined in the interval section of the uplink trend, and the environment variable acquisition value is determined to be in the interval section of the uplink trend. If the environment variable acquisition value is judged to be a downlink trend, the environment variable acquisition value is matched and determined in the interval section of the downlink trend, and the environment variable acquisition value is determined to be in the interval section of the downlink trend.
And when the environment variable acquisition value falls into the interval range, the interval of the environment variable interval is the interval in which the environment variable acquisition value is positioned. The control amount output values associated with different sections of the upstream trend may be different, and the control amount output values associated with different sections of the downstream trend may be different. Therefore, after the environment variable acquisition value is different from the control quantity output value corresponding to the environment variable acquisition value in different intervals of the environment variable interval.
Specifically, the jth uplink threshold is less than the jth+1th downlink threshold. The ith interval section of the uplink trend and the ith interval section of the downlink trend can be staggered.
When the environment variables are at least two environment variables acquired at intervals, selecting a section of the environment variable section where the last acquired environment variable acquisition value is located as a section of the environment variable section where the environment variable acquisition value is located.
S130, outputting a control quantity output value associated with the determined interval section.
If the environment variable acquisition value is in the two sides fluctuation of the j-th critical value between the two interval sections:
when the change trend of the environmental variable is changed from the uplink trend to the downlink trend, the following analysis can be performed:
if the change trend of the environmental variable acquisition value starts to be in the upward trend, the environmental variable acquisition value increases to pass through the jth upward critical value, and then the control quantity output value is converted from the jth control quantity output value associated with the jth upward critical value to the jth+1th control quantity output value associated with the jth upward critical value. When the change trend of the environment variable starts to be changed and is in a downlink trend, the environment variable acquisition value is reduced to pass through the jth uplink critical value, and the environment variable acquisition value cannot directly pass through the jth downlink critical value because the jth uplink critical value is larger than the jth downlink critical value, so that the control quantity output value can be output as the jth control quantity output value associated with the jth downlink critical value without direct jump.
Similarly, if the change trend of the environmental variable collection value starts to be in the downlink trend, and when the change trend of the environmental variable starts to be converted and is in the uplink trend, the control quantity output value can not jump directly.
It is easy to understand that the control quantity output value is matched with different control parameters according to different application scenes. For example, when the ambient variable collection value is an ambient brightness value, the control amount output value is a display brightness value. For another example, when the environment variable collection value is an environment sound volume value, the control quantity output value is a speaker sound volume value. It can be understood that the above two application scenarios are merely two embodiments of the present invention, but not limited thereto, and the method for calculating the control variable based on the environment variable according to the present invention can implement multi-scenario application.
According to the method for calculating the control variable based on the environment variable, if the change trend of the environment variable is changed, as the interval section of the uplink trend and the interval section of the downlink trend are in a cross design, the j-th uplink critical value is larger than the j-th downlink critical value, and when the environment variable is in the uplink critical value or the downlink critical value, after the change trend is converted, the i-th interval section of the uplink trend is related to the i-th control quantity output value and the i-th interval section of the downlink trend is related to the i-th control quantity output value, so that the probability of change can be reduced, and the occurrence of continuous jump phenomenon is reduced.
In a specific implementation, the environment variable interval includes N incremental partition thresholds; m-1 ascending critical values and M-1 descending critical values are respectively selected from the N ascending dividing critical values, the kth ascending critical value in the M-1 ascending critical values and the kth descending critical value in the M-1 descending critical values are adjacent dividing critical values in the N ascending dividing critical values, and M-1 is more than or equal to k and is more than or equal to 1 and is a positive integer. For easier understanding of the present invention by those skilled in the art, fig. 3 is a flowchart of a method of calculating a control variable based on an environmental variable according to still another embodiment of the present invention; in the specific implementation that can be referred to, the N incremental division thresholds can be divided into I0, I1, I2, I3, I4, I5, I6, I7. The method comprises the following steps:
the change trend comprises an uplink trend and a downlink trend, under the uplink trend, the environment variable interval is divided into M interval sections of the uplink trend by M-1 ascending critical values, under the downlink trend, the environment variable interval is divided into M interval sections of the downlink trend by M-1 descending critical values, and M is more than or equal to 2 and is a positive integer;
M-1 ascending critical values and M-1 descending critical values are respectively selected from the N ascending dividing critical values, the kth ascending critical value in the M-1 ascending critical values and the kth descending critical value in the M-1 descending critical values are adjacent dividing critical values in the N ascending dividing critical values, and M-1 is more than or equal to k and is more than or equal to 1 and is a positive integer;
m-1 ascending critical values are I2, I4 and I6 respectively. The interval section of the uplink trend is divided into:
a first interval section: i0, I0 to I1, I1 to I2, I2. (including I0, I2)
A second interval section: I2-I3, I3-I4, I4. (including I4)
Third interval: I4-I5, I5-I6, I6. (including I6)
Fourth interval: i6 to I7, I7. (including I7)
M-1 ascending downlink critical values are I1, I3 and I5 respectively. The interval section of the downlink trend is divided into:
a first interval section: i0, I0 to I1, I1. (including I0, I1)
A second interval section: I1-I2, I2-I3, I3. (including I3)
Third interval: I3-I4, I4-I5, I5. (including I5)
Fourth interval: I5-I6, I6-I7, I7. (including I7)
The determined interval is an interval under the determined change trend, the ith interval of the uplink trend is related to the ith control quantity output value, the ith interval of the downlink trend is related to the ith control quantity output value, the jth uplink critical value is larger than the jth downlink critical value, M is more than or equal to i and more than or equal to 1 and is a positive integer, and M-1 is more than or equal to j and is more than or equal to 1 and is a positive integer;
The output value association of the control quantity of the interval section of the uplink trend is as follows:
p1: a first interval section: i0, I0-I1, I1-I2, I2 (including I2). The first interval association control amount output value outputs C1.
P2: a second interval section: I2-I3, I3-I4, I4 (including I4). The second interval association control amount output value outputs C2.
P3: third interval: I4-I5, I5-I6, I6 (including I6). And outputting C3 by the third interval related control quantity output value.
P4: fourth interval: I6-I7, I7 (including I7). And outputting C4 by the fourth interval related control quantity output value.
The interval control quantity output value association of the downlink trend is as follows:
p5: a first interval section: i0, I0 to I1, I1 (including I0, I1). The first interval association control amount output value outputs C1.
P6: a second interval section: I1-I2, I2-I3, I3 (including I3). The second interval association control amount output value outputs C2.
P7: third interval: I3-I4, I4-I5, I5 (including I5). And outputting C3 by the third interval related control quantity output value.
P8: fourth interval: I5-I6, I6-I7, I7 (including I7). And outputting C4 by the fourth interval related control quantity output value.
In the method for calculating the critical value control in fig. 1, when the environmental variable acquisition value repeatedly jumps between I2 and I3, the control variable output value repeatedly jumps between C1 and C2. In the present reference implementation, when the environmental variable acquisition value repeatedly jumps between I2 and I3, the control value output value always outputs C2.
According to the method for calculating the control variable based on the environment variable, if the change trend of the environment variable is changed, as the interval of the uplink trend and the interval of the downlink trend are in a cross design, the j-th uplink critical value is larger than the j-th downlink critical value, the k-th uplink critical value in the M-1 ascending critical values and the k-th downlink critical value in the M-1 ascending critical values are adjacent division critical values in the N ascending division critical values, when the environment variable is at the uplink critical value or the downlink critical value, after the change trend is changed, the critical value of the previous interval is just the most stable value of the next interval, the continuous jump phenomenon can be reduced, when the environment factor is stable, the trend is stable, the control output value is also stable, and therefore the problem of the critical value of the environment factor is well avoided.
According to the method for calculating the control variable based on the environment variable, the environment variable acquisition value can be at least three values acquired at intervals in the change trend of the environment variable acquisition value. The ambient variable acquisition values may be at least three values acquired at intervals. If the variable values of at least three environmental variables acquired at intervals are continuously increased, judging that the change trend of the environmental variables is in an uplink trend; if the variable values of at least three environmental variables acquired at intervals are continuously reduced, judging that the change trend of the environmental variables is in a downlink trend.
FIG. 4 is a flowchart of a method of calculating a control variable based on an environmental variable, in accordance with yet another embodiment of the present invention; in a specific embodiment, referring to fig. 4, in determining the trend of the environmental variable collection value, steps T1 and T2 collect the environmental variable collection values X1 and X2 at time Δt1 and time Δt2, respectively. Step T3 compares the sizes of X1 and X2.
If X2 > X1, step T3 acquires an ambient variable acquisition value X3 at time Deltat 3. And step T5, comparing the sizes of X2 and X3, and judging that the change trend is in the upward trend if X3 is more than X2.
If X2 < X1, step T7 acquires the ambient variable acquisition value X3 at time Deltat 3. And step T8, comparing the sizes of X2 and X3, and judging that the change trend is in the downlink trend if X3 is less than X2.
If x2=x1, the steps T1 and T2 are re-executed.
In some embodiments, if the at least three environmental variables acquired at intervals include an increase in the variable value and a decrease in the variable value, it is determined that the trend of the environmental variables is in a parallel trend, and the following step S120 is omitted.
According to the method for calculating the control variable based on the environment variable, the problem of the critical value can be avoided, if the current acquisition value is the critical value, the current control output value is kept unchanged through continuous three acquisition trend judgment of time Deltat 1, deltat 2 and Deltat 3, and if the stable trend judgment cannot be obtained. If the trend changes, because the uplink trend and the downlink trend are cross-designed, the critical value of the previous interval is just the most stable value of the next interval, and the continuous jump phenomenon can not occur, when the environmental factor is stable, the trend is stable, the control output value is stable, so that the problem of the critical value of the environmental factor is well avoided.
FIG. 5 is a schematic diagram of an apparatus for calculating a control variable based on an environmental variable in accordance with one embodiment of the invention; as shown in fig. 6, the apparatus for calculating a control variable based on an environmental variable includes: a judging unit 10, a determining unit 20, and an output unit 30.
The judging unit 10 is configured to judge a variation trend of an environmental variable acquisition value, where the environmental variable acquisition value is acquired within a range of an environmental variable interval, the variation trend includes an uplink trend in which the environmental variable interval is divided into interval sections of M uplink trends by M-1 incremental uplink critical values, and a downlink trend in which the environmental variable interval is divided into interval sections of M downlink trends by M-1 incremental downlink critical values, where M is equal to or greater than 2 and is a positive integer;
the determining unit 20 is configured to determine that the variable value of the environmental variable collection value is located in a section of an environmental variable section, where the determined section is a section under a determined variation trend, an ith section of an uplink trend is associated with an ith control quantity output value, an ith section of a downlink trend is associated with an ith control quantity output value, a jth uplink critical value is greater than a jth downlink critical value, M is greater than or equal to 1 and is a positive integer, and M-1 is greater than or equal to 1 and is a positive integer;
An output unit 30 for outputting a control amount output value associated with the determined section.
According to the method for calculating the control variable based on the environment variable, if the change trend of the environment variable is changed, as the interval section of the uplink trend and the interval section of the downlink trend are in a cross design, the j-th uplink critical value is larger than the j-th downlink critical value, and when the environment variable is in the uplink critical value or the downlink critical value, after the change trend is converted, the i-th interval section of the uplink trend is related to the i-th control quantity output value and the i-th interval section of the downlink trend is related to the i-th control quantity output value, so that the probability of change can be reduced, and the occurrence of continuous jump phenomenon is reduced.
In one embodiment of the present invention, the environment variable interval includes N incremental partition thresholds; the M-1 ascending critical values and the M-1 descending critical values are respectively selected from the N ascending dividing critical values, and the k ascending critical value in the M-1 ascending critical values and the k descending critical value in the M-1 descending critical values are adjacent dividing critical values in the N ascending dividing critical values;
a judging unit configured to: and judging the change trend of the environmental variable according to the critical change of the acquired environmental variable acquisition value among the N incremental partition critical values.
In one embodiment of the present invention, the jth upstream threshold is less than the jth +1th downstream threshold.
FIG. 6 is a schematic diagram of an apparatus for calculating a control variable based on an environmental variable in accordance with another embodiment of the present invention; as shown in fig. 6, in one embodiment of the present invention, the judging unit 10 includes:
the first judging module 11 is configured to judge that a trend of the environmental variable is in an uplink trend if variable values of at least three environmental variables acquired at intervals are continuously increased;
the second judging module 12 is configured to judge that the trend of the environmental variable is in a downlink trend if the variable values of at least three environmental variables acquired at intervals continuously decrease;
the determination unit 20 includes:
the determining module 21 is configured to determine that the last acquired environmental variable acquisition value is in a section of the environmental variable section.
In one embodiment of the present invention, the variation trend includes a parallel trend, and the determining unit 10 includes:
and the third judging module 13 is configured to judge that the trend of the environmental variable is in a parallel trend if the at least three environmental variables acquired at intervals include an increase in the variable value and a decrease in the variable value, and cancel the step of determining that the variable value of the environmental variable acquisition value is in a section of the environmental variable section.
In one embodiment of the present invention, the ambient variable acquisition value is an ambient brightness value, and the control amount output value is a display brightness value.
In one embodiment of the present invention, the environment variable collection value is an environment sound value, and the control quantity output value is a speaker sound value.
Referring now to fig. 7, a block diagram of an electronic device 500 suitable for use in implementing embodiments of the present invention is shown. The device for calculating the control variable based on the environment variable in the embodiment of the invention can comprise a vehicle-mounted terminal (such as a vehicle-mounted navigation terminal) and the like. The apparatus for calculating control variables based on environmental variables shown in fig. 7 is only one example and should not be construed as limiting the function and scope of use of the embodiments of the present invention.
As shown in fig. 7, the electronic device 500 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 7 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present invention, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. The above-described functions defined in the method of the embodiment of the present invention are performed when the computer program is executed by the processing means 501.
The computer readable medium of the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be embodied in the apparatus; or may be present alone without being fitted into the device.
The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: judging a change trend of an environment variable acquisition value, wherein the change trend comprises an uplink trend and a downlink trend, under the uplink trend, the environment variable interval is divided into interval sections of M uplink trends by M-1 ascending critical values, under the downlink trend, the environment variable interval is divided into interval sections of M downlink trends by M-1 descending critical values, and M is more than or equal to 2 and is a positive integer;
Determining that the variable value of the environment variable acquisition value is in a section of an environment variable section, wherein the determined section is a section under a determined change trend, the ith section of an uplink trend is associated with the ith control quantity output value, the ith section of a downlink trend is associated with the ith control quantity output value, the jth uplink critical value is larger than the jth downlink critical value, M is more than or equal to 1 and is a positive integer, and M-1 is more than or equal to 1 and is a positive integer;
and outputting a control quantity output value associated with the determined section.
Alternatively, the computer-readable medium carries one or more programs that, when executed by the apparatus, cause the apparatus to: judging a change trend of an environment variable acquisition value, wherein the change trend comprises an uplink trend and a downlink trend, under the uplink trend, the environment variable interval is divided into interval sections of M uplink trends by M-1 ascending critical values, under the downlink trend, the environment variable interval is divided into interval sections of M downlink trends by M-1 descending critical values, and M is more than or equal to 2 and is a positive integer;
determining that the variable value of the environment variable acquisition value is in a section of an environment variable section, wherein the determined section is a section under a determined change trend, the ith section of an uplink trend is associated with the ith control quantity output value, the ith section of a downlink trend is associated with the ith control quantity output value, the jth uplink critical value is larger than the jth downlink critical value, M is more than or equal to 1 and is a positive integer, and M-1 is more than or equal to 1 and is a positive integer;
And outputting a control quantity output value associated with the determined section.
Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present invention may be implemented in software or in hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of the present invention, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The above description is only illustrative of the preferred embodiments of the present invention and of the principles of the technology employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in the present invention is not limited to the specific combinations of technical features described above, but also covers other technical features formed by any combination of the technical features described above or their equivalents without departing from the spirit of the disclosure. Such as the above-mentioned features and the technical features disclosed in the present invention (but not limited to) having similar functions are replaced with each other.
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the invention. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (10)

1. A method of calculating a control variable based on an environmental variable, the method comprising:
judging a change trend of an environment variable acquisition value, wherein the environment variable acquisition value is acquired in a range of an environment variable interval, the change trend comprises an uplink trend and a downlink trend, the environment variable interval is divided into interval sections of M uplink trends by M-1 ascending critical values under the uplink trend, the environment variable interval is divided into interval sections of M downlink trends by M-1 descending critical values under the downlink trend, and M is more than or equal to 2 and is a positive integer;
determining that the variable value of the environment variable acquisition value is in a section of an environment variable section, wherein the determined section is a section under a determined change trend, the ith section of an uplink trend is associated with the ith control quantity output value, the ith section of a downlink trend is associated with the ith control quantity output value, the jth uplink critical value is larger than the jth downlink critical value, M is more than or equal to 1 and is a positive integer, and M-1 is more than or equal to 1 and is a positive integer;
And outputting a control quantity output value associated with the determined section.
2. The method of calculating a control variable based on an environmental variable of claim 1, wherein the j-th upstream threshold is less than the j+1-th downstream threshold.
3. The method of calculating a control variable based on an environment variable of claim 1, wherein the environment variable interval includes N incremental division thresholds; m-1 ascending critical values and M-1 descending critical values are respectively selected from the N ascending dividing critical values, the kth ascending critical value in the M-1 ascending critical values and the kth descending critical value in the M-1 descending critical values are adjacent dividing critical values in the N ascending dividing critical values, and M-1 is more than or equal to k and is more than or equal to 1 and is a positive integer.
4. A method for calculating a control variable based on an environmental variable according to any one of claims 1 to 3,
the environment variables are at least three environment variables acquired at intervals, and the method for judging the change trend of the environment variable acquisition value comprises the following steps:
if the variable values of at least three environmental variables acquired at intervals are continuously increased, judging that the change trend of the environmental variables is in an uplink trend;
If the variable values of at least three environmental variables acquired at intervals are continuously reduced, judging that the change trend of the environmental variables is in a downlink trend;
the determining the interval section where the variable value of the environment variable acquisition value is in the environment variable interval comprises the following steps:
and determining the interval section of the environment variable interval of the finally acquired environment variable acquisition value.
5. The method of calculating a control variable based on an environmental variable of claim 4, wherein the trend of change comprises a parallel trend, and wherein the determining the trend of change in the collected value of the environmental variable comprises:
if the at least three environment variables acquired at intervals comprise variable value increase and variable value decrease, judging that the variation trend of the environment variables is in parallel trend, and canceling the step of determining the interval section of the environment variable interval where the variable value of the environment variable acquisition value is.
6. The method of calculating a control variable based on an environmental variable of claim 1, wherein the environmental variable collection value is an environmental brightness value and the control quantity output value is a display brightness value.
7. The method of calculating a control variable based on an environmental variable of claim 1, wherein the environmental variable collection value is an environmental volume value and the control volume output value is a speaker volume value.
8. An apparatus for calculating a control variable based on an environmental variable, the apparatus comprising:
the judging module is used for judging the change trend of the environment variable acquisition value, wherein the environment variable acquisition value is acquired in the range of an environment variable interval, the change trend comprises an uplink trend and a downlink trend, the environment variable interval is divided into interval sections of M uplink trends by M-1 ascending critical values under the uplink trend, and the environment variable interval is divided into interval sections of M downlink trends by M-1 descending critical values under the downlink trend, wherein M is more than or equal to 2 and is a positive integer;
the determining module is used for determining that the variable value of the environment variable acquisition value is located in a section of an environment variable section, wherein the determined section is a section under the determined change trend, the ith section of the uplink trend is associated with the ith control quantity output value, the ith section of the downlink trend is associated with the ith control quantity output value, the jth uplink critical value is larger than the jth downlink critical value, M is larger than or equal to 1 and is a positive integer, and M-1 is larger than or equal to 1 and is a positive integer;
and the output module is used for outputting the control quantity output value associated with the determined interval section.
9. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of calculating a control variable based on an environmental variable of any one of claims 1-7.
10. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of calculating a control variable based on an environmental variable according to any one of claims 1-7.
CN202310854174.3A 2023-07-12 2023-07-12 Method and device for calculating control variable based on environment variable Pending CN116577979A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310854174.3A CN116577979A (en) 2023-07-12 2023-07-12 Method and device for calculating control variable based on environment variable

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310854174.3A CN116577979A (en) 2023-07-12 2023-07-12 Method and device for calculating control variable based on environment variable

Publications (1)

Publication Number Publication Date
CN116577979A true CN116577979A (en) 2023-08-11

Family

ID=87538166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310854174.3A Pending CN116577979A (en) 2023-07-12 2023-07-12 Method and device for calculating control variable based on environment variable

Country Status (1)

Country Link
CN (1) CN116577979A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101539355A (en) * 2009-04-23 2009-09-23 上海爱控自动化设备有限公司 Refrigeration control system capable of intelligent scheduling and method thereof
US20130103622A1 (en) * 2011-10-21 2013-04-25 Nest Labs, Inc. Automated control-schedule acquisition within an intelligent controller
US20130329520A1 (en) * 2012-06-11 2013-12-12 Pgs Geophysical As Surface-Related Multiple Elimination For Depth-Varying Streamer
KR101855629B1 (en) * 2017-11-08 2018-05-08 현승민 Control system for optimizing sensor data acquisition autonomously
CN108375138A (en) * 2017-11-27 2018-08-07 浙江笨鸟科技有限公司 A kind of Household Air Purifier and control system based on data platform
CN110488887A (en) * 2019-08-30 2019-11-22 百度在线网络技术(北京)有限公司 Temprature control method, device, electronic equipment and the storage medium of smart home
CN114484790A (en) * 2021-12-31 2022-05-13 广东瑞德智能科技股份有限公司 Control method and control system of air conditioner and air conditioner
CN116266053A (en) * 2023-02-17 2023-06-20 王养浩 Intelligent home management system based on Internet of things

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101539355A (en) * 2009-04-23 2009-09-23 上海爱控自动化设备有限公司 Refrigeration control system capable of intelligent scheduling and method thereof
US20130103622A1 (en) * 2011-10-21 2013-04-25 Nest Labs, Inc. Automated control-schedule acquisition within an intelligent controller
US20130329520A1 (en) * 2012-06-11 2013-12-12 Pgs Geophysical As Surface-Related Multiple Elimination For Depth-Varying Streamer
KR101855629B1 (en) * 2017-11-08 2018-05-08 현승민 Control system for optimizing sensor data acquisition autonomously
CN108375138A (en) * 2017-11-27 2018-08-07 浙江笨鸟科技有限公司 A kind of Household Air Purifier and control system based on data platform
CN110488887A (en) * 2019-08-30 2019-11-22 百度在线网络技术(北京)有限公司 Temprature control method, device, electronic equipment and the storage medium of smart home
CN114484790A (en) * 2021-12-31 2022-05-13 广东瑞德智能科技股份有限公司 Control method and control system of air conditioner and air conditioner
CN116266053A (en) * 2023-02-17 2023-06-20 王养浩 Intelligent home management system based on Internet of things

Similar Documents

Publication Publication Date Title
CN112333898A (en) Lamp brightness adjusting method and device, lamp and storage medium
US20240118984A1 (en) Prediction method and apparatus for faulty gpu, electronic device and storage medium
CN112182374B (en) Inventory control method, apparatus, electronic device, and computer-readable medium
CN116388112B (en) Abnormal supply end power-off method, device, electronic equipment and computer readable medium
CN116512980B (en) Power distribution method, device, equipment and medium based on internal resistance of power battery
CN113220281A (en) Information generation method and device, terminal equipment and storage medium
CN116577979A (en) Method and device for calculating control variable based on environment variable
CN113364993B (en) Exposure parameter value processing method and device and electronic equipment
CN112019406B (en) Flow monitoring method and device, electronic equipment and computer readable medium
CN111680754B (en) Image classification method, device, electronic equipment and computer readable storage medium
CN114741686A (en) Method and device for detecting program white list and related equipment
CN110609603A (en) Frequency modulation method and device, terminal and storage medium
CN113055534A (en) Terminal control method and device, terminal and non-transitory storage medium
CN110673955A (en) Method, device, system, terminal and storage medium for optimizing memory
CN115065846B (en) Video issuing method, device, server and medium
CN117131366B (en) Transformer maintenance equipment control method and device, electronic equipment and readable medium
CN113556850B (en) Lamp brightness calibration method, determination method, device and electronic equipment
CN115659154B (en) Data transmission method, device, server and computer readable medium
CN116167894B (en) Water resource shortage warning method, device, electronic equipment and computer readable medium
CN113240107A (en) Image processing method and device and electronic equipment
CN117454959A (en) Neural network model structure determining method, device, equipment, medium and product
CN116028255A (en) Abnormality detection method, abnormality detection device, abnormality detection system, electronic device and storage medium
CN112819165A (en) Concept identification method and device, electronic equipment and medium
CN116668337A (en) Data detection method, device, equipment and storage medium
CN116302415A (en) Container capacity adjustment task generation method, device, equipment and readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination