Full text
TIT L MA S & M AU T DIR E DA T L E: Digita l S TER DE G anageme n T HOR: Ju a E CTOR: G T E: June, M A l predisto r G REE: M a n t a n Murillo G abriel M o 5th 2007 A ST E r tion by u s a ster in S c Espinar o ntoro Ló p E R T s ing GPI B c ience in T p ez T HE S B -controll e T elecom m S IS e d instru m m unicatio n m entation n Engineering
Title: Digital predistortion by using GPIB-controlled instrumentation Author: Juan Murillo Espinar Director: Gabriel Montoro López Date: June, 5th 2007 Overview A digital predistortion using real equipment, holding it with new software, is here presented. The Vector Signal Analyzer (VSA) –by Agilent– is a new software which allows to the user complete functionalities for the study of real signals. This software consists basically in a Spectrum Analyzer, regarding its performance, but increasing functionalities and commodity. With the VSA software one can have a complete control of an overall communication system, taking advantage of its capacity to share data with other applications. By this way, data information of the signal received on a Spectrum Analyzer can be obtained and studied. In this study is showed how the VSA allows taking data in different modes. Besides, using the COM API language, it is possible to control the VSA with other softwares. Using this performance, and combining it with GPIB (General Purpose Interface Bus), the complete management of the whole system is achieved from Matlab. The GPIB allows interconnecting both Signal Generator and Spectrum Analyzer devices with the PC. Once this connection is reached and all the parameters are well specified, the main goal of this Master Thesis is to turn the VSA software transparent to the user. The final scenario is to send a signal from Matlab and taking it –when the signal has passed across a power amplifier (PA)– again from Matlab (by means of the VSA software, but making it invisible to the user). In order to prove the correct performance of the system implementation, a digital predistortion is employed. Thus, once the digital predistortion is done, the performance of the overall system should increase. This is because the nonlinearities due to the PA should be solved. Herein, problems solved, VSA parameters adjustments, Matlab code program and main results of the digital predistortion, having in mind its future implementation in a FPGA, are presented.
ÍNDEX INTRODUCTION ................................................................................................ 1 CHAPTER 1. PA NONLINEARITIES ................................................................. 3 1.1. PA identification ................................................................................................................ 3 1.1.1. K order interception point ....................................................................................... 3 1.1.2. Compression point ................................................................................................. 4 1.1.3. Back-off .................................................................................................................. 6 CHAPTER 2. DIFFERENT KINDS OF LINEARISER ........................................ 7 2.1. Nonlinearities compensation techniques ....................................................................... 7 2.1.1. FeedForward .......................................................................................................... 7 2.1.2. Feedback ................................................................................................................ 9 2.1.3. LINC (Linear Amplification with Nonlinear Components) ....................................... 9 2.1.4. ACG (Automatic Control Gain) ............................................................................. 10 2.1.5. Predistortion ......................................................................................................... 10 2.2. Digital predistortion ........................................................................................................ 11 2.2.1. Adaptive / Non-adaptive predistortion .................................................................. 11 2.2.2. Memory / Memoryless effects .............................................................................. 12 2.2.2. Predistortion techniques employed ...................................................................... 13 CHAPTER 3. HARDWARE .............................................................................. 16 3.1. Signal Generator Device -- E4433B Agilent .................................................................. 16 3.2. Spectrum Analyzer Device -- E4407B Agilent .............................................................. 17 3.3. PA Device – ZRL-2300 Minicircuits ............................................................................... 17 3.4. GPIB Bus – National Instruments .................................................................................. 18 3.4.1. A brief history........................................................................................................ 18 3.4.2. GPIB Specifications .............................................................................................. 19 3.4.3. Programming GPIB (SCPI) .................................................................................. 21 3.4.4. GPIB used at this work ......................................................................................... 23 CHAPTER 4. SOFTWARE .............................................................................. 24 4.1. VSA (Vector Signal Analyzer) software ......................................................................... 24 4.2. COM API Matlab to VSA .................................................................................................. 28 CHAPTER 5. SYSTEM IMPLEMENTATION ................................................... 30 5.1. Overall system ................................................................................................................. 30 5.1.1. GPIB commands specified .................................................................................. 31 5.1.2. VSA fixed and identified parameters ................................................................... 34 5.2. Program flow diagram .................................................................................................... 38
CHAPTER 6. FINAL RESULTS ....................................................................... 39 6.1. Final whole system scenario .......................................................................................... 39 6.2. Non-Adaptive predistortion results (without LUTs) ..................................................... 39 6.2.1. PA identification ................................................................................................... 39 6.2.2. Predistortion curve identification ......................................................................... 40 6.2.3. Predistortion result .............................................................................................. 40 6.3. Non-Adaptive predistortion results (with LUTs) .......................................................... 41 6.3.1. PA identification ................................................................................................... 41 6.3.2. Predistortion curve identification (LUT values) ..................................................... 42 6.3.3. Gain curve. LUT size implication. ......................................................................... 43 6.4. Adaptive predistortion results (LMS algorithm) ........................................................... 44 6.4.1. PA identification ................................................................................................... 44 6.4.2. Predistortion curve identification ......................................................................... 44 CHAPTER 7. CONCLUSIONS ........................................................................ 46 7.1. Future work ...................................................................................................................... 47 7.2. Environmental study ....................................................................................................... 47 BIBLIOGRAPHY .............................................................................................. 49 ANNEX ............................................................................................................. 51
Introduction 1 INTRODUCTION This Master Thesis presents the results of a digital predistortion. Nevertheless, it is important to say that the main effort is achieve to realize this predistortion by using a GPIB-controlled instrumentation and a new software called VSA (Vector Signal Analyzer) from Agilent. The GPIB (General Purpose Interface Bus) is a short range digital data bus which allows to connect hardware devices, as Signals Generators and/or Spectrums Analyzers, to some PC in order to control them remotely. Concretely, the SCPI (Standard Commands for Programmable Instruments) commands are used to manage the hardware from the PC. Once the connection is accomplished, the VSA software is employed to obtain the information data that before it was able to be seen on a Spectrum Analyzer. The VSA software provides the traditional spectrum displays and measurements of a typical Spectrum Analyzer, but with some advantages: - A part of the standard information, it has several new options, measurements and displays. For instance, a lot of actual and newer modulation formats (like EDGE, MSK, M-QAM, 4 DQPSK …), such as spread spectrums or multicarrier modulations (OFDM), can be selected on the VSA software. Later, this point is exposed widely. - Maybe the most important issue and advantage of the VSA software, although the first one is so outstanding, is the possibility to share data with other softwares, like Microsoft Excel or Matlab. It allows to have an absolute control of the overall communication system because the received signal could be completely taken in. It has to be mentioned that VSA software permits to get data in different modes (the demodulated data, the received symbols and the IQ information once the signal passes across the shaping filter or when it does not pass across…). - Another significant aspect, and perhaps not so important, is the possibility to work with the PC instead of the hardware device. With the VSA, up to 9 different graphs could be seen at the same time on the PC screen, allowing a better control of the signal. A part of this, to work with the PC improves the commodity. The VSA software has other key option. It can be managed from other applications or softwares by means of its COM API (Component Object Model Application Programming Interface) language. The main softwares that could control the VSA are ADS (Agilent Design System) and Matlab. The last one is used on this work.
2 Digital predistortion by using GPIB-controlled instrumentation One of the main goals of this Master Thesis is to research about the new software bought by the EPSC (Escola Politècnica Superior de Castelldefels), the VSA software. Because of the darkness of the software help and the enormous quantity of functions and parameters bad exposed, this process consumed a lot of time. In fact, the presence in a one-day course of this software, guided by Agilent workers, was required. When the software is controlled, the goal is to reach that the VSA turns transparent to the user. It means that it must be completely controlled from Matlab. In order to verify the correct performance, a digital predistortion for linearise a power amplifier (PA) is implemented. Nowadays, when the main requirements in modern communication systems –overcoat in mobile communications systems– are high data transfer rates and a long time of battery life, the predistortion is continuously under test. In order to achieve high data transfer rates, modern multilevel and multicarrier modulations are currently used. What this implies is the presence of high PAPR (Peak to Average Power Ratios). And, thus, if a linear amplification wants to be achieving, the work point should be moved far of the compression point. It is well known that as much as is moved the work point away from the compression point, the battery life will be decreased considerably. The main objective of this Master Thesis is achieved. A whole control of a complete system from Matlab, making the VSA invisible and transparent to the user, is made successfully. In order to realize the digital predistortion, a signal was created from Matlab and sent to a Signal Generator by GPIB commands. Then, once the signal pass across the PA, it is obtained by the VSA software and the data is collected again to Matlab software, with which is possible to compare the signal sent with the signal received and make the digital predistortion. Once the main PA characteristics and nonlinear effects are exposed, some of principal nonlinearities compensation techniques are listed and digital predistortion is widely studied. Afterwards, hardware devices and GPIB connection employed in this work, such as VSA software, are here presented. In relation to the VSA software, all the most important concepts and the problems solved when this work was advancing, and the COM API way to interconnect VSA to Matlab software and the GPIB/SCPI commands used, are explained. Finally, the whole system is described and the digital predistortion results are shown and justified for its implementation in a FPGA.
PA nonlinearities 3 CHAPTER 1. PA nonlinearities If the PA input power is small, the PA performance is linear. In this case, the PA is working in its linear zone and, at the output, only the frequency components of the input appear. On the other hand, when the input power is high, the PA is working in its nonlinear zone. The effects that produce the PA nonlinearity over modulated signals are mainly two. They are called “in-band effects” and “out-of-band effects”. The first one, the “in-band effects”, produces a constellation distortion and consequently, a worse BER (Bit Error Rate) value. The second group, the “out-of-band effects”, produces a spectrum widening and so, a higher ACPR (Adjacent Channel Power Ratio) value. These two impacts are, obviously, important disadvantages. Being the PA input signal represented in (1.1), at the PA nonlinear output will appear spurious at other frequencies. These are grouped in harmonic zones that should be separated by filtering. The output would be the equation represented in (1.2). cos (1.1) Α||cosΦ||∑||cosΨ || (1.2) Where n is the harmonic zone, being the first zone the more conflictive in communication systems. The third order harmonics are in this first zone. These are not easy to remove due to their proximity to the signal, whereas the other harmonics are easy to remove using of a filter. According to (1.2), the signal at the first harmonic zone showed in (1.3). Α||cosΦ|| (1.3) 1.1. PA identification There are different representative parameters to identify a PA, like the gain, the frequency range or the low noise figure, among others. Two of these key parameters are the k order interception point and the compression point. 1.1.1. K order interception point One of the main identification parameters of a PA is the k order interception point (IPk). It is ever specified on the datasheet. Usually the third order (IP3) is specified because, as it has been seen before, it is the more conflictive. The input IP3 (IIP3) is the input signal level, when the fundamental tone intensity at the input coincides with the third harmonic level. It is impossible to reach to the
10 Digital predistortion by using GPIB-controlled instrumentation Fig. 2.3 LINC scheme (2.10) Following (2.7), (2.10) can be reduced in (2.11), where finally just the lineal amplification is obtained. (2.11) The main drawback is that the disturbance of the signal is difficult and is not trivial. Thus it is usually implemented by DSP. 2.1.4. ACG (Automatic Control Gain) This compensation technique is clearly inadequate to employ at this study. At the ACG technique, the variable gain should be inverse proportional to the v(t) power. The ACG method is typically used on radio links. Fig. 2.4 ACG scheme In this case, the main disadvantage is that it can not be implemented when the information is traveling on the amplitude. 2.1.5. Predistortion The predistortion technique is the simplest idea to linearise a PA. Basically, it consists in create a previous distortion curve complementary to the power amplifier distortion (look at Fig. 1.2). So, if these two curves are situated in cascade, the final result is completely lineal. This is showed at Fig. 2.5.
Different kinds of lineariser 11 Fig. 2.5 Predistortion scheme It has to be mentioned that it could exist analog predistortion or digital predistortion. Herein, the digital predistortion will be implemented. Digital predistortion can be applied at baseband or at intermediate frequency (IF), whereas the analog predistortion is applied at RF. 2.2. Digital predistortion Predistortion [5] is basically a method by which one first stimulates a non-linear PA with baseband samples and, then, observe the results of that stimulus at the PA output. Then, the AM/AM and AM/PM effects of the PA are estimated. These estimated distortions are then removed from the PA by predistorting the input stimulus with their inverse equivalents. Fig. 2.6 Predistorter block scheme [5] Therefore, the principal idea behind the concept of predistortion is the aim of introducing inverse nonlinearities that can compensate the AM/AM and AM/PM PA distortions. Nowadays, the predistortion is an important issue to have into account owing to the modern multilevel modulation formats and multicarrier or spread spectrum techniques. For this, the digital predistortion has been object of multiple publications in the recent past years [6] [7]. In all these publications, a clear classification is applied in all the predistortion techniques used. The adaptive or non-adaptive predistortion and memory or memoryless effects are specified. 2.2.1. Adaptive / Non-adaptive predistortion The difference among these two kinds of predistortion is very simple. The nonadaptive predistortion realizes the estimation of the predistorter function only one time and it is assumed that this curve will be ever valid for predistort the PA
12 Digital predistortion by using GPIB-controlled instrumentation input signal. The result of the non-adaptive predistortion is worse than if an adaptive predistortion is used. On the other hand, the adaptive predistortion is the most suitable option to achieve a good estimation in all transmission time. The adaptive predistortion consists in obtaining output samples and estimating the predistorter function continuously. Therefore, if an adaptive predistortion is used, one can assure the correct and actual predistorter function for each moment, achieving a better linearization result than when a non-adaptive predistortion technique is implemented. Inside the adaptive predistortion, a lot of different techniques are studied at papers. Herein, a non-adaptive predistortion and an adaptive predistortion with LMS (Least Mean Square) algorithm will be studied and the results will be compared. 2.2.2. Memory / Memoryless effects Other important issues are the memory effects of the PA. Inside the different studies and publications related to digital predistortion, a clear differentiation is used: predistortion having into account the memory effects or without them (memoryless). The memory effects are a consequence of the electrical and thermal dispersion effects [8]. However, there are other aspects related to the modulation formats or signal bandwidth that could be also relevant. If memory effects are presented, the PA output (amplitude and phase) not only depend on the instantaneous PA input, it depends also on their past values. Thus, in the memoryless case, it is assumed that the AM/AM and AM/PM static curves will be always suitable for the same envelope value. So then, a table of predistorter gain values can be stored for every possible input envelope value. If this table is applied to the PA input, then it should cancel the undesired PA nonlinear response. If modern communication systems are present, the digital predistortion based on memoryless models that only takes into account the AM/AM and AM/PM static curves does not achieve good results. It will be a right option with narrowband signals. With modern modulation schemes used nowadays as M- QAM or with modern techniques as WCDMA or OFDM, PA memory effects can not be ignored. When modulation bandwidth is relatively wide –more than 20 MHz– the PA starts to suffer from memory. Against memoryless case, now for every particular value of input, there is more than one predistortion value that is needed to linearise the gain. The outcome that produces the memory effects are clearly seen on Fig. 1.4. As it can be seen at this figure, it produces blurring effects on the AM/AM and AM/PM curves.
Different kinds of lineariser 13 Here is an example extracted from [9] where a 2.5 MHz bandwidth OFDM signal is measured by an Ericsson 45 W base station PA. At Fig. 2.7 and Fig. 2.8, the results for memory, memoryless and without predistortion are showed. It can be observed the difference between these measurements and how improve the results when the memory effects are taken into account. Fig. 2.7 (a) memory polynomial predistorter, (b) memoryless predistorter and (c) without predistortion Fig. 2.8 ACPR for memoryless polynomial model, memory polynomial mode and without predistortion 2.2.2. Predistortion techniques employed As it has been commented before, two kinds of predistortion will be compared. - Non-adaptive predistortion - Adaptive predistortion based on the LMS algorithm The results of these two types of predistortion will be showed on chapter 6. 2.2.2.1 Non-adaptive predistortion The non-adaptive predistortion is just the estimation of the static distortion curves and the later implementation of the predistorter curve.
14 Digital predistortion by using GPIB-controlled instrumentation It will be observed that, with this technique, the linearization will be achieved, but it will be the worse algorithm for the estimation of the predistorter curve. Then, adaptive predistortion algorithm is used in order to obtain a better result. 2.2.2.2 Adaptive predistortion – LMS algorithm The Least Mean Square (LMS) algorithm, introduced by Widrow and Hoff at 1959 is an adaptive algorithm, which uses a gradient-based method of steepest decent. LMS algorithm uses the estimates of the gradient vector from the available data. LMS incorporates an iterative procedure that makes successive corrections to the weight vector in the direction of the negative of the gradient vector which eventually leads to the minimum mean square error. Compared to other algorithms, the LMS is relatively simple; it does not require correlation function calculation nor does it require matrix inversions. How the LMS algorithm works is showed at Fig. 2.9 and at the equations (2.12) and (2.13) [10]. Fig. 2.9 LMS system identification block diagram The adaptive filter W is adapted implementing the LMS, which is the most widely used adaptive filtering algorithm. First, the error signal e is computed as (2.12). (2.12) It measures the difference between the output of the adaptive filter and the output of the unknown system. On the basis of this measure, the adaptive filter will change its coefficients in an attempt to reduce the error. The coefficient update relation is a function of the error signal squares and is given by (2.13) [11]. (2.13) In (2.13), h is the vector of filter parameters to be adapted …, µ is a constant that determines the rate of adaptation, and is an estimation of the gradient of h with respect to the mean squared error, . Equation (2.13) attempts to increment the filter parameter vector by small steps in the direction of decreasing mean squared error. Stochastic gradient adaptation proceeds by iterating (2.13) until the mean squared error is minimized.
Different kinds of lineariser 15 Relating to this work, the LMS allows a better linearization. The predistorter function does not depend only to the actual values; it depends also on the past values. If µ parameter is a high value, the result depends in a greater way from the actual values. And on the other hand, if µ parameter is a low value, the results depends in a greater way from the past values. 2.2.2.3 Look-up-tables (LUTs) In computer science, a Look-up-table (LUT) is a data structure, usually an array or associative array, used to replace a runtime computation with a simpler lookup operation [12]. The speed gain can be significant, since retrieving a value from memory is often faster than undergoing an expensive computation. A classic example is a trigonometry table. Calculating the sine of a value every time such a sine is needed can be prohibitively slow in some applications. To avoid this, the application can take a few seconds when it first starts to precalculate the sine of a number of values, for example for each whole number of degrees. Later, when the program wants the sine of a value, it uses the lookup table to retrieve the sine of a nearby value from a memory address instead of calculating it using a mathematical formula. There are two fundamental limitations on when it is possible to construct a lookup table for a problem. One is the amount of memory that is available; it is not possible to construct a lookup table larger than the space available for the table, although it is possible to construct disk-based lookup tables at the expense of lookup time. And the second restriction is the time required to initially compute the table values - although this does not need to be done often. If it requires prohibitive time, it may make the table inappropriate to be used. Fig. 2.10 Basic performance of a LUT system
16 Digital predistortion by using GPIB-controlled instrumentation CHAPTER 3. HARDWARE 3.1. Signal Generator Device -- E4433B Agilent The Agilent E4433B RF signal generator [13] offers a wide range of digital modulation capabilities for research and development, manufacturing or troubleshooting applications. Providing a comprehensive feature set, it generates standard and custom digital modulation formats, filtering and burst shapes, as well as versatile analog modulation, with superior quality, reliability and worldwide support. It has the possibility to charge arbitrary signals from Matlab software –technique implemented here–. Main features: • 250 KHz to 4 GHz frequency range, with a resolution of 0.01 Hz • RF modulation bandwidth up to 35 MHz • -136 dBm to 7dBm power range, with a resolution of 0.02 dB • Optional dual arbitrary waveform generator and/or real-time I/Q baseband generator • 40 MHz sample rate and 14-bit I/Q resolution • 1 Msample (4MB) memory for waveform playback • 1 Msample (4MB) memory for waveform storage • Custom digital modulation (>15 variations of FSK, MSK, PSK and QAM) • AM, FM, phase modulation, pulse modulation and step/list sweep (frequency and power) • Programming language: SCPI Fig. 3.1 E4433B Agilent This device is useful in this study because it is possible to download a waveform by using the GPIB bus and Matlab software. So, it can be controlled every time the signal. Finally, with the help of the VSA software (explained on chapter 4), it is possible to obtain the final data and send it to Matlab software in order to compare the signal sent versus the signal received, after this one has passed across the PA, for example.
Hardware 17 3.2. Spectrum Analyzer Device -- E4407B Agilent The HP Agilent E4407B ESA-E Series [14] is Agilent’s mid-performance spectrum analyzer. The series sets the performance standards in measurement speed, dynamic range, accuracy, and resolving power for similarly priced products. Selection of one button measurement solutions combined with its easily navigable user interface and performance in speed allows the user to spend less time testing and more time designing, building, and troubleshooting components and products. Main features: • 9 KHz to 26.5 GHz frequency range • Resolution bandwidth: 1 kHz to 5 MHz in a 1, 3, 10 sequence, and 5 MHz • Phase noise: -90 dBc/Hz (10 kHz offset). 99dB third order dynamic range • Overall amplitude accuracy: + or -(0.6dB + absolute frequency response) • Absolute amplitude accuracy + or -1.1dB • Measurement range: 50 ohms -120 dBm to +30 dBm • Maximum safe input continuous power: +30dBm(1W) Fig. 3.2 E4407B Agilent 3.3. PA Device – ZRL-2300 Minicircuits The PA used in this work is the ZRL-2300 from Minicircuits. Here are listed its main characteristics3. • High IP3, +46dBm typ. • Low noise figure, 2.5dB typ. • Gain, ≈24dBm typ. • Frequency range, 1.4 – 2.3GHz • Applications: defense and satellite communications, PCS, UMTS, GSM, cellular, wireless data. 3 The complete datasheet information is placed on the annex.
18 Digital predistortion by using GPIB-controlled instrumentation Fig. 3.3 ZRL-2300 Minicircuits PA However, there is a problem using this PA for this study. Against the usual requirement of the commercial PAs, a high nonlinearity is here necessary in order to appreciate the improvements of the lineariser. It means that another worse PA should be used. Nevertheless, it is not possible because there is any else PA on the laboratory used for the development of this Master Thesis. But, actually, as it will be seen on chapter 6, the results are good enough and the predistortion effects can be appreciated correctly. 3.4. GPIB Bus – National Instruments 3.4.1. A brief history The GPIB bus is a short range digital data bus implemented at 1965 by Hewlett- Packard (HP). Nevertheless, this first bus was called HP-IB (Hewlett-Packard Interface Bus). The goal to design the HP-IB was to connect the HP test and measures devices to some equipment in order to be able to program it, as for instance, a computer. This standard was very useful and was quickly standardized by the IEEE (Institute of Electrical and Electronics Engineers) at 1975 and it was called IEEE-488 or GPIB (General Purpose Interface Bus). This last one is more widely used than HP-IB. Some of the principal reasons because this standard was quickly gained popularity are the high transfer rates -on the original standard was 1Mbps (later extended to 8Mbps)- and the number of devices that can be connected at same time -a maximum number of 15-. Finally, it must be mentioned is that at 1990, the original standard was revised and, specifically, how the controllers and instruments communicate between them. The SCPI (Standard Commands for Programmable Instruments) commands were chosen, allowing a single and simple programming language that is used with any SCPI instrument. In addition to the IEEE, others committees standardized the initial HP-IB. The ANSI (American National Standards Institute) standardized the HP-IB as ANSI Standard MC 1.1 and the IEC (International Electrotechnical Commission) has its IEC Publication 625-1. Others GPIB revisions and improvements has been done. A complete time-line of the HP-IB/GPIB bus is showed at Fig. 3.4.
Hard w 3.4. 2 The the devi res u call e add r A p a mes devi com A s i t line s into • • w are 2 . GPI GPIB dev Device-de p ce-specifi c u lts, data f e d comm a r essing de v a rt of this c sages to o ce, that mands to a DATA LI N DIO1 DIO2 DIO3 DIO4 DIO5 DIO6 DIO7 DIO8 t can be s s and 8 gr o 8 data lin e The 8 D messa g set, in w The 3 H device s F B Specif i ices com m p endent m c informat i f iles, etc. A a nd mess a v ices, etc … c lassificati o o ne or mo manages a ll device s N ES Pin No. 1 2 3 4 13 14 15 16 s een at Fi g o und-retur e s, 3 hand s D ata lines , g es. All co m w hich cas e H andshak e s . It guaran ig. 3.4 HP i cations m unicate a m m essages, i on, such A nd, on t h a ges, tha t … o n, the G P re Listene r the flow s . Fig. 3. 5 g 3.5, the n or shiel d s hake line s , called D I m mands a e the DIO8 e line s co n tees that t -IB/GPIB b m ong the m often call as progr a h e other h t contain P IB devic e rs , which r of infor m 5 GPIB co GPIB inte r d -drain lin e s and 5 int e I O1 to DI O nd most d a is used fo n trol the t r he messa g b us time-li n m by mean ed data m a mming in s and, the I message e s can be T r eceive d e m ation on MANA G IFC REN ATN SRQ EOI HAN D DAV NRF D NDA C nnecto r r face syst e e s. The 16 e rface ma n O 8, carry b a ta use th e r parity. r ansfer of g e sent is r n e s of two b a m essages. s tructions, I nterface m as initial T alker s , w e data, an d the GPI G EMENT LINE D SHAKE LINE S D C e m consis t signal lin e n agement b oth data e 7-bit AS C message r eceived w a sic mess a These co measure m essage s , izing the w hich send d the Con t B by se n S Pin No. 9 17 11 10 5 S Pin No. 6 7 8 t s on 16 s e s are gro lines. and com m C II or ISO bytes bet w w ithout err o 19 a ges, ntain ment also bus, data t roller n ding s ignal uped m and code w een o rs.
26 Digital predistortion by using GPIB-controlled instrumentation the I/Q reference signal. Then, the analyzer displays the difference, in magnitude, between these two signals. If the normalization option is selected to OFF, the analyzer displays the instantaneous magnitude error –at this work this option is used in order to have the correct instantaneous value-, and if normalization is set to ON, the analyzer displays the magnitude error as a percentage. • Syms/Errs.- Selecting the Syms/Errs, the trace data displays the symbol table. The symbol table shows the information error and the binary bits for each symbol. The first bit in the table corresponds to the first bit of the first symbol. A part of the data information, a Y axis could be chosen between these ones: • Log Mag (dB); Linear Mag; Real (I); Imag (Q); Wrap Phase; Unwrap Phase; I-Q; Constellation; Q-Eye; I-Eye; Trellis-Eye; Group Delay and Log Mag (lin). As it is showed at Fig. 4.1, a lot of information could be represented simultaneously and at the same screen of a signal. As it has been said before, here is displayed 4 graphs, but it is possible to represent until 9 graphs at same time. Even it is able to select a concrete symbol at the syms/errs graph by a marker and connect it with the other graphs in order to know how or where is it. There are a lot of options and possibilities to do with the VSA software but explain all of them is not a goal of this project. Nevertheless, some of the main and most practical utilities are listed here: • Player signal.- The 89600-series VSA provides various recorded signals, analyzer setup files, and Signal Studio setup files. It is a suitable option if it is wanted to study some of these signals. For instance there are QPSK, O-QPSK, CDMA, 3GPP Down/Up, WiMAX 5MHz/7MHz, Zigbee, etc6. • Record signal.- The Vector Signal Analyzer application lets to record time data from the measurement hardware directly to the PC's disk drive. The data can be played back at a later time or import it into other applications. It could also create and play the user recordings. It is possible to specify the record length in time or in samples. • Marker.- VSA includes several marker types and marker functions. The analyzer supports general trace marker functions and several specialized markers including; Band Power markers, Occupied Bandwidth (OBW) markers, Adjacent Channel Power (ACPR) markers, and Spectrogram markers. It is a good tool in order to know the relation between symbols or values of the signal from different graphs, for example. 6 All the pre-recorded signals are listed at the annex with a little explanation. Here is just presented some ones.
Software 27 • Macro.- It is a very useful option. Macros let to automate a series of manual operations into a single command. 89600-series products use VBScript7 for their macro programming language. Macros can be used for: o One-button applications. o Automation of repetitive tasks. o Computation of measurement results that are beyond the scope of the basic 89600. As a summary, the VSA software provides to the user a complete vision of all the main aspects in a complete communication system with the advantage to see different aspects of the same signal at same time. Although the possibility to see until nine graphs of the same signal simultaneously, there is another advantage more relevant. Furthermore, the values of the signal that would receive the receptor can be taken to software. It means that the numerical values of all the graphs, that could represent the VSA, can be studied in software like Microsoft Excel or Matlab. For instance, the symbols demodulated, the values in quadrature and phase (I and Q), the magnitude or phase errors, the spectrum values, etc… can be taken to Matlab and be evaluated, modified and/or studied how the user wants. There are several ways to share data between the 89600 analyzer and other applications or programs. This functionality is used in order to study the complete system. Without the VSA software, only the spectrum, the IQ draw and aspects as the EVM could be seen in a Spectrum Analyzer. Now, with the VSA software, the complete signal values can be studied. Actually, as it has been commented before, this is the way followed by this work to analyze the overall complete system. The VSA can be controlled using menus and dialog boxes in the window, or controlling the application via the COM API application. Herein, the COM API is used and is explained at section 4.2. 7 VBScript is a scripting language that is a subset of the Visual Basic programming language. VBScript programs are easy to create. With 89600-series products, it can be created a VBScript program by recording mouse and keyboard operations or it can be written (or edited) VBScript programs with the macro editor that comes with 89600-series software.
28 Digital predistortion by using GPIB-controlled instrumentation Fig. 4.2 VSA performance and relation scheme 4.2. COM API Matlab to VSA The VSA software provides an Application Programming Interface to its Component Object Model, or COM API. This COM API provides software engineers with pre-built objects, methods, properties, and constants to create applications that can use both the Vector Signal Analyzer and the Spectrum Analyzer applications. Together, these APIs expose all of the measurement, computational, and display features of the instrument, making them accessible to C++ or Visual Basic programs8. COM is an architecture and supporting infrastructure for building, using, and evolving software robustly. The model goes beyond ordinary object oriented programming in that it describes standard ways to define and create new interfaces. The COM standard is a programming model that describes how to connect objects and construct new interfaces. Herein the COM API will be used to program and control the VSA software from Matlab. Thus, taking advantage of that, the vector signal generator can be also controlled from Matlab –by GPIB commands (SCPI language)-. A complete management of the overall system is finally achieved. As example of the COM API language some instructions are showed below9. Firstly, the VSA 89600 object must be created from Matlab in order to have the total control of the VSA software with the next instruction. hVSA = actxserver ('AgtVsaVector.Application'); 8 The provided APIs are officially supported from the following programming environments: · Microsoft Visual Basic Version 5.0 or later, Enterprise and Professional editions. · Microsoft Visual C++ 5.0 or later in container applications that support Component Object Model automation. 9 The complete VSA object tree instructions are listed on the annexes.
Software 29 Once this object is generated, it is possible to control the VSA options from Matlab. For instance, in order to select the option Digital Demodulation on the VSA, showed at Fig. 4.3, the next instructions must be specified on Matlab. Furthermore, on Fig. 4.4, the object results in Matlab are represented. hVSA = actxserver ('AgtVsaVector.Application'); hMeasurement = get(hVSA,'Measurement'); set(hMeasurement,'DemodConfig',2); hDemod = get(hMeasurement,'DigDemod'); Fig. 4.3 Unfolded measurement and demodulation menu Fig. 4.4 (a) VSA, (b) Measurements and (c) DigDemod objects
30 Digital predistortion by using GPIB-controlled instrumentation CHAPTER 5. SYSTEM IMPLEMENTATION 5.1. Overall system Then, the goal is to linearise a previous identified PA. It has to be mentioned that until nowadays, only the AM/AM curve has been linearised because of the impossibility to identify the phase values. Now, with the VSA software the phase can be also linearised. As it has been said before, this software can share data with other applications. So, if the phase information is taken from VSA, a predistorted phase signal could be implemented joint the typical predistorted amplitude signal. The overall system scheme is showed at Fig. 5.1. The PC or workstation –with Matlab and VSA software previously installed– is connected to the signal generator by means of a GPIB bus. And then, it is connected also to the spectrum analyzer. Thus, three devices are used (workstation, signal generator and spectrum analyzer) among the 15 possible GPIB devices connected. Then, the signal generator RF output is connected to the PA under test in port, and the PA under test output port is connected to the Spectrum analyzer RF in. Now, the total control of the complete system is achieved from the workstation. Matlab is used to discover, identify, modify and control all the equipment of the overall system and to control the VSA software by means of the COM API. Fig. 5.1 Overall system scheme The 10 MHz reference of the Signal Generator is used to adjust the clocks of all the systems jointly (VSA reference synchronized to Spectrum Analyzer reference, and also synchronized to the Signal Generator reference). The scheme followed for this purpose is showed at Fig. 5.2.
Final results 31 Fig. 5.2 Reference synchronization of hardware device and VSA software 5.1.1. GPIB commands specified Although the complete programming code is placed on the annexes, the main GPIB commands required are here specified. Each hardware device has an option to specify a GPIB address by a number. Once it is specified, when some instruction affect to these devices, it has to be referenced them by these addresses. At this work, the spectrum analyzer GPIB address is 18 and the signal generator GPIB address is 19. Firstly, the devices joined by the GPIB cable should be identified. When the SCPI command idn (identify) is used, Matlab prompts the next identification. % for the spectrum analyzer g18=gpib('ni',0,18); g18.InputBufferSize=50000; fopen(g18) fprintf(g18, '*IDN?'); idn = fscanf(g18) % for the signal generator g19=gpib('ni',0,19); g19.InputBufferSize=50000; fopen(g19) fprintf(g19, '*IDN?'); idn = fscanf(g19) idn = Agilent technologies, E4448A, US43360350, A.08.09 (for the signal generator) idn = Agilent technologies, ESG-D4000B, GB40051154, B.03.86 (for the spectrum analyzer)
32 Digital predistortion by using GPIB-controlled instrumentation With the goal to linearise the PA, a signal should be sent from the signal generator. In order to have a whole control of the system, the signal is designed into Matlab. Any type of signal that supports the VSA software –specified completely at the annexes– could be implemented on Matlab and sent it to the signal generator. Specifically, a 4-QAM signal is considered in this study. It is important to know all the characteristics of the signal to specify correctly the VSA parameters for the subsequent demodulation. The main characteristics of the 4QAM signal implemented to predistort the PA are showed at Table 5.1. Table 5.1 4-QAM signal parameters Symbols number 1000 Roll-off factor (α) 0.35 VSA Clock 6.144 MHz Number points per symbol 4 Symbol rate (Clock VSA/points per symbol) 1.536 MHz Carrier frequency 2.010 GHz Power level 2 dBm Filter order 80 These parameters have to be in mind because they will be used later to identify the VSA and the spectrum analyzer parameters as a receivers. For instance, the frequency and power level SCPI commands for the spectrum analyzer are specified here. In this case, the center frequency is fixed to 2.01GHz and the span of the spectrum analyzer is fixed to 40MHz. It is important to observe that the specifications are sent as a string. It is possible to send the commands as bits, but it must be previously selected. This allows a highly speed at communication. freq_cent=2.010; cadena=[':FREQ:CENT ',num2str(freq_cent),' GHZ']; fprintf(g18,cadena); freq_span=40; cadena=[':FREQ:SPAN ',num2str(freq_span),' MHZ']; fprintf(g18,cadena) Once the signal is made on Matlab, it is sent to the signal generator by means of GPIB commands. In order to send the signal, the load SCPI command is used, but it must be adapted to the dynamic range of the signal generator. At Fig. 5.3, a complete flow diagram of the GPIB-SCPI commands used to load the signal to the Agilent device is presented.
Final results 33 Fig. 5.3 Flow diagram of the GPIB-SCPI commands to send the signal The first aspect that must be done, as it has been commented before, is the GPIB hardware devices identification in order to create an object in Matlab and so, to have the possibility to communicate with them. Later, the signal generator and spectrum analyzer adjustments must be done. At the first one, aspects as the carrier power and frequency of the signal are firstly adjusted. Then, the signal can be sent from Matlab by the esg_darb GPIB command. But before this, the signal created in Matlab should be adapted to the dynamic range of the signal generator in order to achieve a correct implementation. The ARB (arbitrary waveform) is then activated. It allows to select the signal sent by the user. And finally, the RF output is changed to ON with the objective to allow to the Signal Generator launch the signal to the PA. An important issue is the ALC (Automatic Level Control). When ALC is set to ON, the internal level detector watches the output level. So, it may not shift greatly from the set amplitude value. If the output level is greater than the specified level, the output amplifier's gain will be reduced, and if the output level is smaller, the output amplifier's gain will be increased. However, in some cases when the ALC is unable to maintain the output level, the unlevel message appears to notify the unleveled condition to the user. Thus, in order to allow the user change the amplitude from Matlab, the ALC should be OFF because if not, it will be never seen the correct amplitude value. If the signal wants to be seen on the spectrum analyzer, it must be adjusted, at least, the center frequency and the span. On the contrary, if it will be seen on the PC by the VSA software, the VSA 89600 object must be created by means of the COM API commands –described before on section 4.2–. The whole system is showed at Fig. 5.4. The Predistortion block is used just when the PA identification is finished10. On the VSA software, the signal parameters sent from Matlab should be specified for the correct demodulation. 10 For more information, go to the section X.
34 Digital predistortion by using GPIB-controlled instrumentation Once the signal pass across the spectrum analyzer and the VSA object is created, all the “star” points at Fig. 5.4 could be studied from VSA software and, therefore, form Matlab. As it has been mentioned before, different information can be taken form the VSA software. Fig. 5.4 Whole system (Matlab, hardware devices and VSA) Although Fig. 5.4 shows a complete transmitter and receiver system –suitable if a correct demodulation of the signal sent wants to be realized–, this flow diagram is not correct in order to predistort the signal. Here, a root raised cosine shaping filter is used in order to adapt the signal. As it has been widely explained on chapter 2.2, the PA input and PA output are compared to predistort the signal. Thus, the demodulated shaping filter must be deleted with the goal to obtain the data once it has passed across the PA. How it must be done and all the defined VSA parameters values are clarified on next section. 5.1.2. VSA fixed and identified parameters Once the main VSA characteristics are known –described on chapter 4–, the specific options and identified parameters used are here explained. It is widely specified the most important aspects considered and the mainly problems solved when the work was advancing. 5.1.2.1 Issues on parameters of the signal sent The main parameters that must be selected on the VSA software to achieve a good demodulation data and to achieve the correct graphs are the parameters related to the signal information. In concrete, firstly it has to be selected the modulation format –in this case a 4QAM modulation format is selected among the all possible formats allowed to
Final results 35 use with the VSA11-. Then, aspects as the number of samples per symbol and α parameter of the filter are chosen. Finally, regarding to the signal information, another important issue is the symbol rate. Because the signal is made from Matlab and then taken out by the Agilent signal generator, the symbol rate is directly proportional to the reconstruction clock on the Agilent hardware device. On this device, the clock can be changed between a minimum value of 1 Hz and a maximum value of 40MHz. The clock selected is the defect value when the Agilent signal generator starts: 6.144MHz. Thus, in order to know the symbol rate of the signal sent to the PA, (5.1) should be followed. (5.1) 5.1.2.2 Issues related to the measurement options Different issues had to be into account. These ones are here listed. • Range.- When the VSA is working, the range is quite important to obtained the correct values. If the input range is setting too low (more sensitive than necessary), the analyzer's ADC circuitry introduces distortion into the measurement. But if the input range is setting too high (less sensitive than necessary), there may be a loss of dynamic range due to additional noise. In some cases, the increase in the noise floor may obscure low-level frequency components. The right way to choose the correct range value is the “proof and error” method. When the range value is not the correct, a message will appear on the screen. • Measurement filter and reference filter.- The Fig. 5.5 is used to try to clarify these parameters,. Fig. 5.5 Flow signal diagram 11 All the modulation formats supported by the VSA software are showed on the annexes.
42 Digital predistortion by using GPIB-controlled instrumentation 6.3.2. Predistortion curve identification (LUT values) Fig. 6.7 Estimated predistorter function (LUT case) Here, the upper blue line is due to the LUT initialization. Because of LUT is initialized by ones, the points of this LUT that are not excited by the PA will continue with this value. So, the blue points (estimated predistorter function) are all these LUT points that change its value. In Fig. 6.7 a LUT size equal to signal points are used (4000 points). Nevertheless, it is a high value. Usually, FPGA works with 512 or 1024 points. Working with less points, and comparing the LUT values when one iteration or 30 iterations are used (changing the amplitude of the signal sent), is represented on Fig. 6.9. Notice how the compression gain effect is less here. The reason is that it is applied less carrier power level to the signal. Fig. 6.8 AM/AM curve with just one iteration
Final results 43 Fig. 6.9 (a) Estimated predistorter function, LUT values for one iteration (b) Estimated predistorter function, LUT values for 30 iterations It is clearly appreciated how LUT change the values of the points that are excited by the PA signal. After 30 iterations (changing the signal amplitude), there are more points that changes its value than when just one iteration is applied. 6.3.3. Gain curve. LUT size implication. By means of Fig. 6.10, where the PA gain curve is represented, the LUT size implication is studied. Having a LUT size longer, obviously, more points are represented. However, if the LUT size is shorter, the effect that produces in the curve is like a mean would be done. Fig. 6.10 (a) Gain function, LUT size = 512 (b) Gain function, LUT size = 2048
44 Digital predistortion by using GPIB-controlled instrumentation 6.4. Adaptive predistortion results (LMS algorithm) Now, an adaptive predistortion is implemented. The LMS algorithm is used with a µ parameter of 0.01. 6.4.1. PA identification Fig. 6.11 AM/AM curve with just one iteration 6.4.2. Predistortion curve identification Using the LMS algorithm, the LUT result is this one. It is clearly appreciated how with one iteration, the LUT is nearly all ones. It is due to the µ parameter, which is too small (0.01). So, the convergence of the LUT values is slower than the others algorithm. But using an adaptive predistortion implies a better approximation to the real function. The reason, as it has been commented before, is that this algorithm have into account the past values. If the Fig. 6.12 (b) is observed, it can be seen how the LUT values are taking the correct predistortion function form with 100 iterations. Once the LUT have the correct values after several iterations, the convergence is better than the other algorithms used in this study.
Final results 45 Fig. 6.12 (a) Estimated predistorter function, LUT values, one iteration. µ=0.01 (b) Estimated predistorter function, LUT values, 100 iterations. µ=0.01
46 Digital predistortion by using GPIB-controlled instrumentation CHAPTER 7. CONCLUSIONS The goal is finally achieved. The complete system is absolutely controlled by Matlab. The signal is created from Matlab, sent to the PA and finally obtained again from Matlab, making the GPIB commands and the VSA software transparent to the user. Regarding the VSA software, it has been proved that it is a very useful utility when a signal wants to be studied. All the information data of the signal could be shared with Matlab. Thus, it makes possible to study the overall system. Until now, it was only achievable to see the received signal in a Spectrum Analyzer and, as much, to see parameters as the constellation points, the EVM or the ACPR. Now, with the VSA, the complete information data of all points of the signal could be saved and manipulated with Microsoft Excel, ADS or Matlab. Maybe at begin of using this software the user could be a little bit lost. But once all the VSA parameters and aspects are controlled it is easy to use. Moreover, the GPIB command, combined with this software, allows a complete control of a communication system. It is very practical for any kind of study. The platform and scenario achieved here can be used for a lot of works. For example, for prove PAs, for compare different linearization types or for any study in which ths signal wants to be considered. On the other hand, no more PA software models are needed in order to simulate the predistortion algorithm. The measurements can be done with a real PA and, besides, the phase information could be also linearised. Working with the real components and devices under test is always better than if a software model is used. About the digital predistortion, different conclusions are observed. Firstly, it has to be mentioned that the digital predistortion is achieved. It is proved how it improves the nonlinearities due to the PA. Different ways to do this predistortion are used and compared here: non-adaptive without LUTs, non-adaptive with LUTs and adaptive with LUTs. As it can be noticed at the figures showed on chapter 6, the predistortion without any type of LUT is quite “chaotic”. The outcome is resulting with blurring effects or with the points scattered. This is because the signal has 4000 points and an eight times bucle is done (changing the signal amplitude). Thus, 32000 points are finally presented. When no LUT is used, all these 32000 points are predistortioned and any type of mean of the predistortion curve is done. However, it is clear observed how the digital predistortion correctly works. The consequence of using predistortion is that the result is linear but losing PA gain. It is important to say that applying a digital predistortion before the PA the system total gain can be selected. Notice
Conclusions 47 on Fig. 6.5 how the result (black curve) follows just right the ideal curve (red line). On the other hand, a non-adaptive digital predistortion is done, but now with LUTs. The main advantage of using a LUT is the computational speed. Other advantage is that make a LUT is similar to make the mean of all the 32000 values in a less points (LUT size). It could be seen clearly comparing the graphs on chapter 6.2 with the graphs on chapter 6.3. It has to be mentioned that if a FPGA implementation wants to be developed, the LUT size should be power of two (512, 1024…) and the mean of all points can be done. With the LUT case, the result is more linear than if any LUT is used. Finally, an adaptive predistortion holding in a LMS algorithm is performed. In this case the LUT not depends exclusively on the actual value and it also depends on the past values of the LUT. It can be seen how the actualization of the LUT depends on the µ value. When the µ parameter is small, the progression is slower than if the µ value is big. In this study, a µ parameter of 0.01 is used. It will improve the performance of the overall system. 7.1. Future work Some works that could be done in a future with the platform Matlab – GPIB – VSA created are the followers: • Once the VSA is completely adaptive and transparent to a Matlab user, any signal test can be done. • For example, another algorithm to do the digital predistortion can be prove and compared with any else. For instance, the NARMA model [20]. • The comparison of several modulation signal types (4QAM, 16QAM…) or different standards (IEEE 802.16a, b, g…, UWB…) with a same PA. • The comparison of several PA models. • … 7.2. Environmental study It is important to have into account the environmental study in all projects done nowadays. The future must be sustainable and it depends exclusively in what is done today. This work talks about three main issues: software, hardware and predistortion. All these issues have some relation, in some way, with the environmental study.
48 Digital predistortion by using GPIB-controlled instrumentation • Software: Software is the less participant in environmental aspects of this work, although it has some particular topic that must be in mind. The time that the code is running is directly proportional to the energy consumed by the PC. So, the code should be efficiently created for having a less time running. • Hardware: The hardware equipment is composed by a lot of electric pieces. All these parts must be places on the correct container when the device is broken or is obsolete. • Predistortion: As it is said before on this work, when the predistortion is working correctly, one can work close to the compression point, achieving a longer battery life. So, if the battery life is extended implies that finally, the total energy used will be less.
Bibliography 49 BIBLIOGRAPHY [1] http://www.rf-amplifiers.com/index.php?topic=intercept [2] R.L. Brooker, “Spectral-Null Pulse Waveform for Characterizing Gain and Phase Distortion in Devices with Uncorrelated Frequency Translation or Limited CW Power Capability” [3] K.Fazel and S. Kaiser, “Analysis of Non-Linear Distortions on MC-CDMA” [4] B. Elbert and M. Schiff, “Simulating the performance of Communication Links with Satellite Transponders” [5] M. K. Nezami, “Fundamentals of Power Amplifier Linearization Using Digital Pre-Distortion”, High Frequency Electronics, September 2004 [6] P.L. Gilabert, G. Montoro and A. Cesari, “A Recursive Digital Predistorter for Linearizing RF Power Amplifiers with Memory Effects”, Proceedings of Asia- Pacific Microwave Conference, 2006. [7] W.J. Kim, S.P. Stapleton, J.H. Kim and C. Edelman, “Digital Predistortion Linearizes Wireless Power Amplifiers”, IEEE Microwave Magazine, pp. 54-61, September 2005. [8] J. Vuolevi, “Distortion in RF Power Amplifiers”, Artech House INC, 2003 [9] H. Qian, L. Ding, G.T. Zhou and J.S. Kenney, “Predistortion Linearization Measurement Results for Power Amplifiers with Memory Effects”, School of Electrical and Computer Engineering Georgia Institute of Technology Atlanta, GA 30332-0250, USA. [10] http://cnx.org/content/m10481/latest/ [11] A.C. Carusone and D.A. Johns, “Digital LMS Adaptation of Analog Filters Without Gradient Information”, University of Toronto. [12] http://en.wikipedia.org/wiki/Lookup_table [13] http://cp.literature.agilent.com/litweb/pdf/5989-4074EN.pdf [14] http://cp.literature.agilent.com/litweb/pdf/5968-3386E.pdf [15] http://en.wikipedia.org/wiki/VXI [16] http://en.wikipedia.org/wiki/Amphenol [17] http://en.wikipedia.org/wiki/Micro_ribbon
50 Digital predistortion by using GPIB-controlled instrumentation [18] http://www.scpiconsortium.org/scpiinfo2.htm [19] http://sine.ni.com/nips/cds/view/p/lang/en/nid/201586 [20] G. Montoro, P.L. Gilabert, E. Bertran, A. Cesari, D.D. Silveira, “A New Digital Predictive Predistorter for Behavioral Power Amplifier Linearization”.
Annex 51 ANNEX I. Supported modulation formats on the VSA II. Supported data formats on the VSA • Frequency response • Correction • Impulse response • Inst/average Error Vector Spectrum/Time • IQ Mag Error • Inst/average IQ Meas Spec • IQ Meas Time • IQ Phase error • Inst/average IQ Ref Spec • IQ Ref Time • Inst/average Spectrum • Raw Main Time • Search Time • Syms/Errs • Time
58 Digital predistortion by using GPIB-controlled instrumentation V. Program code Creating GPIB objects % ANALIZADOR g18=gpib('ni',0,18); g18.InputBufferSize=50000; fopen(g18) fprintf(g18, '*IDN?'); idn = fscanf(g18) % GENERADOR g19=gpib('ni',0,19); g19.InputBufferSize=50000; fopen(g19) fprintf(g19, '*IDN?'); idn = fscanf(g19) Creating VSA object hVSA = actxserver('AgtVsaVector.Application'); Configuring VSG carrier_level=-10; cadena=[':POW:AMPL ',num2str(carrier_level),' dBm']; fprintf(g19,cadena); pause(2) carrier_freq=2.010; cadena=[':FREQ:FIX ',num2str(carrier_freq),' GHZ']; fprintf(g19,cadena) pause(2) x_gpib=100*(1+i)*ones(100,1); fprintf(g19,':SOUR:RAD:ARB:STAT OFF') pause(2) esg_darb(x_gpib, 'IQSIGNAL'); pause(2) fprintf(g19,':SOUR:RAD:ARB:WAV "ARBI:IQSIGNAL"') pause(5) fprintf(g19,':SOUR:RAD:ARB:STAT ON') pause(5) fprintf(g19,':POW:ALC:STAT OFF'); x_vsg=(1+i)*ones(200,1); loadVSG Configuring Spectrum Analyzer midelay=1e8; freq_cent=2.010; cadena=[':FREQ:CENT ',num2str(freq_cent),' GHZ']; fprintf(g18,cadena); for buffer1 = 1:midelay,
Annex 59 buffer2=2+2; end freq_span=40; cadena=[':FREQ:SPAN ',num2str(freq_span),' MHZ']; fprintf(g18,cadena) for buffer1 = 1:midelay, buffer2=2+2; end Configuring VSA parameters hMeasurement = get(hVSA,'Measurement'); hFrequency = get(hMeasurement,'Frequency'); set(hFrequency,'Center',2.01e9); set(hFrequency,'Span',10e6); nsamp=4; ResultL=100; set(hMeasurement,'DemodConfig',2); hDemod = get(hMeasurement,'DigDemod'); set(hDemod,'FilterAlpha',0.22); %Alpha cosine set(hDemod,'Format',4); %QPSK set(hDemod,'MeasFilter',2); %Root Raised Cosine set(hDemod,'RefFilter',1); %Raised Cosine set(hDemod,'ResultLen',ResultL); %Result length set(hDemod,'PointsPerSymbol',nsamp); %Points per symbol set(hDemod,'SyncSearch',1); %SyncSearch set(hDemod,'SyncPattern','0001101100011011000110110001101100011011'); %SyncPattern or pilot message clock=6.144e6; %VSG Clock SymRate=clock/nsamp; set(hDemod,'SymbolRate',SymRate); %Symbol Rate hDisplay = get(hVSA,'Display'); hTraces = get(hDisplay,'Traces'); hTrace1=get(hTraces,'Item',1); hTrace2=get(hTraces,'Item',2); hTrace3=get(hTraces,'Item',3); hTrace4=get(hTraces,'Item',4); hTrace5=get(hTraces,'Item',5); hTrace6=get(hTraces,'Item',6); set(hTrace1,'Format','vsaTrcFmtVectorIQ'); set(hTrace1,'DataName','IQ Meas Time1'); set(hTrace1,'Active',1); set(hMeasurement,'Continuous',1); invoke(hMeasurement,'Start'); Create waves clc len_sym=1000; nsamp=4; len=len_sym*nsamp; clock=6.144e6; %VSG Clock SymRate=clock/nsamp; M=4; rolloff = 0.35; % Rolloff factor of filter
60 Digital predistortion by using GPIB-controlled instrumentation sincro=[0; 1; 2; 3; 0; 1; 2; 3; 0; 1; 2; 3; 0; 1; 2; 3; 0; 1; 2; 3]; %Pilot message in order to synchronize the VSA signal=randint(len_sym-length(sincro),1,M); signal=[sincro; signal]; %Signal to modulate signal=[signal; signal]; constellation=[1+j*1 -1+j*1 1-j*1 -1-j*1]; modsignal=genqammod(signal,constellation); filtorder = 80; % Filter order delay = filtorder/(nsamp*2); % Group delay (# of input samples) rrcfilter = rcosine(1,nsamp,'fir/sqrt',rolloff,delay); wave_4qam=rcosflt(modsignal,1,nsamp,'filter',rrcfilter); wave_4qam=wave_4qam(1+40:1:len+40); wave_4qam=wave_4qam/max(abs(wave_4qam)); disp('** creadas las ondas'); Load Matlab signal to VSG xi=real(x_vsg); xq=imag(x_vsg); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % GPIB AND DAC SIGNAL FORMAT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AMPLITUD=8190; CENTRO=8192; xi_escalada=round(xi*AMPLITUD+CENTRO); xq_escalada=round(xq*AMPLITUD+CENTRO); clear buffer1; clear buffer2; buffer1=dec2hex(xi_escalada,4); buffer2(:,1)=buffer1(:,3); buffer2(:,2)=buffer1(:,4); buffer2(:,3)=buffer1(:,1); buffer2(:,4)=buffer1(:,2); xi_gpib=hex2dec(buffer2); clear buffer1; clear buffer2; buffer1=dec2hex(xq_escalada,4); buffer2(:,1)=buffer1(:,3); buffer2(:,2)=buffer1(:,4); buffer2(:,3)=buffer1(:,1); buffer2(:,4)=buffer1(:,2); xq_gpib=hex2dec(buffer2); x_gpib=xi_gpib+i*xq_gpib; fprintf(g19,':SOUR:RAD:ARB:STAT OFF') midelay1000; esg_darb(x_gpib, 'IQSIGNAL'); midelay1000; midelay1000; midelay1000;
Annex 61 fprintf(g19,':SOUR:RAD:ARB:STAT ON') midelay1000; midelay1000; midelay1000; Initialize LUTs f0_in=[0.1:0.001:1]'; f0_gain=ones(length(f0_in),1); f0_contador=zeros(length(f0_in),1); f1_in=[0.1:0.001:1]'; f1_gain=ones(length(f1_in),1); f1_tau=0; g1_in=[0.1:0.001:1]'; g1_gain=ones(length(g1_in),1); g1_tau=0; disp('** inicializadas las LUTs'); Predistortion x_dpd=x_gen*amplitude_wave; disp('** INICIO predistortion'); switch PD_type case 1 disp('** haciendo la DPD tipo 1 (promedio de luts)'); for n=1:length(x_dpd) [valor_f0,indice_f0]=min(abs((f0_in-abs(x_dpd(n))))); y_dpd(n,1)=f0_gain(indice_f0)*x_dpd(n); end %%%%%%%%%%%%%%%%%%%%%%%%% case 2 disp('** haciendo la DPD tipo 2 (lut-LMS)'); for n=1:length(x_dpd) [valor_f0,indice_f0]=min(abs((f0_in-abs(x_dpd(n))))); y_dpd(n,1)=f0_gain(indice_f0)*x_dpd(n); end %%%%%%%%%%%%%%%%%%%%%%%%% otherwise disp('Unknown method.') end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% disp('** FINAL de la predistortion'); Update LUTs disp('** INICIO update'); AM_in=abs(x_ampli); PM_in=angle(x_ampli); AM_out=abs(y_ampli); PM_out=angle(y_ampli); deltaPM_out=PM_out-PM_in; %
62 Digital predistortion by using GPIB-controlled instrumentation % amplificacion deseada ampli_desired_gain=0.6; % switch PD_type case 1 disp('** haciendo la DPD tipo 1 (promedio de luts)'); for n=1:length(x_dpd) [valor1,indice1]=min(abs(f0_in-abs(x_dpd(n)))); [valor2,indice2]=min(abs(y_ampli-ampli_desired_gain*x_dpd(n))); if abs(x_dpd(n))>=0.1 f0_contador(indice1)=f0_contador(indice1)+1; f0_gain(indice1)=0.5*f0_gain(indice1)+0.5*(x_ampli(indice2)/x_dpd(n)); end end case 2 disp('** haciendo update de la DPD tipo 2 (lut-LMS)'); mu_f0=0.01; for n=1:length(x_dpd) [valor_f0,indice_f0]=min(abs(f0_in-abs(x_dpd(n)))); buffer_ampli_gain=y_ampli(indice_f0)/y_dpd(indice_f0); error=ampli_desired_gain*x_dpd(indice_f0)-y_ampli(indice_f0); f0_gain(indice_f0)=f0_gain(indice_f0)+mu_f0*error*(buffer_ampli_gain*x _dpd(indice_f0))'; end otherwise disp('Unknown method.') end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % disp('** FINAL del update'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %
Annex 63 VI. GPBI cable datasheet
64 Digital predistortion by using GPIB-controlled instrumentation
Annex 65 VII. PA datasheet
66 Digital predistortion by using GPIB-controlled instrumentation VIII. VSA object programming tree
Annex 67