Smart City Platform Development for an Automated Waste Collection System

Nowadays, governments and companies are looking for solutions to increase the collection level of various waste types by using new technologies and devices such as smart sensors, Internet of Things (IoT), cloud platforms etc. In order to fulfil this need, this paper presents solutions provided by a research project involving the design, development and implementation of fully automated waste collection systems with an increased usage degree, productivity and storage capacity. The paper will focus on the main results of this research project in turning the automated waste collection system into a smart system so that it can be easily integrated in any smart city infrastructure. For this purpose, the Internet of Things platform for the automated waste collection system provided by the project will allow real time monitoring and communication with central systems. Details about each module are sent to the central systems: various modules’ statuses (working, blocked, needs repairs or maintenance etc.); equipment status; storage systems status (allowing full reports for all waste types); the amount of waste for each module, allowing optimal discharging; route optimization for waste discharging etc. To do that, we describe here an IoT cloud solution integrating device connection, data processing, analytics and management.


Introduction
Due to the fast decrease of the available natural resources and the increased costs of raw material extraction, the European Union strategy suggests the replacement of the natural resources required to manufacture products with materials from recycled parts and products [1]. Also, technological innovation accelerates the replacement of equipment which generates an increase of waste electrical and electronic equipment (WEEE) [2]. The recovery and reuse of renewable resources are the main objectives of sustainable development for our society, being a part of the general effort to reduce the exploitation of natural resources which leads to a continuous degradation of environmental quality.
Taking a look into the history of separate waste collection and recycling, one can notice that, in time, several solutions were used, but only when a lack of resources appeared did the government and local authorities take action in order to establish rules for separate waste collection. During World War II, the combatant countries started campaigns by strongly encouraging individuals to collect and recycle materials including paper, cans, metal and even kitchen fat [3]. In the 1970s, people became more and more aware of the variety of environmental issues, including trash disposal and the need for recycling and reuse [3]. However, only at the beginning of the 1990s was separate waste collection introduced in legislation, first in Germany, and later in the EU countries [4,5]. In this way, "the product life-cycle could be closed by making the producers responsible for their products from cradle to grave" [6]. Green, blue, brown, yellow and gray bins became available for separate waste collection and, within a few years, the reports showed improvements in the quality and the quantity of waste collected for recycling [6,7].
Introducing reverse vending machines (RVM) to the market was the next big step in waste management. In this way, the citizens were motivated to bring back plastic bottles, glass receptacles and aluminum cans in order to receive in exchange vouchers that could be used in supermarkets. Nowadays, hundreds of thousands of RVMs developed by Tomra, Envipco, RVM Systems, Diebold Nixdorf and other RVM producers are used all over the world [8][9][10][11]. The latest RVMs contain advanced vision systems able to instantly detect barcodes and security marks (allowing users to insert containers rapidly in a continuous flow) and to quickly and accurately distinguish between thousands of different receptacles [8].
Recently, along with the development and the implementation of smart city technologies and platforms, new solutions for smart waste collection are being used. The smart waste collection technology sector is still in an early phase, but Smart Bins [12] have now started to be used for waste collecting. Smart collection bins with ultrasonic sensors attached to them in order to measure the empty space can be located in different areas of the city. A sensor gateway based on long range wide area network (LoRaWAN) protocol and cloud platforms for data collection, analysis and visualization should be used [13,14].
Theoretical solutions and preliminary results regarding IoT platforms for waste management can be found in the dedicated literature. Zanella and Vangelista present an IoT platform solution for a smart city, with a Padova city case study, where the proposed system is supposed to collect interesting environmental parameters, such as CO level, air temperature and humidity, vibrations and noise [15]. Zygiaris is presenting a smart city reference model to be used by smart city planners to define the conceptual layout of a smart city and to describe the smart innovation characteristics in each one of the six layers [16]. Clement et al. propose a service oriented reference architecture defining the relationship between the various service oriented architectures (SOAs) from each domain to be integrated [17].
Several papers describe the IoT features and characteristics [18], but only a few of them include results. For example, in Romania, a vacuum waste collection system for the historical city center of Sibiu was developed based on several parameters: waste volume-which is a wide variable because of seasonal events; composition of waste; source concentration; current infrastructure; distance from sources; and the level of public concern [19,20].
In Sweden, for example, the automated vacuum waste collection system is able to collect only four types of waste: general waste, organic waste, recyclable paper and recyclable cardboard [21]. This system is not able to collect WEEEs, batteries, light bulbs and fluorescent lamps, large sheets of cardboard, glass recipients etc. The vacuum system is a very rigid one because the pipes must to be arranged to guarantee access without digging into other cables and pipes, also described as the "spaghetti effect" [22,23]. Also, changing an existing network is very difficult and costly. Planning and building the network therefore needs to be done at the very first stages of a residential area [22]. It is hard to implement this system for an entire large city like Paris, London, Amsterdam etc.
However, a fully automated integrated waste collection system (able to separately collect different types of waste: plastic recipients, glass recipients, aluminum cans, WEEEs, paper, cardboard, batteries, light bulbs and fluorescent lamps etc.) and a smart city platform dedicated for this kind of system was not identified by the authors in the specialized literature and in the investigated US and EU patents.
The paper is organized as follows: in chapter two, details about our research project are presented together with the automated waste collection system solution resulted from our project. In chapter three, the platform solutions for the integration of the automated waste collection system into the smart city infrastructure are presented, while chapter four discusses the conclusion of the research and future work.

