1. A computer-implemented method of linearizing a model of a system, said method comprising: obtaining the model of a system, the model including at least one differential-algebraic equation to represent the system, a mass matrix of the model being singular; obtaining at least one analytic Jacobian of at least a part of the model; linearizing, using a processor of a computer, the at least a part of the model using the at least one analytic Jacobian, a state-space representation of the linearized part of the model including one or more matrices; using the linearized part of the model to solve at least part of the singular part of the mass matrix; using the result of solving at least part of the singular part of the mass matrix to determine a new non-singular mass matrix, the one or more matrices of the state-space representation being obtained by solving the at least one differential-algebraic equation using the new non-singular mass matrix; and saving the model in the storage element.