Optimum resource allocation in optical wireless systems with energy-efficient fog and cloud architectures

Optical wireless communication (OWC) is a promising technology that can provide high data rates while supporting multiple users. The optical wireless (OW) physical layer has been researched extensively, however, less work was devoted to multiple access and how the OW front end is connected to the network. In this paper, an OWC system which employs a wavelength division multiple access (WDMA) scheme is studied, for the purpose of supporting multiple users. In addition, a cloud/fog architecture is proposed for the first time for OWC to provide processing capabilities. The cloud/fog-integrated architecture uses visible indoor light to create high data rate connections with potential mobile nodes. These OW nodes are further clustered and used as fog mini servers to provide processing services through the OW channel for other users. Additional fog-processing units are located in the room, the building, the campus and at the metro level. Further processing capabilities are provided by remote cloud sites. Two mixed-integer linear programming (MILP) models were proposed to numerically study networking and processing in OW systems. The first MILP model was developed and used to optimize resource allocation in the indoor OWC systems, in particular, the allocation of access points (APs) and wavelengths to users, while the second MILP model was developed to optimize the placement of processing tasks in the different fog and cloud nodes available. The optimization of tasks placement in the cloud/fog-integrated architecture was analysed using the MILP models. Multiple scenarios were considered where the mobile node locations were varied in the room and the amount of processing and data rate requested by each OW node was varied. The results help to identify the optimum colour and AP to use for communication for a given mobile node location and OWC system configuration, the optimum location to place processing and the impact of the network architecture. This article is part of the theme issue ‘Optical wireless communication’.

Optical wireless communication (OWC) is a promising technology that can provide high data rates while supporting multiple users. The optical wireless (OW) physical layer has been researched extensively, however, less work was devoted to multiple access and how the OW front end is connected to the network. In this paper, an OWC system which employs a wavelength division multiple access (WDMA) scheme is studied, for the purpose of supporting multiple users. In addition, a cloud/fog architecture is proposed for the first time for OWC to provide processing capabilities. The cloud/fog-integrated architecture uses visible indoor light to create high data rate connections with potential mobile nodes. These OW nodes are further clustered and used as fog mini servers to provide processing services through the OW channel for other users. Additional fog-processing units are located in the room, the building, the campus and at the metro level. Further processing capabilities are provided by remote cloud sites. Two mixedinteger linear programming (MILP) models were proposed to numerically study networking and processing in OW systems. The first MILP model was

