5
Inteal Combustion Engine's Throttle Control as a Motivational Theme for Teaching Microprocessors Systems Lab Classes Samuel E. de Lucena Unesp - Sao Paulo State University Guaratingueta, SP, Brazil [email protected] Abstract-The increased fuel economy and driveability of modern internal combustion engine vehicles (ICEVs) are the result of the application of advanced digital electronics to control the operation of the internal combustion engine (ICE). Microprocessors (and microcontrollers) play a key role in the engine control, by precisely controlling the amount of both air and fuel admitted into the cylinders. Air intake is controlled by utilizing a throttle valve equipped with a motor and gear mechanism as actuator, and a sensor enabling the measurement of the angular position of the blades. This paperwork presents a lab setup that allows students to control the throttle position using a microcontroller that runs a program developed by them. A commercial throttle body has been employed, whereas a power amplifier and a microcontroller board have been hand assembled to complete the experimental setup. This setup, while based in a high-tech, microprocessor-based solution for a real-world, engine operation optimization problem, has the potential to engage students around a hands-on multidisciplinary lab activity and ignite their interest in learning fundamental and advanced topics of microprocessors systems. Kwords-electronic throttle control; ICE control; chopper power alers; hands-on education; laborato eriences I. INTRODUCTION Contemporary society has been to a considerable extent shaped by transportation means and, in special, by individual transportation vehicles. The role played by inteal combustion engine vehicles, and accordingly by carmakers, along with road and el inasucture creation and operation is of paramount importance to mode industrial society. The whole car business encompasses a huge amount of employees and creates considerable wealth. ICEVs have been experiencing a steady technological improvement since the beginning more than a century ago. Microprocessors along with sensors and actuators play a key role in permitting the el efficiency and driveability achieved by mode automobiles. Though tens and tens of microprocessors can be found in contemporary cars to carry out a myriad of different nctions, hereaſter our focus is on the microprocessor system used to conol the vehicle's engine, the so-called engine control unit (ECU). This work was supported in part by PROPe/UNESP and PROAP/Capes- Coordination for the Improvement of Higher Level Education (Brazil). 978-1-4673-5261-1/13/$31.00 ©2013 IEEE As we will see in the rest of this paper, microprocessors lab classes can be created that explore the microprocessor use in the control loops of ICEs. In particular, we will present and discuss an experiment using a microprocessor to control the position of a throttle valve according to an input signal representing the driver's desire for power. Given the ubiquity of cars and their fetish ("I drive, therefore I am."), we postulate that this type of lab activity can be motivational for engineering students and help to ignite their enthusiasm to lea basic and advanced topics on microprocessors systems. Relying strongly on hands-on approach to teach microprocessors systems is widely recognized as an effective pedagogy [1]-[6]. II. ELECTRONIC FUEL INJECTION (EFI) A. Cylinder and Basic Elements A great step towards the increase in el efficiency and engine performance, which also led to the generation of lower amount of pollutants escaping the gas pipe, was the replacement of carburetors by eleconic-controlled el injection [7]. The latter conol technology builds on technologies such as microprocessors, accurate air intake mass measurement and control, exhaust gases' oxygen sensor, and precise control of el injection using solenoid-operated nozzles (Fig. I). As a general rule, EFI control aims at maintaining the Exhaust gas Oxygen sensor Fig. 1. Sketch of a cylinder of an internal combustion engine.

[IEEE 2013 IEEE Frontiers in Education Conference (FIE) - Oklahoma City, OK, USA (2013.10.23-2013.10.26)] 2013 IEEE Frontiers in Education Conference (FIE) - Internal combustion engine's

Embed Size (px)

Citation preview

Page 1: [IEEE 2013 IEEE Frontiers in Education Conference (FIE) - Oklahoma City, OK, USA (2013.10.23-2013.10.26)] 2013 IEEE Frontiers in Education Conference (FIE) - Internal combustion engine's

Internal Combustion Engine's Throttle Control as a Motivational Theme for Teaching Microprocessors

Systems Lab Classes

Samuel E. de Lucena

Unesp - Sao Paulo State University Guaratingueta, SP, Brazil

sde [email protected]

Abstract-The increased fuel economy and driveability of

modern internal combustion engine vehicles (ICEVs) are the

result of the application of advanced digital electronics to control

the operation of the internal combustion engine (ICE).

Microprocessors (and micro controllers) play a key role in the

engine control, by precisely controlling the amount of both air

