4
1 Development of Electronic Governor for Diesel Engine Based on Embedded RTOS Jiang Fangyi, Gao Shilun, Zhang Jie and Huang Wei control precision and reduce the period of the development. Abstract-This paper presents an improved electronic The practice of the development indicates that using the governor for diesel engine using high-performance ARM CPU new development method can implement the diesel engine with a free real-time operating system (RTOS)--pC/OS II. It also speed control function as well as make the design of the describes the hardware architecture and soft design approach wit dcail.Acasadcconrolalgritm ws dsigcd.Thc control program more flexibly. Make use of the powerful with details. A cascade control algorithm was designed. The mlifntoa einaddvlpmto,i a mrv speed regulation experiment is taken under the hardware-in-loop multi-functional design and develop method, it can improve simulation system. The results show that the design efficiency can the efficiency of development and quality of the software. be improved obviously with real-time operating system. With the real-time operating system, it can avoid the large amount of work which is not necessary when designing the Index Terms-Diesel Engines, Electronic Governor, Real-Time system management software of the engine with the Operating System. foreground and background design construct, so as to effectively managing the multitasking. I. INTRODUCTION W5 ,hen developing and studying the electricity control II. THE COMPOSITION AND OPERATING PRINCIPLE OF THE system of the automotive engines, the system control ELECTRONIC GOVERNOR software is the important key affecting the system The key step of the electronic governor design is to performance, even can directly decide the control performance choosing the suitable actuator driven fuel pump rack. The of the whole system. With the functions and constructs of the requirements to actuator of diesel engine governor system are engine control system become more and more complicated, fast response, high accuracy and reliability. Typical actuators the control software in the form of the single thread haven't ' are stepp er motor actuator, electromagnetic actuators and satisfied the requirements of the system control, as a result the electro-hydraulic actuator. Stepper motor driving rack makes methods of adopting Embedded real-time system in the face ofthe machine more complicated, because it needs motion obj ects is increasingly becoming popular [1] [2], and the whole change from rotation motion into linear motion. The electro- world also starts to carry on the standard of OSEK/VDX hydraulic actuator will need to be equipped with specialized across the OS, communication and administration of networks hydraulic loop and the transformation is very difficult. for the bottom platform of the electricity control software [3]. Comparatively, using electromagnetic actuators as actuators This paper, on the basis of "P" serial in-line fuel injection can be with high positional accuracy and faster speed of pump, describes the development of the electronic speed implementation, and the whole system is more simple and regulator for diesel engine with the real-time operating reliable, the equipment is quite convenient. systems. It reserved the traditional mechanical fuel feeding system and adopted a new electronic speed regulator to take A. The control and drive of electromagnetic actuators the place of the old. To achieve the target of the better The sketch of diesel speed governor improved and the compatibleness, real-time performance and precision, this electronic pump were shown in Fig. 1. Here is the operating paper choose a powerful 32-bit ECU for the hardware principle of the governor. When the electromagnet has no platform and embedded real-time operating system-gC/OS II working electricity, the preload of return spring (B) makes the for the software platform, this make sure the new governor rack (A) stay at the original position where the pump can can fulfill the need of the multitasking, real-time performance, disrupt fuel oil totally. When electrified, the coils make the core magnetic field magnetic saturation, and the core coils Manuscript received September 15, 2006. This work was supported in part have a power with proportional to the current. If this power is by the China Ph.D Discipline Special Foundation NO. 20040487038. greater than the force of the return spring, the rack will move Jiang Fangyi is with the Institute of Energy and Power Engineering 'i h ieto oices i mut fsalrta h Huazhong University of Science and Technology , Wuhan 430074, China (email: jiang y.dc agrnail.corn) return spring force, to the direction to reduce oil until the Gao Shilun, Zhang Jie and Huang Wei are with the Institute of Energy and electromagnetic force was balance with the return spring force. Power Engineering , Huazhong University of Science and Technology Thcolureticnrledbcagngheuycce Wuhan 430074, China'Th o cret1cotoldb hnngheuycce control signals using pulse width modulation (PWM) method, so the electromagnetic force will be changed by the current 1-4244-0759-1/06/$20.OO ©2006 IEEE. - 218 -

