Anda di halaman 1dari 19

2017-12

Ergodic-Stochastic Transformations

Hugo Hernandez
ForsChem Research, 050030 Medellin, Colombia
hugo.hernandez@forschem.org

doi: 10.13140/RG.2.2.20325.70881

Abstract

Deterministic dynamic variables can be transformed into random stochastic variables by means
of an ergodic-stochastic transformation. Such transformation is inspired on the ergodic
hypothesis, which relates the probability of a system taking a certain state value with the time
spent by the system at such state. In the current report, the mathematical derivation of such
ergodic-stochastic transformation is presented. Additionally, a numerical alternative is provided
for those systems that cannot be solved analytically. Through different application examples,
the ergodic-stochastic transformation is explained and illustrated.

Keywords

Dynamic processes, Ergodic hypothesis, Random variables, Stochastic modeling,


Transformations.

1. Introduction

Randomness, the apparent lack of predictability of occurrence of future events, is actually the
result of our lack of knowledge about the factors and mechanisms influencing those future
events. Even purely deterministic processes can be transformed into stochastic processes just
by assuming that information about a single variable is missing. Let us for example consider an
analog wall clock operating flawlessly. If at any given moment a person see the position of the
clocks second hand, it will be possible for such person to predict the position of the second
hand in the future. If the same person did not have the chance to see the clock previously, and
is then asked about the position of the second hand in exactly 60 seconds, the answer given
will be random, as it will be only a guess based on the limited information available.

