Lesson-2 CASE STUDY OF AN EMBEDDED SYSTEM FOR AN ADAPTIVE CRUISE CONTROL (ACC) SYSTEM IN A CAR



Similar documents
Adaptive Cruise Control System Overview

Lesson-3 CASE STUDY OF AN EMBEDDED SYSTEM FOR SMART CARD

Adaptive cruise control (ACC)

VEHICLE SPEED CONTROL SYSTEM

Adaptive Cruise Control

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Service Manual Trucks

Lesson-16: Real time clock DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK

Computer and Set of Robots

8051 MICROCONTROLLER COURSE

G-100/200 Operation & Installation

PUSH BUTTON START INSTALLATION MANUAL

WIRING HARNESS FOR AS635P4. BLUE PLUG RED, BLUE, BLACK, WHITE - Plug in dual stage sensor harness

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

1R / 4-BUTTON SERIES

INSTALLATION MANUAL 3RP / 5RP 4-BUTTON SERIES VEHICLE SECURITY SYSTEMS

P545 Autonomous Cart

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

Monitoring of Intravenous Drip Rate

SNIPER X1 VEHICLE SECURITY SYSTEM

Adaptive Cruise Control of a Passenger Car Using Hybrid of Sliding Mode Control and Fuzzy Logic Control

Electronic Power Control

POWER TRIM 5 F AUTO TRIM AND AUTO TRIM

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Button 1 Button 2. Button 3 Button 4. Programmed Remote Transmitter. Button Function Condition

Embedded OS. Product Information

Operating Instructions Display, graphic. Numeric language

Lesson 10:DESIGN PROCESS EXAMPLES Automatic Chocolate vending machine, smart card and digital camera

FLEET MANAGEMENT & CAR SECURITY SYSTEM GPRS/GPS

UNIVERSITI TEKNOLOGI MARA SOFTWARE DESIGN AND DEVELOPMENT FOR AUTOMOTIVE ONLINE MONITORING SYSTEM

Instruction Manual Service Program ULTRA-PROG-IR

USER MANUAL OPERATION AND USE OF CAR WITH. Diego G3 / NEVO SEQUENTIAL GAS INJECTION SYSTEM

M.S Ramaiah School of Advanced Studies - Bangalore. On completion of this session, the delegate will understand and be able to appriciate:

ABB i-bus EIB Logic Module LM/S 1.1

Automatic Railway Gate Controller with High Speed Alerting System

ATB50v1 GPRS / GPS Based Fleet Management Terminal. Datasheet

Sigma Control PC INSIDE. 97 psi 187 F R on load

TEST CHAPTERS 1 & 2 OPERATING SYSTEMS

USER MANUAL ESP. Enhanced Steering Performance. R-Net

Signature and ISX CM870 Electronics

oxigen system Slot.it oxigen timing RMS installation Dongle driver installation 1/ 11 Race Management Software

About Your System NOTE: What is included: Options and Accessories:

BLOCK OCCUPANCY DETECTOR WITH SEMAPHORE OPERATION BOD1/DAP4-BR

Security and Remote Start Installation Guide for models: CA 6150 CA 6550

STEPPER MOTOR SPEED AND POSITION CONTROL

REAL TIME OPERATING SYSTEM PROGRAMMING-II: II: Windows CE, OSEK and Real time Linux. Lesson-12: Real Time Linux

EBS Electronically controlled Brake system in the city bus CITARO / CITO

B.IQ push button 3-5gang with room thermostat and display V2, flush-mounted x, x, x

An overview of Computerised Numeric Control (C.N.C.) and Programmable Logic Control (P.L.C.) in machine automation

ACTIVE INFRARED MOTION DETECTOR FOR HOUSE SECURITY SYSTEM MIOR MOHAMMAD HAFIIZH BIN ABD. RANI UNIVERSITI MALAYSIA PAHANG

Introduction to Electronic Signals

Push button 2, 3, 5gang with room thermostat (RTR) and display flush-mounted xx, xx, xx

