>> I understand what you're taking is the step of the differential net
>> (not sure I am giving correct translation of the term, that's a method
>> of approximation of continuous process with discrete one) and not
>> periodicity of updates.
> Umm... possibly, but I'm not sure I understand what you're saying here.
> :-)
>> If you're capable of resolving your model
>> analytically, you won't have inaccuracies at all (except caused
>> by floating point calculations).
> True, but I can't think of any part of the equations of motion of a
> rigid body that could be solved analytically under randomly varying
> forces, so numerical integration would seem to be necessary.
>> Stability is only applicable to approximate methods and has
>> nothing to do with the frequence of updates.
> All the numerical integration methods I know of (euler, midstep,
> 4th-order runge-kutta, etc.) depend on a sufficiently small timestep
> for stability. If I have a tire in my simulation that has a vertical
> stiffness of 500,000 N/m, it'll very easily start to oscillate and
> eventually fly all the way to Jupiter and back, if the timestep doesn't
> stay sufficiently small, so stability definitely has everything to do
> with how often I update the physics! Or maybe I'm misunderstanding what
> you're saying.
>> What you are more interested in is convergence and precision.
>> The faster your approximate methods converge, faster you will get your
>> update made.
> Are you saying there's some sort of iterative way to integrate the
> equations of motion? Does that have something to do with implicit
> integration? That's something I'll have to look into, I guess.
>> I start to believe that you actually trying to use approximation
>> method based on discretisation(spelling?) of time and synchronize the
>> step of the net with the other components of the program.
> Could be, but I'm still not sure I understand what you mean by the
> "net" in this context. :-)
>> Let's say we're considering only one car driven by human. To display
>> current state to the driver you need to update physics first to
>> learn this state. Drawing will take some time and as long as you
>> can calculate next car state from the previous one you don't need to
>> know intermediate states.
> The problem is, how do I calculate the next car state from the previous
> one without those intermediate states, without inducing instability?
> Right now I calculate the physics at a fixed 500 Hz - if there really
> is some way to calculate the physics at rates as low as 30 Hz so that
> it remains stable, I definitely want to learn it! :-)
>> One reason why you may need another thread is to collect driver input
>> while you're updating physics and drawing screen. I am not sure
>> how noticable is it, but if for example, driver presses throttle
>> smoothly or abruptly, it should be taken into account by your
>> simulation, which may not happen if you're reading controllers only
>> once per update.
> Hmm. I guess that could be an issue.
> Petri Blomqvist
the [x0;x1]x[t0;t1]. For example, by equation G(F(X,t),X,t) = 0 where G is
too complex to find F explicitly. X does not have to be a scalar, but for
simplicity let's assume it is.
In this case one of the main numeric methods
is to define a "net" (sorry, english is not my first language, I don't
know the right term) as a set of "nodes" (x(i),t(j)) where i=0,N, j=0,M
Usually x(0)=x0, x(N)=x1, t(0)=t0, t(M)=t1.
x(i+1)-x(i) and t(j+1)-t(j) do not have to be a constant, but if they're
the next has fixed step.
There're many numeric methods that allow to calculate F(i,j) which
approximate F(X(i),t(j)) from the original equation.
Steps (of the "net") in this case
do not affect stability, by they're just points where you want to find
the value of F. The more iterations you do the better is approximation
(however this is not related to the timestep).
Instability may arise is your function is defined as something like
G(F(X,t),F(Y,t-dt))=0. Then if you calculated F(Y,t-dt) approximately
your error may grow. You could avoid it by saving all input and
recalculating from the starting point instead of previous state,
however implementation of that would face problems of memory requirement
to store input as well as performance issues.
AFAIK there're some methods to deal with this case. I don't know this
area well, but idea is that they use past states, but not the very
beginning. Each of the past states participate with a weight selected
some complex criteria that will ensure convergence. This way you
have more calculations to do to get every next step, however this
amount is fixed and is not growing, instead you can afford bigger
error in your approximation because it doesn't accumulate thus saving
some time.
With your original idea, you will still get error accumulation, no
matter how small is your step and you still need some kind of feedback
to prevent simulation from breaking down.
As I understant you're looking at this simulation from the point of
view of physics, mechanics and math analysis, but you need more to
make it work well. I am sorry I can not point to any particular place to
look for answers, but here're some directions. There's a part of
Applied Math that studies numerical solution for physics/mechanic
equations. There's another area of Applied Math that studies control
of the technical systems. At some point they overlap with each other,
and this one is a good area to look into. Now I am trying to guess
correct terms. They might be something like difference/differential
nets or grids or schemes, stability stuff have terms like feedback
and after-effect.
The problem is that those methods might be difficult to get into
unless you specialize in Math.
Concering rigid body simulation, I think I've heard about some
research done, so probably you can find ready to use methods.
Alex.