  In uncertainty quantification, critical parameters of mathematical models are
substituted by random variables. We consider dynamical systems composed of
ordinary differential equations. The unknown solution is expanded into an
orthogonal basis of the random space, e.g., the polynomial chaos expansions. A
Galerkin method yields a numerical solution of the stochastic model. In the
linear case, the Galerkin-projected system may be unstable, even though all
realizations of the original system are asymptotically stable. We derive a
basis transformation for the state variables in the original system, which
guarantees a stable Galerkin-projected system. The transformation matrix is
obtained from a symmetric decomposition of a solution of a Lyapunov equation.
In the nonlinear case, we examine stationary solutions of the original system.
Again the basis transformation preserves the asymptotic stability of the
stationary solutions in the stochastic Galerkin projection. We present results
of numerical computations for both a linear and a nonlinear test example.
