Integrated Course projects in Automotive Electronics and RTOS

: It is seen that the number of Electronic Control Units (ECUs) in the automotive has grown significantly in recent years. In today's luxury cars, up to 2500 signals are exchanged by up to 70-80 ECUs. The number communication channels implement required realize such systems is about n2, here n is the number of ECUs in the automobile. This complexity requires the use of communication networks between them and to manage the functionality of these ECUs the Real-Time Operating Systems (RTOS) is used. This real world scenario has motivated us to give the hands on experience to students by introducing integrated course projects, which includes the use of Real-Time Operating Systems (RTOS) in automotive embedded systems. This activity also involves creating an industry like environment for execution of the project. Deployment of more advanced control strategies and integration of sub modules were the major technical outcomes of the activity. For executing this activity, the problem statement given was divided into sub-problems and each sub problem is converted to sub module/ECU depicting the industry scenario. The concepts of automotive embedded systems were used during sub module development and during integration the concepts of RTOS were used. The activity provided the method and tool to facilitate the integration of different electronic subsystems coming from various suppliers. The activity created the feel of real world industry environment amongst the students and enabled to achieve various technical and professional outcomes of ABET. The processes of achieving these outcomes are discussed.


Introduction P.C.Nissimagoudar
Department of Instrumentation Technology, B.V. Bhommaraddi College of Engineering & Technology, Hubballi, Karnataka, India sn_asundi@bvb.edu,performance goals are to be explored by the students.Along with methods and tools it is required to adopt programming disciplines and styles which help to test and analyze the programs.
Multi rate behavior is the important behavior of automotive embedded systems which requires the application of RTOS concepts in building such systems.Along with deadline driven, there are several activities going on at the same time in automotive systems.These activities require control of some operations that run at variable rates.There are activities which run periodically, at slow rates and at high rates.The control action of the software must deal with such situations.Engine control units and Multimedia applications of automotive are prime examples of multi rate behavior.This notion of deadline-driven and multi rate behavior of automotive systems requires the use of RTOS concepts in building automotive embedded systems [8].
The aim of this paper is to discuss the methodology adapted in course projects implementation of two courses i.e. automotive electronics and RTOS.The activity exploits the embedded system design flow with the integration of RTOS concepts at automotive vehicle development at various levels [1].The activity focuses on two fundamental abstractions that will allow building complex applications on computing unit such as microprocessors/ microcontrollers; the automotive control systems and the Real time operating system (OS).Together, these two abstractions let us build systems which are sub systems of automotive, which can interact with each other and allow us integrate to realize bigger systems.
Automotive electronics and RTOS are the two core courses which are offered during third year of engineering for all the circuit branches.The course automotive electronics is highly multidisciplinary and application oriented requiring the knowledge of various engineering domains like mechanical, electronics and computers.The course deals with development of embedded systems to various domains of automotive.The main emphasis of this course is to develop the student's ability to analyze the electronic systems in present day automobiles and their specific requirements to become acquainted with the new applications that are being developed for future automobiles.The course RTOS is highly concepts oriented an d mainly deals with encapsulating the complex control to coordinate different tasks/processes of an embedded application.
The application of these concepts is very commonly found in automotive domain.These scenarios have motivated us to turn up with the activity of course projects with the integration of concepts of both the courses [2].
The theme and problem statements given were such that the students will develop sub-modules in a small team and these sub-modules were integrated to arrive at final solution.The concepts of RTOS were mainly used during integration of sub-modules.The activity helped the students to experience the industry environment, integration and interfacing of sub modules.Another main issue in automotive systems is to reduce the time to market.The reuse of components, or of subsystems, is one way to achieve this objective; which is also realized during the execution of the course project.For both the courses technical and professional outcomes of ABET are archived through this activity [3].
Organization of the paper is as follows section II deals with design of course of course projects, section III Implementation methods of course projects, section IV deals with evaluation methods , their effectiveness and discussion and section VI with Conclusion.
The course project activity was designed to give students a chance to develop the same skills and gain the same knowledge that today's successful automotive technician has.The technician of today and for the future must know the underlying theory of all automotive systems and be able to design and develop service / maintain those systems.Here the focus was integrating the RTOS concepts in building automotive embedded systems application.
Dividing the course in to class room sessions, laboratory and an extended activity in the form of course project , provides the learner with the information needed to begin a successful career as an automotive technician without interrupting the learning process by mixing cognitive and performance learning objectives into one activity [4].The main objective of the course projects is to give more hands on and an integrated experience, the way it exists in industry to the students in addition to that knowledge gained in the regular course.
• To introduce industry work environment to

