1 Introduction

Smart cities constitute a new paradigm in managing the ever-increasing urbanization challenges using information and communication-based technologies to promote sustainable development and people’s life through smart and intelligent technological solution. Nonetheless, smart city applications such as smart homes, smart hospitals, smart transport, smart education, and smart agriculture generate a significantly large amount of data, which needs to be processed and transmitted [1]. This imposes strong requirements for robust network deployment capable of intelligently supporting large bandwidths with a low energy consumption and minimal delays, while achieving high service reliability [5]. Therefore, the rapid and efficient scalability of network capacity is crucial, given the time-sensitive nature of these systems [2,3,4].

Optical networks are a viable solution for achieving high scalability in managing the massive capacity demands in smart cities, while easily incorporating the changes in applications and offering seamless connectivity to the end user [6]. Optical networks have been extensively studied in literature, including various configurations and protocols[7]. Wavelength Division Multiplexing (WDM) optical networks are designed for high data rates [8]. Extensive research has been devoted toward further exploring WDM networks. For example, in [9], a phase modulator scheme for the remodulation of upstream data in a bidirectional WDM-Passive Optical Network (PON) system was studied. Simulation results of two data formats, RZ (return to zero) and NRZ (non-return to zero), for different optical fiber lengths have been reported. The multiplexing of time with wavelength was adopted as a benchmark development to further enhance the optical network capacity. Moreover, Time Division Multiplexing (TDM)-WDM-PONs [10] were considered as the next-generation Fiber Access (FTTx) Technology [11], providing an upgrade path for the current Gigabit Passive Optical Networks (GPONs) for ultra-broadband services [12]. In [13], key technologies for PON based on Time Wavelength Division Multiplexing (TWDM) were analyzed, along with techniques to improve the power budget and bandwidth capacity. Furthermore, [14] explains different possible solutions for next-generation access networks and discusses the major technical challenges associated with implementing TWDM networks. Many bandwidth allocation algorithms have also been developed. For example, in [15], a novel algorithm to allocate wavelength and bandwidth was proposed; it could minimize the number of active wavelength channels considering the high burntness and delay requirements of fronthaul data transmission. Reference [16] demonstrates the design of a sleep-aware Dynamic Wavelength and Bandwidth Allocation (DWBA) scheme for TWDM-PON under the Chain Secure Mode (CSM) mode. The main feature of this scheme is that it allocates bandwidth only to active Optical Network Units (ONUs), which minimizes the loss of bandwidth at the ONU end. Further development in this area involved designing energy-efficient optical networks. The design of energy-efficient, flexible hybrid WDM-TDM-based optical networks was discussed in [17]. Analyses showed that the designed system performance was improved in terms of the traffic loads supported by the system. All these optical networks were static in nature and cannot be reconfigured.

However, the ever-increasing expectations of end users and technological breakthrough are forcing demands for networks with increasing complexity and pressure. This is driving the current research focus toward making the available optical networks dynamically reconfigurable. The authors in [18] theoretically developed a routing power model for optical networks and numerically simulated the impact of dynamic traffic on the wavelength-routing capability of Reconfigurable Optical Add/Drop Multiplexers (ROADMs). Furthermore, the authors in [19] designed ROADM-based Dense Wavelength-Division Multiplexing (DWDM) optical networks and analyzed the system performance in terms of the Bit Error Rate (BER), Optical Signal to Noise Ratio (OSNR), and Q-Factor. The quality of these networks is commensurate with that of the controlling hardware.

