# Nonsmooth dynamical system (DAE) - systematic way to calculate period numerically?

What I have in mind is a mechanical system that is described by an implicit system of ODEs or a system of DAEs (differential algebraic equations). The system is asymptotically stable, meaning that there exists an attracting orbit that the system converges to for all initial values (except possibly for the trivial initial condition).

I am searching for a way to numerically calculate such a system's period when it has converged arbitrarly close to the attracting orbit. I have tried finding litterature on this subject, but find none that discuss how to solve this problem.

There is one pragmatic way to approach this problem, and that is of course to calculate the period by simulating the system (e.g. in Matlab) for a large amount of cycles and then divide the total time with the cycles: $$T=\frac{t_{total}}{N_{cycles}}$$, where $$T$$ is the period (or eigenfrequency) of the vibrating system.

Alas, there is a trade-off in precision doing so. Anyone know a more rigorous approach using some kind of numerical method?

Best regards

I would program this using an adaptive step size approach where the step size decreases as some power (square root works well, empirically) of the error associated with an assumed period. Specifically:

Start with a point $$y_0$$ in the dynamics space that is "near" the asymptotic periodic orbit, some time step size $$\Delta_0$$ which need not be as small as would be required for your eventual desired precisions, and some estimate $$\tau_0$$ of the period. Divide that period by the step size to find $$n_1 = \left\lceil \frac{\tau_0}{\Delta_0} \right\rceil$$, and simulate using $$n_1$$ steps of size $$\frac{\tau_0}{n_1}$$.

At this point the simulated trajectory will take you to $$y_1$$ and let the previous state for one less and subsequent state for one more time step be $$x_1$$ and $$z_1$$, respectively. Now let $$y_1$$ be the point of closest approach of the line $$x_1z_1$$ to the point $$x_0$$, and let that point be at $$\tilde{y}_1 = \xi_1 x_1 + (1-\xi_1 z_1)$$. Then your next guess for the period will be $$t_1 = t_0 + (2\xi_1 - 1) \Delta_0$$ and your degree of regard for the solution is $$r_0 = |y_1-y_0|$$ for some suitably chosen norm function.

Repeat this step, but every $$k$$-th iteration (for some suitably chosen $$k$$, balancing the cost of changing to a different time step size in the dynamic simulation against the desire to adjust the step size aggressively) modify your step size, doing $$\Delta_{nk} = \Delta_{(n-1)k} \sqrt{\frac{r_{nk}}{r_{(n-1)k}}}$$ As I said, the square root might not be the best choice for how aggressively to decrease the step size; for well behaved systems one might do some theoretical work on what the best exponent should be, but $$frac12$$ seems like a good heuristic choice.

This scheme has the advantage that you can allow the trajectory to start some small distance away from the periodic orbit, regarding the imperfection in early periodicity to be comparable to the errors already inherent in the iterative approximations to a perfect time period. It also, once you have gotten close to the actual orbit and period, converges geometrically, which is much better than just going around for multiple periods.

If the Matlab routine does not let you recover the state for a step before and a step after the specified time interval, you may have to stop one interval early and move forward the last two intervals by explicit linear approximation to the equations.

• Thanks for the reply Mark. I have some questions regarding the notation mostly. y_0 is the state we begin with, then we simulate the system for one (imperfect) period so that we are "back" and that state is called y_1? What does the point x_0 represent? The state one time step before y_0? What does \xi represent? I am confused about the \tau and t notation, are these the same? My equations are also linear, so there won't be a problem about that. – SimpleProgrammer Mar 29 at 10:31
• Yes, I said $t$ when I meant $\tau$. $xi$ represents the fraction of the way the closest approach point is, between the step before the guessed perfect period, and the step after it. Basically, you are linearizing between those two time steps and saying that the new period guess is based on that linear approximation. – Mark Fischler Mar 31 at 0:16