wireless software and hardware platforms for flexible and ...€¦ · experimenter for adapting...

50
H2020 - GA No. 645274 D10.2 1 Wireless Software and Hardware platforms for Flexible and Unified radio and network controL Project Deliverable D10.2 Results of first set of showcases using basic intelligence Contractual date of delivery: 31-12-2016 Actual date of delivery: 23-12-206 Beneficiaries: IMEC, TCD, CNIT, TUB, NCENTRIC, RUTGERS Lead beneficiary: CNIT Authors: Ilenia Tinnirello (CNIT), Domenico Garlisi (CNIT) , Pierluigi Gallo (CNIT), Merima Kulin (IMEC), Spilios Giannoulis (IMEC), Ingrid Moerman (IMEC), Francisco Paisana (TCD), Ivan Seskar (RUTGERS), Changmok Yang (SNU), Sunghyun Choi (SNU), Piotr Gawłowicz(TUB), Mikołaj Chwalisz (TUB) Reviewers: Anatolij Zubow (TUB), Maicon Kist (TCD) Work package: WP10 – General Requirements and Showcases Estimated person months: 25 Nature: R Dissemination level: PU Version: 1.0 Abstract: This publication deliverable reports on the results of the intelligent showcases that have been implemented and on the intelligence modules that have been developed in the showcases. It also includes a brief presentation of the WiSHFUL framework for building intelligence. This deliverable reports on activities in WP10. Keywords: Showcases, Proof-of-concept, intelligence framework

Upload: others

Post on 16-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

1

Wireless Software and Hardware platforms for Flexible and Unified radio and network controL

ProjectDeliverableD10.2

ResultsoffirstsetofshowcasesusingbasicintelligenceContractualdateofdelivery: 31-12-2016

Actualdateofdelivery: 23-12-206

Beneficiaries: IMEC,TCD,CNIT,TUB,NCENTRIC,RUTGERS

Leadbeneficiary: CNIT

Authors: IleniaTinnirello(CNIT),DomenicoGarlisi(CNIT),PierluigiGallo(CNIT),MerimaKulin(IMEC),SpiliosGiannoulis(IMEC),IngridMoerman(IMEC),FranciscoPaisana(TCD),IvanSeskar(RUTGERS),ChangmokYang(SNU),SunghyunChoi(SNU),PiotrGawłowicz(TUB),MikołajChwalisz(TUB)

Reviewers: AnatolijZubow(TUB),MaiconKist(TCD)

Workpackage: WP10–GeneralRequirementsandShowcases

Estimatedpersonmonths: 25

Nature: R

Disseminationlevel: PU

Version: 1.0

Abstract:This publication deliverable reports on the results of the intelligent showcases that have beenimplementedandontheintelligencemodulesthathavebeendevelopedintheshowcases. Italsoincludesabriefpresentationof theWiSHFUL framework forbuilding intelligence.ThisdeliverablereportsonactivitiesinWP10.

Keywords:Showcases,Proof-of-concept,intelligenceframework

Page 2: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

2

Executive Summary This documents reports on the showcases implementedwithin the second year of the project todisplaythefunctionalitiesoftheWiSHFULintelligenceframework.Theframeworkhasbeendesignedfor facilitating experimenters in the definition of intelligent control programs, by means ofelementarydataprocessingblocks,learningalgorithms,andadaptationprocedures,andbymeansofagraphical interface for linking componentsandbuilding intelligencecontrolprograms. Intelligentcontrol programs do not implement simple intuitive algorithms or static rules defined byexperimenter for adapting radio and network settings, but rather implement advanced reasoningalgorithms that capture the wireless network behaviour and learn the best strategy for takingdecisionsonradioandnetworkconfigurationsinacertainnetworkcontextforoptimallysupportingwirelessapplications.

Four showcases, dealing with completely different network problems, have been designed byfollowing twodifferent approaches forbuilding the intelligence control program:off-line learning,whichmeanscollectingdatafromdifferentexperimentsandprocessingthesedataoff-lineinordertodesignadata-drivenmodeltobeusedforoptimizingadesirednetworkmetric;on-linelearning,wheredatabecomesavailableduringtheexperimentexecutionandisusedtoupdatethemodel,e.g.thepredictormodel,forfuturesteps.Asfarasconcernsoff-linelearning,twodifferentdata-drivenmodels have been developed for sensor networks running differentMAC protocols and forWiFinetworks with high-density of access points. The models are then used for facilitating theidentification of optimal MAC protocols under dynamic network conditions. MAC protocoloptimizations have been also considered for on-line learning. In particular, a learning engine hasbeendevelopedforrankingdifferentelementaryMACprotocolsasafunctionofthenetworktrafficandmeasurementsofchannelstate(fromslottedALOHAincaseof lowtraffic,toTDMAincaseofgreedy traffic),and foract consequentlybyenforcing theprotocolwith thehighest rank.A similarapproach has been proposed for cognitive networks, in which the secondary users select theoperatingchannelbylearningtheprimaryuserbehavioursandbyrankingaccordinglythechannelsasafunctionoftheexpectedtimeintervalinwhichthechannelwillnotbeusedbyprimaryusers.

AbriefoverviewoftheaccomplishmentswithineachshowcaseisprovidedalongsideadescriptionoftheutilityofferedbytheWiSHFULintelligence.Assuch,thisdocumentprovidesaninitialcatalogueof the WiSHFUL intelligence general capabilities and software modules developed so far in theWiSHFULintelligencerepository.

Page 3: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

3

List of Acronyms and Abbreviations AM AggregateManager

AODV AdhocOn-demandDistanceVector

AP AccessPoint

API ApplicationProgrammingInterface

BAN BodyAreaNetwork

BSS BasicServiceSet

CDF Cumulativedistributionfunction

CPU CentralProcessingUnit

CSMA CarrierSenseMultipleAccess

CTS CleartoSend

DMT DiscreteMutiTone

DSL DigitalSubscriberLoop

DSR DynamicSourceRouting

DT DelayTolerant

EM ElectroMagnetic

EMS ExperimentManagementServer

EWMA SeeFigure8

F4F FederationforFIRE(FutureInternetResearchExperimentation)

FBMC FilterBankMulti-Carrier

Fed4FIRE FederationforFIRE(FutureInternetResearchExperimentation)

FNR FalseNegativeRate

FRCP FederatedResourceControlProtocol

FSM FiniteStateMachine

GPIO GeneralPurposeInputOutput

HAL RadioAbstractionLayer

HTTPS HyperTextTransferProtocolSecure

I/Q Inphase/Quadrature

IEEE InstituteofElectricalandElectronicsEngineers

IP InternetProtocol

KPI KeyPerformanceIndicator

LTE LongTermEvolution

LTE-A LongTermEvolution–Advanced

LQI LinkQualityIndication

Page 4: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

4

OBSSs OverlappingBSSs

PRR PacketReceptionRate

MAC MediumAccessControl

MTC Machine-TypeCommunications

NOC NetworkOperationsCentre

OFDM OrthogonalFrequencyDivisionMultiplexing

OLSR OptimisedLinkStateRouting

OMF OMFMeasurementLibrary

OML OrbitManagementFramework

OODA Observe,Orient,DecideandAct

PLC PowerLineCommunication

QoS QualityofService

RAM RandomAccessMemory

RF RadioFrequency

ROC ReceiverOperatingCharacteristic

RP RadioProcessor

RSpec RequestSpecification

RSSI ReceivedSignalStrengthIndication

RT Real-Time

RTS Requesttosend

SDR SoftwareDefinedRadio

SFA SliceFederationArchitecture

SNR SignaltoNoiseRatio

SSH SecureShell

STA Station

TCP TransmissionControlProtocol

TDM TimeDivisionMultiplexing

TDMA TimeDivisionMultipleAccess

TPR TruePositiveRate

TSMP TimeSynchronizedMeshProtocol

TSCH IEEE802.15.4e

TSF TimingSynchronizationFunction

UC UseCase

UDP UserDatagramProtocol

UMTS UniversalMobileTelecommunicationsSystem(UMTS)

UPI UnifiedProgrammingInterface

Page 5: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

5

UPIR UnifiedProgrammingInterfaceradio

UPIN UnifiedProgrammingInterfacenetwork

UPIHC UnifiedProgrammingInterfacehierarchicalcontrol

URL UniformResourceLocator

USB UniversalSerialBus

USRP UniversalSoftwareRadioPeripheral

VPN VirtualPrivateNetwork

WiFi WirelessFidelity

XFSM eXtendedFiniteStateMachine

Page 6: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

6

Table of contents

1 Introduction ........................................................................................................ 8

2 General overview of the WiSHFUL Intelligence ............................................... 92.1Conceptualintelligenceframework...................................................................................92.2 IntelligenceapproachesandcomponentsdevelopedinY2..............................................102.3 Implementationoftheframeworkforbuildingintelligence............................................11

3 Intelligence showcases based on off-line modelling .................................... 163.1CognitiveMACprotocolselection...................................................................................163.1.1Generaloverview.........................................................................................................163.1.2WiSHFULfunctionalitiesandshowcasephases.............................................................203.1.3Newintelligencemodules............................................................................................213.1.4Results.........................................................................................................................213.2MACoptimizationsinhigh-densityscenarios(HIDE)........................................................233.2.1Generaloverview.........................................................................................................233.2.2WiSHFULfunctionalitiesandshowcasephases.............................................................303.2.3Newintelligencemodules............................................................................................303.2.4Results.........................................................................................................................303.2.5Nextsteps....................................................................................................................33

4 Intelligence showcases based on on-line learning ....................................... 344.1DistributedintelligentselectionofMACprotocol:Meta-MAC.........................................344.1.1GeneraloverviewofMeta-MAC...................................................................................344.1.2WiSHFULfunctionalitiesandshowcasephases.............................................................354.1.3Intelligencecompositionmodule:meta-MAClogic.......................................................394.1.4Results.........................................................................................................................424.1.5NextSteps....................................................................................................................444.2Monitoring,ReasoningandDecisionusingMarkovChains..............................................444.2.1GeneralOverview.........................................................................................................444.2.2Markovchaintransitionmatrixestimation...................................................................464.2.3GenerationofSUs’channelaccesscommands..............................................................474.2.4GeneralDemonstrationDetails....................................................................................474.2.5NextSteps....................................................................................................................48

5 Conclusions ...................................................................................................... 49

Page 7: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

7

6 References ........................................................................................................ 50

Page 8: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

8

1 IntroductionIn this document we describe four experiments that have been designed for showcasing theWiSHFUL intelligence, as defined inD10.1. Indeed, the originalWiSHFUL software architecture forradioandnetworkcontrolhasbeenextended for supportingan intelligence frameworkdevised tofacilitate thebuildingof solutionsable tooptimizenetworkperformance indifferent contexts.Forfacilitating thisduty, theWiSHFUL intelligence frameworkprovidesagraphical interface for linkingspecialized software components and algorithms, aswell as components for: i) collecting, filteringand aggregating data during experiments, in order to identify some relevant features that can berelated to performance metrics of interest, ii) supporting learning, inference or other reasoningalgorithms, in order to map data observations into actions as a function of the applicationrequirements; iii) performing coordinated actions on single or multiple network nodes, whichaggregateelementaryUPI_RandUPI_Nfunctionsintomorecomplexadaptationprocedures(e.g.bysynchronizing two overlapping Access Points with a common temporal reference such as thetimestampprovidedbyoneofthetwonodes.).

DuringY2,weenvisionedtwomainmethodologicalapproachesfordesigningnetworkintelligence:i)buildingoff-lineanetworkmodelorclassifierdevisedtoestimateaspecificperformancefigure,byworkingondatacollectedunderdifferentoperatingscenarios,oronprotocolmodelsandsimulationresults (off-line learning), ii)designing an on-line learning engine, able to update in run-time theprediction model as a function of the observed data observed and act consequently (on-linelearning).

Thedocumentisorganizedasfollows.InSection2,wepresentthegeneraloverviewoftheWiSHFULintelligence architecture, the basic data collection, intelligence engine and action componentsdevelopedwithinY2activities,andthegraphicalframework,e.g.theNodeREDthatcanbeusedforconnecting the basic components, managing the data flows and building the learning models. InSection3andSection4wepresent,respectively,theshowcasesbasedonoff-linelearningoron-linelearning. For each showcase, we describe the network problem addressed by the WiSHFULintelligence and provide an overview of the WiSHFUL functionalities used for addressing thisproblem.Moreover,thedocumentprovidesanindicationofpotentialextensionsorcontinuationsofthework completed so far. As presented, thematerial provided in this document is organized fordemonstrating the potentialities of the WiSHFUL framework to the broader community ofexperimentersforbuildingintelligentadaptationsinrealnetworkcontexts.

