• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. RF Design
  3. expression problem from ac sweep

Stats

  • Locked Locked
  • Replies 15
  • Subscribers 63
  • Views 23217
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

expression problem from ac sweep

yefJ
yefJ over 6 years ago

Hello, i am trying to recreate the method described in the following post for calculating the output impedance, i put AC source as shown bellow to act as a probe , i added the coil to filter undesired signal , i put "iprobe" to get the output current , and "out" node for the output voltage.

when i tried to implement the expression for calculating the impedance , it gave me and error shown in the end.

where did i go wrong?/

Thanks


community.cadence.com/.../capacitance-vs-bias-voltage-curve-for-ferroelectric-varactor


  • Cancel
Parents
  • ShawnLogan
    ShawnLogan over 6 years ago

    Dear Yefj,

    > when i tried to implement the expression for calculating the impedance , it gave me and error shown in the end.

    > where did i go wrong?

    The function to determine the imaginary part of a signal is imag(). Your expression uses a function image() - which I do not believe is a valid function.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yefJ
    yefJ over 6 years ago in reply to ShawnLogan

    Hello Shawn, i have change the expression like you said.

    i noticed that it says that VOUT is unbound.what could be done?

    Thanks



    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 6 years ago in reply to yefJ

    Dear yefj,

    > i noticed that it says that VOUT is unbound.what could be done?

    The value function has two arguments consisting of a signal and the value you wich to evaluate it at. Without the value function in your expression, you should see the imaginary part of the impedance as a function of frequency. If you are using the value function, you must specify the frequency at which you want to evaluate the impedance.

    In essence: value(signal x_value); hence for the impedance at  a given frequency f0, value(imag(Z) fo)

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yefJ
    yefJ over 6 years ago in reply to ShawnLogan

    Hello Shawn, I have made only an imag expression as you said.

    also I made an AC simulation and a sweep on vvdc  from -3 to 3 as shown bellow.(both in the ac simulation window, shown bellow)

    but still I get the same error "unbound variable vout" , shown in the end.

    where did I go wrong?

    Thanks 


    **************************************************************************************************************************************************************************

    *****************************************************************************************************************************************************************************************


    *********************************************************************************************************************************************************************************


    *********************************************************************************************************************************************************************

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to yefJ

    You cannot just refer to signal names in an expression as if they were variables. They aren't variables - which is why it is complaining. It would also have complained about IPRB0 and PLUS had it not hit the error about vout.

    You need to use access functions such as VF, IF (for frequency domain voltage and current) or the general purpose v() and i() functions. For example:

    VF("/vout")
    IF("/IPRB0/PLUS")

    or:

    v("/vout" ?result 'ac)
    i("/IPRB0/PLUS" ?result 'ac)

    Note that the names I've given here start with a forward slash, and use forward slash as a hierarchy delimiter - that means they are using the schematic name space. Omitting the slash means it will expect the names to be in the simulator (netlist) namespace. Using the vf, if buttons etc on the calculator would have allowed you to click on the node (or terminal if it was a current) on the schematic and generate the appropriate expression. So, your expression should be:

    imag(VF("/vout")/IF("/IPRB0/PLUS"))

    BTW, you should be careful about adding pairs of unnecessary extra parentheses in expressions - this can lead to evaluation problems in SKILL (which is what this expression is).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 6 years ago in reply to Andrew Beckett

    Thanks for your assistance Andrew!

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yefJ
    yefJ over 6 years ago in reply to ShawnLogan

    Hello, so if we want the exact expression of capacitance we need to convert imag(VF("/vout")/IF("/IPRB0/PLUS")) using the formula bellow,

    -imag(1 / (2 * 3.14*1e9 *(VF("/vout")/IF("/IPRB0/PLUS")))

    As you can see in the resuults bellow i get  zero capacitance , maybe because by dividing the  output current with the output voltage we get the load impedance which is 100K resistance..so by the methodics shown in the post bellow what should be the load? 

    because when i try to follow the last part i get  only the impedance of the load.

    Thanks

    community.cadence.com/.../capacitance-vs-bias-voltage-curve-for-ferroelectric-varactor

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 6 years ago in reply to yefJ
    yefJ said:
    -imag(1 / (2 * 3.14*1e9 *(VF("/vout")/IF("/IPRB0/PLUS")))

    Dear yefj,

    First of all, your expression above is not equivalent to the expression in the forum post. The expression in the forum post is different and not equivalent to your expression.

    In the forum post,. Zc is the imaginary part of the simulated impedance. In your expression, you are taking the imaginary part of the expression 1/(2*pi*1e9*total impedance).

    The two expressions, yours and that in the forum post, are NOT equivalent. Zc in the forum post represents the imaginary part of the total impedance and in  your you are taking the imaginary part of the entire expression which includes the real impedance.

    Secondly, is your value for L0 of 100 uH large enough to block the AC current into the DC source? For 100 uH and 1 GHz, I compute an impedance of only 628K (2*pi()*1e9*100e-06). I think you need to make L0 much larger to block significant amounts of AC current from flowing into the DC source.

    Please refer to the post Yefj. Both of my points to you are covered in it. Further, it provided the correct expressions to compute the effective capacitance and real impedance at 1 GHz as:

    (-1 / (2 * 1e9 * value(imag((v("/OUT" ?result "ac") / i("/ICAP/PLUS" ?result "ac"))) 1e+09) * pi))

    value(real((v("/OUT" ?result "ac") / i("/ICAP/PLUS" ?result "ac"))) 1e+09

    Note that if you read this, Andrew would not have had to respond as it uses the correct spectre syntax for the voltage and current and you would not have had to write your question.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • ShawnLogan
    ShawnLogan over 6 years ago in reply to yefJ
    yefJ said:
    -imag(1 / (2 * 3.14*1e9 *(VF("/vout")/IF("/IPRB0/PLUS")))

    Dear yefj,

    First of all, your expression above is not equivalent to the expression in the forum post. The expression in the forum post is different and not equivalent to your expression.

    In the forum post,. Zc is the imaginary part of the simulated impedance. In your expression, you are taking the imaginary part of the expression 1/(2*pi*1e9*total impedance).

    The two expressions, yours and that in the forum post, are NOT equivalent. Zc in the forum post represents the imaginary part of the total impedance and in  your you are taking the imaginary part of the entire expression which includes the real impedance.

    Secondly, is your value for L0 of 100 uH large enough to block the AC current into the DC source? For 100 uH and 1 GHz, I compute an impedance of only 628K (2*pi()*1e9*100e-06). I think you need to make L0 much larger to block significant amounts of AC current from flowing into the DC source.

    Please refer to the post Yefj. Both of my points to you are covered in it. Further, it provided the correct expressions to compute the effective capacitance and real impedance at 1 GHz as:

    (-1 / (2 * 1e9 * value(imag((v("/OUT" ?result "ac") / i("/ICAP/PLUS" ?result "ac"))) 1e+09) * pi))

    value(real((v("/OUT" ?result "ac") / i("/ICAP/PLUS" ?result "ac"))) 1e+09

    Note that if you read this, Andrew would not have had to respond as it uses the correct spectre syntax for the voltage and current and you would not have had to write your question.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • yefJ
    yefJ over 6 years ago in reply to ShawnLogan

    Hello ,  by your advice i have used  the following formula, also i increased the inductance to 1mH 


    (-1 / (2 * 1e+09 * value(imag((v("/vout" ?result "ac") / i("/IPRB0/PLUS" ?result "ac"))) 1e+09) * pi))

    as you can see in the end i get only a single value in the table bellow,although i did  a  sweep on vvdc in AC simulation.

    only after i did Tools>Parametric analysis  sweep on vvdc i get a plot of Capacitance vs vvdc.

    so in fact i did sweep twice..is that ok?

    also did i use the correct load (100Kohm) after the Probe?

    Thanks



    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 6 years ago in reply to yefJ

    Dear Yefj,

    > as you can see in the end i get only a single value in the table bellow,although i did  a  sweep on vvdc in AC simulation.

    > only after i did Tools>Parametric analysis  sweep on vvdc i get a plot of Capacitance vs vvdc.

    >so in fact i did sweep twice..is that ok?

    Please refer to the definition of the value() function a portion of which is provided below. In your expression, you indicate to choose the imaginary impedance value at 1e9. However, you are sweeping the voltage from -3 to +3 -not the frequency. Hence, the value function will select the value closest to 1e9 - which is likely +3. hence, it will only compute a single value of the expression. To obtain a value for the expression at a particular voltage, you need to change the second argument of the value() function to the specific voltage in which you are interested. You are NOT varying the frequency of your analysis, so it does not make any sense to set the second argument of the value() function to the AC frequency you specify as 1 GHz.. If you want to set the second argument of the value() function to 1 GHz, then follow the analysis proposed in the forum post - which is an AC analysis over a frequency range that includes 1 GHz at a specific value of voltage.

    > also did i use the correct load (100Kohm) after the Probe?

    I wish you would use the test bench I provided in the forum post. I do not know why you included the 100K resistor in your schematic and do not think you placed the current probe in the correct location to measure the current through your MOS varactor and additional switched capacitors. If you are trying to measure the current through your entire varactor network, the current probe can be placed in series with the gate of the drain-source connected MOS device. Remove the 100K resistor totally. The probe will then capture all the current through the drain-source connected device and the switched capacitors. With where you have it in the schematic now, it is not measuring the current through your varactor network and hence will not provide the correct impedance for you to compute the capacitance of your varactor network.

    Please consider using the test bench I provided with the analysis I suggested or modify your schematic.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yefJ
    yefJ over 6 years ago in reply to ShawnLogan
    Unknown said:
    If you are trying to measure the current through your entire varactor network, the current probe can be placed in series with the gate of the drain-source connected MOS device. Remove the 100K resistor totally. The probe will then capture all the current through the drain-source connected device and the switched capacitors.

    Hello i have changed the circuit and the simulation as you said with the expression shown bellow.

    i added a 1A ac source and 1mH  inductor in series with the VVDC source.

    in the results of the formula it gives a constant capacitance no matter what VVDC voltage .

    where in the AC current source did i got wrong? 

    another problem is why we dont calculate the capacitance from the OUT node signed in red?

    the VCO will look at the capacitance from that point,so we do need to put the iprobe there and VOUT there

    am  i correct?

    Thanks

    (-1 / (2 * 1e+09 * value(imag(v("/vout" ?result "ac") / i("/IPRB0/PLUS" ?result "ac")) 1e+09) * pi))



    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 6 years ago in reply to yefJ

    Dear Yefl,

    > in the results of the formula it gives a constant capacitance no matter what VVDC voltage .

    > where in the AC current source did i got wrong?

    You did not set the DC potential at your top node vout to be anything. Hence, it is floating and will take on the same value as your applied control voltage (vvdc). Hence, there will be no change in capacitance as you change the control voltage vvdc.

    > another problem is why we dont calculate the capacitance from the OUT node signed in red?

    > the VCO will look at the capacitance from that point,so we do need to put the iprobe there and VOUT there

    > am  i correct?

    I was wondering where the VCO node was. Please use the circuit shown in the attached file to measure the capacitance as a function of your control voltage:

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yefJ
    yefJ over 6 years ago in reply to ShawnLogan

    Hello , i have made the test bench as you described and i got results.

    but in our VCO as shown bellow there is no ac current source,so how it's equivalent regarding the impedance that it will present in the actual system? 

    another thing is how do you suggest connecting it to the VCO?   in our varactor there is no "two sides" as in the capactior shown in the schematics bellow. 

    Thanks.


    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 6 years ago in reply to yefJ

    Dear yejf,

    > but in our VCO as shown bellow there is no ac current source,so how it's equivalent regarding

    > the impedance that it will present in the actual system?

    The impedance you are supposed to simulate is the impedance that the inductor will see. The impedance you are computing is from  node v_vco to ground. If that is the impedance the inductor will see in your VCO, that is the correct impedance to simulate.

    > in our varactor there is no "two sides" as in the capactior shown in the schematics bellow. 

    I do not understand how the varactor will vary its capacitance in your VCO circuit as there is no DC isolation of its bottom terminal from its top terminal. You can only change its capacitance with a change in DC voltage across the varactor. You need to include an AC coupling capacitor if you do not have a means to isolate the DC voltage of your varactor bottom terminal.

    I think you need to study other VCO designs in the literature as it appears your design and the capacitance voltage characteristic you plot need some design effort. Is this a school project or an actual design? This forum is focused on solving Cadence related issues.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yefJ
    yefJ over 6 years ago in reply to ShawnLogan

    Hello Shawn and Andrew, thank you very much , i got a good varactor exactly as you described in you test bench methodics.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information