54
Shige Wang GENERAL MOTORS GLOBAL RESEARCH & DEVELOPMENT For Next Generation Automobiles Develop Vehicle Control Systems As CPS

Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Shige Wang

GENERAL MOTORSGLOBAL RESEARCH & DEVELOPMENT

For Next Generation Automobiles

Develop Vehicle Control Systems As CPS

Page 2: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Topics

• Overview of NextGen vehicle control systemo why is it CPS

• Development process for massive productiono how is it design and developed: EE system

• Technologies supporting NextGen vehicle controlo what enables it: real-time embedded systems

• Challenges with new technologieso what are missing: parallelism, data processing

3/25/2015 2University of North Carolina visit

Page 3: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Cyber-Physical Systems

• Cyber – computation, communication, and control that are discrete, logical, and switched

• Physical – natural and human-made systems governed by the laws of physics and operating in continuous time

• Cyber-Physical Systems – systems in which the cyber and physical systems are tightly integrated at all scales and levels

Change from cyber merely appliquéd on physical

Change from physical with COTS “computing as parts” mindset

Change from ad hoc to grounded, assured development

“CPS will transform how we interact with the physical worldjust like the Internet transformed how we interact with one another.”

Source: Dr. Gill presentation at NSF CPS PI meeting

3/25/2015 University of North Carolina visit 3

Page 4: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

REAR-PASSENGER FLAT-PANEL DISPLAYS

COMMAND SYSTEM WITH PCMCIA SLOT

GPS NAVIGATION

DVD PLAYER

LED LAMP CLUSTER

MEMORY SEAT/MRROR/STEER

HEAD-UP DISPLAYS

DASHBOARD-INSTRUMENT CLUSTER

TELEMATIC SYSTEM

CLIMATE CONTROL

ELECTRONC POWER-ROOF SYSTEM

RADAR SENSOR

TRANSMISSION CONTROL

COLLISION AVOIDANCE

ADAPTIVE CRUISE CONTROL

HID HEADLAMP

AIR-BIG CONTROL AND

SATELLITE CRASH SENSORS

ACTIVE STEERING

BODY CONTROL

SUSPENSION CONTROL

POWER WINDOWS

REMOTE KEYLESS ENTRY

SEAT MASSAGE/HVAC

TIRE-PRESSURE-MONTORING

ADAPTIVE BRAKE LIGHTS

PARKING SENSORS

REAR-VIEW CAMERA

BATTERY MANAGEMENT

POWER SEATS

THROTTLE CONTROL

ENGINE CONTROL UNIT

ELETROCHROMIC REAR-VIEW MIRRORS

CAR RADIO

ANTILOCK-BRAKING SYSTEM/ELECTRONIC-

STABILITY CONTROL

FOLDING DOOR MIRRORS

Controls in Typical Vehicle

3/25/2015 University of North Carolina visit 4

Page 5: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Vehicle Control System as CPS

Take me where I want to go –Software algorithms +

electroniccontrols and actuators

What’s around me –360°sensing(sensors

+ “V2V”)

Where am I – GPS + digital maps

Rear Vision System– Object detection– Far IR Capability

Short-Range

SensorsLong-Range

ScanningSensor

Forward Vision System– Lane tracking– Object detection– Far IR Capability

Short-RangeSensors

Long-Range

Sensors

EnhancedDigital Map

System

UltrasonicSensors

UltrasonicSensors

Dedicated Short-RangeCommunication + GPS (V2V)

Forward Vision System

LIDAR Image Sensor

AUTOSAR

DSRC

AVB Ethernet

CAN

FlexRay

MulticoreFPGA

Power-aware schedule

Fail-operational Arch

IntegratedDisplay

LED lighting

3/25/2015 University of North Carolina visit 5

Highly complex• Large number of parts (>2500)• From different sources• Built differently• Last long time (>10 yrs)

Diverse needs• Expression and self

image• Create personal space• Market and segment• Operation environments

• Electrical and electronics replacing mechanic parts

