Method and apparatus for data communication

Abstract: A voltage regulation system for an automobile comprises a voltage regulator 16 and a powertrain control module 18. The powertrain control module 18 has a quartz crystal 26 as its time base, while the voltage regulator has a less-expensive, though more environmentally robust resistive-capacitive (RC) oscillator 22. The voltage regulator 16 and powertrain control module 18 communicate between one another using pulse-width modulation. Drift in the frequency of the RC oscillator 22 in the voltage regulator 16 is recognised through the powertrain control module's measurement of the frequency of the signal sent by the voltage regulator 16. The powertrain control module 18 adjusts the frequency of the signal it sends to the voltage regulator, assuring that the drift in frequency of the RC oscillator does not inhibit accurate PWM communications between the two devices.

Description: Field of the invention The present invention relates generally to data communication, and more specifically to data communication in a system with a device having a time base with a parameter which varies over time. Background of the invention A common method of data communication is pulse-width modulation (PWM). In pulse-width modulation, a fixed frequency signal is normally used. The data to be communicated with this signal is encoded as a "duty cycle" (i.e., a percentage of the total period of the signal that the signal is in its ON state). Devices that communicate using pulse-width modulation usually employ some form of time base to generate and decode the pulse-width-modulated signals involved. Such time bases can vary from high-accuracy, high-stability time bases such as quartz crystals to lower-cost time bases such as resistive-capacitive (RC) oscillators. Such lower-cost time bases may also be able to withstand more severe environments (e.g., near the engine of an automobile) than other time bases. Lower-cost time bases can exhibit some drift in frequency over time and temperature. Those skilled in the art recognise that such drift can pose a significant concern to PWM communication. US Patent No 5 140 611 discloses a data communication system in which synchronous digital data is transmitted from a master unit to a slave unit. The transmission is via a pulse width modulated data stream including pulse width modulated binary data pulses and a pulse width modulated synchronisation pulse. The data and synchronisation pulses all have a leading edge at the same point in each cycle of a master clock signal provided by a master clock. The slave unit derives a clock signal from the received binary data stream to decode the received data. The synchronisation pulse is employed to maintain phase synchronisation. The slave unit has no oscillator of its own but relies on the clock signal derived from the received data steam. Object of the invention The invention seeks to provide a method of compensating for drift in frequency, while still taking advantage of the lower cost and potentially superior environmental durability of lower-cost time bases. Summary of the invention In accordance with a first aspect of the invention, there is provided a method for data communication between a first device and a second device, said first device configured to transmit a first signal to said second device and said second device configured to transmit a second signal to said first device, the method comprising the steps of; measuring at the second device a parameter of the first signal transmitted by the first device; and adjusting the corresponding parameter of the second signal transmitted by the second device in response to the measured parameter; characterised in that; a first oscillator is employed in the first device as a time base for the first signal and a second oscillator is employed in the second device as a time base for the second signal, the first oscillator being subject to drift in frequency relative to the second oscillator; the step of measuring, at the second device, a parameter of the first signal consists of measuring the frequency of the first signal by reference to the second oscillator; the method includes the further step of decoding the second signal at the first device by reference to the first oscillator, and the step of adjusting the corresponding parameter of the second signal transmitted by the second device consists of adjusting the frequency of the second signal to counteract the effect of the said drift in frequency on decoding the second signal at the first device. In accordance with a second aspect of the invention, there is provided data communication apparatus comprising a first device configured to transmit a first signal to a second device, said second device being configured to transmit a second signal to said first device, the apparatus comprising ; measuring means at the second device adapted to measure a parameter of the first signal transmitted by the first device; and adjusting means to adjust the corresponding parameter of the second signal transmitted by the second device in response to the measured parameter; characterised in that; the first device includes a first oscillator as a time base for the first signal and the second device includes a second oscillator as a time base for the second signal, the first oscillator being subject to drift in frequency relative to the second oscillator; the measuring means at the second device is adapted to measure the frequency of the first signal by reference to the second oscillator; the apparatus includes decoding means in the first device to decode the second signal by reference to the first oscillator, and the adjusting means is adapted to adjust the frequency of the second signal to counteract the effect of the said drift in frequency on decoding of the second signal by the decoding means in the first device. Brief description of the drawings The invention will now be described further, by way of example, with reference to the accompanying drawings, in which the single figure shows a block diagram of s system embodying the invention. Detailed description of the preferred embodiment The drawing illustrates a portion of the system described in co-pending European Patent Application No. 95304456.7 filed by the present Applicants on 26 June 1995. The entire disclosure of the latter application is hereby incorporated by reference. The system 10 comprises an alternator 14, the voltage of which is controlled by a voltage regulator 16. The voltage regulator 16 comprises an integrated circuit 20, called an "Externally-Controlled Integral Alternator Regulator" (ECIAR), manufactured by Motorola ®. Within integrated circuit 20 is a resistive-capacitive (RC) oscillator 22. The system 10 further comprises a powertrain control module 18. The powertrain control module 18 is preferably an EEC-IV controller from Ford Motor Company, although other controllers can be substituted. Powertrain control module 18 is preferably a microprocessor-based device which contains sufficient microcomputer resources (memory, throughput, registers, inputs, outputs and the like) to perform the functions ascribed to it herein. Powertrain control module 18 has responsibility for a number of engine management functions including idle control, as are numerous powertrain control modules known to the art. In the preferred embodiment of the present invention, powertrain control module 18 further determines the voltage at which voltage regulator 16 is to control the output of alternator 14. Powertrain control module 18 contains microprocessor 24, preferably an Intel 8061 microprocessor. Coupled to the microprocessor 24 is a crystal 26, the time base for the functions performed by the microprocessor 24. Two circuits connect the voltage regulator 16 and the powertrain control module 18. Load indicator circuit 28 provides a pulse-width-modulated (PWM) signal from the voltage regulator 16 to the powertrain control module 18, the signal being generated by the integrated circuit 20. The duty cycle of the signal on the load indicator circuit 28 provides the powertrain control module 18 with a measure of the mechanical torque applied by the alternator 14 on the engine which drives it. For the purposes for which the signal is used in this disclosure, the signal preferably has a nominal frequency of 150 hertz. The regulator control circuit 30 is used by he powertrain control module 18 to provide a command to the voltage regulator 16 indicating the output voltage at which the voltage regulator 16 should control the alternator 14. The signal provided by the powertrain control module 18 to the voltage regulator 16 on the regulator control circuit 30 is preferably pulse-width modulated, the duty cycle being a function of the desired output voltage command from the powertrain control module 18 to the voltage regulator 16. This PWM signal is generated by microprocessor 24. The frequency of this signal is selectable by loading appropriate values in appropriate memory locations. The nominal frequency of this signal is preferably proportional to the frequency on load indicator circuit 28 and more preferably equal to that frequency (150 hertz). The oscillator 22 within the voltage regulator 16, being a relatively inexpensive R-C oscillator, is susceptible to variation in frequency over time. Further, the frequency can vary over temperature. These variations can interfere with accurate communication between the powertrain control module 18 and the voltage regulator 16. This interference can occur because the oscillator 22 is the time base for decoding by the voltage regulator 16 of the PWM signal on the regulator control circuit 30. Oscillator 22 is also the time base for generation by the voltage regulator 16 of the PWM signal on the load indicator circuit 28. In decoding the signal received on the regulator control circuit 30, the integrated circuit 20 uses its oscillator 22 as input to a counter to measure how long the signal on regulator control circuit 30 remains in its ON state. So, if the oscillator 22 increases in frequency, for example, the counter will count higher for a given ON time of the signal on the regulator control circuit 30. This will make the voltage regulator 16 think that the powertrain control module 18 is commanding a higher voltage than is in fact the case. Such a situation is prevented by an algorithm in powertrain control module 18. Powertrain control module 18 measures the period of the signal it receives on load indicator circuit 28 from voltage regulator 16. The measurement is performed using the following formula: T = t 2 - t 1 where t 1 is the time at which a rising edge occurs, t 2 is the time at which the subsequent rising edge occurs, and T is the resultant period of the signal on the load indicator circuit 28. The frequency of the signal on the load indicator circuit 28 is then the reciprocal of the period. Because of the one-to-one relationship between frequency and period, frequency and period are equivalently appropriate parameters to measure for the purposes of this embodiment of the present invention. Because oscillator 22 is the time base for the generation of this signal, drifting of the frequency or period of the signal indicates drifting of the frequency of the oscillator 22. If the powertrain control module 18 recognises that the frequency or period of the signal on the load indicator circuit 28 is drifting, the powertrain control module 18 adjusts the frequency of the signal generated by microprocessor 24 and transmitted on the regulator control circuit 30 in response to that frequency. Preferably, the frequency of the signal transmitted on the regulator control circuit 30 is adjusted to be proportional to the frequency of the signal on the load indicator circuit 28. More preferably, the frequency of the signal transmitted on regulator control circuit 30 is adjusted to be equal to the frequency of the signal on the load indicator circuit 28. So, consider the same example as above. If the oscillator 22 increases in frequency, the frequency of the signal on the load indicator circuit 28 will also increase, because the oscillator 22 is the time base for encoding the signal on the load indicator circuit 28. The powertrain control module 18 will recognise the increased frequency and will accordingly increase the frequency of the signal on the regulator control circuit 30. Thus, for a given duty cycle, the ON time of the signal on the regulator control circuit 30 will decrease. This shorter ON time counteracts the decoding problem described above, caused by the increased frequency of the oscillator 22, which is the decoding time base for the voltage regulator 16.

