One has to ensure that no reflection exists on the line. In this way, we can understand that the ZL/port impedance equals the characteristic impedance of the line. For this make sure that the VSWR = 1.
So if I have a microstrip line printed on a substrate, II need to terminate one port with a load such as 50 ohm, then measure S11 at the required frequency. That value of return loss should be converted to input reflection coefficient. using the following equation:
|𝚪L| = 10^(S11/20) and substitute the magnitude of the reflection coefficient into Zo equation.
I'm simulating a simple microstrip design using CST. I've noticed that the microstrip impedance changes when changing the length which shouldn't happen as the impedance not depending on the length.
The calculations done using the equations are all approximate and not exact. Thus, the characteristic impedance will depend on length to a certain extent.
Just two days back I had communicated to my professor about this case where at low frequencies I get a Z0 of about 46 Ohms while at high frequencies a Z0 of 56 Ohms.
Now you can imagine why mismatch in S parameters occur at high frequencies during measurement (your fabricated port impedance is a constant at 50 Ohms while the simulation port impedance varies).
Unfortunately, the above formula (Suhas Dinesh) is valid only at low frequencies, when the size of the transition region (discontinuity) between the two lines is much smaller than the wavelength. In this case we can neglect the diffraction of waves at the junction lines and to assume that the lines are connected directly.
At high frequencies the impedance of the second line is measured via a transition region (discontinuity). And it is impossible to separate the impedance of the second line from the parameters of this discontinuity.
I've just come to this question recently. I strongly recommend you to read the following document by Keysight in which you can find the "correct" method and answer in Eq.4: Calculating Characteristic Impedance "Z" of a Transmission Line from measured S-params and you will definitely need at least S11 and S12.