[go: up one dir, main page]

Menu

#59 Harmonic oscillator with piecewise excitation force

---
open
nobody
None
2024-04-23
2024-04-17
No

Hi,

my current problem consists of a harmonic oscillator with two excitation terms. The first is a harmonic forcing. The second is an external force that depends on the oscillators deflection and has two segments which are chosen by the deflection of the oscillator.

I found the piecewise example in the PO tutorial but I'm wondering if I can just implement the external force using an if condition in the function definition.

Best, Jonathan

Discussion

  • Harry Dankowicz

    Harry Dankowicz - 2024-04-17

    Hi Jonathan,

    The hspo constructors were designed to handle problems with piecewise-defined vector fields, so that discontinuities would not affect the accuracy of the results.

    There are two issues here: the lack of smoothness (or even continuity) of the vector field and the lack of smoothness of the solution. The former means that your problem Jacobian will change discontinuously as mesh points move across the discontinuity. It is still possible (perhaps even likely, but surely problem-dependent) that the iterations will converge. But to what? After all, the discretization assumes a continuous, piecewise-smooth solution along each trajectory segment. You may need many more discretization points near the discontinuity to capture the sudden transition at least approximately.

    All of this is to say that I don't know how much of an effect it will have in practice, but my general recommendation is to segment your trajectory. There is definitely a long history of investigators either segmenting the problem or replacing the non-smooth vector field with one that is "regularized." Either way, give it a try with conditionals and see what happens.

    Best,

    Harry

     
  • Harry Dankowicz

    Harry Dankowicz - 2024-04-17

    Oh, and since the hspo constructors assume an autonomous vector field, you can either replace your harmonic forcing with a scaled version of one of the components of the Hopf normal form dynamics or introduce a phase variable that gets reset at a phase reset event (like in the impact demo.

     
  • Jonathan Ehrmann

    Thank you, Harry! I think I get the concept of the impact demo. But the part with the phase reset event is not clear to me. I understand it like
    if omega * t = pi
    then the reset map changes it to omega * t = 2 * pi

    But I still search for the reason for that.

     
  • Harry Dankowicz

    Harry Dankowicz - 2024-04-18

    Hi Jonathan.

    The phase reset event triggers when x(3)-pi=0 and at that point resets x(3) to x(3)-2*pi, in other words so that while the phase is pi at the terminal point of the incoming segment, it is -pi at the initial point of the outgoing segment.

    Similarly, the impact event triggers when x(1)-p(5)=0 and at that point resets x(2) to -p(6)*x(2), in other words so that while the displacement is p(5) at the terminal point of the incoming segment, the outgoing velocity is -p(6)*x(2). Here, p(6) is the coefficient of restitution.

    I hope that helps.

    Harry

     

    Last edit: Harry Dankowicz 2024-04-18
  • Jonathan Ehrmann

    Ok, now I understand the code, thank you. But regarding the meaning of this: Why should there be a phase jump from pi to -pi? Is it because of the change of direction of the system? Because if yes, I think I don't need that event function in my system.

     
  • Harry Dankowicz

    Harry Dankowicz - 2024-04-19

    Hi Jonathan,

    The phase lives on S^1, but since Matlab works in R^1, I map S^1 onto [-pi,pi] and identify the end points. The jump from pi to -pi just brings the phase back to the beginning of the interval. There is no relationship to directions. The phase always increases at a constant rate.

    I hope that helps.

    Harry

     
  • Jonathan Ehrmann

    Ok, thanks a lot!

     

Log in to post a comment.