Keywords

1 Introduction of the Timing System

Timing system is one part of the core of the engine-control-system, and it has a significant impact on engine smoothness, robustness, safety and emissions. The inputs and outputs of the timing system are shown in Fig. 1.

Fig. 1
figure 1

Block diagram of the engine-timing-control system

The timing system receives signals from the crankshaft and camshaft and builds up the engine phase to control the actuators. At the same time, the timing system receives the inputs from application software, such as injection control command, ignition control command and pump control command. Then it activates the actuators when the specific events happened. Simultaneously, it provides the critical information of the engine to application, such as engine speed, engine acceleration etc.

The control of the timing system is complicated. In order to illustrate the complexity of the timing system, the combinations of the crankshaft and camshaft signals and the injection signals are shown in Fig. 2.

Fig. 2
figure 2

The combinations of inputs and outputs of the timing system

As shown in Fig. 2, the inputs are complex. For many different types of engines, there are different combinations of crankshaft and camshaft signals. For example, a GDI engine has a 60-2 teeth crankshaft and a two-long-two-short camshaft. A natural gas engine has a 60-2 teeth crankshaft and an N + 1 teeth camshaft (N is the engine cylinder number). A port fuel injection engine has a 36-6 teeth crankshaft and an N − 1 teeth camshaft (N is the engine cylinder number).

As shown in Fig. 2, the outputs are quite complex too. First of all, there are large quantities and many categories of actuators. A specific drive form is required for each category of actuators. Secondly, even for the same category, the drive form may be different because the types of the actuators are different. At last, even for the same type of actuators, the output drive signals may be different due to the differences of the hardware circuit. Figure 3 shows the fuel injection characteristics of different injectors.

Fig. 3
figure 3

Injection commands of a diesel engine and a GDI engine

The development of the timing system has relatively strong pertinence. A specific design of the system may be carried out according to a specific type of engine or a specified engine [1]. When there are new requirements or there comes a new engine, the timing system will carry out a large number of modifications, even need to be re-designed and re-developed.

In order to reduce the duplication of work and to improve the efficiency of development, a timing system platform is urgently needed. The existence of AUTOSAR provides guidance to the design and development of the timing system.

AUTOSAR defines a set of criteria to be used in different platforms. It can improve the capability of software reuse and reduce the cost of the software development [1]. FAW developed the timing system platform which followed the AUTOSAR standard by using the standard AUTOSAR tools.

2 The Design of the Timing System in AUTOSAR

To meet the requirements mentioned above, FAW carried out fully requirements analysis on many types of engines. And the design of the timing system consists of modular design, hierarchical design and standardized design.

2.1 The Modular Design of Timing System in AUTOSAR

As shown in Fig. 4, the timing system can be divided into the following modules [2]: engine phase management module (the left two columns), injection control module (the third column), ignition control module (the fourth column) and pump control module (the last column).

Fig. 4
figure 4

Hierarchical design of timing system

The core module of the timing system is the engine phase management module. This module was divided into sub-modules to fulfil detailed functions [3, 4]. The CrkDrv and CamDrv module mainly recognize the crank and cam signals to provide the basic information to the CrkIf and CamIf. Through the CrkIf and CamIf module, the upper modules can get and set information of the crank and cam. The EngPosMnmt module manages the crank and cam information and generates the engine position information for other modules. When there is something wrong with the crankshaft or camshaft, the LimpCrk and LimpCam module can catch the faults and switch normal mode to limp home mode. In limp home mode, the EngPosMnmt module generates the engine angle by using the crankshaft or camshaft. At the same time, it manages the state machine of the timing system, ensure the stability and robust during the mode switching. The engine speed information which should be used in other modules is generated by the EndSpd module.

The injection control module was divided into some sub-modules too. The InjDrv module mainly drives the injectors and provides basic injection information to InjIf. The InjIf is the interface module between the upper modules and InjDrv. The upper modules mainly completer the injection data management, multi-injection and injection correction functions. These modules get and set information of the injectors through the InjIf module.

The ignition control module and the pump control module are similar with the injection control module.

2.2 The Hierarchical Design of Timing System in AUTOSAR

The principle of the hierarchical software design is that the boundary between software levels must clear enough to help the users to understand, and each level of the hierarchy can achieve their specific function well [5].

The hierarchical graph of the timing system is shown in Fig. 4.

The bottom of the hierarchies is the timing control driver layer, its role is to make the timing control abstract layer and the actual hardware environment completely isolated. The main task of the timing control drive layer is to complete the driven task of the sensors and the actuators, and to provide base information for the application software.

For different engine control systems, the realization of the hardware platform maybe different, so there are maybe different implementations of the timing control driver layer according to different hardware platforms. By selecting suitable hardware platform driven library, the modules can be integrated into the engine control system quickly. For example, if the single-chip of MPC series is used, the developers only need to prepare the timing driver library for eTPU2; and if the single-chip of TriCore series is used, the developers only need to prepare the timing driver library for GPTA.