The SmartCollect Project
Romania has a level of waste collection well below the EU average and by 2020 should reach a target of 50% regarding the preparation for reuse and recycling of waste. Along with the public's low awareness regarding the necessity for selective waste collection, the lack of waste collection systems represents an obstacle in achieving the target. Currently, human operators are still used in separate waste collecting systems for performing tasks associated with

•
Paper and cardboard sorting and weighing. Also, the operators transport the paper or cardboard to the baler, operates the bale press and the resulted bales are stored, etc.; • Unloading containers of plastic and glass recipients or aluminum cans; • Large and small WEEEs identification, weighing, transport, transfer and storage.
To increase the level of waste collection, it is necessary to obtain a fully automated waste collecting system. The separate waste collection solutions currently implemented in Romania are not fully automated or ready to be integrated in the smart city infrastructure.
In this context, our research project started in 2016. The main project goals are to modernize and to automatize the current waste collection system developed in the past by our project partner and to obtain a fully automated waste collection system (AWCS). The first objective of the project is to increase the use of the system, improve its productivity and its collected waste storage capacity. The second objective is to integrate the system into the infrastructure of the smart city.
Until now, our research work has included the following: 1. Based on data provided by the company (project partner) and on studies conducted on the current systems, a detailed description was given for each module of the waste collection system. Based on these data, the waste collection system's modelling and simulations were performed in Witness Horizon in order to achieve the system's diagnosis. The problems encountered on each system's module were presented [24]. The simulation was made for a working week time frame by defining a function: 60 min × 10 h × 7 days to reflect the 10 h/day and 7 days per week (including Saturday and Sunday) according to the actual program. The results from the simulation showed that a total of 2050 aluminum cans, 1400 glass recipients, 4200 plastic recipients, 400 kg of cardboard, 200 kg of paper and 26 WEEEs (big or small) are collected [24]; 2.
Based on the diagnosis results, the changes needed for the system redesign were described in order to increase the usage degree, the productivity and storage capacity of the waste collection system. The proposals concerning the characteristics and configuration of each module were described to obtain an optimized system version [24]; 3.
In the conception phase, several systems configurations were proposed and analyzed. Using Witness Horizon, a new waste flow simulation based on this new system configurations has been made. The simulation was made for 60 min × 24 h × 7 days to reflect the 24 h/7 days system desired availability. In feedback questionnaires, most of the customers said they prefer a system that is available 24/7. The results showed that 10,821 plastic recipients were collected, in comparison with 4200 units originally, 5305 aluminum cans were collected in total, in comparison with 2050 initially, 3618 glass recipients were collected, in comparison with 1400 units originally, 800 kg of cardboard and 450 kg of paper were collected, 65 WEEEs (big or small) were collected in comparison with 26 originally [24]; 4.
The new modular system configuration was chosen. The AWCS configuration is presented in Section 2.2;

