Page 367 - Mechanical Engineers' Handbook (Volume 2)
P. 367

358   Mathematical Models of Dynamic Physical Systems

                          point in time. This results from two types of errors that are unavoidable in the numerical
                          solutions. Round-off errors occur because numbers stored in a digital computer have finite
                          word length (i.e., a finite number of bits per word) and therefore limited precision. Because
                          the results of calculations cannot be stored exactly, round-off error tends to increase with
                          the number of calculations performed. For a given total solution interval t   t   t , there-
                                                                                           K
                                                                                    0
                          fore, round-off error tends to increase (1) with increasing integration-rule order (since more
                          calculations must be performed at each time step) and (2) with decreasing step size  t (since
                          more time steps are required).
                             Truncation errors or numerical approximation errors occur because of the inherent
                          limitations in the numerical integration methods themselves. Such errors would arise even
                          if the digital computer had infinite precision. Local or per-step truncation error is defined
                          as
                                                      e(k)   x(k)   x(t )
                                                                    k
                          given that x(k   1)   x(t k 1 ) and that the calculation at the kth time step is infinitely precise.
                          For many integration methods, local truncation errors can be approximated at each step.
                          Global or total truncation error is defined as

                                                      e(K)   x(K)   x(t )
                                                                    K
                          given that x(0)   x(t ) and the calculations for all K time steps are infinitely precise. Global
                                          0
                          truncation error usually cannot be estimated, neither can efforts to reduce local truncation
                          errors be guaranteed to yield acceptable global errors. In general, however, truncation errors
                          can be decreased by using more sophisticated integration methods and by decreasing the
                          step size  t.
                          Time Constants and Time Steps
                          As a general rule, the step size  t for simulation must be less than the smallest local time
                          constant of the model simulated. This can be illustrated by considering the simple first-order
                          system
                                                         ˙ x(t)    x(t)
                          and the difference equation defining the corresponding Euler integration

                                                 x(k)   x(k   1)    t   x(k   1)
                          The continuous system is stable for     0, while the discrete approximation is stable for
                           1      t    1. If the original system is stable, therefore, the simulated response will be
                          stable for
                                                          t   2
                                                                1


                          where the equality defines the critical step size. For larger step sizes, the simulation will
                          exhibit numerical instability. In general, while higher order integration methods will provide
                          greater per-step accuracy, the critical step size itself will not be greatly reduced.
                             A major problem arises when the simulated model has one or more time constants
                           1/    that are small when compared to the total solution time interval t   t   t . Numerical
                                                                                 0
                                                                                       K
                             i
                          stability will then require very small  t, even though the transient response associated with
                          the higher frequency (larger   ) subsystems may contribute little to the particular solution.
                                                  i
   362   363   364   365   366   367   368   369   370   371   372