Frequency Response Plots using COLL/PO toolbox
Toolboxes for parameter continuation and bifurcation analysis.
Brought to you by:
fschild,
hdankowicz
Hello,
I'm trying to calculate frequency response plots of dynamical system (in my understanding continuation of periodic orbits). My first try was more or less successful using the COLL toolbox. Now, I'm wondering if the PO toolbox is the better choice. While studying the documentation the question came up if it's possible to use the excitation frequence instead of the excitation period as continuation parameter and release the same time 'po.period'.
Dear Harry,
Thank you for your help.
The first question is answered by setting PTMX. For the second question, I just rewrote the function coco_add_func.
Best Regards,
Bo
Last edit: Bo 2024-05-31
Hi Harry,
I was using the
coco_plot_bd
feature for plotting amplitude over excitation frequency in the past and now I'm wondering if the same is possible for the phase response? I've found no fast way using a column in the bd array.Best, Jonathan
Hello Jonathan,
There are two ways to have user-defined data appear in the
bd
array: either by appending such data using a slot function that responds to thebddat
signal or by adding continuation parameters. For example, thepo
toolbox defines several slot functions for thebddat
signal that add the Floquet multipliers and norms of the solution to thebd
array. The functionpo_add_bddat
(as explained in the GettingStartedWithCOCO tutorial) can be used to create such a slot function. The functionpo_add_func
can be used to add continuation parameters.So, if you want to include excitation phase (however this is defined) in the
bd
array, just use either of these functionalities. If the phase is a problem parameter that you plan to allow to vary, you can just usepo_add_func
to associate it with a continuation parameter.I hope that helps.
/Harry
Hi Harry,
thank you. My next question is regarding the
tbp
vector. I recognized that the values are not equally distributed (which is in terms of efficency I guess). Is it somehow possible to get a equally distributed time vector?Best, Jonathan
Hi Jonathan,
The
tbp
array contains the time stamps for the basepoint mesh. Assuming that you use adaptation (i.e., withNAdapt
greater than 0), this is not uniformly distributed, as the algorithms redistribute the mesh to capture areas of greater variability in the solution.To obtain a uniformly distributed time array, use interpolation. I recommend interpolation using the continuous piecewise-smooth polynomial approximant that COCO assumes when discretizing the trajectory segment. Such interpolation is illustrated in the function
slope.m
in the GettingStartedWithCOCO tutorial. To apply such interpolation after the fact, you need information about the mesh that is stored with the solution data.Having said that, I don't recommend equidistributing the mesh points. Plotting with a nonuniformly distributed mesh works just fine. Similarly, if you need to compute an integral. In general, contrary to a uniformly distributed mesh, the
tbp
mesh includes boundaries between mesh intervals,I hope that helps.
Harry
Ok nice, I figured out how to solve that problem. Thanks a lot!
Last edit: Jonathan Ehrmann 2024-08-21