POLITECNICO DI MILANO Master of Science Intelecommunication Engineering
Total Page:16
File Type:pdf, Size:1020Kb
POLITECNICO DI MILANO Master of Science inTelecommunication engineering Electronics, Information and Bioengineering Department Visual Search modeling for end to end simulation of a Cyber Physical Systems Supervisor: Prof. Marco Marcon Advisor: Eng. Danilo Pietro Pau Eng. Emanuele Plebani Graduation thesis of: Shen Yun 835888 Acadmic year 2015 - 2016 Acknowledgements There are people whom I would like to acknowledge, for their assistance and support during my studies in Politecnico di Milano. I would like to thank all the wonderful teachers, colleagues, family, and friends whom I have been fortunate to interact with during my lifetime. I would like to take this opportunity to express my sincere gratitude and appreciation to my supervisor in STMicroelectronics, Danilo Pau for his countless efforts in guiding and encouraging me throughout my studies and work. His friendly attitude has been a very strong support for me to work with him. This work without his guidances and encouragements was not possible. I am so grateful to him. I am also thankful to Prof. Marco Marcon, for his valuable advices in monthly meetings and discussions, which was a plus point during my re- search. Without doubt, all these meetings together guided me into a bright way to handle the research and studies. I would like to give special thanks to Eng.Emanuele Plebani and Eng.Marco Brando Paracchini in STMicroelectronics for the uncountable helps and ad- vices they have given to me during my internship in STMicroelectronics. Also I have to thank my colleagues in the university, for their effortless helps, valuable advices and discussions. We had great and unforgettable times during all these years. The last but not least, I am so thankful to my family whom they have been a continuous source of encouragements and supports in all directions during my life. ii Abstract We live in a interconnected digital world. Over the past couple of decades, “the internet of the things” has permeated every aspect of modern life and its impact keeps growing in the future years. They features computational cores and all kinds of hetereogeneous sensors are all around and sense us, allowing a deeper interaction with the physical world, collecting, storing and exchanging intelligently information. These systems that link the digi- tal (cyber) with the physical world have become known as Cyber-Physical Systems (CPS). Visual Search (VS) is an Content Based Image Recognition (CBIR) application able to retrieve information of a query image comparing it against a large image database. We can consider VS as an application that can built upon a very large and distributed CPS. composed by a limitless number of interconnected mobile devices, as many as the number of image sensor available in the world, and servers in the cloud. The goal of this thesis is to build a CPS simulator for the client, the network and the server, and mapping onto it the Visual Search application. This CPS simulator need to simulate efficiently and accurretly several full operating systems as server and users coupled with a network. Key words: CPS, gem5, OMNeT++, Visual Search , CERTI HLA, Re- trieval, CDVS iv Contents Acknowlegements ii Abstract iv 1 Introduction 1 1.1 IntroductionofCPS ....................... 1 1.2 IntroductionofVisualSearch . 2 1.3 Motivation ............................ 2 1.4 Objectives............................. 3 1.4.1 ObjectivesoftheMVS. 3 1.4.2 ObjectivesoftheCPSsimulator . 4 1.5 MajorContributionoftheThesis . 4 1.6 OrganisationoftheThesis. 5 2 State of the art 7 2.1 StateoftheartofCPS...................... 7 2.1.1 BackgroundofCPS ................... 7 2.1.2 ApplicationoftheCPS . 9 2.2 CPSsimulationtools . 11 2.2.1 Introduction of some Processor-Only Simulation Tools 12 2.2.2 Introduction of some Network-Only Simulation Tools . 14 2.2.3 Introduction of some Processing Simulators with a NetworkExtension . 17 2.3 StateoftheartofVisualSearch . 19 2.3.1 BackgroundofVS . 19 2.3.2 Existing Visual Search Applications . 22 2.3.3 Compact descriptor for Visual Search(CDVS) . 24 2.3.4 The functionality and advantage of CDVS . 25 vi 3 The Structure of the MVS and CPS simulator 28 3.1 ThestructureoftheMobileVisualSearch . 28 3.2 Mapping the Mobile Visual Search on the CPS. 31 4 Visual Search 33 4.1 DescriptorExtraction . 33 4.2 RetrievalStage .......................... 38 5 Building of the CPS simulator 41 5.1 CPSProcessingSubsystem . 44 5.1.1 ConfigurationoftheGEM5system . 45 5.1.2 NetworkmodelofGEM5 . 46 5.2 CPSNetworkSubsystem . 48 5.3 Integrationtool: CERTIHLA. 49 5.3.1 CERTIHLAarchitecture . 50 5.3.2 CERTIHLASynchronisation . 51 6 Visual Search Evaluation on CPS simulator 55 6.1 TestScenario1 .......................... 56 6.1.1 Descriptor Extraction on the user side . 56 6.1.2 Retrievalonserverside . 58 6.2 TestScenario2 .......................... 61 6.3 TestScenario3 .......................... 64 7 Conclusion and Recommendation 69 7.1 Conclusion ............................ 69 7.2 Recommendation ......................... 69 Bibliografia 71 A Imgae Retrieval results with only global descriptors 78 B Imgae Retrieval results with global and local descriptors 80 C Excution time of the simulation in Test scenario 2 82 List of Tables 6.1 Information of simulated ARM CPU and the reference real ARMCPU ............................ 57 6.2 ExecutiontimeofDescriptorExtraction . 57 6.3 Information of simulated X86 CPU and native X86 CPU . 59 6.4 ExecutiontimeofRetrievalStage. 59 6.5 Network latency of the single client situation . 62 6.6 Executiontimeofclientandserver . 64 6.7 Network latency of the three clients situation. 66 6.8 Execution time that clients get the results. 67 viii List of Figures 2.1 WorldSenssimulator.. 19 2.2 AnexampleofGoogleGoogles. 22 2.3 AnexampleofAmazonFlows. 24 3.1 UML user case diagram for Mobile Visual Search.. 29 3.2 UML Sequence diagram for Mobile Visual Search, client en- coding................................ 29 3.3 UML Sequence diagram for Mobile Visual Search, server en- coding................................ 30 3.4 UMLSequence diagram for Mobile Visual Search, single server withmulticlients. ........................ 31 3.5 Mobile Visual Search mapped on the CPS simulator . 32 4.1 PipelineofDescriptorExtraction . 33 4.2 Theworkflowofkeypointdetection . 34 4.3 BlockImageLOGFiltering . 35 4.4 GlobalDescriptoraggregation. 37 4.5 DiagramofRetrievalalgorithm . 40 5.1 CPS Processing Subsystem inputs and outputs. 41 5.2 CPS Network Subsystem inputs and outputs. 43 5.3 CPSsimulatorProcessingSubsystem . 45 5.4 GEM5 systems interconnection in the CPS simulator . 47 5.5 CPSsimulatornetworksubsystem. 49 5.6 TheCERTIHLAarchitecture. 51 5.7 CERTIHLAGlobalSynchronization. 53 5.8 CERTI HLA Local and Global Synchronisation . 54 6.1 ExecutiontimeofDescriptorExtraction . 58 6.2 ExecutiontimeofRetrievalStage . 60 6.3 Execution time of Retrieval Stage(host seconds). 60 6.4 Network topology for single client and single server . 61 ix 6.5 Network latency of the single client situation . 63 6.6 Executiontimeofclientandserver . 64 6.7 Network topology for multiple clients with a server . 65 6.8 Network latency of the three clients situation. 67 6.9 Execution time that clients get the results. 68 Chapter 1 Introduction 1.1 Introduction of CPS Cyber-Physical System (CPS) is a mixture of computing components and physical components. More specifically, in 2006 Hellen Gill introduced this term to indicate: “...physical, biological, and engineered systems whose operations are inte- grated, monitored, and/or controlled by a computational core. Components are networked at every scale. Computing is deeply embedded into every phys- ical component, possibly even into materials. The computational core is an embedded system, usually with requirements of real-time responses, and is most often distributed” [19] CPSs are based on the interaction between physical and digital world. On one hand they have to deal with problems deriving from manufacturing processes, the behavior of physical materials and the unpredictability of the physical world; on the other hand, they have to deal with the openness of the internet and its risks[28], such as physical disasters caused by cyber- attacks[11]. CPS is kind of similar to the the term Internet of Things (IoT), they share the same goal - building large scale distributed computing system - and the same core technology - embedded systems and the Internet[28]. On the other hand, there are some difference between them. IoT is driven by the computer science community and it is more focused on networks and open standards whilst the CPS focus is more on the physical systems and their engineering problems[28]. 1.2 Introduction of Visual Search Visual Search (VS) is a Computer Vision task which aims to analyze the actual content of an image and to search similar contents inside a large database of images. In the Mobile Visual Search form, an image is captured by a mobile device and then sent to remote server(s) in a cloud, where the visual recognition is performed by complex computer vision algorithms that compare the user’s image with a set of encoded images on the cloud. This kind of problem was first introduced in the early 90s and it kept on growing with the expansion of the Internet. Nowadays mobile devices with cameras are the standard so this kind of problem become more topical than ever. VS is a reliable application that solves the very complex task of search- ing content among billions of images by analyzing the actual information depicted in the image. Recognizing the most