-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialization of ModelicaTest.MultiBody.Joints.UniversalSpherical #2720
Comments
Please correct which angle is stable:
|
I've corrected the original comment to say that 90° is unstable. |
I'm not convinced that the problem was start-value of universal.phi_a, and think that it might be a modeling issue - in particular that the axis of the universal joint shouldn't be in the same direction as the following rod. Consider the silly change of setting world.n={-0.1,-1,-0.1}; after that change universal.phi_a will then flip half-way through the simulation. To me it more seems that universal.n_a should have been {0,0,1} instead of {1,0,0} (and then changing universal.phi_a back to zero), since the two universalSpherical have n1_a={0,0,1}. Shall I open another ticket for this? |
@HansOlsson I would agree, but I actually don't know the initial aim of the test model. Possible that |
That's a good analysis. If the model is intentionally setting strange axes, one might wonder if it really makes sense to have a regression test for it. This results in three alternatives to choose from:
I think it would make sense to open a new issue just for resolving which way to go here. |
I agree. |
Similarly to SphericalSpherical2 (see #2705 (comment)), the initial guess value shall be also set for |
For the reference system in
ModelicaTest.MultiBody.Joints.UniversalSpherical
, there is a problem with the initialization ofuniversal.phi_a
. In order for theuniversal
component to do the pendulum motion in the correct plane,universal.phi_a
must be 90°+-n*180°, but it is initialized to 0°.I don't know why, but with SystemModeler, I find that -90° is a stable solution, while 90° is unstable but still seems to give the correct reference behavior.
The initialization at 0° thus leads to an infinitely short transition to -90° as the pendulum arm leaves the horizontal position. In the current reference results, however, most of this transition happens before the second data point, at time 0.0004, but it takes about 0.0024 to reach a five digit approximation of π/2. In the meantime,
universal.w_a
has a large negative peak that it doesn't even make sense to have reference values for.The following alternatives could be possible solutions to this problem:
universal.w_a
from the comparison signals (universal.phi_a
is less problematic since it has more or less the correct value at each data point).universal.phi_a
to -90°.The text was updated successfully, but these errors were encountered: