The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> spectre: AC freequency analysis
https://designers-guide.org/forum/YaBB.pl?num=1157029736

Message started by kiran123 on Aug 31st, 2006, 6:08am

Title: spectre: AC freequency analysis
Post by kiran123 on Aug 31st, 2006, 6:08am

Hi experts,
     I am new to spectre and interested in doing spectre simulatin by creating spectre decks. I don't know exactly how to do AC analyis for freequency sweep as an example if i want to  simulating a RLC circuit with AC stimulus of freequncy which is being swept from 10Hz to say 1MEG Hz. Could anyone of you help me in this regard of by providing spectre simulation statements required for this requirement.

Advance thanks for your support
Best Regards
Kiran

Title: Re: spectre: AC freequency analysis
Post by Ken Kundert on Aug 31st, 2006, 9:28am

Use "spectre -h ac" for help on how to use the ac analysis. The form of the statement is ...

name ac param=value ...

An example is

computeGain ac start=1_Hz stop=1MHz

This runs an AC analysis from 1Hz to 1MHz and calls it "computeGain". It assumes that there is a source in your circuit with a mag parameter. For example

Vin (in 0) vsource mag=1

-Ken

Title: Re: spectre: AC freequency analysis
Post by kiran123 on Sep 1st, 2006, 12:25am

Hi Ken,
      Thanks for you reply herewith i have pasted contents of  the deck i used for this analysis
when i put below statement to see voltage across vsour and current through R1 i  am seeing constant 0V or 0A through out the entire freequncy sweep

save A R1:currents

please let me know if the wrong is in save statement

my instension of doing this is analysing series resonance circuit with I vs Freq or Z vs Freq

Thanks for your support

Kiran

//****************************
//  Device declaration
//****************************
R1 A   K    resistor   r=10
L2 K   K1   inductor   l=100n
C1 K1  K2   capacitor  c=10u

//****************************
//  AC VSOURCE  declaration
//****************************
vsour (A K2) vsource type=sine  sinedc=1.2 ampl=0.1  freq=1 sinephase=0
vvss (K2  0) vsource dc=0 type=dc

//****************************
//  AC SWEEP
//****************************
//Freq_sweep sweep  param=freq  start=1 stop=10K step=100
AC ac  param = freq start=1 stop=10K step=100

//****************************
//  SAVE RESULTS
//****************************

save A R1:currents

Title: Re: spectre: AC freequency analysis
Post by Ken Kundert on Sep 1st, 2006, 8:52am

The parameters you put on vsour to describe a sine wave only affect transient. To get an AC stimulus, add "mag=1" to the end of vsour.

-Ken

Title: Re: spectre: AC freequency analysis
Post by kiran123 on Sep 3rd, 2006, 9:53pm

Thanks it is working now and i did not see this option anywhere in
spectre -h vsource   or spectre -h ac  am i missing any proper help on this ?

Title: Re: spectre: AC freequency analysis
Post by Ken Kundert on Sep 3rd, 2006, 11:42pm

It is in "spectre -h vsource" under the heading "Small Signal Paramters". Also, this behavior is modeled after SPICE, so if you are familiar with running AC analysis in SPICE, you should have a good understanding of how to do it in Spectre.

-Ken

Title: Re: spectre: AC freequency analysis
Post by kiran123 on Sep 5th, 2006, 4:37am

ken
    could you suggest some doc on spectre simulation with examples, where from can i download spectre related documents

thanks
Kiran

Title: Re: spectre: AC frequency analysis
Post by Ken Kundert on Sep 5th, 2006, 8:04am

I am not aware of anything that is purely introductory. The best places I know for information on Spectre are ...
You might consider a Cadence training class on Spectre.

-Ken

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