Page 9: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

9

2 GeneraloverviewoftheWiSHFULIntelligence

2.1 ConceptualintelligenceframeworkTheconnectionbetweentheWiSHFULsoftwarearchitectureforradioandnetworkcontrolandtheintelligenceframeworkismadebytheUnifiedProgrammingInterfaces.ThegenericfunctionalviewcanhencebemappedtotheconceptualframeworkforenablingintelligenceshowninFigure1.

Figure1:Conceptualframeworkforenablingintelligence

AstheUPIsareunifiedabstractionsthatspanseveralwirelesstechnologyplatforms,thecomponentsof the intelligence framework are generic. The Data Collection Component is a generic softwaremodulethatinteractswiththeWiSHFULUPIs,UPI_R,UPI_NandUPI_Gtoretrievedataaboutradioandnetworkstate(i.e.channeloccupancy,LQI,RSSI,PRR,topology,etc.),andwiththeApplicationtoretrieveinformationabouttheapplicationrequirements(e.g.maxdelay,peakthroughput,maxPER).The Data Collection Component also implements aggregation functionality. The IntelligenceCompositionModule offers support for composing and configuring several algorithms available inthe WiSHFUL Intelligence Repository into a self-contained intelligence engine that uses the dataprovidedby theDataCollectionComponent and triggersnetwork and radio configuration throughtheActionComponent.TheActionComponentusestheWiSHFULUPIstoadjusttheconfigurationofradio and network. The radio and network configuration should be viewed as the output of theintelligenceprocess.Suchaconfigurationcandealwithindividualparameters(e.g.centerfrequency,backoffdelay,etc.),radioprocessingelements(e.g.filterswapping),awaveform(e.g.amodulationandcodingscheme)oraprotocol(e.g.newMACscheme).

TheframeworkallowstosupporttheusualObserve,Orient,DecideandActloop(OODAloop):thedata collection component is responsible of gathering data observations and aggregating andfiltering thedata forextracting the featuresused in theorientphase; the intelligencecompositioncomponent is responsible of taking decisions on the basis of the previous observation and orientphase;theactioncomponentisresponsibleofimplementinganadaptationdecisionbyreconfiguringthewirelessnodes.

TheWiSHFUL intelligence framework offers a common set of tools that enable the realization ofintelligentapproachesusingthealgorithmsfromtherepository.TogetherwiththeUPIstheWiSHFULsoftware architecture of the intelligence framework enables reasoning about the current networkstateandapplyingactionstochangetheconfigurationofradioandnetwork.

Intelligence)Composi/on)Component)

Data)Collec/on)Component)

Ac/on)Component)

WiSHFUL)Intelligence)Repository)(data)aggrega/on)algorithms,)intelligent)algorithms)))&)generic)and)showcaseBspecific)ac/on)modules))

WiSHFUL)UPIs)

Aggre%ga'on*

Data*Collec'on*

Data*Analysis* Ac'on*

Applica/on))API)

Page 10: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

10

2.2 IntelligenceapproachesandcomponentsdevelopedinY2Weenvisionedtwomainmethodologicalapproachesfordesigningnetwork intelligence: i)buildingoff-lineanetworkmodelorclassifierdevisedtoestimateaspecificperformancefigure,byworkingondatacollectedunderdifferentoperatingscenarios,orprotocolmodelsandsimulationresults, ii)designinganon-linelearningengine,abletoupdatedynamicallyapredictionmodelasafunctionofrun-time observations and act consequently. The two approaches and their relationship with thegenericWiSHFULUPIaresummarizedinthefollowingFigure2.

Figure2–High-levelrepresentationofoff-line(top)andon-line(bottom)learningapproachesfordefining

networkintelligence.

networkmodel ?

triggeraction

ApplicationRequirements

try differentparameters

[x1,x2,..xM] metricYes

No

observations

WiSHFUL UPI

tune[xM+1,..xN]

[xM+1,..xN]

off-linetrainingandmodeling

Run-timeLearningEngine

ApplicationRequirements

[x1,x2,..xN]

WiSHFUL UPI

Try Action

observations

actionranking

actionscactionsactions

historycurrentstate

Page 11: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

11

According to the first approach, preliminary experiments are planned for validatinganalytical/simulation models, or for training a data-driven model by means of machine-learningtechniques. Experiment planning is devised to cover themost representative operating conditionsenvisionedinthenetworkproblemunderstudy,andtocapturecross-correlationsamongthemostrelevantmodel inputs(i.e.thenetworkoperationconditionsandconfigurableparameters)andthemodeloutput(i.e.theperformancemetrictobeestimated).Whenthemodelisready,itcanbeusedforestimating thedesiredperformancemetricasa functionof run-timeobservationsofnetworkstate and configurable protocol parameters, in order to find dynamically the optimalconfigurationsfortheseparameters.

Accordingtothesecondapproach,thenetworkintelligenceworksbyupdatingapredictionmodelin run-time for estimating the effect of a given action on the basis of historical networkobservations. Multiple prediction models can be used in parallel for comparing the expectedbenefits of different actions, among a set of available ones. Themost important design aspectsinvolve the identification of the learning scheme for updating the model and selecting the bestactions (which may also correspond to the configuration of a given parameter). Networkoptimizationisthenachieved,step-by-step,asasequenceofactiondecisions.

Obviously, more complex structures, such as the parallel utilization of multiple network models(trainedoff-line),andevenmixedapproachescanbealsoconsidered.DuringY2,weworkedonbothoff-lineandon-lineapproacheswithfourdifferentshowcases,whichledtotheinitialpopulationoftheWiSHFUL intelligence repository. Indeed, although themodels and the decision engines havebeen used for solving specific network problems, they can be potentially re-used in completelydifferentcontexts.Inparticular,wedeveloped:

• aWSN performance model: this data-driven model is devised to estimate performance ofWSNs under different MAC protocols, as a function of node density and interferenceconditions;

• aWiFi performance model for multi-cell scenarios: this data-driven model is devised toclassifyinterferenceconditionsexperiencedindifferentcellsashard,softorzerointerferenceandidentifyblockedcells;

• aMeta-MACengine,fordynamicallylearningaboutthebestmediumaccessdecisionamongasetofelementaryprotocolcomponents,inWiFifully-connectednetworksundervaryingtrafficconditions;

• achannel-hoppingdecisionengine,forinferringaboutthechannelthatwillremainavailablefor longer time intervals in cognitive networks, in caseof predictable behaviours of primaryusers.

2.3 ImplementationoftheframeworkforbuildingintelligenceAsdescribedinsection2.1and2.2,asetofalgorithmsandmoduleshavetointeractwitheachotherthroughtheWiSHFULintelligenceframework.Aspecifiedinterfaceisrequired,soeachmodulecancooperatewithanother,i.e.theinputofonemoduleshouldbeabletounderstandtheoutputofanalgorithm. The linking of modules and algorithms should in turn also be checked for minimalconsistencyandcompatibility.

ComparisonofdifferentsuitableframeworksTherearealreadyseveraldraganddropgraphicaluserinterfacesavailablethatareopensourceandmightsuittheneedsoftheintelligenceframework.

AcomparisonisgivenintheTable1.Comparingseveralkeypointssuchas:

Page 12: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

12

• Draganddropfeaturesareoneofthekeypointsthatthesystemshouldhave.Theabilitytotakea(few)component,dropit(them)onasandboxdashboardandinterconnectthemastheuserseesfit.

• Configurable components: the depth of configurability of components introduced into theframework.

• Component interaction describes theway inwhich the components communicatewith oneanother.Herewas investigated if there isa standardizedprotocol for thiscommunication totakeplace,whichisimportantifthirdpartiesdevelopnewcomponents.

• WebUI:istheapplicationonlyclient-sideapplicationoristheUIavailableviaabrowser?Thelatterispreferred,asitoffersmoreportabilitytodifferentplatforms.

• Socket interaction: describes the possibility for inter-process communication (by means ofTCP/IPsockets).

• Pythonsupport:doestheframeworksupport(user)codewritteninPython?• Next, the programming language for developing new components to extend the framework

wasinvestigated.• Subsequentlyitwouldbeveryconvenientiftheframeworkcouldcallexternalscripts,located

onlocalmachineoftheuser.Thisenablesinteractionwithcomplexalgorithms,reasoningandstatisticsplatforms(e.g.MATLAB).

• Itisalsoimportant,forfuturedevelopment,thatawideuserbaseandcomponent-repositoryisavailable.

• Lastly,thesystemshouldbeopensource.

Functionality/Framework Node-RED LimeDS jsPlumb ThreeNodes

Applicationdomain IoT

Integrationwithinternalor

externaldataservices

LibrarytolinkHTML

structures

Visualizinggeometric

shapes/basicprogramming

Drag&drop Configurablecomponents Noteasy

Componentinteraction(standardized?) UserDefined Notmodifiable

WebUI Javaengine Socketsinteraction

No,onlyhttpwebservices

Pythonsupport Indirect Programminglanguage JavaScript JavaScript JavaScript non

configurable

Callexternalscripts withparams,capturingoutputs ?

NotEasily(implementyourself)

Repository http://flows.nodered.org/

OpenSource Not open source

Table1:Comparingintelligenceframeworkcandidates

Based on Table 1, a choicewasmade. The choicewasNode-RED, a tool designed by IBM towiredifferentcomponentsinthecontextofInternetofThings(IoT).

Page 13: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

13

Drag&dropThe Node-RED UI is intuitive and features a toolbox with possible components on the left. Bydraggingthemtotheboardandconnectingthosewithothers,complexinteractionsandultimatelyaflowcanbecreated.

ConfigurablecomponentsThepre-existingnodesareopen-sourceandcanbemodified.

InteractionamonginternalNode-REDcomponentsNode-REDusesJSONasanintermittentprotocoltocommunicatewithdifferentnodes.MessagesareserializedinJSONandexchangedbetweencomponents/nodes.

It would thus be possible to create a database block, configure it, and feed information to anintelligenceblock,resultinginchangingaparameterviaanactionblock.

InteractionwithexternalcomponentsAscomparedinTable1,Node-REDcaninteractwithexternalcomponentsbyexecutingscripts.Thiscanbeimplementedintwoways:

1. Runningexternalscripts/binariesusinganexec-node2. Runningexternalscripts/binariesusingadaemon-node(plugin)

WiththekeydifferenceofUnixSTDIN/STDOUTpipesremainopeninoption2.

Option1isalsoblocking,itwillwaitforthebinarytoexecutecompletelyandreturntoNode-RED,orusingatimeoutwhichwillkilltheexternalcomponent.

Passingargumentstoexternalscriptscanbetrickyand is limited.Forsimpletext-basedargumentsthisisprettystraightforward,butwhencomplexJSON-messageshavetobepassed,itwouldbebesttoopenasocketorpipe.

InWishfulcontextitwouldbeveryconvenientifUPIfunctionscouldbecalleddirectlyfromaNode-REDcomponent, interactingwithaGlobalControllerthatiscompatiblewithNode-REDinformationstream.

