MATLAB Simulation

Frequency Diversity: Wide-Band Signals

Simulation of Wireless Communication
Systems using MATLAB
Dr. B.-P. Paris
Dept. Electrical and Comp. Engineering
George Mason University

Fall 2007

Paris

ECE 732

1

MATLAB Simulation
Frequency Diversity: Wide-Band Signals

Discrete-Time Equivalent System
Digital Matched Filter and Slicer
Monte Carlo Simulation

Outline

MATLAB Simulation
Frequency Diversity: Wide-Band Signals

Paris

ECE 732

2

MATLAB Simulation
Frequency Diversity: Wide-Band Signals

Discrete-Time Equivalent System
Digital Matched Filter and Slicer
Monte Carlo Simulation

MATLAB Simulation
I
I

Objective: Simulate a simple communication system and
estimate bit error rate.
System Characteristics:
I BPSK modulation, b ∈ {1, −1} with equal a priori
I
I
I
I

I

probabilities,
Raised cosine pulses,
AWGN channel,
oversampled integrate-and-dump receiver front-end,
digital matched filter.

Measure: Bit-error rate as a function of Es /N0 and
oversampling rate.

Paris

ECE 732

3

MATLAB Simulation
Frequency Diversity: Wide-Band Signals

Discrete-Time Equivalent System
Digital Matched Filter and Slicer
Monte Carlo Simulation

System to be Simulated

Sampler,
rate fs

N (t )

bn

s (t )

×

∑ δ(t − nT )

p (t )

×

R (t )
h (t )

+

ΠTs (t )

R [n] to
DSP

A

Figure: Baseband Equivalent System to be Simulated.

Paris

ECE 732

4

MATLAB Simulation
Frequency Diversity: Wide-Band Signals

Discrete-Time Equivalent System
Digital Matched Filter and Slicer
Monte Carlo Simulation

From Continuous to Discrete Time

I

The system in the preceding diagram cannot be simulated
immediately.
I

I

Main problem: Most of the signals are continuous-time
signals and cannot be represented in MATLAB.

Possible Remedies:
1. Rely on Sampling Theorem and work with sampled
versions of signals.
2. Consider discrete-time equivalent system.

I

The second alternative is preferred and will be pursued
below.

Paris

ECE 732

5

rate fs N (t ) bn s (t ) × ∑ δ(t − nT ) p (t ) × R (t ) h (t ) + ΠTs (t ) R [n] to DSP A Paris ECE 732 6 . I I Can be considered as a discrete-time system. Minor problem: input and output operate at different rates.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Towards the Discrete-Time Equivalent System I The shaded portion of the system has a discrete-time input and a discrete-time output. Sampler.

and contains only discrete-time signals and components.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Discrete-Time Equivalent System I The discrete-time equivalent system I I I is equivalent to the original system. I Insert fs T − 1 zeros between input samples. N [n ] bn R [n ] × ↑ fs T h [n ] + to DSP A Paris ECE 732 7 . Input signal is up-sampled by factor fs T to make input and output rates equal.

MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Components of Discrete-Time Equivalent System I Question: What is the relationship between the components of the original and discrete-time equivalent system? Sampler. rate fs N (t ) bn s (t ) × ∑ δ(t − nT ) p (t ) × R (t ) h (t ) + ΠTs (t ) R [n] to DSP A Paris ECE 732 8 .

MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Discrete-time Equivalent Impulse Response I To determine the impulse response h[n] of the discrete-time equivalent system: I I I I Set noise signal Nt to zero. output signal is impulse response h[n]. set input signal bn to unit impulse signal δ[n]. the impulse response is closely approximated by sampling p (t ) ∗ h(t ): h[n] ≈ p (t ) ∗ h(t )|(n+ 1 )Ts 2 Paris ECE 732 9 . Procedure yields: h [n ] = I 1 Ts Z (n+1)Ts p (t ) ∗ h(t ) dt nTs For high sampling rates (fs T  1).

MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Discrete-time Equivalent Impulse Response 2 1.6 Time/T 0.5 1 0.5 0 0 0.2 0.8 1 Figure: Discrete-time Equivalent Impulse Response (fs T = 8) Paris ECE 732 10 .4 0.

