Abstract:
The purpose of the present invention is to detect deterioration of dead time characteristics of an air-fuel ratio sensor with high accuracy without causing running performance and exhaust performance to worsen. The present invention provides a control device for an engine, characterized by being equipped with: a means for detecting an air-fuel ratio; a means for changing the air-fuel ratio in a predetermined cycle; and a means for sending a notification of an abnormality in the air-fuel ratio detection means or causing at least a portion of the engine control to run in a fail-safe mode when the amplitude of an output signal of the air-fuel ratio detection means at a predetermined frequency is within a predetermined range and the required time or required angle to arrive at a predetermined value of the output signal of the air-fuel ratio detection means from a reference position or reference time point of an engine-related parameter is equal to a predetermined value or higher.

Description:
TECHNICAL FIELD 
       [0001]    The present invention relates to a control device for an engine, and particularly to detect deterioration of an air-fuel ratio sensor which detects an air-fuel ratio of an exhaust pipe. 
       BACKGROUND ART 
       [0002]    As a background art to which this application belongs, there is a technique disclosed in JP 2008-175202 A (PTL 1). The publication discloses a technique in which a dead time of the air-fuel ratio sensor is measured from a peak variance value of an input air-fuel ratio and a peak value of an output air-fuel ratio of the air-fuel ratio sensor which detects the air-fuel ratio of an exhaust gas of an internal combustion engine, and diagnoses an abnormality. 
       CITATION LIST 
     Patent Literature 
       [0000]    
       
         PTL 1: JP 2008-175202 A 
       
     
       SUMMARY OF INVENTION 
     Technical Problem 
       [0004]    In the technique disclosed in PTL 1, there is a need to change the air-fuel ratio in a stepped manner between a lean side and a rich side about a predetermined center of the air-fuel ratio during a cycle when the variance value is calculated. Therefore, there is a need to keep control to change the air-fuel ratio during the cycle when the variance value is calculated, and thus running performance and exhaust performance of the engine are deteriorated. In addition, there is a problem in that a detection cycle is also increased to calculate the variance value. 
         [0005]    The invention has been made in view of such problems, and an object thereof is to detect deterioration of dead time characteristics of the air-fuel ratio sensor with high accuracy without causing running performance and exhaust performance to worsen. 
       Solution to Problem 
       [0006]    In order to solve the above issue, a control device according to the present invention includes: an air-fuel ratio detection unit that detects an air-fuel ratio of an exhaust pipe; and an air-fuel ratio change unit that changes an air-fuel ratio of the exhaust pipe in a predetermined cycle, wherein a notification of an abnormality in the air-fuel ratio detection unit is notified or at least a portion of engine control is caused to run in a fail-safe mode when an amplitude of an output signal of the air-fuel ratio detection unit at a predetermined frequency while the air-fuel ratio is changed by the air-fuel ratio change unit is equal to or more than a predetermined value and a required time or a required angle to arrive at a predetermined value of an output signal of the air-fuel ratio detection unit from a reference position or a reference time point of a parameter related to a phase of the engine is equal to or more than a predetermined value. 
       Advantageous Effects of Invention 
       [0007]    According to the invention, it is possible to diagnose deterioration in a short cycle since the deterioration of an air-fuel ratio sensor is diagnosed on the basis of an amplitude and a phase change of an output signal of the air-fuel ratio sensor. 
         [0008]    In addition, it is possible to detect deterioration of dead time characteristics of the air-fuel ratio sensor in a short time and with high accuracy using relatively-high-frequency oscillation of the air-fuel ratio without causing running performance and exhaust performance to worsen in a state where an average air-fuel ratio is optimized for the air-fuel ratio of the exhaust. 
     
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
         [0009]      FIG. 1  is a diagram illustrating an engine control system in first to fourth embodiments. 
           [0010]      FIG. 2  is a diagram illustrating an inner configuration of a control unit in the first to fourth embodiments. 
           [0011]      FIG. 3  is a block diagram illustrating the entire control in the first embodiment. 
           [0012]      FIG. 4  is a block diagram illustrating a fuel injection quantity correction value calculation unit in the first embodiment. 
           [0013]      FIG. 5  is a block diagram illustrating an amplitude calculation unit in the first embodiment. 
           [0014]      FIG. 6  is a block diagram illustrating a required time (required angle) calculation unit in the first embodiment. 
           [0015]      FIG. 7  is a block diagram illustrating a dead time abnormality determination unit in the first embodiment. 
           [0016]      FIG. 8  is a block diagram illustrating the entire control in a second embodiment. 
           [0017]      FIG. 9  is a block diagram illustrating the fuel injection quantity correction value calculation unit in the second to fourth embodiments. 
           [0018]      FIG. 10  is a block diagram illustrating the amplitude calculation unit in the second embodiment. 
           [0019]      FIG. 11  is a block diagram illustrating a required angle calculation unit in the second embodiment. 
           [0020]      FIG. 12  is a block diagram illustrating the dead time abnormality determination unit in the second embodiment. 
           [0021]      FIG. 13  is a block diagram illustrating the entire control in a third embodiment. 
           [0022]      FIG. 14  is a block diagram illustrating a two-rotational component calculation unit in the third and fourth embodiments. 
           [0023]      FIG. 15  is a block diagram illustrating the amplitude calculation unit in the third and fourth embodiments. 
           [0024]      FIG. 16  is a block diagram illustrating the required angle calculation unit in the third and fourth embodiments. 
           [0025]      FIG. 17  is a block diagram illustrating the dead time abnormality determination unit in the third and fourth embodiments. 
           [0026]      FIG. 18  is a block diagram illustrating the entire control in the fourth embodiment. 
           [0027]      FIG. 19  is a block diagram illustrating an air-fuel ratio feedback correction value calculation unit in the fourth embodiment. 
       
    
    
     DESCRIPTION OF EMBODIMENTS 
       [0028]    Hereinafter, embodiments will be described using the drawings. 
       First Embodiment 
       [0029]      FIG. 1  is a diagram illustrating a system of this embodiment. In a multi-cylinder (herein, 4-cylinder) engine  9 , the air from the outside passes through an air cleaner  1 , and flows into the cylinder through an intake manifold  4  and a collector  5 . An inflow air amount is adjusted by an electronic throttle  3 . The inflow air amount is detected by an air flow sensor  2 . In addition, an intake air temperature is detected by an intake air temperature sensor  29 . A crank angle sensor  15  outputs a signal every a rotation angle of 10° of a crank shaft, and a signal every combustion cycle. A water temperature sensor  14  detects a temperature of cooling water of the engine  9 . In addition, an accelerator opening sensor  13  detects a stepping amount of an accelerator  6 , and detects a driver&#39;s requiring torque. 
         [0030]    The respective signals of the accelerator opening sensor  13 , the air flow sensor  2 , the intake air temperature sensor  29 , a throttle opening sensor  17  attached to the electronic throttle  3 , the crank angle sensor  15 , and the water temperature sensor  14  are sent to a control unit  16  described below. An operation state of the engine  9  is obtained from these sensor outputs. An air amount, a fuel injection quantity, and a primary operation amount of the engine  9  at an ignition time point are optimally calculated. 
         [0031]    A target air amount calculated in the control unit  16  is converted from a target throttle opening to an electronic throttle drive signal, and transmitted to the electronic throttle  3 . The fuel injection quantity is converted into a valve opening pulse signal, and sent to a fuel injection valve (injector)  7 . In addition, the drive signal is sent to an ignition plug  8  for the ignition at the ignition time point calculated by the control unit  16 . 
         [0032]    The injected fuel is mixed with the air from the intake manifold and flows into the cylinder of the engine  9  to form a mixture. The mixture is exploded by a spark generated from the ignition plug  8  at a predetermined ignition time point, and a piston is pulled down by the combustion pressure to serve as power of the engine  9 . The exhaust gas after the explosion is sent in a three-way catalyst  11  through an exhaust manifold  10 . Part of the exhaust gas is recirculated toward an intake side through an exhaust recirculating pipe  18 . A recirculating amount is controlled by an EGR valve  19 . 
         [0033]    An air-fuel ratio sensor  12  is attached to an exhaust pipe collecting part. A catalyst downstream O2 sensor  20  is attached on the downstream of the three-way catalyst  11 . 
         [0034]      FIG. 2  illustrates the inner configuration of the control unit  16 . The respective sensor output values of the air flow sensor  2 , the air-fuel ratio sensor  12 , the accelerator opening sensor  13 , the water temperature sensor  14 , the crank angle sensor  15 , a throttle valve opening sensor  17 , the catalyst downstream O2 sensor  20 , and the intake air temperature sensor  29  are input to an ECU  16 . After signal processing such as noise removal is performed in an input circuit  24 , the signals are sent to an input/output port  25 . The value of the input port is stored in a RAM  23 , and subjected to a calculation process in a CPU  21 . A control program describing the content of the calculation process is written in a ROM  22  in advance. The values indicating respective actuator operation amounts calculated according to the control program are stored in the RAM  23  and then sent to the input/output port  25 . The operation signal of the ignition plug  8  is an ON/OFF signal which is turned on when a primary coil in the ignition output circuit  26  is energizing, and turned off when not being energizing. The ignition time point is a timing when the signal is turned from ON to OFF. A signal for the ignition plug  8  set to the output port is amplified to have energy sufficient for the combustion by the ignition output circuit  26 , and supplied to the ignition plug  8 . In addition, the drive signal of the fuel injection valve  7  is an ON/OFF signal which is turned on when the valve is opened, and turned off when the valve is closed. The drive signal is amplified to have energy sufficient for opening the fuel injection valve  7  by a fuel injection valve drive circuit  27 , and sent to the fuel injection valve  7 . The drive signal for realizing a target opening of the electronic throttle  3  is sent to the electronic throttle  3  through an electronic throttle drive circuit  28 . The drive signal for realizing the target opening of the EGR valve  19  is sent to the EGR valve  19  through an EGR valve drive circuit  30 . 
         [0035]    Hereinafter, the description will be made about the control program written in the ROM  22 .  FIG. 3  is a block diagram illustrating the entire control, and is configured by the following calculation units.
       Fuel injection quantity correction value calculation unit ( FIG. 4 )   Amplitude calculation unit ( FIG. 5 )   Required time (required angle) calculation unit ( FIG. 6 )   Dead time abnormality determination unit ( FIG. 7 )       
 
         [0040]    The “fuel injection quantity correction value calculation unit” calculates a fuel injection quantity correction value (Ti_hos) to uniformly change the fuel injection quantities of all the cylinders and a cycle flag (f_sin_init) which is turned on at every predetermined cycle. Injection pulse widths (Ti 1  to Ti 4 ) for determining the fuel injection quantities of the respective cylinders are calculated by multiplying Ti_hos by a base fuel injection quantity (Tp). Further, Tp is obtained from an intake air amount, an engine rotation rate, and an injection amount performance of the injector. While the method of calculating Tp is a well-known method, and thus the description thereof will not made in detail. The “amplitude calculation unit” obtains an amplitude (A 1 ) of an air-fuel ratio signal from an air-fuel ratio sensor signal (Rabf) of the catalyst upstream. The “required time (required angle) calculation unit” obtains an angle or a required time (Ti) from when f_sin_init becomes “1” until a time when Rabf is maximized during one cycle of the predetermined cycle, and from the air-fuel ratio sensor signal (Rabf) of the catalyst upstream. The “dead time abnormality determination unit” obtains an abnormality flag (f_MUL) from A 1  and T 1 . Hereinafter, the description will be made about the details of the respective calculation units. 
       &lt;Fuel Injection Quantity Correction Value Calculation Unit (FIG.  4 )&gt; 
       [0041]    In this calculation unit, Ti_hos (fuel injection quantity correction value) and f_sin_init (cycle flag) are calculated. Specifically, the calculation is illustrated in  FIG. 4 . 
         [0042]    i) When the rotation rate is within a predetermined range, the engine load is within a predetermined range, a difference between the current rotation rate and the previous rotation rate is equal to or less than a predetermined value, and a difference between the current engine load and the previous engine load is equal to or less than a predetermined value.
       A value s 0  of a sinusoidal wave is calculated in a cycle of fa       
 
         [0044]    In this case, fa≧fc. 
         [0045]    fc: cutoff frequency
       f_sin_init=1 at every one cycle.       
 
         [0047]    Otherwise, f_sin_init=0.
       ii) In a case other than ‘i)’, s 0 =0 and f_sin_init=0.       
 
         [0049]    Ti_hos (fuel injection quantity correction value) is set by a value obtained by multiplying K_Ti_hos (correction value width) by s 0  and increasing by “1”. K_Ti_hos is a value to determine the fuel injection quantity or a vibrational amplitude of an actual air-fuel ratio, and is determined in consideration of running performance of the engine  9 , exhaust performance, and a detection accuracy of dead time characteristics. Further, an influence onto the engine performance is taken into consideration. It is desirable that the number of counts for oscillating Ti_hos in the cycle of fa be determined to a predetermined number of counts and oscillated by a required minimum number of counts. 
       &lt;Amplitude Calculation Unit (FIG.  5 )&gt; 
       [0050]    In this calculation unit, A 1  (amplitude) is calculated. 
         [0051]    Specifically, the calculation is illustrated in  FIG. 5 . A difference between a maximum value and a minimum value of Rabf from when f_sin_init=1 is satisfied until a time when the next f_sin_init=1 is satisfied becomes the amplitude A 1 . 
       &lt;Required Time (Required Angle) Calculation Unit (FIG.  6 )&gt; 
       [0052]    In this calculation unit, T 1  (required time) is calculated. Specifically, the calculation is illustrated in  FIG. 6 .
       A timer is reset when f_sin_init=1 is satisfied.   A timer value when Rabf is maximized in a cycle from when f_sin_init=1 is satisfied until a time when the next f_sin_init=1 is satisfied is set to Ti. Further, the above process is performed about the required time, but a required angle may be calculated as described below.   The rotation angle θa of the engine when f_sin_init=1 is satisfied is stored.   The rotation angle of the engine when Rabf is maximized in a cycle from when f_sin_init=1 is satisfied until a time when the next f_sin_init=1 is satisfied is set to θb, and θb−θa is set to a required angle θ 0 . Further, a dynamic range of θ 0  is set according to a length of the dead time of the air-fuel ratio sensor  12 , and an operation condition and the cycle fa of the engine at the time of detection (the dynamic range may become larger than 360 deg).       
 
       &lt;Dead Time Abnormality Determination Unit (FIG.  7 )&gt; 
       [0057]    In this calculation unit, f_MUL (abnormality flag) is calculated. Specifically, the calculation is illustrated in  FIG. 7 . 
         [0058]    When K_A 1 ≦A 1  and K_T 1 ≦T 1 , f_MUL is set to 1. 
         [0059]    K_A 1  and K_T 1  are values to define a level for determining the dead time abnormality. These values are determined according to a diagnosis target performance. 
         [0060]    Further, in a case where the determination is performed using the required angle θ 0  described above, the calculation is performed as the following process. 
         [0061]    When K_A 1 ≦A 1  and K≦θ 0 ≦θ 0 , f_MUL is set to 1. 
         [0062]    K_θ 0  is a value to define a level for determining the dead time abnormality. This value is determined according to the diagnosis target performance. In addition, even when the dead time of the air-fuel ratio sensor  12  is constant, a required angle θ 0  is changed according to the rotation rate of the engine  9 . Therefore, in a case where the detection is performed at various rotation rates, the correction is performed to make sensitivity of the rotation rate disappear. 
       Second Embodiment 
       [0063]    In this embodiment, the air-fuel ratio of one cylinder is set to be shifted by a predetermined amount from the air-fuel ratios of the others to generate oscillation in the air fuel oscillation in two rotation cycle of the engine. The dead time deterioration of the air-fuel ratio sensor  12  is detected using the subject signal. 
         [0064]      FIG. 1  is a diagram illustrating the system of this embodiment, and the same portions as those of the first embodiment will not be described in detail.  FIG. 2  illustrates the inner configuration of the control unit  16 , and the same portions as those of the first embodiment will not be described in detail. 
         [0065]    Hereinafter, the description will be made about the control program written in the ROM  22 .  FIG. 8  is a block diagram illustrating the entire control, and is configured by the following calculation units.
       Fuel injection quantity correction value calculation unit ( FIG. 9 )   Amplitude calculation unit ( FIG. 10 )   Required angle calculation unit ( FIG. 11 )   Dead time abnormality determination unit ( FIG. 12 )       
 
         [0070]    The “fuel injection quantity correction value calculation unit” calculates the fuel injection quantity correction values (Ti_hos 1  to  4 ) of the respective cylinders. In particular, the air-fuel ratio oscillation in two rotation cycles of the engine is generated by shifting only the fuel injection quantity correction value (Ti_hos 1 ) of one cylinder by a predetermined amount in this embodiment. The injection pulse widths (Ti 1  to Ti 4 ) to determine the fuel injection quantities of the respective cylinders are calculated by multiplying Ti_hos 1  to  4  to the base fuel injection quantity (Tp). Further, while the method of calculating Tp is a well-known method, and thus the description thereof will not made in detail. The “amplitude calculation unit” obtains an amplitude (A 1 ) of an air-fuel ratio signal from an air-fuel ratio sensor signal (Rabf) of the catalyst upstream. The “required angle calculation unit” obtains a required angle (θ 1 ) from the air-fuel ratio sensor signal (Rabf) of the catalyst upstream until a time when Rabf is maximized during one cycle (two rotations of the engine). The “dead time abnormality determination unit” obtains the abnormality flag (f_MUL) from A 1  and θ 1 . Hereinafter, the description will be made about the details of the respective calculation units. 
       &lt;Fuel Injection Quantity Correction Value Calculation Unit (FIG.  9 )&gt; 
       [0071]    In this calculation unit, Ti_hos 1  to  4  (the fuel injection quantity correction value of the first to fourth cylinders) are calculated. Specifically, the calculation is illustrated in  FIG. 9 . 
         [0072]    i) Ti_hos 1  is set to K_Ti_hos 1  when the rotation rate is within a predetermined range, the engine load is within a predetermined range, a difference between the current rotation rate and the previous rotation rate is equal to or less than a predetermined value, and a difference between the current engine load and the previous engine load is equal to or less than a predetermined value. 
         [0073]    ii) In a case other than ‘i)’, Ti_hos 1  is set to 1. 
         [0074]    K_Ti_hos 1  (the fuel injection quantity correction value of the first cylinder) is a value to determine the fuel injection quantity or the vibrational amplitude of the actual air-fuel ratio, and is determined in consideration of the running performance of the engine  9 , the exhaust performance, and the detection accuracy of the dead time characteristics. Further, an influence onto the engine performance is taken into consideration. It is desirable that a cycle of Ti_hos 1 =K_Ti_hos 1  be determined to a predetermined cycle and oscillated by a required minimum cycle. 
       &lt;Amplitude Calculation Unit (FIG.  10 )&gt; 
       [0075]    In this calculation unit, A 1  (amplitude) is calculated. Specifically, the calculation is illustrated in  FIG. 10 . A difference between a maximum value and a minimum value of Rabf during a time when the engine  9  is rotated twice is set to the amplitude A 1 . 
       &lt;Required Angle Calculation Unit (FIG.  11 )&gt; 
       [0076]    In this calculation unit, θ 1  (required angle) is calculated. Specifically, the calculation is illustrated in  FIG. 6 . The rotation angle of the engine when Rabf is a maximum value during a time when the engine  9  is rotated twice is set to θ 1   a  (a base value of the required angle). A remnant obtained by dividing θ 1 _Gak (a learned value of the required angle) with  720  is set to Mod θ 1 _Gak (a remnant of the learned value of the required angle). A difference between Mod_θ 1 _Gak and θ 1   a  is set to Δθ 1  (a changed value of the required angle). A difference between θ 1 _Gak and Mod_θ 1 _Gak is set to θ 1 _Gak 0  (an offset of the learned value of the required angle). When Δθ 1 ≦K_Δθ 1 , θ 1  is set to θ 1 _Gak 0 +Δθ 1  and θ 1 _Gak is set to θ 1 .
       In other cases, θ 1  is set to θ 1 _Gak.       
 
         [0078]    A length of the dead time of the air-fuel ratio sensor  12  may be larger than 720 deg corresponding to two rotations of the engine in angle conversion. On the other hand, 0≦θ 1   a &lt;720 is satisfied. The above process is performed on an assumption that an angle of θ 1 _Gak (the learned value of the required angle) corresponding to the length of the dead time of the air-fuel ratio sensor  12  is larger than 720. 
         [0079]    Further, an initial value of θ 1 _Gak is set to the length of the dead time in an initial state of the air-fuel ratio sensor. In addition, even when the dead time of the air-fuel ratio sensor  12  is constant, the required angle values used in this calculation unit are changed according to the rotation rate of the engine  9 . Therefore, in a case where the detection is performed at various rotation rates, the correction is performed to make sensitivity of the rotation rate disappear. 
       &lt;Dead Time Abnormality Determination Unit (FIG.  12 )&gt; 
       [0080]    In this calculation unit, f_MUL (abnormality flag) is calculated. Specifically, the calculation is illustrated in  FIG. 12 . 
         [0081]    When K_A 1 ≦A 1  and K_θ 1 ≦θ 1 , f_MUL is set to 1. 
         [0082]    K_A 1  and K_θ 1  are values to define a level for determining the dead time abnormality. These values are determined according to the diagnosis target performance. 
         [0083]    In this embodiment, the air-fuel ratio change which oscillates at a frequency corresponding to two rotations of the engine is generated by shifting the fuel injection quantity of the first cylinder. However, the same phenomenon is obtained even by shifting the fuel injection quantity of any one of the second to fourth cylinders. In addition, the fuel injection quantities of a plurality of cylinders may be shifted at the same time. An optimal fuel injection quantity correction value of each cylinder may be determined in consideration of the exhaust performance, the running performance, and the like. In addition, the amplitude and the phase of the air-fuel ratio change in the two-rotation cycle of the engine are changed according to the fuel injection quantity correction value of each cylinder. Therefore, the initial value of θ 1 _Gak, K_A 1 , and K_θ 1  are also set according to the change. 
       Third Embodiment 
       [0084]    In this embodiment, the air-fuel ratio of one cylinder is set to be shifted by a predetermined amount from the air-fuel ratios of the others to generate oscillation in the air fuel oscillation in two rotation cycle of the engine. The air-fuel ratio sensor signal is Fourier-transformed, a power spectrum and a phase spectrum at the frequency corresponding to the two-rotation cycle of the engine are calculated. The dead time deterioration is detected using the power spectrum and the phase spectrum. 
         [0085]      FIG. 1  is the diagram illustrating the system of this embodiment, and the same portions as those of the first embodiment will not be described in detail.  FIG. 2  illustrates the inner configuration of the control unit  16 , and the same portions as those of the first embodiment will not be described in detail. 
         [0086]    Hereinafter, the description will be made about the control program written in the ROM  22 .  FIG. 13  is a block diagram illustrating the entire control, and is configured by the following calculation units.
       Fuel injection quantity correction value calculation unit ( FIG. 9 )   Two-rotational component calculation unit ( FIG. 14 )   Amplitude calculation unit ( FIG. 15 )   Required angle calculation unit ( FIG. 16 )   Dead time abnormality determination unit ( FIG. 17 )       
 
         [0092]    The “fuel injection quantity correction value calculation unit” calculates the fuel injection quantity correction values (Ti_hos 1  to  4 ) of the respective cylinders. In particular, the air-fuel ratio oscillation in two rotation cycles of the engine is generated by shifting only the fuel injection quantity correction value (Ti_hos 1 ) of one cylinder by a predetermined amount in this embodiment. The injection pulse widths (Ti 1  to Ti 4 ) to determine the fuel injection quantities of the respective cylinders is calculated by multiplying Ti_hos 1  to  4  to the base fuel injection quantity (Tp). Further, while the method of calculating Tp is a well-known method, and thus the description thereof will not made in detail. The “two-rotational component calculation unit” performs the Fourier transform on an air-fuel ratio sensor signal (Rabf) of the catalyst upstream, and calculates a real part (R_2rev) and an imaginary part (I_2rev) of the frequency component corresponding to the two-rotation cycle of the engine. The “amplitude calculation unit” obtains the power spectrum from R_2rev and I_2rev, and sets the amplitude (A 1 ). The “required angle calculation unit” obtains the phase spectrum from R_2rev and I_2rev, and sets a required angle (θ 2 ). The “dead time abnormality determination unit” obtains the abnormality flag (f_MUL) from A 1  and θ 2 . Hereinafter, the description will be made about the details of the respective calculation units. 
       &lt;Fuel Injection Quantity Correction Value Calculation Unit (FIG.  9 )&gt; 
       [0093]    In this calculation unit, Ti_hos 1  to  4  (the fuel injection quantity correction value of the first to fourth cylinders) are calculated. Specifically, while illustrated in  FIG. 9 , the calculation is the same as that of the second embodiment, and thus the description thereof will not be made in detail. 
       &lt;Two-Rotational Component Calculation Unit (FIG.  14 )&gt; 
       [0094]    This calculation unit calculates the real part (R_2rev) and the imaginary part (I_2rev) of the two-rotational component of the signal (Rabf) of the air-fuel ratio sensor  12  of the catalyst upstream. Specifically, the calculation is illustrated in  FIG. 14 . A difference between the current value and the previous value of Rabf is calculated, and is set to dRabf (difference value of the air-fuel ratio sensor signals of the catalyst upstream). The process (discrete Fourier transform) surrounded by the broken line in the drawing is performed on dRabf. 
         [0095]    The sum of the current value and the three previous values of C_R×dRabf are set to R_2rev. In addition, the sum of the current value and the three previous values of C_I×dRabf is set to I_2rev. Herein, C_R and C_I are calculated as follows according to CYLCNT (cylinder No.). CYLCNT is updated when a piston position of an N-th cylinder is at a predetermined value. Herein, it is assumed that the piston position is updated at 110 deg before a compression TDC of the subject cylinder. 
         [0096]    When CYLCNT=1, C_R=1 
         [0097]    When CYLCNT=3 or 2, C_R=0 
         [0098]    When CYLCNT=4, C_R=−1 
         [0000]    In addition, 
         [0099]    When CYLCNT=1 or 4, C_I=0 
         [0100]    When CYLCNT=3, C_I=1 
         [0101]    When CYLCNT=2, C_I=−1 
       &lt;Amplitude Calculation Unit (FIG.  15 )&gt; 
       [0102]    In this calculation unit, A 2  (amplitude) is calculated. Specifically, the calculation is illustrated in  FIG. 15 . The power spectrum of the two-rotational component is obtained from R_2rev and I_2rev using the following formula, and is set to A 2 . 
         [0000]      √((R_2rev×R_2rev)+(I_2rev×I_2rev))
 
         [0103]    In order to increase the accuracy, the power spectrum may be obtained in plural times to take an average value (or moving average). 
       &lt;Required Angle Calculation Unit (FIG.  16 )&gt; 
       [0104]    In this calculation unit, θ 2  (required angle) is calculated. Specifically, the calculation is illustrated in  FIG. 16 . Phase 0  (base value of phase of the two-rotational component) is obtained from R_2rev and I_2rev using the following formula. 
         [0000]      arctan 2(I_2rev/R_2rev)×(180/π)
 
         [0105]    Herein, arctan 2 calculates an arc tangent value (=phase) corresponding to four quadrants (−180 to 180 deg). Furthermore, the phase spectrum having a phase range of 0 to 360 deg is set to θ 2   a  (base value of the required angle). Specifically, when Phase 0 &lt;0, θ 2   a =Phase 0 +360. In other cases, θ 2   a =Phase 0 . 
         [0106]    θ 2   b  is set to 2×θ 2   a.    
         [0107]    Such settings are for converting θ 2   a  to the rotation angle of the engine. A remnant obtained by dividing θ 2 _Gak (the learned value of the required angle) with  720  is set to Mod_θ 2 _Gak (a remnant of the learned value of the required angle). A difference between Mod_θ 2 _Gak and θ 2   a  is set to Δθ 2  (a changed value of the required angle). A difference between 02 Gak and Mod_θ 2 _Gak is set to 2_Gak 0  (an offset of the learned value of the required angle). When Δθ 2 ≦K_Δθ 2 , θ 2 =θ 2 _Gak 0 +Δθ 2 , and θ 2 _Gak=θ 2 .
       In other cases, θ 2  is set to θ 2 _Gak.       
 
         [0109]    A length of the dead time of the air-fuel ratio sensor  12  may be larger than 720 deg corresponding to two rotations of the engine in angle conversion. On the other hand, θ 2   b  satisfies 0≦θ 2   b&lt; 720. The above process is performed on an assumption that θ 2 _Gak (the learned value of the required angle) which is an angle corresponding to the length of the dead time of the air-fuel ratio sensor  12  is larger than 720. 
         [0110]    Further, an initial value of θ 2 _Gak becomes the length of the dead time in the initial state of the air-fuel ratio sensor. In addition, even when the dead time of the air-fuel ratio sensor  12  is constant, the required angle values used in this calculation unit are changed according to the rotation rate of the engine  9 . Therefore, in a case where the detection is performed at various rotation rates, the correction is performed to make sensitivity of the rotation rate disappear. In addition, in order to increase the accuracy, an average value (or moving average) may be used for the calculation of θ 2   a.    
       &lt;Dead Time Abnormality Determination Unit (FIG.  17 )&gt; 
       [0111]    In this calculation unit, f_MUL (abnormality flag) is calculated. Specifically, the calculation is illustrated in  FIG. 17 . 
         [0112]    When K_A 1 ≦A 1  and K≦θ 2 ≦θ 2 , f_MUL is set to 1. K_A 1  and K_θ 2  are values to define a level for determining the dead time abnormality. These values are determined according to the diagnosis target performance. 
         [0113]    In this embodiment, the air-fuel ratio change which oscillates at a frequency corresponding to two rotations of the engine is generated by shifting the fuel injection quantity of the first cylinder. However, the same phenomenon is obtained even by shifting the fuel injection quantity of any one of the second to fourth cylinders. In addition, the fuel injection quantities of a plurality of cylinders may be shifted at the same time. An optimal fuel injection quantity correction value of each cylinder may be determined in consideration of the exhaust performance, the running performance, and the like. In addition, the amplitude and the phase of the air-fuel ratio change in the two-rotation cycle of the engine are changed according to the fuel injection quantity correction value of each cylinder. Therefore, the initial value of θ 2 _Gak, K_A 1 , and K_θ 2  are also set according to the change. 
       Fourth Embodiment 
       [0114]    In this embodiment, a parameter of air-fuel ratio feedback control is corrected on the basis of the detected dead time. 
         [0115]      FIG. 1  is a diagram illustrating the system of this embodiment, and the same portions as those of the first embodiment will not be described in detail.  FIG. 2  illustrates the inner configuration of the control unit  16 , and the same portions as those of the first embodiment will not be described in detail. 
         [0116]    Hereinafter, the description will be made about the control program written in the ROM  22 .  FIG. 18  is a block diagram illustrating the entire control, and is configured by the following calculation units.
       Fuel injection quantity correction value calculation unit ( FIG. 9 )   Two-rotational component calculation unit ( FIG. 14 )   Amplitude calculation unit ( FIG. 15 )   Required angle calculation unit ( FIG. 16 )   Dead time abnormality determination unit ( FIG. 17 )   Air-fuel ratio feedback correction value calculation unit ( FIG. 19 )       
 
         [0123]    The “fuel injection quantity correction value calculation unit” calculates the fuel injection quantity correction values (Ti_hos 1  to  4 ) of the respective cylinders. In particular, the air-fuel ratio oscillation in two rotation cycles of the engine is generated by shifting only the fuel injection quantity correction value (Ti_hos 1 ) of one cylinder by a predetermined amount in this embodiment. The injection pulse widths (Ti 1  to Ti 4 ) to determine the fuel injection quantities of the respective cylinders is calculated by multiplying Ti_hos 1  to  4  to the base fuel injection quantity (Tp). Further, while the method of calculating Tp is a well-known method, and thus the description thereof will not made in detail. The “two-rotational component calculation unit” performs the Fourier transform on an air-fuel ratio sensor signal (Rabf) of the catalyst upstream, and calculates a real part (R_2rev) and an imaginary part (I_2rev) of the frequency component corresponding to the two-rotation cycle of the engine. The “amplitude calculation unit” obtains the power spectrum from R_2rev and I_2rev, and sets the amplitude (A 1 ). The “required angle calculation unit” obtains the phase spectrum from R_2rev and I_2rev, and sets a required angle (θ 2 ). The “dead time abnormality determination unit” obtains the abnormality flag (f_MUL) from A 1  and θ 2 . The “air-fuel ratio feedback correction value calculation unit” calculates a correction value (Alpha) to correct the fuel injection quantity such that the output value of the air-fuel ratio sensor signal (Rabf) of the catalyst upstream becomes a target value. In addition, the parameter related to the air-fuel ratio feedback is corrected according to the value of θ 2 . Hereinafter, the description will be made about the details of the respective calculation units. 
       &lt;Fuel Injection Quantity Correction Value Calculation Unit (FIG.  9 )&gt; 
       [0124]    In this calculation unit, Ti_hos 1  to  4  (the fuel injection quantity correction value of the first to fourth cylinders) are calculated. Specifically, while illustrated in  FIG. 9 , the calculation is the same as that of the second embodiment, and thus the description thereof will not be made in detail. 
       &lt;Two-Rotational Component Calculation Unit (FIG.  14 )&gt; 
       [0125]    This calculation unit calculates the real part (R_2rev) and the imaginary part (I_2rev) of the two-rotational component of the signal (Rabf) of the air-fuel ratio sensor  12  of the catalyst upstream. Specifically, while illustrated in  FIG. 14 , the calculation is the same as that of the third embodiment, and thus the description thereof will not be made in detail. 
       &lt;Amplitude Calculation Unit (FIG.  15 )&gt; 
       [0126]    In this calculation unit, A 2  (amplitude) is calculated. 
         [0127]    Specifically, while illustrated in  FIG. 15 , the calculation is the same as that of the third embodiment, and thus the description thereof will not be made in detail. 
       &lt;Required Angle Calculation Unit (FIG.  16 )&gt; 
       [0128]    In this calculation unit, θ 2  (required angle) is calculated. Specifically, while illustrated in  FIG. 16 , the calculation is the same as that of the third embodiment, and thus the description thereof will not be made in detail. 
       &lt;Dead Time Abnormality Determination Unit (FIG.  17 )&gt; 
       [0129]    In this calculation unit, f_MUL (abnormality flag) is calculated. Specifically, while illustrated in  FIG. 17 , the calculation is the same as that of the third embodiment, and thus the description thereof will not be made in detail. 
       &lt;Air-Fuel Ratio Feedback Correction Value Calculation Unit (FIG.  19 )&gt; 
       [0130]    In this calculation unit, Alpha (the correction value of the air-fuel ratio feedback) is calculated. Specifically, the calculation is illustrated in  FIG. 19 . Alpha is calculated by a PI control on the basis of a difference between Rabf (the air-fuel ratio of the catalyst upstream) and TaRabf (the target air-fuel ratio). 
         [0131]    A P gain (P_hos) of the PI control is obtained with reference to a table M_Phos from θ 2 . 
         [0132]    An I gain (I_hos) of the PI control is obtained with reference to a table M_Ihos from θ 2 . M_Phos,M_Ihos is obtained from a transmission characteristic of an air-fuel ratio control system. In addition, the specification may be changed according to an operation condition of the engine  9 . As a control method for the dead time system, there is a method of using a dead time system model such as a Smith method. While not illustrated in  FIG. 19 , the parameter of the dead time of the dead time model may be corrected using θ 2 . 
         [0133]    Further, there is a method of controlling the air-fuel ratio of each cylinder to be a target air-fuel ratio while detecting or estimating the air-fuel ratio of each cylinder. When the above control is not being performed, the second to fourth embodiments are desirably performed. However, even when the control is being performed, it can be diagnosed during a cycle when the correction is performed by the control when the fuel injection quantity of a specific cylinder is shifted. 
         [0134]    The features of the invention are collected in the following. A control device according to an aspect of the invention includes a unit which detects an air-fuel ratio, a unit which changes the air-fuel ratio in a predetermined cycle, and a unit which sends a notification of an abnormality in the air-fuel ratio detection unit or causes at least a portion of engine control to run in a fail-safe mode when an amplitude of an output signal of an air-fuel ratio detection unit at a predetermined frequency is equal to or more than a predetermined value and a required time or a required angle to arrive at a predetermined value of an output signal of the air-fuel ratio detection unit from a reference position or a reference time point of an engine-related parameter is equal to or more than a predetermined value. 
         [0135]    In other words, in a deterioration mode of the air-fuel ratio sensor, there are mainly three deteriorations such as a gain deterioration, a responsiveness deterioration, and a dead time deterioration. When the air-fuel ratio is oscillated at the predetermined frequency, the amplitude of the air-fuel ratio at the time of the gain deterioration becomes small or large compared to that at a time when an oscillated air-fuel ratio is normal. The amplitude of the oscillated air-fuel ratio at the predetermined frequency or higher at the time of the responsiveness deterioration becomes small compared to that at a normal time. In addition, the phase of the oscillated air-fuel ratio (a position of a maximum value or a minimum value of the oscillated air-fuel ratio) is delayed compared to that at a normal time. At the time of the dead time deterioration, the amplitude of the oscillated air-fuel ratio is not changed compared to that at a normal time. In addition, the phase of the oscillated air-fuel ratio is delayed compared to that at a normal time. The phase is changed compared to that at a normal time when the responsiveness deterioration and the dead time deterioration occur. The amplitude becomes small at the time of the responsiveness deterioration, but is not changed at the time of the dead time deterioration. Therefore, as described above, when “an amplitude of an output signal of an air-fuel ratio sensor is equal to or more than a predetermined value” (the amplitude of the oscillated air-fuel ratio is not changed compared to that at a normal time) and “a required time or a required angle to arrive at a predetermined value of an output signal of the air-fuel ratio sensor from a reference position or a reference time point of an engine-related parameter is equal to or more than a predetermined value” (the phase of the oscillated air-fuel ratio is delayed compared to that at a normal time), the dead time characteristics of the air-fuel ratio sensor is deteriorated (the dead time becomes long), and the abnormality of the air-fuel ratio sensor is notified or a portion of the engine control is ran in the fail-safe mode. 
         [0136]    In addition, the control device of the invention includes a unit which oscillates the air-fuel ratio at a frequency equal to or more than a predetermined frequency. 
         [0137]    In other words, a lot of detection results are obtained in a short cycle by oscillating the air-fuel ratio at a predetermined frequency or higher, so that it is advantageous in practical usage. In addition, as described above, when the frequency is lower than the predetermined frequency at the time of the responsiveness deterioration, the amplitude does not become small compared to that at a normal time. Therefore, the frequency is set to be equal to or more than the predetermined frequency even in order to perform the detection separated from the dead time deterioration. 
         [0138]    In addition, according to the control device for the engine of the invention, the predetermined frequency is a frequency equal to or more than a cutoff frequency in the frequency characteristics of the air-fuel ratio sensor. 
         [0139]    In other words, it has been specifically described that at the time of the responsiveness deterioration, the frequency bandwidth where the amplitude is small is higher than the cutoff frequency compared to that at a normal time. 
         [0140]    In addition, the control device of the invention includes a unit which oscillates the air-fuel ratio (the output signal of the detection unit) at the two-rotation cycle of the engine by shifting the air-fuel ratio of at least one cylinder by the predetermined amount from the air-fuel ratios of the others. 
         [0141]    In other words, when the air-fuel ratio of at least one cylinder is shifted by the predetermined amount from the air-fuel ratios of the others, a deviation occurs in the air-fuel ratio between the cylinders. The air-fuel ratio signal of the exhaust pipe collecting part is oscillated in a cycle that the engine is rotated twice. The dead time deterioration of the air-fuel ratio sensor is detected from the oscillated air-fuel ratio by the above method. In this case, the average air-fuel ratios of all the cylinders become a target air-fuel ratio, so that the deterioration of the exhaust performance and the deterioration of the running performance are almost eliminated, and the dead time characteristics of the air-fuel ratio sensor can be detected. 
         [0142]    In addition, according to the control device of the invention, the reference position or the reference time point of the engine-related parameter is a predetermined crank angle or a fuel injection quantity change time point of the engine. 
         [0143]    In other words, it has been specifically described that the reference position for obtaining the phase of the oscillated air-fuel ratio (a position of a maximum value or a minimum value of the oscillated air-fuel ratio) is a predetermined angle of the engine. In other words, the frequency of the oscillation of the air-fuel ratio caused by the deviation of the air-fuel ratio between the cylinders described above corresponds to the two-rotation cycle of the engine. Therefore, for example, the required angle to arrive a maximum value or a minimum value of the oscillation waveform can be obtained as the phase with reference to the predetermined angle of the engine (for example, TDC or BDC of a specific cylinder). In addition, it has been specifically described that the reference time point for obtaining the phase of the oscillated air-fuel ratio is the fuel injection quantity change timing. In a case where the oscillated air-fuel ratio occurs by increasing or decreasing the fuel injection quantity of all the cylinders at the predetermined frequency, the required angle to arrive a maximum value or a minimum value of the oscillation waveform can be obtained as the phase with reference to the timing when the fuel injection quantity is changed. 
         [0144]    In addition, according to the control device of the invention, the predetermined value of the output signal of the air-fuel ratio detection unit is a maximum value or a minimum value per a cycle of the oscillation waveform of the output signal of the air-fuel ratio detection unit. 
         [0145]    In other words, in a case where the phase of the oscillation waveform of the air-fuel ratio is obtained, the angle and the time to arrive the determined position of the oscillation waveform of the air-fuel ratio may be obtained from the determined reference point such as the predetermined angle or the fuel injection quantity change time point of the engine as described above. It has been specifically described that the determined position of the oscillation waveform of the air-fuel ratio is a maximum value or a minimum value per a cycle of the oscillation waveform which is easily used. 
         [0146]    In addition, the control device of the invention includes a unit which performs a Fourier transform on the output signal of the air-fuel ratio detection unit, a unit which obtains the amplitude from the power spectrum obtained through the Fourier transform, and a unit which obtains the required time or the required angle to arrive the predetermined value of the output signal of the air-fuel ratio detection unit from the phase spectrum obtained through the Fourier transform and from the reference position or the reference time point of the engine-related parameter. 
         [0147]    In other words, the power spectrum and the phase spectrum are obtained by performing the Fourier transform on the signal of the oscillated air-fuel ratio. The “amplitude of the power spectrum at the oscillation frequency of the oscillated air-fuel ratio” and the “amplitude of the oscillated air-fuel ratio” are proportional to each other. In addition, “the phase spectrum value at the oscillation frequency of the oscillated air-fuel ratio” is correlated with “the required time or the required angle to arrive the predetermined value (for example, a maximum value or a minimum value) of the oscillated air-fuel ratio from the reference position or the reference time point of the engine-related parameter”. This relation is used. 
         [0148]    In addition, the control device of the invention includes a unit which changes a parameter of the air-fuel ratio feedback control on the basis of the required time or the required angle to arrive the predetermined value of the output signal of the air-fuel ratio detection unit from the reference position or the reference time point of the engine-related parameter. 
         [0149]    In other words, a parameter related to the performance of the air-fuel ratio feedback control is predetermined in a case where the air-fuel ratio sensor is normal or on an assumption that the characteristics thereof is deteriorated within a certain range. When the dead time characteristics of the air-fuel ratio sensor is largely changed, there occurs mismatching with respect to the parameter, and thus the performance of the air-fuel ratio feedback control is deteriorated. Therefore, in the above method, the parameter of the air-fuel ratio feedback control is optimized on the basis of the required time or the required angle to arrive the predetermined value (for example, a maximum value or a minimum value) of the oscillated air-fuel ratio from the reference position or the reference time point of the engine-related parameter corresponding to the dead time, so that the deterioration of the performance is suppressed. 
       REFERENCE SIGNS LIST 
       [0000]    
       
           1  air cleaner 
           2  air flow sensor air flow sensor 
           3  electronic throttle 
           4  intake pipe 
           5  collector 
           6  accelerator 
           7  fuel injection valve 
           8  ignition plug 
           9  engine 
           10  exhaust pipe 
           11  three-way catalyst 
           12  air-fuel ratio sensor 
           13  accelerator opening sensor 
           14  water temperature sensor 
           15  crank angle sensor 
           16  control unit 
           17  throttle opening sensor 
           18  exhaust recirculating pipe 
           19  EGR valve 
           20  catalyst downstream O2 sensor 
           21  CPU 
           22  ROM 
           23  RAM 
           24  input circuit 
           25  input/output port 
           26  ignition output circuit 
           27  fuel injection valve drive circuit 
           28  electronic throttle drive circuit 
           29  intake air temperature sensor 
           30  EGR valve drive circuit