28
1 PRONÓSTICO DE SERIES TEMPORALES EN FUNCIÓN DE LA ENERGÍA DE LA SERIE USANDO UN MODELO NO LINEAL AUTO-REGRESIVO BASADO EN RN Disertante: Ing. Carlos Salas. VII Jornadas de Ciencia y Tecnología de Facultades de Ingeniería del NOA, 13 y 14 de Octubre

Presentacion limac-unc

Embed Size (px)

Citation preview

Page 1: Presentacion limac-unc

1

PRONÓSTICO DE SERIES TEMPORALES EN FUNCIÓN DE LA ENERGÍA DE LA SERIE USANDO UN MODELO NO LINEAL

AUTO-REGRESIVO BASADO EN RN

Disertante: Ing. Carlos Salas.

VII Jornadas de Ciencia y Tecnología de Facultades de Ingeniería del NOA, 13 y 14 de Octubre

Page 2: Presentacion limac-unc

2

FACULTAD DE TECNOLOGÍA Y CIENCIAS APLICADAS DEPARTAMENTO DE ELECTRÓNICA

Carlos Salas1, Odile Londero1, Martín Herrera1, Julián Pucheta2, C. Rodríguez Rivero2, V. Sauchelli2 y H. D. Patiño3

1Departamento de Ingeniería Eléctrica, Facultad de Ciencias y Tecnologías Aplicadas, Universidad Nacional de Catamarca, Catamarca,

Argentina.2Departamento de Ingeniería Eléctrica y Electrónica, Laboratorio de

Investigación en Matemáticas Aplicadas a Control (LIMAC), Facultad de Ciencias Exactas, Físicas y Naturales - Universidad Nacional de Córdoba,

Córdoba, Argentina.3Instituto de Automática (INAUT), Facultad de Ingeniería, Universidad

Nacional de San Juan, San Juan, Argentina

Page 3: Presentacion limac-unc

3

Resumen Motivation Problem formulation

– Overview of the MG equation and Overview on fractional Brownian motion Proposed approach

– Adjustment of the Proposed Filter – Proposed tuning algorithm– Approximation by area– Evaluation for structural adjustment– Algorithm Implementation

Main results– Set-up of Model and Learning Process– Performance measure for forecasting

Conclusions– Discussion – Actual state

Page 4: Presentacion limac-unc

4

Motivation

Natural phenomena prediction is a challenging topic useful for control problems in Agricultural Activities.

Several approaches based on NN face the rainfall forecast problem for energy demand purposes, water availability and seedling growth.

Here, it is followed the closed-loop scheme where the controller considers future conditions for designing the control law presented in Pucheta et al, 2007.

The controller contemplates the actual state x(k) of the cultivation by a state observer as well as meteorological variables Ro.

Page 5: Presentacion limac-unc

5

Overview of the Mackey-Glass equation

It serves to model natural phenomena Different authors perform comparisons between different techniques for foretelling and

regression models

where α, β, and c are parameters and τ is the delay time.

By setting the parameter β ranging between 0.1 and 0.9 the stochastic dependence of the deterministic time series obtained varies according to its roughness.