Research suggests that automated networks are an alternative solution capable of managing the increasing network pressure and complexity. Software-defined networking (SDN) is the most preferable technique used for the design of dynamic optical networks, as it decouples the hardware and software parts of the network [20]. SDN provides the flexibility to introduce innovative and differentiated new services quickly, with previously unimagined constraints; it also affords a holistic view of the network. SDN centrally controls the entire network and enables network designers to obtain a global view of the entire network, thereby facilitating the programming of these networks from a remote console. This makes the network significantly more flexible and renders the structure of data plane devices simpler and easier to manufacture, which, in turn, leads to low-cost solutions. Therefore, in [21], an SDN-ROADM-based DWDM optical network was designed, in which an OpenFlow switch was used as the control part for ideal optical switches in the banyan architecture switch of ROADM. Results revealed that the received signal of the DWDM network indicated better performance in terms of the BER and Q-Factor, compared to those of other optical networks. In [22], the performance of different types of algorithms operating in the control plane of three varied architectures (physically distributed, logically distributed, and physically centralized) was compared. The designed system was analyzed in terms of its latency, and the corresponding results were supported by valid mathematical analyses. Numerous algorithms of Software Defined Optical Networks (SDONs) have also been developed. For example, in [23], a multidimensional resource allocation algorithm for a software-defined TWDM/OFDMA-based PON access network was developed, which successfully increased the network throughput and the user satisfaction rate by 30% during peak traffic hours, in comparison with that under fixed allocation. However, using optical networks in smart cities is a challenging task, owing to its energy consumption, operational expenditure, communication latency between different users, and reliability of service, among other factors. Despite these challenges, researchers have attempted to implement WDM-PON networks in smart cities. For instance, [24] proposed the design of a ring-based latency-aware and energy-efficient hybrid WDM TDM-PON for smart cities, in which Optical Distribution Networks (ODNs) featured the capability of interconnection. The proposed WDM TDM-PON efficiently reduced the transmission latency, operational expenditure, and energy consumption by establishing an interconnection with the ODN and avoiding the transmission through the Optical Line Terminal (OLT) in each iteration. Likewise, in [25], a smart hospital network architecture using a hybrid next-generation optical network for smart cities was designed, based on visible light communication. Using this, an information rate of 2.5 Gbps per channel was achieved for serving 53 users under hospital scenarios. This system serves as a novel solution for connecting medicine and patients through wired and wireless channels in hospitals.

However, these network architectures cannot be scaled for smart cities, as they fail to allocate/reroute network resources as per the requirements of the users in the smart cities. Static optical networks use the entire available bandwidth allocated to primary applications, which, in turn, leaves no scope for secondary applications. Furthermore, this bandwidth is under-utilized by many primary applications. Therefore, a communication framework using optical networks and algorithms for the efficient utilization of network resources and routing of traffic accordingly is required to manage smart city data and maintain good quality of service. This requirement can be fulfilled by using broader-view Optical Networks that include a combination of intelligence, software control, automation, and a programmable infrastructure through SDN, as SDN can programmatically (re)configure and dynamically optimize the use of network resources as per requirements.

In this regard, we propose a novel SDN-controlled dynamically reconfigurable TDM-DWDM-based optical network for smart cities. The proposed SDN controller can constantly perform self-configuration and self-optimization by assessing network traffic demands. It can also adapt to the current bandwidth requirements of smart cities and features better future compatibility. Moreover, we propose an optical network model for four primary applications (smart education, smart home, smart transport, and smart health) and four secondary applications (smart agriculture, smart water management, smart grids, and smart waste management) using practical data. The feasible data rates of smart city applications reported in literature were employed. To manage smart city traffic, we combined the designed network with an SDN controller. Furthermore, to enhance the SDN intelligence, we developed three novel bandwidth management algorithms that could efficiently utilize the network resources for centrally controlling and routing the traffic depending upon the conditions. These proposed algorithms utilize the available free bandwidth slots of the primary applications to transmit data of the secondary applications, thus making the network more energy efficient. The main contributions of this study can be summarized as follows:

  • A robust optical network model is designed for the optimization of the combined benefits of TDM with DWDM, for smart cities consisting of four primary and four secondary applications.

  • To dynamically reconfigure the proposed optical network through SDN, we designed three novel algorithms that efficiently utilize network resources and route the smart city traffic accordingly, rendering the entire network as an SDN-based optical network.

  • The first designed algorithm is a wavelength redirection algorithm that transmits the data of secondary application over the primary application wavelength.

  • The next designed algorithm is a novel dynamic load balancing (DLB) algorithm for SDN to detect the availability of the free primary application bandwidth.

  • To further improve the bandwidth satisfaction rate, a bandwidth selection with resource allocation (BSRA) algorithm is designed for SDN that specifically divides the bandwidth requirement of the secondary applications and transmits it over the available primary slots.

