DEVELOPMENT OF NEW RADAR AND PYROELECTRIC SENSORS FOR ROAD SAFETY INCREASE IN CLOUD-BASED MULTI-AGENT CONTROL APPLICATION

The paper concentrates on the design, architecture, and monitoring of smart LED street lighting control, with focus on traffic safety and safe road infrastructure. The use of a CMAS (Cloud-Based Multi-Agent System) as a possible framework is investigated. The work is based on previous developments by the authors in the production and design of close and longrange hybrid Pyroelectric Infrared (PIR) motion detection sensors. It also introduces the advances in radar-type sensors used in smart SLC (street lighting control) application systems. The proposed sensor solutions can detect the road user (vehicle or pedestrian) and determine its movement direction and approximate speed that can be used for dynamic lighting control algorithms, traffic intensity prediction, and increased safety for both driver and pedestrian


Introduction
The expanding use of cloud computing services in all forms of application control lends itself well to incorporating a Multi-Agent System (MAS) into existing and developmental structures. The smart LED street lighting system eventually will become a part of smart city concept, but already it is a complex system, as it consists of several components, such as dimmable LED luminaire, movement detection and other sensors to control the light output, integrated luminaire controller that allows for communication between LED driver and gateway (called also street segment controller) and the centralised control system (cloud or web-based software). Each component has certain means of control, precision and technical limits, thus posing impact on lighting quality parameters defined by standard (EN13201 part 2), where for Class M they are average lighting (L, cd/m 2 ), regularity of horizontal lighting (U 0 ), irregularity of longitudinality (U l ), dazing coefficient (ƒTI) and background lighting (REI), and for Class C -average horizontal lighting (E, lx) and regularity (U 0 ). To ensure traffic safety and safety of road users, a lighting system needs to maintain parameter values above the minimum requirements. Accordingly, the lighting class M (or C) is determined by applying Eq. (1), where the varying weighted sum (VWS) is used or individual parameters (2) that create the sum are analysed. Dynamically varying parameters, taking into account also specific conditions, are traffic speed (V v ∈{2;1;−1;−2}) and traffic intensity (V i ∈{1;0;−1}), and the constant parameters are the content of traffic participants (V c ), the density of crossings (V s ), presence of parked vehicle (V p ), surrounding lighting (V a ), the complexity of navigation (V n ), considering that it is night time. The sum of constant parameters can vary between the whole value range from +8 to −1. If the VWS sum is less than 0, the value "0" is used for calculations. If M ≤ 0, Class M1 is applied. (2) 2014) are described as individual LED street lights with hybrid longrange control sensors. These "agents" perform tasks based upon predefined goals. When provided remedial intelligence (currently fuzzy logic architecture), the agents pursue goals to optimise given performance measures in an environment that can be difficult to define analytically. An agent can act upon its territory or Workspace Envelope (WE), which defines the Cartesian range of movement or the field range of its sensors and allows it to interact with other agents with conflicting goals towards a common goal. The ability of agents, when imbued with limited or global perception of situational variables, to affect the system environment is dependent entirely upon implementation. Merging MAS with cloud computing for inclusion in street lighting control and traffic safety is both novel and sensible considering the ease of consolidation. It is generally assumed that street lighting systems require only illumination, darkening and dimming at predefined times and require no further consideration. Incorporating the hybrid sensor system into each agent brings with it a completely new range of data sets, which not only lend themselves to MAS control but to a new level of safety characteristics previously not addressed within similar systems.
Cloud computing architecture also permits and extends the diversity of control services for Smart LED street lighting technologies. If it is successful, it will significantly increase public safety (Bertagna, 2013;Adrian et al., 2014) and may substantially reduce the deployment costs across the whole system. As MAS is designed to operate on sensorbased arrays specifically, the opportunity exists to explore many other initialization avenues, including fault detection in automotive power printed circuit board (PCB) (Repole et al., 2017) or as a CMAS for sensor networking city transport systems.
From the authors' experience in LITES project, radar sensors have some false detection during rainy conditions, and PIR sensors have issues of detection in case when ambient (or asphalt) temperature is similar to car temperature, like during hot summer nights, or in winter, when a car is just started and emits less infra-red radiation. This can be solved by implementing changeable sensor sensitivity ranges and proper signal filtering.
The solution could be a hybrid/modular sensor system, through combination of two technologies into one sensor, or installing both sensors on the same streets but on different lighting poles, thus creating a more robust system, where such an approach also allows checking system errors and is interchangeable with the PIR system as either a primary or secondary structure. From an operation perspective, the two approaches are at either end of the spectrum yet work together to form a stable system. The developed sensor array is an end solution to 1.

