Reference voltage diagnostic suitable for use in an automobile controller and method therefor

A diagnostic apparatus is suitable for use in an automobile controller and includes a power supply terminal conducting a reference voltage, a sampling circuit and a reference voltage diagnostic circuit. The sampling circuit is coupled to the power supply terminal and has an output terminal for providing sampled values of the reference voltage. The reference voltage diagnostic circuit has an input terminal coupled to the output terminal of the sampling circuit. The reference voltage diagnostic circuit maintains a historical value of the reference voltage over a predetermined time period, compares a current sampled value of the reference voltage to the historical value, and indicates a fault in the reference voltage in response to the current sampled value being different from the historical value by more than a predetermined threshold.

TECHNICAL FIELD

The present invention generally relates to voltage monitoring diagnostics, and more particularly relates to a reference voltage diagnostic suitable for use in an automobile controller such as a powertrain control module.

BACKGROUND

Automobile control systems are operated by electrical circuitry and sensors. For example, the powertrain control system receives inputs from several sensors that are processed in an electronic powertrain control module. The sensors and the circuitry in the powertrain control module are powered from a reference voltage that has a lower voltage than the battery voltage, for example, five volts.

The powertrain control module includes a microcontroller running an application program that controls the powertrain in response to the sensor inputs. The application program typically includes a diagnostic that is useful in detecting the failure of various components in the powertrain control system. Upon detecting a failure, the diagnostic stores one or more diagnostic error codes in a nonvolatile memory. The diagnostic error codes can later be read by a service technician and used as a basis for effecting repairs by replacing the faulty component or components.

A problem occurs when the failure is due to a loss of the reference voltage. Known reference voltage diagnostics compare the reference voltage to fixed high and low threshold values. In order to detect one possible reference voltage fault, in which the reference voltage line gets shorted to the higher battery voltage, it is necessary to scale the reference voltage to a lower value. This scaling can be accomplished by a resistor divider. However, the resistance of the resistors varies significantly over time as the temperature of the engine compartment varies. The circuit that samples the scaled value also suffers from errors and the reference voltage itself fluctuates over time. Thus, to accommodate all normal operating conditions over the life of the vehicle, the thresholds must be set to a wide range to avoid detecting false failures.

However, using these wide thresholds causes problems when the diagnostic does not detect real reference voltage failures quickly enough. If the reference voltage fails, other components may appear to be failing when the only reason they are failing is that their power supply voltage has failed. If the portion of the diagnostic that detects reference voltage failure is not sensitive enough, the failure may not be detected before the failure of other components is recorded. Thus, the service technician who reads the diagnostic error codes will be directed to the wrong problem, resulting in unnecessary service work, which is expensive and time consuming for the owner.

Accordingly, it is desirable to provide a new diagnostic that is able to detect a reference voltage failure more accurately and to report this failure by setting an appropriate diagnostic error code, while ignoring other consequential failures. This and other desirable features and characteristics of the present invention will become apparent from the subsequent detailed description of the invention and the appended claims, taken in conjunction with the accompanying drawings and this background of the invention.

BRIEF SUMMARY

A diagnostic apparatus suitable for use in an automobile controller includes a power supply terminal conducting a reference voltage, a sampling circuit, and a reference voltage diagnostic circuit. The sampling circuit is coupled to the power supply terminal and has an output terminal for providing sampled values of the reference voltage. The reference voltage diagnostic circuit has an input terminal coupled to the output terminal of the sampling circuit. The reference voltage diagnostic circuit maintains a historical value of the reference voltage over a predetermined time period, compares a current sampled value of the reference voltage to the historical value, and indicates a fault in the reference voltage in response to the current sampled value being different from the historical value by more than a predetermined threshold.

