Download as pdf or txt
Download as pdf or txt
You are on page 1of 220

CHAPTER 3

IOT NETWORKS

Ph.D. Phu Tran Tín


phutrantin@iuh.edu.vn
CHAPTER 3. IOT NETWORKS
3.4 Môi trường truyền dẫn
3.1 Giới thiệu
3.5 Thiết bị liên kết mạng
3.2 Cơ sở kỹ thuật
3.6 Một số mạng tiêu biểu
3.3 Giao thức mạng
3.7 IoT networking challenges
3.1. Giới thiệu

What is communications/networks?
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 3
3.1. Giới thiệu

What is communications?
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 4
3.1. Giới thiệu

Today’s communications
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 5
3.1. Giới thiệu

What is industrial communications?


Coppyright (c) Industrial University of HoChiMinh City, IUH2014 6
3.1. Giới thiệu

What is industrial communications?


Coppyright (c) Industrial University of HoChiMinh City, IUH2014 7
3.1. Giới thiệu

Phân biệt truyền thông đa


phương tiện và truyền
thông công nghiệp?
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 8
Định nghĩa

Mạng truyền thông trong công nghiệp


là một khái niệm chung chỉ các mạng
truyền thông số, truyền bit nối tiếp,
được sử dụng để ghép nối các thiết bị
công nghiệp.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 9


Định nghĩa

The data comprises physical elements (light,


sound, images, electrical voltage, etc.) to
which a direction has been attributed
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 10
Vai trò mạng truyền thông

Thay kết nối điểm – điểm

Ghép nối thiết bị

Trao đổi thông tin

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 11


Ưu điểm

Point to point network


Schneider Electric OMRON Sensors

Đơn giản hóa


cấu trúc liên kết
giữa các thiết bị
công nghiệp
Multipoint networkSIEMENS
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 12
Ưu điểm

Point to point network

Thiết kế hệ thống
trở nên dễ dàng
hơn
Multipoint network
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 13
Ưu điểm

Giải quyết vấn đề nhiễu trong truyền thông

Ø Thông tin truyền đi khó sai lệch, thiết bị


nối mạng có khả năng tự phát hiện lỗi và
chẩn đoán lỗi.
Ø Việc bỏ qua nhiều
lần chuyển đổi qua lại
tương tự - số và số -
tương tự nâng cao độ
chính xác thông tin.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 14
Ưu điểm

Nâng cao độ linh hoạt, tăng tính năng mở


của hệ thống
Ø Một hệ thống mạng chuẩn hóa quốc tế tạo
điều kiện cho việc sử dụng các thiết bị của
nhiều hãng khác nhau.
Ø Việc thay thế các thiết bị, nâng cấp và mở
rộng chức năng hệ thống cũng dễ dàng hơn.
Ø Nhờ các giao diện chuẩn nên khả năng
tương tác giữa các thành phần bao gồm phần
cứng và phần mềm được nâng cao.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 15
Ưu điểm

Cấu hình, lập trình, chỉnh định hệ thống có thể thực


hiện từ xa qua trạm kỹ thuật trung tâm

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 16


3.2. Cơ Sở Kỹ Thuật
3.2.1 Một số khái niệm cơ bản
3.2.2 Chế độ truyền tải
3.2.3 Cấu trúc mạng – Topology
3.2.4 Truy nhập dữ liệu
3.2.5 Bảo toàn dữ liệu
3.2.6 Mã hóa dữ liệu

Coppyright (c) Industrial University of HoChiMinh City, IUH2018 17


3.2.1 Một số khái niệm cơ bản

Thông tin

What?

What?
Thông tin là một thước đo mức nhận thức,
sự hiểu biết về một vấn đề, một sự kiện
hoặc một hệ thống.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 18
3.2.1 Một số khái niệm cơ bản

Dữ liệu

Thông tin được mô tả hay được số lượng hóa


bởi dữ liệu để có thể lưu trữ và xử lý.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 19
3.2.1 Một số khái niệm cơ bản

Dữ liệu

Dữ liệu là phần thông tin hữu dụng được biểu


diễn bằng các bit nhị phân {0,1}
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 20
3.2.1 Một số khái niệm cơ bản

Lượng thông tin

Lượng thông tin là giá trị về sự hiểu biết một


nguồn thông tin mang lại
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 21
3.2.1 Một số khái niệm cơ bản

Lượng thông tin

Bao nhiêu byte?

Bao nhiêu byte?

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 22


3.2.1 Một số khái niệm cơ bản

Tín hiệu

Tín hiệu là diễn biến của một đại lượng vật lý


chứa đựng tham số thông tin/dữ liệu và có
thể truyền dẫn được.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 23
3.2.1 Một số khái niệm cơ bản

Tín hiệu

Trong kỹ thuật các loại


tín hiệu thường dùng là:
điện, hình ảnh, quang,
âm thanh…
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 24
3.2.1 Một số khái niệm cơ bản

Tín hiệu

Biên độ

Tham số
Tần số, nhịp xung, …
thông tin

Pha

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 25


3.2.1 Một số khái niệm cơ bản

Phân loại tín hiệu

Tương tự

Rời rac
Tín hiệu
Liên tục

Gián đoạn
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 26
3.2.1 Một số khái niệm cơ bản

Phân loại tín hiệu

Tương tự, liên tục Rời rạc, gián đoạn

Rời rạc, liên tục Tương tự, gián đoạn

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 27


3.2.1 Một số khái niệm cơ bản

Tính năng thời gian thực


Hệ thống có tính
năng thời gian thực
không nhất thiết
phải có phản ứng
thật nhanh, mà
quan trọng hơn là
có phản ứng kịp
thời đối với các
yêu cầu tác động
bên ngoài.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 28


3.2.1 Một số khái niệm cơ bản

Tính năng thời gian thực

Nhanh nhạy

Tin cậy

Tiền định

Bền vững

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 29


3.2.2 Chế độ truyền tải

• Định nghĩa
• Truyền tải đơn công, song công, bán
song công
• Truyền tải song song, nối tiếp
• Truyền tải đồng bộ, bất đồng bộ

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 30


Định nghĩa

Các thiết bị truyền nhận dữ liệu như thế nào?


Coppyright (c) Industrial University of HoChiMinh City, IUH2014 31
Định nghĩa

Chế độ truyền tải là phương thức các


bit dữ liệu được chuyển giữa các đối
tác truyền thông.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 32


Truyền tải đơn công, song công…

Truyền tải đơn công

Truyền tải bán song công

Truyền tải song công

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 33


Truyền tải nối tiếp, song song

Truyền tải nối tiếp

üThường có 3 dây dẫn: truyền, nhận và mass


üTừng bit được chuyển đi một cách tuần tự

Truyền tải song song

üNhiều bit được truyền


đi đồng thời.
üKhoảng cách ngắn
üĐồng bộ hóa dữ liệu
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 34
Truyền tải đồng bộ, bất đồng bộ

qTruyền tải nối tiếp đồng bộ (Synchronous serial transmission)

Các đối tác truyền thông làm việc theo cùng một
nhịp tức là cùng tần số, độ lệch pha không đổi

qTruyền tải nối tiếp bất đồng bộ (Asynchronous)

Bên gửi và bên nhận không làm việc theo một


nhịp chung
Cần thêm hai bit đánh dấu khởi đầu hay kết thúc

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 35


Chế độ truyền tải

For reasons of cost and durability,


most communication networks use half
duplex asynchronous serial digital
transmission.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 36


3.2.3 Cấu trúc mạng - Topology

• Định nghĩa

• Phân loại

• Một số cấu trúc mạng thường gặp

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 37


Định nghĩa

Topology - cấu trúc hình học không gian của mạng


thực chất là cách bố trí vị trí vật lý các trạm và cách
thức kết nối chúng lại với nhau

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 38


Phân loại

Các đường truyền riêng biệt được thiết lập


để nối các cặp trạm với nhau.

Point to Point Topology

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 39


Phân loại

Trạm chủ phát


thông tin đến Point to MultiPoint Topology
nhiều trạm tớ
cùng lúc, ngược
lại trạm tớ gởi
thông tin đến
trạm chủ theo
kiểm điểm-điểm
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 40
Phân loại

Tất cả các trạm phân chia chung một đường


truyền vật lý

MultiPoint Topology
Có thể trao đổi
thông tin qua lại
giữa các trạm một
cách tự do (không
có trạm chủ)
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 41
Một số cấu trúc mạng thường gặp

Các trạm đều nối vào đường