Research essentials
Each array consists of several short-range sensors, and we envisage after final testing there will be the initialization of one long-range sensor per array. Sensors are a hybrid of sensing elements and require no more than a passing mention. The temperature, humidity and rain sensors will initially be off the shelf components, easily included and do not require scientific research or study except within their specific fields of use. It is sufficient in our case to have them based on overall data retrieval and evaluation. In reality, the inclusion of sensors will be determined to be unnecessary or more required depending on preference and system design. Figure 1 presents the primary element configuration for a single long-range agent. Short-range agents vary only in excluding the longrange lens, which is replaced by the appropriate Fresnel lens in the shortrange version.

MAS development factors
Describing the whole system, we must define the actors. Figure 2 demonstrates a micro-array (Array A to Array…n) being a road, a street, or a walkway, or any other area designated for installing the system. The defining features are the agents or actors; the intelligent streetlights complete with their sensory systems.
An agent (Agent_1 to Agent_n) may be interconnected or islanded from the network and is composed of two distinct states. The agent is ascribed asynchronous communication. The process of sending and receiving messages and control data is independent of a coordinated clock signal between agents due to the requirement for each to operate within a unique and dynamic environment. In this way, a single agent can react to unpredictable event triggers yet maintain information transfer to the network simultaneously. Utilising this approach, the agent becomes separated and decentralized dependent on individual event triggers, which may not be affecting other agents within the array.
As a distributed MAS, individual elements of micro-array management must adjust to varying conditions within each state framework. An interconnected micro-array in cooperation with its agents must manage switching, illumination levels, energy consumption analysis, and data transfer to and from the CMAS, which maintains constant analysis of the combined network of micro-arrays. An example might be the various management modes under the decision algorithm of the CMAS, which may affect shared intersections of micro-array A and micro-array B due to any number of location-specific incidents that may vary significantly across a town or a city.
When islanded, or when an agent has entered standalone mode due to a specific event trigger, all systems of that agent may become autonomous yet continue to transmit data between its brother agents and therefore to the CMAS relying upon its decision-making process will become actively involved or remain silent. Regardless of the agent state, the CMAS will seek the most favourable solution to allocate objectives where necessary.

The strategy of a non-synchronous system
Unlike many MAS systems, a synchronization strategy holds little importance due to the agent dynamic nature described in Section 2 above. Operation as a distributed system requires typically that all agents operate in a synchronous manner. Various agents and synchronization within the system are a primary and necessary objective. Without synchronization, complex software modelling and simulations applications fail to function. For example, in a pedestrian counting simulation, the physical area where targeted pedestrians are located may be segregated into various parts and monitored by an agent. However, those pedestrians may wander from one physical location to another. Without a synchronization mechanism, pedestrians walking from one agent to the next would be misplaced in real-time, where one Agent is ahead or behind in the model simulation. Therefore, uncontrolled synchronization would generally invalidate the simulation process due to overlapping past, present, and future tense events or triggers. It should be apparent that even a non-synchronous system dealing specifically with random data collection may be synchronous after an event when collated in date/time format. Therefore, the main goal is to achieve data transfer to the CMAS, which is the primary decision-maker at the heart of the operation.
The problems associated with synchronization are system overhead, requiring more complex data retrieval and processing algorithms. Within the proposed system, there is a view to total removal of synchronization overhead, which does not trade accuracy or performance.

Power Management and Smart Power
An exciting facet of creating a data collection system that doubles as a decentralized Micro-Grid and Power Management scheme provides the breadth of control algorithm possibilities. Power management is controlled by the CMAS decision algorithm and may be refined over time; however, the primary triggers are initially within the control loop of each agent designed to respond to environmental or physical changes within its WE. As shown in Fig. 3, the original authors' preferences lie in the fuzzy logic arena. The system built primarily on non-proprietary software lends itself to a whole array of possibilities regarding the choice of protocol and subsequent proprietary software. In this respect, the hardware of the system can become the main focus of the proposal. The Hybrid Long Range Sensor consists of one quad PIR sensor (incorporated lens), 4x static IR sensors, temperature sensor, ambient light sensor, humidity sensor and moisture sensor.

Agent capabilities
One challenge facing distributed MAS with DER systems has been the vast diversity of different components connected to the many microgrids involved. Interoperability is a key to a successful MAS deployment. Therein, the reasoning makes intelligent street lighting systems ideal and very capable in agent classification processes without extensive additional programming and, therefore, an ideal solution for a hybrid Cloud/MAS. Currently, the LED street lighting system with hybrid sensors (the agents) in Fig. 2 is capable of the functions described in Table 1.

LED street lighting system (using hybrid sensors)
As mentioned earlier, this study is mainly aimed at reducing energy consumption (over the past decade, a major step towards improving the energy efficiency of street lighting has been the replacement of old gas discharge lamp based luminaires with new LED luminaires) and improving safety on the streets/roads by introducing modern technologies, modern control systems for street lighting. As in all other areas, the safety on the streets is based on compliance with the standards. In the present research, we focus on street lighting; thus, the road lighting standard EN 13201 should be considered a key reference. In this standard, a whole chain of parameters defines the minimum required lighting class for a particular road / street. Particular attention should be paid to time-variable parameters, since the lighting system can be made dynamic, adaptable to certain specific conditions at the moment. We consider this dynamic adjustment of the lighting system to be the second most significant step in reducing the energy consumption of a street lighting system without compromising road user safety and without deviating from the standard requirements.
Thus, particular attention in this research is paid to sensors as depicted in Fig. 4, which are the primary control system input elements to determine motion/traffic flow/direction/speed/user type. The radar (RAdio Detection And Ranging) type ( Fig. 4c), long-range hybrid PIR sensor ( Fig. 4a) and close range PIR sensor ( Fig. 4b) are discussed in this article as the key sensors that can cope with this task.
The requirements for the street lighting system and possible functionality can be summarised as follows: • Increased energy efficiency -light delivered only when and where needed (less light pollution); • Exact lighting class determination on real traffic data according to EN13201; • New services and functionality added to the system (improved return of investment values); • Introduction of new prediction, maintenance and control algorithms; • Decentralized control, the system can analyse and make decisions -the system becomes smart; • Context data application to enable participation in energy price markets (like Nordpool) or adjust consumption according to current price forecast; • Safety: Forecast warning system for the road user (weather and road conditions).

01 / 1 6 (4)
All sensor elements, as depicted in Fig. 3, are "off the shelf" components except for the ambience sensor whose task is to control the responsivity of the sensors according to ambient lighting conditions. The component, though simplistic in design, is of great importance in the response triggers associated with passive infrared sensors.
Intrinsically, the variable resistor R var consists of a single resistor layer {2-1} and a wiper {3} that adjusts the ratio between both halves. Within the circuit, as can be seen in Figure 5, the addition of a light dependent resistor dramatically alters the effect of the standard voltage divider allowing for a dimming effect on U ref that in turn increases sensitivity on sensors in that array. In this manner, more accurate triggering is achieved under bright or low light conditions. Calculation of U ref parameters may be performed using (3).

Fuzzy logic controller
The authors preference for a fuzzy logic controller depicted in Fig. 3 and Fig. 6 is the outcome of a careful evaluation of several controller techniques within several projects. The decision process shows an advantage when used with the parallel computation capability and the possibility to integrate the fuzzy logic controller into a more comprehensive, self-adapting and self-learning system (Repole & Adrian, 2019), with the ability to utilise the shared information between the agent and cloud.
The previous sentence is of paramount importance for establishing a robust design for the long-range hybrid PIR sensors within a smart Cloud LED street lighting system. Environmental variables heavily influence this specific application. The ability of the system to use the shared information between the agents and the cloud is beneficial, especially in light of the possibility that the shared information may also be used for self-training purposes and allow for the system evolution to environmental variables. Additionally, this functionality may be beneficial in minimising the effects of faults within local agents. Therefore, a relevant approach to the research goal becomes the design of an adaptive fuzzy logic rule block capable of accepting and utilising weight change commands from the cloud. For this framework and the authors' licence, the controller implements a small form factor, cost effective Field-Programmable Gate Array (FPGA) for the physical implementation of the decentralized controller. A dedicated paper (Repole et al., 2019) explores the decision process, which generates the outcome described herein.

Data transfer
Adjustments to the control approach were implemented as a cloud computing service. This approach is easily extended with new functionalities without modifying the internal logic of the gateways. The cloud is used to store the data related to the different points of the grid. The proposed architecture provides neighbourhood management  as a service. MAS may maintain the grid stability using only local area information (distributed control) of the luminaire grid. Cloud-Based Multi-Agent System (CMAS) architecture is shown in Fig. 7.
System connectivity should and can be an end-user customizable variable, which will be essentially defined by the application specific environmental and technical requirements. In other words, the ideal MAS systems should be capable of being easily adapted to utilise any of the commonly used data transfer methods, for example: • ST LORA -LPWANs; • Wireless; • GSM/3G/4G internet connection; • ZigBee. Data transfer is readily achievable, adding to the "agent" one specific, or more, communication modules. The fuzzy logic "parallel computational capability" increments the system performance, especially if using an FPGA based gateway that is capable of parallel interaction with all system agents within an array (as in Fig. 2).
The study case requires that the agent covers a wide area and shares relatively little information, usually one or two bytes for each parameter to be transferred. Data transfer speeds between agents is not an essential parameter in that the communication range capabilities are privileged. ST LoRa technology is the perfect solution for the study case. It is a modular / plug-in unit able to deliver, under optimal conditions, data at speeds up to 300 Kbit/s. However, a communication speed of 56 Kbit/s, selected to be RS232 compatible, is larger than the minimum communication speed calculated with Eq. (4). where: Com min -minimum communication speed; Sen refresh -sensor refresh cycle frequency; Param max -maximum number of parameters; Data res -parameter data resolution; Agents max -maximum number of agents per array; T learn = maximum run time; Sen d = digital sensors @ 1 byte per sample; Sen a = analog sensors @ 2 bytes per sample; S ps = samples per second; OF ROAD AND BRIDGE ENGINEERING 2 02 1 / 1 6 (4) S = number of seconds; MOB = onboard memory in Mbytes.
Some problems generally relate to MAS systems and simulations requiring evaluating and impacting data packet arrival at the cloud/MAS and relate specifically to the time synchronization departure/arrival at the system MAS or gateway side. Due to the truly agent nature of each streetlight, the intrinsic ability to enter standalone mode upon receipt of specific triggers provides the system with the added advantage of stability. Each part of the system (e.g., CMAS, main gateway, inter-array and agent array) is designed using standalone algorithms to operate their system component with data transfer to the MAS if a trigger occurs. In this aspect, MAS may be viewed as a data collection, distribution centre that can override all other systems when required. The main priorities of the system are that the MAS collects all transmitted data, providing the instruction to arrays (streets), which control the agents (streetlights). The agents (streetlights) maintain control of their WE (workspace envelope) reacting individually or in unison with other agents to received triggers. With these parameters, it may be said the CMAS is a truly reactive system where, in a given situation, the whole may consist of many parts or vice versa.