The work done in this study is expected to serve as a reference for other aspiring smart cities. The rest of paper is organized as follows; Sect. 2 explains the designing of the proposed smart city network architecture. Section 3 describes in detail the proposed IAWR algorithm through ROADM. In Sect. 4, two joint bandwidth allocation algorithms are proposed and discussed in detail with their corresponding network architecture and results. Overall network performance through simulation results is shown in Sect. 5 and conclusion is given in Sect. 6.

2 Proposed smart city network architecture and design

We developed a novel SDN-controlled, dynamically reconfigurable TDM-DWDM-based optical network for smart cities, as illustrated in Fig. 1. The smart city system model consists of core infrastructure elements segregated as primary applications (i.e., smart home, smart hospital, smart education, and smart transport) and secondary applications (smart agriculture, smart waste, smart grids, and smart water). This proposed model exploits the under-utilized bandwidth of the primary applications in an opportunistic manner for the secondary applications, which is the core idea driving the development of this optical network. This smart city architecture converges wireless and optical communication for network design, where the optical network is the backbone structure in smart cities. Data from different applications are collected using sensors through the wireless channel and then transmitted through the optical channel.

Fig. 1
figure 1

SDN-controlled TDM-DWDM-based smart city system model

Four sectors, A, B, C, and D, are considered for each smart city application, according to their geographical areas. Further, the data from N applications in a sector are collected through the wireless channel and stored at a cloud server, represented by the dotted line in Fig. 2.

Fig. 2
figure 2

Smart city primary applications

The TDM technique multiplexes the data of each sector from the cloud server to utilize the bandwidth efficiently. Four DWDM wavelengths of 1550, 1550.8, 1551.6, and 1552.4 nm, with a 0.8-nm channel spacing, are used to transmit the data of primary applications, indicated with colored solid lines in Fig. 3. These four wavelengths are also shared by the secondary applications, based on the primary bandwidth availability. A continuous-wave (CW) laser featuring an optical power of 10 dBm is used as the optical transmitter, with a 10 MHz linewidth. An amplitude modulator with a modulation index of 1 is used to multiplex the smart city data with the CW laser. The optical fiber of length of 10 Km is used with EDFA gain of 5 dB loss coefficient of 0.25 dB/Km. In this smart city model, we considered the practical data rates for each primary and secondary application, as obtained from different available resources [26,27,28], to realize a more realistic model. Next, weekly average traffic for all the primary and secondary applications is calculated. The whole system is than analyzed for each designed SDN-controlled algorithms.

Fig. 3
figure 3

Smart city secondary applications

Four sectors, A, B, C, and D, are considered for each smart city application, according to their geographical areas. Further, the data from N applications in a sector are collected through the wireless channel and stored at a cloud server, represented by the dotted line in Fig. 1. The TDM technique multiplexes the data of each sector from the cloud server to utilize the bandwidth efficiently. Four DWDM wavelengths of 1550, 1550.8, 1551.6, and 1552.4 nm, with a 0.8-nm channel spacing, are used to transmit the data of primary applications, indicated with colored solid lines in Fig. 1. These four wavelengths are also shared by the secondary applications, based on the primary bandwidth availability. A continuous-wave (CW) laser featuring an optical power of 10 dBm is used as the optical transmitter, with a 10 MHz linewidth. An amplitude modulator with a modulation index of 1 is used to multiplex the smart city data with the CW laser. The optical fiber of length of 10 Km is used with EDFA gain of 5dB loss coefficient of 0.25 dB/Km. In this smart city model, we considered the practical data rates for each primary and secondary application, as obtained from different available resources [26,27,28], to realize a more realistic model. Next, weekly average traffic for all the primary and secondary applications is calculated. The whole system is than analyzed for each designed SDN-controlled algorithms.

