IEEE Circuits and Systems Magazine - Q3 2020 - 10

widely-used Scikit-learn toolkit and transforms the models generated by this library in order to be executed on
8-bit microcontrollers with 2 kb of RAM. Also compatible
with Scikit-learn, sklearn-porter [47] permits to transpile
trained estimators to C, Java, JavaScript, GO, Ruby, and
PHP. Given this variety of supported languages, it is a very
complete framework as it is also compatible with a range
of ML algorithms. Specifically for C language, sklearnporter is able to port Scikit-learn models of SVM, decision
trees, Random Forest (RF), and AdaBoost classifier. However, the versatility of this library hinders it to generate
microcontroller-optimized code in terms of required RAM.
A similar tool is m2cgen [48], which is also able to transpile
Scikit-learn-trained models into a native code, e.g., Python,
C, Java, Go, JavaScript, Visual Basic, etc. In this case, both
the number of compatible algorithms as well as the target
programming languages are even greater than those supported by sklearn-porter. A more limited tool is Weka-porter [49], which coverts decision tree classifiers generated
by WEKA [59] into C, Java and JavaScript codes. EmbML
[50] is a library that permits to convert models trained by
WEKA or Scikit-learn into C++ source-code files that can
be compiled and executed in constrained platforms. This
library has been tested in Arduino and Teensy [60] boards
and it supports different ML algorithms such as decision
trees, SVM, and NN.
emlearn [51] is a framework that produces portable C99
code from Python libraries such as Scikit-learn or Keras.
This library is compatible with generated models of a range
of algorithms, e.g., RF, decision trees, Naive Bayes, or linear
models, and has been tested in different platforms, namely,
AVR Atmega, ESP8266 and Linux. Focused on extending the
compatibility of TensorFlow models, uTensor [52] and TinyMLgen [53] are two libraries that produce C code ready
to be integrated within different families of MCUs. While the
former is focused on Mbed boards [61], the latter exports
the trained model to a plain C array, hence ready to be used
in a wider range of microcontrollers.
Finally, two proposals from the Academia are focused
on optimizing the implementation of different types of NNs
on ARM Cortex-M processors. CMix-NN [54] is an opensource mixed-precision library for quantized NNs deployment on MCUs. This tool supports convolutional kernels
with precision of 2, 4, or 8 bits, for any of the operands.
In their work, authors made use of the convolutional NN
models produced by MobileNets [62]. In turn, FANN-onMCU [55] is another open-source framework which is built
upon the Fast Artificial Neural Network (FANN) library [63]
aiming at running lightweight NNs on microcontrollers.
Concretely, this toolkit is able to process Multi-Layer Perceptrons (MLPs) trained with FANN and produces code
that, besides the mentioned ARM Cortex-M processor, can
run on Parallel Ultra-Low Power Platforms (PULP) [64].
10 	

Table I summarizes the main characteristics of the
frameworks reviewed in this section.
IV. Use Case: Smart Multi-Rat Device
Most of the latest efforts related to the evolution of the
IoT ecosystem have focused on the development of novel
communication technologies and protocols to provide
end-devices with ubiquitous connectivity. Thus, it is common to find MCU-based objects with a variety of integrated RATs, which present different characteristics in terms
of data-rate, latency, energy consumption, etc. As discussed previously, a convenient management of communication activities is crucial for ensuring the sustainability
of the end-device; besides, the Quality of Service (QoS)
requirements of data traffic should be taken into account
as well. For those reasons, we propose the application of
ML techniques to smartly decide which is the most adequate communication interface for transmitting a given
message by considering both the status of the device and
the characteristics of the message to be sent. Adopting a
ML approach provides flexibility to the interface selection
mechanism in the case of adding new communication interfaces or removing some of the existing ones. Thus, the
multi-RAT frugal object is enriched with awareness capabilities unavailable for current IoT devices. Aiming at providing insights regarding the design and implementation
processes, firstly we propose and describe a multi-RAT
smart object architecture and, then, we explore the integration process of TinyML-based algorithms on real hardware in order to tackle the mentioned decision problem.
A. Architecture
The proposed architecture is shown in Fig. 4. The core
element of the device is the MCU which gathers the processing unit as well as program and data memories. In this
regard, we consider constrained processing platforms as
those described in [8]. Focusing on storage, it is usual to
find commercial devices with SD-card -modules to expand
their capacity, so this is not a big limitation in current development boards. As observed in the diagram, the device
is also equipped with a series of embedded sensors as well
as digital/analog pins for enabling the connection of external elements. To this end, a range of communication protocols are frequently employed in MCUs, e.g., Universal Asynchronous Receiver/Transmitter (UART), Serial Peripheral
Interface (SPI), or Inter-Integrated Circuit (I2C). Although
displays are highly consuming, they are useful to show important events or status messages. Besides, recently small
e-Paper displays have arrived to the MCU market, which
present insignificant energy consumption levels [65].
The availability of multiple RATs embedded in the device is also one of its key characteristics. WiFi or Bluetooth are the most usual technologies as they are very

IEEE CIRCUITS AND SYSTEMS MAGAZINE 		

THIRD QUARTER 2020



IEEE Circuits and Systems Magazine - Q3 2020

Table of Contents for the Digital Edition of IEEE Circuits and Systems Magazine - Q3 2020

Contents
IEEE Circuits and Systems Magazine - Q3 2020 - Cover1
IEEE Circuits and Systems Magazine - Q3 2020 - Cover2
IEEE Circuits and Systems Magazine - Q3 2020 - Contents
IEEE Circuits and Systems Magazine - Q3 2020 - 2
IEEE Circuits and Systems Magazine - Q3 2020 - 3
IEEE Circuits and Systems Magazine - Q3 2020 - 4
IEEE Circuits and Systems Magazine - Q3 2020 - 5
IEEE Circuits and Systems Magazine - Q3 2020 - 6
IEEE Circuits and Systems Magazine - Q3 2020 - 7
IEEE Circuits and Systems Magazine - Q3 2020 - 8
IEEE Circuits and Systems Magazine - Q3 2020 - 9
IEEE Circuits and Systems Magazine - Q3 2020 - 10
IEEE Circuits and Systems Magazine - Q3 2020 - 11
IEEE Circuits and Systems Magazine - Q3 2020 - 12
IEEE Circuits and Systems Magazine - Q3 2020 - 13
IEEE Circuits and Systems Magazine - Q3 2020 - 14
IEEE Circuits and Systems Magazine - Q3 2020 - 15
IEEE Circuits and Systems Magazine - Q3 2020 - 16
IEEE Circuits and Systems Magazine - Q3 2020 - 17
IEEE Circuits and Systems Magazine - Q3 2020 - 18
IEEE Circuits and Systems Magazine - Q3 2020 - 19
IEEE Circuits and Systems Magazine - Q3 2020 - 20
IEEE Circuits and Systems Magazine - Q3 2020 - 21
IEEE Circuits and Systems Magazine - Q3 2020 - 22
IEEE Circuits and Systems Magazine - Q3 2020 - 23
IEEE Circuits and Systems Magazine - Q3 2020 - 24
IEEE Circuits and Systems Magazine - Q3 2020 - 25
IEEE Circuits and Systems Magazine - Q3 2020 - 26
IEEE Circuits and Systems Magazine - Q3 2020 - 27
IEEE Circuits and Systems Magazine - Q3 2020 - 28
IEEE Circuits and Systems Magazine - Q3 2020 - 29
IEEE Circuits and Systems Magazine - Q3 2020 - 30
IEEE Circuits and Systems Magazine - Q3 2020 - 31
IEEE Circuits and Systems Magazine - Q3 2020 - 32
IEEE Circuits and Systems Magazine - Q3 2020 - 33
IEEE Circuits and Systems Magazine - Q3 2020 - 34
IEEE Circuits and Systems Magazine - Q3 2020 - 35
IEEE Circuits and Systems Magazine - Q3 2020 - 36
IEEE Circuits and Systems Magazine - Q3 2020 - 37
IEEE Circuits and Systems Magazine - Q3 2020 - 38
IEEE Circuits and Systems Magazine - Q3 2020 - 39
IEEE Circuits and Systems Magazine - Q3 2020 - 40
IEEE Circuits and Systems Magazine - Q3 2020 - 41
IEEE Circuits and Systems Magazine - Q3 2020 - 42
IEEE Circuits and Systems Magazine - Q3 2020 - 43
IEEE Circuits and Systems Magazine - Q3 2020 - 44
IEEE Circuits and Systems Magazine - Q3 2020 - 45
IEEE Circuits and Systems Magazine - Q3 2020 - 46
IEEE Circuits and Systems Magazine - Q3 2020 - 47
IEEE Circuits and Systems Magazine - Q3 2020 - 48
IEEE Circuits and Systems Magazine - Q3 2020 - 49
IEEE Circuits and Systems Magazine - Q3 2020 - 50
IEEE Circuits and Systems Magazine - Q3 2020 - 51
IEEE Circuits and Systems Magazine - Q3 2020 - 52
IEEE Circuits and Systems Magazine - Q3 2020 - 53
IEEE Circuits and Systems Magazine - Q3 2020 - 54
IEEE Circuits and Systems Magazine - Q3 2020 - 55
IEEE Circuits and Systems Magazine - Q3 2020 - 56
IEEE Circuits and Systems Magazine - Q3 2020 - 57
IEEE Circuits and Systems Magazine - Q3 2020 - 58
IEEE Circuits and Systems Magazine - Q3 2020 - 59
IEEE Circuits and Systems Magazine - Q3 2020 - 60
IEEE Circuits and Systems Magazine - Q3 2020 - 61
IEEE Circuits and Systems Magazine - Q3 2020 - 62
IEEE Circuits and Systems Magazine - Q3 2020 - 63
IEEE Circuits and Systems Magazine - Q3 2020 - 64
IEEE Circuits and Systems Magazine - Q3 2020 - 65
IEEE Circuits and Systems Magazine - Q3 2020 - 66
IEEE Circuits and Systems Magazine - Q3 2020 - 67
IEEE Circuits and Systems Magazine - Q3 2020 - 68
IEEE Circuits and Systems Magazine - Q3 2020 - Cover3
IEEE Circuits and Systems Magazine - Q3 2020 - Cover4
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2023Q3
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2023Q2
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2023Q1
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2022Q4
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2022Q3
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2022Q2
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2022Q1
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2021Q4
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2021q3
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2021q2
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2021q1
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2020q4
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2020q3
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2020q2
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2020q1
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2019q4
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2019q3
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2019q2
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2019q1
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2018q4
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2018q3
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2018q2
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2018q1
https://www.nxtbookmedia.com