Introduction
The increasing demand for high data rates and the increasing number of Internet-connected devices [1] will soon be beyond the capabilities of the current radio frequency spectrum. Meeting these demands requires access to new spectra that can provide high data rate connectivity. Moreover, new computing and networking architectures that support indoor fog computing resources in addition to cloud computing are needed to establish future-proof and energy-efficient networking and computing systems.
The optical spectrum is a potential solution that offers excellent indoor channel characteristics, abundant bandwidth, and can be accessed using relatively low-cost components [2][3][4][5][6][7][8][9]. Recently, many studies have shown that video, data and voice can be transmitted through optical wireless communication (OWC) systems at high data rates of up to 25 Gbps and beyond in indoor environments [8][9][10][11][12][13][14][15][16][17][18][19]. OWC multiplexing and multiple access (MA) techniques are a key requirement to support multiple users. Different configurations of transmitters and receivers, in terms of their number and directionality, have been shown to help in reducing the delay spread and increasing the signal-to-noise ratio [12,[20][21][22][23][24][25][26][27]. To avoid degradation of the signal quality due to multiple users, efficient utilization of resources is necessary. Multiplexing of OWC resources including space, time, power and wavelength resources has thus, recently, attracted the attention of researchers.
With the aim of reducing service latency and power consumption of cloud computing paradigms, recent research has focused on proposing new distributed architectures and solutions to offload the processing demands from central data centres. In this respect, distributed clouds (DC) are a new generation of cloud computing, where processing tasks are 'distributed' to mini data centre locations, known as fog data centres close to the end users, resulting in faster response and decreased networking burdens. However, for this paradigm to be efficient, their distributed applications require a fast communication medium. With data rates of up to 25 Gbps and beyond [6,7], OWC systems can satisfy the needs of these distributed applications and can be viewed as a promising medium for supporting such a paradigm with indoor computing resources.
This paper proposes an indoor multiple access OWC system to be used in conjunction with cloud/fog-integrated architecture. This system creates connections with potential mobile nodes and regards them as mini fog servers that can provide processing services. To the best of our knowledge, no previous work has proposed the integration of fog computing with OWC systems. In this work, we model and optimize the indoor optical wireless (OW) system through a mixed-integer linear programme (MILP) that optimizes the allocation of access points (APs) and wavelength resources to mobile nodes so that the sum signal to interference-plus-noise ratios (SINRs) is maximized. The APs, and wavelengths MILP-based assignment is then used to determine the achievable data rate of each mobile user. These values are then used to optimize 2. Literature review (a) Multiple access schemes in optical wireless communication MA schemes have been considered for application in OWC systems. Some of the MA schemes used in RF systems are also used in OWC systems. Well-known MA schemes in OWC systems include time division multiple access, frequency division multiple access (FDMA), code division multiple access, space division multiple access, non-orthogonal multiple access and wavelength division multiple access (WDMA).
In this work, WDMA is used for multiple access. WDMA can support multiple users based on wavelength division multiplexing (WDM). It has been studied in OWC systems [5,[28][29][30][31][32]. WDMA uses a multiplexer at the transmitter for aggregating different wavelengths from different light sources into a single OW beam. Thereafter, at the receiver, a de-multiplexer is used to separate the wavelengths, thus supporting MA. The operation of WDMA is similar to that of FDMA, with both operating in the frequency domain. The two light sources typically used in OWC systems (LEDs and LDs) were investigated in [31,32]. When using red, green and blue (RGB) LEDs (figure 1a), a data rate of more than 3.22 Gbps was achieved in [31] through WDMA implementation in a visible light communication (VLC) system. Moreover, another demonstration of a VLC system that used WDMA was reported in [32]. In addition, by using red, yellow, green and blue (RYGB) LDs (figure 1b), the researchers in [5] achieved a data rate of up to 10 Gbps.

(b) Fog computing and distributed processing
The vast expansion in the usage of cloud services, and the significant increase in distributed services, call for new architectures and solutions to provision those services at high data rates to the end user while reducing latency and power consumption. Distributed computing has become a popular solution that shifts the workload from the central cloud to the fog and, thus, closer to end users; hence, DC technology was developed to provide access to computational resources at the edge of the network, in close proximity to the end user, instead of accessing the central cloud. This has resulted in faster services and lower computing burdens, thereby minimizing central data centre power consumption, and reducing the overall power consumption and latency. Proposed and tested architectures that accommodate the concept and features of DC are referred to as 'cloudlets' [33], 'fog' [34] or 'edge computing' [35]. Processing at the edge nodes, and the networking fabric used to enable this, are considered to be major attributes of fog architectures.  These attributes play an important role in delivering a service with lower latency and power consumption.
The type of edge nodes affects the performance of the processing task and, therefore, the delivery of the requested services. Building small distributed data centres, using a smaller number of high-performance servers [36], has been proven to deliver good throughput with lower power consumption and latency. A newer approach aims to build a cluster of fog nodes out of underutilized computing resources in computer clusters [37]. This approach has led to a new definition of the type of fog nodes that can be used as processing nodes. With the huge expansion in the number of smart devices and IoT, fog can comprise any smart devices clustered as a single fog mini data centre to provide processing services. Such a paradigm is built from available idle or underutilized resources that become available opportunistically. This leads to new fog frameworks that can make use of IoT nodes [38,39], smartphones [40] and any other portable devices [41]. Recently, smartphones have become a very promising candidate as an edge processing unit. This is because of the recent rapid increase in their processing and communication capabilities. Many researches have proposed scenarios to evaluate and optimize task offloading in the mobile devices. An example of such efforts was presented by Miluzzo et al. [40] where a vision of mobile devices as a core for the cloudlet-distributed processing was proposed and evaluated. Another study proposed by Chen et al. [42] tackled the problem of the mobile devices energy consumption optimization during task offloading processes. The processing and communication problem is formulated as a cost optimization problem, considering the effect of delay on offloaded tasks. Same delay problems were tackled in [43], where processing and communication completion time for mobile applications were compared in situations where applications are allocated to mobile or central clouds.
The networking fabric also plays an important role in fog-based architectures. Fabrics with high data-rate communication enhance the connection between the end user and fog nodes, and thereby achieve improved service delivery. Communication technologies that can support fogbased computing can be found in [42]. Optical communication has been shown to satisfy the required data rate for distributed mini data centres [44]. Since most of the edge smart devices are equipped with wireless/cellular networking capabilities, these are the two main mediums currently supporting end user connections to opportunistic fog nodes. However, with the recent huge expansion of services and application demands, these mediums may not support the required data rates needed. This calls for more research into the application of high data-rate 3. Mixed-integer linear programming optimization for resource allocation in OW systems WDM can be used in both the uplink and downlink of OWC systems. In VLC systems, wavelengths in the visible light range can be optically summed to form the white light used in illumination and communication, as in [30] where four-colour (RYGB) LDs were used. In the uplink, to avoid the problem of glare, infrared uplink design was proposed in [45,46]. In this study, only the downlink will be considered. A controller, which can be located in the optical line terminal (OLT) in the room, is assumed to have knowledge of the user's location and hence their channel information using, for example, VLC localization, as in our work in [47]. This controller responds to the slow movement of people in the indoor environment and changes the resource allocation accordingly. We assumed a room with dimensions as shown in table 1, in which the parameters of the transmitter and receiver are also given. An angle diversity receiver (ADR) similar to [8] was used in this work. Three eight-users scenarios with fixed user locations were considered. The first scenario was chosen as the worst-case scenario in terms of SINR where the four wavelengths of the AP were assigned to four users. This results in the worst-case scenario as the green and blue wavelengths are used. These wavelengths have the lowest powers and this is reflected in terms of the lower overall supported data rates. The third scenario was chosen as the best possible scenario where each AP just serves one user. Here, the AP uses its best colour/wavelength, which is the red wavelength as this has the highest power. In the second scenario, users were distributed over the room where each AP just assigned the two best wavelengths to users (red and yellow), which is the middle scenario between scenarios 1 and 3. The channel was characterized using a simulation package similar to that in [49,50]. Up to the second reflections were considered in this work as higher-order reflections have no significant impact on the received power [49,50]. The channel impulse response was then used to calculate the delay spread and the optical channel bandwidth using the parameters in table 1.
The cumulative distribution function for the optical channel bandwidth composed using 128 locations in the room is shown in figure 2. It can be seen that around 80% of the locations in the room support a bandwidth of at least 5.5 GHz. This was achieved by using the ADR, thus, reducing the field of view (FOV) of the receiver to limit the number of input rays, which results in decreasing the delay spread and hence increasing the bandwidth.
A MILP model was developed to optimize WDM wavelength assignment to maximize the sum of SINRs for all users [47]. The precalculated values of the channel impulse response were used to calculate the optical power received at each potential location in the room from each AP using different wavelengths. The MILP model was then used to assign APs and wavelengths to users so that the sum of SINRs was maximized, based on optical channel information. Figure 3 illustrates a scenario with three users. Users 1 and 2 suffer from background light shot noise in addition to interference as they are assigned the red wavelength, while user 3 suffers only from background light shot noise as the green wavelength is not assigned to other users.
Before introducing the MILP model, we define the sets, parameters and variables used, and describe how the SINR is calculated optical power received by user u from an access point a using wavelength λ and branch f. This value was precalculated using a channel modelling tool, where the line of sight and first-order reflection components were calculated for the given access point and user location and for the given wavelengths on each branch; .  To calculate the SINR, different powers are calculated as follows: The electrical signal power received by user u from AP a and using wavelength λ on branch f is calculated as where R is the responsivity of the photodetector in (A/W), Pt a,λ u,f is the optical power transmitted by the AP a allocated to the user u using wavelength λ received through branch f and h a,λ u,f is the DC channel gain between AP a and user u for wavelength λ through branch f.
The preamplifier noise is given by where N pr is the preamplifier noise power density in (A 2 /Hz) and B e is the electrical bandwidth. The background light shot noise is calculated as where e is the electron charge and B o is the optical bandwidth, where the shot noise is attributed to unmodulated light sources, with the optical filter bandwidth set to 1 to avoid rejecting desired signals that share the same optical spectrum with the noise. The optimum electrical filter bandwidth for OOK was identified by Personick as 0.7 times the bit rate [51]. It should be noted that in our system thermal noise dominates. The receiver has a noise spectral density of 4.47 pA/ √ Hz and 5 GHz bandwidth, which results in: σ 2 pre = 0. order of lambertian pattern, walls, floor and ceiling 1 [48] .  SINR of user u, who is assigned wavelength λ of AP a, using branch f is, therefore, expressed as   where S a,λ u,f is a binary assignment variable that is equal to 1 if user u is assigned to AP a and wavelength λ and using branch f at the receiver. The first term in the denominator is the interference, which was calculated by summing the power received by user u from all APs where the same wavelength was used for communication, but assigned to other users, hence, causing interference. Furthermore, noise was calculated by summing two terms representing the receiver noise σ Rx (calculated using equation (3.2)), which is constant for all users with identical receivers and background light shot noise. The background light shot noise σ b,λ u,f is calculated using equation powers of modulated light beams of the same wavelength, while background light shot noise was calculated by summing the signal powers of unmodulated wavelengths.
The interference term was calculated as the sum of the squared electrical currents and not by squaring the sum of the received optical powers multiplied by the responsivity of the photodetector. This simplifies the MILP implementation by maintaining linearity inside the MILP, while the squaring is carried out outside the MILP (pre-calculated). The error due to this method of calculation can be reduced by using the Cauchy-Schwarz inequality and introducing a factor n for the number of interferers, which can be either 0, 1 or 2 due to the tightened receiver's FOV. In the first two cases, there will be no error in the calculations. The error is only encountered when there are two interfering APs. Shot noise due to the interfering signal power was also ignored as it is much smaller than the preamplifier thermal noise and the background illumination-induced shot noise [52]. The maximization of the sum of SINRs on a linear scale, rather than throughput, which is a function of SINR as B log 2 (1 + SINR), simplifies the model, however, the introduction of the log function can help achieve two objectives. Firstly, the throughput or date rate is a more familiar metric than SINR, secondly, the log function will discourage the allocation of very high or very low SINR to individual users thus offering a form of fairness. The addition of a log function to calculate the throughput and add fairness is planned for the future. Rewriting which can be rearranged as The first term containing the interference and background light shot noise from other APs is a nonlinear quadratic term involving the multiplication of a continuous variable by a binary variable. Linearization was performed following the same procedure in [53] as shown in equations (3.11)-(3.14) below.
The MILP model is defined as follows.
Objective: Maximize the sum of SINRs for all users, Subject to Constraint (3.8) ensures that a wavelength belonging to an AP is only allocated once, so, for all wavelengths and all APs, the assignment variables sum (over all users) to 0 if the resource is not allocated or 1 at maximum if the resource is allocated.
and Constraints (3.9) and (3.10) ensure that a user is assigned one wavelength. So, for all users, the sum of the assignment variable over all APs, wavelengths and branches is 1 (note that the result of using ≥ and ≤ in the two equations forces equality). These two constraints also ensure selection combining (SC) is used for the ADR receiver, i.e. only a single receiver branch is used per each user.
The following constraints (3.11)-(3.14) were used to linearize the multiplication process of the continuous variable by the binary variable in the quadratic term, where the non-negative where β is a large number, so that β γ . (3.14) Using this linearization variable to replace the quadratic term, equation (3.6) can be rewritten as In order to support a BER of 10 −9 using OOK modulation (our chosen modulation format here), the SINR should not go below 15.6 dB. The same performance (BER of 10 −9 ) can, however, be achieved with a lower SINR using forward error correction techniques at the expense of an increased data rate overhead 1 . Here, 10% overhead is assumed (worst case) when SINR decreases to 12 dB. This is added as a constraint γ a,λ u,f ≥ 10 12/10 ∀u ∈ U, ∀a ∈ A, ∀λ ∈ W, ∀f ∈ B. (3.16) The MILP model was solved using the CPLEX solver over the University of Leeds highperformance computer (Polaris) using 16 nodes (256 cores) with 16 GByte of RAM per core. Each node comprises two eight-cores of the Intel 2.6 GHz Sandy Bridge E5-2670 processors. CPLEX 12.5.0.0 was used with around 194 mixed-integer programming (MIP) simplex iterations for the first scenario, while 159 MIP simplex iterations were used for the second scenario and 92 MIP simplex iterations were used for the third scenario. The computational requirements thus changed for different scenarios. This is an NP hard problem. After the assignment of APs and wavelengths was optimized using the MILP model, the optical channel bandwidth, the SINR and achievable data rates were calculated for each user and scenario (table 2) in this study, and they are shown in figures 4-6.
It should be noted that the supported data rate can be limited by one of three factors: the modulation bandwidth of the light source, the optical channel bandwidth or the receiver bandwidth. Since LDs were used in this study, they do not limit the data rate as they can support modulation rates at GHz rates beyond those in our study [49]. To address the second limiting factor, the use of ADR improves the optical channel bandwidth as it limits the number of incident rays from different reflecting elements, hence, the delay spread is reduced and the channel bandwidth increases. From equation (3.2), it can be seen that the receiver bandwidth can be used to control the amount of shot noise attributed to light sources as reducing the optical bandwidth will affect the signal too as it shares the same optical spectrum as the noise. Also, from equation (3.3), the preamplifier noise can be reduced by reducing the receiver bandwidth. Reducing the electrical filter bandwidth will, however, lead to increased ISI. The optimum bandwidth of the electrical filter, for OOK, was identified as 0.7 times the bit rate [51]. The SINR is also affected by interference, which increases when the number of users sharing the same wavelength increases in WDM as well as when the amount of overlap between the coverage area of different APs increases. Since VLC is used, the same shade of white light generated using RYGB LDs by the authors of [30] is assumed in this study, i.e. only four wavelengths are assumed; and VLC requires large coverage area per AP to meet the illumination standards. A combiner is used to combine the four laser beams then a hologram/diffuser is used in front of the LDs to spread the radiation angle of the LD and destroy its spatial coherence. This allows the tailoring of the radiation pattern and achieves a wide half-power semi-angle [30,49]. Thus each AP had a half-power semi-angle of 60°in our system. The VLC system performance can however be improved by optimizing the allocation of APs and wavelength resources to minimize interference so that the overall sum SINR is maximized. Three realizations (scenarios) are selected (where users' coordinates are clustered under an AP or spread over the room) for which the optimization was performed based on the best detector of the ADR for each user location. Statistical distribution of users will be treated in future work using stochastic optimization.
After optimizing the allocation of each user to an AP and a wavelength (table 2), the optical bandwidth, the SINR and data rates, were calculated based on selecting the best detector of the ADR for each user location and shown in figures 4-6, respectively.
The channel bandwidth is calculated from the channel impulse response for each combination of transmitter and receiver location and this shows a minimum bandwidth of around 4.5 GHz and a maximum bandwidth of 8.7 GHz for the users in the three scenarios (based on tables 1 and 2). This calculation is independent of the colour used. The SINR was calculated based on the results of the optimized allocation of an AP and a wavelength to each user using the best receiver branch, where the noise and the interference are calculated based on the resources allocated (as shown in figure 3). The results show a minimum SINR of around 12 dB for the users in the three scenarios where the use of the receiver in table 1 is assumed. The calculated values of data rates for different users are used in the next section where a MILP model is developed to optimize the placement of the processing in the integrated cloud/fog with OWC system to minimize the overall power consumption.

Optimum placement of processing to minimize power consumption
The proposed integrated cloud/fog architecture is shown in figure 7, which builds on our work in the optimization of distributed data centres [54][55][56][57], network architecture optimization [58][59][60][61][62] and energy-efficient routing [63][64][65][66][67]. It consists of one or more OW mobile users in a room clustered as a mobile fog unit (MobFog). Each mobile device communicates with one or more light units (APs) and is assigned to one of the channel wavelengths, red, yellow, green or blue (RYGB). All APs are connected to a passive optical network, where each AP is also connected to an optical network unit (ONU). All ONUs are connected to a central OLT located in the same room. The room is also equipped with a commodity server (low-end computer), which acts as a mini fog node (RoomFog). This node is connected to the central OLT through an ONU and an optical link. The proposed architecture introduces three more fog data centres located in the building (BuildFog), campus (CampFog) and metro network layer (MetroFog). This architecture is integrated with the central cloud data centre (CCloud) through an optical infrastructure to support high demand requests that cannot be fulfilled by mobile units or fog nodes.
The OLT acts as a controller unit [68] that collects processing requests from mobile units present in the same room. These requests can be generated from applications in the mobile units. the data (for example, (i) the presence or absence or someone in a transmitted video sequence; or (ii) whether a person is fine or not after transmitting a large heart rate signal) is always smaller than the transmitted data [69][70][71]. The OLT also assigns in an optimal way (MILP in this section) the collected requests to the Central Cloud or any fog node to be processed. When the OLT decides that a task / demand is to be processed by the MobFog, it allocates this task to the participants' mobiles through VLC communication and then forwards the processing results back to the OLT. If the OLT decides to assign the demand to the RoomFog, BuildFog or CampFog nodes, the demand will be sent through a local Ethernet LAN to the required location. For the MetroFog and CCloud assignment, demands traverse through the optical infrastructure to either location. The tasks allocation was optimized using a MILP model to minimize the power consumption of the overall architecture while considering different OW data rates depending on the scenario. Below are the notation of the parameters and the variables used in this optimization model. In this MILP model, the sets are defined as follows: .   The objective equation consists of two terms: the power consumed by processors due to computation and the power consumed by transmitting traffic through the network. Note that in our network topology, in figure 7, there is a single route between the OW mobile units and each processing node option (CCloud, MetroFog, CampFog, BuildFog, RoomFog or other mobile units in the MobFog).
The power consumption of this route is given by one value as explained in equation (4.3). Therefore, the second term in equation (4.1) is summed over processing nodes (as there is a single network path to each processing node in our case).
The processing power consumption, P n is given as where X kn is the workload demanded by task k, in million instructions per second (MIPS), assigned to processing node n. E n is the energy in watts per MIPS of the node processor, calculated using the maximum processing capacity of the node. The networking power consumption, P n is given as where δ kn is a binary variable which specifies the allocation of task k to processing node n, and F ks is the task data rate demand (in Mbps) generated from source node s. Ψ n is the total power per Mbps of all nodes between the source and the assigned processing node (in Watts per Mbps and X kn ≤ αδ kn ∀k ∈ K, n ∈ PN, (4.5) Constraints (4.4) and (4.5) ensure that task k is assigned to processing node n.
Constraint (4.6) ensures that each task k will be assigned to one processing node. Processing node capacity constraint Constraint (4.7) ensures that each task k assigned to a processing node n does not exceed the processing capacity of this processing node.
Link capacity constraint Constraint (4.8) ensures that the traffic of task k sent from source s to processing node d does not exceed the capacity of the link between any two nodes i and j.
Flow conservation constraint Constraint (4.9) ensures that the total incoming traffic is equal to the total outgoing traffic for all nodes except for the source and destination nodes.
(4.10) Constraint (4.10) ensures that the traffic from source node s to destination node d is equal to the data rate of task k generated from source s. δ kd is a binary variable used to ensure that task k is assigned to destination d.
The main outputs of the MILP model in this section are the values of the δ kd decision variable. Therefore, this is an optimal placement and routing problem and solution. Based on the value of δ kd , the networking and processing power consumption splits can be determined.
The flow process of any generated request follows six phases. Firstly, a request is generated by a mobile unit and sent to the OLT, which has full knowledge of the available resources. Secondly, the OLT sends a positive acknowledgement to the source node. These two phases are not considered in the model as they generate negligible traffic. Thirdly, the data to be processed are sent in an uplink from the mobile source node to the OLT through the OW channel. This phase is also not considered in the model as it is a common phase for all requests and will not affect the placement decision. Fourthly, the data to be processed are offloaded from the OLT to one of the available processing nodes (MobFog, RoomFog, CampFog, BuildFog, MetroFog or CCloud). As this phase carries the main data, this will affect the power consumption and the placement decision. Therefore, it is treated as the main component of the model. Note that processing the task locally in the mobile unit that has requested this service is not an option for the assumed scenarios. In the last two phases, the extracted knowledge resulting from the processed data is   sent back from the processing node to the OLT, and so to the source mobile unit that requested the service. As we assume that the extracted knowledge has a small volume compared with the main data, the last two phases are not considered in the optimization model. In order to highlight the effect of the new integration between fog processing and OW communication, the task allocation optimization model has been evaluated here using an ideal scenario with eight mobile units located in the room. Each mobile unit is connected to a single light unit (AP) through one of the wavelengths (RYGB). Note that the sum of the OWC link capacities is restricted by the maximum capacity of the ONU connected to the AP, which is equal to 10 Gbps. This ideal scenario is compared at the end with the three scenarios resulting from the resource allocation model in §3.
We have evaluated the power consumption in the above-mentioned scenarios for an architecture composed of different fog servers in each layer. Based on the servers considered, the processing energy of the CCloud server is 82% more efficient than that of a mobile processor, followed by MetroFog, CampFog, BuildFog and then the RoomFog server, which has just 32% of the processing energy efficiency of a mobile processor. On the other hand, because of the location of the CCloud and other fogs, the networking power consumption when traffic is sent to the RoomFog, is 98% lower than with the CCloud. This is because the RoomFog server is only one hop away from the OLT controller, from which the tasks are offloaded. This networking energy increases by 1-3 mW Mbps −1 when the tasks are offloaded to the MobFog, based on the wavelength assigned to each mobile unit. Table 3 summarizes the capacity, power consumption and energy efficiency values of the processing nodes and the energy efficiency values of each route leading to each node, while table 4 provides the maximum capacity, power consumption and efficiency values for each individual networking device. The energy efficiency of a processing/networking node is calculated as explained in equation (4.11). Note that there is a single server in each of the five cloud and fogprocessing locations in table 3. Therefore, the values of the networking energy efficiencies for different routes are defined there for each processing location. The energy efficiency in Joules per bit for a path is the sum of all networking devices energy efficiency values between the controller and the processing node (excluding the OLT energy efficiency value as it is common to all routes). node energy efficiency = maximum power consumption maximum capacity . (4.11) The MILP model was evaluated to show the effects of the proposed architecture on the power consumption. We also studied the effects of different OW wavelengths on the processing utilization of the mobile units assigned. In this evaluation, 50 tasks were considered, with workload processing demands ranging between 100 and 1500 MIPS. In equation  introduce the relation between the workload demand and the data rate demand for each requested task as a ratio, termed the 'data rate ratio' (DRR). Different DRR values were defined in the model, varying between 0.002 and 0.6 to consider different scenarios with low and high data rates.
data rate demand = DRR × workload demand. (4.12) The goal is to examine the impact of increase in the demand values interpreted in terms of increase in the processing workload and data rate. We assumed that the data rate of any task increases with increase in the processing workload. Therefore, we introduced the DRR parameter to capture different ratios between these two values (processing workload and data rate) and to cover a wide range of demand values. The following are the values considered for DRR: 0.002, 0.02, 0.04, 0.06, 0.2, 0.4 and 0.6. As examples of the type of applications represented by these DRR values, a DRR value of 0.002 represents a task that is intensive in processing and light in communication, for example sensing simple data and then processing it intensively. At the other extreme DRR = 0.6 may represent video gaming that is intensive in communication and processing. Other applications may include processing video, images or large sensor files.
The results are first presented for the ideal scenario, in which each mobile unit is connected to a single light unit with full, 10-Gbps data rate capacity through one of the wavelengths (RYGB). Then results are given for scenarios 1, 2 and 3, in which the eight users are assigned different wavelengths with varied data rates, based on their location. The different data rate values for each user in both of these scenarios are extracted from those given in figure 6.
The results in figure 8 show the processing power consumption, the networking power consumption and the overall power consumption versus the processing workload per demand for different DRR values.
The processing power consumption shown in figure 8a indicates that at low DRR, the data rate is minimal and the networking power consumption becomes negligible. Hence, the location with the best processing energy efficiency is selected consumption, start to become exhausted and the workload is consequently offloaded to other processing locations. It is also worth mentioning that in the case of DRR = 0.04, the RoomFog becomes more efficient in processing the workload, followed by BuildFog and then MetroFog. At DRR = 0.06, however, the MobFog performs better in terms of energy efficiency than MetroFog due to its efficient networking energy. At higher DRRs, the processing power consumption of the MobFog increases (between 100 and 800 MIPS with DRR = 0.2, 0.4 and 0.6). The increase varies according to the different workload demands assigned. For instance, with 300 MIPS, each mobile node can process five tasks with a total possible allocation of 1500 MIPS assigned to the mobile unit. This causes an increase in the processing power consumption, as the mobile units are the least efficient processors.
On the other hand, with 400 MIPS demand, three tasks assigned to each mobile unit have a total of 1200 MIPS allocation, which causes a reduced processing power consumption compared with the 300 MIPS case. These variable allocations are due to the limited capacity of the mobile unit and the single allocation constraint. Also, at the highest two DRR values, 0.4 and 0.6, the BuildFog and CampFog communication links become the bottleneck. Thus, processing is placed further out in the MetroFog, which reduces processing power consumption. Figure 8b reveals the higher impact of the networking power consumption with increase in the workload demands at high DRR values. This affects the total power consumption as seen in figure 8c, which becomes highly related to the networking power consumption. Figure 8b shows that as DRR increases, i.e. as the communication data rate increases, the networking power consumption increases. At low DRR (0.002 and 0.02), the networking power consumption values are comparable and increase linearly with a very low power consumption. This is because the networking power consumption for such low rates becomes negligible with a minimum effect on the allocation decision. Consequently, the workload demands in these two cases are placed in one location (the location with the best processing efficiency).
At DRR = 0.04 and 0.06, the placement decision remains affected by the processing power consumption. This results in a small increase at DRR = 0.04 compared with that at 0.06 because the workload is offloaded to a further location (MetroFog) at 0.04 while at 0.06 it is offloaded to a more networking-efficient location (CampFog). A meaningful increase is shown at higher data rates, with DRR = 0.2, 0.4 and 0.6. This power increases more significantly after a certain point (750 MIPS), when the mobile unit processor cannot process more than one task due to its limited capacity (1500 MIPS). In this case, more demands are offloaded to the CampFog, which increases the networking power consumption. It is notable that at DRR = 0.2, the power consumption has a slow increase as the tasks are assigned to the most efficient destination in terms of networking power consumption. By contrast, the power consumption increases more at DRR = 0.4 and 0.6. The first reason for this is the limitation of the network links of BuildFog and CampFog, which cannot support very high traffic (in excess of 10 Gbps). Consequently, more tasks are offloaded to locations with lower networking energy efficiency. The second reason is the limited processing capacity of the mobile, which results in the offloading of more demands further out. Figure 9 shows the overall workload allocation for each processing location in relation to the networking power consumption for the case of DRR = 0.6. For the assigned workload, the figure shows where demands are placed for each given data rate and how this affects the networking power consumption of this placement. Starting from low data rate demands, demands are assigned to the most efficient location in term of total power consumption (RoomFog followed by MobFog, BuildFog, CampFog and then MetroFog). Note that CCloud is not assigned any workload to satisfy the demand caused by any closed fog locations. Also, the networking power consumption for low data rate demands is very low due to the demands placed at RoomFog and MobFog. This power consumption is dominated by other fogs which are less efficient networking locations; thus, the networking power consumption becomes significant. More details about the networking power consumption splits for each DRR are shown in figure 10.
As mentioned above, this ideal scenario considers a constant data rate wavelength assigned to each mobile unit. For scenarios 1, 2 and 3, the data rate is limited based on the user location and number of users accessing the same AP, as explained (in the previous section) and summarized in table 5. Figure 11 shows the processing, networking and total power consumption for these three scenarios, compared with the ideal scenario and with a baseline scenario where processing is always carried out at the central cloud. The conventional (baseline) case consumes the highest power as all demands are placed at the central cloud and therefore consume the highest networking power consumption, which affects the total power. The other three scenarios (    CC-Proc CC-Net CC_Total Ideal-Proc Ideal-Net Ideal-Total S1-Proc S1-Net S1-Total S2-Proc S2-Net S2-Total S3-Proc S3-Net S3-Total Figure 11. Processing power consumption, networking power consumption and total power consumption, for conventional cloud scenario (CC), ideal scenario (ideal), scenario 1 (S1), scenario 2 (S2) and scenario 3 (S3) with DRR = 0.6. (Online version in colour.) allocation and therefore the consumed power are not affected by the different assigned channel data rates if these channels satisfy the networking demand and the mobile units satisfy the workload demand. However, compared with the central cloud scenario, scenarios 1, 2 and 3 save power by an average of 79% compared with the central cloud allocation. Figure 12 shows the mobile units processing utilization based on the assigned wavelength for the four scenarios (ideal, 1, 2 and 3). In scenario 1, each user is assigned a channel with data rate capacity ranging from 2.25 to 2.50 Gbps, while users are assigned channels equal to 2.50 Gbps in scenario 2 and 3. Based on the new capacity values for each link, the wavelength power efficiency is affected as explained in table 5. Figure 12a shows that, in the ideal scenario, the mobile unit utilization is equal to zero at the lowest data rate demands as all the workload demands are assigned to the RoomFog. At 120 Mbps, the processors of mobile units assigned to blue and green wavelengths are occupied first as these have the lowest wavelength energy requirements (table 3). At 180 Mbps, mobile units assigned blue, green and yellow wavelengths achieved their full utilization, followed by mobile units assigned to the red wavelength, which has the highest energy usage. At 240 Mbps, all mobile units achieved only 80% utilization due to bin packing and single allocation considerations. For instance, based on the DRR value (0.6), the workload demand at 240 Mbps is equal to 400 MIPS for all 50 tasks. With a mobile processor capacity equal to 1500 MIPS, each mobile unit can serve three tasks with a maximum allocation of 1200 MIPS per unit. However, full utilization is achieved at 300 Mbps as three tasks are assigned to each mobile unit with a total allocation that is equal to the mobile processing capacity. At 360 Mbps, the utilization decreased to 80%, due to the same bin packing and single allocation considerations. This utilization increases to 93% at 420 Mbps as the demand workload is equal to 700 MIPS so each mobile unit is assigned two tasks with a total allocation of 1400 MIPS per unit. A significant utilization drop occurs afterwards, at 480 Mbps, as the workload per demand increases to 800 MIPS. This is due to the limited processing capability of the mobile unit, which cannot serve more than one task, causing the mobile processor to achieve only 53% utilization. The constant increase in the workload demand causes a constant increase  in the mobile unit utilization, which ranges between 60% (at 540 Mbps), and 100% (at the highest considered workload demand, 1500 MIPS). The task allocation behaviour with the increase in demands in the other three scenarios in figure 12b-d follows the same behaviours described in figure 12a taking into account the fact that the varied link capacity and updated wavelength efficiencies affect the task allocation decision. For example, in scenario 1 in figure 12b, the power efficiency of the green wavelength has the best values, followed by blue, yellow, and finally red wavelength. This is reflected in the assignment decision and therefore giving the mobile units allocated a green wavelength priority when it comes to the processing allocation. The same observation is seen in scenario 2, where processing is allocated first to the yellow wavelength followed by the red wavelength. It is worth mentioning that no mobile units were allocated blue or green wavelengths in scenario 2, and all mobile units in scenario 3 were allocated the red wavelength. This explains the zero utilization for these wavelengths, in figure 12c,d.

Conclusion and future work
In this paper, an OWC system was used to support multiple users. A WDMA scheme was used to support multiple users served simultaneously by the OWC system. A MILP model was developed and used to optimize resource allocation and was shown to increase the system throughput and allow MA. Thereafter, a cloud/fog-integrated architecture was built to create a connection with potential mobile nodes and to provide processing services for these mobile nodes. The mobile OW nodes were also clustered as fog mini servers and were thus also able to provide processing services to each other. A second MILP model was proposed to optimize the processing placement by minimizing the total power consumption. Future areas of work can include (i) consideration of the uplink as the current work only considered the downlink; (ii) consideration of additional wavelengths for multi-user support enabled through infrared and WDM for example. In the current system, MA using WDM was limited by the four wavelengths available in VLC; (iii) consideration of additional MA dimensions beyond wavelengths. These can include TDM, OFDMA, orthogonal coding, spatial diversity and beam steering, which can reduce interference between users; (iv) consideration and minimization of latency in addition to the minimization of power consumption when allocating resources and placing processing jobs; (v) development of heuristics building on the MILPs insights to enable real-time resource allocation and task placement; and (vi) additionally, as this is a new integration between OW and fog computing, more work is needed to address virtualization, the software matching problem (where only a subset of the processing nodes have the relevant software for task placement), handover and quality of provided services. Also, more opportunistic scenarios need to be evaluated with other forms of fog computing.