RFIC Design

RFInsights

ACLR Simulation in Cadence with MultiTones 

Envelope transient (ET) is a usual method to simulate ACLR with modulated input signals aka waveforms. We simulate circuit performance with same waveforms (little wishful) that we are going to transmit, and whatever ACLR comes out of that, that is it, we optimize ACLR directly with given waveforms. However, during circuit design phase (where we are not even sure what architecture are we going to use), the waveforms might not be ready yet (maybe RFSys team didn’t deliver on time) or running ET simulations might take little too much time. Designers, then, naturally resort back to traditional ways of looking at linearity like harmonics, IM3s and IM5s etc. using Spectre HB. We can simulate ACLR in Spectre HB by emulating waveforms using multi tones excitation. Just like you can excite your circuit with two tones, and simulate IM3, we can excite with multiple tones and simulate ACLR. This way one can proceed on designing the circuit without waiting for or needing actual waveforms, and make circuit architecture choice. Once the circuit is chosen, and its time to go full on optimization, we can start using real waveforms again. This tutorial shows test setup for ACLR simulation in Cadence using multitones. 

Multi Tones and PAPR

A sinusoid has 3dB PAPR (peak to average power ratio). For example, 1V sin wave has 0.707V RMS, which means \(\text{PAPR} =20log\left[\frac{1}{0.707}\right]=\text{3dB}\). Two sinusoid waves added together have 6dB PAPR. Four sinusoids have 12dB PAPR, and so on. In general, if N sinusoids are added in-phase the PAPR can be given as:

$$ PAPR = 20Log(N)$$

We make two notes here. First, PAPR is peak to rms ratio in terms of voltage or current (and peak to avg in terms of power, this makes sense since avg power is calculated from rms voltage or current). Second, 20log(N) works when tones are added coherently (in-phase). For example, an OFDM waveform typically has 12dB PAPR even though it is composed of many tones but since they are not in phase, peaks of each tone are unlikely to add, and hence PAPR does not blow up.

Generating Desired PAPR Waveform with Multi Tones

How many tones?

Let’s say we want to excite our system with 12dB PAPR. We can use 4 tones in phase, and that would work. A real waveform has many tones in it, therefore we would also like to excite our system with many tones (not just 4) to model our multi tones setup as close to real waveform as possible. Also, we want to distribute energy throughout the band, if we excite our system with just 4 tones, it (non-linearity of our system) will create total 12 IM3 tones (6 falling left to the signal, and 6 falling right), which is something to start with but not much distributed at all. On the other hand, the more the number of tones we inject in system, the longer the HB simulation time. To reduce simulation time, we can excite our system tones that are harmonic multiple of each other. We choose 10 number of tones as a good compromise between simulation time and distribution of energy.

Matlab Code to Generate Phases

Ok, let’s say we have a TX and we want to excite it with 10 tones with 12dB PAPR. We can choose two tones fbb and fbb2, and excite TX with five harmonics of fbb (i.e., fbb, 2fbb, 3fbb, 4fbb, 5fbb) and five harmonics of fbb2 (i.e., fbb2, 2fbb2, 3fbb2, 4fbb2, 5fbb2). This way we will be exciting TX with 10 tones input and only need to enter fbb and fbb2 in HB setup in Cadence (as we will show later). Now how do we generate 12dB PAPR with these 10 tones? We randomize their phases (because we know if they were in phase, PAPR would be 20dB). Here’s the Matlab code that assigns random phases and compute CCDF of 10 tones, such that PAPR is 12dB.


%=== Generate Phases for Given PAPR of 10 Tone Signal ===%
                   
clear all
close all
clc

%Variables
desiredPAPR = 12;   %99.9% PAPR you want
angleRange = 90;    %confine phases withtin this range (randomly chosen 90, you can choose whatever)
PAPR_99p9 = 0;      %init   
count = 0;          %init

%Define Signal
%Chose t1,t2 such that tones are spread all over the band, meaning f5 and
%f10 should be near the bandedge, not necessary but good to have tones near
%bandedge to estimates WC non-linearity

t1 = 1.91e6;        
t2 = 1.87e6; 