Methodology
students.
• To develop industry specific skills among the students.
• To prepare new graduates well prepared before starting their career in automotive industry.
• To integrate and interface sub modules including hardware and software.
• To develop team building environment.
• To provide effective reporting presentations.
One of the main challenges of the automotive industry is to come up with methods and tools to facilitate the integration of different electronic subsystems coming from various suppliers into the vehicle's global electronic architecture [2].The introduction of course projects and practicing this activity by creating industry like environment helped the students to experience the industrial work culture.
The different phases of project realization from defining requirements, sub module development, integration and testing are discussed below,

2.1Defining the requirements
The requirements were provided to the students in the form of informal description of the problem statements.Later the teams refined the requirements into a specification that contains enough information to begin designing the system architecture.
The technical solutions were expected in the following areas : • In-vehicle architectures: Selection of sensors, associated electronics, microcontrollers etc.
• Multi partner development processes: (subsystem integration, product line management, etc.) • Software engineering methods: Use of modular programming approach • Switching contexts between programs.
• Task-level performance analysis

• Embedded communications: Selection of communication protocols
The requirement document consisted of plain language description of what the user wants and expects to get in the different domains of automotive.The domains like power train, safety and body.

2.2Sub-module development
The requirements have to be refined to get specifications of the system.The functional and nonfunctional requirements are translated in to engineering terms the specifications.Based on the specifications the system architecture needs to be developed.The system architectures provide the information about how the system has to be sub divided to realize the sub module of the bigger system.The internal details of the system are obtained once the architecture is developed.The architecture is the overall system plan.The details of each component of the architecture need to be further developed.The submodule development involves both the related hardware and software development.The design of automotive embedded systems requires functionality and timing that is too complex to embody in a single program.So the software is divided in to multiple tasks in order to manage when things happen.In this sub-module development phase we will develop the basic abstractions that will be manipulated by the RTOS to build multirate systems.

2.3Sub-module/component integration and testing
Here the design is encouraged to be described as a number of interacting objects, rather than a few large monolithic blocks of code or hardware.Most of the automotive sub-modules (ECU) do more than one thing-that is, the environment can cause mode changes that in turn cause the ECU to behave quite differently.For example, the traction control system which is used to avoid wheel spinning performs this application by using two different ways based on the engine speed, one by controlling break pressure and other by controlling engine power.We can define these two ways as two different tasks because they perform logically distinct operations and they must be performed at very different rates.These different tasks are part of the system's functionality, but that application-level organization of functionality is often reflected in the structure of the program as well.The RTOS concepts of interrupts, priorities, threads, scheduling and event driven activities will be used during integration [8].
Once the design and development of individual component is completed, the next step is to integrate the sub modules or component and perform testing.Not always we can expect the working system once we integrate the modules.The integration phase involves more than putting all the modules together.There will be lot of compatibility issues.Bugs are typically found during system integration, and proper planning at the early stages of design can help us find the bugs quickly.By performing chosen tests at each level design, we can avoid getting major faults or bugs in the system at the integration.The design has to adopt the proper controllability and observablity while building up the system in phases.These things will help in identifying the smaller bugs at early stages and we can avoid major bugs during integration.One needs to ensure that during the architectural and component design phases that we make it as easy as possible to assemble the system in phases and test functions relatively independently.
The details of various stages such as team formation, project manager selection, requirement analysis, specification finalization, implementation details with software and hardwareintegration along with validation and testing are discussed below.Acase study on engine control has also been discussed.

