Linear Algorithms for Radioelectric Spectrum Forecast - MDPI

8 downloads 124 Views 6MB Size Report
Dec 2, 2016 - Faculty of Technology, Universidad Distrital Francisco José de Caldas, Bogota 110231, Colombia; ... The prediction information of the channel status can be used ... channels with higher probability of vacancy in multi-channel ...
algorithms Article

Linear Algorithms for Radioelectric Spectrum Forecast Luis F. Pedraza 1,2, *, Cesar A. Hernandez 1,2 , Ingrid P. Paez 2 , Jorge E. Ortiz 2 and E. Rodriguez-Colina 3 1 2 3

*

Faculty of Technology, Universidad Distrital Francisco José de Caldas, Bogota 110231, Colombia; [email protected] Industrial and Systems Engineering Department, Faculty of Engineering, Universidad Nacional de Colombia, Bogota 111321, Colombia; [email protected] (I.P.P.); [email protected] (J.E.O.) Electrical Engineering Department, Universidad Autónoma Metropolitana Iztapalapa, Mexico City 09340, Mexico; [email protected] Correspondence: [email protected] or [email protected]; Tel.: +57-1-323-93-00

Academic Editor: Javier Del Ser Lorente Received: 2 August 2016; Accepted: 28 November 2016; Published: 2 December 2016

Abstract: This paper presents the development and evaluation of two linear algorithms for forecasting reception power for different channels at an assigned spectrum band of global systems for mobile communications (GSM), in order to analyze the spatial opportunity for reuse of frequencies by secondary users (SUs) in a cognitive radio (CR) network. The algorithms employed correspond to seasonal autoregressive integrated moving average (SARIMA) and generalized autoregressive conditional heteroskedasticity (GARCH), which allow for a forecast of channel occupancy status. Results are evaluated using the following criteria: availability and occupancy time for channels, different types of mean absolute error, and observation time. The contributions of this work include a more integral forecast as the algorithm not only forecasts reception power but also the occupancy and availability time of a channel to determine its precision percentage during the use by primary users (PUs) and SUs within a CR system. Algorithm analyses demonstrate a better performance for SARIMA over GARCH algorithm in most of the evaluated variables. Keywords: cognitive radio; time series; linear algorithms

1. Introduction Radioelectric spectrum occupancy is widely studied due to its importance for the construction of new spectrum assigning policies in emerging technologies, as well as in monitoring activities both in licensed and unlicensed bands. Real measurements for spectrum use within a determined band allow the corresponding authorities to guarantee that licenses meet local and regional spectrum regulations [1]. On the other hand, precise parameter estimates like time quantity and geographical region where the different spectrum band is actually used bring useful information to determine spectral opportunities for variant technologies within a domain. In this paper, such technologies correspond to a global systems for mobile communications (GSM) technology variant in the time domain [2]. The spectrum sensing in cognitive radio (CR) provides the necessary information about the status of the wireless channels, modeling and prediction of communications activity. This could contribute to spectral efficiency improvement efforts [3–5]. The prediction information of the channel status can be used by secondary users (SUs) to decide the sensing periods and channel occupancy duration for a single channel sensing scenario [6]. Besides, based on prediction information, SUs can select the channels with higher probability of vacancy in multi-channel wideband sensing scenarios [7], and also

Algorithms 2016, 9, 82; doi:10.3390/a9040082

www.mdpi.com/journal/algorithms

Algorithms 2016, 9, 82

2 of 18

primary user (PU) occupancy models can be used as empty channel indicators replacing the spectrum sensing procedures [2,8]. A key issue for spectrum sensing operations is the evaluation of the so-called hidden node margin (HNM). The HNM has been evaluated in sharing scenarios between white space devices and digital terrestrial television systems [9]. Different initiatives for radioelectric spectrum channel modeling, mainly using deterministic and stochastic models, have been proposed [3,10–16]. Differences among those proposals and the present work lie in that in the first initiatives, the duty cycle (the average percentage of the channel utilization) time series is modeled for different types of channels, whereas the proposal presented here models the time series for received power in three GSM channels with different occupancy levels. For this purpose, firstly we used seasonal autoregressive integrated moving average (SARIMA) algorithm, which is adequate for analyzing time series with seasonality, in accordance with different studies [13–15]. Secondly, the generalized autoregressive conditional heteroskedasticity (GARCH) algorithm, which had been applied in traffic modeling and forecast for different communications networks, was also used [17–19]. The evaluation of the results obtained in algorithm forecasts is based on the following variables: channel availability time (the time interval where the channel is not used by the PUs), channel occupancy time (time interval where the channel is used by the PUs), observation time and error criteria analysis (symmetrical mean absolute percentage error, SMAPE, mean absolute percentage error, MAPE, and mean absolute error, MAE) [20–22]. 2. Theory and Background GARCH and SARIMA are deployed in a time series that is assumed as linear and with a known statistical distribution. As presented below, this is partially met in long-term analysis of time series measurements. 2.1. Seasonal Autoregressive Integrated Moving Average Algorithm In general, if a time series exhibits potential seasonality indexed by s, then using a multiplied SARIMA(p,d,q)(P,D,Q)s algorithm is advantageous, where d is the level of non-seasonal differencing, p is the autoregressive (AR) non-seasonal order, q is the moving average (MA) non-seasonal order, P is the number of seasonal autoregressive terms, D is the number of seasonal differences, and Q is the number of seasonal moving average terms. The seasonal autoregressive integrated moving average algorithm of Box and Jenkins [23] is given in the Equation (1),

∅ p ( B) Φ p ( Bs ) ∇d ∇sD xt = θq ( B) ΘQ ( Bs ) et

(1)

where B is the backward shift operator, xt is the observed time series of load at time t, et is the independent, identical, normally distributed error (random shock) at period t; ∇sD xt = (1 − Bs ) D xt , Φp (Bs ) and ΘQ (Bs ) are the seasonal AR(p) and MA(q) operators, respectively, which are defined in Equations (2) and (3), Φ p ( Bs ) = 1 − Φ1 Bs − Φ2 B2s − . . . − Φ p B Ps (2) ΘQ ( Bs ) = 1 − Θ1 Bs − Θ2 B2s − . . . − ΘQ BQs

(3)

where Φ1, Φ2 , . . . , Φp are the parameters of the seasonal AR(p) model, Θ1 , Θ2 , . . . , ΘQ are the parameters of the seasonal MA(q) [24]. The Box-Jenkins methodology consists of four iterative steps [25]:





Step 1: Identification. This step focuses on the selection of d, D, p, P, q and Q. The number of the order can be identified by observing the sample autocorrelations (ACF) and sample partial autocorrelations (PACF). Step 2: Estimation. The historical data is used to estimate the parameters of the tentative model in Step 1.

Algorithms 2016, 9, 82

• •

3 of 18

Step 3: Diagnostic checking. Diagnostic test is used to check the adequacy of the tentative model. Step 4: Forecasting. The final model in Step 3 is used to forecast the values [26].

2.2. Generalized Autoregressive Conditional Heteroskedastic Algorithm An important number of models, most of which have the property that conditional variance depends on past, have been proposed for capturing special data characteristics. Algorithms commonly used are those with autoregressive conditional heteroskedasticity (ARCH) introduced in [27] and generalized ARCH (GARCH) given by [28]. Modeling ARCH-GARCH considers conditional error variance as a compression function of the past of the series. ARCH modeling usually requires a great number of lags (q), and therefore a great number of parameters. This might yield a model with a great number of parameters, which is in opposition to the parsimony principle. This fact drives many times to difficulties when using the model to describe data in an adequate way. On the contrary, a GARCH model uses an inferior quantity of parameters, which makes it preferable to an ARCH model [29–31]. In this paper, the GARCH algorithm with order p ≥ 0 and q ≥ 0 for the discrete-time stochastic process rt is expressed in Equations (4) and (5) rt = µ + c, ε t ∼ N (0, 1) q

p

σt2 = α0 + ∑i=1 αi rt2−i + ∑ j=1 β j σt2− j

(4) (5)

where εt is an independent and identically distributed process with a zero mean and one standard deviation, µ is the mean constant offset, σt 2 is variance, and α0 is the constant in the conditional variance. Unknown parameters for model are α0 , αi and βj for some positive integer p, q. Just as in an ARIMA model, ACF and PACF are useful for p and q order identification in a GARCH(p,q) process [30]. 3. Case Study and Experiment Procedure The decision to carry out this study was made during the spectrum measurements campaign held in Bogota-Colombia where we obtained the measurements employed here from spectrum occupancy study previously carried out [1,32]. The band analyzed was the GSM 850 MHz, as it is a band constantly used and viable for analysis in time function with conventional equipment, like a spectrum analyzer. The measurements used in this study correspond to a week, from 23 December to 29 December 2012. In some studies [33], it has been indicated that a reasonable option to obtain representative data without any a priori information about a band is to consider measurement periods of at least 24 h in order to avoid under or overestimating frequency bands occupancy with some temporary patterns. While a 24-h measurement period could be thought of as adequate in order to properly characterize the activity of determined spectrum bands [34], in this research 7 days were analyzed, including patterns for workdays and weekends. Additionally, this time period is sufficient to measure occupancy in mobile networks with low use, as indicated in [2,34]. The channels to be modeled were selected after measuring the duty cycles of 60 channels at GSM band. From these, three channels with different occupancy levels (high, medium and low), were chosen. Figure 1 presents results of power measure for three downlink channels during a week, with different power level. Spectrum analyzer configuration for this band was the following: a resolution bandwidth of 100 kHz with a sweep time of 290 ms, which guarantees GSM signal detection with a bandwidth of 200 kHz. Daily duty cycles from PUs at selected channels are shown in Figure 2. Threshold (λ) used, which for this event is of −89 dBm, was obtained from Equation (6) with a probability of false alarm (Pfa) of 1% [35]. λ which is above of the detected noise floor of −102 dBm [1],   Γ m, λ2 Pf a = (6) Γ (m)