CreatingcomponentsSeveral nodes already pre-exist in Node-RED (either native or via the extensive repository athttp://flows.nodered.org/):

Figure3:Pre-existingNode-REDnodes

Onecanuseseveralmethodstoopensockets,connecttodatabases,andaccessthefilesystemforfiles. These nodes are all open source and some can be downloaded through the Node-REDrepository.

Page 14: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

14

Figure4:Sub-Flows

As shown in Figure4, auser cangroup severalnodes intoa Sub-Flow. Sub-Flows canalso containotherSub-Flows.Thismakesiteasytopreserveanoverviewofacomplexsystem.

UsingonlybasiccomponentsitisalreadypossibletostartandstopWiSHFULGlobalControlProgram:

ThebluenodestriggerthefunctionnodesthatgeneratetheconfigurationfilesfortheGlobalControlprogram.Iftheprogramisrunning,allinformationisdisplayedintheNode-REDlog-window.

Inordertomodifycertainparameters,theGlobalControlProgramscriptshouldbeadaptedslightlytoacceptcommunicationfromNode-RED.AhandlerwasaddedthatopensasocketandacceptsJSON-data,whichthentranslatestoaUPI-call.TheNode-REDcomponentthatsupportsthiscommunicationisanewlyimplementedUPI_Exec-node(ofwhichtheuserinterfaceisdisplayedinFigure5).

Figure5:UPI-Execnode

Page 15: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

15

Thisnodecanexecuteasetandget_parameterUPI-function.TheresultofthenodeisJSON,whichwillbeacceptedandinterpretedbytheGlobalControlprogram,whichinturnexecutestheappropriateUPIcallandreturnsitsresponsetotheNode-REDcontextandspecificallytotheUPI_Exec-nodecomponent(successorfail)thatinitiatedtheprocedure.

Asmalldemoflowdemonstratestheuseofthenode(Figure6).Itsetsthechannelofthephysicallayerofasensornodetoaspecificvalue.

Figure6:ModifyingthePHY-channelusingUPI_Execnodes

In order to fully integrate the intelligence algorithms, it was necessary to create custom nodes.Several dummy nodes were implemented, a toolbox-screenshot is provided in Figure 6. Futureimplementationworkwillallowthemtoproperlycommunicatingwitheachother.

Figure7:Dummymodules

TheNode-REDframeworkwillneedtobeextendedfurtherwithcustomnodestomakeinteractionwith(1)data,(2)intelligenceand(3)actioncomponentspossible,asalreadydescribedin2.1.

request { "execute_upi_function":{ "upi_type":"radio", "upi_func":"set_parameters", "node_list":[ 1, 2 ], "args":{ "IEEE802154_phyCurrentChannel":12 } } }

response { "1":{ "IEEE802154_phyCurrentChannel":12 }, "2":{ "IEEE802154_phyCurrentChannel":12 } }

Page 16: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

16

3 Intelligenceshowcasesbasedonoff-linemodelling

3.1 CognitiveMACprotocolselection

Motivationandproblemstatement

Wireless sensor networks (WSN) have experienced explosive growth due to the promising andinnovativeapplicationscenariosarisinginthecontextoftheInternetofThings(IoT).Theavailabilityof inexpensive low-power sensor devices has led to an unprecedented surge in the number ofconnecteddevices. Thesedevices generate traffic fromheterogeneous radios that followdifferentmediumaccessprotocolsandcommunicationstandards.A fewexamples in the2.4GHzunlicensedband include IEEE 802.15.4, Bluetooth, WiFi, RFIDs, while in the sub-1GHz LoRA, SigFox, IEEE802.11ah, etc., each suitable for a specific application domain. Such diversity of wirelessdevices/technologies, applications and services will pose several communication challenges,particularly, co-existence, cross-technology interference, spectrum scarcity and uncertainty incommunicationquality.

Totacklethisproblem,moresophisticatedmediumaccess(MAC)protocolsareneeded.TraditionalwirelessMAC protocols are typically designed to optimally perform for low-power operation (e.g.ZigBee,Bluetoothlowenergy), lowlatency(e.g.wirelessHART),highthroughput(e.g.WiFi)orhighreliability (e.g. TSCH). We argue that rather than developing optimized solutions for specific IoTapplication domains, a more suitable approach may be a cognitive MAC layer that is able todynamically choose themost appropriateMAC protocol and configuration parameters in order toadapt toobservednetworkconditionsandmaintain thecommunicationqualitywith regard to theapplicationrequirements.

Theideaofcognitivecommunicationoriginatesfromthecognitiveradio(CR)community,however,tothisendtheireffortshavebeenfocusedonprototypesforpowerfulradiossuchasSDRplatforms[1].Inthiswork,wepresentasystemdesignandfirststepimplementationtowardsacognitiveMAClayer for constrained devices. We argue that the key component for an cognitive MAC layer ispredictable performance. From a networking perspective, the most relevant aspect of reliablewireless communication quality is the packet delivery performance [2]. In particular, for energy-constrained devices such as in battery-poweredwireless sensor networks (WSN), one of themaingoalsistoreducethenumberofradiotransmissionsandtosimultaneouslyincreasepacketdelivery.Packetreceptionrateandthroughputare importantastheydirectlyrelatetoenergyconsumption.Efficient performance estimation in wireless networks is crucial as it can reduce the energyconsumptionbyalleviatingsituationswithfailingtransmissions.

Therefore,we usemachine learning techniques tomodel the packet delivery as a function of thecollected measurements (number of neighbours, packet inter-arrival times, number of receivedpackets,numberofobservedcollisions)[3].AlthoughanessentialpartforourcognitiveMAClayer,the created machine learning model can act as a standalone reusable performance predictioncomponentthatcanbeintegratedintoothersystemswhereperformancepredictionisnecessary.

3.1.1 GeneraloverviewAccurateMAC layer performance estimation in low-powerwireless networks is a challenging taskduetothenotoriouslydynamicandunpredictablewirelessenvironment.Inordertostudythepacketerror rate experienced with a given MAC protocol we used machine learning as an effectivetechniqueforreal-timecharacterizationofthecommunicationperformanceasobservedbytheMAClayer [3]. Our approach is data-driven and consists of three steps: extensive experiments for datacollection, offline modelling and trace-driven performance evaluation [4]. The following sectionsexplaintheprocessofderivingthemachinelearningmodel.

Page 17: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

17

Inorder tostudy theMAC layerperformance,extensiveexperimentshavebeenperformedonthewilab2testbedfacilityinGhent.

Weusedupto30RM090nodeswithanIEEE802.15.4radioorganizedinastar-likenetworktopologyas shown on Figure 8. All nodes run a CSMA/CA MAC protocol that is developed in the TAISCframework [5]. They have been configured to periodically generate a 100B message to a singlereceiver located in thecentreof the topology.The transmissionpower is set to themaximum, i.e.5dBm, toensure thatallnodesare incommunication range.To incorporateall factors that impacttheMAC performance we setup several experiments varying the number of sending nodes (2-30nodes),andtheapplicationtrafficload(1pckt/2s,1pckt/s,2pckts/s,4pckts/s,8pckts/s,16pckts/sand64pckts/s). InordertostudytheMAC-levelperformanceunderhigh interference,weusedanUSRPB210togeneratecontrollableinterferencepatternsbytransmittingamodulatedcarrierfor2ms,followedbyan8msidleperiod(repeatingthisovertime).

Figure8Experimentsetup

Thesetupconsistsofupto28wirelessnodes.Thebasicexperimentconsistsofavariablenumberofsendernodesandonereceivingnode,i.e.sinknode.TofacilitatetheexperimentalcontrolanddatacollectionfromthenodesaWiSHFULUPIglobalcontrolprogramhasbeenimplemented.TheglobalcontrolprogramsetsuptheMACandapplicationlevelparameters(e.g.MACprotocol,packetsize…)onallnodesandcontrolsthedurationformonitoringthemeasurements.Duringtheexperimentthedensity and network load has been controlled by configuring opportunistically thewireless nodesinvolvedintotheexperiment,whileinterferencehasbeenintroducedbythesyntheticinterfererasexplainedinprevioussection.Thesinknodecollectsstatisticsforeachreceivedpacketandforwardsthemtotheglobalcontrollerforstorage(usingtheevent-basedmonitoringWiSHFULfunctionality).

Datacollection

Tosimplifyexperimentcontrolanddatacollectionwecreatedaglobalcontrolprogramontheglobalcontroller using theUnified Programming Interfaces (UPIs) developedby theWiSHFULproject [6].We used the UPIs to collect measurements from wireless nodes, configure radio and networkparametersandon-the-flyadaptnodeconfigurationonnodesthatrunaWiSHFULagentprogram.

Page 18: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

18

Theglobal control programsetsup theMACandapplication levelparameters (e.g.MACprotocol,packetsize…)onallnodesandcontrolsthemonitoringduration.Duringtheexperimentthedensityandapplication loadhasbeencontrolled,while interferencehasbeen introducedby the syntheticinterferer.

We runseveralexperimentswith theaforementionedsetupsandmeasuredseveralaspectsof theMAC-level performance,while the systemwas operating (∼18h).We captured rawdatawith per-packet statistics using events available for the IEEE 802.15.4 connector module. The raw dataconsists of: Sender ID, 802.15.4 Sequencing Number, Topology (Node density), InterferenceIndication,TrafficLoad,packetloss.

Featurespacedesign

We extracted the most relevant features for predicting the MAC performance from consecutiveobservationintervalsoftherawdata.Thoseare:numberofdetectednodes(d),inter-packet-interval(IPI),numberofreceivedpackets(rP)andthenumberoferroneouspackets/frames(errP).Thenweformedthefollowingfeaturevectors:

𝑥(!) = [𝑑, 𝐼𝑃𝐼, 𝑟𝑃, 𝑒𝑟𝑟𝑃]!,

andthecorrespondingcommunicationreliabilityintermsofpacketlossrate,

𝑦(!) = 𝑝𝑙𝑟.

The density, 𝑑, is a good indicator about the number of contending nodes and potential intra-technology interference. The 𝐼𝑃𝐼 is a good feature for reasoning about the current applicationdemand and traffic load. Finally, last two features, 𝑟𝑃 and 𝑒𝑟𝑟𝑃, are representative for inferringabouttheinterferencelevelandcongestioninthenetwork.

Offlinemachinelearning

Pairs of (𝑥(!),𝑦(!)) were used to train threemachine learning algorithms: regression trees, linearregressionandneuralnetworks.

Linear regression

Linear regression is a technique for modelling the relationship between the input (x) and outputvariable(y)sothattheoutputisalinearcombinationoftheinputvariables(dependentvariable).

y(x)=θ0 +θ1x1 +!+θnxn =θ0 +

i=1

n

∑θi xi

WeusedthelinearregressionimplementationavailableinWeka[7].

Regression trees

A regression tree is a tree-based learning algorithm that is used to predict a variable that takescontinuousororderedvalues.Regressiontreesisasupervisedlearningalgorithmthatcreatesatree-likegraphormodel that represents thepossibleoutcomesor consequencesofusing certain inputvalues.Thetreeconsistsofonerootnode,internalnodescalleddecisionnodes,whichtestitsinputagainst a learned expression, and leaf nodes which correspond to a final class or decision. Thelearningtreecanbeusedtoderivesimpledecisionrulesthatcanbeusedfordecisionproblemsbystartingattherootnodeandmovingthroughthetreeuntilaleafnodeisreachedwhereapredictionoutcomeisassigned.

Page 19: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

19

WeusedtheM5PregressiontreealgorithmimplementationavailableinWeka.

Neuralnetworks

NeuralNetworks(NN)orartificialneuralnetworks(ANN)isasupervisedlearningalgorithminspiredontheworkingofthebrain,thatistypicallyusedtoderivecomplex,non-lineardecisionboundariesforbuildingaclassificationmodel,butarealsosuitablefortrainingregressionmodelswhenthegoalis to predict real-valued outputs. Neural networks are known for their ability to identify complextrendsanddetectcomplexnon-linearrelationshipsamongthe inputvariablesatthecostofhighercomputationalburden.Aneuralnetworkmodelconsistsofoneinput,anumberofhiddenlayersandoneoutputlayer.Theinputlayercorrespondstotheinputdatavariables.Eachhiddenlayerconsistsof a number of processing elements called neurons that process its inputs (the data from thepreviouslayer)usinganactivationortransferfunctionthattranslatestheinputsignalstoanoutputsignal.

WeusedthemultilayerperceptronimplementationavailableinWekatotraintheneuralnetwork.

Thealgorithmswere trainedoverseveralobservation intervals,andvalidatedwitha10-foldcross-validationalgorithm[4].Weusedtherootmeansquarederror(RMSE):

𝑅𝑀𝑆𝐸 =1𝑁

(𝑦! − 𝑦!)!!

!!!

where,𝑦! aretherealoutcome,while𝑦! theestimations,andthecorrelationcoefficient:

𝜌!! =!"#(!,!)!!!!

asperformancemetrics to assess theperformanceof thealgorithms. Figure9 illustrates thehigh-levelprocessesforbuildingthemachinelearningmodels.

Figure9Offlinemachinelearningtrainingprocess

Page 20: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

20

3.1.2 WiSHFULfunctionalitiesandshowcasephasesFigure10presents theconceptual systemarchitecture toaccomplishacognitive loop forcognitiveMACselection[3].Therearetwomaincomponents,the:

• Sensor network - a set of wireless nodes that generate information and are capable ofreconfiguringitstransmissionparametersatruntime.

• Global controller - the central entity that collects and uses information from thewirelessnodes to predict the MAC-level performance. Based on the predictions, it dynamicallydecideshowtoconfiguretheMAClayersoastoimprovetheoverallnetworkperformance(e.g. to cope with cross-technology interference it may decide to configure a moreinterferencerobustMACprotocol,e.g.TSCH).Finally,itdisseminatesthenewconfigurationtothenodes.

Figure10CognitiveMACarchitecture

Attheheartoftheglobalcontrollerisamachinelearning(ML)modelthatlearnstheenvironmentalproperties and uses the knowledge to predict the future MAC performance. These performancepredictionsarecomparedwiththeapplicationrequirementstodecidewhichMACprotocolwouldbethemostappropriatetouse.

Forinstance,aCSMA/CAMACprotocolcanachievelowlatencyinlowdatarateapplications,whileinhigh-data rate applications andunderhigh interference itmight significantlyunderperformdue totoo unsuccessful channel contentions. On the other hand, a time-slotted channel hopping (TSCH)

Page 21: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

21

MACcandeliverhighthroughputinhighdata-rateapplicationsevenunderinterferingtransmissionfromothertechnologiesbyavoidingchannelcontentionsandchangingthecentralfrequencyoftheoperatingchannel.However,thechannelhoppingmechanismthatisperformedineachsubsequenttimeslotmaydowngradetheperformanceinanotherdimension.

Nextsteps:

The current results presents amachine learning basedMAC performance predictor,which can beused to design a new intelligentMAC layer that can detect a poorly behavingMAC protocol (e.g.CSMA) by predicting its performance in the future (e.g. switch from a CSMA/CA to an alternativemore robust MAC like TSCH). This is the basis for our future work, to implement the model inproduction.

3.1.3 NewintelligencemodulesThe proposed intelligent algorithm forMAC performance estimation can be used as a standalonemoduleandintegralpartofasmartWSN.However,thefinalgoalofthisshowcaseistodemonstratethatitcanbeusedforintelligentMACselection.

Figure11Conceptualneural networks performance predictor

Theintelligencemoduleisatrainedneuralnetwork(Figure11)MACperformancepredictorandcanbe easily exported from standardmachine learning toolboxes/libraries (e.g.Weka [8], scikit-learn[9]).

3.1.4 ResultsAsthedistributionoftheprocessthathasgeneratedthedatasampleisaprioriunknown,wetestedboth linear and non-linear regression algorithms. Figure 12 and Figure 13 present the validationperformance scores in terms of correlation coefficient and rootmean squared error (RMSE). Theperformancewasevaluatedwithregardtothefeatureextractiontimewindow.

Features

MACperformance

Page 22: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

22

Figure12Predictionperformanceforlinearregression,regressiontreesandneuralnetworks(correlationcoefficient)

Figure 12 and Figure 13 show that a neural network with 10 hidden layers (HL), 2000 trainingiterations,anda learningrateofa=0:1,capturedbesttheunderlyingdistributionofthedata.Weselectedtheneuralnetworkmodelforanobservationintervalof30sasanappropriatetimewindowformakingaccuratefutureperformanceprediction.

Figure13Validationerrorforlinearregression,regressiontreesandneuralnetworks(RMSE)

Page 23: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

23

In order to validate how well the trained neural network model generalizes a separate set ofexperiments has been performed with a shorter duration of monitoring (~8h). The newmeasurements have been used to derive a validation set. The goal of this dataset is to find anestimateofthepredictionerrorofthemodelinthefuture.

Figure 14 illustrates how well the model predicts 𝑝𝑙𝑟 on instances from the second set ofexperiments (the validation set). It can be seen that the predictions are good under changingenvironmentalproperties:𝑑, 𝐼𝑃𝐼,andinterferencescenarios.

Figure14Performanceofneuralnetworkspredictionsvs.actualvaluesonthetestdata

3.2 MACoptimizationsinhigh-densityscenarios(HIDE)In this showcase we describe the HIDE intelligent module (Intelligent Module for HIgh DEnsitynetworks).TheHIDEmodulerecognizesthepresenceofhiddenandexposednodes inhigh-densityscenarios. In facts, it iswell known that in caseofhigh-densitydeployments,WiFinetworks sufferfromseriousperformanceimpairmentsduetohiddenandexposednodes,belongingtooverlappingBSSs (OBSSs) that interfere each other [10]. In dense environments, pathological topologies withhiddenandexposednodesaremoreprobabletooccurthaninsparsewirelessnetworks.

3.2.1 GeneraloverviewThis showcase uses the HIDE intelligent module. It offers several capabilities including advanceddetectionofspecificinter-BSSinterferenceconditions,contextrecognition,focusedonhiddennodesdetection, and appropriate actions about MAC adaptation. Currently the detection phase, thecreationof the classifier and its trainingare runoffline, asaMatlab script trainedwith simulationdata.Then,thisprovidesdecisionsthataretakenonnodesinthetestbed.

Recognizinghiddennodes

Tovalidatehiddennodecreationandrecognitionweuseanarchetypaltunabletopologycomposedbyfournodes:twoAPsandtwoSTAs.

Page 24: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

24

Figure15-Archetypaltopologyforthehiddennodeproblem

Despitethesimplicityoftheusedtopologywithhiddennodes,thisisdifficulttoobtainbecausewerequirefortuningthedistancebetweenthesetwoBSSs:AP1-STA1andAP2-STA2,inordertoshowthedesiredphenomena.

Our topology differs from the typical three-nodes topology that is usually used for explaining thehiddennodeproblem.This is becauseweaim todemonstrate that thehiddennodephenomenonhas different behaviour depending on some topological parameters when more BSSs overlap indensenetworks.Toexplainthehiddennodephenomenonarisingwithindensenetworks,werefertothetopologydepictedinFigure15.

TherearetwoBSSsbothwithdownlinktraffic,thereforeframesgofromAPstoSTAs.ThedistancebetweentheSTAanditsAPisfixedandtheyhaveanhigh-SNRlink,whilethedistancebetweenthetwoBSSschanges.Bytuningtheinter-BSSdistancewechangethenetworkdensityandithasbeendemonstratedthatdifferentlevelsofinterferenceconditionsoccur:hard,softandzerointerference[10].ThesearerespectivelyindicatedwithlettersH,S,andZinFigure19,wheredistancespansfrom0to200m.Weexploitsuchinterferenceclassificationfordesigningtheadvanceddetectionsystem,whichworksalsoingenerictopologiesandisthereforeabletoclassifyinterferencepatternsinmulti-hopwirelessnetworks

First, tounderstandtheeffectsof interferencephenomena,weruntestbedexperimentsorganizedintothreephaseslasting120seach,asreportedinFigure17.

Figure16-InterferenceclassificationdependingondistancebetweenthetwooverlappingBSSs

Page 25: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

25

(a)

(b)

(c)

Figure17-ThroughputindownlinkofthetwoBSSsunderdifferentinter-BSSinterferenceconditions:soft(a),hard(b),andzerointerference(c).

Page 26: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

26

ThesephasespermittoevaluateeffectsduetoreciprocalinterferencebetweenthetwoBSSs.Duringthe firstphase,onlyoneUDPflowfromAP2 isactive, thenthetwoAPsruntheir flows inparallel,finallyonlyAP1flowremainsactive.Wetunedthetransmissionpowerandusedattenuatorsinordertodemonstratewhathappensatvariabledistances:inFigure17atheAPstransmitatthemaximumtransmissionpowerof20dBmandcanperfectlyheareachother;intheseconditions,theybasicallyshare the channel capacity and get onehalf of the total throughput each, as expected in the softinterference area. The phenomenon gets worse in Figure 17b, corresponding to the hardinterferenceareawhenthetransmissionpowerisreducedto1dBmandthetwoAPsconsistentlyfailinsensingeachotherandthehiddennodephenomenoncompletely ruinsperformanceofthefirstBSS.Finally,inFigure17cwereportresultscorrespondingtothenointerferencearea,obtainedusing6dBattenuators for further reducing the inter-BSS interferenceandweobserve that the twoBSSswork as in isolated conditions, because they do not interferewith each other. These results havebeenobtainedwithoutRTS/CTSandforadataratesetto11Mbps.TheeffectsofusingRTS/CTShavebeenverifiedinsimulation[10],demonstratingthatthisdoesn’tprovidemuchhelp.

Distributedandcentralizedintelligence

This showcase uses a twofold approach for recognizing performance impairments due tointerference,whichhave their specificdatacollectionmodules: thecentralizedand thedistributedapproaches,whoseonlydifferenceresidesintheusedfeaturesfortheinterferenceclassification.Inthe distributed case we feed the classifier with busy/idle data while in the centralized case weprovidetopologicalinformation.

Infact,theadvanceddetectioncapabilityisimplementedasaclassifierbothinthedistributedandinthe centralized cases. The classifier is trained with supervised learning and is able to predictinterferenceconditionsexperiencedbywirelessnodes.

Tohavecomparable resultsweoperatenormalizationandconsider inoutput the throughputovertheofferedtraffic.

Thisnormalizationworksalsofornodesthathaveheterogeneoustrafficrequirements,despiteinoursimplifiedscenarioweassumeallnodeswithsaturatedtraffic.

Theadvanceddetectionmodulepredictsnode interferenceconditions,whichweclassifiedashardinterference (H), soft interference (S) and zero interference (Z). H, S and Z interference zonescorrespond,respectivelytonormalizedthroughputin[0;0.25],in]0.25;0.75],andin]0.75;1].

