You are on page 1of 12

3.3.1.

MATLAB design and code

Within MATLAB, the program uses many existing FFT-related functions to analyse the
network data and determine the amplitude, frequencies, phases or the sinusoid present within the
data. Once identified that the sinusoids are already in the signal, then it can be verified that the
FFT function is working correctly. The FFT function will generate complex values to represent
both the magnitude and the phase of the sinusoid.
In order to get the sinusoid in the signal, also need to plot the absolute value to get the
magnitude spectrum in the flowchart). Firstly, load the raw data and apply the MATLAB
function for FFT. After this, plot the time domain data and frequency domain data as a plot
selection. Also converting the time domain to the frequency domain in order to verify hourly,
daily, weekly and monthly patterns. Finally, proceed the filtering for low-pass, high-pass, band-
pass and notch filters. This process makes the data more visually understandable for future
predictions. Figure 3-7 describes each processing step in the program for the proposed admission
control algorithms. Moreover, there are different scenarios with different steps in this project,
which are related to the simulation. The simulation’s approach includes the simulation
methodology, which demonstrates the simulation design including different algorithms.
No Yes
Start
Clear screen End Finish

Load data

Yes
Plot raw data
Plot frequency
No
Convert time to
frequency domain

Yes
Plot
Plot frequency frequency
No
Yes
Filter out hourly Plot
Plot hourly data
frequency hourly
No
Yes Filter out daily
Plot daily data Plot daily
frequency
No
Yes Filter out weekly Plot
Plot weekly data
frequency weekly
No
Yes Filter out monthly Plot
Plot monthly data
frequency monthly
No
Yes Filter low pass Plot low pass
Low pass filter
frequency frequency
No
Yes
Filter high pass Plot high pass
High pass filter
frequency frequency
No
Yes
Select upper Plot band
Band pass filter Select lower region
region pass filter
No
Yes
Select Plot notch
Notch filter Apply notch filter
notch filter filter
Figure 3- 1: Flowchart of MATLAB code.

3.3.2. Graphical User Interface

A MATLAB GUI software dashboard has also been developed to enhance user
friendliness; efficiency and simplicity (see Figure 3-8).

Figure 3-2: MATLAB GUI dashboard.


On the right of figure 3-7, there are various trends that can be isolated in the frequency
domain and then converted back to the time domain.
Then the filters that can be applied to the raw data in the frequency domain to filter out any
noise and abnormalities. The three radio buttons in the window allow the user to look at the
LSBU data in various domains. The first radio button (followed by a plot graph) gives the user
the time domain, the second button (followed by the plot graph) gives the user the frequency
domain, and the third button gives the user the frequencies involved and their magnitude.

3.3.3. Hourly, daily, weekly and monthly network traffic

Figures 3-9 to 3-12 show the network traffic following inverse FFT of the hourly, daily,
weekly and monthly peaks of the FFT. The data shown in previous Figure 3-6 are in standard
sinusoidal patterns, as they were reconstructed from a single FFT data peak. One can clearly see
the differences among the figures in both amplitude and frequencies.

Figure 3-3: Hourly patterns.

Figure 3-4: Daily network traffic patterns.


Figure 3-5: Weekly network traffic patterns.

Figure 3-6: Monthly network traffic patterns.


Figure 3-13 shows the network traffic that follows a reverse FFT of all the hourly, daily,
weekly and monthly peaks together in comparison with Figure 3-14. The results are becoming
more interesting, as the 12 months and the 4 weeks of each month it can be clearly identified.
From the zoomed-in first three-month data, can also be clearly identify days, and there is a strong
weekday/weekend effect.

Figure 3-7: Total network traffic patterns.


Figure 3-8: One-year network traffic patterns of hourly, daily, weekly and monthly data and
zoomed-in data of the first three months.

3.3.4. High-pass filter

A high-pass filter is used to let through all the high frequencies and cut off any lower
frequencies.
As an example, observing at Bin 367, which represents the daily contribution. If settled
the high-pass filter to only allow high frequencies from Bin 367, the result will be a prediction of
what will be daily and hourly usage over time, where have been eliminated the low frequencies
that represent weekly, monthly and quarterly contributions.

Figure 3-15: High-pass filter process in the frequency domain.

367 (daily traffic)


(a)

(b)
Figure 3-9: a)-High-pass filter data traffic pattern in the time domain, in contrast to total data. b)
- the plot of raw data in the time domain.

Figure 3-15 shows the high-pass filter process in the frequency domain, and Figure 3-16
shows the corresponding time domain data using inverse FFT. The results show that the daily
and hourly usage is fairly constant, with slightly low usages in summer (August), and slightly
high usages in March and May. For the university, this information is vital, as this shows the
minimum required bandwidth on any given day.

3.3.5. Low-pass filter

A low-pass filter is one that passes signals with lower frequencies and cuts off higher
frequencies. An example is shown in Figures 3-17 and 3-18. Bin 53 represents weekly
contributions.

Figure 3-17: Low-pass filter process in the frequency domain.

53 (weekly traffic)
Apparently, weekly and monthly data usages vary a lot throughout the year. This is quite
different from previous used on the other section of this research daily and hourly data usage. By
looking at the graph for an entire year, one can highlight bursts of usage that correspond to
university events where activity is high e.g., backups, cloud synchronisation, and data centre
synchronisation.
(a)

(b)
Figure 3-10: a) - Low-pass filter data traffic pattern in the time domain, in contrast to total data.
b) - the plot of raw data in the time domain.

Here, the observation is that, at a certain time, the usage is relatively high. This analysis
can help examine unknown events or bursts of usage that would contribute to a bottleneck. Thus,
these data can be used to spread usage more evenly to not cause DoS due to bandwidth issues.
3.3.6. Band-pass filter

A band-pass filter is one device that passes frequencies within a certain range and rejects
frequencies outside that range. Bin numbers 367 and 733 have been selected; these represent
daily and 12-hourly traffic, and the process is realised as follows:
i. Create a matrix with all zeros
ii. Create a variable such as band pass = zeros (1: L)
iii. Select both Bin numbers with their mirror images
Band pass (367:733) = fft(367:733)
Band pass (7710:8419) = fft(7710:8419)
iv. Apply the FFT function
v. Finally, the FFT is inversed to give the accurate timing
This process will give an accurate picture of the analysis and foundation upon which the
traffic has been analysed.
In order to thoroughly complete the investigation of network traffic, the following steps
should be considered: check the traffic characteristics for band-pass filter, which allows daily
and 12-hourly utilisation; and check for evidence of congestion and traffic overhead. An example
is shown in figure 3-19 is the band-pass process in the frequency domain and figure 3-20 is the
band-pass filter data traffic pattern in the time domain, in contrast to total data and the plot of
raw data in the time domain.

Band-
Pass

Figure 3-19: Band-pass process in the frequency


domain.
367 733

You might also like