Current research progress on long-range sensor lens
Our research has determined that a limited detection range of PIR sensor is primarily due to an absence of unequal exposure, so placing a specific type of lens in front of the sensor extends its detection range. Without a lens in front of a PIR sensor, when an IR emitting body is close to the sensor, at about one m, moving across the sensor path, the radiated IR will expose one element more than the other resulting in voltage output. However, when the IR emitting body is further away from the sensor, its radiation pattern becomes fuzzy, and both elements are exposed more uniformly, resulting in zero voltage output. Simultaneous exposure of both elements is the cause of the limited detection range. A method under evaluation to prevent the IR from simultaneously exposing both elements is ongoing.
Simultaneous exposure of both elements is the cause of the limited detection range. What is required is to prevent the IR from simultaneously exposing both elements as the IR emitting body moves across the sensor path at greater distances from the sensor. Standard dual PIR sensor elements are product independent, range Development of New Radar and Pyroelectric Sensors for Road Safety Increase in Cloud-Based Multi-Agent Control Application in size from 0.9 to 1.2 mm and are spaced approximately 1 mm apart. The PIR has a partition, included to divide the elements. Placing a thin strip of reflective, IR opaque material between the sensor elements we can direct the IR radiation to strike one and then the second element, regardless of direction as depicted in Fig. 8.
The long-range lens consists of a Plano-Convex lens reformed as a Fresnel lens, a collapsed version of the original lens, as seen in Fig. 10. The thinness of both the flat lens and the Fresnel lens is of paramount importance as it is imperative to minimise IR losses through those lenses. Lens construction is from ultra-clear polymethyl methacrylate (PMMA), which is transparent to IR radiation, rugged, and often used as a substitute for glass in products such as shatterproof windows.
In Fig. 9, the baffle allows tuning the field of view (FoV), which at 100 m represents a requirement of approximately 20° to cover the road width adequately. The pyroelectric sensor is susceptible to rapid temperature changes; however, the flat lens inclusion enables the sensor to operate inside a stable shell. The required basic principle is to ascertain an output voltage, that is a function of the amount of infrared radiation sensed at the input of the (PIRA) Passive Infrared Sensor Array. Therefore, responsivity is of the detectors' elements is vital. Two factors are determining the electrical response. The first is the detector's thermal response due to incident radiation, and the second is the pyroelectric material response due to temperature changes. A typical pyroelectric detector system consists of four essential elements. These are the sensor, amplifier, window comparator and coupler.
We look specifically at current response (RI), and voltage response (RV) (Hyseni et. al., 2010), considering C th and G th be the thermal capacity and conductance, respectively: where: c' -volume specific heat, J/(cm 3 K); c -specific heat of material, J/(mgK); ρ -density, gm/cm 3 ; b -sensor thickness, μm; G R -irradiative conductance, W/(cmK); A -detector area, cm 2 ; η -emissivity of the crystal; σ -Stefan-Boltzmann constant, 5.67·10 −12 W/(cm 2 K 4 ); T -temperature, K. Current responsivity of various photovoltaic materials, R I (6), is the ratio of the output current flow Δ Ι to the input radiation power incident  to detector surface P I . The current responsivity can be calculated as (Beerman, 1969): Pyroelectric charge ΔQ is given by: where p is the pyroelectric coefficient of material and P S is the polarisation. Suppose that radiation power is a sinusoidal function; therefore, temperature changes Eq. (8) of whatever detector due to irradiation flux are given by the steady-state equation of Ciupa (1997): Substituting Eqs. (6) and (7) into (5), the final expression for this current responsivity becomes Eq. (9): Voltage responsivity of various photovoltaic materials, R V Eq. (10), is determined as a ratio of the voltage generated in the detector ΔV and radiation power incident to detector surface P i . From this definition, we have (Beerman, 1969): The generated detector voltage Eq. (11) is given by: where ΔQ = pAΔT is electric charge and C d = ε r ε 0 A/b is detector capacitance. When substituting Eqs. Graphs, too large for inclusion within this paper, and indicating the wavelength dependency of the voltage responsivity for different pyroelectric materials, may be found (Beerman, 1969).