Datacollectionmoduleforthedistributedapproach

Inthedistributedapproachtheclassifieruses low-levelobservationsgivenbybusyandidletraces,taken using WiSHFUL UPIs. These traces are taken locally on the nodes, then values taken in aspecifictimewindowaresummarizedinnumericalbusy-idlefeaturesasfollows.

First, thedistributeddatacollectionmodulecomputesthecdf (cumulativedistribution function)ofbuys/idledurations,thenitreadsthecdfinspecificpointscorrespondingtopre-definedpercentiles,asshowninFigure18.Inourshowcasewesamplethecdfatthe50th,90thand100thpercentile.

y(i ) =throughput

offered traffic

Page 27: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

27

Figure18–Typicalcdffordurationofbusyintervalsandhowbusy_50,busy_90andbusy_100areobtained

Featurespacedesignforthedistributedapproach

Forthedistributedapproachweusedrawdataformattedasfollows:x(i ) = [busy50,busy90,busy100,idle50,idle90,idle100 ]

For the sake of simplification, we assume that nodes send frames with the same size, whosetransmissiontimeis1ms.Despiteitisunrealistictohavehomogeneous-sizedframes,itisnotdifficultto extend our results to frames of any length. In absence of exogenous sources of interference,durationsofbusytimeareduetotransmissions,thereforetheirlengthisexactlylongasthedurationof frame transmission. Busy intervals become longer than the transmission duration in case ofcollisions.Infact,whenonenodereceivesmorethanoneframeconcurrently,itresultsinacollisionand in general the colliding frames are not aligned in case of hidden nodes. Moreover, severalcollisionscanoccurinarow,thereforebusyintervalsbecomelongerandlonger.InthecaseshowninFigure18thebusytimeistill16timeslongerthantheframeduration.Busydurationsthatareonehundred times longer than the frame duration are possible. This explains the importance of thisfeature inpredictingnodeperformancedueto interference.Analogousconsiderationsarevalidforidledurations.

Nodesareabletodistinguishinterferenceconditionsduetohigh-densityfromweaksignalswithlowSNR,andtakethecorrespondingaction.Thisdistinctionismadepossiblebecausehiddennodesandflowinthemiddlehavespecificrecognizable‘fingerprinting’inbusy-idletraces.

Featurespacedesignforthecentralizedapproach

