Application of the hottest embedded system in fuel

  • Detail

Application of embedded system in fuel control of electronically controlled diesel engine

for Chinese engineers, the application of embedded system in engine fuel control is a new topic. Its main feature is electromechanical integration. Engineers must have a comprehensive understanding of the basic working process of electromechanical system. Taking centinel, a famous product of electronic diesel engine control, as an example, this paper explains the problems that its embedded system needs to pay attention to, including product requirements, implementation scheme, specific implementation and software structure, which is worthy of reference for Mechatronics design engineers in China

centrinel advanced fuel management system (AOS) is an embedded system that can extend the fuel filling interval of electronically controlled diesel engines. It can periodically remove a small amount of old oil from the engine crankcase and replace it with new oil. The old oil is sent to the fuel tank of the engine, where it is mixed with fuel and burned under normal combustion conditions

centrinel can expand the working time of diesel trucks, tractors, generators and other equipment, and shorten the time spent on fuel replacement and other routine maintenance. Centinel uses old oil as fuel, which not only eliminates the need for waste oil treatment, but also reduces costs and controls environmental pollution

in fact, mechanical systems with similar functions have been available for many years. However, due to the complex engine controllers and strict air quality standards proposed by the industry, the full mechanical scheme can no longer meet the requirements. Centrinel is better than mechanical system in maintaining fuel quality, because it contains a smart algorithm, which can replace fuel according to the size of engine workload, and it is equipped with fault detection logic that mechanical equipment cannot achieve

the designers of centrinel have required this device to have high reliability from the beginning. If the fuel quality deteriorates or the oil level drops, the engine may be greatly damaged. Since centrinel wants to remove oil from the engine, it must take necessary precautions to ensure that the oil level and quality are always stable. It is troublesome to solve this problem, because there is no cheap oil level sensor that can work normally under the harsh conditions inside the diesel engine

under various climatic conditions, the mileage of diesel trucks on the highway last year was as high as 200000 miles, and industrial machinery such as construction equipment required several months of maintenance interval. Therefore, centrinel must be durable. In order to maintain the high utilization rate of commercial diesel equipment as much as possible, equipment such as centrinel cannot be repaired frequently and forces the whole equipment to idle

the software performance of centrinel should be stable, because the microcontroller is a one-time programming device. Once the system leaves the factory, the firmware cannot be updated. If there are software defects after leaving the factory, all centrinel devices must be replaced. The price of centinel should also be appropriate

implementation scheme

centrinel is an electromechanical device, which includes tms370 microcontroller, SAE J1587 automotive data link interface, mechanical valve assembly for controlling oil in and out of the engine, oil level measurement sensor, and oil tank containing new oil

under normal working conditions, the microcontroller reads the engine information from the J1587 data link interface to determine the current working load of the engine and detect whether various system faults related to the engine and fuel occur. This information can be used to calculate the fuel burning rate and convert it into a series of electronic control pulses to allow the fuel transfer valve assembly to transfer the used oil from the engine crankcase to the fuel tank

the design of the fuel delivery valve integrates the old oil and the new oil piston in the same device, so a fixed amount of old oil can be delivered to the fuel tank and replaced with the same amount of new oil. The valve and related lead pipes are heated by the engine, so the fuel can flow normally even in cold weather

when the new oil tank is empty, the sensor will alarm, and then centrinel will delay the pulse until it is filled with oil. The engine operator still needs to monitor the fuel gauge of the engine crankcase and manually refuel if necessary to replace the small amount of fuel burned inside the engine during normal operation

specific implementation

tms370 microcontroller constitutes the basis of this design. The selected tms370 models include 256b on-board ram, 8KB OTPROM, 256b EEPROM, a serial communication interface (SCI), two 16 bit counters, 23 digital inputs, an 8-channel analog-to-digital converter, and a 12Mhz system clock. Other devices used in centrinel design also include power regulation and power failure detection circuits, as well as an SAE J1587 data link interface (similar to RS-485) for connecting the engine communication data link

in order to improve reliability and durability, all centinel data input values must be verified by both software and hardware before use. The hardware detects the open circuit and short circuit on the input and output, and the inspection of all input value ranges can prevent incorrect operation in the case of mechanical or electrical failure

the control algorithm operates at a fixed interval of 20ms, and calculates the correct fuel rate in combination with the workload of the square wave pulse signal generated by the engine with the same frequency as the quartz crystal, climate and other information received from the engine data link. Therefore, the fuel replacement frequency changes in real time. Regardless of the actual working cycle of the engine, a certain fuel quality can be maintained, which is generally replaced every 20000 miles. Most of them are expensive