f1 = 1*t1;  phi1=0;    %tone 1
f2 = 2*t1;  phi2=0;    %tone 2
f3 = 3*t1;  phi3=0;
f4 = 4*t1;  phi4=0;
f5 = 5*t1;  phi5=0;
f6 = 1*t2;  phi6=0;
f7 = 2*t2;  phi7=0;
f8 = 3*t2;  phi8=0;
f9 = 4*t2;  phi9=0;
f10 = 5*t2; phi10=0;   %tone 10

fs = 100*f10;             %sampling frequency, lower the better, we chose 100 times of highest frequency f10
stopTime = 1/gcd(t1,t2);   %one period of f1+f2+...+f10 -> 1/[GCD of (f1,f2,...,f10)] 
%(if f1+f2+...+f10 is even periodic, it might not be always)
t = 0:1/fs:stopTime;

while (PAPR_99p9<0.98*desiredPAPR || PAPR_99p9>1.02*desiredPAPR) && (count<100)

    count=count+1;
    
    phi1=round(rand()*angleRange);
    phi2=round(rand()*angleRange);
    phi3=round(rand()*angleRange);
    phi4=round(rand()*angleRange);
    phi5=round(rand()*angleRange);
    phi6=round(rand()*angleRange);
    phi7=round(rand()*angleRange);
    phi8=round(rand()*angleRange);
    phi9=round(rand()*angleRange);
    phi10=round(rand()*angleRange);
    
    y =  cos((2*pi*f1*t)+(pi*phi1/180))+...
       +cos((2*pi*f2*t)+(pi*phi2/180))+...
       +cos((2*pi*f3*t)+(pi*phi3/180))+...
       +cos((2*pi*f4*t)+(pi*phi4/180))+...
       +cos((2*pi*f5*t)+(pi*phi5/180))+...
       +cos((2*pi*f6*t)+(pi*phi6/180))+...
       +cos((2*pi*f7*t)+(pi*phi7/180))+...
       +cos((2*pi*f8*t)+(pi*phi8/180))+...
       +cos((2*pi*f9*t)+(pi*phi9/180))+...
       +cos((2*pi*f10*t)+(pi*phi10/180));

    %Calculate CCDF of Signal y
    CDF = histogram(20*log10(abs(y)/rms(y)),1000000,'Normalization','cdf','Visible','off');
    CCDF_y = 100*(1-CDF.Values);
    CCDF_x = CDF.BinEdges;
    
    index_99p9=find(CCDF_y<100-99.89 & CCDF_y>100-99.91);
    PAPR_99p9 = CCDF_x(index_99p9(1));
    phases = [phi1 phi2 phi3 phi4 phi5 phi6 phi7 phi8 phi9 phi10];
    fprintf('Count %d PAPR %0.3f with Tone Phases %d %d %d %d %d %d %d %d %d %d\n',count,PAPR_99p9,phases);
end

%Plot CCDF
semilogy(CCDF_x(2:end),CCDF_y,'LineWidth',3); %to make vectors lenght same, started from index 2 of CCDF_x,
%removes very low value data, thats ok

%Format Plots
ax = gca;
ax.FontSize = 12;
ax.FontName = 'Arial';
ax.TickDir = 'in';
ax.TickLength = [0.02 0.02];
ax.YGrid = 'on';
ax.XGrid = 'on';
ax.LineWidth = 2;
ax.XLim = [-5 15];
ax.YLim = [0.001 100];
ax.XTick = [-15:1:15];
xlabel('PAPR [dB]');
ylabel('CCDF [%]');

%Print PAPR
index_99p99=find(CCDF_y<100-99.989 & CCDF_y>100-99.991);
index_99p9=find(CCDF_y<100-99.89 & CCDF_y>100-99.91);
index_99p=find(CCDF_y<100-98.9 & CCDF_y>100-99.1);
index_50p=find(CCDF_y<100-49.8 & CCDF_y>100-50.1);

PAPR_100p = 20*log10(max(abs(y))/rms(y));
PAPR_99p99 = CCDF_x(index_99p99(1));
PAPR_99p9 = CCDF_x(index_99p9(1));
PAPR_99 = CCDF_x(index_99p(1));
PAPR_50 = CCDF_x(index_50p(1));

if count==100
    fprintf(2,'*****Failed to Achieve PAPR***\n',rms(y))
else
    fprintf(1,'********PAPR Achieved********\n',rms(y))
    fprintf(2,'RMS of Signal = %.3f V\n',rms(y))
    fprintf(2,'100%% PAPR of Signal = %.3f dB\n',PAPR_100p)
    %fprintf(2,'99.99%% PAPR of Signal = %.3f dB\n',PAPR_99p99)
    fprintf(2,'99.9%% PAPR of Signal = %.3f dB\n',PAPR_99p9)
    fprintf(2,'99%% PAPR of Signal = %.3f dB\n',PAPR_99)
    fprintf(2,'50%% PAPR of Signal = %.3f dB\n',PAPR_50)
    fprintf(2,'with these tone phases in degree [%d %d %d %d %d %d %d %d %d %d]\n',phases)
    fprintf(1,'*************Done*************\n',rms(y))
end


When we ran this code in Matlab, it generated following output:

phase data for 10T signal

It says, I assigned random phases to 10 tones, computed CCDF and got 99.9% PAPR which was 10.7dB, it did not meet our target of 12dB (which is set by desiredPAPR vairable in code). It kept trying and at 6th attempt, the phases came out such that PAPR target is met, and it reports those phases to be [54 35 13 2 38 17 65 33 76 66] degree for [fbb 2fbb 3fbb 4fbb 5fbb fbb2 2fbb2 3fbb2 4fbb2 5fbb2] respectively. What is CCDF and 99.9% PAPR? See appendix.

Check I, Q and I+Q PAPR in Matlab

Our matlab code gave us phases for 10 tones. The code was written with cosines which means I channel signal. If we were to use the same phases for sines (i.e., Q channel) what PAPR would we get? and when IQ are combined by TX, what would be the PAPR then? Let’s check that before we go for ACLR simulation in Cadence. Here’s Matlab code for that:


%=== Estimate CCDF of I and Q signal ===%
                   
clear all
close all
clc

%Colors
red = [233 30 86]/255;
green = [64 206 127]/255;
yellow = [254 219 57]/255;
blue = [87 172 220]/255;
grey = [63 63 63]/255;
wbg = [19 20 23]/255;
white= [1 1 1];
orange = [231 76 60]/255;
purple = [144 43 245]/255;
figure1 = figure('Color',wbg);

%Define Signal
t1 = 1.91e6;        
t2 = 1.87e6;        

f1 = 1*t1;  phi1=54;    %tone 1
f2 = 2*t1;  phi2=35;    %tone 2
f3 = 3*t1;  phi3=13;
f4 = 4*t1;  phi4=2;
f5 = 5*t1;  phi5=38;
f6 = 1*t2;  phi6=17;
f7 = 2*t2;  phi7=65;
f8 = 3*t2;  phi8=33;
f9 = 4*t2;  phi9=76;
f10 = 5*t2; phi10=66;   %tone 10

fs = 100*f10;             %sampling frequency, higher the better, we chose 100 times of highest frequency f10
stopTime = 1/gcd(t1,t2);   %one period of f1+f2+...+f10 -> 1/[GCD of (f1,f2,...,f10)] 
%(if f1+f2+...+f10 is even periodic, it might not be always)
t = 0:1/fs:stopTime;

y1 =  cos((2*pi*f1*t)+(pi*phi1/180))+...
   +cos((2*pi*f2*t)+(pi*phi2/180))+...
   +cos((2*pi*f3*t)+(pi*phi3/180))+...
   +cos((2*pi*f4*t)+(pi*phi4/180))+...
   +cos((2*pi*f5*t)+(pi*phi5/180))+...
   +cos((2*pi*f6*t)+(pi*phi6/180))+...
   +cos((2*pi*f7*t)+(pi*phi7/180))+...
   +cos((2*pi*f8*t)+(pi*phi8/180))+...
   +cos((2*pi*f9*t)+(pi*phi9/180))+...
   +cos((2*pi*f10*t)+(pi*phi10/180));