• Standalone system to connected

• Rely on driver to autonomous driving

• Fixed configuration to tailor for different uses

Page 6: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

CPS Example: Electronic Stability Control

3/25/2015 University of North Carolina visit 6

Page 7: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

With Technology Advancement

Next generation vehicles should be smart and adaptive

Energy-efficient propulsion

Vehicle connectivity – both in-vehicle and V2X

Active safety – driving assistance to autonomy

Personalized – learn driving styles

Self management of health

3/25/2015 7University of North Carolina visit

Page 8: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Vehicle Control System: Complexity

3/25/2015 8University of North Carolina visit

50+ customer features16 domains, 88 subsystemsPowertrain: 118 functions, 789 signal, 967 links

70+ Electronic Control Units10+ in-vehicle networks 100+ sensors and actuators

15 concurrent temporal development streams

300 hierarchical subsystems

Thousands of variant features

Millions of product instances

Tens-of-thousands of unique product variants

Highly heterogeneous

Mixed criticality, mixed intellectual property, mixed versions

Affordable, reliable, safe, and exciting

Across a large volume with many variations

Last long time in all conditions – climate, traffic, maintenance, driving habits, ……

Page 9: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Vehicle Control System Development Process

de

ve

lop

me

nt

pro

cess

Requirements

Analysis

Control Dev

SW Design

Implementation

(RP vs. Target)

Diff. Equation,, State-

based formalism,

SDF, etc.

C/C++

Code Libraries

Ascet

SDdSpace

Target-

Link

Natural language

Use-case diagram

Block diagram, etc.

Matlab

SL/SF

Rhapsody

Programming Env. (Tornado,

MS Visual Studio, etc)

Word

State-

mate

Continuous +

Discrete

UML, UML-Profile,

ADL (AADL, EAST-

EEA), AutoSAR, etcmo

de

l tr

an

sfo

rma

tio

n

en

d-t

o-e

nd

to

ol c

ha

in

Excel DOORS

Math

emati

ca

tool Integrationmodel translation/composition

3/25/2015 University of North Carolina visit 9

Multiple stages, multiple groups/organizations, multiple tools, multiple geographical locations

Page 10: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Functional Architecture Implementation Architecture Deployment Architecture

Integration Area

Domain Area

•Production Line Models •Product Requirements*

FE FE

Soft

war

eH

ard

war

e

Allocate FEs to Components

Algorithm Models& Calibration Definition

Mechanizations

SW\HW Component Compositions

System Design Model

•SWC•HWC•Networks

ECU

ECU ECU

1…n Networks

ECU Extracts

Allocate Components to ECUs

Integration PlatformChange Management

DiagnosticDesign

NetworkDesign

Core ArchDesign

ControllerDevelopment

Logical View

Vehicle Application Architecture

System Data

•Hardware Connectivity •Power & Ground•Merge with 3D data for wiring •Service Documentation

•Production Line Models •Customer Requirements*

Vehicle Control System Engineering

3/25/2015 University of North Carolina visit 10

Page 11: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Feature-Oriented Productline DevelopmentACC

LDWLXC

CTDKLE

VRP

EngCycIMC DFI

ACC-v1

LXC-v3KLEC-v2

VRP-v2

EngC-v1DFI-v5

ACC-v3

LXC-v3KLEC-v5

VRP-v1

EngC-v1DFI-v3

CTD-v1

ACC-v1ACC-v1ACC-v1

LDW_v3LDW_v2LDW-v1

LCC-v1LCC-v1LXC-v1

CCC-v1CCC-v1CTD-v1

KCC-v1KCC-v1KLEC-v1

VCC-v1VCC-v1VRP-v1

ECC-v1ECC-v1EngC-v1

ICC-v1ICC-v1IMC-v1

DCC-v1DCC-v1DFI-v1

3/25/2015 University of North Carolina visit 11

Page 12: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Challenge: Software Implementation of Controls

• Different design principles and focuses o Code generation in commercial tools limited to small component