Forthecentralizedapproachweusedrawdataformattedas x(i ) = [#neigh1hop , #neigh2hops ] .

Infacts, interferencedependsonnetworktopologyandweusedthenumberoftransmittingnodesatonehopandattwohopsasrelevantfeaturetomodelinterference.Inthiscase,thenumbersofnodesatonehop,aswellastheiruniqueidentifiersaresenttotheglobalcontroller,reportingalso

0 2 4 6 8 10 12 14 16 18t [ms]

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

CD

F bu

sy ti

me

busy_50

busy_90 busy_max

Page 28: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

28

theMACaddressesofheardnodes.TheHIDEintelligentmoduleassemblesthesecontributionsandcomputes the whole network topology by obtaining the adjacency matrix A. Given the set V ofwireless nodes, which are the vertices of the graph, the adjacencymatrix is a square | V |×| V |matrix whose generic element aij is one when node i listens (and is listened from) j, and zerootherwise.Thediagonalelementsofthematrixareallzero,sincenodeshavenotself-loops.

GiventheadjacencymatrixtheHIDEmodulecomputesthenumberoftwo-hopsneighboursforeachnode. This is easily obtained from G2 – G, where G2 is the square of the graph G. These twoobservations,namelythenumbersofone-hopandtwo-hopsneighbourspermittorunapredictiveanalysisaboutperformance,undertheassumptionofallnodesoffersaturatedtraffic.

HIDEprotocolselectionandinter-BSSsynchronization

HIDE implements an if-then-else logic for protocol selection based on predictions provided by theadvanceddetectionmodel. TheMACprotocol is chosenbetweenCSMAandTDMAand in caseofTDMAtheslotsaredynamicallyassignedperBSSratherthenperstation.TDMAframesareassignedperBSS.InordertoaligntimesslotsofadjacentBSSsweusethetimesynchronizationfunction(TSF),which is natively provided by IEEE 802.11 standard and thatwe extended in a non-standardway.Moreintodetail,weconsiderasynchronizingAPthatprovidesitsTSFtoAP1andAP2,whichinturnadjust their internal TSF. This extra AP (which is not reported in Figure 15) is heard by bothtransmitting APs, its presence is guaranteed by the high-density assumption. The comparisonbetweenobtainedperformancewith/withoutinter-BSSsynchronizationisschematicallyreportedinFigure 19. This shows performance degradation due to intra-BSS TDMwhenno synchronization isemployedwithoverlappingBSSs.

InthisshowcaseweusedtheWMPplatform,alreadydiscussedindetailinpreviousdeliverables.Westartedfromthestatemachineimplementinganintra-BSSTDMAprotocolandextendeditbyaddingtheinter-BSSsynchronizationmechanism.ThishadthefollowingimpactonWiSHFULUPIs:

• Added a new action sync_by_ap, parameterizedwith theMAC address of the synchronizingAP. ThesynchronizedAPadjusts its localTSFuponthereceptionthenewinformationaboutchannelreservations.

• (future work) From the adjacency matrix, APs in specific positions are elected and theirbeaconsareusedfor inter-BSSover-the-airsynchronization.Thiscommonreferencesignal isthen used by the TDMA state machine for setting the slots in the BSS reserved interval inwhichtheSTAsareallowedtoaccessthechannel.

• Assign the intervalwithin the frameto the twoBSSs,asaconfigurationparameter (e.g.oddslotsareassignedtoAP1andevenslotstoAP2).

• Tunetheintervalsize,whichhasbeensettotheminimumintervalrequiredfortransmittingaframe of 1500 bytes at 11 Mbps, in order to test our system under tight synchronizationrequirements.

Page 29: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

29

(a)

(b)

Figure19–WhenthetwoBSSuseunsynchronizedTDMAs,STA1receivesnoframesandSTA2receivetwoframes(a).UsingsynchronizedTDMAs,STAsreceivetwoframeseach(b).

(a)

(b)

Figure20–RealtraceobtainedfromBSSswithun-synchronized(a)andsynchronizedTDMAs(b)

Introducing inter-BSSs synchronization is beneficial for network performance, as demonstrated inFigure20,whichreportsthechanneloccupancywith(b)/without(a)inter-BSSsynchronization.The

AP1

AP2

src: AP1dst: STA1

src: AP1dst: STA1

src: AP2dst: STA2

src: AP2dst: STA2

TX

STA1

STA2src: AP2

dst: STA2src: AP2

dst: STA2

RX

T = 4 slots

AP1

AP2

src: AP1dst: STA1

src: AP1dst: STA1

src: AP2dst: STA2

src: AP2dst: STA2

TX

STA1

STA2

src: AP1dst: STA1

src: AP2dst: STA2

src: AP1dst: STA1

src: AP2dst: STA2

src: AP2dst: STA2

src: AP2dst: STA2

RX

T = 4 slots

Page 30: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

30

power envelope grabbed with an USRP used as a PHY sniffer demonstrates that withoutsynchronization several collisions occur, represented by the overlapped power masks. In thisshowcaseweusedownlink traffic, therefore longdata framesare sentbyAPsand shortACKsaresentbySTAs,asitisshowninfigurebydifferentpowerlevelsanddurations.

3.2.2 WiSHFULfunctionalitiesandshowcasephasesIn this paragraphwe explain the use of theWISHFUL framework andUPIs to implement theHIDEintelligentmodule.

SpecificallyweexploitthefollowingmainfunctionalitiessupportedbytheWiSHFULUPI:

• RunlocalcontrolprogramthattuneandswitchbetweenTDMAandCSMAprotocols;• Collect low level measurements on the busy-idle channel utilization (the busy-idle trace is

composedbyasequenceofdurationsfortheidleandbusytimes);• Computetheadjacencymatrix;• ReceivetheTSFfromasynchronizingAP;• AdjustthelocalTSF;• SelecttheradioprogramanditsparametersforeachBSS;• Synchronize over multiple BSSs by the mean of one beaconing signal taken as common

reference;• Selectradioprogramparameters(thenumberofTDMAslotsassignedtoeachBSS).

Theshowcaserunsonthreemainphases:detection,basedonmeasurementsandstatistics,decisionandaction.

3.2.3 NewintelligencemodulesThe HIDE intelligent module for advanced detection and interference classification exploits anensemble classifier and in particular the bootstrap-aggregated (bagged) trees algorithm [11].Individual decision trees tend to overfit whereas bagged trees are more robust because theycombine results of many decision trees. Bagged trees improve generalization in comparison toindividualdecisiontreesbecausetheyusebootstrapsamplesofthedataandselectarandomsubsetofpredictorstobeusedateachdecisionsplit.

3.2.4 ResultsResults from this showcase aim to evaluate the efficacy of recognition capabilities, both incentralizedanddistributedcases,aswellastheefficacyofappliedMACcountermeasures.

To present the performance evaluation of interference classification we use confusion matrices.ThesereportthenumberofelementsandpercentagesofnodesthatbelongtothetrueclassesH,S,andZinrows(hard,soft,andzerointerference)andfallwithinthecorrespondingpredictedclassesincolumns.Forexample,inFigure21aitresultsthat1951observationswereintotalaffectedbytruehardinterference.TheclassificationalgorithmwasabletorightlypredicttherightclassHin92.2%ofcases(thetruepositiverateTPR),whilein7.8%itwaswrong(thefalsenegativerateFNR).Infacts,143observationswereclassifiedasS(7%ofcases)and10asZ(0.1%ofcases),eveniftheybelongedtotheHclass.Thismeansthatthemistakenclassificationofhardinterferencetozerointerferenceisquite improbable, while there is a residual but significant probability to be confused with softinterference.ThesameconsiderationsholdfortheSandZrows.

Page 31: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

31

Results inFigure21aandbarerelatedtodecentralized intelligencethatobservesbusy/idletraces.This approach brings to 93.1% of accuracy. In Figure 21c and d we use centralized topologicalinformationexploitedbytheglobalcontrollerandresultingin77.9%ofaccuracy.Pooreraccuracyinthe centralized approach may appear counterintuitive, but can be explained by the limitedinformationprovided,composedonlyontopologicalaspects.Forthesakeofcompleteness,despitenot relevant for this showcase, we also trained the centralized classifier with all the describedfeatures,obtaining96%ofaccuracy.

In Figure 21b-d there are shown the receiver operating characteristics (ROCs). These diagramsconsider theperformanceofabinaryclassifieras itsdiscriminationthreshold isvaried. Inourcasetheclassifierisnotbinary,thereforeweassimilatedittobinarybyconsideringtwoclasses:thehardinterferenceclassandanotherclasscontainingsoftandzerointerference.Thesecurvesareobtainedbyplottingthetruepositiverate(TPR,ortheprobabilityofdetection)againstthefalsepositiverate(FPR,orprobabilityoffalsealarm)atvariousthresholdsettings.

(a) (b)

(c)

(d)

Figure21–Classificationresultsforinterferenceusingradiofeaturesinthedistributedapproach(threefeaturesforbusyandthreeforidle)(a,b)andusingonlytopologicalfeaturesinthecentralizedapproach(neighboursatonehopandattwohops)(c,d)

Page 32: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

32

Finally,we show the impactofMACadaptationactionbyevaluating throughput in caseofCSMA,staticinter-BSSTDMAanddynamicallyassignedinter-BSSTDMA.Instaticassignment,ifoneBSShasno traffic to transmit, its assigned interval is wasted. With dynamic assignment, this slot can bereassignedtotheremainingBSS.

AswehaveonlytwooverlappingBSSs,weconsideraperiodicframeoftwointervals.Weassignoddintervals toBSS1andtheevenonestoBSS2.Obviously, thisstaticassignment isnotoptimalwhenonly one traffic flow exists (see Figure 22b). In the dynamic scenario, we assume that theassignmentsofreservedintervalscanvaryovertime,accordingtotheloadexperiencedineachBSS.Whenonly oneBSS is active, both reserved intervals of the frame are assigned to the active BSS;when both the BSSs are active, each BSS receives only one assignment according to the usualodd/evenschedule.Fig.7showsthethroughputresultsobtainedunderinter-BSSTDMA,inthestaticand dynamic case. Results are valid with all interference classes because the adoption of time-divisionmakesthetwoBSSscompletelyorthogonal.

(a)

Page 33: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

33

(b)

(c)

Figure22-ThroughputforCSMAincaseofhardinterference(a),TDMAwithstaticallyassignedslotsinallinterferenceconditions(b)andTDMAwithdynamicallyassignedslotsinallinterferenceconditions(c)

3.2.5 NextstepsThisshowcasepresentsthreepossibledirectionsforfutureimprovements.First,weforeseetolookfor different low-level observations for better interference classification. Then, we propose todemandtotheintelligentmodulethedynamicselectionofoneormorebeaconingAPsfortheinter-BSSsynchronization, through theanalysisof thenetworkadjacencymatrix.Finally, the recognitionphasecanbeincludedonline.

Page 34: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

34

4 Intelligenceshowcasesbasedonon-linelearning

4.1 DistributedintelligentselectionofMACprotocol:Meta-MAC

4.1.1 GeneraloverviewofMeta-MACIn this showcase we demonstrate how learning mechanisms can be implemented in each node,basedonchannelobservationsgatheredbymeansofUPIfunctions.Inparticular,thegeneralideaoftheshowcase isdefiningamediumaccess logic,which isnotbasedonapre-definedprotocol,butratherisgivenbyacombinationofelementaryprotocols,whichcontributetoafinalmediumaccessdecisionbyweightingopportunisticallythedecisionsofeachone.

The basic idea ofMAC learning has been introduced some years ago, in the so calledMeta-MACprotocol [12].Meta-MAC introduces amethod for systematically andautomatically combining anyset of existing protocols into a single MAC protocol. Each protocol runs in parallel and takes adecisionateachchannelslot;thefinalmediumaccessdecisionisobtainedbycombiningthedecisionofeachprotocol.At theendof theslot,protocolsdecisionsareclassifiedasornotcorrect incasethey lead to successful transmissions, collisions or wasted channel time and their weights areupdatedaccordingly.Forimplementingsuchaschemeinarealnetwork,whereprotocolscannotbeexecuted in parallel, we exploit the formal definition of simple MAC protocol components andplatform-independentrepresentationofchanneleventsgatheredfromthewirelessnode.Theideais emulating the behavior of Meta-MAC by virtually executing multiple protocol components,learningabout theperformanceofprotocolcomponentsnot running in thenode,anddynamicallyreconfiguringthewirelessnodesbyloadingthebestexpectedprotocol.

MAC components can be different protocols or protocolswith different parameters. For example,slotted p-persistence protocol with dynamically adjusted retransmission probabilities p may beregarded as one. In a slotted p-persistent protocol, whenever there is a packet queued, theprobabilityof transmission ina slot is a constantp, independently foreach slot. Ifwedynamicallychangethevalueofp,thenweeffectivelycombinep-persistentprotocolsthatdifferintheirpvalues.Thus, in each slotwe decide to use one of these component protocols, namely the onewith theappropriatep. Conversely,TDMAprotocols are characterized by the frame length and by the slotallocated to each node. For a given frame size, different allocations are mapped into differentprotocolcomponents.

In this showcaseweconsider twotypeof slottedprotocols,TDMAandp-persistenceprotocol;wealso use channel feedback at the end of each slot, for updating theweight of each protocol as afunction of its right/wrong decision. While for protocol simulation the channel feedback has tospecify many different events (such as the reception of a specific frame), for estimating thecorrectness of the protocol decisions is generally enough to consider a ternary feedback(transmissionoccurred,collisionoccurred,oridleslot).

AsFigure23shows,MMACprotocolsP1,…,PMarecombinedatagivennode;hereMisnotrelatedtothenumberofnodes in thenetwork,N. Inorder to simplify thepresentation, time isdivided intoslots.EachprotocolPirunslocallyandineachslottproducesadecisionDi,t,1<i<M,whereDi,t=1is interpretedasPi transmits inslottandDi,t=0 is interpretedasPidoesnot transmit inslott.Avalue0<Di,t<1isinterpretedasaprobabilitywithwhichPitransmits.Themeta-MACprotocolisanalgorithmthatrunslocallyateachnodeandcombinesthelocaldecisionsDi,t,1<i<M,toproduceacombinedresultDtwith thesame interpretationasDi,t.The finalbinarydecisionϵ {0,1} isderivedfromDtbydrawingarandombinaryvaluethattakesthevalue1(transmit)withprobabilityDtandthevalue0(donottransmit)withprobability1-Dt.

Page 35: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

35

Figure23-Operationofthemeta-MACprotocol

ThecombineddecisionDtiscomputedasafunctionoftheweightedaverageoftheDi,tvalues:

𝐷! = 𝐹𝑤!,!𝐷!,!!

!!!

𝑤!,!!!!!

Fisafunctionthatgrowslinearlyfrom0to1inaninterval[1/2-c,1/2+c]andistruncatedto0and1before and after the interval c, which depends on another parameter η that controls how theweightsareupdated.Themeta-MACprotocolmaintainstheweightsofeachprotocolPiattimetaswi,t. At the end of each slot the weights are updated using the channel feedback. In a ternaryfeedback model, a node can determine whether a successful transmission occurred, a collisionoccurred, or the channel remained idle in a slot.We require information to be available for themeta-MACprotocoltoconcludeattheendoftheslotwhetherthedecisionfortheslotwascorrect.

Forexample,fromtheternaryfeedbackwecanconcludethecorrectnessfeedback:Ifwedecidedtotransmitandthetransmissionwassuccessful thenthedecisionwascorrect.However, ifacollisionoccurredthenthedecisionwasincorrect.Ifthereisapacketqueuedfortransmissionbutwedecidenottotransmittherearetwopossibilities.Ifthechannelwasidlethedecisionwasincorrectbecausetheslotwaswasted.However,ifthechannelwasnotidlethenitwascorrectnottotransmitasthechannelwasusedbyanothernode.Ifthequeuewasempty,thenrefrainingfromtransmissionwascorrect. Given such correctness feedback, theweights are updated as follows. Let y_t denote thecorrectnessfeedback:

𝑦! = 1 if the decision in slot t was correct 0 if the decision in slot t was incorrect

Then the correct decision for slot t is z_t = ~{D}_ty_t + (1-~{D}_t)(1-y_t). But we cannot set thedecision for slot t to z_t because z_t only becomes known at the end of the slot. Using z_t, theweightsareupdatedas:

𝑤!,!!! = 𝑤!,! ∙ 𝑒!! !!,!!!!

The constantη > 0 controls how fast theweights change. This update rule can be interpreted asreflectingthe``correctnesshistory''ofthecomponentprotocols.

4.1.2 WiSHFULfunctionalitiesandshowcasephasesInthisshowcasewewanttodemonstratehowtheWISHFULframeworkandUPIscanbeexploitedforimplementing themeta-MACalgorithm. In theWiSHFUL framework, elementaryMACcomponentsare implemented in termsof radioprograms,butonlyone radioprogramcanbeexecutedat run-time.Therefore,theMeta-MACimplementationisbasedonthepossibilityofvirtuallyexecutingthe

p p p p

1 0 0 0

0 0 0 1 TDMASLOT3

TDMASLOT0

p-persistence

Page 36: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

36

protocols on the basis of their formal representation and channel feedback. To this purpose, weexploitthefollowingmainfunctionalitiesprovidedbytheWiSHFULUPI:

• Runalocalcontrolprogramthatimplementsthemeta-MACalgorithmineachnode,updatestheweightsoftheprotocolcomponentsandloadsthebestprotocoloneachnode;

• Collect low levelchannelmeasurements, inorder togeta feedbackatendofeachtimeslotandclassifyprotocoldecisionsarecorrectorincorrect;

• Tuneradioprogramparameters;• Switchfromaradioprogramtoanother.

Althoughtheshowcaseisbasedonadistributedintelligence,developedwithinthelocalcontrollers,wealsouseaglobalcontrolprogramfor theset-upof thenetwork, the loadingof the intelligencemodulesandtheactivationofthetrafficstreams.

Networkscenario.Weconsiderawirelessnetworkwith5activenodesunder thesamecontentiondomain (where all thenodes are in radio visibility): 1Access Point node (AP) and4 Stationnodes(STA1…STA4)associatedtothesameAP.AwiredEthernetnetworkisavailableasacontrolnetwork(Figure24).EachSTAnoderunsthemeta-MAClogicloadedbytheglobalcontrolprogramfortuningthecurrentprotocolasafunctionofthenetworkcondition.Ourimplementationsupports4differentversions of a TDMA protocol with a frame size equal to 4 slots (each version corresponding to adifferentslotassignment)andoneslottedALOHAprotocolwithatunablepersistenceprobabilityp.

Figure24-Networktopologyusedintheshowcase

Storyline. For demonstrating the effectiveness of the general Meta-MAC implementation, theshowcasegeneratesaconfigurablechanneloccupancypatternandshowshowaMeta-MACnodeisable to find automatically the best protocol that improves the network performance in dynamictrafficconditions.

Phase1:atthebeginningoftheexperiment,thenetworkworksundersporadictraffic.Inthiscase,themeta-MAClogicselectstheslottedALOHAprotocolwithahighp-persistencevalue, inordertooptimizethetimedeliveryoftheframes.

Phase2:aslongasthetrafficrateincreasesandthenetworkloadreachessaturationconditions,themeta-MACmovesfromtheslottedALOHAprotocoltotheTDMA;moreover,itisabletofindanon-conflictingscheduled(inadistributedway)amongallthecontendingnodes..

Summarizing, after the set-up of the wireless network, the showcase works by executing thefollowingstepsperformedbytheexperimentcontroller:

1) SendingofthelocalcontrolprogramfromtheglobalMCEtothelocalMCEs;

