Adaptive control system for an internal combustion engine

Abstract: An adaptive control system for a four cylinder spark ignition engine includes a memory (35) containing basic values and a memory (38) containing correction values for the spark advance angle. From these values basic and correction values are calculated and added in a summer (37). The output of summer (37) is supplied to one input of a summer (41), the output of which is supplied to the input of a dwell control device (17). In order to apply positive and negative perturbations to the spark advance angle, the output of a perturbation generator (40) is applied to the other input of summer (41). Values of the actual slope of engine speed with respect to spark advance are calculated in slope calculating device (46), the output of which is supplied to the negative input of a summer (49). Target slope values, calculated from values stored in a memory (45), are supplied to the positive input of summer (49). The values in memory (45) are equal to, or less than, zero. The output from summer (49) is supplied to an updating device (47) which updates the correction values stored in memory (38). Each perturbation cycle comprises three engine fires. A positive perturbation is applied to the spark advance angle for the first fire and negative perturbations are applied for the remaining two fires. By using this perturbation cycle, synchronization between the engine and perturbation cycles is avoided while maintaining the perturbation frequency above the resonance frequency of the vehicle driveline under normal driving conditions.

Description: This invention relates to an adaptive control system for an internal combustion engine and also to a method of controlling such an engine. In operating an internal combustion engine, it is necessary to establish values for various control parameters and, depending upon the particular control parameter, the value of the parameter may be varied continuously in accordance with one or more operating parameters of the engine. In a spark ignition engine, for each ignition spark or engine fire in one of the engine cylinders, it is necessary to control the spark advance angle so as to produce the peak combustion pressure soon after the piston has passed the top dead centre position. Because the flame speed varies with the density of the air/fuel mixture, it is generally necessary to increase the spark advance angle with decreasing cylinder filling pressure. The cylinder filling pressure may be obtained by measuring the pressure in the inlet manifold of the engine cylinders. The spark advance angle must also be increased with increasing engine speed so as to allow for extra rotation of the engine crankshaft while the air/fuel mixture burns. Until recently, the spark advance angle was established by a mechanical device responsive to manifold pressure and engine speed. Such a mechanical device establishes the spark advance angle as a simple function of engine speed and demanded load as represented by the manifold pressure. Careful testing of engines shows that the optimum spark advance angle is a complex function of load and speed and this function cannot be matched by a mechanical device. Modern ignition systems now use empirically derived characteristics for the spark advance angle which are stored as a look-up table in a read only memory. These spark advance characteristics are determined by testing a number of samples of an engine and establishing an optimum spark advance angle for each load/speed point. Although this provides a much closer match to the optimum spark advance angle than was achieved with the mechanical devices, it still does not give the engine user the best possible spark advance angle for his engine throughout its life. There are a number of reasons for this. It is not possible to test enough engines to provide good statistics and the engines available during tests are often different from production engines. Also, variations in the engine characteristics may occur due to manufacturing tolerances and from small changes in engine design. During the life of an engine, various ageing effects will occur in the engine and in the sensors, actuators and electronic circuitry and these will create a mismatch between the optimum characteristics and those stored in the read only memory. In US Patent 4 575 800, there is described an adaptive control system for controlling the spark advance in a spark ignition engine or the fuel injection timing in a compression ignition engine. In the case of the spark ignition engine, small positive and negative perturbations are superimposed on the spark advance angle in synchronization with the operating cycle of the engine. The resulting changes in engine speed are used to determine the differential or slope of engine output with respect to spark advance angle. Each slope value is examined and these values are used to provide corrections to the spark advance angle with the intention of obtaining optimun values for the spark advance angle. In the arrangement described in this patent, two perturbation patterns are described operating respectively at engine speeds from 0 to 2000 RPM and 2000 to 4000 RPM. In the first pattern, each half period of the perturbation cycle comprises one complete engine cycle and produces a range of perturbation frequencies from 0 to 8.3 Hz in the case of a four cylinder engine. In the second pattern, each half period of the perturbation cycle comprises two complete engine cycles and produces a range of perturbation frequencies from 4.2 to 8.3Hz. This arrangement suffers from the following disadvantages. During normal conditions in a vehicle having a typical manual transmission system, the perturbation frequency will often change from being well below the resonant frequency of the vehicle driveline in the prevailing gear to being well above the resonant frequency. Consequently, there are large variations in the phase differences between the perturbation and the resulting changes in engine speed. This makes it difficult to obtain accurate values for the slope. In unpublished European patent application 0234714, there is described an arrangement which overcomes this problem. In this arrangement, a perturbation wavefrm is generated at a frequency slightly above the highest resonant frequency of the vehicle driveline and the frequency is varied so that each cycle of the perturbation waveform comprises a whole number of engine fire periods. With this arrangement, at certain engine speeds there is a synchronisation of the waveform to the engine operating cycle which results in a particular. cylinder continuously experiencing more perturbations of one type compared with other cylinders. Consequently, if a particular cylinder produces a higher torque than another cylinder, this will cause a bias in the measured values of the slope. It is accordingly an object of this invention to provide a new or improved adaptive control system for an internal combustion engine and also a method controlling such an engine in which the above mentioned problems are overcome or reduced. According to a first aspect of this invention, there is provided an adaptive control system for an internal combustion engine, said control system comprising means for determining a basic value for an engine control parameter (hereinafter referred to as "said perturbed parameter"); a perturbation generator for perturbing said perturbed parameter about said basic value, said perturbation generator generating a perturbation waveform and applying both positive type and negative type of perturbations to said perturbed parameter during each cycle of the waveform; means for monitoring an engine output; means for calculating the slope of engine output with respect to said perturbed parameter; and means for using said slope to apply a correction to at least one engine control parameter (each of which is hereinafter referred to as a "corrected parameter"); in which, for an engine having n cylinders, each cycle of said perturbation waveform comprises m engine fires, m having a value which is less than 2 n , and said waveform is arranged so that each cylinder of the engine experiences equal numbers of both types of perturbations compared with other cylinders irrespective of engine speed. By arranging the perturbation waveform so that the number of engine fires in each cycle of the waveform is less than twice the number of cylinders, the perturbation frequency will be relatively high, in comparison with the arrangement described in US Patent 4 575 800, at low engine speeds. Consequently, large variations in the phase difference between the perturbation waveform and the resulting changes in engine speed will either be avoided or will be rare. By arranging the waveform so that each cyclinder experiences equal numbers of both types of perturbations, the danger of bias in the measured values is avoided. Preferably in each cycle of the perturbation waveform, there are a perturbations of one type, b perturbations of the other type, ( a + b ) is less than or equal to m , and a and b are each equal to a respective multiple of the highest common factor of n and m . By arranging the perturbation waveform in this way, the danger of synchronisation between the engine operating cycle and the perturbation waveform is avoided. At low engine speeds, it is impossible to maintain the frequency of the perturbation waveform above, or even close to, the resonant frequency of the vehicle driveline. In the preferred embodiment, when the engine speed is below a predetermined value, no perturbations are applied to the perturbed parameter. Conveniently, the system includes means for measuring the engine fire period corresponding to each perturbation, and said calculating means calculates each value of the slope from said fire periods. The calculating means may calculate each value of the slope from fire periods of a particular cylinder corresponding to both positive type and negative type perturbations. In a preferred embodiment, said calculating means calculates each slope value by calculating a first value relating to the change in engine speed between a fire period of a particular cylinder corresponding to one type of perturbation and the immediately preceding fire period, calculating a second value relating to the change in engine speed between a previous fire period of said particular cylinder corresponding to the other type of perturbation and the immediately preceding fire period, both said immediately preceding fire periods corresponding to said other type of perturbation, and then calculating the slope value as the difference between said first and second values. The perturbed parameter may be an ignition timing parameter. The ignition timing parameter may be spark advance angle in the case of a spark ignition engine or fuel injection timing in the case of a compression ignition engine. There may be a single corrected parameter which is the same parameter as the perturbed parameter. For an internal combustion engine having a flywheel connected through resilient shafting and a gear arrangement to a load with said flywheel, resilient shafting and gear arrangement forming a resonant system which has a particular resonant frequency for each gear ratio established by said gear arrangement. According to a second aspect of this invention, there is provided a method of controlling an internal combustion engine, said method comprising the steps of perturbing an engine control parameter (hereinafter referred to as a "said perturbed parameter") by generating a perturbation waveform, applying both positive type and negative type perturbations to said perturbed parameter during each cycle of said waveform, calculating the slope of engine output with respect to said perturbed parameter from the response of engine output to said perturbations, and using said slope to apply a correction to at least one engine control parameter (each of which is hereinafter referred to as a "corrected parameter"); in which, for an engine having n cylinders, each cycle of said perturbation waveform comprises m engine fires, m having a value which is less than 2 n , and said waveform is arranged so that each cylinder of the engine experiences equal numbers of both types of perturbations compared with other cylinders irrespective of engine speed. This invention will now be described in more detail, by way of example, with reference to the drawings in which:- Figure 1 is a diagram of the functional components of an adaptive control system embodying this invention; Figure 2 is a graph illustrating the phase lag between a perturbation waveform and the resulting change in engine speed as a function of perturbation frequency; Figure 3 is a graph of engine speed as a function of crankshaft angle; Figure 4 is a block diagram of a microcomputer arrangement which implements the functional components of Figure 1; Figure 5 is a layout diagram of the computer program forming part of the control system of Figure 4; Figure 6 is a diagram illustrating the calculation of weighting factors used in the program; Figure 7 is a flow chart of part of the program; Fig 8 is a timing diagram for the control system of Fig 1; Figs 9a and 9b are timing diagrams for two other embodiments of this invention; and Fig 10 is a diagram in simplifed form of the functional components of the adaptive control system of Figure 1. Referring now to Figure 1, there is shown in functional form an adaptive control system for a four cylinder spark ignition internal combustion engine 10 which is provided with a flywheel 11. The engine 10 is installed in a motor vehicle and is connected through a resilient shaft 12, a gear box 13, and a further resilient shaft 14 to drivewheels 15 which form a load. Although not shown, a clutch is also provided. The flywheel 11 is associated with a position transducer 16 which coacts with a toothed wheel from which teeth have been removed to provide reference positions. The pulses from transducer 16 are supplied to a dwell control device 17, the output of which is connected through a power stage 18 to a coil and distributor 19. The coil and distributor 19 is connected to four spark ignition plugs 20 and causes ignition sparks to occur in these plugs at appropriate moments. The output of transducer 16 is also supplied to a speed calculation device 30 which calculates engine speed and supplies this to the dwell control device 17. The engine is provided with a transducer 31 which measures the demanded load to which the engine is subjected. In the present example, the transducer 31 measures the pressure in the inlet manifold for the engine cylinders. The demanded load could also be detected by measuring other quantities such as the throttle valve opening position or the rate of air flow into the inlet manifold. The system also includes a memory 35 in which is stored a two dimensional array of spark advance angles, the abscissa and ordinate of the array corresponding to engine speed and demanded load. The memory 35, the speed calculation device 30 and transducer 31 are connected to a calculation device 36. For each prevailing engine speed and load, the calculation device 36 calculates a basic value for spark advance and supplies this to one input of a summer 37. The calculation device 36 calculates this basic value from the spark advance values stored in the array in memory 35 at the four points in the speed/load plane surrounding the prevailing engine speed and load. Each of these values is multiplied by an appropriate weighting factor and the four resulting values are added to provide the basic spark advance value. Thus, the calculation means 36 calculates the basic spark advance value by interpolation. The spark advance values are stored in memory 35 at a density which provides a good match for the irregularities of the true optimum spark advance characteristics of the engine 10. The spark advance values in memory 35 take the form of a fixed schedule which is established from rig-tests on sample engines. For the various reasons which have been outlined above, the optimum spark advance values will differ from those stored in memory 35. As will shortly be described in detail, the system imposes small positive and negative perturbations on the spark advance value and senses the change in engine output speed which these cause. From the change in engine speed, correction values are stored in a correction memory 38. These correction values are also stored as a two dimensional array in which the abscissa and ordinate represent engine speed and load and they are stored with the same density as the values stored in memory 35. For the prevailing engine speed, a correction value is calculated in a correction value calculation device 39 and supplied to a second input of summer 37. The calculation device 39 receives the outputs of speed calculation device 30 and load transducer 31 and calculates the correction value for the prevailing engine speed and load from the values stored in memory 38 by using the same interpolation method as that used by the calculation device 36. The perturbation values are determined in perturbation generator 40 and supplied to an input of a summer 41. The other input of summer 41 receives the output of summer 37, and the output of summer 41 is supplied to the dwell control device 17 as a command value for the spark advance angle. The dwell control device 17 uses the output of the speed calculation device 30 and position transducer 16 to ensure that ignition sparks occur at the commanded spark advance values. Because ignition sparks occur intermittently in a spark ignition engine, the torque output of engine 10 fluctuates during each engine cycle. In order to smooth these fluctuations, the flywheel 11 is provided and it converts the fluctuations in torque into small accelerations and decelerations. The resilient nature of shafts 12 and 14 prevent these small accelerations and decelerations from causing changes in the speed of drivewheels 15. The flywheel 11, shafts 12 and 14, and the gear box 13 form a resonant system. The resonant frequency varies with the gear ratio established in the gear box 13. In the present example, the system has a resonant frequency of 4Hz in second gear and 9Hz in fourth gear. Every single perturbation in the spark advance angle causes a change in output torque produced by engine 10. In view of the resonant nature of flywheel 11 and shafts 12 and 14, the resulting change in the speed of flywheel 11 has two components. The first of these components is a damped ringing response at the appropriate resonant frequency and, in the particular engine mentioned above, the ringing decays with a time constant of 0.3 seconds. The second component is the longer term response which is associated with the new steady state which arises when the change in resistance forces caused by the change in vehicle speed match the change in torque from the engine. With the particular engine discussed above, this second component has a time constant of 7 seconds in fourth gear. It is desirable to provide a system which will work in any gear and which will provide comparable results in the different gears without knowledge of which particular gear is engaged. In Figure 2, there is shown a graph of the phase shift between a perturbation waveform generated by perturbation generator 40 and the resulting change in engine speed as a function of perturbation frequency for fourth gear, second gear and neutral. As may be seen, the phase shift changes rapidly with frequency in the region below 9Hz and there are also large differences between the phase shift in the different gears. In contrast, in the region above 10Hz, the phase shift changes slowly with frequency and the differences in the phase shift in the different gears are small. With increasing frequency, for all gears the phase shift approaches the 90° phase shift obtained when neutral is engaged. In order to provide comparable results in the different gears, it is desirable to maintain the perturbation frequency produced by perturbation generator 40 at a value greater than the resonant frequency of the resonant system formed from flywheel 11, shafts 12 and 14 and gear box 13 in the prevailing gear. In the present case as will be explained, the perturbation frequency is kept above the resonant frequency under normal driving conditions. The perturbation generator 40 generates a two level waveform. During the first part of each perturbation cycle, the perturbation generator 40 applies a small positive perturbation, namely +3.75°, to the spark advance angle. During the second part of each cycle, the perturbation generator 40 applies a small negative perturbation, namely -3.75°, to the spark advance angle. Because perturbations can take effect only when ignition is effected, each part of the cycle must have a duration equal to a whole number of engine fire periods. In the present example, the first part of each cycle has a duration equal to one fire period and the second part has a duration equal to two fire periods. The reason for this is explained below. An example of the perturbation waveform is illustrated in Figure 8 and indicated by reference numeral 41. In Figure 8, the time of each spark is indicated by a star and the top dead centre positions of the pistons are indicated by "TDC". The number of the cylinder undergoing an expansion stroke is written below waveform 41. With the perturbation waveform of Figure 8, the perturbation frequency is directly proportional to engine speed. At an engine speed of 1000 RPM, the perturbation frequency is 11Hz. Referring to Figure 2, at 11Hz the phase shift in all gears is close to 90°. Thus, at engine speeds above 1000 RPM, the phase shift remains stable. Between an engine speed of 1000 RPM and an engine speed of 600 RPM, which corresponds to a perturbation frequency of 6.7 Hz, the phase shift moves significantly away from 90°in fourth gear. However, engine speeds below 1000 RPM d not represent normal driving conditions in fourth gear as they would cause the engine to stall. Below 600 RPM, the phase shift moves away from 90° in the remaining gears. At engine speeds below 600 RPM, perturbation generator 40 ceases to apply perturbations to the spark advance angle. Thus, in the present example the perturbation frequency stays above the resonant frequency in the prevailing gear under normal driving conditions. As will be explained, the output of transducer 16 is used to calculate engine speed by making measurements of the period which elapses during each 180° of crankshaft rotation. It is arranged that each measurement commences when the piston in the cylinder undergoing an expansion stroke is at 120° after the top dead centre position and ends when the next piston, in the firing order, is at 120° after the top dead centre position. Thus, each calculation of engine speed in speed calculation device 30 corresponds to the average speed during 180° of crankshaft rotation, this 180° of rotation ending when the piston performing an expansion stroke is at 120° after the top dead centre position. There are two important reasons for measuring the speed in this way. Firstly, referring to Figure 3, there is shown the variation in the speed of flywheel 11 as a function of crankshaft angle. As may be seen, during each engine cycle, severe fluctuations occur. There is therefore a danger that the severe fluctuations in engine speed could confuse measurements in engine speed caused by the perturbations to the spark advance angle. By calculating the engine speed from the duration of 180° rotation of the crankshaft, this danger is avoided. Secondly, this way of measuring speed allows for the phase shift between the perturbation waveform and the resulting change in engine speed. Each perturbation is applied at the instant of ignition. Each calculation of engine speed may be said to correspond to the position of the engine crankshaft when it is half way through the corresponding 180° of rotation, that is when the piston is at 30° after the top dead centre position. Thus, there is a lag between the instant of ignition and the position at which the speed is measured. Although it has been stated that the phase shift between the perturbation waveform and the resulting change in engine speed approaches 90°, it is not essential for the lag between the instant of ignition and the position at which the speed is measured to correspond to exactly 90° of the perturbation cycle. The applicants have found that satisfactory results are obtained when the speed is measured as described above. For convenience, these measured periods will be referred to as 'fire periods'. These fire periods are shown in Figure 8 and are denoted by T₁₁ ...T₂₃. The corresponding engine speeds are denoted by S₁₁...S₂₃. Referring again to Figure 1, the output of speed calculation means 30 is supplied to a speed change calculation device 44. The speed change calculation device 44 calculates and stores the speed change due to each perturbation. For example, for the first negative perturbation to the spark advance angle for cylinder number 2 shown in Figure 8, the speed change is calculated as S₁₂ - S₁₁. The values calculated in the speed change calculation device 44 are supplied to a slope calculation device 46. Each value of the slope is calculated by taking a first value which corresponds to the speed change resulting from applying a positive perturbation to the spark advance angle of a particular cylinder, taking a second value which corresponds to the speed change resulting from applying the previous negative perturbation to the spark advance angle of the same particular cylinder, and then calculating the slope by subtracting the second value from the first value. For example, referring to Figure 8, following the positive perturbation to cylinder number 3, the slope is calculated as follows: first value = (S₂₃ - S₂₂) second value = (S₁₃ - S₁₂) slope = (S₂₃-S₂₂) - (S₁₃-S₁₂) By calculating the slope in this way, the result is not affected by linear acceleration or deceleration of engine speed. This arises because there will be a component for the acceleration or deceleration present in each of the values (S₂₃-S₂₂) and (S₁₃-S₁₂) and these components will cancel in the formula for the slope. In the formula given above for the slope, the slope is calculated for each cylinder in turn. This provides the advantage that the spark advance angle may be corrected on a cylinder by cylinder basis. By way of modification, the slope may be calculated from the average engine speeds for each type of perturbation. For example, referring to Figure 8, a value for the slope may be calculated as follows: slope = S₁₄ - (S₁₂ + S₁₃)/2 This formula has the disadvantage that the resulting value of the slope is affected by linear acceleration and it does not permit the slope to be calculated for each cylinder in turn. The slope may also be calculated by: slope = S₁₄ - (S₁₃ + S₂₁)/2 With this formula, the resulting value of slope is not affected by linear acceleration. In an internal combustion engine, it may happen that a particular cylinder produces more torque that the other cylinders. If a perturbation waveform causes a positive (or negative) perturbation to be applied more often to the spark advance angle of this cylinder than other cylinders, there will be a bias in the calculated value of the slope. With the perturbation waveform shown in Figure 8, positive and negative perturbations are applied alternately to each cylinder. Thus, the danger of a bias in the calculated value of the slope is avoided. The waveform shown in Figure 8 does not represent the only waveform which avoids the danger of bias. An example of a three level waveform for a four cylinder engine is shown in Figure 9a and indicated by reference numeral 43. In this waveform, each cycle of the perturbation waveform comprises three engine fires. This waveform causes a positive perturbation to be applied to the spark advance angle for the first fire, no perturbation to be applied for the second fire, and a negative perturbation to be applied for the third fire. An example of a suitable perturbation waveform for a six cylinder engine is shown in Figure 9b and indicated by reference numeral 43. In the example, each cycle of the perturbation waveform corresponds to four engines fires and each part of each cycle has a duration of two engine fires. More generally, the danger of bias may be avoided, in the case of an engine which has n cylinders, by using a perturbation waveform in which each cycle comprises m engine fires, with a perturbations of one type, b perturbations of the other type, ( a + b ) being less than or equal to m , and a and b each being a multiple of the highest common factor of n and m . In order to obtain a relatively high frequency at low engine speeds, and thereby reduce or avoid the danger of the frequency of the perturbation waveform falling below the resonant frequency of the vehicle directions, it is desirable that m is as small as possible and preferable that m is less than 2 n . In the case of the arrangement described in European patent application 0234714 mentioned above, the danger of a bias in the calculated slope may be eliminated by introducing an additional fire period into the perturbation waveform at periodic intervals. The curve relating torque output to spark advance has a single maximum at which the slope of engine output with respect to spark advance is zero. In presently known adaptive control systems, the spark advance angle is corrected with the intention of achieving this maximum. However, the applicants have found that, if the spark advance angle is corrected so as to achieve a small negative value for the slope, the emissions of nitrogen oxides are significantly reduced at the cost of only a small loss of engine output. In order to obtain a reduction in emissions of nitrogen oxides, it is desirable that the spark advance angle is corrected so that the slope is negative during at least some driving conditions. In the present example the spark advance angle is corrected so that the slope has a value which is less than, or equal to, zero during all driving conditions. During idle conditions, the spark advance angle is corrected so that the slope has a negative value. In Figure 1, the slope calculated by the slope calculation device 46 is compared by summer 49 with a target slope value obtained from target slope calculation device 48 and the slope error is supplied to correction memory updating device 47. Target slope calculation device 48 calculates the target slope value from a target slope memory 45 using the same method of interpolation that is used to calculate the basic spark advance by basic spark advance calculation device 36. Target slope memory 45 contains a 2 dimensional array of different slope values as a function of load and speed. The slope value at any individual load and speed is determined by engine testing to give the optimum compromise between engine output and emissions of nitrogen oxides. All slope values stored in memory 45 are less than, or equal to, zero. Correction memory updating device 47 also receives the engine speed and load from the speed calculation device 30 and load transducer 31. For each slope measurement, the updating device 47 updates the values stored in the memory 38 for each of the four array points surrounding the prevailing engine speed and load. Specifically, for each array point, a new correction value is calculated and stored from the old correction value in accordance with the following formula:- new correction = old correction + k₁ x (weighting factor) x (slope - target slope). where k₁ is a constant and target slope is the required slope. This formula corrects the values in the memory 38 from the slope measurements by integration and smoothes out the noise component in the slope measurements. The constant k₁ should be chosen so as to be small enough to reduce these noise components to a low level but large enough to provide rapid convergence to the optimum spark advance angle. The weighting factor given in this formula is the same as the weighting factor used by the correction means 36 and 39. The method of calculating the weighting factor will be described in detail below. As the density of array points in the memory 35 is chosen to give a good match with the irregularities in the optimum spark advance characteristics, the information in the slope measurements will represent a mismatch which has occurred between the actual optimum characteristics and those stored in the memory 35. It is therefore reasonable to update memory 38 by a process which is symmetrical with the interpolation process used to derive the spark advance angle and the formula given above achieves this. Furthermore, in the formula given above, the values stored in memory 38 are corrected in proportion to the magnitude of each slope measurement and so maximum advantage is taken of the information present in each slope measurement. The combination of the rapid method of making slope measurements which is achieved by using the perturbation waveform of Figure 8 and the formula given above for updating memory 38 permit the spark advance angle to be corrected to its true optimum value for the complete range of engine speeds and loads in approximately six hours of driving a motor vehicle in mixed road conditions. It is preferred that memory 38 is of a non-volatile construction so that the corrections are retained between periods of engine operation. Thus, memory 38 contains a complete schedule of updated correction values addressed by engine speed and load. Two further refinements to the formula given above for updating memory 38 will now be described. In addition to the mismatch in the spark advance angle for the prevailing speed and load, each slope measurement may also contain information which refers to the whole speed/load plane. For example, there may be a mismatch for spark advance across the entire plane due, for example, to changes in barometric pressure or in the composition of fuel. In order to take advantage of this information, each slope measurement may be used to update all the correction values in memory 38 in accordance with the following formula:- new correction = old correction + k₂ x (slope - target slope). Alternatively, this formula may be used to update a single value which is added at summer 37 to the correction value calculated by calculation device 39. The constant k₂ is of course much smaller than the constant k₁ mentioned above. However, the constant k₂ must be chosen to be large enough to give convergence for changes in variables such as a barometric pressure in a few minutes across the entire load/speed plane. The second refinement enables the entire spark advance characteristics to be tilted and this may be required, for example, when the position transducer 16 is poorly calibrated or subject to drift. With this second refinement, four offset correction values are stored in an additional memory corresponding to the four corners of the speed/load plane. Each slope measurement is then used to update these four values by multiplying the slope by an appropriate weighting factor and an appropriate constant. In calculating each correction value, these four offset values are then multiplied by appropriate weighting factors and the resulting value is added to the value calculated from the four array points surrounding the prevailing engine speed and load. As mentioned above, by using the perturbation waveform of Figure 8 and the method of slope calculation performed by the slope calculation device 46, the slope is available for each cylinder. By way of modification, there may be provided an individual correction memory for each cylinder, each correction memory being updated using the formula given above and, if desired, with some or all of the two refinements. The various functional blocks shown in Figure 1 are implemented using a microcomputer arrangement and this arrangement is shown in Figure 4. As shown in Figure 4, the microcomputer arrangement comprises an Intel Corporation 8097 microcomputer 100 which is connected via a data and address bus 101 to a type 27C64 read only memory 102, a Hitachi type 6116 read/write memory 103, and a Greenwich Instruments Limited type NVR2 non-volatile read/write memory 104. The program and fixed schedules are stored in memory 102, temporary variables are stored in memory 103, and the corrections for the spark advance angle are stored in memory 104. The microcomputer arrangement implements the speed calculation device 30, the perturbation generator 40, the speed change calculation device 44, slope calculation device 46, updating device 47, the memories 35, 38 and 45 together with the calculation devices 36, 39 and 48, summers 37, 41 and 49 and part of dwell control device 17. The load transducer 31 is connected through a conventional signal conditioning circuit 105 to an ANALOG input of microcomputer 100. The position transducer 16 is of the variable reluctance type and coacts with a toothed wheel mounted on the engine crankshaft and from which teeth have been removed to establish reference positions. Transducer 16 is connected through a signal conditioning circuit 106 to a HIGH SPEED input of microcomputer 100. A HIGH SPEED output of microcomputer 100 is connected to the input of a dwell control circuit 107. The dwell control circuit 107 together with part of the program stored in memory 102 perform the function of the dwell control device 17 of Figure 1. The dwell control circuit 107 is a type L497 dwell control circuit supplied by S. G. S. Limited. The dwell control circuit 107 initiates the build up of current in the primary winding of the ignition coil at the correct moment to achieve the required level just before the current is interrupted. The dwell control circuit 107 also limits the coil current to the required level during the short period which elapses between achieving the required current and the current being interrupted. The output of dwell control circuit 107 is connected to the power stage 18 which, as mentioned with reference to Figure 1, is connected to the input of the coil and distributor 19. Referring now to Figure 5, there is shown the general arrangement of the modules which form the program and also the flow of data between these modules. The program comprises modules MISDET 112, IGNLU 113 ,SAFIRE 114, and DWELL 115. The module IGNLU calls a sub-module LOOK UP and the module SAFIRE calls sub-modules MAP STORE and LOOK UP CORRECTION. Although not shown, SAFIRE also calls a sub-module LOOK UP TARGET SLOPE. Figure 5 also shows a fixed spark-advance schedule 110 which contains the fixed spark advance values and which corresponds to memory 35 shown in Figure 1. Figure 5 further shows a spark-advance correction schedule 111 which contains the correction values for spark advance and corresponds to memory 38 shown in Figure 5. The module MISDET receives an interrupt signal TOOTH INTERRUPT and this module is executed each time a tooth is detected. A variable TOOTH is supplied to the module DWELL and represents the position of the crankshaft to within one tooth of the toothed wheel which coacts with transducer 16. This module MISDET compares the period between each tooth and thereby detects the missing teeth. When a missing tooth is detected, this module re-establishes the relationship between the variable TOOTH and the absolute position of the crankshaft. The module MISDET also calculates the fire period as the period which commences when the piston in the cylinder undergoing an expansion stroke is 120° after its top dead centre position and ends when the next piston, in the firing order, is 120° after its top dead centre position. This period is supplied as a variable FIRE PERIOD to the modules IGNLU. The module IGNLU receives a variable MAN PRESS representing manifold pressure which is indicative of the demanded load. The variable MAN PRESS is derived from the output signal of transducer 31 converted by an analog/digital converter which forms part of microcomputer 100. The module IGNLU calculates a variable ENG SPEED, representing engine speed, from FIRE PERIOD and supplies this to SAFIRE and DWELL. In each of the schedules 110 and 111, the spark advance values are stored as a 16 X 16 array. In each array, the abscissa and ordinate correspond respectively to engine speed and load and the abscissa and ordinate are divided respectively into 16 discrete engine speed and load values. Thus, each array point contains the spark advance value for one of the discrete engine speed values and one of the discrete load values. In order to address the schedules 110 and 111, the module IGNLU generates address variables SPEED INDEX and LOAD INDEX corresponding respectively to engine speed and load. Each of these address variables can assume any one of values 0 to 15 corresponding to the lower 16 discrete engine speed and load values. These variables are set to the value corresponding to the engine speed and load immediately below the prevailing speed and load. The address variables SPEED INDEX and LOAD INDEX are supplied to the sub-modules LOOK UP, MAP STORE, and LOOK UP CORRECTION. The module IGNLU also calculates four variables MAP INT 0 to 3 which represent the four weighting factors described above. The four weighting factors MAP INT 0 to 3 correspond respectively to the four addresses (SPEED INDEX, LOAD INDEX), (SPEED INDEX + 1, LOAD INDEX), (SPEED INDEX, LOAD INDEX + 1) (SPEED INDEX +1, LOAD INDEX +1). The method of calculating the weighting factors MAP INT 0 to 3 for the prevailing speed and load is shown in Figure 6. A main rectangle is formed in the speed/load plane, the corners of the rectangle lying at addresses (SPEED INDEX, LOAD INDEX), (SPEED INDEX INDEX + 1, LOAD INDEX), (SPEED INDEX, LOAD INDEX +1), (SPEED INDEX + 1, LOAD INDEX + 1). This main rectangle is divided into four sub-rectangles by drawing the abscissa and ordinate passing through the prevailing speed and load these sub-rectangles having areas A0, A1, A2, A3. The weighting factor for each of the four array points is calculated by dividing the area of the sub-rectangle diagonally opposite the array point by the area of the main rectangle. Thus, the weighting factors MAP INT 0 to 3 have the following values:- MAP INT 0 = A0/A MAP INT 1 = A1/A MAP INT 2 = A3/A MAP INT 3 = A4/A where A = A0 + A1 + A2 + A3. The module IGNLU calls the sub module LOOK UP which calculates the basic spark advance angle as a variable SPK ANG BASE by the interpolation process which has been described above. SPK ANG BASE defines the spark advance angle with reference to rotation of the crankshaft beyond a datum position. Thus, with increasing spark advance angle, the value of SPK ANG BASE decreases. The module IGNLU then supplies the variable SPK ANG BASE to the module SAFIRE. The module IGNLU is executed each time a missing tooth is detected and the module SAFIRE is executed after module IGNLU. The module SAFIRE generates the perturbation waveform, determines each perturbation to the spark advance angle, calculates the change in engine speed resulting from each perturbation, and calculates the slope of engine output with respect to the spark advance angle as a variable SLOPE. This module uses the slope measurement compared with the target slope to produce a variable SLOPE ERROR and uses SLOPE ERROR to update the spark advance correction schedule. This module retrieves a correction value to the spark advance from this schedule. This module also sums the basic spark advance value SPK ANG BASE with the perturbation value and the calculated correction value to produce a command value SPK ANG for the spark advance angle and supplies this to the module DWELL. The module SAFIRE will now be described with reference to the flow chart shown in Figure 7. After entering the module SAFIRE, in a step 200, the variable ENG SPEED is examined. If the engine speed is less than 600 RPM, in a step 201, SPK ANG is set to SPK AND BASE and no perturbation is made. If the engine speed is greater than 600 RPM, the program continues with a step 202. In step 202, a variable ACCELERATION is calculated as (ENG SPEED - OLD SPEED). OLD SPEED is a variable representing the value of ENG SPEED available to the module SAFIRE during its previous execution. In Figure 8, successive executions of the module SAFIRE are indicated by reference numerals 221 to 228. Thus, for example, during the execution of SAFIRE indicated by 225, the variable ACCELERATION is given a value of S₁₃ - S₁₂. This corresponds to the change in engine speed caused by the perturbation established during the execution of SAFIRE indicated by 223. In general, the variable ACCELERATION corresponds to the change in engine speed caused by the perturbation established in the last but one execution of SAFIRE. After step 202, the variable OLD SPEED is set to ENG SPEED in a step 203. The program then continues with a step 204. In step 204, variables STATE and CYLINDER are calculated. As previously mentioned, each cycle of the perturbation waveform comprises three engine fires and the variable STATE has values of 0,1,2 corresponding to the first, second and third fires of each cycle. When STATE has values of 0 and 1, the module SAFIRE establishes negative perturbations to the spark advance angle and, when STATE has a value of 2, it establishes a positive perturbation. The values of STATE are shown in Figure 8. CYLINDER is the number of the cylinder corresponding to the present value of ENG SPEED. Thus, during the execution of SAFIRE indicated by 225, ENG SPEED has a value S₁₃ and CYLINDER has a value of 3. After step 204, in a step 205 the value of STATE is examined and the program branches to one of steps 206,207,208 corresponding respectively to values of STATE of 0,1 and 2. In steps 206 and 207, a variable DITHER, which establishes the perturbation, is set to +3.75° and, in step 208, DITHER is set to -3.75°. A value of DITHER of -3.75° corresponds to an advanced or positive perturbation. After steps 206 and 208, the program jumps to a step 211 and, after step 207, the program continues with a step 209. In step 209, the variable SLOPE is calculated as ACCELERATION - ACCEL(CYLINDER). ACCEL(CYLINDER) corresponds to the value of ACCELERATION during the previous execution of the module SAFIRE in which CYLINDER was given its present value. Thus, SLOPE represents the slope of engine output with respect to the spark advance angle for the cylinder having the present value of CYLINDER. After step 209, the program continues with step 215. In step 215 the sub-module LOOK UP TARGET SLOPE is called. This sub-module uses the values of SPEED INDEX, LOAD INDEX and MAP INT 0 to 3, which it receives from IGNLU, to calculate a variable TARGET SLOPE from target slope values stored in a memory. In step 216, a variable SLOPE ERROR is calculated as TARGET SLOPE - SLOPE. In step 210, the module MAP STORE is called. This module uses the recently calculated value of SLOPE ERROR together with the values of MAP INT 0 to 3, SPEED INDEX and LOAD INDEX, which it receives from the module IGNLU, to update the spark advance correction schedule 111. This is performed in the manner described with reference to Figure 1. After step 210, the program continues with step 211. In step 211, the sub module LOOK UP CORRECTION is called. This sub module calculates a variable CORRECTION which represents the appropriate correction to the spark advance correction schedule. This variable is calculated by the interpolation method described with reference to Figure 6. Next, in a step 212, a variable SPK ANG OPT is calculated as the sum of SPK ANG BASE and CORRECTION. SPK ANG OPT represents the optimum spark advance angle for the prevailing engine speed and load. In a step 213, the variable SPK ANG, which represents the commanded value of the spark advance angle, is calculated as the sum of SPK ANG OPT and the variable DITHER. Thus, either a positive or negative perturbation corresponding to 3.75° of crankshaft rotation is imposed on the optimum spark advance angle. Lastly, in a step 214, the variable ACCEL (CYLINDER) is set to the present value of ACCELERATION. Returning to Figure 5, the routine DWELL uses variables TOOTH, ENG SPEED and SPK ANG to calculate a variable COIL DRIVE which controls the generation of each spark. Specifically, COIL DRIVE causes the HIGH SPEED output of microcomputer 100 to go low when the engine crankshaft passes the commanded spark advance position and to go high early enough to allow the primary current in the ignition coil to reach the required value. The response in engine speed to the perturbations of the spark advance angle falls with increasing engine speed above the resonant speed. To compensate for this, by way of modification, SLOPE can be multiplied by a variable proportional to engine speed and, hence, proportional to perturbation frequency. The overall signal to noise ratio does not change with engine speed as the majority of the noise is generated in the combustion process and consequently is also affected by the driveline response. Although the above example describes applying perturbations to the spark advance angle in a spark ignition engine in order to obtain corrections to this parameter, the present invention is not limited to this application. For example, it could also be used to apply perturbations to the timing of fuel injection in a compression ignition engine so as to provide corrections to this parameter. Also, in both spark ignition and compression ignition engines, the air/fuel ratio is established in accordance with a predetermined schedule. The present invention could be used to apply perturbations to this ratio so as to obtain corrections to this parameter. In some compression ignition and in some spark ignition engines, exhaust gases are mixed with engine intake air in a predetermined ratio. The present invention could be used to apply perturbations to this ratio so as to obtain a correction for this parameter. In the example described above, the spark advance angle is perturbed and this same parameter is corrected in accordance with the slope measurements. However, the example could be modified so as to perturb one parameter and correct another parameter. For example, the spark advance could be perturbed and the slope measurements used to correct values in a schedule for the air/fuel ratio. The use of slope measurements to do this is described in European patent application 0 210 766. In the system discussed with reference to Figures 4 to 7, there are provided a fixed spark advance schedule 110 and a spark advance correction schedule 111. By way of modification there may be provided a single spark advance schedule which is initially provided with the fixed values. The values would then be updated in accordance with the slope measurements. In another modification, a single memory location is provided for the entire speed/load plane in place of the schedule 111. In order to assist in understanding the present invention, the adaptive control system of Figure 1 will now be described once again, but in a simplified manner, with reference to Figure 10. Figure 10 is a diagram of the functional components of the control system and corresponds generally to Figure 1. However, in the interests of simplicity, there have been omitted the flywheel 11, gear box 13, shafts 12, 14, drive wheels 15, dwell control device 17, power stage 18, spark plugs 20, calculation devices 36, 39, 44, 48 and the correction memory updating device 47. Referring now to Figure 10, there is shown a control system for the four cylinder engine 10. The position transducer 16 detects the position of the engine crankshaft and the speed calculation device 30 is responsive to the output of transducer 16 and calculates the engine speed. Position transducer 16 and speed calculation device 30 together form an engine output detector. The control system includes the memory 35 which contains basic values of the spark advance angle and the memory 47 which contains correction values for the spark advance angle. Spark advance angle is an engine control parameter. The outputs from memories 35 and 47 are supplied to the two inputs of a summer 37. The output of summer 37 is supplied to the input of a summer 41 and the output of summer 41 is supplied to the input of the coil and distributor 17 to control ignition timing. The coil and distributor 17 is an engine input device. The system includes the perturbation generator 40 which receives the output from position transducer 16. The perturbation generator 40 generates a perturbation waveform and, in order to apply perturbations to the spark advance angle, the output of perturbation generator 40 is supplied to the other input of summer 41. The perturbation waveform is divided into two parts. During the first part, which comprises a single engine fire, a positive perturbation is applied to the spark advance angle. During the second part, which comprises two engine fires, a negative perturbation is applied to the spark advance angle. The outputs from the perturbation generator 40 and the speed calculation device 30 are supplied to the slope calculation device 46, which calculates the slope of engine output with respect to engine speed. The output of slope calculation device 46 is supplied to the negative input of the summer 49. The output from memory 48, which contains target slope values, is supplied to the positive input of summer 49. The output of summer 49 represents the error between the actual slope and the target slope. This output is supplied to memory 47 in order to update the correction values. A specific form for the perturbation waveform has just been described. More generally, for an engine having n cylinders, each cycle of the waveform comprises m engine fires, where m has a value less than 2 n , and the waveform is arranged so that each cylinder of the engine experiences equal numbers of both types of perturbations. Preferably, there are a perturbations of one type, b perturbations of the other type, ( a + b ) being less than or equal to m , and a and b each being a respective multiple of the highest common factor of n and m .

