• Tidak ada hasil yang ditemukan

Fuzzy designing and scheduling of Automotive ECUs over Controller Area Network

N/A
N/A
Protected

Academic year: 2024

Membagikan "Fuzzy designing and scheduling of Automotive ECUs over Controller Area Network"

Copied!
6
0
0

Teks penuh

(1)

International Journal of Advanced Computer Engineering and Communication Technology (IJACECT) _______________________________________________________________________________________________

_______________________________________________________________________________________________

Fuzzy designing and scheduling of Automotive ECUs over Controller Area Network

1Anu Jose, 2Shinu M R, 3Divya P

1,2,3 Department of Computer Science Engineering, Amrita Vishwa Vidyapeetham, Bangalore Email: 1[email protected], 2[email protected], 3[email protected]

Abstract- The technological advancements of embedded system and electronics within the vehicle are being driven by the challenge to make the vehicle safer, more energy efficient and networked. Implementation of Automotive tasks has become easier with various advancement in software and hardware design modules. These Automotive tasks are implemented on a controller called ECU. Heart of any ECU is a Flash-based microcontroller which varies from a System on Chip to Field Programmable Gate Array (FPGA) which are used in different vehicle domains.

Automotive tasks selected for this project are Windshield wiper control, Adaptive cruise control and Seat-belt tightener. Windshield wiper control is designed using Fuzzy Logic method and adaptive cruise control using PI controller. The tasks in the application program should be checked whether they execute within their deadline. So, the need of Real-time scheduling comes into play in Automotive Embedded System.

Keywords: Fuzzy designing, Controller area network, adaptive cruise control, ECU, Windshield Wiper control, PI controller.

I. INTRODUCTION

Every year, automobile manufacturers pack new embedded system into vehicles. Small processors in the deep recesses of the vehicle exchange and collect information to optimize, control, and monitor many of the functions that a few years ago were totally mechanical. The advancements of embedded system and electronics within the vehicle are being driven by the challenge to make the system more energy efficient, safer, and networked. Flash-based microcontrollers, from system on-chip (SOC) to Field Programmable Gate Array (FPGA), are the heart of embedded system design.

In 1968 for fuel injection, Volkswagen launched the first embedded system in the automotive field. Historically, low-cost 8 bit and 16 bit microprocessors were the norm in automotive controllers, and engineers written majority of the code in assembly language. A successful automotive electronic design depends on careful selection of microprocessor. Modern power train

controllers for the engine and transmission system generally require 32 bit CPUs to process the real time algorithms. Other areas of the automotive industry, such as chassis and safety systems use both 16 bit and 32 bit processors, depending on complexity of the control. The electronic content within the vehicle continues to grow and more systems become intelligent with the addition of microcontroller based electronics. A normal vehicle today contains an average of 25 to 35 microcontrollers with some luxury vehicles containing up to 70 microcontrollers per vehicle. Flash-based microcontrollers are continuing to replace switches, relays, and traditional mechanical functions with higher- reliability components while eliminating the cost and weight of copper wire. Embedded controllers can drive motors to operate power seats, mirrors, and windows.

Driver-information processors display or announce navigation and traffic information along with vehicle diagnostics [1].

Networks are a recent addition to embedded systems which are the challenge of squeezing in the hardware and code for in-car networking. To satisfy the new emissions regulations of government, vehicle manufacturers and the Society of Automotive Engineers (SAE) developed J1850, an automotive-network protocol. European manufacturers support controller area network (CAN).

The Controller Area Network (CAN) is a multi master serial communication protocol. CAN protocol provide advantages over other communication protocols. CAN serial communication protocol offers a very good price/performance ratio. CAN allow moving data with a fast transmission speed (up to 1 Mbit/s) and can be used in real-time systems. CAN data is reliable and the error detection is robust and sophisticated. Unlike a traditional network such as Ethernet or USB, CAN does not send large blocks of data point-to-point from a node to another node under a central bus master. In a CAN network short messages like RPM or temperature are broadcast to the entire network, which allows for data consistency in each node of the entire system.

(2)

II. LITERATURE SURVEY