• Timing delays cause errors o Mismatch implementation and model

o Introduce timing jitters

o Non-determinism across different configurations

• Multitasking and multirate controlo Determine proper software tasks for control

o Determine proper schedule of software tasks

• More challenging – parallel programming and executiono Resource sharing, data protection, synchronization, etc

3/25/2015 University of North Carolina visit 12

Page 13: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

PID Example: Error Propagation in Software

• There may be a correlation between sampling period and execution time

Per = 10, wc completion time = 1~5 Per = 6, wc completion time = 1~5

3/25/2015 University of North Carolina visit 13

Page 14: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

ABS Example: Physical Variability Impact

3/25/2015 University of North Carolina visit 14

Page 15: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

ABS Example: Software Implementation Impact

3/25/2015 University of North Carolina visit 15

Page 16: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Standardization: AUTOSAR

3/25/2015 University of North Carolina visit 16

SW-C(application software components)

VFB(virtual functional bus)

RTE(run-time environment)

BSW-M(basic software modules)

Page 17: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

AUTOSAR Interfaces – System Composition

3/25/2015 University of North Carolina visit 17

Components interact through ports:• Sender-receiver: SWC-SWC, 1-many, async• Client-server: SWC-BSW, many-1, sync

For Sender-Receiver ports:

Initial value

Queue length

Explicit vs. implicit

Acknowledgement

Timeout

For Client-Server ports:

Synchronous vs. asynchronous

Timeout

Queue length

Page 18: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

SW Components and Runnables

• SW-Components

atomic block with respect to mapping

provided by one supplier

3/25/2015 18University of North Carolina visit

SW-C 1

runnableA

runnableB

runnableCBSW

RTE

SW-C 1

• Runnables

atomic block with respect to execution

attach to different OS tasks

Page 19: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Example: Front-Light Management (Distributed)

3/25/2015 University of North Carolina visit 19

Page 20: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

AUTOSAR OS

Basic feature

• Configured and scaled statically

• Amenable to reasoning of real-time performance

• Provides a priority-based scheduling policy

• Provides protective functions at run-time (for memory, time, etc)

• Can run on low-end controllers and without external resources

OS Abstraction Layer

• Define for co-existence of AUTOS OS and proprietary OS

ECU State Manager

• starts/stops AUTOSAR OS

Interaction with RTE

• Map runnables of the same SW component to task(s)

• Share protection boundary among runnables of the same task

• Tasks and ISRs for basic SW scheduled by OS

3/25/2015 20University of North Carolina visit

Page 21: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

AUTOSAR Scheduling

• Two level, table-driven

• Used for static scheduling: all tasks are synchronized with alarms

Alarms fixed once started

Each table linked to one tick counter

• Defines expiry points

• Allow multiple table activated concurrently – compositional schedule

• Two types of schedule tables: one-shot, repeated

3/25/2015 21University of North Carolina visit

Runnable

OS

RTE OS Task

Page 22: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

AUTOSAR OS Configuration

3/25/2015 University of North Carolina visit 22

Page 23: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

OS Application

• A set of OS objects to form a functional unit

• Can be trusted or non-trusted

• Objects of the same OS application can access each other

3/25/2015 23University of North Carolina visit

Page 24: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Deployment View

ECU 1 – Lane keeping ECU

Left Sensor

Component

ECU 2 – Sensor Compoents

Display and

Controller

components

ECU 3 – Displays & Controllers

AUTOSAR StackAUTOSAR Stack

AUTOSAR Stack

Flex Ray Bus

Basic Software Components

Application Components ECU

Legend

Detailed Deployment View

Right Sensor

ComponentLane Keeping

Application Component

Flex Ray Bus

3/25/2015 University of North Carolina visit 24

Page 25: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

AUTOSAR Fault-Tolerant: E2E Protection

• Mitigate faults in E2E communication

• Defined a set of E2E profiles – non-generated, deterministic code

• E2E library defines 3 Profiles