y2 =  sin((2*pi*f1*t)+(pi*phi1/180))+...%+ive sin because we want f1-f5 to convert to LSB
   +sin((2*pi*f2*t)+(pi*phi2/180))+...
   +sin((2*pi*f3*t)+(pi*phi3/180))+...
   +sin((2*pi*f4*t)+(pi*phi4/180))+...
   +sin((2*pi*f5*t)+(pi*phi5/180))+...
   -sin((2*pi*f6*t)+(pi*phi6/180))+...  %-ive sin because we want f6-f10 to convert to USB
   -sin((2*pi*f7*t)+(pi*phi7/180))+...
   -sin((2*pi*f8*t)+(pi*phi8/180))+...
   -sin((2*pi*f9*t)+(pi*phi9/180))+...
   -sin((2*pi*f10*t)+(pi*phi10/180));

y3 =  y1+y2;                           %IQ Combined

%Calculate CCDF of Signal y1 & y2
CDF_y1 = histogram(20*log10(abs(y1)/rms(y1)),1000000,'Normalization','cdf','Visible','off');
CCDF_y1_y = 100*(1-CDF_y1.Values);
CCDF_y1_x = CDF_y1.BinEdges;
CDF_y2 = histogram(20*log10(abs(y2)/rms(y2)),1000000,'Normalization','cdf','Visible','off');
CCDF_y2_y = 100*(1-CDF_y2.Values);
CCDF_y2_x = CDF_y2.BinEdges;
CDF_y3 = histogram(20*log10(abs(y3)/rms(y3)),1000000,'Normalization','cdf','Visible','off');
CCDF_y3_y = 100*(1-CDF_y3.Values);
CCDF_y3_x = CDF_y3.BinEdges;

%Plot CCDF
semilogy(CCDF_y1_x(2:end),CCDF_y1_y,'LineWidth',3,'Color',green); %to make vectors lenght same, 
%started from index 2 of CCDF_x, removes very low value data, thats ok
hold on
semilogy(CCDF_y2_x(2:end),CCDF_y2_y,'LineWidth',3,'Color',red);
hold on
semilogy(CCDF_y3_x(2:end),CCDF_y3_y,'LineWidth',3,'Color',yellow);

%Format Plots
ax = gca;
ax.FontSize = 14;
ax.FontName = 'Arial';
ax.TickDir = 'in';
ax.TickLength = [0.02 0.02];
ax.YGrid = 'on';
ax.XGrid = 'on';
ax.LineWidth = 2;
ax.XLim = [-5 15];
ax.YLim = [0.001 100];
ax.XTick = [-15:1:15];
xlabel('PAPR [dB]','Color',white),ylabel('CCDF [%]','Color',white)

ax.Color=wbg;
ax.XColor=white;
ax.YColor=white;
ax.GridColor=white;
ax.MinorGridColor=white;

l=legend('I CH','Q CH','IQ Combined');
l.Color=wbg;
l.TextColor=white;

%Print PAPR I
index_99p99=find(CCDF_y1_y<100-99.989 & CCDF_y1_y>100-99.991);
index_99p9=find(CCDF_y1_y<100-99.89 & CCDF_y1_y>100-99.91);
index_99p=find(CCDF_y1_y<100-98.9 & CCDF_y1_y>100-99.1);
index_50p=find(CCDF_y1_y<100-49.8 & CCDF_y1_y>100-50.1);

PAPR_100p = 20*log10(max(abs(y1))/rms(y1));
PAPR_99p99 = CCDF_y1_x(index_99p99(1));
PAPR_99p9 = CCDF_y1_x(index_99p9(1));
PAPR_99 = CCDF_y1_x(index_99p(1));
PAPR_50 = CCDF_y1_x(index_50p(1));

fprintf(1,'***CCDF Properties of I Signal*************\n',rms(y1))
fprintf(2,'RMS of Signal = %.3f V\n',rms(y1))
fprintf(2,'100%% PAPR of Signal = %.3f dB\n',PAPR_100p)
fprintf(2,'99.99%% PAPR of Signal = %.3f dB\n',PAPR_99p99)
fprintf(2,'99.9%% PAPR of Signal = %.3f dB\n',PAPR_99p9)
fprintf(2,'99%% PAPR of Signal = %.3f dB\n',PAPR_99)
fprintf(2,'50%% PAPR of Signal = %.3f dB\n',PAPR_50)