Automotive electronics first began with the need for better controls for the engine. The first electronic part in an automobile was called an ECU which means “engine control unit”.

2.1 Survey on different automotive domains

Automotive embedded systems are distributed systems and according to different domains in the automotive field, they can be classified as,

 Engine Electronics

 Transmission Electronics

 Chassis Electronics

 Active Safety

 Driver assistance

 Passenger Comfort

 Infotainment systems

Engine control unit, one of the most demanding electronic parts of an automobile. Engine controls demand one of the highest real time deadlines, as the engine system itself is very fast and complex part of the automobile. In a Diesel Engine, embedded systems include[1]:

 Fuel injection rate

 Emission control, NOx control

 Oxidation catalytic converter

 Turbocharger control

 Cooling system control

 Throttle control

There are lots of sensors about 20 to50, which measure temperature, flow, pressure, engine speed, oxygen level and NOx level and more parameters at different points in an engine. All these sensor output signals are sent to the electronic control unit. The ECU output is connected to different actuator like throttle valve actuation, EGR valve actuation.

2.2 Survey on available RTOS schedulers

The real time scheduler keeps record of the state of each task and selects from among them that are ready to execute and allocates the CPU to one of them [8]. A real time scheduler helps to maximize CPU utilization among different tasks in a multi-tasking program and to minimize waiting time. There are two types of schedulers available: non-pre emptive and priority-based pre emptive. Non-pre emptive scheduling or cooperative multitasking requires the tasks to cooperate with each other to explicitly give up control of the processor. When the task releases the control, the next impotent task that is already in ready state will be executed. A task that is newly entered with a higher priority than the others will only get control of the processor when the current executing task gives up the control. Priority-based pre

emptive scheduling requires control of the processor be given to the task of the highest priority at all time. In the event that makes a higher priority task ready to run, the current running task is immediately suspended and the control of the processor is given to the higher priority task [2].

2.3 Survey on communication protocols

With the increase of number and complex of automotive electronic control system, it is impossible to use traditional point-to-point links method for implementing information exchange between different ECU. This method will bring drawbacks such as the increase of wiring length and weight, redundancy of signal cable, difficulty of examine and repair, lack of electric device protect, impossibility of information sharing and integration, and finally increase the hardness and complexity of system integration. Passenger car control system is real-time networked control system which aims at passenger car as control object, applies in-vehicle network as information transmission channel, uses electronics integration and network integration as basis, information integration and control integration as core, function integration as target, design integration as development method. Supported by automotive electronic control technology, in-vehicle network technology, embedded control technology, sensor technology and intelligent control technology etc, it shares information and achieves correlative real-time control between ECU‟s and electric devices according to special control functions.

2.3.1 Available communication protocols

Numerous communication protocols are available for automotive networking. They are listed below.

a. CAN (Controller Area Network)

CAN is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other within a vehicle without a host computer. Bit rates up to 1 Mbit/s are possible at network lengths below 40 m [4]. decreasing the bit rate supports long network distances.

b. VAN (Vehicle Area Network)

VAN is a vehicle bus developed by PSA Peugeot Citroen and Renault. It is a serial communication protocol capable of speeds up to 125 Kbit/s.

c. Flex Ray

Flex Ray is a general purpose high-speed protocol with safety-critical features. Flex ray is designed to be faster and more reliable than CAN, but is more expensive

(3)

_______________________________________________________________________________________________

d. LIN (Local Interconnect Network)

The LIN bus is an inexpensive serial communications protocol, which effectively supports local application under controller area network (CAN). It is particularly intended low cost applications. Bit rates vary within the range of 1 Kbit/s to 20 Kbit/s.

e. MOST (Media Oriented Systems Transport) MOST is a high-speed multimedia network technology optimized by the automotive industry. MOST can be used outside or inside the car.

f. J1708 and J1587

This is a standard used for serial communications between ECUs on a heavy duty vehicle and also between a computer and the vehicle. The standard defines a 2- wire 18 gauge wire cable that can run up to 130 feet (40 m) and operates at 9600 bit/s.