truyền chính
Truyền tin hai chiều theo
từng gói thông tin mang địa
Bus Topology chỉ đích
Nếu lưu lượng truyền tăng cao thì dễ gây ách tắc
và nếu có lỗi thì khó phát hiện ra

Một số ví dụ mạng công nghiệp tiêu biểu có cấu


trúc bus là: Profibus, CAN, WordFIP, Foundation
Fieldbus, AS-I, Ethernet.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 42
Một số cấu trúc mạng thường gặp

Các trạm liên kết với nhau


thành vòng tròn theo phương
thức điểm-điểm

Truyền tin một chiều theo


từng gói thông tin mang địa
Ring Topology chỉ đích

Một trạm bị hư sẽ ảnh hưởng toàn hệ thống mạng

Một số ví dụ mạng công nghiệp tiêu biểu có cấu


trúc bus là: Interbus, Token-Ring (IBM)
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 43
Một số cấu trúc mạng thường gặp

Tất cả các trạm được liên


kết với thiết bị trung tâm
Trạm trung tâm là trung gian
chuyển tin tới các trạm đích
Star Topology

Thiết bị trung tâm có thể là: Bộ chuyển mạch


(Switch), bộ chọn đường dẫn (Router) hoặc bộ
phân kênh (Hub)

Mạng ethernet công nghiệp sử dụng phổ biến


cấu trúc mạng hình sao (star)
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 44
Một số cấu trúc mạng thường gặp

Cấu trúc mạng hình cây là


sự liên kết của nhiều cấu
trúc mạng bus, star, ring.

Đặc trưng của cấu trúc


mạng hình cây là sự phân
cấp đường dẫn

Một số hệ thống cho phép


xây dựng cấu trúc mạng
hình cây như LonWorks,
Tree Topology DeviceNet , AS-i.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 45
Một số cấu trúc mạng thường gặp

Mesh network theo chuẩn


802.16 là những liên kết vô
tuyến kiểu mạng lưới với nhiều
các điểm truy nhập (APs:
access points) trong những khu
vực địa lý rộng lớn.

Mesh network có khả năng tự


tìm đường đi mới ở những nơi
bị che chắn, nhờ vậy mạng vẫn
được duy trì khi có node bị lỗi
hoặc chất lượng kết nối kém.
Mesh Topology
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 46
3.2.4 Truy nhập dữ liệu

• Định nghĩa

• Phân loại
– Master/Slave

– Token Ring

– CSMA-CD

– CSMA-CA

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 47


Định nghĩa

Việc truy nhập bus liên quan đến các yếu tố sau:
q Độ tin cậy khi truyền thông tin.
q Tính năng thời gian thực.
q Hiệu suất sử dụng đường truyền.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 48
Phân loại

Master -
Slave
Truy nhập
tiền định
Token
Truy nhập Passing
bus
CSMA/CD
Truy nhập
ngẫu nhiên
CSMA/CA

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 49


Master/Slave

Trạm chủ được quyền phân chia thời gian truy


cập bus cho các trạm tớ.
Trạm tớ được phép truy nhập bus khi có yêu cầu
của trạm chủ.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 50


Master/Slave

Ưu điểm: Cấu trúc mạng đơn giản.


Nhược điểm:
üHiệu suất đường truyền thấp.
üHoạt động mạng phụ thuộc vào trạm chủ.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 51


Token Passing

Token là bức điện ngắn không mang dữ liệu, có


cấu trúc đặc biệt để phân biệt với các bức điện
mang thông tin nguồn, được dùng tương tự như
chìa khóa

Một trạm được quyền truy nhập bus và gửi thông


tin trong thời gian trạm này giữ token. Sau khi
không có nhu cầu truy nhập bus, trạm đang giữ
token sẽ phải gửi token đến các trạm khác theo
một trình tự nhất định.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 52


Token Passing

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 53


CSMA/CD – CSMA/CA

CSMA/CD = Carrier Sense Multiple Access with Collision Detection


1. Collision detection
2. Stop of the emitted frame
3. Scrambling frame emission
4. Wait a random time
5. Frame re-emission TCP/IP and OSI model

CSMA/CA = Carrier Sense Multiple Access with Collision Avoidance


1. Non destructive collision detection
2. The device with the lower priority stops its transmission
3. End of the high priority frame transmission
4. The device with lower priority can send its frame

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 54


3.2.5 Bảo toàn dữ liệu

• Định nghĩa

• Các phương pháp bảo toàn dữ liệu


– Parity bit 1 chiều và 2 chiều.

– Nhồi bit (Bit stuffing).

– CRC (Cyclic Redundancy Check).

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 55


3.2.5 Bảo toàn dữ liệu

Định nghĩa

Bảo toàn dữ liệu là phương pháp sử dụng xử lý giao


thức để phát hiện và khắc phục lỗi, trong đó quan
trọng nhất là phát hiện lỗi.
Cơ sở đánh giá phương pháp bảo toàn dữ liệu:
ü Tỉ lệ bit lỗi
ü Tỉ lệ lỗi còn lại
ü Thời gian trung bình giữa hai lần lỗi
ü Khoảng cách Hamming (HD)
ü Hiệu suất truyền dữ liệu
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 56
3.2.5 Bảo toàn dữ liệu

Tỉ lệ bit lỗi

§ Thước đo đặc trưng cho độ nhiễu của


kênh truyền dẫn, ký hiệu là p.

§ Tỉ lệ giữa số bit lỗi trên tổng số bit được


truyền đi hay nói cách khác là xác suất một
bit truyền đi bị lỗi.

§ Trong kỹ thuật p = 10-4 là có thể chấp


nhận được.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 57
3.2.5 Bảo toàn dữ liệu

Tỉ lệ lỗi còn lại

§ Thông số đặc trưng cho độ tin cậy dữ liệu


của một hệ thống truyền thông sau khi đã
thực hiện các biện pháp bảo toàn.

§ Tỉ lệ giữa số bức điện còn bị lỗi không phát


hiện được trên tổng số bức điện đã được
truyền.

§ Một bức điện càng dài thì lỗi càng lớn.


Coppyright (c) Industrial University of HoChiMinh City, IUH2014 58
3.2.5 Bảo toàn dữ liệu

Thời gian trung bình giữa hai lần lỗi

§ Ký hiệu TMTBF : Mean time between failures.

§ TMTBF = n/(v*R):
ü n: chiều dài bức điện tính bằng bit.
ü v: tốc độ truyền tính bằng bit/s.
ü R:

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 59


3.2.5 Bảo toàn dữ liệu

Khoảng cách Hamming

§ Thông số đặc trưng cho độ bền vững của mã dữ


liệu.

§ HD là số lượng bit lỗi tối thiểu mà không đảm


bảo chắc chắn phát hiện được trong một bức
điện.

§ Nếu trong một bức điện chỉ có thể phát hiện một
cách chắc chắn k bit bị lỗi thì HD = ?

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 60


3.2.5 Bảo toàn dữ liệu

Hiệu suất truyền dữ liệu

§ Thông số đặc trưng cho việc sử dụng hiệu quả


các bức điện phục vụ chức năng bảo toàn dữ liệu

§ Công thức tính: E = (m(1-p)n )/n


ü m: số lượng bit dữ liệu trong mỗi bức điện.
ü n: chiều dài bức điện
ü p: tỉ lệ bit lỗi

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 61


3.2.5 Bảo toàn dữ liệu

Parity bit

Parity bit (bít chẵn lẻ) p là tổng số bit 1 trong là


chẵn hay lẽ để mà ta thêm vào một bit thông tin phụ
trợ p = 0 hoặc p = 1

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 62


3.2.5 Bảo toàn dữ liệu

Bit stuffing
Phương pháp nhồi bit được thực hiện theo nguyên
tắc sau:
ü Bên gửi : Dữ liệu có n bit 1 cạnh nhau thì thêm
một bit 0 vào sau đó.
ü Bên nhận : phát hiện n bits 1 liền nhau mà bit
tiếp theo là 0 thì được tách ra.
Bit
Ví dụ: Thông tin nguồn 0111110 stuffing

o Thông tin gởi đi 01111100


o Thông tin nhận được 0111110
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 63
3.2.5 Bảo toàn dữ liệu

Mã CRC

CRC là phương pháp mã đa thức hay mã


vòng. Phương pháp này được sử dụng trong
hầu hết các hệ thống truyền thông.

§ Dạng đa thức: G = x6 + 0x5 + x4 + x3 + 0x2 + x1 + 0x0

§ Dạng nhị phân: G = {1011010}

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 64


3.2.5 Bảo toàn dữ liệu

