Download
    Documentation
Macromodelling → MM2SPICE

MATRIX MARKET TO SPICE DESCRIPTION (MM2SPICE) PROGRAM DESCRIPTION

The program has been developed that forms an equivalent circuit description taking into account full-sized matrices obtained by mor4ansys. This program implements the formulae for calculating components values of the equivalent RLC electrical circuit that could be reduced by the proper program for RLC circuit reduction and then could be simulated by NetALLTED while results of this simulation can be compared to results gotten by ANSYS. The formulae for circuit components calculating are as follows:

Here N is a number of equations, and M, E, K are the matrices of mass, damping and stiffness gotten by mor4ansys. In certain cases, some of these matrices can be absent, so it means that there are no respective elements in the circuit. If there is no mass matrix M, mor4ansys changes slightly indications stiffness matrix is indicated as A where A = -K. Then

It should be noted that the matrices obtained are symmetrical however there are only matrices lower triangles in the respective files. It's clear that to define elements connected between nodes i and j it's enough to get values located at the intersection of i-th row and j-th column of the proper matrix while the same value at the intersection of j-th row and i-th column is not needed, but to define elements connected between nodes i and 0 it's needed to sum all the elements of the respective row of the matrix. In practice, taking into account the symmetry of the matrices, it's needed to sum all the present in file elements belonging to i-th row and i-th column of the matrix in order to define elements connected between nodes i and 0. The program acts fast enough even for big sizes of files since all the calculations needed are executed for a single pass of a file with the respective matrix. An algorithm for calculating circuit elements values is based on the fact that the matrix element value read from the file takes part in forming proper values of circuit elements connected between nodes i and j, i and 0, j and 0 (if this is a non-diagonal matrix element), or i and 0 (if this is a diagonal element), by the above mentioned formulae. So, the totals are accumulated on the program execution at the allocated dynamic memory array to define elements connected between the respective nodes and the ground, while the elements connected between circuit nodes are calculated directly and printed into a file right away. Elements connected between a node and the ground are printed out at the end of a circuit description. If the obtained for a given node total is equal to zero, it means that there is no circuit element between this node and the ground. The names of files with the source matrices and for circuit description being formed can be provided as parameters on the program run, otherwise the default file names are using.