The role of the timing control abstract layer is to make the upper service layer and the lower driver layer completely isolated. When the upper level of the system wants to get and set the information of the sensors and actuators, there is no need for the upper layer to pay attention to the actual type of the sensors and actuators. All you need to do is to control the sensors and actuators at logic aspect.

The role of the timing control service layer is to provide services through the standard interfaces and to make the upper application and the timing system completely isolated. When the upper application layer needs to access the timing system, there is no need to pay attentions to the actual implementation of the timing system. The application layer only needs to access the timing system through RTE.

2.3 The Standardized Design of Timing System in AUTOSAR

In order to achieve the rapid transplantation, a series of system standardization work must be carried out [6].

Between the adjacent layers of the software, FAW standardizes the interfaces for each module. The detailed work includes the name of the interfaces, the parameter types of the interfaces, the parameters value range, the call methods, etc.

The interfaces of the timing control abstraction layer are also standardized. Through the standardized interfaces, the development of the timing control abstract layer can be relatively independent. No matter what the realization methods are used, the modules can be integrated into the timing system. The upper level of the software can access the lower level services through the interfaces to get the needed information. At the same time, the timing control abstract layer can provide critical information to the upper layer through the interfaces.

The interface of the timing control service layer is between the whole timing system and the application [7]. As shown in Fig. 5, the timing system can provide the appropriate information, such as the state of the engine, the diagnosis information of the system, the engine speed information as well as the interrupts, to the upper layer through the standard interfaces. And the control commands coming from the application can be passed to the timing system through the interfaces.

Fig. 5
figure 5

The interface of the timing system and interrupt system

FAW carried out standardization for every function module and unified the description and explanation of the modules and unified the definition of the interfaces.

FAW standardized the interrupt mechanism of the timing system. FAW defined every trigger event for each module, and managed the events in the interrupt service routine. The interrupt mechanism is shown in Fig. 5. Every module in the timing system can generate specific events to trigger the interrupt service. In the interrupt service, the system can determine whether to process the interrupt directly or not. For some events that need the upper layer to process or need the OS services, the system will trigger tasks for the events. Some emergency events can be directly handled in the interrupt service routine.

AUTOSAR defines methodology for the development of the system. The methodology not only includes the system development process but also includes the corresponding development tools and the exchange format between the various steps of the development. When developing the system, the developers must be strict with the standardized process and must have direct responsibility on their own software modules. The developers need to write the module description files and the code generation rule files used to integrate the modules into the system which followed the AUTOSAR standard.

3 The Application of Timing System in GDI Project

When the engine timing system is used in different types of engines, all you need to do is to select the corresponding function modules according to your requirements and configure the modules of the system.

The main single-chip used in the gasoline engine project is MPC56xx. In order to reduce the work load of the single-chip, a specifically designed eTPU2 module is used to handle the timing events [8].

The relationship between the framework of the timing system and the gasoline direct injection project is shown in Fig. 6. The timing control driver layer of the timing system is implemented by using eTPU2. The eTPU2 can exchange information with CPU through the SPRAM. This will complete the information exchange between the timing control driver layer and the timing control abstract layer.

Fig. 6
figure 6

The framework of the timing system

Referring to the AUTOSAR methodology, FAW followed the following steps to configure the timing system [9]. First of all, it has to configure the timing system at the engine aspect, such as the type of the engine, the cylinder numbers of the engine, the number of the crankshaft and camshaft. Secondly, the detailed information of the timing system should be configured, such as the type of the crankshaft and camshaft and the type of the sensors and the actuators.

As shown in Fig. 7, the configuration information is stored in the ECU configuration description file. The system developers had designed the code templates, the module description files and the code generation rule files.

Fig. 7
figure 7

The configuration diagram of timing system

Through the configuration of the timing system using standard tools, the source code of the timing system can be generated quickly.

4 The Validation of the Timing System in GDI Project

After the configuration, integration and test, the timing system now is running well in the ECU. FAW monitored the states of the engine while the engine was running, and FAW found that the timing system has outstanding on functions and performance. The curve of the start phase of the engine is shown in Fig. 8.

Fig. 8
figure 8

The curve of the start phase of the engine

The engine can be synchronized in a short period of time, and the engine can achieve the respective engine speed in a relative short period of time.

Through many engine bench tests, it shows that the gasoline direct injection engine has outstanding stability, good performance. The timing system can satisfy the requirements of the projects. When applying the timing system, FAW only made a few modifications to the corresponding modules. The development period of the timing system is reduced greatly and the development efficiency is improved a lot.

5 Conclusions

In order to improve the reliability, portability and efficiency of the timing system, FAW followed the core idea of AUTOSAR standard and carried out the modular design, hierarchical design and standardized design of the system. In order to verify the design, FAW has applied the timing system on a gasoline direct injection engine. Through the configuration, integration and test of the modules, the timing system runs well in the ECU. It shows that the timing system has good characteristics of platform, and it can be used in an engine project through simple configuration.