Fig. 4
figure 4

Average traffic of primary applications in smart cities

The graphs show the data rates/bandwidth requirements of each application at every time slot. Figures 4 and 5 show the average data rates of the primary and secondary applications for a 24-h period. The traffic graph of primary applications in Fig. 4 shows that the bandwidth is under-utilized and could be used to transmit the secondary application data. For this, we designed the architecture of the SDN controller to efficiently manage the network resources among all the smart city applications and to improve its energy efficiency.

Fig. 5
figure 5

Average traffic of secondary applications in smart cities

To this end, three novel algorithms for the SDN controller architecture are developed. The algorithms are capable of sensing the under-utilized bandwidth of primary applications and allocating it to secondary applications according to their requirements. In addition, the designed SDN controller determines the algorithm that can transmit the maximum amount of data, without any interference from a secondary application on the primary application bandwidth, thereby affording the maximum bandwidth satisfaction rate. Through the average traffic graph shown in Fig. 4, we considered three scenarios for the primary applications: without load, with mild load, and with heavy load. Based on these three data traffic scenarios, we have designed three algorithms for the SDN controller, which could provide a viable solution for bandwidth requirement of secondary applications. As shown in Fig. 5, there might be time interval when primary application requires mild bandwidth like smart education and one of the secondary application like smart water has high bandwidth requirement.

Fig. 6
figure 6

Hierarchical presentation of algorithm usage by the SDN controller

Table 1 Data rate of smart city applications

The first inter-application wavelength redirection (IAWR) algorithm is activated under the no-load scenario for primary applications. The SDN controller transmits the secondary application data on the respective primary application wavelength through ROADM. The second dynamic load balancing (DLB) algorithm is designed for the scenario in which a primary application is continuously transmitting data but has under-utilized bandwidth, which can then be used to transmit the data of a secondary application, determined by the SDN, enabled by the designed algorithm. Similarly, the third algorithm is designed for the scenario in which there are no sufficient under-utilized bandwidth slots for the primary applications. The designed bandwidth selection with resource allocation (BSRA) algorithm splits the secondary application load accordingly and then transmits it on the marginally available primary application bandwidth slots. Thus, the proposed algorithm uses the available bandwidth, without causing any interference in the functioning of primary applications. It can detect the free bandwidth slots of primary applications and use them in an optimized manner. The flow chart presented in Fig. 6 depicts the hierarchical use of the algorithm by the SDN controller. As shown in Table 1, the primary applications are assigned with the asynchronous band of the data rate generated from their different respective components.

We used Optisystem 19.0 (Optiwave Systems Inc., Canada) to set up the optical network for the smart city. The SDN controller algorithms are designed in MATLAB. Next, the optical network and the controller algorithms are co-simulated to analyze the operation of the overall system.

3 Inter-application wavelength redirection algorithm network architecture

In this section, we present the design of the dynamically reconfigurable ROADM-based TDM-DWDM optical network, as shown in Fig. 7. ROADM is a practical approach to remotely control wavelengths that can be added/dropped or passed through a node [29, 30]. In this architecture, the main advantage of using ROADM is the dynamic allocation of the available network bandwidth to individual users, without affecting the traffic and equalization of the power levels of different wavelength channels processed through every ROADM. The designed optical network provides capability and flexibility on the provisioning of wavelengths, regardless of the changes in the network. When there is no load at a primary application, the correspondingly assigned wavelength is optically switched to a secondary application, as demonstrated in Fig. 7. In this optical network architecture, the optical switch is centrally controlled by the SDN controller through the IAWR algorithm, rendering it a reconfigurable optical access network for smart cities.