DESIGN AND IMPLEMENTATION OF LOW COST HOME SECURITY SYSTEM USING PIC MICROCONTROLLER ANDGSM NETWORK

MECE 102 Mechatronics Engineering Orientation

Inwall 4 Input / 4 Output Module

Owner s Manual FULL PREPARATION PACKAGE MOBILE PHONE

SHIFT INTERLOCK SYSTEM SHIFT INTERLOCK SYSTEM

STEP 7 MICRO/WIN TUTORIAL. Step-1: How to open Step 7 Micro/WIN

The Real-Time Operating System ucos-ii

How To Control A Car Alarm On A Car With A Remote Control System

Fig 3. PLC Relay Output

MAGICAR M871A. Car alarm with two-way remote User s guide

Car Alarm Series 2 B 2 Buttons

GPS & GSM BASED REAL-TIME VEHICLE TRACKING SYSTEM.

INTERACTIVE DISTANCE LEARNING ANTI-LOCK BRAKE SPECIALIST: KELSEY HAYES REAR WHEEL ANTI-LOCK BRAKING SYSTEMS (RWAL/RABS)

DESIGN OF SMS ENABLED CAR SECURITY SYSTEM

1. Computer System Structure and Components

How to read this guide

2009 QUICK REFERENCE GUIDE GET INFORMED. ROLL.

EXPERIMENT 2 TRAFFIC LIGHT CONTROL SYSTEM FOR AN INTERSECTION USING S7-300 PLC

International Journal of Engineering Research & Management Technology

Lesson 6: 6 EXAMPLES OF EMBEDDED SYSTEMS. Chapter-1L06: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

OWNERS MANUAL. Status Monitor. for Windows 95, 98, ME, NT 4, 2000 & XP. SIGNALCRAFTERS TECH, INC.

Automotive Black Box Data Recovery Systems

TOYOTA ELECTRONIC CONTROL TRANSMISSION

mysensors mysensors Wireless Sensors and Ethernet Gateway Quick Start Guide Information to Users Inside the Box mysensors Ethernet Gateway Quick Start

Stop Alert Flasher with G-Force sensor

PRO PLM Installation Instructions

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V th November L6470 Stepper Motor Shield

Microtronics technologies Mobile:

UC CubeSat Main MCU Software Requirements Specification

Adaptive Cruise Control Unit

Low Level Windshear Alert System (LLWAS) An integral part of the U.S. FAA Wind-shear safety program

Drayton Digistat +2RF/+3RF

EHOOKS Prototyping is Rapid Again

1. SYSTEM OVERVIEW. 1) Basic Theory of ABS Function

Automobile Speed Violation Detection System using RFID and GSM Technologies

Adding Pneumatic Preset Counter. Type 497. Continuously visible preset Integrated pneumatic reset 3 or 5-digit display Convenient button setting

INSTALLATION MANUAL VEHICLE SECURITY SYSTEM CE-SS200

Automated Profile Vehicle Using GSM Modem, GPS and Media Processor DM642

DeviceNet Communication Manual

How to design and implement firmware for embedded systems

The following information can be output as speech: status of the teacher / student connection. time markers of the timers.

Technical Training Module ( 30 Days)

Firmware version: 1.10 Issue: 7 AUTODIALER GD30.2. Instruction Manual

TOYOTA ELECTRONIC TRANSMISSION CHECKS & DIAGNOSIS

SCORPION. micron security products

Transcription:

Design Examples and Case Studies of Program Modeling and Programming with RTOS-2: Lesson-2 CASE STUDY OF AN EMBEDDED SYSTEM FOR AN ADAPTIVE CRUISE CONTROL (ACC) SYSTEM IN A CAR 1

Embedded Systems in a car 2

1. Adaptive Cruise Control (ACC) System 3

Cruise control Cruise control a system that takes charge of controlling the throttle from the driver and cruising the vehicle at preset and constant speed. may also maintain string stability in case of multiple cars streaming through highway and in case of VIP convoy 4