In another form a diagnostic apparatus suitable for use in an automobile controller includes first and second power supply terminals respectively conducting first and second reference voltages, a sampling circuit, and a reference voltage diagnostic circuit. The sampling circuit is coupled to the first and second power supply terminals and has an output terminal for providing sampled values of the first and second reference voltages. The reference voltage diagnostic circuit has an input terminal coupled to the output terminal of the sampling circuit. The reference voltage diagnostic circuit compares a sampled value of the first reference voltage to a sampled value of the second reference voltage, and indicates a fault in at least one of the first and second reference voltages in response a difference between the sampled value of the first reference voltage and the sampled value of the second reference voltage being greater than a predetermined threshold.

A method is also provided for diagnosing a fault of a reference voltage in an automobile controller or the like. A current value of the reference voltage is determined. The current value of the reference voltage is compared to a historical value of the reference voltage. If the current value is not within a predetermined threshold of the historical value, a fault in the reference voltage is indicated.

Another method is provided for diagnosing a fault in one of multiple reference voltages in an automobile controller or the like. Values of first and second reference voltages are determined. A difference between the first reference voltage and the second reference voltage is calculated. The difference is compared to a predetermined threshold. A fault in one of the first and second reference voltages is indicated if the difference is greater than the predetermined threshold.

DETAILED DESCRIPTION

Referring now toFIG. 1, which illustrates a block diagram of a powertrain system utilizing a reference voltage diagnostic according to the present invention, air flows into an internal combustion engine10through an intake throttle blade12, which throttle blade12is controlled by a throttle actuator13. The air is combined into fuel air mixtures and burned in the engine cylinders (not shown). After the air is burned in the cylinders, the exhaust gas flows through an exhaust gas conduit16and a catalytic device18, finally releasing into the atmosphere through a tail pipe20. An accelerator pedal14is displaced in response to operator demand for engine output power. The accelerator pedal14could also take the form of a stick, such as that present in a vehicle equipped for operation by the handicapped.

Associated with the engine are various conventional sensors known in the art, which provide typical signals, related to engine control. Coupled to the throttle12is a throttle position sensor (TPS)22. Vehicle speed is determined from a sensor (not shown) coupled through a flexible cable to the driveshaft26, which rotates at an angular speed proportional to vehicle speed. The degree to which the accelerator pedal14is displaced in response to operator demand for engine output power is indicated by a pedal position sensor28.

Engine controller30forms part of a powertrain control module and includes a conventional digital microcomputer used by those in the art for engine control. Controller30includes standard elements such as a central processing unit (CPU), random access memory, read-only memory, analog to digital converters, input/output circuitry, and clock circuitry. Controller30is activated upon application of ignition power to an engine10. When activated, controller30carries out a series of operations stored in an instruction-by-instruction format in memory for providing engine control, diagnostic and maintenance operations. Signals from the previously mentioned sensors flow over the paths indicated inFIG. 1and serve as inputs to controller30. Using these inputs, controller30performs appropriate computations and outputs various signals. For example, controller30uses pedal position sensor28in an electronic throttle control algorithm to produce a signal, labeled “ETC”, to control throttle actuator13. When accelerator pedal14is displaced, the ETC signal directs throttle actuator13to increase the angle of throttle12, allowing more air into the engine and thereby increasing engine power.

Controller30also provides a reference voltage labeled “Vref” to each of sensors22,24, and28via a power supply line32. Sensor24represents one of many other possible sensors connected to controller30that is supplied with Vref. During operation of the vehicle, there may be a fault such that Vrefis corrupted. For example, power supply line32may be shorted to ground or to the battery voltage, resulting in values of around zero volts and twelve volts respectively appearing on power supply line32. According to the present invention, controller30includes a diagnostic portion of its application program that is able to detect such faults on power supply line32so that controller30can set the appropriate diagnostic error codes, as will be explained in greater detail below.

