Interactive Education for Time-Domain Time Series Analysis using ITTSAE

Interactive Education for Time-Domain Time Series Analysis using ITTSAE

17th 17th IFAC IFAC Symposium Symposium on on System System Identification Identification Available online at www.sciencedirect.com 17th IFAC Symposiu...

1MB Sizes 0 Downloads 106 Views

17th 17th IFAC IFAC Symposium Symposium on on System System Identification Identification Available online at www.sciencedirect.com 17th IFAC Symposium on SystemCenter Identification Beijing International Convention Beijing International Convention 17th IFAC Symposium on SystemCenter Identification Beijing International Convention Center October 19-21, 2015. Beijing, China October 19-21, 2015. Convention Beijing, China Beijing Center OctoberInternational 19-21, 2015. Beijing, China October 19-21, 2015. Beijing, China

ScienceDirect

IFAC-PapersOnLine 48-28 (2015) 751–756

Interactive Education Interactive Education for for Time-Domain Time-Domain Time Time Series Series Analysis Analysis using using ITTSAE ITTSAE Interactive Interactive Education Education for for Time-Domain Time-Domain Time Time Series Series Analysis Analysis using using ITTSAE ITTSAE J.M. Díaz* S. Dormido** D. E. Rivera*** J.M. J.M. Díaz* Díaz* S. S. Dormido** Dormido** D. D. E. E. Rivera*** Rivera*** J.M. Díaz* S. Dormido** D. E. Rivera***