STA3

STA4

STA1

STA2

802.11 Domain

AP

WiSHFULControlProgram

Page 37: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

37

2) Performingalownetworktraffic(300kbps)betweenSTAsandAP(phase1);3) PerformingasaturationnetworktrafficbetweenSTAsandAP(phase2);

Implementationdetails. For running thisexperiment,weuse twodifferentpython scripts: the firstscript is responsible of network configuration, AP activation and station associations(metamac_testbed_controller); the second script is the most relevant one and implements theGlobal Control Program on top of the WiSHFUL global MCE (metamac_experiment_controller),whichincludesthemetamac_local_control_programthatissenttothelocalcontrollerofeachnode.

TheshowcasecodeisavailableonGithubin[13].

Figure25showstheoverallsoftwarearchitectureofthecontrolmodulesinvolvedinthisshowcase.TheWiSHFUL control frameworkprovides thebasic functionalities fordevelopingdifferent controlprograms,suchasthepossibilitytodiscoverthenodes,theircapabilitiesandthenetworktopology.These functionalitiesarenativelyprovidedby theWiSHFUL framework in themodulesDISCOVERYNodes andGETNodesCapabilities, that are included inGlobalMCE. Themeta-MACLocalControlProgramprovidestwodifferentmainmodulesimplementedintwoseparatedthreads:i)Meta-MACLOGIC, that implements the meta-MAC algorithm, and ii) COLLECT MEASURE responsible ofgatheringthechannel feedbackconsumedbytheMeta-MACLOGIC.TheMeta-MACLOGICmoduleincludes the definition of the following functions: i) updating the weights of the protocolcomponents,ii)decidingaboutprotocolswitching,iii)tuningprotocolparameters.

Notethatthemeta-MAClocalcontrolprogramisdefinedintheglobalcontrolprogram(asindicatedby the dashed lines in the figure), sent to the local MCEs available in each network node, andexecuted locally. The figure shows the flows of global controlmessages in the green arrows, theactionsofthelocalMCEintheredarrowsandthedataflowsinthebluearrows.

Figure25–Moduleinvolvedintheglobalandlocalcontrollersinthisshowcase

The feedback variables retrieved by the COLLECT MEASURE module and their semantics aredescribed in Table 2. In addition, the local control program uses a 3-bit slot index counter,representing thecurrentslotnumbermodulo8,anda timestamp(withaprecision in theorderofmicroseconds)thatareusedtodeterminethenumberofchannelslotselapsedbetweenconsecutivereadingsofthechannelmeasurements.

Page 38: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

38

Variable Semantics

packet_queued Oneormorepacketsqueuedfortransmission.

Transmitted Transmissionattempted.

transmit_success ACKreceivedforsuccessfultransmission.

transmit_other AnydataframeorACKreceived.

bad_reception Invaliddataframereceived.

busy_slot Morethan500usofchannelactivityinslot.

Table2-Feedbackvariablesandsemantics

InFigure26weshowthesoftwarearchitectureusedintheshowcase,byenlighteningtheseparationbetween the data processing level (MAC protocol level) and the control layer (Monitoring andConfigurationEngine level). TheCOLLECTMEASUREmoduleuseUPI toget time slot feedbackandkeep available this information to the Meta-MAC LOGIC module, responsible of finding the bestprotocolcomponent.AsshowninFigure26,thechannelfeedbackrecordsarealsostoredinacsvfileonthenodes,inordertoperformothertypeofpostprocessing.Inparticular,attheendofeachslot,theCOLLECTMEASUREmodulesavessixvariableswiththebinaryfeedbackdescribedinTable2.

Figure26-meta-MACimplementationarchitecture

Onthebasisofthepreviousdescription,itispossibletoeasilyreadanextractedcodeoftheglobalcontrolprogram reportedbelow,which is responsibleof injecting the local control logic. The locallogicisimplementedinthemetamac_local_control_program()function,whilemytestbedisthesetofdiscoverednodes,andcontrolleristheWiSHFULglobalMCE.Afterthelocalcontrolprogramissenttothenodes,theglobalcontrollerkeepsreceivingmessagesfromthelocalcontrollersbymeansofthecollect_remote_message function, for recordingthestatisticsaboutthethroughputresultsandtheprotocolchoicesofeachnetworknode.This information isused forvisualizing theexperimentresults.

Page 39: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

39

…''' set default radio program on STA nodes ''' for node in mytestbed.wmp_nodes: active_ALOHA_radio_program(node, log, controller, nodes_platform_info[0]) ''' start local control program on STA nodes ''' lcpDescriptor_wmp_nodes = [] reading_thread = [] for ii in range(len(mytestbed.wmp_nodes)):

lcpDescriptor_wmp_nodes.append(controller.node(mytestbed.wmp_nodes[ii]).hc.start_local_control_program(program=metamac_local_control_program)) #start thread for collect measurements from nodes(THR and Active protocol) reading_thread.append(threading.Thread(target=collect_remote_messages, args=(lcpDescriptor_wmp_nodes[ii], socket_visualizer,))) reading_thread[ii].start() …

The codebelow shows themain loopof the global control program. The showcasephase1 startswhenthefirsttrafficstream(300Kbps)isactivatedonnodes;after30seconds,thecontrolprogrammovestophase2withasaturatedtrafficstreamforeachnodes.

… #after 30 seconds move from showcase phase 1 to phase 2 CHANGE_TRAFFIC = 30 #SHOWCASE PHASE 1 #start server traffic controller.delay(2).nodes(mytestbed.ap_node).net.create_packetflow_sink(port='1234') for node in mytestbed.wmp_nodes: #start client traffic

controller.delay(4).nodes(node).net.start_packetflow(mytestbed.ap_node.ip, '1234', '500', '0.3M')

while do_run: log.warning('waiting for ... (%d sec / %d)' % (dt, EXPERIMENT_DURATION) ) # 1 second sleep gevent.sleep(1) dt += 1 if dt == CHANGE_TRAFFIC:

#ACTIVE SHOWCASE PHASE 2 for node in mytestbed.wmp_nodes: #start client traffic

controller.delay(4).nodes(node).net.start_packetflow(mytestbed.ap_node.ip, '1234', '500', 'SATURATION')

4.1.3 Intelligencecompositionmodule:meta-MAClogicAs already discussed in the general description of the showcase implementation, the meta-MACalgorithm isperformed independently and locallybyeachnode,byexecuting the custom functionmetamac_local_control_program().Thisfunctionimplementsthelocalcontrolprogramandusestwodifferentthreads,whichareimplementedinthetwomodulesshowedinFigure26.Themainloopofthe COLLECT MEASURE module is implemented in the following code, where the UPIget_measurements_periodic(parameters) is used to get the feedback of the last 8 time slots(reporting_period/collect_period=16ms/2ms=8slots).Indetail,weusethefollowingUPIparameters:

1. measurement_key_list:

• Packet queue; Transmitted; Transmitted Success; Transmit Other; Bad Reception; Busy slot;

Page 40: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

40

2. collect_period=2ms

