Full text
Citation: Boixader, A.; Labella, C.; Catalan, M.; Paradells, J. A High- Accuracy, Scalable and Affordable Indoor Positioning System Using Visible Light Positioning for Automated Guided Vehicles. Electronics 2024,13, 82. https:// doi.org/10.3390/electronics13010082 Academic Editors: Juan Rodríguez Méndez, Robert Alexandru Dobre and Declan T. Delaney Received: 15 November 2023 Revised: 15 December 2023 Accepted: 21 December 2023 Published: 23 December 2023 Copyright: © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). electronics Article A High-Accuracy, Scalable and Affordable Indoor Positioning System Using Visible Light Positioning for Automated Guided Vehicles Aleix Boixader 1, Carlos Labella 1, Marisa Catalan 1,* and Josep Paradells 1,2 1IoT Research Group, Fundaciói2CAT, 08034 Barcelona, Spain; [email protected] (A.B.); [email protected] (C.L.); [email protected] or [email protected] (J.P.) 2Barcelona School of Telecommunications Engineering, Universitat Politècnica de Catalunya, 08034 Barcelona, Spain *Correspondence: [email protected] Abstract: Indoor Positioning Systems (IPSs) have multiple applications. For example, they can be used to guide people, to locate items in a warehouse and to support the navigation of Automated Guided Vehicles (AGV). Currently most AGVs use local pre-defined navigation systems, but they lack a global localisation system. Integrating both systems is uncommon due to the inherent challenge in balancing accuracy with coverage. Visible Light Position (VLP) offers accurate and fast localisation, but it encounters scalability limitations. To overcome this, this paper presents a novel Image Sensorbased VLP (IS-VLP) identification method that harnesses existing Light Emitting Diode (LED) lighting infrastructure to substitute both navigation and localisation systems effectively in the whole area. We developed an IPS that achieves six-axis positioning at 90 Hz refresh rate using OpenCV’s solvePnP algorithm and embedded computing. This IPS has been validated in a laboratory environment and successfully deployed in a real factory to position an operative AGV. The system has resulted in accuracies better than 12 cm for 95% of the measurements. This work advances towards positioning VLP as an appealing choice for IPS in industrial environments, offering an inexpensive, scalable, accurate and robust solution. Keywords: indoor positioning; visible light positioning; visible light communication; real-time; deployment focused; perspective-n-point; embedded computing; low-cost; high accuracy; image sensor visible light identification 1. Introduction The rise of Industry 4.0 has mobilised the scientific community to investigate and develop several positioning systems that would work in indoor environments, where the availability and precision of Global Navigation Satellite Systems (GNSS) is insufficient. Indoor environments pose more challenging requirements: where the 3 m accuracy provided globally by GNSS could mean an Automated Guided Vehicle (AGV) drifting out of its secure path, the localisation of a person in a wrong room during an emergency rescue or the localisation of an asset in a wrong shelf inside of a warehouse. An Indoor Positioning System (IPS) is usually characterised by the magnitude of its accuracy, ranging from metres to centimetres, and the coverage that it offers, ranging from hundreds of metres to centimetres. Most of the time, balancing these two factors is problematic, as better accuracy is usually associated with worse coverage. Additionally, if the IPS is intended for mobile objects, the positioning rate and the latency of the system become critical, especially for collision avoidance or navigation purposes. Finally, an affordable positioning solution may consider not only the cost of the hardware per se, but also its energy efficiency (to foresee the needs of batteries) and its scalability (in terms of Electronics 2024,13, 82. https://doi.org/10.3390/electronics13010082 https://www.mdpi.com/journal/electronics
Electronics 2024,13, 82 2 of 30 both infrastructure cost and the system’s capabilities). These criteria align with the features evaluated by [1,2]. Our motivation in this work is to explore an IPS solution that can be appealing to a factory environment, focusing on reducing the costs of deployment and maintenance. We envision a scalable system that (1) uses inexpensive hardware in both the transceiver and receiver sides, (2) minimises and facilitates the deployment of infrastructure, (3) achieves centimetre-level positioning, (4) offers a reasonable ratio of coverage per device and (5) provides an acceptable real-time positioning rate [3]. Autonomous guided vehicles, depending on the different requirements of factories, usually rely on two independent positioning systems: one dedicated to navigating around the factory and another to localise assets or perform precise operations, such as cargo loading or manoeuvring around corners. The costs of deploying these IPSs increases proportionally to the factory size, as the spots where high precision is required also increase. Therefore, a system able to provide navigation and accurate localisation would be highly desirable. An essential feature of AGVs is the concept of “alert zones”. These zones represent a specific volume surrounding the robot where the vehicle can quickly detect obstacles through dedicated sensors. The size of this alert zone depends on the speed of the AGV and the accuracy of its positioning system. When an object is recognised within the alert zone, it triggers actions to prevent collisions. Typically, these actions involve reducing the AGV’s speed or completely stopping it. This crucial feature ensures the safety of AGVs as they drive. The size of this alert zone can also be determinant to define whether a path is traversable by the AGV. For example, a centimetre-level IPS would allow two AGVs to drive side by side in a road that has not been initially designed for that purpose, or it could be used to simply design narrower lanes for the AGV, freeing the space for other more profitable purposes. The authors in [ 3 ] studied positioning requirements for autonomous vehicles in an outdoor environment. They stated that the characteristics of the road and the dimensions of the vehicle are the most relevant factors when determining how much accuracy is needed in the positioning of the vehicle. They also defined that the positioning frequency should guarantee that the distance travelled between two consecutive positioning updates is smaller than 10% of the positioning accuracy required for that road. They concluded that a minimum frequency of 100 Hz is sufficient for both highway and local street operations in the United States of America. By extension, fulfilling this requirement would also make a solution suitable for indoor operation. Given the typical position update rates of standard positioning technologies such as GNSS (1 to 10 Hz) or Light Detection and Ranging (LIDAR) (10 to 30 Hz), achieving a minimum frequency of 100 Hz would be challenging. For this reason, these solutions can be combined with Inertial Measurement Units (IMU) to achieve an acceptable update rate using dead reckoning. Though it is clear that sensor fusion systems can help to improve the performance and can provide redundancy to existent IPSs, in this research we pretend to explore the development of a standalone positioning system capable to meet realistic indoor positioning requirements for industry scenarios. In this work, we developed a real-time solution for positioning that uses Image Sensor Visible Light Positioning (IS-VLP) technology together with a novel identification method that uses the variation in a light dazzle, instead of the rolling shutter and light-coding scheme. This leads to improvements in scalability and flexibility. This solution was implemented using a Linux-based, low-budget prototyping board, a pinhole camera with fisheye lens and Commercial Off-the-Shelf (COTS) light bulbs. The system can estimate a new position 90 times per second. It is also robust to different lighting environments and is adaptable to different deployment characteristics (light arrangement, distance between lights and height of the lights). We tested this solution in a laboratory environment as well as in a factory environment, where we attached the device to an operating AGV and recorded 138 trajectories during a span of 16 days.
Electronics 2024,13, 82 3 of 30 The remainder of this paper is organised as follows. Section 2reviews the main IPS technologies. Section 3provides contextualisation, reasoning and a detailed description of the proposed novel method of identification. Section 4introduces the selected hardware components for implementing the positioning solution. Section 5focuses on the explanation of the developed software for image processing and position calculation, and Section 6 explains the configuration of the two testbeds used to validate the solution. Section 7 details the data analysis methods and objectives, while Section 8presents the results for the tests conducted in both laboratory and factory scenarios. Section 9interprets the results and discusses the main findings. Finally, Section 10 summarises the contributions, offers insights into future work and concludes our research. 2. State of the Art Some of the most popular standalone indoor positioning systems that use Radio Frequency (RF) rely on the deployment of an on-purpose infrastructure, such as Ultra- Wideband (UWB), Bluetooth/Bluetooth Low Energy (BT/BLE) and Zigbee and Radio Frequency Identification (RFID). A performance comparison of these technologies can be found in [ 4 ]. These solutions must overcome the cost of deploying such infrastructure and coexist with other radio frequencies in some of the environments. Other positioning systems rely on algorithms that perform Simultaneous Localisation and Mapping (SLAM) using laser, ultrasounds or images, which do not need an on-purpose infrastructure. However, they become dependent on environment changes, and these are usually complex and costly systems [ 5 ]. Lastly, some systems attempt to use existent infrastructure to position, such as Wi-Fi or VLP. While Wi-Fi seems a good candidate that overcomes the Line-Of-Sight (LOS) constraint of VLP, the system would require the deployment of additional/on-purpose Access Points (APs) to achieve an acceptable accuracy [6]. The authors in [ 6 ] compare 12 indoor positioning systems for mobile robots, where VLP ranked fourth on accuracy after LIDAR, Ultrasounds (US) and RFID positioning. Although ranked slightly worse on accuracy, Computer Vision (CV) and UWB positioning can be considered relevant because they have a notable coverage capability. From these technologies, the most appealing positioning systems for businesses would be those that are infrastructureless, which would be US, LIDAR and CV. US and LIDAR technology share the same working principle but differ in hardware cost (LIDAR options are significantly more expensive), and also in the operative range, which is significantly smaller for the US solutions. LIDAR weaknesses are spacious environments (sometimes needing additional reflectors in places where the structural elements such as walls are too far away) and its processing complexity, which would be difficult to execute on affordable hardware. CV is still far from reaching a precise positioning system that uses inexpensive hardware. Moreover, its processing complexity makes it difficult to achieve frequent updates without the support of an edge computing device. The remaining positioning solutions (VLP, UWB and RFID) rely on an on-purpose infrastructure. While VLP does not face radio spectrum interference issues, its main drawback is the LOS restrictions, especially when considering the coverage of the solution. RFID’s low operating range requires a bigger deployment of infrastructure in order to provide a positioning accuracy comparable to the other technologies. Finally, UWB offers good coverage and decent accuracy, and it is gaining rapid adoption in the Smartphone market, boosting the number of applications and use cases for this technology. However, UWB’s achievable accuracy depends on the environment where it is deployed, as it must address challenges such as multipath interference and Non-Line of Sight (NLOS) conditions. Light Emitting Diode (LED) lighting advantages over other artificial light sources are widely agreed upon and we see the transformation of all other lighting systems towards it, enforced by the end of EU’s exception towards fluorescent lamps in their Restriction of Hazard Substances Directive [ 7 ], which forbids the production of fluorescent lamps in the EU as of September 2023. Soon, more people will profit from LED lighting’s ability to oscillate at high frequencies to both illuminate and transmit information. We believe
Electronics 2024,13, 82 4 of 30 that using VLP devices that employ already existing LED lighting and provide precise navigation in an industrial environment is an interesting approach to minimising the costs of deployment of such an infrastructure and, at the same time, enabling the possibility to foster its communication and privacy capabilities for other use cases [1]. In VLP, researchers have explored positioning using photodiodes (PD-VLP) as the capturing sensor. However, many of these solutions heavily rely on factors related to the lighting infrastructure, including the need to determine the exact intensity of the LEDs, to achieve precise time synchronisation between the sensor and the LEDs, or to utilise arrays of photodiodes [ 8 ]. For this reason, most of the recent research around VLP focuses on using image sensors as the capturing sensor (which most often means using Complementary Metal-Oxide Semiconductor (CMOS) cameras). These approaches can apply computer vision techniques to use fainter signals, discard interferences or detect geometrical patterns. In VLP, the first step to provide positioning is to identify the lights in view and to discover their 3D coordinates. Most of the work conducted around IS-VLP makes use of a line-coding scheme, produced by the camera’s rolling shutter in combination with high frequency On–Off Keying (OOK) of the LED. The authors in [ 9 ] were one of the first to use this method, and since then it has been used as visual landmarks for positioning in several implementations [ 10 – 13 ]. However, to accurately determine the thickness in pixels of the generated bars, and, consequently, to identify the light, it is necessary to use higher resolutions, which imply a longer processing time. The line-coding scheme also has an important limitation on how far the source light can be detected. The authors in [ 10 , 12 ] show that the decoding rate decays quickly when increasing the distance from the camera to the LED, not being able to decode at 3 m. Moreover, an important flaw in the line-coding system is the limitation on the number of lights that can be uniquely identified using the rolling shutter effect of a CMOS camera. The resolution of the camera, the speed of the vehicle, the distance to the light and the size of the light are limiting factors for the maximum number of bits that can be transmitted, and, thus, for the number of different identifiers that can be encoded. For example, the authors in [ 12 , 14 , 15 ] achieve a bit rate of 45, 60 and 100 bps, respectively, at a distance of 2 m and in static conditions. This implies that in 100 ms they would be able to communicate 4, 6 and 10 bits that could be used to encode at most 16, 64 and 1024 different identifiers, respectively. This weakness can be bypassed by adding complexity on the application layer, such as the information of IMUs or BLE beacons. The additional hardware can communicate spatial information to unequivocally identify the lights. The additional hardware can provide spatial information to unequivocally identify the lights. The variety of algorithms to determine the position in the IS-VLP system is wide, but the function solvePnP included in the Open Computer Vision (OpenCV) library [ 16 ] stands out because it provides positioning on six degrees of freedom by using references in any geometric distribution. In contrast to the custom algorithms presented in [ 17 , 18 ], the use of this solvePnP presents some limitations in terms of the number of minimum references necessary to obtain a position, needing either four references at the same height (or plane), or six references. However, as it is a tool with good support and it is easy to use, it is becoming a preferred option for obtaining positions in 3D from a 2D image [19–23]. One of the problems associated with indoor positioning systems is the deployment and setup of the infrastructure. In most cases, it requires conducting many measurements, which must be as precise as possible since the accuracy of the system will depend on it. As demonstrated in [ 24 ], a measurement error in the position of the lights is magnified eight times in the position estimated by solvePnP. Overcoming this threat in large deployments becomes increasingly difficult and costly. The approach presented in [ 25 ] could help to resolve this limitation for large-scale deployments. Most of the published research on novel IPS solutions does not provide experimental results in operational factories due to the challenges of engaging the industrial sector. The authors in [ 26 , 27 ] successfully deployed IPS using Wi-Fi and UWB infrastructure in an unmodified factory environment. These deployments covered large areas of the factory,
Electronics 2024,13, 82 5 of 30 circa 6000 and 60 m 2 , but they achieved accuracies of less than 6 m and less than 1 m, respectively. This underscores the difficulty in balancing coverage and accuracy. Current commercial robot solutions for the industrial or service sector, such as the PuduBot 2 from Pudu Robotics, offer similar performance to the work presented in this article in terms of positioning performance [ 28 ]. Both approaches use a camera pointing to the ceiling, but the PuduBot 2 approach is different as it is based on Video-SLAM (VSLAM). It is an interesting approach, but the use of VSLAM is sensitive to changes in the environment and requires a learning stage. 3. IS-VLP-Based Novel Identification Method This work proposes to use the flickering frequency of an LED source as the method for identifying lights by detecting the variation in the captured light beam (dazzle) with a CMOS camera. To illustrate the dazzle variation, Figure 1shows two consecutive frames captured by the camera pointing to a ceiling with eight light bulbs flickering at different frequencies (delimited by the blue box). The other illuminated areas correspond to potential interferences that the system should be able to distinguish and filter. Comparing both frames, the difference in intensity in each bulb is clearly visible. Instead of measuring the intensity of each dazzle, we decided to measure the illuminated area in pixels, which performs better in terms of computing efficiency and reliability. Electronics2024,13,825of31 MostofthepublishedresearchonnovelIPSsolutionsdoesnotprovideexperimental resultsinoperationalfactoriesduetothechallengesofengagingtheindustrialsector.The authorsin[26,27]successfullydeployedIPSusingWi-FiandUWBinfrastructureinan unmodifiedfactoryenvironment.Thesedeploymentscoveredlargeareasofthefactory, circa6000and60m 2 ,buttheyachievedaccuraciesoflessthan6mandlessthan1m, respectively.Thisunderscoresthedifficultyinbalancingcoverageandaccuracy. Currentcommercialrobotsolutionsfortheindustrialorservicesector,suchasthe PuduBot2fromPuduRobotics,offersimilarperformancetotheworkpresentedinthis articleintermsofpositioningperformance[28].Bothapproachesuseacamerapointing totheceiling,butthePuduBot2approachisdifferentasitisbasedonVideo-SLAM (VSLAM).Itisaninterestingapproach,buttheuseofVSLAMissensitivetochangesin theenvironmentandrequiresalearningstage. 3.IS-VLP-BasedNovelIdentificationMethod ThisworkproposestousetheflickeringfrequencyofanLEDsourceasthemethod foridentifyinglightsbydetectingthevariationinthecapturedlightbeam(dazzle)witha CMOScamera.Toillustratethedazzlevariation,Figure1showstwoconsecutiveframes capturedbythecamerapointingtoaceilingwitheightlightbulbsflickeringatdifferent frequencies(delimitedbythebluebox).Theotherilluminatedareascorrespondtopotentialinterferencesthatthesystemshouldbeabletodistinguishandfilter.Comparingboth frames,thedifferenceinintensityineachbulbisclearlyvisible.Insteadofmeasuringthe intensityofeachdazzle,wedecidedtomeasuretheilluminatedareainpixels,whichperformsbetterintermsofcomputingefficiencyandreliability. Figure1.Consecutivegrey-scaleframes(11msdifference)capturedbythecamerainthefactory environment,illustratingtheintensityvariationintheVLPlightbulbs(delimitedbythebluebox) andthepresenceofexternalinterferences(factoryskylights) . Monitoringthevariationinthedazzleisaneffectivemethodtoidentifytheflickering frequencyofeachlight.However,identifyinglightsbyfrequenciesimpliesthatthenumberofpossibleidentifiersislimitedbythenumberoffrequenciesthatcanbedetected usingacamera.Thenumberofdetectablefrequenciesdependsontheimageacquisition rate(orframerate)andthedurationofthevideo(specificallyitsinverse—thefrequency resolution).MostoftheinexpensiveCMOScamerascannotachieveahighframerate, usuallyrangingfrom15to90framespersecond,dependingontheimageresolution. Toworkatfrequenciesthatareidentifiablebythosecameras,thelightswouldneed toflickerbetween0and50Hz(basedontheNyquist–Shannonsamplingtheorem),which wouldnotbefeasibleastheflickerwouldbedirectlynoticeablebymosthumaneyes[29]. Toovercomethisproblem,weuseanundersamplingtechniquethatenablestheuseof flickeringfrequenciesabovethesamplingfrequencyofthecameras,over100Hz,which aredirectlyunnoticeablebythehumaneye. However,as[30]remarks,flickeringlightingcanbeindirectlynoticeableduetothe stroboscopiceffect,especiallyforfrequenciesbelow1kHzinadimlylitenvironment.To quantifythiseffect,theauthorsin[29]proposedtheStroboscopicVisibilityMeasure (SVM),ametricthatallowsforestimatingthevisibilityofthestroboscopiceffectcreated Figure 1. Consecutive grey-scale frames (11 ms difference) captured by the camera in the factory environment, illustrating the intensity variation in the VLP light bulbs (delimited by the blue box) and the presence of external interferences (factory skylights). Monitoring the variation in the dazzle is an effective method to identify the flickering frequency of each light. However, identifying lights by frequencies implies that the number of possible identifiers is limited by the number of frequencies that can be detected using a camera. The number of detectable frequencies depends on the image acquisition rate (or frame rate) and the duration of the video (specifically its inverse—the frequency resolution). Most of the inexpensive CMOS cameras cannot achieve a high frame rate, usually ranging from 15 to 90 frames per second, depending on the image resolution. To work at frequencies that are identifiable by those cameras, the lights would need to flicker between 0 and 50 Hz (based on the Nyquist–Shannon sampling theorem), which would not be feasible as the flicker would be directly noticeable by most human eyes [ 29 ]. To overcome this problem, we use an undersampling technique that enables the use of flickering frequencies above the sampling frequency of the cameras, over 100 Hz, which are directly unnoticeable by the human eye. However, as [ 30 ] remarks, flickering lighting can be indirectly noticeable due to the stroboscopic effect, especially for frequencies below 1 kHz in a dimly lit environment. To quantify this effect, the authors in [ 29 ] proposed the Stroboscopic Visibility Measure (SVM), a metric that allows for estimating the visibility of the stroboscopic effect created by a flickering light, based on the variation in its illuminance, and adjusted to human sensitivity. The SVM relies on experimental studies and a value of 1 means that 50% of the people exposed to the flickering light would be able to perceive a stroboscopic effect. The European
Electronics 2024,13, 82 6 of 30 Union has established a precautionary limit at 0.4 [ 31 ], despite insufficient data to support this limitation [32]. In the frequency analysis on an undersampled signal, the original frequency will appear as an alias inside a range from 0 Hz to the Nyquist frequency (F N ), which is half of the sampling frequency (F s ). The frequency domain is divided in Nyquist regions of F N frequencies and an alias could originate from any of the Nyquist regions above it. The original signal can only be identified based on prior knowledge of the Nyquist region to which it belongs. Figure 2illustrates the relationship between an original signal and its aliases. Electronics2024,13,826of31 byaflickeringlight,basedonthevariationinitsilluminance,andadjustedtohumansensitivity.TheSVMreliesonexperimentalstudiesandavalueof1meansthat50%ofthe peopleexposedtotheflickeringlightwouldbeabletoperceiveastroboscopiceffect.The EuropeanUnionhasestablishedaprecautionarylimitat0.4[31],despiteinsufficientdata tosupportthislimitation[32]. Inthefrequencyanalysisonanundersampledsignal,theoriginalfrequencywillappearasanaliasinsidearangefrom0HztotheNyquistfrequency(F N ),whichishalfof thesamplingfrequency(F s ).ThefrequencydomainisdividedinNyquistregionsofF N frequenciesandanaliascouldoriginatefromanyoftheNyquistregionsaboveit.The originalsignalcanonlybeidentifiedbasedonpriorknowledgeoftheNyquistregionto whichitbelongs.Figure2illustratestherelationshipbetweenanoriginalsignalandits aliases. Figure2.DiagramshowingtherecoveryofasignalfromitsaliasedsignalbasedontheNyquist regionwherethesignalbelongs. Thefrequencyresolution(F R )isthegapbetweentwoneighbouringfrequenciesinthe Fouriertransformofasignal.Thisparameterdeterminesthenumberoffrequenciesthat canbeusedasidentifierswithintherange0toF N Hz.Asmallerresolutionallowsfor distinguishingmorefrequenciesinthegivenrange,butitalsorequiresalongersignal( seconds)toidentifythefrequencyunequivocally.Longercapturetimesimplylargerdelaystodetectafrequencyandidentifyalight. Tobeabletodistinguishallfrequenciesfromtheselectedset,theymustbespaced apartbyatleastF R Hz.Hence,thefrequencyspectrumwillbedividedin bins.Note thatthefirstbin,correspondingto0, ,isdiscardedasitwouldnotallowfordistinguishingthefrequencyusedfromtheconstantcomponentofaregularnon-flickering light.Therefore,thefrequencyspectrumshouldbepartitionedtoaccommodatethedesirednumberoffrequencieswhileexcludingtheconstantrange. Figure3showshowmanyidentifiers(numberoffrequencies)canbeuseddepending onthedurationofthesignalandthecameraframerate.Asanexample,foranautomated guidedvehiclerunningat2m/s,adelayof100to1000mstoidentifythelightswould implyaninitialperiodwhentheAGVwouldtravelwithoutpositioning,from20to200 cm. Figure 2. Diagram showing the recovery of a signal from its aliased signal based on the Nyquist region where the signal belongs. The frequency resolution (F R ) is the gap between two neighbouring frequencies in the Fourier transform of a signal. This parameter determines the number of frequencies that can be used as identifiers within the range 0 to F N Hz. A smaller resolution allows for distinguishing more frequencies in the given range, but it also requires a longer signal (1 FRseconds) to identify the frequency unequivocally. Longer capture times imply larger delays to detect a frequency and identify a light. To be able to distinguish all frequencies from the selected set, they must be spaced apart by at least F R Hz. Hence, the frequency spectrum will be divided in FN FR bins. Note that the first bin, corresponding to h0, 1 FRi , is discarded as it would not allow for distinguishing the frequency used from the constant component of a regular non-flickering light. Therefore, the frequency spectrum should be partitioned to accommodate the desired number of frequencies while excluding the constant range. Figure 3shows how many identifiers (number of frequencies) can be used depending on the duration of the signal and the camera frame rate. As an example, for an automated guided vehicle running at 2 m/s, a delay of 100 to 1000 ms to identify the lights would imply an initial period when the AGV would travel without positioning, from 20 to 200 cm. Electronics2024,13,827of31 Figure3.Relationbetweenthenumberoffrequenciesusableasidentifiersandthedurationofthe capturedsignalfordifferentcameraframerates. Thedelayontheidentificationalsolimitsthespacingofthelights,whichmustbe visibleforatleasttherequiredsignalduration.Furthermore,toassurecontinuouspositioningthroughallthearea,thedevicemustbeabletoidentifynewlightswhileatleast fouralreadyidentifiedlightsarestillvisibleandusedforlocalisationpurposes.ThisimpliesaminimalFieldofView(FOV)ofdoubleforthedistancetravelledduringtheidentificationdelay.Takingthe2m/sAGVasanexample,aFOVbetween40and400cmwould beneeded. Equation(1)definesthecoverageofascenario,whereFOV H andFOV V arethehorizontalandverticalfieldsofviewofthecamera,G C andG R representthecolumnsandrows ofthegridoflightsandS R andS C refertothespacingbetweenrowsandcolumns.As showninFigure3,withasignaldurationof1sandacameraof90Hz,amaximumnumberof45identifierscanbeused.FromEquation(1),thiscasewouldonlyallowforcoveringanareaof120m 2 inasquaredscenario(a6by7gridoflightstakingintoaccountthat fourreferencesarenecessarytosolvethePerspective-n-Pointproblem). 𝐶𝑜𝑣𝑒𝑟𝑎𝑔𝑒𝐹𝑂𝑉𝐺3 𝑆 𝐹𝑂𝑉𝐺3 𝑆(1) Tosolvethecoveragelimitationsofthisidentificationmethodandmakeitscaleto largescenarios,wehaveadoptedaclusteringapproach.Concretely,thewholeareaisdividedinclustersdefinedasasetoffourneighbouringlights,eachofthemmatchinga uniquepatternoffrequencies.Usingasimple2Dpattern-matchingalgorithm,areceiver wouldbeabletolinkaclusteroffrequencieswiththepre-defineddatasetofclusters.This wouldallowuniqueidentificationofthefourcomponentsinthecluster. Assigningtheclustersofidentifiersisnotatrivialtask,aseachcombinationoffour lightsmustbeuniqueinthedataset,independentofthecameraorientation.Toavoidambiguities,theclustersthatcouldbeconfusedbasedontheirorientationarediscardedand therestarecombinedasefficientlyaspossible.Figure4illustratestheclusteringapproach fortwodifferentflickeringfrequenciesanda2×4gridoflights.Thecolourofeachlight bulbindicatestheflickeringfrequency,andtheshapecolourdenotestheclusteroffour lightsthatcanbeidentified.Asitcanbeobserved,thecentrallightsbelongtotwoneighbouringclusters;thus,thewholegridisdefinedbyfourclusters,whichcanbeunequivocallyidentifiedwithonlytwofrequencies. Figure 3. Relation between the number of frequencies usable as identifiers and the duration of the captured signal for different camera frame rates.
Electronics 2024,13, 82 7 of 30 The delay on the identification also limits the spacing of the lights, which must be visible for at least the required signal duration. Furthermore, to assure continuous positioning through all the area, the device must be able to identify new lights while at least four already identified lights are still visible and used for localisation purposes. This implies a minimal Field of View (FOV) of double for the distance travelled during the identification delay. Taking the 2 m/s AGV as an example, a FOV between 40 and 400 cm would be needed. Equation (1) defines the coverage of a scenario, where FOV H and FOV V are the horizontal and vertical fields of view of the camera, G C and G R represent the columns and rows of the grid of lights and S R and S C refer to the spacing between rows and columns. As shown in Figure 3, with a signal duration of 1 s and a camera of 90 Hz, a maximum number of 45 identifiers can be used. From Equation (1), this case would only allow for covering an area of 120 m 2 in a squared scenario (a 6 by 7 grid of lights taking into account that four references are necessary to solve the Perspective-n-Point problem). Coverage =(FOVH+(GC−3)×SC)×(FOVV+(GR−3)×SR)(1) To solve the coverage limitations of this identification method and make it scale to large scenarios, we have adopted a clustering approach. Concretely, the whole area is divided in clusters defined as a set of four neighbouring lights, each of them matching a unique pattern of frequencies. Using a simple 2D pattern-matching algorithm, a receiver would be able to link a cluster of frequencies with the pre-defined dataset of clusters. This would allow unique identification of the four components in the cluster. Assigning the clusters of identifiers is not a trivial task, as each combination of four lights must be unique in the dataset, independent of the camera orientation. To avoid ambiguities, the clusters that could be confused based on their orientation are discarded and the rest are combined as efficiently as possible. Figure 4illustrates the clustering approach for two different flickering frequencies and a 2 × 4 grid of lights. The colour of each light bulb indicates the flickering frequency, and the shape colour denotes the cluster of four lights that can be identified. As it can be observed, the central lights belong to two neighbouring clusters; thus, the whole grid is defined by four clusters, which can be unequivocally identified with only two frequencies. Electronics2024,13,828of31 Figure4.Exampleofthedistributionoftwofrequenciesintofourclustersforagridof2by4lights. Theclusteringapproachresolvesthescalabilityissuesforlargescenarios.Concretely, forthepreviouslymentionedscenario(90Hzframerateand1ssignalduration),thesize ofthecoveredareaincreasesfrom120to82880m 2 (8ha),ascalculatedbyEquations(2) and(3).However,thedelayneededtoidentifylightscannotbeentirelyresolved,butitis mitigated.Ideally,todistinguishtherequiredfrequenciesintheFouriertransformwith thefewestsamples,thesignaldurationshouldbeadjustedtoeachscenariobasedonthe positioningrateneeds,theFOVofthecameraandthespeedofthemovingvehicle. Figure5showstwographsthatdescribetherelationshipbetweenthenumberoffrequenciesusedinascenario,thetimeneededtodistinguishthesefrequenciesandthenumberofpotentialclusters.Itshowsthatthenumberofclustersgrowsexponentiallywith thesizeofthesetoffrequencies(numberoffrequencies),butthetimeneededtodistinguishthefrequenciesofthatsetalsogrowsandwouldinfluencethelatencyoftheidentification(and,thus,ofthelocalisation).Thenumberofpotentialclustersisdescribedby thefollowingequation: 𝐶𝑛𝑛 4𝑛 4𝑛2(2) Figure5.(a)Evolutioninthenumberofpossibleclustersforasetoffrequencies.(b)Evolutionin theminimumtimetodistinguisheveryfrequencyofaset. Asmentioned,eachclusterconsistsoffourlights.Theequationpresentedin(3)can beusedtodeterminethesurfacethataspecificnumberofclusterscancover.Thisequation calculateshowmanyoverlappingsquaresexistinanNbyMgrid(beingN≥M),andin thiscase,eachsquarecorrespondstoacluster. 𝑆𝑞𝑢𝑎𝑟𝑒𝑠𝑀𝑀13𝑁𝑀1 6(3) Forexample,for10frequencies,Figure5ashowsthattherewouldbe2599clusters available.Theseclusterscouldbeconfiguredinamatrixof24by26lights,using99.42% oftheclustersavailable.Foraseparationof1.2mbetweenlights,thelightinfrastructure Figure 4. Example of the distribution of two frequencies into four clusters for a grid of 2 by 4 lights. The clustering approach resolves the scalability issues for large scenarios. Concretely, for the previously mentioned scenario (90 Hz frame rate and 1 s signal duration), the size of the covered area increases from 120 to 82,880 m 2 (8 ha), as calculated by Equations (2) and (3) . However, the delay needed to identify lights cannot be entirely resolved, but it is mitigated. Ideally, to distinguish the required frequencies in the Fourier transform with the fewest samples, the signal duration should be adjusted to each scenario based on the positioning rate needs, the FOV of the camera and the speed of the moving vehicle.
Electronics 2024,13, 82 8 of 30 Figure 5shows two graphs that describe the relationship between the number of frequencies used in a scenario, the time needed to distinguish these frequencies and the number of potential clusters. It shows that the number of clusters grows exponentially with the size of the set of frequencies (number of frequencies), but the time needed to distinguish the frequencies of that set also grows and would influence the latency of the identification (and, thus, of the localisation). The number of potential clusters is described by the following equation: C(n)=n4 4+n2 4−n 2(2) Electronics2024,13,828of31 Figure4.Exampleofthedistributionoftwofrequenciesintofourclustersforagridof2by4lights. Theclusteringapproachresolvesthescalabilityissuesforlargescenarios.Concretely, forthepreviouslymentionedscenario(90Hzframerateand1ssignalduration),thesize ofthecoveredareaincreasesfrom120to82880m 2 (8ha),ascalculatedbyEquations(2) and(3).However,thedelayneededtoidentifylightscannotbeentirelyresolved,butitis mitigated.Ideally,todistinguishtherequiredfrequenciesintheFouriertransformwith thefewestsamples,thesignaldurationshouldbeadjustedtoeachscenariobasedonthe positioningrateneeds,theFOVofthecameraandthespeedofthemovingvehicle. Figure5showstwographsthatdescribetherelationshipbetweenthenumberoffrequenciesusedinascenario,thetimeneededtodistinguishthesefrequenciesandthenumberofpotentialclusters.Itshowsthatthenumberofclustersgrowsexponentiallywith thesizeofthesetoffrequencies(numberoffrequencies),butthetimeneededtodistinguishthefrequenciesofthatsetalsogrowsandwouldinfluencethelatencyoftheidentification(and,thus,ofthelocalisation).Thenumberofpotentialclustersisdescribedby thefollowingequation: 𝐶𝑛𝑛 4𝑛 4𝑛2(2) Figure5.(a)Evolutioninthenumberofpossibleclustersforasetoffrequencies.(b)Evolutionin theminimumtimetodistinguisheveryfrequencyofaset. Asmentioned,eachclusterconsistsoffourlights.Theequationpresentedin(3)can beusedtodeterminethesurfacethataspecificnumberofclusterscancover.Thisequation calculateshowmanyoverlappingsquaresexistinanNbyMgrid(beingN≥M),andin thiscase,eachsquarecorrespondstoacluster. 𝑆𝑞𝑢𝑎𝑟𝑒𝑠𝑀𝑀13𝑁𝑀1 6(3) Forexample,for10frequencies,Figure5ashowsthattherewouldbe2599clusters available.Theseclusterscouldbeconfiguredinamatrixof24by26lights,using99.42% oftheclustersavailable.Foraseparationof1.2mbetweenlights,thelightinfrastructure Figure 5. (a) Evolution in the number of possible clusters for a set of frequencies. (b) Evolution in the minimum time to distinguish every frequency of a set. As mentioned, each cluster consists of four lights. The equation presented in (3) can be used to determine the surface that a specific number of clusters can cover. This equation calculates how many overlapping squares exist in an Nby Mgrid (being N ≥ M), and in this case, each square corresponds to a cluster. Squares =M(M+1)(3N−M+1) 6(3) For example, for 10 frequencies, Figure 5a shows that there would be 2599 clusters available. These clusters could be configured in a matrix of 24 by 26 lights, using 99.42% of the clusters available. For a separation of 1.2 m between lights, the light infrastructure would be able to span across a surface area of 497 m 2 . A combination between the Angle of Vision (AOV) of the camera and the height of the ceiling could achieve a FOV of 8 m, which would translate into coverage of 1182 m 2 (Equation (1)). Figure 5b indicates that with 10 frequencies and a 90 Hz camera, the duration of the signal needed to distinguish the frequencies would be 250 ms, which corresponds to a frequency resolution of 4 Hz. 4. Hardware Components The choice of the hardware components to implement our solution considered several factors. One of the main objectives was to demonstrate that the approach is feasible for low-budget equipment. Also, the dimensions of the receiver were considered, as it had to be placed in a mobile vehicle. Figure 6shows a simplified diagram of the solution, where we highlight the data flow. The light infrastructure implements an interface that allows its configuration via Wi-Fi. A microprocessor controls each light driver to switch at the corresponding flickering frequency. On the mobile device (receiver), the camera detects the flickering of visible light as a combination of (at least) four lights and finds their 2D to 3D coordinate correspondence in a pre-existent database. The coordinates of the identified lights are used to feed the positioning algorithm, returning the position of the mobile device (e.g., an AGV in a factory workspace).
Electronics 2024,13, 82 9 of 30 Electronics2024,13,829of31 wouldbeabletospanacrossasurfaceareaof497m 2 .AcombinationbetweentheAngle ofVision(AOV)ofthecameraandtheheightoftheceilingcouldachieveaFOVof8m, whichwouldtranslateintocoverageof1182m 2 (Equation(1)).Figure5bindicatesthat with10frequenciesanda90Hzcamera,thedurationofthesignalneededtodistinguish thefrequencieswouldbe250ms,whichcorrespondstoafrequencyresolutionof4Hz. 4.HardwareComponents Thechoiceofthehardwarecomponentstoimplementoursolutionconsideredseveralfactors.Oneofthemainobjectiveswastodemonstratethattheapproachisfeasible forlow-budgetequipment.Also,thedimensionsofthereceiverwereconsidered,asithad tobeplacedinamobilevehicle. Figure6showsasimplifieddiagramofthesolution,wherewehighlightthedata flow.ThelightinfrastructureimplementsaninterfacethatallowsitsconfigurationviaWi- Fi.Amicroprocessorcontrolseachlightdrivertoswitchatthecorrespondingflickering frequency.Onthemobiledevice(receiver),thecameradetectstheflickeringofvisible lightasacombinationof(atleast)fourlightsandfindstheir2Dto3Dcoordinatecorrespondenceinapre-existentdatabase.Thecoordinatesoftheidentifiedlightsareusedto feedthepositioningalgorithm,returningthepositionofthemobiledevice(e.g.,anAGV inafactoryworkspace). Figure6.DiagramoftheproposedVLPsolution. 4.1.ComputingUnit Thecomputingunitmustbeanonboarddevicewithenoughcomputingcapacityto runthesoftwarelocallyandinrealtime.Additionally,thesolutionshouldnotdependon anyspecifichardware. TheequipmentchosentorunourimplementationistheRaspberryPi4Bboard[33] inthe8GBRAMversion,runningthepre-installedRaspberryPi64-bitOS,whichisbased onaDebianLinuxdistribution.Thislow-costcomputerintegratesaquad-coreARMprocessorandBroadcom’sVideocoreVI,whichisamultimediaprocessorthatallowsdisplayingresolutionsupto4Kat60framespersecond. ThepopularityofbothRaspberryPianditsLinux-basedoperatingsystem,together withtheaffordabilityofthehardwareandabigdeveloper’scommunity,makesitanattractiveplatformtodemonstrateoursolution. Figure 6. Diagram of the proposed VLP solution. 4.1. Computing Unit The computing unit must be an onboard device with enough computing capacity to run the software locally and in real time. Additionally, the solution should not depend on any specific hardware. The equipment chosen to run our implementation is the Raspberry Pi 4B board [ 33 ] in the 8 GB RAM version, running the pre-installed Raspberry Pi 64-bit OS, which is based on a Debian Linux distribution. This low-cost computer integrates a quad-core ARM processor and Broadcom’s Videocore VI, which is a multimedia processor that allows displaying resolutions up to 4 K at 60 frames per second. The popularity of both Raspberry Pi and its Linux-based operating system, together with the affordability of the hardware and a big developer’s community, makes it an attractive platform to demonstrate our solution. 4.2. Camera Unit The size and cost of the camera must allow an easy and scalable deployment on a mobile asset. The camera unit must also be able to provide images at a high frame rate at a resolution of at least 720 p and should have a wide AOV. Most of the cameras that fulfil these size, cost and performance requirements are pinhole CMOS cameras that integrate a rolling shutter sensor. Raspberry Pi offers the Camera Module 2 [ 34 ], which integrates Sony’s 8MP IMX290 CMOS image sensor [ 35 ]. This low-budget camera is one of the few that can run at a resolution of 1280 × 720 at 90 frames per second (FPS). When running at this speed, the camera cannot output the original resolution of 3280 × 2464 pixels and thus reduces the number of pixels by cropping the image, which therefore reduces the angle of vision down to 51 degrees for the horizontal axis and 30 degrees for the vertical axis. To overcome having a low FOV, a fisheye lens was added to the camera, achieving a final angle of vision of 82 and 42 degrees. Another method to expand the camera’s FOV is maximising the distance between the camera and the light infrastructure, although this aspect would highly depend on the conditions of the deployment scenario and the possibilities to install both the infrastructure and the mobile device in optimal locations. Usually, camera sensor boards integrate their own feedback algorithms to adjust exposure, white balancing and gain to adapt to the changes in light of the scene. To simplify
Electronics 2024,13, 82 16 of 30 Electronics2024,13,8216of31 Figure10.SequenceofimagesfromthepointofviewoftheVLPdevicewhiletravellingbeneath theinfrastructure.Theredcirclesindicatethelightsoftheinfrastructure.Thedashedcircleshows thepositionofalightthatisnotvisibleduetotheobstructionoftheAGV. 7.DataAnalysis Foreverytestinthelaboratoryscenario,westoreadditionalinformationrelatedto thecalculatedposition,suchastheidentifierofthelightsusedfortheestimation.With thisadditionalinformation,itwaspossibletoperformapost-analysisandevaluatemultipleconditionsorscenariosbeyondtheoneinwhichthetestwasconducted.Duringthe post-processing,everypositioningachievedwithmorethanfourlightscanberecalculatedusingareducednumberoflights.Thisallowsforevaluatingscenarioswithfewer lights,analysingtheimpactoflightspacing,andidentifyingpossiblemispositionedlights. Thegroupsoflights,orclusters,aredepictedinthediagramshowninFigure11,andare definedasfollows: A,BandCdefinetheoriginalclustersoffourlights,whereallthelightsareseparated 60cmapart.ClusterBsharestwolightswithclusterAandtheothertwowithcluster C. D1andD2alsouseonlyfourlights,buttheseparationbetweenthemis60cminone directionand120cmintheother.Specifically,D1isdefinedbylightsb01,b02,b05 andb06;D2isdefinedbylightsb03,b04,b07andb08. ClusterEusestheedgelights(b01,b02,b07,b08).Theselightsareseparated60cm inonedirectionand180cmintheother. ClusterABandBCusesixlights,combiningthelightsoftwoclusters. ClusterABCuseseightlights,alltheavailablelights. Figure11.Diagramshowingthenomenclatureforthedataanalysis. Additionally,theclusterscanbegroupedintolow-densityorhigh-densityscenarios. Theresultsobtainedbyusingonlyfourlights(clustersA,B,C,D1,D2andE)wouldbea low-densityscenarioandthoseusingmorethanfourlights(clustersAB,BCandABC) correspondtoahigh-densityscenario.Fromthepointofviewofdeploymentcosts,aconfigurationwherethenumberoflightspersquaremetreisminimalisthemostfavourable one.However,theremightbeacompromisebetweentheinfrastructure’sdensityoflights andtheachievableprecision. 8.Results Thissectionpresentstheresultsfromallthetestsconducted.Weevaluatedtheprecisionofthesolutioninfixedpositionsandwithmobility.Theseevaluationswereconductedinthelaboratoryandfactoryenvironments.Finally,weevaluatedthedynamic precisionofthedevicewhenattachedtotheAGVinoperativeconditions. 8.1.LaboratoryStaticTestsResults Figure 11. Diagram showing the nomenclature for the data analysis. Additionally, the clusters can be grouped into low-density or high-density scenarios. The results obtained by using only four lights (clusters A, B, C, D1, D2 and E) would be a low-density scenario and those using more than four lights (clusters AB, BC and ABC) correspond to a high-density scenario. From the point of view of deployment costs, a configuration where the number of lights per square metre is minimal is the most favourable one. However, there might be a compromise between the infrastructure’s density of lights and the achievable precision. 8. Results This section presents the results from all the tests conducted. We evaluated the precision of the solution in fixed positions and with mobility. These evaluations were conducted in the laboratory and factory environments. Finally, we evaluated the dynamic precision of the device when attached to the AGV in operative conditions. 8.1. Laboratory Static Tests Results These tests were conducted in the laboratory testbed, placing the VLP device directly on the floor. The measured grid of the laboratory allowed for measuring positioning errors in twenty spots at four different orientations. In our coordinate system, the light infrastructure formed a rectangle from [ − 60, 0] to [120, 60] cm, approximately. The positions tested were located as follows: •Ten positions were at the borders of the infrastructure; • Eight positions were outside the borders of the infrastructure, separated 60 cm in the Y-axis; •Two positions were inside the borders of the infrastructure. Figure 12 shows an overall image of all the tests performed across the surface of the laboratory, the opacity of the points and segments is used to visualise the distribution in the precision. The red rectangle represents the light infrastructure, which does not appear completely regular because the lights were manually fixed to the ceiling. As noted previously, there is no specific geometric requirement for the Perspective-n-Point to be solved. The results obtained show that the number of lights per square metre (density) has no significant impact on the precision of the solution. As Figure 13 depicts, accuracy improves when more than four lights are used for positioning or when the spacing between lights is larger. This could indicate that increasing the separation between lights is beneficial for both coverage and accuracy.
Electronics 2024,13, 82 17 of 30 Electronics2024,13,8217of31 Thesetestswereconductedinthelaboratorytestbed,placingtheVLPdevicedirectly onthefloor.Themeasuredgridofthelaboratoryallowedformeasuringpositioningerrors intwentyspotsatfourdifferentorientations.Inourcoordinatesystem,thelightinfrastructureformedarectanglefrom[−60,0]to[120,60]cm,approximately.Thepositions testedwerelocatedasfollows: Tenpositionswereatthebordersoftheinfrastructure; Eightpositionswereoutsidethebordersoftheinfrastructure,separated60cminthe Y-axis; Twopositionswereinsidethebordersoftheinfrastructure. Figure12showsanoverallimageofallthetestsperformedacrossthesurfaceofthe laboratory,theopacityofthepointsandsegmentsisusedtovisualisethedistributionin theprecision.Theredrectanglerepresentsthelightinfrastructure,whichdoesnotappear completelyregularbecausethelightsweremanuallyfixedtotheceiling.Asnotedpreviously,thereisnospecificgeometricrequirementforthePerspective-n-Pointtobesolved. Figure12.Scatterplotshowingthepointsobtainedinthestatictests.Thegreendotsdenotethereal positionsofthedevice.Thecalculatedpositionsareconnectedtotherealpositionwithalinecolouredbythedistancetothispoint.Theredrectangleindicatesthestructureofthelights. Theresultsobtainedshowthatthenumberoflightspersquaremetre(density)has nosignificantimpactontheprecisionofthesolution.AsFigure13depicts,accuracyimproveswhenmorethanfourlightsareusedforpositioningorwhenthespacingbetween lightsislarger.Thiscouldindicatethatincreasingtheseparationbetweenlightsisbeneficialforbothcoverageandaccuracy. Figure 12. Scatterplot showing the points obtained in the static tests. The green dots denote the real positions of the device. The calculated positions are connected to the real position with a line coloured by the distance to this point. The red rectangle indicates the structure of the lights. Electronics2024,13,8218of31 Figure13.Boxplotsshowing(a)theerrorbythenumberoflightsusedtopositionand(b)theseparationbetweenthelights(onlyinoneoftheaxes)whenonlyfourlightsareusedtoposition. 8.2.LaboratoryDynamicTestsResults Thesetestswerecarriedoutatthelaboratorytestbed,attachingtheVLPdevicetothe trainwiththecamerainstalledatthecentreofthetrainanditswidestsideorientedperpendiculartothedirectionoftravel. Inthissetup,noindividualfour-lightclusterwasvisiblefromeverypointinthetrack. Forthisreason,wecouldnotevaluatetheprecisioninalow-densityscenario. Beforeperformingdynamictestsusingthetrain,somestaticmeasurementswereperformedatthejunctionsbetweentraintrackstoestablishabaselineforthedynamicerror. 8.2.1.TrackJunctionsStaticTestResults Thetrainwasplacedoneachtrackjunction,whereastatictestwasconducted.Figure 14showsthatthereisacommonabsoluteerroronthetopregionofthegraph,fromy= 90upwards.Thiserrorisapproximately10cmandisdirectedinwards. Figure14.Scatterplotshowingthedistributionintheerroronthetrack’sjunctions.Thegreendots determinetherealposition.Thecalculatedpositionsareconnectedtotherealpositionwithaline colouredbythedistancetothispoint.Theredsquareindicatesthestructureoflights.Theblackline indicatesthecentreofthetraintrack. TheLOESS(LocallyEstimatedScatterplotSmoothing)curveinFigure15indicates thattheerrorcouldbesymmetricalintheaxisdependingonthelocationrelativetothe infrastructureoflights.Areasonforthisbehaviourmightbeaninaccurateidentification ofthecentreofthelightbulbswhenthecamerahasadistantandsidedperspective. Figure 13. Boxplots showing (a) the error by the number of lights used to position and (b) the separation between the lights (only in one of the axes) when only four lights are used to position. 8.2. Laboratory Dynamic Tests Results These tests were carried out at the laboratory testbed, attaching the VLP device to the train with the camera installed at the centre of the train and its widest side oriented perpendicular to the direction of travel. In this setup, no individual four-light cluster was visible from every point in the track. For this reason, we could not evaluate the precision in a low-density scenario. Before performing dynamic tests using the train, some static measurements were performed at the junctions between train tracks to establish a baseline for the dynamic error.
Electronics 2024,13, 82 18 of 30 8.2.1. Track Junctions Static Test Results The train was placed on each track junction, where a static test was conducted. Figure 14 shows that there is a common absolute error on the top region of the graph, from y = 90 upwards. This error is approximately 10 cm and is directed inwards. Electronics2024,13,8218of31 Figure13.Boxplotsshowing(a)theerrorbythenumberoflightsusedtopositionand(b)theseparationbetweenthelights(onlyinoneoftheaxes)whenonlyfourlightsareusedtoposition. 8.2.LaboratoryDynamicTestsResults Thesetestswerecarriedoutatthelaboratorytestbed,attachingtheVLPdevicetothe trainwiththecamerainstalledatthecentreofthetrainanditswidestsideorientedperpendiculartothedirectionoftravel. Inthissetup,noindividualfour-lightclusterwasvisiblefromeverypointinthetrack. Forthisreason,wecouldnotevaluatetheprecisioninalow-densityscenario. Beforeperformingdynamictestsusingthetrain,somestaticmeasurementswereperformedatthejunctionsbetweentraintrackstoestablishabaselineforthedynamicerror. 8.2.1.TrackJunctionsStaticTestResults Thetrainwasplacedoneachtrackjunction,whereastatictestwasconducted.Figure 14showsthatthereisacommonabsoluteerroronthetopregionofthegraph,fromy= 90upwards.Thiserrorisapproximately10cmandisdirectedinwards. Figure14.Scatterplotshowingthedistributionintheerroronthetrack’sjunctions.Thegreendots determinetherealposition.Thecalculatedpositionsareconnectedtotherealpositionwithaline colouredbythedistancetothispoint.Theredsquareindicatesthestructureoflights.Theblackline indicatesthecentreofthetraintrack. TheLOESS(LocallyEstimatedScatterplotSmoothing)curveinFigure15indicates thattheerrorcouldbesymmetricalintheaxisdependingonthelocationrelativetothe infrastructureoflights.Areasonforthisbehaviourmightbeaninaccurateidentification ofthecentreofthelightbulbswhenthecamerahasadistantandsidedperspective. Figure 14. Scatterplot showing the distribution in the error on the track’s junctions. The green dots determine the real position. The calculated positions are connected to the real position with a line coloured by the distance to this point. The red square indicates the structure of lights. The black line indicates the centre of the train track. The LOESS (Locally Estimated Scatterplot Smoothing) curve in Figure 15 indicates that the error could be symmetrical in the axis depending on the location relative to the infrastructure of lights. A reason for this behaviour might be an inaccurate identification of the centre of the light bulbs when the camera has a distant and sided perspective. Electronics2024,13,8219of31 Figure15.BoxplotshowingtheerrorintheXandYaxisforeachtrackjunction. 8.2.2.TrainMobilityTestResults Inthemobilitytests,acamerafixedattheceilingofthelaboratorywasusedtoverify therealpositionofthetrain.Thiscamerarecordedat90FPSataresolutionof640by480 pixels.ThecamerawassynchronisedwiththepositioningcameraonthetrainviaNetworkTimeProtocol(NTP)synchronisationandannotatedthetimestampineveryframe. Atotalofthreetestswereconductedforeachspeed.Thedurationofthehighspeed (78cm/s)testswas60s,andthedurationofthelowspeed(12cm/s)testswas180s.The recordingswereexaminedmanually,andwenotedthetimestampatwhichthetrain’s camerapassedthrougheachofthetrackjunctionmarks.Weselectedthefirstposition reportedbythecamera’spositioningsoftwareafterthesetimestamps. Aswiththestatictests,thereisacleardeviationinwardsoftheerrorforpointsabove y=90.Additionally,Figure16a,bshowallthepointscomputedbythepositioningprogram.Itdenotessomedisplacementofapproximately5cmatthetransitionswherethe numberoflightsusedforpositioningchanges. Figure16cshowshowtheoverallerrorispracticallyequalbetweenthetwospeeds andthatitislessthan10cmin75%oftheoccasions.Thisindicatesthatspeedismost likelynotdetrimentaltotheaccuracyinanactualfactorydeployment,wherespeedsof 120cm/scouldbereached. Figure 15. Boxplot showing the error in the Xand Yaxis for each track junction. 8.2.2. Train Mobility Test Results In the mobility tests, a camera fixed at the ceiling of the laboratory was used to verify the real position of the train. This camera recorded at 90 FPS at a resolution of 640 by 480 pixels. The camera was synchronised with the positioning camera on the train via Network Time Protocol (NTP) synchronisation and annotated the timestamp in every frame. A total of three tests were conducted for each speed. The duration of the high speed (78 cm/s) tests was 60 s, and the duration of the low speed (12 cm/s) tests was 180 s. The recordings were examined manually, and we noted the timestamp at which the train’s camera passed through each of the track junction marks. We selected the first position reported by the camera’s positioning software after these timestamps.
Electronics 2024,13, 82 19 of 30 As with the static tests, there is a clear deviation inwards of the error for points above y = 90. Additionally, Figure 16a,b show all the points computed by the positioning program. It denotes some displacement of approximately 5 cm at the transitions where the number of lights used for positioning changes. Electronics2024,13,8220of31 Figure16.Scatterplotshowingthepositionscalculatedat(a)highspeedand(b)lowspeed.Thered rectanglerepresentstheinfrastructureoflights.Theblacklinerepresentsthecentreofthetrain track.Thegreendotsaretherealpositionsatthetraintrackjunctions.Thecolourofthepoints representsthenumberoflightsusedtocalculatethatposition.(c)Boxplotsoftheerrorsmeasured inthesetestsbydifferentspeeds. 8.3.FactoryStaticTestResults Inthefactorydeployment,staticmeasurementswereonlyperformedinthepoints undereachoftheeightlights. Figure17ashowsanoverallimageofallthestatictests.Themaximumerrorisfound atthetop-rightcorner.Asobservedinthelaboratoryscenario,Figure17b,cshowthat accuracyimproveswiththenumberoflightsusedandtheseparationbetweenthem. However,despitetheseparationoflightsislargerinthefactorythaninthelaboratory, theresultsarenotbetter.Thiscouldbeexplainedbythedifferenceinheight,whichincreasedfrom2.2minthelaboratoryto4.2minthefactory. Figure 16. Scatterplot showing the positions calculated at (a) high speed and (b) low speed. The red rectangle represents the infrastructure of lights. The black line represents the centre of the train track. The green dots are the real positions at the train track junctions. The colour of the points represents the number of lights used to calculate that position. (c) Boxplots of the errors measured in these tests by different speeds. Figure 16c shows how the overall error is practically equal between the two speeds and that it is less than 10 cm in 75% of the occasions. This indicates that speed is most likely not detrimental to the accuracy in an actual factory deployment, where speeds of 120 cm/s could be reached. 8.3. Factory Static Test Results In the factory deployment, static measurements were only performed in the points under each of the eight lights.
Electronics 2024,13, 82 20 of 30 Figure 17a shows an overall image of all the static tests. The maximum error is found at the top-right corner. As observed in the laboratory scenario, Figure 17b,c show that accuracy improves with the number of lights used and the separation between them. However, despite the separation of lights is larger in the factory than in the laboratory, the results are not better. This could be explained by the difference in height, which increased from 2.2 m in the laboratory to 4.2 m in the factory. Electronics2024,13,8221of31 Figure17.(a)Scatterplotshowingallofthepointsobtainedinthestatictestsinthefactory.The greendotsdefinetherealposition.Thecalculatedpositionsareconnectedtotherealpositionwith alinecolouredbythedistancetothispoint.Boxplotsshowingtheerrorinstaticpositioninginthe factorydependingon(b)thenumberoflightsusedtopositionand(c)theseparationbetweenthe lightsfor4-lightpositioning. 8.4.FactoryMobilityTestResults Toevaluatetheperformanceofoursolutioninafactoryenvironment,wedecidedto conducttwotests.Thefirstoneevaluatedtheaccuracyandperformanceofthesolution andthesecondoneprovidedabaselinethatcouldbecomparedwiththeAGVtests. 8.4.1.MultipleOrientationTests Totesttheprecisionandperformancewithmobility,wedepictedapathinthefloor formedbystraightlinesbetweeneachlightprojection(seeFigure18).Thesetestsdemonstratedthecapabilityofthesystemtopositionadeviceatanypointinsidethecovered area,anditsreliabilityandrobustness,astherobotwouldviewthescenarioindifferent orientations,whichincreasesthechancesofreceivinginterferencefromotherlight sources. Figure18showsthescatterplotforthetests.Forreference,wenameeachstraightline as“segment”startingwithnumber1atthebottomandendingwith7atthetop.Ingeneral,bothtestslookverysimilar,whichdemonstratesrepeatability.Thoughthefirsttest showsfewerpointsforsegment7,thisdiscrepancyisnotrelatedtothepositioningalgorithm,buttoanearlyfinalisationofthedatacollectionservice. a ) b) c) Figure 17. (a) Scatterplot showing all of the points obtained in the static tests in the factory. The green dots define the real position. The calculated positions are connected to the real position with a line coloured by the distance to this point. Boxplots showing the error in static positioning in the factory depending on (b) the number of lights used to position and (c) the separation between the lights for 4-light positioning. 8.4. Factory Mobility Test Results To evaluate the performance of our solution in a factory environment, we decided to conduct two tests. The first one evaluated the accuracy and performance of the solution and the second one provided a baseline that could be compared with the AGV tests. 8.4.1. Multiple Orientation Tests To test the precision and performance with mobility, we depicted a path in the floor formed by straight lines between each light projection (see Figure 18). These tests demonstrated the capability of the system to position a device at any point inside the covered area, and its reliability and robustness, as the robot would view the scenario in different orientations, which increases the chances of receiving interference from other light sources.
Electronics 2024,13, 82 21 of 30 Electronics2024,13,8222of31 Figure18.Scatterplotshowingthepositionscalculatedwiththelinefollowertest.Theorangearrowsindicatethelinesandthedirectionofthemovement.Thecoloursrepresenthowmanylights wereusedtocalculatethatposition.Thelabelsindicatethesegmentnumber. The16:9aspectratioofthecamerasensorimpliesaFOVthatdependsontheorientationofthecamera;therefore,althoughbeinginthecentreofthetestbed(segment4),the cameraisunabletoseealleightlights.Figure19showstheboxplotsoftheerrorinthe zigzagtestswiththelinefollowercolouredbytheorientationoftherobot.Thereason whythehorizontalorientation(segments1,3,5and7)achievesbetterresultsisbecause thewidesideofthesensorisparalleltothetestbed,andthereforeisabletoseeallthe lights.Additionally,thesecondsegmentshowsasignificantlyhighererrorvariation, whichisexplainedbyaslighttiltbetweenthecameraandtherobotthatlimitsthenumber oflights(onlyfour)viewedfromthatlocation. Figure19.Boxplotshowingtheerrorinthezigzagtestwiththelinefollowerinthefactoryforeach segmentandorientation. 8.4.2.StraightLineTests Forthesetests,withtheobjectiveofsimulatingthetrajectoryofarealAGVusingthe linefollowerrobot,weplacedtapeinastraightlineonthecentreoftheroadthatspanned 8mlong. Figure20ashowstheresultsforoneofthetestswherethelinefollowerrobotmoved inastraightline.Therobotwastravellingfrombottomtotop,whichexplainsthat,asit Figure 18. Scatterplot showing the positions calculated with the line follower test. The orange arrows indicate the lines and the direction of the movement. The colours represent how many lights were used to calculate that position. The labels indicate the segment number. Figure 18 shows the scatterplot for the tests. For reference, we name each straight line as “segment” starting with number 1 at the bottom and ending with 7 at the top. In general, both tests look very similar, which demonstrates repeatability. Though the first test shows fewer points for segment 7, this discrepancy is not related to the positioning algorithm, but to an early finalisation of the data collection service. The 16:9 aspect ratio of the camera sensor implies a FOV that depends on the orientation of the camera; therefore, although being in the centre of the testbed (segment 4), the camera is unable to see all eight lights. Figure 19 shows the boxplots of the error in the zigzag tests with the line follower coloured by the orientation of the robot. The reason why the horizontal orientation (segments 1, 3, 5 and 7) achieves better results is because the wide side of the sensor is parallel to the testbed, and therefore is able to see all the lights. Additionally, the second segment shows a significantly higher error variation, which is explained by a slight tilt between the camera and the robot that limits the number of lights (only four) viewed from that location. Electronics2024,13,8222of31 Figure18.Scatterplotshowingthepositionscalculatedwiththelinefollowertest.Theorangearrowsindicatethelinesandthedirectionofthemovement.Thecoloursrepresenthowmanylights wereusedtocalculatethatposition.Thelabelsindicatethesegmentnumber. The16:9aspectratioofthecamerasensorimpliesaFOVthatdependsontheorientationofthecamera;therefore,althoughbeinginthecentreofthetestbed(segment4),the cameraisunabletoseealleightlights.Figure19showstheboxplotsoftheerrorinthe zigzagtestswiththelinefollowercolouredbytheorientationoftherobot.Thereason whythehorizontalorientation(segments1,3,5and7)achievesbetterresultsisbecause thewidesideofthesensorisparalleltothetestbed,andthereforeisabletoseeallthe lights.Additionally,thesecondsegmentshowsasignificantlyhighererrorvariation, whichisexplainedbyaslighttiltbetweenthecameraandtherobotthatlimitsthenumber oflights(onlyfour)viewedfromthatlocation. Figure19.Boxplotshowingtheerrorinthezigzagtestwiththelinefollowerinthefactoryforeach segmentandorientation. 8.4.2.StraightLineTests Forthesetests,withtheobjectiveofsimulatingthetrajectoryofarealAGVusingthe linefollowerrobot,weplacedtapeinastraightlineonthecentreoftheroadthatspanned 8mlong. Figure20ashowstheresultsforoneofthetestswherethelinefollowerrobotmoved inastraightline.Therobotwastravellingfrombottomtotop,whichexplainsthat,asit Figure 19. Boxplot showing the error in the zigzag test with the line follower in the factory for each segment and orientation.
Electronics 2024,13, 82 22 of 30 8.4.2. Straight Line Tests For these tests, with the objective of simulating the trajectory of a real AGV using the line follower robot, we placed tape in a straight line on the centre of the road that spanned 8 m long. Figure 20a shows the results for one of the tests where the line follower robot moved in a straight line. The robot was travelling from bottom to top, which explains that, as it approaches the infrastructure of lights, firstly it views only four lights, then six and finally all eight lights. The coverage of the lighting infrastructure is greater than the depicted line, but we limited the test, from Y = − 350 to Y = 400, to match the area covered by the AGV tests in an operative environment. Figure 20a also depicts a regression line to evaluate how much the line follower diverted from the ground truth. The angle difference is only 1 ◦ (note that the proportions shown in the figure exaggerate the deviation). The position of the lights was verified to assure that the deviation was not caused by an imprecision in the measurement of the reference coordinates. Thus, it was concluded that this deviation must be caused by another source that is more difficult to correct, such as the difference in height between the lights or the inclination of the camera. Electronics2024,13,8223of31 approachestheinfrastructureoflights,firstlyitviewsonlyfourlights,thensixandfinally alleightlights.Thecoverageofthelightinginfrastructureisgreaterthanthedepictedline, butwelimitedthetest,fromY=−350toY=400,tomatchtheareacoveredbytheAGV testsinanoperativeenvironment.Figure20aalsodepictsaregressionlinetoevaluate howmuchthelinefollowerdivertedfromthegroundtruth.Theangledifferenceisonly 1 ° (notethattheproportionsshowninthefigureexaggeratethedeviation).Theposition ofthelightswasverifiedtoassurethatthedeviationwasnotcausedbyanimprecisionin themeasurementofthereferencecoordinates.Thus,itwasconcludedthatthisdeviation mustbecausedbyanothersourcethatismoredifficulttocorrect,suchasthedifference inheightbetweenthelightsortheinclinationofthecamera. Figure20.(a)Scatterplotshowingonetrajectorywiththelinefollowerrobotfollowingastraight line.TheVLPcamerawasorientedwiththewidestsideparalleltotheinfrastructure.(b)Scatterplot showingtheerrorintheX-axisforallthetests.Boxplotsshowingtheerror(c)dependingonthe numberoflightsusedand(d)dependingontheseparationofthelights. Theerrorbetweenthepointscalculatedinthetestsandthegroundtruthwasmeasured.TheresultsareshowninFigures19cand20b,d.Figure20bdepictstheerroranalysed foreverypointoftheYaxis,inthedirectionofthemovement.Forthepointsdirectly underthetestbed(eightlightscase),theerrorisbelow6.5cmfor75%ofthemeasured samples.AsitcanbeseeninFigure20c,theerrorissignificantlyhigherforfourlights. Notethattheaccuracyofthetestsissimilartotheoneachievedinthehorizontal segments(witheightlights)forthemultipleorientationscenario. Comparedtothestatictests,interestingly,themobilescenariooutperformsthemin termsofaccuracy,astheresultsshowanaverageimprovementof5.5cm.Thisindicates thatadevicerunningthroughthemiddleofthelightinfrastructuremayachieveamore accuratepositionthanadeviceonthesidesoftheinfrastructure.Thisfactisrelevantfor decidinghowtodeploytheVLPinfrastructure. 8.5.RealFactoryDeployment Afterthemobileandstatictests,aVLPdevicewasattachedtoanAGV,asdepicted earlierinSection6.2.(Figure9a),thatpassesseveraltimesundertheVLP’slight a) b) d) c) b) Figure 20. (a) Scatterplot showing one trajectory with the line follower robot following a straight line. The VLP camera was oriented with the widest side parallel to the infrastructure. (b) Scatterplot showing the error in the X-axis for all the tests. Boxplots showing the error (c) depending on the number of lights used and (d) depending on the separation of the lights. The error between the points calculated in the tests and the ground truth was measured. The results are shown in Figures 19c and 20b,d. Figure 20b depicts the error analysed for every point of the Y axis, in the direction of the movement. For the points directly under the testbed (eight lights case), the error is below 6.5 cm for 75% of the measured samples. As it can be seen in Figure 20c, the error is significantly higher for four lights. Note that the accuracy of the tests is similar to the one achieved in the horizontal segments (with eight lights) for the multiple orientation scenario. Compared to the static tests, interestingly, the mobile scenario outperforms them in terms of accuracy, as the results show an average improvement of 5.5 cm. This indicates that a device running through the middle of the light infrastructure may achieve a more accurate position than a device on the sides of the infrastructure. This fact is relevant for deciding how to deploy the VLP infrastructure.
Electronics 2024,13, 82 23 of 30 8.5. Real Factory Deployment After the mobile and static tests, a VLP device was attached to an AGV, as depicted earlier in Section 6.2. (Figure 9a), that passes several times under the VLP’s light infrastructure during its common operation. Currently, we have collected data for 138 trajectories of the AGV out from 16 days of recording. Figure 21 shows three representative examples of these trajectories captured in different days during a span of a week, to avoid any correlations based on the day of the recording. The colour of the points in the plot indicates how many lights were used to calculate the positioning. For reference, the AGV travelled in the direction bottom to top. Therefore, as the robot entered the covered region, the positioning was calculated first with four, then with six and finally with eight lights. Unfortunately, due to the visual obstruction of the lights caused by the AGV’s own structure, the time the AGV spends positioning with eight lights (and therefore, with the maximum accuracy) is reduced. This behaviour is visualised in Figure 10, as the point of view of the camera shows how the back part of the AGV blocks the light on the left side of the image. Additionally, Figure 21 denotes that the AGV can be positioned 270 cm (Y = − 340) before entering the light infrastructure, but only 20 cm (Y = 340) after leaving the area beneath the light infrastructure. This is explained by a forward tilt of the camera, manually adjusted to minimise the obstruction of the AGV without compromising the accuracy. Electronics2024,13,8224of31 infrastructureduringitscommonoperation.Currently,wehavecollecteddatafor138 trajectoriesoftheAGVoutfrom16daysofrecording. Figure21showsthreerepresentativeexamplesofthesetrajectoriescapturedindifferentdaysduringaspanofaweek,toavoidanycorrelationsbasedonthedayofthe recording.Thecolourofthepointsintheplotindicateshowmanylightswereusedto calculatethepositioning.Forreference,theAGVtravelledinthedirectionbottomtotop. Therefore,astherobotenteredthecoveredregion,thepositioningwascalculatedfirst withfour,thenwithsixandfinallywitheightlights.Unfortunately,duetothevisualobstructionofthelightscausedbytheAGV’sownstructure,thetimetheAGVspendspositioningwitheightlights(andtherefore,withthemaximumaccuracy)isreduced.This behaviourisvisualisedinFigure10,asthepointofviewofthecamerashowshowthe backpartoftheAGVblocksthelightontheleftsideoftheimage.Additionally,Figure21 denotesthattheAGVcanbepositioned270cm(Y=−340)beforeenteringthelightinfrastructure,butonly20cm(Y=340)afterleavingtheareabeneaththelightinfrastructure. Thisisexplainedbyaforwardtiltofthecamera,manuallyadjustedtominimisetheobstructionoftheAGVwithoutcompromisingtheaccuracy. Figure21.AnnotatedscatterplotforthreetrajectorieswheretheVLPdevicewasplacedontheAGV. Additionally,Figure21showsthreedifferentcolouredlines.Theredlineisdenoted asgroundtruthandcorrespondstotheestimatedpaththattheAGVisfollowing.This pathwasbuiltfrommeasurementsofarealtrajectory,wheretheAGVwasforcedtostop atseveralpoints.Theblueline,labelledasthemeanregressionline,representstheregressionlineobtainedfromallthepointsofallthetrajectoriestrackedfortheAGV.Thegreen line,tightlyoverlappingwiththeblueline,istheregressionlinecalculatedonlywiththe pointsofeachspecifictrajectory. Figure22ashowsthescatterplotfortheerroragainstthegroundtruthfor62trajectorieswheretheAGVhadtravelledundertheinfrastructurewithoutstopping.Ascanbe observed,thebestresultswereachievedundereightlightsandtheworstatthetransitory sections(usingonlyfourandsixlights),especiallywhentherobotwasleavingtheinfrastructure(rightside). Figure 21. Annotated scatterplot for three trajectories where the VLP device was placed on the AGV. Additionally, Figure 21 shows three different coloured lines. The red line is denoted as ground truth and corresponds to the estimated path that the AGV is following. This path was built from measurements of a real trajectory, where the AGV was forced to stop at several points. The blue line, labelled as the mean regression line, represents the regression line obtained from all the points of all the trajectories tracked for the AGV. The green line, tightly overlapping with the blue line, is the regression line calculated only with the points of each specific trajectory.
Electronics 2024,13, 82 24 of 30 Figure 22a shows the scatterplot for the error against the ground truth for 62 trajectories where the AGV had travelled under the infrastructure without stopping. As can be observed, the best results were achieved under eight lights and the worst at the transitory sections (using only four and six lights), especially when the robot was leaving the infrastructure (right side). Electronics2024,13,8225of31 Figure22.(a)Scatterplotshowingtheerrorin62non-stoppingtrajectoriesoftheAGVcomparedto thegroundtruth.(b)Empiricalcumulativedistributionfunctionoftheerrorusingadifferentnumberoflightsandfordifferentlightseparations.(c)BoxplotshowingtheresidualsfortheAGVdatasetcalculatedfortheregressionlineandthegroundtruth. Figure22cshowstheboxplotsfortheerrorinthesame62trajectories.Theboxplot showingtheerroragainstthemeanregressionlineprovesrepeatabilityonthepositioning ofthetrajectoryoftheAGV.TheboxplotshowingtheerroragainstthegroundtruthindicatesthatthepositioningerrorintheAGVisgenerallylessthan15cm. Figure22bcontainstheempiricalcumulativedistributionfunctionsoftheerrorwhen analysingtheimpactofthenumberoflightsusedforthepositioningandtheseparation betweenthem.Itshowsthatthebestaccuracy,under10cmin90%oftheoccasions,is achievedusingeightlightsseparatedby120cmandalsowithfourlightsandaseparation of360cm.Additionally,thetransitorysectionswherenotalleightlightscanbeseen(at thestartandendofthecoveredarea)provideanacceptableaccuracybelow12and20cm, forsixandfourlights,respectively,in90%oftheoccasions. FortheAGVtests,thedeviationbetweentheaveragepositioningtrajectoryandthe groundtruthis3.2°,whichis2.4°morethanwhatwewouldexpectbasedontheline followerresults.However,consideringthattheerrorisnotcorrelatedtothelengthofthe testbed,thisdeviationfallswithintheexpectationsforthecurrentscenario.Forinstance, inaworst-casescenario,errormightshiftby−20cmatthebeginningofthetestbedand by+20cmattheend,resultingina3.27°deviationangleforthecurrentlength.Nevertheless,iftheerrorremainsconstant,thedeviationwillrectifyitselfforlongerdistances. 9.Discussion Inthiswork,wedevelopedandevaluatedalow-budgetsystemdesignedtoaccuratelypositionamovingvehiclewithinafactoryenvironment.Ourapproachtacklesthe Perspective-n-Pointproblembyemployinganovelmethodofidentificationtoestablish 2D–3Dcorrespondencethat,throughundersampling,avoidsrelyingontherollingshutter effect,thesizeoftheLEDlightorthedistancefromit. Toenhancethescalabilityofthisnewidentificationmethod,weintroducedaspatial constraint,wherethecombinationsoffourlocallyidentifiedlights(duetothefour-point requirementtosolvethePerspective-n-Pointproblem)wereusedtoidentifythem a) b)c) Figure 22. (a) Scatterplot showing the error in 62 non-stopping trajectories of the AGV compared to the ground truth. (b) Empirical cumulative distribution function of the error using a different number of lights and for different light separations. (c) Boxplot showing the residuals for the AGV dataset calculated for the regression line and the ground truth. Figure 22c shows the boxplots for the error in the same 62 trajectories. The boxplot showing the error against the mean regression line proves repeatability on the positioning of the trajectory of the AGV. The boxplot showing the error against the ground truth indicates that the positioning error in the AGV is generally less than 15 cm. Figure 22b contains the empirical cumulative distribution functions of the error when analysing the impact of the number of lights used for the positioning and the separation between them. It shows that the best accuracy, under 10 cm in 90% of the occasions, is achieved using eight lights separated by 120 cm and also with four lights and a separation of 360 cm. Additionally, the transitory sections where not all eight lights can be seen (at the start and end of the covered area) provide an acceptable accuracy below 12 and 20 cm, for six and four lights, respectively, in 90% of the occasions. For the AGV tests, the deviation between the average positioning trajectory and the ground truth is 3.2 ◦ , which is 2.4 ◦ more than what we would expect based on the line follower results. However, considering that the error is not correlated to the length of the testbed, this deviation falls within the expectations for the current scenario. For instance, in a worst-case scenario, error might shift by − 20 cm at the beginning of the testbed and by +20 cm at the end, resulting in a 3.27 ◦ deviation angle for the current length. Nevertheless, if the error remains constant, the deviation will rectify itself for longer distances. 9. Discussion In this work, we developed and evaluated a low-budget system designed to accurately position a moving vehicle within a factory environment. Our approach tackles the Perspective-n-Point problem by employing a novel method of identification to establish
Electronics 2024,13, 82 25 of 30 2D–3D correspondence that, through undersampling, avoids relying on the rolling shutter effect, the size of the LED light or the distance from it. To enhance the scalability of this new identification method, we introduced a spatial constraint, where the combinations of four locally identified lights (due to the four-point requirement to solve the Perspective-n-Point problem) were used to identify them globally. This spatial constraint took the form of a rectangle of lights in our case, but this geometry could be adapted to the existing lighting configuration in a factory. We showed that a Raspberry Pi 4 computer connected to a pinhole camera operating at 90 FPS was able to calculate positioning at the same rate as the image influx of the camera. This feat was achieved by running custom optimised software that uses computer vision techniques to filter interferences and identify the lights. The positioning time achieved by our solution, 11 ms, is significantly faster that other similar solutions such as those reported in [17,18], which achieved 44 ms (Raspberry Pi 3) and 162 ms (Intel i5-6600), respectively. The possibility of performing some or all the operations using edge or cloud computing can also be considered as it can offer much higher processing capability. This extra capacity can be used for higher resolution images or even running multiple positioning algorithms in real time. However, ensuring wireless communication in real time with a roundtrip time below eleven ms would pose disadvantages: firstly, it would add complexity to the solution, which implies adding points of failure; secondly, having a stable and fast internet connection at all times would depend on deploying additional Wi-Fi access points or using 5G, if available; and thirdly, the wireless communication is susceptible to radio frequency interferences, which would eliminate VLP’s advantage in environments prone to interference. Moreover, the embedded device would require a non-negligible computing power to be able to capture and to compress high-resolution images for the edge or cloud computer to process them. In other words, edge or cloud computing would not be advantageous over the locally processing solution implemented because it would impair the scalability, increase the cost and increase the complexity of the solution. The possibility of performing some or all the operations using edge or cloud computing can also be considered as it can offer much higher processing capability. This extra capacity can be used for faster image acquisition cameras or better resolution images. However, this solution implies sending images wireless. This must be done by keeping the delay in image processing (compressing locally, transferring to the processing facility, uncompressing, processing, obtaining location and sending back this information for navigation) under the order of ms. For example, with the present settings the total roundtrip time must be under 11 ms. To this difficulty we must add the continuous wireless connectivity and the fact that the bandwidth available should be shared among the different robots moving in the premises. Connectivity can be provided, for example, by Wi-Fi or private 5G, but considering the complexity of industrial environments, this bandwidth might result difficult to achieve. In other words, edge or cloud computing probably would not reduce the cost and complexity of the locally implemented processing solution. The achieved positioning rate of 90 Hz almost reaches the recommended positioning rate of 100 Hz for outdoor automated vehicles, making it suitable for indoor AGVs. It could also be complemented with IMUs for dead-reckoning to meet the 100 Hz positioning rate recommendation. The novel method of identification offers flexibility, as it could use existing lighting by just installing a modulator, albeit with reduced illumination efficiency. Alternatively, additional lighting containing specific firmware could be installed. For this project, we deployed an infrastructure comprising eight COTS light bulbs running a simple firmware that flickered the light without producing visible stroboscopic effects, adhering to European recommendations [31]. The deployed infrastructure is complementary to the current lighting infrastructure of the factory, to avoid disturbing the operational environment, but also to test the coexistence of the solution with existing lightning systems, and even with visible light communication devices such as Li-Fi. The added lights are low power devices in comparison to the light