FIG. 2illustrates in block diagram form controller30ofFIG. 1. Controller30includes conventional components but only the components relevant to understanding the present invention are shown inFIG. 2. Thus controller30is illustrated as having a power supply block50, an attenuation circuit52, an analog to digital (A-to-D) converter54, a central processing unit56, and a memory58storing an application software program. Power supply50is responsive to a source of operating power such as the ignition system or car battery and provides operating power to the modules in controller30. One of these voltages is Vref, which is provided to the external sensors on power supply line32. Power supply line32is also connected to an input of an attenuation circuit52. Attenuation circuit52provides a scaled version of Vrefto an output terminal thereof. Attenuation circuit52includes a resistor divider, not shown, to place the scaled version of Vrefin the center of the operating range of A-to-D converter54when Vrefis at its nominal value of five volts. By such scaling A-to-D converter54is able to detect when Vrefexceeds its nominal 5-volt value. A-to-D converter54periodically provides output digital samples corresponding to the analog value of the scaled version of Vrefto CPU56. CPU56runs the application software stored in memory58and operates in conjunction with the application software to form a diagnostic circuit. This application software includes a diagnostic that detects failures in Vrefthat will be described more fully with reference toFIG. 4below.

FIG. 3is a flow chart of a reference voltage diagnostic70known in the prior art. Diagnostic70is run periodically, and after starting at step72it reads the value of Vreffrom the output of A-to-D converter54at step74. Then at step76it determines whether Vrefis greater than a first fixed value or less than a second fixed value. For example, the upper limit may be 5.5 volts and the lower limit 4.5 volts. If the answer to the conditional is YES, then it sets a diagnostic error code labeled “VrefERROR” to TRUE at step78and the routine terminates at step80. Otherwise, if the answer to the conditional is NO, the routine terminates at step80without setting VrefERROR to TRUE.

The allowable range for Vrefis relatively large to compensate for errors in the system's ability to measure the true value of Vref. There are several sources of error, including the A-to-D converter; changes in the electrical properties of the attenuation circuit over time and temperature, and the normal fluctuation in Vrefitself. The threshold must accommodate all operating conditions over the life of the vehicle. As a result, the thresholds are set widely to prevent falsely setting VrefERROR to TRUE. This wide range of thresholds can result in falsely reported sensor failures resulting in unnecessary service work to replace the sensors as discussed above.

However, according to the present invention, the reference voltage diagnostic doesn't measure the absolute value of the reference voltage but rather looks for a sudden change in the voltage level over its historical value. Such a sudden change cannot be accounted for by changes in temperature since engine heating affects the properties of the components slowly compared to the frequency with which the historical value is maintained. Thus, the diagnostic can detect faults in the power supply voltage while ignoring changes caused only by normal variations in operating conditions such as increases in temperature and normal inaccuracies in the components used to measure the voltage. In addition this more accurate measurement allows the reference voltage diagnostic to detect when the inputs from other sensors will not be accurate, preventing erroneous failure reports.

This reference voltage diagnostic can be better understood with reference toFIG. 4, which is a flow chart of a reference voltage diagnostic100used in controller30ofFIGS. 1 and 2. Diagnostic100is also run periodically and after starting at step102, and reads the current sampled value of Vreffrom the output of A-to-D converter54at step104. In step106it calculates a new historical value of Vrefby factoring in the new sample. In one embodiment the historical value is formed with a first order lag filter. Using the first order lag filter causes the historical value to be formed by a smoothing factor β times the previous historical value of Vrefplus the quantity one minus β times the current sampled value of Vref. β is chosen appropriately to select the desired degree of responsiveness or alternatively the desired degree of hysteresis. Thus the first order lag filter includes a history of all prior samples. Alternatively other types of historical values can be calculated. For example the historical value may be calculated as a linear average of a certain number of the preceding samples of Vref.

After the historical value is formed step108determines whether the current sampled value of Vrefis greater than the historical value plus a predetermined threshold, or less than the historical value minus the predetermined threshold. Note that in the illustrated embodiment the thresholds used for positive and negative deviation are the same, but in other embodiments different threshold values may be used. The frequency with which the reference voltage diagnostic is run is so fast that the deviation from the historical value due to heating and normal variation in the other components will be small, and any larger deviation can validly be interpreted as a Vreferror. Thus, if the answer to the conditional is YES, then the diagnostic sets VrefERROR to TRUE at step110by storing an appropriate diagnostic error code in nonvolatile memory in controller30, and the routine terminates at step112. Otherwise, if the answer to the conditional is NO, then the routine terminates at step112without setting VrefERROR to TRUE.

