The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> Is transient noise simulation in HSPICE possible?
https://designers-guide.org/forum/YaBB.pl?num=1149730234

Message started by imtired on Jun 7th, 2006, 6:30pm

Title: Is transient noise simulation in HSPICE possible?
Post by imtired on Jun 7th, 2006, 6:30pm

Is it possible to introduce non-deterministic noise in HSPICE transient simulations?
Is there any way to generate a PSD? (also HSPICE transient sim)

Thanks,
Robert

Title: Re: Is transient noise simulation in HSPICE possib
Post by Eugene on Jun 8th, 2006, 11:09am

Does your version of HSPICE support VerilogA?

Title: Re: Is transient noise simulation in HSPICE possib
Post by imtired on Jun 9th, 2006, 10:46am

I am currently using HSPICE version Y2006.03.
I did find some verilog-A examples in my HSPICE directory, although I've never used this feature.

Title: Re: Is transient noise simulation in HSPICE possib
Post by Eugene on Jun 9th, 2006, 11:49am

I would suggest diving into VerilogA to generate a time domain noise source with a particular PSD. There's a paper posted to this website that gives an example. Look for phase noise. You could apply the same technique to other noise sources. You generate noise with a random number generator operating at a high update rate and then pass the noise samples through a digital filter to shape the PSD. The digital filter can be implemented with z-domain blocks.

http://designers-guide.org/Modeling/modeling-rf-systems.pdf

Title: Re: Is transient noise simulation in HSPICE possib
Post by mikki33 on Jun 11th, 2006, 9:17am

HSPICE doesn't have transient noise abilities.
In the past I used PERL script adding noise sourses in parallel (or in series) with the circuit elements. They were PWL gotten from Matlab, per source, of course. It was a nightmare... But worked.

Recently I was told about HSPICE-RF. You have to check what it knows to do.

Title: Re: Is transient noise simulation in HSPICE possib
Post by imtired on Jun 20th, 2006, 12:31pm

Eugene and mikki33, thank you both for your comments.

Because I wanted to be able to repeat this procedure conveniently, I decided to go the Verilog-A route.  It actually works qutie nicely using the $dist_normal( ) function.  However, I noticed that there seems to be a limitation in the precision of the node voltage values.  What I mean is, when the (tiny) nosie signal is in the presence of a real-world voltage, the noise gets truncated.  For example, a noise signal of 137nV/sqrt(Hz) coming from a 1meg resistor will be heavily quantized in the presence of a 1V DC level.  You can quickly see that the noise coming from a 1kOhm resistor has no chance of surviving.  So that's the problem I have at the moment.  But basically the Verilog-A implementation works.  

Title: Re: Is transient noise simulation in HSPICE possib
Post by mikki33 on Jun 27th, 2006, 10:33am

You have to increase the accuracy of your simulation.
Use .option accurate = 1 together with reltol=1e-9 (at most). Try a number of simulations also with reltol of 1e-10, 1e-11 and 1e-12. In this case you will find the trade-off between accuracy and simulation time.

Title: Re: Is transient noise simulation in HSPICE possib
Post by Eugene on Jun 27th, 2006, 10:53am

Also, use $rdist_normal instead of $dist_normal. "dist" gives integers whereas "rdist" gives real numbers.

Title: Re: Is transient noise simulation in HSPICE possib
Post by imtired on Jul 18th, 2006, 2:05pm

I tried the suggestions of increasing the reltol accuracy to 1e-15 even, but that did not help at all.

So then I contacted Synopsis about this problem, and after a week of research, they finally discovered the source of the problem stemmed from using their Avan-waves viewing tool.  According to Synopsis support, this tool is the freebie viewer that comes with every HSPICE license, and was actually a development project back in the 80s, based on single precision, and therefore will never be updated.  Instead I have to purchase a COSMOS scope license which is another $10k.  My manager is not going for that.

Title: Re: Is transient noise simulation in HSPICE possib
Post by Andrew Beckett on Jul 20th, 2006, 1:46pm

Do you have access to spectre? I don't want this to look like a competitive promotion, but the waveform viewer is included with the tool...

spectre has transient noise, and also (if you have the SpectreRF option) has numerous ways of measuring noise for periodic circuits.

Regards,

Andrew.

Title: Re: Is transient noise simulation in HSPICE possib
Post by imtired on Jul 21st, 2006, 3:42pm

Unfortunately I don't have access to Spectre.  We are a small company, and cannot justify spending the amount of money required for such a tool.  Although, it seems that to get everything we need would cost just about the same after adding in the costs for all the different options.  It would be nice if we could though.

Title: Re: Is transient noise simulation in HSPICE possib
Post by Geoffrey_Coram on Jul 24th, 2006, 4:32am

Are the correct values being stored in the .tr0 file, and you just need a new viewer?

There are some 3rd party viewers out there (eg, Sandwork that reads many different formats).

If you're just interested in .tr0 files, you could also develop your own reader / format translator to convert the file to Matlab, or gnuplot, or "nutmeg" (the format for Berkeley spice).  There's an open-source "ngSpice" project at sourceforge that might help.  You probably need double-precision numbers, which has to be enabled with a special option in your hspice netlist.

Title: Re: Is transient noise simulation in HSPICE possib
Post by simon2 on Sep 23rd, 2007, 5:25am

Imtired et al,
                   there is a simpler, more direct way to do transient noise sims: use a pwlfile controlled source in spectre, or a pwl file with a list of time, voltage pairs which may take either random time or voltage values, or random values for both.  I use excel to write these values to a text file for editing in a wordpad for inclusion in the simulation netlist as part of an independent source's pwl definition.

As already mentioned, reltol, vntol etc need to be set correctly to enable the noise contribution to the circuit is above the simulator limits - also, these values can be used constructively to truncate the noise to speed up simulation runs.  For some simulation runs you will find it is more efficient to inject noise using the Thevenin equivalent current as this may make the noise injection to signal ratio smaller, easing the reltol, pivtol etc settings.

In terms of analyzing the results: you can use FFTs to find the PSD but these tend to be processor intensive functions - if you can translate the PSD into an equivalent jitter spec, than you can use eye-diagrams to analyze the data much more efficiently: you can then use "measure" or (a crossing point detector) to build a historgram of the circuits' behaviour.

Even in "noddy-spice" this technique works.  If you don't have an "eye function" you can use:

sweep* (atan(tan(PI(TIME/sweep * delay/sweep - 0.5))))/PI +0.5)

where "TIME" is SPICE's internal time variable, "sweep" is the time across which the waveform repeats, "delay" is the  initial delay  time before the waveform becomes repetitive, and PI is 3.1415926... as usual and for some versions of SPICE will need to be declared as a variable in the .PARAM line.

With a little thought you will find that you don't have to use specialized mixed-mode simulators to do noise analysis in transient sims, simple versions of spice are also capable of doing this.

Cheers,
           SimonH.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.