Abstract:
A scaling system and technique which employs an analog-to-digital converter having at least 10-bit accuracy and a ranging circuit to compensate for abnormally large vehicle magnetic fields. The ranging circuit employs variable resistance negative feedback, which enables an electronic compass system to reduce the output voltage of an integrator to within the fixed output voltage range of the integrator. An analog-to-digital converter of at least 10-bit accuracy makes resolution of heading information possible and enhances the accuracy of subsequently performed calibrations.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     The present application is related to the following, co-pending applications filed concurrently herewith: 
     &#34;Shifting System And Method For An Electronic Compass System&#34;, application Ser. No. 07/815,267; 
     &#34;Data Processing Method For An Electronic Compass System&#34;, application Ser. No. 07/815,266; 
     &#34;Heading Computation For An Electronic Compass&#34;, application Ser. No. 07/815,346; 
     &#34;Magnetic Transient Detection And Calibration Technique For An Auto-Calibrating Compass&#34;, application Ser. No. 07/815,268; 
     &#34;Method For Selecting Calibration Data For An Auto-Calibrating Compass&#34;, application Ser. No. 07/815,264; 
     &#34;Flux-Gate Sensor Orientation Method&#34;, application Ser. No. 07/815,265; 
     &#34;Noise Removal Method For An Electronic Compass&#34;, application Ser. No. 07/815,269; 
     &#34;Flux-Gate Sensor Mounting And Method&#34;, application Ser. No. 07/815,270; 
     &#34;A Method For Interpreting Magnetic Direction For A Compass On A Vehicle&#34;, application Ser. No. 07/815,274. 
     The disclosures of all the applications cited above are hereby incorporated by reference and made a part hereof the same as if fully set forth herein. 
     BACKGROUND OF THE INVENTION 
     1. Technical Field 
     The present invention relates to electronic compasses, and more specifically to a circuit and method for compensating for excess vehicle magnetic fields in an electronic compass. 
     2. Discussion 
     The present invention is related to and is an improvement of U.S. Pat. No. 4,622,843 to Hormel issued Nov. 18, 1986 entitled &#34;Simplified Calibration Technique and Auto Ranging Circuit for an Electronic Compass Control Circuit&#34;. The present invention is also related to U.S. Pat. No. 4,807,462 issued Feb. 28, 1989, to Rafi A. Al-Attar and entitled &#34;Method for Performing Automatic Calibrations in an Electronic Compass.&#34; These patents are hereby incorporated by reference. The present invention is related to and combinable with the commonly assigned patent application &#34;Shifting System and Method for an Electronic Compass,&#34; Ser. No. 07/815,267.This application is hereby incorporated by reference. 
     Normally, electronic compass systems employ a magnetic flux-gate sensor. The operation of the flux-gate sensor is well documented. See, Hisatsugu Itoh, &#34;Magnetic Yield Sensor and Its Application to Automobiles&#34;, SAE Paper No. 800123, pages 83-90, February, 1980; and Doug Garner, &#34;A Magnetic Heading Reference for the Electro/Fluidic Autopilot,&#34; Sport Aviation, Part I, pages 19-26, November, 1981 and Part II, pages 20-32, 51, December, 1981. These documents are hereby incorporated by reference. 
     Electronic compasses are capable of processing ordinary vehicle and earth magnetic fields. In the &#39;843 patent to Hormel, the output of an integrator is summed with the output of a ranging circuit and the sum is fed back to the flux-gate sensor. The feedback current reduces the output voltage of the flux-gate sensor, and consequently the integrator, until feedback current is equal in magnitude but opposite in direction to the current in the sense coils produced by the earth and vehicle magnetic field. 
     However, the primary purpose of the ranging circuit is to bring the output of the integrator into a range that the analog-to-digital IC can resolve clearly. Therefore, the ranging circuit is not capable of compensating for abnormally large vehicle magnetic fields, making the geometric method of calibration found in the &#39;462 and &#39;843 patents difficult to perform. The feedback current is limited by the resolving power of the analog-to-digital converter, where resolving power is defined as the ability of the analog-to-digital converter to partition an analog signal into distinct voltage ranges and assign a different value to each range. The feedback current is also limited by the size of the feedback resistors, and the inherent feedback limitations of the ranging circuit. 
     SUMMARY OF THE INVENTION 
     In accordance with the teachings of the present invention, an electronic compass system employing a scaling compensation circuit is provided. The electronic compass system includes a microcomputer, a flux-gate, a flux-gate driver, a multiplexer, a bandpass filter, a synchronous detector, an integrator, and a summing amplifier. The scaling compensation circuit employs an analog-to-digital converter having at least 10-bit accuracy and a ranging circuit. The ranging circuit employs variable resistance negative feedback, which enables the electronic compass system to reduce the voltage at the flux-gate, and consequently the integrator, to within the allowable output voltage range of the integrator for large vehicle magnetic fields. Since decreasing the feedback current also decreases the output voltages of the integrator, an analog-to-digital converter of at least 10-bit accuracy makes resolution of heading information from the integrator output possible. Thus, the scaling compensation system enhances the accuracy of the subsequently performed calibration method found in the &#39;462 and &#39;843 patents. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Other objects and advantages will become apparent upon reading the following detailed description and upon reference to the drawings, in which: 
     FIG. 1 is a block diagram of the electronic compass disclosed in the &#39;843 patent to Hormel; 
     FIG. 2 is a depiction of the operational amplifier output voltage range or &#34;window&#34; of the electronic compass system in the &#39;843 patent to Hormel, showing the vehicle&#39;s magnetic field voltage vector V and the earth&#39;s magnetic field voltage vector R before compensation; 
     FIG. 3a is a depiction of the window of FIG. 2, but showing the compensation voltage vector V c  ; 
     FIG. 3b is a depiction of the window of FIG. 3a, but showing the resultant of the compensation voltage vector V c  and the vehicle&#39;s and the earth&#39;s magnetic field voltage vectors V and R; 
     FIG. 4 is a block diagram of a preferred embodiment of a compass system employing the scaling compensation system of the present invention. 
     FIG. 5 is a depiction of the same window as FIG. 3, but showing the vehicle&#39;s magnetic field voltage vector V and the earth&#39;s magnetic field voltage vector R after compensation in accordance with the method of the present invention; and 
     FIG. 6 is a block diagram of an alternative preferred embodiment of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Turning now to FIG. 1, there is shown a block diagram of the electronic compass system 10 of the &#39;843 patent to Hormel. The heart of the system is a microcomputer 12 which employs an 8-bit analog-to-digital converter 14. The microcomputer 12 controls operation of the electronic compass system 10, beginning with a flux-gate driver 16. Upon receipt of a square-wave signal from the microcomputer 12, the flux-gate driver 16 adds enough drive to the signal to saturate a flux-gate 18. The operation of the flux-gate driver 16 and flux-gate 18 are explained in the documents incorporated by reference, namely &#34;A Magnetic Heading Reference for the Electro/Fluidic Autopilot&#34; and &#34;Magnetic Field Sensor and its Application to Automobiles, (SAE Paper No. 800123)&#34;. The flux-gate 18 employs two sense coils oriented perpendicularly to one another. Voltages are induced across the sensor coils by the presence of the magnetic fields of the vehicle and the earth. 
     The voltages from the sense coils of the flux-gate 18 are selected by a multiplexer 20. The multiplexer 20 is in communication with the microcomputer 12, which generates a signal for controlling a network for switching use of a four-pole bandpass filter 22, a synchronous detector 24 and an integrator 26 periodically from one sense coil to the other. The multiplexer 20 is in communication with the four-pole bandpass filter 22, which filters out all but the second harmonic signals, whose amplitude is proportional to the earth&#39;s magnetic field. Second harmonic signals are presented to the synchronous detector 24. The function of the synchronous detector 24 is to select the portion of the filtered signals to be integrated by the integrator 26. The output of the synchronous detector 24 is a half-wave rectified signal which is fed into the integrator 26. 
     The output of the integrator 26 periodically switches back and forth between two DG levels corresponding to the two sense coils of the flux-gate 18. Integrator output is stabilized by feeding back a current through resistor R f  to the sense coils of the flux-gate 18. The feedback current eventually generates an equal and opposite magnetic field versus that produced by the magnetic field sensed by the flux-gate 18. Therefore, the output voltages, V ox  and V oy , of the integrator 26 are directly proportional to the sensed magnetic field by a constant R f  which is the feedback resistance: 
     
         V.sub.ox =KR.sub.f (V.sub.mx +R.sub.mx). 
    
     where V mx  +R mx  is the geometric addition (or resultant) of the magnetic fields of the earth and the vehicle in the x coil. K is a constant. Similarly, 
     
         V.sub.oy =KR.sub.f (V.sub.my +R.sub.my) 
    
     where V my  +R my  is the geometric resultant at the magnetic field, of the earth and vehicle tn the y coil, and K is a constant related to the physical characteristics of the flux-gate 18, such as its number of turns, permeability, and the gain of the filter 22 and integrator 26. 
     The ranging circuit 28 used in the &#39;843 patent to Hormel moves the DC levels at the integrator output closer to the origin and toward a magnitude within the window. The ranging circuit 28 generates a compensation field such that 
     
         V.sub.n +R=V+R+V.sub.c or 
    
     
         V.sub.n =V+V.sub.c 
    
     where V n  is the new vehicle magnetic field vector voltage, R is earth&#39;s magnetic field voltage, and V c  is the compensation field vector voltage. 
     Heading information is determined from the output of the integrator 26. The microcomputer 12 is coupled to the integrator output through the 8-bit analog-to-digital converter 14. The 8-bit analog-to-digital converter 14 converts the DC levels to digital codes (i.e., coordinates) referenced to a cartesian coordinate system. The microcomputer 12 divides the y-coordinate, corresponding to the DG level from one coil, by the x-coordinate, corresponding to the other coil, and takes the arctangent of the quotient using a piece-wise-linear-function-of-x routine to yield the vehicle&#39;s heading. Galibratton is then performed under the method of the &#39;462 patent. 
     The integrator 26 employs operational amplifiers which have voltage output ranges of approximately O to V a  volts. In the &#39;843 patent to Hormel, the voltage output range is approximately 0 to 10 volts. Since the voltages induced across the sense coils of the flux-gate 18 may be negative or positive, these voltages must be modified for use in the integrator 26. Negative voltages are modified by tying the sense coils of the flux-gate 18, the bandpass filter 22 reference voltage and the integrator 26 reference point to a reference voltage of V cc , halfway between O and V a  volts. In the &#39;843 patent to Hormel, V cc  is equal to 5 volts. 
     The magnitude of the voltage outputs of the integrator 26 are indirectly reduced to some extent by the operation of a ranging circuit 28. However, the primary purpose of the ranging circuit 28 is to bring the DC output levels of the integrator 26 into a range that the A/D can resolve for all headings, not to compensate for abnormally large vehicle magnetic fields. It accomplishes this through the use of negative feedback through resistor R f . The ranging circuit 28 monitors integrator output and employs a variable voltage source, having an operational amplifier, to produce feedback. The outputs of the integrator 26 and ranging circuit 28 are combined in a summing amplifier 30. 
     Turning now to FIG. 2, there is shown a voltage window 30. The x and y axes correspond to the two DC output levels V ox  and V oy  of the integrator 26. The limits of the window 30 are determined by the output voltage range of the operational amplifiers within the integrator 26. This range is depicted as approximately O to V a  volts. The voltage V cc  is applied to the junction of the two sense coils, the bandpass filter 22 and the integrator 26 and marks a reference for the origin O of the vehicle&#39;s magnetic field vector voltage V. 
     Also shown is the earth&#39;s magnetic field vector voltage R and circle 32. The earth&#39;s magnetic field circle 32 is the locus of points described by the earth&#39;s magnetic field vector voltage R as the vehicle changes heading. The vehicle&#39;s magnetic field vector voltage V remains stationary with respect to the x and y axes, which are the frame of reference of the vehicle (and the flux-gate 18). 
     In FIGS. 3a and 3b there is shown the window 30 of FIG. 2 However, the earth&#39;s magnetic field circle 32 has been brought partially into the window 30 by the operation of the ranging circuit 28 of the electronic compass of FIG. 1. The magnetic compensation vector voltage V c  is added to the vehicle&#39;s magnetic field vector voltage V to produce a new vehicle magnetic field vector voltage V n . The earth&#39;s magnetic field vector voltage R remains the same as before compensation. 
     The ranging circuit 28 in FIG. 1 is incapable of producing enough feedback current to bring the earth&#39;s magnetic field circle 32 totally within the window 30. When abnormally large vehicle magnetic fields are present, part of the earth&#39;s field circle 32 remains outside the voltage window 30 after compensation. For vehicle headings in which the earth&#39;s magnetic field vector voltage R crosses the boundaries of the window 30, the microcomputer 12 is incapable of generating accurate headings. If the earth&#39;s magnetic field circle 32 were totally outside the window 30 after compensation, then the microcomputer 12 would be incapable of generating any accurate headings, because the operational amplifiers of the integrator 26 would be in constant saturation. Thus, calibration under the method of the &#39;462 and &#39;843 patents would be difficult. 
     Turning now to FIG. 4, there is shown the improved electronic compass system 34 of the present invention. The system 34 and new method of compensation employed therein change the DG output levels by changing the amount of feedback resistance R f , thereby bringing the voltage across the sense coils to within the output voltage range of the integrator 26. This resistance is made variable to accommodate variations in magnetic fields among vehicles. It may be preset when the electronic compass system is installed in a vehicle and would be accessible to service personnel if a particular vehicle&#39;s magnetic field were to later change. 
     As shown in FIG. 5, feedback resistance R f  produces a scaling effect. As the feedback resistance R f  increases, the DC output levels of integrator 26 increase. Reducing feedback resistance R f  also reduces the magnitudes of both the vehicle&#39;s magnetic field vector voltage V and the earth&#39;s magnetic field vector voltage R at the output of the integrator 26. The decrease in feedback resistance R f  brings the entire earth&#39;s field circle 32 within the window of the integrator 26. Advantageously, vectors, V and R can be scaled up or down by a factor α that is proportional to feedback resistance R f . For a fixed value of R f , 
     
         V.sub.ox =KR.sub.f (V.sub.mx +R.sub.mx)                    (1) 
    
     
         V.sub.oy =KR.sub.f (V.sub.my +R.sub.my)                    (2) 
    
     Under the method of the present invention, 
     
         V.sub.ox new =KαR.sub.f (V.sub.mx +R.sub.mx) 
    
     
         V.sub.oy new =KαR.sub.f (V.sub.my +R.sub.my) 
    
     or 
     
         V.sub.ox new =αV.sub.ox 
    
     
         V.sub.oy new =αV.sub.oy 
    
     Therefore, V+R will become αV+αR after changing the feedback resistance R f  by a factor α. In FIG. 5, the factor α is less than 1 and the vectors V and R are scaled down. 
     Since a decrease in feedback resistance R f  reduces the effects of both the earth&#39;s magnetic field vector voltage R and the vehicle&#39;s magnetic field vector voltage V, the DC output levels of the integrator 26 are incapable of being accurately resolved by the 8-bit analog-to-digital converter 14. Therefore, the present invention of FIG. 4 employs a 10-bit analog-to-digital converter 38. Of course, other analog-to-digital converters of greater resolving power are also envisioned by this invention. A commercially available 10-bit analog-to-digital converter is the model 68HC68A2 manufactured by RCA. Advantageously, the present invention makes calibration under the method of the &#39;462 and &#39;843 patents possible for abnormally large vehicle magnetic fields. 
     Except for the feedback resistance R f  and the analog-to-digital converter 14, the elements of the compass system 10 of FIG. 1 are identical with those of the compass system 34 of FIG, 4. However, as shown in FIG. 6, the present invention is not limited to vehicles and is also envisioned for use in unmultiplexed electronic compasses employing separate feedback resistances and paths, one for each coil. The sensed magnetic field in each coil may be processed separately, using bandpass filters 42 and 43, synchronous detectors 44 and 45, integrators 46 and 47, ranging circuits 48 and 49, feedback resistances R fx  and R fy , and summing amplifiers 50 and 51. 
     Although the invention has been described with particular reference to certain preferred embodiments thereof, variations and modifications can be effected within the spirit and scope of the following claims.