[go: up one dir, main page]

Menu

#49 Hopf bifurcation continuation with 1 parameter only

---
closed
nobody
None
2023-11-09
2023-10-05
Marc
No

Hello, I am new to coco and trying some examples, such as the file coco/tutorials/Getting Started/examples/Bifurcations of equilibria/demos.m, §3.4 (Continuing Hopf bifurcations).

I have adapted the brus.m function so it takes only a parameter B, and A remains at a constant value (see attached file). When executing a continuation from the Hopf bifurcation point, with now only the parameter B, I get following error message:

Error using coco_close_efunc
coco_close_efunc: cannot close equations, too few parameters activated?
number of parameters to activate   : 2
number of inactive parameters given: 1

It is as if coco thinks that there are 2 parameters instead of 1. Where did I go wrong and why? Thank you!

4 Attachments

Discussion

  • Harry Dankowicz

    Harry Dankowicz - 2023-10-06

    Dear Marc,

    Thank you for your query. I'm happy to hear that you are giving COCO a try. Learning by modifying demo code is a great way to explore a package like COCO.

    The short answer to your question (but see below) is as follows:
    In the demo, I first detect a Hopf bifurcation under variations in one parameter ('B') and then continue along a curve of such bifurcations under simultaneous variations in two parameters ('A' and 'B'). If you don't allow 'A' to also vary, then you will at best detect a single Hopf bifurcation but cannot continue along a curve of such bifurcations (since this requires something to be true not just at one point but along a whole curve). You must be able to vary two parameters to continue a typical Hopf bifurcation curve.

    The long and more COCO-specific answer is as follows:
    COCO's error message tells you that the number of equations (say M), the number of unknowns (say N), and the requested manifold dimension (say D) are incompatible. Specifically, N-M should equal D.

    For a regular equilibrium continuation problem using the 'ep' toolbox (as in the demo),
    * the number of equations equals the dimension of the vector field (say n) plus the number of continuation parameters;
    * the number of continuation variables equals the dimension of the state space (again n) plus the number of problem parameters (say q);
    * the continuation parameters correspond in name and number to the problem parameters (again q);
    * the number of unknowns equals the number of continuation variables (n+q) plus the number of active continuation parameters (say r which is less than or equal to q).
    It follows that M=n+q, N=n+q+r, and N-M=r. So, if D=1 (i.e., you are trying to continue along a curve), then the number of active continuation parameters must equal 1. When you include ’B’ in the call to coco in the first part of the demo, you are making that continuation parameter active, i.e., free to vary.

    For a Hopf bifurcation continuation problem using the 'ep' toolbox (as in the demo),
    * the number of equations equals two more than four times the dimension of the vector field (i.e., 4n+2) plus the number of continuation parameters;
    * the number of continuation variables equals four times the dimension of the state space (i.e.,
    4n) plus one more than the number of problem parameters (i.e., q+1);
    * the continuation parameters correspond in name and number to the problem parameters (again q);
    * the number of unknowns equals the number of continuation variables (4n+q+1) plus the number of active continuation parameters (say r).
    It follows that
    M=4n+2+q, N=4n+q+1+r, and N-M=r-1. So, if D=1 (i.e., you are trying to continue along a curve), then the number of active continuation parameters must equal 2. That’s why both ’A’ and ’B’ must be active*.

    The error message says that r is 1, but needs to be 2.

    You can read more about this in the Toolbox Reference section of the EP-Tutorial.pdf in the help folder.

    I hope that helps.

    Harry

     
  • Marc

    Marc - 2023-11-07

    Thank you!

     
  • Harry Dankowicz

    Harry Dankowicz - 2023-11-09
    • status: open --> closed
     

Log in to post a comment.