3.1Team formation & project manager selection
The whole class was briefed about the course projects and their implementation methods.The relevance of integrating the concepts two courses was conveyed to students.To bring in industry like environment among the students project managers were appointed and four to five teams each with three to four students were made associated with each manager.Project managers to co-ordinate and manage the teams.Issues like interfacing of modules and technical help, resource management all was handled by the project managers along with reporting the status to the course instructors.The course instructors monitored the status of the complete project by conducting regular review and also provided the needed technical help and resource management.

3.2Requirement analysis
The requirements were given to project manager like how in industries OEMs provide to the suppliers.Managers had discussions among themselves and also with team members and divided the requirements in to sub-modules.Each team was given the task of working on one sub-module.
The sample requirements are given below, • Engine management system • Auto start stop system (I2S) • EGAS over CAN • Safety systems • Cruise control system 3.3Development of specifications All the project teams explored and surveyed independently about the requirements given.The teams then with discussion between all the teams and managers came with the more precise description of the system.Capturing a consistent set of requirements from the customer and then massaging those requirements into a more formal specification is a structured way to manage the process of translating from the consumer's language to the designer's.The specifications were carefully written so that they accurately reflected the customer's requirement and served as the contract between the customer and the architects.The specifications also included functional and non-functional elements.

3.4Sub-module development
Now individual team was clear with their role and their sub problem definition.Every team developed their design using one common type of hardware and programming language, as they knew that their module will be integrated other such modules.For example: the hardware used was ARM Cortex-M3 and the software was associated C program with supporting RTOS.The students also gave a attention towards using on common communication protocol, which in our case was CAN, which again was supported by the hardware ARM Cortex The necessary hardware and software was developed during this stage.

3.5Integration and testing
The design methodology to be followed should makes it much easier for members of a design team to communicate.By defining the overall process, team members can more easily understand what they are supposed to do, what they should receive from other team members at certain times, and what they are to hand off when they complete their assigned steps.Since most automotive embedded systems are designed by teams, coordination is perhaps the most important role of a well-defined design methodology.
The separation of an application into tasks is very important and we must also ensure that we process the inputs and outputs at the proper rates.Solving timing problems is a more challenging problem.We need to be able to keep track of different tasks separately, applying different timing requirements to each.This is the sort of control that processes allow.Implementing code that satisfies timing requirements is even more complex when multiple rates of computation must be handled.Multirate embedded computing systems are very common in automobile applications.
Here is case study which describes the multirate behaviour of the system requiring diffrent prcessing timings along with number of tasks involed and ascheduling strategy.Eg:Automotive Engine control:

3.6Case Study-Automotive engine control system
The simplest automotive engine controllers, such as the injection and ignition controller for a two wheeler engine, perform mainly two tasks-timing the firing of the spark plug, and controlling desired air/fuel ratio.The spark plug must be fired at a certain point in the combustion cycle, but to obtain better performance, the phase relationship between the piston's movement and the spark should change as a function of engine speed and load.Using a microcontroller that senses the engine crankshaft position allows the spark timing to vary with engine speed Similarly the desired air fuel ratio is controlled by operationg the fuel injector actuator based on the desired speed of the vehicle and load. .Firing the spark plug and operating the fuel injector are periodic processes but the period depends on the engine's operating speed and load [8].
The control algorithm for a such systems is much more complex, requiring a very high end floating point microprocessor.Automobile engines must meet strict requirements (mandated by laws of the government) on both emissions and fuel economy.On the other hand, the engines must still satisfy customers not only in terms of performance but also in terms of ease of starting in extreme cold and heat, low maintenance, and so on.Automobile engine controllers use additional sensors, including the gas pedal position and an oxygen sensor used to control emissions.They also use a multimode control scheme.For example, one mode may be used for engine warmup, another for cruise, and yet another for climbing steep hills, and so forth.The larger number of sensors and modes increases the number of discrete tasks that must be performed.The highest-rate task is still firing the spark plugs.The throttle setting must be sampled and acted upon regularly, although not as frequently as the crankshaft setting and the spark plugs.The oxygen sensor responds much more slowly than the throttle, so adjustments to the fuel/air mixture suggested by the oxygen sensor can be computed at a much lower rate.The engine controller takes a variety of inputs that determine the state of the engine.It then controls two basic engine parameters: the spark plug firings and the fuel/air mixture.The engine control is computed periodically, but the periods of the different inputs and outputs range over several orders of magnitude of time.Such systems require the use of RTOS concepts, basically the concepts of interrupts, priorities, threads, scheduling and event driven activities will be used.
After integration of different modules the following things were in the minds of the project teams, like • Does it really work?
• Is the specification correct?
• Does the implementation meet the specifications?
• How do we test for real-time characteristics and test on real data?
• How do we work on the system?
• Observability, controllability?Hence theintegration phase is followed by a validation, verification, and testing of a software and hardware modules at unit level, module level and product level.
figure 1 shows sample course projects, like injection and ignition system, throttle control , gear info over CAN and oxygen sensor info over CAN protocol.

