# Mathematically modelling a mechanical system

1. Dec 18, 2013

### y33t

Hi all,

Consider a simple gear system. I want to learn to model this system and write equation for it that any information/state regarding system can be extracted from.

thanks

2. Dec 18, 2013

### Staff: Mentor

Last edited: Dec 18, 2013
3. Dec 18, 2013

### y33t

I want mathematical modeling not visual. That indicates gear positions, speeds, radius and every other possible variable.

4. Dec 18, 2013

### Simon Bridge

Good luck.
What have you considered so far?

To model absolutely any system you want would be quite a tall order.

Last edited: Dec 18, 2013
5. Dec 18, 2013

### Kozy

Can you do what you want in Excel? Simple and easy to learn basic modelling techniques.

6. Dec 18, 2013

### Simon Bridge

From the description - to extract any information content of any kind - I doubt it.
Though one could, in principle, make a spreadsheet that complicated.

7. Dec 18, 2013

### Staff: Mentor

I would start by defining a Gear class in some OO language which is created with # of teeth in the gear where you could increment a gear by one gear tooth and be able to connect other gears to it via PropertyEvents to it so that when it turns it one tooth it can notify connected gears so they can increment by one tooth and propagate the chain through all connected gears.

Code (Text):

Gear a = new Gear(5);  // has 5 teeth
Gear b = new Gear(10);

b.connectedTo(a);

while(1) {
a.increment();     // a is the first gear in the chain so we drive the chain from it by incrementing by one tooth

print a.currentPos(), b.currentPos();
}
...

The implementation is left to the OP.

Also you'll have to consider the different way gears are connected like tooth to tooth or with a big gear/little gear spindle.

8. Dec 19, 2013

### y33t

I considered trying to write lagrangian of it but no luck.

Programming is easy no problem,i want to write equations to describe the system(continious not discrete).

9. Dec 19, 2013

### Staff: Mentor

So what is your goal? to understand the force needed to drive the system of gears? or the torque output?

10. Dec 19, 2013

### y33t

Goal is to determine information such as gear positions,torque and rpm.

11. Dec 19, 2013

### Staff: Mentor

Okay, if you're not going to simulate it via computer then my help will be limited here.

I think you will have to custom derive the equations based on your design and knowledge of the masses, number of teeth... for each gear. You will have to step through the gear train to understand the relationships of how one gear turns another.

You have a few cases to consider in your model:
- the common case of one gear turning another
- the case of one gear stacked onto another
- the case of specialty gearing using chains or slipping gears...

You might be able to model this via a spread sheet using gear angles and gear circumferences ir as one gear moves one tooth it moves a certain angular distance which translates to a distance on the circumference of the gear which means the next gear moves by the same circumference distance and translated back to an equivalent angular distance. (kind of muddled sorry)

12. Dec 19, 2013

### SCP

I think you're looking for a state-space model:

x_dot = Ax + Bu
y = Cx + Du

where x is the vector of the system state, u is the vector of inputs, y is the vector of outputs and A, B, C, and D are matrices of system parameters. Have a look here: http://en.wikipedia.org/wiki/State_space_representation. You can also look for a book on system modelling / system dynamics or control systems.

There are other ways to model your system(s). A system of ODE's comes to mind, or transfer function(s). These are just variations on the theme, where the state-space model is a system of ODE's reduced to first order, and the transfer function(s) is a system of ODE's after a Laplace transform.

However, if you're looking to be able to pull any output from your model, the state-space model seems to be most appropriate. The output equation can be set up to provide whatever outputs you want.

13. Dec 24, 2013

### dawin

What do you have so far?

That information can be defined pretty easily for a simple system. After that it's a matter of scaling it up.

What equations are you using for each? You can find them in any basic mechanical design book (e.g. Shigley's).

Personally, because it would be easier for me, I'd model it simply in Excel, and extend with VBA if needed. Any more than that and I'd probably hop to Matlab or NumPy.

14. Jan 5, 2014

### y33t

Thanks for all suggestions and sorry for late reply. State model will require very high amounts of sampling points to reach a certain precision but it seems that it's the only way of doing actual calculation. Rather then defining/generating each point I want the output derived from a time dependent mathematical description with fixed intervals. Still looking into this.

15. Jan 5, 2014

### dawin

I don't understand what you mean by needing sampling points, etc. to achieve an accurate description of this system. Could you explain more clearly?

My understanding is that you have some arbitrary gear system that you'd like to mathematically model so that at any point in time, call it $t$, you could define what the position of some gear, $X$, it's present rpm, and the torque it's producing.

This shouldn't be too complex, in theory. How deep into this are you trying to go (i.e., power at shaft vs power at wheels vs. power at...?)? Is this not what you wanted?