IHI N1 \ 1 w H “I W “7 Tm LIBRARY Michigan State “‘6‘ University I This is to certify that the thesis entitled COMBUSTION MODELING AND AlR-TO-FUEL RATIO AND DUAL- FUEL RATIO CONTROL OF AN INTERNAL COMBUSTION ENGINE presented by Stephen Daniel Pace has been accepted towards fulfillment of the requirements for the MS. degree in Electrical Engineering major Professor’s Signature N011 . / O, 9 C90 8' Date MSU is an Affirmative Action/Equal Opportunity Employer PLACE IN RETURN BOX to remove this checkout from your record. TO AVOID FINES return on or before date due. MAY BE RECALLED with earlier due date if requested. DATE DUE DATE DUE DATE DUE 3 I N959. 0 21th 5/08 K1IProjIAccsPrelelRC/Date0uecindd COMBUSTION MODELING AND AIR-TO-FUEL RATIO AND DUAL-FUEL RATIO CONTROL OF AN INTERNAL COMBUSTION ENGINE By Stephen Daniel Pace A THESIS Submitted to Michigan State University in partial fulfillment of the requirements for the degree of MASTERS OF SCIENCE Electrical Engineering 2008 ABSTRACT COMBUSTION MODELING AND AIR-TO-FUEL RATIO AND DUAL-FUEL RATIO CONTROL OF AN INTERNAL COMBUSTION ENGINE By Stephen Daniel Pace Internal combustion (IC) engines are optimized to meet exhaust emission requirements with the best fuel economy. Closed loop combustion control is a key technology that is used to optimize the engine combustion process to achieve this goal. In order to conduct research in the area of closed loop combustion control, a control oriented cycle-to-cycle engine model, containing engine combustion information for each individual engine cycle as a function of engine crank angle, is a necessity. In this research, the in-cylinder pressure of an IC engine is modeled using the mass fraction burned (MFB), which is represented by the Wiebe function. Using MFB, along with other engine control inputs, an engine in-cylinder pressure signal can be constructed as a function of crank angle over an engine operational map. Air-to-fuel (A/F) ratio is the mass ratio of air to fuel trapped inside a cylinder before combustion begins, and it affects engine emissions, fuel economy, and other performances. In this research, a multi-input-multi-output sliding mode control scheme is used to simultaneously control the mass flow rate of both port fuel injection (PFI) and direct injection (DI) systems to regulate the A/F ratio and fuel ratio of PFI to DI to desired levels. The control target is to maintain the A/F ratio at stoichiometry and the fuel ratio to a desired value between zero and one. The performance of the sliding mode controller is compared with that of a baseline proportional, integral, and derivative (PID) controller. Copyright by Stephen Daniel Pace 2008 T0 Daddy, Mommy, Stacey, and my entire family For All Their Love and Support iv Acknowledgements I would like to thank my advisor Dr. Guoming (George) Zhu for supporting me through my graduate work. His knowledge in the area of automotive engine modeling and control was invaluable in my quest to complete successful research. Also Dr. Zhu’s guidance challenged me to achieve and allowed me to flourish as a graduate student. I would also like to thank Dr. Hassan Khalil for his advice and direction while investigating the sliding mode controller design. I would also like to thank Dr. Percy Pierre and Dr. Barbara O’Kelly for their guidance and support in helping me attend and be successful in graduate school. Finally, I would like to thank Dr. Uchechukwu Wejinya, Anthony Plummer, and my closest friends for supporting me through this process. TABLE OF CONTENTS LIST OF TABLES ................................................................................. viii LIST OF FIGURES ................................................................................. xi CHAPTER 1: INTRODUCTION ........................................................................................ l 1.1 Objective .............................................................................................................. 1 1.2 Engine Operating Cycle ....................................................................................... 2 1.3 Air-to-Fuel Ratio ................................................................................................. 4 CHAPTER 2: ENGINE MODELING AND SIMULATION ............................................. 6 2.1 Background .......................................................................................................... 6 2.1.1 Combustion Process .................................................................................... 6 2.1.2 Abnormal Combustion ................................................................................. 6 2.1.3 Cylinder pressure ......................................................................................... 7 2.2 Cylinder Pressure Model ..................................................................................... 8 2.2.1 Wiebe Function ............................................................................................ 8 2.2.2 Wiebe Function Calibration ...................................................................... 10 2.2.3 Motoring Pressure ..................................................................................... 13 2.2.4 Total Cylinder Pressure ............................................................................. 15 2.2.5 Cylinder Pressure Model Simulation ......................................................... 18 CHAPTER 3: AIR-TO-FUEL AND FUEL RATIO MODELING ................................... 23 3.1 Air-to-Fuel Ratio Modeling ............................................................................... 23 3.1.1 Air Flow ..................................................................................................... 23 3.1.2 Fuel Flow ................................................................................................... 24 3.1.3 Air-to-Fuel Ratio Model Operating Speed ................................................ 25 3.1.4 Physical System Dynamics ........................................................................ 26 3.1.5 Air-to-Fuel Ratio Sensor ............................................................................ 26 3.1.6 Stoichiometric Air-to-Fuel Rat1027 3.1.7 Air-to-Fuel Ratio Calculation .................................................................... 28 3.2 Fuel Ratio Modeling .......................................................................................... 29 3.2.1 Fuel Ratio Uses .......................................................................................... 29 3.2.2 Fuel Ratio Calculation .............................................................................. 30 3.3 Air-to-Fuel Ratio and Fuel Ratio Model Simulation ......................................... 31 CHAPTER 4: BASELINE CONTROL DESIGN ............................................................. 35 4.1 Previous Controller Designs .............................................................................. 35 4.2 Baseline Controller Design ................................................................................ 36 4.3 Simulation Results ............................................................................................. 39 4.3.1 Simulation 1 ............................................................................................... 40 4.3.2 Simulation 2 ............................................................................................... 41 CHAPTER 5: SLIDING MODE CONTROL DESIGN .................................................... 44 5.1 Sliding Mode Control Theory ............................................................................ 44 5.2 Sliding Mode Control Model ............................................................................. 44 5.3 Sliding Mode Controller Design ........................................................................ 49 5.4 Sliding Mode Controller Simulations ................................................................ 52 vi 5.4.] Simulation 1 ............................................................................................... 52 5.4.2 Simulation 2 ............................................................................................... 57 5.4.3 Simulation 3 ............................................................................................... 60 5.4.4 Simulation 4 ............................................................................................... 62 5.5 Observer for Sliding Mode Controller ............................................................... 66 5. 5. 1 Observer Design ........................................................................................ 67 5.5.2 Observer Simulation .................................................................................. 68 CHAPTER 6: CONCLUSIONS ........................................................................................ 70 6.1 Cylinder Pressure Model Conclusions ............................................................... 70 6.2 Air-to-Fuel Ratio and Fuel Ratio Control Conclusions ..................................... 71 BIBLIOGRAPHY .............................................................................................................. 74 vii Table 2-1 Table 2-2: Table 2—3: Table 2-4: Table 2-5: Table 2-6: Table 2-7: Table 6-1: Table 6-2: LIST OF TABLES : Data from five DI engine tests ......................................................................... l I Data from five DI engine tests with parameters a, m, and A0 ......................... 11 Values for Wiebe parameter a for extended engine operating conditions ....... 12 Values for Wiebe parameter m for extended engine operating conditions ...... 12 Values for Wiebe parameter A6 for extended engine operating conditions ..... 13 Values for W, for extended engine operating conditions ................................. 18 Values of the variance for the extended engine operating conditions .............. 18 Comparison of controllers for equivalence ratio .............................................. 72 Comparison of controllers for fuel ratio ........................................................... 73 viii Figure l-l: Figure 2-1: Figure 2—2: Figure 2-3: Figure 2-4: Figure 2-5: Figure 2-6: Figure 2-7: Figure 2-8: Figure 3-1: Figure 3-2: Figure 3-3: Figure 4- 1: Figure 4-2: Figure 4-3: Figure 4-4: Figure 4-5: Figure 4-6: Figure 4-7: Figure 5-1: Figure 5-2: Figure 5-3: LIST OF FIGURES The four stroke engine cycle [1] ....................................................................... 3 A typical MFB vs. crank angle curve [I] .......................................................... 9 MFB vs. crank angle (Wiebe function: 60 = 340, A6 = 50, a = 5, m = 2) ....... 10 Motoring pressure raw data ............................................................................ 14 Two-way filter applied to motoring pressure ................................................. 15 Volume in the cylinder at each crank angle .................................................... l6 Cylinder pressure plot (2500RPM, 100% load, stoich. A/F ratio) ................. 19 Cylinder pressure plot (1500RPM, 100% load, stoich. A/F ratio) ................. 20 Cylinder pressure plot (1500RPM, 50% load, stoich. A/F ratio) ................... 21 Equivalence ratio and fuel ratio model in Simulink ....................................... 32 Subsystem of equivalence ratio and fuel Ratio model in Simulink ................ 33 Open loop response of equivalence ratio and fuel ratio model ....................... 34 Cascaded PID and PI controllers .................................................................... 37 PID controller for the equivalence ratio error.......... ....................................... 38 PI controller for the fuel ratio error ................................................................ 39 Closed loop response of simulation 1 ............................................................. 40 PFI and DI control inputs for simulation 1 ..................................................... 41 Closed loop response of simulation 2 ............................................................. 42 PFI and DI control inputs for simulation 2 ..................................................... 43 Equivalence ratio and fuel ratio model divided into 3 sections ...................... 45 Oxygen sensor dynamics of G1 ...................................................................... 45 Air flow dynamics of G2 ................................................................................ 46 ix Figure 5-4: Fuel flow dynamics of G3 .............................................................................. 46 Figure 5-5: Open loop response of equivalence ratio and fuel ratio transformed model ..49 Figure 5-6: States of the system for simulation 1 .............................................................. 53 Figure 5-7: States for the system to achieve desired equivalence and fuel ratios ............. 56 Figure 5-8: Closed loop response of simulation 1 ............................................................. 57 Figure 5-9: Closed loop response of simulation 2 ............................................................. 59 Figure 5-10: PF] and DI control inputs for simulation 2 ................................................... 60 Figure 5-11: Closed loop response of simulation 3 ........................................................... 61 Figure 5-12: PFI and DI control inputs for simulation 3 ................................................... 62 Figure 5-13: Maximum and minimum eigenvalues of X(e) .............................................. 63 Figure 5-14: Closed loop response for simulation 4 .......................................................... 65 Figure 5-15: PFI and DI control inputs for simulation 4 ................................................... 66 Figure 5-16: Estimated states generated by state estimator ............................................... 69 Figure 6-1: Integration of mean value engine model and cylinder pressure model .......... 71 Chapter 1: Introduction The internal combustion (IC) engine is designed to produce power from the energy that is contained in its fuel. More specifically, its fuel contains chemical energy and together with air, this mixture is burned to output mechanical power. There are various types of fuels that can be used in IC engines which include petroleum, bio-fuels, and hydrogen. The output power produced by an IC engine results from the fuel, that it uses, and also its mechanical parts. 1.1 Objective The first objective of this work is to develop an engine combustion model for an IC engine. Modeling of an entire IC engine is a very complicated process, which is due to the many parameters and characteristics that an engine can have. One purpose of modeling is to save development costs of real engines and minimizing the risks of damaging an engine when validating controller designs. Nevertheless, developing a small model, for specific controller design purposes, can be done and then validated on a larger, more complicated model. The smaller model that is of interest in this work is a cylinder pressure model. Once an accurate cylinder pressure model is achieved, the controller can be designed and validated based upon this model. Although this is not part of this research, designing a controller based on a specific model is the idea of the second objective. There are many types of controllers developed for IC engines, which include spark- timing control, idle speed control, and engine knock control. In this work, a multi-input and multi-output air-to-fuel ratio and fuel ratio controller will be designed for an IC engine, which is the second objective. 1.2 Engine Operating Cycle In an internal combustion engine, a piston moves up and down in a cylinder and power is transferred through a connecting rod to a crank shaft. The continual motion of the piston and rotation of the crank shaft as air and fuel enter and exit the cylinder through the intake and exhaust valves is known as an engine cycle. The first and most significant engine among all internal combustion engines is the Otto engine, which was developed by Nicolaus A. Otto in 1876 [1]. In his engine, Otto created a unique engine cycle that consisted of four piston strokes. These strokes are: 1. Intake stroke 2. Compression stroke 3. Expansion stroke 4. Exhaust stroke Intake Compression Expansion Exhaust ’141/1/ air/- /: "nun”-ls ‘7’] \ u—yvu....e.. t l l:- l n, AalaI/lrflttlraap—ruap' I all lzalc:z;4,4.a ..l . / . IIu/III/IlllI/IIIIII/I/ Figure [—12 The four stroke engine cycle [1] During the intake stroke, the piston begins at top-dead-center (TDC) and ends at bottom- dead-center (BDC). An air and gasoline mixture enters the cylinder through the intake valve and in some cases this valve opens slightly before the intake stroke begins to allow more air-fuel mixture into the cylinder. During the compression stroke, the intake and exhaust valves are closed and the mixture is compressed to a very small fraction of its initial volume. The compressed mixture is then ignited by a spark causing the pressure to rise very rapidly. During the expansion stroke, the piston begins at TDC. Due to the high pressure and temperature gases in the cylinder, the piston is now pushed down, causing the crank to rotate. As the piston approaches BDC the exhaust valve opens. During the exhaust stroke, the burned gases exit the cylinder due to the high cylinder pressure and low exhaust pressure and also due to the piston moving up towards TDC. The cycle starts again after the exhaust valve closes. A complete engine cycle is divided into 720 crank angle degrees, where the crank angle is between the piston connecting rod at TDC and the connecting rod away from TDC. This means that the piston will move up and down in the cylinder two times during one complete engine cycle. Since there are two revolutions in one engine cycle, time duration (in seconds) of one engine cycle can be found given the rotations-per-minute (RPM). For example, at 1500 RPM, an engine cycle lasts 80 milliseconds (ms) and at 3000 RPM an engine cycle lasts 40 ms. Although, the Otto cycle was created many years ago, it remains a commonly used engine design. As previously mentioned, the modeling of the entire process of the internal combustion engine is a very complicated one, which involves modeling of thermal dynamics. This research intent is to develop a simple cylinder pressure model that can be used in real-time simulation for controller design and validation purposes. 1.3 Air-to-Fuel Ratio Air—to-fuel (A/F) ratio is the mass ratio of air and fuel trapped inside of the cylinder of an engine before combustion starts. When all of the fuel in the cylinder is combined with all the oxygen in the combustion chamber (cylinder), the mixture of air and fuel is a stoichiometric mixture. For gasoline, stoichiometry is achieved when the A/F ratio is 14.6. In internal combustion engines, the air-to-fuel ratio is measured by a device known as an oxygen sensor, or sometimes called a lambda sensor. The sensor is located in the exhaust manifold and its main purpose is to determine how far away from stoichiometry the air-fuel mixture is. This unique location of the oxygen sensor is important in reducing the response time from the fuel injector to the sensor, which is a very important time delay that is taken into consideration of A/F ratio feedback control systems. The control of the A/F ratio in an engine will be discussed in a later chapter. Chapter 2:Engine Modeling and Simulation This chapter provides the background on the design of a cylinder pressure mode] that can be used for controller design purposes. It also provides simulation results of the model and an analysis of the results. 2.1 Background Background information about concerning the modeling of the combustion process and the cylinder pressure of internal combustion engines will be discussed in this section. 2.1.1 Combustion Process In developing a valid engine model of spark-ignition engines, the concept of the combustion process must be understood. The combustion process is relatively simple and it begins with fuel and air being mixed together in the intake manifold and cylinder. This air-fuel mixture is trapped inside cylinder after the intake valve(s) is closed and then gets compressed. Thereafter, the compressed mixture is combusted, usually close to the end of the compression stroke, due to an electric discharge from the spark plug. The flame that is produced near the spark electrode travels through the unburned air-fuel mixture and extinguishes when it hits the combustion chamber walls. This combustion process varies from engine cycle-to-cycle and also varies from cylinder-to-cylinder. The actual combustion of the air-fuel mixture begins before the end of the compression stroke, extends through combustion stroke, and ends after the peak cylinder pressure occurs [1]. 2.1.2 Abnormal Combustion The previous explanation of the combustion process can be described as the normal combustion phenomenon. A very important abnormal combustion event is known as knock and its name arises from the audible noise that resonates from the pre- ignition of the air-fuel mixture. When the air-fuel mixture is compressed it causes the pressure and temperature to increase inside the cylinder as previously discussed. Unlike normal combustion, the cylinder pressure and temperature can rise so rapidly that it can spontaneously ignite the air-fuel mixture causing high frequency cylinder pressure oscillations. These oscillations cause the metal cylinders to produce sharp noises called knock [1]. 2.1.3 Cylinder pressure The pressure in the cylinder is a very important physical parameter that can be analyzed from the combustion process. The pressure in the cylinder is at a certain point (in the absence of combustion) because the air-fuel mixture within the cylinder is compressed. Immediately after the flame develops, the cylinder pressure steadily rises (in the presence of combustion), reaches a maximum point after TDC, and finally decreases during the expansion stroke when the cylinder volume increases. The time at which the electrical discharge from the spark plug occurs is very important to the combustion event and must be designed to occur at the peak cylinder pressure which occurs very close to top dead center. This is done so that the maximum power or torque can be obtained. As a result, this optimum timing is called Minimal advance for the Best Torque or MBT timing. The spark timing can sometimes be advanced or retarded due to various operating conditions, which include engine speed and load, and this will result in reduced output torque or power. The optimal spark timing (or MBT timing) can also be determined using cylinder pressure signals and mass fraction burned (MFB) derived from the cylinder pressure. In recent years, two important criteria have been found using in-cylinder pressure signals: peak cylinder pressure occurs around 15 degrees after TDC and 50% mass fraction burned occurs at 8 to 10 degrees after TDC [2]. The velocity and acceleration of combustion can be obtained by taking the first and second derivatives of the MFB signal, which can be parameterized by a so called Wiebe function [1]. Using the peak cylinder pressure location, 50% MFB location, and maximum acceleration of MFB as a closed loop control criterion, the MBT spark timing can be optimized in real-time. 2.2 Cylinder Pressure Model Since cylinder pressure is very important to the combustion event and the engine cycle in spark ignition engines, the development of a model that produces the cylinder pressure for each crank angle degree is necessary. 2.2.1 Wiebe Function As previously stated, peak cylinder pressure is important in determining the optimal spark timing that occurs during combustion. The optimum timing for MBT is found relative to the peak cylinder pressure. If the timing is advanced or retarded from this peak pressure, the engine will produce lower output power and torque. The combustion process can be viewed as both a chemical and physical process described by the MFB in the cylinder. MFB signifies how much and how fast chemical energy is released during the combustion cycle and can be parameterized by the Wiebe function. Thus, the Wiebe function is used to mathematically represent the MFB vs. crank angle curve and has been known to model the engine combustion process very well [1]. A typical MFB vs. crank angle has a smooth curve that is “s-shaped.” Figure 2-1 shows a typical MFB vs. crank angle curve. 100 .— -- '0 — Q) . E z :3 m — c: o 3:: 8 — E Q ~— 2 0 - -_--— 1r —w v :7 Crank Angle (degrees) Figure 2—1: A typical MFB vs. crank angle curve [1] The Wiebe function is given by the formula, m+1 xb (6) = l — exp|:— a( 6;:0 j J (l) where xb is the mass fraction burned, 60 is the start of the combustion, A0 is the combustion duration (x1, = 0 to xb = 1), and a and m are calibration parameters [3]. Modifying the values of a and m can significantly change the shape of the s—curve. The 60 is commonly known as spark timing or ignition timing, which is the time (or crank angle) where the air-fuel mixture is ignited. Figure 2-2 shows a MFB curve that was generated by the Wiebe function. MFB using Wiebe function Mass Fraction Bumed l l __ 340 350 360 370 380 390 400 Crank Angle Figure 2-2: MFB vs. crank angle (Wiebe function: 60 = 340, A6 = 50, a = 5, m = 2) 2.2.2 Wiebe Function Calibration Although the Wiebe function can be used to represent MFB, it must be calibrated at various engine operational conditions to provide an accurate MFB representation. To achieve this, a direct injection gasoline engine was tested at various combinations of engine speeds, loads, and air-to-fuel ratios. The data from these tests allowed us to calculate the actual MFB for the various operating conditions. The speed of the engine was measured in rotation per minute (RPM), the load, which is a percent measurement of how hard an engine is working, ranged from zero to one, and finally the it (Lambda), which is calculated by dividing air—to-fuel ratio by stoichiometric (14.6). The five tests that were conducted are shown in Table 2-1. 10 TEST RPM LOAD A (Lambda) 60 l 1500 0.25 1 330 2 1500 0.5 1 330 3 1500 1 l 330 4 2500 l 0.92 340 5 3000 1 0.92 340 Table 2-1: Data from five DI engine tests The actual MFB was then plotted vs. crank angle to obtain “s-curves” that could be represented using the Wiebe function. The 60 for each engine test was known and could be used in the Wiebe function equation. The other parameters a, m, and A6 were unknown and had to be found. To determine these values, the actual MFB plot at a certain engine speed, load, and air-to-fuel ratio was compared to a Wiebe function plot for that operating condition. The correct values for a, m, and A6 were found by matching the actual MFB curve with the Wiebe function plot, which was a trial and error process done using Matlab. These values for the five engine tests are shown in Table 2-2. TEST RPM LOAD A. (Lambda) 60 a A m A6 1 1500 0.25 l 330 0.5 2.3 40 2 1500 0.5 l 330 0.8 3 29 3 1500 1 1 330 0. 15 3.1 30 4 2500 l 0.92 340 0.4 2.4 27 5 3000 1 0.92 340 0.3 2.7 27 Table 2-2: Data from five DI engine tests with parameters a, m, and A9 The five engine tests were extending to more operating conditions to obtain more MFB curves via the Wiebe functions. These operating conditions are under typical real-world engine conditions, and within these conditions engine control systems are designed to achieve their desired outcome. The operating conditions that the tests were extended to W218 ll 0 RPM: 500-5500 0 Load: 0-1 0 ll. (Lambda): 8-16 The map of the values for a, m, and A6 for the operating conditions above are shown in Table 2-3, Table 2-4, and Table 2-5, respectively. LOAD RPM 0 0.25 0.5 0.75 1 1. (Lambda) 500 0.1 0.1 0.1 0.1 0.1 1 1000 0.3 0.3 0.5 0.3 0.1 1 1500 0.5 0.5 0.35 0.15 0.15 1 2000 0.3 0.3 0.5 0.3 0.25 0.95 2500 0.3 0.3 0.3 0.3 0.4 0.92 3000 0.3 0.3 0.3 0.3 0.3 0.93 3500 0.3 0.3 0.3 0.3 0.3 0.92 4000 0.3 0.3 0.3 0.3 0.3 0.91 4500 0.3 0.3 0.3 0.3 0.3 0.9 5000 0.3 0.3 0.3 0.3 0.3 0.9 5500 0.3 0.3 0.3 0.3 0.3 0.9 Table 2-3: Values for Wiebe parameter a for extended engine operating conditions LOAD RPM 0 0.25 0.5 0.75 1 1. (Lambda) 500 2 2.5 2.5 2.5 3.3 1 1000 2.5 2.5 3 3 3 1 1500 2.3 2.3 2.6 3 3.1 1 2000 2.5 2.5 3 3 2.7 0.95 2500 2.5 2.5 2.6 2.6 2.4 0.92 3000 2.5 2.5 2.5 2.5 2.7 0.93 3500 2.5 2.5 2.5 2.5 2.7 0.92 4000 2.5 2.5 2.5 2.5 2.5 0.91 4500 2.5 2.5 2.5 2.5 2.5 0.9 5000 2.5 2.5 2.5 2.5 2.5 0.9 5500 3 2.5 2.5 2.5 3 0.9 12 Table 2-4: Values for Wiebe parameter m for extended engine operating conditions LOAD RPM 0 0.25 0.5 0.75 1 1. (Lambda) 500 38 33 33 33 33 1 1000 41.5 36.5 31.5 31.5 31.5 1 1500 45 40 37 30 30 1 2000 38.5 33.5 26.5 26.5 26.5 0.95 2500 32 27 24 24 27 0.92 3000 25.5 22.5 22.5 22.5 27 0.93 3500 30 27 27 27 27 0.92 4000 30 27 27 27 27 0.91 4500 30 27 27 27 27 0.9 5000 30 27 27 27 27 0.9 5500 30 27 27 27 35 0.9 Table 2—5: Values for Wiebe parameter A6 for extended engine operating conditions Once all the parameters for the Wiebe function were determined for the engine operating conditions, the MFB was known for these engine operating conditions. Thus, by giving the engine speed, load, and air-to-fuel ratio, the MFB (xb) can be found via the Wiebe function. 2.2.3 Motoring Pressure Motoring pressure, Pm, is the pressure in a cylinder when there is no combustion. Naturally a cylinder contains air inside of it even in the absence of combustion. As the piston compresses and expands this air, the pressure rises and falls. This pressure is known as motoring pressure, and it occurs before the start of combustion at 60. More specifically, it is present when the exhaust valve open at the end of an engine cycle (where xb = l) to 60, when combustion begins (where xb = 0). Thus, if 60 is given and the crank angle where xb equals 1 can be determined, then the time that motoring pressure is present can ultimately be found. The raw data of the motoring pressure of a 13 cylinder was found by using a cylinder pressure sensor that calculated the pressure at each crank angle. Figure 2-3 shows the motoring pressure raw data (in Pascal) vs. crank angle. Pressure (Pa) I O l I L I I I O 1 00 200 300 400 500 600 700 Crank Angle (degrees) Figure 2-3: Motoring pressure raw data A two-way filter was applied to the raw data off-line to filter out any noise that was present. The advantage of the two-way filter is that it introduces no phase change, thus keeping the data accurate. The plot of the motoring pressure (in bar) with the filter applied to it versus crank angle is shown in Figure 2-4. 14 Pressure (bar) 0 l J 1 l 1 1 1 0 100 200 300 400 500 600 700 Crank Angle (degrees) Figure 2-4: Two-way filter applied to motoring pressure 2.2.4 Total Cylinder Pressure A cylinder pressure model that calculates the total cylinder pressure over 720 crank angle degrees was created based upon the previous two ideas, mass fraction burned (using the Wiebe function) and the motoring pressure of a cylinder. Therefore, Pcy, (a) = Pm (a) + PM, (a) (2) It is known that the net pressure change between two crank angles is [4]: 1.3 _ __ we) _ we) AP(6)—{P(6+l) P(6)[V(6+1)] H—Vr ] (3) 15 where P is the pressure, V is the volume in the cylinder, and V18 is the cylinder volume at the ignition point [4]. Solving the previous equation for P(6), the net pressure at each crank angle is: Pne,(6) = P,,e,(6— 1) + AP(6— 1) 1.3 = net (9 -1)[Yfl:1_l.] + pr _1{_Yll§_] (4) we) V(6— 1) The volume V( 6) of the cylinder at each crank angle is plotted in Figure 2-5. x 10'4 8 -a———T—‘_V_U _. T I '_ I I I TT—T—TW Cylinder Volume (m3) O 100 200 300 400 500 600 700 Crank Angle (degrees) Figure 2-5: Volume in the cylinder at each crank angle Since MFB is proportional to the net pressure AP,,e,, the net pressure at each crank angle can be rewritten as 1.3 _ _ V(9—1) _ Vlg 5 Rename 1)[ vw) ] +Wbeb(9 1)[V(6_1)] H where Wb is a scaling coefficient and Axb is Axb = xb (6) - X), (6 — I) (6) Since the combustion process varies from cycle to cycle, the cylinder pressure during one engine cycle will be slightly different from the previous one, causing the combustion process to contain stochastic properties. A random property is assigned to coefficient Wb, which is a function of engine speed, engine load, and A/F ratio, to model the cycle to cycle variations. Therefore, the pressure can be calculated by the following equation, l.3 V(6—1) ‘ V18 = _ . _ _ (7) 10(0) Pm(6)+Pnet(6 1>[—V(9) j W!) ”7‘6 ulna—1)] The W), can be viewed as a scaling factor of xb, and its value will increase as the engine speed, load, or A/F ratio increases. Similar to the Wiebe parameters a, m, and A6, Wb had to be calibrated for the engine operating conditions that was previously described. The map of W), for the engine operating conditions is shown in Table 2-6. LOAD RPM 0 0.25 0.5 0.7 5 1 2. (Lambda) 500 5.00 11.75 18.50 25.25 32.00 1 1000 7.10 12.57 19.32 26.07 34.03 1 1500 9.20 10.98 20.13 28.10 36.06 1 2000 11.30 13.88 22.08 30.18 38.15 0.95 2500 13.40 16.78 24.98 33.17 40.23 0.92 3000 15.50 19.69 27.88 36.08 44.27 0.93 3500 17.60 22.59 30.78 38.98 48.20 0.92 4000 19.70 25.49 33.68 42.65 52.14 0.91 4500 21.80 28.39 37.10 46.58 56.07 0.9 5000 23.90 31.55 41.03 50.52 60.00 0.9 I 5500 I 26.00 I 36.67 L4733 l 58.00] 64.00 L 0.9 I Table 2-6: Values for W), for extended engine operating conditions The W}, in the cylinder pressure model was changed at the beginning of each engine cycle to account for the cycle to cycle variations. For one engine cycle, it used one value, but for the next engine cycle it was changed to a different value. The variance of W), was chosen between 3% and 30% of its mean value. Its mean value at a specific engine speed, load, and A/F ratio was the values that are shown in Table 2-6. Its variance was a function of engine speed, load, and A/F ratio, and was calibrated. The values of the variance for the extended engine operating conditions are shown in Table 2-7. LOAD RPM 0 0.25 0.5 0.75 1 2. (Lambda) 500 0.100 0.090 0.080 0.070 0.060 1 1000 0.105 0.087 0.077 0.067 0.057 1 1500 0.110 0.084 0.074 0.064 0.054 1 2000 0.1 15 0.087 0.071 0.061 0.051 0.95 2500 0.120 0.092 0.068 0.058 0.048 0.92 V 3000 0.125 0.097 0.069 0.055 0.045 0.93 3500 0.130 0.102 0.074 0.052 0.042 0.92 4000 0.135 0.107 0.079 0.051 0.039 0.91 4500 0.140 0.1 12 0.084 0.056 0.036 0.9 5000 0.145 0.117 0.089 0.061 0.033 0.9 5500 0.150 0.117 0.083 0.050 0.030 0.9 Table 2-7: Values of the variance for the extended engine operating conditions 2.2.5 Cylinder Pressure Model Simulation After finding the equation for the cylinder pressure that is given above, the implementation of the total cylinder pressure model in Matlab Simulink was begun. The goal of the model was to calculate the cylinder pressure at each crank angle. 18 The cylinder pressure model in Matlab had the ability to output the cylinder pressure at any crank angle, engine speed, engine load, A/F ratio, crank angle, and spark timing (60) are used as the inputs. Figure 2-6 shows the plot of the cylinder pressure signal generated by the model when the engine is simulated at 2500 RPM, 100% engine load, and stoichiometric A/F ratio. 60 I—— T ‘F .T ‘ I U I ‘— A O r J Pressure (bar) 00 O N O I 0 0.05 ' 0.1 0.15 0.2 0.25 0.3 time Figure 2—6: Cylinder pressure plot (2500RPM, 100% load, stoich. A/F ratio) Similarly, Figure 2—7 shows the plot of the cylinder pressure signal generated by the model when the engine was simulated at 1500 RPM, 100% engine load, and stoichiometric A/F ratio. 19 60 I Tl I I' I 50~ b O r I Pressure (bar) 0.) O I L N O l 10~ _. O I J I l __._._- 0 0.05 0.1 0.15 0.2 0.25 0.3 time Figure 2-7: Cylinder pressure plot (1500RPM, 100% load, stoich. A/F ratio) Notice that Figure 2-7 shows the engine simulated at a lower RPM than Figure 2-6, which resulted in lower peak cylinder pressure. The same can be said if the engine were simulated at a lower engine load, the peak cylinder pressure would in fact be lower. Figure 2—8 shows the plot of the cylinder pressure signal generated by the model when the engine was simulated at 1500 RPM, 50% engine load, and stoichiometric A/F ratio. 20 30 "————I_— l I ' _ —— T I 25» ~ 20~ ~ 15» Pressure (bar) 10» - - I ____ . l______ 0 0.05 0.1 0.15 0.2 ”0.25 0.3 time Figure 2-8: Cylinder pressure plot (1500RPM, 50% load, stoich. A/F ratio) Figure 2-8 shows the plot of the cylinder pressure for three full engine cycles and a portion of a four cycle. The first peak or the first cycle can be viewed as an initialization cycle and is similar to a cycle that contains no combustion. Thus, the first cycle is essentially the motoring pressure. Also from Figure 2-8, it can be seen that the peak cylinder pressure varies during each cycle and this is due to the cycle to cycle variations of the combustion process. More specifically, the peak value of the cylinder pressure that is calculated varies over each engine cycle due to the variance of Wb, which causes the combustions variations to be modeled very well. Since an engine cycle consists of 720 crank angle degrees, the cylinder pressure model gives the cylinder pressure signal for each engine cycle operating under the engine conditions that were previously discussed. Consequently, this model can be integrated 2l with a mean valve engine model to produce cylinder pressure signals using the engine speed, load, air-to-fuel ratio, and ignition timing from the mean valve engine model. Based on the cylinder pressure signal, engine combustion control strategies can be developed to control the peak cylinder pressure location, the intake and exhaust valve opening and closing timings, ignition timing, etc. Therefore, this cylinder pressure model, integrated with the mean valve engine model, provides a tool for developing closed loop combustion control strategies. 22 Chapter 3: Air-to-Fuel and Fuel Ratio Modeling In this chapter, an air-to-fuel ratio and fuel ratio model is introduced. The purpose of this model is to use simple dynamics to model an engine’s A/F ratio for control design and evaluation. In addition to the calculation of the A/F ratio in this model, the ratio of a dual-fuel system is also developed. 3.1 Air-to-Fuel Ratio Modeling Air fuel ratio is the mass ratio of air and fuel trapped inside the cylinder before combustion starts. Mathematically it is the mass of the air divided by the mass of the fuel as shown in the equation below. A/ F ratio = M (8) m fuel If the ratio is too high or too low, it can be adjusted by adding or reducing the amount of fuel per engine cycle that is injected into the cylinder. The engine A/F ratio that is modeled in this research can be adjusted by both a port fuel injector and a direct fuel injector. 3.1.1 Air Flow The air mass used for calculating the A/F ratio is physically the air mass trapped inside the cylinder of an engine. This air mass enters the intake manifold through the throttle and can be measured using a mass-air-flow sensor. The throttle is a valve that directly regulates the amount of air entering the cylinder, and it can have a direct effect on the A/F ratio. In automotive vehicles, the throttle valve opening amount is determined by acceleration pedal or controlled by an engine controller. 23 Since the air mass flow is adjusted for regulating engine output torque (or power), it can not be adjusted for controlling engine A/F ratio and the fuel mass flow is used to control A/F ratio. In this model, the air mass flow rate in Air is modeled as a nominal value plus a disturbance input as shown in the equation below mm, =w0+Aw whereabzl (9) The disturbance A0) is due to the change in the air flow when the engine operational condition changes. The air mass flow at certain engine operating conditions could be constant, while at others, the air mass flow could abruptly increase or decrease. One example of this is when the throttle valve remains open at a constant angle and then is quickly changed to a larger angle, allowing more air to enter the cylinder. When simulating the abrupt change of air mass flow described in the previous example, this change can be modeled as a step input Similarly, the air mass flow changes over engine cycles due to manifold fiow dynamics. In this case, the air mass flow variations are modeled as a constant signal plus a random signal. The random signal is bounded by a constant value. 3.1.2 Fuel Flow The fuel mass used to calculate the A/F ratio is the fuel flow rate, mfm), that enters the cylinder. In the engine that is being studied in this research there are two fuel systems providing fuel for the cylinder. The first fuel system is known as a port fuel injection (PFI) system and is very common in gasoline engines. The liquid fuel that is sprayed by a PFI injector does not directly enter the cylinder at the time that it is initially 24 sprayed. Instead it is injecting into the intake port and will enter the cylinder when the intake valve opens. Thus, there is a very small amount of time between when that fuel is injected and when it actually enters the cylinder. Also, the liquid fuel that is sprayed by into the intake port only partially enters the cylinder after the intake valve opens. Some of the fuel is stored as small fuel puddles on the intake port walls (which can evaporate) and some at the back face of the intake valve. The fuel flow dynamics of a port fuel injector is known as wall-wetting dynamics [5]. The A/F ratio wall-wetting dynamics can be model by the following transfer function m _a'-s+l PFI ,B-s+l (10) where the values for a and 6 that were used in the model were 0.5 and 0.8, respectively. The second fuel system that sprays fuel into the cylinder is known as a direct injection (DI) system. Obviously there is no wall-wetting dynamics involved when a D1 is used because fuel is directly injected into the cylinder. The amount of fuel per engine cycle that is injected by both injectors is done so by applying electric pulses to the injector solenoid that is located at one end of the injector. The opposite end of the injector is the spray tip where fuel is released. When the solenoid is energized, the plunger is lifted slightly to allow pressurized fuel to be sprayed. The electric pulses that are applied to the solenoid are proportional to the amount of fuel to be sprayed. 3.1.3 Air-to-Fuel Ratio Model Operating Speed To begin developing a system that models the A/F ratio, the first assumption that is made is that the engine will be running at a constant speed. For a given engine speed, 25 the amount of time for an engine cycle to complete can be found. The engine speed chosen for this model was 1500 RPM, thus an engine cycle will last 80 milliseconds which is shown below. minute 605econds 2rounds t .. = =.08seconds W16 1500rounds minute cycle (11) Knowing the amount of time it takes to complete one engine cycle is important in modeling the physical time delays of the engine. 3.1.4 Physical System Dynamics The biggest challenge when modeling an engine that will be used for controller design purposes, is determining how to model the delays of the engine. From previous work, it has been concluded that there are three characteristic delays that must be accounted for during transient operation of an engine. These delays are the time-delay of the control system, a transport delay in the intake manifold, and a physical delay of the fuel flow [6]. There are other delays that occur in an engine, but the previous three will be the ones of interest in this work. The first delay that will be accounted for in this A/F ratio model is the delay of the fuel flow. The delay of the fuel flow results from the finite rate of evaporation of the fuel film on the intake manifold and port walls. This occurs when a port fuel injector is used. 3.1.5 Air-to-Fuel Ratio Sensor The A/F ratio is dependent on how far away from stoichiometry the air-fuel mixture is. Stoichiometry is achieved when all the available fuel molecules are combined with the available oxygen molecules. Specifically, for gasoline, when the mass ratio is 26 14.6 to l, the mixture is said to be stoichiometric. In IC engines, the A/F ratio is denoted by the variable )1. and a stoichiometric mixture has a )1 value equal to 1. This A is found by dividing the current A/F ratio by the stoichiometric A/F ratio, as shown in equation (12). _ A/F ratio A/F ratiostoich (12) If ,1 is less than I, then the mixture is said to be rich, and a mixture is said to be lean if 1. is greater than one. As previously stated, the air-to-fuel ratio is measured by a device known as an oxygen sensor, or sometimes called a lambda sensor. The sensor is located in the exhaust manifold and its main purpose is to determine how far away from stoichiometry the air- fuel mixture is. The time it takes for the sensor to determine that the mixture is above or below the value of 1, can be viewed as a time delay and must be modeled as such. Typically this delay is about 40 milliseconds when an engine is running at 1500RPM. 3.1.6 Stoichiometric Air-to-Fuel Ratio Engines are designed to maintain a stoichiometric A/F ratio in order to maximize the efficiency and life of the three—way catalyst found in the oxygen sensor. Air-to-fuel ratios that are richer than stoichiometry allow for greater peak engine power, leading to poor fuel economy. Similarly, an A/F ratio leaner than stoichiometry will result in near optimum fuel mileage and will produce the least amount of carbon dioxide (C02) emissions, but can also produce sharp rises in nitrogen oxides (NOx) since the three-way catalyst becomes less efficient under lean operation conditions. Also, if the A/F ratio becomes too lean, the air-fuel mixture may sometimes fail to ignite, causing misfire, leading to high hydrocarbon (HC) emissions. Although it may be possible to run 27 smoothly at a lean A/F ratio, manufacturers must focus more on engine emissions due to federal and state environmental regulations. 3.1.7 Air-to-Fuel Ratio Calculation Since air-to-fuel ratio is the ratio of the mass of air to the mass of fuel, then the mathematical calculation of this ratio is found by dividing the mass of the air by the mass of the fuel. The total fuel in the cylinder, mm, , is the fuel flow from the port fuel injector and the direct injector as shown in the equation below. mFuel = then + "'11)! (13) Engines are design to achieve a target stoichiometric A/F ratio, thus the target ratio, Atarget, should be equal to one. The equation below gives the expressing for itarget. mAir ’11 t Z _———. 14 arge 14.6 ' mpue, ( ) The inverse of A/F ratio 1/1 is known as the equivalence ratio (D , and is given as 14.6-mm?) ¢target : (15) mAir The remainder of this research will use ¢target instead of Atarget because it will allow for easier calculations. The air flow as discussed in equation (9) was mm, = (1)0 +Aa) wherewo :1 Therefore, marge, becomes . l ¢target = 146 ' szre/[Wj (I6) 28 . . . l Usmg the Taylor ser1es expansmn about 600 = l of = mm, ((00 + Aw ,I = —1-——-1-§Aa) (17) mair 0'1) (lb Finally, the target equivalence ratio is given in the equation below. ) results in . l l ¢target : 14:6 ' mFtiel[a_b"—%'2_Aw] (18) The above target equivalence ratio calculation will be combined with a fuel ratio calculation that will be used for controller design purposes. 3.2 Fuel Ratio Modeling The sum of the fuel that is injected into the cylinder by the port fuel injector and the direct fuel injector is the total fuel, thuel. The amount of fuel injected by one injector divided by the sum of the two is the fuel ratio of PFI to DI. 3.2.1 Fuel Ratio Uses The fuel ratio can be used to determine which fuel system should have a larger impact on how much fuel is injected into the cylinder. Since a direct fuel injector has immediate injection of its fuel with significant charge cooling effect, it can have a quicker response to the desired amount of fuel that is needed by an engine. Although a port fuel injector may have a slower response due to its wall-wetting dynamics, the fuel ratio will impact the combustion characteristics of an engine. Fuel ratio also can be used to regulate or control two fuel types. For example, an engine may have the ability to run on gasoline and ethanol. The gasoline could be 29 injected by a port fuel injector, while the ethanol could be injected by a direct injector. Although, implementation of this may require to separate fuel lines and separate fuel tanks, the ratio of gasoline to ethanol, or two other types of fuels, may be of interest to future engine control designers. 3.2.2 Fuel Ratio Calculation The calculation of the fuel ratio is found by dividing the fuel in the cylinder from one injector by the total fuel. For PFI, the fuel ratio calculation is shown in the equation below. FuelRatioz . PF]. 2 .PF’ (19) mPFI + m0] mFuel Solving the target equivalence ratio for m Fuel gives mair m , = —— Furl 14-6'¢targct (20) Substituting equation (20) for raw, into equation (19) Fuel Ratio: . mPF’ = PF] ¢lar°el (21) mair l14-6'¢target mair From the Taylor expansion of . and using charge. = l , the fuel ratio becomes mair . . l 1 Fuel Ratio 21461on, ————2—Aa) (22) ‘00 wt) The above fuel ratio calculation will be combined with previous A/F ratio calculation and will be used for controller design purposes. 30 3.3 Air-to-Fuel Ratio and Fuel Ratio Model Simulation Knowing the equations for the calculation of the air-to-fuel ratio (using the equivalence ratio) and the fuel ratio, the development of the model was begun. The model was developed in Matlab Simulink and it included the modeling of the wall wetting dynamics of the port fuel injector, the air flow dynamics, and three appropriately modeled time delays. These time delays were the time delay of the fuel injected by the port fuel injector, the time delay of the fuel injected by the direct injector, and the oxygen senor calculation delay. A delay was also included for the air flow dynamics. The air-to-fuel ratio and fuel ratio model was assumed to be operating at 1500RPM thus the amount of time per engine cycle would be 80 milliseconds. Knowing this, the time delays in the model were: 1. Time delay of PFI response: 50 milliseconds 2. Time delay of D1 response: 50 milliseconds 3. Time delay of oxygen senor calculation: 40 milliseconds 4. Time delay of air flow: 200 milliseconds These time delays were linearized as first order transfer functions as shown below 1. Transfer function of PFI delay: ——1— 0 05s + l 2. Transfer function of DI delay: 055 + l 3. Transfer function of oxygen senor calculation delay : —L— 0.04s + l 4. Transfer function of air flow delay: 0.23 + 1 3| The time delays were cascaded together with the calculation of the equivalence ratio and fuel ratio in Simulink as shown below. .9 E .9 C .— 9 8 .2 LL 3 CT 1 DJ #3 s L c; \ <9 3 \ 2 "-.--,_\ X l” I 14.6 0.055+1 j l l/ ‘\\ ' . — l N i a b 9L L/ Figure 3—1: Equivalence ratio and fuel ratio model in Simulink A subsystem of the model shown in Figure 3-1 is shown below. 32 > PFI Equivalence Ratio > > Air Fuel Ratlo > “Eq. Ratioland Fuel Ratio Model Figure 3-2: Subsystem of equivalence ratio and fuel Ratio model in Simulink From Figure 3-2 it is clear that the system model has two outputs, the equivalence ratio and the fuel ratio. Likewise, the model will has 3 inputs, the PFI input, the DI input and air mass input. As previously discussed, the air mass is a disturbance input, and the PFI and DI fuel mass are the control inputs. Figure 3-3 shows the open loop response of the equivalence ratio and fuel ratio signals when the PFI and DI inputs are a constant value of 0.04 and the air input is a constant value of 0.1. 33 l! a _ H H M 40' -_ _ . w _ .2 _ _ 2 . o —_ _ . _ _ -_ _ _ _ .mw I--+.ri:tfi ....... n ma 19 -_ _ _ . A I - . _ _ . 0.1% — _ H . .EF _ _ _ . Il11IAI411111iII|111l-_. 1111111 _ 111111.._..— 18 . _ . _ - . . _ _ — __ _ . _ u _ . _ _ Flill-IL 11111111111111 L IIIIII L1 11L 17 _ A . _ _ . . a _ _ . a _ _ . A I111 1121111111611111111 111161111112 111111 1_ , _ _ _ L6 _ _ . _ _ “_ _ _ _ _ —_ _ _ _ _ 1.. _ _ . _ 5 I111—11_1111111_11111I1_ 1111111 _ 11111111 _ 111111 1 _ _ _ _ _ u. _ _ . _ _ _ _ _ _ u. _ _ 1d . — - . 036m. 6:". new ozmm 605.6233 time Figure 3-3: Open loop response of equivalence ratio and fuel ratio model The open loop time response of the system shows that given the constant inputs for PFI, DI, and air, the equivalence and fuel ratios will become constants at steady state. 34 Chapter 4: Baseline Control Design This chapter will discuss the baseline control design that was developed to control the air-to-fuel ratio of IC engines. It will begin by discussing several controller designs that have already been developed and designs that are currently being used in production. The chapter will conclude by discussing the design of a baseline proportional integral derivative (PID) controller. 4.1 Previous Controller Designs There have been several engine controller designs over the past 40 years in which the goal is to improve the efficiency and exhaust emissions of the automotive engine. A key development in the evolution was the introduction of a closed loop fuel injection control algorithm by Rivard in the 1973 [7]. This strategy was followed by an innovative linear quadratic control method in 1980 by Cassidy [8] and an optimal control and Kalman filtering design by Powers [9]. Although the theoretical design of these controllers was valid, at that time it was not realistic to implement such complex designs. Therefore, the production of these designs did not exist and engine designers did adopt the methods. Due to the increased production of the microprocessor in the 1990’s, it became practical to use these microprocessors in developing more complex control and estimation algorithms that could potentially be used in production automotive engines. Specific applications of A/F ratio control based on observer measurements in the intake manifold was developed by Benninger in 1991 [10]. Another approach was to base the observer on measurements of exhaust gases measured by the oxygen sensor and on the throttle position, which was researched by Onder [l I]. These observer ideas used linear 35 observer theory. Hedrick also used the measurements of the oxygen sensor to develop a nonlinear, sliding mode approach to control the A/F ratio [12]. All of the previous control strategies were applied to engines that used only port fuel injections, where fuel was injected in the intake manifold. The development of these control strategies for direct injection was not practical because the production of direct injection automobiles did not begin until the mid 1990’s. Mitsubishi began to investigate combustion control technologies for direct injection engines in 1996 [13]. Furthermore, engines that used both port fuel and direct systems appeared a couple years ago, leading to the interest of developing the corresponding control strategies. Current production A/F ratio controllers use closed loop feedback and feed forward control to achieve the desired stoichiometric mixture. These controllers use measurements from the oxygen sensor to control the desired amount of fuel that should be injected over the next engine cycle and have been able to control the A/F very well. 4.2 Baseline Controller Design Two controller designs for the contr01 of the A/F ratio and the fuel ratio were developed in this research. The first design was a baseline controller, in which the control design target was two-fold: 1. Control the air-to-fuel ratio at a desired value of unity 2. Control the fuel ratio at a desired value between zero and unity The design of a baseline controller to control the A/F ratio and the fuel ratio was very straight forward. Since there were two outputs from the A/F ratio and fuel ratio model, this means that there would be two inputs into the baseline controller. Similarly, the two 36 outputs of the controller result from the two control inputs of the port fuel injector signal and direct injector signal. In a typical PID controller, the controller corrects the error between the desired output value and the measured value. Since the equivalence ratio and fuel ratio are the two measured signals, two controllers were cascaded together to control the PFI and DI inputs. The first was a PID controller that corrected the error between the desired equivalence ratio and the measured equivalence ratio; while the second was only a proportional integral (PI) controller that corrected the fuel ratio error. Figure 4-1 shows the two cascaded controllers. PFI > PF|_input PFI > > Eq. Ratio Error ____ _> Dl input 9' -——j 01 > 1 > Fuel Ratio Error 59- Ratio Fuel Ratio U ‘— PID Controller Pl Controller Figure 4-l: Cascaded PID and PI controllers There are three parameters or control gains of a PID controller that must be determined. These gains are KP, K, and Kd, which correspond to the proportional, integral, and derivative terms. Within the equivalence ratio PID controller, there where six gains, three for the PFI PID terms and three for the DI PID terms. These parameters were found by tuning the response of closed loop system to be stable and relatively fast. The values of the six gains were: KP] = sz = 0.000005 K11=K12=-3 37 Kd1 = Kdg = 0.0207 Figure 4-2 shows the PID controller for the equivalence ratio error signal using the previous gains. The equivalence ratio error signal is decoupled into one signal for the PFI output and one for the DI output. ~—e —>15e- 00? "M Kd1 Derivative _ — 1 Q 1 y ——-——-— 0.3 I———> g 2 —--~——w* —————— {I > Eq. Ratio K't R——- PFI Error 1 Integrator_ 1 IL A ———>{ 0.0207 -— ——~ Proportional_ 1 Kp1 r—'———' _-_ -- .. ,%,_2___ I5e-006 -———} du/dt — - Kd2nJ Deng/e; 1 F” “ 1 ”I 0.3 -—-—> g — x3 __ .- _ ., DI K12 Integrator _2 H 0.0207 _} Proportional _2 Kp2 Figure 4-2: PID controller for the equivalence ratio error Similar to the PID controller gains for the equivalence ratio, the PI controller of the fuel ratio has only two control gains. These controls gains correspond to the proportional and integral terms and were: Figure 4-3 shows the PI controller for the fuel ratio error using Kp = 0.5 and Ki = 5. Within this PI controller, the fuel ratio error signal was multiplied by the PFI signal, 38 while the DI signal was fed through. Thus, the fuel ratio is controlled only by using fuel ratio error and the PFI signal. The DI signal will be adjusted to be one minus the product of the fuel ratio signal and the PFI signal, since the total ratio can only be between zero and one. This adjustment is done within the A/F ratio and fuel ratio model. -.—_—é 1 5 F‘i E +4 Fuel Ratio -- _ Error K1 1 Integrator l--- l T 0'5 J Proportional Kp ‘—> , [ _1_ JP —— ,, —»———> X fl PFl_input Product PFI Q2 -—--~ - ——-—+<:> Dl_input DI Figure 4-3: PI controller for the fuel ratio error 4.3 Simulation Results The baseline controller was implemented and simulated with the A/F ratio and fuel ratio model in Matlab/Simulink. Several simulations that modeled real world A/F ratio and fuel ratio situations were conducted. For all the simulations, a target equivalence ratio was taken to be unity and a target fuel ratio was 0.6. The selection of unity for the target equivalence ratio was based on the idea of stoichiometry, since engines are design to run at such, while the selection of the target fuel ratio was arbitrary. The main difference between each simulation was how the closed loop system responded to various air flow inputs. Since the air flow is not a controlled input, it can be view as a disturbance or uncertainty, Aw. Although air flow can only be modeled to be between zero and unity, the effectiveness of the controller will be validated by its response to 39 various air input disturbances. These simulations using several air input disturbance will now be discussed and analyzed. 4.3.1 Simulation 1 The first simulation begins using a constant value for the air input and at a later time sums a step input to this initial constant value. This simulates a situation where the throttle (air) initially remains open at a constant angle and then quickly (almost instantaneously) opens or closes to a larger or smaller angle. The constant value was chosen to be 0.1 and the step input value is chosen to be 0.15. The time at which the step input would be added to the constant value was chosen to be at 6 seconds. T I ' — ‘17— I— _ II ”I"- I T 1 1 I l I I 1 _____ ' 1.2-.__-L.-__ 12___11 _____ l _____ L__--J_-___J_I Eq'Ratlo _ I I I I I I I FuelRatio l I 1 I | I | 1 I | | I I I 1 | I I l 1 l 1 I 1 o 1 _----I------: — —- — —' - I I --|-----'- I I .1 ._ 1 \ w""— l 1---1 1 a I 1‘-”‘1 1 I I 1 l l m I I l 1 l 1 1 l I _ l | 1 l 1 l | 1 | g l I | l l | I l I u- 0.84——-—I—--—I—— ——I ------ I ————— I----I—--4 ————— I ----- I—n—a “o I l 1 l l I l l C 1 l | 1 I I I 1 I (U l l \l 1 1 I | 1 1 O I I 1 I I | I 1 | '5: 1 I \ I 1 I m 1 1___7 II“. 1 g (I 0'6 1 W I 1 I a) I 1\ 1 l 1 1 1 1 Q I 1\ 1 1 1 1 1 C 1 \ 1 1 I 1 l 2 l \ l I 1 l 1 g 0.4~—--«-.— ——————————— .'— ————— : ---------------- 8- : ' LU 1 Controller responds to step input 1' l | l l I I | l 7 7.5 ‘8 8:5 '9 9.5 “10 time (seconds) Figure 4-4: Closed loop response of simulation 1 40 The closed loop response of the system in simulation 1 shows a fluctuation at 6 seconds, resulting from the step input that was applied at that time. The controller quickly adjusted the control inputs to maintain the desired equivalence ratio and fuel ratio. 0.07 I I I T l I ‘l ‘F l __ : : : I I I : : """ PF' I r : : : r : : DI 0.06 ..... 1.---4 ..... 1-- ._I ______ I ...... - : : ’;,,__; _____ L : : I I 1 1 I ----—-——--i ----- b—---d ----- I | ”I l l | | | | "’ I I / I I I I I I I 20.05 HHHH T_-__'l""—_-I """" I' "T-_"‘l _____ l ————— I _____ r"— "‘ 5 I " I I I I I I I ‘e "T"""I 't : I I : : : E 1 1 1 I I I 1 I I a 0041—-——:~—————:——- —: ----- ————— : ------ : ————— :— ————— 5 : I | | I I l '0 I I I I I | | c | l I I I l l (u 1 1 1 I I I E 0-03 ”*I—“HI-H-"I ----- I ----- ----- D. 1 l I 1 I 1 0'02 Control inputs responds _ _ I _____ L _ _ _ tostepinput ; ; 0.01 I I 1 : 1 I 7 7.5 8 8.5 9 9.5 10 time(seconds) Figure 4-5: PFI and DI control inputs for simulation 1 The control inputs, PFI and DI fueling, responses in simulation 1 show the control efforts of PFI and DI were increased to achieve and maintain the desired ratios. 4.3.2 Simulation 2 The second simulation begins using a uniform random number for the air input and adds a step input of 0.15 at 6 seconds. The random number had a minimum value of -O.lS, a maximum value of 0.15, and the value changed to a number between these two extremes every time it was sampled. 4| I. I fl l T I l l i 1 1_2;,___-.' ______ : _____ L____I _____ ----- EqRatio I_- I I I I l | I I I f I I I I I 1 1 1 i 1 I I I 1 a "9 f S ,5 1’ 1 I a I 1- 1 VV .3! ’ ' ‘ I}; p; s; “I 2 ‘\‘:5’\' 4‘WV" ' “fi-fi‘y‘V‘f ‘29:.” Controller responds to step input Equivalence Ratio and Fuel Ratio 0.2 ————— I T _____ 1 ————— FT-" T | _ I I I I I 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10 time (seconds) Figure 4-6: Closed loop response of simulation 2 The closed loop response of the system in simulation 2 was very similar to simulation 1 although there was fluctuating random air flow disturbance throughout the entire response. The controller achieved and maintained the desired ratios but due to the random input disturbances could not maintain a smooth response. 42 0.07 0.06 .9 3. 0.05 E "Q E 8 0.04 5 'O C (U E 0.03 :1 0'02 } I 1 , Control inputs responds I _ : : i ; j to step input 1 1 0.01 4 I 1 1 I 1_ 1_..__ -1 ___ _I_-_ 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10 time (seconds) Figure 4-7: PFI and DI control inputs for simulation 2 The control inputs in simulation 2 were similar to those of simulation 1 except for the variations in its signal. The control efforts of PFI and DI achieved the desired ratio but its variations caused fluctuations in the desired NP and fuel ratios. These fluctuations corresponded to the changing random number that was modeled as the air input. 43 Chapter 5: Sliding Mode Control Design The previous baseline PID control design was the first controller that was designed for the A/F ratio and fuel ratio model. The second design was a sliding mode nonlinear controller and will be discussed. 5.1 Sliding Mode Control Theory Before the design of the sliding mode controller, a thorough understanding of the sliding mode control theory must be done. Sliding mode control theory has one key feature that is of intereSt as it applies to the air flow disturbance and that is its robustness to matched uncertainties [14]. In this theory there is a sliding surface or manifold s that must be chosen. During one phase of the system, known as the reaching phase, the states of the system can be forced toward the sliding surface and maintained there. This is achieved by a sign function switching control. During the sliding phase of the system, the states remain on the sliding surface through the use of stabilization [l4]. Designing a sliding mode controller requires states of the system to be known and transformed into a particular from. Therefore, the states of the equivalence ratio and fuel ratio model must be brought to this form. This form, the states of the equivalence ratio and fuel ratio model, and the validation of this form will be discussed. 5.2 Sliding Mode Control Model The A/F ratio and fuel ratio model discussed in Chapter 3 was a simplified model of a portion of an IC engine. It modeled the fuel flow dynamics, air flow dynamics, and 44 calculated both the A/F ratio and fuel ratio. The fuel flow and air flow dynamics along with the calculated ratios led to a nonlinear model. In order to begin the design of a sliding mode controller, the A/F ratio and fuel ratio model had to be transformed into a particular form. This was done by first separating the model into three sections: fuel flow dynamics, air flow dynamics, and oxygen sensor dynamics. Figure 3-1 showed the model in its original form in Matlab/Simulink, while Figure 5-1 shows the same model divided into the three sections. T.— _ _- < _1 Iblni Out1 PFI (mm Out2 DI Fuel Flow Dynamics (G3) I 3 j’lm Out1 Air" Air Flow Dynamics (G2) +1n1 Out1—fl) Equiwlence Ratio Oxygen Sensor Iv H Dynamics (G 1) @ Fuel Ratio Figure 5-1: Equivalence ratio and fuel ratio model divided into 3 sections In Figure 5-1, the oxygen sensor dynamics are denoted as (31, the air flow dynamics are denoted as G2, and the fuel flow dynamics are denoted as G3. The contents of 61, G2, and G3 are shown in Figure 5—2, Figure 5-3, and Figure 5-4, respectively. \ \\\‘ KL)— 14.6 /;‘_>%--> |n1 //. GaIn » --->C:> Cut 1 Figure 5-2: Oxygen sensor dynamics of GI 45 I\‘\.‘ I \\ \\ 1 _ I‘ _— _- C -(1/ (onA2\ C _i ___ Iw—‘flj In 1 I/// 2:124 Out 1 Gain LIE Figure 5—3: Air flow dynamics of G2 alpha-1’3: T T— 1__ \ In1 I’f’ta 9“ I I 231's” + (it—1) 1 < 2 ~ |n2 aid Out 2 Figure 5—4: Fuel flow dynamics of G3 The state space equations of G1, G2, and G3 were found to obtain the states of each of the three dynamics and are shown in equations (23), (24), and (25). X] = Alx] + Blul 23 ==Cix1 ( ) 5c =A x +B a) 2 2 2 2 (24) 3’2 = C2ch X3 = A3X3 + B3143 T T T (25) )3 = C3x3 +D3u3, C3 = [C31 C32] Combining equations (23), (24), and (25) resulted in A] Bl O O X = A2 x+ O C2C3lx3x2 + 32 (0+ 0 M3 (26) A3 0 0 B3 The output equations for the equivalence ratio and fuel ratio using equation (26) resulted in I’EquIo = C 1X1 = C2C31~W3 (27) (28) .I’FueIRano = 14-6 ' C2X2 (C32x3 +-625u1) 46 The values for the matrices were: AI = -25;B1=14.6;Cl= 25; D] =0; A2 = -5;BZ = -1;C2 =5;D2 =0; - 20 0 0.4688 0.625 0 20 20 0 0 0 A3: 0 -20 0 ;Bq= 0 1;Cq= ;D‘;= ; ‘ ‘ ‘ 0 0 0.46875 ‘ 0.625 0 O 0 -l.25 l 0 It can be seen that the state vector x3 has three elements denoted as x31 x3 = x32 x33 States x1 and x3 were scalars. The X, state equation contains nonlinearities which results from the product of the two states x2 and x3. The remaining .122 and 5:3 state equations are linear equations that contain the air input disturbance and the fueling inputs, respectively. Now that the states of the equivalence ratio and fuel ratio model are known, it was transformed into the form [15] '7 = fam, z)+ 6(7). z) (29) 2= fbm, Z) +007, z)" (30) This form, usually referred to as the regular from [14], is special because it allows fa(77,z) to contain the nonlinear portion of the state equation I7 and isolates the disturbance 607,2). Similarly, the fi,(l],z) portion could be nonlinear as well and it is isolated from the input portion G(I],z)u of 2. 47 A change of variables [77] = T - x transformed the original system into the regular 2 form, where x: [x1 x2 X31 x32 x33]T and the transformation matrix Twas — — 1 O 0 O 0 0 l O 0 0 T: 0 O l 0 -0.625 (31) 0 O O O 1 _O 0 0 l 0 J Using the transformation matrix T, which lets 77=[x1 x2 x31—0.6ZSX33]T and Z = [x33 x32]T , then original system (represented in the regular form) becomes -25 0 0 n1 0 1460 0 f7 : O -5 0 772 + 0 21+ 0 772(773+0.625Z1+Z2)+ -I 6 32 0 0 —20 773 —11.25 0 0 ( I L ‘C J W—J fam’ZI 507,2) where 6260-1 , -125 0 z. 1 o u, 0 -20 z2 0 1 uz (33) \ J \__V_.J ffirrm) C To ensure that this transformed model was exactly that of the original model, the open loop response was compared to that of the original. Figure 5-5 shows the open loop response of the transformed equivalence ratio and fuel ratio signals when the PFI and DI inputs are a constant value of 0.04 and the air input is a constant value of 0.1. These were the same values for the PFI, DI, and air inputs that were used in the open loop response of the original model. 48 ___—..___....__._..-————4 .0 co .0 ca ______..4 .o 4:. Avg—__._ _____ ———~—-—< Equivalence Ratio and Fuel Ratio ----- Eq. Ratio Fuel Ratio 0.2 i l 8 9 10 Figure 5-5: Open loop response of equivalence ratio and fuel ratio transformed model The error between the open loop response of the model transformed into the regular form and the original model was extremely small. For the equivalence ratio, the steady state -l3 . error was smaller than 10 and for the fuel who the steady state error was smaller than -5 . . . . 10 . Thus, the transformed model was valid and essentially an exact representation of the original system. 5.3 Sliding Mode Controller Design In sliding mode control theory, the control input 14 is designed to bring the sliding manifold s to zero in finite time and maintain it at zero. To design the sliding manifold s=z—¢(77)=0 a continuously differentiable (0(7)) must be found to stabilize 49 ’7=fa(77,z)+5(77,z) such that its origin is asymptotically stable and ¢(0)=0. Letting z = ¢(77) (shown below), (2)07) can be used to stabilize 17. It should be noted that [21 ] = [691(0)] Z2 ¢2(77) Also, it should be noted that (31(0) and ¢2(77) replaced z] and 22 in the f], state equation. To find ¢(7]) , the partial derivative of 7) (equation (32)) with respect ton was calculated as shown below. a“ "-25 0 0 0 1460 _71 = O _5 O + 0 [30(0) a¢l(77) a¢l(77):|+ O 977 8m 8772 3773 L 0 0 -20 —11.25 _ -T 625772 a¢l_a_(__177)+712§__(32’7(177) 8 a 77~~23+625¢1(77)+¢2(77)+62577 —§",,——(’”+ +772 33,——‘2—"’ a and I 772 + .625772 317;") + 772 “Sign—:1 Choosing a (1)07) that will cancel out the last portion of the f7l state equation was achieved by letting (9(7)) be 1.6 ¢ =[ '7' I (34) '771 ‘773 Once the function ¢(I]) was found, it stabilized the system about the origin. Furthermore, the system was asymptotically stable. Interestingly, the chosen (2)07) decoupled the nonlinear portion of fam, z.) from the linear part. Also, (2(7)) does not contain the state ’72 and removes it from having any affect on the system. This was significant because the 50 state :72 contained the input disturbance, (5:01-1. The design of the input vector u began by using 3 = z — ¢(n) and then finding .1. s = z-¢(77) .1: z—a—¢77 = fb(77,z)+G(77,z)u-§£Ifa(77,Z)+5(77,Z)I (35) an 877 The u is selected to be u = ueq +G_l(7],z)v (36) The um, is chosen to cancel the known terms on the right-hand side of equation (35). _ a “661:0 R7793 [‘fb(’79z)+5%fa(n’z)] (37) Thus, 3 = v -a—¢5(77, z) (38) an and, a 16 0 0 O -—¢-§( ’2' :l: . ]-1 =0 87] -1 0 -l 0 Finally the 3' equation became 5:2—5377=V (39) The selected v forces 3 toward zero and by using V2592 as a Lyapunov function candidate fors" = v — A07, 2) , then V=s~$=s-v.<_|s|-|v| (40) Selecting v as follows 5] v = —,Bsgn(s), where ,6 2 l + b, for some b > 0 leads VS—fl-Isl (4|) The above inequality guarantees asymptotic stability and also ensures that all states that are not on the manifold s = 0 will converge to the manifold in finite time and remains on it. For simulation purposes the sign function was replaced with a saturation function to have a smooth landing to the manifold. This also makes implementation easier. 5.4 Sliding Mode Controller Simulations The sliding mode controller of the A/F ratio and fuel ratio was implemented and simulated in Matlab/Simulink. Simulations that model real world A/F ratio and fuel ratio situations were conducted, similar to simulations of the baseline controller. The main difference between each simulation was how the closed loop system responded to various air flow inputs. For comparison purposes to the baseline controller simulations, the same target equivalence ratio was taken to be unity and the same target fuel ratio was 0.6. 5.4.1 Simulation 1 The first simulation uses a constant value for the air input, which models a situation that the throttle (air) opens at a constant angle. The constant value was chosen to be 0.15 and the states of the closed loop system are shown in Figure 5-6. 52 0.18 nW-rm-—mm~- — -I----wT-m—v-1 0.16 ——————————— ' —————————— I ———————— ' ----- 4 0.144---- —\ —————————— : ------- 4 ———————— i ———————— _. _____________ ‘l‘\. _______ I _______ I _____ _________ 0.12 , \\ . 1 : 1 statex2 1 1 O1 ------------ ~~-1 -------- 1 --------- w I 1 : ,9 I I . cc 1 _________ I __________________ .5 0.08 ~~~~~~~~~~ I I i: 0.06 ——————— I ------------------ I ———————— I ———————— I —————— 004 states X1, X3, X4, X5 J ________ i _________ __-_.___2___-_________‘__._-_,__.__.__________..__.___._‘ time (seconds) Figure 5—6: States of the system for simulation 1 The initial conditions of the states of the transformed equivalence ratio and fuel ratio model were chosen to be 0.01 as can be seen in Figure 5-6. The states x1, x3], X32, and x33 are forced to the sliding manifold, s =0, in a finite time of less than I second. Theses states remained at zero for all future time, which showed that the sliding mode controller theory was valid. Meanwhile the state x2 does reach the sliding manifold due to the constant disturbance input but it reaches steady state in finite time. From the state space model, the state x2 is affected by the input air disturbance. The sliding mode controller isolated that state and decoupled it from the remaining states, causing the rest of the states to 53 reach the sliding surface of the system. Therefore, the input air disturbance affect on the equivalence ratio and fuel ratio was minimized. To achieve the desired ratios of unity for the equivalence ratio and 0.6 for the fuel ratio, consider 771—7710 All=(l7"70)= ’72‘7720 30=A77+770 (42) [73—7730 2.1-Z] Az=(z—z0)= 0 Dz=Az+z0 (43) ZZZ-'ZZO where A17 and Az go to zero, leading 17 and 2 going to 770 and Z0 as time goes to infinity due to the sliding mode controller regulating the states Am, A113 ,Az], and Azz to the sliding manifold s = O. For a fixed input disturbance, the selection of 770 and Z0 begins by determining the PFI and DI inputs values that will make the open loop response of the system equal to unity for the equivalence ratio and 0.6 for the fuel ratio. The open loop response will then give the steady state values for the states 17], 173, z], and Q. Using these values for 770 and 2:0 can bring the equivalence ratio and fuel ratio to their desired values. Thus, by using (42) and (43), (32) and (33) become -25 -l460(7730+.6252]0+220) 44607720 A77] 4460-0625020 44607720 A17: 0 -5 0 A172 + 0 0 [A2] 0 0 -20 A773 -1 1.25 0 2 1460 0 14607720 (’730 +0-625810 + 320 l + 25’710 + 0 A172(A173 +0.625m1 +A12)+ -1 5+ 5’720 0 O 20]]30 +1 1.25310 (44) 54 . - 1.25 O Az l 0 u 1.25 0 21 AZ = l + l + 0 (45) 0 - 20 Azz 0 l 142 0 20 220 To investigate stability of the system with these new target states, ¢(77) from (34) is used and by substitution into (44) and (45), the system becomes — 25 — 14600730 +5252l0 + zgo) 0 An, 0 A77: 0 —5 0 A772 + -1 6 —11.25-l.6 o -20 A773 0 14607720 (7730 + 0.625210 + 2'20 ) + 257710 + 57720 207730 +11.25z.0 (46) ._-1.25 0 A2, 1 0 u, 1.25 o zlo Az-lo liar IlliHo filial It can be seen that the nonlinear term of the 7) equation of (44) is now eliminated, leaving a linear term with constant matrices plus the forcing 6 term, while the 2 equation remains linear. For stability of the entire system, it can be seen that the characteristic equation of the linear matrix A~ will be det(AI — A") = (A + 25)(/i + 5)(/i + 20) and has ei gen values in the left half plane, where - 25 - 14600730 +.625zlO + zzo) 0 A” = 0 —5 0 -ll.25-1.6 0 -20 Thus, the same (0(1)) can be used to stabilize the system with the new target states and the previous sliding mode theory will remain valid for this system. The original x states for 55 the desired equivalence ratio and fuel ratio are shown in Figure 5-7 and these ratios are shown in Figure 5—8. 0.05 Ti [r I i ll _. - _._, 0.04 ' 1 0.03 x1 r 8 x2 :6. 0.02 x3- (0 x4 0.01 _ ___xgw o ---------------------------------- g ————————— -0.01 i 5.5 6 time (seconds) Figure 5-7: States for the system to achieve desired equivalence and fuel ratios 56 the desired equivalence ratio and fuel ratio are shown in Figure 5-7 and these ratios are shown in Figure 5-8. 0.05 It i r -____-__1 ___..__.__‘ 0.04 ,J.-/ l l 0.03 0.02 states 0.01 -0.01 3 time (seconds) Figure 5-7: States for the system to achieve desired equivalence and fuel ratios 56 _-__l,_____._, —————————————————————————————————— Equivalence Ratio and Fuel Ratio i i l i i I i ______ _l _______ L __ _____________ .1 i I ----- Eq. Ratio 3 Fuel Ratio 1 __ l l l 6 7 8 9 10 time (seconds) Figure 5-8: Closed loop response of simulation 1 The simulation began at 3rd second and the equivalence ratio’s closed loop response to the 0.] air input settles relatively fast (about 1.5 seconds). The fuel ratio’s closed loop response to the same constant air input settles similar to the equivalence ratio. To achieve an acceptable closed loop response, the ,8 value in the simulation was tuned to [:3] be E ii 5.4.2 Simulation 2 The ability to use the target states no and 20 to bring the equivalence ratio to unity and fuel ratio to 0.6 can be extended to any desired ratio under any input disturbance. This requires that 770 and 20 be determined as a function of the desired 57 equivalence ratio, fuel ratio, and input disturbance. To begin the calculation of 770 and Z0 , consider the output equations (27) and (28) transformed using (31), resulting in yEqRatio = 25771 = 5 ' 20 ‘ 772073 + O.625Z1 + 22) yFuelRatio 214.6 ' 5 ' 772 (0.4687521 + 0.625111) Next, consider the system of (32) and (33) initially at zero, leading to l 771:2—514.6-5-20'772(773+0-625Z1+32) l 772 = —g5 — —l—(l —— (a) 5 77 _ l 1.25 Z 3 20 l u] =1.25Z] L12 = 2022 Using (49) and (53), yFuelRatio Zl Finally from (50), 22 can be expressed as follows 25 22 = ”1 -773 —0.625zl. 14.6'5-20-772 Note from (48), m can also be expressed as : yEqRatio 771 25 2 14.6 - 5 - 772(0.46875+ 0.625-1.25) ' (48) (49) (50) (51) (52) (53) (54) (55) (56) (57) Now that the expressions for )7 and 2: as a function of the desired output ratios and input disturbance have been found, they can be used as 170 and Z0. This will cause to the 58 states of the closed loop system to go to I70 and 2:0 as time goes to infinity, thus achieving any desired equivalence ratio and fuel ratio under any input disturbance. The second simulation begins using a constant value for the air input and at a later time sums a step input to this initial constant value. This simulates a situation where the throttle (air) initially remains open at a constant angle and then quickly (almost instantaneously) opens or closes to a larger or smaller angle, much like simulation 2 of the baseline controller. The constant value was chosen to be 0.1 and the step input value was chosen to be 0.15. The time at which the step input would be added to the constant value was chosen to be at 6 seconds. T l— l i—fi I I i , ——-Eq. Ratio M . . ----- Fuel Ratio ____-_- Controller responds to step input Equivalence Ratio and Fuel Ratio ____,__._...___.____ time (seconds) Figure 5-9: Closed loop response of simulation 2 Figure 5-9 shows the closed loop response of the step input applied at 6 seconds. The controller adjusts the control inputs to maintain the desired equivalence and fuel ratios. 59 0.09 T i l l _“T— "”— T ‘ T l ' _2‘ ; : I I i i 2 : PFl' 0.08 ————— : ....... l ----- ————— 1 OIL PFI and DI Control Inputs 0.02 i_i‘\\\ 0.01 _ __ -l. _. -- T' _ -5 _:_-. Control inputs responds . ____________ _ ' ; to step input l _L. 0 _ . 1 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10 time (seconds) Figure 5-10: PFI and DI control inputs for simulation 2 The responses of the control inputs, PFI and DI fueling, are shown in Figure 5-10. The PFI and DI fueling inputs were increased to achieve and maintain the desired ratios, which show the controller’s quick response to the step input is applied at 6 seconds. 5.4.3 Simulation 3 The third simulation uses a constant input disturbance of 0.1 with 5 percent noise added to it, which is similar to simulation 2 of the baseline controller. It also decreases the desired fuel ratio from 0.6 to 0.4 at 6 seconds and then increases it back to 0.6 at 8 seconds. 60 )‘ ""I I I I “ “T—fil—m' T 2:?! 1.2: 7 _ w _I _____ l - . _ l._ _ _ ; ‘_:‘ _____ lI _____ :_ 7 q ' Eq. Rat' I _ . . , I 7i ----- FuelRano: _9 1 - '. L1 : 1 _' : _1 _ *6 I I ' i I I I i L m I I l l l I | l I F) I I I ' | 3 | I l I I LL08 77' ————————————————————————— eeeeeeeeee 1 ~—-a .o I | I I I C ‘5 1 1 , I l . I I I .9 I I l I I l “‘ l l I a 6 --.-~q‘-h-- ... _ - _ ’r < _ - - 1|. ,,,,,, i _ _ _ . I _ _T‘rt'tfiw-n!s-——-—.—an—JI m 0 I ‘1 I I I It I I I 8 I g I I I : I I I 0:) I I I I I | \ I I I .5 I I I I I | I I .2 o4~- i ..... I 5-- :-~~“--~-LI ----- . ----------- CDT I k/"flflI I I : I I m I i (‘\+\\\ ' l 1 i i . I : ; \T\\71I‘2‘ I l I I 0-2 [ ‘ ' j “““ } """ f """ j * 5 ‘ j’ ’ 5“ Controller responds ; ; ; ; ; to change in desired ; ; ; ; ; ‘ fuel ratio . O H_ L _ 4' l l L l _l_ L__ _l__.___. 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10 time (seconds) Figure 5—l 1: Closed loop response of simulation 3 The closed loop response of simulation 3 shows the sliding mode controller’s ability to achieve the desired ratios in spite of the 5 percent noise that was used on the input disturbance. Compared to the baseline controller, the sliding mode controller proves to be more robust in its response to the noisy disturbance. The instantaneous change in the desired fuel ratio required an immediate change in the control input, which was achieved as shown in Figure 5-1 1. Although instantaneously large fueling may not be possible in a real world situation, rapid small amounts of fuel will ultimately make the desired ratios achievable. 6l 0.09 I I T l l T — — T "T _ ' '____'T'——_‘ I I I I : : I :——_—-j ----- , Control inputs respond ; 1 ; PFI L 0'08?” tostepinput “““ (”'“T'H‘j ““““ : DI \\ I ------ I \x I I I I l l g I \. :\\: . :I ' ' : 0.06““———r—--X4 ————— I ————— I\ ~\—\~—--I ~44”: ————— I —————— I —————— g I it I i “\1 " ‘\ : : : 6 I I I l\ ‘I I I E 0-05 “""7r\"\lI—A““‘\I‘~~I ““““ I ““““ o —--—$---- ' A _ *‘ - I -*-'-§d-___‘. 0 I 1 I I . 2 I I a 0.04 ————— -___I _____ I _____ . ..... IMI ______________ I ______ I U l l l l I l I g I I I I I I I E 0.03 ”“7 """""""" I“;;:—:ia"“‘+‘WIIt/“J”r I '“I'” ' O. I I’ I I I I I I I [If I I I I I I 0-02 ----- I””I"”/“I ----- ; ----- ------ : ----- : ------ . . 1U : : : : : . : 0.01~—-——~'r ————— I —————— : ——————— : ————— I-———I ————— : ————— : ------ ___; _I_.__I _;_ I I I I I 5 55 6 65 7 7.5 8 8.5 9 9.5 10 time(seconds) Figure 5-12: PFI and DI control inputs for simulation 3 5.4.4 Simulation 4 To improve the performance of the sliding mode controller, the stabilizing function ¢(7]) can be generalized as follows 1.6m; +£A773 z =¢(An) =[ I ] (58) -A771'A773 where 8 is a positive constant. Substitution into (32) yields, - 25 O 0 A77] 1460 - 0.625A172 A7] = O - 5 0 A772 + 0 A7738 . (59) -ll.25-1.6 O -20-ll.25£ A773 0 To determine stability, (59) can be viewed as A17=AA77+g(A77,8), (60) where, 62 -25 O O dAnz A(8) 2 0 -5 0 ,g(AI],£‘) = 0 A1738, and d = 1460-0.625- -ll.25-l.6 O -20-ll.25£ 0 It can been seen that A(8) is Hurwitz ifs > 0 and also dATIZ dAUZ 2 0 A7738 Sllell2 0 "A773“2 SdllEllzllA'Illz 0 2 0 2 Let Q = I and define X(8) > O as the solution of the Lyapunov equation AT(e)X (e) + XA = -Q Solve for the maximum and minimum eigenvalues of X(e) and plot these valves as function of a , see Figure 5-13. 0.02 ”___—T ——_‘T —'t_ "—"t l 1 fl» ‘::“r>:: "“ l ----- A - 0fX(£)' 0.015 ; __.. "1— J1 \ 0.01 f“ ~ \\ 0.005 ‘x a \~.._- - l! O _ L __l__. ____L__ l_ i——_ ;____L___.__: T ___—J 0 1o 20 30 4o 50 60 7o 80 90 100 g > 0 O 2 '—— ‘_V—'—7fi‘_'uT_'_ if fi'ifiT_ l w :Y—* :fi _—‘—7 __x of mg] 0.15- E ma" 0.1 0.05— 0 *_l __ L__.i_. ___—L— L___ _¥ _ fl 0 1o 20 30 4o 50 60 7o 80 90 100 g > 0 Figure 5-13: Maximum and minimum eigenvalues of X(a) Define the Lyapunov function V(A27) = AIITXAI] with the following properties 63 2min (X>||An||§ s vmm s 1.1m mall/ml; 3V ___/1A”: -AI7TQA77 S ”1min (Q)"A77"§, ”3‘:— V,,=|| um xll <2nxu2uAnn =22mumn2 The derivative of V(A17) satisfies r A772 V(A77)=AI]T(AT(£)X(£)+X(£)A(£))AI]+2&IA773 0 X(8)A77 0 S "1min (Q)"A’7": + 21mm (X (5))8‘IIA’73I ' "A77": Therefore the origin is exponentially stable if 1 V(A )<0 or £< . '7 21mm>d|Anal (61) The stability condition will hold if we assume that |A773| < yfor all time, where y is a positive constant, and can be restated as below: 1 E < ~ — . (62) 22m (X(e))d|773 -— 0301 When '03 — 1730' S y, then (62) becomes < 1 63 22mm (X (8))(1 - 7 ( ) From Figure 5-l3 it can be seen that 2.max(X(8)) = 0.1 for all 8 > 0, thus 1 l l < < = (64) 2~0.l-d-}/ 2-0.l-]460-0.625~y 1825-}! Equation (64) shows that if y is small, say y < 0.01, from (64) 8 can be selected to be 0.5 with guaranteed stability. Choosing [X as follows 64 1.6 flzimi’ the response of the sliding mode controller was improved. Simulation 4 uses a constant input disturbance of 0.1 with 5 percent noise added to it. The disturbance is increased to 0.25 at 6 seconds, the desired fuel ratio is decreased from 0.6 to 0.4 at 9 seconds, and finally, the equivalence ratio is increased to value of 1.1 at 13 seconds. Equivalence Ratio and Fuel Ratio Eq. Ratio (sliding mode) i 0.2 L» — - — - l - - . ~C - - — - « - - Fuel Ratio (sliding mode) f : i l : ----- Eq. Ratio (PID) i . : 1 ; j ----- Fuel Ratio (PID) J 0 __ _ l __- L__l__._._L. I I 7*: _Ljff: 5 6 7 8 9 1O 11 12 13 14 15 time (seconds) Figure 5-14: Closed loop response for simulation 4 It can be seen from Figure 5-14 that the response of the sliding mode controller is better than the baseline PID controller. Specifically, the fuel ratio change at 9 seconds and the equivalence ratio change at 13 seconds show a faster response than the baseline controller. Furthermore, Figure 5-15 shows that the closed loop response of the control inputs of the sliding mode controller are much better than the baseline controller. 65 0.09 0.08 0.07 0.05 0.04 0.03 - PFI and DI Control Inputs PFI (sliding mode) DI (sliding mode) 0.02 001 : 1 i i .......... PF|(P|D) ' T T i I T l ---------- DI(PID) 0 i 1 a 1 1 1 1 1 : 5 6 7 8 9 1o 11 12 13 14 15 time (seconds) Figure 5-15: PFI and DI control inputs for simulation 4 5.5 Observer for Sliding Mode Controller Many times in control theory, the states of a system contain useful information that is used in the controller design. This is the case in the sliding mode control scheme that was introduced earlier in this chapter. The transformed states, I] and z, of the equivalence ratio and fuel ratio model were fed back and used in design of the sliding manifold. Often times it is impossible or impractical to obtain the measurements of all the states and some of the states may not be available for measurement. This may be due to economic reasons, as some sensors may be too expensive, or due to physical reason in which the surrounding environment may be too noisy for measurement. For this reason, the states must be estimated from the available measurements, which typically are the outputs and inputs of the system [16]. 66 5.5.1 Observer Design Since our system is nonlinear, a nonlinear estimator is needed. For linear systems of the form 5c=Ax+Bu y=Cx+Du where the matrices A, B, C, and D are known, a linear state estimator can be constructed as =A5E+Bu+L(y—y) f (65) 5? = C55+ Du The matrix L is a matrix that is designed to make A+LC stable. Equation (65) can be rewritten as 5c: (A—LC)5c+[B—LD L][”] (66) y This estimator is known as the Luenberger observer [17]. The error between the actual state x(t) and the estimated state fr(t) is given as é(t) = in) — 2(1) = [Ax + Bu]— [142+ Bu + LC(x — 2)] (67) Since the eigenvalues of A+LC are in the left half plane then, e‘(t) : 5r(r) — fc(t), é(t) —> O as t —> 0 Now, consider the plan (26), it can be reorganized into two system equations below: . 5c, Al Bl 0 xs= x, = A} xs+ 0 C2C31X3X2+ B3 “3 (68) 132 = A2X2 + 8260 (69) 67 For a fixed operational condition, we can estimate state x3 independently since input (0 can be measured physically be a mass air flow sensor. Assuming that x; is known, we can rewrite equation (68) as follows: ° A BC C x 0 - l l l 2 31 2 x = = Ax +8 2 x + u 70 S [x3] 5 “3 [0 A3 :| S [B3] 3 ( ) The output matrix can also be rewritten as C + D I O + O 0 (7 I) = x u = x U y S 3 0 14.6C2C32X2 S 0.625 O 3 Using the steady state value of x2 = 0.17 and the linear system estimation equation (65), a linear state estimator can be designed with the following system parameter matrices: " .4 0 ‘ ’- 25 248.2 248.2 0 ‘ ’ 0 0‘ .0014 0.137 0 —20 0 .4688 .625 0 L: , A: 9 B: 9 0 0 0 0 —20 0 0 1 _ 0 5.4794 1 0 0 0 —1.25_ _ 1 0. 25 0 0 0 0 0 C = , and D = . 0 0 0 5.8172 0.625 0 5.5.2 Observer Simulation The observer was designed to estimate the states of the equivalence ratio and fuel ratio model. It used the outputs (the equivalence ratio and fuel ratio) and the inputs (PFI and DI fueling) to generate the states. 68 states time (seconds) Figure 5-16: Estimated states generated by state estimator Figure 5-16 shows the estimated states, 2], £3, £4 ,and 25, generated by the estimator. This simulation shows that the estimator was able to estimate the states and the sliding mode controller was able to bring those states to the sliding manifold. Theses states remained at zero for all future time, which again showed that the sliding mode controller theory was valid. Note that the air flow used for the simulation is 0.15, the actual disturbance input 0) is 0.85 (see Figure 5-3), leading the steady state valve for x2 to be 0.17. 69 Chapter 6: Conclusions 6.1 Cylinder Pressure Model Conclusions After understanding the combustion process of a spark ignition engine and developing a cylinder pressure model, this model is combined with a mean valve engine model, developed by a colleague, to have a mean valve engine model with cycle-to-cycle cylinder pressure output. This engine model can be calibrated using engine mapping data such as the engine torque, pressure in intake and exhaust manifolds, and the air-to-fuel ratio. The mean-value engine model can be used to validate control strategies for different types of controllers that are model-based. The equations that are used to calculate the outputs of the model are approximated over an engine cycle. A significant advantage of the mean-value engine model is its low computational throughput which makes it possible for real—time simulation. In order to reduce engine emissions and improving engine fuel economy, closed loop combustion control, which requires cycle- to-cycle combustion measurement such as cylinder pressure, is a necessity. The addition of a cylinder pressure signal to a mean value engine model will allow for developing closed loop combustion control strategies (or other strategies that involve cylinder pressure) to be validated. This is because the cylinder pressure model can produce a cylinder pressure signal for a complete engine operational map and a mean value engine model can produce real world engine parameters and conditions. 70 Calibrations 1 RPM p RPM BMEP ’ P_intake Throttle . Spark Mean-value My Valve Engine Model T_exhaust ’( ——> Fuel Lamda . > Crank Cylinder P cylinder EGR Pressure - \ CAM Model L J \ Prototype Controller 1111111 Figure 6-1: Integration of mean value engine model and cylinder pressure model Figure 6-1' shows the integration 0f the mean value engine model with the cylinder pressure model. The cylinder pressure model uses signals generated by the mean value engine model, and also sends its own signals to a controller. Based on a cylinder pressure signal, a controller can be designed improve MBT timing which is an area of study for future research. 6.2 Air-to-Fuel Ratio and Fuel Ratio Control Conclusions The A/F ratio and fuel ratio control designs were able to achieve the desired performances. Specifically, the A/F ratio was regulated and maintained at its desired 71 level with various input disturbances. Likewise, the fuel ratio was regulated at a selected level of 0.6. The baseline controller is a multi-input and multi-output (MIMO) PID controller. This controller, which had two inputs, equivalence ratio and fuel ratio, and two outputs, PFI and DI fueling, is useful for A/F ratio and fuel ratio control. This is primarily due to the fact that PID controllers are widely used in automotive applications and can be easily implemented. Likewise, the sliding mode controller design was also an excellent MIMO controller. The ability to use sliding mode control theory on a MIMO case was significant. Extending this theory to achieve and maintain any target output (desired equivalence ratio and fuel ratio) is the most important contribution of this research. Compared to the baseline controller, the sliding mode controller had a significantly lower steady state error in response to the random input disturbance. The percent overshoot for the sliding mode controller was also noticeably better and in response to the step input, had a better settling time than the baseline controller. For comparison purposes, Table 6-1 and Table 6-2 show the percent overshoot of the disturbance step input, settling time after the fuel ratio change, and steady state error under 5% noise of both controllers for the equivalence ratio and fuel ratio, respectively. Disturbance Input % Overshoot Settling Time PID Sliding Mode PID Sliding Mode step 4.42% 2.44% 0.543 sec 0.782 sec Steady State Error PID I Sliding Mode constant plus 5% noise .001 1 I .0002 Table 6-1: Comparison of controllers for equivalence ratio 72 Disturbance Input % Overshoot Settling Time PID Sliding Mode PID ISliding Mode step 2.16% 2.64% 1.95 sec | 0.745 sec Steady State Error PID Sliding Mode constant plus 5% noise .024 .0005 Table 6-2: Comparison of controllers for fuel ratio The linear observer that was designed for the sliding mode controller, by linearizing the plan at a given operational condition, estimated the states well. It proved to be effective for the potential implementation. 73 [ll [2] [3] l4] l5] [6] [7] [8] l9] ['0] [ll] [12] [13] [I4] [151 Bibliography J. B. Heywood, Internal Combustion Engine Fundamentals: McGraw-Hill, 1988. G. Zhu, et al, "Closed-Loop Ignition Timing Control for SI Engines Using Ionization Current Feedback," IEEE Trans on Control Systems, pp. 416-427, May 2007. I. Haskara, et al, "On Combustion Invariants For MBT Timing Estimation and Control," in ASME Internal Combustion Engine Division, 2004. G. Zhu, et a1, "MBT Timing Detection and its Closed Loop control Using In- Cylinder Pressure Signal," in Society of Automotive Engineers, 2003. L. Guzzella, Introduction to Modeling and Control of Internal Combustion Engine Systems: Springer-Verlag Berlin Heidelberg, 2004. M. Won, et al, "Air to Fuel Ratio Control of Spark Ignition Engines Using Dynamic Sliding Mode Control and Gaussian Neural Network," in American Controls Conference, June 1995. J. G. Rivard, "Closed-loop Electronic Fuel Injection Control of the IC Engine," in Society of Automotive Engineers, 1973. J. F. Cassidy, et al, "On the Design of Electronic Automotive Engine Controls using Linear Quadratic Control Theory," IEEE Trans on Control Systems, vol. AC-25, October 1980. W. E. Powers, "Applications of Optimal Control and Kalman Filtering to Automotive Systems," International JOumal of Vehicle Design, vol. Applications of Control Theory in the Automotive Industry, 1983. N. F. Benninger, et al, "Requirements and Perfomance of Engine Management Systems under Transient Conditions," in Society of Automotive Engineers, 1991. C. H. Onder, et al, "Model-Based Multivariable Speed and Air-to-Fuel Ratio Control of an SI Engine," in Society of Automotive Engineers, 1993. S. B. Cho, et al, "An Observer-based Controller Design Method for Automotive Fuel-Injection Systems," in American Controls Conference, 1993, pp. 2567-2571. T. Kume, et al, "Combustion Technologies for Direct Injection SI Engine," in Society of Automotive Engineers, 1996. H. Khalil, Nonlinear Systems, 3 ed.: Prentice Hall, 2002. H. Khalil, Nonlinear Systems, 2 ed.: Prentice Hall, 1996. 74 [16] P. J. Antsaklis, et al, Linear Systems, 2 ed.: Birkhauser Boston, 2006. [17] D. G. Luenberger, "Observers for Multivariable Systems," IEEE Trans on Automatic Control, vol. AC-l 1, pp. 190-197, 1966. 75 M'lllllllllljlllllfl11111111111111ES