5.
The design phase. Each system's module was designed using CATIA V5; 6.
Patents were applied for the chosen solutions; 7. A waste identification system was developed which includes an electronic weighing scale, a metal component detection system and a vision system (video camera, neural network application). In Figure 1, the vision system software as a part of the system's prototype is presented. The identification is based on machine vision, a convolutive neural network specifically trained to recognize electrical and electronic equipment, batteries, light bulbs and fluorescent lamps. The user places the product in the pickup area and clicks the Scan button. After identifying the category, weight and the proposed price are displayed. The user can accept or cancel the transaction; 8.
Equipment for all module prototypes were chosen.  Currently, our research teams in working on plastic & glass receptacles and aluminum cans module prototype; large WEEE module prototype; small WEEE module prototype; and developing the IoT platform in order to integrate the AWCS into the smart city infrastructure.

Automated Waste Collection System
The automated waste collection system which resulted from our research is able to collect separately different types of waste: plastic receptacles, glass receptacles, aluminum cans, WEEEs, paper, cardboard, batteries, light bulbs and fluorescent lamps etc.
The AWCS contains different modules based on the waste type: Due to modularity, different configurations of the system can be obtained based on location requirements. A configuration of the system ( Figure 2) could include one plastic & glass receptacles and aluminum cans module; one paper and cardboard module; one light bulb and fluorescent lamp module; one batteries module; two small WEEE modules; two large WEEE modules. Currently, our research teams in working on plastic & glass receptacles and aluminum cans module prototype; large WEEE module prototype; small WEEE module prototype; and developing the IoT platform in order to integrate the AWCS into the smart city infrastructure.

Automated Waste Collection System
The automated waste collection system which resulted from our research is able to collect separately different types of waste: plastic receptacles, glass receptacles, aluminum cans, WEEEs, paper, cardboard, batteries, light bulbs and fluorescent lamps etc.
The AWCS contains different modules based on the waste type: Plastic & glass recipients and aluminum cans module; • Paper and cardboard module; • Batteries module; • Light bulb and fluorescent lamp module.
Due to modularity, different configurations of the system can be obtained based on location requirements. A configuration of the system ( Figure 2) could include one plastic & glass receptacles and aluminum cans module; one paper and cardboard module; one light bulb and fluorescent lamp module; one batteries module; two small WEEE modules; two large WEEE modules.

The Small WEEE Module
This module includes the following:

•
Touch screen: This allows clients to select the waste type (phones, PC drives, printers, laptops, video consoles, microwave ovens etc.). The client can confirm the quantity and the amount of money calculated by the system, and the client will receive a voucher that can be used in supermarkets; • Video recognition system for identifying the waste type; • Weighing equipment; • Smart sensors for waste containers (to know when a container is full), metal detection (percentage of metal in a product), ultrasonic sensors, proximity sensors, fire sensors etc.; Storage system (including sensors for counting the number of products, product placement identification etc.).
The waste flow: The client selects the waste type by using the touch screen, the door opens and the client puts the waste on the loading zone. The door closes, and waste identification and weighing is performed. The sensors for metal detection are used to detect the percentage of metal in the product. If the system accepts the waste, the user confirms if he agrees with the voucher value and receives the voucher. The product (waste) is pushed into a container placed on a conveyor. When the container is full (ultrasonic sensors) the conveyer will transport it to the storage system.

The Large WEEE Module
This module includes the following:

The Small WEEE Module
This module includes the following:

•
Touch screen: This allows clients to select the waste type (phones, PC drives, printers, laptops, video consoles, microwave ovens etc.). The client can confirm the quantity and the amount of money calculated by the system, and the client will receive a voucher that can be used in supermarkets; • Video recognition system for identifying the waste type; • Weighing equipment; • Smart sensors for waste containers (to know when a container is full), metal detection (percentage of metal in a product), ultrasonic sensors, proximity sensors, fire sensors etc.; • Conveyor system; • Storage system (including sensors for counting the number of products, product placement identification etc.).
The waste flow: The client selects the waste type by using the touch screen, the door opens and the client puts the waste on the loading zone. The door closes, and waste identification and weighing is performed. The sensors for metal detection are used to detect the percentage of metal in the product. If the system accepts the waste, the user confirms if he agrees with the voucher value and receives the voucher. The product (waste) is pushed into a container placed on a conveyor. When the container is full (ultrasonic sensors) the conveyer will transport it to the storage system.