It is solved by a standard fourth order Runge-Kutta Step. According as τ increases, the solution turns from periodic to chaotic.

)t(y)t(y1

)t(y)t(y c

Page 6: Presentacion limac-unc

6

Overview on fractional Brownian motion

The roughness of the time series is estimated assuming it is a trace of an fBm. The fBm is defined by its stochastic representation

B is defined on some probability space (, F, P ), H is the Hurst parameter.

The fBm is a Continuous Gaussian Process and the variance of the increments is defined by where v is a positive constant.

A Wavelet-based method is used for estimating the H parameter of the time series.

H2HH stsBtBVar

Page 7: Presentacion limac-unc

7

Proposed approach Our main contribution is the use of the energy associated with the time

series. The energy of the forecasted time series is compared with the

forecasted energy associated with the time series. NN fedforward topology is proposed and consist of lx inputs, one hidden

layer of Ho neurons and one output. The learning rule used in the training process is based on the

Levenberg-Marquardt method. The learning rule modifies at each stage the number of patterns and the

number of iterations according to the Hurst Parameter.

Page 8: Presentacion limac-unc

8

Input vector lx is obtained by applying the delay operator Z-1, to the sequence

{xn}.

Filter output generates xe as the next value that is equal to the current value xn.

Learning Law

Z Z Z

Feed-forwardNeural Network

xe

xn-1 xn-2 xn-lx

-

xn

Proposed approach

n1

pe xIZF1nx

Page 9: Presentacion limac-unc

9

Target of the algorithm tracking the hypothesis

– Given the series {xn} and the series {{ xn}, {xe}} where {xe} has 18 values, they must show a similar H parameter.

– After the training process is completed, both sequences – forecasted {{In}, {Ie}} and {{yn, ye}}, should have the same H parameter.

Adjustment of the Proposed Filter

Page 10: Presentacion limac-unc

10

The area resulting of integrating the time series data of MG equation is obtained by considering each value of time series its derivate;

where yt is the original time series value. The approximation area is assumed to be its periodical primitive is:

Those primitives are calculated and serve as a new input to the NN.

Approximation by Area

kkt

t

tt ttydty

k

k

1

1

.,...2,1, NnYdtyI pn

n

pn

n

n

t

tt

t

ttt

Page 11: Presentacion limac-unc

11

The input vector is xnRlx , by applying Z-1·I to {xn}. Then the forecasting error is defined as

which is used for the adjustment rule of the coefficients of the NN sigmoidal fn

adjusted by Levenberg-Marquardt.

xn is defined for each input sequence to implement batch iteration.

The number of iterations and the length of each batch are made variable.

kxkxke en

Adjustment of the Proposed Filter

Page 12: Presentacion limac-unc

12

Adjustment of the Proposed Filter

Since the series {xn} and the augmented series {{xn), {xe}} should have the same roughness (smoothness), it is proposed to change the algorithm parameters according to the stochastic dependence of their associated H by area.

Np are input-output pairs, where xiRlx and yi R are inputs and outputs, respectively. They are defined as:

The number of pairs Np is defined in terms of the size of the input vector lx as:

The number of iterations is given by, and

pN1,2,....,i , ii yx

.2 xpx lNl

.y , i1

iii xxIZ x

.2 xtx lil

Page 13: Presentacion limac-unc

13

It is proposed to modify the pair (it, Np) as the H parameter associated with the time series (xn), assuming that it is a realization of an fBm. H is estimated by conventional methods (Abry 2003, Flandrin 1992).

It is implemented the following adjustment heuristic

The choice of factor 2 was made through trial and error.

H10

(it, Np)

Np=2·lx

it=lx

i t=2·lx

Np=lx

Proposed tuning algorithm

Page 14: Presentacion limac-unc

14

Approximation by Area

The real area is used in two instances:

1) An area from the real time series is obtained by calculating at each step the integration of the real time series data and is run by the forecast algorithm. The H parameter from this time series is called HA.

2) The area of time series data is forecasted by algorithm where it is calculated a HS considering 102 values plus 18 values predicted.

Page 15: Presentacion limac-unc

15

After forecasting time series, if the error between HA and HS is grater than a threshold parameter θ, the value of lx is either increased or decreased according to

Here, the threshold θ was set about 1%.

The number of neurons in the hidden layer Ho of the NN that implements the filter is

At the end of each stage, the number of filter inputs are adjusted and the learning process ends when both series (data and forecasted) should have the same H parameter.

Evaluation for structural adjustment

.signll xx

.2x

OlH

Page 16: Presentacion limac-unc

16

Algorithm Implementation

The startup parameters in the algorithm are

where Ho is the number of neurons in the hidden layer.

Results were evaluated using the index Symmetric Mean Absolute Percent Error

Parameters Initial Conditions

lx 15

Ho lx/2

it lx

H 0.5

10021.0fx

fxn1SMAPE

n

1k kk

kk

Page 17: Presentacion limac-unc

17

Prediction Results for the MG Time Series Using a Classic H-independent ARMA linear predictor filter.

0 20 40 60 80 100 120 1400

0.1

0.2

0.3

0.4

0.5

0.6

0.7

Time [samples].Real Media = 0.52989. Forescated Mean = 0.50979.

H = 0.73074. He = 0.58764. lx = 16. SMAPE = 2.8112.

H independent algorithm.ARMA predictor fL

Mackey Glass parameters: =1.6, =20, c=10, =100.

Mean ForescastedDataReal

Page 18: Presentacion limac-unc

18

Time Series Prediction

Using a H-Independent NN based predictor filter. Note that when the time series is rough, then lx is smaller.

0 20 40 60 80 100 120 1400

0.05

0.1

0.15

0.2

0.25

0.3

0.35

Time [samples].Real Media = 0.10307. Forescated Mean = 0.10594.

H = 0.0029778. He = 0.039463. lx = 15. SMAPE = 0.034227.

H independent algorithm.Neural Network based predictor

Mackey Glass parameters: =1.6, =20, c=10, =100.

