# Numerical construction of phase space for a dynamical system

Suppose I have a standard, deterministic dynamical system. For concreteness I'll assume it's a two variable system of the form, $$\dot x_1 = f(x_1,x_2; \theta_1)\\ \dot x_2 = g(x_1,x_2; \theta_2)$$ where $\theta_i$ are parameter vectors that determine the coefficients of various terms in the nonlinear equations $f$ and $g$. Let's assume that this equation is generally not solvable, and that I can only partly determine the different behaviors at or near steady-state analytically. As a result I solve the system numerically. For now let's neglect talking about the specifics of ensuring that the system converges within the integration time, or whether it converges at all (or ends up oscillating or something)

I want to generate a phase portrait of the system, which shows the different steady-state values of $x_1^{ss}, x_2^{ss}$ as a function of the high-dimensional input $\theta_1, \theta_2$. The way that I would usually do this is to pick random values of for all the parameters, simulate the system until convergence, record $x_1^{ss}, x_2^{ss}$, and then try a different $\theta_1, \theta_2$. I then have a data set that maps $\mathbb R^{M_1 + M_2} \rightarrow R^2$ (if $M_i$ is the number of elements in $\theta_i$), and I can look at this data set and try to tease out any phase boundaries.

Is this the best way to approach this problem? Have better algorithms been devised, or do any existing software packages approach and solv this problem in an efficient manner?

I understand that this might be possible if I have some sort of objective function for whether a given trial $\theta_1, \theta_2$ puts the solution close to a phase boundary. But I'm not totally sure how I would construct such a function, or if such an approach would adequately sample phase space.

Thank you

What you are asking about is a broader topic than you probably think it is, so I can only give you some directions here:

• First of all, what you call phase space is usually called parameter space, while phase space is used for something else.

• Given that you only have two observables, one usually wouldn’t call different types of results phases, but rather dynamics or dynamical behaviours. Phase is usually used to denote a class of states (as identified with aggregated observables) of a many-particle system or similar.

• If your system always converges to a stable fixed point and that stable fixed point is unique for a given parameter set $(θ_1, θ_2)$ (otherwise you have to worry about basins of attraction), you can determine the stable fixed point by solving $\dot{x}=0$ and $\dot{y}=0$. This may still only be solvable numerically, but you do not need to solve differential equations.

In such a situation, the fixed points usually depend continuously on the parameters $(θ_1, θ_2)$ and thus there is nothing comparable to phases. If not, the discontinuities are what you should be after.

• If instead your system exhibits different kinds of dynamics for different parameter sets $(θ_1, θ_2)$, such as a fixed-point dynamics for one parameter set and periodic oscillations for another and chaos for yet another, bifurcation theory is what you should take a look at. Briefly, it allows you to analytically determine what kind of dynamics a system exhibits in many cases and thus allows you where in parameter space the dynamics changes and in what way.

If that does not suffice, you have to find with reasonable characteristics that classify your dynamics, which very much depend on your system. These may be existing characteristics, such as Lyapunov exponents, or new ones specific to the phenomena exhibited by your system.