The Large WEEE Module
This module includes the following:

•
Touch screen: This allows clients to select the waste type (refrigerators, washing machines, TVs etc.). The client can confirm the quantity and the amount of money calculated by the system, and the client receives a voucher that can be used in supermarkets; • Safety system with doors; • Video recognition system for identifying the waste type; • Weighing equipment; • Smart sensors for counting, product placement identification, proximity sensors, fire sensors etc.;

•
Conveyor system (the waste is stored directly on the conveyor).
The waste flow: The client selects the waste type by using the touch screen, the door opens and the client puts the waste on the loading zone. The door closes, the waste identification and weighting are made. The sensors for metal detection are used to detect the percent of metal in the product. If the system accepts the waste, the client confirms if he agrees with the voucher value and receives the voucher. The transport and storage are performed on the conveyor. The conveyor works in accumulation, which means that each object is pushed forward by a new object until the deposit area/conveyor is filled.

The Plastic & Glass Recipients and Aluminum Cans Module
This module includes the following: • RVM (reverse vending machine): RVM will take, identify and sort the waste; The waste flow: There are two pieces of RMV equipment which will identify and sort the waste. The conveyor will transport the waste to the dedicated container (cans, plastic, glass). The conveyer contains deviation units to sort the waste to the dedicated container. The ultrasonic sensors will notice when a container is full and the conveyer will transport the waste to the next available container. At the end, the client receives the voucher.

The Paper and Cardboard Module
This module includes the following: • Touch screen; • Weighing equipment; • Smart sensors: humidity sensors, fire sensors etc.; • Baling press; • Conveyor system; • Storage system (where the bales are stored-paper and cardboard separately).
The waste flow: The client introduces the waste using the input slot. The paper and cardboard are weighed and tested for humidity. The client receives the voucher. If the paper or the cardboard is too humid, it is sent to a different container. The accepted paper and cardboard are sent to the bailing press. The resulted bale is transported by a conveyor to the storage system.

The Batteries Module
This module includes the following: • Touch screen; • Video recognition system for identifying the waste type; • System for collecting the wastes in larger containers; • Smart sensors (ultrasonic sensors, sensors for counting the number of products etc.).
The waste flow: The client introduces the batteries using the input slot. Next, the battery identification is performed. The batteries are collected in a large container. When the container is full, the conveyor will transport it to the storage system.

The Light Bulb and Fluorescent Lamp Module
This module includes the following: • Touch screen; • Video recognition system for identifying the waste type; • System for collecting the wastes in larger containers; • Smart sensors (ultrasonic sensors, sensors for counting the number of products etc.).
The waste flow: The client introduces the waste using the input slot. Next, the waste identification and sorting are performed. The waste is collected in larger containers. Special containers are used to avoid breaking the light bulbs or the fluorescent lamps. When a container is full, it will be pushed to the conveyor in order to be transported to the storage system.

Results and Discussion
The IT reference architecture for smart cities represents a generic framework for developing applications that use data transmitted by IoT (Internet of Things) to generate actions or to assist decisions. Proposed architectures are covered by various authors [25], enlarging IoT usage to assist and monitor ecological issues [26] or for implementing the Industry 4.0 concept in several industries [27].
Using cloud platforms allows diverse sensors to connect to the service hosted by the cloud platform, to transmit measured data, and to generate active actions or alarms when the measured values exceed a certain threshold. Moreover, generated data could be further analyzed to properlu assess the resources needed or manage processes. A detailed description of IoT platforms available on the market is given in [28]. In our case study, the platform for the automated waste collection system allows real time monitoring and communication with the central systems by giving details about each module:

•
Module status (working, blocked, needs repairs or maintenance etc.); • Status for all equipment; • Storage system status (allows full reports for all waste types); • The amount of waste for each module, allowing optimal discharging; • Full reports for clients, companies and city hall (or other public entities); • Possibility of supporting a mobile application for clients and company; • Client redirection to other systems if current system is full (including distance route etc.); • Route optimization for waste discharging (on city or county level).

Cloud Services Overview for Azure IoT Suite and Reference Architecture
The virtualization of IT capabilities offers various forms of services. Mainly, started as an infrastructure as a service form, where the user had access to superior hardware, the cloud providers further developed solutions for offering access to the customer of preinstalled software architectures (platform as a service) or for service access (software as a service). The detailed features of Microsoft Azure presented in [29] reveal a series of services which can be integrated into an IoT suite, having as a result a coherent application. Microsoft offers also preconfigured IoT services to demonstrate the technology capabilities [30]. The IoT suite for automated waste collection system is currently under development, and in this paper, design principles and some special issues related to the data collection and deliver functionalities according to scope are presented.
Data collected from AWCS is received via Internet by an IoT Hub to ensure the proper security measures. The security of IoT communication still remains an issue, largely debated in [31].
The advantage of using IoT Hub is that a single point-to-point communication channel could be used by all AWCS sensors, grouped into a device. Moreover, using twinning function for devices will allow an easier scalability function. The P2P is established using a GSM module through mobile network. After receiving data from AWCS, the content is filtered by stream analytics and, depending on the subject, is deposited into blobs. By comparing measured data with threshold value, an alarm or action is triggered. By reading data from blobs and integrating the notification flow, Power BI is used to display relevant information regarding the waste collection process. The results are shown to various types of users, identified using the active directory service, in desktop or mobile device versions, or available as web page. The collection reports and other type of resulted documents are stored into blobs. Using the collecting and discharging of waste data, the forecast of waste collection and discharging volume are applied using a machine learning module and the resulted data is returned to blobs for storage. The correspondence between IoT suite functions, Azure services and actions required is given in Table 1.
In Figure 3 the block diagram for chosen reference architecture is presented, with the following modules: IoT Hub, stream analytics, Azure storage, event hub, Azure app service, Azure machine learning and Azure logic apps. For each block, the main functions, files and additional developing resources are depicted. all AWCS sensors, grouped into a device. Moreover, using twinning function for devices will allow an easier scalability function. The P2P is established using a GSM module through mobile network. After receiving data from AWCS, the content is filtered by stream analytics and, depending on the subject, is deposited into blobs. By comparing measured data with threshold value, an alarm or action is triggered. By reading data from blobs and integrating the notification flow, Power BI is used to display relevant information regarding the waste collection process. The results are shown to various types of users, identified using the active directory service, in desktop or mobile device versions, or available as web page. The collection reports and other type of resulted documents are stored into blobs. Using the collecting and discharging of waste data, the forecast of waste collection and discharging volume are applied using a machine learning module and the resulted data is returned to blobs for storage. The correspondence between IoT suite functions, Azure services and actions required is given in Table 1.
In Figure 3 the block diagram for chosen reference architecture is presented, with the following modules: IoT Hub, stream analytics, Azure storage, event hub, Azure app service, Azure machine learning and Azure logic apps. For each block, the main functions, files and additional developing resources are depicted.