and variance equal to N0 /Ts . Procedure yields: The noise samples N [n] I I I are independent. complex Gaussian random variables. with zero mean. Gaussian with power spectral density N0 . output signal is discrete-time equivalent noise. white. I I I I Set input signal to zero. Paris ECE 732 11 .MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Discrete-Time Equivalent Noise I To determine the properties of the additive noise N [n] in the discrete-time equivalent system. let continuous-time noise be complex.

I I I Note that Es is controlled by adjusting the gain A at the transmitter. σs2 denotes the variance of the source. Procedure yields: Es = σs2 · A2 I I Z |p (t ) ∗ h(t )|2 dt Here. For the system under consideration. σs2 = 1. I Set noise N (t ) to zero. Compute the energy of the received signal R (t ). Paris ECE 732 12 . I I To determine Es . For BPSK. Es = A2 T .Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation MATLAB Simulation Frequency Diversity: Wide-Band Signals Received Symbol Energy I The last entity we will need from the continuous-time system is the received energy per symbol Es . Transmit a single symbol bn .

We proceed in three steps: 1. other scenarios are easily accommodated. Establish parameters describing the system.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Simulating Transmission of Symbols I We are now in position to simulate the transmission of a sequence of symbols. Paris ECE 732 13 . Collect statistics from repeated simulation. 2. I I The MATLAB functions previously introduced will be used for that purpose. I By parameterizing the simulation. Simulate discrete-time equivalent system. 3.

MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Listing : SimpleSetParameters. %% Parameters % construct structure of parameters to be passed to system simulator % communications parameters Parameters. % samples per symbol Parameters. % normalize received symbol energy to 1 Parameters. % symbol period Parameters.Alphabet = [1 -1].cos(2*pi*tts)*sin(pi/fsT)/(pi/fsT)).m 3 8 13 18 % This script sets a structure named Parameters to be used by % the system simulator.hh = sqrt(2/3) * ( 1 . Parameters. % number of Symbols % discrete-time equivalent impulse response (raised cosine pulse) fsT = Parameters.Es = 1. tts = ( (0:fsT-1) + 1/2 )/fsT. % Signal-to-noise ratio (Es/N0) Parameters. % BPSK Parameters. Paris ECE 732 14 .fsT.EsOverN0 = 6.NSymbols = 1000.fsT = 8.T = 1/10000.

MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Simulating the Discrete-Time Equivalent System I The actual system simulation is carried out in MATLAB function MCSimple which has the function signature below. The number of incorrect decisions is determined and returned. function [NumErrors. I I I The parameters set in the controlling script are passed as inputs. ResultsStruct] = MCSimple( ParametersStruct ) Paris ECE 732 15 . The body of the function simulates the transmission of the signal and subsequent demodulation.

LinearModulation.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Simulating the Discrete-Time Equivalent System I The simulation of the discrete-time equivalent system uses toolbox functions RandomSymbols. % % % % transmitter gain noise PSD (complex noise) corresponding noise variance N0/Ts gain through signal chain 34 39 %% simulate discrete-time equivalent system % transmitter and channel via toolbox functions Symbols = RandomSymbols( NSymbols. fsT ). NoiseVar ). and addNoise. Priors ). Paris ECE 732 16 . hh. Signal = A * LinearModulation( Symbols. N0/T*fsT. A N0 NoiseVar Scale = = = = sqrt(Es/T). if ( isreal(Signal) ) Signal = complex(Signal). Es/EsOverN0.% ensure Signal is complex-valued end Received = addNoise( Signal. A*hh*hh’. Alphabet.

MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Digital Matched Filter I I The vector Received contains the noisy output samples from the analog front-end. I I Such digital hardware may be an ASIC. The matched filter is the best possible processor for enhancing the signal-to-noise ratio of the received signal. Paris ECE 732 17 . The first function performed there is digital matched filtering. I I This is a discrete-time implementation of the matched filter discussed before. or DSP chip. FPGA. these samples would be processed by digital hardware to recover the transmitted bits. In a real system.

the vector Received is passed through a discrete-time matched filter and down-sampled to the symbol rate. R [n ] h∗ [−n] ↓ fs T Paris Slicer ECE 732 bˆ n 18 .MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Digital Matched Filter I In our simulator. discrete-time channel response h[n]. I The impulse response of the matched filter is the conjugate complex of the time-reversed.

Pulse. conj( fliplr(Pulse) ) ). Paris ECE 732 19 . % convolve received signal with conjugate complex of % time-reversed pulse (matched filter) Temp = conv( Received. 21 % down sample. fsT ) I The body of the function is a direct implementation of the structure in the block diagram above.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation MATLAB Code for Digital Matched Filter I The signature line for the MATLAB function implementing the matched filter is: function MFOut = DMF( Received. at the end of each pulse period MFOut = Temp( length(Pulse) : fsT : end ).

MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation DMF Input and Output Signal DMF Input 400 200 0 −200 −400 0 1 2 3 4 5 Time (1/T) 6 7 8 9 10 6 7 8 9 10 DMF Output 1500 1000 500 0 −500 −1000 0 1 2 3 4 Paris 5 Time (1/T) ECE 732 20 .

Part 200 100 0 −100 −200 −800 −600 −400 −200 0 200 Real Part 400 600 800 DMF Output Imag. Part 500 0 −500 −2000 −1500 −1000 −500 Paris 0 Real Part 500 ECE 732 1000 1500 2000 21 .MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation IQ-Scatter Plot of DMF Input and Output DMF Input 300 Imag.

For each output from the matched filter. the slicer determines the nearest noise-free signal location. The red circles in the plot indicate the noise-free signal locations for each of the possibly transmitted signals. The decision is made in favor of the symbol that corresponds to the noise-free signal nearest the matched filter output. Paris ECE 732 22 . I I The operation of the slicer is best understood in terms of the IQ-scatter plot on the previous slide.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Slicer I The final operation to be performed by the receiver is deciding which symbol was transmitted. I I I I This function is performed by the slicer. Some adjustments to the above procedure are needed when symbols are not equally likely.

end Paris ECE 732 23 . MSE] = SimpleSlicer( MFOut. % find locations for which distance is smaller than previous best ChangedDec = ( Dist < MinDist ). 33 % store new min distances and update decisions MinDist( ChangedDec) = Dist( ChangedDec ). Scale ) 28 %% Loop over symbols to find symbol closest to MF output for kk = 1:length( Alphabet ) % noise-free signal location NoisefreeSig = Scale*Alphabet(kk).MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation MATLAB Function SimpleSlicer I The procedure above is implemented in a function with signature function [Decisions.NoisefreeSig ). Decisions( ChangedDec ) = Alphabet(kk). Alphabet. % Euclidean distance between each observation and constellation po Dist = abs( MFOut .

The body of the function is shown on the next slide. Paris ECE 732 24 . The operation of the simulator is controlled via the parameters passed in the input structure.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Entire System I The addition of functions for the digital matched filter completes the simulator for the communication system. ResultsStruct] = MCSimple( ParametersStruct ) I I I The function simulates the transmission of a sequence of symbols and determines how many symbol errors occurred. I The functionality of the simulator is encapsulated in a function with signature function [NumErrors. it consists mainly of calls to functions in our toolbox.

Paris ECE 732 25 . Signal = A * LinearModulation( Symbols. Decisions = SimpleSlicer( MFOut(1:NSymbols). hh. fsT ). %% Count errors NumErrors = sum( Decisions ~= Symbols ).m 38 %% simulate discrete-time equivalent system % transmitter and channel via toolbox functions Symbols = RandomSymbols( NSymbols.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Listing : MCSimple. Priors ). Alphabet. hh. 48 Scale ).% ensure Signal is complex-valued end Received = addNoise( Signal. Alphabet. 43 % digital matched filter and slicer MFOut = DMF( Received. if ( isreal(Signal) ) Signal = complex(Signal). NoiseVar ). fsT ).

estimate the symbol error rate as the ratio of the total number of observed errors and the total number of transmitted bits. Paris ECE 732 26 . I The objective of the Monte Carlo simulation is to estimate the symbol error rate our system can achieve. The idea behind a Monte Carlo simulation is simple: I I I I Simulate the system repeatedly.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Monte Carlo Simulation I The system simulator will be the work horse of the Monte Carlo simulation. for each simulation count the number of transmitted symbols and symbol errors.

% compute Stop condition Done = NumErrors(kk) > MinErrors || NumSymbols(kk) > MaxSy 48 end Paris ECE 732 27 . NumSymbols(kk) = NumSymbols(kk) + Parameters.NSymbols. and accumulate counts for the quantities of interest while ( ~Done ) NumErrors(kk) = NumErrors(kk) + MCSimple( Parameters ).MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Monte Carlo Simulation I I The above suggests a relatively simple structure for a Monte Carlo simulator. Inside a programming loop: I I 43 perform a system simulation.

Put differently. we would like to be reasonably sure that the absolute difference |Pˆ e − Pe | is small.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Confidence Intervals I I Question: How many times should the loop be executed? Answer: It depends I I I on the desired level of accuracy (confidence). and (most importantly) on the symbol error rate. Paris ECE 732 28 . Confidence Intervals: I I I Assume we form an estimate of the symbol error rate Pe as described above. Then. the true error rate Pˆ e is (hopefully) close to our estimate.

that r sc = zc · Pe (1 − Pe ) . the error probability Pe .g.. I I I The parameter sc is called the confidence interval. I Specifically: Q (zc ) = (1 − pc ) /2. we want a high probability pc (e. it depends on the confidence level pc . It can be shown. zc = 1. I Example: for pc =95%. pc =95%) that |Pˆ e − Pe | < sc . I Question: How is the number of simulations determined from the above considerations? Paris ECE 732 29 . N where zc depends on the confidence level pc .MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Confidence Intervals I More specifically.96. and the number of transmitted symbols N.

thus. and sc = 10−4 . a stop criterion can be formulated from I I I I a desired confidence level pc (and. Paris ECE 732 30 . Pe = 10−3 . 000. zc ) an acceptable confidence interval sc . we obtain N = Pe · (1 − Pe ) · (zc /sc )2 . the error rate Pe . we find N ≈ 400. I I A Monte Carlo simulation can be stopped after simulating N transmissions. Example: For pc =95%.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Choosing the Number of Simulations I For a Monte Carlo simulation. Solving the equation for the confidence interval for N.

Then. it is desirable to specify the confidence interval as a fraction of the error rate. Pe · N = (1 − Pe ) · (zc /αc )2 ≈ (zc /αc )2 .g. Inserting into the expression for N and rearranging terms.1 for a 10% acceptable estimation error). I I I Recognize that Pe · N is the expected number of errors! Interpretation: Stop when the number of errors reaches (zc /αc )2 . I The confidence interval has the form sc = αc · Pe (e.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation A Better Stop-Criterion I I I When simulating communications systems. the error rate is often very small. Rule of thumb: Simulate until 400 errors are found (pc =95%. Paris ECE 732 31 . α =10%).. αc = 0.

% confidence interval size is 10% of estimate % For the desired accuracy. % simulate at most 1000000 symbols % desired confidence level an size of confidence interval ConfLevel = 0. ConfIntSize = 0. % control progress output 24 %% simulation loops % initialize loop variables NumErrors = zeros( size( EsOverN0dB ) ). we need to find this many errors.1.m 9 14 19 % comms parameters delegated to script SimpleSetParameters SimpleSetParameters. MinErrors = ( ZValue/ConfIntSize )^2. % simulation parameters EsOverN0dB = 0:0.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Listing : MCSimpleDriver.95. Paris ECE 732 32 .5:9. Verbose = true. NumSymbols = zeros( size( EsOverN0dB ) ). ZValue = Qinv( ( 1-ConfLevel )/2 ). % vary SNR between 0 and 9dB MaxSymbols = 1e6.

EsOverN0 = dB2lin( EsOverN0dB(kk) ). NumSymbols(kk) = NumSymbols(kk) + Parameters.m 32 37 42 for kk = 1:length( EsOverN0dB ) % set Es/N0 for this iteration Parameters.3g dB’. end EsOverN0dB(kk) ) ). % compute Stop condition Done = NumErrors(kk) > MinErrors || NumSymbols(kk) > MaxSymbol 47 end Paris ECE 732 33 . % inner loop iterates until enough errors have been found while ( ~Done ) NumErrors(kk) = NumErrors(kk) + MCSimple( Parameters ). % reset stop condition for inner loop Done = false.NSymbols.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Listing : MCSimpleDriver. % progress output if (Verbose) disp( sprintf( ’Es/N0: %0.

MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Simulation Results −1 10 −2 Symbol Error Rate 10 −3 10 −4 10 −5 10 −2 0 2 4 Es/N0 (dB) Paris ECE 732 6 8 10 34 .

Digital post-processing: digital matched filter and slicer. I I Close attention was paid to the accuracy of simulation results via confidence levels and intervals. continuous-time system and discrete-time equivalent was established. Derived simple rule of thumb for stop-criterion. I I I Relationship between original. Paris ECE 732 35 .MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Summary I Introduced discrete-time equivalent systems suitable for simulation in MATLAB. Monte Carlo simulation of a simple communication system was performed.

I Saw a lot of MATLAB examples for modeling diverse aspects of such systems.. wireless channels.. To do: consider selected aspects of wireless communication systems in more detail. Paris ECE 732 36 . advanced techniques for wireless communications. I Laid out a structure for describing and analyzing communication systems in general and wireless systems in particular. I Conducted a simulation to estimate the error rate of a communication system and compared to theoretical results.MATLAB Simulation Frequency Diversity: Wide-Band Signals Discrete-Time Equivalent System Digital Matched Filter and Slicer Monte Carlo Simulation Where we are . including: I I I I modulation and bandwidth.

MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity Outline MATLAB Simulation Frequency Diversity: Wide-Band Signals Paris ECE 732 37 .

I I In contrast.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity Frequency Diversity through Wide-Band Signals I We have seen above that narrow-band systems do not have built-in diversity. far outweigh the disadvantages and wide-band signaling is used in most modern wireless systems. Benefit: Only portions of the transmitted signal will be affected by deep fades (frequency-selective fading). wide-band signals cover a bandwidth that is wider than the coherence bandwidth. receiver is more complex. The benefits. Paris ECE 732 38 . I I I Narrow-band signals are susceptible to have the entire signal affected by a deep fade. Disadvantage: Short symbol duration induces ISI.

Observation from consecutive symbols don’t overlap (no ISI) Thus. I I I I Our hypothetical system transmits one information symbol in every L-th symbol period and is silent in between. we have L-fold diversity. I I I Assume filter operates at symbol rate Ts . The delay spread determines the number of taps L. Paris ECE 732 39 .e.. i. Thought experiment: I Recall that in discrete time a multi-path channel can be modeled by an FIR filter. At the receiver.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity Illustration: Built-in Diversity of Wide-band Signals I I We illustrate that wide-band signals do provide diversity by means of a simple thought experiments. each transmission will produce L non-zero observations. for each symbol we have L independent observations. This is due to multi-path.

I I The receiver gets to look at multiple versions of the transmitted signal. I Such receiver elements are called equalizers. I I The point was merely to eliminate ISI.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity Illustration: Built-in Diversity of Wide-band Signals I We will demonstrate shortly that it is not necessary to leave gaps in the transmissions. on the ratio of signal bandwidth and coherence bandwidth. We are looking for receivers that both exploit the built-in diversity and remove ISI. Equivalently. I I The order of diversity depends on the ratio of delay spread and symbol duration. Two insights from the thought experiment: I Wide-band signals provide built-in diversity. Paris ECE 732 40 .

3. I Most powerful and robust. ML Sequence Estimation: find the most likely sequence of symbols given the received signal. Equalizers can be broadly classified into three categories: 1. I Simple. Decision Feedback Equalizers: attempt to reconstruct ISI from past symbol decisions. but computationally complex. but not very effective with deep fades. Linear Equalizers: use an inverse filter to compensate for the variations in the frequency response. 2. but have potential for error propagation. Paris ECE 732 41 . I Simple.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity Equalization I I Equalization is obviously a very important and well researched problem.

I I. the computational complexity grows exponentially with the ratio of delay spread and symbol duration. Unfortunately. Paris ECE 732 42 . with the number of taps in the discrete-time equivalent FIR channel.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity Maximum Likelihood Sequence Estimation I I Maximum Likelihood Sequence Estimation provides the most powerful equalizers.e..

.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity Maximum Likelihood Sequence Estimation I The principle behind MLSE is simple. n Paris ECE 732 43 . the channel taps. Find the sequence of information symbol s [n] that minimizes D2 = N ∑ |r [n] − s[n] ∗ h[n]|2 .e.g. e. i.. and a model for the output of the multi-path channel: rˆ [n] = s [n] ∗ h[n]. and h[n] denotes the discrete-time channel impulse response. I I Given a received sequence of samples R [n]. matched filter outputs. where I I I s [n] denotes the symbol sequence.

A computationally efficient algorithm exists to solve the minimization problem: I I The Viterbi Algorithm. Paris ECE 732 44 . The toolbox contains an implementation of the Viterbi Algorithm in function va.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity Maximum Likelihood Sequence Estimation I The criterion D2 = N ∑ |r [n] − s[n] ∗ h[n]|2 . n I I I I performs diversity combining (via s [n] ∗ h[n]). and removes ISI. I The symbols s [n ] are from a discrete alphabet. The minimization of the above metric is difficult because it is a discrete optimization problem.

Paris ECE 732 45 . As before. and to measure the symbol error rate. and system simulation (function MCVA). the Monte Carlo simulation is broken into I I I set simulation parameter (script VASetParameters). simulation control (script MCVADriver).MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity MATLAB Simulation I A Monte Carlo simulation of a wide-band signal with an equalizer is conducted I I I to illustrate that diversity gains are possible.

fd = 3.fsT = 8.Alphabet = [1 -1]. Parameters.Es = 1.NSymbols/2). Parameters. Parameters..TrainingSeq = RandomSymbols( Parameters.L = 6. % location of t Parameters.NSymbols = 500.TrainLoc = floor(Parameters. % Doppler Parameters.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity MATLAB Simulation: System Parameters Listing : VASetParameters.ChannelParams = tux(). Parameters. % channel model Parameters. % channel order Paris ECE 732 46 ..5] % channel Parameters.T = 1/1e6.EsOverN0 = 6. Parameters.Alphabet.TrainLength = 40. Parameters. Parameters. [0. % % % % % % symbol period samples per symbol normalize received symbol energy to 1 Signal-to-noise ratio (Es/N0) BPSK number of Symbols per frame Parameters.5 0.TrainLength. .m 13 18 23 Parameters.

MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity MATLAB Simulation I The first step in the system simulation is the simulation of the transmitter functionality. There are 40 training symbols. fsT ). Paris ECE 732 47 . Listing : MCVA.. % linear modulation Signal = A * LinearModulation( Symbols.. InfoSymbols(TrainLoc+1:end)]. hh.m 41 46 % transmitter and channel via toolbox functions InfoSymbols = RandomSymbols( NSymbols. I I This is identical to the narrow-band case. % insert training sequence Symbols = [ InfoSymbols(1:TrainLoc) TrainingSeq . Alphabet. Priors ). except that the baud rate is 1 MHz and 500 symbols are transmitted per frame.

MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity MATLAB Simulation I The channel is simulated without spatial diversity. NoiseVar ). ChannelParams. Received = addNoise( Received. % time-varying multi-path channels and additive noise Received = SimulateCOSTChannel( Signal. The channel simulation invokes the time-varying multi-path simulator and the AWGN function. fs). Paris ECE 732 48 . I I 51 To focus on the frequency diversity gained by wide-band signaling.

2). L. TrainingSeq. 2). % channel estimation MFOutTraining = MFOut( 2*TrainLoc+1 : 2*(TrainLoc+TrainLength) ). ChannelEst = EstChannel( MFOutTraining. Equalization with the Viterbi algorithm. Alphabet. hh. % strip training sequence and possible extra symbols Decisions( TrainLoc+1 : TrainLoc+TrainLength ) = [ ].MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity MATLAB Simulation I The receiver proceeds as follows: I I I MFOut 57 62 Digital matched filtering with the pulse shape. % VA over MFOut using ChannelEst Decisions = va( MFOut. followed by down-sampling to 2 samples per symbol. fsT/2 ). Paris ECE 732 49 . = DMF( Received. Estimation of the coefficients of the FIR channel model. ChannelEst. followed by removal of the training sequence.

inv(TrainMatrix’ * TrainMatrix). where I I 14 S is a Toeplitz matrix constructed from the training sequence.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity Channel Estimation I Channel Estimate: hˆ = (S0 S)−1 · S0 r.. % make into a Toepliz matrix. 19 ChannelEst = Received * conj( TrainMatrix) * . such that T*h is convolution TrainMatrix = toeplitz( TrainingSPS. TrainingSPS(1:SpS:end) = Training. TrainingSPS = zeros(1. Paris ECE 732 50 . Order-1)]). and r is the corresponding received signal. length(Received) ).. [Training(1) zeros(1.

Paris ECE 732 51 . Baud rate 1MHz. Rayleigh channels with transmitter diversity shown for comparison.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity Simulated Symbol Error Rate with MLSE Equalizer −1 10 −2 10 −3 Symbol Error Rate 10 −4 10 −5 10 −6 Simulated VA L=1 L=2 L=3 L=4 L=5 AWGN 10 −7 10 −8 10 0 2 4 6 Es/N0 (dB) 8 10 12 Figure: Symbol Error Rate with Viterbi Equalizer over Multi-path Fading Channel. Delay spread ≈ 2µs.

This incurs more complexity in the equalizer. from inaccurate estimates. Performance at very low SNR suffers. and potential problems due to a larger number of channel coefficients to be estimated. this technique can be combined with additional diversity techniques (e.. I I I I Higher gains can be achieved by increasing bandwidth.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity Conclusions I The simulation indicates that the wide-band system with equalizer achieves a diversity gain similar to a system with transmitter diversity of order 2. Alternatively. probably.g. comparison to systems with transmitter diversity is appropriate as the total average power in the channel taps is normalized to 1. I I I The ratio of delay spread to symbol rate is 2. spatial diversity). Paris ECE 732 52 .

Time diversity. 2. 1. Frequency Diversity through OFDM. 3. Multi-antenna systems (MIMO) Paris ECE 732 53 .MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity More Ways to Create Diversity I A quick look at three additional ways to create and exploit diversity.

I I I I The channel’s coherence time should be much smaller than the time between transmissions. If this condition cannot be met (e. The diversity gain is (at most) equal to the number of time-slots used for repeating information. Time diversity can be easily combined with frequency diversity as discussed above.g. Paris ECE 732 54 . for slow-moving mobiles). frequency hopping can be used to ensure that the channel changes sufficiently.. I I This is often done through coding and interleaving. This technique relies on the channel to change sufficiently between transmissions. I The combined diversity gain is the product of the individual diversity gains.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity Time Diversity I Time diversity: is created by sending information multiple times in different frames.

frequency diversity is easily achieved by repeating information (really coding and interleaving) on widely separated subcarriers. high diversity. I I Very low-complexity receivers. High signal bandwidth to coherence bandwidth is possible. merely the gain for each subcarier is needed.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity OFDM I I OFDM has received a lot of interest recently. an equalizer is not required. I Like for narrow-band signaling. OFDM can elegantly combine the benefits of narrow-band signals and wide-band signals. I I Bandwidth is not limited by complexity of equalizer. OFDM signals are inherently wide-band. Paris ECE 732 55 .

I I The diversity gain ensures that the likelihood that there is no good channel from transmitter to receiver is small. Paris ECE 732 56 . Multiplexing gain The combination of multi-antenna techniques and OFDM appears particularly promising. Recently. then the number of channels equals the product of the number of antennas. I I Very high diversity. The array gain exploits the benefits from observing the transmitted energy multiple times.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity MIMO I We have already seen that multiple antennas at the receiver can provide both diversity and array gain. I I I If the system is equipped with multiple transmitter antennas. it has been found that multiple streams can be transmitted in parallel to achieve high data rates.

diversity is required. I I I To remedy this problem. Introduced MLSE and the Viterbi algorithm for equalizing wide-band signals in multi-path channels. Simulated system and verified diversity. Paris ECE 732 57 . Simulated narrow-band system.MATLAB Simulation Frequency Diversity: Wide-Band Signals Introduction to Equalization MATLAB Simulation More Ways to Create Diversity Summary I A close look at the detrimental effect of typical wireless channels. I I I Analyzed systems with antenna diversity at the receiver. I I I Narrow-band signals without diversity suffer poor performance (Rayleigh fading). Frequency diversity and equalization. Verified analysis through simulation. A brief look at other diversity techniques.