3.7Technical and professional competencies achieved:
The activity helps the students attain both technical and professional competencies.The major technical competencies achieved were,

Evaluation Methods, Their Effectiveness And Discussion
This section discusses about the various evaluation methods adapted for the course activity and the discussion about the effectiveness of the activity realized and the mapping towards program outcomes.

Assessment of course project
The effectiveness of the course project as part of a core subject is mapped to the learning outcomes 'a'to 'k' defined according Accreditation Board forEngineering and Technology (ABET) [5][6].The Table 1 represents the outcomes 'a' to 'e' belong to technical outcomes and 'f' to 'k' belong to professional outcomes.It can be seen that the course project addresses both technical and professional outcomes defined by the program.

4.2Reflections of course project with continuous monitoring and feedback
With this activity, different teams were able carry out course projects addressing different themes.Around 25 different projects with different themes were carried out.This activity resulted in building strong knowledge of fundamentals, realizing the various aspects engineering analysis and hence the problem solving ability of the student enhanced [5].Finally the assessment based on student feedback has been collected by each team as detailed in the appendix and the statistics shows that the objectives of the course project were satisfactorily met as mentioned in Fig. 5. Question 1 and 3 related to understanding of concepts and applying the same to the application has made an impact on learning.Question 2 relating to scope of understanding beyond curriculum is satisfactory.Suggestions by review committee and participation in technical events The details of the integrated course project activity planned and executed for the course automotive electronics and RTOS as an approach to enhance the learning outcome of the students have been presented.The metrics and the techniques adopted for the assessment of the learning outcome have been listed and the results are presented.
The overall outcome as seen from the result analysis clearly indicates that the activity helped the students enhance their technical and professional competencies.The electronic embedded system design flow the way it exists in the industries is experienced by the students.The approach adopted has significantly been encouraging in terms students overall growth.The students' participation in technical events, the placement and students pursuing carrier in automotive and embedded domain has been significantly increased.
Majority of the students have expressed their satisfaction over the course project implementation method.The activity provided the necessary platform to show case the innovative ideas of students.
The authors would like to acknowledge, Dr. Ashok Shettar, Vice chancellor KLE Tech University, for providing constant support and encouragement.Dr. Anil Badiger, Head, Dept. of Automobile Engineering, and his faculty for providing practical exposure to automotive mechanical systems with the demo lab sessions.We also like to acknowledge the industry personnel from automotive industries KPIT Cummins and RBEI for contributing inframing curriculum contents and designing experiments.

Conclusion
M3. Few examples of sub module are, • Gear information over CAN • MAF sensor over CAN • Crank and CAM shaft position sensing • Oxygen sensor over hard wire/ and over CAN • Electronic ignition/injection control system.

Tab 1 .
Activity outcomes mapping to Program indicatorsreflected in question 4 and 5 needs a scope for improvement.