Claims: A method for data communication between a first device (16) and a second device (18), said first device (16) configured to transmit a first signal to said second device (18) and said second device (18) configured to transmit a second signal to said first device (16), the method comprising the steps of; measuring at the second device (18) a parameter of the first signal transmitted by the first device (16); and adjusting the corresponding parameter of the second signal transmitted by the second device (18) in response to the measured parameter; characterised in that ; a first oscillator (22) is employed in the first device (16) as a time base for the first signal and a second oscillator (26) is employed in the second device (18) as a time base for the second signal, the first oscillator (22) being subject to drift in frequency relative to the second oscillator (26); the step of measuring, at the second device (18), a parameter of the first signal consists of measuring the frequency of the first signal by reference to the second oscillator (26); the method includes the further step of decoding the second signal at the first device (16) by reference to the first oscillator (22), and the step of adjusting the corresponding parameter of the second signal transmitted by the second device (18) consists of adjusting the frequency of the second signal to counteract the effect of the said drift in frequency on decoding the second signal at the first device (16). A method as claimed in claim 1, wherein the first oscillator (22) is an R-C oscillator and the second oscillator is a crystal oscillator (26). A method as claimed in claim 1 or 2, wherein the first and second signals are pulse-width modulated. A method as claimed in claim 1, 2 or 3, applied to data communication in which the first device (16) is a voltage regulator for an automotive alternator and the second device (18) is a powertrain control module. A method as claimed in any one of the preceding claims, wherein the step of adjusting the frequency of the second signal to counteract the effect of the said drift in frequency on decoding the second signal at the first device (16) consists of setting the frequency of the second signal to be proportional, or substantially equal, to the frequency of the first signal. Data communication apparatus comprising a first device (16) configured to transmit a first signal to a second device (18), said second device (18) being configured to transmit a second signal to said first device (16), the apparatus comprising ; measuring means (24) at the second device (18) adapted to measure a parameter of the first signal transmitted by the first device (16); and adjusting means (24) to adjust the corresponding parameter of the second signal transmitted by the second device (18) in response to the measured parameter; characterised in that ; the first device (16) includes a first oscillator (22) as a time base for the first signal and the second device includes a second oscillator (26) as a time base for the second signal, the first oscillator (22) being subject to drift in frequency relative to the second oscillator (26); the measuring means (24) at the second device (18) is adapted to measure the frequency of the first signal by reference to the second oscillator (26); the apparatus includes decoding means (20) in the first device (16) to decode the second signal by reference to the first oscillator (22), and the adjusting means (24) is adapted to adjust the frequency of the second signal to counteract the effect of the said drift in frequency on decoding of the second signal by the decoding means (20) in the first device (16). Apparatus as claimed in claim 6, wherein the first oscillator (22) is an R-C oscillator and the second oscillator (26) is a crystal oscillator. Apparatus as claimed in claim 6 or 7, wherein the first and second devices (16, 18) are configured to transmit the first and second signals as pulse-width modulated signals. Apparatus as claimed in claim 6, 7 or 8, in which the first device (16) is a voltage regulator for an automotive alternator and the second device (18) is a powertrain control module. Apparatus as claimed in any one of claims 6 to 9, wherein the adjusting means (24) is adapted to adjust the frequency of the second signal by setting the frequency of the second signal to be proportional, or substantially equal, to the frequency of the first signal.

Inventors: DEBIASI CHARLES JAMES, DELJEVIC ZELJKO, RENEHAN JOHN FRANCIS, TUTEJA VIKAS, DEBIASI, CHARLES JAMES, DELJEVIC, ZELJKO, RENEHAN, JOHN FRANCIS, TUTEJA, VIKAS
Applicants: FORD MOTOR CO, FORD MOTOR COMPANY
Application year: 1995
Main classification: H04L7
IPC codes: H04L7, B60R16