H. Madsen, Time Series Analysis, Chapmann Hall Time Series Analysis Henrik Madsen hm@imm.dtu.dk Informatics and Mathematical Modelling Technical University of Denmark DK-2800 Kgs. Lyngby Henrik Madsen 1
H. Madsen, Time Series Analysis, Chapmann Hall Outline of the lecture Input-Output systems The z -transform – important issues from Sec. 4.4 Cross Correlation Functions – from Sec. 6.2.2 Transfer function models; identification, estimation, validation, prediction, Chap. 8 Henrik Madsen 2
H. Madsen, Time Series Analysis, Chapmann Hall The z -transform A way to describe dynamical systems in discrete time ∞ � x t z − t Z ( { x t } ) = X ( z ) = ( z complex) t = −∞ The z -transform of a time delay: Z ( { x t − τ } ) = z − τ X ( z ) ∞ � The transfer function of the system is called H ( z ) = h t z − t t = −∞ ∞ � y t = h k x t − k ⇔ Y ( z ) = H ( z ) X ( z ) k = −∞ Relation to the frequency response function : H ( ω ) = H (e iω ) Henrik Madsen 3
H. Madsen, Time Series Analysis, Chapmann Hall Cross covariance and cross correlation functions Estimate of the cross covariance function: N − k � 1 C XY ( k ) = ( X t − X )( Y t + k − Y ) N t =1 N − k � 1 C XY ( − k ) = ( X t + k − X )( Y t − Y ) N t =1 Estimate of the cross correlation function: � ρ XY ( k ) = C XY ( k ) / C XX (0) C Y Y (0) � If at least one of the processes is white noise and if the processes are uncorrelated then � ρ XY ( k ) is approximately normally distributed with mean 0 and variance 1 /N Henrik Madsen 4
H. Madsen, Time Series Analysis, Chapmann Hall Systems without measurement noise X Y t t System output input ∞ � Y t = h i X t − i i = −∞ Given γ XX and the system description we obtain ∞ ∞ � � γ Y Y ( k ) = h i h j γ XX ( k − j + i ) (1) i = −∞ j = −∞ ∞ � γ XY ( k ) = h i γ XX ( k − i ) . (2) i = −∞ Henrik Madsen 5
H. Madsen, Time Series Analysis, Chapmann Hall Systems with measurement noise N t X t Y t Σ System input output ∞ � Y t = h i X t − i + N t . i = −∞ Henrik Madsen 6
H. Madsen, Time Series Analysis, Chapmann Hall Time domain relations Given γ XX and γ NN we obtain ∞ ∞ � � γ Y Y ( k ) = h i h j γ XX ( k − j + i ) + γ NN ( k ) (3) i = −∞ j = −∞ ∞ � γ XY ( k ) = h i γ XX ( k − i ) . (4) i = −∞ IMPORTANT ASSUMPTION: No feedback in the system. Henrik Madsen 7
H. Madsen, Time Series Analysis, Chapmann Hall Spectral relations H (e − iω ) H (e iω ) f XX ( ω ) + f NN ( ω ) f Y Y ( ω ) = G 2 ( ω ) f XX ( ω ) + f NN ( ω ) , = f XY ( ω ) = H (e iω ) f XX ( ω ) = H ( ω ) f XX ( ω ) . The frequency response function, which is a complex function, is usually split into a modulus and argument H ( ω ) = |H ( ω ) | e i arg {H ( ω ) } = G ( ω )e iφ ( ω ) , where G ( ω ) and φ ( ω ) are the gain and phase , respectively, of the system at the frequency ω from the input { X t } to the output { Y t } . Henrik Madsen 8
H. Madsen, Time Series Analysis, Chapmann Hall Estimating the impulse response The poles and zeros characterize the impulse response (Appendix A and Chapter 8) If we can estimate the impulse response from recordings of input an output we can get information that allows us to suggest a structure for the transfer function SCCF after pre−whitening 0.4 True Impulse Response 0.08 0.6 0.3 SCCF 0.4 0.2 0.04 0.2 0.1 0.0 0.0 0.0 0 10 20 30 0 10 20 30 0 10 20 30 Lag Lag Lag Henrik Madsen 9
H. Madsen, Time Series Analysis, Chapmann Hall Estimating the impulse response On the previous slide we saw that we got a good picture of the true impulse response when pre -whitening the data The reason is ∞ � γ XY ( k ) = h i γ XX ( k − i ) i = −∞ and only if { X t } is white noise we get γ XY ( k ) = h k σ 2 X Therefore if { X t } is white noise the SCCF ˆ ρ XY ( k ) is proportional to ˆ h k Normally { X t } is not white noise – we fix this using pre-whitening Henrik Madsen 10
H. Madsen, Time Series Analysis, Chapmann Hall Pre-whitening a) A suitable ARMA -model is applied to the input series: ϕ ( B ) X t = θ ( B ) α t . b) We perform a prewhitening of the input series α t = θ ( B ) − 1 ϕ ( B ) X t c) The output–series { Y t } is filtered with the same model, i.e. β t = θ ( B ) − 1 ϕ ( B ) Y t . d) Now the impulse response function is estimated by � h k = C αβ ( k ) /C αα (0) = C αβ ( k ) /S 2 α . Henrik Madsen 11
H. Madsen, Time Series Analysis, Chapmann Hall Example using S-PLUS ## ARMA structure for x; AR(1) x.struct <- list(order=c(1,0,0)) ## Estimate the model (check for convergence): x.fit <- arima.mle(x - mean(x), model=x.struct) ## Extract the model: x.mod <- x.fit$model ## Filter x: x.start <- rep(mean(x), 1000) x.filt <- arima.sim(model=list(ma=x.mod$ar), innov=x, start.innov = x.start) ## Filter y: y.start <- rep(mean(y), 1000) y.filt <- arima.sim(model=list(ma=x.mod$ar), innov=y, start.innov = y.start) ## Estimate SCCF for the filtered series: acf(cbind(y.filt, x.filt)) Henrik Madsen 12
H. Madsen, Time Series Analysis, Chapmann Hall Graphical output Multivariate Series : cbind(y.filt, x.filt) y.filt y.filt and x.filt 1.0 0.4 0.8 0.3 0.6 ACF 0.2 0.4 0.1 0.2 0.0 0.0 0 10 20 30 0 10 20 30 x.filt and y.filt x.filt 1.0 0.4 0.8 0.3 0.6 ACF 0.2 0.4 0.1 0.2 0.0 0.0 −30 −20 −10 0 0 10 20 30 Lag Lag Henrik Madsen 13
H. Madsen, Time Series Analysis, Chapmann Hall Systems with measurement noise N t X t Y t Σ System input output ∞ � Y t = h i X t − i + N t . i = −∞ ∞ � γ XY ( k ) = h i γ XX ( k − i ) i = −∞ Henrik Madsen 14
H. Madsen, Time Series Analysis, Chapmann Hall Transfer function models Bb ε θ (B) t (B) ϕ N t b X t Y (B) B ω t t Σ (B) δ Y t = ω ( B ) δ ( B ) B b X t + θ ( B ) ϕ ( B ) ε t Also called Box -Jenkins models Can be extended to include more inputs – see the book. Henrik Madsen 15
H. Madsen, Time Series Analysis, Chapmann Hall Some names FIR: Finite Impulse Response ARX: Auto Regressive with eXternal input ARMAX/CARMA: Auto Regressive Moving Average with eXternal input / Controlled ARMA OE: Output Error Regression models with ARMA noise Henrik Madsen 16
H. Madsen, Time Series Analysis, Chapmann Hall Identification of transfer function models h ( B ) = ω ( B ) B b = h 0 + h 1 B + h 2 B 2 + h 3 B 3 + h 4 B 4 + . . . δ ( B ) Using pre -whitening we estimate the impulse response and “guess” an appropriate structure of h ( B ) based on this (see page 197 for examples). It is a good idea to experiment with some structures. Matlab (use q − 1 instead of B ): A = 1; B = 1; C = 1; D = 1; F = [1 -2.55 2.41 -0.85]; mod = idpoly(A, B, C, D, F, 1, 1) impulse(mod) PEZdemo (complex poles/zeros should be in pairs): http://users.ece.gatech.edu/mcclella/matlabGUIs/ Henrik Madsen 17
H. Madsen, Time Series Analysis, Chapmann Hall 2 − 1 . 8 B 2 exponential 1 − 1 . 8 B +0 . 81 B 2 Zeros Poles 1.0 1.0 0.5 0.5 0.0 0.0 Im Im −0.5 −0.5 −1.0 −1.0 −1.0 −0.5 0.0 0.5 1.0 −1.0 −0.5 0.0 0.5 1.0 Re Re 2.0 60 Impulse Response 1.5 Step Response 40 1.0 20 0.5 0.0 0 0 10 20 30 40 50 60 0 10 20 30 40 50 60 Lag Lag Henrik Madsen 18
H. Madsen, Time Series Analysis, Chapmann Hall 1 2 real poles 1 − 1 . 7 B +0 . 72 B 2 Zeros Poles 1.0 1.0 0.5 0.5 0.0 0.0 Im Im No Zeros −0.5 −0.5 −1.0 −1.0 −1.0 −0.5 0.0 0.5 1.0 −1.0 −0.5 0.0 0.5 1.0 Re Re 50 2.5 40 Impulse Response 2.0 Step Response 30 1.5 20 1.0 10 0.5 0.0 0 0 10 20 30 40 50 60 0 10 20 30 40 50 60 Lag Lag Henrik Madsen 19
H. Madsen, Time Series Analysis, Chapmann Hall 1 2 complex 1 − 1 . 5 B +0 . 81 B 2 Zeros Poles 1.0 1.0 0.5 0.5 0.0 0.0 Im Im No Zeros −0.5 −0.5 −1.0 −1.0 −1.0 −0.5 0.0 0.5 1.0 −1.0 −0.5 0.0 0.5 1.0 Re Re 1.5 5 1.0 Impulse Response 4 Step Response 0.5 3 0.0 2 −0.5 1 0 0 10 20 30 0 10 20 30 Lag Lag Henrik Madsen 20
H. Madsen, Time Series Analysis, Chapmann Hall 2 − 2 . 35 B +0 . 69 B 2 1 exp + 2 comp 1 − 2 . 35 B +2 . 02 B 2 − 0 . 66 B 3 Zeros Poles 1.0 1.0 0.5 0.5 0.0 0.0 Im Im −0.5 −0.5 −1.0 −1.0 −1.0 −0.5 0.0 0.5 1.0 −1.0 −0.5 0.0 0.5 1.0 Re Re 2.0 20 Impulse Response Step Response 1.5 15 1.0 10 0.5 5 0.0 0 0 10 20 30 40 50 60 0 10 20 30 40 50 60 Lag Lag Henrik Madsen 21
H. Madsen, Time Series Analysis, Chapmann Hall Identification of the transfer function for the noise After selection of the structure of the transfer function of the input we estimate the parameters of the model Y t = ω ( B ) δ ( B ) B b X t + N t We extract the residuals { N t } and identifies a structure for an ARMA model of this series N t = θ ( B ) ϕ ( B ) ε t ⇔ ϕ ( B ) N t = θ ( B ) ε t We then have the full structure of the model and we estimate all parameters simultaneously Henrik Madsen 22
Recommend
More recommend