Among these communication protocols, Controller Area Network was selected, it is a serial network established among microcontrollers. It uses only two wires.CAN is half duplex, high speed communication system and is well suited for high speed applications which supports short messages. CAN can theoretically link up to 2032 devices (assuming one node with one identifier) on a single network. Error confinement and error detection feature make it more reliable in noise critical environment [3].

III. SYSTEM DESIGN

3.1 Block diagram

Figure 1: Block diagram of system

Block diagram consist of two ECU units, sensors, actuators and controller area network. 2 tasks are allotted to ECU1, seat belt tighter and windshield wiper control.

Adaptive cruise control is allotted to ECU2. For the three automotive tasks, sensors serve as input and

actuators, that is, motor serve as output. Three automotive tasks were taken into consideration in this project. These tasks have to be programmed such a way that sensor provide input to the controller to actuate the actuator. One active safety task, one passenger comfort task and one driver assistance task .All tasks are described below.

3.2 Windshield Wiper control

In the past, automakers have tried to either eliminate the wipers or to control their speed automatically. Some of the techniques for detecting the vibrations caused by the raindrops touching the windshield, applying some coatings that prevents drops to form, or ultrasonically vibrating the windshield to break the drops so no need of wiping. But these systems have problems and either never made it to production. A new type of wiper system is starting to appear on cars that actually do a good job of detecting the amount of water on the windshield and controlling the wipes [7].

a. Designing task using fuzzy logic

As the complexity of the system increases, it become more difficult and impossible to make a precise statement about its behaviour, thus arriving at a point of complexity. Fuzzy logic is the way to solve problems and analyse through a system which resembles human decisions, which can use appropriate data to find precise information. The various steps used to create a fuzzy controlled machine are as follows [6].

b. Fuzzification

The first step in designing a fuzzy controller is to decide which state variables represent the system dynamic performance must be taken as the input signal to the controller. Fuzzy logic uses linguistic variables or fuzzy variables instead of numerical variables. The process of converting a crisp variable (real number) in to a fuzzy variable is called fuzziication.

c. Rule Evaluation

The rule base comprises knowledge of the application domain and the attendant control goals. It consists of a data “base” and a linguistic (fuzzy) control rule base.

The fuzzy data base provides definitions that are used to define linguistic control rules or fuzzy rules and fuzzy data manipulation in an FLC[6]. The rule base characteristics the control goals and control policy o the domain experts by means of a set of linguistic control rules with syntax.

d. Decision Making

Decision making logic infers a system of rules through the fuzzy operators namely 'AND' and 'OR' and

(4)

generates a single truth value which determines the outcome of rules. It has the capability of simulating human decision making based on fuzzy concepts and of interring fuzzy control actions employing fuzzy implication and the rules of inference in fuzzy logic.

e. Defuzzification

The reverse of fuzzification is known as defuzzification.

The use of Fuzzy Logic Controller (FLC) produces required output in a linguistic variable (fuzzy number).

The linguistic variables have to be transformed to crisp output. Centre of gravity method is the best defuzzification method and used for research purpose also. Defuzzification is the process of producing a quantifiable result in fuzzy logic.

Table 1: Rule set for wiper control using fuzzy logic 3.3 Seat belt tighter

This task is written without fuzzy logic since there will not be any fuzzy condition present. When both the sensor value is detected, microcontroller gives command to operate motor.

Table 2 : Conditions for seat-belt tighter 3.4 Adaptive cruise control using PI controller Comfortable distance to the car ahead increases driving safety and ensures a better and relaxed driving experience. Adaptive cruise control using PI controller ensures that there is enough distance to the car ahead, even if it reduces it speed. With Adaptive Cruise Control, the conventional systems for speed control have been enhanced to a driver assistant with an added value.

The system allows to adapt the distance to the car in front without the driver’s intervention, and traffic flows better altogether because acceleration and breaking maneuvers are automatically adjusted.

Figure 2: Block diagram of adaptive cruise control In Adaptive cruise mode variable being controlled is distance. Vehicle has to maintain a threshold distance between the neighboring vehicles. An Ultrasonic sensor is used to sense the distance from the adjacent vehicle. If the distance is greater than the threshold the throttle actuator is automatically adjusted to increase the speed, so that threshold distance can be achieved. Control loop using PI controller is given below.

