If your physical structure has two or more sources, but you have not defined any ports, all the lumped sources excite the structure simultaneously. However, when you assign N ports to the sources, then you have a multiport structure that is characterized by an NÃN scattering matrix, an NÃN impedance matrix, and an NÃN admittance matrix. To calculate these matrices, [[EM.Cube]] uses a binary excitation scheme in conjunction with the principle of linear superposition. In this binary scheme, the structure is analyzed N times. Each time one of the N port-assigned sources is excited, and all the other port-assigned sources are turned off. The N solution vectors that are generated through the N binary excitation analyses are finally superposed to produce the actual solution to the problem. However, in this process, [[EM.Cube]] also calculates all the port characteristics.
For example, [[EM.Tempo]] primarily computes the S-parameters. defined as follows:Â :<math> \mathbf{ [b] = [S][a] } </math> where the incident and reflected power waves a<sub>i</sub> and b<sub>i</sub> are related to the port voltage and current in the following manner: Â :<math> a_i = \frac{V_i + Z_i I_i}{2\sqrt{|Re(Z_i)|}} </math>Â Â For the computation of the S-parameters in [[EM.Tempo]], the source associated with each port is excited separately with all the other ports turned off. Due to the existence of internal source resistances, tuning the other sources off is indeed equivalent to terminating the other ports in their characteristics impedances (matched ports). When the jth port is excited, all the S<sub>ij</sub> parameters are calculated together based on the following definition:
:<math> S_{ij} = \sqrt{\frac{Re(Z_i)}{Re(Z_j)}} \cdot \frac{V_j - Z_j^*I_j}{V_i+Z_i I_i} </math>