Claims: An adaptive control system for an internal combustion engine (10), said control system comprising means (35, 36) for determining a basic value for an engine control parameter (hereinafter referred to as "said perturbed parameter"); a perturbation generator (40) for perturbing said perturbed parameter about said basic value, said perturbation generator (40) generating a perturbation waveform and applying both positive type and negative type perturbations to said perturbed parameter during each cycle of the waveform; means (16, 30) for monitoring an engine output; means (46) for calculating the slope of engine output with respect to said perturbed parameter; and means (38, 39) for using said slope to apply a correction to at least one engine control parameter (each of which is hereinafter referred to as a "corrected parameter"); characterised in that, for an engine having n cylinders, each cycle of said perturbation waveform comprises m engine fires, m having a value which is less than 2 n , and said waveform is arranged so that each cylinder of the engine experiences equal numbers of both types of perturbations compared with other cylinders irrespective of engine speed. An adaptive control system as claimed in Claim 1, characterised in that, in each cycle of the perturbation waveform, there are a perturbations of one type, b perturbations of the other type, ( a + b ) is less than or equal to m , and a and b are each equal to a respective multiple of the highest common factor of n and m . An adaptive control system for a four cylinder internal combustion engine as claimed in Claim 2, characterised in that m has a value of three, a has a value of one and b has a value of two. An adaptive control system for a six cylinder internal combustion engine as claimed in Claim 2, characterised in that m has a value of four, a has a value of two and b has a value of two. An adaptive control system as claimed in any one of the preceding claims, characterized in that, when the engine speed is below a predetermined value, no perturbations are applied to said perturbed parameter. An adaptive control system as claimed in any one of the preceding claims, characterised in that the system includes means for measuring the engine fire period corresponding to each perturbation, and said calculating means (46) calculates each value of the slope from said fire periods. An adaptive control system as claimed in Claim 6, characterised in that said calculating means (46) calculates each value of the slope from fire periods of a particular cylinder corresponding to both positive type and negative type perturbations. An adaptive control system as claimed in Claim 7, characterised in that said calculating means (46) calculates each slope value by calculating a first value relating to the change in engine speed between a fire period of a particular cylinder corresponding to one type of perturbation and the immediately preceding fire period, calculating a second value relating to the change in engine speed between a previous fire period of said particular cylinder corresponding to the other type of perturbation and the immediately preceding fire period, both said immediately preceding fire periods corresponding to said other type of perturbation, and then calculating the slope value as ther difference between said first and second values. An adaptive control system as claimed in any one of the preceding claims, characterised in that the perturbed parameter is an ignition timing parameter. An adaptive control system for a spark ignition engine as claimed in Claim 9, characterised in that the ignition timing parameter is spark advance angle. An adaptive control system for a compression ignition engine as claimed in Claim 9, characterised in that the ignition timing is fuel injection timing. An adaptive control system as claimed in any one of the preceding claims, characterised in that there is a single corrected parameter which is the same as said perturbed parameter. An adaptive control system as claimed in any one of the preceding claims, characterised in that the internal combustion engine (10) has a flywheel (11) connected through resilient shafting (12, 13) and a gear arrangement (13) to a load, said flywheel (11), resilient shafting (12, 14) and gear arrangement (13) forming a resonant system which has a particular resonant frequency for each gear ratio established by said gear arrangement (13), characterised in that the frequency of said waveform is greater than the resonant frequency of said resonant system in the prevailing gear under normal driving conditions. A method of controlling an internal combustion engine, said method comprising the steps of perturbing an engine control parameter (hereinafter referred to as a "said perturbed parameter") by generating a perturbation waveform, applying both positive type and negative type perturbations to said perturbed parameter during each cycle of said waveform, calculating the slope of engine output with respect to said perturbed parameter from the response of engine output to said perturbations, and using said slope to apply a correction to at least one engine control parameter (each of which is hereinafter referred to as a "corrected parameter"); characterised in that for an engine having n cylinders, each cycle of said perturbation waveform comprises m engine fires, m having a value which is less than 2 n , and said waveform is arranged so that each cylinder of the engine experiences equal numbers of both types of perturbations compared with other cylinders irrespective of engine speed. A method of controlling an internal combustion engine as claimed in claim 14, characterised in that in each cycle of the perturbation waveform, there are a perturbations of one type, b perturbations of the other type, ( a + b ) is less than or equal to m , and a and b are each equal to a respective multiple of the highest common factor of n and m . A method of controlling a four cylinder internal combustion engine as claimed in claim 15, characterised in that m has a value of three, a has a value of one, and b has a value of two. A method of controlling a six cylinder internal combustion engine as claimed in claim 15, characterised in that m has a value of four, a has a value of two, and b has a value of two. A method of controlling an internal combustion engine as claimed in any one of claims 14 to 17, characterised in that, when the engine speed is below a predetermined value, no perturbations are applied to said perturbed parameter. A method of controlling an internal combustion engine as claimed in any one of claims 14 to 18, characterised in that the method includes the further step of measuring the engine fire period corresponding to each perturbation, and, in said step of calculating the slope, each value of the slope is calculated from said fire periods. A method of controlling an internal combustion engine as claimed in claim 19, characterised in that, in said step of calculating the slope, each value of the slope is calculated from fire periods of a particular cylinder corresponding to both positive type and negative type perturbations. A method of controlling an internal combustion engine as claimed in claim 20, characterised in that in said step of calculating the slope, each value of the slope is calculated by calculating a first value relating to the change in engine speed between a fire period of a particular cylinder corresponding to one type of perturbation and the immediately preceding fire period, calculating a second value relating to the change in engine speed between a previous fire period of said particular cylinder corresponding to the other type of perturbation and the immediately preceding fire period, both said immediately preceding fire periods corresponding to said other type of perturbation, and then calculating the slope value as the difference between said first and second values. A method of controlling an internal combustion engine as claimed in any one of claims 14 to 21, characterised in that the perturbed parameter is an ignition timing parameter. A method of controlling a spark ignition engine as claimed in claim 22, characterised in that the ignition timing parameter is spark advance angle. A method of controlling a compression ignition engine as claimed in claim 22, characterised in that the ignition timing parameter is fuel injection timing. A method of controlling an internal combustion engine as claimed in any one of claims 14 to 24, characterised in that there is a single corrected parameter which is the same as the perturbed parameter. A method of controlling an internal combustion engine, as claimed in any one of claims 14 to 25, in which said engine has a flywheel connected through resilient shafting and a gear arrangement to a load, said flywheel, resilient shafting and gear arrangement forming a resonant system which has a particular resonant frequency for each gear ratio established by said gear arrangement, characterised in that the frequency of said waveform is greater than the resonant frequency of said resonant system in the prevailing gear under normal driving conditions.

Inventors: HOLMES MICHAEL, HOLMES, MICHAEL
Applicants: LUCAS IND PLC, LUCAS INDUSTRIES PUBLIC LIMITED COMPANY
Application year: 1988
Main classification: F02P5
IPC codes: F02D41, F02D45, F02P5, F02B1, F02D43