Wonky Optimization Results

Help
randyc
2013-04-30
2013-05-01
  • randyc

    randyc - 2013-04-30

    Something strange occurs when optimizing physical dimensions in the "transmission line" model, the first model in the transmission line menu.

    Optimization satisfies all of the requirements specified BUT when the physical dimensions are applied to the appropriate variables the performance does not remotely resemble the optimization prediction.

    I hope that the netlist available from the QUCS simulation icon can be useful. This is the netlist when the optimizer is enabled:

    Qucs 0.0.16 C:/Users/Randy/Downloads/detector.sch

    MCROSS:MS2 _net0 _net1 _net2 _net3 Subst="Subst1" W1="10 mil" W2="10 mil" W3="10 mil" W4="10 mil" MSModel="Hammerstad" MSDispModel="Kirschning"
    Diode:D_BAS70_1 _net6 _net7 Is="99.5p" N="1.7" Cj0="2p" M="0.333" Vj="0.7" Fc="0.5" Cp="0" Isr="0" Nr="2" Rs="0.6" Tt="7.2n" Ikf="0" Kf="0" Af="1" Ffe="1" Bv="70" Ibv="10u" Temp="26.85" Xti="3.0" Eg="1.11" Tbv="0.0" Trs="0.0" Ttt1="0.0" Ttt2="0.0" Tm1="0.0" Tm2="0.0" Tnom="26.85" Area="1.0"
    Pac:P1 _net0 gnd Num="1" Z="50 Ohm" P="0 dBm" f="1 GHz" Temp="26.85"
    C:C1 gnd _net7 C="20 pF" V=""
    R:R1 gnd _net7 R="5000 Ohm" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"

    ASCO configuration file(s) created

    .DC:DC1 Temp="26.85" reltol="0.001" abstol="1 pA" vntol="1 uV" saveOPs="no" MaxIter="150" saveAll="no" convHelper="none" Solver="CroutLU"
    R:R2 _net8 _net6 R="30" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
    .SP:SP1 Type="lin" Start="2 GHz" Stop="4 GHz" Points="19" Noise="no" NoiseIP="1" NoiseOP="2" saveCVs="no" saveAll="no"
    Eqn:Eqn1 Input="max(mag(S[1,1]))" Ret_Loss="20*log10((mag(S[1,1])))" Export="yes"
    SUBST:Subst1 er="4.4" h="63 mil" t="1.4 mil" tand="2e-4" rho="0.022e-6" D="0.15e-6"
    MLIN:MS3 _net1 _net4 Subst="Subst1" W="10 mil" L="L4" Model="Hammerstad" DispModel="Kirschning" Temp="26.85"
    MLIN:MS4 _net5 _net3 Subst="Subst1" W="10 mil" L="L4" Model="Hammerstad" DispModel="Kirschning" Temp="26.85"
    MRSTUB:MS6 _net5 Subst="Subst1" ri="10 mil" ro="L2" alpha="90"
    MRSTUB:MS5 _net4 Subst="Subst1" ri="10 mil" ro="L2" alpha="90"
    MLIN:MS1 _net2 _net8 Subst="Subst1" W="6 mil" L="L1" Model="Hammerstad" DispModel="Kirschning" Temp="26.85"

    The optimized result indicates that the magnitude of S11 is less than .05 across the band of interest ! It's unlikely that anything except a resistor can exhibit this performance. OK, inserting the optimized variables and disabling optimization this is the netlist:

    Qucs 0.0.16 C:/Users/Randy/Downloads/detector.sch

    MCROSS:MS2 _net0 _net1 _net2 _net3 Subst="Subst1" W1="10 mil" W2="10 mil" W3="10 mil" W4="10 mil" MSModel="Hammerstad" MSDispModel="Kirschning"
    Diode:D_BAS70_1 _net6 _net7 Is="99.5p" N="1.7" Cj0="2p" M="0.333" Vj="0.7" Fc="0.5" Cp="0" Isr="0" Nr="2" Rs="0.6" Tt="7.2n" Ikf="0" Kf="0" Af="1" Ffe="1" Bv="70" Ibv="10u" Temp="26.85" Xti="3.0" Eg="1.11" Tbv="0.0" Trs="0.0" Ttt1="0.0" Ttt2="0.0" Tm1="0.0" Tm2="0.0" Tnom="26.85" Area="1.0"
    Pac:P1 _net0 gnd Num="1" Z="50 Ohm" P="0 dBm" f="1 GHz" Temp="26.85"
    C:C1 gnd _net7 C="20 pF" V=""
    R:R1 gnd _net7 R="5000 Ohm" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
    .DC:DC1 Temp="26.85" reltol="0.001" abstol="1 pA" vntol="1 uV" saveOPs="no" MaxIter="150" saveAll="no" convHelper="none" Solver="CroutLU"
    R:R2 _net8 _net6 R="30" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
    .SP:SP1 Type="lin" Start="2 GHz" Stop="4 GHz" Points="19" Noise="no" NoiseIP="1" NoiseOP="2" saveCVs="no" saveAll="no"
    Eqn:Eqn1 Input="max(mag(S[1,1]))" Ret_Loss="20*log10((mag(S[1,1])))" Export="yes"
    SUBST:Subst1 er="4.4" h="63 mil" t="1.4 mil" tand="2e-4" rho="0.022e-6" D="0.15e-6"
    MLIN:MS1 _net2 _net8 Subst="Subst1" W="6 mil" L="172.4 mil" Model="Hammerstad" DispModel="Kirschning" Temp="26.85"
    MRSTUB:MS5 _net4 Subst="Subst1" ri="10 mil" ro="89.72 mil" alpha="90"
    MRSTUB:MS6 _net5 Subst="Subst1" ri="10 mil" ro="89.72" alpha="90"
    MLIN:MS3 _net1 _net4 Subst="Subst1" W="10 mil" L="22.2 mil" Model="Hammerstad" DispModel="Kirschning" Temp="26.85"
    MLIN:MS4 _net5 _net3 Subst="Subst1" W="10 mil" L="22.2 mil" Model="Hammerstad" DispModel="Kirschning" Temp="26.85"

    The magnitude of S11 is now greater than 0.7 in part of the band of interest !!!!

    Questions:

    1. Have I entered the circuit and the optimization parameters correctly ?

    2. If so, is this a bug and is there a fix ?

    Cheers,
    Randy

    Edited to add:

    P.S. This doesn't happen with lumped-constant L-C transformation circuits -

     
    Last edit: randyc 2013-04-30
  • randyc

    randyc - 2013-04-30

    It gets weirder. Tried another simple transmission line simulation. The simulation was perfect with correct variables entered. When the variables were allowed to optimize, the output was a totally different FREQUENCY band !!!

    Should have been 1.0 to 1.5 GHz but was 2.0 to 4.0 GHz !

    ???

     
  • randyc

    randyc - 2013-04-30

    I have now noticed that the output results from the last optimization problem are identical to the results from the FIRST one ! Seemingly the output files are interchangeable no matter what the circuit happens to be, ha-ha.

    This is the strangest problem - the results from optimization seem not to be written to the correct output file when physical dimensions for transmission lines are used.

    Bug or user problem ?

     
    • Richard C

      Richard C - 2013-04-30

      This is possibly a bug, could you file a bug report here:

      http://sourceforge.net/p/qucs/bugs/

      Possibly attaching a schematic which demonstrates the problem and the
      steps needed reproduce it (I know you've told us here, but this keeps it
      in one place where it won't be forgotten).

      Richard

       
  • randyc

    randyc - 2013-04-30

    OK, will do.

    FYI, how does QUCS know which units of measure to apply to a physical dimension variable like a transmission line ? If I qualify the variable (i.e. "L1 mil") an error message results.

    How does QUCS understand that imperial rather than metric units are to be used ?

    Cheers,
    Randy

     
  • randyc

    randyc - 2013-04-30

    Very COOL ! I didn't know that this document existed :)

     
  • randyc

    randyc - 2013-04-30

    I read through the document but it doesn't address my question, which might better be put using an example.

    Assume I want to optimize the width and length of a transmission line for a specific purpose. I replace the normal dimensions (e.g. "L=263 mil") with a variable (e.g. "L=L1").

    In the optimization menu, I enter the variable properties: "L1 200 300 750".

    These numbers have now become dimensionless because it's not clear that they are mils or millimeters, furlongs or nautical miles.

    When I first attempted to optimize dimensions, I entered the variables as "L=L1 mils" but this produces an error message which can only be removed by deleting "mils" from the variable.

    Am I making myself clear ? I just don't understand how QUCS can assign units of measure to a variable when the user has not provided that information -

    (Surely this has come up in the past. Any RF/Microwave engineer would have noticed this anomaly very quickly since high-frequency microwave circuits are universally precise, well-defined mechanical features rather than conventional lumped-constant elements such as capacitors and inductors.)

    Cheers,
    Randy

     
    • Richard C

      Richard C - 2013-04-30

      ok, I didn't read fully, but the doc does point out that the unit you
      need is 'mm' not 'mils', which may solve your error problem.

      From the doc, every value is in the base SI unit for that quantity.
      Putting in the unit explicitly is just a convenience for the user so it
      is clear what is meant. Try putting in 50m for a resistor for example,
      that gives you a 50mOhm value whether you state 'Ohm' or not. You can
      modify this base unit by adding a m, n, p M etc. to get milli, nano,
      pico Mega or whatever.

      In the example you give, the unit of length will be metres. Now it so
      happens this is the only unit you cannot specify directly because the
      unit 'm' clashes with the 'm' to make things 1x10^-3 so in this case:

      no unit - metres
      m - millimeters
      mm - millimeters

      Qucs only uses SI units and does not support inches, or roman digitus
      etc. for length specifications etc. ;-)

       
  • randyc

    randyc - 2013-04-30

    P.S. Not trying to nitpick or rock the boat - I am sincerely interested. The more I know about QUCS, the better the usage of this powerful tool :)

     
  • randyc

    randyc - 2013-04-30

    Yes, I noted the millimeter condition in the document BUT there is obviously some qualification of that condition.

    For example, under tools, transmission line elements can be synthesized/analyzed in millimeters or in inches (mils), in fact "mils" is the default when I open that menu.

    Likewise when analyzing various microwave networks consisting of transmission line elements, specifying the dimensions in inches (mils) works perfectly. (I've analyzed three or four microstrip and waveguide filters that I designed some years ago, using inch dimensions rather than millimeters, and the results are in good agreement with measured performance.)

    The dichotomy occurs only in optimization, is that what you mean ?

    Many thanks for your patience,
    Randy

     
  • randyc

    randyc - 2013-04-30

    Not to further obfuscate but I created a very simple scenario to test the dimensional anomaly: A 110 ohm load resistor in series with a 12 pF capacitor, connected through a length of transmission line of arbitrary length and impedance, to a 50 ohm source.

    QUCS was instructed to optimize the impedance and length of the transmission line to obtain a reflection coefficient of less than .03 at approx 1.25 GHz. The resulting optimized variables were:

    Z1 = 74.84
    L1 = 2871

    With the aid of my Smith Chart calculator, it's easy to see that a match is obtained at 1.25 GHz when the transmission line length is about 110 degrees. L1 is therefore in mils since 2.871 inches at 1.25 GHz is 109.5 degrees.

    So how did QUCS know that the variable was in inches ? Here is the circuit file:

    Qucs 0.0.16 C:/Program Files (x86)/Qucs/bin/ABCX.sch

    Pac:P1 _net0 gnd Num="1" Z="50 Ohm" P="0 dBm" f="1 GHz" Temp="26.85"
    TLIN:Line1 _net0 _net1 Z="Z1" L="L1" Alpha="0 dB" Temp="26.85"
    Eqn:Eqn1 S11_Max="max(mag(S[1,1]),1.2e9:1.3e9)" S11db="20*log10(mag(S[1,1]))" Export="yes"
    R:R1 gnd _net2 R="110 Ohm" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
    C:C1 _net1 _net2 C="12 pF" V=""

    ASCO configuration file(s) created

    .SP:SP1 Type="lin" Start="1 GHz" Stop="1.5 GHz" Points="19" Noise="no" NoiseIP="1" NoiseOP="2" saveCVs="no" saveAll="no"

     
    • Richard C

      Richard C - 2013-05-01

      Well, now you put it like that you do have a point. The info's in the
      bug tracker, so it will get followed up at some point.

      On 30/04/2013 22:42, randyc wrote:

      Not to further obfuscate but I created a very simple scenario to test
      the dimensional anomaly: A 110 ohm load resistor in series with a 12
      pF capacitor, connected through a length of transmission line of
      arbitrary length and impedance, to a 50 ohm source.

      QUCS was instructed to optimize the impedance and length of the
      transmission line to obtain a reflection coefficient of less than .03
      at approx 1.25 GHz. The resulting optimized variables were:

      Z1 = 74.84
      L1 = 2871

      With the aid of my Smith Chart calculator, it's easy to see that a
      match is obtained at 1.25 GHz when the transmission line length is
      about 110 degrees. L1 is therefore in mils since 2.871 inches at 1.25
      GHz is 109.5 degrees.

      So how did QUCS know that the variable was in inches ? Here is the
      circuit file:

      Qucs 0.0.16 C:/Program Files (x86)/Qucs/bin/ABCX.sch

      Pac:P1 _net0 gnd Num="1" Z="50 Ohm" P="0 dBm" f="1 GHz" Temp="26.85"
      TLIN:Line1 _net0 _net1 Z="Z1" L="L1" Alpha="0 dB" Temp="26.85"
      Eqn:Eqn1 S11_Max="max(mag(S[1,1]),1.2e9:1.3e9)"
      S11db="20*log10(mag(S[1,1]))" Export="yes"
      R:R1 gnd _net2 R="110 Ohm" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
      C:C1 _net1 _net2 C="12 pF" V=""

      ASCO configuration file(s) created

      .SP:SP1 Type="lin" Start="1 GHz" Stop="1.5 GHz" Points="19" Noise="no"
      NoiseIP="1" NoiseOP="2" saveCVs="no" saveAll="no"


      Wonky Optimization Results
      https://sourceforge.net/p/qucs/discussion/311050/thread/9d4d2475/?limit=25#bed2


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/qucs/discussion/311050/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks