# Introduction n the last decade, there has been a growing interest in security applications and, in particular of techniques to crowd density estimations in critical areas such as airports, stadiums, supermarkets, and other aggregation areas (Singh et al., 2020;Rahman et al., 2006;Ohmann et al., 2006;Oeimiane et al., 2020;Jeong et al., 2013). The most popular techniques aimed at detect crowds are based on image processing (Paulsen et al., 1997;Velastin, 1994;Marana, 1997;Jarndal & Alnajjar, 2018), but they require video cameras, and infrastructures to correctly work (Paulsen et al., 1997). Other systems make use of acoustic sensors distributed in a given area like in (Zappatore et al., 2017). Other techniques make use of a radiofrequency identifier (RFID) tag (Weaver et al., 2013) or wearable dedicated electromagnetic sensors (Paine, 2008; Kulshrestha et al., 2020) that people must wear, so they are not suitable in a situation where individuals are not collaborative. Recently the great diffusion of mobile phones makes possible the development of methods to monitoring the crowd by using the signals emitted by phones (Heath et al., 1998;Hudec et al., 2005;Puscasiu et al., 2016), unfortunately, the mobile phone companies do not provide the information related to protecting the user's privacy, and a direct localization of the users is impossible (Aziz & Bestak, 2018; Pinelli et a limited portion of the electromagnetic spectrum, and to increase the user and maximize the channel number, the companies make use of time and frequency domain multiplexing methods that make the localization and estimation of user number quite complex. In this work, a compact, light, and portable system, that does not require specific infrastructures such as cables, mechanical supports, or dedicated computational resources is proposed. This system is based on the analysis of the electromagnetic spectrum by using a spectrum analyzer (SA) (Bertocco et al., 2006) to calculate the power spectrum density on the whole mobile phone channels used by mobile phone companies. In particular, despite the limited number of mobile radio channels, when lots of users have connected, the power spectrum density increase. The goal is to found a relation between the user's number and the power spectrum density deriving a specific model based, in particular, the simple linear regression model (Kutner, 2005;Afifi et al, 1967;Mahmud et al., 2010), is considered, and its parameters are derived by mean of a set of measurements in controlled environments. The proposed system not only permits to estimate of the crowd density in a given area but also makes it possible to evaluate the number of users for each mobile company providing their diffusion in a given urban area, and from a marketing point of view, this is a great advantage. The manuscript is organized as follows: Section II introduces the description of different mobile phone standards and the mathematical formulation for the regression model. Section III reports the system calibration and a selected set of experimental results related to real scenarios. Finally, Section IV concludes. # II. # Mathematical Formulation In the following, a brief description of how the electromagnetic spectrum is used by the different mobile standards is reported. In particular, in mobile networks, and Absolute Radio-Frequency Channel number -ARFCN is used to identify a pair of physical radio carriers that are used for transmission and reception in a mobile radio system; one carrier is associated with the uplink channel, the other to the downlink one. In GSM (2G technology), uplink and downlink channels are identified by ARFCN. With the time-based component Time-Division Multiple Access -TDMA (Robert & Barra, 2001), physical channel in GSM is defined by a specific ARFCN and a relative time slot. The proposed system does not consider 2G technology because it is obsolete and almost completely non-used. The system considers 3G and 4G technologies because they are the most diffused and used nowadays. In UMTS for third and fourth generations, ARFCN has been replaced with UARFCN and EARFCN, which are simpler and always have a direct relationship between the frequency and the associated channel number. A UARFCN -UTRA ARFCN, where UTRA stands for UMTS Terrestrial Radio Access, is used to identify a pair of frequency channels as in 2G but in the UMTS frequency bands, the same for EARFCN. Tab I shown the channels dedicated to the different standards, while Table II details the channel number and the bandwidth associated with each mobile company. Every channel has a bandwidth of about 5 MHz. To measure the channel's power devoted to mobile communication, a digital spectrum analyzer (DSA) and a broadband log periodic antenna (LPDA) were used. In particular, the DSA integrates the fast Fourier transformer (FFT) samples in the whole frequency spectrum measured by DAS considering the following relation: ?? ??? ?? = ? 10 ?????? ?ð??"ð??" ?????????? ??? ?? +?? ?ð??"ð??"? 10 ?? ?? =0 ???? (1) where WB is the window bandwidth, and it is equivalent to the noise bandwidth of the resolution bandpass filter of the DSA, ch n = {n = 1, 2, 8, 7, 20, 32, 38} is the band number related to the different standard, ?f is the resolution of the SDA video filter, FFT(f) is the spectral power measured at frequency f and it is expressed in dBm and M is the number of samples of the FFT. When connections will increase also the channel's power increases; consequently, it is worth noticing that the channels number is limited, and they are used using time and frequency multiplexing techniques to increase the user's number. The measure of total spectrum power ?????? = ?? ?? ??? ?? ??={1,3,7,8,20,32,38} ? can provide an estimation of customers connected x. In particular, the goal is to find a model able to describe the relationship between the total power spectrum versus the user's number ??????{??}. The model can be described with the dependent variable ??????{??} and the independent variable ?? , since we are dealing with two quantitative variables, it is possible to consider a simple linear regression model (Kutner, 2005;Afifi et al., 2005, Mahmoud et al., 2004) expressed by the following relation: ??????(??) = ?? 0 + ?? 1 ?? + ??(2) where ?? 0 and ?? 1 are the predicted value of the total power spectrum when ?? 0 = 0 and the regression coefficient, respectively. The two coefficients ?? 0 and ?? 1 can be easily estimated by using the ordinary least square (OLS) as follows: ?? 0 = ? ?????? ? ? ?? ?? 2 ? ?? ? =1 ? ?? ?? ?? ? =1 ? ?? ? ?????? ? ?? ? =1 ?? ? =1 ?? ? ?? ?? 2 ??? ?? ? ?? ? =1 ? 2 ?? ? =1 (3) ?? 1 = ?? ? ?? ?? ?????? ? ?? ?? ?? ?? ? =1 ? ?????? ? ?? ? =1 ?? ? =1 ?? ? ?? ?? 2 ??? ?? ? ?? ? =1 ? 2 ?? ? =1 (4) Where H is the total number of measured samples, thanks to relations (2), (3), and (4), it is now possible to relate the number of users versus the total power spectrum measured with the spectrum analyzer. # Calibration and Experimental Assessment of the System In this section, the calibration and experimental assessment of the proposed system are carried out. First of all, a set of measurements has been done to estimate the coefficients of the linear regression model. Then a measurement campaign is carried out in a realistic scenario. # a) System Description The system is composed of a handheld digital spectrum analyzer SpecMini (Transcom Instruments Company), with a frequency range 9KHz-6.0GHz, sensitivity -168dBm, and a resolution bandwidth from 10Hz up to 5MHz. A broadband directional log periodic antenna SPM-AS100 with a frequency band from 700MHz -6GHz, a gain G=5 dBi and an antenna factor of 26-41 dBi. The antenna is quite directive, with a main beam aperture angle of about 7 degrees. The SA is equipped with an android operative system and a WIFI card to record and transmit the data. A photo of the device is reported in Fig. 1, while Fig. 2 reports the antenna beam patterns for different frequencies. The beam pattern reported in Fig. 2 demonstrates the good directivities capabilities of the considered LPDA. Thanks to the short angular aperture of the LPDA main beam, it is possible to steer it by using a suitable mechanical pedestal to properly delimit a given area; at the same time it permits to limit or to completely remove (especially in the backside direction) the interfering signals produced by unwanted repeaters or radiofrequency generators. It is worth noticing that the spectrum analyzer can correctly identify the channels of each specific mobile phone companies assuring the mitigation of interfering effects produced by unwanted electromagnetic sources. As it can be noticed the proposed system is compact, light, and easily transportable, it does not require specific infrastructures such as cables, mechanical supports, or dedicated computational resources. To be operative you have only to place the SA and steer the main beam of the LPDA, along the area under investigation. # b) Calibration To derive the coefficients mandatory to implement the linear regression model, a set of measurements considering several users have been carried on, in particular, a different number of users have been activated and the power spectrum measured by using the handheld digital spectrum analyzer specmini and the LPDA antenna. In particular, the experiments considered up to 100 users with mobile phones of different companies. In the following, a selected set of the measured spectrum has been reported for different standards and user numbers. The measured spectrum for one and two users connected with 3G and 4G standards are reported in the following. Figs. 2 (a) and (b) represent the measured spectrum used to download or loading some contents such as video or music; in particular in Fig. 2 (a) can be observed a peak at 902.6 MHz, which is presented by the service provider as an uplink channel, while in 2 (b) the frequency peak is located at 1977.6 MHz, also in this case declared by the service provider as the uplink channel. The data reported in Figs. 2 (a) and (b) indicated that the bandwidth is 5 MHz as expected. For the sake of comparisons, Figs. The measured bandwidth is about 10 MHz. Fig. 3 (b) reports the measured spectrum when two users with 4G standards are connected. The channels are centered at 902.6MHz (uplink channel), and the bandwidth is higher concerning the previous measures related to single users reported in Figs. 2 (a) and (b).For the sake of completeness, the measurements obtained with 3, 5, 10, 15, 30, and 100 users are reported in Figs. 5 (a), (b), (c), (d), (e) and (f) respectively. As it can be noticed from the electromagnetic spectrum measurements reported in Figs. 5 when the number of users increases and the channels are filled to guarantee the connectivity of users, the Time-Division Multiple Access -TDMA (Robert & Barra, 2001) is activated, at each user is associated given time-slots and consequently the signal variation increase as well as the power spectrum intensity. This is quite evident in Figs. (c),(d) and (e),(f) respectively. At the end of measurement, the mandatory information for the estimation of correlation coefficients is available. In particular, the obtained correlation coefficients are reported in Fig. 6 and used in the linear regression model expressed by relation (2). In this section, the proposed system has been experimentally assessed in realistic environments. In particular, the measurement campaign has been done in the University library and canteen/bar. The first scenario concerns the University library, the SA and the antenna are placed in the outdoor courtyard of the university library, the main beam of the LPDA antenna was steer to cover the whole library building and avoid interfering signals coming from other users in particular, in the back direction of the main antenna beam. All mobile phones make use of a nearby base station (BS) to manage the various phases from the beginning to the end the communication. If the BS signal is strong enough to be received and interpreted by the mobile phone, this means that it is under the coverage of the base station. Usually, in urban areas, there are different base stations aimed the cover a limited amount of space called cells. The mobile phone will connect with the BS characterized with the stronger signal. The base station signals present in the scenarios under investigation are always active, and their signals are measured and taken into account, as background noise, by the spectrum analyzer. The spectrum analyzer is programmed to record the electromagnetic spectra continuously for 24 hours. The data are elaborated directly by the SA that estimates the power spectrum distribution considering all the mobile phone channels. Then the linear regression model is considered to estimate the user's number belonging to the library. Fig. 4 reports the user number versus time estimated with the linear regression model. The data are reported in the graph every half hour for the whole measurement campaign. As it can be noticed, before the library opening, no signals are detected. Then when the library opens at 8 AM, students will arrive, the signal increase like the user number. Then during the lunch interval between 12 and 14, the students leave the library for the university canteen, and as it can be noticed from the data of Fig. 4, the user's number decrease. The students increase after lunch, reaching an estimated maximum value of about 250 students in the afternoon. Users number decrease up to zero after half past 18 when the university library close. To obtain the ground truth, an operator counted the incoming students, the error between estimated and measured user number was less than 10%. As can be noticed, the most and least widespread companies are Vodafone and Iliad, respectively as expected since Iliad is a very young company up to now with a low diffusion on the market. In the next experiment, the system has been placed near the university canteen and bar. Also, in this experiment, the measurement campaign was of 24 hours. Fig. 6, similarly to Fig. 4, reports the estimated user number versus time. The student's number increases immediately when the bar opens, for breakfast, then the user number decrease, and it reaches again a maximum value during the lunchtime. We can observe that the maximum number of users in the canteen corresponds with the minimum number of users in the library as expected. Also, in this experiment, the company distribution has been estimated and reported in Fig. 7; in this experiment, the most widespread company was Vodafone. However, we observed a high number of TIM users as expected since it is the company adopted by the university staff. An operator counted the number of people in the canteen and bar to obtain the ground truth, the error was about 15% for all the considered scenarios. For the sake of completeness, the error versus elapsed time is reported for the two considered experimental scenarios in Figs. 11 (a) and (b), respectively. Although this method is suitable for indoor as well as realistic outdoor scenarios, some considerations concerning the presence of obstacles are mandatory. In particular, considering outdoor scenarios in rural areas, trees and leaves are the major causes of radio signal attenuation, while in urban areas, buildings, cars and buses produce attenuation and also multipath fading propagation phenomena. Due to these effects, the operative range of the systems is reduced to a limited area such as squares or small buildings like the university bar/canteen courtyard. Concerning indoor scenarios, the obstacles are represented by walls and furnishing. The main attenuation problems are due of bricks' walls, while furnishing, drywall, and normal concrete walls do not create big attenuation problems. The system can easily operate in rooms with shelves and furnishing such as the university library and classrooms. Of course, in wellshielded indoor locations such as cellars or garages where the electromagnetic signal of mobile phones is stopped by reinforced concrete or thick brick walls, the system is not able to properly operate. IV. # Conclusion In this work, a system for crowd monitoring in urban areas based on electromagnetic spectrum analysis has been presented and experimentally assessed in real scenarios. The user number is monitored by analyzing the electromagnetic spectrum with a spectrum analyzer, a high gain directive logperiodic antenna (LPDA), and a suitable linear regression model. The obtained results demonstrated the effectiveness and potentialities of such a system, which can be useful to monitoring crowed areas, to assess the pervasiveness of different mobile phone companies for commercial statistics, and also to help in manage the emergency due to the COVID-19 trying to limit gatherings in public areas such as squares, airports, supermarkets, bus and train stations. 1![Fig. 1: Spectrum Analyzer and broadband Antenna used for the measurement campaign](image-2.png "Fig. 1 :") 2![Fig. 2: Log periodic directive antenna (LPDA) beam pattern.](image-3.png "Fig. 2 :") 3![Fig. 3: Measured signal spectrum, single connection (a) 3G standard UARFCN=3038 -UL=902.6 MHz (b) 3G standard UARFCN=10838 UL=1977.6 MHz.](image-4.png "Fig. 3 :") 4![3 (a) and (b) report the measured spectrum when two users using 4G standards are downloading or sharing content on the wireless channelMeasured signal spectrum versus users number: 3 users (a), 5 users (b), 10 users (c), 15 users (d), 30 users (e), and 100 users (f).](image-5.png "Fig. 4 :") 25![Fig. 5: Measured signal spectrum, double connection (a) 4G standard EARFCN=501 -UL=1970.1 MHz (b) 4G standard EARFCN=1850 UL=1775.0 MHz Fig. 3 (a) shows a connection at 1970.1 MHz declared by the service provider as an uplink channel. The measured bandwidth is about 10 MHz. Fig. 3 (b) reports the measured spectrum when two users with 4G standards are connected. The channels are centered at 902.6MHz (uplink channel), and the bandwidth is higher concerning the previous measures related to single](image-6.png "Table 2 :Fig. 5 :") 6![Fig. 6: Linear regression model coefficients are estimated using the measurement campaign c) Experimental AssessmentIn this section, the proposed system has been experimentally assessed in realistic environments. In particular, the measurement campaign has been done in the University library and canteen/bar. The first scenario concerns the University library, the SA and the antenna are placed in the outdoor courtyard of the university library, the main beam of the LPDA antenna was steer to cover the whole library building and avoid interfering signals coming from other users in particular, in the back direction of the main antenna beam. All mobile phones make use of a nearby base station (BS) to manage the various phases from the beginning to the end the communication. If the BS signal is strong enough to be received and interpreted by the mobile phone, this means that it is under the coverage of the base station. Usually, in urban areas, there are different base stations aimed the cover a limited amount of space called cells. The mobile phone will connect with the BS characterized with the stronger signal. The base station signals present in the scenarios under investigation are always active, and their signals are measured and taken into account, as background noise, by the spectrum analyzer. The spectrum analyzer is programmed to record the electromagnetic spectra continuously for 24 hours. The data are elaborated directly by the SA that estimates the power spectrum distribution considering all the mobile phone channels.](image-7.png "Fig. 6 :") 78![Fig. 7: University Library 24h measurement campaign. Number of users estimation vs. time](image-8.png "Fig. 7 :Fig. 8 :") ![Fig. 5 reports the distribution of mobile Volume Xx XI Issue I V ersion I Global Journal of Researches in Engineering ( ) F phone companies derived from the electromagnetic spectrum and considering the data reported in Tab. II.](image-9.png "") 9![Fig. 9: University Canteen and Bar 24h measurement campaign. Number of users estimation vs. time](image-10.png "Fig. 9 :") 10![Fig. 10: University Canteen and Bar 24h measurement campaign. Companies distribution](image-11.png "Fig. 10 :") 11![Experimental measurement campaign, error vs. elapsed time, (a) University library, (b) university bar and cantine](image-12.png "Fig. 11 :") 1Freq. [MHz]Band NumberStandard800204G90082G/3G1500324G180032G/4G210013G/4G26007/384GIII. © 2021 Global Journals ( ) F © 2021 Global Journals ( ) F * Missing observations in multivariate statistics: Ii. Point estimation in simple linear regression AAAfifi RM&elashoff 10.2307/2282906 Journal of the American StatisticalAssociation 62 317 10 1967 * Analysis of call detail records of international voice traffic in mobile networks ZAziz RBestak 10.1109/ICUFN.2018.8436669 Tenth International Conference on Ubiquitous and FutureNetworks (ICUFN) 2018. 2018 * Corn kernel crown shape identification using image processing BNi MRPaulsen &J FReid 10.13031/2013.21293 Transactions of the ASAE 40 3 1997 * An improved method for the evaluation of uncertainty of channel power measurement with a spectrum analyzer MBertocco ASona P&zanchetta 10.1109/IMTC.2006.328643 IEEE Instrumentation and Measurement Technology Conference Proceedings 2006. 2006 * An optimized UAV trajectory planning for localization in disaster scenarios FDemiane SSharafeddine OFarhat 10.1016/j.comnet.2020.107378 Computer Networks 179 107378 2020 * Electromagnetic radiation sensors 10.1108/sr.2008.08728caa.002 sr.2008.08728caa.002 Sensor Review 2008 28 * Investigation of analogue and digital mobile phone low frequency radiation spectrum characteristics BHeath SJenvey I&cosic 10.1109/ICBEM.1998.666406 Proceedings of the 2nd International Conference on Bioelectromagnetism (Cat. No.98TH8269) the 2nd International Conference on Bioelectromagnetism (Cat. No.98TH8269) 1998 * Microwave system for the detection and localization of mobile phones in large buildings PHudec MPolivka P&pechac IEEE Transactions on Microwave Theory and Techniques 53 6 2005 * 10.1109/TMTT.2005.848750 * MM-wave wideband propagation model for wireless communications in built-up environments AJarndal K&alnajjar 10.1016/j.phycom.2018.03.011 Physical Communication 28 2018 * A method for counting moving and stationary people by interest point classification CYJeong s.d SChoi s.d WHan s.d IEEE International Conference on Image Processing 2013 * Applied linear statistical models Kutner, M. H. (A c. Di). 2005 McGraw-Hill Irwin 5th ed * The monitoring of simple linear regression profiles with two observations per sample MAMahmoud JPMorgan WHWoodall 10.1080/02664760903008995 Journal of Applied Statistics 37 8 2010 * Estimation of crowd density using image processing ANMarana 10.1049/ic:19970387 IEE Colloquium on Image Processing for Security Applications 1997. 1997 * The perceived social impacts of the 2006 football world cup on munich residents SOhmann IJones KWilkes 10.1080/14775080601155167 Journal of Sport & Tourism 11 2 2006 * Comparing urban sensing applications using event and network-driven mobile phone location data FPinelli GDLorenzo FCalabrese 16th IEEE International Conference on Mobile Data Management 2015. 2015 * 10.1109/MDM.2015.33 * Tracking and localization system using Android mobile phones APuscasiu AFanca H&valean 10.1109/AQTR.2016.7501350 IEEE International Conference on Automation, Quality and Testing 2016. 2016 * On crowd density estimation for surveillance HRahmalan MSNixon JNCarter 10.1049/ic:20060360 IET Conference on Crime and Security 2006. 2006 * Experimental requirements to observe a difference between enantiomer signals J.-BRobert ALBarra 10.1002/chir.10003 Chirality 13 10 2001 NMR and parity nonconservation * Crowd monitoring: State-of-the-art and future directions USingh J.-FDeterme FHorlin PDe Doncker 10.1080/02564602.2020.1803152 IETE Technical Review 2020 * Automated measurement of crowd density and motion using image processing SAVelastin 10.1049/cp:19940440 Seventh International Conference on `Road Traffic Monitoring and Control 1994. 1994 * Modelling of radiation field of patch antenna for use in long range RFID crowd monitoring JWeaver FDawood AAlkhalidi 10.1109/ICCAT.2013.6522018 Computer Applications Technology (ICCAT) 2013. 2013 * Crowd-sensing our smart cities: A platform for noise monitoring and acoustic urban planning MZappatore ALongo MA&bochicchio 10.24138/jcomss.v13i2.373 Journal of Communications Software and Systems 13 2 53 2017