ad: ProAudio-1

Impedance Matching Calculators - Be Careful

Discussion in 'Antennas, Feedlines, Towers & Rotors' started by AC6LA, Jul 1, 2020.

ad: L-HROutlet
ad: l-rl
ad: Left-3
ad: L-MFJ
ad: Left-2
ad: FBNews-1
ad: Subscribe
  1. AC6LA

    AC6LA Ham Member QRZ Page

    Here's a little study that I've always wanted to document. Finally made the time to do so.

    There are lots of impedance matching tools available but not all of them will provide the expected results. Suppose you wanted a conventional L-network (one capacitor and one inductor) to match a load of 25+j50 ohms to a source of 50+j0 ohms at 10 MHz.

    Below are several examples. Some provide the expected two forms (High Pass with the capacitor in series and Low Pass with the inductor in series) of a conventional L-network , some show unconventional networks with two of the same component type, and some show negative component values. Expected results are circled in green, unexpected results are circled in red.

    Le Leivre:

    m1.png

    Analog Devices:

    m2.png

    EEWeb:

    m3.png

    All About Circuits:

    m4.png

    Mantaro:

    m5.png

    Wetherell and Circuit Sage (Circuit Sage copied the Wetherell JavaScript without attribution):

    m6.png

    SimSmith (with component loss included):

    m7.png

    AutoEZ (with component loss included):

    m8.png

    And here's all the math and logic (from K6JCA) about why some L-network calculators go off the rails:

    Revisiting L-Network Equations and Constraints

    So be careful out there. I'm sure this will come as a shock but not everything you find on the Wild West Web will give you the results you expected.

    Dan, AC6LA
    https://ac6la.com
     
    SP3L, WB5YUZ, K3RW and 6 others like this.
  2. WA7ARK

    WA7ARK Ham Member QRZ Page

    I use the Analog calc all the time, and have never found the results to be bogus. For example, I took the two networks it found and put them into LTSpice. I am sweeping frequency around 10MHz. I show that at 10MHz, the input voltage at V(i1) and V(i2) are exactly half the source voltage at a phase of 0 degrees which can only happen if there is a perfect match. Notice that one network is high pass, and the other is low pass....

    upload_2020-6-30_19-45-46.png

    If you were building the network, which would you rather build, one with a handmade inductor, or one with two capacitors????
     
    Last edited: Jul 1, 2020
  3. KA0HCP

    KA0HCP XML Subscriber QRZ Page

    @AC6LA
    Dan, my head is swimming with the figures and the numbers. Would you please summarize which of these calculators is reliable and which are not. Thanks so much. bill.
     
  4. AC6LA

    AC6LA Ham Member QRZ Page

    I should have made it clear that none of the calculators are wrong, per se. The ones that show an unconventional network with two of the same type components (Analog Devices, shunt input; Mantaro, series input) do indeed provide a match to 50+j0 ohms. And the ones that show a negative component value are technically correct. That can be verified with a tool such as SimSmith that allows entry of negative component values. For example, with a shunt input capacitor of 318.309 pF and a series inductor of -397.887 nH the match is perfect:

    m9.png

    Note that -397.887 nH is the equivalent of 636.62 pF at 10 MHz.

    The point I was trying to make is that if you are looking for a conventional L-network (one cap, one coil), not all the calculators will give you what you want.

    My personal favorite is the Le Leivre one but even that has a drawback. The source impedance defaults to 75+j0, not 50+j0, so you have to remember to change that each time.

    Dan, AC6LA
     
    KA0HCP and EA1DDO like this.
  5. AE6TY

    AE6TY Ham Member QRZ Page

    One of the really fun things is to do this exercise with lossy inductors. The topology can change as you alter the Q. Drove me nuts getting that one right!
    Ward, ae6ty
     
  6. WB2UAQ

    WB2UAQ Ham Member QRZ Page

    Years ago I programmed my old HP32S calculator to do series to parallel and parallel to series conversions. With those two simple conversions it is pretty easy to do impedance matching. It takes a little practice. With the EFHW transformers I have been tinkering with I recently got more practice. If you use a core other than the FT-240-43 (5943003801) it takes more than just a shunt C.
     
  7. K6JCA

    K6JCA Ham Member QRZ Page

    That's right. I believe most of the calculators Dan mentions assume that component Q is infinite.

    A few years ago I wrote a MATLAB script finds the appropriate low-pass matching network and calculates the component values given FINITE component Q's. If interested, the math and script is here:

    https://k6jca.blogspot.com/search/label/Networks: L-Network Design Equations for Lossy Networks

    Given the Q values Dan lists above in the SimSmith model (Qc = 1000, Ql = 200), Rload = 25, Xload = +50, and Frequency = 10 MHz, the script returns the following values:

    Lnet_id = 'LsCp' (Matching Network is Series-L, Shunt-C)

    Ls = 9.7101e-07 (Henrys)

    Cp = 4.1147e-10 (Farads)

    Gp_Lnet = 0.9907 (Gp, "Operating Power Gain")

    Gp_Percent_Loss = 0.9303 (Network power loss, %)

    The equations that calculate the component values were derived using MATLAB's Symbolic Math Toolbox. I am really just a neophyte at using Symbolic Math. Its virtue is that it can save a lot of pencil-pushing compared to if one instead tried to derive the equations by hand.

    - Jeff, k6jca
     
  8. AC6LA

    AC6LA Ham Member QRZ Page

    The "neophyte" mentioned above was using code like this:

    =============================================
    function [ X_L_Val, X_C_Val ] = shunt_C_ser_L_Q_3(Rload,Xload,Rsource,Xsource,Q_L,Q_C)
    close
    clc

    % Formulas generated using symbolic math
    % generated in the script: SymMath_CpLs_from_Qs_and_Zload_3.m

    % This third version calculates X_C in lieu of B_C

    % First, calculating the two XL values:
    X_L_Val(1) = (Q_L*(Q_C*Rsource^2 - 2*Rload*Xsource + Q_L*Rsource^2 + Q_C*Xsource^2 + Q_L*Xsource^2 + (- 4*Q_C^2*Q_L^2*Rload^2*Rsource^2 + 4*Q_C^2*Q_L^2*Rload*Rsource^3 + 4*Q_C^2*Q_L^2*Rload*Rsource*Xsource^2 + 8*Q_C^2*Q_L*Rload*Rsource^2*Xload - 4*Q_C^2*Q_L*Rsource^3*Xload - 4*Q_C^2*Q_L*Rsource*Xload*Xsource^2 + Q_C^2*Rsource^4 - 4*Q_C^2*Rsource^2*Xload^2 + 2*Q_C^2*Rsource^2*Xsource^2 + Q_C^2*Xsource^4 - 8*Q_C*Q_L^2*Rload^2*Rsource*Xsource + 4*Q_C*Q_L^2*Rload*Rsource^2*Xsource + 4*Q_C*Q_L^2*Rload*Xsource^3 - 4*Q_C*Q_L*Rload*Rsource^3 + 16*Q_C*Q_L*Rload*Rsource*Xload*Xsource - 4*Q_C*Q_L*Rload*Rsource*Xsource^2 + 2*Q_C*Q_L*Rsource^4 - 4*Q_C*Q_L*Rsource^2*Xload*Xsource + 4*Q_C*Q_L*Rsource^2*Xsource^2 - 4*Q_C*Q_L*Xload*Xsource^3 + 2*Q_C*Q_L*Xsource^4 + 4*Q_C*Rsource^3*Xload - 8*Q_C*Rsource*Xload^2*Xsource + 4*Q_C*Rsource*Xload*Xsource^2 - 4*Q_L^2*Rload^2*Xsource^2 + Q_L^2*Rsource^4 + 2*Q_L^2*Rsource^2*Xsource^2 + Q_L^2*Xsource^4 - 4*Q_L*Rload*Rsource^2*Xsource + 8*Q_L*Rload*Xload*Xsource^2 - 4*Q_L*Rload*Xsource^3 + 4*Rsource^2*Xload*Xsource - 4*Xload^2*Xsource^2 + 4*Xload*Xsource^3)^(1/2) - 2*Q_C*Rload*Rsource - 2*Q_L*Xload*Xsource - 2*Q_C*Q_L*Rsource*Xload))/(2*(Q_L^2 + 1)*(Xsource + Q_C*Rsource));

    X_L_Val(2) = -(Q_L*(2*Rload*Xsource - Q_C*Rsource^2 - Q_L*Rsource^2 - Q_C*Xsource^2 - Q_L*Xsource^2 + (- 4*Q_C^2*Q_L^2*Rload^2*Rsource^2 + 4*Q_C^2*Q_L^2*Rload*Rsource^3 + 4*Q_C^2*Q_L^2*Rload*Rsource*Xsource^2 + 8*Q_C^2*Q_L*Rload*Rsource^2*Xload - 4*Q_C^2*Q_L*Rsource^3*Xload - 4*Q_C^2*Q_L*Rsource*Xload*Xsource^2 + Q_C^2*Rsource^4 - 4*Q_C^2*Rsource^2*Xload^2 + 2*Q_C^2*Rsource^2*Xsource^2 + Q_C^2*Xsource^4 - 8*Q_C*Q_L^2*Rload^2*Rsource*Xsource + 4*Q_C*Q_L^2*Rload*Rsource^2*Xsource + 4*Q_C*Q_L^2*Rload*Xsource^3 - 4*Q_C*Q_L*Rload*Rsource^3 + 16*Q_C*Q_L*Rload*Rsource*Xload*Xsource - 4*Q_C*Q_L*Rload*Rsource*Xsource^2 + 2*Q_C*Q_L*Rsource^4 - 4*Q_C*Q_L*Rsource^2*Xload*Xsource + 4*Q_C*Q_L*Rsource^2*Xsource^2 - 4*Q_C*Q_L*Xload*Xsource^3 + 2*Q_C*Q_L*Xsource^4 + 4*Q_C*Rsource^3*Xload - 8*Q_C*Rsource*Xload^2*Xsource + 4*Q_C*Rsource*Xload*Xsource^2 - 4*Q_L^2*Rload^2*Xsource^2 + Q_L^2*Rsource^4 + 2*Q_L^2*Rsource^2*Xsource^2 + Q_L^2*Xsource^4 - 4*Q_L*Rload*Rsource^2*Xsource + 8*Q_L*Rload*Xload*Xsource^2 - 4*Q_L*Rload*Xsource^3 + 4*Rsource^2*Xload*Xsource - 4*Xload^2*Xsource^2 + 4*Xload*Xsource^3)^(1/2) + 2*Q_C*Rload*Rsource + 2*Q_L*Xload*Xsource + 2*Q_C*Q_L*Rsource*Xload))/(2*(Q_L^2 + 1)*(Xsource + Q_C*Rsource));

    % ...and calculate the two XC values:
    X_C_Val(1) = (Q_C*(2*Rsource*Xload + Q_C*Rsource^2 + Q_L*Rsource^2 + Q_C*Xsource^2 + Q_L*Xsource^2 + (- 4*Q_C^2*Q_L^2*Rload^2*Rsource^2 + 4*Q_C^2*Q_L^2*Rload*Rsource^3 + 4*Q_C^2*Q_L^2*Rload*Rsource*Xsource^2 + 8*Q_C^2*Q_L*Rload*Rsource^2*Xload - 4*Q_C^2*Q_L*Rsource^3*Xload - 4*Q_C^2*Q_L*Rsource*Xload*Xsource^2 + Q_C^2*Rsource^4 - 4*Q_C^2*Rsource^2*Xload^2 + 2*Q_C^2*Rsource^2*Xsource^2 + Q_C^2*Xsource^4 - 8*Q_C*Q_L^2*Rload^2*Rsource*Xsource + 4*Q_C*Q_L^2*Rload*Rsource^2*Xsource + 4*Q_C*Q_L^2*Rload*Xsource^3 - 4*Q_C*Q_L*Rload*Rsource^3 + 16*Q_C*Q_L*Rload*Rsource*Xload*Xsource - 4*Q_C*Q_L*Rload*Rsource*Xsource^2 + 2*Q_C*Q_L*Rsource^4 - 4*Q_C*Q_L*Rsource^2*Xload*Xsource + 4*Q_C*Q_L*Rsource^2*Xsource^2 - 4*Q_C*Q_L*Xload*Xsource^3 + 2*Q_C*Q_L*Xsource^4 + 4*Q_C*Rsource^3*Xload - 8*Q_C*Rsource*Xload^2*Xsource + 4*Q_C*Rsource*Xload*Xsource^2 - 4*Q_L^2*Rload^2*Xsource^2 + Q_L^2*Rsource^4 + 2*Q_L^2*Rsource^2*Xsource^2 + Q_L^2*Xsource^4 - 4*Q_L*Rload*Rsource^2*Xsource + 8*Q_L*Rload*Xload*Xsource^2 - 4*Q_L*Rload*Xsource^3 + 4*Rsource^2*Xload*Xsource - 4*Xload^2*Xsource^2 + 4*Xload*Xsource^3)^(1/2) - 2*Q_L*Rload*Rsource - 2*Q_C*Xload*Xsource + 2*Q_C*Q_L*Rload*Xsource))/(2*(Q_C^2 + 1)*(Xload - Xsource - Q_L*Rload + Q_L*Rsource));

    X_C_Val(2) = (Q_C*(2*Rsource*Xload + Q_C*Rsource^2 + Q_L*Rsource^2 + Q_C*Xsource^2 + Q_L*Xsource^2 - (- 4*Q_C^2*Q_L^2*Rload^2*Rsource^2 + 4*Q_C^2*Q_L^2*Rload*Rsource^3 + 4*Q_C^2*Q_L^2*Rload*Rsource*Xsource^2 + 8*Q_C^2*Q_L*Rload*Rsource^2*Xload - 4*Q_C^2*Q_L*Rsource^3*Xload - 4*Q_C^2*Q_L*Rsource*Xload*Xsource^2 + Q_C^2*Rsource^4 - 4*Q_C^2*Rsource^2*Xload^2 + 2*Q_C^2*Rsource^2*Xsource^2 + Q_C^2*Xsource^4 - 8*Q_C*Q_L^2*Rload^2*Rsource*Xsource + 4*Q_C*Q_L^2*Rload*Rsource^2*Xsource + 4*Q_C*Q_L^2*Rload*Xsource^3 - 4*Q_C*Q_L*Rload*Rsource^3 + 16*Q_C*Q_L*Rload*Rsource*Xload*Xsource - 4*Q_C*Q_L*Rload*Rsource*Xsource^2 + 2*Q_C*Q_L*Rsource^4 - 4*Q_C*Q_L*Rsource^2*Xload*Xsource + 4*Q_C*Q_L*Rsource^2*Xsource^2 - 4*Q_C*Q_L*Xload*Xsource^3 + 2*Q_C*Q_L*Xsource^4 + 4*Q_C*Rsource^3*Xload - 8*Q_C*Rsource*Xload^2*Xsource + 4*Q_C*Rsource*Xload*Xsource^2 - 4*Q_L^2*Rload^2*Xsource^2 + Q_L^2*Rsource^4 + 2*Q_L^2*Rsource^2*Xsource^2 + Q_L^2*Xsource^4 - 4*Q_L*Rload*Rsource^2*Xsource + 8*Q_L*Rload*Xload*Xsource^2 - 4*Q_L*Rload*Xsource^3 + 4*Rsource^2*Xload*Xsource - 4*Xload^2*Xsource^2 + 4*Xload*Xsource^3)^(1/2) - 2*Q_L*Rload*Rsource - 2*Q_C*Xload*Xsource + 2*Q_C*Q_L*Rload*Xsource))/(2*(Q_C^2 + 1)*(Xload - Xsource - Q_L*Rload + Q_L*Rsource));

    end
    =============================================

    For those of you keeping score at home, in the code above everything between "% First, calculating the two XL values:" and the blank line several rows down is a single equation. There are four such equations and Jeff wrote more code to get the correct inductor and capacitor values out of all that.

    Makes my head spin. Ward tells me that he used Mathematica to make the SimSmith "automatic LC block" do similar calculations.

    I remain awestruck.

    Dan, AC6LA
     
  9. K6JCA

    K6JCA Ham Member QRZ Page

    Fortunately, those equations were generated by MATLAB, not by me!

    But to give credit to where it is abundantly due, the original MATLAB Symbolic Math script that generated the four equations, above, was written by Dick Benson, W1QG (and slightly modified by me). Dick was an early user of MATLAB and he has decades of experience with it. Usually he tells me about something he's done. I say, "Wow, that's very cool!" And then I do a little riff on it (as an example, check out the FPGA-based HF Transceiver on my blog: http://k6jca.blogspot.com/2017/02/an-fpga-sdr-hf-transceiver-part-1.html).

    Compared to him, I truly am a neophyte.

    Jeff, k6jca
     
  10. WB2UAQ

    WB2UAQ Ham Member QRZ Page

    Thanks Dan. I learn a lot from YOU. And that is what it is all about!
     

Share This Page