%Print PAPR Q
index_99p99=find(CCDF_y2_y<100-99.989 & CCDF_y2_y>100-99.991);
index_99p9=find(CCDF_y2_y<100-99.89 & CCDF_y2_y>100-99.91);
index_99p=find(CCDF_y2_y<100-98.9 & CCDF_y2_y>100-99.1);
index_50p=find(CCDF_y2_y<100-49.8 & CCDF_y2_y>100-50.1);

PAPR_100p = 20*log10(max(abs(y2))/rms(y2));
PAPR_99p99 = CCDF_y2_x(index_99p99(1));
PAPR_99p9 = CCDF_y2_x(index_99p9(1));
PAPR_99 = CCDF_y2_x(index_99p(1));
PAPR_50 = CCDF_y2_x(index_50p(1));

fprintf(1,'***CCDF Properties of Q Signal*************\n',rms(y1))
fprintf(2,'RMS of Signal = %.3f V\n',rms(y1))
fprintf(2,'100%% PAPR of Signal = %.3f dB\n',PAPR_100p)
fprintf(2,'99.99%% PAPR of Signal = %.3f dB\n',PAPR_99p99)
fprintf(2,'99.9%% PAPR of Signal = %.3f dB\n',PAPR_99p9)
fprintf(2,'99%% PAPR of Signal = %.3f dB\n',PAPR_99)
fprintf(2,'50%% PAPR of Signal = %.3f dB\n',PAPR_50)


%Print PAPR IQ
index_99p99=find(CCDF_y3_y<100-99.989 & CCDF_y3_y>100-99.991);
index_99p9=find(CCDF_y3_y<100-99.89 & CCDF_y3_y>100-99.91);
index_99p=find(CCDF_y3_y<100-98.9 & CCDF_y3_y>100-99.1);
index_50p=find(CCDF_y3_y<100-49.8 & CCDF_y3_y>100-50.1);

PAPR_100p = 20*log10(max(abs(y3))/rms(y3));
PAPR_99p99 = CCDF_y3_x(index_99p99(1));
PAPR_99p9 = CCDF_y3_x(index_99p9(1));
PAPR_99 = CCDF_y3_x(index_99p(1));
PAPR_50 = CCDF_y3_x(index_50p(1));

fprintf(1,'***CCDF Properties of IQ Combined Signal***\n',rms(y1))
fprintf(2,'RMS of Signal = %.3f V\n',rms(y1))
fprintf(2,'100%% PAPR of Signal = %.3f dB\n',PAPR_100p)
fprintf(2,'99.99%% PAPR of Signal = %.3f dB\n',PAPR_99p99)
fprintf(2,'99.9%% PAPR of Signal = %.3f dB\n',PAPR_99p9)
fprintf(2,'99%% PAPR of Signal = %.3f dB\n',PAPR_99)
fprintf(2,'50%% PAPR of Signal = %.3f dB\n',PAPR_50)



Above code will generate following output:

verification of I and Q PAPR in Cadence

We can see the CCDF properties of I channel are what we designed for (i.e., 99.9% PAPR is ~12dB). However, Q channel 99.9% PAPR is 10.6dB (about 1.5dB short of 12dB target). Same phases for sines and cosines will not get us same PAPR. We can re-run the first matlab code, and get another set of phases, and try it to see if I and Q PAPR are any closer or we can increase number of tones to resolve this. It’s also interesting to see what I+Q PAPR would be when they eventually get combined. Statistically, I+Q PAPR is 3dB less than I and Q PAPR because rms adds but chances for peaks to be aligned are slim, I and Q peak would unlikely to occur at same time, hence peaks won’t add, thus reducing PAPR. However, sometimes they do add and PAPR of I+Q is similar to I or Q PAPR or even higher. For our 10 tones with the phases chosen, I+Q PAPR happens to be similar to I PAPR as shown in image below.

