weighting variables - Scipy minimize TNC method

2 views
Skip to first unread message

NC4FB

unread,
Sep 26, 2018, 5:48:19 PM9/26/18
to SciPy-user
I have a working bounded objective function to manipulate the C (capacitance) and L (inductance) values for a low-pass low-high impedance matching circuit typically used for antenna impedance matching in order to achieve the lowest SWR (standing wave ratio) within the defined bounds.  The analytic solution for the test case returns a C value of 218.485 pF and an L value of 0.2359 uH.  The TNC solution returns a C value of 218.485 and an L value of  0.6148 uH.  Both solutions are acceptable.  However, the analytic solution with the smaller L value is more desirable because of lower matching losses.   Analytic solutions for the test case can be obtained at https://home.sandiego.edu/~ekim/e194rfs01/jwmatcher/matcher2.html by entering the values defined in the attached program.

TNC test case output.

swrTNC =       fun: 1.0000000630600352
     jac: array([0.00663358, 3.06393104])
 message: 'Converged (|f_n-f_(n-1)| ~= 0)'
    nfev: 113
     nit: 21
  status: 1
 success: True
       x: array([218.48593276,   0.61482967])

Process finished with exit code 0

I'm looking for a way to force TNC to seek a solution with the lowest SWR value using the smallest L value possible.  Perhaps a weighting factor such as .6 for L and .4 for C totaling 1.  A copy of the TNC test case Python program is attached.

I would appreciate any code changes or suggestions that will accomplish the above.  Changing optimization methods is an option provided bounds can be applied.

Thanks,

F. Benson, NC4FB
TNC-Lpass-match.py
Reply all
Reply to author
Forward
0 new messages