• 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. Transient and DC operating point are different

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 125
  • Views 19843
  • 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

Transient and DC operating point are different

BaaB
BaaB over 9 years ago

Hi,

I just run DC and transient analyses to find the operating point. However, the result is different. 

Transient analysis will perform DC analysis first, so should they be equal?

I tried the two separately and the results are different. 

Here is the netlist (if necessary).

// Generated for: spectre
// Generated on: Apr 9 00:29:19 2016
// Design library name: Huan
// Design cell name: Differential_Amp
// Design view name: schematic
simulator lang=spectre
global 0 vdd!
include "/root/Desktop/SaveOpPoint.scs"
parameters x=1
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=dio3
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=dio_dnw
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=dio
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfres_sa
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfmvar
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfind
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rtmom
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_bbmvar
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfesd
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_mim
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfrtmom
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfres_hri
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfres_rpo
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_3vna
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_m
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfmos
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfmim
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfjvar
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_3m
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_res
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_bip3
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_bip
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_3v
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfmos33
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_na
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfsbd
include "/root/Desktop/SaveOpPoint.scs"

// Library name: Huan
// Cell name: Differential_Amp
// View name: schematic
R4 (vdd! VP) resistor r=1K
R3 (vdd! VN) resistor r=1K
V3 (net08 net07) vsource dc=600.0m type=dc
V2 (net016 0) vsource dc=x type=dc
V0 (vdd! 0) vsource dc=1.8 type=dc
V6 (Vin2 net016) vsource mag=1 type=sine ampl=1m sinephase=180 freq=1M
V5 (Vin net016) vsource mag=1 type=sine ampl=1m sinephase=0 freq=1M
I11 (VS 0) isource dc=1.6m type=dc
M3 (net015 net08 net07 net07) nch l=180n w=2u m=50 ad=5.4e-13 as=5.568e-13 \
pd=2.54u ps=2.6368u nrd=0.135 nrs=0.135
M1 (VP Vin2 VS VS) nch l=180n w=2u m=50 ad=5.4e-13 as=5.568e-13 pd=2.54u \
ps=2.6368u nrd=0.135 nrs=0.135
M0 (VN Vin VS VS) nch l=180n w=2u m=50 ad=5.4e-13 as=5.568e-13 pd=2.54u \
ps=2.6368u nrd=0.135 nrs=0.135
simulatorOptions options reltol=1e-3 vabstol=1e-6 iabstol=1e-12 temp=27 \
tnom=27 scalem=1.0 scale=1.0 gmin=1e-12 rforce=1 maxnotes=5 maxwarns=5 \
digits=5 cols=80 pivrel=1e-3 sensfile="../psf/sens.output" \
checklimitdest=psf
dcOp dc write="spectre.dc" maxiters=150 maxsteps=10000 annotate=status
dcOpInfo info what=oppoint where=rawfile
dc dc param=x start=0 stop=1.8 lin=200 oppoint=rawfile maxiters=150 \
maxsteps=10000 annotate=status
tran tran stop=300u write="spectre.ic" writefinal="spectre.fc" \
annotate=status infotimes=[0] maxiters=5 infoname=tran_Info
finalTimeOP info what=oppoint where=rawfile
tran_Info info what=oppoint where=rawfile
modelParameter info what=models where=rawfile
element info what=inst where=rawfile
outputParameter info what=output where=rawfile
designParamVals info what=parameters where=rawfile
primitives info what=primitives where=rawfile
subckts info what=subckts where=rawfile
saveOptions options save=allpub

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    The transient and DC operating points will be the same if the DC value of the sources is the same as the time zero value of the source. That appears to be the case here.

    However, do note that the dc solution for transient will start from the values at the end of the previous simulation - and so that would be the value of x=1.8 (because of the dc sweep). If the circuit has more than one stable operating point, then that could influence the result.

    However, in this case I don't know what you're looking at to determine that they are different. I checked the node voltages and currents and they all seem to be the same (comparing the spectre.ic and spectre.dc files). 

    What are you looking at which shows you there's a difference?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • BaaB
    BaaB over 9 years ago

    Thank you.

    As you said last time I also checked the DC sources value and time-zero value and they are equal.

    I've just checked operating points from two files as you said. However, in my case, these files don't have current info. 

    What I see the difference is currents through M0 and M1 in two cases.

    DC analysis: iM0 = iM1 = 800.026uA

    Tran analysis: iM0=800.002uA and iM1=799.999uA

    I got this by running each analysis separately and then from ADE print operating points.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    I think you're looking at the tranOp results not the time=0 operating point information. The tranOp results are coming from the:

    finalTimeOP info what=oppoint where=rawfile

    which is the operating point at the end of the simulation, not the beginning. I can't print the operating points in ADE because I don't have the setup, but if I look in the results browser, then I see "tranOp" (which is the aliased name for the finalTimeOP results) and "tranOpTimed" which is the aliased name for the "infotimes" output. It's the latter you want. 

    In that, the results all 800.026uA (assuming you're looking at the id operating point parameter for these devices).

    A small difference might have been possible (the difference you're seeing is smaller than the reltol in the simulator anyway), but I think it's actually just because you're not comparing the right things.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • BaaB
    BaaB over 9 years ago

    I tried to check the voltage at two inputs to see if the operating point is beginning or final point and the result confirms that it is beginning point (if nothing goes wrong).

    However, in transient analysis, I tried to set infoitimes box with 0 but the result in result browser doesn't have any infor about oppoint at this time.

    Is there something wrong with my case? 

    I have struggled with it all night now. I need some sleep now. Thank you again for help.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • BaaB
    BaaB over 9 years ago

    Hi again,

    I tried to set reltol = 1e-8 but the resulting current in tran analysis is still not the same: iM0=800.001uA and iM1=799.999uA.

    Also, I tried to choose stop time equal to an even number of cycle so that the final point and beginning point are the same with both two input starting at the same value).

    However, the result is not different.

    How can I save the operating point at time 0 in transient analysis? I tried to put 0 into infotimes box but that doesn't work.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    I can't remember which IC version you're using, but I ran the simulation using MMSIM13.1 Update - which is 13.1.1.049. I then used the IC616 base release (I think it was an early IC616 ISR you were using). I found in that release, the infotimes output is in a result called "tran_info" and I can't plot the waveform (it is a single point waveform) but I can send the results to a table. 

    I also wrote this short OCEAN script to get the results:

    openResults("forum_oppoint.raw")
    ;println(results())
    ;println(results(?noAlias t))
    selectResult("dcOpInfo")
    printf("M0:id = %g M1:id = %g\n" getData("M0:id") getData("M1:id"))
    selectResult("tran_info-tran_info")
    printf("M0:id = %g M1:id = %g\n" value(getData("M0:id") 0) value(getData("M1:id") 0))

    Note I used the "unaliased" result name to ensure it worked in all versions (normally results() and ViVA results browser show the aliased result name to make it more portable and shorter).

    Anyway, you can see the results from sending the infotimes (time 0 operating point) to a table, and also the results of the OCEAN script in this screen grab. As you can see, the dcOpInfo and tran_info-tran_info results match:

    By the way, I wouldn't set the reltol that tight - that's excessive.

    Not sure why you stayed up all night to sort this out - do you not trust the simulator?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • BaaB
    BaaB over 9 years ago

    Hi,

    Thank you.

    I have just checked it the way you did and the result is same now. However, there are two questions, could you explain?

    1. The operating point at time 0: iM0 and iM1 are not the same at the one I had by running transient and plot iM0 and iM1 and then see the current at time 0 of the two curves. They are actually very closed to each other (2pA difference) but should they be exact the same?

    2. The final operating point also differs from that got from plotting iM0 and iM1 and then see the current at time stop time of the two curves.

    Is this normal?

    Not sure why you stayed up all night to sort this out - do you not trust the simulator?

    Honestly I would like to see it works at least one time myself.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Unknown said:
    They are actually very closed to each other (2pA difference) but should they be exact the same?

    You're really worried about 1 part in 40 million? Circuit simulators solve nonlinear differential equations. It's not possible to get an exact solution to such equations, so numerical methods are employed (e.g. Newton Raphson) which iterate towards a solution and determine that the solution has converged when the error is small (this is all part of a tradeoff between speed and reasonable accuracy). The criteria used to determine the error is generally in the form reltol*quantity+abstol (so this might be the change between two iterations, or the error in the sum of currents into a node).  reltol defaults to 1e-3, and vabstol is 1e-6V and iabstol is 1e-12A. The absolute tolerances are for when the signal levels are close to zero - because otherwise you'd have an ever increasing accuracy for tiny (insignificant) signals. So a difference of only 2pA is remarkably small (it's close to the abstol), especially in a current of 800uA. I didn't actually see that difference. Even if I had, the starting point for the two DC solutions may have been slightly different (it typically starts from whatever set of numbers were used previously - or it may have been that there was a small difference in the number of iterations - either way, the differences are well within the accuracy tolerances).

    There is a small amount of inaccuracy that appears in the DC solution with reltol=1e-3, which reduces if you tighten it to 1e-5 (note, I seriously doubt you need this level of accuracy for this circuit) - and if you compare the three operating points, they are very close:

    DC : M0:id = 0.00079999999976654 M1:id = 0.00079999999976654
    TRAN 0: M0:id = 0.00079999999976654 M1:id = 0.00079999999976654
    FINAL : M0:id = 0.00080000135675758 M1:id = 0.00079999851611377

    This was with this script:

    openResults("forum_oppoint.raw")
    ;println(results())
    ;println(results(?noAlias t))
    selectResult("dcOpInfo")
    printf("DC : M0:id = %.14g M1:id = %.14g\n" getData("M0:id") getData("M1:id"))
    selectResult("tran_info-tran_info")
    printf("TRAN 0: M0:id = %.14g M1:id = %.14g\n" value(getData("M0:id") 0) value(getData("M1:id") 0))
    selectResult("finalTimeOP-info")
    printf("FINAL : M0:id = %.14g M1:id = %.14g\n" getData("M0:id") getData("M1:id"))

    Note I did this with MMSIM14.1 ISR18 so your results may be slightly different (although not significantly different). All the results there are well within the tolerances. There's probably some longer term settling effect - I found this reduced if I ran a much longer simulation with a lower frequency sine wave too. There's also some error that occurs (local truncation error) during transient which also will give a small error in each instantaneous time point, but this won't accumulate over time.

    So I would say you're worrying about a level of accuracy that really isn't warranted.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • BaaB
    BaaB over 9 years ago

    Hi,

    Actually, I don't need that accuracy just to confirm my understanding about the two analyses. I thought that in transient analysis the zero time and stop time points of current should be equal to the transient operating points of current at time 0 and stop time respectively. However, that is not the case in my simulation.

    As you can see the transient operating point for id at the time zero:

    DC : M0:id =800.000003e-6  M1:id = 800.000003e-6

    TRAN 0: M0:id = 800.000003e-6 M1:id = 800.000003e-6

    However, when I run the transient analysis, then plot id and look at the id at time zero I got the result is a bit different:

    TRAN 0: M0:id = 800.000005e-6 M1:id = 800.000005e-6

    I thought they should be the same. I just want to confirm my understanding about the analysis. In this case the difference is insignificant. However, is there a case where the difference is large (beyond the tolerances )?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Unknown said:

    I thought they should be the same. I just want to confirm my understanding about the analysis. In this case the difference is insignificant. However, is there a case where the difference is large (beyond the tolerances )?

    No, not unless there is some circuit behaviour (such as something that hasn't settled in the duration of the simulation, or some adaptive non-periodic behaviour like a sigma-delta modulator) which means the beginning doesn't match the end. 

    Andrew.

    • 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