General Question PMI, RD, and Torque.

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
I'm not sure if this is a silly question or if I should be posting this in the "Math & Physics" forum but I'm working on a stack optimization program/autopilot and I need some help.

Basically I want to be able to set a desired angular acceleration. To do this I need to be able calculate how much torque in newton-meters is required to achieve the desired acceleration.

I know that in an idealized situation, Acceleration = Torque / Inertia (mass)

What I am unclear on is how the values returned by "GetRotDrag()" and "GetPMI()" factor into the above.

Once I know how much torque is required, gimbaling the engines or firing the RCS to achieve the desired torque is pretty straight forward.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,635
Reaction score
2,352
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
PMI = principal moments of inertia = moments of inertia divided by mass.

The moments of inertia are what you call inertia.

RotDrag is aerodynamic drag, that applies to rotating bodies.

You can also calculate a very close approximation of the ideal engine deflection by a PI or PID controller.
 

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
PMI = principal moments of inertia = moments of inertia divided by mass.

The moments of inertia are what you call inertia.

RotDrag is aerodynamic drag, that applies to rotating bodies.

You can also calculate a very close approximation of the ideal engine deflection by a PI or PID controller.

So to make sure I follow correctly...

As far as orbiter is concerned, in the absence of an atmosphere, acceleration around the X axis is X axis torque (in newton meters) / GetPMI ().x ?

You can also calculate a very close approximation of the ideal engine deflection by a PI or PID controller.

That's part of what I'm trying to get to
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,635
Reaction score
2,352
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
As far as orbiter is concerned, in the absence of an atmosphere, acceleration around the X axis is X axis torque (in newton meters) / GetPMI ().x ?

No, it is:

Torque = Diag(PMI) * Mass * Acceleration

(F = m * a)

Diag(PMI) creates a matrix with the elements of the PMI vector being on the diagonal.
 

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
No, it is:

Torque = Diag(PMI) * Mass * Acceleration

(F = m * a)

Diag(PMI) creates a matrix with the elements of the PMI vector being on the diagonal.

Where does the matrix come into this? I thought we were discussing floats rather than vectors?

basically i want a function where f(x) = angular acceleration around a given axis, and x = torque in newton meters. What do I do?
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,290
Reaction score
3,258
Points
203
Location
Toulouse
You can also calculate a very close approximation of the ideal engine deflection by a PI or PID controller.

Hehe I asked the question a couple of time and you gave me that answer a couple of times, but my mind seems very resilient to the concept of PI / PID controller, I understand it is something like cruise control in a car, but still have no idea of the maths/logics/physics behind it :)
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,635
Reaction score
2,352
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Where does the matrix come into this? I thought we were discussing floats rather than vectors?

basically i want a function where f(x) = angular acceleration around a given axis, and x = torque in newton meters. What do I do?

Do you only have one single rotation axis? Then you have a one element matrix = float and one element vectors = float.

So:

Torque = PMI * mass * acceleration

And thus:

acceleration = Torque/(PMI*mass)
 

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
Do you only have one single rotation axis?

No but I'm only worrying about one at a time. For instance allowing the roll stability program to operate independently of a pitch and yaw autopilot.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,635
Reaction score
2,352
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Hehe I asked the question a couple of time and you gave me that answer a couple of times, but my mind seems very resilient to the concept of PI / PID controller, I understand it is something like cruise control in a car, but still have no idea of the maths/logics/physics behind it :)

Well, it is actually rather simple in the beginning and gets a bit more complex later.

P = proportional
I = integrative
D = differential

proportional means you have function:

Steering = constant * error

Integrative means you have a function:

Steering = constant * integral(error)

Differential:

Steering = constant * rate-of-change(error)

PI would be the sum of P and I:

Steering = constant1 * error + constant2 * integral(error).

etc.

error is the difference between target value and current value, eg, target velocity vector vs current velocity vector.

The important thing to know is the behavior of each P, I or D when you have a changed error. But that is something I explain later or let you research it.
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,290
Reaction score
3,258
Points
203
Location
Toulouse
The relationship between angular velocity, angular acceleration, PMI and torque is given by Euler's equations of rigid body rotation. These are the angular equivalent of F=ma.

HE has spoken !! :hail: :hail: :hail: I'm going to recitate this 100 times each morning. :hail: :hail: :hail:
 
Top