Fig. 7
figure 7

SDN-controlled ROADM-based TDM-DWDM smart city network

The proposed SDN-controlled ROADM-based TDM-DWDM optical access network for smart cities is dynamic and flexible, as it supports complementary real-time traffic adjustments between the primary and secondary applications. The bandwidth request varies for each smart city application: Some may involve no load, whereas other secondary applications may have bandwidth requirements at that time. Based on this situation, we propose a novel IAWR algorithm to redirect wavelengths from a no-load primary application to a secondary application, thereby increasing the bandwidth satisfaction rate of the designed smart city optical network. The secondary applications then use this wavelength only during the time where there is no load from the concerned primary application. For example, smart education has no traffic load from 10 P.M. to 3 A.M.; therefore, this time slot can be used by any other secondary application for the transmission of its data. Table 2 shows two time interval when the primary applications smart home and smart education have no loads. At this time, SDN will automatically drop these primary applications and add secondary applications such as smart agriculture and smart water on the corresponding wavelengths through ROADM.

Table 2 Wavelength redirection time for secondary applications

This approach improves the transmission quality of the network and the bandwidth satisfaction rate of the end user. The algorithm used in the SDN controller is summarized below:

Algorithm 1
figure a

Inter-Application Wavelength Redirection Algorithm

The algorithm switches between primary and secondary applications, which implies that either the primary application or secondary application data will be transmitted on the corresponding wavelength, depending on the availability of time interval.

3.1 Results and discussion

A well-organized communication network is a mainstay of any successful network. These networks transport various ultrahigh-quality data pertaining to smart city applications. Therefore, the designed networks should be able to provide deterministic, quantifiable, and, at times, guaranteed services.

Fig. 8
figure 8

Data transmitted and received by smart home and smart agriculture in their respective time interval

Fig. 9
figure 9

Data transmitted and received by smart hospital and smart waste in their respective time interval

In Figure 8, at 12 noon, the ROADM output status is depicted, showcasing data transmission from all four primary applications (A, C, E, G) and their corresponding receptions as (B, D, F, H). The accompanying eye diagrams (1, 2, 3, 4) provide visual evidence of the successful transmissions. In Fig. 8, the successful transmission and reception of data from the smart home primary application (A and B) at a speed of 5 Gbps, and smart education applications (G, H) at 6 Gbps, are exemplified.

The average traffic graph (Fig. 4) underscores that the smart home and smart education applications exhibit minimal data generation around 1 A.M. Consequently, this time slot presents an opportune window for another associated secondary application to effectively transmit its data. In Fig. 9, the ROADM output at 1 A.M. is illustrated, showcasing the reallocation of resources. Specifically, the smart home wavelength is dropped, and smart agriculture begins transmitting data at a rate of 2 Gbps, denoted as A, B. Simultaneously, smart water, with a data rate of 3 Gbps, is introduced by dropping the smart education wavelength. The corresponding eye diagrams are presented to validate the successful transmission of these secondary applications.

4 Joint bandwidth allocation algorithm

As described in the previous section, the SDN-controlled ROADM can transmit the load of either primary or secondary applications at a time. However, it is necessary to address the case involving simultaneously bandwidth requests from both applications. Table 2 shows that the number of slots is limited for any primary wavelength with no load. Here, we propose a novel joint bandwidth allocation algorithm for the SDN-controlled TDM-DWDM optical network for smart cities to manage simultaneous bandwidth demands from primary and secondary applications. These algorithms ensure efficient utilization of available bandwidth by redistributing resources between primary and secondary applications based on their respective loads. This optimization prevents underutilization during mild loads and maximizes bandwidth satisfaction for secondary applications during peak periods. This ensures that each secondary application receives an optimal share of bandwidth for the maximum available duration, contributing to a more reliable and responsive network. The conceptual diagram shown in Fig. 10 illustrates that both the primary and secondary applications can transmit their data on the same wavelength, depending upon their respective bandwidth requirements. The MATLAB switch, acting as the SDN controller, centrally controls all the smart city applications through the designed algorithms. The SDN controller can continuously sense the occupancy on a particular wavelength and the bandwidth requirement of secondary applications. Essentially, the SDN controller is the authority deciding the transmission wavelength for a secondary application that has the required slot along with the primary application. Here, we propose a novel joint bandwidth allocation algorithm for the SDN-controlled TDM-DWDM optical network for smart cities to manage simultaneous bandwidth demands from primary and secondary applications.

Fig. 10
figure 10

Joint transmission and reception of primary and secondary application data

To describe the proposed algorithm, we define the following set of parameters below.

I::

Set of smart city primary applications (PA)

\(BW_{I}\)::

Total bandwidth requirement of set I

J: :

Set of smart city secondary applications (SA)

U(j)::

Set of unallocated secondary applications

Bw::

Set of bands of required bandwidths

\({{\rm BW}}_{PAi}\)::

Is the bandwidth request of any ith primary application from set I

\({{\rm BW}}_{SAj}\)::

Is the bandwidth request of any jth secondary applications from set J

\({{\rm BW}}_{Bw}\)::

Is the total request bandwidth of band Bw

\({{\rm BW}}_{{\rm Max}}\)::

Maximum bandwidth of the whole

With the mapping among the number of available wavelengths, primary applications, secondary applications, and their required bandwidths, the goal is to maximize the use of the wavelength by utilizing the bandwidth resources fairly between the primary and secondary users of the smart city. The procedure of the proposed algorithm is fully described in Fig. 10. To better understand the proposed joint bandwidth allocation scheme, we propose two algorithms: the DLB and BSRA algorithms. The algorithms used herein are described in detail in the following subsections.

4.1 Dynamic load balancing

Algorithm 2
figure b

Dynamic Load Balancing

During mild loads, the bandwidth requirement of a primary application on the associated wavelength is considerably low, whereas secondary applications may have bandwidth requirements at the same time. Therefore, we propose a novel dynamic load balance-based resource allocation algorithm to balance the bandwidth between the primary and secondary applications. This balancing improves the bandwidth satisfaction rate of secondary applications by utilizing the given bandwidth for the maximum available duration, through redistributing a heavily loaded secondary application to the wavelength of a lightly loaded primary application. It is worth noting that the transmission parameters (modulation format and symbol rate) remain the same, regarding of whether the secondary application is reassigned to any wavelength. Thus, the transmission delay of secondary applications is reduced. This algorithm can be summarized as Algorithm 2.

4.1.1 Results and discussion

The DLB algorithm provides flexibility in simultaneously transmitting both primary and secondary application data. When the bandwidth requirement of any primary application is low, the DLB-based SDN controller transmits any secondary application data, along with the primary data, on the associated wavelength. The DLB algorithm-based SDN controller provides the best mapping for the simultaneous transmission of the primary and secondary application data on a single wavelength. Here, the results are shown for two scenarios.

Fig. 11
figure 11

Joint transmission and reception of primary and secondary application data

Figure 10 illustrates the input data rates for both primary and secondary applications, along with their outputs during a specific time slot. Specifically, the first switch, highlighted in dark blue, represents the output at 4 A.M. At this time, smart agriculture transmits data at a rate of 2 Gbps, concurrently with smart home, which operates at 4 Gbps, below its maximum requirement of 10 Gbps.

Similarly, at 2 P.M., the second switch displays the output, where smart waste transmits data at a rate of 2.5 Gbps, accompanied by smart hospital operating at 1.8 Gbps, below its maximum requirement of 10 Gbps. Additionally, at 11 P.M. and 6 A.M., the third switch showcases smart grids and smart water-transmitting data at rates of 2.4 and 4.2 Gbps, respectively, along with smart transport and smart education. This strategic resource allocation optimizes the utilization of network resources during these specific time slots.

