Académique Documents
Professionnel Documents
Culture Documents
INTELLIGENTS
EM: Objets Connectés (Connecetd Devices)
Pr Atman JBARI
Electrical Engineering Department, ENSAM, Rabat
Email: atman.jbari@ensam.um5.ac.ma
Resp:
IoT 1
Identification: M55A-1 : Objets connectés IOT
❑ Objectifs:
• Décrire les concepts liés à l’internet des objets et aux objets connectés et découvrir
leur mise en pratique
• Mettre en ouvre un projet sur les objets connectés relativement à un service.
• Définir un système intelligent et toutes ses composantes.
• Programmer des algorithmes de fonctions intelligentes d’un système.
❑ Volume horaire:
Cours: 8h; TD: 6h; TP: 8h; AP: 2h; Evaluation: 2h
❑ Evaluation:
Note du module n = 0.5 x n1+ 0.5 x n2;
ni = 0.25 x nCCi + 0.15 x nAPi + 0.2 x nTPi + 0.4 x nExi
❑ Evaluation:
La note minimale Mod: 12/20; La note minimale EM: 06/20.
IoT 2
References
IoT 3
Outline:
V. IoT Labs
IoT 4
Définitions
IoT 5
Definition of IoT
IoT 6
IoT Architecture
Source: https://iot-analytics.com/top-10-iot-applications-in-2020/
IoT 8
IoT − Sensors
Commercial Energy
IoT 11
Physical Design of IoT
IoT 12
Organization of an IoT system
IoT 13
Organization of an IoT system
• The plant or environment is the physical system with which the IoT
system interacts. We will use these two terms interchangeably.
• A set of devices form the leaves of the network. A node may include
sensors and/ or actuators, processors, and memory. Each node has a
network interface. A node may or may not run the Internet Protocol.
• Hubs provide first-level connectivity between the nodes and the rest of
the network. Hubs are typically run IP.
• Fog processors perform operations on local sets of nodes and hubs.
Keeping some servers nearer the nodes reduces latency. However, fog
devices may not have as much compute power as cloud servers. Fog
devices also introduce system management issues.
• Cloud servers provide computational services for the IoT system.
Databases store data and computational results. The cloud may provide
a variety of services that mediate between nodes and users.
IoT 14
Internet of Things (IoT) architecture
IoT 15
Edge Computing-based architecture
IoT 16
High level Cloud-IoT 3-tier architecture
IoT 17
Most Common IoT Architectures
IoT 18
Application Layer
IoT 19
Middleware Architecture
IoT 20
Cloud-Based Architectures
• The large amount of data generated by objects is stored, processed and presented to the
user through services made available form the cloud.
• Examples: Amazon Web Services AWS by Amazon, Azure by Microsoft, Xively by Google,
etc.
• AWS Components:
✓ The Device Gateway: intermediary between the connected devices and the cloud services
through the Message Queue Telemetry Transport (MTTQ) protocol.
✓ The Registry: responsible for assigning a unique ID to each connected device, storing
metadata about connected devices in order to track them.
✓ The Rules Engine: The Rules Engine processes incoming messages and distributes them to
other devices or cloud services
✓ The Device Shadow: virtual representations of physical objects. These representations are
persistent and stored in the cloud to be accessed at any time (even when the device is
offline) by cloud services or other devices.
IoT 21
Server-based architecture
IoT 22
IoT Design
IoT 23
Duty Cycle and Power Consumption
Lower duty cycles mean lower energy consumption. We can change the duty
cycle through a combination of changes to the operating time O and the period T.
IoT 24
Duty Cycle and Power Consumption
✓ Duty cycle:
This model carries several implications for the design of IoT devices: the
device must be good at idling at low power; it should provide low energy
and time to shut down and to turn back on.
IoT 25
Duty Cycle and Power Consumption
IoT 26
IV. IoT Communication
and Protocols
HTTP, MQTT, WebSockets.
IoT 27
OSI Model
IoT 28
IoT Protocols
• Link Layer
• 802.3 – Ethernet
• 802.11 – WiFi
• 802.16 – WiMax
• 802.15.4 – LR-WPAN
• 2G/3G/4G
• Network/Internet Layer
IPv4; IPv6; 6LoWPAN
• Transport Layer
TCP; UDP
• Application Layer
HTTP; CoAP; WebSocket
MQTT; XMPP; DDS;
AMQP
IoT 29
Communication / Transport layer
IoT 30
Communication Technologies
IoT 31
Communication Technologies
IoT 32
Generic block diagram of an IoT Device
IoT 33
Logical Design of IoT
IoT 34
Request-Response communication model
IoT 35
Publish-Subscribe communication model
IoT 36
The publish/subscribe model
IoT 37
The publish/subscribe model
IoT 38
Push-Pull communication model
IoT 39
Exclusive Pair communication model
• Exclusive Pair is a
bidirectional, fully duplex
communication model that
uses a persistent
connection between the
client and server.
• Once the connection is
setup it remains open until
the client sends a request
to close the connection.
• Client and server can send
messages to each other
after connection setup.
IoT 40
Web Application ?
HTTP
FTP URL (Uniform Resource Locator)
WebSocket https://sites.google.com/view/atmjbari/home
IoT 41
Web Application ?
IoT 42
HTTP
IoT 43
HTTP Protocol
IoT 44
HTTP vs URL
IoT 45
HTTP Responses and Response Codes
IoT 46
Request Response Example
IoT 47
Request Types, Methods or Verbs
IoT 48
HTTP: RESTful Hypothetical Light Switch
api.example.com/turnoff
Cell Phone Server
api.example.com/shoulditurnoff
No
Should I Process
turn off? Response
Yes
Turn off
WiFi Switch
IoT 49
GET vs POST
• Features of GET
• It is very easy to bookmark data using GET method.
• The length restriction of GET method is limited.
• You can use this method only to retrieve data from the address bar
in the browser.
• This method enables you to easily store the data.
• Features of POST
• POST method request gets input from the request body and query
string.
• Data passed using the POST method will not visible in query
parameters in browser URL.
• parameters of POST methods are not saved in browser history.
• There is no restriction in sending the length of data.
• It helps you to securely pass sensitive and confidential information
like login details to server.
IoT 50
GET , POST: Examples
IoT 51
MQTT : Publish/Subscribe
IoT 52
MQTT : Publish/Subscribe
IoT 53
MQTT Hypothetical Light Switch
‘toggle’
Toggle Switch
WiFi Switch
IoT 54
MQTT : Quality of Service
QoS can be 0, 1, or 2:
• QoS0 (At most once): The least reliable mode but also the
fastest. The publication is sent but confirmation is not
received.
• QoS1 (At least once): Ensures that the message is delivered
at least once, but duplicates may be received.
• QoS2 (Exactly once): The most reliable mode while the most
bandwidth-consuming. Duplicates are controlled to ensure
that the message is delivered only once.
IoT 55
MQTT CODES
IoT 56
WebSockets
IoT 57
WebSockets
IoT 58