Multiple Frequency Dependant Variables

Help
2011-09-29
2012-12-15
  • Robert Farris
    Robert Farris
    2011-09-29

    When I simulate a circuit with more than one frequency dependant variable the S-parameters are incorrect.

    The circuit below is a spice model of a Coilcraft 0603AF chip inductor with frequency dependant variables Rvar1, Rvar2 and Lvar.  I'm doing an S-parameter sweep on port 1 with port 2 grounded.  The simulation results show all three variables are calculated correctly but S11 resolves to a real impedance at all frequencies made up of the series resistor R1 and a short to ground through Rvar2.  These types of models with a single variable work fine and mimic the manufactures s2p date extremely well.

    <Qucs Schematic 0.0.16>
    <Properties>
      <View=26,-11,1261,663,1,0,0>
      <Grid=10,10,1>
      <DataSet=0603af.dat>
      <DataDisplay=0603af.dpl>
      <OpenDisplay=1>
      <Script=0603af.m>
      <RunScript=0>
      <showFrame=0>
      <FrameText0=Title>
      <FrameText1=Drawn By:>
      <FrameText2=Date:>
      <FrameText3=Revision:>
    </Properties>
    <Symbol>
      <.ID -40 24 SUB>
    </Symbol>
    <Components>
      <R R1 1 190 160 -26 15 0 0 "Rs" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "US" 0>
      <Pac P1 1 80 270 18 -26 0 1 "1" 1 "50 Ohm" 1 "0 dBm" 0 "1 GHz" 0 "26.85" 0>
      <GND * 1 80 320 0 0 0 0>
      <R R2 1 550 160 -26 15 0 0 "Rp" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "US" 0>
      <C C1 1 410 160 -26 17 0 0 "Cp" 1 "" 0 "neutral" 0>
      <R R4 1 470 40 -26 15 0 0 "Rvar2" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "US" 0>
      <R R3 1 410 280 -26 15 0 0 "Rvar1" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "US" 0>
      <GND * 1 740 180 0 0 0 0>
      <L L1 1 550 280 -26 10 0 0 "Lvar" 1 "" 0>
      <.SP SP1 1 110 410 0 66 0 0 "lin" 1 "10 MHz" 1 "1 GHz" 1 "101" 1 "no" 0 "1" 0 "2" 0 "no" 0 "no" 0>
      <Eqn Eqn2 1 790 410 -30 16 0 0 "Rvar1=k1*sqrt(frequency)" 1 "Rvar2=k2*sqrt(frequency)" 1 "Lvar=(k3-k4*ln(k5*frequency))*1e-6" 1 "yes" 0>
      <Eqn Eqn1 1 630 410 -30 16 0 0 "Cp=0.116e-12" 1 "Rs=0.089" 1 "Rp=80" 1 "k1=1.00e-5" 1 "k2=0.064" 1 "k3=0.159" 1 "k4=2.86e-3" 1 "k5=1.00e-7" 1 "yes" 0>
    </Components>
    <Wires>
      <80 300 80 320 "" 0 0 0 "">
      <80 160 80 240 "" 0 0 0 "">
      <80 160 160 160 "" 0 0 0 "">
      <220 160 300 160 "" 0 0 0 "">
      <300 160 300 280 "" 0 0 0 "">
      <300 280 380 280 "" 0 0 0 "">
      <300 40 300 160 "" 0 0 0 "">
      <300 40 440 40 "" 0 0 0 "">
      <300 160 380 160 "" 0 0 0 "">
      <440 160 520 160 "" 0 0 0 "">
      <440 280 520 280 "" 0 0 0 "">
      <500 40 660 40 "" 0 0 0 "">
      <740 160 740 180 "" 0 0 0 "">
      <580 160 660 160 "" 0 0 0 "">
      <660 160 740 160 "" 0 0 0 "">
      <660 40 660 160 "" 0 0 0 "">
      <660 160 660 280 "" 0 0 0 "">
      <580 280 660 280 "" 0 0 0 "">
    </Wires>
    <Diagrams>
    </Diagrams>
    <Paintings>
      <Text 320 400 12 #000000 0 "Coilcraft\n0603AF Series\nSurface Mount Chip Inductor\n">
    </Paintings>

    Any help would be greatly appreciated and thanks in advance.

    sweeps

     
  •  magneto98
    magneto98
    2011-09-29

    Hi sweeps,

    Please copy your schematic file e.g. to http://pastebin.com/ and post the link.

     
  •  magneto98
    magneto98
    2011-09-29

    This is the output I get with your schematic:

    -----8< -------8< -------8< -------8< -------8< -------
    Starting new simulation on Thu 29. Sep 2011 at 17:53:23

    creating netlist… done.
    parsing netlist…
    checking netlist…
    checker notice, variable `frequency' in equation `Rvar1' not yet defined
    checker notice, variable `frequency' in equation `Rvar2' not yet defined
    checker notice, variable `frequency' in equation `Lvar' not yet defined
    netlist content
          1 C instances
          1 L instances
          4 R instances
          1 Pac instances
          1 SP instances
    creating netlist…
    checker notice, variable `frequency' in equation `Rvar1' not yet defined
    checker notice, variable `frequency' in equation `Rvar2' not yet defined
    checker notice, variable `frequency' in equation `Lvar' not yet defined

    Simulation ended on Thu 29. Sep 2011 at 17:53:23
    Ready.
    -----8< -------8< -------8< -------8< -------8< -------

    I'm not familiar with frequency dependent variables, but maybe you are using them in the wrong way. I remember there is some text about them in the qucs documentation (GettingStarted, Workbook, TechnicalPapers)

    Carsten

     
  • Glenn Elmore
    Glenn Elmore
    2011-09-29

    I think the problem is that <frequency> is only evaluated once, prior to simulation.
    In this case I'm not sure it is even 10 MHz rather than zero or null.
    I've wanted to do what you're doing before too. Maybe someone will show us how.
    If someone knows, please also point to an example of passing variables into a subcircuit for use
    in computing components there. This is possible in ADS but darned if I can figure it out in QUCs.

    Glenn

    Glenn

     
  • Robert Farris
    Robert Farris
    2011-09-29

    Glenn,

    Here is a subcircuit example if it helps http://pastebin.com/Z8XJQUvN

    If you hit F9 you will see the symbol and parameters.  Of course this still dosn't work but, if you make a circuit with one or less frequency dependant variable it looks okay.

    sweeps

     
  •  magneto98
    magneto98
    2011-09-29

    sweeps
    Thanks. I also had the "passing parameters to subcircuits" problem today and already gave up on this.
    Carsten

     
  •  magneto98
    magneto98
    2011-09-29

    Sweeps,

    I thought Equation defined devices (EDD) could help, but it looks like they are not usable in this case.

    Carsten

     
  • Robert Farris
    Robert Farris
    2011-09-29

    Final found the example I was looking for, I knew I saw one a while back.  It is on page 16 of this document http://www.mos-ak.org/frankfurt_o/papers/P_7_Brinson_MOS-AK_April_2009_final.pdf

    It uses RFEDD modules for the variables.  Using just the RFEDD modules (circuit in center of page) yelds a constant manitude and phase for S11 over frequency.  I guess to make it work you need all the equations defined in Eqn2 on the right side of the page.  Seems like a lot of work for a simple task.

    sweeps

     
  •  magneto98
    magneto98
    2011-09-30

    So the sweep variable in the S-Parameter-Block is 'frequency', but you have to use 'F' in your RFEDD equations!!!!

     
  • Robert Farris
    Robert Farris
    2011-09-30

    I did a simulation of a 100 nH Coilcraft 0805CS using both the SPICE model and the S-parameter file.  The results are close but not exact.  But, if I short Rvar in the SPICE model the results do not change.  So, I was wrong in assuming that using a single frequency dependant variable woks.  I guess since both plots were close and Rvar was being calculated I assumed everything worked okay.

    sweeps