Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi
Prokotol Komunikasi Kuliah#9 TSK-612 Sistem Embedded Terdistribusi - TA 2011/2012
Eko Didik Widianto Teknik Sistem Komputer - Universitas Diponegoro
Lisensi
Review Kuliah
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Lisensi
I
Sebelumnya telah dibahas tentang metodologi desain sistem embedded terdistribusi I I I I I I
Marketing & Engineering Specs Arsitektur Software Specs Desain Implementasi Pengujian
Tentang Kuliah #9 Protokol Komunikasi
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan
I
Jika ingin membuat sistem embedded terdistribusi I
I
Pokok Bahasan: I I
I
I
Sistem bus: jaringan embedded, multiplexing, bus Menempatkan bit ke jalur transmisi: antarmuka fisik, enkoding bit Klasifikasi protokol: operasi umum, trade-off (tidak ada protokol yang ’terbaik’), wired vs wireless
Link I
I
I
Maka diperlukan jaringan
Website: http://didik.blog.undip.ac.id/2012/03/06/ kuliah-tsk-612-sistem-embedded-terdistribusi-2011/ Email:
[email protected]
Acknowledgement: I
http://www.ece.cmu.edu/~ece649/[ECE649]
Teknik Transmisi Data Protokol Komunikasi Lisensi
Bahasan Topologi Jaringan Topologi Bus Topologi Star Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Lisensi
Topologi Jaringan
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Topologi Bus Topologi Star
Teknik Transmisi Data
I Topologi jaringan sistem
Lisensi
embedded I
Linear: bus I
I
I
satu jalur bus digunakan secara bersama multiplexing akses jalur
Star I
Protokol Komunikasi
satu node menjadi pusat
Bahasan Topologi Jaringan Topologi Bus Topologi Star
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Topologi Bus Topologi Star
Teknik Transmisi Data
Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Protokol Komunikasi Lisensi
Topologi Bus
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Topologi Bus Topologi Star
Teknik Transmisi Data Protokol Komunikasi
I Sistem jaringan bus I
Cocok untuk komunikasi berjarak jauh antar-subsistem I
Misalnya: elevator, jalur perakitan
I
Digunakan di sebagian besar sistem kontrol embedded
I
Beragam opsi protokol dapat diimplementasikan (fleksibel) Putusnya satu segmen kabel akan memisahkan bus Tidak cocok untuk jalur fiber optik karena masalah di splitting dan merging
I
I I
Sistem jaringan desktop sebelumnya menggunakan bus
I Contoh: I
serial comm, CAN (Controller Area Network), Inter-Integrated Circuit (I2C), Serial Peripheral Interface (SPI), Firewire (high speed serial bus IEEE 1394)
Lisensi
Bahasan Topologi Jaringan Topologi Bus Topologi Star
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Topologi Bus Topologi Star
Teknik Transmisi Data
Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Protokol Komunikasi Lisensi
Topologi Star
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan
I Sistem jaringan star
Topologi Bus Topologi Star
I
I
I
I
Dapat mengemulasikan fungsi bus Mudah untuk mendeteksi dan mengisolasi kegagalan Terputusnya jalur hanya berefek pada satu node Cocok untuk fiber optik
I Memerlukan lebih banyak pengkabelan I
Digunakan secara umum di sistem desktop
I Terputusnya hub (sebagai pusat jaringan) berakibat satu jaringan
terputus I Bisa digunakan untuk mengisolasi node yang membangkitkan terlalu
banyak trafik I Topologi star ini semakin populer I
jaringan kontrol yang safety-critical menggunakan dual redundant star (dua jaringan independen, tiap jaringan mempunyai topologi star)
Teknik Transmisi Data Protokol Komunikasi Lisensi
Bahasan Topologi Jaringan Topologi Bus Topologi Star
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction
Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Proteksi Terhadap Spike Enkoding (Channel) Message
Protokol Komunikasi Lisensi
Transmisi Data (Bit)
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike
I Rangkaian (digital) harus
memberikan sinyal HI dan LO di jalur bus
Enkoding (Channel) Message
Protokol Komunikasi Lisensi
I
I
Contoh: HI = ’1’ = 5 volt dan LO = ’0’ = 0 volt Titik referensi: GND
I Sistem embedded harus tahan
terhadap noise (noise immunity) I
I
Isolasi noise di node tunggal sebelum data ditransmisikan Hindari noise di jaringan
Bahasan Topologi Jaringan Topologi Bus Topologi Star
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction
Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Proteksi Terhadap Spike Enkoding (Channel) Message
Protokol Komunikasi Lisensi
Teknik untuk Mengurangi Noise Teknik Differential Driver
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction
I Mengirimkan nilai Data dan Data
Inversenya ke bus 2-jalur I
I
Contoh: Data: HI = ’1’ = 5 volt dan LO = ’0’ = 0 volt Inverse Data: HI = ’1’ = 0 volt dan LO = ’0’ = 5 volt Titik referensi: GND
I Receiver mengurangi 2 nilai data
data I
I
Menghilangkan tegangan bias common-mode Menyisakan selisih noise yang mempengaruhi jalur
Proteksi Terhadap Spike Enkoding (Channel) Message
Protokol Komunikasi Lisensi
RS-485 Multi-Master Bus
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan
I Digunakan di jaringan kontrol industrial (seperti Modbus, Profibus) I
I I
RS-422 differential drivers: high-speed + jangkauan jauh (10Mbps @12 meter) Ditambahkan terminator untuk mengurangi noise Harus hanya satu sistem yang outputnya diaktifkan dalam satu waktu (multiplexing access) I
Sering disebut “master/slave” - satu sistem memerintahkan sistem lain saat gilirannya tiba
Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message
Protokol Komunikasi Lisensi
Bahasan Topologi Jaringan Topologi Bus Topologi Star
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction
Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Proteksi Terhadap Spike Enkoding (Channel) Message
Protokol Komunikasi Lisensi
Isolator Optik untuk Proteksi Tegangan Spike I Tegangan spike dari noise yang besar dapat merusak node-node yang
terkoneksi I Diperlukan isolasi untuk mengatasi tegangan spike yang curam dan besar I Isolator optik menyediakan gap udara secara fisik I LED akan berpendar saat disediakan arus I Photo-transistor menghantar saat LED menyinarinya dengan IR I Dua set di tiap-tiap node I Satu set untuk transmit, dan satu set untuk terima I Menyediakan isolasi yang sangat baik I Tanpa ada koneksi fisik, hanya photon yang melintasi gap I LED akan saturasi, jika diberikan arus yang berlebih (over-drive) I Masih mempunyai noise I Jaringan harus mempunyai sumber daya sendiri I Menyediakan bit dominance I Namun, jika LED terpaku ke “on”, jaringan akan terganggu
Sumber: http://en.wikipedia.org/wiki/Opto-isolator
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message
Protokol Komunikasi Lisensi
Transformer Coupling dan Stuck Node I Stuck node merupakan masalah di sistem terdistribusi
Jika sebuah node terpaku dengan mentransmisikan ’low’ atau ’high’, seluruh jaringan akan mati
I
I Solusi: menggunakan current-mode transformer
coupling I
I
I
I
I
Komponen AC dari sisi bit akan menyeberang transformer Komponen DC dari node yang stuck diabaikan Induktansi transformer memproteksi tegangan spike Operasi current-mode akan meningkatkan noise rejection Umumnya digunakan di kontrol penerbangan
misalnya: MIL-STD-1553 (defines mechanical, electrical, and functional characteristics of a serial data bus), sistem avionics I Tapi mempunyai keterbatasan I
I I I
TIdak dapat melakukan bit dominance Deteksi collision sangat sulit Sinyal harus DC balanced (energi sinyal high dan low sama)
Bahasan Topologi Jaringan Topologi Bus Topologi Star
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction
Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Proteksi Terhadap Spike Enkoding (Channel) Message
Protokol Komunikasi Lisensi
Protokol Komunikasi
Jenis Enkoding Kanal I
RZ – Return to Zero encoding I
I
Topologi Jaringan
Encoding memastikan sinyal kembali ke “zero” sesering mungkin Memaksa transisi setiap satu atau dua bit dengan aturan enkoding sederhana I I
I
@2012,Eko Didik Widianto
Memudahkan mensinkronisasi bit stream di sisi penerima Memudahkan penggunaan coupling transformer
NRZ – Non-Return to Zero encoding I
Ditujukan untuk meningkatkan efisiensi hanya dengan mengirimkan nilai bit walaupun tanpa transisi I
Tapi kurangnya transisi menyulitkan untuk mensinkronisasi bit stream
Kode RZ
Kode NRZ
Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message
Protokol Komunikasi Lisensi
Manchester Coding I
Manchester Encoding I
I
Data dienkode dengan transisi dari high-to-low (transisi turun) atau low-to-high (transisi naik) Pasti terdapat transisi di tiap bit I
I
I
Bandwidth terbesar adalah 2 transisi perbit
Kalau terjadi error, dikoreksi dengan menginversikan pasangan bit fisik terbesar
Contoh: 11010001
Enkoding NRZ I Send a Zero as LO; send One as HI I
Kasus terburuk: message mempunyai semua ZERO atau semua ONE
I
Solusiya: membatasi panjang data menjadi 8 bit
I
I
I
I
I
Tidak ada transisi di data
SYNC dan END mempunyai nilai yang berlawanan, memastikan ada 2 sisi per message Teknik ini digunakan di port serial UART
Bandwidthnya satu transisi perbit
Contoh: 11010001
Bahasan Topologi Jaringan Topologi Bus Topologi Star
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction
Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Proteksi Terhadap Spike Enkoding (Channel) Message
Protokol Komunikasi Lisensi
Message
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction
I
Sync I
Designates start of a message and lets receiver sync to incoming bits
Proteksi Terhadap Spike Enkoding (Channel) Message
Protokol Komunikasi Lisensi
I
Header I
I
I
Data I
I
Application- or high-level-standard defined data fields (often only 1-8 bytes)
Error detection I
I
Global priority information (which message gets on bus first?) Routing information (source, destination)
Detects corrupted data (e.g., using a CRC)
End I
Designates end of message
Prioritas Message
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan
I
Local priority I
I
I
Each node transmits its highest priority message when it gets a turn on the bus Or, it can implement some form of round-robin message transmission, etc.
Global priority I
Which node gets the next turn on the bus? I I I
I
Could be a function of round-robin selection of nodes Could be a function of the node’s inherent priority Could be a function of the priority of the highest message on the node
Fundamental tension: latency vs fairness I
Reducing latency for high-priority nodes/messages vs Ensuring fairness/no starvation for low-priority nodes/messages
Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message
Protokol Komunikasi Lisensi
Protokol Komunikasi Embedded
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Message Coordination
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA)
I
Message coordination: I I I I I
Bus Master Appoarch Transmit and Hope (CSMA, Carrier Sense Multiple Access) Explicit token Implicit tokens Binary countdown (bit dominance)
Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Bahasan Topologi Jaringan Topologi Bus Topologi Star Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Coordination: Bus Master Approach I
Bus Master can poll for messages & wait for response I
Problem: missing/slow slave I I
I
Master uses worst-case timeout waiting for response If slave gets confused/is late, protocol fails
Problem: broken master
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
I
Master can send a time tick – TDMA I I
Other nodes select response time from that time tick Then becomes a form of time slice/time slot protocols
Protokol Komunikasi
Polling
@2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
I
Operation I I
I
I
Centrally assigned Master polls the other nodes (slaves) Non-master nodes transmit messages when they are polled Inter-slave communication through the master
Examples I
MIL-STD-1553B, 1773, Profibus, Bacnet, AN192
Lisensi
Polling Tradeoff
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data
I
Advantages
I
• Simple protocol to implement I I
I
historically very popular Bounded latency for real-time applications
Disadvantages I I I
Single point of failure from centralized master Polling consumes bandwidth Network size fixed during installation (not robust) I
I
Or, master must discover nodes during reconfiguration
Prioritization is local to each node I I
But, can use centralized load balancing Polling need not be in strict order; it could be, for example: 1, 2, 1, 3, 4, 1, 5, 1, 3, 1, 6, ...(repeats)
Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
TDMA - Time Division Multiplexed Access
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
I
Operation I I
I
Master node sends out a frame sync to synchronize clocks Each node transmits during its unique time slot
Examples I
Satellite Networks, static portion of FlexRay
TDMA Tradeoff
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan
I Advantages
Teknik Transmisi Data Protokol Komunikasi
I I I
Simple protocol to implement Deterministic response time No wasted time for Master polling messages
I Disadvantages I I I I I
Single point of failure from the bus master Wasted bandwidth when some nodes are idle Requires stable clocks Network size fixed during installation (not robust) Prioritization is local to each node I
can use centralized load balancing
I Variation: Variable Length TDMA I I I
Unused time slices are truncated to save time More efficient use of bandwidth Used in FlexRay Dynamic Segment (http://en.wikipedia.org/wiki/FlexRay)
Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Bahasan Topologi Jaringan Topologi Bus Topologi Star Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Coordination: Transmit and Hope (CSMA) Carrier Sense Multiple Access I
Send a message and hope it made it I I I
Useful for satellites & systems with no collision detection Vulnerable for entire time a message is transmitting No direct way to know if message was delivered successfully
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
I
IMPLICIT collision detection I I
Response might not make it even if message makes it Iterate until some node pair gets lucky twice in a row
Transmit And Collide (CSMA/CD) I
Transmit message I I I
If you get lucky network transitions to active But If you get unlucky, you get a collision event Vulnerability window is about 2 tpd I I
I
Two propagation delays along length of network The time during which the receiver hears nothing, but a frame from another transmitter is already in-flight
After collision, back off a certain time I I
Amount of time to back off should vary with network load Repeated collisions result in increasing backoff times
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Transmit And Collide (CSMA/CD) Carrier Sense Multiple Access / Collision Detection
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance)
I
Operation
Emulation Wireless Networks
I I
I
A node waits for an idle channel before transmitting Collisions can occur if two or more nodes transmit simultaneously If a collision is detected, the nodes stop transmitting I
I
Resolve contention using random backoff algorithm (2x longer interval each retry)
Examples I
Ethernet (IEEE 802.3 LAN), Bacnet, CAB, CEBus
Lisensi
CSMA/CD Tradeoffs
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data
I
Advantages I I I
I I
I
Small latency for low traffic load Network initialization/configuration is not required Node can enter or leave the network without any interruption Supports many nodes Probabilistic global prioritization is possible
Disadvantages I
I
I I
Designed for aperiodic traffic - not ideal for synchronized control loops Collision detection is an analog process which is not always practical Unbounded individual message latency Poor efficiency under heavy loads
Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Bahasan Topologi Jaringan Topologi Bus Topologi Star Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Coordination: Explicit Tokens I Token value says which node is transmitting and/or should transmit next I I
Token holder = OWNER; only the owner may transmit Master/slave polling is a special form where token is passed by master and returned to master by slave
I Problems: Lost token / Duplicated token(s) / Who starts?
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
I Token passed as node number or other similar value I I
I
May be tacked on to end of data-bearing message Can be either node# that has token or node# that gets token next Null messages with tokens must be passed to prevent network from going idle
Token Bus
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
I
Operation I
I
I
A token signal is passed from a node to node on a bus (virtual ring) Only the token holder has permission to access the media
Examples I
IEEE 802.4, Arcnet, AN192, MAP, Profibus
Token Bus Tradeoffs
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data
I
Advantages I I I
I
Bounded latency for real-time control applications High throughput during heavy traffic On-the-fly reconfiguration
Disadvantages I I I I I
I I
Token passing latencies under light traffic conditions Prioritization local to each node Lengthy reconfiguration process Token initialization, loss, and duplication recovery overhead Collisions may occur during initialization and reconfiguration Complex protocol (especially at MAC sublayer) Token bus was popular for a while, but is used less often now
Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Bahasan Topologi Jaringan Topologi Bus Topologi Star Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Coordination: Implicit Tokens I
Length of waiting period is used as a time-domain implicit “token” I
I
Owner of bus determined by what time it is instead of explicit token message
Time slices – waiting period is a whole message long I
TDMA
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
I
Time slots – waiting period is as short as possible ~ 2tpd I
CSMA/CA (collision avoidance)
CSMA/CA (Implicit Token)
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
I
Operation I I
IDLE: Active station transmits immediately After each message, reserve S slots for N nodes I
I
BUSY: Transmit during your assigned slot I I
I
Slots are normally idle – they are time intervals, not signals!
If S=N, no collisions - known as Reservation CSMA If S
Example I
Echelon LONTalk
Lisensi
CSMA/CA Tradeoffs
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data
I
Advantages I I I
Small latency for light traffic Good throughput under heavy traffic Global prioritization through fixed slots I
I
prioritized implicit token passes
Bounded latency through rotating slots
Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
I
I
non-prioritized implicit token passes
Disadvantages I
Restarting time slots from an idle bus can be difficult I
I I
Send dummy messages to avoid idle state
Collisions can occur Node complexity in mapping Sth slot to Nth node
Lisensi
Bahasan Topologi Jaringan Topologi Bus Topologi Star Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Binary Countdown (Bit Dominance)
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation
I
Operation I I
I
I
I
Each node is assigned a unique identification number All nodes wishing to transmit compete for the channel by transmitting a binary signal based on their identification value A node drops out the competition if it detects a dominant state while transmitting a passive state Thus, the node with the LOWEST identification value wins
Examples I
CAN, SAE J1850
Wireless Networks
Lisensi
Contoh Bit Dominance
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Binary Countdown Tradeoffs
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach
I
Advantages I I I
High throughput under light loads Local and global prioritization possible Arbitration is part of the message - low overhead
Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation
I
Disadvantages I I
I
Propagation delay limits bus length (2 tpd bit length) Unfair access - node with a high priority can "hog" the network Poor latency for low priority nodes
Wireless Networks
Lisensi
Before CAN
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
After CAN
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
CAN is Central of Automotive Networks
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Bahasan Topologi Jaringan Topologi Bus Topologi Star Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Protokol Komunikasi
Emulation
@2012,Eko Didik Widianto Topologi Jaringan
I
You can use one protocol to emulate another
I
Use Ethernet (CSMA/CD) to emulate: I
Master/slave polling I
I
Token bus – use explicit token messages I
I
application only transmits when it has the token
TDMA I
I
slaves only respond when polled
slaves measure time from message from master and transmit appropriately
But, there is cost I I
“Slot” time involves round-trip through OS “Slice” time must account for CPU/OS jitter, not just HW oscillator drift
Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Emulation Capability I
Protocols higher in picture can emulate protocols lower in picture I
Example: you can pass a token around on a CAN network in software
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Bahasan Topologi Jaringan Topologi Bus Topologi Star Teknik Transmisi Data Transmisi Data (Bit) Noise Reduction Proteksi Terhadap Spike Enkoding (Channel) Message Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks Lisensi
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Wireless Network I
Strength is installation flexibility I I I
I
Weakness is potential unreliability for critical operations I I
I
I I
I
I
No wiring harnesses to install (except for power) Can make/break networks without physical connections Can have overlapping/interacting/hierarchical networks (e.g., Bluetooth) Geometry may introduce standing waves/fading Conflicts with other wireless systems (EMC = ElectroMagnetic Compatibility) Interference from RF emitters (EMI = ElectroMagnetic Interference) Limited spectrum space Where does a wireless node get its power – who changes the batteries? In general, unsuitable for use in critical applications that aren’t fail-safe!
Also, cost I
I
I
Bluetooth is getting cheap enough to be in consumer electronics But has to be able to beat a piece of copper and a plastic connector And that cost has to include power supply strategy
Protokol Komunikasi @2012,Eko Didik Widianto Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Coordination: Bus Master Approach Coordination: Transmit and Hope (CSMA) Coordination: Explicit Tokens Coordination: Implicit Tokens Binary Countdown (Bit Dominance) Emulation Wireless Networks
Lisensi
Protokol Komunikasi
Lisensi
@2012,Eko Didik Widianto
Creative Common Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) I
Anda bebas: I
I
I
Di bawah persyaratan berikut: I
I
I
untuk Membagikan — untuk menyalin, mendistribusikan, dan menyebarkan karya, dan untuk Remix — untuk mengadaptasikan karya
Atribusi — Anda harus memberikan atribusi karya sesuai dengan cara-cara yang diminta oleh pembuat karya tersebut atau pihak yang mengeluarkan lisensi. Pembagian Serupa — Jika Anda mengubah, menambah, atau membuat karya lain menggunakan karya ini, Anda hanya boleh menyebarkan karya tersebut hanya dengan lisensi yang sama, serupa, atau kompatibel.
Lihat: Creative Commons Attribution-ShareAlike 3.0 Unported License
Topologi Jaringan Teknik Transmisi Data Protokol Komunikasi Lisensi