Group Abstract Group Abstract

Message Boards Message Boards

3
|
12K Views
|
5 Replies
|
11 Total Likes
View groups...
Share
Share this post:

Torn Equations and solving Nonlinear problems within SystemModeler

Posted 4 years ago

I am working on a little project to help learn more of SystemModeler and modeling within that environment.

I have a working physical test bench of the system I choose to simulate, I would like to simulate and design and test different control schemes via SystemModeler, Mathematica and the Microcontroller Kit.

The system being a 3d inverted pendulum, like the Cubli.

When simulating the single degree of freedom, I have great stabilization.

single degree

This model is in-fact the second version of it I have designed, the first version using Bodyshapes classes while this newer version uses Rotorswith3Deffects

I have changed the model to use the rotors as the angle/control reactions in the first did not reflect reality with the physical test bench, while the newer version is almost nearly identical...but I digress.

When inverting this model to stand on its corner to be a 3DOF, 3D pendulum, I am now getting constant "torn" errors, which I can view with the Equation browser, however I can't begin to understand how this is helpful, or what I can do, beyond what it seems to be setting initial conditions to repair the problem...this however leads to an ever increasing cascade in more torn system errors. torn

My model isn't particularly large I think but I am using several custom subsystems and functions, I realize, but for an idea of what I have built, see the below images.

The working Single DOF system with control.

single

The Same system with 3 DOF activated, causing torn system.

3dof

I don't think this is a particularly interesting or difficult nonlinear system to Solve for SystemModeler...I feel this has something to do with the Rotorswith3dEffects but since this works in the 1DOF systems, I am somewhat at a loss.

How can I fix the torn system via the equation browser? Is this is the wrong direction to follow? Is there a better way or thing to look out for?

I have looked at the GyroscopicEffects example from recommendations from previous questions...which is how I managed to come up with the model I have (which again works great in the 1DOF simulation).

My physical test bench for reference:

enter image description here

POSTED BY: Mor Bo
5 Replies
POSTED BY: Sergio Vargas
Posted 4 years ago
POSTED BY: Mor Bo
Posted 4 years ago
POSTED BY: Mor Bo

One more thing: I see now that the problematic equation system is in the initialization problem, meaning that the observation above regarding integration of angular velocities doesn't really apply. Initialization can be tricky, but debugging is simplified by the fact that errors don't build up during numeric integration of differential equations; one just has to go through the equation systems one by one and make sure the equations being solved make sense.

POSTED BY: Henrik Tidefelt
POSTED BY: Henrik Tidefelt
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard