13
Spectral Shaping for Communication Systems Alastair Graves Brasenose College January 2015 Introduction Recent years have seen an increasing use of Ultra-Wideband (UWB) technology to transmit large quantities of data over relatively short distances [1]. This has raised concerns among users and manufacturers of devices also operating in the frequency band used by UWB, as the use of such frequencies is generally licenced and expensive. Detection And Avoidance (DAA) subsystems have been mooted as a possible solution [2] and one particular proposal has been to base future UWB technologies on the single carrier block transmission with frequency-domain equalisation (SC-FDE) model. This allows a time-domain window to be applied to each data block to minimise interference in the required frequency band; in short, a deep notch can be created in the UWB signal. This report describes a method of calculating the optimal window such that any interference is minimised. This optimisation process is performed in the mathematical program Matlab and the various steps taken are detailed below. Several basic methods for window construction were trialled and the results of their analysis, also undertaken in Matlab, are provided in this report. Initially a simple frequency-nulling approach was tested and found to be too primitive. A matrix manipulation and eigenvector-based technique was studied but was also found to be inappropriate for the needs of UWB communication. Finally, optimisation with barrier functions (employing Newton’s method) was found to yield acceptable outputs and a detailed examination of its operation is presented. Generating a test signal In order to carry out analysis of various window-construction methods, it was first necessary to generate a digital test-signal. To this end, the initial programming task created a function to generate an array of constellation symbols for either QPSK or 16-QAM. These symbols were then displayed on an Argand diagram and the figure saved to the home directory.

Spectral shaping in Matlab

Embed Size (px)

DESCRIPTION

Shaping a communication signal in MATLAB

Citation preview

Spectral Shaping for Communication SystemsAlastair Graves Brasenose CollegeJanuary 2015

IntroductionRecent years have seen an increasing use of Ultra-Wideband (UWB) technology to transmit large quantities of data over relatively short distances [1]. This has raised concerns among users and manufacturers of devices also operating in the frequency band used by UWB, as the use of such frequencies is generally licenced and expensive. Detection And Avoidance (DAA) subsystems have been mooted as a possible solution [2] and one particular proposal has been to base future UWB technologies on the single carrier block transmission with frequency-domain equalisation (SC-FDE) model. This allows a time-domain window to be applied to each data block to minimise interference in the required frequency band; in short, a deep notch can be created in the UWB signal. This report describes a method of calculating the optimal window such that any interference is minimised. This optimisation process is performed in the mathematical program Matlab and the various steps taken are detailed below. Several basic methods for window construction were trialled and the results of their analysis, also undertaken in Matlab, are provided in this report. Initially a simple frequency-nulling approach was tested and found to be too primitive. A matrix manipulation and eigenvector-based technique was studied but was also found to be inappropriate for the needs of UWB communication. Finally, optimisation with barrier functions (employing Newtons method) was found to yield acceptable outputs and a detailed examination of its operation is presented.

Generating a test signalIn order to carry out analysis of various window-construction methods, it was first necessary to generate a digital test-signal. To this end, the initial programming task created a function to generate an array of constellation symbols for either QPSK or 16-QAM. These symbols were then displayed on an Argand diagram and the figure saved to the home directory.The top-level code for this task, get_sym, exploited the switch and case structure, using the users input of QPSK or 16-QAM to determine which case was to be implemented. Initially the signal generation was approached though the use of Matlabs randi operation; an exhaustive N-tuple row vector ('const_sym') of possible symbols was created manually and Matlab used to construct the output vector d by selecting symbols from this at random. This was error-prone (an incorrect const_sym matrix would yield an invalid d) and an alternative method was sought. This made use of the datasample function to select real and imaginary coefficients. This allowed a much smaller const_coeff row vector to be created for both constellations (indeed, for QPSK the only contents were -1 and 1) and the datasample function randomly chose a real and imaginary coefficient from these possible values. As a result, the code could be simplified to a simple for loop, as shown in Code Extract 1.Code Extract 1: Matlab code to generate a random QPSK or 16-QAM signal

The output of the get_sym function was then plotted and the output saved. To allow the Argand diagram to be appropriate to the users choice of QPSK or 16-QAM the title of the figure made use of the strcat function to concatenate the generic Constellation diagram title with the words QPSK or 16-QAM. The axes were scaled automatically to 1.5 times the maximum coefficient, i.e. 1.5 or 4.5.

