1. Introduction
The Fokker–Planck (FP) equation, also known as the forward Kolmogorov equation, is a deterministic partial equation (PDE) whose solution gives the joint probability density function (pdf) of the responses (states) of a dynamical system subjected to random excitation. While analytical solutions are available for linear systems of any dimension [
1,
2], nonlinear dynamical systems naturally give rise to more challenging FP equations, for which analysis may be limited to the stationary pdf [
3] when it can be carried out at all. When the FP equation is discretized, for example, by using finite elements in a system’s phase space, the resulting matrix equation grows much faster than the dimension of the original dynamical system, and computations quickly become intractable. In the following, we try to address this problem for small (but nontrivial) systems.
The first attempts at the application of finite element analysis (FEA) in numerical treatment of the FP equation date back several decades. Bergman and Heinrich [
4] first proposed Petrov–Galerkin FEA to solve the backward Kolmogorov equation (the formal adjoint of the FP equation), and solved the first passage problem for a second-order linear system driven by additive Gaussian white noise. Langley [
5] used a finite element formulation to study the stationary random vibration of 2-D nonlinear systems. Spencer and Bergman [
6] used a Bubnov–Galerkin FEA method to solve the FP equations of linear, Duffing, and Van der Pol oscillators, and studied the corresponding first passage problems. El-Gebeily and Shabaik [
7] reported a straightforward analysis of the transient problem. Masud and Bergman [
8] presented a multi-scale FEA formulation, applied it to calculate the solution of the FP equation, and examined its efficacy through selected applications. Floris [
9] used spline interpolation in FEA of the FP equation, Kumar et al. [
10] considered systems subjected to colored non-Gaussian noise, and Král and Náprstek [
11] adopted simplex elements to treat higher-dimensional problems. Further algorithmic refinements and additional applications may be found in Refs. [
12,
13,
14,
15,
16,
17].
All of these works, however, suffer from the same fundamental limitation. When the FE method is used to solve the FP equation, as the dimension of the state space increases, the number of equations to be solved increases exponentially. The resulting huge amount of computation required brings great challenges. In this paper, we consider two approaches to overcoming this difficulty—namely, reducing the dimension of the FE equation by projecting it onto a smaller basis, eliminating one coefficient matrix in the process; and splitting the remaining matrix to enable efficient time marching of the nonstationary solution. Numerous examples of related work on deterministic problems may be found in the literature, for example, in computational fluid dynamics [
18,
19,
20,
21] and in nearfield acoustic holography [
22]. The novelty of this work lies in the application of these techniques to the FP equation, and in the results obtained for specific choices of basis and splitting scheme.
Dimension reduction has been gradually applied in the solution of FP equations. Lötstedt and Ferm [
23] obtained results for a problem involving multiple chemical species by deriving PDEs to approximate the first moments for some of the species and coupling these to the FP equations for the species not so reduced. Leonenko and Phillips [
24] used spectral discretization and a high-order reduced-basis approximation in an application to polymer dynamics, and Er [
25] proposed a subspace method to solve for the response probability density functions of large-scale nonlinear stochastic dynamical systems. Chen and Lin [
26] and Chen and Rui [
27] obtained the generalized probability density evolution equation by using decoupled physical equations. Zhu [
28] studied the stationary probability density function of a multi-degree-of-freedom nonlinear system subjected to external, independent Poisson white noise, reducing the high-dimensional generalized FP equation to a low-dimensional equation, and Liang et al. [
29] improved on this approach. In contrast to most of these studies, the reduction method used herein does not depend on the physics of the problem considered.
Independent of the dimension of the problem, operator splitting provides a numerical method to compute the solution to matrix differential equations that can be more efficient than straightforward integration using the original coefficient matrices. Operator splitting methods have been known for more than a century, starting with the scheme introduced by Lie in the mid-1870s [
30]. Usadi and Dawson [
31] developed alternating direction implicit (ADI) methods. In the mid-1970s, close relationships between the augmented Lagrangian methods of Hestenes [
32] and Powell [
33,
34] and ADI methods were identified, which inspired the alternating direction method of multipliers (ADMM). Based on a symmetrization principle, Strang [
35] introduced a second-order variant of the Lie scheme, which was motivated by a need for the accurate solution of hyperbolic problems. This second-order scheme is unconditionally stable, which makes it popular in computing solutions to PDEs. Speth et al. [
36] further developed balanced splitting and rebalanced splitting methods; compared with earlier splitting methods, these have higher accuracy and can correctly capture steady-state behavior. Goldstein and Osher [
37] discussed an algorithm that is equivalent to the ADMM, and this method has been used in many image-processing applications.
Operator splitting has attracted attention for its computational efficiency in the solution of FP equations. Zorzano et al. [
38] combined an ADI scheme with the finite difference method to solve FP problems in particle accelerators. For studying the influence of noise in the particle dynamics in a storage ring, a method based on operator splitting was developed by Mais and Zorzano [
39], which can also be used in stochastic beam-dynamics problems in accelerators. Zorzano et al. [
40] provided a robust finite difference scheme with operator splitting (ADI) for the FP equation in two spatial variables and time.
Because of the rapid growth of the FE equation with the increasing dimension of the underlying dynamical system, it now seems unlikely that this approach to the solution of the FP equation will be extended beyond the three or four states that have represented a practical limit for several years. However, systems of this size do have practical applications, such as design optimization and nonlinear filtering [
41], and so there is some value in pursuing their efficient solution. In addition, we are motivated in part by the goal of providing baseline timing and solution results for the FEA of such problems as the field shifts increasingly toward the routine use of alternative formulations, such as physics-informed neural networks (PINNs) [
42,
43,
44], which are very promising for problems of high dimension but whose numerical properties have not yet been fully tested.
Our interest is thus pragmatic. The finite element analysis of the FP equation is largely a mature subject, with some gaps where known numerical techniques may be applied. We try to provide practical guidance for the use of two of these, model reduction and operator splitting. While we focus on 2-D problems herein, our approach is directly extensible to larger systems, which have structurally similar coefficient matrices; however, both programming complexity and storage requirements grow very quickly, and the efficiency gains we achieve are not enough to offset this. Rather than trying to compete with methods such as the PINN solvers mentioned above (a rough computation based on estimating the numbers of floating-point operations needed suggests that they overtake FEA by the time a system has grown to four states), we seek to improve the efficiency of the solution of a class of problems that may serve as well-understood test cases. For the same reason, we believe these results will be of value to those studying FEA or other techniques [
45,
46,
47] with an eye primarily to performance and algorithmic properties other than speed.
In the following sections, the FP equation is used to formulate a PDE for the joint pdf of the displacement and velocity of a single-degree-of-freedom (SDOF) oscillator, which is then discretized in the phase plane. The resulting large matrix ordinary differential equation has constant coefficient matrices, and the properties of their eigenvectors for use in a reduced basis are elucidated. One of the coefficient matrices may be usefully split into the sum of two matrices with better stability characteristics, which makes feasible the use of a state transition matrix to advance the solution by a fixed step size. The performance of these techniques is demonstrated through numerical examples where the nonstationary random responses of linear and nonlinear SDOF oscillators are computed. Recommendations based on the findings from these applications are summarized in the results and conclusion.
2. Problem Formulation
Consider an SDOF system (an oscillator) governed by the stochastic differential equations
where the state vector is
and the overdot denotes differentiation with respect to time. The excitation
is Gaussian white noise, which is fully defined by its first two moments,
where
is the Dirac delta function and
is the magnitude of the constant two-sided spectral density function of the excitation. Equation (1) describes a Markov process, and its behavior is completely determined by the transition probability density function
, which satisfies the (deterministic) Fokker–Planck equation
and the initial condition
. Homogeneous boundary conditions are imposed where
as
. The joint probability density function of the response is related to the transition probability density by
where for convenience the initial condition may be taken in the form of a binormal distribution. Substituting this function into the FP equation and integrating term-wise gives
The desired joint probability density function satisfies this PDE subject to the initial conditions on f and the boundary conditions (which are the same as those on p).
A Galerkin finite element method is used where within a single element with domain
, the probability density function is interpolated according to
where the
,
, are bilinear trial functions of class
,
n is the number of nodes in a single element, and
are the nodal values of the density. Substituting Equation (
6) into the weak form of Equation (
5) leads to
where the element matrices are given by
and
Assembling the global coefficient matrices by standard procedures produces
where
is the global vector of nodal values of the joint probability density function and
and
are constant, square matrices.
We note some properties of the coefficient matrices that are relevant to the discussion to follow. Both
and
are real and sparse. The matrix
is symmetric and positive definite, while
is nonsymmetric and has 0 as an eigenvalue with multiplicity one; the corresponding eigenvector, scaled so that
is the solution to
and gives the stationary joint pdf of the displacement and velocity responses. (Such normalization is not needed when the transient solution is computed starting from initial conditions given in the form of a pdf.) The matrix
is independent of the oscillator model and the excitation intensity, while
depends on both.
Experience has shown that for typical linear, Duffing, and Van der Pol oscillators, an effective finite element discretization can be achieved with about 100 elements in each dimension of a uniform rectangular mesh covering
[
6]. This leads to a state vector
of dimension
= 10,201. After imposition of homogeneous essential boundary conditions at the nodes on the boundary
, this is reduced to 9801.
4. Operator Splitting
If the convection and diffusion terms in the original equation are separated, perhaps in the expectation that their physics may develop on different time scales, the terms in the element
matrix can be grouped and that matrix can be divided into
and
Obviously, this splitting satisfies
. Then, global matrices
and
can be assembled as the previous
matrix was and transformed to obtain
and
.
For the system of ordinary differential equations of the form
obtained using
(so that
), we begin with the simple first-order splitting method and
and separate the original equation into two parts. Over a time step
, we solve the two equations
separately, using the solution of the first as the initial conditions for the second, and then combine the two separate solutions to form a solution to the original Equation (
23) [
35]. Using the state transition matrices associated with Equation (
24), we can advance the complete solution from time step
n to step
by computing
Combining these equations for a fixed time step
, the result
is obtained, which may be used to efficiently advance the solution over any number of steps by simply multiplying the previous value by a constant matrix. By comparison to the Taylor series for the exact solution of a canonical equation, it can be shown that this splitting method is first-order accurate (
) even when the matrices
and
do not commute under multiplication [
49].
This scheme is both simple and stable once the matrix exponentials are computed and multiplied to form the single-state transition matrix needed to advance the solution over a fixed step. It is of course possible to choose a time step so large that the exponentiation (carried out in floating-point arithmetic) fails, but our experience has been that using time steps small enough to resolve the dynamics of interest in a system usually avoids any such difficulties.
Symmetric splitting, as introduced by Strang [
35], can achieve second-order accuracy. Here,
is split into
Examining the Taylor series shows that
where
and where
denotes the matrix commutator
. The total number of time steps is
, so the global error is
.
5. Numerical Examples
The example problems of this section are taken from Spencer and Bergman [
6] and comprise two SDOF oscillators, one linear and one nonlinear (a Duffing oscillator with negative linear stiffness but positive cubic stiffness). The notation adopted here is typical of that used to describe vibrating mechanical systems, but these equations of motion have analogs in many areas of science and engineering. Initial conditions are specified as a binormal distribution. For each example, we give results from reduced problems, from operator splitting, and from these techniques used in combination. The solution of the full FE problem by an adaptive Runge–Kutta (RK) integrator is used as a reference except in those cases where an exact solution is available. (Specifically, we used the function
solve_ivp from the SciPy Python library (v. 1.8.0), which implements the RK5(4) algorithm of Dormand and Prince [
50].) This routine was also used to integrate those reduced problems for which operator splitting was not employed. Time-dependent results are usually reported here in terms of the nondimensional time
(i.e., in units of the (linearized) natural period of the system being considered).
Basis vectors were selected from eigenvectors of with the aid of a composite vector constructed by superposing twenty snapshots from a full RK solution, equally spaced in time from the relevant initial conditions to apparent stationarity, according to the magnitudes of the projections of this vector onto the eigenvectors. This allows the estimation of the minimum basis size required for the solution of the nonstationary problem, but it is obviously not a technique that will be generally available. Because the required bases were found to be quite large, half or more of the original problem dimension in the Duffing example, we have not investigated alternative means of selecting the best basis vectors; however, we note that the eigenvectors selected on the basis of the projection coefficients obtained using and the eigenvectors corresponding to the largest eigenvalues of were generally strongly correlated. This suggests that, in the typical case where a composite solution vector is not available, including in the basis, those eigenvectors with the largest eigenvalues will generally give the best results. This choice, and the required size of the basis, will be influenced by the degree to which the nonstationary solution is localized, and thus by the initial conditions. The initial mean values used in our examples are rather large, which makes for interesting but challenging examples.
We summarize here the steps followed in each example when either Runge–Kutta integration or first-order operator splitting was used. The steps for second-order splitting are very similar.
Form the finite element global coefficient matrices and . If operator splitting will be used, form and in lieu of . If basis reduction will be used, optionally include in or additional terms representing artificial diffusion.
Solve the eigenproblem and normalize the resulting vectors with respect to . (Hence, .)
Select the eigenvectors to be used to transform the problem (which may be all of them) and form .
Compute or and , as appropriate.
Starting from the given initial conditions, march the solution in time (typically to stationarity).
- (a)
If using a Runge–Kutta integrator, solve directly. If the output is in the form of a sparse structure, evaluate the solution at the desired times (e.g., on uniform steps).
- (b)
If using operator splitting, choose a time step
, evaluate the necessary matrix exponentials, and form the corresponding state transition matrix (cf. Equation (
26)). Advance the solution by forming a sequence of matrix–vector products.
Computations were performed on a typical x86 desktop computer using programs written in Python and taking advantage of its compiled numerical libraries, with the exception of the eigensolutions, which were found using Matlab (v. R2021b) running on the same hardware. The reported run times (normalized by the time required for the computation of the RK reference solution) include any transformations associated with problem reduction and recovery of the full solution vector.
5.1. Linear Oscillator
The FP equation for a linear system has an analytical solution [
1,
2], and it is frequently used as a benchmark problem for testing numerical methods [
4,
6,
8]. We consider the well-known SDOF linear oscillator (LO)
with the parameters
and
, the excitation
, and the initial conditions
and
. The domain for computation is square,
. The FE mesh is uniform, with an element size of 0.2 in both the
and
directions.
We begin with the FEA represented by Equations (8) and (
9), applied to the state Equation (30). Using a composite solution vector
composed of snapshots taken from a reference Runge–Kutta solution of the full FE equations, the coefficients resulting from the projection of this vector onto all the eigenvectors of
are plotted in
Figure 1, where they have been sorted from large to small. The norm of the error resulting when
is approximated with an increasing number of eigenvectors follows a similar trend.
When artificial diffusive terms were used in the solution of this problem on reduced bases, parameters were chosen after a limited amount of experimentation. In the direction, the parameters and were selected, such that the added terms are nonzero only for and rise to a maximum value of 1.6 on the boundary of . Likewise, in the direction, with and , the boundary terms enter where , with coefficients that increase to 1.3 on . While an effort was made to minimize the effect of these terms on the original PDE (beyond stabilizing clearly erroneous solutions), the results obtained were not particularly sensitive to the values chosen.
Figure 2 compares solutions computed using a reduced basis of 2000 eigenvectors, with and without artificial diffusive boundary terms, to the exact solution. The basis vectors were selected according to the projection coefficient magnitudes in
Figure 1.
Figure 2a shows the evolution with time of the nonstationary pdf at the origin of the phase plane. Both reduced solutions exhibit initial large errors because of the distortion of the initial conditions caused by the transformation onto the smaller basis. Both then track the exact solution until approximately
, when the reduced solution computed without added boundary terms begins to visibly exceed the reference curve. This trend continues, and would eventually result in divergence rather than a stationary solution. In contrast, the numerical solution computed on the same basis but with diffusive terms introduced near the boundary continues to agree with the exact analytical result, exceeding it only slightly as
approaches 20. A cross section of the stationary pdf along the displacement axis of the phase plane is plotted in
Figure 2b, where it may be seen that the artificial diffusive boundary terms both improve the accuracy of the peak value and reduce spurious oscillations in the tails of the distribution. However, both reduced solutions do oscillate rather than going smoothly to zero in the tails, and consequently, they take on physically meaningless negative values at some points.
Figure 3 and
Figure 4 reveal the effect of basis size, depicting the same responses discussed above, this time computed using a basis of 1000, 1500, or 2000 eigenvectors. All of the reduced problems were solved using artificial diffusive terms to improve the solutions. Collectively, these figures suggest that the use of fewer than 2000 basis vectors will result in spurious, sometimes negative numerical solutions, if not outright divergence. This is an important and somewhat surprising result: despite the simplicity and smoothness of the solution, the minimum useful basis is approximately 20% of the size of the original problem.
We now return to consideration of the full-dimensional problem and examine the use of operator splitting in its solution, without reduction. When the results of operator splitting are compared to the exact solution, no significant differences are found except that the splitting solution very slightly underestimates the peak value of the stationary pdf. The nonstationary and stationary numerical solutions are practically indistinguishable from the exact ones, and so are not shown here.
In combination with operator splitting, larger and smaller reduced bases, of sizes 1000 and 3000, were used without adding boundary terms. Trends and errors similar to those seen in the earlier reduced formulations for this system were found. We conclude that the use of a basis consisting of 2000 eigenvectors of the matrix along with splitting the matrix according to convective and diffusive terms produces reasonably accurate results for this problem.
Table 1 shows the run times of the different calculation methods applied to this example. Compared with Runge–Kutta integration, operator splitting and solving the problem using a state transition matrix can obviously accelerate the process. The more basis vectors used, naturally, the longer any solver will take. Solving the equation with artificial boundary terms is more time-consuming, but because of the higher accuracy, the run time cost is generally worthwhile. In many cases, the use of only operator splitting, but not reduction, may result in acceptable run times, obviating any need for artificial diffusive terms.
5.2. Duffing Oscillator
The governing equation of the nonlinear Duffing oscillator is, in state form,
with
,
,
,
, and
. (Like the previous example, this system is taken from [
6].) These parameters are those of a system with negative linear stiffness but positive cubic stiffness, resulting in a bimodal stationary pdf that is doubly symmetric about the origin of the phase plane and approximately Gaussian in
. The nonlinearity thus controls the stationary response despite the small numerical value of
. The initial conditions were taken to be
and
, and the FE domain was
,
, with 100 elements used in each dimension.
Guided by the projection coefficients of a composite vector and some experimentation, we determined that somewhat more than 4000 basis vectors were needed to capture the dynamics of this problem in reduced form. The diffusive boundary layer coefficients and and and were then chosen for the and directions, respectively.
The discretized equation for the joint pdf of the Duffing oscillator was reduced onto a basis of 4500 eigenvectors, with and without introducing artificial boundary terms in the PDE. The nonstationary response in
Figure 5a is shown for the point
, which is the approximate location in the phase plane of one of the two peaks of the bimodal stationary distribution. Both the full and reduced problems were integrated here by a standard Runge–Kutta routine. When artificial diffusive boundary terms are included in the formulation, the solution of the resulting reduced problem approximates well the solution of the full problem, after a transient error attributed to the inability of the reduced basis to represent the given initial conditions accurately. Without added boundary terms, however, the solution does not approach the correct stationary value, and begins to decrease from it as probability mass is lost over the edges of the FE domain.
Figure 5b, a section of the stationary pdf along the
axis, shows spurious oscillations in the tails of the pdf. (The exact stationary solution shown there is from Caughey [
3].) Both reduced problems underestimate the pdf in the valley between the peaks of the stationary distribution. While the inclusion of diffusive boundary terms reduces some of the extraneous ripples, it must be said that these results are not as clean as those obtained for the linear oscillator, despite the use of a much larger reduced basis (here, almost 46% of the size of the full problem).
When the results of first- and second-order splitting are compared to those of a Runge–Kutta solution of the unsplit problem, second-order splitting is found to be more accurate, but both solutions from splitting are found to agree quite well with the RK solution during the entire response, including at stationarity.
Responses found using a combination of basis reduction and operator splitting, with and without artificial diffusive boundary terms, followed the trends observed for the linear oscillator. Even when the basis was enlarged to 5000 eigenvectors, the solutions found without boundary terms deviated significantly from the reference RK integration of the unreduced system. With boundary terms, good results were obtained with the previous basis size of 4500, albeit with the same sorts of errors observed when these equations were earlier solved without splitting.
The times required to solve this example as described above are shown in
Table 2. Because of the large basis required, the savings compared to the full-dimensional problem are not as dramatic as for the linear oscillator, but they are still significant. Operator splitting and advancing the solution using a state transition matrix, however, yields great improvement in computational efficiency compared to straightforward time integration using a Runge–Kutta algorithm. Further savings can be achieved by combining dimension reduction with operator splitting, but in view of the errors that result and the practical requirement for adding artificial diffusive terms to the PDE, this approach is relatively unattractive in this example.
6. Results
We have investigated two techniques to improve the speed of solution of Fokker–Planck equations as discretized using finite element analysis in the phase plane. In the first of these, reduced bases were constructed from selected eigenvectors of the coefficient matrices and appearing in the resulting first-order differential equation. Basis vectors obtained by solving a regular eigenproblem in were attractive because they were real-valued, could be used to diagonalize , and were independent of the parameters of the underlying dynamical system and the intensity of the excitation. The size of the basis required in order for the reduced problem to capture well the dynamics of the full problem was typically one-fifth to one-half that of the original system. Considering that the number of elements of the reduced coefficient matrices goes roughly as the square of this ratio, this represents an attractive savings in storage and computation; however, it does not always enable the drastic improvement in computational efficiency sometimes associated with a reduced-order model. In addition, even when a large basis was used, the reduced problem was found to be susceptible to spurious oscillations in the tails of the computed pdf, and to loss of probability mass over the edges of the computational domain. These phenomena were effectively addressed by the introduction into the original PDE of artificial diffusive terms near the boundaries of the domain. While greater gains were achieved in the linear example, in the more representative, nonlinear Duffing oscillator example, the typical reduction in run time, compared to integration by a conventional adaptive Runge–Kutta algorithm, was approximately 80%. This is certainly significant; however, we must reiterate that the reduced bases were selected with the benefit of the composite solution vector , and that even a modest reduction in the size of the basis used was found to require the introduction of artificial diffusive terms to stabilize the solution near the boundaries of the computational domain. In view of these limitations, we cannot enthusiastically recommend the use of this reduction.
The second numerical method applied herein to the same discretized PDE was operator splitting, where the singular coefficient matrix was written as the sum of two nonsingular matrices. This allowed the rapid computation of the joint response pdf with a uniform time step using the constant state transition matrix given by the product of the exponentials of the two component matrices. Both first- and second-order-accurate splitting schemes were considered. It was observed that, although the cost of second-order methods was not much greater, first-order splitting was usually sufficiently accurate while being simpler to program, and that separating the FE coefficient matrix according to the physical source of the terms in the original PDE (i.e., convection or diffusion) was effective in the linear and Duffing oscillator examples studied. The resultant saving in computational effort was comparable to that obtained with basis reduction for the linear oscillator example, a little more than 80%, but savings of over 98% were observed when operator splitting was used to compute the joint pdf of a Duffing oscillator.
When these methods were combined, by using operator splitting to solve equations reduced on a basis of selected eigenvectors, the advantages of both techniques were retained. Run times for the solution phase of nonstationary problems were commonly 1% to 10% of those required for Runge–Kutta integration. This improvement was achieved with little cost in accuracy, although the caveats stated above regarding basis reduction apply here as well.