Abstract:
A system for automatically adapting the power conservation functions of a personal computer (PC) to the work patterns of any user. A power control system of the PC monitors activity of I/O devices and if upon the elapse of a first time interval a particular I/O device or combination of devices has not been accessed, one or more I/O devices are powered-down. Following power-down, the first time interval is incrementally increased if I/O activity immediately occurs thereafter, prior to elapse of a second time interval. This process may repeat itself several times until the first time interval reaches a maximum value. Alternatively, if, following power-down, I/O activity does not occur until after elapse of a third time interval, the first time interval is incrementally decreased until the first time interval reaches a minimum value. The system thereby automatically adapts to maximize power conservation during periods of low activity while preventing user disruption during periods of increased activity.

Description:
This application is a continuation of application Ser. No. 07/656,647, filed Feb. 14, 1991, for Portable Computer System with Adaptive Power Control Parameters, now abandoned. 
    
    
     TECHNICAL FIELD 
     The invention relates generally to power management systems for personal computers and specifically to a power management system having adaptive power control parameters. 
     BACKGROUND OF THE INVENTION 
     Because many of the components and peripheral devices of both desktop and portable personal computers (PCs) consume a great deal of power even when they are not active, power management systems have been developed which cause each component or peripheral device to operate in the lowest power consumption mode with respect to present demands thereon. For example, U.S. Pat. No. 4,980,836 to Carter et al. discloses a power management system for a portable PC in which various peripheral devices are monitored for I/O activity. After a predetermined period of I/O inactivity, the PC is &#34;powered down&#34;, i.e., the system clock is halted and power is removed from the hard disk drive, the floppy disk drive, the liquid crystal display (LCD), and miscellaneous system circuitry, thereby effecting more efficient use of remaining battery power. 
     Since Carter, improvements in the basic power management system have been introduced which include options such as blanking the liquid crystal display (LCD) or monitor screen after a predetermined period of I/O inactivity or turning off the hard disk drive motor after the hard disk drive has not been accessed for a predetermined period of time. Furthermore, there may be provided more than one reduced power consumption mode. For example, there may be a &#34;stand by&#34; mode in which certain components, such as the LCD and the hard disk drive motor, are caused to enter a reduced power consumption mode but the processing speed of the central processing unit (CPU) is not affected. In a &#34;sleep&#34; mode, nearly all of the functions of the PC are slowed or halted, including the CPU. From the standpoint of power consumption, the sleep mode is substantially equivalent to turning the PC off, except that no data is lost. 
     None of these power management systems fully responds to the fact that the various users of a single PC will most likely have differing work habits and preferences. For example, some users take frequent breaks throughout their work session but would prefer that the display not be blanked during each break, while others are prone to forget to turn off the PC following a work session. Some users want to maximize the battery life of a portable PC while others are concerned with avoiding the inconvenience of having the screen blank during data entry. 
     In addition to varying from user to user, the need for particular power management functions will vary from session to session, as different application programs will result in different work patterns. For example, a user will want to be able to examine a large spreadsheet or word processing entries without the screen being blanked at each momentary pause, but the same user will be indifferent to the screen being blank while the CPU is compiling a program or performing a scientific computation. 
     The above problems are partially solved by allowing the user to select the time-out parameters for particular program categories. Accordingly, by selecting the appropriate parameter values, a user is able to adapt the power management system to his or her own work habits with respect to a particular work session. For example, a longer time interval, such as ten or fifteen minutes, would be chosen for an application program which requires continuous I/O activity, such as word processing, than for one which performs scientific computations without a great deal of user input. 
     This solution is not entirely satisfactory, however, since a user will typically execute more than one application during a single work session, making it inconvenient for the user to change the timeout parameters each time he or she desires to use a different application. Further, novice users who are unaware of how to program the parameters will be forced to use the default parameters, which may not result in the most efficient use of power with respect to the particular work session. When time-out parameters are carelessly selected, the PC may often be caused to power-up or power-down at times which are inopportune or annoying to the user. As a result, the net power savings may be insignificant. 
     A power management solution is needed which both minimizes power consumption of the PC and which automatically adapts to the particular user&#39;s pattern of PC activity. 
     SUMMARY OF THE INVENTION 
     The foregoing problems are solved and a technical advance is achieved by method and apparatus for personal computer (PC) power management in which the control parameters for power-down of PC components are automatically adapted to patterns of PC use. In a departure from the art, the time-out interval after which components of the PC transition to a reduced power consumption state is automatically decreased when user activity is relatively infrequent, and automatically increased when user activity is relatively frequent. The PC thereby automatically adjusts to the habits of the user in power-down of PC components for maximum power conservation during periods of relative inactivity, yet without inconvenience to the user during periods of increased activity. 
     A power control system of the invention comprises a dedicated power management microcontroller which monitors PC activity to detect occurrences in which the PC is caused to exit a reduced power consumption mode. When the reduced power mode is exited shortly after having been entered, the time-out parameters are temporarily overridden and incrementally extended. When the reduced power mode is exited long after having been entered, the time-out parameters are temporarily overridden and incrementally shortened. The user may still select time-out parameters and may further select whether the adaptive modification function is enabled or disabled. When this function is enabled, the power management system will adapt its power management strategy in response to the actual work pattern of the user. 
     In an illustrative embodiment, the apparatus comprises a power control system, a processing complex and various I/O devices capable of operating in a reduced power consumption state interconnected via a system bus. The power control system monitors the activity of the various I/O devices. If upon the elapse of a first predetermined time interval a particular device or combination of devices has not been accessed, the power control system generates signals to place the device in a reduced power consumption state. Following placement of the device in a reduced power consumption state, the predetermined time interval is incrementally increased if I/O activity immediately occurs thereafter, prior to elapse of a second predetermined time interval. This process may repeat itself several times, until the predetermined time interval reaches a maximum value. 
     Likewise, the control system functions to incrementally decrease the first predetermined interval between power-down of devices. Following placement of the device in a reduced power consumption state, the first predetermined time interval is incrementally decreased if I/O activity does not occur until after elapse of a third predetermined time interval. This process may repeat itself several times, until the first predetermined time interval reaches a minimum value. 
     A technical advantage achieved with the invention is that the adaptive adjustments to the power-down intervals occur automatically, based on the particular user&#39;s work patterns. 
     A further technical advantage achieved is that PC power conservation is maximized, yet without unduly interrupting the activities of the user. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a functional block diagram of a personal computer embodying features of the power management control system of the present invention; and 
     FIG. 2 is a flowchart of the logic implemented in the power management control system of FIG. 1. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     In FIG. 1, the reference numeral 10 designates a personal computer system embodying features of the present invention. The system 10 comprises a power control system 12, a processor complex 14, a CPU clock controller 16, several I/O devices 18, and a system memory 20. A system bus 22 interconnects the power control system 12, processor complex 14, CPU clock controller 16 and I/O devices 18. While not shown, it is understood the processor complex 14 includes a CPU and associated subsystems normally required for operation of a personal computer. For example, portions of the complex 14 may include a commercially available single chip solution or &#34;chip set.&#34; A bus 24 connects the system memory 20 to the complex 14. 
     Although not shown, it is understood that the I/O devices 18 may include hard disk drives, floppy disk drives, a keyboard, a video monitor, a mouse, a numeric coprocessor, various serial and parallel ports, and other similar I/O or peripheral devices used in connection with a personal computer. Since these devices are well known, they will not be described further. 
     The power control system 12 is a microprocessor system which includes CPU, memory and I/O components (not shown). The system 12 monitors the activity of the I/O devices 18 via lines 26a-26g, connected with conventional circuitry (not shown) to the I/O devices. The lines 26a-26g are connected to exemplary hard disk, keyboard, video, numeric coprocessor, floppy disk, serial port and parallel port I/O devices 18, respectively. The system 12 monitors the status of the CPU (not shown) of the processor complex 14 via line 26h. It is understood that the signals on lines 26a-26h used for the monitoring functions are dependent upon the types of I/O devices used and the particular computer implementation. For example, in an IBM PC implementation of the processor complex 14, certain I/O devices generate interrupt signals to the CPU when accessed. The interrupt signals are thus also indicated on the particular line 26a-26g to the power control system 12. Other I/O devices may generate chip select signals, for example, which are detected on the appropriate line 26a-26g and input to the control system 12 in the above-described manner. 
     As will be described, a user may specify timeout parameters upon which a plurality of software activity timers, each specific to a particular I/O device or logical combination thereof, are based. In the event that a parameter is not specified, a default parameter is used. If upon polling a line 26a-26h the power control system 12 determines that the CPU or a particular device 18 is active, the corresponding activity timer is reset. 
     After a device has remained inactive for the predetermined interval of time, as indicated by the expiration of the corresponding activity timer, the control system 12 performs the functions necessary to place the CPU or particular I/O device or combination of devices in a reduced power consumption state. The system 12 gains control of the system bus 22 and then communicates with the particular I/O device 18 to place it in the reduced power consumption state, independent of the CPU of the processor complex 14. The system 12 gains control of the system bus 22 by issuing a bus request (BREQ) signal to the processor complex 14 via a line 32. The complex 14 acknowledges the BREQ signal with a bus acknowledge (BACK) signal via a line 34, to grant control of the bus 22 to the system 12. Upon receipt of the BACK signal, the control system 12 becomes the bus master for one clock cycle. The remaining devices competing for the use of the system bus 22 are slaves until the system 12 relinquishes control of bus. While not shown, it is understood that for an IBM PC AT implementation, the control system 12 becomes the bus master by using the MASTER control line. 
     It is understood that the operations to be performed by the system 12 while it is the bus master to power down the particular I/O devices 18 will depend upon the nature of the devices. For example, if the I/O device 18 is a hard disk drive, the control system 12 will write directly to the appropriate I/O port of the system 10 and set a bit, resulting in the hard disk drive&#39;s motor turning off. The motor will automatically turn on upon the next attempt at a hard disk drive access. If the device to be powered down is the CPU, the control system 12 will write to the CPU clock controller 16 to either slow or halt the CPU clock, again depending upon the particular implementation of the CPU. The powered-down device or devices are reactivated by the system 12 when activity is next required. 
     In accordance with a feature of the invention, the control system 12 automatically adjusts the value of the activity timer to either a longer or shorter time period, depending on the work pattern of the PC user. If the particular device 18 is powered-up within a relatively short time period after power-down, logic of the system 12 is implemented to incrementally adjust the activity timer to a longer time period, up to a predetermined maximum value. If the device 18 is powered-up after a relatively long time period after power-down, logic of the system 12 is implemented to incrementally adjust the activity timer to a shorter time period, down to a predetermined minimum value. In this manner, the control system 12 adapts to changing power demands of system 10 for increased efficiency and performance. 
     FIG. 2 is a flowchart illustrating control logic implemented by the power control system 12 in accordance with the present invention. The control logic may be implemented by microcode instructions stored within the system 12. The flow chart exemplifies control logic further illustrated in the attached appendix. The control logic describes power consumption reduction and adaptive power management operations for one I/O device 18, it being understood that other devices are also controlled by similar logic. Further, it is noted that one or more devices 18 may be placed in a reduced power consumption state based on the activity of that device, a different device or combination of devices. 
     Execution begins in step 200 with the performance of initialization procedures. In step 202 an activity timer associated with the I/O device 18 is loaded in the system 12. It is understood that a user is able to specify the time-out parameters for the activity timer. Also, inactivity timer parameters associated with the device 18 are loaded in the system 12, the parameters being user specified and utilized, as discussed below, for adapting the value of the activity timer to a longer value or-a shorter value, as determined by frequency of use of the device 18. Default parameters are provided if the parameters are not specified by the user. 
     When the activity timer is loaded in step 202, with either specified or default parameters, it is initialized to the time-out value. At step 204, the power control system 12 monitors the device 18 (or combination of devices) associated with the timer to determine whether the device is active. As indicated previously with reference to FIG. 1, activity of a device 18 is indicated by signals on the particular line 26a-26g or on line 26h for the CPU. If at step 204 the device 18 is active, execution returns to step 202 and the activity timer is reset. Otherwise, execution proceeds to step 206. 
     At step 206, the activity timer is decremented. At step 208, a determination is made whether the activity timer has expired, by decrementing to zero. If at step 208 the activity timer has not expired, execution returns to step 204. Otherwise, execution proceeds to step 210. At step 210, the power control system 12 issues a BREQ signal to the processor complex 14. At step 212, a determination is made whether the processor complex 14 has acknowledged the BREQ signal by issuing a BACK signal to the power control system 12. If a BACK signal is not received, execution remains at step 212 until received. Execution proceeds to step 214. 
     At step 214, the power control system 12 asserts control of the system bus 22 and becomes the bus master. The control system 12 then communicates on the system bus 22 with the device 18 to place it in the reduced power consumption state. At step 216, the BREQ is deasserted and the power control system 12 surrenders control of the system bus 22 to the processor complex 14. 
     At step 218, an inactivity timer is started from an initialized value of zero. At step 220, the inactivity timer is incremented. At step 222, a determination is made whether the device 18 is active. If not, execution returns to step 220. If at step 222 the device 18 is active, execution proceeds to step 224. At step 224, a determination is made whether the inactivity timer is less than a predetermined value X1. For example, the predetermined value may be on the order of about 5-10 seconds. If at step 224 the inactivity value is less than X1, execution proceeds to step 226, where a determination is made whether the activity timer is currently at its maximum prescribed value. If not, at step 228 the value of the activity timer is increased by a value of Y1. Y1 may be on the order of 30 seconds to a few minutes, depending on the particular device 18 associated with the activity timer. Execution then returns to step 202. By increasing the value of the activity timer at step 228 based upon the occurrence of device activity within a time period of less than X1, as determined by step 224, the system 12 adapts to increase the amount of time before the device 18 again powers-down. The system 12 thus patterns device 18 power reduction so that it is less frequent in periods of high demand. 
     If at step 224 the inactivity timer value is not less than X 1, or if at step 226 the activity timer is at its maximum value, execution proceeds to step 230. At step 230, a determination is made whether the inactivity timer has been incremented to a value of greater than X2. X2 may be on the order of one-to-several minutes, depending upon the particular device 18. If the inactivity timer is not greater than X2, execution returns to step 202. If the inactivity timer is greater than X2, at step 232 a determination is made whether the activity timer is at a minimum value. The minimum value may be in the range of several seconds to a few minutes, depending on the initial value of the activity timer and a practical range for its value. If at step 232 the activity timer is at a minimum value, execution returns to step 202. If at step 232 the activity timer is not at a minimum, execution proceeds to step 234. At step 234, the activity timer value is decreased by a value of Y2. Y2 may be on the order of a few seconds to a several minutes, depending upon the particular device. Execution then returns to step 202. By decreasing the activity timer by an incremental value of Y2 at step 234 when there has been a period of device inactivity for greater than a time value of X2, the system 112 adapts to provide more frequent power-down the device 18, improving the power efficiency of the system 10. This is accomplished based upon a relatively low demand for use of the device 18, as determined by the logic. 
     The adaptive power management logic of the system 12 is readily illustrated where the device 18 is an LCD backlight of the system 10. Assuming the activity timer for the backlight is set for 5 minutes, the adaptive logic can be used to adjust this value down to a minimum value of one minute and a maximum value of 10 minutes, based upon user activity. If the user reactivates the backlight after its power-down within an inactivity period of less than ten seconds (X1), the logic of the system 12 would increase the activity timer by one minute (Y1) to a new value of six minutes. This procedure might occur several times until a maximum activity timer value of ten minutes is reached. The system 12 thus adapts to repeated reactivation of the backlight by powering down less frequently. On the other hand, if the user does not reactivate the backlight after power-down for an inactivity period of greater than three minutes (X2), the logic of the system 12 would decrease the activity timer by two minutes (Y2) down to a new value of three minutes. This would happen again until the minimum value of one minute is reached, given this pattern of use. The result would be improved power savings and less inconvenience to the user caused by unwanted power-downs of the backlight. Various activity timer and inactivity timer parameters may be employed, depending on the device 18 or devices to be managed. 
     In one preferred embodiment, the program control system 12 includes several user-programmable activity timers for managing the power consumption characteristics of the CPU and I/O devices 18. The activity timers include a &#34;Standby&#34; timer, an &#34;Auto-Suspend&#34; timer, a &#34;Hard-Disk&#34; timer and an &#34;LCD&#34; timer. Also included is a &#34;Smart CPU&#34; mode, which will be subsequently described in detail. 
     The Standby timer is used to specify the maximum length of time which may elapse between successive occurrences of I/O activity before the system 10 will be placed in a Standby mode, wherein the CPU and several I/O devices 18a are caused to operate in a reduced power consumption state. Specifically, the backlight of the LCD (not shown) is extinguished, the hard-disk drive motor (also not shown) is halted and the CPU clock controller 16 is slowed to a speed of 0 megahertz (MHz). With this timer set, the system 12 monitors I/O activity and resets the timer upon detection of any I/O activity. For example, I/O activity that would cause a resetting of the timer would include accessing a hard drive, using a keyboard, modem, serial port or parallel port. A suggested user setting for the Standby timer is within a range of 10 to 15 minutes, although other settings may be chosen. Upon the occurrence of any I/O activity, the system 10 automatically exits Standby mode and is returns to its previous full power mode. 
     The Auto-Suspend timer is used to specify the maximum length of time which may elapse between successive occurrences of I/O activity before the system 10 will be placed in a Suspend mode. The Suspend mode causes a more extensive reduction in power consumption with respect to the CPU and several I/O devices 18. In addition to deactivating the I/O devices 18 mentioned above, the system 12 also deactivates microcontroller cache memory, keyboard, any mouse and numeric coprocessor devices, and various system clocks. In Suspend mode, the system 10 consumes only enough power to maintain data stored in the system memory 20. The Auto-Suspend timer is reset upon any I/O activity, as discussed above. A suggested user setting for the Auto-Suspend timer is within a range of 20 to 30 minutes, although other settings may be chosen. Upon the occurrence of any I/O activity, the system 10 automatically exits Suspend mode and returns to its previous full power mode. 
     The Hard-Disk timer is used to specify how much time may elapse between successive hard disk accesses before the hard disk drive motor is halted. A suggested user setting for the Hard-Disk timer is within a range of 1 to 15 minutes, although other settings may be chosen. Once halted, the hard disk is reactivated automatically upon the next hard disk access attempt. 
     The LCD timer is used to specify how much time may elapse between periods of I/0 activity before the LCD backlight is extinguished. A suggested user setting for the LCD timer is within a range of 1 to 15 minutes, although other settings may be chosen. Once extinguished, the LCD backlight automatically returns to its full power state upon any I/O activity. 
     The Smart-CPU function is used to reduce the power consumption of the CPU of the processor complex 14 and may be enabled or disabled by a user when setting the above timer values. Upon elapse of the Smart-CPU timer the CPU clock controller 16 is slowed to a reduced speed, such as approximately 3.125 MHz. With this timer set, the system 12 monitors I/O activity and resets the timer upon detection of any I/O activity. The Smart-CPU timer is set for a relatively short interval of time, for example, 12 seconds. The reduced speed mode is useful for conserving power when the CPU is not performing demanding processing functions. 
     It is understood that the present invention can take many forms and embodiments. The embodiments shown herein are intended to illustrate rather than to limit the invention, it being appreciated that variations may be made without departing from the spirit of the scope of the invention. For example, the processor complex 14 may be implemented using any commercially available CPU and associated subsystems, including PC-compatible, RISC-based, Macintosh or other systems. Furthermore, the power control system 12 may be configured to monitor I/O and peripheral devices other than those discussed herein, expansion cards and other components used in association with personal computers. The values of the various timers may be selected according to desired parameters. 
     Although illustrative embodiments of the invention have been shown and described, a wide range of modification, change and substitution is intended in the foregoing disclosure and in some instances some features of the present invention may be employed without a corresponding use of the other features. Accordingly, it is appropriate that the appended claims be construed broadly and in a manner consistent with the scope of the invention. ##SPC1##