Message Boards Message Boards

2
|
11058 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Fitting Data to Stochastic Differential Equation (ITO Process)

Posted 11 years ago

Hello everybody,

First of all let me say that i am glad to be here. This will be my very first post. I am a student at Virginia Tech, and my major is Industrial Engineering. The topic that I have some questions about are not discussed in my curriculum; however, I have become very interested in the past 6 months. Mathematica has been great in helping me visualize and understand some of the concepts, even-though i am as new to this program as I am to the subject. I will try to make my question as clear as possible.

If I define a simple process as such:

    simpleproc[[Mu]_, [Sigma]_] = ItoProcess[
[DifferentialD]x[t] == [Mu]*[DifferentialD]t + [Sigma] [DifferentialD]w[t], x[t], {x, 0}, t, w [Distributed] WienerProcess[]];

Since, mu and sigma are constant - I can take the observed data for variable " x " - estimate the parameters for a Normal Distribution then directly substitute those values to the drift, and volatility of the diffusion. Easy so far.

Now I am attempting to model a Stochastic Damped Harmonic Oscillator with a random driven force, which I found in a book called "Modeling with Ito Stochastic Differential Equations" from Dr. Allen.E. Here is the model:

Eq 1. d x(t) = v(t) dt Eq. 2 d M(t) = (-k x(t) - b v(t)) dt + Sqrt(2 gamma^2 lamda) d W(t),

where M is the momentum, k is the coefficient of friction, b is the damping coefficient, and most importantly gamma and lambda are change in momentum, and the unknown probability of that change for a dt, respectively.

Since, the above equations have x, v and m - I divided both sides of equation 2 by 100 kg (fixed mass) since d M = m * d v. The we get:

      proc[k_, b_, [Lambda]_, [Gamma]_] = ItoProcess[{
           [DifferentialD]x[t] == v[t] [DifferentialD]t,
[DifferentialD]v[t] == -((b/100) v[t] + (k/100) x[t]) [DifferentialD]t + ((Sqrt[2 [Lambda] [Gamma]^2])/100) [DifferentialD]n[t]}, 
          x[t], {{x, v}, {1, 0}}, t, n [Distributed] WienerProcess[]]  

so, given a time series of observed accelerations in one direction - which I measured with my phone... How do fit such data to this type of SDE?

What I find hard to understand is that the the drift of this diffusion is the driving equation: hence, there is nothing there to fit. If I assume that changes in acceleration are Normally Distributed (which they are) with mean 0, and say sd = alpha. I still have two variables in the volatility (gamma, lambda);

...and lambda is a probability.

The only thing that I can think of to do (which may be incorrect) is to let lambda be "RandomReal," and gamma which now is the change in velocity equal to the expectation of the acceleration computed from the observed data. Then, I can simulate as many paths and take time slices or whatever.

However, simulation does not allow me to parametrize the process from data like I could with the simple first example, and that is not good.

I can clarify further if needed.

Thank you in advance! Any help would be greatly appreciated, and take it easy on me - I am new at this.

100 Path Realizations of the above example

POSTED BY: Edvin Beqari
2 Replies
Posted 11 years ago

Ok so based on the vast amount of responses - I realize i did a great job on laying out the problem.

The Main question is : How do you fit data to SDEs with Mathematica which have a drift, and a diffusion coefficient that is not constant?

Here is the model again - and hopefully a bit clearer.

enter image description here

And here is a sample data - acceleration in the Y-directions:

{0.59, 0.311, 0.094, -0.063, -0.307, -0.552, -0.867, -1.144, -1.405, -1.58, -1.742, -1.753, -1.541, -1.1, -0.551, -0.012, 0.343, 0.357, 0.361, 0.283, 0.084, -0.743, 0.45, -0.482, 0.042, -0.024}

I will also like to post the link from a presentation given by Oleksandr Pavlyk. At 15:46 he presents a similar model, however he does not have much time there to go in depth. Awesome presentation though. I wish we could see more of that.

Stochastic Calculus and Applications

So, any help would be greatly appreciated. Let's make this an open conversation and if someone wants to bring his own example - that would also be very helpful.

Cheers!

POSTED BY: Edvin Beqari
Posted 11 years ago

So, as I learn more about the subject - I have discovered that to fit state observations to a given stochastic differential equation:

One has to apply the Ito Lemma to the SDE in order to find the Forward Kolmogorov equation form. Then, that PDE can be solved with an initial condition using a Fourier transform, and what you get is the joint density of the state and time.

Now the algebra is not particularly fun - and it is also hard to visualize. This is the reason I hope to learn how to do this in Mathematica.

Here is a link to my other post where I ask how to solve the PDE in Mathematica:

Solve the Kolmogorov PDE

Learning something new everyday..Cheers

POSTED BY: Edvin Beqari
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract