ADAPTIVE CONTROL SYSTEM FOR AND METHOD OF CONTROLLING AN INTERNAL COMBUSTION ENGINE

Abstract: Look-up tables 14, 15 of a first control input, such as ignition timing, and a second controlinput, such as fuel demand, are addressed by engine speeds 10a, 13 and load demand 10b to provide base values. A perturbation generator 18 periodially advances and retards ignition timing and the slope of engine speed with respect to ignition timing is compared 20 with a desired slope from a look-up table 16. The slope error is supplied to means 21, 22, 24 for correcting the base values of ignition timing and fuel demand in accordance with a control strategy so that the engine speed slope is corrected to the desired value. In accordance with a first control strategy, one of the control inputs is varied (OC, OD) up to a maximum variation and then the other control input is varied (CE or DF) to correct the engine speed slope. In accordance with a second control strategy, both control inputs are varied simultaneously (OG or OH) with a predetermined relationship between the individual control input variations.

Description: This invention relates to an adaptive control system for an internal combustion engine and further relates to a method of operating such an engine. In view of the increasing stringency of emission control regulations in various countries in recent years, many attempts have been made to improve fuel supply systems of engines to reduce noxious exhaust emissions whilst maintaining good engine driveability. In one approach to reduce noxious emissions, fuel and air are supplied to the cylinders in stoichiometric proportions and the pollutants are removed by using a catalyst. With this approach, it is desirable to control the composition of the fuel mixture to the stoichiometric proportions for all engine operating conditions. If the mixture composition departs from these proportions, this may result in a deterioration of fuel economy or an increase in the pollutants which have to be removed by the catalyst. In another approach to reducing noxious emissions, known as the "lean burn approach", a mixture containing excess air is supplied to the cylinders. Production of pollutants in the form of carbon monoxide and oxides of nitrogen is much less than with the stoichiometric approach. Also, an arrangement using this approach is less prone to deterioration with time than an arrangement using the stoichiometric approach and this approach results in an improvement in fuel consumption in comparison with the stoichiometric approach. With the lean burn approach, as will now be explained, the mixture composition must be controlled carefully. The formation of oxides of nitrogen is associated with high temperatures within the combustion chamber. The highest temperatures occur with mixtures whose composition is close to stoichiometric. Under these conditions, there is little free oxygen to participate in the formation of oxides of nitrogen. Therefore, the rate of formation of oxides of nitrogen is greatest with mixtures containing some excess air. Formation of oxides of nitrogen is reduced if the peak temperature during combustion is reduced by diluting the mixture either with excess air or with exhaust gas. Thus, either the air/fuel ratio or the amount of exhaust gas recirculated must be maintained above a predertermined minimum boundary to keep the generation of oxides of nitrogen within an acceptable level. In a combustion chamber in a spark ignition engine, immediately after a spark has occurred, no measurable combustion pressure rise occurs whilst a flame kernel grows from the spark to a size at which the heat release produces rapid flame propagation. This initial period of kernel growth is often termed "the delay period". The period of rapid flame propagation shall hereinafter be referred to as "the combustion period". During the combustion period, flame propagation occurs at a finite speed. It has been found that maximum efficiency occurs when the peak pressures are generated approximately 5° to 15° after a piston has passed the top dead centre position. In order to achieve this, it is arranged that ignition occurs before the top dead centre position. As the mixture composition is made progressively leaner, the delay period increases and flame speed falls, thereby extending the combustion period. In a spark ignition engine, the term "spark advance angle" is used to described the angle, before the top dead centre position, at which a spark occurs. To keep the peak pressure position near the optimum value, the spark advance must be advanced further as the mixture is made leaner. With very lean mixtures or with very high levels of exhaust gas recirculation, the delay and combustion periods are very long and the spark advance is very large. Consequently, the temperatures and pressures of the mixture at the moment of ignition are low and the rate of development of the flame kernel is also low. Small variations in the mixture composition and turbulence level can lead to large variations in the delay period which in turn leads to large variations in the total time to burn the mixture, as the combustion period can often be forced significantly into the expansion stroke of the piston. These large variations in total burning time lead to similar variations in cylinder pressure from cycle to cycle and so to unstable engine operation known as engine roughness. Additionally, a completely non-burning or partial burning cycle may occur where either the flame kernel does not develop, or the propagating flame is extinguished due to expansion of the cylinder volume. This leads to significant levels of emission of unburned hydrocarbons from the fuel. Consequently, it is necessary to keep the air/fuel ratio or, where the exhaust gas is recirculated, the recirculation ratio of exhaust gas below a predetermined boundary beyond which roughness or emissions of unburned hydrocarbons become unacceptable. Modern systems for controlling spark advance and mixture composition in an internal combustion engine make use of look-up tables stored in read only memories. These look-up tables, which are also known as demand tables contain spark advance values and mixture composition values as a function of two different engine operating parameters such as engine speed and manifold pressure. These look-up tables represent a considerable improvement on the mechanical devices which were used previously although it will be appreciated that the mechanical devices which they replace behaved as memories, mechanical memories storing the designers relationship of output with respect to input parameters, e.g. a carburettor is effectively a memory. However, they do not provide a completely adequate answer to emission and efficiency problems as there are many variables which they cannot take into account. These variables include changes in the accuracy of the operation of the equipment which controls the fuel mixture. Various closed-loop systems have been proposed to compensate for these variables. In an article entitled "Electronic Spark Timing Control for Motor Vehicles" by Paul H. Schweizer and Thomas W. Collins, published by The Society of Automotive Engineers as paper 780655, and also in US Patent 4026251, there is described a system for optimising spark advance. In this system, small perturbations are superimposed on the spark advance and the resulting changes in engine speed are used to determine the differential or slope of engine speed with respect to spark advance angle. The spark advance is then adjusted until the slope is zero. Although this system results in optimum spark advance and, consequently, optimum engine output torque, for the prevailing fuel mixture, it does not compensate for errors in mixture composition. Another closed loop system uses an exhaust gas oxygen sensor. Unfortunately, such sensors have not proved to be accurate in use. Also, where exhaust gas is recirculated, an oxygen sensor cannot compensate for errors in the accuracy of the equipment responsible for the recirculation. EP 0 151 768 discloses an arrangement in which ignition timing is used to compensate for engine speed variations due to fuelling changes under part throttle. The change in ignition advance required to keep the engine speed constant is then used to correct the fuelling while the ignition timing is returned to a normal mapped value. The purpose of this arrangement is so that a driver does not notice any unusual speed changes when the fuelling is altered under partial load conditions. EP 0 151 768 discloses the features of the preamble of the appended independent claims. Accordingly, it is an object of this invention to provide a new or improved adaptive control system for an internal combustion engine and also a method of controlling such an engine which compensates for errors in the equipment controlling mixture composition. According to a first aspect of the invention, there is provided a system as defined in the appended Claim 1. According to a second aspect of the invention, there is provided a system as defined in the appended Claim 2. Preferably, the system includes an ignition timing control device responsive to said first engine control input, a fuel mixture control device responsive to said second engine control input, and said perturbed engine control input is said first engine control input. The Applicants have found that ignition timing and mixture composition are related in the following way. For a particular engine, and for specified engine operating conditions, such as a specified value of engine speed and a specified value of manifold pressure, mixture composition is defined by a particular value of ignition timing and a particular value of the slope of engine output with respect to ignition timing. Between production engines, there are small but significant differences between the ignition timing and slope combinations which define a particular mixture composition. Mixture composition itself is liable to relatively large variations. Thus, if ignition timing itself is varied to achieve a desired value of the slope, as outlined above, there is a risk that a large error in mixture composition will remain uncorrected. On the other hand, if the mixture composition alone is changed to achieve a desired value of the slope, this itself could cause an error in the mixture composition owing to the differences between the ignition timing and slope values between different production engines. By correcting both ignition timing and mixture composition in accordance with an appropriate control strategy, it is possible to maintain the errors in the mixture composition within acceptable limits. In one arrangement of the invention where the engine is a multi-cylinder engine, the system includes means for establishing a plurality of combinations of cylinders of said engine and for selecting each combination in turn, each combination including at least one cylinder, said means for applying corrections on an individual basis to said first and second base values for each cylinder combination, said means for periodically perturbing said perturbed engine control input is arranged to perturb said perturbed engine control input for the selected cylinder combination, said means for determining the actual slope is arranged to determine the actual slope for the selected cylinder combination, and said control strategy is arranged to obtain the desired slope for each cylinder combination. The fuel mixture control device may control the air/fuel ratio or may be a device for controlling exhaust gas recirculation. Said system may include means for detecting engine roughness, and means for overriding one of said corrected values in the event of engine roughness exceeding a predetermined level. According to a third aspect of the invention, there is provided a method as defined in the appended Claim 11. According to a fourth aspect of the invention, there is provided a method as defined in the appended Claim 12. This invention will now be described in more detail by way of example, with reference to the drawings in which: Figure 1A is a diagram of the functional components of an adaptive control system according to a first embodiment of this invention; Figure 1B is a diagram of the functional components of an adaptive control system according to a second embodiment of this invention; Figure 2 is a graph in which the spark advance angle required to give particular levels of torque is plotted against air/fuel ratio; Figure 3A is a graph showing the variation in optimum spark advance angle between production engines; Figure 3B shows how spark advance and air/fuel ratio affect emissions of nitrogen oxides; Figure 3C illustrates two control strategies used in the control system of Figure 1A; Figure 4 illustrates the delay and combustion periods in the chamber of a spark ignition engine; Figure 5 is a block diagram of a microcomputer system for implementing the functional components of Figure 1A; Figure 6 is layout diagram of the computer program for the microcomputer system of Figure 5; Figures 7 and 8 are flow charts of the program; and Figures 9 to 15 are diagrams of the functional components of seven further adaptive control systems embodying this invention. Figure 1A illustrates an example of the invention in its simplest form. An internal combustion engine 10 is provided with an output sensor 10 a , an input A, and an input B. Memory means 14 and 15 are provided for establishing base control values for the inputs A and B, both of which affect the engine output as measured by the sensor 10 a . One of the inputs (input B in the example illustrated) has a perturbation added to the base value from a perturbation generator 18 via a summer 17. The slope of the engine output is measured in a slope detector 19 and the actual slope is compared with the desired slope value in a slope memory 16 in a summer 20. The slope error from the summer 20 is supplied to feedback controller 21 which provides corrective changes to both inputs A and B by means of the summers 22 and 24 in accordance with a predetermined strategy. Figure 2 shows how the performance of a spark ignition engine can be characterised to provide information to enable feed-back control of ignition timing in the form of spark advance angle or mixture composition in the form of air/fuel ratio. Figure 2 shows graphs in which the spark advance angles required to give particular levels of torque are plotted against air/fuel ratio. These curves are obtained by running an engine on a test bench at a specific speed and air supply rate and measuring the torque obtained for different levels of spark advance angle and air/fuel ratio. The engine is run with the air flow and spark advance angle set to specific values. The fuel setting of the engine and the braking load on the engine are adjusted until a specific fuel flow and engine speed are obtained. The torque is then noted. Points at which one particular level of torque is obtained are joined to provide the isotorque curve d. Similarly, isotorque curves c, b and a can be drawn for further successively higher levels of torque. At any point in Figure 2, there is a slope vector which points in the direction which produces a maximum increase in torque. Everywhere along an isotorque curve, the slope vector is at right angles to the curve since travel along the isotorque curve produces no change in torque. Hence, the points at which the isotorque curves are parallel to the spark advance axis are points at which there is no component of the slope vector in the spark advance direction. The partial differential of torque with respect to spark advance angle is therefore zero at these points and these points have been joined by line e on Figure 2. The same procedure is repeated for each combination of values of air flow rate and speed. It has been found by the Applicants that the family of lines e thus derived is characteristic of the engine being tested. Thus, for a specific engine speed and a specific air flow rate, line e represents a function relating spark advance angle to air/fuel ratio. Thus, using line e, each value of air/fuel ratio is defined by a specific spark advance angle. At each point not on line e, the partial differential or slope of engine torque with respect to spark advance angle will have a non-zero value. Using the points away from line e a specific air/fuel ratio can be defined by a specific spark advance value together with the associated value of the slope of engine torque with respect to ignition timing. At lean air/fuel ratios, combustion in a spark ignition engine becomes excessively slow with large variations in burning time between firing cycles. This is known as engine roughness. Regions of engine roughness are shown in Figure 2 by the hatched lines marked by arrow R. Although not shown, there are also regions of air/fuel ratio and spark advance angle at which knock can occur and which should be avoided. In regions where knock can occur, the slope is usually negative. At points anywhere in Figure 2 above and to the left of line e, the slope of engine torque with respect to spark advance angle is negative. Below and to the right of line e, the slope is positive. The area below and to the right of curve e in figure 2 represents fuel mixtures where the combustion period occurs too late in the cycle to make the maximum possible contribution to the work output of the engine. The area above and to the left of curve e in Figure 2 represents fuel mixtures where the combustion period occurs too early in the cycle to make the maximum contribution. As noted above, this area also includes regions where knock might be expected. Whilst the engine is being tested to produce the curves shown in Figure 2, the emission of pollutants, especially nitrogen oxides, are also measured. Using the results of these tests, for each engine speed and air flow rate, an optimum combination of spark advance angle and air/fuel ratio may be selected. The air/fuel ratio is selected so that the mixture is lean enough to prevent generation of excessive amounts of nitrogen oxides but sufficiently rich to avoid the region of engine roughness. Normally, the spark advance angle is a point on curve e as such angles correspond to maximum torque output. However, under certain conditions, a point away from curve e will be chosen. For example, during idling, it may be desired to retard the spark advance angle so as to reduce the emission of unburned hydrocarbons. At each of these selected combinations of spark advance angle and air/fuel ratio, the slope of engine output with respect to spark advance angle is noted. Similar curves to those shown in Figure 2 can also be obtained relating exhaust gas recirculation to spark advance angle at constant fuel/air ratio. At high levels of exhaust gas recirculation, engine roughness can also occur due to excessively slow combustion and such roughness could be monitored and shown on the curves. Such curves could be used to show optimum combinations of exhaust gas recirculation and spark advance angle. Although Figure 2 will now be discussed in relation to controlling spark advance angle and air/fuel ratio, it is to be appreciated that a similar discussion could be made in relation to controlling spark advance angle and exhaust gas recirculation. Figure 2 and similar graphs for different engine speeds and air flow rate define the combustion characteristics of a spark ignition engine. From considering Figure 2, two approaches to engine control can be identified. In the first approach, the spark advance angle is controlled to give zero slope and whatever fuel mixture is supplied to the engine is accepted. This approach gives the best torque for that fuel mixture. By way of refinement, the spark advance angle can be controlled to give a non-zero slope value, preferably retarding the spark advance angle from the optimum to reduce emissions of nitrogen oxides and hydrocarbons and the risk of knock occurring. This approach is described in US Patent 4026251. In the second approach, the spark advance angle is fixed and the air/fuel ratio is controlled so as to achieve zero slope or, by way of refinement, a non-zero slope value. The effect of these two approaches on compensating errors in fuelling will be discussed shortly. In the meantime, differences in the combustion process between production engines and also the effect of spark advance angle and air/fuel ratio on emissions of nitrogen oxides will be discussed. Referring to Figure 4, the combustion process can be thought of as consisting of two periods. Immediately after the spark, there is a delay period (DP) where no measurable heat release takes place but a flame kernel grows to a size capable of rapid propagation. The subsequent combustion period (CP) is that of visible flame propagation across the combustion chamber. In order to obtain maximum torque output, there is an optimum point for the middle of the combustion period. In a typical engine, a spark may occur at 35° before top dead centre (TDC), the delay period may last for 20° of crankshaft rotation, the combustion period may last for 60° of crankshaft rotation, and the optimum point for the middle of the combustion period may be 15° after top dead centre. In Figure 4, the spark, delay period, combustion period, top dead centre, and the optimum point are indicated respectively by arrows A to E. Both the delay period and the combustion period are affected by differences between production engines and also changes which occur during the life of an engine. Of these two periods, the delay period is more strongly affected. Differences between production engines include differences in compression ratio and valve timing which are permitted by production tolerances. Further changes may occur in the compression ratio and valve timing during the engine life due to engine wear and the build-up of combustion chamber deposits. In addition to compression ratio and valve timing effects, ignition quality will also affect the delay period and the combustion period. Ignition quality may change due to variations in spark plug gap size, condition, or orientation or the ignition energy produced by the coil and its associated drive circuit. The condition of the high tension leads may also affect the energy delivered to the spark plug and ignition quality can also be affected by variation in the exhaust gas recirculation, level, or the use of spark aiding petrol additives. These changes in the sum of the delay period and the combustion period result in movement of the line e as shown in Figure 3A. An engine in which the sum of the delay and combustion periods is shorter than in a normal engine may be called a "fast burn" engine and an engine in which the sum of these periods is longer than in a normal engine may be termed a "slow burn" engine. In Figure 3A, curves for fast and slow burn engines are indicated respectively by F and S. As may be clearly seen in Figure 3A, for a particular air/fuel ratio, there is a difference indicated by arrows A between the optimum spark advance angles. If the air/fuel ratio is controlled in the two engines to achieve zero slope at the same spark advance angle, this will result in a difference in the air/fuel ratio as indicated by arrow B. The variation of emissions of nitrogen oxide is shown in Figure 3B. In this figure, the ordinate represents emissions of nitrogen oxides, the abscissa represents the air/fuel ratio, and the direction of increasing spark advance angle is indicated by arrow A. As may be seen, the maximum emissions occur at an air/fuel ratio of about 16:1 and the emissions increase with increasing spark advance angle. In a fast burn engine, the increased rate of combustion will cause the emissions of nitrogen oxides to be greater than the design target and in a slow burn engine the emissions will be less than the design target. The effect of the first approach mentioned above will now be considered in relation to correcting errors in the air/fuel ratio. As will be recalled, in the first approach, the spark advance angle is controlled so as to achieve a desired value of the slope of engine output with respect to spark advance angle and, for simplicity, the case will be considered where the spark advance angle is varied to achieve zero slope. This first approach may be considered initially in relation to a normal burn engine. Referring to Figure 2, it may be desired to operate an engine at point Y but, owing to an error in the fuelling, the engine is operating at point X. With this first approach, the spark advance angle will be varied until the engine is operating at point Z on line e. Thus, although the engine torque is maximised for the actual air/fuel ratio, the error in the air/fuel ratio is not corrected. Consequently, the generation of nitrogen oxides will be greater than the design target and the error in the air/fuel ratio is likely to lead to a deterioration in fuel economy. Also, the output torque will differ from the design target and so the engine will not operate in the manner that was intended. Errors in the air/fuel ratio in the lean direction may lead to engine roughness. The first approach may now be considered in relation to an engine in which the sum of the delay and combustion periods is abnormal. With a fast burn or a slow burn engine, errors in air/fuel ratio will still not be corrected. However, with a fast burn engine, the spark advance angle will be decreased thereby reducing the emissions of nitrogen oxides. This reduction in emissions of nitrogen oxides will occur both with engines operating on the lean side and the rich side of air/fuel ratio which produces maximum emissions. On the lean side, the spark advance angle may move, for example from point O to point W in Figure 3b. This will provide compensation for the increase which is caused by the engine being a fast burn engine. If the engine is a slow burn engine, the spark advance angle will be increased thereby increasing the emissions of nitrogen oxides. This increase in emissions of nitrogen oxides will occur both with engines operating on the lean side and the rich side of the air/fuel ratio which produces maximum emissions. On the lean side, the spark advance angle may move, for example, from point O to point Y. This will tend to remove the reduction by the engine being a slow burn engine. Therefore, controlling spark advance will correct the variation of nitrogen oxide emissions which is caused by engine differences. The second approach will now be considered in which the air/fuel ratio is controlled so as to achieve a target slope. For simplicity, the case will be considered where the air/fuel ratio is controlled so as to achieve zero slope. Referring again to Figure 2, with a normal burn engine, it may be desired to operate at point Y but, owing to an error in the fuelling, the engine is operating at point X. With this approach, the air/fuel ratio will be controlled until the engine is operating at point Y and thus the error in the fuelling will be fully corrected. Considering now Figure 3A, an engine may be designed so as to operate along a curve which is positioned mid-way between the curves S and F. However, with a slow burn engine, the air/fuel ratio will be controlled so that the engine operates along curve S and, with a fast burn engine, it will be controlled so that the engine operates along curve F. Consequently, for both engines, the air/fuel ratio will depart significantly from the design curve. This may cause the fuel economy to differ from the design target and differences from the actual torque and the design torque will mean that the engine will not operate in the manner in which it was designed. The effect of the second approach on the emissions of nitrogen oxides will now be considered. Initially, the case will be considered where the engine is operating on the lean side of the air/fuel ratio which produces maximum emissions of nitrogen oxides. With a fast burn engine, the air/fuel ratio will be increased thereby reducing the emissions of nitrogen oxides. For example, the air/fuel ratio may move from point O to point V. This will compensate for the increase in emissions caused by the engine being a fast burn engine. If the engine is a slow burn engine, the air/fuel ratio will be decreased thereby increasing the emissions of nitrogen oxides. For example, the air/fuel ratio might move from point O to point X. This will remove the reduction in emissions of nitrogen oxides caused by the engine being a slow burn engine. The case will now be considered where the engine is operating on the rich side of the air/fuel ratio which causes maximum emissions of nitrogen oxides. With a fast burn engine, the air/fuel ratio will again be increased. This increase in the air/fuel ratio will increase the emissions of nitrogen oxides and this increase will be in addition to the increase caused by the engine being a fast burn engine. Thus, there will be a severe deterioration in the emissions. In the case of a slow burn engine, the emissions will reduce and this reduction will be in addition to the reduction caused by the engine being a slow burn engine. In passing, it is of interest to note the two worst case combinations can occur in an engine operating on the lean side of the air/fuel ratio giving maximum emissions of nitrogen oxides and in which neither spark advance angle nor air/fuel ratio are controlled in accordance with the slope. In such an engine, the combination of a rich fuelling error and a fast burn engine can cause high nitrogen oxide emissions, and the combination of a lean fuelling error and a slow burn engine can cause high engine roughness. Thus, neither of the two approaches set out above provides an entirely satisfactory solution to correcting errors in the air/fuel ratio. The Applicants have found that a much more satisfactory solution can be achieved by controlling both the spark advance angle and the air/fuel ratio in accordance with a particular control strategy so as to achieve a particular slope. More specifically, the Applicants have proposed two methods for doing this and these will now be discussed. In the first method, characteristics of the type shown in Figure 2 are made for a series of production engines which collectively exhibit the range of tolerances found in such engines. Specifically, for a given air/fuel ratio, air/flow rate and engine speed, the range of spark advance values which achieve a given slope (usually zero) is determined. For current manufacturing techniques, the applicants had found that this range extends by 3° of spark advance angle on each side of the average value. With improved production techniques, this range may become smaller. In this first method, when there is an error in the slope, the spark advance angle is controlled first within this range or window so as to cause the actual slope to approach the target slope. When the spark advance angle reaches one of the limits of this window, the air/fuel ratio is controlled until the actual and target slope angles are equal. For present production engines, applicants have found that movement along a curve e as shown in Figure 2 by an amount corresponding to 3° of spark advance angle corresponds approximately to a change in the air/fuel ratio of one unit. Thus, if the spark advance angle is constrained to move by up to 3° from its middle value, for a normal burn engine, the air/fuel ratio may be in error by up to one unit but the ignition timing will be optimised for that fuelling value. This error is considered acceptable and all the worst case conditions discussed above will be avoided, as only lean errors will occur on a fast burn engine and only rich errors will occur on a slow burn engine. In a second method for the control strategy, the slope error is apportioned simultaneously to both the spark advance angle and the air/fuel ratio using a relatively low value of control gain. It is appropriate to divide the slope error between the spark advance angle and the air/fuel ratio so that the overall control is in a direction perpendicular to the slope contour. With zero slope, this would result in the controlled direction being perpendicular to line e. From slope characteristics, the applicants have found that a suitable ratio for apportioning of the slope is to move the spark advance angle by 3° for each unit of movement of the air/fuel ratio. As is evident from inspecting Figure 2, this ratio is not constant and will depend upon the target air/fuel ratio. To maintain an overall direction of movement perpendicular to the slope contour, the amount of control of the spark advance angle will be greater with rich fuelling than with leaner fuelling. It can be appreciated that other ratios for apportioning the slope error may be chosen so as to follow any desired control trajectories on the spark advance and air/fuel ratio axes shown on Figure 3A. Figure 3C illustrates the advantages of the two methods of a combined control strategy on fast and slow burn engines. In Figure 3C curves E1 and E2 correspond respectively to curve e of Figure 2 for slow and fast burn engines. With a control system which varies only the air/fuel ratio and in which point O represents the design target, points A and B represent respectively the air/fuel ratios which would be set for the slow burn and fast burn engines. With combined spark advance and air/fuel ratio control according to the first method set out above, for a slow burn engine the spark advance angle will be controlled from O to C and the air/fuel ratio will then be controlled from C to E. For a fast burn engine, the control trajectory will move from O to D and from D to F. Using the second method set out above, for a slow burn engine, the control trajectory will move from point O to G and, for a fast burn engine, the control trajectory will move from O to H. With both of these methods, the emissions of nitrogen oxide will be close to the design target. In addition, the fuel consumption and torque will be much nearer to the design target than is achieved when only the air/fuel ratio is controlled. After the corrections have become established both these methods for the control strategy will permit correction to be applied to both the spark advance angle and the air/fuel ratio. In the discussion of Figures 2 to 4 above, spark advance angle is used to control the point at which combustion occurs and thereby to control ignition timing. This is appropriate in a spark ignition engine. In a diesel engine, injector timing is used to control the start of combustion and thereby to control ignition timing. The discussion of Figures 2 to 4 above has been based mainly on controlling the mixture composition by controlling the air/fuel ratio. As mentioned briefly, fuel mixture can also be controlled by controlling recirculation of exhaust gas and many of the comments above which have been made in relation to air/fuel ratio could equally be made in relation to exhaust gas recirculation ratio. In the discussion of Figure 2, engine torque is used as a parameter to define engine output. Engine output can also be defined by engine speed or engine power and, in the various embodiments of the present invention which will be discussed below, engine speed is used. In the discussion of Figures 2 to 4 above, the spark advance angle has been discussed as a function of air/fuel ratio at constant air flow. As explained above, for each engine speed and air flow, using the appropriate curve e, an optimum spark advance angle and air/fuel ratio may be selected. Air flow represents a parameter which defines the load demand to which the engine is subjected. Fuel flow, mixture flow, throttle angle or inlet manifold pressure may also be used to define load demand. In the embodiments of this invention given below the manifold pressure is used. Referring now to Figure 1B, there is shown the functional components of an adaptive control system according to one embodiment of this invention and which uses the combined control strategy discussed above. An engine 10 has an electronic fuel control device 11. The device 11 is an electronic fuel injection control device of known type in which a separate injector for each cylinder is arranged to inject fuel into the branch of the air intake manifold leading to that cylinder. Injection is initiated at a specific point in the operating cycle of the engine and the fuel control device 11 receives a fuel quantity input signal which determines the duration of injector opening in each cycle. The engine 10 has an ignition control device 12, which, in well known manner, causes the individual spark plugs to the engine to be fired at crankshaft angles determined by a spark advance angle input signal to the control device 12. The engine 10 has a crankshaft position transducer 10a and another transducer 10b which measures the air intake manifold pressure as a parameter representing load demand. Alternatively, a transducer 10b could measure another parameter representing load demand such as throttle angle. The latter parameter would be more appropriate than manifold pressure to a system controlling exhaust gas recirculation. In this case, the fuel demand table 15 and the fuel control device 11 shown in Figure 1B would be replaced by an exhaust gas recirculation demand table and an exhaust gas recirculation control device, respectively. Fuelling control would be carried out by a further independent system which might take the form of a conventional mechanical carburettor which is effectively a mechanical memory, or known type of fuel injection system. The crankshaft position transducer is a pick-up which coacts with a toothed wheel on the crankshaft. An arrangement is incorporated to enable a datum position of the crankshaft to be recognised. Such an arrangement may be constituted by a circuit or a computer program to recognise a missing tooth position on the toothed wheel. A suitable arrangement is disclosed in GB-A-2 142 436. The crankshaft position signals derived from the transducer 10a are supplied to both the fuel and ignition control devices 11 and 12 to enable the fuel injection and ignition operations to be properly synchronised with engine operation. The crankshaft position signal is also supplied to a speed calculator 13 which provides a frequently updated signal representing the current speed of the crank shaft. The speed signal and the manifold pressure signal are supplied to three look-up tables 14, 15, 16. The table 14 provides output data representing spark advance angle for the current value of engine speed and manifold pressure. The table 15 provides output data representing air/fuel ratio for the current values of engine speed and manifold pressure. The data stored in look-up tables 14 and 15 are selected during a rig test on a particular engine using the principles discussed above in relation to Figure 2. The look-up table 16 contains the desired slope value for each engine speed and manifold pressure combination. For each combination, the table 16 outputs the desired value of slope of engine speed with respect to spark advance angle which corresponds to the selected values of spark advance angle and air/fuel ratio determined during the rig test on the particular engine. For most combinations of values of speed and manifold pressure, the desired value of the slope is zero. But, as explained above, in some operating conditions such as idling, a positive slope is required for minimum emissions. The spark advance signal (or word) from look-up table 14 is supplied to the ignition control device 12 via a summer 24 and a summer 17. The summer 17 receives a perturbation signal from a perturbation generator 18 which also has an input from a clock 9. The air/fuel ratio signal is supplied via a summer 22 to the fuel control device 11. The perturbation signal is alternately positive and negative and hence the spark advance angle signal supplied to the ignition control device 12 is varied periodically to advance and retard the spark advance angle by a small amount. The perturbation signal is also supplied together with a signal from transducer 10a and clock 9 to a slope detector 19. The detector 19 operates to monitor the effect of the perturbation in spark advance angle on engine speed. Thus, it produces a signal corresponding to the actually detected value of the slope of engine speed with respect to spark advance angle. This signal is supplied to an error detector 20 which compares the actual value of the slope with a desired value derived from look-up table 16. The resulting error signal varies in both magnitude and sign in accordance with the relationship between the desired and actual values of the slope. The error signal is supplied to a feedback controller 21 which has an integrator transfer function. Controller 21 has two outputs which are connected respectively to negative inputs of summers 22 and 24. Controller 21 consists of two sections which may be linked as shown and thereby apportion the slope error between summers 22 and 24. The error can be apportioned in either of the two methods discussed above and illustrated in Figure 3c. The resulting outputs of summers 22 and 24 represent respectively a corrected air/fuel ratio demand signal and corrected spark advance demand signal. It will be appreciated that other transfer functions for feedback controller 21 could be used. Either proportional integral or derivative transfer functions or any combination of these could be used to provide the required speed or stability of the control loop. The feedback controller 21 need not have the two sections linked. When the control strategy is based on the second method discussed above, that is with the corrections being apportioned to the spark advance angle and air/fuel ratio in a predetermined ratio, this ratio itself may be made a function of engine speed and load demand. This ratio could be set in a further look-up table. The functional components shown in Figure 1B may be implemented with a microcomputer system as shown in Figure 5. The look-up tables 14, 15, and 16 are readily implemented using RAM whilst the perturbation generator is timed by a software counter. The slope detector calculates the slope by reference to successive measurements of engine speed stored in RAM. The controller 21 is implemented by an air/fuel ratio correction table and a spark advance correction table and also by a table for apportioning the error between the two correction tables. These three tables are stored in RAM and the two correction tables are continuously updated in accordance with the error between the demanded slope and the actual slope and in accordance with the error apportionment table. The output from the perturbation generator is added to data words from the fixed spark advance schedule and the spark advance correction table to obtain a command data word for the spark advance angle and data words from the fixed air/fuel ratio table and the air/fuel ratio correction table are added to obtain a command data word for the air/fuel ratio. As shown in Figure 5, the microcomputer system comprises a microcomputer 30 which forms part of an Intel type 8097 microcomputer and which is connected conventionally to a program memory 31 (ROM type 27C 64) which contains the program required for the microcomputer and look-up tables 14, 15 and 16. Temporary variables are stored in RAM 32 (Hitachi type 6116). The transducer 10a is as described in GB-A 2 142 436 and employes a toothed wheel having teeth at 10° intervals with a tooth missing at each two reference locations 180° apart. The winding of this transducer is interfaced with the interrupt input I of microcomputer 30 via an interface circuit 33 which operates mainly to filter out noise and provide clean squared pulses to the microcomputer input as each tooth passes the pick up winding. As explained in GB-A 2 142 436, these pulses are used to provide crankshaft position pulses at 10° intervals and reference pulses at two specific positions in each crankshaft revolution. The microcomputer 30 uses these pulses to calculate the engine speed and thereby performs the function of speed calculator 13. The transducer 10b is interfaced by an analogue to digital converter 34 to the microcomputer 30. The converter 34 also forms part of said Intel integrated circuit type 8097. A high speed output of computer 30 is connected to an ignition driver 35. The driver 35 includes an amplifier and provides the current to drive the ignition coil on and off. Another high speed output is connected to another driver 36 which supplies control signals for the individual fuel injectors. Since the teeth on the toothed wheel are positioned at 10° intervals, finer resolution is obtained by interpolation. For each interval, the interpolation is achieved by using the time taken for the passage of the previous 10° interval. Referring to Figure 6, there is shown a general arrangement of the modules which form the program and also the flow of data between these modules and the look-up tables. The program comprises of modules MISDET 40, IGNLU 41, SAFIRE 42, and DWELL 43. The module IGNLU calls sub-modules LOOK UP 1 and LOOK UP 2, and the module SAFIRE calls sub-modules MAPSTORE 1, MAPSTORE 2, CORRECTION DIVISION, LOOK UP 1 CORRECTION, and LOOK UP 2 CORRECTION. Figure 6 also shows the fixed sparked advance table 14, the fixed air/fuel ratio table 15, together with the spark advance correction table 44, the air/fuel ratio correction table 45, and the error apportionment table 46. The correction tables 44 and 45 are updated under the control respectively of sub-modules MAPSTORE 2 and MAPSTORE 1 in accordance with the error between the demanded and actual slope and the sub-module CORRECTION DIVISION and the error apportionment table 46. The values stored in correction tables 44 and 45 are used respectively to control the spark advance angle and the air/fuel ratio under the respective control of the sub-modules LOOK UP 2 CORRECTION and LOOK UP 1 CORRECTION. Thus, these five sub-modules called by SAFIRE together with the two correction tables 44 and 45 and the error apportionment table 46 perform the function of controller 21 shown in Figure 1. 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. 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 a relationship between the variable TOOTH and the absolute position of the crankshaft. The module MISDET also calculates the fire period and supplies this as a variable FIRE PERIOD to the module IGNLU and SAFIRE. In the present example, ignition occurs each time the crankshaft rotates through approximately 180°. The fire period is defined as the time which is taken for the crankshaft to rotate through exactly 180°. The module IGNLU receives a variable MAN PRESS representing manifold pressure and this variable is derived from the output signal of transducer 10b. In each of the tables 14, 15, 44, 45 and 46, the values are stored for each combination of engine speed and manifold pressure. In order to address these tables, the module IGNLU generates address variables SPEED and LOAD corresponding respectively to engine speed and manifold pressure. The module IGNLU also calculates engine speed from the variable FIRE PERIOD and supplies this as a variable ENG SPEED to each of the modules SAFIRE and DWELL. The module IGNLU calls the sub-module LOOK UP 2 which calculates the basic spark advance angle as a variable SPK ANG BASE by a standard interpolation process. This variable is then supplied to module SAFIRE. The module IGNLU also calls the sub-module LOOK UP 1 which calculates the basic value for the air/fuel ratio by a similar standard interpolation process and supplies this as a variable AFR BASE to the module SAFIRE. The module SAFIRE generates a perturbation value which varies alternately between + 3° and - 3° of spark advance angle at a frequency of 10Hz. The module SAFIRE calls the sub-routine LOOK UP 2 CORRECTION to obtain a correction value for the spark advance. The perturbation value, this correction value and the basic spark advance value SPK ANG BASE are summed to produce a commanded spark advance value SPK ANG which is supplied to the module DWELL. The module SAFIRE also calls the sub-routine LOOK UP 1 CORRECTION to obtain a correction value for the air/fuel ratio. This correction value is summed with a basic air/fuel ratio value AFR BASE to produce a commanded air/fuel ratio value AFR and this is supplied to module DWELL. The module SAFIRE also calculates the slope of engine output with respect to spark advance. The maximum effect of perturbing the spark advance angle on engine speed is found to occur almost half a perturbation cycle after each change in the sign of the pertubation with a perturbation frequency of 10Hz. Thus, in a perturbation cycle, the spark advance angle is increased by 3° from the base value. The fire period associated with the increased value is recorded just before the spark advance angle is reduced by 3° from the base value 50ms later. The fire period associated with a reduced spark advance angle is recorded just before the spark advance angle is increased again by 3° from the base value 100ms after the start of the cycle. If the engine is operating under conditions such that increasing the spark advance angle causes acceleration and reducing the spark advance angle causes deceleration, the second value for the fire period will be longer than the first value for the first period. The first value for the fire period is subtracted from the second value and the resulting difference represents the slope. The module SAFIRE also causes the sub-modules MAPSTORE 1 and MAPSTORE 2 to update the correction tables 45 and 44 using the control strategy contained in the sub-module CORRECTION DIVISION and the error apportionment table 46. Each time one of these tables is updated, this is performed in accordance with the following formulae: spark advance: new correction = old correction + k₁ (SLOPE ERROR) air fuel ratio: new correction old correction + k₂ (SLOPE ERROR) In these formulae, the values of k₁ and k₂ may either be fixed, or vary with speed and load as defined in the error apportionment table 46. In the first control strategy the sub-module CORRECTION DIVISION determines whether spark advance or air/fuel ratio should be corrected, and so enables either of sub-modules MAPSTORE 1 or MAPSTORE 2. In the second control strategy, both of these sub-modules will be enabled and values of k₁ and k₂ selected from the error apportionment table by sub-module CORRECTION DIVISION. In the example shown in Figure 6, SLOPE ERROR in the above formulae is the actual slope value. This is where the spark advance angle and air/fuel ratio are corrected so as to obtain zero slope. If it is desired to have a non-zero value of the slope at certain engine speeds and load demands, a further table may be provided which contains these values. The slope demand (desired slope) values are then compared with the actual slope values to provide the variable SLOPE ERROR. As can be readily appreciated, the correction tables 44 and 45 are updated at points corresponding to the prevailing engine speed and load demand. The module DWELL uses the variables TOOTH and ENG SPEED to cause the microcomputer 30 to provide appropriate signals to ignition driver 35 and injector driver 36 to achieve ignition and fuel injection at appropriate crankshaft positions with the air/fuel ratio and the spark advance angle set to the commanded values. Figures 7 and 8 show the sequence of operations of the modules set out in Figure 6. The program comprises a main program MAIN PROGRAM shown in Figure 7 and an interrupt routine TOOTH INTERRUPT shown in Figure 8. The interrupt routine shown in Figure 8 is performed each time an interrupt signal is produced following the detection of a tooth. In this routine, the module MISDET is called in a step S1. In the main program as shown in Figure 7, the variable TOOTH is compared with a constant START TOOTH in a step S2. The constant START TOOTH is chosen to correspond to the correct angular position of the crankshaft to allow modules IGNLU, SAFIRE, and DWELL to be executed before the occurrence of the next spark. When equality is found in step S2, these three modules are performed successively in steps S3, S4 and S5 before returning to step S2. Thus, the modules IGNLU, SAFIRE and DWELL are executed synchronously with the firing of the engine and these modules are always executed between actual sparks. The combined control of spark advance angle and air/fuel ratio can also be applied to individual cylinders of a multi-cylinder engine. In a multi-cylinder engine, the air/fuel ratio may vary from cylinder to cylinder due to distribution problems or differences in the characteristics of the fuel injectors of the individual cylinders. With present manufacturing techniques, the applicants have found that the air/fuel ratio varies by up to 0.6 of a unit between individual cylinders. Also, in a multi-cylinder engine, particular cylinders may have faster burning characteristics than others due, for example, to thermal effects from neighbouring cylinders or compression ratio or valve timing differences. At the same air/fuel ratio, optimum spark advance angles may vary by up to 6° between cylinders. If the spark advance angle is set to a target value and the air/fuel ratio is controlled so as to achieve a target slope value, the differences between the fast and slow burn cylinders can lead to a difference of two units in the air/fuel ratio. Although controlling the air/fuel ratio in this manner may help to reduce emission of nitrogen oxides, it will lead to an imbalance in torque between the individual cylinders. Therefore, the applicants consider that the best strategy for controlling spark advance and air/fuel ratio for individual cylinders is to correct the spark advance angle within a set window and, when the correction to the spark advance angle reaches one of the limits of this window, to control the air/fuel ratio to achieve a target slope value. A window which extends by 3° of spark advance angle on each side of a mid-point would be appropriate. As noted above, the variation in air/fuel ratio between individual cylinders is small compared with the variation in optimum spark advance angle. With further improvements in fuelling systems in which each cylinder has an individual electrically controlled injector, the differences may become even smaller. It may therefore become appropriate to adopt a control strategy in which the spark advance angle is controlled separately for the individual cylinders but the air/fuel ratio is controlled simultaneously for all cylinders. With such a strategy, the air/fuel ratio control would commence when either the correction to the spark advance angle for one cylinder reaches the limit of the window or when the average of the corrections to the spark advance angle over all the cylinders reaches the specific value. In an engine where groups of cylinders have a common fuel control device, such as a common carburettor or a common fuel injection control device, the control strategy could be implemented by correcting the spark advance angle for each individual cylinder and controlling the air/fuel ratio for each group of cylinders. An embodiment of the present invention in which control of spark advance angle and air/fuel ratio is applied to individual cylinders will now be described with reference to Figure 9. Figure 9 shows a system which is similar in principle to that shown in Figure 1B but in which the spark advance angle is optimised for each individual cylinder of a four cylinder engine and in which the air/fuel ratio is corrected for each individual cylinder in accordance with a particular control strategy. The control strategy may take the form of the first method discussed above in which the spark advance angle is optimised within a window which extends, say, by 3° from each side of a mid-point, and then the air/fuel ratio is corrected. Alternatively, the control strategy may take the form of the second method discussed above in which the spark advance angle and the air/fuel ratio are corrected together. In Figure 9, the engine 10, and transducers 10a and 10b are as described for Figure 1B. The ignition control device 12 of Figure 1B is replaced by four individual control devices 12a, 12b, 12c and 12d each of which controls the respective individual cylinder. The fuel control device 11 of Figure 1 is replaced by four separate fuel control devices 11a, 11b, 11c and 11d, each of which controls the air/fuel ratio for an individual cylinder. The look-up tables 14, 15 and 16 in Figure 9 are exactly the same as described for Figure 1B. The system of Figure 9 includes a counter 50 which determines which of the four cylinders is to be optimised. Each cylinder is optimised for a fixed duration which corresponds to a preset number of engine fires. Counter 50 selects a different cylinder after this duration expires. The output of counter 50 is supplied to a pair of selectors 51 and 52. The selector 52 determines which of four summers 17a, 17b, 17c and 17d receives the perturbation signal at any given time. Only the selected cylinder is perturbed. Selector 51 determines which of four integral controllers 21a to 21d is updated. Each of these four feedback controllers takes the same general form as the feedback controller 21 and thus comprises two linked sections which together provide two outputs. One of these outputs represents a correction to the air/fuel ratio and the other output represents the correction to the spark advance angle. As shown in Figure 9, one set of these outputs are connected to negative inputs of a set of four summers 22a to 22d connected between the fuel demand table 15 and the fuel control devices 11a to 11d. The other set of outputs are connected via a set of terminals 53a to 53d to negative inputs of summers 17a to 17d. For reasons of clarity, the connections between this further set of outputs and terminals 53a to 53d are not shown in Figure 9. In each of the controllers 21a to 21d, the corrections between the two outputs are apportioned using one of the control strategies mentioned above. As in the example of Figure 1A and Figure 1B, the feedback controllers 21a to 21d need not be linked and each could use a transfer function other than an integral one. After selecting a cylinder, the operation of the system of Figure 9 is similar to that of Figure 1B. In the summers 17a to 17d, the corrections to the spark advance angle derived from the outputs of feedback controllers 21a to 21d are subtracted from the spark advance angle derived from table 14. The perturbation signal from the perturbation generator 18 is directed via selector 52 to the summer corresponding to the selected cylinder. The resulting output signals from summers 17a to 17d are applied to the ignition control devices 12a to 12d. The perturbation signal together with a signal from transducer 10a and clock 9 is supplied to this slope detector 19. This operates to monitor the effect of the perturbation in spark advance angle on engine speed. The detector 19 produces an output signal proportional to the slope of engine speed with respect to spark advance angle for the selected cylinder. This signal is supplied to the error detector 20 which compares the actual value of the slope with the desired value of the slope derived from table 16. The resulting error signal is then directed via selector 51 to the particular controller 21a to 21d which corresponds to the selected cylinder. In a modification, indicated in Figure 9 by dashed lines, the outputs of the summer 22a to 22d are connected to an averaging circuit 53, and the output of the averaging circuit 53 is applied to a common fuel control device 54 for all the cylinders. By way of a further modification, the averaging circuit 53 may be replaced by a circuit in which either the richest or the leanest fuel demand signal from the summer 22a to 22d is selected for application to the fuel control device 54. The magnitude of the signal produced by the slope detector 19 for an individual cylinder will be smaller than the magnitude of the corresponding signal for the system described with reference to Figure 1B. However, the noise component in this signal is comparable with the noise component for the system described with reference to Figure 1B. The controllers 21a to 21d of Figure 9 have nominally the same gain as the controller 21 of Figure 1B. This results in a longer time for correcting the air/fuel ratio or the spark advance angle than that required by the system of Figure 1B. In general, for a small change in spark advance angle, the slope of engine speed with respect to spark advance angle of an individual cylinder will differ from that for the entire engine. In the average sense, the slope of an individual cylinder will be approximately one quarter of the slope of the entire engine. Consequently, the contents of the table 16 of the systems shown in Figure 9 should be about one quarter of the magnitude of the contents of the table 16 of the system of Figure 1B. Several embodiments of the present invention will now be described in which the slope error is recorded and may then be used by a diagnostic unit during service of the vehicle to detect faults in the fuel controller. Figure 10A shows a basic embodiment in which the same reference numerals as used in Figure 1A have been used to denote corresponding parts. In comparison with Figure 1A the parts 15, 21, 22, and 24 have been omitted whereas the output of the summer 20 is connected to an error store 60. The operation of this embodiment is as follows. The perturbation generator 18 periodically perturbs via the summer 17 the input B base condition from the controller 14. The effect of this on the output monitored by the sensor 10a with respect to the perturbed input B is supplied by the slope detector 19 to the negative input of the summer 20, whose positive input receives a desired slope value 16. The summer 20 forms the error between the actual and desired slope values and the error is stored in the store 60, for instance for testing or diagnostic purposes as will be described hereinafter. Referring now to Figure 10B, the parts of the system which are identical to those of Figure 1B are denoted by the same reference numerals. However, the system does not include the controller 21, or the summers 22 and 24. Thus, the fuel control device 11 and the ignition control device 12 use the outputs of tables 15 and 14 without correction. The system shown in Figure 10B includes a table 60 which stores the slope errors. The table 60 receives the output of manifold pressure transducer 10b and the speed calculator 13 as address inputs and the slope errors are stored as a running time average as a function of engine speed and load demand. As discussed fully above, in production engines the slope achieved in fast and slow burn engines will differ from a normal burn engine which is used in pre-production rig testing to derive the values to be stored in table 14 to 16. Thus, some errors are to be expected for this reason. However, any errors which exceed those expected for slow burn and fast burn engines must result from a fault in the control device 11. When the vehicle is being serviced, the table 60 is connected to a service bay diagnostic unit 61 which checks for the presence of any such excessive errors. If such errors are found, then the fault in the fuel control device 11 may be rectified. The table 60 may also be connected to an in-vehicle diagnostic unit 62 which provides a warning signal to the driver in the event of detecting severe slope errors. As discussed with reference to Figure 1B, the control device 11 is an electronic fuel control device. Such control devices suffer from errors in performance resulting from production differences and ageing of components. In particular, solenoid type fuel injectors are prone to changes in fuel delivery characteristics due to gum or other deposits forming in the discharge orifices. With the system shown in Figure 10B, these errors can be detected and rectified. The vehicle diagnostic unit 62 can also be arranged to record changes in average slope error with vehicle age so as to detect drift of the fuel control device 11. As a further enhancement of this system, an output may be provided from the vehicle diagnostic unit 62 to a summer on the output of the fuel demand table 15 to correct the drift in the fuel control device 11 and remove the average slope errors. The system of Figure 10B can also be used with other types of fuel control device. For example, the system could be used with a conventional carburettor of purely mechanical construction. Referring now to Figure 11, there is shown another embodiment in which the slope errors are recorded. In this embodiment, part of the exhaust gas is recirculated to the cylinders. The engine 10 is provided with a sensor 63 for detecting the presence of oxygen in the exhaust gas. The output of sensor 63 is provided to the input of a controller 64, which may have an integral transfer function, and the output of controller 64 is supplied as an input signal to the fuel control device 11. The sensor 63 and controller 64 are arranged so that fuel and air will be supplied to the engine in stoichiometric proportions. The transducer 10b of Figure 1B is replaced by an engine load sensor 110b which detects the throttle angle position. The system of Figure 11 also includes a look-up table 65 which contains values of the recirculation ratio for the exhaust gas as a function of engine speed and load demand. Look up table 65 receives inputs from the engine load sensor 110b and the speed calculator 13 and provides a control signal to a control device 66 which controls recirculation of the exhaust gas. As before, the slope errors are stored in look-up table 60 and the table 60 can be interrogated by diagnostic units 61 and 62. In this case, the interrogation is performed to detect faults in the exhaust gas recirculation control device 66. Such control devices are prone to blocking from deposits and corrosion from the exhaust gas environment. By way of simplification, in the system of Figure 11, the sensor 63, controller 64 and fuel control device 11 may be replaced by a conventional mechanical carburettor. The system shown in Figure 11 can be modified to control the exhaust gas recirculation level directly. With this modification, the slope error data is passed directly to a controller, which is similar to feedback controller 21 of Figure 1B. This controller then supplies outputs to summers on the outputs of the exhaust gas recirculation demand table 65 and the spark advance demand table 14. This controller corrects both the exhaust gas recirculation and spark advance in accordance with either the first or the second control strategy described above. With the first control strategy, the spark advance will be corrected within a preset window and then the exhaust gas recirculation will be corrected. With the second control strategy, the spark advance and exhaust gas recirculation are corrected together. Air/fuel ratio is still controlled either to stoichiometric proportion by the oxygen sensor 64 and fuel control device 11 as shown in Figure 11 or via a conventional mechanical carburetter or open loop fuel injection system. Figure 12 shows another embodiment in which the slope errors are stored. In this embodiment, the lean burn approach is used and a feed-back signal is provided from a sensor which detects the oxygen level in the exhaust gas. Referring now to Figure 12, parts which are the same as those shown in Figure 10B are denoted by the same reference numerals and will not be further described. In Figure 12, the engine is provided with a sensor 67 for detecting the level of oxygen in the exhaust gas. The sensor 67 can detect the oxygen level over a wide range. The output of sensor 67 is connected to the negative input of a summer 68. The system of Figure 12 also includes a look-up table 90 which contains demand values for the level of oxygen in the exhaust gas. The table 90 receives address inputs from the manifold pressure transducer 10b and the speed calculator 13 and provides an output to a further input of summer 68. The output of summer 68 is connected to the input of a feedback controller 69, which may have an integral transfer function. The output of controller 69 is connected to the negative input of a summer 70 which is connected between the fuel demand look-up table 15 and the fuel control device 11. In Figure 12, the output of error detector 20 is also connected to the input of a feedback controller 71, which may also have an integral transfer function. The output of feedback controller 71 is connected to the negative input of a summer 72 positioned between the output of look-up table 14 and summer 17. The controller 71 is arranged to correct the output from look-up table 14 by up to 3° of spark advance angle. Presently known exhaust gas oxygen sensors can be used to control air/fuel ratio over a wide range, for example 10:1 to 30:1, with an accuracy of 0.5 of a unit. However, such sensors have not yet proven reliable in extended vehicle test work. With the system shown in Figure 12, the slope error look-up table 60 could be interrogated by the service bay diagnostic unit 61 to detect faults in sensor 67. Also, the in-vehicle diagnostic unit 62 could be arranged to output a warning signal in the event of detecting severe slope errors and could also supply a signal to the fuel control device 11 so that this device operates in a fail-safe mode. The system shown in Figure 12 can be modified so as to correct the spark advance angle and the air/fuel ratio for each individual cylinder and so as to record the slope errors for each individual cylinder. Such a system is shown in Figure 13. In Figure 13, parts which are the same as those of Figure 12 are denoted by the same reference numerals and will not be described further. Referring now to Figure 13, the fuel control device 11 of Figure 12 is replaced by four individual fuel control devices 11a to 11d, each of which controls the fuel supplied to an individual cylinder. The fuel control devices 11a to 11d may comprise multipoint electronic fuel injectors. The ignition control device 12 of Figure 12 is replaced by four individual ignition control devices 12a to 12d for the individual cylinders. The system of Figure 13 includes a counter 70 responsive to the position transducer 10a. The counter 70 is responsible for selecting each cylinder in turn and does so by counting the engine fires. The counter 70 provides control signals to four selectors 71 to 74. In the system of Figure 13, the output of error detector 20 is connected through selector 72 to each of four feedback contollers 71a to 71d which replace the feedback controller 71. The outputs of these four feedback controllers are supplied to the negative inputs of four summers 72a to 72d which replace the summer 72. The outputs of these four summers are supplied to the inputs of four summers 17a to 17d which replace summer 17 and whose output signals are supplied to the individual ignition control devices 11a to 11d. The signal from the perturbation generator 18 is supplied through selector 73 to further inputs of each of summers 17a to 17d. The exhaust gas oxygen sensor 67 is located at the common junction of the exhaust pipes from the individual cylinders so that it can detect differences in the air/fuel ratio between the individual cylinders. The output of sensor 67 is connected through selector 71 to inputs of four summers 68a to 68d which replace summer 68. The other inputs of these summers receive the output from the exhaust gas oxygen demand map 90. The outputs of summers 68a to 68d are connected to the inputs of four controller 69a to 69d which replace the controller 69. The outputs of these four controllers are connected to the inputs of four summers 70a to 70d which replace summer 70. The other inputs of these four summers 70a to 70d receive the output from the fuel demand table 15 and the outputs of these four summers are connected to the inputs of the four individual fuel control devices 11a to 11d. Thus, in Figure 13, the output from the error detector 20 is used to correct the spark advance angle for each individual cylinder. Similarly, the output signal from sensor 67 is used to correct the fuel demand cylinder for each individual cylinder. The output of error detector 20 is also connected through selector 74 to four individual look up tables 76 which record the average slope errors for the individual cylinders. The output of look-up table 76 may be supplied to a service bay diagnostic unit and also to an in vehicle diagnostic unit. These diagnostic units can be used to detect faults in the sensor 67 as well as various other faults on an individual cylinder basis. An embodiment will now be described in which engine roughness is detected and used to provide an override signal for correcting the fuel demand signal to prevent engine roughness reaching an excessive level. This system is shown in Figure 14. Parts which are similar to the system shown in Figure 1B are denoted by the same reference numerals and will not be described further. Referring now to Figure 14, the output of position transducer 10a is supplied to a roughness calculator 80. The system also includes a look-up table 81 which contains demand values for the engine roughness as a function of engine speed and load demand. The look-up table 81 receives inputs from the manifold pressure tranducer 10b and the speed calculator 13 and supplies an output signal to one input of a summer 82. The other input of summer 82 receives the output of roughness calculator 80 and the output of summer 82 is supplied to the input of a controller 83. The controller 83 supplies one output signal to that section of feedback controller 21 which supplies an output to summer 22 and provides a further signal to an input of a summer 84. The summer 84 has its other input connected to the output of summer 22 and provides its output as a control signal to the fuel control device 11. The controllers 21 and 83 are arranged so that, in the event of engine roughness approaching an excessive level, the correction to the fuel demand signal caused by controller 83 overrides correction of slope errors. As stated previously, the position transducer 10a detects each 180° of crankshaft angle and the roughness calculator 80 uses this to detect roughness. The technique used may be that proposed in US Patent 4178891 or in SAE paper No. 840443. The roughness calculator 80 may be implemented as a further module of the computer program shown in Figure 6. A roughness calculator may be incorporated into any of the other embodiments previously described including those which include exhaust gas recirculation. In the embodiments of Figures 9 and 13, the slope error is used for control of individual cylinders to achieve slope targets. As will now be described, further use may be made of the slope error data for individual cylinders at idle speeds. During engine idle, it is important to avoid excessive roughness or idle instability. Low idle speeds produce low amounts of emissions of pollutants and improve fuel consumption but such speeds often increase roughness. Often one cylinder performs worse than others and causes a significant increase in the overall roughness. Poor combustion at idle speeds is associated with high levels of dilution of the fuel mixture with residual exhaust. This is due to poor scavenging at low inlet manifold pressures and also to reverse flow of exhaust gases during the valve overlap period. Relatively rich fuelling is required to maintain stable combustion and large increases in engine roughness can occur for small fuelling errors in the lean direction. Cylinder to cylinder variation in the dilution of the fuel mixture by residual exhaust gas can also be caused by variations in compression ratio and valve timing. This means that for a given level of combustion quality, the air/fuel ratio should be varied between the cylinders so as to compensate the dilution level of the fuel mixture by residual exhaust gases. As mentioned with reference to Figure 14, a roughness calculator can be added to the system of Figure 9 or 13 by adding a further software module. Using such a roughness calculator, and using the slope error data for the individual cylinders for low load conditions, the applicants have found that idle conditions should be controlled as follows: (1) The spark advance angle is set to a value known to give the best compromise between fuel economy and emission of hydrocarbons; (2) The mean fuelling level is kept fixed but the fuel apportioned between the individual cylinders according to the individual slope errors, the most fuel being delivered to the cylinder with the most positive value for the slope error. (3) The idle speed is then decreased until the roughness limit is reached. The amount by which the fuel is apportioned according to the slope error is fixed empirically. This system gives the lowest possible idle speed for a given level of roughness for a particular engine. The slope errors for the individual cylinders can also be used to avoid engine knock in the following way. Compression ratio differences which may cause knock on one cylinder can most effectively be measured through the differences in the slope errors between the individual cylinders at low load low speed conditions. The occurrence of knock at higher loads and speeds is not necessarily avoided by using the differences between the slope errors which occur at such operating conditions. Therefore, in order to avoid knock at certain engine speeds and high load demand combinations which are known to be most prone to engine knock, the slope differences measured at low load are used. Specifically, the average spark advance for the cylinders is maintained at the value which is appropriate for the particular engine speed/load demand but the slope differences obtained at low load low engine speed are used to vary the spark advance angle between the individual cylinders. The most advanced spark angle is given to the cylinder with the most positive slope errors. The amount by which the spark advance is apportioned according to the slope errors is fixed empirically. The invention has been described for use with a conventional fuel mixture control device which alters the rate of fuel flow whilst the rate of air flow or the rate of mixture flow is controlled by the driver of the vehicle in which the engine is installed. However, the invention is also applicable to unconventional systems in which the fuel mixture control device alters the rate of air flow and the fuel flow is directly controlled by the driver. In this case, graphs equivalent to those shown in Figure 2 may be derived but with speed and fuel flow rate held constant rather than speed and air flow rate. With such an unconventional system, in the example of Figure 1B or Figure 9, spark advance demand values are chosen for storage in the spark advance look-up table 14, and an air demand look-up table would replace the fuel demand look-up table 15. The fuel controller 11 is replaced by an air flow control device such as a servo-driven throttle butterfly. In the embodiments of the invention described in Figures 1B, 9 and 14 the engine input which is perturbed to measure the slope of engine output with respect to said input is also one of the two inputs which are corrected in accordance with the control strategy to obtain the desired value of said slope. A further embodiment of the invention is a system where the perturbed input is not one of the two controlled inputs. Such an embodiment is illustrated in Figure 15 in greatly simplified form, as a modification of the embodiment shown in Figure 1A. The embodiment of Figure 15 differs from that of Figure 1A in that further memory 25 in the form of a further base control demand input C is fed to a summer 26, and the perturbation signal from the generator 18 is supplied as the second input to the summer 26, the combined input from the summer 26 providing a further control input C to the engine 10. Thus, this further input C is perturbed and affects the output as detected by the output sensor 10a. The slope error is used to correct the other two inputs A and B in accordance with the predetermined strategy. Such a system will now be described in more detail. Refering again to Figure 15 input B may be exhaust gas recirculation, input A may be air/fuel ratio and input C may be spark advance. In this example spark advance is the perturbed input and air/fuel ratio and exhaust gas recirculation are corrected in accordance with the slope errors and the predetermined strategy. The various embodiments discussed above relate to a spark ignition engine. However, the present invention could equally be applied to a compression igniton (diesel) engine. In a compression ignition engine, instead of controlling the spark advance value, the ignition timing is controlled by controlling the timing of the fuel injection. In all the embodiments discussed above, the slope of engine speed with respect to spark advance has been determined by perturbing the spark advance angle. Alternatively, the slope of engine speed with respect to a parameter relating to the fuel mixture, such as the air/fuel ratio, may be determined by perturbing such parameter. Two control inputs of the engine, such as the spark advance angle and the air/fuel ratio, may then be controlled using one or the other control strategies discussed above.