3/25/2015 25University of North Carolina visit

Page 26: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

E2E Communication Profiles

3/25/2015 University of North Carolina visit 26

Page 27: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Safe E2E Communications

3/25/2015 27University of North Carolina visit

Page 28: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Memory Protection

• Use OS-Applications: two variants

3/25/2015 28University of North Carolina visit

ECU-Hardware

AUTOSAR Runtime Environment (RTE)

ActuatorSoftware

Component

AUTOSARInterface

ApplicationSoftware

Component

SensorSoftware

Component

ApplicationSoftware

Component

..............

AUTOSARSoftware

Basic Software

StandardizedInterface

AUTOSARInterface

AUTOSARInterface

AUTOSARInterface

MicrocontrollerAbstraction

StandardizedAUTOSARInterface

Services

StandardizedInterface

ECUAbstraction

AUTOSARInterface

StandardizedInterface

ComplexDeviceDrivers

AUTOSARInterface

StandardizedInterface

Communication

StandardizedInterface

StandardizedInterface

OperatingSystem

Sta

nd

ard

ize

dIn

tefa

ce

Memory

CPU

Supervisor

mode

OS-Application 1, trusted,

with protection enabled

CPU

User

mode

Non-trusted OS-Applications

SW-Cs are allocated to OS-Applications (1 or more)

OS-App 2 private

data

OS-App 1 private

data

Optional: shared

OS-App 1 data

(buffer used by

RTE for IPC)

OS-App n private

data

...

OS-App 2 private

code

OS-App n private

code

...

OS-App 1 private

code

ECU-Hardware

AUTOSAR Runtime Environment (RTE)

ActuatorSoftware

Component

AUTOSARInterface

ApplicationSoftware

Component

SensorSoftware

Component

ApplicationSoftware

Component

..............

AUTOSARSoftware

Basic Software

StandardizedInterface

AUTOSARInterface

AUTOSARInterface

AUTOSARInterface

MicrocontrollerAbstraction

StandardizedAUTOSARInterface

Services

StandardizedInterface

ECUAbstraction

AUTOSARInterface

StandardizedInterface

ComplexDeviceDrivers

AUTOSARInterface

StandardizedInterface

Communication

StandardizedInterface

StandardizedInterface

OperatingSystem

Sta

nd

ard

ize

dIn

tefa

ce

Memory

CPU

Supervisor

mode

OS-Application 1, trusted,

with protection disabled

CPU

User

mode

Non-trusted OS-Applications, with protection enabled

SW-Cs are allocated to OS-Applications (1 or more)

OS-App 2 private

data

OS-App 1 private

data

Optional: shared

OS-App 1 data

(buffer used by

RTE for IPC)

OS-App n private

data

...

OS-App 2 private

code

OS-App n private

code

...

OS-App 1 private

code

Page 29: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Timing Protection

• Support specifying and verifying timing properties (period, latency, jitter, synchronization, execution time, deadline)

• Two implementation: BSW time service; RTE sync event

3/25/2015 29University of North Carolina visit

ECU 1 ECU 2

OS Task, ECU 1

Pos 1

Pos 2

OS Task, ECU 2

Pos 1

Local Time TickLocal Time Tick

synchronized global time

Synchronization

Runnable

Runnable

Inter-

runnable

variable

SW-C

Synchronization

Runnable

Runnable

Inter-

runnable

variable

SW-C

Synchronization

Runnable

Runnable

Inter-

runnable

variable

SW-C

RTETimingEvent RTETimingEvent RTETimingEvent

synchronized RTE events

time sync protocol sync event

Page 30: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Program Flow Monitoring

• Focuses on SWC program flow faults

• Two types: timely behavior; sequence of code blocks

• Use SWC ports and Watchdog Manager

3/25/2015 30University of North Carolina visit

critical code block A;

call port p1;

critical code block B;

call port p2;

p1 p2

Wdg_alive(1) Wdg_alive(2)

Check if “1”

