1. A method for execution by a processor, the method comprising: retrieving from the memory a continuous time model (CTM) defining a continuous-time electrical or mechanical system; determining a sampling time and CTM state-space matrices [A, B, C, D] for the CTM defined for a dynamical system ordinary differential equation mathematical formulation; determining an order of approximation [i,j,k] parameters of the coefficients of an Obreshkov integration formula, to be used in determining a discrete time model (DTM) [A dm , B dm , C dm , D dm ] to provide an approximation of accuracy and to meet A- or L-stability requirements defined for the dynamical system; and discretizing the CTM into the DTM using the selected order of approximation [i,j,k], and the CTM state-space matrices [A, B, C, D] and sampling time (T) by calculating Obreshkov-coefficient and matrices [A dm , B dm , C dm , D dm ] using Obreshkov-based polynomial matrices; and storing the DTM representing the continuous-time electrical or mechanical system to the memory; wherein subscript d in the state-space matrix refers to a matrix for the DTM and m subscript refers to the parameter k of the order of the discretization such that 0<=m<=k and the DTM is a fixed point or a floating point representation.