Abstract:
Method for determining the timing of an indirect injection internal combustion engine, in which the following steps are performed:
       use is made of a first sensor ( 2 ) including a target ( 6 ) connected to the crankshaft and having a plurality of marks ( 8 ),   use is made of a second sensor ( 12 ) including a target ( 16 ) connected to the camshaft and having:
           a plurality of teeth (D 1 , D 2 , D 3 ),   a plurality of gaps (C 1 , C 2 , C 3 ), and   a plurality of fronts (F 1 , F 2 , F 3 , F 4 , F 5 , F 6 ) separating the teeth (D 1 , D 2 , D 3 ) and the gaps (C 1 , C 2 , C 3 ),   
           the engine is turned over from a starting position,   the marks ( 8 ) on the target ( 6 ) of the first sensor ( 2 )are counted,   the fronts (F 1 , F 2 , F 3 , F 4 , F 5 , F 6 ) on the target of the second sensor are detected,   this is used to deduce the engine timing.

Description:
BACKGROUND OF THE INVENTION 
   The invention is aimed at determining the timing of an internal combustion engine comprising a crankshaft and a camshaft. More specifically, it is an object of the invention to determine this reliably and in a short space of time during a start-up sequence. Engine timing is to be understood as determining the physical location of the cylinders of the engine and how they are positioned in the engine cycle (admission stroke, compression stroke, etc.). This timing is commonly determined in relation to the crankshaft or the camshaft, the positions of which are associated with those of the cylinders. 
   The invention is quite particularly intended for vehicles equipped with such an engine and will be described more specifically in relation to such an application. 
   SUMMARY OF THE INVENTION 
   When the engine is not running, the position of the engine, and more specifically of the crankshaft, is not generally known, at least not accurately, which means that during the engine start-up phase it is necessary first of all to work out the engine timing before injecting fuel or at least prior to ignition. 
   The object of the invention is to reduce the time that this timing operation requires. In order to achieve this, according to the invention, the following steps are performed:
         use is made of a first sensor comprising a stationary part and a target connected to the crankshaft, said target comprising a plurality of uniformly distributed marks and the stationary part detecting these marks,   use is made of a second sensor comprising a stationary part and a target connected to the camshaft, said target having a more or less circular cross section and comprising:
           a plurality of teeth extending over angular sectors of different magnitudes,   a plurality of gaps extending over angular sectors of different magnitudes, and   a plurality of fronts separating the teeth and the gaps,
 