and fuel admitted into the cylinders. Air intake is controlled by

utilizing a throttle valve equipped with a motor and gear

mechanism as actuator, and a sensor enabling the measurement

of the angular position of the blades. This paperwork presents a

lab setup that allows students to control the throttle position

using a microcontroller that runs a program developed by them.

A commercial throttle body has been employed, whereas a power

amplifier and a microcontroller board have been hand assembled

to complete the experimental setup. This setup, while based in a

high-tech, microprocessor-based solution for a real-world, engine

operation optimization problem, has the potential to engage

students around a hands-on multidisciplinary lab activity and

ignite their interest in learning fundamental and advanced topics

of microprocessors systems.

Keywords-electronic throttle control; ICE control; chopper power amplifiers; hands-on education; laboratory experiences

I. INTRODUCTION

Contemporary society has been to a considerable extent shaped by transportation means and, in special, by individual transportation vehicles. The role played by internal combustion engine vehicles, and accordingly by carmakers, along with road and fuel infrastructure creation and operation is of paramount importance to modern industrial society. The whole car business encompasses a huge amount of employees and creates considerable wealth.

ICEVs have been experiencing a steady technological improvement since the beginning more than a century ago. Microprocessors along with sensors and actuators play a key role in permitting the fuel efficiency and driveability achieved by modern automobiles. Though tens and tens of microprocessors can be found in contemporary cars to carry out a myriad of different functions, hereafter our focus is on the microprocessor system used to control the vehicle's engine, the so-called engine control unit (ECU).

This work was supported in part by PROPe/UNESP and PROAP/Capes­Coordination for the Improvement of Higher Level Education (Brazil).

978-1-4673-5261-1/13/$31.00 ©2013 IEEE

As we will see in the rest of this paper, microprocessors lab classes can be created that explore the microprocessor use in the control loops of ICEs. In particular, we will present and discuss an experiment using a microprocessor to control the position of a throttle valve according to an input signal representing the driver's desire for power. Given the ubiquity of cars and their fetish ("I drive, therefore I am."), we postulate that this type of lab activity can be motivational for engineering students and help to ignite their enthusiasm to learn basic and advanced topics on microprocessors systems. Relying strongly on hands-on approach to teach microprocessors systems is widely recognized as an effective pedagogy [1]-[6].

II. ELECTRONIC FUEL INJECTION (EFI)

A. Cylinder and Basic Elements

A great step towards the increase in fuel efficiency and engine performance, which also led to the generation of lower amount of pollutants escaping the gas pipe, was the replacement of carburetors by electronic-controlled fuel injection [7]. The latter control technology builds on technologies such as microprocessors, accurate air intake mass measurement and control, exhaust gases' oxygen sensor, and precise control of fuel injection using solenoid-operated nozzles (Fig. I).

As a general rule, EFI control aims at maintaining the

Exhaust gas

Oxygen sensor

Fig. 1. Sketch of a cylinder of an internal combustion engine.

Page 2: [IEEE 2013 IEEE Frontiers in Education Conference (FIE) - Oklahoma City, OK, USA (2013.10.23-2013.10.26)] 2013 IEEE Frontiers in Education Conference (FIE) - Internal combustion engine's

stoichiometric air/fuel ratio, the so-called lambda parameter, equal to unity. This could be achieved thanks to the microprocessor technology. The ECU receives information with the driver's need for power, which is conveyed by a gas pedal sensor (Fig. 2), and calculates (and controls) the amount of air and fuel to be burnt inside the cylinders, all in real-time.

B. Throttle Body

The ECU controls the amount of air entering the cylinders by controlling the position of the throttle's blade [8]. Therefore, the air control throttle is de facto a fundamental block of EFI. The throttle body is composed of a dc-motor which turns the valve's axis position by means of two cascade rack and pinion gears, against the forces of a planar, spiral, high-stiffness restoring spring and the air pressure on the throttle's blades (Fig. 3). A potentiometer whose sliding lead is connected to the valve's axis enables measurement of the valve's axis position.

III. MICROCONTROLLER-BASED THROTTLE CONTROLLER

A. Overview

Fig. 6 shows the block diagram for the micro controller­based throttle controller. The control block itself is fully embedded in the 8-bit micro controller (PIC18F4550-IIP from Microchip Inc.). Two channels of the IO-bit analog-to-digital converter (ADC) are used to read the gas pedal sensor (OPS) and the throttle position sensor (TPS). Indeed, the OPS establishes the set point for the controller and in this project was substituted by joystick potentiometer. The error £ is obtained by a simple subtraction between the two last values of OPS and TPS. The control algorithm's job is to null the error as fast as possible, with minimum overshoot, which are somewhat conflicting requirements.