arrived on timeCheck if “2”

arrived on time

Check if “2”

is after “1”

RTE

SW-C

Watchdog

Manager

Individual Supervision State

Machine

GlobalSupervision State

Machine

Page 31: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

AUTOSAR OS Scalability Class

3/25/2015 University of North Carolina visit 31

Page 32: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

AUTOSAR Multicore OS

3/25/2015 University of North Carolina visit 32

Assumptions

Individual cores can be identified

Cores share instruction set and data size

Exceptions stay within a core

Interrupts can be triggered on any core

Equal access of memory (or segment)

No addition of cores after OS started, no shutdown/restart of individual cores

No dynamic task assignment

Core organization: master - satellite

Master: all BSW, wakeup/shutdown management

Satellite: subset BSW only for CDD and SW-Cs

ECU State Manager on each core

Synchronize startup, shutdown, sleep operation

A single configuration of OS for all cores

Each core runs a part or whole copy of OS

Page 33: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

AUTOSAR Considered Multicore SW Architectures

• History: some options considered

3/25/2015 33University of North Carolina visit

Multi-processing

Same OSMP Co-Processing

I/OProcessing

CPUFarm

SingleImage

MP

MultiInstance

MP

DynamicAffinity MP

StaticAffinity MP

RTEBridged

MP

COMBridged

MP

Same OS

on all coresOS only on one core,

other cores are black boxes

One OS

per core

One OS

handles all cores

Tasks and IRQs

fixed to cores

Inter-Connection

on AR RTE level

Inter-Connection

on AR COM level

Interrupt

off-loadingdistributed

calculations

Page 34: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

AUTOSAR Multicore OS Scheduling

• Fixed priority-based schedule on each core

• Cores execute task independently

Each core has its own schedule table(s)

• Task priorities on different cores are limited to local

3/25/2015 34University of North Carolina visit

Page 35: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Multicore OS Startup

• Each core must have at least one OS Application

• Master-satellite can be cascade

• All cores start before StartOS command

3/25/2015 35University of North Carolina visit

Page 36: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Multicore Timing Control

• Each core must have at least one counter from timer

• Multiple counters exist for OS Applications

• Counters can be on remote cores

• Synchronization among counters may be required

• Implementation is not specified

3/25/2015 36University of North Carolina visit

Page 37: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Multicore Inter OS-Application Communicator (IOC)

• For communications between OS-Applications across cores or memory protection boundary

In addition to Intra OS (via RTE) and Inter ECU (via COM)

Accessed directly (not support) or through RTE (logic one, physical splitted)

1:1 or N:1 (1:N requires RTE generating N 1:1, changed in 4.2+)

3/25/2015 37University of North Carolina visit

Page 38: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Mutual Exclusion Across Cores

• Spinlocks

A busy-waiting mechanism polling the variables until available

Used by tasks on different cores

Priority-based scheduling on each core not affected

• Deadlock avoidance

Resolved using predefined access order: all cores follow the same order

Controlled by LIFO policy

3/25/2015 38University of North Carolina visit

Page 39: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Human Interface Strategy

Motorized Seat BeltsCollision Mitigation Braking

Rear Back-Up Camera

Lane Departure Warning

Forward Collision Alert

Adaptive Cruise /

Full-Speed Range ACC

Aux Virtual Image Display (AVID)

Haptic Seat

Side Blind

Zone Alert

Front Camera Functions

New Technology: Advanced Driver Assistance System (ADAS)

3/25/2015 University of North Carolina visit 39

Page 40: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Computing Challenges for ADAS

• Very high computation demandso Image processing, complex math computation

o Fusing and cross-examining information from different sources

• Very large amount of datao Fast and continuous sampling

o Many streams of inputs

• Under real-time and embedded constraintso Source of information for critical controls (speed, steering, braking, etc)

o Key part of system safety (ASIL-D), but with a weak computing platform support (ASIL-B)

• Other business challenges

3/25/2015 40University of North Carolina visit

