Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
university:tools:pluto:users:amp [14 May 2018 21:17]
Robin Getz [Noise]
university:tools:pluto:users:amp [21 Jan 2019 14:13] (current)
Robin Getz [Peak to Average]
Line 60: Line 60:
 ^ Power in mW | Power in dBm | ^ Power in mW | Power in dBm |
 |  0.1 mW |  -10 dBm | |  0.1 mW |  -10 dBm |
 +|  0.3 mW |   -5 dBm |
 |    1 mW |    0 dBm | |    1 mW |    0 dBm |
 +|  3.2 mW |    5 dBm |
 |   10 mW |   10 dBm | |   10 mW |   10 dBm |
 +|   32 mW |   15 dBm |
 |  100 mW |   20 dBm | |  100 mW |   20 dBm |
 +|  316 mW |   25 dBm |
  
 A doubling of output power (from 1mW to 2mW) is only +3dBm. A gain of +20dBm, is output power increasing by a factor of 100 times in mW. A doubling of output power (from 1mW to 2mW) is only +3dBm. A gain of +20dBm, is output power increasing by a factor of 100 times in mW.
Line 73: Line 77:
  
 whether expressed in percent in dB, PAPR is dimensionless quantity. whether expressed in percent in dB, PAPR is dimensionless quantity.
 +
 +When dealing with signals and amplifiers, it is the peak that we need to be concerned about, not the average power in the signal. Different types of modulation schemes have different peak to average power, and this needs to be taken into account.
  
  
Line 89: Line 95:
 Noise figure (NF) is the log ratio of input SNR to the output SNR expressed in decibels. This specification,​ commonly used by RF engineers, makes sense in a purely RF world, but attempting to use NF calculations in a signal chain with an ADC can lead to misleading results. Noise figure (NF) is the log ratio of input SNR to the output SNR expressed in decibels. This specification,​ commonly used by RF engineers, makes sense in a purely RF world, but attempting to use NF calculations in a signal chain with an ADC can lead to misleading results.
 ==== Distortion ==== ==== Distortion ====
 +
 +When a spectrally pure sinewave passes through an amplifier (or other active device), various harmonic distortion products are produced depending upon the nature and the severity of the non-linearity. However, simply measuring harmonic distortion produced by single tone sinewaves of various frequencies does not give all the information required to evaluate the amplifier'​s potential performance in a communications application. In most communications systems there are a number of channels which are "​stacked"​ in frequency. It is often required that an amplifier be rated in terms of the intermodulation distortion (IMD) produced with two or more specified tones applied.
 +
 +Intermodulation distortion products are of special interest in the IF and RF area, and a major concern in the design of radio receivers. Rather than simply examining the harmonic distortion or total harmonic distortion (THD) produced by a single tone sinewave input, it is often required to look at the distortion products produced by two tones.
 +
 +As shown in the figure, two tones f<​sub>​1</​sub>​ and f<​sub>​2</​sub>​ will produce second and third order intermodulation products.
 +
 +{{:​university:​tools:​pluto:​users:​ip2andip3.svg?​500|}}
 +
 +The example shows the second and third order products produced by applying two frequencies,​
 +f<​sub>​1</​sub>​ and f<​sub>​2</​sub>,​ to a nonlinear device. ​
 +
 +^ Order of Mixing ​ ^  Location of mixing products/​Harmomics ^ 
 +| first order   ​| ​ <​m>​2f_{1},​ 2f_{2}</​m>,​ <​m>​3f_{1},​ 3f_{2}</​m>,​ <​m>​4f_{1},​ 4f_{2}</​m>​ |
 +| second order  |  <​m>​f_{1} - f_{2}, f_{1} + f_{2}</​m> ​ |
 +| third order   ​| ​ <​m>​2f_{1} - f_{2}, 2f_{2} - f_{1}, 2f_{1} + f_{2}, 2f_{2} + f_{1}</​m> ​ | 
 +
 +The second order products located at f<​sub>​2</​sub>​ + f<​sub>​1</​sub>​ and f<​sub>​2</​sub>​ – f<​sub>​1</​sub>​ are located
 +far away from the two tones, and may be removed by filtering. The third order products located
 +at 2f<​sub>​1</​sub>​ + f<​sub>​2</​sub>​ and 2f<​sub>​2</​sub>​ + f<​sub>​1</​sub>​ may likewise be filtered. The third order products located at 2f<​sub>​1</​sub>​ – f<​sub>​2</​sub>​ and 2f<​sub>​2</​sub>​– f<​sub>​1</​sub>,​ however, are close to the original tones, and filtering them is difficult. ​
 +
 +Third order IMD products are especially troublesome in multi-channel communications systems
 +where the channel separation is constant across the frequency band. Third-order IMD products
 +from large signals (blockers) can mask out smaller signals. ​
  
 ==== Power Supply Limits ==== ==== Power Supply Limits ====
