BACKGROUND OF THE INVENTION
1. Field of Invention
[0001] The present invention relates to the power consumption conservation of a processor,
and in particular to a method for reducing the power consumption of a processor, which
can reduce the power consumption of the processor while guaranteeing that the voltage
of the processor meets application requirements.
2. Description of Prior Art
[0002] Limited battery lifetime usually becomes the most severe bottleneck in a processing
system powered by a battery, such as embedded handheld system. On the other hand,
playing of multimedia, especially video, has gotten increasing popularity with various
handsets, such as PMP and PDA. This gives considerable importance to a low power consumption
design for any battery-powered processing system. Moreover, in current handsets, embedded
CPUs have been expanded in terms of performance and function, and thus can enable
such operation as soft decoding. It is well known that soft decoding is an application
requiring intensive processing by CPU and consuming plenty of battery power.
[0003] During video soft decoding by CPU, a low power consumption design is generally realized
with a technique called DVS/DFS (Dynamic Voltage/Frequency Scaling). One significant
task in the DVS technique is selecting a suitable CPU load sampling cycle and predicting
CPU load through a proper algorithm so as to determine the magnitudes of voltage and
frequency should be set in next time interval. As well known in the art, the selection
of sampling cycle has tremendous effect on the performance of DVS. Currently, it is
generally believed that the sampling cycle or interval should be the reciprocal of
frame rate, since video stream is in unit of frame in most cases. Take as an example
a segment of a stream of 30 frames /s, the sampling cycle or interval takes the value
of 33ms, which is regarded as the most suitable. However, many studies have proved
that data of CPU load obtained on such sampling interval have a very poor regularity.
Thus, it is difficult to present a satisfactory prediction result, leading to the
case of voltage being lower than that required by the processor or the case of excessive
power consumption of the processor.
SUMMARY OF THE INVENTION
[0005] The present invention is made in view of the above problems. The object of the present
invention is to provide a method for reducing power consumption of a processor, which
can reduce the power consumption of the processor while guaranteeing that the voltage
of the processor meets application requirements.
[0006] In one aspect of the present invention, a method for reducing power consumption of
a processor is provided comprising steps of applying time-frequency transformation
to a plurality of load values of the processor to obtain the feature sampling cycle
of the processor, and adjusting the voltage/frequency of the processor based on the
feature sampling cycle.
[0007] According to an embodiment of the present invention, the step of time-frequency transformation
comprises steps of sampling intensively the load of the processor to obtain a first
number of processor load values, and applying Fourier transformation to the first
number of processor load values to calculate a frequency corresponding to an amplitude
peak and a feature sampling cycle corresponding to the frequency.
[0008] According to an embodiment of the present invention, the step of adjusting comprises
steps of resampling the load of the processor at the feature sampling cycle in the
current time interval to obtain a second number of processor load values, constructing
a prediction model based on the second number of processor load values to predict
the processor load value of the processor in next time interval, and adjusting the
voltage/frequency of the processor based on the predicted processor load value.
[0009] According to an embodiment of the present invention, the step of constructing the
prediction model comprises predicting the processor load value of the processor in
next time interval with
M processor load values through a linear model as follows:

where
p represents the order of the linear model, and the coefficient φ
i can be estimated with
M processor load values before the current time point by using Yule-Walker equation.
[0010] According to an embodiment of the present invention, in the step of adjusting the
voltage/frequency of the processor based on the predicted processor load value, the
voltage/frequency of the processor is adjusted through a lookup table based on the
predicted processor load value.
[0011] According to an embodiment of the present invention, in the step of Fourier transformation,
the feature sampling cycle is calculated as follows:

where T represents the sampling cycle of intensive sampling, N is the first number,
and f
τ is the frequency corresponding to the amplitude peak.
[0012] According to an embodiment of the present invention, the step of adjusting comprises
steps of resampling the load of the processor at the feature sampling cycle in the
current time interval to obtain a second number of processor load values, constructing
a prediction model based on the second number of processor load values to predict
the processor load value of the processor in next time interval, compensating the
predicted processor load value with a compensation factor, and adjusting the voltage/frequency
of the processor based on the compensated processor load value.
[0013] According to an embodiment of the present invention, the method further comprises
repeating the above steps if the change in the compensation factor is greater than
a predetermined threshold over a period of time.
[0014] According to an embodiment of the present invention, the compensation factor is an
additive compensation factor λ, and the step of compensating is performed by adding
the additive compensation factor to the predicted processor load value.
[0015] According to an embodiment of the present invention, the compensation factor is a
multiplicative compensation factor λ, and the step of compensating is performed by
dividing the predicted processor load value by the multiplicative compensation factor.
[0016] According to an embodiment of the present invention, the additive compensation factor
λ is determined as follows:

where
e represents the deviation between a statistically-obtained over scaling rate and an
over scaling rate set by a user, and
KP,
KI and
KD represent proportional gain, integral gain and derivative gain, respectively.
[0017] With the method of the present invention, the processor load value in next time interval
can be accurately predicted, and thus the voltage/frequency of the processor in the
next time interval can be adjusted on the basis of the load value. Further, since
the compensation factor can be used to compensate the predicted load value, a timely
and accurate adjustment can be made upon any change in the running condition of the
processor, so as to reduce the power consumption of the processor while meeting application
requirements.
BRIEF DESCRIPTION OF THE DRAWINGS
[0018]
Fig. 1 shows a detained flowchart of a method for reducing power consumption of a
processor according to the first embodiment of the present invention; and
Fig. 2 shows a detained flowchart of a method for reducing power consumption of a
processor according to the second embodiment of the present invention.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] Now, a detailed description will be given to embodiments of the present invention
with reference to the figures.
[0020] As shown in Fig. 1, N (=128) CPU load values are initially sampled at certain intensive
sampling interval, such as T=10ms, at step S110. The 128 sampled CPU load values are
subjected to FFT transformation so as to obtain a frequency f
τ corresponding to the amplitude peak for the former half of a cycle at step S120.
[0021] Next, the feature sampling cycle is calculated from the frequency f
τ as

at step S130.
[0022] At step S140, the CPU load is sampled at the frequency corresponding to the feature
sampling cycle τ to obtain a number of CPU load values, such as 64 values. At step
S150, DVS modeling is made from the sampled CPU load values so as to predict the CPU
load value in next time interval.
[0023] The process of DVS modeling is specifically explained hereafter. Many studies have
proved that the CPU load values sampled at the above feature sampling interval τ comply
with ARIMA (Auto Regressive Integrated Moving Average) stochastic process to a great
extent.
[0024] Since the MA process component in the ARIMA process is minute, ignoring such component
has no substantial effect on the result. On the other hand, such ignorance can simplify
the complexity of the prediction model and relieve computation effort. The major function
of the DVS model is to predict the CPU load in the succeeding time interval based
on the previous CPU load and thus set a corresponding voltage/frequency.
[0025] With ARI (Auto Regressive Integrated) model, the prediction value of the CPU load
value at the current time point can be easily represented by M CPU load values before
the current time point through a linear model

where
p represents the order of the ARI model, i.e., the size of observation window, and
the coefficient φ
i can be estimated with the M processor load values before the current time point by
using Yule-Walker equation as

M is a natural number greater than
p.
[0026] In this way, the CPU load value in the next time interval can be predicted from the
above DVS model. After the predicted CPU load value
x̂t+j in the succeeding time slot is obtained, the corresponding voltage/frequency value
can be acquired in the simple manner of a lookup table at step S160. For example,
x̂t+1=0.3 means that the CPU load in the succeeding time interval is only 30% of the load
of the CPU running at its peak frequency. Thus, the corresponding voltage value can
be found from a voltage-frequency correspondence table provided by the manufacturer
of the CPU.
[0027] Besides, the DVS-based power conservation is realized by reducing the voltage/frequency
of the CPU. This may incur a case where inaccurate prediction or excessive scale-down
of the voltage leads to insufficient CPU performance and thus failure of fulfilling
an application timely. In an example of video decoding, the playing effect will suffer
if one frame, which should have been handled at certain time, cannot be decoded in
time.
[0028] To address the above problem, an overload control mechanism is adopted to control
excessive scaling of voltage so as to protect the system performance from any adverse
effect in the second embodiment of the present invention. Fig. 2 shows a detained
flowchart of a method for reducing power consumption of a processor according to the
second embodiment of the present invention.
[0029] Steps S110 to S150 of the method according to the second embodiment are identical
to steps S210 to S250 of the method according to the first embodiment of the present
invention, and thus description of these steps is omitted.
[0030] At step S255, a compensation factor is defined for compensating the predicted CPU
load in order to control the scaling magnitude of the CPU voltage. At step S260, it
is determined whether the compensation factor has dramatic change over a period of
time, i.e., whether the change in the compensation factor exceeds a predetermined
threshold (for example, increased by 100%). If the change is strong, it can be derived
that the characteristic of the stream has changed. Thus, the sampling frequency is
not appropriate, and the corresponding DVS model is not accurate any more. At this
point, the flow returns to step S210, where the above same process is repeated. If
the change is within an acceptable range, the flow turns to step S240, where the above
process is repeated.
[0031] Specifically, after a CPU prediction value
x̂t+1 is obtained, it is compensated with a compensation factor λ as a final prediction
value. In the second embodiment of the present invention, two types of compensation
factors, additive and multiplicative factors, are defined. Then, either of the factors
can be controlled so that the ultimate video effect (over scaling rate) is kept in
a range preset or acceptable to the user.
[0032] The predicted CPU load value is compensated with the additive compensation factor
as follows.

[0033] The predicted CPU load value is compensated with the multiplicative compensation
factor as follows.

[0034] The control over the compensation factor is adjusted by a PID controller in the following
manner:

where
e represents the deviation between a statistically-obtained over scaling rate and an
over scaling rate set by the user, and
KP,
KI and
KD represent proportional gain, integral gain and derivative gain, respectively. Obviously,
when the deviation
e is large, λ should be increased or decreased accordingly to keep the swing of the
over scaling rate within the preset range. As used here, the over scaling rate indicates
the number of time intervals among n time intervals in each of which the instructions
that should have been completed are not fulfilled due to the excessive scaling-down
of the voltage.
[0035] With the compensation factor, it is convenient to detect the change in the characteristics
of the video stream. A series of characteristics of a video stream must be changing
with the change in the stream, thereby making the prediction model inaccurate. This
will lead to an increase in the prediction error. And accordingly, the compensation
factor is dramatically increased (additive) or decreased (multiplicative) to prevent
the over scaling rate from increasing too much.
[0036] As such, the change in the system characteristics has been learned, and thus a new
model or sampling frequency is required. The flow returns to step S210, where the
above process is repeated.
[0037] The present invention is not limited to the above embodiments. Any modification,
change or substitution readily made by those ordinarily skilled in the art shall fall
into the scope of the present invention defined by the appended claims.
1. A method for reducing power consumption of a processor comprising steps of
applying time-frequency transformation to a plurality of load values of the processor
to obtain the feature sampling cycle of the processor, and
adjusting the voltage/frequency of said processor based on said feature sampling cycle.
2. The method according to Claim 1, wherein said step of time-frequency transformation
comprises steps of
sampling intensively the load of the processor to obtain a first number of processor
load values, and
applying Fourier transformation to said first number of processor load values to calculate
a frequency corresponding to an amplitude peak and a feature sampling cycle corresponding
to said frequency.
3. The method according to Claim 1, wherein said step of adjusting comprises steps of
resampling the load of said processor at said feature sampling cycle in the current
time interval to obtain a second number of processor load values,
constructing a prediction model based on said second number of processor load values
to predict the processor load value of said processor in next time interval, and
adjusting the voltage/frequency of said processor based on the predicted processor
load value.
4. The method according to Claim 3, wherein said step of constructing the prediction
model comprises
predicting the processor load value of said processor in next time interval with M
processor load values through a linear model as follows:

where
p represents the order of the linear model, and the coefficient φ
i is estimated with M processor load values before the current time point by using
Yule-Walker equation.
5. The method according to Claim 4, wherein, in said step of adjusting the voltage/frequency
of said processor based on the predicted processor load value, the voltage/frequency
of said processor is adjusted through a lookup table based on the predicted processor
load value.
6. The method according to Claim 5, wherein, in said step of Fourier transformation,
said feature sampling cycle is calculated as follows:

where T represents the sampling cycle of intensive sampling, N is said first number,
and f
τ is the frequency corresponding to the amplitude peak.
7. The method according to Claim 1, wherein said step of adjusting comprises steps of:
resampling the load of said processor at said feature sampling cycle in the current
time interval to obtain a second number of processor load values,
constructing a prediction model based on said second number of processor load values
to predict the processor load value of said processor in next time interval,
compensating the predicted processor load value with a compensation factor, and
adjusting the voltage/frequency of said processor based on the compensated processor
load value.
8. The method according to Claim 7, wherein further comprising
repeating the preceding steps if the change in said compensation factor is greater
than a predetermined threshold over a period of time.
9. The method according to Claim 8, wherein said compensation factor is an additive compensation
factor λ, and said step of compensating is performed by adding said additive compensation
factor to the predicted processor load value.
10. The method according to Claim 8, wherein said compensation factor is a multiplicative
compensation factor λ, and said step of compensating is performed by dividing the
predicted processor load value by said multiplicative compensation factor.
11. The method according to Claim 9, wherein said additive compensation factor λ is determined
as follows:

where
e represents the deviation between a statistically-obtained over scaling rate and an
over scaling rate set by a user, and
KP, KI and
KD represent proportional gain, integral gain and derivative gain, respectively.
12. The method according to Claim 10, wherein said multiplicative compensation factor
λ is determined as follows:

where
e represents the deviation between a statistically-obtained over scaling rate and an
over scaling rate set by a user, and
KP, KI and
KD represent proportional gain, integral gain and derivative gain, respectively.
13. The method according to Claim 7, wherein said step of constructing the prediction
model comprises
predicting the processor load value of said processor in next time interval with M
processor load values through a linear model as follows:

where
p represents the order of the linear model, and the coefficient φ
i is estimated with
M processor load values before the current time point by using Yule-Walker equation.
14. The method according to Claim 13, wherein, in said step of adjusting the voltage/frequency
of said processor based on the predicted processor load value, the voltage/frequency
of said processor is adjusted through a lookup table based on the predicted processor
load value.
15. The method according to Claim 14, wherein, in said step of Fourier transformation,
said feature sampling cycle is calculated as follows:

where T represents the sampling cycle of intensive sampling, N is said first number,
and f
τ is the frequency corresponding to the amplitude peak.