Professional Documents
Culture Documents
Chapter 3 - IoT Networks - Done
Chapter 3 - IoT Networks - Done
IOT NETWORKS
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
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
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
Dữ liệu
Tín hiệu
Tín hiệu
Tín hiệu
Biên độ
Tham số
Tần số, nhịp xung, …
thông tin
Pha
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
Nhanh nhạy
Tin cậy
Tiền định
Bền vững
• Đị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ộ
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
• Định nghĩa
• Phân loại
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
• Định nghĩa
• Phân loại
– Master/Slave
– Token Ring
– CSMA-CD
– CSMA-CA
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
• Định nghĩa
Định nghĩa
Tỉ lệ bit lỗi
§ 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:
§ 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 = ?
Parity bit
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
Mã CRC
Mã CRC
• Đị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).
Định nghĩa
NRZ
0 1 1 0 1 0 1 0 1
RZ
0 1 1 0 1 0 0 1
Manchester II
0 1 1 0 1 0 0 1
AFP
FSK
0 1 1 0 1 0 0 1
• Mô hình lớp
• Mô hình OSI
• Mô hình TCP/IP
ü 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.
• 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.
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.
Note
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 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
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.
Để 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
ü 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
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
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
Internet Layer
Transport Layer
Application Layer
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.
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.
Vai trò
§ Tốc độ bền vững của tín hiệu với nhiễu bên ngoài
Vai trò
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.
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
BaseBand BroadBand
Coppyright (c) Industrial University of HoChiMinh City, IUH2014 121
Cáp đồng trục
Đâ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á
• Repeater
• Hub
• Switch
• Transceiver
• Bridge
• Router
• Gateway
Hub
Switch
3.6.2. ZIGBEE
TM
Copyright © 2006 ZigBee Alliance. All Rights Reserved.
From Popular Science Magazine
Wireless Control That Simply Works
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
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
security
HVAC TV
AMR VCR
lighting control DVD/CD
access control BUILDING
AUTOMATION ZigBee CONSUMER
ELECTRONICS
remote
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
Application Profile
ZigBee Stack
Compliant
IEEE 802.15.4 Platform
Application Profile
Certified
Product
ZigBee Stack
Compliant
IEEE 802.15.4 Platform
Communications flow
• Full Mesh Networking Support Virtual links
Slide Courtesy of
Slide Courtesy of
Slide Courtesy of
Slide Courtesy of
Slide Courtesy of
Application ZDO
Mesh
Star
ZigBee Coordinator
Cluster Tree ZigBee Router
ZigBee End Device
Application ZDO
• 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
Application ZDO
• 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
Application ZDO
Application ZDO
Interop
capable Manufacturer Public application
Network interop Specific interop
starting point
application interop
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)
Simplicity of Commissioning
Water Gas
Meter Meter
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
Confirmation
1.
for buying
“Il fuggiasco”.
Push Ok.
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
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
Location Safety
Maintenance Security
• 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
• Access to
– Specifications
– Member IP pool
– Event lists
– Media and analysts
– VCs
• Network with
– Members
– Customers
– Vendors
– Partners
• 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
Bob Heile
ZigBee Alliance Chairman, bheile@ieee.org
Part 2 : Definitions
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.
Modbus protocol
Modbus Plus
7 Application Modbus
6 Presentation
5 Session
4 Transport
3 Network
Modbus TCP/IP
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
The main advantage of the RTU mode is that it achieves higher throughput.
Modbus RTU
Modbus ASCII
Address field
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.
Function field
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.
Data field
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
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
Request :
Response :
Code Type
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.
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
Main characteristics
resume
Main characteristics
resume