Technical analysis of the PIR
Fraden (2010) proposed a model for the PIR motion detectors. We have described the working principles of the PIR sensor in accompanying sections. Fraden's model uses the following assumptions: the subject has uniform temperature distribution and is a diffuse emitter, an image formed on the sensing element is always sharp irrespective of the distance between the subject and the sensor, and the surroundings and the subject are ideal emitters and absorbers. The model considers the sensing element temperature change rate (due to the subject), its thermal capacity, and the absorbed thermal power. Fraden's model is given by (13): where: I -the current generated by the sensor; P -the sensor pyroelectric coefficient; a -the area of the lens; σ -Stefan-Boltzmann constant; y -the lens efficiency; h -the lens thickness; c -the specific heat of the sensing material; b -the effective surface area of the subject; T a -the sensor temperature; T b -the surface temperature of the subject; L -the distance between the subject and the sensor. The model is based on parameters that are difficult to measure experimentally, and information regarding these parameters is not available in PIR sensor datasheet. This model does not account for the Fresnel lens' effect and the subject speed of movement. Additionally, it does not address the simulation of analogue sensor response (as a function of time) when a subject moves through the FoV of the PIR sensor.
The researchers move from the acknowledgement of such criticalities and base the work on exhaustive experimental processes, i.e., focusing only on the theoretical and experimental results for the variation of the output voltage in the distance between the sensor and the subject, and its speed. Assuming a capacitive load and a power supply of 3 V, the sensor activation results in a dual blip, where a forward motion is indicated with a positive first half cycle response (indicatable as a positive blip), while reverse motion is indicated with a negative first half cycle response (see Fig. 11).
The study of the PIR sensor characteristics and field test produces a look-up table that utilises as input: a) the objects direction (Fig. 12); b) the peak to peak amplitude between the two blips (Fig. 14); c) the peak to peak time delay. Data processing through the look-up table produces the estimation of the object size/shape and speed (Fig. 14).

Realisation
The PIR sensor is essentially split into its two substrates and in this configuration allows bi-directional reading plus two readings of radiation sensed (a positive followed by a negative) and is mounted on the vertical axis (Fig. 17b). Simplistic monitoring is achievable with a standard 32-bit low-cost industrial microcontroller (MCU) with an integrated 12-bit successive approximation register (SAR), analogueto-digital converter (ADC). Usually, such kind of MCU offers a single ADC channel with an internal multiplexer with a sampling frequency in the range between 500 kbps and 1 Mbps. This implies a physical limitation on the speed detection of the object. In fact, as the object speed increases, the time between the two blips decreases. This imposes the requirement to use high sampling rates, which results in the effective number of bits (ENOB) deterioration. Therefore, a critical element of the product industrialisation is data processing management. A large number of required ADC samples may introduce software overheads and signal distortions due to several physical factors. In order to increase the detection accuracy and estimated speed range, it is considered to use a dedicated 14-bit ADC capable of 2.5 Msps (LTC2313-14) controlled by a low-cost FPGA integral circuit, which is capable of managing higher operational digital processing frequencies and digital information pruning.

Current research progress on radar type sensors
Originally developed for military purposes, radars are found today in a variety of military and civil applications, since they open up wide opportunities for identifying objects moving in space, determining their direction and speed, and relative sizes, as well as other object parameters.
The radar capabilities are extensive, the principles of their operation can be radically different, but the basic principles remain the same. In simple words, the principle of radar operation can be described as follows: with its transmit (TX) antenna, it radiates electromagnetic energy into space, part of this energy is reflected in different directions from an object (usually called a target), which is at a distance from the radar, then part of this reflected energy (echo) returns back to the radar receive (RX) antenna, the receiver amplifies this signal and after processing this signal, decision is made at the receiver output about presence or absence of an echo from the object and other target information acquired (Skolnik, 2008).

Development of New Radar and Pyroelectric
Sensors for Road Safety Increase in Cloud-Based Multi-Agent Control Application As described above, we consider the radar to be a cost-efficient shortrange sensor due to several circumstances: 1) compact, low cost and simple radars have recently become readily available on the market; 2) detection range of such sensors is of the order of several tens of meters; 3) there are no problems with making the housing, no special lenses are needed, ordinary (opaque) plastic can be used. Thus, the decision was made to build our radar sensor on 24 GHz K-band miniature I/Q transceiver with 2 · 4 patch antenna configuration (Fig. 15).
Here the "radar equation" is written as the product of three factors to represent physical processes: where: P r -a portion of an echo power reflected from the target; P t -power radiated from antenna; G t -TX antenna gain; R -distance to the target;

σ -radar cross-section (RCS) of the target (reflectivity of the target);
A e -effective area of RX antenna. Maximum range of the radar detection R max can be found, when minimum detectible signal of the radar S min is inserted in radar equation (Skolnik, 2008): For the selected microwave transceiver, inserting all the necessary parameters from the datasheet (module sensitivity −111 dBc and carrier frequency 24.125 GHz) we get a maximum range of detection:

Interpretation of transceiver I/Q data
To take all the advances of I/Q radar transceiver, real-time digital signal processing of these two signals (Fig. 14a) is necessary -by using complex Fast Fourier Transformation (Fig. 14b). Then direction and speed of a target can be determined in an easy way using this type of digital signal processing, frequency at a peak in the frequency domain that represents the speed of moving target, while the positive or negative sign in frequency domain represents movement direction of the target -approaching or receding (Fig. 14b). In terms of acceleration of experimental verification, the producer of such radar transceivers offers the ready solution of complex FFT for some of their products (K-LD2).
It also means that the radar in relation to the road must be installed in a special way, directed by the antenna in relation to approaching and receding targets, not perpendicular to the carriageway. This must be considered when installing a sensor of this type (Fig. 15).
For such a sensor with implemented complex FFT, the speed of target is proportional to the Doppler frequency shift f Doppler Eq. (17) according to the following equation: where: bin -FFT output value proportional to Doppler frequency; f sample -FFT sample rate; N FFT -FFT width, bits. First of all, it should be noted that experimental verification of the sensor requires its installation in real conditions with existing infrastructure of lighting system. There are two reasonable possibilities where to install the sensor: on a street lamp itself or on a street light pole (it is true not only for experimental verification but also for final sensor installation as part of the whole system), as shown in Fig. 18. Therefore, the configuration of test setup (and final setup) may vary, especially the housing.
In our case, the available option was installation on a street light pole. The experimental setup was installed on light pole opposite the Faculty of Electrical and Environmental Engineering of RTU, Azenes Street 1 (Fig. 17b). Thus, there are particular requirements for this experimental setup, such as independent or integrated grid power supply, battery and charger, autonomous operation for event statistics collection (grid supply is interrupted, when lamps are switched off). Also, the sensor must be able to commutate grid voltage (equipped with power relay); it must be equipped with more complicated communication module/s for the data transfer to the central management unit. In fact, this sensor should act as a lamp controller (in case of installation on the lamp with the ballast for smart ready solutions many of these additional blocks are not necessary). The block schematics for possible realisation of such an autonomous sensor is shown in Fig.19a, but the practical realisation is shown in Fig. 19b and 19c.
In order to speed up the construction of an experimental prototype, many control units and a communication module from Fig. 19a was replaced with the so-called single-board computer Raspberry Pi Zero W. This solution greatly simplified the work with the prototype, at first, as it made it possible to quickly organise remote access to the collected data, as well as provided the possibility of remote reprogramming and reconfiguration to study the capabilities of the sensor and test different configurations.

Analysis of the obtained experimental data
During these early experiments, it was possible to configure the sensor to obtain data on the direction of movement of objects. Unfortunately, it was unable to configure the sensor for the speed readings during these early experiments. However, this sensor supports speed detection function. The data were stored in the memory of Raspberry and periodically downloaded by connecting via Raspberry Wi-Fi module.  Information about the traffic flow along this street for a short period is summarised in the charts that are provided in Fig. 20. Even this small dataset allows making some conclusions: on such a small street, traffic intensity strongly depends on the time of day, day of the week, holidays and other factors. For example, in Fig. 20a, we see significant overall traffic intensity drop during New Year holidays starting from 1 January. For this period, street lighting could be optimised lowering the light level, thus reducing power consumption. We can also find significant traffic intensity rise during specific hours and specific days (Fig. 20b).
Such a low-cost short-range radar sensor can effectively keep records of traffic flow, counting vehicles, direction, and speed (will be verified in further experiments) -an ideal candidate in place of agent for MAS discussed above. Additionally, in future experiments it is necessary to carry out the verification of cyclist and pedestrian detection by this sensor.