In Fig. 11, it is observed that at 2 P.M., the bandwidth requirement of smart hospital is around 4 Gbps, notably lower than its maximum capacity of 10 Gbps. In contrast, smart waste necessitates a bandwidth of 2.8 Gbps during this period. The outcome signifies the successful transmission and reception of data from both smart waste (C, D) and smart hospital (A, B), as evidenced by the accompanying eye diagram featuring a quality factor of approximately 14.32.

Likewise, the findings depicted in Fig. 12 reveal the concurrent transmission of smart education and smart water data at 6 A.M. During this time, smart education requires approximately 1 Gbps of bandwidth, while smart water demands 4.2 Gbps. The corresponding eye diagrams are presented, and they exhibit a quality factor of 17.03, affirming the successful transmission of data from both applications.

Fig. 12
figure 12

Joint transmission and reception of primary and secondary application data

4.2 Bandwidth selection with resource allocation (BSRA)

In the above-stated algorithm, a secondary application searches for available bandwidth to transfer its load. However, it is possible that no direct bandwidth is available on any primary application wavelength to transfer the entire load of the secondary application that may happen during heavy load hours. Therefore, we propose a BSRA algorithm where the entire load of a secondary application is split into slots to transmit the load across the available primary application bandwidth slots for the corresponding wavelength. The ability of BSRA to split the load into slots provides increased flexibility in managing the bandwidth requirements of secondary applications. This adaptability allows for dynamic adjustments in response to varying loads, ensuring optimal bandwidth distribution and accommodating fluctuations in demand. During heavy load hours, the BSRA algorithm helps mitigate congestion by efficiently utilizing available primary application bandwidth slots, resulting in a more reliable and responsive network. The detailed algorithm is stated as Algorithm 3.

Algorithm 3
figure c

Bandwidth Selection with Resource Allocation

4.2.1 Results and discussion

The BSRA algorithm can be used to transmit the secondary application data at any point of time, along with a primary application. Based on the available bandwidth slots at primary applications, the BSRA-based SDN controller transmits the secondary application loads. As an example, the SDN controller sent smart water data with the data of two primary applications: smart home and smart transport. The load generated by smart water is approximately 4 Gbps at 8 P.M. Figure 4 shows that there is no 4 Gbps slot available among the primary applications. Therefore, this 4 Gbps is then divided into two slots of 2 Gbps each: One 2 Gbps load of smart water is transmitted with smart home, whereas the other 2 Gbps load is transmitted with the smart transport primary application. The same scenario is demonstrated through the timing diagram, validated by the corresponding eye diagrams in Fig. 13. Here, eye diagrams are used to show the transmission quality of digital signals transmitted through designed TDWDM-based optical network using BSRA algorithm.

Fig. 13
figure 13

Joint transmission and reception of primary and secondary application data

5 Overall network performance

The smart city optical network system consists of an SDN controller and the TDM-DWDM PON system, as shown in Fig. 1. This includes 4 primary and secondary applications, 4 wavelengths, 4 areas covered under each smart city application, and N = 20 devices in each case. The weekly recorded bandwidth requirement range for each application is presented in Figs. 4 and 5. According to the varying bandwidths requested by the smart city applications in each time slot, the wavelength assignment and the data rate are varied; however, the maximum data rate remains fixed at 10 Gbps.

In this study, the bandwidth satisfaction rate is defined as the ratio of the bandwidth provided by the primary application system to the secondary application traffic requests, as shown in the following formula:

$$\begin{aligned} Bs={\textrm{BW}}_{\textrm{alloc}}/{\textrm{BW}}_{\textrm{req}}, \end{aligned}$$
(1)

