Patent Publication Number: US-6668812-B2

Title: Individual cylinder controller for three-cylinder engine

Description:
TECHNICAL FIELD 
     This invention pertains to a method of detecting and correcting air-fuel ratio or torque imbalances in individual cylinders of a three-cylinder engine or banks of three cylinders in a V6 engine using a single sensor. More specifically, this invention pertains to the use of a frequency-domain characterization of the pattern of such imbalances in detecting and correcting them. 
     BACKGROUND OF THE INVENTION 
     There is a continuing need for further refinement of air-fuel ratio (A/F) control in vehicular internal combustion engines. At present, A/F is managed by a powertrain control module (PCM) onboard the vehicle. The PCM is suitably programmed to operate in response to driver-initiated throttle and transmission gear lever position inputs and many sensors that supply important powertrain operating parameters. The PCM comprises a digital computer with appropriate processing memory and input-output devices and the like to manage engine fueling and ignition operations, automatic transmission shift operations and other vehicle functions. In the case of such engine operations, the computer receives signals from a number of sensors such as a crankshaft position sensor, and an exhaust oxygen sensor. 
     Under warmed-up engine operating conditions, the PCM works in a closed loop continuous feedback mode using the voltage signals from an oxygen sensor related to the oxygen content of the exhaust. The crankshaft angular position information from the crankshaft sensor and inputs from other sensors are used to manage timing and duration of fuel injector duty cycles. Zirconia-based, solid electrolyte oxygen sensors have been used for many years with PCMs for closed loop computer control of fuel injectors in applying gasoline to the cylinders of the engine in amounts near stoichiometric A/F. The PCM is programmed for engine operation near the stoichiometric A/F for the best performance of the three-way catalytic converter. 
     With more strict emission standards gradually phasing in, there is a need for further refinement of automotive technologies for emissions reduction. One such refinement is the use of a linear response (wide-range) A/F sensor in the exhaust pipe(s) in place of the current zirconia switching (nonlinear) oxygen sensor. Experiments have demonstrated that significant reductions in tailpipe NO x  emissions are possible because of the more precise A/F control offered by a linear A/F sensor. 
     A second refinement is to increase vehicle fuel economy by diluting the air-fuel mixture with excess air (lean burn) or with exhaust gas recirculation (external EGR). The maximum benefit is achieved at the highest dilute limit. However, in a multi-cylinder engine, the limit is constrained by development of partial burns and possibility of misfire in the cylinder(s) containing the leanest mixture. This happens due to maldistribution of air, fuel or EGR in different cylinders. Thus, a new capability for the control of every cylinder air-fuel ratio by software is needed. Here, the intention would be to control only one variable (e.g., air, fuel or spark) to create uniform A/F or torque in all cylinders since only a single variable (e.g., A/F, O 2  or torque) would be measured. Clearly, single-loop feedback controllers around various sensors can operate independently to control air, fuel or spark in every cylinder. 
     Another motivation for all-cylinder A/F control is cost containment. For very low emission applications, fuel injectors of high precision (i.e., very small tolerances of less than 3%) are thought to be required. Achievement of this degree of tolerance, if possible at all, would be costly. A better solution would be to have a software means to compensate for the differences between fuel injectors in real-time operation of the engine. Another source of cylinder imbalances in a multi-cylinder engine is the inherent engine maldistribution due to variable breathing capacities into various cylinders. The air maldistribution can result in A/F or torque imbalances for which a software solution is sought. 
     Accordingly, it is seen that new emission reduction strategies for automotive gasoline engines would be enabled or enhanced by the development of a process for detecting and correcting fuel, air or spark imbalances between cylinders of a multi-cylinder engine. 
     SUMMARY OF THE INVENTION 
     In this invention, a process is provided that would balance A/F or torque amongst all cylinders of a three-cylinder engine or separately in either bank of a V6 engine. The benefits in terms of emissions reduction, fuel economy and driveability will depend on the degree of A/F or torque imbalances present in the engine and is engine dependent. In general, it is estimated that the benefit would depend on exhaust system configuration as well. For example, the benefit in a V6 engine with dual banks of unequal pipe lengths is larger when a single sensor is used for control and when fuel injectors have larger tolerances. 
     A principal cause, but not necessarily the sole cause, of cylinder A/F imbalances in a fuel-injected engine is differences in the delivery rates of the fuel injectors. Fuel injectors are intricate, precision-made devices, but the delivery rates of “identical” injectors may vary by as much as ±5%. Thus, the normal operation of a set of such injectors may be expected to lead to the delivery of varying amounts of fuel in the respective cylinders even when the PCM specifies identical “injector on” times. If the air flow rate or the exhaust gas recirculation rate is not varying in proportion with the fuel imbalances, there can be significant differences in A/F and/or torque among cylinders. 
     In a three-cylinder (or dual exhaust system V6) engine, individual cylinder maldistributions of air, fuel and EGR cause fluctuations in the instantaneous oxygen sensor voltages measured downstream at the point of confluence in the exhaust manifold. These O 2  sensor voltages are representative of the A/F of the cylinders. The actual A/F signal is periodic with the successive exhausts of the three cylinders, but the periodic pattern remains similar over prolonged engine operation especially if the pattern is due mainly to variances in fuel injector deliveries. Any arbitrary pattern of cylinder to cylinder differences in A/F ratio can be represented by a combination of simpler basic A/F patterns here referred to as “templates”. In this notation, a template consists of a unique pattern of −1, 0 and +1 units of A/F or a multiple thereof in each cylinder only. Negative and positive signs imply fuel-rich and fuel-lean A/F, respectively, and 0 implies stoichiometric A/F for a particular cylinder exhaust event. At this point the values of −1 and +1 simply indicate rich and lean A/F without regard to the magnitude of the departure of the ratio from the stoichiometric value, typically about 14.7 for most common gasoline fuels available today. 
     Obviously, each cylinder could experience a rich or lean A/F when the PCM is trying to control the overall A/F at the stoichiometric ratio. However, it has been determined in connection with this invention that the patterns of all possibilities are not independent of each other. It turns out that the number of independent basic patterns in this representation is equal to the number of cylinders. Specifically for a three-cylinder engine, any unknown pattern of imbalances can be reduced to a combination of three basic patterns T 1 , T 2  and T 3  shown in FIG.  1 . Referring to FIG. 1, template T 1  has the pattern +1, 0, −1 (i.e., lean A/F, stoichiometric A/F and rich A/F) for cylinders  1 ,  2 ,  3  respectively. Template T 2  is the pattern −1, +1, 0 and template T 3  is the pattern +1, +1, +1. 
     It has been further discovered in connection with this invention that the pattern of unknown three cylinder A/F imbalances with magnitudes (a, b, c) can be uniquely related to the above three templates by appropriate weighting factors (f 1 , f 2 , f 3 ) applied to the values of the terms of each template (FIG.  1 ). Thus, the knowledge of the set of coefficients (f 1 , f 2 , f 3 ) is equivalent to knowledge of the unknown values of the imbalances (a, b, c) in the engine&#39;s three cylinders. The coefficients may have positive or negative values or the value of zero. Often it is preferred that the coefficients have values expressed as percentages of the cylinder weighting factors of the templates. 
     It also turns out that that pattern of T 3 , identically rich or lean in all cylinders, is corrected by normal feedback closed-loop operation of the current O 2  sensor and the PCM. Therefore, this template does not need to be used in detecting imbalances a, b and c. As will be shown, the total imbalances under closed loop A/F control can be detected by appropriate mathematical comparison with data compiled from experimentally predetermined values for patterns T 1  and T 2 . 
     Reference values for patterns T 1  and T 2  are established on a balanced (i.e., all cylinders initially at stoichiometric A/F or other known A/F) three-cylinder engine by operating the engine with calibrated fuel injectors to intentionally successively impose the two patterns at the desired fuel-rich or fuel-lean levels. This calibration process is conducted at selected representative operational speeds and loads for the engine over a sufficient number of engine cycles to obtain the corresponding O 2  sensor output at successive crankshaft positions. In other embodiments of the invention, a wide-range A/F sensor or a torque sensor is used. For example, at each engine speed and load, pattern T 1  could be produced by a lean imbalance of +10% of stoichiometric A/F in cylinder # 1 , a rich imbalance of −10% of the stoichiometric A/F in cylinder # 3  while cylinder # 2  is operated at the stoichiometric A/F. Then, imbalances of like magnitude could be imposed in accordance with the T 2  pattern. Assuming 60 available crankshaft position signals over two crankshaft revolutions (i.e., one engine fueling cycle), oxygen sensor data would be collected by the PCM at each 12° of crankshaft revolution. 
     The data from O 2  (or wide-range A/F or crankshaft torque) sensor for each template T 1  and T 2 , at engine speed (rpm) and load (represented by manifold absolute pressure, MAP, or manifold air flow, MAF), is subjected to discrete Fourier transform (DFT) to determine its frequency spectrum. The discrete spectrum is in terms of phase and magnitude information at various frequencies related to the base engine speed and its higher harmonics. This information, together with interpolated data or suitable analytical equations, is stored in PCM table lookups for reference by the PCM during the cylinder fueling imbalance detection phase. In this case of a bank of three cylinders, the DFT vectors for templates T 1  and T 2  will roughly have a phase separation of 120°. 
     Having established reference data for the transformed templates, fuel imbalances in the operating engine can then be detected and corrected as necessary. To the extent that cylinder to cylinder imbalances in fuel injection are due to injector delivery variations, it is expected that such imbalances will follow a regular pattern, and once detected, an appropriate correction may remain effective until further usage of the injectors changes the imbalance. Accordingly, the detection and correction parts of this invention may not have to be run continually. However, as will be seen, they can also be run as frequently as required by the PCM due to speed of convergence and computational efficiency. 
     The detection process is initiated by the PCM and includes collecting and storing oxygen sensor data at successive crank angle signals over a few engine cycles. One complete fueling cycle providing, for example, 60 data points may be suitable. But it will usually be preferred to collect data over several cycles. This data is subjected to the same Fourier transformation process to obtain the phase and magnitude representing a single imbalance vector. 
     The detected fuel imbalance vector is mathematically decomposed to determine the respective contributions of the two reference vectors T 1  and T 2  in the total vector of imbalances measured. In other words, the coordinates of the imbalance vector in terms of the phase angles of the reference vectors and the proportion of their respective magnitudes are determined by known mathematical practices. The conversion of the imbalance vector into two component vectors permits the correction for the fueling imbalances by the PCM. The PCM determines the “opposite” of the two components of imbalances vectors, i.e., vectors that have the same magnitude but are of 180° phase difference, and calculates the fueling corrections that must thereafter be applied to each fuel injector to correct the fuel imbalances otherwise present in the respective cylinders. These fuel injector on-time corrections are applied cycle after cycle until the detected level of imbalances is brought below a given threshold. 
     As stated, the subject process may be used in response to the signals from a current production exhaust oxygen sensor, a wide-range exhaust A/F sensor, a crankshaft torque sensor or other suitable sensors used by a PCM for fuel, air or spark control in a three-cylinder engine. As is known, fuel control to individual cylinders can be accomplished by PCM control of fuel injector “on time”. Similarly, air distribution to the three cylinder banks can be managed by PCM control of air inlet valve actuators. And, in accordance with this invention, detected imbalances in torque from individual cylinders can be corrected by PCM control of fuel or air delivery or spark timing with respect to each cylinder. 
     In the above-described reference templates, stoichiometric A/F, generally about 14.7 for current commercial gasolines, was used as the mean A/F value because of the wide practice of operating engines at about stoichiometric A/F for best operation of current exhaust catalytic converters. However, if it is desired to operate the engine slightly fuel rich, e.g., A/F=about 10 to 14.7, the mean value for the templates would be a selected value in this range. Similarly, where it is desired to operate in a fuel lean mode, e.g., A/F=about 14.7 to 60, a mean template value in the lean range would be used. 
     Other objects and advantages of the invention will become apparent from a description of embodiments of the invention which follow. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a graph of three reference fueling imbalance templates, T 1 -T 3 , for a three-cylinder engine used in the practice of this invention. The horizontal axis represents cylinder number, the upward arrows represent fuel lean A/F and the downward arrows represent fuel rich A/F for the respective cylinders around the reference value of stoichiometry. Also shown in FIG. 1 is an unknown fuel imbalance example template with equations showing the contributing relationships of the reference templates to the unknown imbalance template. 
     FIGS. 2A-2C are the flow diagrams of a suitable algorithm for the determination of spectrum of reference templates for imbalances in a three-cylinder engine. 
     FIG. 3 is a flow diagram of an algorithm for the real time detection of fueling imbalances in a three-cylinder engine. 
     FIG. 4 is a flow diagram of a single-axis method for the real time correction of fueling imbalances for a three-cylinder engine. 
     FIG. 5 is a flow diagram of a total magnitude method for the real time correction of fueling imbalances for a three-cylinder engine. 
     FIG. 6 presents an algorithm flow chart for an overall individual cylinder fuel control incorporating the above-mentioned previous steps. 
     FIG. 7 is a graph illustrating an example of a discrete Fourier transform of A/F imbalances in a three-cylinder engine having spectral lines only at the frequency ω 0  corresponding to the base engine speed and its higher harmonic ω 1 =2ω 0  in addition to the static value at ω=0. 
     FIG. 8 is a graph illustrating an example of two possible discrete Fourier transform (DFT) vectors T 1  and T 2  with their respective magnitudes and phase angles φ 1  and φ 2 . 
     FIG. 9 is a graph illustrating a generic imbalance vector (magnitude R and phase angle θ) and template T 1  and T 2  contributions with magnitudes R 1  and R 2  and phase angles φ 1  and φ 2 . The angles between the measured imbalance vector and the individual contributing imbalances vectors T 1  and T 2  are identified as θ 1  and θ 2 , respectively. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     A strong motivation for detection and correction of individual cylinder fuel imbalances is to improve fuel economy and reduce exhaust emissions cost effectively. Fueling imbalances can possibly be reduced by using fuel injectors of high precision, i.e., specifying injectors with fuel delivery tolerances of less than three percent. Achievement of this high degree of manufacturing precision, if possible, would be costly. In this invention, a method is provided to address this problem in three-cylinder engine banks exhausting to a common exhaust duct by utilization of an existing onboard microprocessor. 
     As stated in the Summary of Invention section of this specification, any arbitrary pattern of cylinder-to-cylinder differences in A/F ratio can be represented by a combination of simpler basic A/F patterns here referred to as “templates”. In this notion, a template consists of a unique pattern of −1, 0 and +1 units of A/F in each cylinder only. The value zero denotes stoichiometric mass air-fuel ratio (A/F), and negative and positive signs imply fuel-rich and fuel-lean A/F, respectively. 
     For a three-cylinder engine, any unknown pattern of imbalances can be reduced to a combination of three basic patterns T 1 , T 2  and T 3  shown in FIG.  1 . As seen in FIG. 1, Template  1  has the pattern +1, 0, −1 for cylinders  1 ,  2  and  3 , respectively. This pattern represents a complete fueling cycle for cylinders  1 - 3 , respectively, of the engine although the actual fueling sequence may be in the order of cylinder  1 ,  3 ,  2 . Template  2  is the pattern −1, +1, 0 for cylinders 1, 2 and 3, respectively, and Template  3  represent the pattern +1, +1, +1. 
     In the development of this invention, it has been rigorously demonstrated that these three templates provide a basis for detecting any pattern of fueling imbalances in a three-cylinder engine bank. Referring to FIG. 1, the top template illustrates a three-cylinder engine operating situation of unknown A/F imbalances (a, b, c for cylinders  1 ,  2  and  3 , respectively). Any pattern of such unknown cylinder imbalances (whether A/F imbalances or spark timing imbalances) can be uniquely related to the above three templates by appropriate weighting factors (f 1 , f 2 , f 3 ) applied respectively to the values of the terms of each template T 1 , T 2  and T 3 . FIG. 1 shows the applicable equations relating fueling imbalances a, b and c to their cylinder counterparts in the three reference templates. Thus, the knowledge of the set of coefficients (f 1 , f 2 , f 3 ) is equivalent to knowledge of the unknown values of the imbalances (a, b, c) in the engine&#39;s three cylinders. The coefficients (f 1 , f 2 , f 3 ) may have positive or negative values or the value of zero. Often it is preferred that the coefficients have values expressed as percentages of the cylinder weighting factors of the templates. 
     A close examination of cylinder imbalance templates reveals the following properties. Each template has a discrete frequency spectrum with non-zero magnitudes at a finite number of frequencies only. For templates T 1  and T 2 , the spectrum has two lines only. The first line is at a fundamental frequency ω 0  corresponding to the engine speed. The second frequency is twice the fundamental frequency. Template T 3  indicates a uniform A/F across all cylinders and its spectrum has non-zero value only at ω=0. This static component (with weighting factor f 3 ) is usually eliminated by the closed-loop average A/F controller and can be discarded. Therefore, there remain only two unknown template factors f 1  and f 2 . 
     For T 1  and T 2 , the non-zero magnitudes (at ω 0  and 2ω 0 ) are coupled so that any changes at one frequency will impact the other one, i.e., they increase or decrease together. This implies that one can focus on the contributions at the fundamental frequency ω 0  only. This observation is important as it reduces the sensor bandwidth requirement for imbalances detection and correction. Elimination of imbalances at the fundamental frequency for each template T 1  and T 2  results in a perfectly balanced A/F in all cylinders. 
     In the presence of A/F imbalances, a Fourier series analysis of the A/F signal indicates that the frequency spectrum of the A/F signal consists of multiple (infinite) harmonics, but the spectrum is dominated by the first harmonic. The first (or fundamental) harmonic ω 0  depends on engine speed. Higher harmonics are integer multiples of the fundamental frequency ω 0 . FIG. 7 is a graph illustrating an example of discrete Fourier transform of A/F signal in a three-cylinder engine. 
     Any single linearly-independent pattern of imbalances chosen from the set {−1, 0, +1} will constitute a possible solution, though incomplete, and will be referred to as a balancing or reference template. In general, to cancel imbalances in a three-cylinder engine, there would exist three templates so that a unique (and complete) solution is obtained. The frequency spectrum of each balancing template, in general, is composed of up to three frequencies. With the average A/F controlled by the main fuel controller in current production systems, the static component of imbalances will become irrelevant and may be excluded. This leaves only two balancing templates with non-zero discrete frequency spectrums consisting of two frequencies only. 
     Elimination of the first two harmonics alone would result in a complete attenuation of individual cylinder imbalances. Fortunately, these frequencies are always jointly present, and detection of the fundamental frequency is an indication of presence of the second harmonic, too. This will reduce the spectral search centered at the fundamental harmonic only. 
     In the practice of this invention, exhaust sensor or other sensor signals are subjected to Fourier transforms. For a sensor signal x(n) sampled at discrete time intervals n=0, 1, . . . , N−1, the Fourier transform is defined by the following expression:          X        (   k   )       =       ∑     n   =   0       N   -   1              x        (   n   )       ·            -   j                   2                 π                 k                   n   /   N                             
     Here, j={square root over (−1)} is the complex number, N=total number of data points and k=number of spectral lines in the Fourier transform. The resulting spectrum has non-zero values only at a discrete number of frequencies ω k =2πkn/N and, hence, is called the Discrete Fourier Transform (DFT). The Discrete Fourier Transform maps N complex numbers x(n) into N complex numbers X(k). In this case, the samples from sensor signal x(n) have real parts only. 
     For computational efficiency, when the number of sensor data points is a power of 2 (i.e., N=2 ν , ν=a positive integer), then there are well-known efficient techniques to reduce the time and the complexity of DFT computations. The technique is called Fast Fourier Transform (FFT). In most practical DFT calculations, the number of samples is taken as powers of two (e.g., 16, 32, 64, 128, etc.), if possible, to expedite DFT calculations. 
     In an attempt to detect and eliminate individual cylinder imbalances, one can use a single exhaust sensor to measure A/F (or O 2  concentration) signal at the point of confluence in the exhaust manifold. The sensor is sampled at a rate compatible with the recovery of the first harmonic and for a length of at least one full engine cycle. A fast or discrete Fourier transform (DFT) of the A/F signal is performed and the amplitude of the first harmonic is computed. Magnitudes larger than a given threshold at each mode indicate a significant imbalance at that mode. 
     Once the level of imbalances at the frequency of interest has been detected, the corrective templates are imposed individually and simultaneously to reduce the level of total imbalances to near zero. In other words, the control signal uses the logical templates corresponding to various modes and modal shapes (i.e., discrete modes). 
     By shifting attention from the time-domain to the frequency-domain, the structure of the essential information latent in the A/F signal is revealed. In this method, there is no undue attention to signal details such as high-frequency components and noise effects which are sensitive issues in many time-domain methods for the synthesis of imbalances. It is also important to note that no synchronization signal is being used, which avoids the risks associated with possible synchronization errors or its potential loss. This will also relax the sensor dynamic bandwidth and sampling rate requirements. The method is still effective, up to very high precision, even where the A/F signal may be non-periodic. All these factors point to a method with robustness as its main attribute. This technique is simple to understand and easy to implement and provides a powerful technique for individual cylinder A/F or torque control. 
     The Technique 
     With an exhaust sensor of sufficiently wide dynamic-bandwidth, the sensor signal is sampled at a predetermined rate (preferably in tandem with engine events) and for a predetermined period of time (preferably at least one or two engine cycles) and processed according to the following sequence of three steps: 
     1. Determination of reference templates spectrum phase and magnitude information. This constitutes the calibration step and is carried out a priori (offline) and the data with interpolations is stored as table lookups (or as analytic functions) for real-time individual cylinder fuel control. 
     2. Detection of imbalances (DFT or FFT analysis). 
     3. Correction of imbalances. 
     I. Calibration Step (Determination of the Spectrum of Reference Templates) 
     Any sequence of cylinder imbalances is first reduced to the minimal constituent modal shapes of two modes at a single (known) frequency but unknown amplitude. Thresholds for the admissible level of imbalances for each mode are also established. 
     This step constitutes the calibration phase conducted on a representative engine with calibrated fuel injectors initially delivering fuel at stoichiometric A/F, or a suitable known A/F (lean or rich), to each cylinder. The injectors are then controlled to successively impose the fuel imbalance patterns of the two templates T 1  and T 2 , each over the full range of design operating speeds and load levels for the engine. The magnitude of the imbalances is known, preferably in the range of about 5% to 15% of stoichiometric A/F, and preferably the same magnitude of imbalance, whether rich or lean, is imposed for each template. The frequency spectrum of the signal (A/F, O 2  or crankshaft torque sensor) in terms of its phase and magnitude information is determined at each representative engine speed and load. This information is then available for storage in PCM table lookups of same engine family. 
     A discrete Fourier transform (DFT) is used to fill the table lookups at different engine speeds and for various loads (MAP or MAF). A basis for providing interpolated data or analytical expressions for intermediate speeds and loads is also employed. This phase is essentially a calibration requirement and is executed offline. If desired, data for various operating conditions can also be curve-fitted so that a simpler analytic function for the spectrum is derived. 
     The procedure for the determination of the response of individual templates at any engine speed and load [manifold absolute pressure (MAP) or mass airflow (MAF)] is as follows. Reference will be made to FIGS. 2A through 2C which contain a flowchart of a suitable offline calibration process. The selected or measured engine and MAP or MAF values together with engine speed (rpm) are stored in the PCM as indicated at block  200  of FIG.  2 A. In block  202 , a set of parameter values regarding the magnitude of templates T 1  and T 2  named d 10  and d 20 , respectively, is stored. For example, an imbalance magnitude of 10% of the stoichiometric A/F may be used for each of d 10  and d 20 . In block  202 , the number of wait cycles N w  and the number of signal cycles N F  for execution of DFT computations together with the number of teeth per rotation of crankshaft (m) are recorded. Calculations begin by setting index i=1 in block  204 . The process then proceeds as follows: 
     1. Choose two independent templates T 1  &amp; T 2 . These templates may be characterized by 
     
       
           T   1 =[+1, 0, −1] 
       
     
     and 
     
       
           T   2 =[−1, +1, 0] 
       
     
     as shown in FIG.  1 . 
     2. Use a suitable crankshaft signal such as the 60X signal in a three-cylinder (L 3 ) engine or the 18X in a V6 engine for DFT calculations. The resolution θ r  would then be 12° (or 40° in V6). In general, for an engine crankshaft position sensor with m teeth/revolution, the resolution θ r =360°/m. The A/F (or O 2 ) signal is sampled at θ i =i.θ r  where i=1, . . . ,m (e.g., m=30 for L 3  and m=9 for V6) as shown in block  206 . 
     3. Compute a i =cos(θ i ) and b i =sin(θ i ) for all i=1, . . . , m. For any engine family, this calculation will be done once. Results are stored in table lookups for the imbalances detection step. The calculation at respective crankshaft positions is shown in block  208 . In block  210 , the crankshaft sensor index is incremented and operations continue to block  206  until the answer to query in block  212  is positive, indicating that calculations for all positions are completed. 
     The values of sin(θ i ) and cos(θ i ) having been calculated for all crankshaft angle increments of θ i , the process now proceeds to determining the oxygen sensor outputs for the crankshaft angles of interest. For a positive response in  212 , the initial components of imbalances are set to zero as shown in block  214  and adopt a new index i=1 (or 2) for template T 1  (or T 2 ) shown in block  216 . 
     4. Apply template T 1  imbalances of magnitude d 10  as shown in block  218  (i=1). To eliminate the effects of fuel transients, it is preferred to wait N w  cycles before measuring the system response. The crankshaft angle is measured (block  220 ), monitored (block  222 ) and checked (block  224 , FIG. 2B) to insure that the required cycles are elapsed before data collection. Once the required number of wait cycles N w  are elapsed, calculations are transferred to process block  226  where the indexes associated with crank angle and total number of signal cycles for DFT calculations are initialized (blocks  228 ,  230  and  232 ). 
     The a k  and b k  values for current crankshaft angle k are retrieved from memory, block  234 . And the oxygen sensor output W i  at the current crank angle θ k  is stored as W i (θ k ), block  236 . 
     For the signal sampled at the rate of m samples/rev, compute the DFT(T 1 ) with magnitude R 10 =|DFT(T 1 )| and phase φ 1 =∠DFT(T 1 ) or, alternatively, the Cartesian components X 10  and Y 10 . For example, in Cartesian coordinates, DFT values over one engine cycle are computed from: 
     
       
           X   10   =Σa   i   *W   1 (θ i ),  i =1, . . .  m   
       
     
     
       
           Y   10   =Σb   i   *W   1 (θ i ),  i =1, . . .  m   
       
     
     where W 1 (θ 1 ) is the system response (e.g., O 2  sensor) at crank angle θ i  due to the imposed template T 1 , block  238 . In blocks  228 - 242 , the necessary cycle of steps to compute the DFT components of the imbalances are shown. The DFT components are calculated at the respective crank angles, block  240 , until the calculation is completed over the specified number of events, block  242 . When calculations for the required number of cycles N F  (block  242 ) is completed, control is transferred to block  244  where the average components X 10  and Y 10  are determined. The average values of components X 10  and Y 10  are stored in table lookups for the imbalances correction step. With the knowledge of these Cartesian components, the radial components R 10  and φ 1  are also calculated as in block  246  (FIG.  2 C). 
     5. Similarly, step  4  is repeated for template T 2  with magnitude d 20  by incrementing index i to 2 as in block  248  and repeating all steps in blocks  218 - 246  (Loop B). Compute DFT(T 2 ) with magnitude R 20 =|DFT(T 2 )| and phase φ 2 =∠DFT(T 1 ) as in block  246  or, alternatively, the Cartesian components X 20  and Y 20 .as in block  244 . Store X 20  and Y 20  in table lookups for the imbalances correction step. Once both templates T 1  &amp; T 2  have been applied (positive answer to query in block  250 ) and corresponding responses determined, the process proceeds to block  252 . 
     FIG. 8 is a graph illustrating an example of two possible DFT(T 1 ) and DFT (T 2 ) vectors with their respective magnitudes and phase angles φ 1  and φ 2 . In these templates for a three-cylinder engine, the phase angles of the templates are generally 120° apart. Of course, the Cartesian coordinates of these vectors can be determined by projecting on the x and y axes. 
     6. Compute and store Δ=c 2 −c 1  where c 1 =tan(φ 1 ) and c 2 =tan (φ 2 ) as in block  252 . This value is used in the correction phase of the algorithm. 
     7. Compute and store ρ=cos (φ 2 −φ 1 ) as in block  252 . This value is also used in the correction phase of the algorithm. The initial calibration data is now completely available (block  254 ) for the detection and correction steps to follow. 
     For O 2  sensor-based calibration, due to the non-linearity of the sensor, the calibration has to be carried out at different levels of imposed A/F imbalances. Alternatively, one can approximate the nonlinear calibration curves conservatively and then through iterative corrections (i.e., step III) establish balanced conditions. 
     II. Detection of Imbalances 
     Full knowledge of the phase and magnitude of DFT associated with arbitrary unknown imbalances is a powerful tool for detection of imbalances. Any arbitrary pattern of A/F imbalances can be decomposed into two reference templates T 1  and T 2  plus a constant static component. The static component is automatically eliminated by the average A/F control. 
     The total imbalance is a superposition of the dual templates of appropriate magnitudes (yet unknown). In this approach, the spectrum of A/F (or O 2 ) sensor signal at the desired frequency dictated by engine speed is determined through the calculation of the signal DFT. This results in a single vector of known phase and magnitude. Clearly, both linearity and superposition principles hold in this method. The Cartesian components of the DFT of the measured signal in real time and computed over at least one engine cycle has the following components: 
       X=Σa   i   .W (θ i ),  i =1, . . . ,m 
     
       
           Y=Σb   i   .W (θ i ),  i =1, . . . ,m 
       
     
     where W(θ i ) is the value of the signal, due to unknown imbalances, measured at crank angle θ i  and index “m” is such that the sensor is measured for at least one full engine cycle (i.e., two engine revolutions) at a minimal sampling rate of 3X (desirable rate ≧6X). Clearly, an L 3  engine with 60X surpasses this requirement. The sine and cosine parameters for the crank angles of interest a i  and b i  are entered from previously defined table lookups. 
     A complete detailed flowchart of a suitable imbalances detection process (step II) is attached as FIG.  3 . Referring to FIG. 3, the detection process begins by measuring manifold pressure (MAP) or intake airflow rate (MAF) and engine speed (rpm) in block  300 . Then the number of cycles N F  required for DFT calculation and the number of teeth on the crankshaft encoder (m) are specified, block  302 . At block  304 , initialization of the index for crank angle (k) and DFT cylinder imbalance components takes place. At every crankshaft sensor tooth k, the crank position (θ k ) is measured (block  306 ), and when the index exceeds the total number of teeth (block  308 ), both the index and the teeth angle are adjusted as in block  310 . Otherwise, for the current shaft position, the corresponding sine and cosine parameters in block  312  are retrieved from the calibration procedure described above. The oxygen sensor output W(θ k ) at this crank position θ k  is recorded in block  314 . 
     Now, the data necessary to compute the current engine operating contribution to DFT of the system response is available in the PCM. The Cartesian coordinates of the DFT components of the imbalances are calculated as described above and as shown in block  316 . At this point, the counters for the tooth number (k) and accumulative tooth number (1) are incremented, block  318 . If the accumulated tooth number (1) in block  320  indicates that DFT calculation has been completed for the required number of cycles N F , the control transfers to block  322  where the DFT components are computed; otherwise computation returns to block  306 . With the Cartesian components of DFT in hand, one can easily compute the radial components of DFT as shown in block  324  and exit the detection step in block  326 . 
     III. Correction of Imbalances 
     Two methods for the correction of imbalances are proposed each with unique features and advantages. The primary method of correction is referred to as the single-axis projection method and is described first. 
     Method A: The Single-Axis Projection (SAP) Method 
     The contributions of individual templates are easily obtained by the decomposition of the DFT vector of the measured signal onto the DFT vectors of individual reference templates T 1  and T 2 . For the three-cylinder engine, the basic templates are always at approximately 120° degrees phase difference, i.e. φ 2 =φ 1 +120°. 
     The Cartesian components of the DFT vector of imbalances are related to the Cartesian coordinates of the two DFT template vectors as follows: 
     
       
         
           X=X 
           1 
           +X 
           2 
         
       
     
     
       
           Y=Y   1   +Y   2   =X   1 .tan(φ 1 )+ X   2 .tan(φ 2 )= c   1   .X   1   +c   2   .X   2   
       
     
     where X i  and Y i  (for i=1 and 2) are Cartesian components of the DFT of the template T i  contributions (as yet unknown), and, X and Y are the measured total DFT components of the unknown imbalances computed from the sensor output. Reference is made to FIG. 9 illustrating the imbalance vector (magnitude R and phase angle θ) and template vectors 1 and 2 with magnitudes R 1  and R 2  and phase angles φ 1  and φ 2 . This figure is a schematic illustration of various DFT vectors of interest. The angles between the measured imbalance vector and the template vectors T 1  and T 2  are identified as θ 1  and θ 2 , respectively. 
     The unknown components X 1  and X 2  are now calculated from solving the above set of two equations: 
     
       
           X   1 =( c   2   .X−Y )/Δ, 
       
     
     
       
           X   2 =( Y−c   1   .X )/Δ 
       
     
     where the meaning and values for c 1 , c 2 , and Δ were described in the calibration step. 
     Please note that only a single axis is dealt with at the time (i.e., only X i  or Y i ). In occasions when either c 1  or c 2  assume large values (i.e., either φ 1  or φ 2  approaches 90°), we swap X i  for Y i  in the above equations and proceed. 
     During the calibration phase, described above, it was seen that the application of a simple template T i  of reference magnitude d 10  resulted in DFT component X i0  for i=1 and 2. With the principle of linearity holding, one can infer that the unknown contribution d i  of each template T i  in the measured imbalance vector is similarly determined by: 
     
       
           d   i   =X   i   /X   i0   .d   i0  for  i =1 and 2 
       
     
     In other words: 
     
       
           d   1   =d   10 .( c   2   .X−Y )/(Δ .X   10 ) 
       
     
     
       
           d   2   =d   20 .( Y−c   1   .X )/(Δ .X   20 ) 
       
     
     To restore A/F (or torque) balance to all cylinders, templates T i  of opposite magnitude −d 1  are applied. This is achieved by adding appropriate patterns of offsets (related to the template) to average cylinder air valve, spark or fuel pulse width in each cylinder. For example, to apply −6% in T 1  with a pattern [+1, 0, −1], 6% is removed from cylinder  1  fuel, 6% is added to cylinder  3 , and cylinder  2  fuel is left unchanged (with the firing sequence  1 - 3 - 2 ). 
     The above single-shot approach would immediately eliminate the A/F (or torque) imbalances in a three-cylinder (or V6 engine with dual exhaust system). 
     Summary of Method A (SAP) for Correction of Imbalances 
     FIG. 4 is a flow diagram summarizing the algorithm for performing the correction process by Method A: 
     1. Measure engine load (MAP) or airflow rate (MAF) and speed (rpm) as in block  400 . 
     2. Recall Δ, c i , d i0 , X i0 , Y i0  for i=1 and 2 from the calibration step I, and assign a tangent threshold value α (block  402 ). 
     3. Recall DFT of imbalances in Cartesian coordinates (X and Y) from the signal output (step II) as in block  404 . 
     4. Check for conditions in block  406 . If the answer is negative, then proceed to block  408  to use the X-axis projection. If the answer is positive, go to block  410  (step  6  below) to use the Y-axis projection. 
     5. Compute contribution d i  of each template T i  in the total imbalances (block  408 ) from 
     
       
           d   1   =d   10 .( c   2   .X−Y )/(Δ .X   10 ) 
       
     
     
       
           d   2   =d   20 .( Y−c   1   .X )/(Δ .X   20 ) 
       
     
     and go to block  418 . 
     6. Both X 10  and X 20  must clearly be non-zero. Otherwise, the roles of X i0  and Y i0  are properly swapped as in block  414 . With the new set of parameters computed in block  414 , proceed to block  416  to calculate the contribution d i  of each template. The control is then transferred to block  418 . 
     7. Apply template T i  (for i=1 and 2) of opposite magnitude −d i  to restore A/F (or torque) balance as in block  418 . The process for the correction of imbalances at block  420  is now complete. 
     In this procedure, only a single (X i0  or Y i0 ) component of DFT of T i  is used and hence the name single-axis projection (SAP). 
     In some applications, due to imperfections or inherent properties (such as non-linearity) and variability, it may necessary to iterate a few times to achieve the final goal. This is particularly true for A/F control using a production O 2  sensor dominated by strong non-linearity. 
     The following alternative method for the correction of imbalances is also proposed where some trigonometric function evaluations (or the use of corresponding tabulated values) are required. 
     Method B: Total Magnitude Method 
     This is a closed-loop method mostly using the magnitude information. In this technique, it is argued that due to severe sensor degradation (e.g., due to sensor aging), it is possible that the phase information of the computed DFT may not be sufficiently reliable. Distortions in sensor and/or engine characteristics usually have less impact on signal magnitudes and more on the phase information. To make the method more robust, the magnitude information is employed for evaluation of the level of imbalances. Naturally, in the absence of complete phase information, more time and iterations are required to achieve convergence. The method uses geometry to compute the magnitude and involves some calculations of trigonometric functions in real time. 
     Polar coordinates are used to determine the contribution of individual templates. Once the imbalance vector of measured DFT with magnitude R and phase angle θ is computed, the vector is decomposed onto T 1  and T 2  templates shown below to determine the contribution of each individual template magnitudes R 1  and R 2 . 
     Let&#39;s define 
     
       
         θ 1 =θ−φ 1 , ρ=cos(φ 2 −φ 1 ) 
       
     
     
       
         θ 2 =φ 2   −θ, q =sin(θ 1 )/sin(θ 2 ),  s =+1/(1 +q   2 +2 .q .ρ) 
       
     
     where φ 1  and φ 2  are known values from the calibration step I. 
     From the vectorial representation of DFT in FIG. 9, we have: 
     
       
           R   1 .sin(θ 1 )= R   2 .sin(θ 2 ) 
       
     
       R   2   =R   1   .R   1   +R   2   .R   2 +2 R   1   .R   2 .ρ 
     It can readily be shown that the magnitudes of T 1  and T 2  contributions are 
     
       
           R   1   =R.s  for  T   1   
       
     
     
       
           R   2   =R   1   .q  for  T   2   
       
     
     In the above relation for R 1 , the following sign convention is adopted: 
     
       
         if {θ≧φ 2  or θ≦(φ 2 −180)} then  s→−s.   
       
     
     With R 1  and R 2  calculated, proceed to compute the weighting factors for each template: 
     
       
         
           d 
           1 
           =d 
           10 
           .R 
           1 
           /R 
           10 
           =d 
           10 
           .R.s/R 
           10 
         
       
     
     
       
         
           d 
           2 
           =d 
           20 
           .R 
           2 
           /R 
           20 
           =d 
           20 
           .R.q.s/R 
           20 
         
       
     
     The required correction is then a combination of templates T 1  and T 2  of magnitude −d 1  and −d 2 , respectively. 
     Summary of Method B (Total Magnitude) for Correction of Imbalances 
     FIG. 5 is a flow diagram summarizing the algorithm for performing the correction process by Method B: 
     1. Measure engine load (MAP) or airflow rate (MAF) and speed (rpm) as in block  500 . 
     2. Recall (φ 1 , φ 2 , ρ, d 10 , d 20 , R 10  and R 20  from the calibration step I (block  502 ). 
     3. Compute the DFT vector (R and θ) of total imbalances from the measured signal from the detection step II (block  504 ). 
     4. Compute θ 1 =θ−φ 1 , θ 2 =φ 2 −θ (block  506 ). 
     5. Compute and store q=sin(θ 1 )/sin(θ 2 ) and s=+1/(1+q 2 +2.q.ρ) as shown in block  508 . 
     6. Check for conditions in query block  510 . If true, change the sign of parameter “s” as in block  512 . 
     7. In block  514 , calculate T 1  contribution from d 1 =d 10 .R 1 /R 10 =d 10 .R.s/R 10 . Also, calculate T 2  contribution from d 2 =d 20 .R 2 /R 20 =d 20 .R.s.q/R 20 . 
     8. To correct imbalances, apply templates T 1  and T 2  of magnitudes −d 1  and −d 2 , respectively, as in block  516 . The correction process ends at block  518 . 
     A complete flowchart of the imbalances correction process using the total magnitude method is attached in FIG.  5 . As before, a few iterations of the method may be needed to achieve the final goal. This is particularly true when an O 2  sensor is used to detect and correct the imbalances at the stoichiometric A/F. 
     The Control Algorithm 
     The above techniques provide the basis for a control algorithm for the real-time balancing of individual-cylinder A/F or torque maldistribution. Cylinder imbalances rarely require fast correction and, therefore, a slow control loop of low bandwidth is sufficient. Inherent in the algorithm is its robustness, simplicity and ease of implementation. The algorithm may be used for cylinder A/F maldistribution calibration on a new engine family (off-line application), for its diagnostic value (imbalances including cylinder misfire detection) and also real-time control and attenuation of cylinder maldistributions. 
     In a four-stroke engine operating at speed N [rpm], one full engine cycle takes T o =120/N [s]. T o  is the time between successive injections in the same cylinder. The fundamental frequency of imbalances is also given by the frequency ω 0   32  1/T o  [Hz]. The sensor is sampled at a rate T s  where T s &lt;T o /n with n&gt;1 to avoid aliasing though an event-based sampling with synchronization is preferred with the crankshaft encoder (e.g., 60X in a three-cylinder engine). Detection of imbalances at the frequency ω 0  also requires a sensor with the same minimum bandwidth (usually 2-5 times wider). The bandwidth requirement also imposes constraints on the upper limit on engine speed at which the imbalances can effectively be detected. 
     An overall procedure for individual cylinder control is shown in the flowcharts of FIG.  6  and is outlined below: 
     1. Establish the DFT threshold δ for the acceptable level of imbalances. The threshold is a function of engine operating conditions, i.e., δ=f(rpm, MAP, MAF, MAT, Mode, . . . ). Also, establish a transient threshold β for algorithm activation and a filter constant a f  for MAF filtering (block  600 ). 
     2. Specify the number of wait-cycles (N w ) between correction and any subsequent detection to allow transient effects settled. This introduces a dead-time into our algorithm and has two functions: to reduce the impact of A/F (or torque) transients and to allow the effect of air or fuel changes in cylinders to reach the sensor location before any additional corrections are meaningfully attempted (block  600 ). The wait-time is directly related to the engine and sensor system transportation delays. 
     3. Initialize index k and variables in block  602 . 
     4. Measure MAF at event k (block  604 ) 
     5. Compute the rate of change of MAF (called DMAF) in block  606 . 
     6. Filter DMAF with a coefficient a f  (called MAFR) as in block  608 . 
     7. Increment event k and update old MAF in block  610 . 
     8. Check the rate of change of MAF (or MAP) to be below the threshold value β before enabling the algorithm (block  612 ). Given the high speed of the algorithm execution, the algorithm can be enabled even under mild transient conditions so that the imbalances are eliminated on the fly. 
     9. As in block  614 , execute the procedure for the correction of imbalances (using either Method A or B in Step III) by computing template T 1  and T 2  contributions d 1  and d 2 , respectively. Apply templates T i  of opposite magnitude (i.e., −d i ) simultaneously to counteract the measured imbalances. Reset the event counter k in block  616 . 
     10. Count events (block  618 ) and allow for at least N w  engine cycles to pass (block  620 ). In actual implementation, a wait-cycle three times bigger produced exceptionally good results. 
     11. Measure imbalances again and verify that imbalances have indeed been removed. For this purpose, execute the procedure for the detection of imbalances (Step II) to determine any possible residual imbalances (block  622 ). Compute the magnitude of imbalances R. 
     12. In block  624 , if R&lt;δ, take no further action (negligible residual imbalances and hence exit the ICC algorithm to block  626 ). If the magnitude of DFT after initial correction is still above the threshold δ, then start a new iteration (steps  3  to  12 ) from block  602 . This concludes the process for the individual-cylinder control (ICC) algorithm in a three-cylinder engine. 
     In all applications, A/F or torque imbalances were detected and corrected in less than one second. This enables one to activate individual cylinder control algorithms even under mild transient operations. The method is robust to system disturbances such as sudden EGR valve openings, load applications and exhaust backpressure changes. 
     The above description illustrated the use of exhaust oxygen sensors for A/F imbalances detection and correction through fuel injector biasing (i.e., fuel control). The invention is, however, applicable for air control if variable-valve actuation technology is used. Moreover, in conjunction with a crankshaft torque sensor, the disclosed techniques can also be used for the elimination of torque imbalances (i.e., torque control). Thus, while the invention has been described in terms of a few specific examples, it is apparent that other forms could readily be adapted by one skilled in the art, and the invention is limited only by the scope of the following claims.