Algorithms 2016, 9, 82

4 of 18

Power(dBm) (dBm) Power

where Г(.) y Γ(. , .) are complete and incomplete gamma functions, respectively, and m is the product 2016, 9,9,82 44of of Algorithms time times bandwidth. Algorithms 2016, 82 of18 18 Low Lowchannel channeloccupancy occupancymeasurement measurement

-50 -50

Power(dBm) (dBm) Power

-100 -100 00

24 24

48 72 96 120 48 72 96 120 Time Time(h) (h) measurement Medium channel occupancy Medium channel occupancy measurement

144 144

168 168

24 24

48 48

144 144

168 168

24 24

48 48

144 144

168 168

-50 -50

Power(dBm) (dBm) Power

-100 -1000 0

72 96 120 72 96 120 Time Time(h) (h) measurement High channel occupancy High channel occupancy measurement

-50 -50

-100 -1000 0

72 72

Time Time(h) (h)

96 96

120 120

Figure Power measurements for three global (GSM) band Figure 1. 1.1. Power systems for mobile mobilecommunications communications (GSM) band Figure Powermeasurements measurementsfor forthree three global global systems systems for mobile communications (GSM) band downlink channels. downlink channels. downlink channels. Duty Dutycycle cycle

40 40

High Highchannel channel Medium Mediumchannel channel Low channel Low channel

35 35 30 30 Percentage(%) Percentage(%)

25 25 20 20 15 15 10 10 55 00

Sunday Sunday

Monday Monday

Tuesday Tuesday

Wednesday Wednesday Days Days

Thursday Thursday

Friday Friday

Saturday Saturday

Figure Duty cycles for channels. Figure2.2.2.Duty Dutycycles cyclesfor forthree threeGSM GSMband banddownlink downlink Figure three GSM band downlinkchannels. channels.

In In this this work work the the HNM HNM isis calculated calculated from from the the differences differences between between measurements measurements of of received received In this work the HNM is calculated from the differences between measurements of received power power performed outside at street level and indoors, in a building. These measurements power performed outside at street level and indoors, in a building. These measurements were were performed with a discone-type antenna and spectrum analyzer. The calculation allows analysis performed outside at street level and indoors, in a building. These measurements were performed performed with a discone-type antenna and spectrum analyzer. The calculation allows analysis of of the between aa non-licensed device aa PU without interference to with discone-type antenna and spectrum analyzer. The calculation analysis of thedue margin theamargin margin between non-licensed device indoors, indoors, and and PU outdoors outdoorsallows without interference due to shadowing. Table the each channel. between a non-licensed device indoors, andfor a PU outdoors shadowing. Table11shows shows theHNM HNMfound found for each channel.without interference due to shadowing.

Table 1 shows the HNM found for each channel.

Table Table1.1.Hidden Hiddennode nodemargin margin(HNM) (HNM)for forthree threedifferent differentfrequency frequencychannels channelsfor foran anurban urbanenvironment. environment. Table 1. Hidden node margin (HNM) for three different frequency channels for an urban environment.

Low LowChannel ChannelHNM HNM(dB) (dB) Medium MediumChannel ChannelHNM HNM(dB) (dB) High HighChannel ChannelHNM HNM(dB) (dB) 9.2 11.9 6.8 11.9 HNM (dB) 6.8 HNM (dB) Low Channel9.2 HNM (dB) Medium Channel High Channel

9.2 11.9 6.8 Figures Figures 3–5 3–5 present present histograms histograms corresponding corresponding to to opportunities opportunities distribution distribution during during time time periods of GSM band channels; it is observed that such opportunities have an exponential periods of GSM band channels; it is observed that such opportunities have an exponentialbehavior, behavior, 2) are exhibited in each figure. whose approximate equations and 2) are exhibited Figures 3–5 present histograms corresponding todetermination opportunities(R distribution during timefigure. periods whose approximate equations andthe the coefficient coefficientof of determination (R in each Thus, the occurrence increases for the channel occupancy, especially for shorter time periods of use. of GSM channels;increases it is observed suchoccupancy, opportunities have an Thus, band the occurrence for thethat channel especially forexponential shorter time behavior, periods ofwhose use. For low, medium and high occupancy channels, total times of opportunities were approximately 2 For low, medium andand highthe occupancy channels, total times(R of )opportunities approximately approximate equations coefficient of determination are exhibitedwere in each figure. Thus, h, 78 which indicates low occupancy [2]. 84 h,81 81hhand and 78h, h,respectively, respectively, whichoccupancy, indicatesrelatively relatively low occupancy [2]. periods of use. For low, the84 occurrence increases for the channel especially for shorter time

Algorithms 2016, 9, 82

5 of 18

medium and high occupancy channels, total times of opportunities were approximately 84 h, 81 h and Algorithms 2016, 9, 82 5 of 18 78 Algorithms h, respectively, 2016, 9, 82which indicates relatively low occupancy [2]. 5 of 18 Algorithms 2016, 9, 82 500 500 500

Occurrence Occurrence Occurrence

400 400 400

5 of 18

Maximum value = 573 Maximum value = 573 Maximum value = 573

A*exp(-at) A*exp(-at) A*exp(-at) t = 290 ms tA==290 ms 508.5 tA==290 ms 508.5 a = 0.132 A = 508.5 a 2 0.132 R = 0.9746 a R2= =0.132 0.9746 R2 = 0.9746

300 300 300 200 200 200

Maximum value = 4669 Maximum value = 4669 Maximum value = 4669

100 100 100 0 00 00 0

20 20 20

40 40 40

60 80 100 120 140 60 Time period 80 100 120 in multiples of 290ms 140 60 Time 80 100 120 period in multiples of 290ms 140 Time period in multiples of 290ms

160 160 160

180 180 180

200 200 200

Figure 3. Timeperiod period opportunities distribution distribution for low channel. Figure forlow lowchannel. channel. Figure3.3.Time Time periodopportunities opportunities distribution for Figure 3. Time period opportunities distribution for low channel. 3000 3000 3000

Occurrence Occurrence Occurrence

2500 2500 2500

Maximum value = 4310 Maximum value = 4310 Maximum value = 4310

2000 2000 2000

A*exp(-at) A*exp(-at) A*exp(-at) t = 290 ms tA==290 ms 4626 tA==290 ms 4626 a = 0.339 A 4626 a 2= 0.339 R = 0.9932 a R22= =0.339 0.9932 R = 0.9932

1500 1500 1500 1000 1000 1000 500 500 500 0 00 00 0

Maximum value = 2199 Maximum value = 2199 Maximum value = 2199

20 20 20

40 40 40

60 80 100 120 140 60 Time period 80 100 120 in multiples of 290ms 140 60 Time 80 100 120 period in multiples of 290ms 140 Time period in multiples of 290ms

160 160 160

180 180 180

200 200 200

Figure 4. Time period opportunities distribution for medium channel. Figure 4. Time period opportunities distribution for medium channel. Figure distributionfor formedium mediumchannel. channel. Figure4.4.Time Timeperiod periodopportunities opportunities distribution 6000 6000 6000

Occurrence Occurrence Occurrence

5000 5000 5000

Maximum value = 10250 Maximum value = 10250 Maximum value = 10250

A*exp(-at) A*exp(-at) A*exp(-at) t = 290 ms tA==290 ms 12240 tA==290 ms 12240 a = 0.545 A 12240 a 2= 0.545 R = 0.9942 a R2= =0.545 0.9942 R2 = 0.9942

4000 4000 4000 3000 3000 3000 2000 2000 2000

Maximum value = 2300 Maximum value = 2300 Maximum value = 2300

1000 1000 1000 0 00 00 0

20 20 20

40 40 40

60 80 100 120 140 60 Time period 80 100 120 in multiples of 290ms 140 60 Time period 80 100 120 in multiples of 290ms 140 Time period in multiples of 290ms

160 160 160

Figure 5. Time period opportunities distribution for high channel. Figure 5. Time period opportunities distribution for high channel. Figure 5. Time period opportunities distribution for high channel. Figure 5. Time period opportunities distribution for high channel.

180 180 180

200 200 200

Following this, we proceeded to analyze the time series of measured channels over a week, Following this, we proceeded to analyze the time series of measured channels over a week, Following this, wetoproceeded to analyzeTothe ofinitially measured channelsasover a week, which was equivalent 1,062,514 samples. dotime this, series ACF is presented, observed in which was equivalent to 1,062,514 samples.the To time do this, ACF is initiallychannels presented, as aobserved in Following this, we proceeded to analyze series of measured over week, which equivalent to for 1,062,514 samples. To do this, ACF is which initiallyare presented, as positive observedwhich in Figure was 6. ACF diagrams the three channels presents forms alternately and Figure 6. ACFtodiagrams for the three channels presents forms which are alternately positive and was equivalent 1,062,514 samples. Tochannels do in this, ACF is initially presented, as observed in Figure Figure 6. ACF diagrams for thevalues three presents formsintervals, which are alternately positive and 6. negative, decaying to zero, the are 95%-confidence shown with the blue lines. negative, decaying to zero, the values are in 95%-confidence intervals, shown with the blue lines. negative, to zero, values are in 95%-confidence intervals, shown with the blue lines. Therefore,decaying this indicates thatthe there is correlation [2,26]. Therefore, this indicates that there is correlation [2,26]. Therefore, this indicates that there is correlation [2,26].

Algorithms 2016, 9, 82 Algorithms 2016, 9, 82

of 18 6 of6 18

ACF diagrams for the three channels presents forms which are alternately positive and negative, decaying to zero, the values are in 95%-confidence intervals, shown with the blue lines. Therefore, Algorithms 2016, 82 6 of 18 this indicates that9,there is correlation [2,26].

Figure 6. Autocorrelation for three GSM band downlink channels.

When analyzing channels stationarity of Figure 6, it is observed that the mean and variance are constant and similar to each other, on each one of the days from Monday to Friday. Therefore, measurements at the weekend are not takenfor into consideration when channels. training the analyzed models, Figure 6. Autocorrelation three GSM band downlink Figure 6. Autocorrelation for three GSM band downlink channels. because the mean and variance are not similar and change in a significant way with regard to the When analyzing channels of Figure 6, it is observed that the mean and variance are measurements from Monday to stationarity Friday. When channels ofone Figure 6, days it is observed that to the meanTherefore, and variance constantanalyzing and similar to each stationarity other, on each of the from Monday Friday. measurements at the weekend are not taken into consideration when training the analyzed models, are3.1. constant and similar to each other, on each one of the days from Monday to Friday. Therefore, Design of SARIMA Algorithm because the mean and variance are not similar and change in a significant way with regard to measurements at the weekend are not taken into consideration when training the analyzed the models, In Figure 7 the trend andtoseasonality are presented in occupancy level for the three channels. measurements Monday Friday. because the mean from and variance are not similar and change in a significant way with regard to the Seasonality had a period of 24 h, practically without trend and with stationary components, which measurements from to Friday.model to forecast behavior of the GSM channels [26]. makes possible theMonday use of a SARIMA 3.1. Design of SARIMA Algorithm

Delay difference s, which for this event is selected as five (∆5), was equivalent to the number of days 3.1. Design SARIMA InofFigure 7 theAlgorithm trend and seasonality are presented in occupancy level for the three channels. of the week in which the signal was stationary [15]. Applying the augmented Dickey–Fuller test [36], in Seasonality had a period of 24 h, practically without trend and with stationary components, which Figure the trend andfrom seasonality occupancy level three channels. theInseries of 7three channels Mondayare to presented Friday, theinnull hypothesis of for unitthe root is rejected, makes possible the use of a SARIMA model to forecast behavior of the GSM channels [26]. which indicates stationarity. In order to find the parameters of SARIMA(p,d,q)(P,D,Q)s model, Seasonality had a period of 24 h, with stationary components, ACF which Delay difference s, which forpractically this event is without selected astrend five (∆and 5), was equivalent to the number of days and PACF were calculated for ∆ 5 of respective channels, as shown in Figure 8. makes possible the use of a SARIMA model to forecast behavior of the GSM channels [26]. of the week in which the signal was stationary [15]. Applying the augmented Dickey–Fuller test [36], in

-50 -100

0

-100 0 -50

Trend

-100 -50

0

-100 -50 0

Trend

Seasonal

48 72 96 120 Time(h) Trend medium channel measurement

Trend

Trend

Trend low channel measurement

-50

-100 0

24

24

48 72 96 120 Time(h) Trend medium channel measurement

24

48 72 96 Time(h) Trend high channel measurement 24

48 72 96 Time(h) Trend high channel measurement

24

48 72 Time(h)

96

120

120

120

Seasonal Seasonal Seasonal Seasonal Seasonal

-100 0 Trend

Trend

the series of three channels from Monday to Friday, the null hypothesis of unit root is rejected, Trend low channel measurement Seasonal low channel measurement which indicates stationarity. In order to find the parameters of SARIMA(p,d,q)(P,D,Q)s model, ACF -50 and PACF were calculated for ∆5 of respective channels,10 as shown in Figure 8. 5 0

0

Seasonal low channel measurement

24

48

72

96

100 24 48 72 96 120 5 Time(h) 0 -5 Seasonal medium channel measurement 24 48 72 96 120 15 0 Time(h) 10 5 Seasonal high channel measurement 0 -5 15 100

24

48

72

96

5 Time(h) 0 -5 Seasonal high channel measurement 15 0 24 48 72 96 10 Time(h) 5

120

120

0

-5 Figure 7.Seasonality Seasonality and trend components of the channels. Figure 7.48 and of24 theGSM GSM 24 72 96 trend 120 components 0 48 channels. 72 96 Time(h)

120

10 Time(h) 5 Seasonal medium channel measurement 0 15

Time(h)

120

Seasonality and trend components of the channels. Delay difference s,Figure which7. for this event is selected as five (∆GSM 5 ), was equivalent to the number of days of the week in which the signal was stationary [15]. Applying the augmented Dickey–Fuller test [36], in the series of three channels from Monday to Friday, the null hypothesis of unit root is rejected, which indicates stationarity. In order to find the parameters of SARIMA(p,d,q)(P,D,Q)s model, ACF and PACF were calculated for ∆5 of respective channels, as shown in Figure 8.

Algorithms 2016, 9, 82 Algorithms 2016, 9, 82

7 of 18 7 of 18

Autocorrelation

5

10 15 20 Lag Medium Channel Autocorrelation Function 0 -0.2 -0.4 5

10 15 20 Lag High Channel Autocorrelation Function 0 -0.2 -0.4 5

10 Lag

15

20

Partial Autocorrelation

Low Channel Autocorrelation Function 0 -0.2 -0.4

Low Channel Partial Autocorrelation Function 0 -0.2 -0.4 5 10 15 20 Lag Medium Channel Partial Autocorrelation Function 0 -0.2 -0.4 5 10 15 20 Lag High Channel Partial Autocorrelation Function 0 -0.2 -0.4 5 10 15 20 Lag

Figure channels. Figure 8. 8. Simple Simple and and partial partial autocorrelation autocorrelation for for GSM GSM channels.

Using Box-Jenkins methodology [23], Figure 8 shows that PACF of ∆5 decays to zero with a Using Box-Jenkins methodology [23], Figure 8 shows that PACF of ∆5 decays to zero with seasonal pattern, and crosses confidence level initially in lag 5 for negative side. This suggests that a a seasonal pattern, and crosses confidence level initially in lag 5 for negative side. This suggests that term non-seasonal AR(1) could be used, and a seasonal MA(5) could be added. a term non-seasonal AR(1) could be used, and a seasonal MA(5) could be added. In order to avoid forecast overestimation (small variance and big errors), the Akaike In order to avoid forecast overestimation (small variance and big errors), the Akaike information information criterion (AIC) [37] was selected to evaluate different reasonable combinations, as is criterion (AIC) [37] was selected to evaluate different reasonable combinations, as is observed in Table 2. observed in Table 2. Thus, selected models were: SARIMA(1,0,5)(1,0,1)5, SARIMA(1,0,5)(0,0,1)5 and Thus, selected models were: SARIMA(1,0,5)(1,0,1)5 , SARIMA(1,0,5)(0,0,1)5 and SARIMA(1,0,5)(0,0,1)5 , SARIMA(1,0,5)(0,0,1)5, for occupancy levels of low, medium and high channels, respectively, and the for occupancy levels of low, medium and high channels, respectively, and the characteristic equations, characteristic equations, in the same order are: in the same order are: (7) (1 − 0.0135 )(1 − 0.55  )(1 − )(1  − ) = (1  − 0.997 )(1   − 0.546 ) 5 5 5 5 1 − 0.546B et (7) (1 − 0.0135B) 1 − 0.55B (1 − B) 1 − B xt = 1 − 0.997B (8) (1 − 0.0192 )(1 + 0.996 )(1 − )(1 − ) = (1 + 0.0085 )       (8) (1 − 0.0192B) 1 + 0.996B5 (1 − B) 1 − B5 xt = 1 + 0.0085B5 et (9) (1 − 0.0199 )(1 − 0.016 )(1 − )(1 − ) = (1 − 0.994 )       (9) (1 − 0.0199B) 1 − 0.016B5 (1 − B) 1 − B5 xt = 1 − 0.994B5 et Table 2. Akaike information criterion (AIC) values for different seasonal autoregressive integrated moving average (SARIMA) models. Table 2. Akaike information criterion (AIC) values for different seasonal autoregressive integrated Low Occupancy Medium Occupancy High Occupancy moving average (SARIMA) models.

p

d

q

1 1 1 1

0p 0 11 01

5 d0 5 1 5 00 5 01

1 1

P

1 0

D

Q

0q 0 05 05

1 P 0 1 0 1 1

5 5

0 1

Channel AIC Channel AIC Low Occupancy Medium −8.24 −30.6 Occupancy D Q Channel AIC Channel AIC −8.3 −32.7 0 −14.1 1 −8.24 −46.9 −30.6 0 −8.19 0 −8.3 −32.6 −32.7 0 0

3.2. Design of GARCH Algorithm

1 1

−14.1 −8.19

−46.9 −32.6

Channel AIC High−50.82 Occupancy Channel −51.7 AIC

− 50.82 −76.2 −51.7 −50.9 −76.2 −50.9

When of analyzing in detail the large amount of acquired information, the existence of standard 3.2. Design GARCH Algorithm deviation was observed; therefore the GARCH algorithm was used to forecast the behavior of When analyzing in detail the large amount of acquired information, the existence of standard measured series. Stochastic models ARIMA and SARIMA are methods for univariate modeling. The deviation was observed; therefore the GARCH algorithm was used to forecast the behavior of measured main difference among former models and GARCH model lies in the constant variance assumption. series. Stochastic models ARIMA and SARIMA are methods for univariate modeling. The main Even though for the developed algorithm there is stationarity in original signal from Monday to difference among former models and GARCH model lies in the constant variance assumption. Friday, for this case the fifth difference is developed because there is a greater degree of stationarity. Even though for the developed algorithm there is stationarity in original signal from Monday to In Figure 9 the difference for each channel is presented. Channel measurements are converted into Friday, for this case the fifth difference is developed because there is a greater degree of stationarity. returns by logarithmic transformation. The logarithmic returns are defined in Equation (10), =

(10)

Algorithms 2016, 9, 82

8 of 18

In Figure 9 the difference for each channel is presented. Channel measurements are converted into returns by logarithmic transformation. The logarithmic returns are defined in Equation (10), rt = ln

Algorithms 2016, 9, 82

Pt Pt−1

8 of 18

(10)

wherewhere Pt is power value in time t and PtP−t−11 is power powervalue valueinintime time Pt is power value in time t and t−1.t−1 .

Figure 9. Fifth difference of measured powers in channels of GSM band.

Figure 9. Fifth difference of measured powers in channels of GSM band.

Now we present a formal statistical test in order to establish the presence of ARCH effects in the

Now we correlation. present a formal statistical order establish the presence of as ARCH effects in the data and H = 0 implies that test thereinexist no to significant correlation as well H = 1 indicates that correlation. there existsHa= significant correlation. In no Tables 3 and correlation 4, all the as p well values show that data and 0 implies that there exist significant as H = 1 indicates Ljung-Box-Pierce Q-Test and Engle ARCH Test in lag 10, 15 and 20 are significant, revealing the that there exists a significant correlation. In Tables 3 and 4, all the p values show that Ljung-Box-Pierce presence of ARCH effects (heteroskedasticity), indicating that GARCH modeling is appropriate. Q-Test and Engle ARCH Test in lag 10, 15 and 20 are significant, revealing the presence of ARCH effects (heteroskedasticity), indicating that GARCH modeling is appropriate. Table 3. Ljung-Box-Pierce Q-Test for autocorrelation: (at 95% confidence) for GSM channels.

Low Channel Medium Channel High Channel Critical p Table 3. Ljung-Box-Pierce Q-Test for autocorrelation: (at 95% confidence) for GSM channels. H Value Statistical Test Statistical Test Statistical Test Value 10 1 0 725,124 731,923Channel 731,240 18.3 Low Channel Medium High Channel Critical Lag H p Value Statistical Test Statistical Statistical Value 15 1 0 725,136 731,956 Test 731,266Test 24.99 20 725,138 731,996 731,313 31.41 10 1 1 0 0 725,124 731,923 731,240 18.3

Lag

15 1 0 725,136 731,956 731,266 24.99 conditional heteroskedasticity (at 95% confidence)31.41 for 20 Table14. Engle autoregressive 0 725,138 731,996 (ARCH) test: 731,313 GSM channels.

Table 4. Englep autoregressive conditional heteroskedasticity test:Channel (at 95% confidence) for Low Channel Medium Channel(ARCH)High Critical Lag H Value Statistical Test Statistical Test Statistical Test Value GSM channels. 10 1 0 574,940 578,554 576,595 18.3 15 1 0 578,008 581,225Channel 579,079 24.99 Low Channel Medium High Channel Critical Lag H p Value Statistical Test Statistical Statistical Value 20 1 0 578,710 581,829 Test 579,500Test 31.41 10 1 0 574,940 578,554 576,595 18.3 in0 data x1,…, 578,008 xn was determined by computing correlations. done by 15 Dependence 1 581,225 579,079 This was 24.99 representing 20 1 the ACF. 0 578,710 581,829 579,500 31.41 If the time series is the result of a completely random phenomenon, the autocorrelation should be close to zero for all time-lag separations. Otherwise, one or more of the autocorrelations will be Dependence in data from x1 , . . zero. . , xn Another was determined correlations. Thisseries was isdone significantly different useful waybytocomputing examine dependencies of the to by representing thePACF, ACF. where the dependence of intermediate elements (those within the lag) is revise the Ifeliminated. the time series is the completely random autocorrelation In Figure 10, result graphsof ofaACF, PACF and ACF ofphenomenon, square returnsthe present the existence should of correlation data channel separations. occupancy. Otherwise, one or more of the autocorrelations will be be close to zeroin for all of time-lag

significantly different from zero. Another useful way to examine dependencies of the series is to revise the PACF, where the dependence of intermediate elements (those within the lag) is eliminated.

Algorithms 2016, 9, 82

9 of 18

In Figure 10, graphs of ACF, PACF and ACF of square returns present the existence of correlation in Algorithms 2016, 9, 82 9 of 18 data of channel occupancy.

Figure10. 10.Correlation Correlationgraphs graphs for for GSM GSM band Figure bandchannels. channels.

Below, in Tables 5–7, the evaluation and selection of the GARCH model for each channel was Below, in Tables 5–7, the evaluation and selection of the GARCH model for each channel performed. was performed. Table 5. Generalized autoregressive conditional heteroskedasticity (GARCH) model comparison for Table 5. Generalized autoregressive conditional heteroskedasticity (GARCH) model comparison for low channel. SMAPE: symmetrical mean absolute percentage error; MAPE: mean absolute low channel. SMAPE: symmetrical mean absolute percentage error; MAPE: mean absolute percentage percentage error; MAE: mean absolute error. error; MAE: mean absolute error.

Bayesian Model

AIC

Model

GARCH(0,1)

GARCH(0,1) GARCH(1,1) GARCH(1,1) GARCH(0,2) GARCH(0,2) GARCH(1,2) GARCH(1,2) GARCH(2,1) GARCH(2,1) GARCH(2,2)

GARCH(2,2)

Bayesian information Information criterion (BIC) Criterion (BIC)

AIC

201,838

201,873

201,838 192,263 192,263 192,622 192,622 192,265 192,265 191,587 191,587 191,581

201,873 192,309 192,309 192,649 192,649 192,299 192,299 191,621 191,621 191,622

191,581

191,622

Standard Standard Error Error

Log SMAPE MAPE Log Likelihood SMAPE MAPE

Likelihood

7.8 × 10−4

7.8 × 10−4 −4 7.82 × 10 7.82 × 10−4 −4−4 7.87.8 ×× 1010 0.0016 0.0016 −4 7.33 ×× 1010 −4 7.33 0.0034

0.0034

96,127.5

96,127.5 96,127.5 96,127.5 96,127.5 96,127.5 96,127.5 96,127.5 96,127.5 96,127.5 96,127.5

96,127.5

−0.0249

0.0253

−0.0249 −0.0249 −0.0249 −0.0248 −0.0248 −0.0244 −0.0244 −0.0251 −0.0251 −0.0243

0.0253 0.0253 0.0253 0.0252 0.0252 0.0248 0.0248 0.0255 0.0255 0.0247

−0.0243

0.0247

MAE MAE

2.3606 2.3606 2.3604 2.3604 2.3492 2.3492 2.3075 2.3075 2.3792 2.3792 2.3060 2.3060

Table 6. GARCH model comparison for medium channel. Table 6. GARCH model comparison for medium channel.

Model Model

AIC AIC

BIC BIC

GARCH(0,1)876,834 876,834 GARCH(0,1) GARCH(1,1)844,089 844,089 GARCH(1,1) GARCH(0,2) GARCH(0,2)844,984 844,984 GARCH(1,2) GARCH(1,2)844,091 844,091 GARCH(2,1) 843,470 GARCH(2,1) 843,470 GARCH(2,2) 843,472 GARCH(2,2)

Standard Error Log Log LikelihoodSMAPE SMAPE MAPE MAPE Standard Error Likelihood

876,854 876,854 844,117 844,117 845,012 845,012 844,125 844,125 843,504 843,504 843,513

843,472

843,513

4 −4 × −10 7.6 7.6 × 10 4 −4 × −10 6.6 6.6 × 10 − 4 −4 6.6 6.6 × 10 × 10 0.0012 0.0012 6.0 × 10−4 −4 6.0 × −10 5.0 × 10 4

5.0 × 10−4

422,041 422,041 422,041 422,041 422,041 422,041 422,041 422,041 422,041 422,041 422,041 422,041

−0.0374 −0.0374 −0.0427 −0.0427 −0.0375 −0.0375 −0.0411 −0.0411 −0.0410 −0.0410 −0.0434 −0.0434

MAE MAE

0.0393 0.0393 0.0440 0.0440 0.0395 0.0395 0.0429 0.0429 0.0427 0.0427 0.0452

3.4198 3.4198 3.8676 3.8676 3.4385 3.4385 3.7699 3.7699 3.7531 3.7531 3.9895 3.9895

MAPE

MAE

0.0452

Table 7. GARCH model comparison for high channel. Table 7. GARCH model comparison for high channel. Model

Model

AIC

AIC

BIC

BIC

Standard Error Standard

Log Likelihood Log

Error × 10−4

608,609 Likelihood 608,609 608,609 608,609 608,609 608,609 608,609 608,609 608,609 608,609

608,609 608,609

GARCH(0,1) GARCH(1,1) GARCH(0,1) GARCH(0,2) GARCH(1,1) GARCH(1,2) GARCH(0,2) GARCH(2,1) GARCH(2,2) GARCH(1,2)

1,223,114 1,217,225 1,223,114 1,220,306 1,217,225 1,217,227 1,220,306 1,214,308 1,214,310 1,217,227

1,223,135 1,217,252 1,223,135 1,220,333 1,217,252 1,217,261 1,220,333 1,214,343 1,214,352 1,217,261

7.8 −4 6.6 × ×1010 −4 7.8 6.7 × 10−4−4 6.6 × 10 5.3 × 10−4 −4−4 6.7 6.5 × ×1010 −4−4 5.4 × ×1010 5.3

GARCH(2,1) GARCH(2,2)

1,214,308 1,214,310

1,214,343 1,214,352

6.5 × 10−4 5.4 × 10−4

SMAPE

SMAPE

MAPE

−0.0540 −0.0620

0.0570 0.0675

−0.0514 0.0542 −0.0551 −0.0514 0.0580 0.0542 −0.0534 0.0557 −0.0551 0.0580 −0.0566 0.0591 −0.0534 0.0570 0.0557 −0.0540 −0.0620 −0.0566 0.0675 0.0591

MAE

4.6565 5.0138 4.6565 4.7957 5.0138 5.1279 4.7957 4.9224 5.9397 5.1279

4.9224 5.9397

Algorithms 2016, 9, 82

10 of 18

The GARCH model selection for each channel was done by fulfilling αi + β i < 1 criterion, so the model is stationary, and then taking into account the more proximate values to zero of MAE, MAPE and SMAPE from Tables 5–7. Therefore, the selected models for low, medium and high channel are GARCH(2,2), GARCH(0,2) and GARCH(0,1), respectively. Parameters for low channel model were estimated and are presented in Table 8. GARCH(2,2), where α1 + α2 + β 1 + β 2 < 1 is fulfilled. Table 8. Parameters estimation for low channel model. Parameter

Estimated Value

Standard Error

t Value

µ α0 GARCH(1) GARCH(2) ARCH(1) ARCH(2)

−96.112 0.003516 0.098255 0.90062 0.00029573 0

0.0019308 0.00041447 0.19212 0.19201 0.00018772 0.00020886

−49,778.3308 8.4833 0.5114 4.6905 1.5753 0

Thus, the model according to Table 8 is presented in Equations (11) and (12), rt = −96.112 + et

(11)

σt2 = 0.003516 + 0.098255σt2−1 + 0.90062σt2−2 + 0.00029573et2−1

(12)

For medium channel, GARCH(0,2), model values presented in Table 9 are estimated. Table 9. Parameters estimation for medium channel model. Parameter

Estimated Value

Standard Error

t Value

µ α0 ARCH(1) ARCH(2)

−95.061 5 0.085692 0.088298

0.0024331 0.012924 0.0010392 0.0010582

−39,069.8019 386.8834 82.4572 83.4378

Therefore, Equations (13) and (14) are obtained, rt = −95.061 + et

(13)

σt2 = 5 + 0.085692et2−1 + 0.088298et2−2

(14)

For high channel, GARCH(0,1), the following parameters were obtained, as shown in Table 10. Table 10. Parameters estimation for high channel model. Parameter

Estimated Value

Standard Error

t Value

µ α0 ARCH(1)

−94.585 5 0.86058

0.0026236 0.015341 0.0044771

−36,051.8702 325.9324 192.2169

Then the model is described in Equations (15) and (16), rt = −94.585 + et

(15)

σt2 = 5 + 0.86058et2−1

(16)

Algorithms 2016, 9, 82

11 of 18

ARCH-GARCH model analysis is based on evaluation of standardized residuals [31]. One assumption white Algorithms 2016, Algorithms 2016, 9, 9, 82 82 with GARCH model is that for a good model, residuals should follow a 11 11 of of 18 18 noise process. This is to say that it is expected that residuals be at random, independent and identically distributed, following aa normal distribution. 11 the between distributed, a normal distribution. FigureFigure 11 presents the relationship between innovations distributed,following following normal distribution. Figure 11 presents presents the relationship relationship between innovations (residuals) derivate from adjusted model, the corresponding conditional standard (residuals) derivate from adjusted model, the corresponding conditional standard deviations and innovations (residuals) derivate from adjusted model, the corresponding conditional standard deviations and Figure shows that innovations and exhibit In returns. Figure 11 shows that11 both innovations returns exhibit variations. In the following deviations and returns. returns. Figure 11 shows that both bothand innovations and returns returns exhibit variations. variations. In the the following intend find out the of we intend we to out to if performing GARCH theGARCH autocorrelation of the standardized innovations following wefind intend toby find out ifif by by performing performing GARCH the autocorrelation autocorrelation of the the standardized standardized innovations disappears, would indicate of disappears, wouldwhich indicate the effectiveness of GARCH model. innovationswhich disappears, which would indicate the the effectiveness effectiveness of GARCH GARCH model. model.

Figure of GSM channels. Figure 11. 11. Innovations, Innovations, conditional conditional standard standarddeviations deviationsand andreturns returnsof ofGSM GSMchannels. channels.

Figure 12 corresponds to the autocorrelation of the squared standardized innovations, in which Figure12 12corresponds correspondsto tothe theautocorrelation autocorrelationof ofthe thesquared squaredstandardized standardizedinnovations, innovations,in inwhich which Figure correlation was not observed. correlationwas wasnot notobserved. observed. correlation

Figure 12. of the squared standardized innovations of GSM channels. Figure 12. 12. Autocorrelation Autocorrelation of of the the squared squaredstandardized standardizedinnovations innovationsof ofGSM GSMchannels. channels. Figure Autocorrelation

In In Tables Tables 11 11 and and 12, 12, results results of of Ljung-Box-Pierce Ljung-Box-Pierce Q-Test Q-Test and and Engle Engle ARCH ARCH test test for for later later analysis analysis are are In Tables 11 and 12, results of Ljung-Box-Pierce Q-Test and Engle ARCH test for later analysis presented presented using using standardized standardized innovations. innovations. These These tests tests indicate indicate no no presence presence of of correlation correlation or or ARCH ARCH are presented using standardized innovations. These tests indicate no presence of correlation or effects. effects. We We have have GARCH GARCH effects effects and and also also correlation correlation between between innovations innovations that that disappear disappear after after ARCH effects. We have GARCH effects and also correlation between innovations that disappear after treating the data. Therefore, the GARCH model is a proper model for explaining the variances of treating the data. Therefore, the GARCH model is a proper model for explaining the variances of the the three three channels. channels.

Algorithms 2016, 9, 82

12 of 18

treating the data. Therefore, the GARCH model is a proper model for explaining the variances of the three channels. Algorithms 2016, 9, 82

12 of 18

Table 11. Ljung-Box-Pierce Q-Test in standardized innovations for GSM channels. Table 11. Ljung-Box-Pierce Q-Test in standardized innovations for GSM channels. Medium Low Low Medium Channel H Channel Channel p Channel p p Value p Value Value Value 0 0.424 0.402 0.424 0.402 0 0.7014 0.6883 0.7014 0.6883 0 0.947 0.876 0.947 0.876

Lag Lag H 10 10 0 15 15 20 0 20 0

High High Medium Low Channel High Channel Low ChannelMedium Channel High Channel Critical Critical Channel Statistical Test Statistical Test Value Channel p Statistical Test Channel p Value Statistical Test Statistical Test Value Value Statistical Test 0.701 25,787 26,701 33,455 18.3 0.701 25,787 26,701 33,455 18.3 0.8236 26,447 28,617 37,143 24.99 0.8236 26,447 28,617 37,143 24.99 0.9355 26,945 30,313 40,772 31.41 0.9355 26,945 30,313 40,772 31.41

Table 12. Engle ARCH test in standardized innovations for GSM channels. Table 12. Engle ARCH test in standardized innovations for GSM channels. Medium Low Low Medium Channel H Channel Channel p Channel p p Value Valuep Value Value

LagLagH 10 10 0 15 15 0 20 20 0

0 0.539 0.539 0 0.776 0.776 0 0.908 0.908

0.479 0.479 0.7144 0.7144 0.863 0.863

High High Medium LowLow Channel High Channel ChannelMedium Channel High Channel Critical Critical Channel Channel p Statistical Test Channel Statistical Test Statistical TestTest Value Statistical Test Statistical Value p Value Value Statistical Test 0.6212 0.6212 0.7697 0.7697 0.8841 0.8841

26,930 26,930 27,432 27,432 27,792 27,792

27,093 27,093 28,443 28,443 29,443 29,443

33,757 33,757 36,248 36,248 38,240 38,240

18.318.3 24.99 24.99 31.41 31.41

Normality verification was performed performed by analyzing analyzing histograms histograms of residuals residuals and and normal normal Normality probability graph, graph, as as shown shown in in Figure Figure 13. 13. The histograms of the three channels channels shows that that the the probability residuals are are normally normally distributed. distributed. In turn, the probability graph confirms that that residuals residuals respond respond to to residuals normal distribution, distribution, since since most most of of data data are are spread spreadalong alongthe thestraight straightline. line. aa normal

10000

5000 0 -6

-4

-2

0 2 4 Data Histogram of residuals of high channel

6

5000 0 -6

-4

-2

0 Data

2

4

6

Probability

10000

0 5 Data Histogram of residuals of medium channel

Probability

Frequency

0 -5

0.999 0.50 0.001

0.999 0.50 0.001

Probability

Normal probability of low channel

5000

Frequency

Frequency

Histogram of residuals of low channel

0.999 0.50 0.001

-10

-10

-10

-5

0 5 10 Data Normal probability of medium channel

-5

0 5 10 Data Normal probability of high channel

-5

0 Data

5

10

and normal normal probability probability for for GSM GSM channels. channels. Figure 13. Histogram of residuals and

4. Results Results and and Discussion Discussion 4. In Figure Figure 14 14 an an example example is is displayed displayed where where there there is is application application of of the the designed designed time time series series In algorithms. Here, Here, the the interaction interaction between between the the CR CR user user and and the the primary primary base base station station (BS) (BS) is is shown shown by by algorithms. received power power from from the the primary primary transmitter. transmitter. This This is is represented represented by by the the oval oval and and the the direction direction of of the the received arrows. The The CR CR user user can can forecast forecast the the power power level level itit will will receive receivefrom fromthe theprimary primaryBS. BS. arrows. In the theexample exampleofof Figure in order to analyze the SARIMA and GARCH algorithms, the In Figure 14, 14, in order to analyze the SARIMA and GARCH algorithms, the forecast forecast of the power is performed by the CR user, making a comparison with the spectrum analyzer of the power is performed by the CR user, making a comparison with the spectrum analyzer in which in which the measurements wereHowever, made. However, this depends on the architecture of CR deployed the measurements were made. this depends on the architecture of CR deployed in the in the environment. to the processor and power consumption beinglimited more limited in the CR environment. Due toDue the processor and power consumption being more in the CR user’s user’s computer, use of infrastructure architecture is recommended, where the forecast is carried out computer, use of infrastructure architecture is recommended, where the forecast is carried out by the by the CR BS. This provides a better processor than that of the CR user, and has no limitations on power consumption. However, there is a time period between data capture in the environment and the processing, which adds a delay to the response. This must not be ignored, but the forecast helps to reduce the negative impact of the delayed response.

Algorithms 2016, Algorithms 2016, 9, 9, 8282

13 of 1318 of 18

The analysis of the precision of the forecast made with the SARIMA and GARCH algorithms is CRpresented, BS. This as provides better than thatalgorithm of the CR user, and has no limitations power follows. a Figure 15processor shows the SARIMA forecasts obtained from Equationson (7)–(9), consumption. However, there based is a time period between data capture in the environment and the and from GARCH algorithm on Equations (11)–(16). This was contrasted with the power measured which data of adds Fridaya from p.m.response. to 6:00 p.m. This period chosen since this time an to processing, delay5:00 to the This must notwas be ignored, but during the forecast helps increased use of theimpact channels by PUs was perceived. reduce the negative of the delayed response. Algorithms 2016, 9, 82

13 of 18

The analysis of the precision of the forecast made with the SARIMA and GARCH algorithms is presented, as follows. Figure 15 shows the SARIMA algorithm forecasts obtained from Equations (7)–(9), and from GARCH algorithm based on Equations (11)–(16). This was contrasted with the power measured data of Friday from 5:00 p.m. to 6:00 p.m. This period was chosen since during this time an increased use of the channels by PUs was perceived.

Figure 14. Example of application to forecast the received power from the base station (BS). Figure 14. Example of application to forecast the received power from the base station (BS). CR: CR: cognitive radio. cognitive radio. Power (dBm)

Low channel measurement

Power (dBm)

Power Power (dBm) (dBm)Power Power (dBm) (dBm)

The-60analysis Real of the precision of the forecast made with the SARIMA and GARCH algorithms SARIMA -80 is presented, as follows. Figure 15 shows the SARIMA algorithm forecasts obtained from GARCH -100 Equations (7)–(9), and from GARCH algorithm based on Equations (11)–(16). This was contrasted with 0 10 20 30 40 50 60 Figure 14. Example of to 5:00 forecast the received from thewas basechosen stationsince (BS). during the power measured data of application Friday from p.m. to 6:00 p.m.power This period Time (min) CR:an cognitive radio. this time increased use of the channelsMedium by PUs wasmeasurement perceived. channel -50

-60 -100 -80 0 -100

Real SARIMA GARCH Real SARIMA GARCH

0 -50 -100 -50 -150 0 -100 0

Low channel measurement 10 10

20 20

30

40

50

60

40

50

60

40

50

60

40

50

60

Time (min) Medium channel measurement

Real SARIMA GARCH Real SARIMA GARCH

30

Time (min) High channel measurement

10

20

30

Time (min) 10

20

30

Figure 15. GSM channel series and forecastTime series with SARIMA and GARCH algorithms. (min) High channel measurement

In Figures Real 16 and 17, availability and occupancy times of the measured and forecast channels -50 SARIMA are presented. Availability time allows us to analyze the precision with which SUs could use GARCH -100 availability time in GSM channels for a CR system. In the same way, occupancy time examines the -150 0 20 30 40 50 60 precision during time 10 in which PUs use GSM channels. Average precisions obtained between actual Time (min) and forecast data for availability times were: 82%, 54% and 60%, for the SARIMA algorithm; and Figure 15.GSM GSM channel series and and forecast forecast corresponding series and 31%, 30% and 15. 43%, forchannel the GARCH algorithm, to channels withalgorithms. low, medium and Figure series series with withSARIMA SARIMA andGARCH GARCH algorithms. high occupation, respectively. Average precisions for occupation times between real data and In Figures and 17, availability andand occupancy times of the measured channels forecast data are16equivalent to 58%, 77% 78% for the algorithm;and andforecast 44%, 46.6% and In Figures 16 and 17, availability and occupancy timesSARIMA of the measured and forecast channels are are presented. Availability time corresponding allows us to analyze the with precision with which SUs occupancy could use 44.2%, for the GARCH algorithm, to channels low, medium and high presented. Availability time allows us to analyze theIn precision which SUs could use availability availability time in GSM channels forexpected, a CR system. the samewith way, time examines the levels, respectively. Additionally, as for each algorithm thereoccupancy is an inversely proportional time in GSM channels for a CR system. In the same way, occupancy time examines the precision during precision during time in which PUs use GSM channels. Average precisions obtained between actual relationship between channel occupancy and availability time, as well as a directly proportional time which PUs GSM channels. Average precisions obtained between actual and forecast data andinforecast datause for occupancy availability times were: 82%, 54% and 60%, SARIMA algorithm; and relationship between probability and occupancy time of for the the channels. for31%, availability 82%, 54% and 60%, forcorresponding the SARIMA algorithm; 31%, and 43%, 30% andtimes 43%,were: for the GARCH algorithm, to channelsand with low,30% medium andfor thehigh GARCH algorithm, corresponding to channels with low, medium and high occupation, respectively. occupation, respectively. Average precisions for occupation times between real data and Average for occupation times data and forecast data are 58%, forecastprecisions data are equivalent to 58%, 77%between and 78% real for the SARIMA algorithm; andequivalent 44%, 46.6%to and 77% andfor 78% the SARIMA algorithm; and 44%, 46.6% with and low, 44.2%, for the GARCH algorithm, 44.2%, thefor GARCH algorithm, corresponding to channels medium and high occupancy levels, respectively. Additionally, as expected, for each algorithm there is an inversely proportional relationship between channel occupancy and availability time, as well as a directly proportional relationship between occupancy probability and occupancy time of the channels.

Algorithms 2016, 9, 82

14 of 18

corresponding to channels with low, medium and high occupancy levels, respectively. Additionally, as expected, for each algorithm there is an inversely proportional relationship between channel occupancy and availability time, as well as a directly proportional relationship between occupancy probability and time of the channels. Algorithms 2016,occupancy 9, 82 14 of 18 Algorithms 2016, 9, 82

14 of 18

Time(s) Time(s)

Availability Time Availability Time 450 450 400 400 350 350 300 300 250 250 200 200 150 150 100 100 50 50 0 0

GARCH GARCH SARIMA SARIMA Real Real

Low channel Low channel

Medium channel Medium channel Channel Channel Figure 16. Availability time of Figure 16.16.Availability offorecasted forecastedchannels. channels. Figure Availability time time of forecasted channels. Occupancy Time Occupancy Time

Time(s) Time(s)

2.5 2.5

High channel High channel

GARCH GARCH SARIMA SARIMA Real Real

2 2 1.5 1.5 1 1 0.5 0.5

Low channel Low channel

Medium channel Medium channel Channel Channel Figure 17. Occupancy time of forecasted channels. Figure 17. Occupancy time of forecasted channels.

High channel High channel

Figure 17. Occupancy time of forecasted channels. In Table 13 forecast and measured data are compared to different methods for error estimation In Table 13 forecast and measured data are compared to different methods for error estimation such as SMAPE, MAPE andmeasured MAE. Results Table 13 point that only in data forecastfor for the medium In Table 13 forecast and dataof compared to different methods estimation such as SMAPE, MAPE and MAE. Results ofare Table 13 point that only in data forecast forerror the medium occupancy channel, the GARCH algorithm presents smaller errors than the SARIMA algorithm. algorithm errorsonly thaninthe SARIMA algorithm. such occupancy as SMAPE,channel, MAPEthe andGARCH MAE. Results ofpresents Table 13smaller point that data forecast for the medium

occupancy channel, the GARCH algorithm presents smaller errors than the SARIMA algorithm. Table 13. Error variables comparison for forecasted values. Table 13. Error variables comparison for forecasted values.

Channel SMAPESMAPEMAPEMAPEMAEMAETable 13. Error variables comparison for forecasted values. Channel SMAPESMAPEMAPEMAPEMAEMAEOccupancy SARIMA GARCH SARIMA GARCH SARIMA GARCH Occupancy SARIMA GARCH SARIMA GARCH SARIMA GARCH Low −0.0170 −0.0243 0.0172 0.0247 1.6042 2.306 LowChannel −0.0170SMAPE-−0.0243SMAPE- 0.0172 0.0247 1.6042 2.306 MAPEMAPEMAEMAEMedium −0.0470 −0.0375 0.0466 0.0395 4.2987 3.4385 Medium 0.0395 4.2987 GARCH 3.4385 Occupancy−0.0470SARIMA−0.0375GARCH 0.0466 SARIMA GARCH SARIMA High −0.0488 −0.0514 0.0497 0.0542 4.4195 4.6565 High −0.0488 −0.0514 0.0497 0.0542 4.4195 4.6565

Low −0.0170 −0.0243 0.0172 0.0247 1.6042 2.306 Medium of performance −0.0470 in forecast −0.0375is shown 0.0466 0.0395 4.2987 3.4385 with Comparison in Figure 18, developed on a computer Comparison of performance in forecast is shown in Figure 18, developed on a computer with 0.0488 0.0514 0.0497 0.0542 4.4195 dual-coreHigh processor 2.4 − GHz and 4 GB−of random access memory (RAM) memory. Here4.6565 is observed dual-core processor 2.4 GHz and 4 GB of random access memory (RAM) memory. Here is observed that in general, for each model, the higher the observation time the lower the prediction error. that in general, for each model, the higher the observation time the lower the prediction error. However, this entails no significance. Prediction error is lower in forecast of GARCH algorithms, but However, this entails no significance. Prediction error is lower in forecast of GARCH algorithms, but

Algorithms 2016, 9, 82

15 of 18

Comparison of performance in forecast is shown in Figure 18, developed on a computer with dual-core processor 2.4 GHz and 4 GB of random access memory (RAM) memory. Here is observed that in general, for each model, the higher the observation time the lower the prediction error. However, Algorithms 2016, 9, 82 15 of this entails no significance. Prediction error is lower in forecast of GARCH algorithms, but a 18 longer observation time in connection to SARIMA algorithm forecast is still necessary. Analyzing the a longer observation time in connection to SARIMA algorithm forecast is still necessary. Analyzing experimental results and considering the best of the cases, the SARIMA algorithm reduces the error the experimental results and considering the best of the cases, the SARIMA algorithm reduces the to 7.8% when the observation time increases 177.1% 177.1% for the for high channel. The GARCH error to 7.8% when the observation time increases theoccupancy high occupancy channel. The algorithm wanes in error about 15.3%, with anwith increase in theinobservation time of of 128% GARCH algorithm wanes in error about 15.3%, an increase the observation time 128%for forthe the high occupancy channel. In both the ARIMA GARCH algorithms, a training day to day achieve acceptable high occupancy channel. In both the and ARIMA and GARCH algorithms, a training to achieve prediction errors in the three sufficient according to thetoexperimental results. acceptable prediction errorsGSM in the channels three GSMis channels is sufficient according the experimental results. 8

Low channel SARIMA Low channel GARCH Medium channel SARIMA Medium channel GARCH High channel SARIMA High channel GARCH

Prediction Error (Pe)

7

6

5

4

3

2 0

10

20

30

Observation Time (s)

40

50

60

Figure 18. Prediction error vs. Observation time.

Figure 18. Prediction error vs. Observation time.

For the analysis of training, Tables 14–16 display the mean squared error for the forecast of

For the analysis of the training, Tables 14–16 display the with meanupsquared erroroffor the forecast reception power for SARIMA and GARCH algorithms, to five days training data. of Thesepower results, for andthe Figure 18, suggest one training day in the SARIMA reception SARIMA andthat GARCH algorithms, with up to and fiveGARCH days ofalgorithms training data. sufficient to obtain error.one training day in the SARIMA and GARCH algorithms is Theseisresults, and Figurean 18,acceptable suggest that sufficient to obtain an acceptable error. Table 14. Result of mean squared error for low channel with different number of training days.

Table 14. of Result ofSARIMA mean squared low channel number of training days. Number Meanerror for GARCH Mean with different SARIMA GARCH Training Days Squared Error Squared Error Processing Time Processing Time Number of SARIMA GARCH SARIMA GARCH 1 18.64 Mean 25.48Mean 3.88 s 12.16 s Training Squared Squared Processing Processing 2 Days 17.9 Error 25.34Error 3.52 s Time 18.57 sTime

31 18.29 24.51 4.25 ss 34.38 ss 18.64 25.48 3.88 12.16 42 17.53 24.82 5.92 s 41.42 ss 17.9 25.34 3.52 s 18.57 18.29 24.51 4.25 34.38 53 17.17 23.76 7.65 ss 55.59 ss 4 17.53 24.82 5.92 s 41.42 s 5 15. Result of mean17.17 23.76channel with different 7.65 snumber of training 55.59 s Table squared error for medium days. Number of SARIMA Mean GARCH Mean SARIMA GARCH Table 15. Result of mean squared error for medium channel with different number of training days. Training Days Squared Error Squared Error Processing Time Processing Time 1 47.52 38.01 4.06 s 8.61 s Number of SARIMA GARCH SARIMA GARCH 2 45.19 Mean 38.37Mean 4.28 s 11.15 s Training Days Squared Error Squared Error Processing Time Processing Time 3 44.94 37.15 5.36 s 11.38 s 47.52 38.01 4.06 8.61 ss 41 42.38 36.68 6.73 ss 14.47 45.19 38.37 4.28 11.15 52 41.42 36.85 8.29 ss 18.55 ss 3 44.94 37.15 5.36 s 11.38 s 4 42.38 36.68 6.73 s 14.47 s 5 41.42 36.85 8.29 s 18.55 s

Algorithms 2016, 9, 82

16 of 18

Table 16. Result of mean squared error for high channel with different number of training days. Number of Training Days

SARIMA Mean Squared Error

GARCH Mean Squared Error

SARIMA Processing Time

GARCH Processing Time

1 2 3 4 5

50.69 48.35 49.04 46.51 44.96

56.77 59.8 53.95 51.56 48.28

3.79 s 3.96 s 4.18 s 4.82 s 6.47 s

7.57 s 9.08 s 10.61 s 14.33 s 15.83 s

5. Conclusions The SARIMA and GARCH algorithms have been evaluated in this paper in order to forecast the reception power in channels of a GSM band. Even though GARCH algorithm presented lower prediction errors than SARIMA algorithm, the use of a SARIMA algorithm is more convenient for a CR system, because it has higher precisions with respect to availability and occupancy times, with which the use of spectrum efficiency is improved and the interference level and collisions between PUs and SUs will be reduced. Additionally, the SARIMA algorithm employs lower observation times than the GARCH algorithm. As noted, for the best of cases, observation times lower than four seconds could be obtained for the three GSM channels, which is an advantage in practical CR systems. For a CR system, the forecast developed in the GSM band could help to improve the use of spectral efficiency, since it would allow CR users to share channels and avoid collisions with PUs in the found opportunities. The SARIMA and GARCH algorithms forecast not only the reception power; but the occupation and availability times for GSM channels. It would also be feasible to use the training data from one day for the forecast of a CR user’s received power from a primary BS. The significance of the forecast of received power is that CR users can save energy in the process of detecting the spectrum and take advantage of spectral opportunities, thereby increasing the rate of successful transmission and transmission opportunities, reducing the time to find an available channel, and adjusting transmission power levels to protect against collisions and interference with the PUs. Acknowledgments: This study was supported by Colciencias (Administrative Department of Science, Technology and Innovation of Colombia), Universidad Distrital Francisco José de Caldas and Universidad Nacional de Colombia. Author Contributions: The SARIMA algorithm was developed by Luis Pedraza, GARCH algorithm was implemented by Cesar Hernandez, Ingrid Paez designed the presentation of results, Jorge Ortiz developed the results and Rodriguez-Colina analyzed the results. All authors read and approved the final manuscript. Conflicts of Interest: The authors declare no conflict of interest.

References 1. 2. 3.

4. 5.

Pedraza, L.; Forero, F.; Paez, I. Evaluación de ocupación del espectro radioeléctrico en Bogotá-Colombia. Ingeniería Ciencia 2014, 10, 127–143. (In Spanish) [CrossRef] Pedraza, L.; Hernandez, C.; Paez, I. Evaluation of nonlinear forecasts for radioelectric spectrum. Int. J. Eng. Technol. 2016, 8, 1611–1626. Gorcin, A.; Celebi, H.; Qaraqe, K.A.; Arslan, H. An autoregressive approach for spectrum occupancy modeling and prediction based on synchronous measurements. In Proceedings of the International Symposium on Personal Indoor and Mobile Radio Communications, Toronto, ON, Canada, 11–14 September 2011; pp. 705–709. Pedraza, L. Redes Inalámbricas Mesh “Caso de Estudio: Ciudad Bolívar”, 1st ed.; Universidad Distrital Francisco José de Caldas: Bogota, Colombia, 2012. Pedraza, L.; Hernandez, C.; Galeano, K.; Rodriguez, E.; Paez, I. Ocupación Espectral y Modelo de Radio Cognitiva Para Bogotá, 1st ed.; Universidad Distrital Francisco José de Caldas: Bogota, Colombia, 2016.

Algorithms 2016, 9, 82

6. 7.

8.

9.

10. 11. 12.

13.

14. 15.

16. 17.

18. 19. 20. 21.

22. 23. 24.

25.

26.

17 of 18

Wellens, M.; Riihijarvi, J.; Mahonen, P. Empirical time and frequency domain models of spectrum use. Phys. Commun. 2009, 2, 10–32. [CrossRef] Song, C.; Chen, D.; Zhang, Q. Understand the predictability of wireless spectrum: A large-scale empirical study. In Proceedings of the International Conference on Communications, Cape Town, South Africa, 23–27 May 2010; pp. 1–5. Sun, Z.; Laneman, J.N.; Bradford, G.J. Sequence detection algorithms for dynamic spectrum access networks. In Proceedings of the IEEE International Symposium on New Frontiers in Dynamic Spectrum, Singapore, 6–9 April 2010; pp. 1–9. Fadda, M.; Popescu, V.; Murroni, M.; Angueira, P.; Morgade, J. On the feasibility of unlicensed communications in the TV white space: Field measurements in the UHF band. Int. J. Digit. Multimed. Broadcast. 2015, 2015, 1–8. [CrossRef] Lopez, M.; Casadevall, F. Time-dimension models of spectrum usage for the analysis, design, and simulation of cognitive radio networks. IEEE Trans. Veh. Technol. 2013, 62, 2091–2104. [CrossRef] Yarkan, S.; Arslan, H. Binary time series approach to spectrum prediction for cognitive radio. In Proceedings of the Vehicular Technology Conference, Baltimore, MD, USA, 30 September–3 October 2007; pp. 1563–1567. Black, T.; Kerans, B.; Kerans, A. Implementation of hidden markov model spectrum prediction algorithm. In Proceedings of the International Symposium on Communications and Information Technologies, Gold Coast, Australia, 2–5 October 2012; pp. 280–283. Li, Y.; Dong, Y.; Zhang, H.; Zhao, H.; Shi, H.; Zhao, X. Spectrum usage prediction based on high-order markov model for cognitive radio networks. In Proceedings of the International Conference on Computer and Information Technology, Bradford, UK, 29 June–1 July 2010; pp. 2784–2788. Yu, C.; He, Y.; Quan, T. Frequency Spectrum Prediction Method Based on EMD and SVR. In Proceedings of the Intelligent Systems Design and Applications, Kaohsiung, Taiwan, 26–28 November 2008; pp. 39–44. Wang, Z.; Salous, S. Time series arima model of spectrum occupancy for cognitive radio. In Proceedings of the Seminar on Cognitive Radio and Software Defined Radios: Technologies and Techniques, London, UK, 18 September 2008; pp. 1–4. Chen, Y.; Oh, H.S. A Survey of Measurement-based Spectrum Occupancy Modeling for Cognitive Radios. IEEE Commun. Surv. Tutor. 2014, 1–36. [CrossRef] Anand, N.C.; Scoglio, C.; Natarajan, B. GARCH—Non-linear time series model for traffic modeling and prediction. In Proceedings of the IEEE Network Operations and Management Symposium, Salvador, Brazil, 7–11 April 2008; pp. 694–697. Tran, Q.; Ma, Z.; Li, H.; Trinh, Q. A Multiplicative Seasonal ARIMA/GARCH Model in EVN Traffic Prediction. Int. J. Commun. Netw. Syst. Sci. 2015, 8, 43–49. [CrossRef] Zhanga, Y.; Fay, D.; Kilmartin, L.; Moore, A. A Garch-based adaptive playout delay algorithm for VoIP. Comput. Netw. 2010, 54, 3108–3122. [CrossRef] Hyndman, R.; Koehler, A.B.; Ord, J.K.; Snyder, R.D. Forecasting with Exponential Smoothing: The State Space Approach, 1st ed.; Springer: Berlin/Heidelberg, Germany, 2008. Stolojescu-Crisan, C. Data mining based wireless network traffic forecasting. In Proceedings of the International Symposium on Electronics and Telecommunications, Timisoara, Romania, 15–16 November 2012; pp. 115–118. Hyndman, R.J. Another look at forecast-accuracy metrics for intermittent demand. Foresight Int. J. Appl. Forecast. 2006, 43–46. Box, G.; Jenkins, G.; Reinsel, C. Time Series Analysis: Forecasting and Control, 4th ed.; Wiley: Hoboken, NJ, USA, 2008. Tran, V.G.; Debusschere, V.; Bacha, S. Hourly server workload forecasting up to 168 hours ahead using Seasonal ARIMA model. In Proceedings of the IEEE International Conference on Industrial Technology, Athens, Greece, 19–21 March 2012; pp. 1127–1131. Permanasari, A.E.; Hidayah, I.; Bustoni, I. SARIMA (Seasonal ARIMA) implementation on time series to forecast the number of Malaria incidence. In Proceedings of the International Conference on Information Technology and Electrical Engineering, Yogyakarta, Indonesia, 7–8 October 2013; pp. 203–207. Pedraza, L.; Hernandez, C.; Rodriguez, E. Modeling of GSM Spectrum Based on Seasonal ARIMA model. In Proceedings of the 6th IEEE Latin-American Conference on Communications, Cartagena, Colombia, 5–7 November 2014; pp. 1–4.

Algorithms 2016, 9, 82

27. 28. 29. 30. 31. 32.

33. 34. 35. 36. 37.

18 of 18

Engle, R. The Use of ARCH/GARCH Models in Applied Econometrics. J. Econ. Perspect. 1982, 15, 157–168. [CrossRef] Bollersleva, T. Generalized autoregressive conditional heteroskedasticity. J. Econom. 1986, 31, 307–327. [CrossRef] Chinomona, A. Time Series Modelling with Application to South African Inflation Data. Master’s Thesis, University of KwaZulu-Natal, Pietermaritzburg, South Africa, 2009. Edward, N. Modelling and Forecasting Using Time Series Garch Models: An Application of Tanzania Inflation Rate Data. Master’s Thesis, University of Dar es-Salaam, Dar es Salaam, Tanzania, 2011. Talke, I. Modelling Volatility in Time Series Data. Master’s Thesis, University of KwaZulu-Natal, Pietermaritzburg, South Africa, 2003. Pedraza, L.; Forero, F.; Paez, I. Metropolitan Spectrum Survey in Bogota Colombia. In Proceedings of the IEEE International Conference on Advanced Information Networking and Applications Workshops, Barcelona, Spain, 25–28 March 2013; pp. 548–553. Lopez, M.; Casadevall, F. Methodological aspects of spectrum occupancy evaluation in the context of cognitive radio. Eur. Trans. Telecommun. 2010, 21, 680–693. [CrossRef] International Telecommunication Union. Report ITU-R SM.2256, Spectrum Occupancy Measurements and Evaluation; ITU: Geneva, Switzerland, 2012. Digham, F.; Alouini, M.S.; Simon, M. On the Energy Detection of Unknown Signals Over Fading Channels. IEEE Trans. Commun. 2007, 55, 21–24. [CrossRef] Dickey, D.A.; Fuller, W.A. Distribution of estimators for autoregressive time series with a unit root. J. Am. Stat. Assoc. 1979, 74, 427–431. Bozdogan, H. Model selection and Akaike’s Information Criterion (AIC): The general theory and its analytical extensions. Psychometrika 1987, 52, 345–370. [CrossRef] © 2016 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/).