3. report_period=16ms

4. num_iterations=1

afterwardsthefeedbacksareseparatedslotbyslotandstoredinthestory_channelarraylist,wherethe slots information are organized inmetamac_slot()structure. Themodule uses this array list topushthetimeslotsfeedbacktoMeta-MACLOGICandtoCSVfile.

collect_period = 2 #ms report_period = 16 #ms num_iterations = 1 while getattr(reading_thread, "do_run", True): last_tsf = tsf last_slot_index = slot_index UPI_myargs = {'interface' : 'wlan0', 'measurements' : [UPI_R.TSF,

UPI_R.COUNT_SLOT, UPI_R.PACKET_TO_TRANSMIT, UPI_R.MY_TRANSMISSION, UPI_R.SUCCES_TRANSMISSION, UPI_R.OTHER_TRANSMISSION,

UPI_R.BAD_RECEPTION, UPI_R.BUSY_SLOT, UPI_R.COUNT_SLOT] }

node_measures = controller.radio.get_measurements_periodic(UPI_myargs, collect_period, report_period, num_iterations, None )

tsf =node_measures[0] slot_index = node_measures[1]& 0x7 packet_queued = node_measures[2] transmitted = node_measures[3] transmit_success = node_measures[4] transmit_other = node_measures[5] bad_reception = node_measures[6] busy_slot = node_measures[7] slots = [ metamac_slot() for i in range(8)] ai = 0 while slot_offset > 0 : slot_offset-=1 si = slot_index - slot_offset #(int) if si < 0 : si = si + 8 slot_num+=1 slots[ai].slot_num = slot_num slots[ai].read_num = read_num slots[ai].tsf_time = tsf slots[ai].slot_index = slot_index slots[ai].slots_passed = slots_passed slots[ai].filler = 0 slots[ai].packet_queued = (packet_queued >> si) & 1 slots[ai].transmitted = (transmitted >> si) & 1 slots[ai].transmit_success = (transmit_success >> si) & 1 slots[ai].transmit_other = (transmit_other >> si) & 1 slots[ai].bad_reception = (bad_reception >> si) & 1 slots[ai].busy_slot = (busy_slot >> si) & 1 ai+=1 for i in range(ai): story_channel.append(slots[i])

Page 41: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

41

read_num+=1

Aftercollectingthetimeslotsfeedback,themoduleMeta-MACLOGICisresponsibleofretrievingandprocessingthefeedbackprovidedbythestory_channelarraylist,andselectingtheMACcomponentprotocol to be activated. The module code is reported below and works slot by slot. Once thefeedback is retrieved, themoduleevaluates thedecisionofeachprotocol component for thenextslot.This iscriticalbecauseonlyonecomponentprotocol isactuallyrunning,whilethedecisionsofall componentprotocolsare required inorder togenerate the correctness feedback for themeta-MAC protocol. Thus, a software representation of each protocol, embedded in the local controlprogram,mustbeabletoemulatetheprotocol'sdecisionforeachslotasafunctionofthefeedbackprovided.

… #Performs the computation for emulating the suite of protocols #for a single slot, and adjusting the weights. def update_weights(suite, current_slot, ai): z = 0.0 uu = 0.0 d = 0.0 #If there is no packet queued for this slot, consider all protocols to be correct #and thus the weights will not change if (current_slot.packet_queued) : #z represents the correct decision for this slot - transmit if the channel #is idle (1.0) or defer if it is busy (0.0) # // transmission AND success: GOOD # // no trasmission AND slot busy - GOOD # // trasmission AND NOT success - WRONG # // trasmission AND slot empty - WRONG if (suite.protocols[suite.active_protocol].emulator == b'tdma') : if (not current_slot.channel_busy): z = 1.0 if (suite.protocols[suite.active_protocol].emulator == b'aloha'): p_curr = suite.protocols[suite.active_protocol].parameter.persistence if (not current_slot.channel_busy): z = p_curr else : z = 1-p_curr #evaluate protocols weights for p in range(suite.num_protocols) : # d is the decision of this component protocol - between 0 and 1 if (suite.protocols[p].emulator == b'tdma') :

#Protocol emulation for TDMA d = tdma_emulate(suite.protocols[p].parameter, current_slot.slot_num,

suite.slot_offset) else :

#Protocol emulation for ALOHA slotted d = aloha_emulate(suite.protocols[p].parameter, current_slot.slot_num,

suite.slot_offset) #evaluate weight exponent = suite.eta * math.fabs(d - z)

Page 42: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

42

suite.weights[p] *= math.exp(-exponent) if suite.weights[p]<0.01: suite.weights[p]=0.01 # Normalize the weights s = 0 for p in range(suite.num_protocols): s += suite.weights[p] for p in range(suite.num_protocols): suite.weights[p] /= s … Usingthefeedback,themodulemaintainsweightsforeachofthecomponentprotocolsaccordingtothemodeldescribedinFigure23.Themeta-MACLOGICmodulethenactivestheradioprogramandmodifies the radioprogramparametersasnecessary toexecute thehighestweighted component.Finally, theextractedcodebelowshowshowUPI functionsareused toenforceprotocol switchingwhen the protocol with the highest weight is different from the one under execution. The radioprogram is activated by calling the UPI function activate_radio_program(), and the protocolconfiguration is specified by the UPI function set_parameters(UPIargs) (responsible of configuringradioprogramparameters).

…if (protocol == suite.slots[active]) : #This protocol is already running. pass elif (protocol.type == suite.slots[active].type) : #Protocol active match with the type of best, but is not the same protocol #Write the parameters for this protocol. UPIargs = { 'interface' : 'wlan0', ‘params’: suite.protocols[protocol].params } rvalue = controller.radio.set_parameters(UPIargs) if rvalue[0] == SUCCESS: log.warning('Parameter writing successful') else : log.warning('Error in parameter writing') suite.slots[active] = protocol elif (protocol != suite.slots[active]): #Switch to other Protocol. if active == ‘TDMA’: protocol = 'ALOHA' else: protocol = 'TDMA' UPIargs = {'Protocol' : protocol, 'interface' : 'wlan0' } rvalue = controller.radio.activate_radio_program(UPIargs) if rvalue == SUCCESS: log.warning('Radio program activation successful') else : log.warning('Error in radio program activation') suite.slots[suite.active_slot] = protocol …

4.1.4 ResultsTo evaluate the capabilities of ourmeta-MAC implementation,we run an experiment in a simpletopology of 4 nodes connected to the same AP. Each of these participants runs the meta-MACprotocolwithfourvariantsofTDMAandoneslotted-ALOHAprotocol.EachTDMAvariantworkswitha frame size of four slots but with different assignments in slot 0, 1, 2 o 3, respectively. At thebeginningoftheexperiment,allprotocolweightsareequalandtheTDMAslot0protocolisloaded

Page 43: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

43

andactivatedoneachoftheparticipantnode.Allthenodestransmitat6Mbpsframesof1500bytesinaslotof2.2ms.Thedurationoftheexperimentis120seconds.TheresultsoftheexperimentareshowninFigure27andFigure28.

Figure27showstheprotocolselectedbyeachnodeatruntimeintermsofprotocollabel.Aftertwosecond, the traffic is activated in the low-rate conditions (i.e. 300Kbps) and themeta-MAC LOGICselects the slotted ALOHA protocol with 0.9 persistent probability as the best protocol. After 50seconds, the experiment controller changes the traffic conditions of the network, by activatinggreedy traffic sources in each node and by saturating all the transmissions queues. In theseconditions, all the nodes switch to TDMA protocols and find a non-conflicting assignment after atransient phase of a few seconds. Figure 28 shows the throughput results achieved by each nodeunderthetime-varyingprotocolexecution.

Figure27-Selectedprotocolbyeachnodes

Figure28-Throughputperformanceof4wirelessnodesexecutingmeta-MAClogic

Finally, Figure 29 shows a channel activity trace acquiredby aUSRPmonitoring node, in termsofreceivedRSSIsamples, inwhichwecaneasilyrecognizedatatransmissionsandacknowledgementsperformedbydifferentnodes(withdifferentRSSIvalues;thebestone,withtheshortedduration,istheACKsentbytheAP),accordingtoaTDMAschemewithfourslots.

Page 44: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

44

Figure29–Channelacquiringwhenthesaturatedtrafficispresentinthenetwork

Figure30showsanextractoftheCSVfile, inwhichwecanreadtheslotsfeedbackforalltheslotsbetweenthe36580and36596slotnumber.

Figure30-StorechannelinformationinalocalCSVfile

4.1.5 NextStepsIn the future, itmaybeworth investigatinghow themeta-MACmodel canbegeneralized tonon-slottedtime.Wealsointendtoevaluatetheeffectofthelearningparameterηontheconvergencerateandstabilityofthemeta-MAC.Acompletelygeneralmeta-MACcapableofcombininganysetofprotocolswouldbeadecisiveleapforwardindynamicadaptationofMACprotocols.

4.2 Monitoring,ReasoningandDecisionusingMarkovChains

4.2.1 GeneralOverviewIn spectrum sharing scenarios, secondary users (SUs) avoid causing interference to primary users(PUs) through the configuration of multiple operating parameters, such as transmit power,frequency, waveforms, scheduling, coding, and antenna patterns. This adaptation to theenvironmentcanbeperformedbasedon informationgatheredanddecisions taken locallyateachnode, or can be managed through spectrum-aware network-wide control entities, such as anSpectrumAccessSystem(SAS),geo-locationdatabases,orradioenvironmentmaps(REM).Thefirst

Page 45: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

45

approach, followed in the traditional cognitive radio literature, raises many implementationchallenges, namely in the design of power efficient local sensing mechanisms that can provide awideband, long term statistical viewof spectrumoccupancy,withoutdraining SUs’ limitedbatteryresources. As away to circumvent the limitations of local sensing, regulators and industry bodieshavegenerallyshiftedtheirfocustowardstheuseofnetwork-widespectrummanagementsystems(e.g.SASinUS,andLSAinEurope)thatholdamoreglobalandlongtermviewofspectrumutilisationacrossspaceandfrequency,andcanbeusedtomanageSUs’accesstothespectrum.Ontheotherhand, thereare still several questions and challenges regarding theuseof these systems in radioenvironmentswherethePUsdisplayahighlydynamicchannelaccessbehavior.

In this showcase, we focus on the study of learning and agile channel access/decision makingtechniques thatSUs canemploy to tackle theaforementioned issueofPU’sdynamics,whilebeingsupervised and informed regarding their radio environment by a centralized intelligence spectrummanagement entity. Our vision is to assess the adequacy of representational statistical models,dimensionality reduction and learning algorithmswhoseoutput results efficiently characterize andreliablypredictPUs’behavior,areeasilytransferable/sharedacrossdifferentnetworkelements(e.g.spectrummanagementsystem,sensorsandSUs),andwhichSUscanleverageforeffectivedecisionmaking. Examples of such representational models may include tables of observed PU-specificrelevant features, and state-transition models, such as Markov Chains (MCs). These features andmodels can be extracted by a dedicated sensor network or SUs with less restrictive powerconsumption limits (e.g. base stations), and sharedwith spectrummanagement systems that usethem as input during intelligence decisions to configure SUs’ operational parameters and channelaccess strategies. The several stages associated to the setup and utilization of this framework aredisplayedinFigure31.

Figure31–Transferoflearnedfeaturesandmodelacrossdifferentnetworkelements

For a PU’s behaviour to be efficiently reduced to a small set of features or parameters, it has tofollowsomespecificchannelaccesspattern.Someexamplesofsuchpatternsmay includechannelhopping sequences,back-offperiodprotocols, and receivedpowervariations for the caseof radarsystemswithmechanicallyrotatingantennas.Inthiswork,wefocusontheparticularscenarioofPUswith non-arbitrary channel hopping sequences. In particular, we implemented in SDR severalalgorithmsandfunctionalitiesthatcansupportSUsintheirdecisionmakingandthatallowthemtoreduce interference by avoidingminimizing the probability of accessing the same channels of thefrequencyagilePU.Inourapproach,SUsdonotneedaccuratesynchronizationwiththeinstantsofPU'schannel transition (tk).WheneverSUsdetect thePU'scurrentchannel"i",either throughout-

Page 46: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

46

band or in-band sensing, they will hop to the channel with highest availability expected time jprovidedbyanetwork-widecontrolsystem.Thus,overallinterferencewilldecrease,butwillnotbefullyavoided.