Mã CRC

§ Thông tin nguồn : I = 110101


§ Đa thức qui ước : G= 1011
§ Thêm 3 bit 0 vào thông tin nguồn I, P =
110101000
§ Chia đa thức P cho G theo kiểu nhị phân, trừ
không có nhớ, ta được phần dư R=0111
§ Dãy bit chuyển đi : D = P + R = 110101111
§ Dãy bit nhận được D’ phải chia hết cho G
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 65
3.2.6 Mã hóa bit

• Định nghĩa
• Các phương pháp mã hóa bit
– NRZ (Non Return to Zero)
– RZ ( Return To Zero).
– Mã Manchester.
– AFP (Alternate Flanks Pulse).
– FSK (Frequency Shift Keying).

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 66


3.2.6 Mã hóa bit

Định nghĩa

Mã hóa bit: là quá trình chuyển đổi dữ liệu


{0,1} sang một tín hiệu thích hợp để có thể
truyền dẫn trong môi trường vật lý.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 67


3.2.6 Mã hóa bit

NRZ

0 1 1 0 1 0 1 0 1

1 ứng với mức tín hiệu cao, 0 ứng với mức


tín hiệu thấp trong suốt chu kì T
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 68
3.2.6 Mã hóa bit

RZ

0 1 1 0 1 0 0 1

1 ứng với mức tín hiệu cao trong nửa chu


kì T, 0 ứng với mức tín hiệu thấp trong cả
chu kì T.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 69
3.2.6 Mã hóa bit

Manchester II

0 1 1 0 1 0 0 1

1 ứng với sườn xuống của xung, 0 ứng với


sườn lên của xung ở giữa chu kì T

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 70


3.2.6 Mã hóa bit

AFP

Thay đổi giữa 0 và 1 được đánh dấu bằng


một xung xoay chiều
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 71
3.2.6 Mã hóa bit

FSK

0 1 1 0 1 0 0 1

Trạng thái logic 0 và 1 ứng với các tần số


khác nhau
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 72
3.3 Giao thức mạng - Protocol

• Giao thức mạng/ Protocol là gì?

• Mô hình lớp

• Mô hình OSI

• Mô hình TCP/IP

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 73


Giao thức

Giao thức mạng là tập hợp các quy tắc và quy


ước điều khiển việc trao đổi thông tin (truyền
thông) giữa các trạm – node mạng

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 74


Giao thức

Các dạng liên kết


Connectionless & Connection- Oriented protocols: Giao
thức hướng kết nối và giao thức không kết nối

Routable & non-Routable protocols: Giao thức có khả


năng định tuyến và giao thức không có khả năng định tuyến

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 75


Giao thức

Đặc điểm của giao thức không kết nối


ü Không kiểm soát đường truyền
ü Dữ liệu không bảo đảm đến được nơi nhận
ü Dữ liệu thường dưới dạng datagrams

Đặc điểm của giao thức hướng kết nối


ü Kiểm soát được đường truyền
ü Dữ liệu truyền đi tuần tự, nếu nhận thành công thì
nơi nhận phải gởi tín hiệu ACK (ACKnowledge)

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 76


Giao thức

Giao thức có khả năng định tuyến


Là các giao thức cho phép đi qua các thiết bị liên
mạng như Router để xây dựng các mạng lớn có qui
mô lớn hơn

Giao thức không có khả năng định tuyến


Ngược với giao thức có khả năng định tuyến, các giao
thức này không cho phép đi qua các thiết bị liên mạng
như Router để xây dựng các mạng lớn.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 77


Giao thức

Một qui chuẩn giao thức bao gồm:


üCú pháp: định dạng dữ liệu, phương thức mã hóa và
các mức tín hiệu.
üNgữ nghĩa: Thông tin điều khiển, điều khiển lưu lượng
và xử lý lỗi.
üĐịnh thời: Quy định về trình tự, thủ tục giao tiếp, chế
độ truyền, tốc độ truyền thông…

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 78


Giao thức

Chức năng giao thức:


ü Định nghĩa cấu trúc khung một cách chính xác cho
từng byte, các ký tự và bản tin.

ü Phát hiện và xử lý các lỗi.

ü Quản lý thứ tự các lệnh để đếm các bức điện, nhận


dạng, tránh mất hoặc thu thừa bản tin.

ü Đảm bảo không nhầm lẫn giữa bức điện và lệnh.

ü Giải quyết các vấn đề xung đột thâm nhập, gửi khi
chưa có số liệu, mất liên lạc, khởi động.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 79


Mô hình lớp

Dựa vào mô hình lớp, các bạn hãy thảo luận về


quá trình hai người bạn muốn gửi thư cho nhau
phải qua các công đoạn (lớp) nào?

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 80


Mô hình lớp

Tasks involved in sending a letter


Coppyright (c) Industrial University of HoChiMinh City, IUH2014 81
Mô hình lớp

Trong mô hình lớp, các phần việc được sắp xếp


theo chiều dọc thành từng lớp, tương ứng với các
lớp dịch vụ và các lớp giao thức khác nhau.

Để thực hiện dịch vụ


truyền thông, mỗi bức
điện được xử lý qua
nhiều lớp trên cơ sở
giao thức quy định, gọi
là xử lý giao thức theo
mô hình lớp

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 82


Mô hình lớp

Nguyên tắc truyền dữ liệu:


• Dữ liệu không được truyền trực tiếp từ tầng thứ i của hệ
thống phát sang tầng thứ i của hệ thống nhận (trừ tầng thấp
nhất- tầng vật lý).

• Dữ liệu được chuyển từ tầng cao xuống tầng thấp nhất bên
hệ thống phát và qua đường truyền vật lý.

• Gói tin khi chuyển xuống qua các tầng sẽ được bổ sung
thêm vào phần đầu bằng thông tin điều khiển của tầng.
• Quá trình bên nhận sẽ diễn ra theo chiều ngược lại, khi đi
qua các tầng, gói tin sẽ tách thông tin điều khiển thuộc nó
trước khi chuyển dữ liệu lên tầng trên.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 83


Mô hình lớp

Kết luận:
• Giao tiếp theo chiều ngang: phản ánh sự hoạt động của các
đồng tầng. Các đồng tầng trước khi trao đổi thông tin với
nhau phải bắt tay, hội thoại và thỏa thuận với nhau bằng các
tham số của các giao thức, được gọi là giao thức tầng.

• Giao tiếp theo chiều dọc: là quan hệ giữa các tầng kề nhau
trong cùng một hệ thống. Giữa chúng tồn tại giao diện xác
định các thao tác nguyên thủy và các dịch vụ tầng dưới cung
cấp cho tầng trên, được gọi là giao diện tầng.
• Việc thêm Header vào đầu các gói tin khi đi qua mỗi tầng
trong quá trình truyền dữ liệu được gọi là quá trình
Encapsulation.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 84


Mô hình OSI

Mô hình OSI: Open Systems Interconnection


Reference Model – hoặc là OSI Model hoặc
OSI Reference Model.

Thiết kế dựa vào mô hình lớp, lý giải kỹ thuật


kết nối truyền thông giữa các máy vi tính và
thiết kế giao thức mạng giữa chúng.

Mô hình OSI được phát triển thành một phần


trong kế hoạch Kết nối các hệ thống mở do
ISO và IUT-T khởi xướng

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 85


Mô hình OSI

Note

ISO is the organization.


OSI is the model.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 86


Mô hình OSI

Lớp ứng dụng


Lớp trình diễn
Lớp phiên
Lớp giao vận
Lớp mạng
Lớp liên kết dữ liệu
Lớp vật lý

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 87


Mô hình OSI

Sự tương tác giữa các lớp trong mô hình OSI


Coppyright (c) Industrial University of HoChiMinh City, IUH2014 88
Mô hình OSI

Nguyên tắc truyền dữ liệu trong mô hình OSI


Coppyright (c) Industrial University of HoChiMinh City, IUH2014 89
Mô hình OSI
Lớp vật lý

Nhiệm vụ chính là đảm nhiệm toàn bộ công việc


truyền dẫn dữ liệu bằng phương tiện vật lý

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 90


Mô hình OSI
Lớp vật lý

Lớp vật lý chỉ đề cập đến giao diện vật lý chứ hoàn
toàn không đề cập đến môi trường truyền thông.
ü Các chi tiết về cấu trúc mạng
ü Kỹ thuật truyền dẫn
ü Phương pháp mã hóa bit
ü Chế độ truyền tải
ü Tốc độ truyền tải
ü Thiết lập hoặc ngắt kết nối điện
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 91
Mô hình OSI