Page 41: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Hardware Options

3/25/2015 University of North Carolina visit 41

Page 42: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Software Architecture Challenge: mixed-criticality

• Classified for each featureo Forward collision avoidance – ASIL D

o Lane keeping – ASIL C

o Lane departure warning – ASIL A

• Different ASIL for functions in the same featureo Object detection – ASIL B

o Video streaming – ASIL A

• ASIL may change in different modes during operationo Back up: rear camera for monitoring and warning – ASIL C/D

o Normal driving: rear camera for monitoring – ASIL B

3/25/2015 42University of North Carolina visit

Page 43: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Software Architecture Challenge: virtualization

• Consider hypervisor

• Mixed different OSs to maintain independence of applications

• Different impl. strategieso Pass-through/native virtualization

o Para-virtualization

• Some exampleso Research: KVM, Xen, OKL4

o Commercial: QNX, WindRiver, COQUOS, PikeOS, GH IntegrityOS, Coqos

3/25/2015 43University of North Carolina visit

Page 44: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Software Architecture Challenge: memory management

• Performance depends more on memoryo Same for multicore and GPU

o Memory protection doesn’t help

• Data locality should be exploredo Cache, system memory, device memory

o Partition of memory into continuous regions

• Cache- and memory-locking

3/25/2015 44University of North Carolina visit

Core 1

Core 2 Main

Memory

Core 3

τi5 4 3 2 1

Memory Bus

τj

τk

0x30000

mission functions

role functions

mod_00_fn_00

mod_00_fn_00

Task 1 functions

Task 2 functions

.text, .text_vle sections

9KB .lock_section

Page 45: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Programming

• Programming Modelo Data parallelism

o Task parallelism

• Languageso OpenCL

o CUDA

o OpenMP

3/25/2015 45University of North Carolina visit

Page 46: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Other Issues

• Task synchronization

• Data coherence and consistency

• Processor power consumption and temperature

3/25/2015 46University of North Carolina visit

Page 47: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Remarks

• Software development methods for large scale software for mass produced CPS are still not mature

• New applications post additional technical and business challenges

• Advanced hardware offers great potentials but also posts challenges

• Software architecture supporting predictable and analyzable vehicle controls is still evolving and requires further research

3/25/2015 47University of North Carolina visit

Page 48: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

END

3/25/2015 48University of North Carolina visit

Page 49: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Interference Among Controls

• Algorithms designed to run standalone

• Interferences of other controls through resource share causing more inconsistency (temporal and data)

3/25/2015 49University of North Carolina visit

• Each line represents activation of a distinct control (a schedule)

• Running standalone, they all should be with regular pulses

• Diagram shows running on a shared controller without any protection (code-gen, flash, run)

• Observed extensive blocking (no pulse) and busy-processing (piggyback pulses)

Page 50: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Simulation Setup – Architecture Selection

• Test Scenarioo Host vehicle starts from 0 with 200 ft behind lead vehicle

o Lead vehicle moves with a predefined speed profile

• Task running synthetic workload o Tasks are not randomly generated (like most academic cases)

o To be filled with control algorithm after it is done

• Processor utilization should be maintained less than 70%o For single core, implies sampling period 80 ms and more

3/25/2015 University of North Carolina visit 50

Page 51: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Performance With Single or Dual-Core

40 ms 80 ms

3/25/2015 51University of North Carolina visit

Page 52: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Performance With Different Periods

Running on a resource restricted platform, pick 800 ms

If preserve control performance, pick 60 ms

3/25/2015 University of North Carolina visit 52

Page 53: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Performance With Different Synchronization

40 ms lock-free, wait-free 40 ms lock-based

3/25/2015 53University of North Carolina visit

Page 54: Develop Vehicle Control Systems As CPSanderson/teach/comp790a/slides/2015-03...2015/03/25  · Cyber-Physical Systems • Cyber –computation, communication, and control that are

Performance Under Different Sync and Period

3/25/2015 University of North Carolina visit 54