This new diagnostic allows for setting thresholds more tightly. Actual reference voltage failures, such as shorting power supply line32to ground or to the battery voltage, will have a time constant on the order of tens of microseconds and will be detected by the diagnostic program before it detects the other sensors failing. Thus, the diagnostic provides more accurate fault detection.

FIG. 5is a flow chart of a second reference voltage diagnostic120according to the present invention. Reference voltage diagnostic120is useful in a system that generates two reference voltages, labeled “Vref1” and “Vref2”. Now referring toFIG. 6, a modified controller140having two power supplies for use with reference voltage diagnostic120ofFIG. 6is shown. Controller140includes an additional power supply142providing reference voltage Vref2and an additional attenuation circuit146whose output is provided to another input of A-to-D converter54. Other features remain the same as inFIG. 3. The different reference voltages could be provided in any combination to sensors22,24, and28or other sensors which may be present in the powertrain system shown inFIG. 1.

Returning toFIG. 5, reference voltage diagnostic120is run periodically and after starting at step122, reads the current sampled values of Vref1and Vref2from outputs of the A-to-D converter at step124. At step126it calculates difference between the two reference voltages by determining the absolute value of Vref1−Vref2(|Vref1−Vref2|), and compares this quantity to a threshold at step128. If this quantity does not exceed the threshold, then the diagnostic ends at step136. If however this quantity exceeds the threshold, then the reference voltage diagnostic determines that one of the power supplies has encountered a fault. The next step is to determine which power supply has been subject to a fault.

At step130, the reference voltage diagnostic compares Vref1and Vref2. The lower of the two values is assumed to represent the faulted supply. Thus if Vref1<Vref2, then at step132a diagnostic error code known as Vref1ERROR is set to TRUE. Alternatively if Vref1>Vref2, then at step134a diagnostic error code known as Vref2ERROR is set to TRUE. The voltage reference diagnostic then ends at step136.

Note that diagnostic120will report an erroneous result if one of the power supplies is shorted to the battery. However, the short-to-battery fault is much less common than the short-to-ground fault, and is believed to be about three orders of magnitude less common for a typical automobile environment. Furthermore reference voltage diagnostic120could be used in conjunction with known diagnostic70ofFIG. 3. In this case reference voltage diagnostic70would set an out-of-range high code, causing both diagnostic error codes to be set. Furthermore other software already captures the voltages when the error codes are set so the service technician will be able to see which one is out of range. The captured voltage in the short-to-battery case would be about 5.5 volts since the maximum scaled value is 5.5 volts. Alternatively diagnostic120could be disabled if one of the reference voltages is currently out of range high, allowing only the correct code to be logged.

Reference voltage diagnostic120provides a fast indicator of a power supply fault by using the information contained in the other power supply as a reference. As heating occurs the components used to generate Vref1will tend to drift by about the same amount as those used to generate Vref2. Thus over expected operating conditions Vref1will tend to track Vref2. Any difference greater than the threshold will likely be the result of a fault rather than normal variation over operating conditions. Furthermore Vref1and Vref2need not have the same nominal values, but can be compared to each other as long as their respective attenuation circuits cause the corresponding scaled values to nominally be the same.

It should be noted that the reference voltage diagnostic disclosed herein is applicable to other automobile modules beside the powertrain control module, such as the engine control module. It may also be used in non-automotive systems that require diagnostic checking and/or reporting and that route power supply voltages to various devices. The controller may be part of a larger system or it, may only function as a diagnostic circuit. In other embodiments the diagnostic could perform the same function that is performed by the CPU running the diagnostic portion of the application software. In the illustrated embodiments, controllers30and140indicate the reference voltage fault by setting a diagnostic error code and storing the diagnostic error code in a nonvolatile memory from which it can later be read by a service technician. However the diagnostic may use other techniques to indicate the reference voltage fault, such as activation of a signal on a signal line.