06/11/2017 ForsChem Research Reports 2017-12 (1 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Boltzmanns ergodic hypothesis[1] is another interesting example of such transformation. Such


hypothesis indicates that for large systems of interacting particles, the ensemble-average of a
macroscopic variable at equilibrium corresponds to the value of the same variable averaged
over long times. Thus, considering that certain variable describes the dynamic behavior of
a system, such variable will be random if the exact time of measurement is unknown, and in
that case the expected value of the corresponding random variable will be equivalent to the
time-averaged value of the deterministic dynamic behavior of the variable:

(1.1)

where the measurement time is limited only to the interval [ ].

The purpose of the present report is to introduce analytical (Section 2) and numerical (Section
3) approaches for the transformation of deterministic dynamic variables into stochastic
variables by means of the ergodic hypothesis, as well as some representative examples
(Section 4).

2. Analytical Approach

Let us first assume that the deterministic behavior of the variable can be described by the
following general non-linear function :

(2.1)

Now, let us assume that the random variable can be described by a probability density
function such that:

(2.2)

Thus, replacing Eq. (2.1) and (2.2) in Eq. (1.1) results in:

(2.3)

06/11/2017 ForsChem Research Reports 2017-12 (2 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Eq. (2.3) resembles the expression for the variable transformation theorem,[2] which states
that:

( )| |

(2.4)

Now, given that from Eq. (2.1):

(2.5)

Eq. (2.4) becomes:

| |
(2.6)

and thus, from Eq. (2.3) and (2.6) it can be concluded that:

(2.7)

That is, the corresponding probability density function of time is that of a uniform random
variable. This is a very reasonable result as we are assuming the measurement time to be
unknown, and there is no preference for any particular time.

Eq. (2.6) can then be expressed as:

| |
( )| |
(2.8)

which indicates that the probability density function for the random variable is determined
by the reciprocal value of the time range times the absolute value of the rate of change of the
deterministic variable . In other words, the probability of reaching a certain value in the
random variable is proportional to the time spent by the system at such value.

Let us go back to the wall clock example. Let be the angle in radians described by the second
hand and the 12 oclock position. At seconds, the second hand is exactly at the 12 oclock
position and therefore . The general function describing the angle described by the
second hand at time (in seconds) within the next minute will be:

06/11/2017 ForsChem Research Reports 2017-12 (3 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

(2.9)

The rate of change of the angle will be given by:

(2.10)

Thus, for a random time selected within the next minute, the angle described by the position of
the second hand will be a random variable described by the following probability density
function (from Eq. 2.8):

(2.11)

Thus, the angle described by the second hand of the wall clock also behaves as a uniform
random variable, that is, any angle around the clock is equally probable.

Please notice that Boltzmanns ergodic hypothesis is valid as long as there are no preferences
in the selection of the measurement time for the time interval considered.

3. Numerical Approach

Even though Eq. (2.8) is relatively simple, it will not always be possible to obtain analytical
results. In general, the rate of change in the measured variable is:

(3.1)

and therefore Eq. (2.8) becomes:

( )| |
(3.2)

Now, given that the probability density function of cannot be expressed in terms of time t,
since it is unknown, then:

06/11/2017 ForsChem Research Reports 2017-12 (4 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

( )| |
(3.3)

Actually, there might be different solutions for , and all of them should be considered in the
calculation of the probability density function:


( )| |
(3.4)

where is the number of solutions for .

Unfortunately, not all functions can be explicitly inverted to obtain a function . In those
cases, it is possible to use numerical approximations for determining probability density
functions.

The general numerical procedure is the following:

1. Perform a numerical simulation of the dynamic behavior of variable during the whole
time interval considered, with a constant time step . This condition is the key for the
validity of the ergodic hypothesis. The time step should be small enough, not only to
provide accurate numerical results, but also to provide enough data points for analysis.
The total number of data points obtained will be given by


(3.5)
2. Sort the data set of variable in ascending order, independently of time values.
3. Rank the sorted data set, that is, assign a consecutive integer value to each data
beginning from 1. The rank value will be denoted by variable .
4. Calculate the cumulative probability function as

(3.6)
5. Fit a monotonic mathematical function that describes the behavior of the cumulative
probability as a function of . This can be any type of polynomial approximation
(piecewise if necessary), although any other function is possible as long as it provides a
good fit (e.g. by least squares minimization). In general:

06/11/2017 ForsChem Research Reports 2017-12 (5 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

(3.7)
6. Determine the probability density function as:

(3.8)
7. Calculate the expected value of the random variable :

( )

(3.9)
8. Calculate the variance of the random variable :

( )

( ) ( ( ))

(3.10)

Let us now consider as an illustrative example, the position of an object moving at constant
acceleration:[3]

(3.11)

Even though it is possible to obtain an analytical transformation, this example was chosen as a
reference for testing the numerical approach. Thus, using the analytical ergodic-stochastic
transformation, the probability density function of the random position is (from Eq. 2.8):

( )| |
(3.12)

Since the expression obtained is not explicit in the position, it is then necessary to use Eq. (3.3)
instead:

06/11/2017 ForsChem Research Reports 2017-12 (6 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

( )
(3.13)

given that:

(3.14)

As a numerical example, let us consider the free fall of an object initially at rest, with the
following values: seconds, second, m/s, m/s2, meters.
Thus, Eq. (3.13) becomes:


(3.15)

The probability density function described by Eq. (3.15) is graphically represented in Figure 1.

Figure 1. Probability density function of the position of an object initially at rest, for the
first second of free fall (Eq. 3.15).

For this distribution, the corresponding expected value and variance can be calculated as:

06/11/2017 ForsChem Research Reports 2017-12 (7 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

( )


(3.16)

( )
( ) ( )

( ) ( )

(3.17)

where the substitution was considered for both integrals.

This is the exact analytical solution for the ergodic-stochastic transformation of the free-fall
example. Now, following the numerical procedure previously described, using ,
results in the cumulative probability function depicted in Figure 2.

Figure 2. Cumulative probability function of the position of an object initially at rest, for the first
second of free fall, obtained from Eq. (3.6).

Even though the curve obtained can be fitted with the general polynomial proposed in Eq.
(3.7), the shape of the curve suggests that it can also be fitted by an inverted parabola. This can
also be deduced using the following analysis. Given that the position of the object decreases
monotonically, the rank can be linearly related to time as follows:

06/11/2017 ForsChem Research Reports 2017-12 (8 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

(3.18)

Thus, from Eq. (3.6) and (3.14):

( ) ( )

(3.19)

Now, using Eq. (3.8):


(3.20)

Eq (3.20) presents a good fit to the exact function (Eq. 3.15), with a value for the R2 coefficient
of 99.995%. The calculation of the expected value and variance using Eq (3.20) yields
and , respectively. These results deviate around and with respect to the
values given by Eq. (3.16) and (3.17). It is also interesting to compare the values obtained for
the average and the sample variance of the position using the dynamic numerical data. For
it is found that:



(3.21)

and

(3.22)

which show deviations of and with respect to the exact ergodic expected value
and variance, respectively. Please notice that these deviations are expected to decrease as the
numerical time step is reduced.

06/11/2017 ForsChem Research Reports 2017-12 (9 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

4. Additional Examples of Application

In this Section, different examples are presented to illustrate even better the transformation of
dynamic variables into random variables based on the ergodic hypothesis.

4.1. Inertial motion

Let us consider the inertial motion of a particle in the absence of any external forces. In this
case, the particle is expected to move a constant velocity , and the position of the particle
will be given by:[3]

(4.1)

The corresponding rate of change in position is:

(4.2)

Thus, from Eq. (2.8):

[ ( )]
( )| | ( )| |

(4.3)

Therefore, it can be concluded that the ergodic-stochastic transformation inertial motion leads
to a uniform random distribution of the position of the particle.

4.2. Uniform circular motion

Let us now consider a particle in uniform circular motion,[3] as illustrated in Figure 3.

The position of the particle will be given by:

(4.4)

(4.5)

06/11/2017 ForsChem Research Reports 2017-12 (10 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

where is the radius of the circle, and

(4.6)

with being the angular velocity, and ( ) ( ) being the phase angle.

Figure 3. Motion of a particle (green), at a constant speed describing a circular path of radius .
The center of the circle corresponds to the origin of coordinates.

The corresponding rates of change are:

(4.7)

(4.8)

Thus, the probability density functions for the position in both coordinates are:

( ) | | ( ) | | ( )
(4.9)

( ) | | ( ) | | ( )
(4.10)

06/11/2017 ForsChem Research Reports 2017-12 (11 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Considering the following values of the parameters: , , , then the probability


density functions become:


(4.11)


(4.12)

The probability density functions for both the horizontal and the vertical position present the
exact same behavior. However, it is important to notice that both positions are correlated and
therefore, they cannot be both considered as random at the same time. For example, if the
horizontal position is considered to be random, then the vertical position will be determined
by:


(4.13)

Eq. (4.11) is represented graphically in Figure 4.

Figure 4. Probability density function of the particle position in uniform circular motion.

The expected value and variance of the random horizontal position will then be:



(4.14)

06/11/2017 ForsChem Research Reports 2017-12 (12 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

( )

(4.15)

As a curious fact, please notice that the expected values for both horizontal and vertical
positions of the particle are zero, which corresponds to the center of the circle, a position that
is never taken by the particle.

4.3. Harmonic oscillator model of a diatomic molecule

Let us now consider the vibration of a bond between two atoms in a diatomic molecule,
described by a simple harmonic oscillator.[4] The coordinate system of reference is the center
of mass of the molecule. The equation of motion for each atom (1 and 2) will be:

(4.16)

(4.17)

where is the equilibrium bond distance.

Then the position of the each atom can be solved to obtain:

(4.18)

(4.19)

where

(4.20)

06/11/2017 ForsChem Research Reports 2017-12 (13 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

( )

(4.21)

and is the amplitude of motion for each atom, which depends on the total energy of the
system :

(4.22)

Considering only the position of molecule 1 to be random, and thus , then from
Eq.(3.4):


( )| |
( ) | ( ( )) |

( ) ( )

(4.23)

where the number 2 in the numerator appears because there are two solutions (one positive
and one negative) for the radical, and is the number of complete periods considered in
the time interval , which is given by:

( )

(4.24)

Thus, for long time intervals considered ( ), Eq. (4.23) becomes:

06/11/2017 ForsChem Research Reports 2017-12 (14 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

( )

(4.25)

This probability density function is similar to that obtained for uniform circular motion in the
previous example.

If we are not interested in the position of one atom, but on the overall potential energy of the
bond, then we can transform the following expression:

( )

(4.26)

into:


(4.27)

using Eq. (3.4) for long time intervals.

Eq. (4.27) is graphically depicted in Figure 5.

Figure 5. Probability density function of the potential energy in the vibration of a diatomic
molecule using the harmonic oscillator model, with total vibration energy (kinetic +
potential).

The expected value of the potential energy is:

06/11/2017 ForsChem Research Reports 2017-12 (15 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org



(4.28)

And the variance of the potential energy is:

( )

(4.29)

These results indicated that the total vibration energy is expected to be equally distributed
between the potential and the kinetic energy.

4.4. Lennard-Jones interactions

As a last example, let us consider the interaction between two molecules under a Lennard-
Jones interaction potential.[5] The equation of motion for molecule 1, taking molecule 2 as the
reference system of coordinates, will be given by:

[ ( ) ( ) ]

(4.30)

where represents the magnitude of the position vector of molecule 1 with mass ,
and are the initial position and velocity of molecule 1 relative to molecule 2, and and are
Lennard-Jones interaction parameters of the pair of molecules.

If we want to describe any dynamic behavior of the system as a random variable (e.g. positions,
velocities, energies, etc.), given that the inversion of Eq. (4.30) is not possible, then the
numerical procedure of Section 3 will be used. The numerical simulation must be performed
assuming numerical values for all initial conditions and parameters. As an illustration, the
following arbitrary set of values in arbitrary units, capturing the occurrence of a molecular
collision, will be used: , , , , , , .
Additionally, a simulation time step of will be considered. The numerical simulation
results are graphically summarized in Figure 6.

06/11/2017 ForsChem Research Reports 2017-12 (16 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Figure 6. Dynamic behavior of two molecules during a collision, under a Lennard-Jones


interaction potential.

The corresponding probability density function for the intermolecular distance and the total
energy, obtained using the procedure described in Section 3, is presented in Figure 7.

Figure 7. Polynomial probability density functions of the intermolecular distance (top) and the
total energy (bottom) for one single collision under a Lennard-Jones interaction potential.

In order to obtain a more representative picture of the behavior of the energy of the system
during molecular collisions under Lennard-Jones interactions, a larger molecular dynamics

06/11/2017 ForsChem Research Reports 2017-12 (17 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

simulation[6] is performed using a simulation box of 8 molecules with periodic boundary


conditions. The total energy of the system obtained by simulation is presented in Figure 8.

Figure 8. Total system energy (in arbitrary units) for the molecular dynamics simulation of a
periodic box with 8 molecules under Lennard-Jones interactions.

For this data set obtained, the corresponding probability density function obtained is
presented in Figure 9.

Figure 9. Probability density function of the total system energy (in arbitrary units) for the
molecular dynamics simulation of a periodic box with 8 molecules under Lennard-Jones
interactions.

Longer simulation times and larger simulation boxes should be used for improving the ergodic-
stochastic transformation of any dynamic variable measured by molecular dynamics simulation.

06/11/2017 ForsChem Research Reports 2017-12 (18 / 19)


www.forschem.org
Ergodic-Stochastic Transformations
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

5. Conclusion

Any dynamic variable can be transformed into a random variable by assuming unknown the
exact time of measurement. Such transformation, denoted as ergodic-stochastic
transformation, can be performed either analytically or numerically. The analytical ergodic-
stochastic transformation is based on the fact that time has a uniform probability of
occurrence during an arbitrary interval. The numerical approach is based on the polynomial fit
of the cumulative probability function of the dynamic variable, which can then be transformed
into a probability density function. The ergodic-stochastic transformation discussed in the
present report can be used as a valuable tool for the stochastic modeling of dynamic
processes.

Acknowledgments

This research did not receive any specific grant from funding agencies in the public,
commercial, or not-for-profit sectors.

References

[1] Szsz, D. (1996). Boltzmann's ergodic hypothesis, a conjecture for centuries?. Studia
Scientiarum Mathematicarum Hungarica, 31(1), 299-322.

[2] Casella, G., & Berger, R. L. (2002). Statistical Inference. 2nd Ed. Pacific Grove: Duxbury.

[3] Halliday, D., Resnick, R., & Walker, J. (2013). Fundamentals of Physics Extended, 10th
Edition. Wiley.

[4] Kaznessis, Y. N. (2011). Statistical Thermodynamics and Stochastic Kinetics: An Introduction


for Engineers. Cambridge University Press.

[5] Lennard-Jones, J. E. (1931). Cohesion. Proceedings of the Physical Society, 43(5), 461.

[6] Rapaport, D. C. (2004). The art of molecular dynamics simulation. 2nd edition. Cambridge:
Cambridge University Press.

06/11/2017 ForsChem Research Reports 2017-12 (19 / 19)


www.forschem.org

Anda mungkin juga menyukai