Mean ForescastedDataReal

Page 19: Presentacion limac-unc

19

Time Series Prediction

Using a H-Dependent NN based predictor filter.

0 20 40 60 80 100 120 1400

0.05

0.1

0.15

0.2

0.25

0.3

0.35

Time [samples].Real Media = 0.10307. Forescated Mean = 0.10204.

H = 0.0029778. He = 0.033687. lx = 18. SMAPE = 2.9097e-005.

H dependent algorithm. Neural Network based predictor

Mackey Glass parameters: =1.6, =20, c=10, =100.

Mean ForescastedDataReal

Page 20: Presentacion limac-unc

20

SerieNo. H He Real mean Mean

Forecasted SMAPE

Fig. 6 0.73 0.587 0.529 0.509 2.811

Fig.8 0.002 0.039 0.103 0.105 0.034

Fig.9 0.002 0.033 0.103 0.102 2.9 10-5

Comparative Results

Page 21: Presentacion limac-unc

21

Comparative Results A comparison was made between this approach and one presented in Pucheta et

al, 2009, which uses the Levenberg-Marqdart Method with fixed parameter (it, Np).

The results show a significant improvement SMAPE value of order of 10-5 for a class of time series with high roughness of the signal, in this case with β=1.6 which is one of worst condition for signal prediction

Series No. HS HA

Fig. 10 0.6543 0.6423

0 20 40 60 80 100 1200

0.2

0.4

0.6

0.8

Time [samples].2

HS

= 0.65433.HA

= 0.6423.

H independent algorithm.Neural Network based predictor

Mackey Glass parameters: =1.6, =20, c=10, =100.

Area of the forecasted time seriesForecasted area

Page 22: Presentacion limac-unc

22

Discussion

The evaluation of the results obtained have been performed comparing the performance of the filter with the adjustment proposed with the classic setting.

Each algorithm uses the same initial settings.

The index SMAPE is computed from the actual series complete (including the series of real data) and the forecast series.

Although the fitting algorithm based on H shows an interesting improvement is worth recalling that H is estimated from the data time series, so if it is outside the range (0,1), the algorithm proposed here does not operate.

The computed value of the Hurst’s parameter is denoted either by He or H and HS or HA when it is taken either from the Forecasted area time series or from the Data Forecasted area,

Page 23: Presentacion limac-unc

23

Conclusions

The MAIN CONTRIBUTION is an on-line heuristic law to set the training process and to modify the NN topology based on the Levenberg-Marquardt method.

An Area Predictor Filter using nonlinear autoregressive model based on neural networks for time series forecasting is introduced.

The core of the proposal is to analyze the roughness (long or short term stochastic dependence) of time series evaluated by the Hurst parameter (H).

The proposed law adapts in real time the topology of the filter at each stage of time series, changing the number of pattern, the number of iterations and the input vector length.

The main results show a good performance of the predictor, considering in particular to time series whose H parameter has a high roughness of signal, which is evaluated by HS and HA, respectively.

These results encouraged to continue working on new adjustment algorithms for time series modeling natural phenomena.

Page 24: Presentacion limac-unc

24

Thank you very much

Page 25: Presentacion limac-unc

25

PRONÓSTICO DE SERIES TEMPORALES EN FUNCIÓN DE LA ENERGÍA DE LA SERIE USANDO UN MODELO NO LINEAL

AUTO-REGRESIVO BASADO EN RN

Disertante: Ing. Carlos Salas.

VII Jornadas de Ciencia y Tecnología de Facultades de Ingeniería del NOA, 13 y 14 de Octubre

Page 26: Presentacion limac-unc

26

Información de contacto

UNCa-TECNO, Prof. Carlos Salas [email protected]

Laboratorio LIMAC-FCEFyN-UNC http://www.labimac.blogspot.com/ [email protected]

Page 27: Presentacion limac-unc

27

The H parameter gives an idea of the smoothness of the function For H = (0.2, 0.5, 0.8) it is had the following paths:

Sample path from fractional Brownian motion

0 200 400 600 800 1000-10

-5

0

5

H=0

.2

0 200 400 600 800 1000-50

0

50

H=0

.5

0 200 400 600 800 1000-400

-200

0

200

H=0

.8

t

Page 28: Presentacion limac-unc

28

Block diagram of Prediction

The coefficients of the filter are adjusted on-line in the learning process, where at each pass it is modified the number of pattern, the number of iterations and the input vector length.

Estimation of Prediction error

Z-1 I Error-correctionsignal

One-stepprediction

NN-BasedNonlinear Filter

Inputsignal