[IEEE 2006 IEEE International Conference on Vehicular Electronics and Safety - Shanghai, China (2006.12.13-2006.12.15)] 2006 IEEE International Conference on Vehicular Electronics

  • Upload
    huang

  • View
    221

  • Download
    2

Embed Size (px)

Citation preview

Page 1: [IEEE 2006 IEEE International Conference on Vehicular Electronics and Safety - Shanghai, China (2006.12.13-2006.12.15)] 2006 IEEE International Conference on Vehicular Electronics

1

Development of Electronic Governor for DieselEngine Based on Embedded RTOS

Jiang Fangyi, Gao Shilun, Zhang Jie and Huang Wei

control precision and reduce the period of the development.Abstract-This paper presents an improved electronic The practice of the development indicates that using the

governor for diesel engine using high-performance ARM CPU new development method can implement the diesel enginewith a free real-time operating system (RTOS)--pC/OS II. It also speed control function as well as make the design of thedescribes the hardware architecture and soft design approach

wit dcail.Acasadcconrolalgritm ws dsigcd.Thc control program more flexibly. Make use of the powerfulwith details. A cascade control algorithm was designed. Themlifntoa einaddvlpmto,i a mrvspeed regulation experiment is taken under the hardware-in-loop multi-functional design and develop method, it can improve

simulation system. The results show that the design efficiency can the efficiency of development and quality of the software.be improved obviously with real-time operating system. With the real-time operating system, it can avoid the large

amount of work which is not necessary when designing theIndex Terms-Diesel Engines, Electronic Governor, Real-Time system management software of the engine with the

Operating System. foreground and background design construct, so as toeffectively managing the multitasking.

I. INTRODUCTION

W5 ,hen developing and studying the electricity control II. THE COMPOSITION AND OPERATING PRINCIPLE OF THEsystem of the automotive engines, the system control ELECTRONIC GOVERNOR

software is the important key affecting the system The key step of the electronic governor design is toperformance, even can directly decide the control performance choosing the suitable actuator driven fuel pump rack. Theof the whole system. With the functions and constructs of the requirements to actuator of diesel engine governor system areengine control system become more and more complicated, fast response, high accuracy and reliability. Typical actuatorsthe control software in the form of the single thread haven't 'are stepper motor actuator, electromagnetic actuators andsatisfied the requirements of the system control, as a result the electro-hydraulic actuator. Stepper motor driving rack makesmethods of adopting Embedded real-time system in the face ofthe machine more complicated, because it needs motionobj ects is increasingly becoming popular [1] [2], and the whole change from rotation motion into linear motion. The electro-world also starts to carry on the standard of OSEK/VDX hydraulic actuator will need to be equipped with specializedacross the OS, communication and administration of networks hydraulic loop and the transformation is very difficult.for the bottom platform of the electricity control software [3]. Comparatively, using electromagnetic actuators as actuators

This paper, on the basis of "P" serial in-line fuel injection can be with high positional accuracy and faster speed ofpump, describes the development of the electronic speed implementation, and the whole system is more simple andregulator for diesel engine with the real-time operating reliable, the equipment is quite convenient.systems. It reserved the traditional mechanical fuel feedingsystem and adopted a new electronic speed regulator to take A. The control and drive ofelectromagnetic actuatorsthe place of the old. To achieve the target of the better The sketch of diesel speed governor improved and thecompatibleness, real-time performance and precision, this electronic pump were shown in Fig. 1. Here is the operatingpaper choose a powerful 32-bit ECU for the hardware principle of the governor. When the electromagnet has noplatform and embedded real-time operating system-gC/OS II working electricity, the preload of return spring (B) makes thefor the software platform, this make sure the new governor rack (A) stay at the original position where the pump cancan fulfill the need of the multitasking, real-time performance, disrupt fuel oil totally. When electrified, the coils make the

core magnetic field magnetic saturation, and the core coilsManuscript received September 15, 2006. This work was supported in part have a power with proportional to the current. If this power is

by the China Ph.D Discipline Special Foundation NO. 20040487038. greater than the force of the return spring, the rack will moveJiang Fangyi is with the Institute of Energy and Power Engineering 'i h ieto oices i mut fsalrtah

Huazhong University of Science and Technology , Wuhan 430074, China(email: jiang y.dc agrnail.corn) return spring force, to the direction to reduce oil until the

Gao Shilun, Zhang Jie and Huang Wei are with the Institute of Energy and electromagnetic force was balance with the return spring force.Power Engineering , Huazhong University of Science and Technology ThcolureticnrledbcagngheuycceWuhan 430074,China'Th o cret1cotoldb hnngheuycce

control signals using pulse width modulation (PWM) method,so the electromagnetic force will be changed by the current

1-4244-0759-1/06/$20.OO ©2006 IEEE. - 218 -

Page 2: [IEEE 2006 IEEE International Conference on Vehicular Electronics and Safety - Shanghai, China (2006.12.13-2006.12.15)] 2006 IEEE International Conference on Vehicular Electronics

2

and the rack displacement is controlled to expectation positionvalue. -----------

ELECTRONIC GOVERNOR DIESEL ENGINE

HOST pomo~~~~~~~~~~~~tttt~p

A B C D ----------._II-

n | | Fig.2.Compositi oftheelectronic governor