Adaptive Cruise Control (ACC) Using an adaptive algorithm, ACC system maintains constant speed and can be added string stability feature in case of multiple cars streaming on highway. String stability maintaining inter-car distances constant 5

ACC Cruise control relieves the driver from that duty and the driver hands over the charge to the ACC When (1) road conditions are suitable (not wet or icy, or (2) there are no strong winds or fog), or (3) car is cruising at high speed and when there is no heavy traffic. The driver resumes the charge in adverse conditions 6

Block diagram of the ACC system units 7

Control front-end panel Switch cum Display for 'ON', for 'OFF', 'COAST', RESUME', SET/ACCELERATE. The driver activates or deactivates, the ACC system by pressing ON or OFF, respectively. 8

Adaptive Control An adaptive control algorithm used to adapt to the current status of control inputs Parameters adapt dynamically In place of a constant set of mathematical parameters in the algorithm equations, the parameter are continuously adapted to the status at an instance 9

Model for an adaptive control algorithm adapts and function 10

2. ACC System Requirements 11

Purpose Controlled cruising of car using adaptive control algorithm for continuous maintaining the car speed and inter-car distances 12

Inputs Present alignment of radar (or laser) beam emitter. Delay interval in reflected pulse with respect to transmitted pulse from emitter Throttle position from a stepper motor position sensor. Speed from a speedometer Brake status for brake activities from brake switch and pedal 13

ACC System Ports and tasks Port_Align for a motor control for steps up clockwise or anticlockwise on a signal from task_align, aligns radar or UVHF transmitting device in the lane of the front-end car Port_ReadRange for measuring front end-car range. Time difference deltat is read on a signal from task_signal to port device. 14

ACC System Ports and tasks task_readrange to read using the Port device_readrange circuit for the computations of deltat between the transmission and reception instances. deltat 1.5 10 5 measures the range rangenow (= present range or front-car distance d) of the front-end car. task_readrange to send message for speednow (= velocity v) to task_rangerate and transmits same to all other streaming behind cars 15

ACC System Ports and tasks Port_Speed to send speed to port control function routine on receiving a signal from task_speed Port_Brake to apply the brakes or emergency brakes on an interrupt signal, which runs service routine ISR_BrakeControl 16

Signals, Events and Notifications User commands given as signals from switches/buttons. User control inputs for ACC ON, OFF, Coast, resume, set/accelerate buttons Brake event (Brake taping to disable the ACC system, as alternative to "cancel" button at front panel) Safe/Unsafe distance notification 17

Outputs Transmitted pulses at regular intervals Alarms Flashed Messages Range and speed messages for other cars (in case of string stability mode) Throttle-valve and Brake control Output to pedal system for applying emergency brakes and driver nonintervention for taking charge of cruising from the ACC system 18

Control front-end panel Switch with display 'ON', for 'OFF', 'COAST', RESUME', and SET/ACCELERATE. COAST or RESUME switch to enable driver handover or resumes the ACC system charge SET/ACCELERATE switch to set cruise speed upwards or downwards 19

Control front-end panel Switch with display glows to show green or red as per the status when the ACC activation Alarms and message flashing unit issues appropriate alarms and message flashing pictograms 20

Functions of the system Cruise control system takes charge of controlling the throttle position from the driver and enables the cruising of the vehicle at the preset constant speed. A radar system helps in maintaining intercar distance and warns of emergency situations. An alignment circuit aligns the radar emitter. When driving in a hilly area, the emitter alignment is must. A stepper motor aligns the attachment so that transmitter beam of radar emits with the required beam alignment for the given driving lane and divergence so maintain the in-lane line of sight of the front-end car. task_align does this function. 21

Functions of the system Transmit modulated pulses emit at periodic intervals and the delay period in receiving its reflection from front-end vehicle The measured delay deltat at periodic intervals deltat multiplied by 1.5 10 8 m/s (half of light velocity) gives the computed distance d (= RangeNow) of front end car at that instance. 22

Functions of the system The differences of d with respect to safe d safe and preset distances d set (in case of maintaining string stability) are cyclically estimated. The speedometer measures the speed and task_speed compute error in preset speed and measured speed 23