Lớp liên kết dữ liệu

lớp liên kết dữ liệu thực hiện chức năng kiểm soát
lưu thông và đồng bộ hóa việc chuyển giao các
khung dữ liệu.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 92
Mô hình OSI

Lớp liên kết dữ liệu

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 93


Mô hình OSI
Lớp mạng

Cung cấp một kết nối và khả năng chọn đường


giữa các host trong môi trường liên mạng

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 94


Mô hình OSI
Lớp mạng

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 95


Mô hình OSI
Lớp giao vận

Cung cấp các dịch vụ cho việc thực hiện vận chuyển
dữ liệu giữa các chương trình ứng dụng một cách tin
cậy bao gồm cả khắc phục lỗi và điều khiển lưu thông.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 96


Mô hình OSI
Lớp giao vận

Reliable process-to-process delivery of a message

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 97


Mô hình OSI
Lớp giao vận

Để thực hiện việc vận chuyển hiệu quả, tin cậy thì
một dữ liệu cần chuyển đi được chia thành nhiều
đơn vị vận chuyển

Các nhiệm vụ của lớp vận chuyển:


ü Định vị các đối tác truyền thông.
ü Xử lý lỗi và kiểm soát thông tin.
ü Dồn kênh các nguồn dữ liệu.
ü Đồng bộ hóa giữa các trạm đối tác.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 98
Mô hình OSI
Lớp phiên

ü Thiết lập, quản lý, giải phóng kiểm soát thông tin giữa hai host.
ü Đồng bộ hoá việc hội thoại của quá trình trình diễn và quản lý
việc trao đổi thông tin.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 99
Mô hình OSI

Lớp trình diễn

Cung cấp khả năng mã hoá thông tin của lớp ứng
dụng để sao cho thông tin này hoàn toàn có thể
đọc được tại đầu còn lại.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 100
Mô hình OSI

Lớp ứng dụng

Cung cấp ứng dụng trực tiếp cho người sử dụng các dịch vụ mạng.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 101
Mô hình OSI

Kết luận

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 102


TCP/IP

TCP/IP – Tranmissmion Control Protocol / Internet


Protocol là kết quả nghiên cứu và phát triển giao
thức trong mạng chuyển mạch gói thử nghiệm
mang tên Arpanet.

TCP/IP dùng để chỉ cho cả một tập giao thức và


dịch vụ truyền thông được công nhận thành chuẩn
cho Internet.

Nếu tách riêng TCP và IP thì đó là những chuẩn


riêng về giao thức truyền thông.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 103
TCP/IP
OSI model TCP/IP model

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 104


Kiến trúc giao thức TCP/IP

TCP/IP and OSI model Relationship of layers and addresses in TCP/IP


Coppyright (c) Industrial University of HoChiMinh City, IUH2014 105
Kiến trúc giao thức TCP/IP

Network Access & Physical**Layer**

This TCP/IP Layer subsumes both OSI layers 1 and 2. The


physical (PHY) layer (Layer 1 of OSI) is concerned with how
each device is physically connected to the network with
hardware, for example with an optic cable, wires, or radio in
the case of wireless network like wifi (IEEE 802.11 a/b/g/n).

At the link layer (Layer 2 of OSI), devices are identified by a


MAC address, and protocols at this level are concerned with
physical addressing, such as how switches deliver frames to
devices on the network.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 106


Kiến trúc giao thức TCP/IP

Internet Layer

This layer maps to the OSI Layer 3 (network layer), which


relates to logical addressing. Protocols at this layer define
how routers deliver packets of data between source and
destination hosts identified by IP addresses. IPv6 is
commonly adopted for IoT device addressing.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 107


Kiến trúc giao thức TCP/IP

Transport Layer

The transport layer (Layer 4 in OSI) is focused on end-


to-end communication and provides features including
reliability, congestion avoidance, and guaranteeing that
packets will be delivered in the same order that they
were sent. UDP (User Datagram protocol) is often
adopted for IoT transport for performance reasons.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 108


Kiến trúc giao thức TCP/IP

Application Layer

The application layer (Layers 5, 6, and 7 in OSI)


covers application-level messaging.

HTTP/S is an example of an application layer


protocol that is widely adopted across the
internet.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 109


TCP/IP Some Protocol

Layer Protocol

DNS,TFTP,TLS/SSL, FTP, Gopher, HTTP, IMAP, IRC, NNTP, POP3, SIP, SMTP,
SMPP, SNMP, SSH,Telnet, Echo, RTP, PNRP, rlogin, ENRP
Application
Routing protocols like BGP and RIP which run over TCP/UDP, may also be
considered part of the Internet Layer.

Transport TCP, UDP, DCCP, SCTP, IL, RUDP, RSVP


IP (IPv4, IPv6), ICMP, IGMP, and ICMPv6

Internet OSPF for IPv4 was initially considered IP layer protocol since it runs per IP-
subnet, but has been placed on the Link since RFC 2740.

Link ARP, RARP, OSPF (IPv4/IPv6), IS-IS, NDP


110
Các kiến trúc mạng khác

• System network Architecture (SNA) được


công ty IBM thết kế, kiến trúc mạng xử lý
dữ liệu phân tán; kiến trúc 6 – layers
• Internetwork/sequenced packet exchange
(IPX/SPX): do công ty Nowell thiết kế sử
dụng riêng
• Digital network architecture (DNA)
• IEEE 802: là chuẩn kiến trúc các mạng
LAN, WAN …
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 111
3.4 Môi trường truyền dẫn

Vai trò

Phương tiện truyền dẫn hay môi trường truyền


dẫn ảnh hưởng lớn tới:

§ Chất lượng tín hiệu

§ Tốc độ bền vững của tín hiệu với nhiễu bên ngoài

§ Tính tương thích điện từ của hệ thống truyền


thông.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 112


3.4 Môi trường truyền dẫn

Vai trò

Chất lượng phương tiện truyền dẫn phụ thuộc


vào các yếu tố:

§ Băng thông kênh truyền.

§ Khả năng kháng nhiễu.

§ Khoảng cách truyền tối đa phụ thuộc vào độ suy


giảm của tín hiệu trên đường truyền.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 113


3.4 Môi trường truyền dẫn

Phương tiện truyền dẫn thường được sử dụng


trong kỹ thuật truyền thông:
§ Cáp điện: Cáp đồng trục, đôi dây xoắn, cáp trơn
§ Cáp quang: Cáp sợi thủy tinh (đơn chế độ, đa
chế độ), sợi chất dẻo
§ Vô tuyến: Sóng truyền thanh (radio AM, FM),
sóng truyền hình, tia hồng ngoại,…

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 114


Cáp xoắn đôi

Năm 1881, Alexander Graham Bell là người đầu tiên đưa cáp
xoắn đôi vào sử dụng trong dịch vụ điện thoại.Và đến năm
1900, loại cáp này đã được sử dụng phổ biến,rộng rãi trên
toàn nước Mĩ. Ngày nay hàng triệu Km cáp xoắn đôi đang
được sử dụng bên ngoài bởi các công ty điện thoại ,phục vụ
cho truyền tải âm thanh. Và phần lớn các mạng thông tin,
Internet cũng sử dụng loại cáp này.

Cáp xoắn đôi (Twisted pair) là loại


cáp gồm nhiều cặp dây đồng xoắn
lại với nhau nhằm chống phát xạ
nhiễu điện từ (EMI) từ bên ngoài, từ
sự phát xạ của loại cáp UTP và sự
xuyên âm (Crosstalk) giữa những
cặp cáp liền kề.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 115
Cáp xoắn đôi

Ý nghĩa sự xoắn đôi dây đồng?


Cáp xoắn có thể làm giảm nhiễu
vì hai dây chỉ truyền một đường
dữ liệu, biễu diễn bằng hiệu điện
thế giữa hai dây này. Khi nhiễu
đánh vào, hai dây xoắn vào
nhau nên sẽ xem như bị nhiễu
giống nhau, cùng tăng hoặc
cùng giảm một điện áp nhất
định. Hiệu điện thế giữa hai dây
vẫn giữ nguyên nên dữ liệu
truyền vẫn đúng.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 116
Cáp xoắn đôi

UTP (Unshielded Twisted Pair ) cable