Method 1 Frequency NullingHaving established a means of generating random signals of either the QPSK or 16-QAM constellations, an investigation was made into the most basic of notch-construction methods: nulling. This entailed simply setting the frequency indices in the region of the desired notch to zero. The notch_data_v1 function was completed and N random QPSK symbols were used as an input signal. The user specified the desired location of the notch with the input indices vector and these were set to zero by the function. Matlabs built-in fft function was exploited to return the signal to the time domain by obtaining the inverse discrete Fourier transform before its magnitude and real and imaginary parts were plotted on a log-scale graph and Argand diagram respectively.Figure 1 Two different QPSK outputs (shown on linear (above) and logarithmic (below) graphs) of the notch_data_v1 function from the input N = 64, indices = 29:34

As the input signal was randomly generated by the get_sym function, the same input command gave different results each time, as can be seen in Figure 1. The discontinuities in the logarithmic graph are due to the nulled values at the notch. The main drawback of this basic approach is best seen in the Argand diagram (Figure *****), however. When the notched signal is converted back into the time domain the missing frequencies mean that original time-domain isnt recovered fully. The Argand diagram shows that the symbols are slightly different to the exact values generated by the get_sym function. This effect is magnified as more samples are set to zero; indeed when only one sample is nulled the recovery of the original symbols is relatively accurate (Figure *****). It would not be possible to transmit these symbols and clearly alternative method is sought such that the application of the window does not affect the phase of the input signal. Comment by Alastair: Possibly add detail on WHY time-domain not fully recovered

Figure 2 The effects of the notch size on the QPSK signal in the time domain. a)shows the un-notched signal, b)the signal with a single-index (indices = 29), and c)the effects of indices = 29:34.a)b)c)

UpsamplingThe graphs in Figure 1 are clearly far from smooth and something must be done to address this. The process of upsampling fulfils this need; it is commonly used in digital signals to increase the effective sampling rate [3]. Interpolation and upsampling (at least in digital signals) are synonymous and the latter generally involves the insertion of a number of zeros, proportional to the upsampling factor (), between the samples of the original signal. In the case of SC-FDE -1 such padding zeros can be added to each precoded block or appended whilst taking the discrete Fourier Transform (DFT; (-1)N zeros are affixed to the end of each d vector and the N-point DFT taken). This work described by this report used the second approach by exploiting the fft function introduced above and its effects can be seen in Figure 3.Figure 3: Graph showing the effects of upsampling. The signal generated by an input of N=62, indices=20:30 was plotted twice, once with no upsampling (=1, black) and once =10 (red). Clearly the black line is simply a linear interpolation between each sample while the upsampling creates a much smoother plot.

Method 2 Using eigenvectorsHaving established the requirement for upsampling an alternative method of calculating the window can be investigated. The minimisation problem can be stated as [4]

and Lagrangian Multipliers used to obtain an augmented cost function

This was differentiated and equated to zero to find the minimum cost:

Hence

meaning is an eigenvalue of the matrix. Furthermore, given that is the Lagrangian Multiplier and must be minimised, the window vector, is simply the eigenvector corresponding to the minimum eigenvalue of this matrix.A Matlab function was written to complete this calculation. eigen_window took the signal vector , the upsampling factor and the indices of the desired notch as inputs. It generated several matrices and calculated the eigenvector corresponding to the minimum eigenvalue of the matrix calculated above. The results were once again displayed graphically in both the time and frequency domains.

This new method can be seen in Figure 4 to be very effective at creating a deep notch in the desired location. Where it differentiates itself from the previous approach, however, is seen in the Argand diagram of the post-processing signal; there is clearly no phase attenuation. For a constant-modulus constellation such as QPSK this is of vital importance as it means that little information would be lost during transmission. Figure 4: Outputs from the eigen_window function for the inputs a)N=64, indices=30:40 and, b)N=128, indices =100:105 (=10 for both cases). Note that the phase is preserved in the Argand diagram and a deep notch has been cut in the both logarithmic and linear output signal graphs.b)a)

Method 3: Barrier-newton methodThe eigenvector-based approach does have one shortcoming, however. The window vector that it constructs is composed of positive and negative values, which makes it difficult for the receiver to decode the signal accurately. Negative values in the window vector cause points in the Argand diagram to be reflected from one quartile to another, rendering it impossible for the receiver to know the location of the original point. Coon (2008) [4] suggests a reformulation of the original minimisation problem that restricts every element of the window vector to be greater than some arbitrary small and positive value. It is also possible to relax the equality constraint used above, such that the problem is now

This is now a convex problem and several nonlinear optimisation are available to solve it. The inequality constraints mean that an interior point method known as the barrier method was deemed suitable [5]; this involves the creation of a logarithmic barrier functions for each constraint and incorporating these into the original cost function. Thus the augmented cost function is now

Table 1: Basic structure of Newtons method. A backtracking linesearch was used to calculate .

where is the zero column vector with a single 1 in the th position. The parameter sets the accuracy of the approximation [5] and the algorithm increases its value on each iteration as the approximation converges. First, however, the optimal value of and quitting criteria is calculated for the current value of; the method stops iterating if , where , the number of constraints, and returns the current optimal value of . Newtons method was employed to find this optimal value, as shown in Table 1. A backtracking linesearch was used to determine the size of each step within Newtons method as it is well-suited for Newton methods [6].The Matlab function barrier_method was written to execute the barrier method (Code Extract 2). Within this the newton function called upon several sub-functions, such as hessian_cost, gradient_cost, and backtracking_line_search to calculate the optimal for each iteration (Code Extract 3). There are clearly several parameters that need to be defined within both the Barrier and Newtons method; these were defined as inputs to the barrier_method function to allow their influence to be investigated. Code Extract 2: Basic code to execute the barrier-newton method.

This method clearly cut a deep notch in the QPSK signal, as can be seen from Figure 5. Furthermore, the output has a clear attenuation limit meaning that the receiver will easily be able to decode the signal; the application of the window has not caused symbols to change quartile and hence no data will be lost. Figure 5: Output of barrier_method function for inputs a) N=64, =5, indices=35:40, and b) N=128, =5, indices=95:100.a)b)Code Extract 3: Basic code to execute Newtons method with a backtracking linesearch.

Analysis of barrier methodAs mentioned above, the barrier_method function takes several parameters as inputs ( coded as t, step_size, tolerance_o and tolerance_i). Varying any of these leads to different output signals and there is hence potential for an extensive analysis of their effects. This section presents such an analysis. The approach taken was to select a set of default parameter values (and study the effects of variations to one parameter at a time. The approximation accuracy parameter was the first to be investigated. The barrier_method function was modified to include counters for each sub-routine (variables such as newton_counter and hessian_counter were defined and incremented on each call of their respective function) and timers that measured the time it took to execute each section of the main function (using Matlabs tic and toc operations). All analysis used a 64-sample QPSK signal with a notch at positions 20-30, upsampled with an upsampling rate of 5. A script was compiled that ran this modified barrier_method function repeatedly, incrementing the value of each time. The script made use of the timers and counters to plot graphs to show the influence of on the running time and number of calls of each function, as shown in Figure 6. The graph against processing time was truncated at 10 as there was no major variation thereafter, while the number of function calls continued to decrease with increasing. The drop to zero in the function calls graph is due to the quit criterion of the barrier_method function; when is greater than (the number of constraints) the quit criterion is satisfied immediately (Figure 6) and Matlab simply returns the initial value of , i.e. that arbitrarily set during the function initialisation. Figure 6: The effect of varying the initial value of the approximation accuracy parameter

A similar script was written to study the effects of the initial value of , the step size used in the barrier method. It emerges that the value of has no effect on the quality or sharpness of the notch and only a marginal effect on the run time. A larger merely causes to increase more quickly, resulting in the quite criterion being satisfied sooner. Indeed, such an effect can be seen in Figure 7. This graph was also truncated, as there is little interesting data beyond sample point 4. For and there is predictably a sudden fall in processing time at sample 33, as after one iteration of the barrier method and the quit criterion of is satisfied. Thereafter the processing time is constant as the barrier method algorithm is only ever executed once.Figure 7: Influence of on the processing time of the barrier_method function. The graph plotting time clearly remains constant while the total run time falls

The influence of was next to be studied and was found to have a similar impact to As the quit criterion mentioned above depended on , , and it is clear that increasing will have an identical effect to raising , as it is responsible for the value of after each iteration. The graph of against processing time reflects this and it wsa not deemed necessary to include it, such is its likeness to Figure 7. also has no effect of the depth of sharpness of the notch.Figure 9: Variation of the standard deviation of the notched signal with the value of Figure 10: Increasing causes a relaxation of the quite criterion of the newton method and a faster processing time

, however, does have a marked effect on the quality of the notch, though not linearly so. A very rough metric for a quasi-Q-factor was created by taking the standard deviation (Matlabs std operation was exploited) of the log of the output signal. This gave a reasonable representation of the notch quality as clearly a signal with a large notch would have a greater variance than an un-notched signal. It was found that increasing caused a noticeably less sharp notch (Figure 8), which was reflected in a discernible fall in this quasi-Q-factor. The reference value for an un-notched signal was also calculated and used for comparison, as shown on Figure 9. The explanation of this trend is relatively straightforward. As Table 1 shows, the quit criterion for the newton method is dependant on the value of and relaxing this criterion by increasing the value of merely reduces the number of iterations of the newton method, and hence its accuracy. Furthermore, fewer such iterations clearly reduces the processing time of the whole barrier_method function, as proved in Figure 10. Figure 8: Decreasing quality of notch as the value of is increased and the newton quit criterion are relaxed

Multiple notchesIn some situations it may be necessary to create multiple notches in an UWB signal to avoid it interfering with several different licenced signals. The function barrier_method_multiple was compiled to address this requirement. Through use of Matlabs varargin the new function allowed the user to enter as many input arguments as desired and hence specify the locations of many notches. An empty cell was constructed (dimension specified by the number of notches required) and the indices of each notch placed into a different row (Code Extract ***). By definition the matrix denotes the rows of that correspond to the (upsampled) interference tones, [4] meaning that the whole cell of notch indices was necessarily passed into the generate_WI_matrix function. There was calculated for each notch and the cell2mat operation employed to create a column vector containing all the indices of the required notches. This was used to extract the required rows from to construct (Code Extract ***) and the barrier method could then be executed as normal to construct all the required notches. Code Extract 4: Segments of code for the generate_WI_matrix functionCode Extract 5: Segments of code for the barrier_method_multiple function

As can be seen from Figure **** this function cuts deep notches at each of the required locations. However, Figure *** also shows that there is a penalty for creating many notches. Indeed, there is a much more power variance in the 5-notched signal, and some sample points in regions between notches are attenuated almost as much as those within the notch, meaning it may be harder for the receiver to decode the signal.An alternative method may solves this issue by considering a more mathematical approach to this problem. Instead of merely extending the matrix, a separate cost function could be defined for each notch, such that the augmented cost function would include two costs and a set of constraints. This approach, however, would not be as easy to implement in Matlab as an entirely different function would need to be written for each number of notches.

Figure****: Output signals for inputs of N=128, =5, and a) indices=20:25, varargin=70:85, and b) indices=20:25, varargin= 5:15, 50:65, 95:100, 115:120.a)b)

ConclusionThis report has considered the challenge of preventing interference in digital UWB signals. The objective throughout has been to construct a deep notch in the output signal to avoid overlap with licenced frequencies and several methods have been trialled to achieve this. The first employed a simple nulling technique whereby the frequencies at the notch location were simply set to zero. This created an adequate notch but the original information carried in the signal was lost as the phase was not preserved. Next, Lagrangian Multipliers were used to solve the optimisation (ie interference minimisation) problem and basic matrix manipulate exposed a simple eigenvector problem; the window vector could be was no more than the minimum eigenvector of an easily-calculable matrix. A basic Matlab function was compiled to execute this calculation and the results displayed graphically. Although a deep notch was produced the presence of both positive and negative values in the window vector meant that the application of the window resulted in a phase change of several of the sample points.The receiver would have found it difficult to decode these values and information would have been lost.Finally, a reformulation of the problem to remove these negative values allowed an interior point method known as the barrier method to be applied. Now a deep notch in the output was accompanied by a signal that could be decoded without knowledge of the window vector. The function that had been written was then analysed to investigate the influence of several input parameters. It was found that increasing the approximation accuracy parameter , all resulted in faster run-timesIt was not sufficient, however, merely to consider the case of a single notch and the last section of the report described a modification to the barrier_method code that allowed the construction of multiple notches. There was a tradeoff between notch number and possible accuracy of decoding, an issue that would be well-suited to further investigation.

Bibliography

1. D. Porcino, W. Hirt, , Ultra-wideband radio technology: potential and challenges ahead, IEEE Commun. Mag., vol. 41, no. 7, pp.66,74, July 2003.2. S. Shetty, R. Aiello, Detect and avoid (DAA) techniques - enabler for worldwide ultra wideband regulations', IET Conference Proceedings, pp. 21-29, 2006.3. B. P. Lathi, R. A. Green, Essentials of Digital Signal Processing. Cambridge University Press, 2014.4. J. P. Coon, Narrowband Interference Avoidance for Ultra-Wideband Single-Carrier Block Transmissions with Frequency-Domain Equalization, IEEE Trans. Commun.,vol. 7, no. 10, pp. 4032-4039, October 2008.5. S. Boyd and L. Vandenberghe, Convex Optimization. Cambridge University Press, Mar. 2004.6. J. Nocedal, S. Wright, Numerical Optimization. Springer Science & Business Media, 2006.