Control
1
Finite differences equations
Let us consider the following ordinary differential equation d d2 f (t) + f (t) + f (t) = 0. dt2 dt Byintroducing the auxiliary notations x1 (t) x2 (t) = = f (t) , d f (t) ; dt (1)
(2)
it will immediately follow, from the expression (1), that d x1 (t) = x2 (t) , dt d x2 (t) = −x2 (t) − x1 (t). (3) dt The reader shall remember the very definition of the ordinary derivative of a function f (t), which is defined by the limit expression d f (t + ∆t) − f (t) f (t) = lim . ∆t→0 dt ∆t Bysimply considering the fractional expression (this is, the expression without the limit), and employing it into the equations (2), we will obtain the socalled finite difference equationscorresponding to (1): x1 (t + ∆t) − x1 (t) ∆t x2 (t + ∆t) − x2 (t) ∆t = x2 (t) , = −x2 (t) − x1 (t) . (4)
Taking the finite difference equations corresponding to (4) ,and programming in matlab thenext grafic was obtained. 1
img/diffin.jpg
Figure 1: representation of the numerically approached solution for the finite difference equations
2
Difference equation
Consideringthe finite difference equations corresponding to (4) and put it n terms x1 (n + 1) − x1 (n) ∆t x2 (n + 1) − x2 (n) ∆t
= x2 (n) , = −x2 (n) − x1 (n) . (5)
Adding 1 to the firts finiteequation, and the first x1 and x2 term x1 (n + 2) − x1 (n + 1) = x2 (n + 1) , (6) ∆t To get the second finite equation in x1 terms, the x2 is replaced in the equation (6)
x1 (n+2)−x1 (n+1) ∆t
− ∆tx1 (n+1)−x1 (n) ∆t
=−
x1 (n + 1) − x1 (n) − x1 (n), ∆t
(7)
Simplyfing the equation (7) we obtain the difference equation, x1 (n + 2) + (∆t − 2)x1 (n + 1) + (1 − ∆t + (∆t)2 )x1(n) = 0 Programming the equation 7 in matlab we obtained the next graffic: 2
img/dif.jpg
Figure 2: representation of the numerically approached solution for the difference equation
3...
Regístrate para leer el documento completo.