help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with "NA"


From: Stephen Montgomery-Smith
Subject: Re: Problem with "NA"
Date: Tue, 19 Feb 2013 21:56:03 -0600
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

On 02/19/2013 05:00 PM, Terry Duell wrote:
> Hello Juan,
> 
> On Tue, 19 Feb 2013 18:25:47 +1100, Juan Pablo Carbajal
> <address@hidden> wrote:
> 
>> On Tue, Feb 19, 2013 at 7:05 AM, Terry Duell <address@hidden> wrote:
>>> Hello All,
>>> I am solving a number of simultaneous DEs.
>>> If I run the solution for a time t1 (say) I get quite respectable
>>> results
>>> for all my derivatives up to a time that is a bit short of t1. The
>>> results
>>> for the rest of the time are "NA". Thus far I can't see why this is
>>> happening.
>>> What sort of circumstances usually cause NAs ?
>>>
>>> Cheers,
>>> -- 
>>> Regards,
>>> Terry Duell
>>> _______________________________________________
>>> Help-octave mailing list
>>> address@hidden
>>> https://mailman.cae.wisc.edu/listinfo/help-octave
>>
>> NA is for missing data
>> http://www.gnu.org/software/octave/doc/interpreter/Missing-Data.html
>> bad oprations like division by zero and such should produce NaN.
> 
> 
> OK, that's interesting. I'm not getting any division by zero warnings.
> 
>> Could you give us more details about your particular setup? What
>> solver are you using?
> 
> It is a 7 DOF system, and I'm using a bespoke RK solver with fixed time
> steps.
> 
>> Are you solving a nonlinear equation?
> 
> I'm not sure of the strict definition of non linear in this context.
> The system is I'm investigating is a 2 axle vehicle with a single axle
> trailer attached by a hinge joint.
> All three axles have variable rate tyre springs, and variable rate
> suspension springs and dampers.
> 
>> Does the solution exist for your initial conditions and your time window?
> 
> I think so, or I think it should. The simulation looks at the system
> response while being excited by a road surface with constant statistics,
> hence if the system is numerically stable, it should produce pretty much
> the same response for a long time period as it does for a short one.
> If I run the system as a solo vehicle (ie no trailer) it behaves as
> expected and produces results comparable with those from other
> simulations. If I run the vehicle combination, all the results I have
> looked at thus far look good with no signs of any numerical instability,
> right up to a short time prior to the end of the simulation period.
> Thereafter the results are all NA.
> 
> If division by zero is the most likely cause, are there situations where
> division by zero warnings can be missed or hidden? To put it another
> way, is there a way of ensuring division by zero warnings are captured
> and reported?
> 
> Cheers,

I think that a much more likely source of creating NA is in evaluating
the right hand side function.  That is, you are solving:

dx/dt = f(t,x)

I am guessing that f(t,x) is something rather horrible.

Look for things like taking square roots of negative numbers when you
compute f(t,x).  Or maybe you diagonalize a matrix, and it has repeated
eigenvalues, and you use the eigenvectors (which will be non-unique or
non-spanning).  Or some other operation of that type.

I also find it useful to think about the situation physically.  For
example, if the trailer is directly behind the vehicle rather than at an
angle, maybe some force is trying to pull them apart, and since there is
no angle you are essentially trying to break the hinge.  Or maybe the
wheels on the axle are locked to each other, and at least one of the
wheels has to skid.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]