the stationary part detecting the teeth, the gaps and the fronts on the target,
   
           the engine is turned over from a starting position,   the marks on the target of the first sensor are detected,   the marks detected on the target of the first sensor are counted,   the fronts on the target of the second sensor are detected,   then this is used to deduce the engine timing.       

   Thus, the crank angle is easily and accurately determined with relation to the detection of the fronts on the target of the second sensor. The timing is therefore determined simply, quickly and reliably. 
   In order to quickly determine the engine timing according to the invention, the target of the second sensor comprises at least three teeth and three gaps. 
   In order further to reduce the time needed to determine the timing, without increasing the number of marks on the target of the first sensor, according to the invention the length of the teeth and of the gaps on the target of the second sensor is measured in non-integer fractions of marks on the target of the first sensor. 
   According to a characteristic of the invention, the number of marks detected on the target of the first sensor between the time that two successive fronts are detected on the target of the second sensor are counted and the number of marks counted between two successive fronts is correlated with the engine timing. 
   Since the various teeth and the various gaps on the target of the second sensor have different angular magnitudes, determining the magnitude of a tooth or of a gap allows that tooth or that gap to be identified and therefore allows one engine position to be correlated with each measured magnitude. 
   According to one characteristic of the invention, the following operations are performed:
         the target of the first sensor is equipped with a reference index that can be detected by the stationary part,   the number of marks detected on the target of the first sensor from the starting position is counted,   if the reference index on the target of the first sensor is detected before a front on the target of the second sensor is detected, then the number of marks counted on the target of the first sensor from the starting position until such time as the reference index is detected is compared against a reference threshold, and if it is below said reference threshold then this is used to deduce the engine timing.       

   Detection of the reference index gives rise to uncertainty between two possible engine timings. When that one of the two for which a front would have been detected on the target of the first sensor before the reference index was detected on the target of the first sensor can be excluded, the only possible timing is obtained. 
   According to another characteristic of the invention, the following operations are performed:
         the target of the first sensor is equipped with a reference index that can be detected by the stationary part,   the number of marks detected on the target of the first sensor from the time each front is detected on the target of the second sensor is counted,   if the reference index on the target of the first sensor is detected before the next front on the target of the second sensor is detected, then the number of marks counted from detection of the front on the target of the second sensor until such time as the reference index on the target of the first sensor is detected is correlated with the engine timing.       

   By ensuring that there is a different number of marks on the target of the first sensor separating detection of the reference index on the target of the first sensor and prior detection of a front on the target of the second sensor for the two timings that correspond to the detection of the reference index, the engine timing can then be determined without any ambiguity. 
   According to another characteristic of the invention, the following operations are performed:
         the target of the first sensor is equipped with a reference index that can be detected by the stationary part,   the reference index on the target of the first sensor is detected,   the number of marks detected on the target of the first sensor from the reference index on the target of the first sensor until such time as a front is detected on the target of the second sensor is counted,   the number of marks counted from the reference index on the target of the first sensor until such time as a front is detected on the target of the second sensor is correlated with the engine timing.       

   Likewise, an engine timing correlates with each number of marks counted which means that the engine timing is thus determined reliably. 
   According to yet another characteristic of the invention, the following operations are performed:
         the number of marks detected on the target of the first sensor from the starting position until such time as a front is detected on the target of the second sensor is counted,   the number of marks counted on the target of the first sensor from the starting position until such time as a front is detected on the target of the second sensor is compared against a front threshold and if it is above said front threshold, then this is used to deduce the engine timing.       

   Thus, if the number of marks counted reaches a high enough value for which it can correlate only with the magnitude of just one tooth or just one gap, then this can be used to deduce the engine timing with no ambiguity. 
   According to another characteristic of the invention, it determines whether the stationary part of the second sensor is detecting a tooth or a gap in order to deduce the engine timing. 
   Determination of the engine timing is thus easier and improved. 
   In order to detect any possible anomaly, according to the invention the following steps are performed:
         as long as no front has been detected on the target of the second sensor, the number of marks detected on the target of the first sensor from the starting position is counted, and   the number of marks counted on the target of the first sensor from the starting position is compared against a validity threshold and if it is above the validity threshold then it is considered that it is impossible to determine the engine timing.       

   Thus, in particular, failure of one of the sensors, causing a tooth or gap magnitude as counted to be greater than it would in reality be, is detected. 

   
     BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS 
     The invention will become more clearly apparent through the description which follows, given with reference to the attached drawings in which: 
       FIG. 1  is a schematic depiction of a device for implementing a method according to the invention, 
       FIG. 2  is a representation of the signals picked up by the sensors of the device of  FIG. 1 . 
   

   DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
   The device  1  illustrated in  FIG. 1  essentially comprises a crankshaft sensor  2 , a camshaft sensor  12  and a control unit  22 . The control unit  22  receives a signal  18  from the crankshaft sensor  2 , a signal  20  from the camshaft sensor  12  and controls the spark plugs  24  (just one has been depicted) and injectors  26  (just one has been depicted). 
   This device is intended to be fitted to a controlled-ignition gasoline engine with indirect fuel injection, equipped with a crankshaft and at least one camshaft. 
   The crankshaft sensor  2  comprises a target  6  that has 60 uniformly distributed teeth  8  and is secured to the crankshaft, and a stationary part  4  detecting the teeth  8  on the target  6 . The teeth  8  constitute marks positioned every 6 degrees (in the embodiment shown) and separated by gaps. The target  6  more specifically has 58 teeth, as two consecutive teeth have actually been eliminated in order to form a reference index  10  allowing the crankshaft position to be determined. 
   The camshaft sensor  12  comprises a target  16  secured to the camshaft and a stationary part  14 . The target  16  has a cross section that is circular overall and exhibits three teeth D 1 , D 2 , D 3  and three gaps C 1 , C 2 , C 3 . The teeth and the gaps are separated by fronts F 1 , F 2 , F 3 , F 4 , F 5 , F 6 . The teeth D 1 , D 2 , D 3  have angular magnitudes that differ from one another and are respectively 90 degrees, 40 degrees and 20 degrees in the embodiment presented. The gaps C 1 , C 2 , C 3  have magnitudes that differ from one another and are respectively 70 degrees, 25 degrees and 115 degrees. 
     FIG. 2  represents the signals  18 ,  20  picked up by the crankshaft sensor  2  and by the camshaft sensor  12  over one engine cycle. In the embodiment presented, the teeth  8  of the target  6  are all of the same height, as are the gaps on the target  6 , and the teeth D 1 , D 2 , D 3  and the gaps C 1 , C 2 , C 3  on the target  16 , and so the signals  18  and  20  are both binary signals alternately adopting a high value corresponding to the detection of a tooth and a low value corresponding to the detection of a gap. The camshaft rotates at half the speed of the crankshaft. The signal  18  illustrated in  FIG. 2  therefore corresponds to two revolutions of the target  6  and the signal  20  to just one revolution of the target  16 . 
   Given the foregoing, the angular magnitude of the teeth D 1 , D 2 , D 3  on the target  16  corresponds respectively to 30 teeth, 13⅓ teeth and 6⅔ teeth, while the magnitude of the gaps C 1 , C 2 , C 3  on the target  16  corresponds respectively to 23⅓ teeth, 8⅓ teeth and 38⅓ teeth. 
   The engine comprises six cylinders and therefore six corresponding top dead centers. It therefore has six preferred stopping positions A 1 , A 2 , A 3 , A 4 , A 5 , A 6  more or less equidistant from two consecutive top dead centers. 
   It has in fact been noticed that an engine, as it stops, positions itself in a position of equilibrium and that this position happens to be more or less equal distances from two consecutive top dead centers of one of the pistons. It is these positions that are termed the “preferred stopping positions”. There is, however, a certain margin of uncertainty around these preferred stopping positions as regards the position in which the engine has actually stopped. 
   It is known by construction that having detected the front F 1 , the stationary part  4  of the sensor  2  detects twelve of the teeth  8  before detecting the reference index  10  on the target  6  and that having detected the front F 4 , the stationary part  4  of the sensor  2  detects twenty teeth  8  before detecting the reference index  10  on the target  6 . It is also known on the one hand that when the sensor  2  detects the reference index  10  and the signal  20  adopts the high value  20   M , the engine is between top dead center P 1  and top dead center P 2  and, on the other hand, that when the sensor  2  detects the reference index  10  and the signal  20  adopts the low value  20   m , the engine is between top dead center P 4  and top dead center P 5 . All these data are stored in the control unit  22 . 
   The control unit  22  gathers information from the sensors  2  and  12  and determines the engine timing by comparing the information from the sensors  2  and  12  against the aforementioned stored information. 
   When the engine is turned over in order to start it from a starting position corresponding to the preferred stopping position A 1 , as illustrated in  FIG. 2 , the sensor  2  detects five teeth  8  on the target  6  before the sensor  12  detects the front F 1 , then detects a further twelve teeth  8  before detecting the reference index  10 . After detecting the front F 1 , the control unit  22  determines whether this front is the front F 1 , the front F 3  or the front F 5  from the fact that the signal  20  switches from the value  20   m  to the value  20   M . After detecting the reference index  10 , the control unit  22  determines that this is the reference index  10  situated between top dead center P 1  and top dead center P 2  from the fact that it comes twelve teeth after the detection of a front by the sensor  12  and the fact that the signal  20  is at the value  20   M . The engine timing is therefore known and the control unit  22  can therefore command the injection of fuel, followed by ignition in the various cylinders according to a determined sequence. 
   When the engine is turned over in order to start it from a starting position corresponding to the preferred stopping position A 2 , the sensor  2  detects sixteen teeth  8  on the target  6  before the sensor  12  detects the front F 2 , then a further 8⅓ teeth  8  before detecting the front F 3 . After the front F 2  has been detected, the control unit  22  determines whether this is the front F 2 , the front F 4  or the front F 6  from the fact that the signal  20  switches from the value  20   M  to the value  20   m . Once the front F 3  has been detected, the control unit  22  determines that this is the front F 3  because it comes 8⅓ teeth  8  after the sensor  12  detects a front and because the signal  20  switches from the value  20   m  to the value  20   M . 
   From a starting position corresponding to the preferred stopping position A 3 , the sensor  2  detects three teeth  8  on the target  6  before the sensor  12  detects the front F 3 , then detects a further 13⅓ teeth  8  before the front F 4  is detected. Once the front F 4  has been detected, the control unit  22  determines that this is the front F 4  because it comes 13⅓ teeth  8  after the sensor  12  detects a front and because the signal  20  switches from the value  20   M  to the value  20   m . 
   From a starting position corresponding to the preferred stopping position A 4 , the sensor  2  detects eighteen teeth  8  before the reference index  10  is detected. The control unit  22  determines that this is the reference index  10  situated between top dead center P 4  and top dead center P 5  because the signal  20  has the value  20   m  and no front has been detected for over twelve teeth  8 . 
   The engine timing is confirmed when the front F 5  is detected. Specifically, since the signal  20  has kept the value  20   m  while the sensor  2  was detecting in excess of 23⅓ consecutive teeth (thirty-four teeth in our particular instance) before the front F 5  was detected and the magnitude of the gaps C 1  and C 2  is 23⅓ and 8⅓ teeth respectively, this can only be the front F 5 . 
   From a starting position corresponding to the preferred stopping position A 5 , the sensor  2  detects fifteen teeth  8  on the target  6  before the sensor  12  detects the front F 5  then detects a further 13⅓ teeth  8  before the front F 6  is detected. Once the front F 6  has been detected, the control unit  22  determines that this is the front F 6  because it lies 6⅔ teeth  8  after the sensor  12  detects a front and because the sensor  20  switches from the value  20   M  to the value  20   m . 
   From a starting position corresponding to the preferred stopping position A 6 , the sensor  2  detects two teeth  8  on the target  6  before the sensor  12  detects the front F 6 , then detects a further 23⅓ teeth  8  before the front F 1  is detected. Once the front F 6  has been detected, the control unit  22  determines whether this is the front F 2 , the front F 4  or the front F 6  from the fact that the signal  20  has switched from the value  20   M  to the value  20   m . Twenty-one teeth after detecting the front F 6 , the control unit  22  determines that this was front F 6  because no reference index  10  has been detected, and the decision is confirmed 23⅓ teeth  8  after the detection of the front F 6  when the sensor  12  detects a front and the signal  20  switches from the value  20   m  to the value  20   M . 
   Were the sensor  2  to detect in excess of 38⅓ teeth  8  without the sensor  12  detecting any front at all, the control unit  22  would determine that there was an anomaly with the sensor  14  or with the target  16 , because no tooth and no gap has such a magnitude. 
   Of course, when the control unit  22  carries out tests, it is possible to build in an adjustable margin of error of 1 or more teeth. 
   The embodiment presented comprises a camshaft target  16  equipped with three teeth and three gaps. The method according to the present invention applies just as effectively to any type of target simply by applying the knowledge of one skilled in that art without in any way departing from the scope of the present invention.