Method for reducing power consumption of processor

Information

  • Patent Grant
  • 8051310
  • Patent Number
    8,051,310
  • Date Filed
    Thursday, March 23, 2006
    18 years ago
  • Date Issued
    Tuesday, November 1, 2011
    13 years ago
Abstract
A method for reducing power consumption of a processor is disclosed 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 said feature sampling cycle. 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.
Description
BACKGROUND OF THE INVENTION

1. Field of Invention


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


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.


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 33 ms, 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.


Another critical issue in the above low power consumption design based on time interval is how to accurately predict next time interval, since the processor load varies with applications. For example, Reference document 1 (Xiaotao Liu, Prashant Shenoy and Weibo Gong, A Time Series-based Approach for Power Management in Mobile Processors and Disks, In Proceedings of the 14th ACM Workshop on Network and Operating System Support for Audio and Video (NOSSDAV)) proposes a time series-based prediction method, in which the value of processor load is predicted using time series. This method, however, gives no discussion about how to adjust the processor power dynamically. In other words, this method cannot precisely predict the value of processor load for next time interval upon changes in the running condition of the processor.


SUMMARY OF THE INVENTION

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.


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.


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.


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.


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:










x
^


t
+
1


=


x
t

+




i
=
1

p




(


x

t
-
i
+
1


-

x

t
-
i



)



ϕ
i





;

t
=
0


,
1
,
2
,
3
,





,
M





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.


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.


According to an embodiment of the present invention, in the step of Fourier transformation, the feature sampling cycle is calculated as follows:

τ=(T*N/2)/fτ

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


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.


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.


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.


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.


According to an embodiment of the present invention, the additive compensation factor λ is determined as follows:






λ
=



K
P


e

+


K
I




edt


+


K
D





e



t









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.


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


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

Now, a detailed description will be given to embodiments of the present invention with reference to the figures.


As shown in FIG. 1, N (=128) CPU load values are initially sampled at certain intensive sampling interval, such as T=10 ms, 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.


Next, the feature sampling cycle is calculated from the frequency fτ as

τ=(T*N/2)/fτ

at step S130.


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.


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.


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.


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













x
^


t
+
1


=


x
t

+




i
=
1

p




(


x

t
-
i
+
1


-

x

t
-
i



)



ϕ
i





;

t
=
0


,
1
,
2
,
3
,





,
M




(
1
)








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










[





ϕ
^

1







ϕ
^

2














ϕ
^

p




]

=



[



1




ρ
^

1










ρ
^


p
-
1








ρ
^

1



1









ρ
^


p
-
2






























ρ
^


p
-
1






ρ
^


p
-
2









1



]


-
1




[





ρ
^

1







ρ
^

2














ρ
^

p




]






(
2
)









ρ
^

k

=



ρ
^


-
k


=



r
^

k

/


r
^

0




,




(
3
)










r
^

k

=



r
^


-
k


=


1
M






t
=
1


M
-
k





x
t



x

t
-
k







,

k
=
0

,
1
,
2
,
3
,





,

p
;









t
=
0

,
1
,
2
,
3
,





,
M





(
4
)








M is a natural number greater than p.


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 {circumflex over (x)}t+1 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, {circumflex over (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.


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.


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.


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.


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.


Specifically, after a CPU prediction value {circumflex over (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.


The predicted CPU load value is compensated with the additive compensation factor as follows,

{circumflex over (x)}t+1={circumflex over (x)}t+1+λ  (5)


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

{circumflex over (x)}t+1={circumflex over (x)}t+1/λ  (6)


The control over the compensation factor is adjusted by a PID controller in the following manner.









λ
=



K
P


e

+


K
I




edt


+


K
D





e



t








(
7
)








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.


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.


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.


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.

Claims
  • 1. A method for reducing power consumption of a processor comprising steps of: sampling a plurality of load values of the processor to obtain a first number of processor load values,applying Fourier transformation to said first number of processor load values to calculate a frequency corresponding to an amplitude peak and a characteristic sampling cycle corresponding to said frequency,resampling the load values of said processor at said characteristic sampling cycle in 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 processor load value of said processor in next time interval, andadjusting the voltage/frequency of said processor based on the predicted processor load value.
  • 2. The method according to claim 1, wherein said step of constructing the prediction model comprises: predicting the processor load value of said processor in the next time interval with M processor load values through a linear model as follows:
  • 3. The method according to claim 2, 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.
  • 4. The method according to claim 3, wherein, in said step of applying Fourier transformation to said first number of processor load values, said characteristic sampling cycle is calculated as follows: τ=(T*N/2)/fτwhere T represents sampling cycle of sampling, N is said first number, and fτ is the frequency corresponding to the amplitude peak.
  • 5. The method according to claim 1, wherein said step of adjusting the voltage/frequency of said processor based on the predicted processor load value comprises steps of: 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.
  • 6. The method according to claim 5, further comprising: repeating the preceding steps if change in said compensation factor is greater than a predetermined threshold over a period of time.
  • 7. The method according to claim 6, 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.
  • 8. The method according to claim 6, 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.
  • 9. The method according to claim 7, wherein said additive compensation factor λ is determined as follows:
  • 10. The method according to claim 8, wherein said multiplicative compensation factor λ is determined as follows:
  • 11. The method according to claim 5, 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:
  • 12. The method according to claim 11, 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.
  • 13. The method according to claim 12, wherein, in said step of applying Fourier transformation to said first number of processor load values, said characteristic sampling cycle is calculated as follows: τ=(T*N/2)/fτwhere T represents sampling cycle of sampling, N is said first number, and fτ is the frequency corresponding to the amplitude peak.
Priority Claims (1)
Number Date Country Kind
2005 1 0135575 Dec 2005 CN national
PCT Information
Filing Document Filing Date Country Kind 371c Date
PCT/CN2006/000478 3/23/2006 WO 00 6/27/2008
Publishing Document Publishing Date Country Kind
WO2007/073632 7/5/2007 WO A
US Referenced Citations (9)
Number Name Date Kind
5630148 Norris May 1997 A
6425086 Clark et al. Jul 2002 B1
6845456 Menezes et al. Jan 2005 B1
7062394 Sun Jun 2006 B2
20020087611 Tanaka et al. Jul 2002 A1
20030009702 Park Jan 2003 A1
20060253715 Ghiasi et al. Nov 2006 A1
20070168055 Hsu et al. Jul 2007 A1
20090144572 Rozen et al. Jun 2009 A1
Foreign Referenced Citations (6)
Number Date Country
1150845 May 1997 CN
1396509 Feb 2003 CN
2002-202959 Jul 2002 JP
2002-44694 Aug 2003 JP
2002-99433 Sep 2003 JP
2005066795 Jul 2005 WO
Related Publications (1)
Number Date Country
20090013201 A1 Jan 2009 US