Line 101: Line 131:
 |   15 |  31.6 |     1.257 V |     3.556 V | |   15 |  31.6 |     1.257 V |     3.556 V |
 |   20 |   100 |     2.236 V |     6.324 V | |   20 |   100 |     2.236 V |     6.324 V |
 +|   25 |   316 |     3.976 v |    11.246 V | 
 + 
 The question is, how do we get +20dBm (6.324V <​sub>​peak-peak</​sub>​) out of a system, when the power supply is limited to 5V? The trick is in how we connect the output stage. The output stage (RFOUT) is connected to Vcc through the inductor L1. From a DC perspective,​ inductors become short circuits, and RFOUT is setting at 5.0V, allowing a 10V<​sub>​peak-peak</​sub>​ swing from the amplifier. This is also why it is AC-coupled by the output capacitor before it attaches to the antenna. The question is, how do we get +20dBm (6.324V <​sub>​peak-peak</​sub>​) out of a system, when the power supply is limited to 5V? The trick is in how we connect the output stage. The output stage (RFOUT) is connected to Vcc through the inductor L1. From a DC perspective,​ inductors become short circuits, and RFOUT is setting at 5.0V, allowing a 10V<​sub>​peak-peak</​sub>​ swing from the amplifier. This is also why it is AC-coupled by the output capacitor before it attaches to the antenna.
  
Line 129: Line 160:
  
 ===== Measurements ===== ===== Measurements =====
 +
 +==== Signal To Noise Ratio ====
 +
 +When we consider the performance of a communication link, in the most basic sense, we are interested in the bandwidth and power of the transmitted signal. Bandwidth is measured from the power spectral density of signal and is also proportional to the bit rate. We define average energy per bit as:
 +
 +<​m>​overline{E}_b = {overline{E}_s}/​{log_2(M)}</​m>​
 +
 +where <​m>​M</​m>​ is the order of the modulation scheme and <​m>​overline{E}_s</​m>​ is the average symbol energy. Note that <​m>​overline{E}_b</​m>​ is of units Joules/bit. When considering an Additive White Gaussian Noise (AWGN) channel, we can write the power efficiency as <​m>​{overline{E}_b}/​{N_0}</​m>,​ where <​m>​N_0</​m>​ is the noise power spectral density (PSD). Since AWGN is flat in frequency, or equal across all frequencies,​ channel noise can typically be measured over 1 Hz of spectrum. ​ Therefore, <​m>​N_0</​m>​ is in units Watts/Hz <​m>​right</​m>​ Joules. <​m>​{overline{E}_b}/​{N_0}</​m>​ can be alternatively understood as normalized signal-to-noise ratio (SNR) and is related by the bitrate <​m>​R_b</​m>​ and channel bandwidth <​m>​B</​m>​
 +
 +<​m>​SNR = {overline{E}_b}/​{N_0}*{R_s}/​{B}.</​m>​
 +
 +SNR is commonly expressed in SNR in decibels (dB) and the equation above can be rewritten as:
 +
 +<​m>​SNR_{dB} = 10log_{10}({overline{E}_b}/​{N_0}) + 10log_{10}({R_s}/​{B})</​m>​
 +
 +When determining SNR of a signal it is important to understand that signals are band limited unlike noise. ​ Therefore, as the observation bandwidth of the signal is increased the SNR becomes worse.
 +
 +==== Noise Generation and Power ====
 +
 +Calculation of power is a non-trivial exercise in practice and in many situations loosely defined. This is especially true when determining SNR. Let us first consider a unique example where we have scaled exponentials (<​m>​s(t) = alpha exp(j pi f_c t)</​m>​) in AWGN. A resulting FFT provided in the figure below, generated from some simple code for two different source signals:
 +
 +<​code>​
 +  r = signal+noise;​
 +  % View averaged spectrum
 +  freq = linspace(-bandwidth/​2,​bandwidth/​2,​fftLen);​
 +  R = reshape(r,​fftLen,​frames);​
 +  R = fftshift(fft(R));​
 +  R_mean = mean(abs(R),​2)/​fftLen;​
 +  plot(freq,​10*log10(R_mean));​
 +</​code>​
 +
 +{{ :​university:​tools:​pluto:​users:​snr_guess_dual-eps-converted-to-1.png?​600 |}}
 +
 +
 +An obvious question to ask would be "What is the SNR of these signals?"​. ​ However, we cannot directly derive the SNR from this plot alone. ​ If we are using a spectrum or vector analyzer we need knowledge of the Resolution Bandwidth (RBW), which is a function of the FFT bin count and observation bandwidth. Since we already know the observation bandwidth (1 MHz), if we used a FFT of size 1024, then the true SNR is ~10 dB. An important aspect to note from the figure above is the shape of the signals <​m>​r_1</​m>​ and <​m>​r_2</​m>​. In generation these two signals only differ in <​m>​f_c</​m>,​ although they appear quite different in the figure. <​m>​r_2</​m>​ was strictly chosen to be within a FFT bin and <​m>​r_2</​m>​ strattles bins. This difference is due to the window effect of the FFT applied to the signals. This is commonly known as //​scalloping//​ and will be dependent on the window chosen. fred harris (yes that capitalization is correct) provides a detailed overview of different windows and how to compensate for their effects in [harris1978]. When performing digital signal processing it is alway important to understand effects of discrete computations over the infinite resolution of our written equations.
 +
 +Now let us connect this to the theoretical concepts. We know that the power spectral density (PSD) is obtained through a Fourier Transform of a signal'​s autocorrelation function. Formally written as:
 +
 +<​m>​S_{XX}(f) = int{-infty}{infty}{R_{XX}(tau)e^{-j2 pi f tau} d\tau}</​m>​
 +
 +where the autocorrelation of our process or signal <​m>​X(t)</​m>​ is:
 +
 +<​m>​R_{XX}(t_1,​t_2) = E[X(t_1)X^{ast}(t_2)]</​m>​.
 +
 +In the case of AWGN this autocorrelation is simply:
 +
 +<​m>​R_{XX}(t_1,​t_2) = sigma^2</​m>​(if <​m>​t_1=t_2</​m>,​ <​m>​0</​m>​ otherwise) ​
 +
 +where <​m>​sigma^2</​m>​ is the variance of the noise. ​ Therefore, <​m>​S_{XX}=sigma^2</​m>​ for all frequencies within the observation bandwidth. Therefore, the power of the AWGN signal is simply <​m>​P_N = sigma^2*B</​m>​. This result provides a mechanism for determining power from the PSD or frequency domain of a signal. ​ However, it can be useful to calculate signal power from the time domain, and from Parseval'​s theorem we know power is identical between domains. ​ For an AWGN signal calculating the variance directly provides <​m>​P_N</​m>,​ but this is not true for non-zero mean processes. ​ In that case, power can be simply calculated based on the squared RMS or squared mean of the process samples. However, a significant amount of data should be collected to get a representative power value of the signal. In MATLAB for a complex input signal the power is simply:
 +
 +<​code>​
 +signalpower = sqrt(mean(signal.*conj(signal)))^2;​
 +</​code>​
 +
 +However, the power unit is a bit tricker to determine. ​ An instrument will provide the I/Q data in voltage based on some input impedance. ​ Therefore, we can calculate the power directly in dBm easily:
 +
 +
 +<​m>​P_{dBm} = 10log_{10} ({P_{RMS}}/​{1mW}) = 10log_{10} ({{I^2+Q^2}/​2}/​{R*1mW})</​m>​
 +
 +
 +where <​m>​R</​m>​ is the input resistance of the device. ​ For an SDR I/Q values will be based on some uncalibrated ADC values and we typically define them of unit dBFS. Resulting in a power calculation that is not relatable to Watts. ​ If it was desired to use an SDR an a instrument we would need to relate each output of the ADC to a specific input voltage at the antenna. ​ This mapping would allow us to accurate measure quantities in SI units instead of relative units.
 +
 +==== S Parameters ====
 +
 +This data was taken on a [[https://​www.keysight.com/​en/​pdx-x202208-pn-E5080A/​ena-vector-network-analyzer?​|Keysight ENA E5080A]]:
 +
 +First we calibrate things with a cable, and connector, to make sure we see what is happening. We expect this to be a flat line, with 0dB of gain. (it is a cable after all).
 +
 +{{:​university:​tools:​pluto:​users:​cal_s21.png?​600|E5080A Calibration}}
 +
 +Then we can look at the S12 of the amplifier board. Here we can see gain between 2 and 3 GHz, with the flat part being between 2.4 and 2.5 GHz, just like we hope.
 +
 +{{:​university:​tools:​pluto:​users:​c419_s21.png?​600|}}
 +
 +{{:​university:​tools:​pluto:​users:​c419_s21_zoom.png?​600|}}
 +
 +If we vary the amplitude at a constant frequency, we can see the P1dB point at +5dBm. In order to keep things operating in the linear region, we should make sure not to drive the amplifer board with more than +5dBm.
 +
 +{{:​university:​tools:​pluto:​users:​c419_p1db.png?​600|}}
 +
 +==== Results====
 +
 +The yellow line is an antenna, the red line is with the same antenna and the amplifier. You can see the +20dB of transmission at 2.4GHz.
 +
 +{{:​university:​tools:​pluto:​users:​c419_s21_ant_amp.png?​600|}}
 +
 +
 +
  
university/tools/pluto/users/amp.1526325466.txt.gz · Last modified: 14 May 2018 21:17 by Robin Getz