Menu

#51 Frequency Response Plots using COLL/PO toolbox

---
closed
None
2024-09-03
2023-10-27
No

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'.

Discussion

<< < 1 2 (Page 2 of 2)
  • Bo

    Bo - 2024-05-31

    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
  • Jonathan Ehrmann

    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

     
    • Harry Dankowicz

      Harry Dankowicz - 2024-08-06

      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 the bddat signal or by adding continuation parameters. For example, the po toolbox defines several slot functions for the bddat signal that add the Floquet multipliers and norms of the solution to the bd array. The function po_add_bddat (as explained in the GettingStartedWithCOCO tutorial) can be used to create such a slot function. The function po_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 use po_add_func to associate it with a continuation parameter.

      I hope that helps.

      /Harry

       
  • Jonathan Ehrmann

    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

     
    • Harry Dankowicz

      Harry Dankowicz - 2024-08-20

      Hi Jonathan,

      The tbp array contains the time stamps for the basepoint mesh. Assuming that you use adaptation (i.e., with NAdapt 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

       
  • Jonathan Ehrmann

    Ok nice, I figured out how to solve that problem. Thanks a lot!

     

    Last edit: Jonathan Ehrmann 2024-08-21
  • Harry Dankowicz

    Harry Dankowicz - 2024-09-03
    • status: open --> closed
     
<< < 1 2 (Page 2 of 2)

Log in to post a comment.