Dynamic road lighting class detection algorithm using new functionality sensor data
Necessary amount of light on the road surface for the selected classes M or C and initial parameters is obtained during software (Dialux Evo or similar) modelling, when selecting the LED luminaire and its rated power value P max . After LED luminaire installation works, lighting measurements in certain road spots can be performed to ensure maximum energy efficiency and lighting quality, and if necessary also correcting the initial set values of real control system (or luminaire controller). Selection parameters of Class M are defined in the introductory part, and for existing systems each time period has Class M corresponding to luminaire power (P min ) or the dimming level that is preprogrammed and stored in luminaire agent or gateway. The actual time is determined from the cloud management system, or from built-in clock. According to the algorithm (see Fig. 21), the time and actual time zone are checked every 10 minutes. If t > t n it must be checked if night has ended and lights must be switched off (city calendar plan); otherwise, the variable n is increased by 1, and the cycle repeats in the next time zone.
The developed radar and PIR movement sensor enable a zero vision approach, as it detects the event and time-stamp and by Eq. (19), necessary parameters of Class M can be obtained: the traffic movement speed (V ν ), traffic intensity (V i ) and maximum traffic capacity (C max ), traffic direction (NL -left; NR -right) and the number of each direction movement events or the number of vehicles N over the respective time frame T (one hour). N i is an i-th measurement in succession over a C max is expressed as the number of vehicles per day, assuming that the maximum value of traffic capacity can increase unexpectedly only in force-majeure situations (weather, exhibitions, concerts, etc.).
Traffic intensity (V i ) is the number of vehicles at one spot -close to lamp sensor placement. Traffic speed (V ν ) initially is the maximum speed limit determined by a road sign, and later it is dynamically calculated from actual sensor readings. Class M requires calculating average V ν values (20) once in an hour (t = 0 up to t = 60 min) or once in a minute (t = 0 up to t = 60 s), depending on the needs of dynamic algorithm accuracy. ). Then, it is determined whether the luminaire has to be individually regulated or the entire group has to be regulated, consequently changing the set P min and P max values. The actual time is obtained, and it is checked whether it does not exceed t n , in this case, turning off the lighting. If not, the cycle is repeated after the delay of 10 minutes.

Conclusions
Smarter elements and additional functionality approach for road lighting systems are essential to ensure safer operation of these systems. The data accumulated for statistical, analytical or probability analysis are crucial as outlined in the paper. Cloud computing with the inclusion of MAS control becomes a technology concept that may be adopted to run such systems. The system does not have to operate faster than the realtime one, as the data results collected at the MAS will not generally be used to control individual agents. Moreover, the MAS will be proactive in the assimilation of data, yet can maintain control of the system as a whole.
Communication (load) balancing of the road lighting control system is quickly reduced and synchronization between MAS and gateway may be extended from milliseconds to minutes, without detriment to the system, negating the need for synchronization across the agents. The multi-layered architecture of the system proposes increased accuracy over time, providing more accurate energy, traffic, pedestrian, weather and area-specific trends.
Preliminary guidelines for modelling the control architecture for the smart street lighting micro-array grid as a Cloud Computing Service have been presented herein. The guidelines address and identify the critical factors, on which the design is based. The developed dynamic Class M detection algorithm, using data from the new movement detection sensor functionality, allows for much smarter control of LED luminaires with appropriate light output quality when it is needed, thus making it also safer for road users.
During our experiments, we have found that long-range hybrid PIR sensor and radar type sensors can be used as zero vision elements for traffic flow detection and analysis, as all road users have been detected that are crucial elements for MAS agents described above. However, further experimental verification and improvements are necessary to obtain precision in various situations.

Funding
The publication is created with the support of the European Regional Development Fund project "New sensor and control algorithm development for smart city street lighting systems (SAVAS)", under Grant Agreement [number 1.1.1.1/18/A/115].