  Citation: Poza-Lujan, J.-L.; Uribe-Chavert, P.; Sáenz-Peñafiel, J.-J.; Posadas-Yagüe, J.-L. Processing at the Edge: A Case Study with an Ultrasound Sensor-Based Embedded Smart Device. Electronics 2022, 11, 550. https://doi.org/10.3390/ electronics11040550 Academic Editor: Vijayakumar Varadarajan Received: 31 December 2021 Accepted: 9 February 2022 Published: 11 February 2022 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affil- iations. Copyright: © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). electronics Article Processing at the Edge: A Case Study with an Ultrasound Sensor-Based Embedded Smart Device Jose-Luis Poza-Lujan 1, * ,† , Pedro Uribe-Chavert 2,† , Juan-José Sáenz-Peñafiel 3,† and Juan-Luis Posadas-Yagüe 1,† 1 Research Institute of Industrial Computing and Automatics, Universitat Politècnica de València, Camino de Vera, s/n, 46022 Valencia, Spain; jposadas@upv.es 2 Doctoral School, Universitat Politècnica de València, Camino de Vera, s/n, 46022 Valencia, Spain; pedurcha@doctor.upv.es 3 Dirección de Investigación, Universidad de Cuenca, Av. 12 de Abril, Cuenca 010107, Ecuador; juan.saenz@ucuenca.edu.ec * Correspondence: jopolu@upv.es; Tel.: +34-963-87-70-00 These authors contributed equally to this work. Abstract: In the current context of the Internet of Things, embedded devices can have some intelli- gence and distribute both data and processed information. This article presents the paradigm shift from a hierarchical pyramid to an inverted pyramid that is the basis for edge, fog, and cloud-based architectures. To support the new paradigm, the article presents a distributed modular architecture. The devices are made up of essential elements, called control nodes, which can communicate to enhance their functionality without sending raw data to the cloud. To validate the architecture, identical control nodes equipped with a distance sensor have been implemented. Each module can read the distance to each vehicle and process these data to provide the vehicle’s speed and length. In addition, the article describes how connecting two or more CNs, forming an intelligent device, can increase the accuracy of the parameters measured. Results show that it is possible to reduce the processing load up to 22% in the case of sharing processed information instead of raw data. In addition, when the control nodes collaborate at the edge level, the relative error obtained when measuring the speed and length of a vehicle is reduced by one percentage point. Keywords: embedded device; edge and fog computing; smart cities; ambient intelligence 1. Introduction Intelligent systems, based on embedded devices, have been the focus of attention in intelligent city environments. The use of cheap and efficient micro-controllers with high connectivity features allows the devices’ integration into almost all types of urban elements. These interconnected elements have given rise to the concept of the Internet of Things (IoT) [1]. Having many distributed devices implies a large amount of data to manage to obtain information to make some decisions. This distributed chain, sensor-decision- act, is aimed to provide an optimisation of system performance and to provide optimal services [2]. This optimisation has given rise to the concept of distributed intelligence, usually based on distributed knowledge [3]. Among the fields of application of distributed intelligence, mobility environments, both in cities and on roads, are one of the most widely used. Environments can apply intelligence in everyday aspects such as optimising traffic or managing the power con- sumption of road lighting [4]. Using embedded systems with distributed intelligence to coordinate non-daily aspects, such as accident prevention, detection or management, is also a challenge. In all cases, intelligent environment management requires devices to detect, characterise, predict, or act on the behaviour of both elements—vehicles and pedestrians. Beyond intelligent devices appears the concept of collaborative intelligence in the edge Electronics 2022, 11, 550. https://doi.org/10.3390/electronics11040550 https://www.mdpi.com/journal/electronics