The control algorithm main task consists in appropriately updating the duty cycle 8 for the pulse width modulator (PWM), this also an internal microcontroller peripheral.

The throttle body is the plant to be controlled. Assuming the time constant of the mechanical unit (spring and inertia of valve, motor and gears) is much higher than that of the dc motor electrical circuit (dictated ultimately by coil inductance and resistance), the plant can be suitably regarded as a typical second-order system.

To convert the duty cycle signal J into power, the 12-V voltage-output chopper amplifier sketched in Fig. 4 is deployed. Notice the simple interface connecting the microcontroller's PWM output to the chopper amplifier. Recall that the dc motor torque is proportional to the motor current. In turn, the motor current is proportional to the input voltage integral. In other words, the motor torque is in direct relation with the duty cycle 8. Therefore, as illustrated in Fig. 5, different duty cycles lead to different motor currents (mean value of motor voltage) and hence to different torques.

Throttle equilibrium position 8 is dictated by motor toque T,n, amplified by the gears' radii ratios, and spring stiffness and perturbation torque due principally to the air pressure exerted on the blades. Coulomb friction has also an impact on the dynamic response of the entire system. The throttle position 8

electronic throttle

body ECU

Fig. 2. ECU, gas pedal, and throttle body.

Fig. 3. Pictures of an open commercial throttle body.

PIC18F4550-IIP

PWM signal (0)

17 RC2/CC PI/P 1 A I----O---<Mc--j 12 VSS 1----0-------'

12 V

12·V4·A de motor

Fig. 4. Chopper-type power amplifier and interface to microcontroller.

8 = Toni Tpwm

Tpwm ( )

Ton -7�

8=17% �n�

8= 50%

8= 83%

FLJidl

r=tJ�U Fig. 5. PWM duty cycle Sis software controlled.

Mean value

Page 3: [IEEE 2013 IEEE Frontiers in Education Conference (FIE) - Oklahoma City, OK, USA (2013.10.23-2013.10.26)] 2013 IEEE Frontiers in Education Conference (FIE) - Internal combustion engine's

Set Point (Gas Pedal Sensor)

ADC

MICROCONTROLLER

Control Algorithm

Fig. 6. Block diagram for the throttle position controller.

PWM

ADC

is sensed by a linear rotary potentiometer embedded into the throttle body. Circuit is omitted here for simplicity.

B. Control Strategy

Once the hardware is ready, several different control strategies might be put into action. Due to the fact that our students have had a mandatory course on classical control theory the year before they engaged in the microprocessors systems course, it was quite direct the adoption of classical proportional, integral and derivative (PID) control strategy in this lab design. Fig. 7 presents the flowchart for the implemented control strategy. Before beginning the control loop, values for the proportional, integral and derivative gains have to be chosen. Also, one must define the PWM frequency and initial values for the duty cycle 0 and the error £. Despite the existence of practical methods to establish the values for the aforementioned gains, e.g. Ziegler-Nichols' method, it seems interesting that students can play with these parameters in order to develop a feeling about their impact on the controller's performance and stability.

The error derivative is taken as the difference between the current value for £ and that calculated during the preceding iteration. Obtaining the error integral is a bit more laborious, since one needs to store several samples for the error £, each of which corresponds to the error value gathered during an earlier sampling interval. In this lab design, we adopted six consecutive error values and calculated the error integral as a simple summation of these values. This could be easily done by creating a vector with six elements and replacing the oldest element (i.e. the oldest error value) as a new error was calculated. At program start, this vector had all elements zeroed. All programs were written in C language.

IV. EXPERIMENTAL RESULTS AND DISCUSSION

Fig. 8 shows a picture of the fmal experimental assembly. For the sake of simplicity, the microcontroller programmer and the personal computer containing the integrated development environment (IDE) were not included.

Many experiments were realized with the working throttle body under control of programs downloaded to the micro controller board. Gains for the proportional (Kp), integral (K;) and derivative (Kd) terms were chosen at will and

Distnrbance Power

Amplifier r====: ---l-- ;::====:::;-----, ......... 1m

........ DC Motor

TSpring

Valve Blades &

Mechanism

Throttle Position Sensor

8 Output

PLANT

subsequently the system's step response was recorded and analyzed. Fig. 9 presents the result of such an experiment. One can easily observe that the throttle angular position follows

Yes

Define: Kp, Ki, Kd Define: Fpwm Set-up: ii, Error

No

Fig. 7. Flowchart for the implemented PID control strategy.

Page 4: [IEEE 2013 IEEE Frontiers in Education Conference (FIE) - Oklahoma City, OK, USA (2013.10.23-2013.10.26)] 2013 IEEE Frontiers in Education Conference (FIE) - Internal combustion engine's

pretty well the gas pedal signal. Recall that a joystick plays the role of the GPS in this setup. The step response's waveform makes it clear that the system exhibits a considerable overshoot. Students must be aware of this system behavior and discuss about the dominating factors, when it comes to overshoot control. Debating about possible improvements and tradeoffs are of utmost importance for students to develop critical thinking skills.

To better illustrate the system ability to follow the input signal, an experiment was carried out wherein the control system's input and output signals were overlapped on the oscilloscope screen. As clearly depicted in Fig. 10, the plant's output follows the input signal quite well. Perhaps, one should make it clear at this point that in ICEVs the throttle valve position is not to follow the gas pedal signal. Instead, its position is determined by the ECU in a manner that leads to stoichiometric fuel/air ratio. On the other hand, students must acknowledge the fundamental tests to be carried out with the throttle position control system that ultimately guarantees the valve angular position will suitably obey the commands issued by the ECU.

The signals shown in Fig. I I are to highlight the real-time updating of the PWM's duty cycle as changes in the throttle position occur. Here students can observe the real-time correction action of the closed-loop control system. They are stimulated to use their fingers to force the blades out of its equilibrium position, i.e. artificially introducing a perturbation into the system, just to observe the fast change in duty cycle values provided by the control program in its struggle to keep the error as small as possible.

Microprocessors systems course (MPS) is a mandatory subject at our university. It lasts two terms and consists of 3 hours of theory and two of lab weekly. Electrical engineering students are allowed to get enrolled in this course after they have successfully attended digital electronics course (DE). By far, besides having attended the DE course, the students enrolled in MPS have already succeeded in linear control systems course and analog electronics course. These students are in their fourth academic year, in an undergraduation course that extends for five years. Regarding classes, the last year's workload is relatively light, for the students have to fully dedicate three days a week to their internships at industry.

Lab classes of MPS are run typically with groups of 10 students. The year this lab design happened, a team of four students was assigned the task of designing part of the hardware and software for the microcontroller-based throttle controller. We have used project-based learning (PBL) as instructional pedagogy, concerning the laboratory classes during the second semester of the aforementioned course. The students faced tough problems regarding time management and sharing the tasks among them. Also, the team found quite difficult to decipher on its own the innards of the microcontroller's PWM, a fundamental structure for the implementation of the control strategy. Yet another peripheral that took so much time for students to tame was the ADC. Unfortunately, the industrial-grade C-Ianguage compiler utilized was plagued with a terrible error in the built-in library function to read the ADC: the compiler documentation states

Fig. 8. Microcontroller board. chopper amplifier and throttle body.

Throttle position

2+ . .. .. . j

1+

CH1 500mV CH2 500mV M 250ms CH2 ./

Fig. 9. Gas pedal sensor signal and throttle position sensor signal.

Gas pedal position

CH1 500mV CH2 500mV M 250ms CH2 ./

Fig. 10. Overlapped pedal sensor signal and throttle position signal.

1+

CH1 2.00V CH2 1.00V M 250ms CH2 ./

Fig. II. Throttle position sensor signal and corresponding microcontroller­generated PWM signal.

Page 5: [IEEE 2013 IEEE Frontiers in Education Conference (FIE) - Oklahoma City, OK, USA (2013.10.23-2013.10.26)] 2013 IEEE Frontiers in Education Conference (FIE) - Internal combustion engine's

that this function returns an integer number. Nonetheless, the ADC returned wrong data as revealed by tests deploying known input voltage values. Correct values might only be read when using float type variable. This type of problem is quite difficult to be tackled by students, since they are fully confident about the tools (e.g. IDE, measuring instruments, power supplies and so on) they are using. As a result, it took a long time for students to get suspicious about the compiler and look for help.

V. CONCLUSION