Claims: An adaptive control system for an internal combustion engine, the system comprising first means (14) for establishing a first base value for a first engine control input as a function of engine operating conditions, means (18) for periodically perturbing an engine control input to provide a perturbed engine control input, means (10a) for monitoring the engine output, means (19) for determining the actual slope of the engine output with respect to the perturbed engine control input, second means (15) for establishing a second base value for a second engine control input as a function of engine operating conditions, and means (21, 22, 24) for applying corrections in accordance with a control strategy to the first and second base values to obtain first and second corrected values, characterised in that the control strategy is arranged to provide corrections according to the difference between a desired slope and the actual slope up to a maximum magnitude to one of the base values and then corrections according to the difference to the other of the base values so as to reduce the difference. An adaptive control system for an internal combustion engine, the system comprising first means (14) for establishing a first base value for a first engine control input as a function of engine operating conditions, means (18) for periodically perturbing an engine control input to provide a perturbed engine control input, means (10a) for monitoring the engine output, means (19) for determining the actual slope of the engine output with respect to the perturbed engine control input, second means (15) for establishing a second base value for a second engine control input as a function of engine operating conditions, and means (21, 22, 24) for applying corrections in accordance with a control strategy to the first and second base values to obtain first and second corrected values, characterised in that the control strategy is arranged to provide corrections simultaneously to the first and second base values according to the difference between a desired slope and the actual slope, the corrections being related to each other by a predetermined formula, so as to reduce the difference. A system as claimed in claim 1 or 2, characterized in that the perturbed engine control input is the first engine control input. A system as claimed in claim 3, characterized by including an ignition timing control device (12) responsive to the first engine control input and a fuel mixture control device (11, 66) responsive to the second engine control input. A system as claimed in claim 4, characterized in that the fuel mixture control device (11) comprises a device for controlling air/fuel ratio. A system as claimed in claim 4, characterized in that the fuel mixture control device (66) comprises a device for controlling exhaust gas recirculation. A system as claimed in claim 5, characterized by including exhaust gas oxygen sensing means (67) for sensing an actual exhaust gas oxygen value, means (90) for establishing a desired value of exhaust gas oxygen, means (68) for comparing the actual and desired values of exhaust gas oxygen to form an exhaust gas oxygen error value, and means (69, 70) for altering the air/fuel ratio so as to reduce the exhaust gas oxygen error value. A system as claimed in any one of the preceding claims for a multi-cylinder engine, characterized by including means (50, 51, 52, 70, 71, 72) for establishing a plurality of combinations of cylinders of the engine (10) and for selecting each combination in turn, each combination including at least one cylinder, the means (17 a - 17 d , 21 a - 21 d , 22 a - 22 d , 71 a - 71 d , 72 a - 72 d ) for applying corrections being arranged to apply corrections to at the first and second base values for each cylinder combination, the means (17 a - 17 d , 18, 52, 73) for periodically perturbing the perturbed control input being arranged to perturb the perturbed control input for selected cylinder combinations, the means (19) for determining the actual slope being arranged to determine the actual slope for the selected cylinder combination, and the control strategy being arranged to obtain the desired slope for each cylinder combination. A system as claimed in any one of the preceding claims, characterized by including means (80) for detecting engine roughness and means (81 - 84) for overriding one of the corrected values when engine roughness exceeds a predetermined level. A system as claimed in any one of the preceding claims, characterized by including means for detecting knock and means for overriding one of the corrected values when knock exceeds a predetermined level. A method of controlling an internal combustion engine having at least two control inputs which affect an engine output, the method comprising establishing a first base value for a first engine control input as a function of engine operating conditions, establishing a second base value for a second engine control input as a function of engine operating conditions, applying corrections in accordance with a control strategy to the first and second base values to obtain first and second corrected values, periodically perturbing an engine control input to obtain a perturbed engine control input, monitoring the engine output, and determining the actual slope of the engine output with respect to the perturbed engine control input, characterized in that the control strategy being arranged to provide corrections according to the difference between a desired slope and the actual slope up to a predetermined maximum magnitude to one of the base values and then corrections according to the difference to the other of the base values so as to reduce the difference. A method of controlling an internal combustion engine having at least two control inputs which affect an engine output, the method comprising establishing a first base value for a first engine control input as a function of engine operating conditions, establishing a second base value for a second engine control input as a function of engine operating conditions, applying corrections in accordance with a control strategy to the first and second base values to obtain first and second corrected values, periodically perturbing an engine control input to obtain a perturbed engine control input, monitoring the engine output, and determining the actual slope of the engine output with respect to the perturbed engine control input, characterized in that the control strategy being arranged to provide corrections simultaneously to the first and second base values according to the difference between a desired slope and the actual slope, the corrections being related to each other by a predetermined formula, so as to reduce the difference. A method as claimed in claim 11 or 12, characterised in that the perturbed engine control input is the first engine control input. A method as claimed in claim 13, characterized by controlling ignition timing in response to the first engine control input and fuel mixture in response to the second engine control input. A method as claimed in claim 14, characterized in that air/fuel ratio is controlled in response to the second engine control input. A method as claimed in claim 14, characterized in that exhaust gas recirculation is controlled in response to the second engine control input. A method as claimed in claim 15, characterized by measuring an actual exhaust gas oxygen value, establishing a desired value of exhuast gas oxygen, comparing the actual and desired values of exhaust gas oxygen to form an exhaust gas oxygen error value, and altering the air/fuel ratio so as to reduce the exhaust gas oxygen error value. A method as claimed in any one of claims 11 to 17 for controlling a multi-cylinder engine, characterized by establishing a plurality of combinations of cylinders of the engine each of which includes at least one cylinder, selecting each combination in turn, applying corrections to the first and second base values for each cylinder combination, and perturbing the perturbed engine control input for the selected combination, the control strategy being arranged to obtain a desired value of the actual slope for each cylinder combination. A method as claimed in any one of claims 11 to 18, characterized by detecting engine roughness and overriding one of the corrected values when engine roughness exceeds a predetermined level.

Inventors: IRONSIDE, JOHN MICHAEL, WILLIAMS, DAVID
Applicants: LUCAS INDUSTRIES PUBLIC LIMITED COMPANY
Application year: 1988
Main classification: F02D41
IPC codes: F02D41, F02P5, F02D45, F02D21, F02M25