I and Q CCDF Plots for 12dB PAPR

Verification of PAPR in Cadence

Setup

Let’s now use 10 tones, with phases we obtained above, in Cadence Virtuoso and see if it CCDF and PAPR matches our calculations in Matlab. Figure below shows Cadence schematic and setup of multiple tones. We used analogLib/isin current sources. Since they are sine signals by default, we added 90 degree to all of them to make them cosine, and then we added phases to them shown as phi1 and phi2 for the first current source (I108). Similarly, rest of the 4 current sources contain rest of the 8 tones with phases (not shown in image). For Q channel, we added the same phases (however without extra 90 degree now, since we want sine signals now). Since we wanted to distributed tones evenly throughout the band, therefore we placed fbb2 and its harmonics to upconvert to right side of LO (USB upconversion, LO+fbb2) by assigning -ive polarity to amplitude; and fbb tones to upconvert to left side of LO (LSB upconversion, LO-fbb) by assigning +ive polarity to amplitude. This way LO will be at center and we will have 5 tones upconverted to the right side of LO and 5 tones to the left side, symmetrically occupying bandwidth around LO.

cadence schematic for multi tone signal input
Setup in Cadence Virtuoso . Top 5 sources are for I channel, bottom 5 sources are for Q Channel. Each source contains 2 tones.
I channel current source setup
I channel Current Source (I108)
Q channel current source setup
Tones which are to LSB upconvert are given +ive polarity in Q channel
I channel current source setup
Tones which are to USB upconvert are given -ive polarity in Q channel
Cadence tran setup
Tran Setup
setting strobe period in Cadence tran sim
Define Strobe Period in tran setup
Expressions to calculate CCDF in Cadence
Expressions to Calculate CCDF in Maestro Cadence

Explanation of CCDF Expression

We used histogram2D function in Cadence calculator to plot CDF of signal, then we subtract it from 1 to make it CCDF. A factor of 1e-07 is added to avoid zero signal amplitude because in dB this destroys the scale and ruins the quantization for histogram. We use 1000000 bins for histogram. The higher, the better (but it takes long time to calculate then). We used strobe period of \(\frac{1}{100f}\) where f is the highest frequency in the system. The lower the strobe period, the better but again it takes long to calculate then. We simulate for one time period which is usually \(\frac{1}{\text{GCD of [f1+f2+…+f10]}}\). We said usually because the sum might not be periodic all the time, if your [f1+f2+…+f10] is not periodic, your best bet is to simulate long enough such that you capture all the peaks. We used abSortXValues function in Cadence to help with plotting (it converts bins to points, and cadence can then interpolate between them to sketch a plot). Please look at image above to figure out how did we define everything else. For example, you can see N that we used in expression below is defined in design variables as \(\frac{\text{tstop}}{\text{ts}}\).

abSortXValues((100 * (1 - (histogram2D(dB20(((v_signal_i_norm + 1e-07) / v_signal_i_norm_rms)) 1000000 "cumulative box" nil nil) / N))))

Simulated Results

Simulations match quite well with Matlab calculations. For example, 99.9% PAPR of I channel in Cadence is 12.02dB whereas it is 11.99dB in Matlab. Spot on! (Little bit difference in fractions come from finite sampling frequency and finite number of histogram bins if you cared that much). Similarly, PAPR of Q or I+Q are also very close to Matlab calculations. This means that our setup in Cadence is good and Cadence & Matlab correlate. We can compute phases in Matlab and be sure that it will give us the PAPR in Cadence as Matlab calculated.

verification of I and Q PAPR in Matlab
PAPR Simulated in Cadence
verification of I and Q PAPR in Cadence
PAPR Calculated by Matlab

CCDF curves between Cadence and Matlab also match pretty well.

CCDF in Cadence
CCDF Simulated in Cadence
CCDF in Matlab
CCDF Calculated by Matlab

ACLR Simulation in Cadence

Let’s now use 10 tones to simulate ACLR in Cadence. Say our TX is operating with 20MHz bandwidth in the first chunk of LTE Band 1 (i.e., 1920MHz to 1940MHz with LO at 1930MHz). Say we have a guardband (GB) of 0.4525MHz. GB is a no man’s land, no one can transmit in GB, each channel has to give up 2GB space, one to the left edge of the band and one to the right edge of the band, this way we have 2GB space between signal edge and adjacent channel edge, as shown in image below.

