LECTURE 2 : MODELS AND METHODS Time-Series Models: Feedback Form and Transfer-Function Form A dynamic regression model is a relationship comprising any number of consecutive elements of x(t), y(t) and ε(t): (32) p α i y(t i) = k β i x(t i)+ q µ i ε(t i), It is taken for granted that α 0 =1 A time-series model can assume a variety of forms dynamic regression model (35) y(t) =φy(t 1) + x(t)β + ε(t), By repeated substitution, we obtain Consider a simple (36) y(t) =φy(t 1) + βx(t)+ε(t) =φ 2 y(t 2) + β { x(t)+φx(t 1) } + ε(t)+φε(t 1) = φ n y(t n)+β { x(t)+φx(t 1) + +φ n 1 x(t n+1) } +ε(t)+φε(t 1) + +φ n 1 ε(t n+1) If φ < 1, then lim(n )φ n = 0; and the limiting form is (37) y(t) =β φ i x(t i)+ φ i ε(t i) The Lag Operator We can define polynomials of the lag operator of the form p(l) =p 0 + p 1 L+ +p n L n = p i L i having the effect that (311) p(l)x(t) =p 0 x(t)+p 1 x(t 1) + +p n x(t n) n = p i x(t i) In these terms, the equation under (2) becomes (312) α(l)y(t) =β(l)x(t)+µ(l)ε(t) 1
DSG POLLOCK : LECTURES IN THE CITY 2 Complex Numbers: Euler s Equations There are three alternative ways of representing the conjugate complex numbers λ and λ : (314) where λ = α + iβ = ρ(cos θ + i sin θ) =ρe iθ, λ = α iβ = ρ(cos θ i sin θ) =ρe iθ, (315) ρ = α 2 + β 2 and θ = tan 1 ( β α These are the Cartesian form, the trigonometrical form and the exponential form To understand the exponential form consider the series expansions of cos θ and i sin θ about the point θ =0: cos θ = {1 } θ2 2! + θ4 4! θ6 6! +, (316) } isin θ = {iθ iθ3 + iθ5 iθ7 + 3! 5! 7! Adding these gives (317) cos θ + i sin θ = {1+iθ θ2 2! iθ3 3! =e iθ ) + θ4 4! + } Likewise, by subtraction, we get (318) cos θ i sin θ = {1 iθ θ2 2! + iθ3 3! =e iθ + θ4 4! } These are Euler s equations It follows from adding (17) and (18) that (319) cos θ = eiθ + e iθ 2 Subtracting (18) from (17) gives (320) sin θ = i 2 (eiθ e iθ ) = 1 2i (eiθ e iθ ) 2
LECTURE 2 : MODELS AND METHODS The Polynomial Equation of Order n Now consider the general equation of the nth order: (321) φ 0 + φ 1 z + φ 2 z 2 + +φ n z n =0 On dividing by φ n, we can factorise this as (322) (z λ 1 )(z λ 2 ) (z λ n )=0 When we multiply the n factors together, we obtain the expansion (323) 0 = z n i λ i z n 1 + i λ i z n 2 ( 1) n λ 1 λ 2 λ n j This is compared with the expression (φ 0 /φ n )+(φ 1 /φ n )z + +z n =0 By equating coefficients of the two expressions, we find that (φ 0 /φ n )=( 1) n λ i or, equivalently, n (324) φ n = φ 0 ( λ i ) 1 Thus we can express the polynomial in any of the following forms: i=1 φi z i = φ n (z λi ) (325) = φ 0 ( λi ) 1 (z λ i ) = φ 0 ( 1 z λ i ) If λ is a root of the primary equation φ(z) =φ 0 +φ 1 z+ φ n z n =0 where rising powers of z are associated with rising indices on the coefficients, then µ =1/λ is a root of the auxilliary equation φ (z) =z n φ(z 1 )=φ 0 z n +φ 1 z n 1 + φ n =0 which has declining powers of z instead 3
DSG POLLOCK : LECTURES IN THE CITY 2 Rational Functions of Polynomials (327) If δ(z)/γ(z) =δ(z)/{γ 1 (z)γ 2 (z)}is a proper rational function, and if γ 1 (z) and γ 2 (z) have no common factor, then the function can be uniquely expressed as δ(z) γ(z) = δ 1(z) γ 1 (z) + δ 2(z) γ 2 (z), where δ 1 (z)/γ 1 (z) and δ 2 (z)/γ 2 (z) are proper rational functions Imagine that γ(z) = (1 z/λ i ) Then repeated applications of this result enables us to write (328) δ(z) γ(z) = κ 1 1 z/λ 1 + κ 2 1 z/λ 2 + + κ n 1 z/λ n By adding the terms on the RHS, we find an expression with a numerator of degree n 1 By equating the terms of the numerator with the terms of δ(z), we can find the values κ 1, κ 2,,κ n The series expansion of δ(z)/γ(z)converges if and only if the expansion of each of the partial fractions converges For (329) κ { } 1 z/λ = κ 1+z/λ +(z/λ) 2 + to converge when z 1, it is necessary and sufficient that λ > 1 4
Linear Difference Equations LECTURE 2 : MODELS AND METHODS An nth-order linear difference equation is a relationship amongst n + 1 consecutive elements of a sequence x(t) of the form (332) α 0 x(t)+α 1 x(t 1) + +α n x(t n)=u(t), where u(t) is some specified sequence which is described as the forcing function The equation can be written, in a summary notation, as (333) α(l)x(t) =u(t), where α(l) =α 0 +α 1 L+ +α n L n Solution of the Homogeneous Difference Equation If is a root of the equation α(z) =α 0 +α 1 z+ +α n z n = 0 such that α( ) = 0, then y j (t) =(1/ ) t is a solution of the equation α(l)y(t) =0 Thus ( ) t 1 α(l) = ( α 0 + α 1 L + +α n L n)( ) t 1 ( ) t ( ) t 1 ( ) t n 1 1 1 =α 0 +α 1 + +α n (334) = ( α 0 +α 1 + +α n λ n j ( ) t 1 =α( ) =0 ) ( ) t 1 Also consider the factorisation α(l) =α 0 i (1 L/λ i) Within this product is the term 1 L/ ; and since ( 1 L )( ) t ( ) t ( ) t 1 1 1 = =0, it follows that α(l)(1/ ) t =0 The general solution, in the case where α(l) = 0 has distinct real roots, is given by ( ) t ( ) t ( ) t 1 1 1 (335) y(t; c) =c 1 +c 2 + +c n, λ 1 λ 2 λ n where c 1,c 2,,c n are the constants which are determined by the initial conditions 5
DSG POLLOCK : LECTURES IN THE CITY 2 Solution of Difference Equations: The Case of Repeated Roots If two roots coincide at a value of, then α(l)y(t) = 0 has the solutions y 1 (t) =(1/ ) t and y 2 (t) =t(1/ ) t To show that y 2 (t) is also a solution, consider (336) ( 1 L ) 2 ( 1 t ) ( ) t = 1 2L + L2 ( ) t ( 1 1 = t 2(t 1) λ 2 j ( 1 t ) t ) t ( ) t 1 +(t 2) =0 If there are r repeated roots with a value of, then all of (1/ ) t, t(1/ ) t, t 2 (1/ ) t,, t r 1 (1/ ) t are solutions, If there are r repeated roots of unit value, then the functions 1,t,t 2,,t r 1 are all solutions Therefore the general solution of the homogeneous equation will contain a polynomial in t of degree r 1: d 0 + d 1 t + d 2 t 2 + +d r+1 t r+1 The 2nd-order Difference Equation with Complex Roots Let α(l)y(t) =α 0 y(t)+α 1 y(t 1) + α 2 y(t 2) = 0 and suppose that α(z) = 0 has complex roots λ =1/µ and λ =1/µ If λ, λ are conjugate complex numbers, then so too are µ, µ Therefore (337) µ = γ + iδ = κ(cos ω + i sin ω) =κe iω, µ = γ iδ = κ(cos ω i sin ω) =κe iω These will appear in a general solution of the difference equation of the form (338) y(t) =cµ t + c (µ ) t This represents a real-valued sequence; and, since a real term must equal its own conjugate, it follows that c and c must be conjugate numbers of the form (339) c = ρ(cos θ + i sin θ) =ρe iθ, c = ρ(cos θ i sin θ) =ρe iθ Thus the general solution becomes (340) cµ t + c (µ ) t = ρe iθ (κe iω ) t + ρe iθ (κe iω ) t = ρκ t{ e i(ωt θ) + e i(ωt θ)} =2ρκ t cos(ωt θ) 6
LECTURE 2 : MODELS AND METHODS Transfer Functions Consider the equation (365) α(l)y(t) =β(l)x(t)+ε(t), where (366) α(l) =1+α 1 L+ +α p L p =1 φ 1 L φ p L p, β(l)=1+β 1 L+ +β k L k are polynomials of the lag operator The transfer-function form of the model is simply (367) y(t) = β(l) α(l) x(t)+ 1 α(l) ε(t), The rational function associated with x(t) has a series expansion (368) β(z) α(z) = ω(z) = { ω 0 + ω 1 z + ω 2 z 2 + }; and the sequence of the coefficients of this expansion constitutes the impulseresponse function The partial sums of the coefficients constitute the stepresponse function The gain of the transfer function is defined by (369) γ = β(1) α(1) = β 0 + β 1 + +β k 1+α 1 + +α p 7
DSG POLLOCK : LECTURES IN THE CITY 2 Finding the Coefficients of the Impulse Response Consider the second-order case: (370) β 0 + β 1 z 1 φ 1 z φ 2 z 2 = { ω 0 + ω 1 z + ω 2 z 2 + } We rewrite this equation as (371) β 0 + β 1 z = { 1 φ 1 z φ 2 z 2}{ ω 0 + ω 1 z + ω 2 z 2 + } Then, by performing the multiplication on the RHS, and by equating the coefficients of the same powers of z on the two sides of the equation, we find that (372) β 0 = ω 0, β 1 = ω 1 φ 1 ω 0, 0=ω 2 φ 1 ω 1 φ 2 ω 0, 0=ω n φ 1 ω n 1 φ 2 ω n 2, ω 0 =β 0, ω 1 =β 1 +φ 1 ω 0, ω 2 =φ 1 ω 1 +φ 2 ω 0, ω n =φ 1 ω n 1 +φ 2 ω n 2 The coefficents are genereated by a homogeneous second-order difference equation: (373) ω(n) =φ 1 ω(n 1) + φ 2 ω(n 2), 8
The Frequency Response LECTURE 2 : MODELS AND METHODS Consider mapping the signal x(t) = cos(ωt) through the transfer function γ(l) =γ 0 +γ 1 L+ +γ g L g The output is (374) y(t) =γ(l) cos(ω t ) g = γ j cos ( ω[t j] ) j=0 The trigonometrical identity cos(a B) = cos A cos B + sin A sin B enables us to write this as { } { } y(t) = γ j cos(ωj) cos(ωt)+ γ j sin(ωj) sin(ωt) (375) j j = α cos(ωt)+βsin(ωt) =ρcos(ωt θ) Here we have defined (376) α = g γ j cos(ωj), β = j=0 g γ j sin(ωj), j=0 ρ = ( α 2 + β 2 and θ = tan 1 β ) α It can be seen from (75) that the effect of the filter upon the signal is twofold First there is a gain effect whereby the amplitude of the sinusoid has been increased or diminished by a factor of ρ Also there is a phase effect whereby the peak of the sinusoid is displaced by a time delay of θ/ω periods Figures 3 and 4 represent the two effects of a simple rational transfer function on the set of sinusoids whose frequencies range from 0 to π 9