once the correct fuel rate is calculated, in order to burn and replace the required amount of fuel, this value is transmitted to the second algorithm to calculate the speed at which the pulse is transmitted to the fuel transfer valve assembly. At this time, the control logic is a problem, because when the new oil tank is empty, the oil is cold, or the system fails, the control pulse will be delayed. If the operator fills the tank with new oil, the oil heat or the system fault is repaired, the control pulse will be transmitted faster, so as to control the amount of new oil replacement

in order to minimize air pollution, EPA limits the fuel volume of diesel engines. In order to prevent centrinel from exceeding this limit, the designer adopted a third algorithm to limit the maximum pulse frequency transmitted to the fuel transfer valve in all cases. Due to this limitation, in some extreme cases, the recovery of delayed pulses may take several hours or even days to complete

software structure

the function of the software is to configure the i/o hardware, timer, serial communication port, ADC and other peripherals of the microcontroller, and then it is in the state of waiting for interruption. Interrupt service program contains a lot of centrinel code, which is commonly used in applications that need multithreading but lack operating system scheduler

the interrupt generated by the periodic timer starts the main control loop code, which resets the hardware watchdog timer only when it is successfully completed. Resetting the watchdog timer at the end of the calculation prevents a timeout. If the code execution time is too long, the watchdog reset code will be interrupted by the iteration of the algorithm, and finally the watchdog timer time overflows

another interrupt service program receives engine data link information from the serial port. The code includes a simple state machine, which can parse the data and checksum of the input packet. Packets with invalid checksum and out of range data are discarded. A timer can measure the duration between successfully received packets, and if an excessive delay is detected, the combustion rate calculation will be terminated. In this way, when the engine information necessary to determine the appropriate combustion rate is lacking, centrinel will not deliver new oil

there are also some interrupt service programs that force periodic sampling of the on-board ADC of the tms370 and inform centrinel of the power failure caused by the operator turning off the engine, which is started by the ignition switch

the unused interrupt vector is filled by the start function pointer. When an unwanted interrupt is detected, the system can be restarted

centrinel's EEPROM can be used to store important continuous data, such as the number of fuel pulses required and the actual number sent. However, these values cannot be updated in every control cycle, because doing so will greatly exceed the write cycle limit of EEPROM before the end of the life of centinel. On the contrary, data can be mirrored to ram and written to EEPROM only during the shutdown period and within the 200ms holding time provided by the capacitor built into the centrinel power supply circuit

hold time provides a good balance between reliability and cost reduction (larger values require larger capacitance), but it is very close to the write cycle time of EEPROM. This means that there is little room for unexpected delays during the shutdown. Since EEPROM contains important information about the state of fuel combustion, its contents must remain stable in all cases unless the equipment fails

an unexpected problem occurred in the field test: many truck drivers like special high-voltage radio devices, which will cause the voltage fluctuation of the main power supply system of the truck (generally 12V DC power supply), and the peak to peak value is close to 30V. These voltage fluctuations may lead to the failure of the centinel power supply line, trigger other EEPROM write operations, and affect the system performance. In order to solve this problem, we must add additional hysteresis code to the existing signal analysis logic of centrinel to prevent the EEPROM from updating when the radio is used, so as to give wrong power failure prompt

summary of this paper

the valuable experience of centinel developers is to use structural design tools together with case analysis and failure mode research, so that when coding, the software basically meets the design requirements

centrinel software development team insists on writing the program in advance, so that the written application has almost no defects and fully meets the requirements. These programs also contain additional control logic that eliminates most possible software errors, such as the EEPROM timeout mentioned earlier

the design process also adopts an equivalent evaluation process. Before the final finalization, the program and circuit design must be studied by other developers. These "outer eyes" can help find errors or places that do not meet the design requirements, and also promote teamwork, so that more people in the company can participate in the development of centrinel and share its success

centrinel is currently one of the electronic diesel engine series products of Cummins engine company. Centinel design won the OE issued by OEM off highway magazine. What are the standards or methods to regulate the quality of masks? In fact, our country has long had a complete set of national performance standard mmie awards for medical masks and textile products, which is regarded as a model of excellent products through continuous improvement of system engineering practice within Cummins company

bill China market has become a hot spot in the world. L Gatliff is an independent embedded system consultant and a senior esp. Contact email: bgat@. Paul Cantrell is a management consultant, chief architect and developer of centrinel firmware. (end)

Copyright © 2011 JIN SHI