• 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. Custom IC Design
  3. Behavioral voltage source implementation in Cadence Vir...

Stats

  • Locked Locked
  • Replies 18
  • Subscribers 125
  • Views 25269
  • 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

Behavioral voltage source implementation in Cadence Virtuoso

Muhaisin
Muhaisin over 4 years ago

Hi! 

I am using Cadence virtuoso Spectre Version 7.2.0.109 64bit. I am trying to design a voltage-controlled resistor here. I can do that in LTSpice using a behavioral voltage source which allows me to write a function to generate the voltage. But, I cannot find a similar approach in Cadence. How should I implement it?

Below is the schematic of the implementation of the concept in LTSpice. Here, B1 is the behavioral voltage source that I can assign a function to. How do I do this in Cadence? Thank you!

  • Cancel
Parents
  • ShawnLogan
    ShawnLogan over 4 years ago

    Dear Muhaisin,

    Muhaisin said:
    . I am trying to design a voltage-controlled resistor here. I can do that in LTSpice using a behavioral voltage source which allows me to write a function to generate the voltage. But, I cannot find a similar approach in Cadence. How should I implement it?

    If your function relating the voltage across the resistor and the resistance is linear, the Spectre Linear Voltage Controlled Current Source (vccs) component can provide this functionality. Details on the use of the voltage-controlled current source as a voltage variable resistor may be found in the Spectre Components and Device Models reference manual at URL:

    support.cadence.com/.../techpubDocViewerPage

    In the version I am looking at (Product Version 20.1, October 2020) please refer to its description on page 79. Do you think this might allow you to model your voltage-controlled resistor adequately?

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Muhaisin
    Muhaisin over 4 years ago in reply to ShawnLogan

    Hi, Shawn!

    I tried using vccs as a voltage-controlled resistor as recommended. And, I checked whether it works like a resistor by implementing a voltage divider action, and it does as you can see in figure 01. But, I think it does something more too, which I cannot make sense of. I need help regarding that.

    Figure 01

    Please have a look at figure 02 and 03. My objective is to replace the 1 ohm resistor (White-marked) right after the VCVS with a vcr of equal value. After doing so, I intend to get the same transient response as I got for the circuit in figure 02. I replaced the 1 ohm resistor with the vcr in figure 03. The circuit of figure 02 is unstable (it's intentionally so), and for that, you can see the oscillation building up in the transient response when a current pulse is provided. But when I replace the 1 ohm resistor with 1 ohm vcr, keeping everything else the same, it doesn't do so. Why is that? Do you have any idea?

    Figure 02

    Figure 03

    P.S: If the photos are not clear, please have a look at the photos from this link: storage link

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to Muhaisin

    Dear  Muhaisin,

    Muhaisin said:
    The circuit of figure 02 is unstable (it's intentionally so), and for that, you can see the oscillation building up in the transient response when a current pulse is provided. But when I replace the 1 ohm resistor with 1 ohm vcr, keeping everything else the same, it doesn't do so. Why is that? Do you have any idea?

    I will provide a couple of thoughts based on my viewing of your circuit topologies and waveforms...I do not have a full understanding of your circuits nor the analyses you are trying to run, so please excuse the comments if they are not relevant!

    It appears the two examples you provided in your Figure 02 and Figure 03 have fundamentally different stimuli. In Figure 02, you are driving what appears to be a voltage controlled source with a pulse signal and in Figure 03 you are driving your voltage controlled source with an AC current source. However, the adjacent output waveforms are both shown as a function of time . With the circuit topology of Figure 03 with its AC driving source, I would not expect the responses to a transient pulse and a current source with zero value to provide the same circuit responses. Further, if you are wondering why the circuit topology in Figure 3 does not oscillate but that in Figure 02 does oscillate, you have not provided any noise source to result in an oscllation in the circuit topology of Figure 03 - hence the only potential source of noise to excite an oscillation is the numerical nioise of the simulator. Does this make sense?

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Muhaisin
    Muhaisin over 4 years ago in reply to ShawnLogan

    Hi, Shawn!

    Thank you for your reply. Although I implemented what I said in my last comment, I mistakenly provided the wrong screenshot of the schematic in figure 03 the last time. Sorry for that. I have uploaded the correct figure 03 now (in the storage link as well). There, you will see that other than the vcr, everything else is same as figure 02. Now, as you can see in figure 03, it's excitation is the same as that of figure 02. So, the transient analysis will make sense. And you are right that the circuit needs excitation to build up the oscillation. That excitation in both the circuits in figure 02 and figure 03 in form of a very short current pulse is indirectly mimicking the noise source. Now, as due to that excitation the circuit in figure 02 builds up oscillation, if the vcr implementation is right in replacing the 1 ohm resistance, shouldn't the circuit in figure 03 also oscillate?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Muhaisin
    Muhaisin over 4 years ago in reply to Muhaisin

    In response to Andrew's comment,

    the instructions you provided for finding the version and netlist might not be applicable to the version that I am using as the interface isn't the same. Nonetheless,  I am using Cadence virtuoso Spectre Version 7.2.0.109 64bit (figure 01).  And if I type "getVersion(t)" is shows- "sub-version 5.10.41_USR6.127.29". Also, the netlist of the vcr implementation of 1 ohm is shown in figure 02.

    figure 01

    figure 02

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Muhaisin

    No, the method I suggested would have been fine there too.

    Actually, having looked at the full schematic, can you just post the entire input.scs here please? Not a picture of it, but the text of it. This is to avoid typing everything in again or redrawing the schematic.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Muhaisin
    Muhaisin over 4 years ago in reply to Andrew Beckett

    Sure! The first netlist contains the vcr implementation (like figure 03) and the second netlist contains ideal resistance implementation (like figure 02). Just to clarify again, my question is why is vcr implementation not working?

    NETLIST 01

    G0 (net049 net044 net022 0) vccs gm=1.0 type=vcr
    V0 (net022 0) vsource dc=1 type=dc
    I4 (0 vin) isource type=pulse val0=1u val1=0 period=1 rise=1n fall=1n \
    width=1u
    L0 (vin net1) inductor l=3.95m
    C4 (vin vo) capacitor c=870f
    C2 (net11 vo) capacitor c=2.79f
    C1 (vin 0) capacitor c=18p
    C0 (vo 0) capacitor c=18p
    R2 (net1 net11) resistor r=22.33
    R1 (vin 0) resistor r=11.9781K
    R0 (net044 vo) resistor r=798.92
    E0 (net049 0 vin 0) vcvs gain=-10.68813

    NETLIST 2

    I4 (0 vin) isource type=pulse val0=1u val1=0 period=1 rise=1n fall=1n \
    width=1u
    L0 (vin net1) inductor l=3.95m
    C4 (vin vo) capacitor c=870f
    C2 (net11 vo) capacitor c=2.79f
    C1 (vin 0) capacitor c=18p
    C0 (vo 0) capacitor c=18p
    R8 (net049 net044) resistor r=1
    R2 (net1 net11) resistor r=22.33
    R1 (vin 0) resistor r=11.9781K
    R0 (net044 vo) resistor r=798.92
    E0 (net049 0 vin 0) vcvs gain=-10.68813

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Muhaisin

    The issue is simply that the oscillation doesn't start - whereas numerical noise in the first is enough to get it to start oscillating. This is a common problem with oscillators in transient simulation; they work by first finding a DC solution (where all the inductors are shorted, capacitors are open circuit) and then the transient starts from that point. Since nothing changed there is normally no reason for anything to start oscillating - you've usually started at some metastable point. Occasionally there's enough numerical noise to get it to move away from that, and there are a variety of tricks to encourage oscillation, such as an initial condition holding a key node away from the metastable point).

    In this case, the second circuit does oscillate if I force enough time steps by using a transient such as this:

    tran tran stop=900u maxstep=1/(50.0*47M)

    This is forcing 50 points per period of the approximate frequency. You don't get exactly the same frequency because this is an overly ideal simulation and it blows up due to the lossless components reaching very large voltages quickly, but it's close - and the startup behaviour is not entirely realistic either).

    That said, if you apply the same maxstep to both simulations, you get identical results.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Muhaisin
    Muhaisin over 4 years ago in reply to Andrew Beckett

    Hello, Andrew! 

    Thank you for your suggestion regarding the time steps. It solved the problem at my end as well. I can see the oscillation building up. 

    Nonetheless, I would like to know why did I have to change the max time steps when I replaced a resistor with an equivalent vcr? I agree with everything you said regarding the concept of the oscillator circuit start-up. But I don't think I left it to the numerical noise for the oscillation to build up because I am providing the excitation in form of a fast current pulse. And as that pulse was sufficient for oscillation build up in the circuit with ideal resistor, what does the vcr representation of that same resistor do differently that I can't see the oscillation building up without manipulating the time steps? 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Muhaisin

    OK, just because you've given it a kick at the beginning doesn't necessarily allow enough opportunity for the energy to build up. The circuit is different between the two - the set of equations is very slightly different, and so the numerical errors in the solution are different too. The time steps end up being shortened considerably in the first (by a bit of luck), and so that allows the energy to build-up without forcing a shorter tilmestep.

    In fact if you add V0 (the controlling source) back into the circuit with the resistor, and don't set imaxstep, it also doesn't oscillate - this extra voltage source is enough to make the matrix solution different and then the energy doesn't build up.

    So, put simply, you were lucky that numerical errors in the first case (with the resistor) were enough that the oscillation started building near the beginning, and once the time steps have been shortened, the oscillation starts. In the second case (with the VCR or with the V0 source added), the tilmestep doesn't drop much below the default maxstep (1/50 of the stop time) except during the initial pulse.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Muhaisin

    OK, just because you've given it a kick at the beginning doesn't necessarily allow enough opportunity for the energy to build up. The circuit is different between the two - the set of equations is very slightly different, and so the numerical errors in the solution are different too. The time steps end up being shortened considerably in the first (by a bit of luck), and so that allows the energy to build-up without forcing a shorter tilmestep.

    In fact if you add V0 (the controlling source) back into the circuit with the resistor, and don't set imaxstep, it also doesn't oscillate - this extra voltage source is enough to make the matrix solution different and then the energy doesn't build up.

    So, put simply, you were lucky that numerical errors in the first case (with the resistor) were enough that the oscillation started building near the beginning, and once the time steps have been shortened, the oscillation starts. In the second case (with the VCR or with the V0 source added), the tilmestep doesn't drop much below the default maxstep (1/50 of the stop time) except during the initial pulse.

    Andrew.

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

    Dear Muhaison.

    I suspected that the cause of your observation may be the lack of an excitation source - and if I may just to add to Andrew''s astute comments..

    This is a very common phenomenon in simulations of autonomous circuits (i.e. oscillators). Basically, if one does not provide enough noise at or near the resonance frequency of the resonator source, the gain of the sustaining amplifier is not sufficient to overcome the real impedance of the resonant circuit and sustained oscillations will not occur. I suspect that your initial "pulse" did not provide enough energy at or near the resonance frequency.

    From a simulator perspective, the use of added time steps to the simulation, by for example reducing and forcing a value for Spectre parameter maxstep, effectively adds higher frequency content to the numerical noise and makes oscillation more likely. The integration method you choose can also impact the likelihood of sustained oscillations.

    For these reasons, I do not rely on repeated transient analyses to validate that a resonant autonomous circuit will reliably start-up. A far more robust methodology involves studying the real impedance of the resonator and the "negative resistance" of the sustaining amplifier to verify sufficient negative resistance margin exists to provide robust start-up performance. 

    Please excuse my verbose response! However, I wanted to add a little more "color" to Andrew's valuable insights.

    Shawn

    • 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