where Bs indicates the bandwidth satisfaction rate, \({\textrm{BW}}_{\textrm{alloc}}\) is the bandwidth allocated to the secondary application, and \({\textrm{BW}}_{\textrm{req}}\) is the bandwidth requested by the secondary application. A performance comparison of the bandwidth satisfaction rates between the proposed DLB and BSRA algorithms is performed.

The result in Fig. 14 shows that the proposed BSRA algorithm outperforms the DLB algorithm in terms of the bandwidth satisfaction rate. During peak traffic periods, an increase of up to 30% in the bandwidth satisfaction rate is noted. Moreover, the bandwidth requests of secondary applications are almost entirely satisfied. This is because the BSRA algorithm redirects the wavelength of light-load primary applications to heavy-load secondary applications, effectively reducing the network congestion. Therefore, the BSRA algorithm can considerably improve the bandwidth satisfaction rate by balancing the requirement and assignment of bandwidths for secondary application on the primary application wavelengths.

Fig. 14
figure 14

Bandwidth satisfaction rate

Fig. 15
figure 15

Throughput of DLB and BSRA algorithms

Figure 15 presents the throughput results for various scenarios using both algorithms. The findings demonstrate the system’s effectiveness in successfully transmitting data over a specified time period. Throughput, in this context, serves as a metric for the system’s ability to handle and transfer data efficiently. A higher optical system throughput signifies an increased capacity for data transmission, a critical aspect in applications like telecommunications, data centers, and high-speed internet connections where efficient transmission of large volumes of information is essential.

Fig. 16
figure 16

Final BER and quality factor for data rates of smart city applications

The BER essentially specifies the ratio of error bits received among the total bits sent. It is used to measure the quality of transmission, which is expressed as a negative power of 10. According to the forward error correction (FEC) limit, a BER exceeding \(10^{-9}\) is unacceptable. Here, the BER observations indicate that the designed SDN-controlled TDM-DWDM-based optical network system performs satisfactorily at higher data rates. The results show that, even with the lowest received power, the system performance exceeds the acceptable range, as the BER remains below the aforementioned threshold (i.e., \(<=(10^{-9})\)

The results shown in Fig. 16 illustrate the performance of the proposed system in the form of the Q-Factor. The maximum accomplishable data rate with an acceptable Q-Factor (Q>= 6.0) is 32 Gbps, at the minimum received power of − 33 dB. Meanwhile, the system exhibits remarkable results at a received power of − 22 dB, as the Q-Factor is 14.2 for a data rate of 32 Gbps.

6 Conclusion

This study presented an SDN-controlled dynamically reconfigurable TDM-DWDM-based optical network for smart cities, which enabled the utilization and allocation of the under-utilized bandwidths of primary applications to secondary applications. The architecture of the SDN controller is designed such that it precisely manages the network resources among all the smart city applications, thus affording a more energy-efficient network. Furthermore, we developed three novel algorithms (IAWR, DLB, and BSRA) for the SDN controller architecture. These algorithms can sense the under-utilized bandwidths of primary applications and allocate them to secondary applications based on their requirements. Notably, the proposed algorithm exploits the under-utilized bandwidths of primary applications, without any interference in their functioning. The proposed algorithms can detect available bandwidth slots of the primary applications and utilize them in an optimal manner, thereby improving the user satisfaction rate and ensuring a good user experience. Moreover, the SDN provides a global view of the overall network and centrally controls all the smart city applications by allocating network resources accordingly. The results indicate that the user satisfaction is increased, even during peak hours, under the proposed scenarios.

Furthermore, the SDN provides a global view of the entire network and centrally controls all smart city applications by allocating network resources accordingly. The results demonstrate increased user satisfaction, even during peak hours, under the proposed scenarios. Moreover, the system performs remarkably well in terms of Bit Error Rate (BER) and quality factor. The findings suggest that high-speed optical networks like these can be readily implemented in smart cities, providing opportunities to deploy smart city applications while efficiently addressing citizens’ communication needs.