UTP - cáp không có vỏ bọc chống
nhiễu. Bù lại nó có tính linh hoạt và độ
bền cao. Gồm nhiều cặp xoắn như
cáp STP nhưng không có lớp vỏ đồng
chống nhiễu. Cáp xoắn đôi trần sử
dụng chuẩn 10BaseT hoặc 100BaseT.
Do giá thành rẻ nên đã nhanh chóng
trở thành loại cáp mạng cục bộ được
ưu chuộng nhất.
Độ dài tối đa của một đoạn cáp 100
mét. Không có vỏ bọc chống nhiễu
nên dễ bị nhiễu khi đặt gần các thiết bị
và cáp khác do đó thường dùng để đi
dây trong nhà.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 117
Cáp xoắn đôi

STP (Shielded Twisted Pair ) cable

Gồm nhiều cặp xoắn được phủ


bên ngoài một lớp vỏ làm bằng
dây đồng bện.
Lớp vỏ này có tác dụng chống
EMI từ ngoài và chống phát xạ
nhiễu bên trong.
Lớp vỏ bọc chống nhiễu này
được nối đất để thoát nhiễu.
Cáp xoắn đôi có bọc ít bị tác
động bởi nhiễu điện và có tốc
độ truyền qua khoảng cách xa
cao hơn cáp xoắn đôi trần.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 118


Cáp xoắn đôi

Sử dụng tốc độ bit tới 1 Mbps cho khoảng cách từ


vài m đến 15Km

Hạn chế chính của cáp xoắn đôi gây ra bởi hiệu
ứng bề mặt. Khi tốc độ bit của tín hiệu truyền dẫn
tăng lên thì luồng chảy của dòng điện trong dây chỉ
ở trên bề mặt, do vậy sử dụng ít hơn tiết diện sẵn
có, dẫn đến sự tăng điện trở của dây đối với tín
hiệu cao tần, làm tăng suy hao. Ngoài ra, ở tần số
cao, năng suất tín hiệu bị mất mát nhiều hơn do
hiệu ứng bức xạ.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 119
Cáp đồng trục

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 120


Cáp đồng trục

Cáp đồng trục được sử dụng rộng rãi, chế độ hoạt


động có thể sử dụng dải cơ sở (BaseBand) hoặc
dải rộng (BroadBand).
üBaseBand toàn bộ hiệu suất đường truyền được
dành cho một kênh truyền thông duy nhất
üBroadBand thì sử dụng cho 2 hoặc nhiều kênh
cùng phân chia dải thông của đường truyền.

BaseBand BroadBand
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 121
Cáp đồng trục

Ø Khoảng cách truyền ở giải cơ sở (BaseBand) từ


1Km đến 3Km, tốc độ từ 1Mb/s đến 10Kb/s

Ø Với giải rộng khoảng cách từ 10Km đến 50Km,


tốc độ có thể lên đến 350Mb/s

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 122


Cáp quang

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 123


Cáp quang

Đây là môi trường truyền dẫn được sử dụng rộng rãi trong
công nghiệp bởi các ưu điểm sau:
ü Dung lượng truyền lớn
ü Tính bảo mật tín hiệu khi truyền cao
ü Trọng lượng nhẹ.
ü Khả năng chống nhiễu tốt
ü Tốc độ truyền cao (có thể lên đến hàng trăm Mb/s)
ü Không bị ăn mòn trong các môi trường oxi hoá

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 124


Vô tuyến
Mạng dịch vụ tích hợp kỹ
thuật số (ISDN)

Mạng điện thoại di động GSM


Đài phát di động công cộng
MPT1327 Mạng điện thoại di động UMTS

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 125


3.5 Thiết bị liên kết mạng

• Repeater
• Hub
• Switch
• Transceiver
• Bridge
• Router
• Gateway

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 126


3.5 Thiết bị liên kết mạng
Vai trò của bộ lặp là sao chép, khuếch đại
Repeater và hồi phục tín hiệu mang thông tin trên
đường truyền.
Bộ lặp chỉ nối được hai
đoạn đường dẫn của cùng
một hệ thống truyền thông,
thực hiện cùng một giao
thức và môi trường truyền
dẫn giống nhau.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 127


3.5 Thiết bị liên kết mạng

Hub

Vai trò bộ chia là phân chia


và chuyển tiếp thông tin từ
một cổng sang các cổng
còn lại

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 128


3.5 Thiết bị liên kết mạng

Switch

Vai trò của bộ chuyển mạch


được sử dụng để ghép nối nhiều
thiết bị vào mạng.

Bộ chuyển mạch đóng vai trò chủ


động, kiểm soát toàn bộ hoạt
động giao tiếp trong mạng.
Thông tin từ một trạm được gửi
trực tiếp đến trạm đích mà không
được chuyển tới các trạm khác.
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 129
3.5 Thiết bị liên kết mạng

Transceiver Transceiver hay thiết bị thu


phát là thiết bị có khả
năng nhận và truyền tín
hiệu dữ liệu

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 130


3.5 Thiết bị liên kết mạng
Cầu nối có chức năng liên kết các mạng
Bridge con với nhau, khi lớp 2 (OSI) làm việc
cùng giao thức.
Cầu nối được sử dụng khi
liên kết các mạng con có
cấu trúc khác nhau như:
môi trường truyền dẫn khác
nhau, phương pháp truy
nhập bus khác nhau.

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 131


3.5 Thiết bị liên kết mạng
Router có chức năng xác định đường đi
Router tối ưu cho một gói dữ liệu cho hai đối tác
thuộc các mạng khác nhau.

Các mạng được liên


kết khác nhau ở lớp
1, 2 nhưng phải giống
nhau ở lớp 3 (OSI)

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 132


3.5 Thiết bị liên kết mạng

Gateway Gateway được sử dụng để liên kết


hai hệ thống mạng khác nhau.

Nhiệm vụ Gateway là chuyển đổi giao thức ở cấp


cao, thường được thực hiện bằng các thành phần
phần mềm

Coppyright (c) Industrial University of HoChiMinh City, IUH2014 133


3.6 Một số mạng truyền thông tiêu biểu
ứng dụng trong IoT
3.6.1 Giới thiệu
§ Wireless networks
§ Wired networks
3.6.2 Zigbee
3.6.3 Modbus
3.6.4 Internet
3.6.1. GIỚI THIỆU

Wireless network – Mạng không dây Wired network – Mạng có dây


WIRELESS NETWORKS
WN TECHNOLOGIES

Wireless radio technologies


Standard IEE 802.15.4 Bluetooth WiFi
Frequency 868/915 2.4 GHz 2.4, 5.8 Ghz
MHZ, 2.4
GHZ
Data rate 250 Kpbs 723 Kpbs 11 to 105
Mpbs
Range 10 to 300 m 10 m 10 to 100 m
Power Very Low Low High
Battery Alkaline Rechargeabl Rechargeabl
Operation (months to e (days to e (hours)
years) weeks)
WN TECHNOLOGIES

Wireless radio technologies


Standard Zigbee Z-wave LoraWan
Frequency 2.4GHz, 868.42 MHz 867 to 869
868MHz, EU, MHz EU
915MHz 908.42 MHz 902.3 to 914.9
USA MHz USA
Data rate 20–250Kbps up to 21.9 kbps
100kbit/s
Range 1–75 m and 30 m 15 - 20 km
more
Power Very Low Low Low
Battery 100–7,000 Rechargeabl in excess of
Operation (days) e (days to ten years
WN TECHNOLOGIES

Wireless radio technologies


Standard Sigfox LTE-MTC Wireless M-
bus
Frequency 868MHz in 868MHz,
Europe and 434MHz and
902MHz US 169MHz
Data rate < 0.1 kbps < 150 kbps 100kbps T
mode
32kbps S
mode
Range < 13 km < 15 km < 1 km
Power Low Low TX
consumption:
WIRED NETWORKS
Wireless Control That Simply Works
Wireless Control That Simply Works

3.6.2. ZIGBEE

TM
Copyright © 2006 ZigBee Alliance. All Rights Reserved.
From Popular Science Magazine
Wireless Control That Simply Works

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 142
The IEEE 802 Wireless Space
Wireless Control That Simply Works

WWAN IEEE 802.22

IEEE 802.20
WMAN
WiMax
Range

IEEE 802.16
WLAN WiFi
ZigBee 802.11
802.15.4 802.15.3
Bluetooth
WPAN 15.4c 802.15.3c
802.15.1

0.01 0.1 1 10 100 1000


ZigBee standard uniquely fills a gap Data Rate (Mbps)
for low data rate applications
ZigBeeTM Alliance | Wireless Control That Simply Works
Slide 143
Sensor/Control Network
Requirements
Wireless Control That Simply Works

• Networks form by themselves, scale to large sizes


and operate for years without manual intervention
• Extremely long battery life (years on AA cell),
– low infrastructure cost (low device & setup costs)
– low complexity and small size
• Low device data rate and QoS
• Standardized protocols allow multiple vendors to
interoperate

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 144
ZigBee Alliance Overview-
Wireless Control That Simply Works

• Organized as an independent, neutral, nonprofit


corporation in 2002
• Open and global
• Anyone can join and participate
• Membership is global
• Activity includes
• Specification creation
• Certification and compliance programs
• Branding, market development, and user education
ZigBeeTM Alliance | Wireless Control That Simply Works
Slide 145
The ZigBee Promoters
Wireless Control That Simply Works

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 146
ZigBee Member Geographic Distribution
Wireless Control That Simply Works

November
Region
2006
Asia / Pacific 60 (29%)
Europe / Middle East/Africa 58 (28%)
North/South America 86 (43%)
Total Member Companies 204
29%

28%

Asia / Pacific
Europe / Middle East /Africa

43% North /South America

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 147
The ZigBee Alliance --
Wireless Control That Simply Works

• Is a growing community of companies


• ~200 members vs. 35 Dec. 2002 (5+X Growth)
• Includes major names in the Semiconductor, Software
Developer, End Product Manufacturer, and Service
Provider Industries including major Telecom Carriers
• Has made its specification publicly available
• ZigBee is open to all-ZigBee 2006 now available
• 38,000+ downloads to date
• Has over 30 compliant platforms
• Many certified vendors make choosing ZigBee a safe
choice
• No dominating elements or companies
ZigBeeTM Alliance | Wireless Control That Simply Works
Slide 148
ZigBee Applications
Wireless Control That Simply Works

security
HVAC TV
AMR VCR
lighting control DVD/CD
access control BUILDING
AUTOMATION ZigBee CONSUMER
ELECTRONICS
remote

Wireless Control that


Simply Works
patient
monitoring mouse
fitness keyboard
monitoring PERSONAL PC & joystick
HEALTH CARE PERIPHERALS

TELECOM
SERVICES
asset mgt security
process m-commerce HVAC
control info services lighting control
environmental INDUSTRIAL HOME
object interaction access control
CONTROL CONTROL
energy mgt (Internet of Things) irrigation

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 149
The ZigBee Platform
Wireless Control That Simply Works

Application Profile

ZigBee Stack

Compliant
IEEE 802.15.4 Platform

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 150
The ZigBee Product
Wireless Control That Simply Works

Application Profile
Certified
Product

ZigBee Stack

Compliant
IEEE 802.15.4 Platform

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 151
Basic Network Characteristics
Wireless Control That Simply Works

• 65,536 network (client) nodes

• 27 channels over 2 bands

• 250Kbps data rate

• Optimized for timing-critical


Network coordinator
applications and power Full Function node
management Reduced Function node

Communications flow
• Full Mesh Networking Support Virtual links

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 152
Basic Radio Characteristics
Wireless Control That Simply Works

ZigBee technology relies


upon IEEE 802.15.4, which
has excellent performance
in low SNR environments

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 153
ZigBee Mesh Networking
Wireless Control That Simply Works

Slide Courtesy of

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 154
ZigBee Mesh Networking
Wireless Control That Simply Works

Slide Courtesy of

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 155
ZigBee Mesh Networking
Wireless Control That Simply Works

Slide Courtesy of

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 156
ZigBee Mesh Networking
Wireless Control That Simply Works

Slide Courtesy of

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 157
ZigBee Mesh Networking
Wireless Control That Simply Works

Slide Courtesy of

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 158
ZigBee Stack Architecture
Wireless Control That Simply Works

Initiate and join network


Manage network
Application Determine device relationships
Send and receive messages

Application ZDO

App Support (APS) Device management


Security functions Device discovery
SSP
Service discovery
NWK
Network organization
Device binding
Route discovery Medium Access (MAC) Messaging
Message relaying
Physical Radio (PHY)

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 159
ZigBee Device Types
Wireless Control That Simply Works

• ZigBee Coordinator (ZC)


– One required for each ZB network.
– Initiates network formation.

• ZigBee Router (ZR)


– Participates in multihop routing of messages.

• ZigBee End Device (ZED)


– Does not allow association or routing.
– Enables very low cost solutions

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 160
ZigBee Network Topologies
Wireless Control That Simply Works

Mesh

Star

ZigBee Coordinator
Cluster Tree ZigBee Router
ZigBee End Device

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 161
ZigBee Compliant Platform [ZCP]
Wireless Control That Simply Works

Application ZDO

App Support (APS)


SSP
NWK
ZigBee Compliant
Platform Medium Access (MAC)

Physical Radio (PHY)

• Platform certification - ensures all parts of the stack other than the
application are compliant with the ZigBee Standard
• Allows Network interoperability but does not imply interoperability
at the application layer
• There are currently 30 Compliant Platforms to choose from

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 162
Application Profiles
Wireless Control That Simply Works

Application ZDO

App Support (APS)


SSP
NWK
Clusters Clusters
Medium Access (MAC)
0: off 0: fan off
1: on 1: fan on
2: scene 1 2: temp set Physical Radio (PHY)
3: scene 2 3: time set

• Application profiles define what messages are sent over the air for a given
application
• Devices with the same application profiles interoperate end to end
• ZigBee publishes a set of public profiles, but vendors may create manufacturer
specific ones as well

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 163
Manufacturer Specific Profiles
Wireless Control That Simply Works

Application ZDO

App Support (APS)


Certification testing SSP
ensures application NWK
does not interfere
with other ZigBee
networks Medium Access (MAC)

Physical Radio (PHY)

• Allows a vendor to build specialized products with a ZigBee Compliant Platform


• Certification testing ensures their product does not harm other ZigBee networks
• Manufacturer specific applications are not intended to interoperate at the
application layer
• Allows product vendor to use ZigBee language and logos on their product

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 164
ZigBee Public Profiles
Wireless Control That Simply Works

Application ZDO

App Support (APS)


Ensures application SSP
conforms to a NWK
specific public
application profile Medium Access (MAC)

Physical Radio (PHY)

• Guarantees interoperability between products all running the same public


application profile
• Product vendors may add additional features to the public profiles
• Allows product vendor to use ZigBee language and logos on their product

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 165
Interoperability Summary
Wireless Control That Simply Works

Interop
capable Manufacturer Public application
Network interop Specific interop
starting point
application interop

ZigBee Compliant ZigBee Manufacturer Specific ZigBee Public


Platform [ZCP] Application Profiles Application Profiles

• Devices built on ZigBee interoperate on different levels


• Wide spectrum of interoperability choices
• It’s a designer choice on level of vendor interoperability to support

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 166
Some Application Profiles
Wireless Control That Simply Works

• Home Automation [HA] • Industrial Plant Monitoring


– Defines set of devices used in – Consists of device definitions
home automation for sensors used in industrial
• Light switches control
• Thermostats
• Temperature
• Window shade
• Heating unit • Pressure sensors
• etc. • Infrared
• etc.

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 167
More Application Profiles
Wireless Control That Simply Works

• Multiple profiles at various stages of completion


– Commercial Building Automation
• Building control, management, and monitoring
– Telecom Services/M-commerce
– Automated Meter Reading
• Addresses utility meter reading
– Wireless Sensor Networks
• Very low power unattended networks
• Vendors may form new profile groups within ZigBee
and/or propose private profiles for consideration
• 400+ private profile IDs issued

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 168
Multi-Profile Devices
Wireless Control That Simply Works

Endpoint 2:
Home Automation -
thermostat • Vendor devices may
Endpoint 6: implement multiple profiles
Vendor proprietary
extensions • Additional application
profiles live on different
APP APP … ZDO
endpoints within the device
SSP
APS
• Allows creation of vendor
NWK specific extensions
MEDIUM ACCESS (MAC)

PHYSICAL RADIO (PHY)

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 169
ZigBee – Highly Reliable
Wireless Control That Simply Works

• Mesh networking protocol provides redundant paths


• Automatic retries and acknowledgements
• Parents keep track of messages for sleeping children
• High intrinsic interference tolerance
– Multiple channels
– Supports Frequency agility
– Robust modulation

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 170
ZigBee – Highly Secure
Wireless Control That Simply Works

• Utilizes AES 128-bit encryption


• Concept of a “trust center”
• Link and network keys
• Authentication and encryption
• Security can be customized for the
application
• Keys can be “hard-wired” into application

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 171
Application Examples
Wireless Control That Simply Works

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 172
Wireless Control That Simply Works Home Awareness
Home Heartbeat

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 173
Home Entertainment & Control
Wireless Control That Simply Works

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 174
In-Home Patient Monitoring
Wireless Control That Simply Works

• Patients receive better care at reduced


cost with more freedom and comfort---
– Patients can remain in their own home graphic
• Monitors vital statistics and sends via internet
• Doctors can adjust medication levels
– Allows monitoring of elderly family member
• Sense movement or usage patterns in a home
• Turns lights on when they get out of bed
• Notify via mobile phone when anomalies occur
• Wireless panic buttons for falls or other problems graphic
– Can also be used in hospital care
• Patients are allowed greater movement
• Reduced staff to patient ratio

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 175
Commercial Lighting Control
Wireless Control That Simply Works

• Wireless lighting control


– Dimmable intelligent ballasts
– Light switches/sensors anywhere
– Customizable lighting schemes
– Quantifiable energy savings
– Opportunities in residential, light
commercial and commercial
• Extendable networks
– Lighting network can be integrated
with and/or be used by other
building control solutions

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 176
Wireless Lighting Control-key value drivers
Wireless Control That Simply Works

Simplify Lighting Control System design in both


new construction and retrofit applications

Reduced cost and complexity of system installation

Simplicity of Commissioning

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 177
Wireless Lighting Control-key value drivers
Wireless Control That Simply Works

Easy and intuitive to use facilitating improved


worker productivity

Operating cost and complexity reductions

Improved energy management and control

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 178
HVAC Energy Management
Wireless Control That Simply Works

• Hotel energy management


– Centralized HVAC
management allow hotel
operator to ensure empty
rooms are not cooled
– Easy to retrofit
– Battery operated
thermostats, occupancy
detectors, humidistats can
be placed for convenience
– Personalized room settings
at check-in

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 179
AMR network example
Wireless Control That Simply Works

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 180
Advanced Metering Platform with ZigBee
Wireless Control That Simply Works

• Rapid method to help manage global


electric generation shortage and meet
existing and pending legislation for
energy control

• Can network with other ZigBee devices


in the home for load control – e.g.
Heating/AC, Security, Lighting, White
Goods AMRON
Client 1

• Worldwide standard ZigBee allows


communications between various meter
types from different manufacturers. AC

Water Gas
Meter Meter

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 181
Mobile Handset as ZigBee Gateway
Wireless Control That Simply Works

• Use mobile handset as a gateway to collect and display


information
• In a mobile phone a ZigBee enabled SIM, the personal token,
can play the Gateway role
Service
NETWORK Center
OPERATOR
Confirmation INFRASTRUCTURE
1.
for buying
“Il fuggiasco”.

ZigBee Network Push Ok.

The Telecom operator does more than transport data:


Ø Trust-Center: security, user authentication, reliability
Ø Service Provider of new value-added services
Ø Service management, configuration and
personalization

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 182
Use Case (1) : DTT STB
Wireless Control That Simply Works

Pay-TV
Customers
Database
& Billing
DB STEP 3:Transaction with SMS
The mobile phone with
SIMTOOLKIT application
initiates the transaction
SIM Card Step 4: Unblock decoder
ZigBee Node The Pay TV provider unblocks the
user smart-card and releases the Encrypte
event d Signal

STEP 2: Data Exchange via ZigBee DTT with ZigBee node

Confirmation
1.
for buying
“Il fuggiasco”.
Push Ok.

The decoder sends the code event to STEP 1:


the Z-SIM, asking to buy the selected
event The event (e.g. a film) is selected

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 183
Use Case (2): Cinema Example
Wireless Control That Simply Works

STEP 1: Step 3:
Environment with ZigBee node The users with SIMTOOLKIT application buy the
content. The operator manages the bill
transaction and downloads the token to the SIM
for enabling the access to the cinema
DB
GPRS/UMTS
Cinema

STEP 2:
User having Z-SIM
is recognized by
the environment
Encrypted
and is invited to SMS
buy a cinema ticket

Do you
confirm the
purchase of
Step 4:
“La fabbrica di

The token is received


cioccolato”?

and sent to the printer


via ZigBee
The ticket is
automatically printed

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 184
Z-SIM: M-commerce and Beyond
Wireless Control That Simply Works

Z-SIM is the hub of the interaction between user and objects

Home
ZigBee Automation&Control
Smart Home Ø Lights, HVAC, Domestic Mobile
appliances Terminal
Ø Entertainment (e.g. DTT)
Ø Healthcare, Tele-assistance Service
Ø Monitoring & Security (e.g.
temperature, gas) Distribution Center
Network

M-Commerce Services
Ø m-payments (bar, shops,
supermarkets)
Ø m-ticketing (cinema, train, bus)
Digital Smart City
Ø Access Control
Ø Parking payment system
Ø Infomobility services (e.g. traffic
control)
Ø Environmental Monitoring
Ø Localization

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 185
ZigBee Enables Enhanced Value
Wireless Control That Simply Works

Location Safety

Maintenance Security

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 186
Wireless Control That Simply Works
Why ZigBee?
• Standards based
• Low cost
• Can be used globally
• Reliable and self healing
• Supports large number of nodes
• Easy to deploy
• Very long battery life
• Secure

• Open Standards Enable Markets


ZigBeeTM Alliance | Wireless Control That Simply Works
Slide 187
Open Standards vs.
Proprietary Solutions?
Wireless Control That Simply Works

• Product interoperability
• Vendor independence
• Increased product innovation as a result of
industry standardization
• A common platform is more cost effective
than creating a new proprietary solution from
scratch every time
• Companies can focus their energies on
finding and serving customers

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 188
Benefits of joining the alliance
Wireless Control That Simply Works

• Access to
– Specifications
– Member IP pool
– Event lists
– Media and analysts
– VCs
• Network with
– Members
– Customers
– Vendors
– Partners

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 189
Benefits of joining the alliance
Wireless Control That Simply Works

• World class PR
– Be associated with a hot technology
– Leverage Alliance event and PR activities
• Your competitors are here, chance to strengthen your
leadership position
• Get access to marketing ideas, get a sense of the market
direction and optimize your product/company plans
• Equivalent info from other sources would cost many
multiples of the annual membership fee
• Result is you get to market quicker with a better solution

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 190
More Information
Wireless Control That Simply Works

Be a part of the future-Join the ZigBee Alliance

ZigBee Alliance Web Site


http://www.ZigBee.org

Bob Heile
ZigBee Alliance Chairman, bheile@ieee.org

ZigBeeTM Alliance | Wireless Control That Simply Works


Slide 191
3.6.3. Modbus

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 192 / 20
Modbus
Part 1 : Reference documents - WEB sites

Part 2 : Definitions

Part 3 : Modbus frame description

Part 4 : Security of transmission

Part 5 : Physical layer

Part 6 : Main characteristics resume

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 193 / 20
Part 1 : Reference documents - WEB sites
Schneider documents

Modbus User guide


Reference : TSX DG MOD *

Detailed description of the Modbus protocol.

X-WAY communication user guide


Reference : TSX DR NET *

This guide gives common characteristics to X-WAY Schneider networks.

Communication application specific functions PL7


Micro/Junior/Pro
Reference : TLX DS COM PL7 42 *

Volume 1 : Common communication application


Volume 2 : Modbus bus

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 194 / 20
Part 1 : Reference documents - WEB sites
WEB sites

Modbus.org :
http://www.modbus.org
Modicon site for Modbus users.

Transparent Factory :
http://www.transparentfactory.com
Schneider Electric site for Transparent Factory users.

Modbus Plus :

http://www.modicon.com/techpubs/toc6.html
Modbus Plus Planning and installation.

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 195 / 20
Part 2 : Définitions

Modbus protocol

MODBUS Protocol is a messaging structure created by MODICON


company to connect PLC to programming tools.

It is now widely used to establish master-slave communication between


intelligent devices.

MODBUS is independent of the physical layer.

It can be implemented using RS232, RS422, or RS485 or over a variety


of media (e.g. fiber, radio, cellular, etc...).

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 196 / 20
Part 2 : Définitions

Modbus Plus

MODBUS PLUS is a higher speed network 1 Mbit/s token passing derivative


that uses the MODBUS messaging structure.

7 Application Modbus

6 Presentation
5 Session

4 Transport

3 Network

2 Link 802.4 Token passing


1 Physical RS485

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 197 / 20
Part 2 : Définitions

Modbus TCP/IP

MODBUS TCP/IP uses TCP/IP and Ethernet 10 Mbit/s or 100


Mbits/s to carry the MODBUS messaging structure.

7 Application Modbus

6 Préeentation
5 Session

4 Transport TCP

3 Network IP

2 Link CSMA / CD
ETHERNET V2 ou
1 Physical 802.3

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 198 / 20
Part 2 : Définitions

Modbus ASCII and Modbus


RTU
The MODBUS protocol comes in 2 versions :

n ASCII transmission mode


Each eight-bit byte in a message is sent as 2 ASCII characters.

n RTU transmission mode


Each eight-bit byte in a message is sent as two four-bit hexadecimal
characters.

The main advantage of the RTU mode is that it achieves higher throughput.

ASCII mode allows time intervals of up to 1 second to occur between


characters without causing an error.

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 199 / 20
Part 3 : Modbus frame description

Modbus frame structure

The Modbus frame structure is the same for requests (master to


slave messages) and responses (slave to master messages).

Modbus RTU

silence Address Function Data Checksum silence

Silence >= 3,5 characters

Modbus ASCII

: Address Function Data Checksum CR LF

3A Hex 0D Hex 0A Hex


Industrial Automation - Custumer View - Services
PhW - Modbus_en 06/ 2002 Slide 200 / 20
Part 3 : Modbus frame description

Address field

Address Function Data Checksum

Valid slave device addresses are in the range of 0 ... 247 decimal.
The individual slave devices are assigned addresses in the range of 1 ... 247.
Value 0 is reserved for broadcast messages (no response).
Request :
A master addresses a slave by placing the slave address in the address field of
the message.

Response :
When the slave sends its response, it places its own address in this address field
of the response to let the master know which slave is responding.

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 201 / 20
Part 3 : Modbus frame description

Function field

Address Function Data Checksum

Valid codes are in the range of 1 ... 255 decimal.

Request :
The function code field tells the slave what kind of action to perform.

Response :
For a normal response, the slave simply echoes the original function code.

For an exception response, the slave returns a code that is equivalent to


the original function code with its most significant bit set to a logic 1.
Industrial Automation - Custumer View - Services
PhW - Modbus_en 06/ 2002 Slide 202 / 20
Part 3 : Modbus frame description

Data field

Address Function Data Checksum

Valid codes are in the range of 0 ... 255 decimal.

Request :
The data field contains additional information which the slave must use to tak
the action defined by the function code. This can include items like register
addresses, quantity of items to be handled, etc...

Response :
If no error occurs, the data field contains the data requested.

If an error occurs, the field contains an exception code that the master
application can use to determine the next action to be taken.
Industrial Automation - Custumer View - Services
PhW - Modbus_en 06/ 2002 Slide 203 / 20
Part 3 : Modbus frame description

Checksum field

Address Function Data Checksum

Valid codes are in the range of 0 ... 255 decimal.

Modbus RTU uses CRC : Cyclycal Reduncy Check (2 byte)


Modbus ASCII uses LRC : Longitudinal Redundancy Check (1 bytes)

Request :
The checksum is calculated by the master and sends to the slave.

Response :
The checksum is re-calculated by the slave and compared to the value sent
by the master.
If a difference is detected, the slave will not construct a response to the mast
Industrial Automation - Custumer View - Services
PhW - Modbus_en 06/ 2002 Slide 204 / 20
Part 3 : Modbus frame description

Frame exemple in RTU


mode
n Function code = 3 : Read n words

Request :

1 byte 1 byte 2 bytes 2 bytes 2 bytes


Slave Function First word Number of
CRC16
Address code = 3 address words to read

Response :

1 byte 1 byte 2 bytes 2 bytes 2 bytes 2 bytes


Slave Function Number of Value of the Value of the
CRC16
Address code = 3 bytes read first word last word

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 205 / 20
Part 3 : Modbus frame description

Function code exemples

Code Type

01 Read n consecutive output bits


02 Read n consecutive input bits
03 Read n consecutive output words
04 Read n consecutive input words
05 Write 1 output bit
06 Write 1 output word
07 Read exception status
08 Access diagnostic counters
11 Read event counter
12 Read connection events
15 Write n output bits
16 Write n output words
17 Read identification

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 206 / 20
Part 4 : Security of transmission

Error checking methods

n Parity checking
Even or odd can be optionally applied to each character.

n Frame checking
LRC or CRC is applied to the entire message.

n Continuous stream
The entire message frame must be transmitted as a continuous stream.
If a silent interval (more than 1.5 character times RTU mode or 1 second ASCII mode) occurs
before completion of the frame, the receiving device flushes the incomplete message and
assumes that the next byte will be the address field of a new message.

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 207 / 20
Part 4 : Security of transmission

Error checking methods

The master is configured by the user to wait for a predetermined timeout


interval before aborting the transaction.

This interval is set to be long enough for any slave to respond normally.

If the slave detects a transmission error, the message will not be acted upon.
The slave will not construct a response to the master.
Thus the timeout will expire and allow the master's program to handle the err

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 208 / 20
Part 5 : Physical layer

RS485 physical layer

RS485 is the most physical layer used on Modbus.

32 devices included the master can be connected on the bus.

This is a bus topology with line terminations.

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 209 / 20
Part 6 : Main characteristics resume

Main characteristics
resume

Topology: Bus with line terminations

Maximum distance: With RS485 : 1300 m without repeater

Data rate: 19200 bits/s maximum

Max. no. of devices: With RS485 : 32 master included

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 210 / 20
Part 6 : Main characteristics resume

Main characteristics
resume

Method of accessing the medium: Master slave

Transmission method: Messaging

Max. useful data size: 120 words

Transmission security: LRC or CRC


Start and stop delimiters
Parity bit
Continuous stream

Industrial Automation - Custumer View - Services


PhW - Modbus_en 06/ 2002 Slide 211 / 20
3.7. IOT NETWORKING CONSIDERATIONS AND
CHALLENGES

When you consider which networking


technologies to adopt within your IoT application,
be mindful of the following constraints:
§ Range
§ Bandwidth
§ Power usage
§ Intermittent connectivity
§ Interoperability
§ Security
RANGE

PAN (Personal Area Network)


PAN is short-range, where distances can be measured in
meters, such as a wearable fitness tracker device that
communicates with an app on a cell phone over BLE.

LAN (Local Area Network)


LAN is short- to medium-range, where distances can be up
to hundreds of meters, such as home automation or
sensors that are installed within a factory production line
that communicate over wifi with a gateway device that is
installed within the same building.
RANGE

MAN (Metropolitan Area Network)


MAN is long-range (city wide), where distances are
measured up to a few kilometers, such as smart parking
sensors installed throughout a city that are connected in a
mesh network topology.

WAN (Wide Area Network)


WAN is long-range, where distances can be measured in
kilometers, such as agricultural sensors that are installed
across a large farm or ranch that are used to monitor
micro-climate environmental conditions across the
property.
BANDWIDTH

Bandwidth, or the amount of data that can be transmitted


in a specific period of time, limits the rate at which data can
be collected from IoT devices and transmitted upstream.
Consider these factors:
§ The volume of data that each device is generating
§ The number of devices that are deployed in a
network
§ Whether the data is being sent as a constant stream
or in intermittent bursts, as the bandwidth that is
available will need to cope with the peak periods
POWER USAGE

Transmitting data from a device consumes power, and


transmitting data over long ranges requires more power
than over a short range.
To consider the devices that operate on a battery to
conserve power to prolong the life of the battery and
reduce operating costs.
To prolong the battery life, you can put the device into
sleep mode whenever it is idle.
To model the energy consumption of the device under
different loads and different network conditions to ensure
that the device’s power supply and storage capacity
matches with the power that is required to transmit the
necessary data by using the networking technologies that
you adopted.
INTERMITTENT CONNECTIVITY

IoT devices aren’t always connected. In some cases,


devices will connect periodically by design in order to save
power or bandwidth.
However, sometimes an unreliable network might cause
devices to drop off due to connectivity issues.
Sometimes quality of service issues, such as dealing with
interference or channel contention on a wireless network
using a shared spectrum.
INTEROPERABILITY

Adopting standard protocols has been the traditional


approach for maintaining interoperability on the internet.
However, for the IoT, standardization processes
sometimes struggle to keep up with the rapid pace of
change and technologies are released based on upcoming
versions of standards that are still subject to change. In
these cases, consider the ecosystem around the
technologies.
SECURITY

Security is always a priority, so be sure to select


networking technologies that implement end-to-end
security, including authentication, encryption, and open
port protection
THANK YOU!

You might also like