LABVIEW INTERNAL COMBUSTION ENGINE DETONATION FREQUENCY ANALYSIS Kevin McClain B.S., California State University, Sacramento, 2007 PROJECT Submitted in partial satisfaction of the requirements for the degree of MASTER OF SCIENCE in MECHANICAL ENGINEERING at CALIFORNIA STATE UNIVERSITY, SACRAMENTO FALL 2010 © 2010 Kevin McClain ALL RIGHTS RESERVED ii LABVIEW INTERNAL COMBUSTION ENGINE DETONATION FREQUENCY ANALYSIS A Project by Kevin McClain Approved by: __________________________________, Committee Chair Dr. Kenneth Sprott ____________________________ Date iii Student: Kevin McClain I certify that this student has met the requirements for format contained in the University format manual, and that this project is suitable for shelving in the Library and credit is to be awarded for the Project __________________________________, Department Chair Dr. Susan L. Holl Department of Mechanical Engineering iv __________________ Date Abstract of LABVIEW INTERNAL COMBUSTION DETONATION FREQUENCY ANALYSIS by Kevin McClain Statement of Problem The project discussed herein is to develop the hardware and software necessary to identify the detonation frequency of a BMW S14 internal combustion engine. This test engine is considered to be vibration intensive and difficult to distinguish the difference between a detonation event and normal engine vibration. Data used for the analysis of this project was gathered utilizing off-theshelf audio hardware in conjunction with a custom written LabVIEW software application. The LabVIEW application and identified detonation frequency was verified for accuracy through the use of known frequencies simulated with a microcontroller and compared against the results of a computer based oscilloscope. The detonation frequency of the 2.5 liter BMW S14 engine was determined to be 6,480 Hz as calculated via the LabVIEW application through the use of a Fast Fourier Transform. __________________________________, Committee Chair Dr. Kenneth Sprott __________________________ Date v TABLE OF CONTENTS Page List of Tables ................................................................................................................................. vii List of Figures ...............................................................................................................................viii Chapter 1. INTRODUCTION ..................................................................................................................... 1 Purpose of the Study ........................................................................................................... 1 2. BACKGROUND OF THE STUDY.......................................................................................... 2 History of Fuel Injection ..................................................................................................... 2 Test Engine Overview ........................................................................................................ 7 3. INVESTIGATION .................................................................................................................... 8 Test Scope ........................................................................................................................... 8 Test States ........................................................................................................................... 8 EEPROM Interpretation ................................................................................................... 10 Test Step Up...................................................................................................................... 21 4. TESTING ANALYSIS............................................................................................................ 38 Discussion ......................................................................................................................... 38 Test Overview ................................................................................................................... 38 5. FINDINGS AND INTERPRETATIONS ................................................................................ 44 Discussion ......................................................................................................................... 44 Future Work ...................................................................................................................... 45 Appendix A. Test Hardware Pictures ............................................................................................ 48 Appendix B. Bosch Knock Sensor Data Sheet .............................................................................. 52 Appendix C. Data Plots.................................................................................................................. 54 Appendix D. Raw Data .................................................................................................................. 59 Work Cited ..................................................................................................................................... 60 vi LIST OF TABLES Page 1. Table 1. Part Throttle Fuel and Timing map addresses read from the original BMW EEPROM. ................................................................................................................................ 18 2. Table 2. Test set up hardware component list. ........................................................................ 26 3. Table 3. Software parameters used for collecting knock sensor data. ..................................... 34 4. Table 4. LabVIEW signal and calculation processes. ............................................................. 36 vii LIST OF FIGURES Page 1. Figure 1. Xeltek SuperPro / Z EEPROM Reader / Writer. Note EEPROM illustrated (Tim 8) is an experimental ECU program. ........................................................................................... 11 2. Figure 2. Screen shot of Xeltek software displaying the EEPROM data. Note data shown is from a custom EEPROM program. ......................................................................................... 11 3. Figure 3. Porsche Motronic Editor ©2002, 2005 main screen [13]. ....................................... 12 4. Figure 4. Highlighted timing map from custom experimental EEPROM converted to decimal. Note map begins at address $232A, 55=RPM followed by 16 byte axis, 75= percent throttle followed by 16 byte axis, then 256 byte map. Not all 256 bytes shown. ................................ 14 5. Figure 5. Invalid timing map. Data highlighted by Motronic Editor as a timing map. ........... 15 6. Figure 6. Timing map from Turner Motor Sport Evo 3 8200 RPM custom EEPROM. Timing map begins at EEPROM address $2E48. Note this is not a valid timing map. ....................... 16 7. Figure 7. Timing map from Turner Motor Sport Evo 3 8200 RPM custom EEPROM. Timing map begins at EEPROM address $2E48. Note this is not a valid timing map. ....................... 16 8. Figure 8. Timing map from Turner Motor Sport Evo 3 8200 RPM custom EEPROM. Timing map begins at EEPROM address $232A, Note: this is a valid timing map ............................. 17 9. Figure 9. Pocket Romulator and Engine ECU......................................................................... 20 10. Figure 10. Intronics Pocket Romulator Software simulating the ECU EEPROM while the engine is running. Note address $232A is visible in the widow.............................................. 20 11. Figure 11. Drawing of a typical BMW S14 engine [14]. ........................................................ 24 12. Figure 12. Complete sensor and amplifier hardware system................................................... 26 13. Figure 13. Soundcard scope 1.32 measuring the 5 kHz tone generated by the Basic Stamp 2 [15]. ......................................................................................................................................... 29 14. Figure 14. LabVIEW application measuring the 5 kHz tone generated by the Basic Stamp 2. ................................................................................................................................................. 29 15. Figure 15. Soundcard scope 1.32 measuring the 7.5 kHz tone generated by the Basic Stamp 2. ................................................................................................................................................. 30 16. Figure 16. LabVIEW application measuring the 7.5 kHz tone generated by the Basic Stamp 2. ................................................................................................................................................. 30 17. Figure 17. Soundcard scope 1.32 measuring the 10 kHz tone generated by the Basic Stamp 2. ................................................................................................................................................. 31 viii 18. Figure 18. LabVIEW application measuring the 10 kHz tone generated by the Basic Stamp 2. ................................................................................................................................................. 31 19. Figure 19. LabVIEW application code, illustrating input – output signal process.................. 36 20. Figure 20. LabVIEW application graphing raw knock sensor signal (top) and FFT (bottom) with Nyquist frequency at 8,192 Hz and detonation frequency at approximately 6.4 kHz. .... 39 21. Figure 21. LabVIEW application graphing raw knock sensor signal (top) and FFT (bottom) with Nyquist frequency at 8,192 Hz and detonation not present............................................. 40 22. Figure 22. Data plot of test run number 8; detonating with a spike present at approximately 6,480 Hz. ................................................................................................................................. 41 23. Figure 23. Data plot of test run number 12; non-detonating with a spike present at approximately 6,480 Hz. ......................................................................................................... 43 24. Figure 22. Pocket Romulator Transtronics 2716-27256. ........................................................ 48 25. Figure 23. Phono Jack to 1/8" Mono Phone Plug Shielded Adapter, Radio Shack, 2740330. 49 26. Figure 24. 12-Ft. Shielded Cable, RCA Plug to Tinned Wires, Radio Shack, 4202372. ........ 49 27. Figure 25. 3-Ft. 1/8" Stereo Plug Cable, Radio Shack, 4200223. ........................................... 50 28. Figure 26. Gold-Plated Volume Control Cable for Stereo Headphones, Radio Shack, 422559. ................................................................................................................................................. 50 29. Figure 27. Mini Audio Amplifier, Radio Shack, 2771008. ..................................................... 51 30. Figure 28. Mono Y-Adapter, Radio Shack, 2740310. ............................................................. 51 31. Figure 29. Bosch Knock Sensor Data Sheet, page 1. .............................................................. 52 32. Figure 30. Bosch Knock Sensor Data Sheet, page 2. .............................................................. 53 33. Figure 31. Detonation plot 1 of 5 in a continuous series of FFT calculations. Note the absence of the detonation frequency spike............................................................................................ 54 34. Figure 32. Detonation plot 2 of 5 in a continuous series of FFT calculations. Note the absence of the detonation frequency spike............................................................................................ 55 35. Figure 33. Detonation plot 3 of 5 in a continuous series of FFT calculations. Note the detonation frequency spike beginning to develop at 6480 Hz. ................................................ 56 36. Figure 34. Detonation plot 4 of 5 in a continuous series of FFT calculations. Note the detonation frequency spike continuing to develop at 6480 Hz. .............................................. 57 37. Figure 35. Detonation plot 5 of 5 in a continuous series of FFT calculations. Note the detonation frequency spike at its peak amplitude at 6480 Hz. ................................................ 58 ix 1 Chapter 1 INTRODUCTION Purpose of the Study The scope of the project is to identify the frequency of detonation in a 1990 BMW M3 engine. This engine was used in production from 1988-1991 and considered by many car enthusiasts to be one of the most impressive vehicles and engine combinations manufactured to date [1]. The engine known to BMW enthusiasts by its engine number, S14, is inherently very noisy and vibration intensive. Club racers and daily drivers alike have experienced many issues associated with high frequency vibrations ranging from broken crankshafts to extremely loud and annoying buzzing that radiates from the transmission shift lever inside the cabin. It is these high frequency vibrations that make it difficult for advanced engine control systems to be utilized successfully with integrated knock control on this engine. From a frequency analysis point of view, these vibrations “look” like noise and make it difficult to positively identify the detonation frequency. Three methods were performed to verify that a knock event was occurring. First and foremost was to instrument the engine with a knock sensor. The first method utilized data collection via a custom LABVIEW application that performs a Fast Fourier Transform (FFT) to determine the frequency content of the signal. The second method involved listening to a knock sensor signal with standard off-the-shelf headphones. And lastly a microphone oscilloscope was used to perform a FFT. The oscilloscope was primarily used to verify that the LabVIEW application was performing correctly. Using three independent methods of evaluation provides a high-level of confidence that the knock event was actually captured. 2 Chapter 2 BACKGROUND OF THE STUDY History of Fuel Injection The History of Fuel Injection is from the perspective of the author (unless citation provided), from 20 years automotive experience, 8 of which were as a professional mechanic. The author’s formal technical training and day-to-day activities involved extensive work with engine control systems on BMW, Chevrolet, Honda, Toyota, and Volkswagen products. Internal combustion (IC) engines have been used for years to provide a source of power. Many applications of the internal combustion (IC) engine are for a pure mechanical power source with varying engine speeds, coupled with a transmission to accommodate the particular application. It is becoming more popular to use engines at a constant engine speed to drive electrical generators. In either case, as society has recognized the need to reduce the use of natural resources, in particular petroleum, and reduce pollutants toxic to the environment. This puts tremendous pressure on Engineers to develop and or refine products and processes that will yield more power while using fewer resources. Over the years the engine has evolved substantially following an evolutionary path. With significant changes evolving from newly discovered technologies not directly related to engine theory, such as materials and computers. Material technology helps to reduce weight, reduce friction, and allow heat transfer to be optimized. While computers, especially microprocessors, have had the largest impact on the IC engine through the application of controls. Computers allow the engine to be instrumented with numerous sensors that the computer can monitor and make 3 changes to the fuel and timing as needed to optimize power, minimize emissions, and reduce fuel consumption. The early computerized engine controls utilized a simple open loop control system that lacked the processing power to have much of an advantage over the traditional mechanical carburetor. Timing was still a traditional mechanical control and only fuel was controlled by the computer. The computer merely looked up predetermined values from a table (or matrix), typically 16 x 16, with engine speed in revolutions per minute (RPM) on one axis and percent throttle position on the other. When the engine was running, the computer would measure the percent throttle position that the user was applying by means of a simple potentiometer, attached to the throttle plate of the engine intake manifold. It then evaluated the engine RPM by means of a magnetic or hall effect sensor. The computer then looked up the value in the matrix related to the corresponding percent throttle position and engine RPM. This value was then used by the computer to calculate a theoretical load being placed on the engine and send a 0-5 or 0-12 volt digital signal (depending on engine manufacturer) [2] [3] [4] [5] [6] at a predetermined frequency to a single fuel injector that would open and close at the same rate, thus delivering fuel. This was an evolutionary step that was slightly better than a pure mechanical system, but lacked the necessary feedback to ensure that the amount of fuel being delivered was appropriate. The next progression in the evolutionary process was a more advanced closed loop system that initially functioned the same as the simple open loop system, but added elementary feedback. An oxygen sensor measured the oxygen content of the exhaust to then make a determination if the engine was “lean” or “rich.” This data, or error, was then used to modify the value from the 4 matrix. If the exhaust was “lean” then a positive correction was made to the fuel injector signal, if it was “rich” then a negative correction was applied. Typical correction factors ranged from 1 to 10 percent depending on the manufacturer and/or the specific application [3] [4] [5]. In addition, these early closed loop systems used correction factors that were predetermined and were applied across the entire matrix. The next computer technology progression allowed engine manufactures to use computer models to further their understanding of the engine control system and thus further develop the control systems, which lead to more advanced closed loop and feed forward control strategies. These developments included the ability to control spark timing in the same manner as the fuel control, and use a dynamic matrix correction rather than a static predetermined correction factor, as used in the early generation closed loop systems. Fuel and timing matrices continue to expand for better resolution as microcontroller technology continues to advance and the on board computer can process sensor data and perform complex calculations to modify the fuel and timing control values. With increased processing power comes the ability to control each cylinder individually but with limited feedback still applied across the board to all cylinders. For instance, if the exhaust is determined to be “rich” then all cylinders are modified for fuel and or timing rather than only modifying the affected cylinder. The most recent advance, also due to increased computer processing power, is to control the feedback of each cylinder individually, independent of the other cylinders. With this advance, if one cylinder is determined to be “rich” then only the fuel and/or timing are corrected for that cylinder. This increased control resolution allows for significant performance gains as well as 5 reduced emissions. This is due to the engine being run closer to stoichiometric conditions as well as increased spark timing to the limit of detonation [7]. One aspect of IC engine design is the determination of how much fuel to provide the engine and when in the combustion cycle to apply the spark. If these two aspects are not applied or controlled correctly, the engine develops a phenomenon known as knock, or “pinging.” This concept is not new and Engineers have been fighting the balance between the amount of fuel and timing optimization since the use of mechanical control systems. Ideally the most power is achieved with the increase of degrees of spark advance prior to each cylinder top dead center, to a point, where based on ambient conditions and the amount of fuel applied, the engine will knock. It is at this limit where the theoretical engine would develop the most power. Now with current computer processing power less of an issue, the difficulty comes in the ability to detect when the engine is operating in conditions that yield knocking. Years have been spent researching the effects of ambient conditions on this phenomena and developing complex feed forward algorithms to avoid the phenomena. Ultimately most engine manufactures have come to the conclusion that ambient conditions change too drastically, at least in the automotive application, to be able to avoid the knock event at all times. For this reason, having the ability to detect when the engine develops a knock and make corrective changes to suppress it is the next evolutionary step. Engine knock is widely known to be one of the most difficult aspects of the engine control system to understand, recognize, and utilize properly. If left untreated or if the control system does not properly recognize that a knock is occurring, over time severe engine damage will occur. Such damage includes piston ring failure, piston failure, and valve damage, all of which compound the 6 root cause of the knock itself. Research is still being conducted as to the actual cause of the damage, rather it be increased cylinder temperatures and/or increased cylinder pressures seen under a knock condition [7] [8] [9] [10] [11]. Too often the engine knock phenomenon is identified interchangeably by the term preignition or detonation. In all actuality the two terms are distinctly different. Preignition is when the fuel charge within the combustion chamber ignites without the presence of a spark event or prior to the spark event. This is often due to sources of extreme heat within the combustion chamber that cause the fuel charge to ignite. Some of the ignition sources can be over heated spark plugs, carbon deposits on the valves and/or pistons, or even damage to pistons from long term engine preignition or detonation [7]. Detonation is defined as a portion of the fuel charge within the combustion chamber that spontaneously ignites after the spark event but before the flame front from the spark event can naturally burn the air fuel mixture [7]. If you consider the flame front as a wave, when the spark plug ignites and the air fuel charge begins to burn, the wave begins at the spark plug and moves towards the opposite side of the combustion chamber. Detonation occurs while this flame front is traveling, then within the unburned air fuel mixture a portion is spontaneously ignited creating another flame front moving away from the secondary ignition point. The result is two waves moving towards each other and ultimately colliding to create an increase in cylinder pressure, up to two times the normal pressure due to the thermal expansion of combustion [7], and producing a secondary pressure wave at a frequency ranging anywhere from 6K to 10K Hz [12], which is sometimes audible. While several factors are taken into account for why and how detonation 7 occurs as well as how to prevent it, the focus of this project is to identify the knock frequency of a specific BMW engine. Test Engine Overview The test engine is a naturally aspirated four cylinder, with 2.5 liter displacement, 11.25:1 compression ratio, dual overhead solid lifter cam shafts, 16 valves, with a maximum engine speed of 8400 RPMs, and an approximate break horsepower of 225. The S14 is controlled via a Bosch Motronic Engine Control Unit (ECU) which utilizes an Erasable Programmable Read Only Memory chip (EPROM) that stores fuel and timing maps, or matrices. A total of 48 unique maps are stored on the EPROM: eight idle, eight part throttle, and eight full throttle for both fuel and timing. As ambient conditions change, such as altitude and temperature, the ECU reads from different maps based upon the conditions. This ECU is considered an early generation fuel injection system (developed in the early 1980’s) which uses a closed loop feedback control on the fueling and a fixed matrix lookup (open loop) for the timing. 8 Chapter 3 INVESTIGATION Test Scope In order to properly identify the detonation frequency it was necessary to evaluate the engine in conditions that allow for the engine to detonate and non-detonate. To do this, the factory BMW EEPROM which stores both the fuel and timing matrices was removed and replaced with an EEPROM simulator. The EEPROM simulator simulates the EEPROM and provides the ECU the required data to run the engine. The simulator also allows for near real-time ECU changes, allowing the EEPROM to be modified while the engine is running. To accomplish this, the vehicle was run on a test track at a constant 3,000 RPM and constant estimated calculated load of 15 percent. The EEPROM was then modified to switch between detonating and non-detonating conditions while listening with headphones and performing FFT with LabVIEW via the microphone input and onboard soundcard in a laptop computer. The LabVIEW program used was a custom program designed for this project. The accuracy of this program was verified by comparing the FFT results from the LabVIEW application against the FFT results from a sound card oscilloscope capable of performing frequency analysis. Test States Two test states were evaluated: detonating and non-detonating. It was imperative to evaluate both states independently to ensure that during a given data collection session, it was known what characteristics to look for. If this process was not followed, it would be difficult to characterize 9 the engines normal operating condition, and thus make it extremely difficult to distinguish the difference between a detonating event and a normal engine noise. By evaluating the two independently, it was possible to develop an understanding of what the normal engine noise “looks” like from a frequency content perspective by evaluation of a FFT plot and thus made it possible to “see” when something different was happening, in this case an induced condition that will yield detonation. Detonating The “as-received” engine normally experiences’ detonation, especially when ambient temperatures are above 90 deg F and subjected to situations that will lead to excessive heat soak. The as-received detonation is due to engine modifications, primarily increased compression ratio, and reduced octane levels in the gasoline. Initially this was thought to make the as-received case, detonating, the easiest to evaluate in terms of not requiring any additional modifications to induce detonation. However this quickly unveiled itself as being extremely challenging. The as-received detonation was not consistent and would not detonate on demand. To alleviate this problem and ensure that detonation would occur when commanded, extreme modifications had to be made to both the fuel and timing maps. It should be noted that the aggressive modifications made to the EEPROM would yield permanent engine damage if allowed to operate for an extended period of time. It is unknown at the time of this project if damage occurred to the test engine due to these modifications, and to what extend the damages are. 10 Non-Detonating This second state, non-detonation, is far more complicated to control, as many factors contribute to detonation. Determining and controlling the factors that are present at any given time during a knock event can be challenging to suppress. It is well know that when a knock event is occurring, timing can be reduced and additional fuel can be added to reduce the risk of knock [7]. Although at a fundamental level, this seems fairly easy; in practice working out the details to do this can pose many complex challenges. Altering either the fuel and or timing incorrectly can destroy the engine within minutes. Therefore special care was taken when changing any of these parameters that are predefined by the original engine manufacturer. EEPROM Interpretation Reading the EEPROM The process to modify the fuel and timing was a significant challenge in itself. In order to do this, the first step was to remove the original EEPROM from the ECU and decipher what data was stored on it. This was accomplished using a Xeltek Superpro/Z and accompanying software to read the EEPROM (see Figure 1). The data is displayed in a 16 byte by 256 line matrix with each byte represented in HEX and saved as a binary file. Figure 2 illustrates the data displayed by the Xeltek software. 11 Figure 1. Xeltek SuperPro / Z EEPROM Reader / Writer. Note EEPROM illustrated (Tim 8) is an experimental ECU program. Figure 2. Screen shot of Xeltek software displaying the EEPROM data. Note data shown is from a custom EEPROM program. 12 Interpret EEPROM Within the 16 by 256 matrix laid the fuel and timing matrices, or maps. Initially the number of maps was unknown, as well as which maps were used for which conditions. The next step was to determine what maps were present within the data read by the Xeltek SuperPro/Z. This was performed with the utilization of a software program written to modify the EEPROM data for Porsche’s [13]; Figure 3 illustrates the main screen of this program. Figure 3. Porsche Motronic Editor ©2002, 2005 main screen [13]. The Motronic Editor [13] does not read the EEPROM, but rather it reads the binary file saved by the Xeltek SuperPro/Z and displays it in a format that is easy to read and edit. The Motronic Editor was written to read the EEPROM binary file for a few specific Porsche models. However, the EEPROM data format of the Porsche is similar enough to that of the BMW test engine that it could be used for analysis. The Motronic Editor has built in search functions that will “look” for 13 fuel and timing maps. It does this by searching for predefined formats. Within the 16 byte column by 256 row data set, the fuel and timing maps are arranged in a specific format. Each map consists of a matrix in varying size based on the use, but they each begin with values that outline two axes, revolutions per minute (RPM) and percent throttle. The RPM refers to engine speed while the percent throttle represents the percentage that the throttle pedal is depressed ranging from 0-100%. The two axis values are used by the ECU to calculate the load on the engine at the point the axis cross. Each 16 byte axis is predicated with two unique bytes used by the ECU to format the axis for its calculations (these bytes are different for Porsche and BMW). The first tells the ECU what the axis represents (55 indicate the RPM and 75 indicates the percent throttle) and the second represents the axis length (16). Then for both fuel and timing, the part throttle maps consist of a 16 by 16 matrix. The Motronic Editor searches for anything that fits this trend, two unique bytes followed by each 16 byte axis, and then followed by 256 bytes whose values are close in range to each other. Figure 4 illustrates a part throttle map beginning at EEPROM address $232A. Note that the HEX values have been converted to decimal for ease of reading. 14 Figure 4. Highlighted timing map from custom experimental EEPROM converted to decimal. Note map begins at address $232A, 55=RPM followed by 16 byte axis, 75= percent throttle followed by 16 byte axis, then 256 byte map. Not all 256 bytes shown. The Motronic Editor searches the entire 16 by 256 EEPROM for these trends and highlights them as illustrated in Figure 4. This search function makes it easy to identify desired maps, but it also identifies data blocks that are not considered to be valid maps. There are a few techniques to determine if a map is valid, though the primary method is by inspection of the general format. Although the Motronic Editor searches for the trends previously mentioned, its results are not perfect. It identifies other sections of code that have some of the defined characteristics, but not enough of them to be considered a valid map. Figure 5 illustrates a map that was highlighted as a part throttle timing map. 15 Figure 5. Invalid timing map. Data highlighted by Motronic Editor as a timing map. The data highlighted in Figure 5 follows some of the guidelines for a timing map. The trends are present beginning with 55 then 4 axis length followed by 4 axis data points, followed by 75 and 6 axis length and 6 axis data points, then finally wrapped up with a 4x6 matrix of data. But to be a valid part throttle timing map, the matrix must consist of a 16x16 matrix. This may be a valid map used by the ECU for another purpose; however it is not useful for this investigation. In addition to the map illustrated in Figure 5, the Motronic Editor will highlight sections of data that are more difficult to determine the validity. For these more difficult maps, the Motronic Editor has another analysis mode that graphs the data three dimensionally. This graphical method allows the data to be analyzed in a format that is more intuitive. Figures 6 and 7 below illustrate the highlighted data followed by the three-dimensional graphical representation. 16 Figure 6. Timing map from Turner Motor Sport Evo 3 8200 RPM custom EEPROM. Timing map begins at EEPROM address $2E48. Note this is not a valid timing map. Figure 7. Timing map from Turner Motor Sport Evo 3 8200 RPM custom EEPROM. Timing map begins at EEPROM address $2E48. Note this is not a valid timing map. 17 Through analysis of Figure 6 it appears that the format follows what would be expected for a valid timing map. While further investigation of the three dimensional represented in Figure 7 shows a region that seems to be very low in the vertical axis. The vertical axis illustrates the total target timing that the ECU will control to at each given RPM and percent throttle axis. Although the validly of this map is not obvious to the average reader, this representation would raise question to an experienced engine tuner. Figure 8 represents what a valid map should look like in the graphical mode. Figure 8. Timing map from Turner Motor Sport Evo 3 8200 RPM custom EEPROM. Timing map begins at EEPROM address $232A, Note: this is a valid timing map When Figure 8 is compare to Figure 7, even the inexperienced engine tuner can identify the region of the map that is significantly higher in Figure 8. This area of the map (circled in green) is most used during normal driving conditions and could cause severe engine damage if used. More 18 than likely the timing map in figures 6 and 7 is an experimental map used by the engine tuner for development. This is not an uncommon practice and should be watched out for when performing investigations like this one. This process of searching for and analyzing maps continued until the entire EEPROM was evaluated for both fuel and timing part throttle maps. The following maps were identified as valid maps within the original BMW EEPROM (see Table 1). Table 1. Part Throttle Fuel and Timing map addresses read from the original BMW EEPROM. Fuel 2581 29A0 2C7C 2F2A 31C4 350C 378E 3A0E Timing 232A 286A 2B1C 2DE2 304E 33C4 3646 38C6 It’s important to note that for every part throttle timing and fuel map, there exists an idle and full throttle map. The idle maps consist of 8 bytes and the full throttle maps consist of 16 bytes. Although each grouping of data on the EEPROM follows a logical order (idle map, part throttle map, and full throttle map) each of the idle and full throttle maps that are grouped together with the part throttle maps are not necessarily used together. The ECU may use an idle timing map from one area of the code, and then use a part throttle timing map from another area of the code. 19 Map Identification With all map addresses identified, the next step was to determine which conditions the ECU would use to determine which specific map to run. This was required so that when the conditions in which the engine “looks” to a specific map could be controlled, or recreated for this research. In order to force the engine to behave in a manner that would be free of detonation, it was important to be able to modify the map that was being used by the engine computer at the time. This was done by trial and error, while modifying each of the part throttle maps independently. As previously mentioned, modifying the original BMW programmed maps can easily lead to catastrophic engine failure if utmost care is not taken. With this said, one map was modified at a time, forcing the engine to stumble. Beginning with $232A part throttle timing map and using the Motronic Editor, all 256 bytes of the 16 x 16 matrix were reduced by 50 percent. By substantially reducing the timing, the engine was still able to run, but did not run well and experienced a stumble under a moderate load. Once the map was modified using the Motronic Editor software, the modified EEPROM was saved as a binary file and loaded into the ROM memory of the Transtronics Pocket Romulator (see Figures 9 and 10). 20 Figure 9. Pocket Romulator and Engine ECU. Figure 10. Intronics Pocket Romulator Software simulating the ECU EEPROM while the engine is running. Note address $232A is visible in the widow. 21 The pocket romulator was then plugged into the ECU and the engine was started. With utmost care the vehicle was driven down the test track, slowly accelerating to within the “part throttle” portion of the map. At the point where the intended section of the timing map was reached, if the engine was sluggish and running rough, it was noted that this map may be in use. One by one, each map was tested and the qualitative results were documented. Once all timing maps were evaluated, the one that was thought to be in use was reduced an additional 50 percent. This confirmed that it was the correct map, as once the engine reached the “part throttle” section of the map the engine severely stumbled and shut off. This was the case for the part throttle timing map at address $232A, and thus the timing map used by the ECU under normal operating conditions was identified. With the timing map identified, the same process was followed for the fuel maps, with the primary part throttle fuel map address found to be at $2581. Although it was not apparent at the time, modifying the timing maps alone yielded the best results for evaluating the detonating conditions, and thus fuel maps were left unmodified when testing to identify the detonation. Test Step Up With the EEPROM data classified and the fuel and timing maps identified, the next step was to set up the test apparatus. LabVIEW was identified to be used for data acquisition that was then integrated with the necessary hardware to measure vibrations due to detonation. Thus the test step up is structured into two distinct areas, hardware and software, both of which presented their own unique challenges. 22 Hardware To determine the detonation frequency of the test engine, a variety of off-the-shelf components were used, such as a sensor, signal amplifier / isolator, shielded cables, and signal receiver. As discussed previously, the result of detonation is two or more flame fronts traveling towards each other inside the combustion chamber, resulting in a pressure wave collision and thus a spike in cylinder pressure. This pressure spike is transmitted into the cylinder walls, cylinder head, and valve train components, as a measurable vibration. The approach to the hardware selection was to first identify a sensor that would have the sensitivity, range, and environmental enclosure necessary for this type of test. Then the associated data acquisition hardware necessary to “read” the sensor was selected and integrated with LabVIEW. Initial research was performed to utilize an off-the-shelf accelerometer. This quickly came to an end due to a limited number of accelerometers that would meet the frequency range requirements and were commercially available. Taking into consideration that all modern day vehicles are designed with detonation detection, it was decided to use one of many off-the-shelf knock sensors that are in use today. Since the resulting vibration from detonation is primarily determined by the size and shape of the combustion chamber [7] and the frequency range typically seen in detonation ranges between 5 kHz and 10 kHz [12], another engine of similar displacement and cylinder head design which utilizes detonation control needed to be identified. Based upon prior professional experience it was determined that Volkswagen (VW) engines would most likely meet this criteria, specifically the 1.8 liter (L) turbo engine widely used in Jettas, GTIs, and Golfs. An OEM knock sensor was then identified which is in use on many VW models with engine sizes ranging from 1.8L to 3.6L (VW Touareg). Considering the test engine is 2.5L, this was a 23 reasonable selection as it is between the engine sizes used in production. Additional study of the data sheet for the selected knock sensor further qualified the sensor as meeting the needs for the project (see Appendix B). The knock sensor, Bosch piezoelectric vibration sensor - part number 0261231148 (Appendix C), was selected for use. This sensor has a frequency range of 1-20 kHz, measuring range of 0.1400g, sensitivity of 26 mV/g at 5 kHz, and utilizes a through hole design for mounting. Not knowing the frequency at which the BMW S14 engine will detonate, these parameters seemed reasonable to start with. The Bosch sensor data sheet does not specify a preferred mounting location, which made mounting easier since the location could be optimized based on the space constraints of the test engine. The typical location used by engine manufactures is on the side of the cylinder block so this was the obvious choice for this project, see Figure 11. 24 Figure 11. Drawing of a typical BMW S14 engine [14]. Since only the sensitivity of the Bosch sensor was known to be 26 mV/g at 5 kHz with the operational range of the sensor to be 0.1 – 400g but the characteristics of the test engine to be expected were unknown, the output voltage from the sensor needed to be verified prior to defining the remaining hardware components. To determine this, the sensor was evaluated with a Kikusui Electronics Corporation Dss 6522 Digital Storage Oscilloscope and the engine was run to measure the voltage generated by the sensor. The engine speed varied between 1,000 – 3,500RPM and the voltage was found to be less than 10mV. With voltages this low, and the expected frequency to be between 5 kHz and 10 kHz, the output voltages were determined to be less than 100mV and thus compatible with standard audio equipment. 25 The knock sensor was then wired to an off-the-shelf shielded RCA cable utilizing a Bosch plug housing 1928403137 and then connected to a small audio amplifier. The purpose of the amplifier was to provide the ability to adjust the gain of the signal in order to optimize the amplitude of the signal. In addition, the amplifier allowed for the signal to be isolated from the recording device. This was important to ensure that any voltage spikes from the sensors or associated wiring did not damage expensive electronics in the event of an electrical short or other mishap. The basic system used off-the-shelf audio components to transmit the sensor generated voltage to the microphone input of a laptop computer. The shielded sensor wire was connected to the amplifier, and then the output from the amplifier was split with the use of a mono y-adapter so that one line could be connected to a laptop computer for data collection and analysis, and the other line to headphones. The use of the headphone allowed for a positive identification of when detonation occurred during testing. Figure 12 illustrates the hardware system used for the data collection. 26 Amplifier To Computer Knock Sensor Head Phones Figure 12. Complete sensor and amplifier hardware system. The pictures for each following hardware components can be found in Appendix A (with exception to the laptop computer). Table 2. Test set up hardware component list. Component Laptop Knock sensors Stereo headphones EEPROM simulator “Pocket Romulator” Phono Jack to 1/8" Mono Phone Plug Shielded Adapter 12-Ft. Shielded Cable, RCA Plug to Tinned Wires 3-Ft. 1/8" Stereo Plug Cable Gold-Plated Volume Control for Stereo Headphones Mini Audio Amplifier Mono Y-Adapter Manufacturer Dell Bosch Sony Transtronics Radio Shack Radio Shack Radio Shack Radio Shack Radio Shack Radio Shack Part Number Precision M6400 0261231148 N/A 2716-27256 2740330 4202372 4200223 422559 2771008 2740310 27 Software Two software packages were used for signal measurement, Soundcard scope 1.32 and LabVIEW. LabVIEW was used for data collection and frequency analysis official testing, and the Soundcard scope 1.32 [15] was used for initial test set up and secondary verification. The Soundcard scope 1.32 is a free software package that is available for download and functions much like an oscilloscope. The software provides an interface that allows the sound card on a personal computer to be used as a voltage input data acquisition card and displays the signal in a format similar to a standard oscilloscope. The interface allows the user to view the raw signal, adjust sample rate, apply filters, and perform a FFT (Fast Fourier Transform). However it does not allow the measured signal to be saved for future analysis and therefore it was only used for accuracy verification. LabVIEW is a product by National Instruments which is a visual based data acquisition program. This allows for user defined functionality including custom analysis and data logging. The software package format enables relatively easy programming and interfaces to data acquisition hardware to perform numerous inputs and/or output functions. For the purpose of this project, LabVIEW simplified the hardware portion of the data acquisition system necessary to perform a FFT. Like the Soundcard scope 1.32, LabVIEW has a prewritten virtual instrument (VI) in the standard programming library that allows the personal computer sound card to be used as a data acquisition card. This VI greatly simplified the programming required as it controls typical windows background processes to ensure that the required sample rate is achieved. In addition to the sound card VI, LabVIEW also has a prewritten signal analysis VI that will perform a FFT 28 which further simplifies programming. However, the FFT VI was not initially known to be available so the FFT was coded in long hand. With the FFT being the basis for this project, comparisons were done between the two software packages to ensure the custom LabVIEW application was functioning correctly. Software Accuracy Verification Using a Parallax Basic Stamp 2, Parallax Board of Education and a Parallax simple piezoelectric speaker, tones were generated and read by both the Soundcard scope 1.32 and the custom LabVIEW application. The tones ranged between 5k-10k in 2.5 kHz increments. Both software packages were used independently to measure the frequency generated by the Basic Stamp. If both programs read the tone that was generated by the Basic Stamp, then the LabVIEW application was considered to be reasonably accurate. The following figures illustrate the measurements taken at 5 kHz (Figures 13 and 14), 7.5 kHz (Figures 15 and 16), and 10 kHz (Figures 17 and 18). 29 Figure 13. Soundcard scope 1.32 measuring the 5 kHz tone generated by the Basic Stamp 2 [15]. Figure 14. LabVIEW application measuring the 5 kHz tone generated by the Basic Stamp 2. 30 Figure 15. Soundcard scope 1.32 measuring the 7.5 kHz tone generated by the Basic Stamp 2. Figure 16. LabVIEW application measuring the 7.5 kHz tone generated by the Basic Stamp 2. 31 Figure 17. Soundcard scope 1.32 measuring the 10 kHz tone generated by the Basic Stamp 2. Figure 18. LabVIEW application measuring the 10 kHz tone generated by the Basic Stamp 2. 32 By inspection of the above figures which illustrate the measurements taken for both the Soundcard scope 1.32 and the custom LabVIEW application, it can be seen that both software applications determine the verifications tones to be the same. With the expected detonation frequency range to be between 5 kHz and 10 kHz, as simulated with this verification exercise, the LabVIEW application was assumed to be accurate across the entire range. Software Parameters With the LabVIEW application verified for accuracy, the next step was optimizing the software test parameters for both the FFT analysis and data collection. Sample Rate When performing an FFT, the sample rate is of utmost importance. In order to determine the appropriate sample rate, many factors must be considered. First and foremost, the sample rate must be fast enough that the measured signal can be accurately recreated. To do this, the Nyquist frequency needs be considered. Nyquist theory states that the sample rate must be at least two times the frequency to be measured [16]. For example, if the largest sample frequency that is expected to be measured is 10 kHz, then the sample rate per the Nyquist theorem would be 20 kHz. In practice it is not uncommon to have sample rates of 6-10 times the measured signal, depending on computer processing power. In reference to this project, the processing power was not the limiting factor, but rather the memory storage due to the length of the tests. If this project consisted of merely performing a frequency analysis and not data logging, then memory would not have been an issue. However this was not the case and the data was stored for future analysis. 33 Therefore a balance between the sample rate and number of samples stored had to be weighted to ensure the accuracy of the frequency analysis was not affected. With the maximum expected frequency to be measured at 10 kHz, according to the Nyquist theorem, the sample rate must be a minimum of 20 kHz. However, initial testing at this sample rate caused the data file to be too large to be accommodated by common spreadsheet applications. The goal became to reduce the sample rate enough to allow the sample to be accurately recreated, but still conform to the limits of common spreadsheet limits without deviating from the Nyquist theorem. Since the detonation frequency is a function of cylinder volume and shape and the typical detonation frequency ranges between 5k and 10 kHz [7], it was assumed that given the relatively small displacement of the test engine, 2.5L, the detonation frequency would be less than 10k. Based upon this assumption, the sample rate was reduced to 16,384 Hz. With this new sample rate, the Nyquist frequency is 8,192 Hz (.5 * 16,384). Thus any frequency below this value will be accurately measured, and anything above this could not be considered to be true. Number of Samples The next factor in performing a FFT is the number of samples to be analyzed. In performing the FFT, it is required that the number of samples used to calculate the FFT of the given signal needs to be a power of two. In conjunction with this, it was necessary to perform the FFT using as many samples as possible in order to capture the detonation event. If too few samples were taken, and only one cylinder was detonating, the detonation event may not be captured. In order to be sure that enough samples would be analyzed, a time period of 2 seconds was arbitrarily chosen. Taking into account a sample rate of 16,384 Hz, or 16,384 samples per second, a total of 32,768 34 (16,384 Hz * 2s) samples were captured per FFT calculation. With 32,768 samples also honoring the power of two rule with 32,768 = 215. A summary of the data sampling details are outlined in Table 3. Table 3. Software parameters used for collecting knock sensor data. Parameter Sample rate Value 16,384 Hz Nyquist Frequency 8,192 Hz Number of samples taken per FFT calculation 32,768 samples Sample Period 2 seconds Calculations The basis of this project is through the use of a FFT to determine the frequency content of the knock sensor output signal. The purpose of this method is to graphically illustrate the frequency content on the knock sensor signal. A FFT is an algorithm that calculates the discrete Fourier transform (DFT) and reduces the number of computations required to decompose a sequence of values into components of different frequencies [17]. The LabVIEW FFT virtual instrument (VI) calculates the DFT of the knock sensor output signal. National Instruments (the manufacturer of LabVIEW) defines the DFT as: −𝑗2𝜋𝑘𝑛/𝑁 yk = ∑𝑁−1 𝑛=0 𝑥𝑛 𝑒 For n = 0,1,2,…,N-1 Where: x = the input frequency 35 N = the number of elements of x y = the transform result With the frequency resolution: ∆𝑓 = 𝑓𝑠 𝑁 Where: fs = sampling frequency The following represents the FFT equation used by LabVIEW: ∞ 𝑥(𝑓) = ∫ 𝑥(𝑡)𝑒 −𝑗2𝜋𝑓𝑡 𝑑𝑡 −∞ Where: x(f) = sample in frequency domain x(t) = sample in time domain Figure x illustrates the LabVIEW code which describes how the input signal is brought into the program, the FFT is calculated, and the raw signal and FFT calculations are saved to a text file. 36 A C B E J K D L F G H I Figure 19. LabVIEW application code, illustrating input – output signal process. Table 4 outlines each of the LabVIEW program features in Figure 19 and describes how each of them contribute to the overall input / output signal process flow. Table 4. LabVIEW signal and calculation processes. LabVIEW Description program feature A LabVIEW VI that accesses the PC soundcard at a set sample rate of 16,384 Hz B Raw signal graph, see Figure 20, top graph C Sample rate control, 16,384 Hz D Number of samples per FFT calculation (32,768) E Division operator, C/D calculates the time step required for graphing the FFT F LabVIEW VI that calculates the FFT of the input signal G Calculates the array size of the input signal H Division operator, F/G calculates the y-axis distribution required for graphing the FFT 37 I J K L Filters out the imaginary values calculated by F and passes on only the real values Bundles the x-axis time step data and y-axis FFT data for graphing and data storage FFT graph, see Figure 20, bottom graph Logs both the raw input signal and calculated FFT to a .txt file 38 Chapter 4 TESTING ANALYSIS Discussion As discussed previously, the approach to the project was to utilize both a qualitative headphone analysis in conjunction with a quantitative frequency analysis. The detonation frequency analysis was performed by running the vehicle down a test track at approximately 15-percent calculated load and an engine RPM of 3,000. This was achieved by running the vehicle at a constant speed on a straight and relatively flat road in fourth gear and watching the vehicle tachometer to ensure that the target RPM of 3,000 was maintained. With the vehicle at the target engine speed and calculated load achieved, headphones were used to listen to the knock signal in order to determine if anything abnormal was happening. Surprisingly enough, the sound of the pistons and valve train components were easily identifiable with the head phones. Initially the sound of the knock event was unknown, making it difficult to know for sure if detonation was occurring. Test Overview Initial testing involved a series of experiments to see if the detonation could be identified with the headphones. The vehicle was repeatedly run on the test track with the map thought to suppress detonation watching the LabVIEW application of the engine noise, or FFT of the engine noise, and listening with the headphones. Whenever a tone or particular frequency spike in the FFT graph was out of the ordinary, it was attempted to duplicate. With numerous test runs performed with the non-detonating map, the next step was to load the detonating map. While the vehicle was 39 traveling at the target parameters discussed above, the detonating map was quickly loaded. Almost instantaneously a very distinct cracking noise, almost like popcorn popping, became present in the headphones and a spike began to grow in amplitude within the FFT graph at approximately 6.4 kHz. Figure 20 illustrates the LabVIEW FFT application graphing both the raw knock sensor signal (top) and the FFT (bottom) with detonation present. Raw Signal Plot FFT Plot Nyquist Frequency Figure 20. LabVIEW application graphing raw knock sensor signal (top) and FFT (bottom) with Nyquist frequency at 8,192 Hz and detonation frequency at approximately 6.4 kHz. Note in the FFT graph above (Figure 20) the low point in the noise a little above 8 kHz. Remembering from the software parameters, the Nyquist frequency of a signal sampled at 16,384 Hz is 8,192 Hz which is represented in the graph by the low point. All of the data beyond this frequency is simply a reflection of the signal between 0 and 8,192 Hz, and thus the data beyond the Nyquist frequency is considered to be not real and must be ignored. For the purpose of this 40 project the frequency scale was set to show the effects of the Nyquist frequency on the sampled signal. Figure 21 illustrates the LabVIEW FFT application graphing both the raw knock sensor signal (top) and the FFT (bottom) without detonation. Note that the spike at 6.4 kHz is not present as it was in the graph when detonation was occurring (Figure 20 above). Figure 21. LabVIEW application graphing raw knock sensor signal (top) and FFT (bottom) with Nyquist frequency at 8,192 Hz and detonation not present. Now knowing what the detonation sounded like and approximately what frequency the detonation occurred, official test runs were performed and data was logged. A total of twenty runs were completed, ten non-detonating and ten detonating, with similar results as identified in the initial testing. Figure 22 illustrates a sample of a detonating plot using the LabVIEW calculated FFT via Microsoft Excel. The x-axis represents frequency in Hertz (Hz) and the y-axis represents the amplitude of the calculated FFT in units of Decibels (dB). Traditionally dB is the common unit 41 for audio and acceleration data plots with the reference voltage of 1000mV (10-6 V). The y-axis values were calculated by the following formula: 𝑉1 GdB = 20 log10 (𝑉2) Where: GdB = Power gain, in decibels V1 = FFT (peak), in volts V2 = reference, in 10-6 volts Detonation Frequency Analysis (Detonation - Run 8) 120 FFT Peak Voltage, dB re 10-6 V 110 100 90 80 70 Figure 22. Data plot of test run number 8; detonating with a spike present at approximately 6,480 Hz. 8000 7500 7000 6500 6000 5500 Frequency, Hz 5000 4500 4000 3500 3000 2500 2000 1500 1000 500 0 60 42 It is important to note that the y-axis values are scaled to be relative to the 1000mV power gain (GdB) calculation previously discussed. The actual amplitudes presented in the FFT plots are a function of the input signal gain, which was not documented. For the purpose of this project, it was not important to derive the actual accelerations, which would require the raw signal gain to be known. The focus of the project was to evaluate the frequency content of the knock sensor signal in order to identify the actual detonation frequency by comparing the FFT results of a nondetonating plot with that of a detonating plot. And thus the amplitude of the raw signal was not necessary. The arrow in Figure 21 illustrates a spike in the FFT plot at 6,480 Hz which indicates the presence of detonation. Figure 23 represents a plot without detonation; note the absence of the 6,480 Hz spike. 43 Detonation Frequency Analysis (Non-Detonation - Run 12) 120 FFT Peak Voltage, dB re 10-6 V 110 100 90 80 70 8000 7500 7000 6500 6000 5500 Frequency, Hz 5000 4500 4000 3500 3000 2500 2000 1500 1000 500 0 60 Figure 23. Data plot of test run number 12; non-detonating with a spike present at approximately 6,480 Hz. The data for both the raw signal and calculated FFT can be found in Appendix D for the plots illustrates in Figures 22 and 23. 44 Chapter 5 FINDINGS AND INTERPRETATIONS Discussion This project has presented many challenges which came with numerous hours of tangent investigations in order to reach the conclusions herein. The BMW S14 engine computer was dismantled and the EEPROM was read, interpreted, and manipulated to induce specific engine behavior. A custom LabVIEW based application was programmed and integrated with off-theshelf audio hardware for the purpose of performing a frequency analysis of an oscillating voltage signal generated by a typical knock sensor used by current vehicle manufactures. The custom LabVIEW software application and integrated hardware components were tested and verified for accuracy. The test engine was evaluated in conditions which yielded both detonation and nondetonation on demand through the use of an EEPROM simulator. The detonation frequency was repeatedly present at approximately 6,480 Hz. In fact through careful examination of the data, the detonation frequency was observed to “grow” in amplitude out of the noise, which also coincides with the qualitative assessment of the data evaluated in real-time with headphones. Take note of Figures 31-35 in Appendix C. In Figures 31 and 32, the detonation is not present, but it is does display in Figure 33 and continues to grow in amplitude through Figure 35. This phenomenon was a result of how much of the signal was represented by the detonating event. When the detonation was beginning, the amount of the signal represented by the vibration due to the detonations was small. As the detonation continued and became more severe, the amplitude would rise illustrating the detonation frequency within the sampled signal 45 was more apparent. Just as when the detonation was beginning, when the detonation was ending, the amplitude of the frequency decreased. During testing, the EEPROM map was switched back and forth between detonating and non-detonating conditions to ensure that the results were consistent. Without fail, every time the detonating EEPROM map was loaded into the vehicle computer, the 6,480 Hz spike was present in the data. Therefore, with relative confidence it can be concluded that the detonation frequency of the particular engine used for testing, operated under the parameters detailed in this paper, that the detonation frequency is approximately 6,480 Hz. Future Work Now that the detonation frequency has been identified, there are a few options for additional work / research. You may eliminate the detonation or perform further research to determine which cylinder is detonating. To eliminate the detonation, two potential paths may be followed. The first path is to modify the existing fuel and timing maps so that the identified knock frequency is not present. This may be achieved through an iterative effort of running the LabVIEW application under various engine operating conditions either on a vehicle dynamometer or through normal day-to-day driving and watching the FFT for the 6,480 Hz spike. If the spike is present, then modify the fuel and timing maps in the calculated load and engine RPM region that the detonation was identified. The second path is to replace the ECU with one that will allow for detonation detection. In this case, the wiring interface between the replacement ECU and the engine would require significant 46 modifications. The replacement ECU can be programmed to “look” for the detonation frequency of 6,480 Hz so that it will automatically modify the fuel and timing as the detonation occurs. This method is preferred as the engine can be run at the limit of detonation which is ideal from a performance perspective. To determine which individual cylinder is detonating, the LabVIEW application can be further developed to reduce the required number of samples required for each FFT calculation. The LabVIEW application would need to be modified to monitor the engine speed and continuously calculate the crankshaft position in order to keep track of where each cylinder is in the combustion cycle. In doing this, each FFT calculation could be applied to a few milliseconds just after top dead center of the combustion cycle for each cylinder. This would allow for the total sample period to be drastically reduced which would allow for quicker FFT calculations, as well as enable the identification of detonation of a specific cylinder. 47 APPENDICES 48 APPENDIX A Test Hardware Pictures Figure 22. Pocket Romulator Transtronics 2716-27256. 49 Figure 23. Phono Jack to 1/8" Mono Phone Plug Shielded Adapter, Radio Shack, 2740330. Figure 24. 12-Ft. Shielded Cable, RCA Plug to Tinned Wires, Radio Shack, 4202372. 50 Figure 25. 3-Ft. 1/8" Stereo Plug Cable, Radio Shack, 4200223. Figure 26. Gold-Plated Volume Control Cable for Stereo Headphones, Radio Shack, 422559. 51 Figure 27. Mini Audio Amplifier, Radio Shack, 2771008. Figure 28. Mono Y-Adapter, Radio Shack, 2740310. 52 APPENDIX B Bosch Knock Sensor Data Sheet Figure 29. Bosch Knock Sensor Data Sheet, page 1. 53 Figure 30. Bosch Knock Sensor Data Sheet, page 2. 54 APPENDIX C Data Plots Detonation Frequency Analysis (Detonation - 1 of 5) 120 FFT Peak Voltage, dB re 10-6 V 110 100 90 80 70 Figure 31. Detonation plot 1 of 5 in a continuous series of FFT calculations. Note the absence of the detonation frequency spike. 8000 7500 7000 6500 6000 5500 Frequency, Hz 5000 4500 4000 3500 3000 2500 2000 1500 1000 500 0 60 55 Detonation Frequency Analysis (Detonation - 2 of 5) 120 FFT Peak Voltage, dB re 10-6 V 110 100 90 80 70 Figure 32. Detonation plot 2 of 5 in a continuous series of FFT calculations. Note the absence of the detonation frequency spike. 8000 7500 7000 6500 6000 5500 Frequency, Hz 5000 4500 4000 3500 3000 2500 2000 1500 1000 500 0 60 56 Detonation Frequency Analysis (Detonation - 3 of 5) 120 FFT Peak Voltage, dB re 10-6 V 110 100 90 80 70 8000 7500 7000 6500 6000 5500 Frequency, Hz 5000 4500 4000 3500 3000 2500 2000 1500 1000 500 0 60 Figure 33. Detonation plot 3 of 5 in a continuous series of FFT calculations. Note the detonation frequency spike beginning to develop at 6480 Hz. 57 Detonation Frequency Analysis (Detonation - 4 of 5) 120 FFT Peak Voltage, dB re 10-6 V 110 100 90 80 70 8000 7500 7000 6500 6000 5500 Frequency, Hz 5000 4500 4000 3500 3000 2500 2000 1500 1000 500 0 60 Figure 34. Detonation plot 4 of 5 in a continuous series of FFT calculations. Note the detonation frequency spike continuing to develop at 6480 Hz. 58 Detonation Frequency Analysis (Detonation - 5 of 5) 120 FFT Peak Voltage, dB re 10-6 V 110 100 90 80 70 8000 7500 7000 6500 6000 5500 Frequency, Hz 5000 4500 4000 3500 3000 2500 2000 1500 1000 500 0 60 Figure 35. Detonation plot 5 of 5 in a continuous series of FFT calculations. Note the detonation frequency spike at its peak amplitude at 6480 Hz. 59 APPENDIX D Raw Data Channels 2 Samples 32768 Date 8/10/2010 Time X_Dimension Channels 16384 2 Samples 32768 16384 8/10/2010 Date 8/12/2010 4:28:49 PM 4:28:49 PM Time 3:11:59 PM 3:11:59 PM Time Time X_Dimension Time Time 0.00E+00 X0 6.20E+01 Delta_X 6.10E-05 X0 5.26E+01 Delta_X 6.10E-05 ***End_of_Header*** FFT Volt (Peak) 0.5 8/12/2010 0.00E+00 0.5 ***End_of_Header*** X_ Value dBu Volt FFT - (Peak) X_ Value dBu 9.16E-05 0.038962 0 91.81282 0.001404 0.013515 0 82.61632 0.002563 0.064461 0.5 96.18594 0.000244 0.03708 0.5 91.38279 0.005219 0.061974 1 95.84419 0.004364 0.065497 1 96.32443 0.004059 0.051267 1.5 94.19676 0.004639 0.07766 1.5 97.80395 0.01355 0.025317 2 88.06824 0.002808 0.072569 2 97.21502 0.006409 0.024829 2.5 87.89918 0.00882 0.064637 2.5 96.20962 0.008972 0.024937 3 87.93688 0.002319 0.052555 3 94.41228 0.010223 0.063888 3.5 96.10839 0.019684 0.061407 3.5 95.76436 0.01236 0.04501 4 93.06618 0.022736 0.059437 4 95.48114 0.024384 0.014424 4.5 83.18171 0.003052 0.050073 4.5 93.99207 0.011169 0.008918 5 79.00535 -0.003296 0.056331 5 95.01495 0.019775 0.036328 5.5 91.20483 0.020172 0.057062 5.5 95.12694 0.036041 0.036755 6 91.30633 0.025055 0.040225 6 92.08992 0.00708 0.012964 6.5 82.25478 0.02536 0.027243 6.5 88.7051 0.031097 0.01908 7 85.61157 0.026489 0.026814 7 88.56723 -0.00687 0.012264 7.5 81.77264 0.025299 0.027577 7.5 88.81094 -0.02628 0.033793 8 90.57653 0.025787 0.021763 8 86.75438 0.051727 0.032126 8.5 90.13713 -0.00705 0.011014 8.5 80.8389 0.038025 0.091259 9 99.20551 -0.006104 0.070344 9 96.94454 Data set herein is only a sample. Complete data is available upon request by contacting the California State University, Sacramento, Mechanical Engineering Department. 60 WORK CITED [1] “10 Cars to Drive Before you Die – Feature.” Car and Driver. March 2010. <www.caranddriver.com>. [2] BMW of North America, Inc. 1988 BMW M3 Electrical Troubleshooting Manual. Montvale, New Jersey: 1988 PN 89 89 1 000 274. [3] Bentley Publishers. Volkswagen Jetta, Golf, GTI, Cabrio, Service Manual 1993-2002. Cambridge, MA. 1999. [4] Bentley Publishers. Volkswagen Jetta, Golf, GTI, Service Manual 1999-2005. Cambridge, MA, 2005. [5] Chilton’s. BMW 318/325/M3/525/535/M5 1989-93 Repair Manual. Benjamin E. Greisler, SAE. West Chester, PA. 1994. [6] Haynes. Chevrolet Silverado GMC Sierra 1999 thru 2001. Ed. Jeff Kibler and John H Haynes. Newbury Park, CA. 2002. [7] Taylor, Charles Fayette. “The Internal Combustion Engine in Theory and Practice.” 1985 Combustion, Fuels, Materials, Design. Vol II. 1985. [8] Bierman and Covington. “Relation of Preigntion and Knock Allowable Engine Temperatures.” NACA ARR 3G14 F-134, July 1934. [9] MacCoull. “Power Loss Accompanying Detonation.” Trans. SAE 34, 154 (1939). [10] Gerber and Schinder. “A Study of Knock Induced Stress in the Connecting Rod of a CFR Engine.” S.B. Thesis, Mechanical Engineering Department, Massachusetts Institute of Technology, Cambridge, MA. 1956. [11] del Valle and Cruz. “A Study of the Knock-Induced Stress in the Connecting Rod of a CFR Engine.” S.B. Thesis, Mechanical Engineering Department, Massachusetts Institute of Technology, Cambridge, MA. 1959. [12] Cline, Allen W. “Engine Basis: Detonation and Pre-Ignition.” <www.streetrodstuff.com>. [13] Porsche Motronic Editor. Computer Software. Marc Skarshinski. 2005. [14] 1990 BMW M3, S14 Engine. <www.realoem.com>. [15] Soundcard scope 1.32. Computer Software. Zeitnitz. 2005-2009. [16] Weisstein, Eric W. "Nyquist Frequency." From MathWorld--A Wolfram Web Resource. <http://mathworld.wolfram.com/NyquistFrequency.html>. 61 [17] Michael D. Greenberg. “Advanced Engineering Mathematics.” Second edition. Prentice Hall, New Jersey. 1998.