TSEK38 2019 LaboratoryExercise PDF
TSEK38 2019 LaboratoryExercise PDF
TSEK38 2019 LaboratoryExercise PDF
1(86)
You can work on your own with this lab or use the schedules lab session to get
support from a lab assistant.
Please document all answers to the exercises in the text (screen dumps,
etc.). It will be used to verify PASS on this lab with the examiner.
LINKÖPING UNIVERSITY
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY)
TED JOHANSSON
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 2(86)
Contents
Introduction ................................................................................................................. 4
1.1 What is ADS?.................................................................................................. 4
1.2 Objective of the laboratory exercise .............................................................. 4
6 Envelope Simulation........................................................................................... 40
6.1 EDGE Signal Analysis .................................................................................. 40
6.1.1 Simulation setup ................................................................................... 42
6.1.2 Trajectory diagram and spectral components ...................................... 44
6.2 Noise and Noise Figure simulation using Envelope Analysis ..................... 47
Introduction
1.1 What is ADS?
Keysight Advanced Design System (ADS) is a powerful electronic design automation
software system for high-frequency design. It supports the design of systems and RF
designs for applications such as RF/microwave modules, integrated MMICs for
communications, and aerospace/defense applications. The software supports
several different types of simulation technologies such as circuit frequency- and
time-domain simulations, and electromagnetic field simulations, including
optimization capabilities.
Usually, ADS is run in the Linux environment, which also enable integration with
Cadence IC design system, but ADS (virtually identical) can also be installed and
run in Windows (no Cadence integration) using the same software licenses and
simulation files. In this lab, we will use the ADS for Linux.
At the beginning of the lab, the instructions are very detailed, but when one step is
completed and well understood, it can be easily used in subsequent simulations.
The laboratory exercises are useful both as an introduction to ADS and also as basis
for the project work in the course.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 5(86)
Open a terminal window and establish an ssh connection to the ixtab server through
the command: “ssh -X ixtab.edu.isy.liu.se”, then input your credentials.
Write the following two commands to load the module and start running ADS
(Keysight is known previously both as "Agilent" and "HP", therefore the module
path "agilent"):
A first window may pop up, asking to choose the simulation software license. Select
the first alternative, the ADS Inclusive.
A new window, “Get Started” pops up. The first time, you may get a question to
choose the design flow. Click on RF/Microwave and then click on Finish.
A new window pops-up, click on Next. Then, write the name of the workspace, typically
‘Lab_TSEK38_wrk’, and its location (use you own directory ("Create in") of choice) as
in Figure 2. Click on ‘Finish’ to create the workspace.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 7(86)
The Envelope (‘Envelope’) controller is best suited for a fast and complete analysis
of circuits with complex signals such as digitally-modulated RF signals. It combines
features of time and frequency-domain representation by permitting input
waveforms to be represented in the frequency domain as RF carriers with
modulation envelopes that are represented in the time domain. The Circuit
Envelope Simulation is highly efficient in analyzing circuits with modulated signals,
because the transient simulation takes place only around the carrier and its
harmonics. In addition, its calculations are not made where the spectrum is empty.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 11(86)
Add two DC-blockers (decoupling caps) by typing ‘DC_Block’ in the ‘Search all
libraries’ and then click/drag the search result. Add the DC_Block at the input and
output of the amplifier as in Figure 5.
Add the simulation control boxes for S-parameters, Envelope simulation, and
Harmonic Balance to the schematic. The controllers can be found in the ‘Parts
search drop-down list under ‘Simulation-S_Param’, ‘Simulation-Envelope’, and
‘Simulation-HB’.
Add an input port ‘P_1Tone’ to the schematic from category ‘Sources-Freq domain’,
where you also can find several different types of sources. At the output of the
amplifier you should place a termination port, ‘Term’, found in ‘Simulation-HB’ and
‘Simulation-S_Param’.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 12(86)
Add ground connections, which are available next to the ‘Part’ drop-down list. For
the Envelope and Harmonic Balance control boxes, and ‘P_1Tone’ source, change
the following variables by double-clicking the symbol:
The value ‘Pin’ denotes the input power in dBm. For the ‘P_1Tone’ source, change
the following variable:
P=polar(dbmtow(0),0) P=polar(dbmtow(Pin),0)
Connect all components by using wires. Click on the ‘wire’, , in the menu or use
Crtl+w to connect all components as shown in Figure 6. Double-click on the wire at
the termination port and name it ‘vload’.
Add a variable box, , to the schematic as shown in Figure 6. The ‘Var’ box
contains variables that can be used in the simulation. It is convenient to use a ‘Var’
box since several different components can be updated by just changing one value
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 13(86)
Name Value
RFfreq 1.0
nOrder 7
Pin 0
S21=dbpolar(0,0)
S11=polar(0,0)
S22=polar(0,180)
S12=0
(1)
y ( x) = a1 x + a 2 x 2 + a 3 x 3
(2)
y ( x) = a1 x + a 3 x 3 + a 5 x 5 ...
There are several combinations of gain-limiting variables that can be used to make
the model behave like a real amplifier. However, not all of them work well together
in the simulator. For more information please refer to the Help for the Amp2.
Figure 8. Amplifier model with IIP3 » 10.6 dBm and P1dB » 1 dBm.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 16(86)
To run the simulation, press the simulation button, , in the menu. A small
simulation window will pop-up and tell the user about the status of the simulation.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 17(86)
Figure 10. Simulation status. You may get as in window below with a warning
message about “no DC path to ground”.
If the simulation is successfully completed, a ‘Data display window’ (DDW) with the
same name as the design will pop-up, in this case ‘Lab_HB’.
In ADS there are three types of files related to an actual design. They are:
• Design file (.dsn): schematic (and layout) for each design in the networks
folder.
• Data display window (.dds): the window where the simulation results can be
displayed. This file is saved in the project directory.
• Data set (.ds): the simulation results are saved in the ‘data’ folder in the
project directory and are created/updated when a simulation is completed.
The DDW is initially empty and can be filled with any operation on the simulation
data.
To verify that the amplifier gives a gain of 0 dB (1 in linear scale), we simply plot the
harmonic contents of the node ‘vload’. In the list of different display options (see
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 18(86)
Figure 11) we choose the regular plot function, . Click on the symbol and place
it in the empty white space.
Click on the ‘vload’ in the ‘Available data’ column, then click on the ‘Add’ button. A
radio dialog window is opened.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 20(86)
Choose ‘Spectrum in dBm’ and then ‘OK’. Now, the power of the fundamental and
harmonics dissipated in the load will be plotted. Note: ‘dBm’ assumes that the
power is measured for a 50 Ohm load. The resulting plot is in Figure 14.
As seen in Figure 14, the plot only contains data at the fundamental and harmonic
components (see description of the harmonic balance simulation). In the drop-
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 21(86)
down list (marked in red in Figure 14) you can choose which dataset to plot in the
case of several simulation results, but for only one data display window. Put a
marker on the fundamental tone, at 1 GHz, and verify that the power is 0 dBm. Note
that also very small harmonics may be present (< -300 dBm), but they are only
there due to limited accuracy of the computations.
Name Value
GainComp 1.0 dB
GainCompPower 3
TOI 15
GainCompSat - (Delete value)
It means that at the output power level of 3 dBm, the gain is compressed by 1 dB.
dBm(vload[1])-dBm(vload[3])
dBm(vload[1])-dBm(vload[5])
Then the difference in power between the fundamental, third, and fifth harmonic
can be measured, and is denoted as ‘dBc’.
A convenient way to measure power, signal levels, and gains during a simulation is
to specify ‘Simulation Measurement Equations’. To add such equations, go the
schematic and enter ‘MeasEqn’ in the ‘Part’ drop-down list as previously described
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 22(86)
When running the simulation these equations will be accessible in the ‘Available
data’ box as in Figure 12. Re-run the simulation and add a new plot with the ‘Gain’
to see the gain for the fundamental component (change the y scale). Now the DDW
should look like Figure 16.
As you may already have concluded, this simulation only shows the data for one
specific input power level and cannot tell what the compression or TOI are. Go back
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 23(86)
to the schematic and double-click on the ‘Harmonic Balance’ control box, and go to
the ‘Sweep’ tab.
In order to sweep a parameter, you type the name of the parameter in the
‘Parameter to sweep’ box. You also need to specify the start, stop, and step values in
the parameter sweep. A typical setup is shown in Figure 17. Run the simulation.
In the first plot you can see that all harmonics are plotted on top of each other, but
in the other plots the fundamental component, third component, fifth component,
‘dBc’, and ‘Gain’ are plotted for each input power level.
Note that this is power gain, which means that a gain of 0 dB (1 in the
linear scale).
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 24(86)
For clarity you can change the y-axis for the harmonic components, or you can add
marker to the plots as in the picture below. The markers are found in the ‘Marker’
menu in the DDW. Go the ‘Marker’ menu, choose ‘New…’ and click on the desired
curve to place a marker.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 25(86)
Exercise 4.2b: Adjust the y-axes scale for fundamental component. Add
a new marker to the plot. What is the output power for input power
levels of -40, 4, and 30 dBm? Can you find the 1 dB compression point?
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 26(86)
Replace the ‘P_1Tone’ source with a ‘P_nTone’, available in the category ‘Source-
Freq Domain’. Set its ‘Num’ parameter to 1. The two tones should be very closely
spaced relative to the operating frequency. In this example, the spacing can be
defined by ’fspacing’, and set to 100 MHz centered around 1 GHz. For the ‘P_nTone’
source, change the following variables:
The value ‘Pin’ denotes the input power in dBm and should be set to a low value of
typically -30 in order not to push the amplifier into compression. Double-click on
the source and click on ‘Freq[1]’ and ‘Add’. Similarly, click on ‘P[1]’ and ‘Add’.
Another ‘Freq’ and ‘P’ components are added and labeled ‘Freq[2]’ and ‘P[2]’, and
change the component values to:
Var Value
fspacing 0.1
Also set Pin to -30. In order to capture the intermodulation products in the
simulation, we need to change the harmonic balance setup. Double-click on the
‘Harmonic Balance’ controller and click on the first listed frequency entry and set
the ‘Frequency’ to ‘RFfreq+fspacing/2 GHz’ with the ‘Order’ set to ‘nOrder’. Click
‘Add’ and change the setting of the second frequency entry to ‘RFfreq-fspacing/2
GHz’ with the ‘Order’ set to ‘nOrder’. See Figure 22. On the ‘Sweep’ tab, delete ‘Pin’
as ‘Parameter to sweep’. Close the ‘Harmonic Balance’ controller.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 27(86)
To see the ADS calculation capabilities, add two equations. The first equation
computes the TOI from the markers. The second equation is based on the IP3 built-
in function in ADS and refers to the fundamental and intermodulation tones.
Press the equation button, , in ‘Palette’ list in the DDW, and enter the
TOI_spectral=m1+(m1-m2)/2
TOI_builtin=ip3_out(vload,{1,0},{2,-1},50,Mix)
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 29(86)
Add a new list, , and add the two following expressions to be printed (select
TOI_spectral[0]
TOI_builtin[0]
Exercise 4.3.1: If the simulation has been performed correctly, the IP3
is equal to TOI specified for the amplifier. Verify! Also verify that the
first equation is equal to the well-known formula for IIP3 since the
gain is 0 dB.
Exercise 4.3.2: If the simulation has been performed correctly, the IIP2
is equal to SOI specified for the amplifier. Verify!
5 S-parameter Simulation
This section requires basic knowledge about S-parameters, see [1], p. 71.
In the previous simulation we have assumed that there is a perfect match between
the output port and input port of the following block. In the S-parameter simulation
we will adjust the input and output impedances of the amplifier to create some
mismatch, and then create matching networks in order to correct this mismatch and
achieve good amplification.
Save the original schematic ‘Lab_HB’ as a new design, typically ‘Lab_SP’. Click
on the HB control box and disable it by clicking the ‘disable’ button, , in the
toolbar. Then click on the SP control box and enable this control by clicking on the
‘disable’ button. Consequently, the disable button can be used for both disabling
and enabling components, not only control boxes but also e.g. resistors and signal
sources.
Add five variables to a ‘Var’ box (we intentionally introduce impedance mismatch
knowing that Zs = 50 Ohm):
Name Value
Zin 100
Zout 25
fStart 0.1
fStop 1.9
fStep 0.025
Name Value
Z1 Zin
Z2 Zout
By setting these impedance parameters it means that the amplifier will relate its S-
parameters to these impedance values.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 31(86)
a) b)
Figure 25. S-parameters control box, a) default values, b) modifications used for
simulations
Use ‘P_1Tone’ as the driving source with the same settings as in chapter 3.
The warning message relates to the measurement equations defined previously and
is based on the HB simulation, but since the HB simulation is deactivated the
expressions are not valid and a warning message is displayed. For the S-parameter
simulation there is no need to change anything, but the message will disappear if
the ‘MeasEqn’ box is disabled.
The port numbers 1 and 2 in the S-parameter simulation data relate to the input
port number, ‘Num=1’, and the output termination number, ‘Num=2’. Click on
‘S(1,1)’ and then on the buttons ‘>>Add>>’. In the radio button windows that pops-
up, select to plot the data in ‘dB’ (NOT dBm) and then click ‘OK’. Plot ‘S(2,1)’ in a
similar way, either in the same plot or using new plots ( ). If the data is plotted
correctly you should now have the following data plots:
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 33(86)
Observe that the result of S11 can be verified using the well-known formula:
S11 = (Zin -Zs)/(Zin+Zs) = (100-50)/(100+50) = 1/3 and 20log(1/3) = -9.6 dB.
Similarly, S22 = (Zout -ZL)/(Zout+ZL) = -1/3.
As seen in Figure 28, ‘S(1,1)’ and ‘S(2,2)’ are not perfectly matched since they are
only -9.5 dB. Also ‘S(2,1)’ is only -1.02 dB which means that the gain of the amplifier
is lower than when the amplifier was perfectly matched as in the HB simulation.
We can also see that the behavior of the amplifier is independent of frequency which
stems from the fact that we don’t have any frequency-dependent matching
components, e.g. inductors and capacitors.
For a general LC-matching network as in Figure 29, the impedance seen at the input
port, ‘Num=1’, should be equal to ‘Zin’. In this setup at the resonance frequency w0
the load impedance, ‘Zout’, is transformed to a lower value equal to Zout/Q2 where
Q = w0 Cmatch Zout and w0 = (LC)-1/2. Using this matching network, the input
impedance of the amplifier (100 Ohm) should be transformed to 50 Ohm of the
source (input port). Similarly, the load impedance (50 Ohm) should be transformed
to the output impedance of the amplifier, which is 25 Ohm.
When you have filled in the component values, run the simulation. The following S-
parameter plots appear. Add markers to the plots and put the marker at 1 GHz.
The values at the markers may differ depending on the number of decimals and
frequency step used, but we can conclude that the amplifier is matched at the input
and output and therefore the gain is also 0 dB. Instead of calculating the component
values in the matching networks by hand, you can also let the software optimize the
values. However, first we will run another simulation mode.
In the top middle of the plot window, there is a scroll-down box. Here you select the
data set you want to plot. Switch to ‘Lab_SP’ to show the data from this simulation.
Exercise 5.4: Sweep the input power like in section 4.2. (Figure 17). Plot
gain at the fundamental component (1 GHz) and power of the
harmonics. Compare with previous results and explain the difference.
Go back to the ‘Lab_SP’ schematic window. Disable the HB control box and once
again, enable the SP control box.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 38(86)
Note that the exact numbers and simulated performance (as shown below) may
differ, due to software versions and other number of iterations in the optimization
process have been chosen in the simulation. If you want to fit the data in the
window, click in the specific, and then click on the data fit button . If you are not
satisfied with the scale on the x and y axis, double-click on the window and go to the
’Plot options’ tab. Here you can manually set the scales.
It is interesting the follow the optimization. Set MaxIters to e.g. 1000 and the
Optimization Type to Random MiniMax. Then observe the ‘Optimization Cockpit’
window where you can follow and control the optimization process.
6 Envelope Simulation
6.1 EDGE Signal Analysis
As already described, Envelope Simulation can be used for analyzing digitally
modulated RF signals and perform a combination of time and frequency
representation of the signal. Briefly, this simulator permits input waveforms to be
represented in the frequency domain as RF carriers, with modulation "envelopes"
that are represented in the time domain as shown in Figure 38.
The bandlimited signal within each spectrum can contain periodic, transient, or
random tones. The actual time-domain waveform is represented as a sum of
carriers (with harmonics and intermodulation products), where each envelope
can vary with time,
where v(t) is a voltage at any node in the circuit, including the input. The Fourier
coefficients, Vk(t), are allowed to vary with time and may represent an arbitrary
modulation of each carrier. Since each time-varying spectrum Vk(t) can be
thought of as a modulation waveform with a center frequency fk, these are often
referred to as "envelopes." This spectrum may represent transient signals with
continuous spectra, such as a digital modulation envelope over an RF carrier, or
periodic signals with discrete spectral lines, such as the two RF tones required
for intermodulation distortion analysis.
In this part of the lab, we will use an EDGE signal generator (GSM with amplitude
and phase modulation, also known as 2.5G mobile communication) and feed it into
the amplifier. The data file of the generator contains 1 TDMA frame (120/26 msec)
of EDGE data (1250 symbols at 48/13 usec per symbol). One EDGE frame contains
8 time slots with each time slot containing 156.25 symbols. The EDGE frame
generated by this source contains data (normal burst with 8PSK modulation) in the
second time slot, all other seven time slots are idle (no signal). This frame
represents one active user in the EDGE uplink. Due to the modulation of EDGE
signals, we have both amplitude and phase modulation of the RF signals, and a
peak-to-average-power ratio (PAPR) of approximately 3.5 dB. We will examine
what happens to the frequency spectrum and how the trajectory diagram (related to
I and Q) signals look like after passing through the amplifier.
Name Value
Freq RFfreq GHz
Power dbmtow(Pin)
Disable the previously used signal generator and connect the EDGE signal generator
to the DC-blocker at the input matching network.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 43(86)
Name Value
numSymbols 256
sam_per_sym 8
tstep 1/(sym_rate*sam_per_sym)
tstop numSymbols/sym_rate
sym_rate 270.8333 kHz
Disable the SP, HB, Goals, Optim control boxes, and enable the ENV control box.
Add a new variable to a ‘MeasEqn’ box and name it ‘VloadFund’ and set it to
‘vload[1]’.
Name Value
Freq[1] RFfreq GHz
Order[1] nOrder
Stop 2*tstop0
Step tstep
Run the simulation to open a new DDW for an input power, ‘Pin’, of -10. As for all
other simulation modes examined before, the DDW is empty.
Click on the equation button in the palette in Figure 11 and place the equation
in the DDW. Equation boxes can be used to compute any combination of simulation
data, and in our case, we would like to normalize the constellation diagram of the
received EDGE signal. Enter the equation in the equation field, as in Figure 41:
Vn = VloadFund/abs(max(VloadFund)).
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 44(86)
To plot the trajectory diagram of the received signal, which can be related to I (real)
and Q (imaginary/phase) components, we click on the plot button, . Type the
expression plot_vs(imag(Vn),real(Vn)) in the blank space “Enter any
equation” as in Figure 42 and then click Add >>.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 45(86)
Figure 43. Trajectory diagram and spectral contents of the amplifier for an input
power of -10 dBm
Adjust the input power to 10 dBm. Run the simulation again. The resulting plots can
be seen below.
Figure 44. Trajectory diagram and spectral contents of the amplifier for an input
power of +10 dBm
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 47(86)
Since we are running an envelope simulation, the noise is limited to the envelope
bandwidth as 1/(tstep). To set the temperature to the desired level, an ‘Options’
controller is needed. Write ‘Options’ in the ‘Part’ drop-down list and place the
controller in the schematic. Set ‘Temp’ and ‘Tnom’ to 25.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 48(86)
Run the simulation with the specific parameter sweep. Two simulations will be
performed, one simulation with the input power set to -300 dBm (with index 0),
and one simulation with -50 dBm (index 1). After the simulation, a new empty data
display window pops up.
In a similar way as before, we also need to fill the data display with some useful
handling controllers, such as equations and plots. Initially, in DDW add three
equations with the following expressions:
The equations bring out the envelope bandwidth from the simulation, which is
needed to be able to compute the noise power levels at the input and output
correctly and make the computation independent on the time step used in the
simulation.
To compute SNR and NF of the circuit, we start by considering the input. Add the
following equations to compute the signal power at the input:
To compute the noise level at the input as power per Hz and the SNR, add the
following equations:
SNRin_dB=10*log(SignalInW)-NoiseInW_per_Hz_dBm
Alternatively,
SNRin_dB=10*log(SignalInW/NoiseInW)
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 49(86)
Add the same equations for the output by replacing ”In” by ”Out” and
”VsourceFund” by ”VloadFund”. Then the Noise Figure (NF) can be computed as
the difference in SNR at the input and output.
NF=SNRin_dB-SNRout_dB
Add the following expressions to a list box, , to compute the input power in
dBm, the output in dBm, and the noise power in dBm per Hz at the input and
output.
10*log(SignalInW/1e-3)
10*log(SignalOutW/1e-3)
NoiseInW_per_Hz_dBm
NoiseOutW_per_Hz_dBm
If everything is set up correctly, the noise power is about -174 dBm/Hz at the input,
which is the reference noise spectral density, also calculated as:
Plot the spectrum at the input and outputs in two rectangular plots by plotting the
following expressions:
dBm(fs(VsourceFund))
dBm(fs(VloadFund))
Note that both simulations are then plotted on top of each other and if the
‘ParamSweep’ controller box is disabled, only the equations without the indexes are
valid. If all equations and spectrum plots are plotted as described, the data display
window should now have the contents as shown in Figure 45.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 50(86)
Exercise 6.2: What can be concluded about signal power levels relative
the noise power at the input and output ports (look at SNR and NF)?
Note that if the channel bandwidth is larger than 1 Hz (most likely), the
noise power has to be integrated over the that bandwidth.
Compare the noise floor in the plots with the signal spectrum plotted in
dBm for the input and output signals. Play around with the ‘NFuser’
variable and simulate.
Input Output
Signal power:
SNR in / out:
NF dB:
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 52(86)
7 Simulation of Mixer
7.1 Mixer model
Like the amplifier used previously, also the mixer has certain properties controlling
its behavior, as shown in Figure 46. The linear behavior of Mixer2 is described by
the conversion gain ‘ConvGain’, the reverse conversion gain ‘RevConvGain’, and the
nine reflection/leakage/isolation parameters (S-parameters) SPij (i,j=1,2,3). The
‘ConvGain’ parameter is the conversion gain from RF to IF. It is applied to the lower
sideband |RF-LO| and the upper sideband RF+LO. The SPij (i,j=1,2,3) parameters
describe the port reflection and port-to-port leakage/isolation for the mixer. Mixer2
is a three-port device and in line with established theory for generalized S-
parameters, we denote the voltages and currents at port n by vn and in and define
the input and output waves at each port as:
(
a n = (v n + Z n in ) 2 Z n )
bn = (vn + Z i ) (2
n n Zn )
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 53(86)
with Zn being the reference impedance for port n. See the Help for more
information. Amplifier2 applies compression from its input to its output. In an
analogous manner, Mixer2 applies compression from RF to IF in the same way. In
addition, Mixer2 also applies the same compression from RF to LO.
Under typical operating conditions, the mixer LO port is saturated. This means that
the RF to IF mixing process is insensitive to amplitude fluctuations of the LO signal.
A small fluctuation in LO power will not change the RF to IF mixing. In another
perspective, a mixer is more of a switch than a voltage multiplier. To mimic this
behavior for Mixer2, the LO is limited.
Name Value
Freq RFfreq GHz
P polar(dbmtow(Pin),0)
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 54(86)
At the second port of the mixer, attach a ‘P_nHarm’ part. Set the following
parameters:
Name Value
Freq LOfreq GHz
P[1] polar(dbmtow(P_LO),0)
Two new variables are introduced, ‘LOfreq’ and ‘P_LO’. Add these variables to the
variable box and set them to 1.0 and 0.
Disable the ‘Envelope’, ‘S-Parameters’, and ‘Parameter Sweep’ controller boxes.
Enable the HB controller box and double-click on the controller and go to the ‘Freq’
tab. In the ‘Frequency’ field, write ‘LOfreq’, press Add, and now both ‘LOfreq’ and
‘RFfreq’ should be visible in the frequency list. Set ‘Maximum mixing order’ to
‘nOrder’. Disable any sweep specified in the ‘Sweep’ tab.
After the mixer, label the wire ‘VifMixer’, and the wire between the LO and the
mixer, ‘VMixer’.
Set ‘RFfreq’ to 2.0, and ‘Pin’ to -50. It means that the IF frequency becomes 1 GHz,
which is not a very realistic choice of IF frequency in real applications, however
since our matching networks are tuned to 1 GHz, it is for demonstration purposes a
convenient choice.
Exercise 7.2: Run the simulation and plot the mixing terms for
‘vsource’, ‘VMixer’, and ‘VifMixer’. The generated frequencies can be
plotted according to ‘dBm(NETNAME[::])’, where NETNAME is either
‘VifMixer’, ‘vsource’ or ‘VMixer’. Write down the power level of the
signal and image of the IF signal (‘VifMixer’).
Disable the termination port after the mixer and enable the disabled
matching network components. Run the simulation again. What is the
signal strength of the signal and the image the output port? Can you
explain the differences in power strength between the signal and the
image?
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 55(86)
Name Value
ConvGain dbpolar(5,0)
GainComp 1
GainCompPower 0
TOI 11
GainCompSat - (Delete value)
DetBW 1e5
PminLO - //This is P_LO value at which ConvGain is
reached that is useful to model e.g.
self-mixing when a signal leaking to LO
port can take effect, but for now it can
be deleted.
In the mixer a new variable is introduced: conversion gain. In a mixer, two different
kinds of conversion gain can be identified [1]. The gain used in ADS relates the
amplitude of the signal at the RF carrier frequency to the amplitude of the
downconverted signal at the IF frequency. The gain compression is defined slightly
different compared to the amplifier. Here, it means that the gain is compressed by 1
dB at the output power level of 0 dBm corresponding to -4 dBm at the input. We
have also adjusted the detector bandwidth to 100 MHz (see Help for further
details).
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 56(86)
Exercise 7.2.1a: Re-run the simulation of the mixer and verify that the
power of the downconverted signal is compressed by 1 dB for an input
signal of -4 dBm by sweeping the input power, Pin, to observe the gain
of the mixer (disable matching components after the mixer). What is
the saturated output power? Note: To operate the mixer at saturation
makes it only possible to have constant envelope signals.
Verify that the mixer gives a gain of 5 dB by setting the input power to
a low value, e.g. -50 dBm.
Exercise 7.2.1b: Run the simulation for Pin equal to -50 dBm and
identify the mixing terms in the node ‘VifMixer’. Also plot the spectrum
of ‘VMixer’. Notice the power levels (> -200 dBm) of the mixing terms
and the IF and image signals. In these initial simulations the power
levels of mixing terms should be very low. Also, increase the power to -
4 dBm (to reach 1 dB compression point) and see what happens to the
mixing terms. Note that no second-order intermodulation terms are
present as this parameter is not defined in the mixer.
Name Value
Vpeak 0.221 V
Freq LOfreq GHz
Rise 1 psec
Fall 1 psec
Harmonics 16
In the previous simulation setups, we have not used any kind of filters. It can be of
great use to filter unwanted harmonics or intermodulation terms. In ADS, several
different types of filters exist, but here only Elliptic filters will be presented.
After the first amplifier, which can be considered as an LNA in a real RF front-end,
we place a bandpass filter (‘BPF_Elliptic’) with center frequency (‘Fcenter’) at the
carrier frequency ‘RFfreq GHz’. It is used to illustrate a possible attenuation of the
LNA harmonics.
Set the other parameters of the filter as below:
Name Value
Fcenter RFfreq GHz
BWpass 10 MHz
Ripple 1.0 dB
BWstop 1.2 GHz
Astop 20 dB
MaxRej 45 dB
Temp 27
The second filter that will be used is a low-pass filter (‘LPF_Elliptic’) with ‘Fpass’
and ‘Fstop’ of 500 MHz and 1.2 GHz, respectively. This filter should be used after
the mixers and before the load resistance, see Figure 48. As we use a sinusoidal and
switching LO, we place a filter after the switching LO to filter the driving signal of
the mixer.
FilterGain = dB(mag(Vout/Vin))
quality at each node. By using one Harmonic Balance controller and one Envelope
controller taking two tones into account, all important nodes can be monitored. The
controllers are shown in Figure 52. To be able to compute the noise floor at the
input and output, we also need to simulate the circuit with a very low signal power
(below noise level). This is performed by using a ‘Parameter Sweep’ where two
simulation runs are defined.
Note: If only one simulation control box is enabled when the simulation
is started, the signal name is labeled ‘SIGNALNAME’ and not
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 64(86)
At the output, labeled ‘vload’, you can see some spectral components to
be largely suppressed due to quadrature downconversion and signal
combination (remove the LPFs and compare ‘dBm(vload)’ to
‘dBm(VImod)’. Before running the simulation without the LPFs, go to
History in the toolbar of the DDW window and click “on”. This will
allow to keep previous simulations in the same charts, making easy to
compare with new results.
Obviously, extra advantage can be taken from the LPFs. Activate the
filters and adjust their ‘Fpass’ and ‘Fstop’ frequencies properly. Use
markers in the HB plots to clearly see what is happening. Adjust Astop
until you can see a clear damping of the spurious spectral components,
but then reset it to 20 dB.
Enable the Envelope Controller and re-simulate the circuit. When the circuit
simulation has been performed, the data display window pops up. Initially, we will
plot the spectrum at the input and output of the receiver. Create two equations and
plot them in two separate windows:
Spectrum_vsource=dBm(fs(mix(Env1.HB.vsource,{1,0})))
Spectrum_vload=dBm(fs(mix(Env1.HB.vload,{1,-1})))
(Carefully click the inserted Marker to find the -50 dBm sweep, if you
get Pin=-300 instead).
In the first equation, we compute the spectrum of node ‘vsource’ from the ‘Env1’
simulation at frequency ‘1*RFfreq+0*LOfreq’ (by using ‘mix’ command). Next, we
perform a time-to-frequency transform (fs) and return the result in dBm (‘dBm’).
Similarly, in the second equation the ‘vload’ spectrum is calculated around IF
frequency ‘1*RFfreq-1*LOfreq’.
If we assume a channel bandwidth of 1 MHz, the band around the carrier is from
-0.5 to 0.5 MHz. However, due to the Fourier transform the frequency span seen in
Figure 52 is 1/tstep = 270.833 kHz × 8 = 2166.6 kHz.
Next, we define two new equations, which are very similar to the two spectrum
equations recently defined.
Input=spec_power(dBm(fs(mix(Env1.HB.vsource,{1,0}))),-
0.5MHz,0.5MHz)
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 66(86)
Output=spec_power(dBm(fs(mix(Env1.HB.vload,{1,-1}))),-
0.5MHz,0.5MHz)
The ‘spec_power’ returns power integrated between the two specified frequencies,
in this case -0.5 MHz and 0.5 MHz, at ‘1*RFfreq+0*LOfreq’ (or at ‘1*RFfreq-
1*LOfreq’) while the power of the spectrum is given in dBm.
As the input power has been swept, we have two sets of data with index ‘0’ for the
first simulation when Pin is -300 dBm (the signal is negligible while noise is
emphasized) and index ‘1’ for the second simulation when Pin is -50 dBm. Then, the
input signal (Pin_signal), input noise (Pin_noise), output signal (Pout_signal), and
output noise (Pout_noise) can be computed accordingly. From the signal and noise
power levels, also the noise figure and gain can be computed as shown in Figure 54.
Note that equations similar to the used above can be applied to compute the
Adjacent Channel Power Ratio (ACPR) in a transmitter, but integration is
performed over different frequency ranges.
Keep in mind that the noise power levels and receiver noise figure are
very sensitive to simulation parameters! Initially set ‘NFuser’ of LNA
and ‘NFmixer’ to ‘2’ dB and ‘10’ dB, respectively.
Figure 54. Formulas used for SNR and NF calculations with typical simulation
results (may differ from yours)
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 67(86)
Table 1. Simulation of the receiver for several filter and parameter combinations
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 68(86)
Set the ’Fpass’ and ’Fstop’ parameters of the filters in the I and Q paths to 100.5
MHz and 1.2 GHz, respectively.
The time step and total time of the Envelope simulation should also be modified, so
that the obtained frequency spectrum is correct. For the interferer (blocker) at offset
frequency of a few MHz, we will choose the simulation bandwidth equal to 5 MHz.
Consequently, we introduce two new variables ‘SimBandwidth’ and ‘SimFreqReso’
and set them to ‘5 MHz’ and ’50 kHz’, respectively. Then we set ‘tstep’ and ‘tstop’ to
‘1/(2*SimBandwidth)’ and ‘1/SimFreqReso’. Set Step and Stop time in the envelope
controller to tstep and tstop, respectively.
When phase noise is added to the LO, we should also use a ‘NoiseCon’ (HB Noise
Controller), which increases the accuracy of the noise computed around the
“carrier” (the IF) at the output node ‘vload’. Double-click on the ‘NoiseCon’
component. There are five tabs. Make the following changes:
If all the components are set correctly, the testbench should look like in Figure 57.
Simulate the testbench. When the simulation is performed a new data display
window pops up. Open the data display for ‘Lab_QUAD’ and save it as
‘Lab_QUAD_ BLOCKER’. Note that during the first parameter sweep the influence
of PN will not take effect since the interferer power is negligible (-300 dBm). During
the second sweep the reciprocal mixing occurs and the output noise level around the
blocker is elevated.
To plot the spectrum at the load for the first and second sweep, use box.
Initially, define Spectrum_vload as in section 8.2.2.
Then, ‘Spectrum_vload_Refnoise=Spectrum_vload[0,::]’ and
‘Spectrum_vload_PN=Spectrum_vload[1,::]’, respectively.
Next, assume our signal band is placed between -4 MHz to -3 MHz from the
blocker. Using the Eqn box (and the List box) you can calculate the noise power
which decides SNR under reference conditions and under the blocker as follows.
Output_noise_ref=spec_power(Spectrum_vload[0,::],-4MHz,-
3MHz)
Output_noise_PN=spec_power(Spectrum_vload[1,::],-4MHz,-
3MHz)
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 71(86)
Please note that the results can vary from one simulation to another even by a few
dB due to noise variations.
Exercise 8.3a: Compare the noise values for increased blocker power
(e.g. by 10 dB).
Verify the effect of IF filters.
Compare also the results for different LNA gain. In this case not only
the blocker power, but also the reference noise at the output is affected.
Finally, replace the input source ’P_1Tone’ with ’P_nTone’. Define two tones (as in
Two-Tone test) at RFfreq-1.5*f_offset and RFfreq+0.5*f_offset. Set ’f_offset’ to
0.001 (1 MHz) and ’Pin’ to -50 dBm. With this spacing the IM3 product falls in the
middle of the signal band (-3.5 MHz) while each tone undergoes reciprocal mixing
elevating thereby the noise floor.
Exercise 8.3b: Run the simulation and compare the noise values
measured over the signal band (-4 MHz, -3 MHz). The ‘HB’ box can be
disabled.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 72(86)
The next step is to create a symbol that will be used in the digital/DSP (Ptolemy)
simulator. To create the symbol, go to menu ‘Window -> Symbol’ and then click
‘OK’ to proceed. A new window pops up with the Auto-Generate option. Click ‘OK’
to create the symbol. Double-click on each pin and make sure that the “Number”
matches the “Num” field of the ports in the schematic. Even if there is no match, the
simulation will run but with incorrect result.
The test signal generator will generate the digital data stream that will be used in
the IQ modulator and then fed to the ‘Mixer’. The ‘Test Signal Generator’ is needed
in order to make a full testbench, so the ‘Receiver’ can be evaluated. Add an instance
of ‘Data’ with the following parameters:
Name Value
Rout 50.0 Ohm
TStep tstep
BitTime bit_time
UserPattern “”
Type Prbs
SequencePattern 8
Repeat Yes
At the output of the ‘Data’ instance, add a ‘SplitterRF’ with input and output
impedance of 50 Ohm.
In one branch, add one ‘DelayRF’ instance with input and output impedance of 50
Ohm, and ‘Delay’ of ‘(Dlay+15) usec’.
Put a ‘TimedSink’ after the delay component to capture the signal in that node.
Name it ‘Test_In’.
In the second branch of the splitter, add a ‘SymbolSplitter’ with input and output
impedance of 50 Ohm. Set ‘SymbolTime’ and ‘Delay’ to ‘bit_time’ and ‘2*bit_time’.
After the symbol splitter at the ‘I’ output, add a ‘SplitterRF’ with input and output
impedance of 50 Ohm.
At the output of the splitter, add another ‘DelayRF’ block with input and output
impedance of 50 Ohm, and ‘Delay’ of ‘Dlay usec’. After the delay element add a
‘TimedSink’ and labeled it as ‘I_ref’. Connect the second output of the splitter to the
‘I’ input of a ‘QAM_ModExtOsc’ with properties as below:
Name Value
ROut 50.0 Ohm
RIn 50.0 Ohm
Power dbmtow(Pin)
VRef 0.425V
GainImbalance GainImbalance
PhaseImbalance PhaseImbalance
As for the ‘I’ output of the symbol splitter, add the same components for the ‘Q’
output of the symbol splitter and connect everything to the ‘QAM_ModExtOsc’.
‘VRef’ is used to scale the output signal and is adjusted such that the gain of the
amplifier is correct relative the input power, ‘Pin’.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 76(86)
Name Value
ROut 50.0 Ohm
RTemp -274
TStep tstep
Type Conventional AM
FCarrier RFfreq GHz
Power dbmtow(0)
Phase alpha
VRef 1.0 V
FSignal 0 kHz
Vpeak 0.0
8.5.4 Channel
The radio channel is modeled as a certain loss in dB, a ‘MatchedLoss’ component’,
with some noise added, a ‘AddNDensity’ component, as shown in Figure 64. Set
‘Loss’ to the ‘channel_loss’ variable.
8.5.5 Receiver
After the ‘Channel’ we connect the ‘Receiver’. As we come from the ‘digital’
simulation environment with complex valued data and enter the analog/RF time
domain simulation environment section we need to connect a ‘CxToTimed’
instance, which converts a complex data variable to the time domain. After the
‘CxToTimed’ component we insert the ‘Lab_MODULATION_SYMBOL’
component by using the menu ‘Insert -> Component –> Component Library…’.
Browse to your project library and click on the component name drag it and place in
the schematic.
As we return to the digital simulation world after the receiver, we need two signal
converters here as well. The converters used in this case are called ‘EnvOutShort’,
which means that the output of the receiver is shorted to the component after the
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 80(86)
signal converter, which in this case is the first component in the ‘Signal Processing’
section. Note how the RF carrier frequency and IF frequency variables are used in
the signal converter blocks.
Note: The ‘RectToCx’ components are mirrored about the X axis (right-
click and “mirror about X”), and that the Q signal branch is the one at
the bottom.
Name Value
StartSym 10
SymBurstLen 20
SampPerSym sam_per_sym
SymDelayBound 10
NumBursts 1
MeasType EVM_rms
SymbolRate sym_rate
Now it is time to run the first simulation. However, before doing this we need to set
a number of variables. Use the following initial variable values:
Name Value
PhaseImbalance 0
Gain_PA 25
GCSat_PA 5
PSat_PA 26
NF_PA 5
dBc1_PA 22 (PA settings => TOI ~35 dBm)
channel_loss 0
alpha 0
GainImbalance 0
num_ave 8 (used for averaging in power spectrum)
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 82(86)
sam_per_sym 16
num_symbols 128
tstep 1/(2*bit_rate*sam_per_sym)
symbol_time 2/sym_rate
tstop num_symbols/sym_rate
bit_rate 270833.3
bit_time 1/bit_rate
resbw 1/(tstop/num_ave)
Dlay 0
RFfreq 1.1
IFfreq 0.0
Pin -25
sym_rate bit_rate/2
Run the simulation. When completed, open a new data display window and give it
the same name as the schematic. Several Rectangular Plots will be used to plot the
digital, transient, and spectral data.
In next two plots: ‘dBm(S6)’ and ‘dBm(S9)’. Note that S6 and S9 are the names of
the ‘SpectrumAnalyzerResBW’, Figure 64 and Figure 66, for the ‘rfSignal’ and
‘Q_test’. It means that if you have named the spectrum analyzers differently, these
labels should be used.
To calculate the power of the RF signal (‘totalP_RF’), the Q signal (‘totalP_Q’), and
the power in the adjacent channel (‘totalP_AC’) you can use some equations and
print in three list boxes:
In the list box, print the expression ‘EVM_Results’. Note that e.g. 0.05 means
5%.
LINKÖPING UNIVERSITY TSEK38 Laboratory Exercise
DEPARTMENT OF ELECTRICAL ENGINEERING (ISY) 2019-01-22
TED JOHANSSON 85(86)
References