Group Abstract Group Abstract

Message Boards Message Boards

RotorWith3DEffects modeling problems inconsistent with Mathematica

Posted 4 years ago

This is a question directly related to several other previous questions of mine, however most directly related to Torn Equations

Besides that question, I have also (through Mathematica) modeled, simulated and controlled a flywheel inverted pendulum (youtube link)

This works well, and I have a good mathematical understanding of the model equations, which is why it, and the other previous testbench (as seen in my Torn equations question) are my direct comparisons to models I've made SystemModeler.

When improving my models using RotorWith3DEffects I realized that this particular class isn't quite used as exactly as the other Rotor and also isn't quite connected the same in order to achieve the 1DOF inertia on a 3D body. When reading the documentation there is a single line

Gyroscopic torques appear, if the vector of the carrier body's angular velocity is not parallel to the vector of the rotor's axis.

Which for my English is a bit cryptic, but fine. When looking at suggested other examples, such as GyroscopicEffects

gryo

It shows that the class is connected via the Housing connector. So I do this as well in my models, which produce great results that match the real model and the Mathematica version.

My issue now comes that when trying to improve my BLDC motor model, which is a maxon EC45 Flat, an "aussen roller" Or namely a motor with rotating housing, clearly also has a rotating inertia that I want to include to complete my model.

motor

Because I want to use this in a library/package later for reuse, I want to the motor model to be complete, and not simply add it's inertia to an outside class.

The problem here arises, when I want to connect the motor model shaft of the inner RotorWith3DEffects to an 'shaft' or outer RotorWith3DEffects the gyroscopic effects disappear.

But this is fine, clearly I have a misunderstanding. So I tried to experiment with 5 different modeling/connection techniques to figure out how to connect this model correctly.

Unfortunately, I now have 5 different results, none of which are similar, and only one that sort of resembles the model from Mathematica, except it appears to have energy being constantly added to the system, instead of it dissipating.

The Mathematica ODEs are :

Where $\alpha(t)$ is the pendulum angle, and $\phi(t)$ is the motor angle. with various inertias, friction and masses.

$$\left\{g \sin (\alpha (t)) (k \text{mw}+l \text{mb})+\text{jw} \phi ''(t)+\Theta \alpha ''(t)=-\text{rb} \alpha '(t)-\mu \tanh \left(\frac{\alpha '(t)}{\iota }\right),\text{jw} \left(\alpha ''(t)+\phi ''(t)\right)=\tau u(t)-\text{rw} \phi '(t)\right\}$$

When given a simple constant input of 0.6 at $u(t)$ from hanging position of initial angle $\alpha(0) = 0$ the Motor spins up, causes swinging and short lived constant offset before the system falls back to angle zero as seen here:

rotor

Also plot

When using the actual physical model, this also happens, pretty much exactly the same, as such I am confident this is modeled fairly well.

As mentioned unfortunately, when doing this same within my 5 different experiments, I don't get any of the same results but instead either no displacement whatsoever, a constant non-dissipating oscillation or a constant angle accumulation that eventually breaks the simulation, as seen here:

models models more plots

TLDR: I want to be able to use RotorWith3DEffects like Rotor to get gyroscopic effects with my internal motor model, and be able to use the rotors shafts as connection points, rather the housing, however it seems this isn't possible in the way I expect it, and when comparing different connect methods, against Mathematica, I get wildly different results, and I don't know which one is correct, and baring all of them are wrong, then I'm completely stuck.

How do I use this class correctly, the description and one single example within the documentation don't specify this enough for me, and the many test results don't match up with my real world model or Mathematicas.

I have included the Mathematica files and System modeler file within this post for your own testing, done in System modeler 12.3. Thanks for the help.

POSTED BY: Mor Bo
4 Replies
Posted 4 years ago

Thank you Neil For the help and all the explanations. I now have working models with the correct torque exchanges. Greatly appreciate it.

POSTED BY: Mor Bo
POSTED BY: Neil Singer
Posted 4 years ago

Hello Neil,

Thank you for the explanation and the quick help. I have since improved the motor model to use a PI current controller and a signal voltage... current control

I assume this is what you had meant. Thanks for pointing it out.

I'm still however having a hard time understanding your example model...as far as I can tell, the only reason there is any swinging at all, is because your emf is connected to the axisflange of the Revolute joint, if I remove that connection it fails to swing.

As far as I understand your description, the torque exchange comes from just that RotorWith3DEffects housing connection and the rest is additive, and exchanged into the body through that...Why do you have it also being passed into the Revolute that connects the motor directly to the world joint and not the fixedtranslation where the flywheel and motor are actually mounted? I'm not sure if you saw the prototype youtube video I made, with my actual working prototype, but the way you have it connected, I don't really understand.

It seems the additive effect also isn't correctly accounted for as you mentioned...only by changing the motor inertia J to something else beyond the initial value has an affect on the deflection, when changing your FanBladeInertia to 1 billion for example, nothing happens. changes

I surely must be daft, or seriously missing something. I don't see anything in the documentation for the emf that the housing needs to be connected to anything (though it certainly does make sense physically), nor do I understand why torque isn't being transferred to the Revolute joint, except only when rotation comes from the housing connection, unless it's through the emf.

I have added a suite of tests again for you to see my changes to your example that will hopefully clarify my issues.

On top of that, I have added a fully working simulation of the flywheel pendulum I did some time ago, with the original working simulation, as I had originally mentioned at the beginning of the question before I began attempting to do things better/have these problems, and a modified version, following your design method, which unfortunately produces incorrect results.

This is seen in the plot fairly well, the top being the new form, and the bottom being my original. enter image description here

I greatly appreciate your help looking at all this and putting up with my lack of understanding ;)

Best Regards.

POSTED BY: Mor Bo

Mor,

Your problem is that you want to model reaction torque from your motor but your motor creates no reaction torque. Another problem with your motor is that you give current commands to a current source so the resistance and inductance is ignored. A correct motor model would have a voltage input to the resistance and inductance which creates a current. You then control the current with your controller.

It makes no sense to use two rotors with 3D effects. If you want/need to add inertia to the 3D rotor, you must use a regular inertia -- it will add to the 3D rotor inertia and transmit its forces through the 3D rotor support.

The attached model works (I did not fix your current source on the electrical side). I used a the 3D rotor to get the gyroscopic affects. The 3D inertia should be that of the rotor of the outrunner motor (the outside part). I connected the torque reaction force back to the joint on which the motor is mounted. I gave the motor some mass because I do not believe that the 3D rotor has mass properties -- only gyroscopic torques (but you should verify this). If you attach the motor to another structure, the inertia of what is attached should be a regular inertia (as shown).

I hope this helps,

Regards,

Neil

enter image description here

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