The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> Ploting expressions in ac analysis
https://designers-guide.org/forum/YaBB.pl?num=1303949867

Message started by sutapanaki on Apr 27th, 2011, 5:17pm

Title: Ploting expressions in ac analysis
Post by sutapanaki on Apr 27th, 2011, 5:17pm

Hi,

I'm trying to figure out how to do the following in cadence.

Let’s say I do an ac analysis. The analysis basically sweeps the frequency and whatever it plots is with respect to frequency (frequency is on the x-axis). I want to create an expression which includes, besides other things also the frequency. Let’s say I want to plot a*f+b where “a” and “b” are just some numbers, “f” is the frequency. Note, I want to plot this thing, not calculate it for a given frequency value. I can’t figure out how to get the frequency from the AC analysis and include it in the expression. Since ac plots are generated versus frequency, it should be accessible somehow, just thinking logically. Can you suggest a way of doing this? Please, note that I would prefer not to do this with ocean or writing veriloga. May be just using the calculator.
The same question stands for transient analysis and including time as a variable in an expression.

Thanks

Title: Re: Ploting expressions in ac analysis
Post by buddypoor on Apr 28th, 2011, 12:43am

I am not familiar with CADENCE - however, I am sure it is possible.
I work with PSpice and there is no problem to plot, for example, the Nyquist diagram which needs the real part of a gain on the horizontal axis. This is accomplished by choosing "x-axis variable" in the plot menu.

Title: Re: Ploting expressions in ac analysis
Post by Geoffrey_Coram on Apr 28th, 2011, 5:28am

You should probably mention which waveform viewer you are using: awd, wavescan, ...

Title: Re: Ploting expressions in ac analysis
Post by sutapanaki on Apr 28th, 2011, 10:52am

Thank you, guys, for the response. I'm using wavescan, which is now called viva. Long time ago, when Pspice was still MicroSim I used to use it and many things were easy to be done with it. There is no x-axis variable in cadence's calculator now. There is xval, which gives you a single x-axis value for some conditions. From ac analysis, spectre saves frequency, real and imaginary parts. What I want is access to the frequency vector, that's all. It should be simple. I talked to cadence support and they said write a skill. But if for plotting a line I have to write a skill, I may as well get the data in matlab and work there. It approximately the same effort.

Title: Re: Ploting expressions in ac analysis
Post by rfidea on Apr 28th, 2011, 12:52pm

I think you can use the function xval(signal). If you use this on any voltage in your circuit it will return the frequency as a vector. So you can make your expression as a*xval(VF("/vout"))+b, assuming you have a signal called "vout" in your circuit.

Title: Re: Ploting expressions in ac analysis
Post by sutapanaki on Apr 28th, 2011, 1:48pm

Great, so simple and it seems doing the right thing. Thanks.

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