Modem ICEVs are equipped with state-of-the-art digital technology to control the amount of fuel and air to be mixed and burnt inside the cylinders. Also, the spark ignition is under ECU control. The overall goal is fuel economy, driveability, and emission of smaller quantities of pollutants. In a nutshell, what is sought is the optimization of engine operation under rough and varying environmental conditions. To do that, the ECU counts on sensors and actuators, such as the sensor for oxygen concentration in the exhaust gas and the sensor for the angular position of the throttle valve. Key actuators are the throttle valve, to control the amount of air intake into the cylinder, and the solenoid-operated nozzles, to inject known amounts of fuel into the cylinders. This paper dealt with the development of a microcontroller-based throttle controller by a team of students of the fourth year of the electrical engineering undergraduation course at our university. The project was assigned to students so that they could work on it during their weekly hours of microprocessor systems lab classes.

Initially planned to run under pure project-based learning (PBL) instructional pedagogy, it turned out that difficulties faced by students were so intense that they were poised to fail in fulfilling project goals. Students faced huge difficulty in translating their knowledge of linear control theory into the practical application they were assigned with. In particular, though they had had a year-long course on linear control, they could not manage to apply their skills on analyzing control system using their transfer functions and Matlab-like environments to the development of the throttle position controller. For instance, they were unable to discuss about the appropriate sampling frequency for the controller. This fact reminds us that bridging the gap between theory and practice will always be highly challenging for both students and faculty. Lab classes of modern control 7lstems rel� heavily on such computer programs as Matlab /Simulink and Labview®. These are powerful tools that accelerate product development and scientific research. Today these tools are a must in scientific and high-tech industries. However, for they hide hardware and software details, a glory for scientists and engineers who can now concentration on the problem solution architecture and algorithms, they go precisely in the opposite direction, when it comes to teaching solutions using microprocessors/microcontrollers. Here, details are of

paramount importance and can only be grasped by directly struggling with them, as advocated by active learning pedagogies.

Furthermore, students encountered tough difficulties in understanding the innards of microcontroller peripherals such as the ADC and PWM. Seemingly a more effective approach would be the adoption of these fundamental microcontroller peripherals in the lectures on microprocessors systems. Nowadays, these topics are treated in a very general purpose way, i.e. students are taught general principles about ADC and so on, which does not help them when they have a specific microcontroller at hand.

With a much frequent helping hand of instructor, the team could see the throttle controller operating nicely. However, given the high degree of instructor interference during the project development, it is more correct to think of the instructional pedagogy as a blend of PBL and traditional one.

The ubiquity of ICEVs in modern societies along with the lure of youth for these machines underpinned our decision to introduce car technology as a motivating theme to teach microprocessors lab classes. Despite the difficulties cited above, we strongly support the idea that a blend of PBL and traditional instructional pedagogies, along with ICEV-inspired applications, can be much effective in igniting students' interest in learning microprocessors systems more profoundly. And this, beyond doubt, can ease their future migration to industry.

REFERENCES

[1] H. Husain, S. Abdul, and A. Husain, "Teaching microprocessor course: challenges and initiatives," 2nd ICEED International Congress on Engineering Education, December 8-9, 2010, Kuala Lumpur, Malaysia.

[2] X. Wu, J. Wang, and M. Obeng, "Project-centered pedagogy and practice in teaching microprocessors and embedded systems design to undergraduate students," Proceedings of the IEEE SoutheastCon 2010, March 18-20,2010, Concord, NC.

[3] J. Song, X. Mu, H. Xu, and M. Yoder, "Learning and practicing fundamentals of electrical and computer engineering through building and programming a microcontroller with multiple peripherals," 40th ASEE/IEEE Frontiers in Education Conference, October 27-30, 2010, Washington, DC.

[4] M. Bezdek, D. Helvick, R. Mercado, D. Rover, A. Tyagi, and Z. Zhang, "Developing and teaching an integrated series of courses in embedded computer systems," 36th ASEE/IEEE Frontiers in Education Conference, October 28-31,2006, San Diego, CA.

[5] M. Moallem, "A laboratory testbed for embedded computer control," IEEE Transactions on Education, vol. 47, no. 3, pp. 340-347, August 2004.

[6] R. Shoureshi and P. H. Meckl, "Microprocessors in control education," Proceedings of the American Control Conference, pp. 374-377, June 1994, Baltimore, Maryland.

[7] http://en.wikipedia.orglwiki/FueUnjection.

[8] Automotive Handbook, 3rd ed .. Stuttgart: Robert Bosch GmbH, 1993.