Data Collection and Azure IoT Hub
The Azure IoT Hub allows data collection from a wide range of sensors connected to various devices [32], assuring a two-way communication between cloud applications and registered devices. The device lifecycle in Azure IoT Hub contains five stages: • Planning: where the cloud application operator defines and creates the metadata scheme. Later, it will be used for querying relevant data and grouping devices by using a twin device. The device properties are stored into Cosmos DB database; • Provisioning: discovering relevant device options and achieving scalable operations using a bulk technique for device identities and credentials; • Configuring: managing device changes using already provisioned bulk properties, to update it to current state; • Monitoring: the status of running operations and health of devices are continuously checked by the service and anomalies are reported as notifications that further could be displayed using Azure app service; • Retiring: the device is replaced or decommissioned at the end of lifecycle.
In the AWCS case, data received into IoT Hub are presented into an endpoint and further used using stream analytics. The metadata scheme is stored in Cosmos DB, containing relevant information regarding the device. From this application perspective, the geographical coordinated and telemetry properties are listed and could be modified according to scope. The telemetry invoked for the application purpose is the weight and number of items deposited into waste compartment described above. The frequency of sending data by sensors is not yet established-after equipment full deployment and a series of tests a decision will be made-and sending internal images of AWCS remains an issue to be discussed with the AWCS beneficiary. For the provisioned flow of IoT Suite, the frequency is set to 5 min, being temporarily stored by the IoT Hub for up to seven days, being available for all protocols. If additional images are required to be sent, data are stored in the Azure storage account, with a frequency being lower in this case because of IoT Hub limitations [33].
From an AWCS point of view, each waste compartment has several sensors, some of which will be used to monitor the current operational status of equipment and others to monitor and alert waste collection level using notifications, monitoring the weight or number of waste items collected to be discharged by discharge operators. All AWCS sensors will be connected to a single board which henceforth will be called the device. Currently under development, the AWCS' complete list of sensors will be further updated. From the first category, power off, conveyor jammed, fire detectors, proximity sensors, and the identification of the percentage of metals are mentioned. In the case of waste collection monitoring, when the collection level exceeds a threshold of 80% of the total, taking into consideration weight and/or number, an alarm is set off to signal the discharge readiness status. Each type of waste should be discharged separately by different discharging teams.
However, in the case of IoT Hub and connected Azure, the following services are critical: • Managing devices; • Managing messages; • Store IoT messages; • Visualize sensors data; • Collection and discharging forecast.

Stream Analytics and Azure Storage
The data stream concept, used to manipulate data inside of IoT reference architecture, supposes that the records do not have a specific format, because data content depends on type of sensors used, representing data flow through application. As types of data presented to IoT Hub which will be further sorted and aggregated using stream analytics, the following can be foreseen: • Telemetry: indicating values from selected sensors; in the AWCS case, weight and number of collected waste items; • State, notifications and actions: for each AWCS compartment, several sensors are provisioned and lack of flow could indicate the change of status health; • Time stamps: for each record, a time stamp is added when it is presented to IoT Hub, being used for further processing into the system; • Device metadata: when a device firmware is updated or device is replaced, the metadata containing the main features parameters is send to be recorded into Cosmos DB, associated to device parameters and functions.
Regarding the endpoint for stream analytics, the data flow could be routed to storage, in relational or non-relational form, blobs being often used in Event Hub in the case of notifications or alerts and in Azure app service for the instant visualization of telemetry transmitted from devices. Furthermore, stream analytics might route the dataflow as follows: • Unaltered: when the records from dataflow are routed, for instance, to be stored into a blob, the stream using the endpoint of IoT Hub as source and a blob as output, having a single input and a single output; • Telemetry transformation: when data presented by sensors is in a different measurement system and it is transformed for further storage or visualization; • Statistics over time series: calculating various statistics parameters (e.g., minimum, maximum, average value) in a time frame, using tumbling and hopping window techniques for data sampling; • Notifications and alerts: filtering only values that exceed the threshold, an action being foreseen in case of alerts, by the back-end application, using twinning a single threshold is defined for all devices for a certain telemetry; • Peer-device telemetry: dataflow is routed to multiple storage, using device ID for filtering input stream, having in that way an easier access to device telemetry history.
Analyzing Table 1 and keeping in mind the similar solution developed by Microsoft [30], several streams are proposed, with some changes over the preconfigured solution: • Device info: where only the messages regarding device information that could be displayed in late queries are filtered from the stream; this kind of message being sent by the device at first start or by system request, the input is data stream and output event hub; • Threshold and notifications: values of thresholds that generate a notification might be determined either by direct coding or to have as separate entries to a table. The monitored parameters for each device, in the AWCS case weight and count for each waste compartment type, is compared to threshold value and a notification is generated that is pushed to the event hub. For weight two such thresholds are foreseen, one for 80% of total weight, when the system only displays this notification into AWCS dashboard, and one for 95% of total weight, the AWCS being displayed to discharge the map, and signalize dispatch manager for imminent discharging by e-mail. In this case, the input is given by IoT Hub endpoint stream and output is the event hub. Blob storage for all notifications and blob for status report; • Device status: for the operational point of view, the foreseen sensors to identify AWCS malfunction status (e.g., jammed, black out, fire detector) are separately filtered from the stream; in this case, changing values over the last record or exceeding a threshold will generate an immediate action, operated by back-end application, pointing out, on the maintenance map, the AWCS, sending messages to the maintenance team, delivering details about status change. However, the input is the same the IoT Hub stream and output; first the event hub and second, a dedicated blob, for status report; • Telemetry: presented in Figure 4, for each compartment, values obtained for weight and count will be stored into separate blobs, for further usage of data in the web app and discharge forecast. In this stream, various additional data could be summarized which result from direct usage of filtered data: daily weight of waste, daily average waste weight by type, last discharge, percent of total weight etc. As input is considered the IoT Hub stream having multiple output, blob for raw telemetry, daily collected weight by waste type and discharging reports by type.
Sustainability 2017, 9,2064 12 of 16 of total weight etc. As input is considered the IoT Hub stream having multiple output, blob for raw telemetry, daily collected weight by waste type and discharging reports by type.