ACLR Definition

We have 10MHz available to the left of LO and 10MHz to the right of LO. To evenly distribute the tones, let’s choose fbb to be 1.91MHz so that 5fbb is 9.55MHz which is ~bandedge (10MHz – GB). We place these tones to the left side of LO by choosing +ive polarity of amplitudes in Q-channel current sources as explained before. Let’s choose fbb2 to be 1.89MHz so that 5fbb2 is 9.45MHz which is ~bandedge (10MHz – GB). We place these tones to the right side of LO by choosing -ive polarity of amplitudes in Q-channel current sources.

Cadence Schematic and Expressions

We used ideal blocks in Cadence to build IQ TX with non-linearity as shown below. IQ TX is excited with 10 tones signals with phases we chose before, and our goal it to measure ACLR at the output of RF amplifier.

Multitone ACLR Setup for ACLR Simulation in Cadence
Schematic
HB setup for ACLR Simulation in Cadence
fbb is f1 here and fbb2 is f6
expressions to compute ACLR in Cadence
Expressions to Calculate ACLR in Cadence

Explanation of ACLR Expression

We plot the power across output resistor, and it comes out as a spectrum. It’s hard to deal with Spectrum data in Cadence, so we used some custom built functions which are attached below. Here’s what they do:

 

  • abSortXValues: Sorts the spectrum data. You would see data is already sorted if you send it to table view but for some reason Cadence does not think so. Therefore, we use this function to sort the data wrt frequency.

 

  • awvcClipNoExtrapolate: Clips the data without extrapolating. Clip function in Cadence extrapolates by default . We don’t want extrapolation to generate something which is not real, so we use awvcClipNoExtrapolate function to stop Cadence from extrapolating. (extrapolating, we are not talking about interpolating)

 

  • abSumValues: This sums up y values of data. We could use integ function but that sums up area under the curve, not exactly what we are looking for. We just want to sum y values and this function does it perfectly.
abSumValues(abs(awvcClipNoExtrapolate(abSortXValues(pvi('hb "/v_iq_post_amp" "/gnd!" "/R6/PLUS" 0)) 1.92045e+09 1.93955e+09)))

abSortXValues

awvcClipNoExtrapolate

abSumValues

Note: These functions are not written by us. These are provided by Cadence Community for its customers. Save them with .il extension, and use 'fx' button in calculator to add them.

Simulated Results

Simulated results are shown below. We can see we have LO tone at 1930MHz, there are 5 signal tones to the right and 5 to the left side of it. Rest of the tones are distortion products and they look much like as if were an ACLR plot from modulated signals. Mission accomplished.

ACLR Simulation in Cadence

Image below show ACLR to be 65dBc (or -65dBc if you like negative sign) for -12dBm of output power.

ACLR Simulation in Cadence Virtuoso

This concludes our tutorial on how to generate a waveform with desired PAPR using multitones and set them up in Cadence to simulate ACLR.

Appendix

PAPR is a very critical metric for system and circuit designers alike. The waveforms that we excite our systems with are statistical in nature, and we want to know what is the probability that peak will occur. We measure this with CCDF (\(P(x \geq X)\)) of waveform. For example, if we say PAPR is 9dB, we want to know what are the chances our signal will actually have 9dB PAPR (is it just one time thing, or is peak occurring after every 10 samples of signal or after 100 samples?). Image below shows a CCDF plot, we can see for 10T signal (red curve), the probability of PAPR 9dB or higher is 1% or the probability that PAPR will never exceed 9dB is 99%. Thus, we will say 99% PAPR of this waveform is 9dB. We also plotted CCDF of AWGN for fun. We can see 99% PAPR for AWGN is about 8.2dB. Typically, we use 99.9%, 99.99% and 100% to communicate PAPR numbers between design teams.

CCDF of multitone vs AWGN

RFInsights

Published: 24 Jun 2023
Last Edit: 24 Jun 2023