Figure 3: Block diagram of adaptive cruise control using PI controller

The input to the control loop is the distance. Control loop compares the actual distance and the threshold distance and generates an error signal which is fed in to PI-controller. PI controller controls the PWM input to motor so that motor speed can be controlled to achieve a constant threshold distance.

a. PI- controller

PI controller is representative of good design for such a control system since it can reduce speed errors due to disturbances (such as hills) to zero. In this strategy an error e is formed by subtracting (electronically) the actual speed Va from the desired speed Vd:

e = Vd – Va

(5)

_______________________________________________________________________________________________

The controller then electronically generates the actuator signal by combining a term proportional to the error (KPe) and a term proportional to the integral of the error The actuator signal u is a combination of these two terms:

u = KPe + KI∫e dt

IV. SIMULATION RESULTS

Most of the automotive tasks are critical real-time applications which need careful processing. The tasks taken for consideration are: Windshield wiper control, seatbelt tighter and adaptive cruise control. These tasks have to be scheduled in real-time so that no task will miss deadline. This is done by RMS algorithm.

Controller Area Network protocol is used for communicating between the two controllers so that efficient scheduling can be done with knowledge of task execution in each controller. Keil IDE was used for writing application tasks with CAN.

Figure 4: RMS Scheduling

Figure 6: fuzzy controller for windshield wiper

Figure 7: Surface view of windshield wiper

Development IDE – Keil IDE and Fuzzy tool box in MATLAB

Software Details – Embedded C

Hardware Details – ARM 7 Based LPC 2129 Development Board, Passive Infrared Sensor, Piezoelectric sensor, Phototransistor.

Figure 8: Adaptive cruise control using Keil IDE

Figure 9: CAN communication

(6)

V. CONCLUSION

Implementation of three automotive tasks (wiper control, seat-belt tightener, power window control) upon two ARM7 based ECUs performed. Communication was enabled between the ECUs through CAN based protocol.

In the project work, a detailed study and implementation of intra-vehicular communication was performed which can be extended for inter vehicular and road-side communication. This will help in collecting more information about the objects in the vicinity of the vehicle.

REFERENCES

[1] Goswami, D. ; Schneider, R. ; Masrur, A. ; Lukasiewycz, M. ;Chakraborty, S. ; Voit,

H. ; Annaswamy, A.”

Challenges in automotive cyber-physical systems design” Proceedings 2012 International Conference on Embedded Computer Systems:

Architectures, Modelling and Simulation.

[2] J.A. Cook et al., “Control, Computing and Communications: Technologies for the Twenty- First Century Model T,” Proc. IEEE, special issue on automotive power electronics and motor drives, vol. 95, no. 2, 2007, pp. 334-355.

[3] CAN specification version 2.0. Robert Bosch GmbH, Stuttgart. M. Bago, S. Marijan, and N.

Peric, “Modelling Controller Area Network Communication”, The 5th IEEE International Conference on Industrial Informatics, Vol.

1,pp.485-490, 23-27 June 2007.

[4] CAN specification version 2.0. Robert Bosch GmbH, Stuttgart, Germany, 1991.

[5] Amos Albert, Robert Bosch, “Comparison of event-triggered and time- triggered concepts with regard to distributed control systems”, Proceedings of Embedded World Conference, pp235-252,17.–19.02, 2004.

[6] “Representation of 3-D Mappings for Automotive Control Applications using Neural Networks and Fuzzy Logic”, H. Holzmann, Ch. Halfmann, R Isermann, IEEE Conference on Control Applications – Proceedings, pp.229-234, 1997.

[7] Sonali B. Madankar, “Intelligent Rain sensing Smart Windshield wiper system”, International Journal of Advanced Research in Computer Science and Electronics Engineering(2277 – 9043),Volume 1, Issue 3, May 2012.

[8] Jean J Labrosse, “MicroC/OS II: The real-time kernel” CMP Books, Second edition, 2002.

[9] Raj Kamal, “Embedded Systems – Architecture, Programming and Design”, Tata McGraw Hill, Second Edition, 2008.



Referensi

Dokumen terkait