Ads Circuit Simulation
Ads Circuit Simulation
STEP 2: Simulate
Netlist is automatically sent to the simulator. Simulation results (data) are written to a dataset.
Layout / Momentum.
Open a schematic
Display opens
Default Dataset
Sim
ula te
Project Directory
First step:
To create a project, click: File > New Project and name it: lab_1
data
networks
filename.dsn
filename. ael (application extension language) filename. atf (compiled ael) mom_dsn (Momentum only) synthesis (used for E-Syn & DSP) verification (used for DRC)
File commands:
View commands:
Spice or IFF
Click + box to expand or box to collapse.
Sets the initial palettes and simulations. For now, use: Analog/RF design.
AEL
Main window preferences are global, they apply to all projects. The Schematic window has its own preferences.
Schematic window...
Schematic window
Save your work often... All icons have labels (balloon help).
A new schematic becomes a .dsn file in the networks directory only after you save it.
Also use Window > Open Designs
Click to wire:
VAR is a declaration (initialization). Component parameters can be assigned a value using a variable equation. Variables can be used with optimization, parameter sweeps, and many ...
Answer: _______
However, some rules apply to both, for example: m = milli, M = Mega, V = volts & variable names are always case sensitive!
By the way, right mouse button has some commands:
Simulate...
S-Parameter DC
NOTE: all palettes have many of the same components (Prm Swp) and specific Meas Eqns.
HB
10
Some simulations, like HB, require more setup. DC requires no setup in most cases. S-param requires Terms. Edit on-screen or double click for dialog box.
Display the parameters: Display tab lists all the settings you can show onscreen.
11
Uncheck this box if desired. NOTE: Dataset files (.ds) are in the DATA directory. Data Displays (.dds) are in the PROJECT directory & read datasets.
12
Data displays open empty the first time, unless you use a template. Also, the default dataset shows here. If you change the dataset, the data changes, but not the format of plots or equations.
13
STEPS: 1) Select the type: plot or list. 2) Select the data or equations. 3) Options - edit data or plot. 4) Save/name the DDS window.
Traces can be edited for color and thickness. Explicit dataset..path if not default.
14
Simulate > Tuning... Tuning allows you to tweak values and see the results!
15
hpeesofde.exe - closes the ADS program (same as exit) Hpeesofsim.exe - stops the simulation hpeesofdds.exe - end to stop the data display server These 2 work together! hpeesofdss.exe - end to stop the dataset server
UNIX users kill processes - PC users end processes
PC task manager NT: ctrl-alt-delete In a UNIX window, use: ps -ef | tail and you can kill (xxx) a processes.
NOTE: Archive files become .ZAP files (like .ZIP files). They can include all networks, data, and display files (entire project).
When you leave this class, archive the projects to C:\temp and then copy the ZAP to the A drive. Be sure to delete the datasets or it will not fit on a floppy disk (not necessary if you e-mail a zap file). For any ADS problems, call support and send the ZAP file. In the United States call: 1 - 800 473-3763.
16
17
Insert a library device & simulation template: Get S-parameters for all swept bias points!
18
Topic 2:
19
20
Write an equation for the parameter. Also, some parameters can be optimized.
For example, you can build an amplifier in circuit, and connect it in a system design. In this class, you will do this!
This is Hierarchy!
21
NOTE: the steps shown here are an OPTIONAL exercise in the last lab exercise in this course.
22
23
24
25
Class Exercise
(after lab 2)
26
If you dont like mouse clicks, HOT KEY your keyboard. Its global for all projects
Try this now: click the F5 key, select the Mixer component, move the cursor and the text will follow!
Follow these steps to set Zoom Area command: 1. Select the command 2. Type in a letter: z (not case sensitive) 3. Click: Assign 4. Click: Apply 5. Now,try the Z hot key to verify it works.
27
S = Simulate > Setup A = Activate D = Deactivate X = Edit > Move > Move & Disconnect and any others you want ...
You will be able to use these hotkeys for all the labs in this project.
28
You can also Read the .prf file into other projects.
Topic 3:
29
DC Simulation You get steady-state DC voltages and currents according to Ohms Law: V= IR
Capacitors = treated as ideal open circuits Inductors = treated as ideal short circuits Topology check: dc path to ground (if not => error message) Kirchoffs Law satisfied: sum of node current = 0 Convergence simulator algorithms (modes) can be set
DC simulation controller
Simulation Controller and Editor (dialog box)
Sweep: allows you to sweep a parameter but it must be defined as a variable. Note the dialog entry automatically puts quotes on the controller (screen) entry.
VAR
30
...more on DC
Back Annotation
No settings necessary!
Immediately after DC simulation, currents and voltages are available. Click: Simulate > Annotate DC Solution.
Simulate > Clear it here
Minus sign used for current flowing out of a connection. Otherwise, current flows into a connection or device. DC Simulation Controller is required in all simulations if you want DC annotation.
31
32
Filters: also, build 1900 MHz BPF for the input and a LPF for the IF output
Later on, test the AMP for TOI, distortion, noise, compression, GSM & CDMA modulation response, and more in labs 3 through 9.
YOUR JOB: Build, test, and refine the circuits to meet specifications.
Model the device with package parasitics Create a sub-circuit to model your components:
Model Card
Port connector numbers: Num= must be set in specific order as shown - this is necessary to use ADS built in transistor symbol.
Insert a device and a model: GummelPoon BJTM1. Bf will be a passed parameter. Vaf is changed as shown.
NOTE: BJTM1 is the model card name that will be used for simulation. Library devices do not require this mapping.
33
Default Symbol
Schematic view
Symbol view
To use a built-in ADS symbol that looks like an NPN BJT use File > Design Parameters. Or, draw your own symbol!
Its easy to use a built-in symbol:
You define the sub-circuit general and specific parameters: Description for library annotation Instance name: Q Symbol: SYM_BJT_NPN Passed parameter for Bf = beta
34
Insert the model in a new schematic Insert the sub-circuit from the library.
NOTE: DC controller sweeps the X-axis and the Parameter Sweep, sweeps the Y-axis.
35
Finally, calculate and test the bias network Calculate resistor values, verify the DC specs for Ib and Ic, and sweep temperature!
Topic 4:
36
AC Simulation
You get linear small-signal response and you get Noise values:
DC analysis performed (unseen) Nonlinear devices are linearized Kirchoffs Law satisfied: sum of node current = 0 Noise contributors defined and listed Budget analysis available (for named nodes) Signal voltages are peak - noise voltages are RMS
AC Simulation Controller
AC is a linear or small signal simulation and freq is usually set in the controller not the source.
37
NOTE: Port Noise can be included in the simulation, but it does not apply to NF. Also, Port noise is turned on/off in the sources.
Sort by name or by value: in the dataset Blank gives you all contributors
Use specific sources for specific simulations Use AC sources for AC simulations!
Source parameter definitions:
V_AC is the component name SRC3 is the instance name (you can change this) Vac = polar (1,0)V is the default) Freq = freq is a global variable - you set the start & stop values in the simulation controller P_AC = is the component name PORT1 is the instance name (OK to change) Num=1 is the port number (use for S-parameters) Pac = polar (dbmtow(0),0) dbmtow is a function you enter the dbm value (*see note) I_AC is the component Iac=polar (1,0) mA is the default Arrow is the direction of current flow. More on AC source settings...
38
VAR:
pre-simulation schematic
Use for initializing sweep variables or other settings. VARs are not available in the dataset unless the OutVar function is used (later labs).
MeasEqn: pre-simulation Use for calculations to be available in the dataset (can use node names and functions).
Eqn: post-simulation Use for calculations in the data display (can include node voltages, functions, and any other dataset data).
data display
39
TIP for copy/paste in the Data Display Keyboard keys: Ctrl C copies to the buffer Keyboard keys: Ctrl V pastes from the buffer
YOU CAN COPY A PLOT FROM ONE DATA DISPLAY WINDOW TO ANOTHER ALSO!
UNIX users probably know this but it works for ADS on the PC also. Try copying a plot or equation now!
40
41
Use ideal DC blockers. Vcc is a node name. Vin and Vout nodes provide data (noise and voltage) for equations. V_AC source voltage = 1 V, cosine wave.
MeasEqn:
NOTE: Freq is a global variable. Here, Freq is controlled by the source. Use freq=freq, freq=10 MHz, or a variable: freq=F_RF.
Simulation results...
Two schematic MeasEqns: One Data Display eqn:
Write the same equation in Data Display as you did in schematic. Then put it in a list.
42
More AC results...
Calculate group delay with an equation using Phase data. Also, control marker readout formats.
Examine the data using the what function and the Variable Info.
43
Set up a variable in the sub-circuit and tune several parameters from the top level.
44
Topic 5:
S11 - Forward Reflection (input match - impedance) S22 - Reverse Reflection (output match - impedance) S21 - Forward Transmission (gain or loss) These are easier to understand and S12 - Reverse Transmission (isolation)
simply plotted.
45
SHORT
Zo (characteristic impedance) = 50 + j0
Z=0+j1
Z = real
/ imaginary
m1
S(1,1) = 0.8/ -65 Z0 * (0.35 - j1.5)
Z=0-j0.5 Z=0-j1
Z=0-j2
46
Sweep plan can also be used (see next slide). Either way, simulation data (S matrix) will be for the specified range and points.
NOTE: Insert the Options controller for a noise simulation = no error message on temperature.
47
48
Various topologies can be used: L, C, R Avoid unwanted oscillations (L-C series/parallel) Yield can be a factor in topology (sensitivity) Use the fewest components (cost + efficient) Sweep or tune component values to see S-parameters Optimization: use to meet S-parameter specs (goals)
In the lab, you will optimize the match for the amplifier.
49
L lel ral a P
Pa ra
lle lC
Se rie
sL
Ser ies R
NOTE: ADS has both continuous and discrete optimization. Yield analysis or a yield optimization is also available.
el R Parall
sC r ie e S
50
Optim controller: set the type, etc. Goal statement: use valid measurement equation or dataset expression. Enable component (opt).
Type of Optimization: In general, we recommend using Random first, then using Gradient. Also, first tune and then optimize.
Simulation controller.
NOTE: See manual for details (minimax function works well for filters).
51
W | m - si |
i i
si is the simulated ith response (example: S21= 9.5dB) mi is the desired response for the ith measurement (example: S21=10dB) Wi is the weighting factor for multiple goals: higher number is greater.
Simulations continue until the maximum iterations is reached or the error function (summation of the residuals) reaches zero (same as 10 dB).
52
Gradient analysis may get stuck in a local minimum (not optimal error function).
Parameter value
NOTE: Random is not totally random. It uses an adaptation that helps it move closer to the goal.
Using both RANDOM and GRADIENT can reach the desired goal - others work similar (genetic, etc.).
Hybrid
Set the step for the RangeVar Edit the component, then click to enable for optimization.
53
PPT is an optimization within a Yield Analysis only. Allows value to be shifted to achieve goal.
54
As an extra exercise:
78% will meet spec Spec is -18 dB S11 from 200 to 400 MHz.
Zoom view: small number of results outside of spec.
55
Note the ADS syntax for Z increasing as freq (global variable in ADS) decreases: if then elseif then elseif then else endif
56
2 different datasets
Plot the data and compare to ac_sim data. Change Term Z and list the S matrix.
57
Click here to change the value in steps. Then press Tune. Use 1 or 0 Set min and max ranges and step size.
58
59
60
Topic 6:
Using E-Syn
What does E-Syn do? It makes it easy to create FILTERS and Matching Networks.
E-Syn user interface is a little different than the ADS interface. Also, you could use a Filter Design Guide instead of E-Syn. This may appear in future releases of ADS!
You specify the TYPE of design, the RESPONSE, and the BAND. SYNTHESIZE the design and you get a selection of topologies and values. ANALYZE the design and plot the response in the ADS data display. Optimize if desired.
61
Using Momentum
Why use Momentum? You have no accurate model for a passive layout. You want to know the coupling effects between structures. You want to optimize the layout real-estate, performance, etc. Your other structure simulator takes too long to simulate! You want to use the results in ADS simulations.
Example spiral meshed as a strip geometry. Hole in ground plane is meshed as a slot, which is more efficient than meshing the entire ground plane.
Transient simulation
Analysis performed in the Time Domain Use any Source Solutions use Newton_Raphson iterations You get Amplitude vs. Time Time Domain data can be transformed: FS
NOTE on Convolution: Frequency domain models (microstrip) can be brought into the time domain and converted to the time domain then convolved with the time-domain input signal to obtain the time-domain output signal. The convolution tab in the transient simulator allows you to define methods and settings.
62
Ignored if no TLs
Sample @ 2 x BW
To sample the fundamental (1900 MHz) plus harmonics, you must calculate @ 2 x (rate of highest harmonic desired). 1 / (2 x 15 x 1900MHz) = 17.54 picoseconds.
63
Start Time
Stop Time
NOTE: Transient analysis can be tricky. Sampling before a circuit reaches steady state will not give correct results when transformed into the frequency domain. Also, you must use a time step that is a multiple of the frequencies of interest or the results will not be correct.
NOTE: iVar1 always = 1 (index at first column). However, iVal1 always starts at 0 (same as ADS data).
The file must be in the DATA directory and must be in correct format. The circuit simulation manual has information on file formats such as DSCR..
64
Save values = no. Only the MeasEqn is sent to the dataset with the final iVal1 which is 0 = 56 ohms which gives the least reflection. Also, click Simulate > Update Optimization Values to update the iVal in the DAC.
After the class, you can use this slide as a reference if you need it! Find mismatches in time / distance
DUT
65
After the class, you can use this slide as a reference if you need it!
LineCalc is still available! Define the substrate Enter L & W to get electrical Enter electrical to get L & W
ALSO - New add-on for ADS 1.5: MODEL COMPOSER. Generate your own passive library models (parameterized) for simulation. You get circuit simulation speed with EM simulation accuracy (Momentum) for microstrip components - more types in the future!
66
67
At first, window will be blank. Therefore, click the Synthesize button to calculate topology & component values as shown here.
Step 4: Go back to E-Syn main menu and click the Synthesis icon:
68
69
70
71
Topic 7:
Harmonic Balance
72
Start
Linear Components
Measure Linear Circuit Currents in the Frequency-Domain
Nonlinear Components
Measure Nonlinear Circuit Voltages in the Frequency-Domain
Inverse Fourier Transform: Nonlinear Voltage Now in the Time Domain Calculate Nonlinear Currents Fourier Transform: Nonlinear Currents Now back in the Frequency Domain
Test: Error > Tolerance: if yes, modify & recalculate if no, then
IR
IC
IL
ID
IY-port
(Momentum file)
IR
IC
IL
ID
IY
If within tolerance
IR
IC
IL
ID
IY
then
V Final Solution
NOTE: Try building the circuit, simulate, and write an equation to sum the currents. The IY-port could be S-parameter data from Momentum or other NWA data.
73
Freq[1] is the fundamental tone you want HB to calculate. Freq[1] must match a tone in the circuit or you get a warning message. Numerous builtin sources and measurement equations.
3) Be sure the VAR, the source, and simulation controller all have the same information. NOTE: Swept variables always go to the dataset.
74
Osc
Use with Oscport
ADS 1.5: Save (final solution) and re-use (initial guess). HB binary data file.
75
Other settings: for status info, noise, and Krylov simulator (used in lab).
LO_pwr goes to the dataset automatically.
To get any other VAR to the dataset (RF_pwr) requires using this syntax: OutVar =variable name
data
76
Arguments in parentheses ( ) and curly braces {generate the matrix }, required for Mix table.
8th order term uses +5th & -3th, but not: -3th & +5th (+5th of RF does not exist).
QUIZ: Can you use this equation dBm(Vout[1]) for this data? Is it valid? Answer: YES - if no other dependencies exist - its the same as: dBm(mix(Vout,{-1,1}))
NOISE TEMP error for all noise simulations: Set Temp=16.85 to eliminate any error message. OPTIONS controller is in all simulation palettes.
Simulator will try to find closest answer, if not it will continue with all remaining valid points.
HB convergence error message: cannot sweep to desired level or arc length continuation error To solve these problems, either loosen the V and I tolerances in the options controller by ten times (for example, set: I_AbsTol= e-11), or reduce the step size for power or frequency sweeps.
77
Parentheses, Brackets, Curly braces: (parentheses for function arguments) [brackets for one, two, or three dimensional data]: {curly braces for vectors and the mix function}:
Examples: dBm(Vout [1]) Double colon is a wildcard in ADS:
78
Spectrum
Equation uses Vout[1] Dataset values Dataset contains node voltages and Mix table
79
Data display equations calculate power using voltage Vin and current I_in.
NOTE for Oscillator testing: Use OscTest to determine if oscillation exists (S-param). Use OscPort to determine the frequency of oscillation (HB). See examples!
NOTE: 0.5 is for 1/2 peak value and +30 give dBm (ref to 0.001 W)
Z_in is calculated at 1900 MHz which is index value [1]. Also, Z_in is used in dBm argument instead of default of 50.
data
80
Plot_vs(dB_gain,hb_comp..dbm_out)
Freq[1]
RF2 - SPACING RF2 + SPACING
Freq[2]
[-1, 2] [0, 1] [1, 0] [2, -1]
Mix table
Mixer is 3 tones IF
[-1, 1, -2]
81
Use [ brackets to generate a matrix ] and { curly braces to vector the data from Mix table}
TOI
0
-20
m
--30 -40
ix
mix {2, 1}
-10
} ,0 {1
- 30
-20
-10
10
20
82
83
Topic 8:
84
Adjacent Channel Power Ratio Noise Power Ratio Error Vector Magnitude Power Added Efficiency Bit Error Rate
2-tone tests and linearized models do not predict this behavior as easily!
890 MHz
carrier
Vout
V(t) * e j2 fot
t3
Modulation
t2
t1
t4
85
more on CE Technology
Captures time and frequency impairments:
ONE TONE
mag of Vin [1]: envelope ts of Vout: signal mag of Vout [1]: envelope
...where [1] is the carrier Freq[1].
86
Time step
more
Modulation BW
t0 t1 t2 t3 t4
tim e
87
88
Look at the bit stream: bits_out node and Vout. After simulating the response of the amplifier, insert a filter at Vin to alter the phase response.
Plot the GSM BW spectrum with windowing.
89
90
Topic 9:
Co-simulation: simulation of the entire system using digital circuits and analog circuits together.
Constellation, spectrum, etc... A little on co-simulation before starting the lab...
91
What is a co-simulation?
It is your amp_1900 and filters in the receiver system at the bottom level. On the top level is a Data Flow simulation. Co-simulation is digital & RF/analog circuits simulating together.
This is your rf_system with amp_1900.
What is Ptolemy ?
Agilent Ptolemy is a Timed Synchronous Data Flow Simulator
TSDF is a unique Agilent EEsof Innovation Agilent Ptolemy adds timed elements - parameters on signals are t, I, Q, Fc (rf carrier) Benefits: - easy to add real RF effects on signals - more efficient simulations - more accurate modeling of RF effects
Agilent Ptolemy is the data flow simulator used in the DSP schematic window...
92
Tokens (like current or numbers) Token NODE (or component) arc (like a wire) NODE (or component)
Tokens can also be time stamped - then they become samples. Now you can simulate time and frequency domain impairments such as multi-path and fading ...
What is Co-simulation?
Integrated Circuit, System Simulation & HP Ptolemy
The simulator in the A/RF design must use either Transient or Circuit Envelope
The A/RF schematic can be any kind of design: amplifier, mixer, PLL, etc...
93
The use of these tools is covered in the DSP course and also in part of the CommSys course. In this class, it is only briefly introduced!
94
95
data
96
Vfund = IF_out
Simply change the eqn name to Vfund=IF_out and all the data fills in the plots and equations values!
m1 is at the IF
NOTE: If you finish this step in the lab, you have achieved all the goals for this class!
97
In this class, it is easier and faster to set up and run co-simulation using the behavioral system. The Extra exercise shows even more cosimulations you can try after the course!
Co-simulation continued...
Next step: Open a top level DSP network so that the Ptolemy / DSP palettes become available in schematic. Then build the system shown here: All the steps are in the lab, including the settings for the data components, filters, etc. The t_step and t_stop are now set for symbol rate and time.
Data flow controller runs showing filtered bits and IF signal: TkXY plots
98
Quit the DF simulation and connect a SpectrumAnalyzer sink to collect the data. Results of this co-simulation show spectrum of the behavioral system. To use amp_1900 and your filters, replace them in the system and setup a new simulation (requires more time).
By the way...RF Board and RFIC Design Flow Integration Solutions from Agilent EEsof EDA
Software and Services available to integrate ADS into existing design flow based on:
Schematic transfer via IFF Layout transfer via IFF Schematic sharing via Dynamic Link
For more info, contact your Agilent EEsof Sales Representative, or visit:
99
Look for us on the WWW for more ADS training and applications.
Goodbye and see you next time! www.agilent.com Agilent EEsof EDA - Customer Education
100