Event Hub and Web Application
The event hub is used to forward the stream data from the device into stream analytics to update existent Cosmos DB and to actualize the content for rules (threshold, notification and actions). The event processor reads messages from the event hub and post its into web page by web job. The retention of messages into the event hub is limited by default to 24 h, for the standard pricing tier [34] (84 GB of event storage), up to 1 MB/s incoming messages and 2 MB/s outgoing messages consumed by an external app. The event hub has also the possibility of capturing events for a greater retention period using the Azure storage blob account. The incoming events in AWCS case are represented by setting new devices and the definition of new rules or changing rules, so it is not expected to reach the basic tier limits. The consumers in the current situation are given by Cosmos DB device info and

Event Hub and Web Application
The event hub is used to forward the stream data from the device into stream analytics to update existent Cosmos DB and to actualize the content for rules (threshold, notification and actions). The event processor reads messages from the event hub and post its into web page by web job. The retention of messages into the event hub is limited by default to 24 h, for the standard pricing tier [34] (84 GB of event storage), up to 1 MB/s incoming messages and 2 MB/s outgoing messages consumed by an external app. The event hub has also the possibility of capturing events for a greater retention period using the Azure storage blob account. The incoming events in AWCS case are represented by setting new devices and the definition of new rules or changing rules, so it is not expected to reach the basic tier limits. The consumers in the current situation are given by Cosmos DB device info and rules. The content of captured notifications is stored into the consumers' directory together with the last version of the device info and rules table.
The web application service allows the delivery of the content of a web page for desktop and mobile. The Azure platform offers three other similar services for web service deployment: Cloud services, virtual machines and service fabric. Complex web services using various architectures, such as microservices, could be deployed in the web application service [35]. From an AWCS deployment point of view, regarding the functions defined in Table 1, the next sections of web content would be as follows: • Device dashboard: shown in Figure 5, with map position, overall status, compartment status, weight and count for each department, discharging alerts, last seven days' average collected waste by type, push on discharge map by type, alternative AWCS position when status is full;

Forecasting Waste Discharging with Machine Learning and Logic Apps
In the AWCS prototype, the waste forecasting is not yet fully deployed because of missing historical data about waste collection and discharging. However, the prediction of a discharging date is made using the last seven days' average and considering available collecting weight or count at disposal for each waste type. After sufficient data storage into designated blobs into Azure storage regarding the daily average collected weight, more elaborated prediction algorithms could be applied [36] for a long-term prediction of collected waste weight or discharging planned data. Moreover, sophisticated reports will be available by using time-series prediction.
As a process, Azure machine learning reads values stored into a designated blob, applies sorting, filtering and check data consistency. The reference data is computed using prediction algorithm and foreseen data are obtained. As programming languages for prediction algorithms, R and Python could be used. The result is saved into forecast data blob and further used by the Azure app service to be displayed into device dashboard or other reports.