* Dep. Informática y Automática, UNED, Spain (e-mail: [email protected]) ** Dep. Informática Automática, UNED, Spain (e-mail: [email protected]) Dep. Informática Informática yyy Automática, Automática, UNED, UNED,Spain Spain (e-mail: (e-mail: [email protected]) [email protected]) ** * Dep. Dep. Informática Informática yyy Automática, Automática, UNED, UNED,Spain Spain (e-mail: (e-mail: [email protected]) [email protected]) ** Dep. ** Dep. Informática Automática, UNED, Spain (e-mail: [email protected]) *** School for the Engineering of Matter, Transport, and Energy, Arizona State University, ** Dep. Informática y Automática, UNED, Spain (e-mail: [email protected]) *** School for the Engineering of Matter, Transport, and Energy, *** School for the Engineering of Matter, Transport, and Energy, Arizona Arizona State State University, University, Tempe AZ 85287-6006 USA (e-mail: [email protected]) *** School for the Engineering of Matter, and Energy, Arizona State University, Tempe AZ USA (e-mail: Tempe AZ 85287-6006 85287-6006 USATransport, (e-mail: [email protected]) [email protected]) Tempe AZ 85287-6006 USA (e-mail: [email protected]) Abstract: Knowledge Knowledge of of basic principles principles and and concepts in in time time series series analysis analysis is fundamental fundamental to to system Abstract: Abstract: Knowledge of basic basic principles and concepts concepts in time series analysis is is background fundamental for to system system identification education; however, this topic is not part of the traditional many Abstract: Knowledge of basic principles and concepts in time series analysis is background fundamental for to system identification education; however, this topic is not part of the traditional many identification education; however, this topic is not part of the traditional background for many engineering students. Interactive software tools, on the other hand, have proven as particularly useful identification education; however,software this topic ison the traditional background for useful many engineering students. Interactive tools, other hand, have proven as engineering students. Interactive software tools, onnotthe thepart otherof hand, have proven as particularly particularly useful techniques with high impact on education. To address this need, this paper describes a collection of engineering students. Interactive software tools, on the other hand, have proven as particularly useful techniques with high impact on education. To address this need, this paper describes a collection of techniques software with hightools impact on education. To address this need, this paper a collection of interactive (ITTSAE, ITTSAE-TSG and ITTSAE-TSA) that havedescribes been developed to assist techniques with high impact on education. To address this need, this paper describes a collection of interactive software tools (ITTSAE, ITTSAE-TSG and that have been developed to interactive toolstime (ITTSAE, ITTSAE-TSG andinITTSAE-TSA) ITTSAE-TSA) thatThe have been developed to assist assist in teaching software and learning series analysis concepts the time domain. tools have been developed interactive software tools (ITTSAE, ITTSAE-TSG and ITTSAE-TSA) that have been developed to assist in teaching and learning time series analysis concepts in the time domain. The tools have been developed in teaching and learning time serieslanguage analysis concepts inexecution the time domain. The tools have been developed with Sysquake, a MATLAB-like with fast and excellent facilities for interactive in teaching and learning time serieslanguage analysis concepts the time domain. The tools have been developed with Sysquake, aa MATLAB-like with fast and excellent facilities for interactive with Sysquake, MATLAB-like with executables fastinexecution execution graphics, and are delivered as a language stand-alone thatand areexcellent readily facilities accessiblefor tointeractive students with Sysquake, a MATLAB-like language with fast execution and excellent facilities for interactive graphics, and are delivered as a stand-alone executables that are readily accessible to students graphics, and are delivered as a stand-alone executables that areexample readilyonaccessible to software students and instructors. The basic functionality of the tools and an illustrative the use of the graphics, and are as a stand-alone executables that areexample readilyon to software students and instructors. The basic of and the and instructors. The delivered basic functionality functionality of the the tools tools and an an illustrative illustrative example onaccessible the use use of of the the software are presented. and instructors. The basic functionality of the tools and an illustrative example on the use of the software are presented. are presented. are presented. © 2015, IFAC (International Federation of Automatic Control) Hosting by Elsevier All rights reserved. Keywords: System identification, educational aids, interactive programs, signals,Ltd. ARIMA models. Keywords: Keywords: System System identification, identification, educational educational aids, aids, interactive interactive programs, programs, signals, signals, ARIMA ARIMA models. models. Keywords: System identification, educational aids, interactive programs, signals, ARIMA models. have answers to any imaginable question, for example: that have answers to any question, for example: that 1. INTRODUCTION have answers to anyorimaginable imaginable question, for example: that 1. INTRODUCTION would happen if...? could one do that....? simply by acting 1. INTRODUCTION have answers to any imaginable question, for example: that would happen if...? or could one do that....? simply by acting would happen if...? or could one do that....? simply by acting 1. INTRODUCTION on the elements that constitute aa graphical interface. A solid foundation in time series analysis is critical to the would happen if...? or could one do that....? simply by acting on the elements that constitute graphical interface. A solid foundation in time analysis is the the elements that constitute a graphical interface. A solid time series series analysis [Söderström is critical critical to to and the on study andfoundation practice ofin system identification on the elements that constitute a graphical interface. A solid foundation in time series analysis is critical to the study and practice of system identification [Söderström and More than we realize, ideas in the scientific and study and practice of system [Söderström and More often often than realize, ideas in the and Stoica, 1989, Schoukens and identification Pintelon, 1991, Ljung, 1999]. More often world than we we realize, ideas and in specific the scientific scientific and study and practice of system identification [Söderström and Stoica, 1989, Schoukens and Pintelon, 1991, Ljung, 1999]. engineering arise from visual situations. Stoica, 1989, Schoukens andbroadly-applicable Pintelon, 1991, Ljung, 1999]. engineering More often than we realize, ideas in the scientific and world arise from visual and specific situations. The ability to sensibly apply identification engineering world arise from visual andvisual specific situations. Stoica, 1989, Schoukens and Pintelon, 1991, Ljung, 1999]. The ability to sensibly apply broadly-applicable identification Our perception of reality is essentially and in many The ability to sensibly apply broadly-applicable identification engineering world arise from visual and specific situations. Our perception of reality is essentially visual and in many techniques (such as classical prediction-error estimation of Our perception is essentially visual and diagrams in many The ability to sensibly apply broadly-applicable identification techniques (such as prediction-error estimation of cases we make of usereality of symbolic treatment, visual techniques (such as classical classical prediction-error estimation of Our perception of reality is essentially visual and diagrams in many cases we use of treatment, visual ARX, ARMAX, Box-Jenkins, and Output Error models) is cases we make make use of symbolic symbolic treatment, visual diagrams techniques (such as classical prediction-error estimation of ARX, ARMAX, Box-Jenkins, and Output Error models) is and other forms of imaginative processes in order to acquire ARX, ARMAX, Box-Jenkins, and Output Error models) is cases we make use of symbolic treatment, visual diagrams and other forms of imaginative processes in order to acquire strongly influenced by the student's understanding of time and other forms of imaginative processes in order to abstract acquire ARX, ARMAX, Box-Jenkins, and Output Error models) is strongly influenced by the student's understanding of time an intuition of what in its formal aspect has an strongly influenced by the student's understanding of time and other forms of imaginative processes in order to acquire an intuition of what in its formal aspect has an abstract series analysis fundamentals [Jenkins and Watts, 1968, Stoica an intuition of what in its formal aspect has an abstract strongly influenced by the student's understanding ofStoica time structure. series analysis fundamentals [Jenkins and Watts, series analysis fundamentals [Jenkins and Watts, 1968, 1968, Stoica an intuition of what in its formal aspect has an abstract structure. and Moses, 1997, Box et al., 2008, Shumway and Stoffer, series analysis fundamentals [Jenkins and Watts, 1968, Stoica structure. and Moses, 1997, Box et al., 2008, Shumway and and Moses, 1997, al., 2008,domains. Shumway and Stoffer, Stoffer, 2011], in both timeBox and et frequency A challenge in structure. Visualization and interactivity appear as something quite and Moses, 1997, Box et al., 2008, Shumway and Stoffer, 2011], in time frequency domains. A in and appear as quite 2011], in both both time and and frequency domains. A challenge challenge in Visualization Visualization and interactivity interactivity appearbetween as something something quite this regard, however, is that for students in certain disciplines natural to discover new relationships mathematical 2011], in both time and frequency domains. A challenge in this regard, however, is that for students in certain disciplines Visualization and interactivity appear as something quite natural to discover new relationships between mathematical this regard, however, is mechanical that for students in certain time disciplines natural to discover new relationships between mathematical (such as chemical and engineering), series objects and also of course in the transmission and this regard, however, is mechanical that for students in certain time disciplines (such as chemical and engineering), series natural to discover new relationships between mathematical objects and also of course in the transmission and (such as chemical and mechanical engineering), time series objects and also ofknowledge. course inOnethe transmission and analysis traditionally does not form part of their education, communication of our of the important tasks (such as chemical and mechanical engineering), time series analysis traditionally does not form part of their education, objects and also of course in the transmission and communication of our knowledge. One of the important tasks analysis traditionally does not form part of their education, communication of our knowledge. One of the important tasks and concepts such as stationarity, auto-correlation, crossas teachers is to transmit to our students not only the logical analysis traditionally does not form auto-correlation, part of their education, and concepts such as stationarity, crosscommunication of our knowledge. One of the important tasks as teachers is to transmit to our students not only the logical and concepts such as stationarity, auto-correlation, crossas teachers to transmit to our students but not only correlation, ARIMA models are unknown to crossthese and formal is of the discipline, also, the andlogical with and conceptsand such as stationarity, auto-correlation, correlation, and ARIMA models unknown as teachers iscontent to transmit to our students but not only the logical formal content of the discipline, also, and with correlation, and ARIMA models are are unknown to to these these and and formal content of the discipline, but also, and with students. greater emphasis, the intuitive and motivating aspects of the correlation, and ARIMA models are unknown to these students. and formal content of the discipline, but also, and with greater emphasis, the intuitive and motivating aspects of the students. greater emphasis, the intuitive and motivating aspects of the subject we are dealing with. It is much more difficult to students. greater emphasis, the intuitive and motivating aspects of the we are dealing with. It is much more difficult to Interactive software tools have been proven as particularly subject subject we are dealing with. It is much more difficult to Interactive software tools have been proven as particularly explain these elements, because they are often in the least Interactive softwarewith toolshigh haveimpact been proven as particularly subject we are dealing with. It is much more difficult to explain these elements, because they are often in the least useful techniques on control education explain these elements, because they are often in the least Interactive software tools have been proven as particularly useful with high on control known substrate of our activity as teachers. In this way makes useful techniques techniques with Dormido, high impact impact onDormido controleteducation education explain these elements, because they are often in the least known substrate of our activity as teachers. In this way makes [Johansson et al., 1998, 2004, al, 2005, known substrate of our activity as teachers. In this way makes useful techniques with Dormido, high impact onDormido controlet [Johansson et al., 1998, 2004, al, sense to have powerful and friendly environments that allow [Johansson et al., 1998, Dormido, 2004, Dormido eteducation al, 2005, 2005, known of our activity as teachers. In this way makes sense to have powerful and environments that allow Guzmán et al, 2008, Guzmán et al, 2012]. Consequently, the sense tosubstrate haveof powerful and friendly friendly environments that allow [Johansson et al., 1998, Dormido, 2004, Dormido et al, 2005, Guzmán et al, 2008, Guzmán et al, 2012]. Consequently, the the creation interactive tools with high visual content, Guzmán et al, 2008, Guzmán et al, 2012]. Consequently, the sense to have powerful and friendly environments that allow the creation of interactive tools with high visual content, availability of a suite of software tools for introducing time the creation of interactive tools with high visual content, Guzmán et al, 2008, Guzmán et al, 2012]. Consequently, the availability of a suite of software tools for introducing time using the current state of computer technology. availability of afundamentals suite of software tools for introducing time the creation of interactive tools with high visual content, using the current state of computer technology. series analysis in an attractive, understandable, availability of afundamentals suite of software for introducing time using the current state of computer technology. series analysis in an attractive, understandable, series analysis fundamentals in important an tools attractive, understandable, using state of computer technology. and accessible way can play an role and greatly aid Basedthe on current this idea, a novel Interactive set of software Tools series analysis fundamentals in an attractive, understandable, and accessible way can play an important role and greatly aid Based on this idea, a novel Interactive set of Tools and accessible way can play an important role and greatly aid Based on this idea, a novel Interactive set of software software Tools the learning experience. for Time Series Analysis Education (ITTSAE) has been and accessible way can play an important role and greatly aid the learning experience. Based on this idea, a novel Interactive set of software Tools for Time Series Analysis Education (ITTSAE) has been the learning experience. for Time Series Analysis Education (ITTSAE) has been developed in Sysquake [Piguet, 2013], a MATLAB-like the learning for Time Series Analysis Education (ITTSAE) has been in Sysquake [Piguet, 2013], a MATLAB-like There are experience. two essential aspects in dynamical systems developed developed in Sysquake [Piguet, 2013], a MATLAB-like There two essential aspects in dynamical systems language with fast execution and excellent facilities for There are are that twocurrent essential aspectsallow in and dynamical systems developed in Sysquake [Piguet, 2013], a MATLAB-like language with fast execution and excellent facilities for simulation computers which have not language with fast execution and excellentas facilities for There are two essential aspects in dynamical systems simulation that current computers allow and which have not interactive graphics. ITTSAE is delivered three standsimulationgreat that current computers allow and which have not interactive language with fast execution and excellent facilities for graphics. ITTSAE is delivered as three standreceived attention in the past; these are dynamic interactive graphics. ITTSAE is delivered as three standsimulation that current computers allow and which have not received great attention in the past; these are dynamic alone executables that make it readily accessible to users received great attention in the past; these areprovide dynamic interactive graphics. ITTSAE is delivered as three standalone executables that make it readily accessible to users visualization and interactivity. The objective is to the alone et executables make it readily accessible to users received great in the these dynamic visualization and interactivity. The objective is provide the al., 2014]. that visualization andattention interactivity. The past; objective is to toare provide the [Diaz alone executables [Diaz al., simulation with powerful mechanisms so that the user can [Diaz et et al., 2014]. 2014]. that make it readily accessible to users visualization and interactivity. The objective is to provide the simulation with powerful mechanisms so that the user can simulation with powerful mechanisms so that the user can [Diaz et al., 2014]. simulation with powerful mechanisms so that the user can 2405-8963 © 2015, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. Peer review©under of International Federation of Automatic Copyright IFAC responsibility 2015 751Control. Copyright © IFAC 2015 751 10.1016/j.ifacol.2015.12.220 Copyright © IFAC 2015 751 Copyright © IFAC 2015 751

2015 IFAC SYSID 752 October 19-21, 2015. Beijing, China

J.M. Díaz et al. / IFAC-PapersOnLine 48-28 (2015) 751–756

Fig. 1. Main window of the tool ITTSAE, with a MA(1) process selected. Two realizations of the process, and the theoretical and estimated autocorrelation functions are plotted. A 95.4% standard error bound is also plotted for the estimator.

θi i = 1,..., m are the coefficients of the MA part of the process, φ j j = 1,..., n are the coefficients of the AR part of

This paper is focused on describing ITTSAE. It is organized as follows: a summary of the utility and functionality of ITTSAE is presented in Section 2, with an illustrative example described in Section 3. Finally, conclusions are presented in Section 4.

the process, n, d and m are positive integers numbers greater or equal to zero, and q −1 is the backward shift operator:

q −1·xt = xt −1

2. UTILITY AND FUNCTIONALITY OF THE TOOLS This section briefly describes the developed tools, which can be downloaded freely through Diaz et al. (2014). These do not require a Sysquake license in order to execute the applications. The reader is cordially invited to download them and personally experience their interactive features.

ITTSAE consists of three software tools:

ITTSAE allows the teaching and learning of the basic principles of time series analysis in the time domain [Box et al, 2008, Shumway and Stoffer, 2011], through the representation of time series, autocorrelation, partial autocorrelation, and cross correlation functions. The time series considered in the tools are discrete-time data sequences xt t=0, 1,…,N, which are realizations of AutoRegressive

Integrated Moving Average (ARIMA) stochastic processes. Thus, ITTSAE also allows illustrating the main features of this kind of processes. An ARIMA(n,d,m) process xt can be described by the following expression:

xt =

1 − θ1 ⋅ q −1 − ... − θ m ⋅ q − m ·at (1 − q −1 )d ·(1 − φ1 ⋅ q −1 − ... − φn ⋅ q − n )

(1)

where at is a white noise process defined by a normal distribution

(2)

N (0, σ a2 ) of zero mean and variance σ a2 , 752

-

ITTSAE. It illustrates the basic concepts of time series analysis in the time domain and the main features of the ARIMA(n,d,m) processes. It can be used by the instructors to teach and by the students to learn these concepts and features.

-

ITTSAE-TSG (Time Series Generator). It helps the instructors in the task of generating time series for time series analysis exercises. It allows generating and saving in a text file time series that are realizations of ARIMA(n,d,m) processes.

-

ITTSAE-TSA (Time Series Analyser). It provides to the students all the tools that they need to do the exercises of time series analysis in the time domain proposed by the instructor. It allows loading a text file with time series data, differencing the time series (if necessary), and representing the time series, the autocorrelation, the partial autocorrelation and the cross correlation. Besides, students can save a text file with the main results of their analysis.

2015 IFAC SYSID October 19-21, 2015. Beijing, China

J.M. Díaz et al. / IFAC-PapersOnLine 48-28 (2015) 751–756

753

Fig. 2. Main window of the tool ITTSAE-TSG. Time series z2 is selected (label in a light blue square in the block diagram) to be plotted. Time series w1, x1, w2 and z2 are selected (red labels in the block diagram) to be saved. button the first time. The time series length (number of samples) can be set by the text field or the slider located below this button. Besides, the tool allows highlighting one or all of the time series samples.

The three tools have a simple and very similar user graphical interface. In Figure 1, the main window of the tool ITTSAE is shown. The user can select the type of stochastic process, whose realizations (time series) he/she wants to analyze, by the menu Select Process located in the upper left corner of the main window. There are five types of stochastic processes available: white noise, AR, MA ARMA and ARIMA. User can select a process with its orders already set, for example ARMA(1,1) or ARMA(1,2), or can select a general process to configure its orders, for example ARMA(n,m).

In the lower right part of the window, the theoretical autocorrelation function is shown (red color). This function is computed [Box et al., 2008] according to the following expression:

ρk =

The type, difference equation and parameters of the selected stochastic process are shown in the central left part of the window. User can set the values of the process parameters in two ways: writing the values in the text fields or dragging the poles (x) and zeros (o) of the process in the zeros-poles map located in the lower left part of the window. Note that to drag an element (pole or zero), user must place the mouse pointer on the element, hold down the left button of the mouse, move the element to the wanted position, and release the left button. When user finishes the drag of an element in the diagram, all the information in the window is updated. This is a feature that illustrates the interactivity of the tool.

γk γ0

k = 0,1, 2...

(3)

where

⎛



⎞

γ k = σ a2 ⎜ ∑ψ jψ j +k ⎟ k = 0,1,2,... ⎝ j =0

(4)

⎠

is the autocovariance function. In this expression, ψ j are the coefficients of a linear filter whose input is a white noise process at of zero mean and variance σ a2 , and whose output is the selected stochastic process xt :

A realization (time series) of the selected stochastic process is represented in the upper right part of the window. The user can obtain new realizations pressing on the button Generate Realization. The new and the previous realizations can be shown simultaneously if the user marks the box Show previous realization, which appears when the user presses the



xt = at +ψ 1at −1 +ψ 2at −2 + ... = at + ∑ψ j at − j

(5)

j =1

These coefficients can be obtained driving the filter with an impulse.

753

2015 IFAC SYSID 754 October 19-21, 2015. Beijing, China

J.M. Díaz et al. / IFAC-PapersOnLine 48-28 (2015) 751–756

Fig. 3. Main window of the tool ITTSAE-TSA. A text file with four time series u, v, x and y has been loaded in the tool. Time series y is currently selected; this time series and its autocorrelation function are plotted in the left part of the window. Also, if the user clicks on the box Estimated, the estimated autocorrelation function is shown (blue color) with a 95.4% standard error bound (yellow color). Note that the percentage of the standard error bound can be increased or decreased by dragging vertically upwards or downwards the upper dashed line of the standard error bound.

In Figure 2, the main window of the tool ITTSAE-TSG is shown. The block diagram of the stochastic processes which are used to generate times series is located in the upper left part of the ITTSAE-TSG window. By default, it is represented a block diagram of serial type that consists of two ARIMA(n,d,m) processes. Each ARIMA(n,d,m) process is represented by three blocks: AR(n), MA(m) and I(d). ITTSAE-TSG also has available a block diagram of parallel type that consists of six ARIMA(n,d,m) processes. In this case, each ARIMA(n,d,m) process is only represented by one block. The instructor can select the type of the block diagram by the menu Block Diagram.

The estimated autocorrelation function is computed [Box et al., 2008] by the following expression:

ck c0

rk =

(6)

k = 0,1, 2,...

where ck is the estimated autocovariance function

ck = In this expression, realization.

1 N

N −k

∑ (x t =1

t

− x )( xt +k − x )

A useful interactive feature of the block diagram is that the user can exchange the positions of two blocks. This feature provides additional flexibility to the instructor in the generation of time series.

k = 0,1, 2,.. (7)

To set the order and parameters of a block, the first step is to click on the block to select it. The selected block is enhanced in green. The orders n, d and m of the selected process are set by the text fields located below the block diagram. The process parameters can be set by the dialog box that appears when the instructor clicks on the buttons Set Numerator or Set Denominator. User can also set the process parameters by the zeros-poles diagram, in the same way as explained for the ITTSAE tool.

x is the mean value of the N data of the

If it is considered the hypothesis that there is a realization of white noise process, the standard error in the estimated autocorrelation function can be approximated [Box et al., 2008] by the following expression:

σ [rk ] ≈

1 N

(8)

There are ten time series available in the block diagram: {a1,e1,w1,z1,x1,a2,e2,w2,z2,x2}. The time series a1 and a2 are white noise process of zero mean and variance σ1 and σ2, respectively. In the serial type, x1 can be disturbed by one of the following time series: a2, e2, w2 or z2. To do that, the instructor has to click on the dotted vertical line connected to

Likewise, in this part of the ITTSAE window, the partial autocorrelation [Box et al., 2008] and the spectrum [Jenkins and Watts, 1968] functions can be shown by clicking on the boxes Partial autocorrelation or Spectrum, respectively.

754

2015 IFAC SYSID October 19-21, 2015. Beijing, China

J.M. Díaz et al. / IFAC-PapersOnLine 48-28 (2015) 751–756

a2, e2, w2 or z2. To remove a disturbance, the instructor has to click on the adder whose output is x1. In an analogous way, x2 can be disturbed by a1, e1, w1 or z1.

755

Likewise, ITTSAE-TSA allows producing a text file that compiles the results of the time series analysis. This file is created when the student clicks on the button Save analysis located in the upper left part of the window.

The block diagram also allows selecting the time series that is represented in the upper right part of the window. When the instructor clicks on the label of a time series, a small light blue rectangle appears around the label and the time series is plotted. Besides, for the selected time series, the autocorrelation, the partial autocorrelation and the cross correlation (with other second signal that has to be selected) are computed and plotted in the lower right part of the window. To obtain other realizations of the time series, the instructor has to click on the button Generate Realization.

3. AN ILLUSTRATIVE EXAMPLE Due to space limitations in the paper, only one example of using the ITTSAE tool is presented in this section. Additional examples for this and the other two tools can be found in Diaz et al. (2014, 2015). Suppose that an instructor wants to explain the main properties in the time domain of a MA(1) process using ITTSAE. The first step is to run the tool and select the entry MA(1) in the Select Process menu located in the upper left part of the window. By default, the following MA(1) process is shown (see Fig. 1):

When the instructor has finished the setting of the processes and has generated the time series, he/she clicks on the button Save Time Series to save in a text file the time series generated. ITTSAE-TSG allows saving four time series as a maximum, those whose labels are represented in red color in the block diagram. A label is represented with red color, when the instructor makes double-click on it. Apart from the text file with the saved time series, ITTSAE-TSG also creates a text file with the type and the value of the parameters of the processes that have generated the saved time series. In this way, the first text file contains the data to do a time series analysis exercise, and the second text file contains the solutions.

xt = at − θ1at −1 = at − 0.5at −1

(9)

A realization of the process is plotted in the upper right part of the window. The theoretical autocorrelation (3) is plotted (red color) by default in the lower right part. It can be shown [Box et al, 2008] that for a MA(1) process the theoretical autocorrelation is given by the following expression:

⎧ −θ1 ⎪ ρ k = ⎨1 + θ12 ⎪ 0 ⎩

In Figure 3, the main window of the tool ITTSAE-TSA is shown. The student has to click on the button Load Time Series to load the text file that contains the time series data to be analysed. This text file has been previously created by the instructor using ITTSAE-TSG or other tool, such as MATLAB.

k =1

(10)

k≥2

Thus, the autocorrelation function of a MA(1) process is zero in all its lags except in k=0 and k=1. In this example θ1 = 0.5 ,

then ρ1 = −0.4 . If the instructor locates the mouse pointer on the lag 1 of the theoretical autocorrelation plot in ITTSAE, the value -0.4 is displayed.

Once the time series has been loaded in ITTSAE-TSA, one or two blocks are drawn in light yellow color in the upper left part of window. The inputs and outputs of these blocks represent the time series that are loaded in the tool. Four times series can be loaded simultaneously as a maximum. The student has to click on the label of the input or output whose time series wants to analyse. When an input or output is selected in the block diagram, its label is represented inside a small green rectangle. The selected time series is plotted in the upper right part of the window, and the autocorrelation, partial autocorrelation or cross correlation functions are plotted in the lower right part of the same window.

According to (10) if θ1 is positive then

ρ1 is negative, and if

θ1 is negative then ρ1 is positive. Besides, if θ1 tends to 1, then

ρ1 tends to -0.5. On the other hand, if θ1 tends to 0, then

ρ1 tends to 0. In this last case a MA(1) passes to be a white

noise process. All of these properties can be easily shown in ITTSAE, the instructor only needs to drag the zero (o) of the MA(1) process to the desired position in the zeros-poles diagram located in the lower right part of the window. When the instructor finishes the drag of an element in the diagram, all the information in the window is updated.

For each time series loaded in the tool, the student has to determine using the available plots whether it presents nonstationary behaviour. In order to do that, the student has to click on the button Differentiate located below the block diagram to differentiate the selected time series. Other task to do is to infer the ARIMA(n,d,m) process type that has been able to generate each time series. The tool also allows studying the existence of cross correlation between two loaded time series.

If the instructor clicks on the box Estimated, the estimated autocorrelation is plotted in blue color in the lower right part of the window. According to the equation (6), the estimated autocorrelation depends on the considered realization. It is possible to illustrate this property selecting the box Show previous realization and clicking several times the button Generate realization. With a new click, a new realization is generated, and its estimated autocorrelation function is plotted in blue color (see Fig.1), and the previous in green

Once the student has finished the analysis of a time series, he/she must write down their conclusions in the text fields and boxes available in the lower left part of the window. 755

2015 IFAC SYSID 756 October 19-21, 2015. Beijing, China

J.M. Díaz et al. / IFAC-PapersOnLine 48-28 (2015) 751–756

Díaz, J.M., Dormido, S., and Rivera, D.E. (2014). Interactive Tools for Time Series Analysis Education (ITTSAE). http://www.uned.es/itfe/ITTSAE/ITTSAE.html Díaz, J.M., Dormido, S., and Rivera, D.E. (2015). ITTSAE: A set of interactive software tools for time series analysis education. Unpublished. Submitted for publication to the IEEE Control System Magazine. Dormido, S. (2004). Control learning: present and future. Annual Reviews in Control, 28(1), 115-136. Dormido, S., Dormido-Canto, S., Dormido-Canto, R., Sánchez, J., and Duro, N. (2005). The Role of Interactivity in Control Learning. International Journal of Engineering Education, 21 (6), 1122-1133. Guzmán, J.L., Åström, K, J., Dormido, S., Hagglund, T., Berenguel, M., and Piguet, Y. (2008). Interactive Learning Modules for PID control. .IEEE Control System Magazine. 28(5), 118-134. Guzmán, J.L, Rivera, D.E., Dormido, S. Berenguel, M. (2012). An interactive software tool for system identification. Advances in Engineering software. 45, 115-123. Jenkins, G. M., and Watts, D. G. (1968). Spectral Analysis and Its Applications. Holden Day. Johansson, M., Gafvert, M., and Astrom, K.J. (1998) Interactive tools for education in automatic control. Control Systems, IEEE, 18(3), 33-34. Ljung, L. (1999). System Identification: Theory for the user. Prentice Hall. Piguet, Y. (2013). Sysquake 5 User Manual. Calerga Sàrl, Lausanne, http://www.calerga.com/doc/index.html Shumway, R. H., and Stoffer, D. S. (2011). Time Series Analysis and Its Applications: With R Examples. Springer. Schoukens, J., and Pintelon, R. (1991). Identification of linear systems. Pergamon Press. Söderström, T., and Stoica, P. (1989), System Identification. Prentice Hall. Stoica, P., and Moses, R.L. (1997). Introduction to Spectral Analysis. Prentice Hall.

color. It can be observed that the estimated autocorrelation function computed from a realization exhibits differences with respect to the estimated autocorrelation computed from other realizations. On the other hand, according to equation (8) the standard error in the estimated autocorrelation depends on the length N of the time series. This property can be illustrated using the slider Time series length located in the upper left part of the window, which allows decreasing or increasing the value of N. By default, ITTSAE set N to 200 samples (see Fig.1). Suppose that the instructor increases N to 1000 samples, the estimated autocorrelation (see Fig. 4) is closer to the theoretical autocorrelation, and the magnitude of the standard error decreases. However it must also take into account that the visual aspect of the estimated correlation function at some lags may differ from the theoretical value although N be very large due to the existence of a strong correlation between nearby lags. In Fig.4 this effect can be seen in the lag k=6 and lag k=7.

Fig 4. Theoretical autocorrelation (red color) of the MA(1) process defined in (9) and estimated autocorrelation (blue color) from a realization of 1000 samples. 4. CONCLUSIONS This paper has focused on describing the conceptual basis, main features and functionality of the interactive software tools ITTSAE, ITTSAE-TSG and ITTSAE-TSA developed by the authors in support of time series analysis education. The tools allow illustrating the basic concepts of time series analysis in the time domain, such as stationarity, autocorrelation and cross-correlation, and the main features of basic stochastic processes, such as white noise, AR, MA, ARMA and ARIMA processes. We invite the reader to download and practice with the tools. Any comments or suggestions to improve the tools will be welcome. ACKNOWLEDGMENT This research was supported by the Spanish CICYT under grants DPI2012-31303. REFERENCES Box, G. E. P., Jenkins, G. M., and Reinsel, G. C. (2008). Time Series Analysis: Forecasting and Control. Wiley.

756