Functions of the system All estimated differences are cyclically sent as input to an adaptive algorithm, which adapts the control parameters and sends computed output to vacuum actuator of the throttle valve in car. task_algorithm for computations task_throttle initiates the control output functions for this action. Interrupt service routine ISR_ThrottleControl does the critical functions of throttle control. The car decelerates and accelerates as per setting of throttle valve orifice at an instance. 24

Functions of the system Functions of the system The brake is controlled when the safe distance is not maintained and warning message is flashed on the screen. task_brake initiates the critical functions of brake control. Interrupt service routine ISR_BrakeControl performs the brake critical functions When battery power becomes low, the ACC system deactivates after issuing alarm and flashing messages (notifications). 25

Design metrics Power Source and Dissipation: Car Battery operation. Resolution: 2 m inter-car distance. Performance: Safe distance setting 75 m to 200 m. No overshooting of controlled output for the throttle Process Deadlines: Less than 1 s response on observation of unsafe distance of front-end car. 26

Design metrics User Interfaces: Graphic at LCD or touch screen display Extendibility: The system is extendable to maintain string stability of multiple cars in a row. Engineering Cost: US$ 50000 (assumed) Manufacturing Cost: US$ 600 (assumed 27

Test and validation conditions Tested in dense as well light traffic conditions Tested on plains, hills and valley roads All user commands must function correctly 28

3. Detailed functioning in Adaptive Cruise Control (ACC) System 29

Functioning of ACC System Retrieve the front end-car distance information from a radar or UVHF attachment at the front string wheel. A stepper motor aligns the attachment so that transmitter of radar maintains the line of sight to front-end car. The radar system maintains string stability and warns of emergency situations. 30

Functioning of ACC System Get road speed from Speedo-metric section of DAS unit. Get acceleration from engine section 31

Functioning of ACC System Run adaptive algorithm to calculate and send control signals to stepper motor actuator at vacuum-valve Orifice opening of vacuum valve controls electro-pneumatic throttle valve. Receive new throttle position by stepper motor position sensor. 32

Functioning of ACC System Get inputs of brake switch status for monitoring brake activities. Send output to pedal system when applying emergency brakes Driver intervenes on taking charge of cruising from ACC. 33

Functioning of system by synchronization of tasks in ACC 34

4. Classes and class diagram 35

Class diagram for ACVM Part-1 Reset 36

5. Hardware Architecture 37

Hardware 38

ACC hardware A hardware system in automotive electronics has to provide functional safety. Important hardware standards and guidance at present are following: (a) TTP (Time Triggered Protocol), (b) CAN (Controller Area Network) (c) MOST (Media Oriented System Transport), (d) IEE (Institute of Electrical Engineers) guidance standard exists for EMC (Electromagnetic Magnetic Control) and functional safety guidance 39

ACC hardware A microcontroller runs the tasks and ISRs except task_algorithm. Internal RAM/ROM, ROM/Flash for RTOS codes for scheduling the tasks. CAN port interfaces with the CAN bus at the car. A separate processor with RAM and ROM for the task_algorithm executes the adaptive control algorithm Speedometer 40

ACC hardware Stepper motor based alignment unit Stepper motor based throttle control unit Transceiver for transmitting pulses through an antenna hidden under the plastic plates. LCD dot matrix display controller, display panel with buttons Port devices Port_Align, Port_Speed, Port_ReadRange, Port_Throttle and Port_Brake 41

6. Software Architecture 42

RTOS VxWorks used as alternative to OSEK-OS OSEK OS standard is reliable compared to VxWorks or MUCOS. To demonstrate RTOS use in the ACC application, let us adapt VxWorks alternative for coding instead of OSEK-OS by adhering to the OSEK guidelines 43

RTOS Use BCC 1 type of tasks, as done in VxWorks application in Example 11.2. Define each task of different priority and activate it only once in the codes. Use no message queues, mutex or counting semaphore. 44

RTOS No in-between creation and deletion of tasks. Semaphores as event flags only with no run-time deletion or creation of these. Task can consist of three types of objects, event (semaphore), resource (statements and functions) and devices including port devices. 45

RTOS Use MISRA C rules in coding. Use disable interrupts when a task or function enters critical section and enable interrupts when leaving critical section 46

7. Tasks and their class, priority, action and IPCs 47

Priority 101 Class BCC1 task_align Action Waits for the Reset cycle to start and send signal to Port_Align IPC pending: Event signal (s) Reset IPC posted: Align Input: deltastep, Step Output: Step to Port_Align 48

Class BCC1 task_read-range Range Priority 103 Action Disable interrupts, get signal from Port, activate a radar flashing, records activation time, gets time of sensing the reflected radar signal and finds time difference, timediff. and Enable interrupts IPC pending: Align IPC posted: Range Output: deltat 49

Priority 105 Class BCC1 task_speed Action Event Port_Speed starts a timer, counter start message and wait for the 10 counts for the number of wheel rotations. IPC pending: IPC posted: Speed Output: speednow 50

Class BCC1task_Range-Rate Rate Priority 107 Action calculates rangenow, get preset front car range and stringrange from memory and compare. Get v set set cruising speed and compare it with current speed speednow. IPC pending: Speed IPC posted: ACC 51

Class BCC1task_Range-Rate Rate Input: avgtirecircum, time-diff, deltat, stringrange, CruiseSpeed, and N_rotation Output: range-error, speed-error, range-now, speed-now 52

Class BCC1task_Algorithm Priority 109 Action (i) Get errors of speed and range and execute adaptive control algorithm. (ii) Get errors of other vehicles through Port_RangeRate. (iii) Get other vehicles Port_Brake status. 53

Class BCC1task_Algorithm (iv) Get present throttle position. (v) Send output, throttleadjust to Port_Throttle. (vi) Send signal to Port_Brake in case of emergency braking action needed. (vii) Port_Brake transmits the action needed to other vehicles also. IPC pending: ACC IPC posted: Reset 54

Class BCC1task_Algorithm Inputs: range-error, speed-error, All Port_RangeRate values and Port_Brake statuses and VehicleID Outputs: throttle- adjust and emergency for brake and throttle respectively 55

8. Multiple tasks and their synchronization model 56

Synchronization model of ACC system tasks 57

Semaphores taken and given in cyclic order... Task_Alignment takes SemReset at cycle start and gives SemAlign Task_Read Range takes SemAlign at start and gives SemRange Task_Speed gives SemSpeed 58

Semaphores taken and given in cyclic order... Task_RangeRate takes SemSpeed taken at start and gives SemACC Task_Algorithm takes SemACC taken at start by and gives SemReset 59

9. Coding using C and VxWorks RTOS 60

ACC software for use in automobile First be certified from organization authorized to issue that certification. We have seen that OSEK OS standard is required. Only those VxWorks or MUCOS functions which are adhering to OSEK must be used. Software coding IEC 61508 part 3 and MISRA C version 2 (2004) specifications of safety standards and coding language must be used. 61

MISRA C MISRA stands for Motor Industry Reliability Association. MISRA C specifies a collection of rules to be used while coding in C 62

Important rules and coding standard MISRA C 63

MISRA-C is a standard for C language software and defines the guidelines for automotive systems for using C. MISRA-C version 2 (2004) specified 141 rules for coding and gave a new structure for C. Details at http://www.misra.org.uk. 64

Coding using VxWorks Adapted to OSEK-OS Features Refer Example 12.2 in Section 12.3.6 Note: At each step, explanation for the set of statements given there. 65

Summary 66

We learnt Case study for ACC Functioning and requirements task_align, task_read-range, task_speed, task_range-rate and task_algorithm ISRs Class diagrams Hardware and software Tasks synchronization model 67

End of Lesson-2 of chapter 12 on CASE STUDY OF AN EMBEDDED SYSTEM FOR AN ADAPTIVE CRUISE CONTROL (ACC) SYSTEM IN A CAR 68