S-parameters is defined to express circuits with incident wave

and reflect wave

instead of voltage (v) and current (i)
Considering a multi-port network, the calculation of S-parameters are classified as transverse coefficient (

) and reflection coefficient (

)
The calculation of the transverse coefficient is shown below:
* Transverse coefficient
Imaging when we performing the experiment to measure the S21 of a 2-port device (for example an attenuator.)
At first step, we get a signal generator (SG) which is constructed of a voltage source (V) with a output impedance of Zo. Then, connect the signal generator to a power meter with input impedance of Zo. Consequently, the power from the source (Pavs) can be measured.
Fig. 1 First step of measuring the transverse parameters (find Pavs).
The second step is to insert the DUT between the signal generator and power meter. The power meter can measure the output power with the insertion of DUT (Pout). Than the transverse coefficient can be calculated as Pout/Pavs.
Fig. 2 Second step of measuring the transverse parameters (find Pout).
These two steps are easily to be understand. But how to calculate?
Let us see Fig. 3. In Fig. 3, it is observed that the voltage at point A (V1) is equal to

since the output of SG is terminated to a perfect match load.
Similarly, the voltage at point B (V2) is equal to

Then the S21 can be calculated as V2/V1.
Fig. 3 The calculation of the transverse coefficient.
From the calculation steps, we can find that the calculation is similar to the measurement. It is notice that although S21 is calculated as voltage ratio. But S21 is not equal to the voltage gain since S21 is the voltage ratio between measuring Pout and Pavs.