Internet of Things
Routing in the Internet
Maquettes et projets
Internet of Things
Routing in the Internet
Maquettes et projets
As defined by Semtech, LoRa is a wireless technology developed to create the low-power, wide-area networks (LPWANs) required for machine-to-machine (M2M) and Internet of Things (IoT) applications. The technology offers a very compelling mix of long range, low power consumption and secure data transmission and is gaining significant traction in IoT networks being deployed by wireless network operators.
In this lab, you will implement a prototype of LoRa communication between two wireless devices. This enables you to get hands-on experience with LoRa, assess the radio performance, and prepare future advanced prototypes and experimentations.
In order to design and implement experiments with LoRa, you will use the following devices:
Download the following software on your PC:
Unzip the RadioHead library and copy it to your sketchbook library folder as detailed in https://www.arduino.cc/en/Guide/Libraries.
Make sure to restart your computer after the installation of Arduino IDE and run the software as administrator.
Start by plugging the Dragino shields on the Arduino devices and mounting the antennas as shown in Fig. 1.
Connect the two Arduino devices to USB ports on your computer. If this is the first time you use Arduino IDE, make sure to install the necessary USB drivers by selecting
Boards Manager and installing Arduino AVR boards.
Now, you have to choose the
Board type as
Arduino/Genuino Mega 2560 or
Arduino Duemilanove or Diecimilia in the
Tools menu and select the corresponding serial
Port to start programming your Arduino.
For Arduino Mega 2560, additional drivers for Microsoft Windows 7 or 8 can be installed from http://wch.cn/download/CH341SER_ZIP.html. For Arduino Duemilanove, additional drivers can be installed from https://www.ftdichip.com/Drivers/CDM/CDM21228_Setup.zip
In this section, you will perform a theoretical assessment of the performance of LoRa modulation. You will later compare this theoretical results to the experimental ones as in a typical scientific study.
In the remainder of this lab, you will conduct measurements to validate the obtained theoretical receiver sensitivity.
Download the basic sketches that implement a simple LoRa communication between two devices: a client and a server. Open the sketches with Arduino IDE (it is preferable to run Arduino IDE as administrator). Make sure to choose the correct
Port in the
Take a look at the source code in
rf95_server.ino. Particularly, the following extract from the
setup function configures the radio parameters of your LoRa devices:
rf95.setFrequency(frequency); // Setup Power,dBm rf95.setTxPower(13); // Setup Spreading Factor (6 ~ 12) rf95.setSpreadingFactor(7); // Setup BandWidth, option: 7800,10400,15600,20800,31250,41700,62500,125000,250000,500000 //Lower BandWidth for longer distance. rf95.setSignalBandwidth(125000); // Setup Coding Rate:5(4/5),6(4/6),7(4/7),8(4/8) rf95.setCodingRate4(5);
In order to reduce collisions between simultaneous experiments, configure the central frequency of your LoRa devices as indicated below:
Now you can compile and upload the client and server sketches on the two arduino devices, respectively. On the serial interfaces, you should obtain similar results as in Fig. 2 and Fig. 3. The client sends periodically a short packet towards the server. The server outputs the RSSI (received power in dBm) for each received packet.
In the following, you will design and implement a set of scenarios that enable to evaluate the performance of the LoRa modulation. As you will deal with scientific assessment, you are required to use scientific tools to show the results. You have the choice between gnuplot, matplotlib with Python, and MATLAB. Take some time to become familiar with one of these software as you will be required to use them in different occasions of your academic programme.
As we are in presence of variable radio conditions, some experiments should be repeated multiple times and results can be shown as probability distributions. Take a look at this excellent repository of data visualisation tools https://www.data-to-viz.com.
In this section, you will measure the Time on Air (ToA) that is given by the time necessary to transmit a packet on the radio interface. You will assess the impact of the spreading factor, bandwidth, coding rate, and packet size on the ToA.
Start by implementing a function on the client that measures the time necessary for sending a packet. You can have recourse to the micros() function available in the arduino libraries. Now, you can modify one of the parameters (spreading factor, bandwidth, coding rate, packet size) and record the impact on the ToA. Note well that you may need to repeat the experiment multiple times in order to obtain the statistical distribution.
For example, the scenario for assessing the impact of the spreading factor on the ToA consists of sending 100 packets for three different spreading factors e.g., 7, 9, and 10, and drawing the average ToA or the distribution in a boxplot for comparing the results.
As for the theoretical computation of the ToA, you can refer to the the following documents :
Note that all messages sent and received by the RH_RF95 RadioHead driver we are using conform to this packet format:
In this section, you will measure the impact of the packet arrival rate on the collision rate and consequently the Packet Delivery Ratio (PDR).
The setting for this experiment is unique:
Start by identifying a set of three geographical locations or Test Points (TP). These TPs should be astutely chosen to explore the limits of LoRa coverage. Then, you should implement a function on the server that measures the ratio of successfully delivered packets or PDR (Packet Delivery Ratio). Now, you should run the experiment for three different radio configurations: such configurations should provide different reliability levels (high, medium, and low reliability).
You are now required to establish a record of LoRa coverage. You can certainly unleash your scientific imagination, but some rules must be followed to validate the record:
This challenge and the corresponding grading is considered as a part of the final project.
|Techniques for Engineering Practice||Students showed proper and justified use of techniques necessary for engineering practice (such as numerical methods, stochastic processes, statistical analysis, etc.).||Students used techniques necessary for engineering practice without justification (such as numerical methods, stochastic processes, statistical analysis, etc.).||Students improperly used some techniques necessary for engineering practice (such as numerical methods, stochastic processes, statistical analysis, etc.).||Students improperly used some techniques necessary for engineering practice (such as numerical methods, stochastic processes, statistical analysis, etc.).|
|Skills for Engineering Practice||Students showed advanced skills necessary for engineering practice (such as programming, drawing and manipulating equipment).||Students showed skills necessary for engineering practice of the Labs (such as programming, drawing and manipulating equipment).||Students showed limited skills necessary for engineering practice (such as programming, drawing and manipulating equipment).||Students showed no skills necessary for engineering practice (such as programming, drawing and manipulating equipment).|
|Engineering tools||Students showed advanced ability to properly use modern engineering tools that are necessary for the Labs, such as simulators, software or computer tools.||Students showed limited use of modern engineering tools that are necessary for the Labs, such as simulators, software or computer tools.||Students showed improper use of modern engineering tools that are necessary for the Labs, such as simulators, software or computer tools.||Students showed no use of modern engineering tools that are necessary for the Labs, such as simulators, software or computer tools.|
|Problem solving||Students solved an engineering problem by choosing appropriate tools and applying engineering skills with proper justification.||Students solved an engineering problem by choosing appropriate tools and applying engineering skills.||Students solved an engineering problem but tools were not appropriate and engineering skills not applied.||Students did not solve the engineering problem.|
|Results and analysis||Students presented the Labs results and performed analysis, assessment, and comparison with theoretical results.||Students presented the Labs results and performed analysis and assessment.||Students presented the Labs results without analysis.||Students did not present the Labs results.|
|Motivation, initiative, and creativity||Students were motivated during the Labs. They took initiative, made their own decisions, and came up with new and creative ideas, propositions, and solutions.||Students showed motivation for their Labs. They were able to take initiatives to make their work advance.||Students showed little/unstable motivation. Little initiative has been taken.||Students were passive with no motivation. They did not take any initiative in their work.|
|Written communication skills||Students provided an organized and thouroughly proof-read document with appropriate structure and formatting (figure labels, headings, references, graphs, etc.), and relevant semantics.||Students provided an organized document with appropriate structure, and relevant semantics, containing minor misspellings and/or grammatical errors.||Students provided a document with appropriate structure, and poor semantics, containing minor misspellings and/or grammatical errors.||Students provided a document with inappropriate structure and formatting, and poor semantics, containing major misspellings and/or grammatical errors.|
|Scientific referencing||Original work. Proper referencing of material (parts/sentences/figures) quoted from relevant sources.||Original work. Proper referencing of material (parts/sentences/figures).||Proper referencing of quoted material (parts/sentences/figures) but over-reliance on external sources.||All copied material (parts/sentences/figures) from other sources is not referenced. Reports cannot be submitted as is and must be rewritten.|