( __ ( englracknd splaement and The host computer is used to monitor the ECU working

engine speed CDsignalpe

states, and adjust the control parameters using RS-232 serialldrive current communications interface when necessary.

A. pump raLck B. return spring C. rack displacement sensorIII. CONTROL ALGORITHM

D. electromagnetic actuator E. engine speed sensor

Under diesel engine operating principle, the engine speedFig. 1. Sketch ofpump with the electronic governor regulation is achieved by regulating the movement of the

pump rack. In the engine speed control process, the movementof pump rack is mainly affected by the diesel engine speed

B. Rack displacement and engine speed measurements change, and the rack itself affected by the work environmentThe mutual inductance displacement sensor (D in Fig. 1) is (e.g. the work voltage change of electromagnetic actuators,

used to measure rack displacement. The sensor is equipped engine vibration) is also an important factor. Accordingwith a copper ring rigid connecting with pump. The rack classical control theory, when the system is affected bydrives the copper ring movement which lets output voltage of several factors, it will be difficult to meet the control systemsensor changes corresponding. So we can measure the output performance if only focus on one control factor [4]. So avoltage of the sensor and put it into the AD converter in order cascade control system is designed (shown in Fig. 3).to measure the displacement of the rack. Comparing with the single closed loop control system, a

With a choice of engine speed measurements of Hall-speed double closed loop cascade control system has followsensor with signal modulation, the output signal processing advantages [5]:can be imported directly into the microprocessor, which not --First, efficiently restrain the time lag characteristics ofonly simplify the circuit design, but also simplify installation the controlled deviceand with high reliability. --Second, improve the system rapid response

C. Digital controller select --Third, restrain the disturbance break into the secondarycontrol object.

The microprocessor with high-performance should ensurereal-time operating system operate smoothly. The paper haschosen PHILIPS LPC2129 based ARM7TDMI-S 32-bit RISC Engine Engine Pump position Electromagcore technology. LPC2 129 has the following characteristics: setting controller

* Faster operation speed. instruction implement speed is eneine0.9MIPS/MHz; Engine speed feedback

* 256KB in-chip flash memory, 16KB of RAM chip,which fully meets the system requirement resources ofreal-time operating system we have chosen; F

* 2 32-bit timers, 4-channel 10-bit ADC, 2 channels CANport, PWM output, up to 46 GPIO and 9 external In the double closed lOOp structure of engine speedinterruptions. It is particularly applicable to automobiles, rgltosyemthexrnlopispedopadteindustrial control applications, inner loop is displacement loop. The role of the external loop

controller (speed controller) is to measure the speed of theImproved electronic governor system includes digital engine and compared with the target value (usually is the

controller, drive circuit, electromagnetic actuator, rack accelerator pedal position) set by the speed controller. If notdislacmenmesur sesorandengne pee sesor th equal, the external loop controller will carry on adjustment to

system's hardware structure was shown inFig. 2. the target value of the inner loop controller (pump rack

- 219 -

Page 3: [IEEE 2006 IEEE International Conference on Vehicular Electronics and Safety - Shanghai, China (2006.12.13-2006.12.15)] 2006 IEEE International Conference on Vehicular Electronics

3

displacement controller). In the other hand, the role of the transferred by target engine speed setting task and engineinner loop controller is to control electromagnetic actuators speed measure task, calculate the control target value of themovement, causes the injection pump rack displacement to pump rack displacement, and transfer the data to pump rackstabilize in the target value which calculates according to the displacement control task;external loop controller. Task 5: Data communication task: communicating withThe double closed loop control system uses the incremental controller, the host computer can monitor the work state of the

digital PID algorithm [5]: controller and adjust the control parameter as necessary.

Au(t) K * (e(t) - e(t -1)) KI * e(t) + KD * (e(t) - 2 * e(t -1) + e(t - 2))

uc/OS IIWhere Kp is proportional gain; Ki is integral coefficient;

Kd is differential coefficient, e(t), e(t-1), e(t-2) is the quantity Satskvalue of actual error. high

Engine speed control

Drive 1k7IV. CONTROL SOFTWARE DEVELOPMENT BASED ON UC/OS II signal owe Engine

Enginespeed easure speed

A. Introduce ofReal-Time OperatingSystem uCROSII ack signalA. IntroduceofReal-Time uC OS H ~~~displaceme PedalAt present, the real-time operating system has been applied nt signal Eposition

in the automobile industry widespread as the software Communica signalplatform method of the production exploitation. Using real-time operating system, it can decompose the control Host computerapplication into multi-task, simplify the design of applicationsoftware, improve the development efficiency and shorten the Fig. 4. Tasks schedulingdevelopment period; the real-time performance of controlsystems will be guaranteed and good design for tasks will be In all of the tasks, the engine speed control task has thevery helpful to improve the stability and reliability of control highest priority, because this task is the key of control. Thesystem [6] [7]. pump rack displacement control task has the second priority,

gC/OS-II is a fully-preemptive real-time kernel [8]. This the engine speed measure task has the third priority, and themeans that gC/OS-II always runs the highest priority task that data communication task has the lowest priority.is ready. It provides real-time kernel, task management, timemanagement, synchronization, memory management, andintertask communication. gC/OS-II can manage up to 64 tasks, V. HARDWOR-IN-LOOP SIMULATION STUDYinterrupts can be nested up to 255 levels deep. Each task After completed the development of electronic overnor,typically is an infinite loop that can be in any one of five states: the control pap gthe ontolparameters are adjusted and engine speedDORMANT, READY, RUNNING, WAITING FOR AN regulation performance simulation is carried on by usingEVENT, or INTERRUPTED. When system states have hardware-in-loop simulation system. The two parts ofchanged, the system will respond the task with the most hardware-in-loop simulation system is composed by dieselpriority and completed the task switch function, system states engine simulation system and pump with electronic governorsaving function etc. (entity), shown in Fig. 5.

B. Task assignmentAccording the control system function, the main tasks are

assigned as followed and showed in Fig. 4:

Task 0: main task: initial system, create others subtask;**11 * 1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Hos1tCotmuterTask 1: engine target speed setting task, this task measure Pump

accelerator pedal position and transfer the data to enginespeed control task;

Task 2: pump rack displacement control task: control therack displacement to right position according the acquired Fg .Hrwr-nlo iuainssecurrent rack displacement value and the rack control targetvalue transferred from task 4; This paper takes 6135 diesel engine as the example to carry

Task 3: engine speed measure task: measure the engine on the simulation, the engine model used in this project wasspeed and transfer the data to engine speed control task; developed by literature [9], and the dynamic model of diesel

Task 4: engine speed control task: according the data engine can be express as fellows:

- 220 -

Page 4: [IEEE 2006 IEEE International Conference on Vehicular Electronics and Safety - Shanghai, China (2006.12.13-2006.12.15)] 2006 IEEE International Conference on Vehicular Electronics

4

T .s*.0(s)+ k 0(s) = A q(s)+ B y(s) VI. CONCLUSION

Where,.p is dimensionless engine speed variation; Using the real-time operating system to develop diesel

q is dimensionless pump rack displacement variation; electronic governor control system, the system program can be

y is dimensionless engine torque variation; split into a number of task modules in accordance with the

T is diesel engine time constant; principle of decoupling of software engineering. Each taskk is diesel engineselfequalizingoefmodule debugging and revision does not influence the otherk is diesel engie self-equalizing coefficient; modules, improved the reliability of the control system. The

A is fuel feedndeviceegain; development practice indicated that, uses the real-timeB is load percentage magnification factor. operating system to carry on the engine electronic control

Hardware-in-loop simulation is carried on while engine system development, fully has displayed 32 bit CPU multi-

load suddenly decreased and increased. Fig. 6 shows the tasks potential, effectively improved the developmentengine speed response when the engine load was suddenly efficiency, and reduces the development time cycle.decreased 50%, and Fig. 7 shows the engine speed responsewhen the engine load was suddenly decreased 100%. REFERENCES

[1] Poledna S, Mocken T, Schiemann J, "ERCOS: An operating system forautomotive applications.."SAE paper 960623.

[2] Erkkinen T. "A software engineering framework for electronic engine0.03 ...........................................o--.controllers[A]," Electronic Engine Controls 2000:SP21500 [C]. USA:

SAE, Inc, 2000, ppl 13-118.0.025 ........ -: .[3] Thoma, P. "Automotive Electronic-a Challenge for Systems Engineering

Design," Automation and Test in Europe Conference and Exhibition0.02 N - 1999, Proceedings, 9-12 March 1999

[4] Yu Zaihe, Liu Fu,Li Yuanchun, "Control of Electromagnetic Actuator ino.01y <. Diesel Fuel Injection System," Journal of Ji Lin University of

. .... .. Technology, vol.28, pp7-12, 1998[5] Yu Haisheng, "Micro-computer control," Tsinghua University Press,

0.005 .... 1999[6] Xing Jianguo, Xu Cangsu, "A study of vehicle embedded RTOS [A],"

o _._, International Conference on Embedded System & Products. [C], Beijing:Electronic Engineering & Product World, 2000, pp83-87

-M.00% 2 2 3 [7] Jin Bei, Li Jiangqiu, Ouyang Minggao, "Enigne torque Control Based onC(s) Real-Time Operation System," Journal of Tsinghua University (Sci &

Tch), vol 44, no 2, 2004Fig. 6. Engine load was suddenly decreased 5000 [8] Labrosse J Jean, "MicroC/OS-I1 The Real-Time Kernel, Second

Edition," CMP Books, 2002[9] Jiang Fangyi, "Research on a Real-time Simulation System for Internal-

O35 ....................................combustion Engines," M.S. thesis, HuaZhong University of Science andTechnology, Wuhan, China 2002

o... ......0.0 [10] L. Guzzella and A. Amstutz, "Control of Diesel Engines," IEEE Control0.025 . . ~j \\Systems Magazine, vol. 18, no.10, pp53-71, 1998

M2..o ................................

°Ov0 .1 ... 50....... ... .....- .................... ........0.02

~-0..15J ........

0.0 5 .........I................ . . . . . .

- 0O*O 251 1. 2 2.5 3

t s)

Fig. 7. Engine load was suddenly decreased 100%

As shown in the Fig. 6 & Fig. 7, the overshoot ratio is3.150% and stabilization time is 2 second when the engine loadwas suddenly decreased 1000% and the overshoot ratio is 1.60%and stabilization time is 1.5 second when the engine load wassuddenly decreased 5000. The results show that the electronicgovernor performance archived the demand of engine speedregulation.

- 221 -