Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Smart Transducer Networks
Embedded Systems EngineeringArmin Wasicek
Overview
Motivation & Design Principles TTP/A Fieldbus Protocol Implementation Requirements Smart Transducer Interface Standard Conclusion
TTP/A Smart Transducer Networks 2
Definition
A smart transducer is the integration of an analog or digital sensor or actuator element, a processing unit, and a communication interface.
TTP/A Smart Transducer Networks 3
MCU
NetworkInterfacePhysical
TransducerDigitalCommunicationSystem
Smart Transducer
Motivation
Sensor/Actuators become more complex (e.g. providing various modes of interfacing, operation...)
Requirement for fault-tolerant and distributed systems -> networked sensors and actuators
Embedded microcontrollers can handle complexity at a fair price
Cheap mass-production of flexible general purpose smart transducers
TTP/A Smart Transducer Networks 4
Design Principles for ST (1)Two-Level Design Approach
TTP/A Smart Transducer Networks 5
• Node level:
– Transducer developer handles sensor- and actuator-specific details
– Functionality of transducer is exported via well-specified interface
• System level:
– System integrator can handle node as black boxes and build on exported services
• Composability principle guarantees that services, which are established at node level are maintained at system level
Three Interfaces of a Node
TTP/A Smart Transducer Networks 6
SPLIF … Service Providing Linking Interface
SRLIF … Service Requesting Linking Interface
Design Principles for ST (2)Real-Time Service
Knowledge about the exact instant of an event Predictable timing with low jitter (control loops) Guaranteed timing behavior under load and fault
hypotheses
TTP/A Smart Transducer Networks 7
Design Principles for ST (3)Diagnosis & Management Support
Diagnosis access to ST internals Not necessarily real-time capable Monitoring support without a probe effect on real-time
service
TTP/A Smart Transducer Networks 8
Design Principles for ST (4)Configuration & Planning Support
Machine-readable description of ST properties Automated configuration saves time Required qualification of personal can be lower Fewer configuration faults, since monotone and error-
prone tasks are done by computer
TTP/A Smart Transducer Networks 9
Overview
Motivation & Design Principles TTP/A Fieldbus Protocol Implementation Requirements Smart Transducer Interface Standard Conclusion
TTP/A Smart Transducer Networks 10
TTP/A Protocol (1)
One active master per cluster Up to 250 slaves Communication organized in rounds TDMA bus allocation
TTP/A Smart Transducer Networks 11
For details see:
TTP/A Smart Transducer Programming –A Beginner’s Guide
Available at: (http://www.vmars.tuwien.ac.at/)
Publication & Research Reports
TTP/A Smart Transducers 12Time Division Multiple Access
TTP/A Protocol (2)
Interface File System (IFS) (1) Hierarchical distributed data structure Source and sink of each communication Unique addressing scheme:
Cluster (0..255)Node (0..255)
File (0..63)Record (0..255)
Byte (0..3) IFS maps all relevant properties (sensor and actuator
data, calibration parameters, configuration data, serial number, …)
TTP/A Smart Transducer Networks 13
Interface File System (IFS) (2)
Header Record
First record of each file contains status information (access permissions, file length, etc)
Special Files
Documentation file: physical name of node (similar to MAC address)
Configuration file: logical name of the node, current fireworks-byte, epoch-counter etc.
Round Descriptor List (RODL): holds information about actions performed by a node for a particular round
Round Sequence file (ROSE): specifies sequence of rounds, only implemented in the TTP/A master
TTP/A Smart Transducer Networks 14
Round Types Master-slave round: Master accesses a record by broadcasting its IFS address and a
tag indicating operation (read, write, …) Master-slave address (MSA) and master-slave data (MSD) part
Multipartner round: TDMA communication is predefined by RODL Up to 6 different modes (predefined schedules)
TTP/A Smart Transducer Networks 15
Round Description List (RODL)
For each slot in each round:
Operation (receive, send, receive and synchronize clock, execute)
Data source/sink (IFS address + message length)
Each node has its own RODL (part of a ‘big picture’)
RODL must be consistently defined over all nodes
RODL itself is accessible via IFS
TTP/A Smart Transducer Networks 16
Common Communication and Action Schedule
TTP/A Smart Transducer Networks 17
1 2 3 4
A Send Receive Receive ExecuteB Receive Send Receive SendC Receive Receive Send ReceiveD Receive Receive Execute Receive
slotnode
t
Realization of Three Interfaces (1) Real-Time Service (RS): Multipartner rounds
Configuration and Planning (CP) Interface Master-Slave rounds accessing RODL
Diagnostic and Maintenance (DM) Interface Master-Slave Rounds during operation
TTP/A Smart Transducer Networks 18
Realization of Three Interface (2)
RS Interface: IFS realizes Service Requesting Linking Interface (SRLIF) and Service Providing Linking Interface (SPLIF)
CP Interface: access via RODL
DM Interface: local data of individual TTP/A tasks (stored in service file)
SRLI
F SPLIF
CP DM
ServiceRT Input RT Output
Local Interfaces
TTP/A Smart Transducer Networks 19
TTP/A Example Three TTP/A nodes
Node 0 is the TTP/A master (synchronization of slaves via fireworks byte)
Node 3 executes in slot 0x03 a counter and broadcasts the actual value in slot 0x01
Node 2 receives the counter value in slot 0x01 and displays the new value in slot 0x03 (also by executing a TTP/A task)
Inter-round gap (end of round) in slot 0x07
In the following the code of node 3 is illustrated
The example is available on the Lab homepageTTP/A Smart Transducer Networks 20
TTP/A Example: IFS Layout
TTP/A Smart Transducer Networks 21
TTP/A specific include files
e.g. IFS access macros
name of the IFS file for the application
(suggested range 0x30 to 0x3d)
memory section for IFS storage (ifs_int_eep
… EEPROM)
(ifs_int_0 … zero initialized SRAM)
layout of the application file
IFS address
signed 8-bit int value for incr. value
unsigned 8-bit value for error code
declaration of TTP/A task
TTP/A Example: RODL Layout
TTP/A Smart Transducer Networks 22
TTP/A specific include files
e.g. IFS access macros
layout of the RODL (for node 3 only)
RODL filename (0x00 to 0x07); length of RODL; memory
section for storage (EEPROM)
operation: send
slot: 0x01
IFS addr: I/O file record 0x01, byte 0
length: 1 (len – 1 is stored)
operation: execute
slot: 0x03
IFS addr: specifies the task to execute
end of round: slot 0x07
TTP/A Example: Node Source-Code
TTP/A Smart Transducer Networks 23
application file with initialization
pointer to I/O file = I/O file
increment value = 1; error flag = 0
I/O file
parameters for file definition:
file number, variable name, TTPA/task, file length, memory section, and access mode
code for TTP/A task
code for initialization function
adding an initialization function:
task handle, function pointer to task, order, execution states
adding a background task is similar
Overview
Motivation & Design Principles TTP/A Fieldbus Protocol TTP/A Implementation / Case Study Smart Transducer Interface Standard Conclusion
TTP/A Smart Transducer Networks 24
Architectural Requirements
Standard UART (may be also a software UART)
About 2KB ROM for protocol code
About 32 byte RAM for protocol-specific variables (e.g., RODL memory)
Supports any serial bus
TTP/A Smart Transducer Networks 25
Case Study Hardware
TTP/A Smart Transducer Networks 26
Atmel AVR TTP/A nodes
PCMCIA Master/Gateway
Case Study Software
RODL design tool Written in Java => Platform-independent Connects to cluster via CORBA interface
Monitoring tool Displays contents of node’s IFS Refreshes data periodically Connects directly via RS232 Important for lab course
TTP/A Smart Transducer Networks 27
Overview
Motivation & Design Principles TTP/A Fieldbus Protocol TTP/A Implementation / Case Study Smart Transducer Interface Standard Conclusion
TTP/A Smart Transducer Networks 28
OMG Smart Transducer Standard
Specifies a CORBA interface for accessing the IFS contents of a TTP/A cluster remotely
Specifies IFS addressing scheme
Specifies real-time communication
CORBA can be used for configuration and monitoring
Access to real-time service interface possible, when a RT-CORBA is used
TTP/A Smart Transducer Networks 29
Example Architecture
TTP/A Smart Transducer Networks 30
Overview
Design Principles TTP/A Fieldbus Protocol Implementation Requirements Smart Transducer Interface Standard Conclusion
TTP/A Smart Transducer Networks 31
Conclusion Two-level design for ST applications
Node level: transducer details System level: integration to overall system
TTP/A: Master/Slave protocol supporting periodic real-time
traffic and sporadic diagnostic and management communication
Low-cost, highly-efficient (no addressing overhead)
Standardized CORBA interface supports remote tool access
TTP/A Smart Transducer Networks 32
Vielen Dank für Ihre Aufmerksamkeit!
Fragen?
TTP/A Smart Transducer Networks 33