Forecasting Waste Discharging with Machine Learning and Logic Apps
In the AWCS prototype, the waste forecasting is not yet fully deployed because of missing historical data about waste collection and discharging. However, the prediction of a discharging date is made using the last seven days' average and considering available collecting weight or count at disposal for each waste type. After sufficient data storage into designated blobs into Azure storage regarding the daily average collected weight, more elaborated prediction algorithms could be applied [36] for a long-term prediction of collected waste weight or discharging planned data. Moreover, sophisticated reports will be available by using time-series prediction.
As a process, Azure machine learning reads values stored into a designated blob, applies sorting, filtering and check data consistency. The reference data is computed using prediction algorithm and foreseen data are obtained. As programming languages for prediction algorithms, R and Python could be used. The result is saved into forecast data blob and further used by the Azure app service to be displayed into device dashboard or other reports.
Azure logic apps are used to determine anomalies of AWCS functioning and reporting. Presented data is further processed to identify possible data mismatching or AWCS malfunction. For instance, the weight ratio per item is checked, depending on user selection. Furthermore, if number of collection actions per unit of time exceed an accepted threshold, an alarm will be raised indicating possible security attack with fake operations. Those logic rules are subject of further development after AWCS will be fully deployed and encounters real situations.

Conclusions
The design of the cloud IoT platform described here is a complex process which requires a full analysis of various points of view: the technical process represented, reference architecture for service used, security measures etc. The main research results presented here focus on collection and discharge operations for AWCS, integrating device connection, data processing, analytics and management, presentation and business logic integration. The large variety of cloud services, offered by cloud providers, offer a great advantage in developing cloud environments, but can also be a serious barrier when lack of product features and sampling code is present. Also, the implementation team should include different positions from the system architect, database manager, web developer, network engineer, software developer etc.
The preconfigured solutions offered by cloud providers can be a good starting point for learning and designing the IoT suite, but further efforts must be made to achieve solution goals and business requirements. As a matter of cost, each cloud service foreseen in the above presented reference Azure logic apps are used to determine anomalies of AWCS functioning and reporting. Presented data is further processed to identify possible data mismatching or AWCS malfunction. For instance, the weight ratio per item is checked, depending on user selection. Furthermore, if number of collection actions per unit of time exceed an accepted threshold, an alarm will be raised indicating possible security attack with fake operations. Those logic rules are subject of further development after AWCS will be fully deployed and encounters real situations.

Conclusions
The design of the cloud IoT platform described here is a complex process which requires a full analysis of various points of view: the technical process represented, reference architecture for service used, security measures etc. The main research results presented here focus on collection and discharge operations for AWCS, integrating device connection, data processing, analytics and management, presentation and business logic integration. The large variety of cloud services, offered by cloud providers, offer a great advantage in developing cloud environments, but can also be a serious barrier when lack of product features and sampling code is present. Also, the implementation team should include different positions from the system architect, database manager, web developer, network engineer, software developer etc.
The preconfigured solutions offered by cloud providers can be a good starting point for learning and designing the IoT suite, but further efforts must be made to achieve solution goals and business requirements. As a matter of cost, each cloud service foreseen in the above presented reference architecture is calculated using a different algorithm and is available at several price tiers. The main advantage of cloud suites is the possibility of upscaling or downscaling the resources used without express changes into the suite code, or, even more, auto-scaling the resources needed. As a whole, the solution presented here is able to gather information from multiple containers collocated in the same selective waste collection system. Containers with different types of waste can be monitored in real time. Also, other information from the selective waste collection system can be provided for companies, authorities and population, e.g., equipment status, storage system status, the total amount of wastes collected allowing optimal discharging, route optimization for waste discharging.
Our future research will be focused on some specific applications of digital twinning in improving the collection level of various waste types. The focus will be on the exploration of different possibilities to increase productivity and profit in waste collection architectures using an approach based on virtual modelling and simulation. The proposed main topics of this further research are the characteristics of digital twinning in diffused and concentrated waste collection architectures, virtual modelling of the waste collection architecture structural elements, digital twinning simulation algorithms, and diagnosis and optimization for waste collection architectures in a smart city environment using digital twinning. The digital twin of the waste collection or processing architecture will become a part of the waste collection system design. This digital twinning will provide a diagnose of the system performances in different waste collection scenarios.