In this framework, sensing-capable devices collect raw wideband sensing samples from the radioenvironment, derive channel availability, and estimate several PU parameters and a MC channeltransition probabilitymatrix based on the PU hopping pattern. The obtained parameters andMCmatrixaresharedwiththenetwork-widemanagementsystem,whichwillanalyse theadequacyoftheMarkov-chainassumption,andcomputealistofactions/commandsthenodesintheSUnetworkshouldfollowforeachdifferentevent.Morespecifically,whenawareofthecurrentPUchannelofoperation (e.g. when the PU moves to the current SU channel), the SU will consult the list ofcommandsprovidedby themanagement system,whichwill tell theoptimal channel tohop to, sothattheprobabilityofinterferenceinthefutureisminimized.

Figure32–MarkovChain-basedChannelHoppingFramework.Thesetofchannelhoppingcommandsare

onlyderivedfromtheMCtransitionmatrix.Hence,themanagementsystemdoesnotneedinformationregardingthecurrentPU'schannelinatimelymanner.

4.2.2 MarkovchaintransitionmatrixestimationAssumea PUwith instantaneous bandwidthof BW that hops acrossNch contiguous channels. Thedecision to hop or stay in the same channel, which we denote as dwell time, happens every TDseconds.Sensingcapabledevices,unawareofboththeBW,TD,andhoppingtransitionprobabilities,try to estimate these parameters through their collected samples. To achieve these tasks, thefollowingcomponentsweredesigned:

• EnergyDetector–TherawIQsamplesreceivedbysensingdevicesareconvertedtofrequencydomain,magnitudesquared,andgroupedintoNchvalues,eachcorrespondingtotheaveragepower of each channel. These values are further smoothed out along the time axis using amoving average, and compared to an adaptive threshold to assess the availability of theirrespectivechannels.TheenergydetectorwilloutputeveryTEDsecondsabinaryarrayofsizeNch,wherechannelbusyandfreecorrespondtothevalues1and0,respectively.

• Dwell Time Estimator – Before being able to record the PU channel transitions, the sensingdevicehastoestimatethedwelltimeofthePUTD.Thisprocedurecanbecarriedoutthroughobservation of the time differences between PU channel transitions. In a noise-less

Page 47: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

47

environment,theperiodperchanneltransitionwillbe∆𝑡 = 𝑚𝑇! ,𝑚 ∈ ℕ,where𝑚 > 1whenthe PU stays in the same channel formultiple dwell times. The sensing device can find thefundamental dwell time by finding the highest peak in a histogram of registered timedifferences∆𝑡.

• TransitionMatrixEstimator–ThesensorregistersthePUactivitythroughatransitionmatrixM,where each entry𝑀(𝑖, 𝑗) corresponds to the number of times the PU transitioned fromchannel/state𝑖to𝑗 ∈ {1,… ,𝑁!!}.Thedivisionof𝑀(𝑖, 𝑗)bythetotalnumberoftransitionsNTobservedwillconvergeassymptoticallytothePUchanneltransitionprobabilities𝑝!".OnceNTsurpasses a stop criterion, the sensing device interrupts its transition matrix estimationprocedure,andsendstheobtained𝑝!",incombinationwithotherPU-specificparameterssuchasBWandTDtothenetwork-widecontrolentity.

4.2.3 GenerationofSUs’channelaccesscommandsFromthereceivedtransitionprobabilitymatrix𝑝!",theintelligencenetwork-widecontrolsystemwillcomputethesetofactions/commandsanSUshouldtaketominimizethechancesofinterferencetothePU.Inthiswork,weproposethatSUs,whentheyareawareofthecurrentPUchannel,movetothe channel with the highest expected availability time; that is, given a PU operating in channel𝑥! = 𝑖, and thechannelavailability timeoperator𝑇!|! = min 𝑛 ≥ 1: 𝑥! = 𝑗 𝑥! = 𝑖} for channel 𝑗,theSUshouldmovetothechannel𝑗max|𝑖 = max!!! 𝔼{𝑇!|!}.Underourframework,thenetwork-widecontrolsystemwillcompute𝑗max|𝑖forallpossible𝑖 = 1,… ,𝑁!!,storetheminanarrayandforwardittotheSUstoconfiguretheirhoppingpatterns.

Unfortunately, the value 𝔼{𝑇!|!} is not trivial to compute, unless the Markov Chain has someparticular properties. We circumvented this issue by relying on approximate solutions 𝑇!|!

(!) =min 𝑚 ≥ 𝑛 ≥ 1: 𝑥! = 𝑗 𝑥! = 𝑖},toobtainthesolutionset{𝑗max|𝑖 ∀𝑖 = 1,… ,𝑁!!}.

4.2.4 GeneralDemonstrationDetailsOur demonstration setup comprises five radio nodes with different roles, which are illustrated inFigure33.TheusedPU-TxandPU-RxwereZigBee-likedongle radios that transmit/receiveoveraninstantaneous bandwidth of BW=5 MHz, and hop between Nch=4 separate channels. The SU-Txtransmits OFDM packets to the SU-Rx with an instantaneous bandwidth of 5 MHz, andsimultaneouslysensestheenvironmenttodetectwhetheritiscurrentlycausinginterferencetothePUnetwork.EverytimethePU-Txhopstoitscurrentchannel,theSU-Txneedstomovetoadifferentchannel,whoseindex𝑗max|𝑖isderivedfromtheMarkovChainaccordingtoSection4.2.3.Finally,thesensorisresponsibleforestimatingthePU’sparameters,namelyBWanddwelltime,andcomputingtheMarkovChainofthePU’schanneltransitions.TheseparameterscanthenbeexposedtootherSUnetworkelementsthrough,forinstance,theWiSHFULUPI.

Page 48: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

48

Figure33–MarkovChain-basedHoppingDemonstrationSetup

WedevelopedtheseveralfunctionalitiesoftheSU-Tx,SU-Rx,andsensorinC++,sotheycanbeeasilyintegratedinbothIrisandGNURadioframeworks,bothofwhicharesupportedbyWiSHFULUPIs.Inthe repository made available, all of these network elements can be run through the simple“markov_radio”script.Toselectwhichofthenetworkelementstorun(SU-Tx,SU-Rxorsensor),theuserof thedemocanset the flags“has_learning”and“tx_opt”over thecommand line.Whentheflag“has_learning” is seton, theSDRnodewillestimate thePU’sparametersandMarkovchanneltransition matrix. If the “tx_opt” flag is on, the SDR node will act as SU-Tx and will start thetransmissionofpacketsovertheair.ThechannelhoppingstrategyoftheSU-Txisundefineduntilthechannel transitioncommands (𝑗max|𝑖)derived from theMarkovChainareavailable to it. Finally, incase of no “has_learning” and no “tx_opt”, the SDR node will behave as a SU-Rx and waits forincomingpacketsfromtheSU-Tx.

ToprovidethesufficientseparationandmodularityoftheSU-Tx,SU-Rx,andsensorfunctionalities,theimplementedalgorithmsandtechniques,namelytheenergydetector,dwelltimeestimator,andMC generator were separated into independent C++ classes that the experimenter can useindependently.

4.2.5 NextStepsAsanextstep,weplantofurther integratethedescribeddemowiththeWiSHFULframeworkandUPIs. Inparticular,we intendtoprovidethefunctionalityofconfiguringthesensor,SU-Tx,andSU-Rx’sbandwidthandcentre frequenciesremotely,usingthealreadymadeavailable Iris/GNURadio-WiSHFUL controller interface. Additionally, we plan to extend the WiSHFUL UPI to supportconfigurationfileexchangebetweenIris/GNURadionodes.ThisfunctionalityisrequiredsothattheexchangeoftheMarkovChainandlistofaction/commandscantakeplaceviatheWiSHFULUPI.

We also plan to improve the current intelligence capabilities of the sensor node and SU-Tx. In itscurrentstate,ourimplementationdoesnotsupportPUsthataltertheirpatterns/MCsovertime.Toovercomethislimitation,wewillincreasethenumberoffeaturesthesensorandSU-Txcanestimatefromthe radioenvironment,and implementahiddenMarkovmodel-based inferencealgorithmatthe SU-Tx that can detect the current pattern used by the PU-Tx. Finally,we plan to improve thesensor’s capabilities todiscriminatebetweenSU-TxandPU-Tx transmissions. This canbeachievedeitherthroughmatchedfilter,featuredetectionalgorithms,ormoreadvancedclassification/learningtechniques..

Page 49: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

49

5 ConclusionsThedesignandtheimplementationoftheintelligenceshowcases,consideredduringY2,allowedtovalidate the effectiveness of the approaches and tools envisioned for supporting intelligence inWiSHFUL, and topopulate theWiSHFUL intelligence repositorywithan initial setof components,availabletootherexperimentersforfacilitatingthedefinitionofnewintelligentcontrolprograms.

We consider two main contributions for other experimenters, in terms of components for datacollectionsandaggregation,whichallowtocollectbasicnetworkmeasurementsfromindependentnodesandbuildglobalnetworkviews,andintermsofcomponentsforestimatingtheconsequenceof adaptationactions onperformancemetrics. In turns, this secondgroupof components includedata-driven models and on-line learning engines, that have been designed and used for solvingspecific network problems, but can be potentially re-used in completely different contexts. Inparticular,wedeveloped:

- aWSNperformancemodel: this data-drivenmodel is devised toestimateperformanceofWSNs under different MAC protocols, as a function of node density and interferenceconditions;

- aWiFi performancemodel formulti-cell scenarios: this data-drivenmodel is devised toclassify interference conditions experienced in different cells as hard, soft or zerointerferenceandidentifyblockedcells;

- aMeta-MACengine,fordynamicallylearningaboutthebestmediumaccessdecisionamonga set of elementary protocol components, inWiFi fully-connected networks under varyingtrafficconditions;

- amarkov-chainbaseddecisionengine,forinferringabouttheprimaryuserchannelwithwillremain available for longer time intervals in cognitive networks, in case of predictablebehaviours.

These modules and the exemplary composition of these modules considered in Y2 showcasesprovideaninitialentryinthecatalogueoftheintelligenceutilitiesoftheWiSHFULframework.

Page 50: Wireless Software and Hardware platforms for Flexible and ...€¦ · experimenter for adapting radio and network settings, but rather implement advanced reasoning algorithms that

H2020-GANo.645274 D10.2

50

6 References

[1] PengW. et al. Cogmac+: A decentralized mac protocol for opportunistic spectrum access in cognitivewirelessnetworks.ElsevierJournalofComputerCommunications,2015.

[2] Jerry Z. et al. Understanding packet delivery performance in dense wireless sensor networks. InProceedings of the 1st international conference on Embedded networked sensor systems, pages 1–13.ACM,2003.

[3] Kulin,Merima,etal."TowardsacognitiveMAClayer:PredictingtheMAC-levelperformanceinDynamicWSNusingMachinelearning",(2016)arXiv:1612.03932

[4] Kulin,Merima, et al. "Data-Driven Design of IntelligentWireless Networks: AnOverview and Tutorial."Sensors16.6(2016):790.

[5] BartJooris,JanBauwens,PeterRuckebusch,PeterDeValck,ChristopheVanPraet,IngridMoerman,EliDePoorter, "TAISC: a cross-platformMAC protocol compiler and execution engine", Computer Networks,Volume107,Part2,9October2016

[6] PeterR.etal.Aunifiedradiocontrolarchitectureforprototypingadaptivewirelessprotocols.InNetworksandCommunications(EuCNC),2016EuropeanConferenceon,pages58–63.IEEE,2016.

[7] Eibe Frank,Mark A. Hall, and Ian H.Witten (2016). TheWEKAWorkbench. Online Appendix for "DataMining:PracticalMachineLearningToolsandTechniques",MorganKaufmann,FourthEdition,2016.

[8] http://www.cs.waikato.ac.nz/ml/weka/

[9] http://scikit-learn.org/stable/

[10] E. Khorov, A. Kiryanov, A. Krotov, P. Gallo, D. Garlisi, I. Tinnirello, “Joint Usage of Dynamic SensitivityControlandTimeDivisionMultipleAccessinDense802.11axNetworks”,MultipleAccessCommunicationsMACOM2016

[11] Caruana,R.andA.Niculescu-Mizil(2006).Anempiricalcomparisonofsupervisedlearningalgorithms.InProceedingsofthe23rdinternationalconferenceonMachinelearning,pp.161–168.ACM.

[12] Faragó,A.D.Myers,V.R.Syrotiuk,andG.Záruba,“Meta-MACprotocols:AutomaticcombinationofMACprotocols to optimize performance for unknown conditions,” IEEE Journal on Selected Areas inCommunications,vol.18,no.9,pp.1670–1681,September2000.

[13] Meta-MAC-https://github.com/wishful-project/examples/tree/master/wmp/wmp_metamac