[Python] Python scikit-rf: Unexpected impedance plot from series RLC .s2p: S→Y OK, but Z plot...

Discussão em 'Python' iniciado por Stack, Julho 18, 2025.

  1. Stack

    Stack Membro Participativo

    I'm creating a tool that needs to take in an s-param file and plot the z-mag of the file. The Y-source plot using ntwk.plot_y_mag() looks exactly as expected.

    However, the Z-parameter plot from ntwk.plot_z_mag() appears incorrect — it's noisy, unexpectedly large, or nonsensical. [​IMG]

    Here is what it should be from the murata website of there cap: [​IMG]

    The data that scikit-rf is spitting out from the z values is exactly what is being plotted, so the issue is pin pointed to the conversion process internal to scikit-rf or the sparam file. I don't think it's the sparam file because I am able to plot and use it in other tools correctly.

    The Sparam file I am grabbing is from the attached link on the murata website. I grabbed the simple series model of the sparam file. link

    Here is the code I am using:

    ntwk = rf.Network("GCM31CR71A226KE02_DC0V_25degC_series_simple.s2p")
    ntwk.plot_z_mag(m=0, n=0)
    ax = plt.gca()
    ax.set_xscale('log') # log frequency axis
    #ax.set_yscale('log') # log magnitude axis
    #ax.set_ylim(1e-3, 100) # limit Y-axis


    plt.title('Magnitude of Z-parameters')
    plt.xlabel('Frequency (GHz)')
    plt.ylabel('Impedance Magnitude (Ohms)')
    plt.grid(True, which='both', linestyle=':', linewidth=0.8)
    plt.show()


    Why does the Z‑parameter look wrong even though the Y‑parameter plot is correct? What common mistakes or pitfalls could cause this?

    Continue reading...

Compartilhe esta Página