simulations of communication systemsscholar.fju.edu.tw/課程大綱/upload/049469/content/961... ·...

170
1 FJU-EE YUJL Simulations of Communication Systems Simulations of Communication SystemsChapter0 - Page 1 Simulations of Simulations of Communication Systems Communication Systems 余金郎 Download site http://stu71.fju.edu.tw/guest/classsearch.jsp FJU-EE YUJL Simulations of Communication Systems Simulations of Communication SystemsChapter0 - Page 2 Simulations of Communication Systems Simulations of Communication Systems Text Contemporary Communication Systems using MATLAB, John G. Proakis and M. Salehi Simulation and Software Radio for Mobile Comm unications, H. Harada and R. Prasad Reference: PRINCIPLES OF COMMUNICATION SYSTEMS SI MULATION WITH WIRELESS APPLICATIONS, TRANTER 200 4, PEARSON EDUCATION PTE. LTD.

Upload: danghuong

Post on 02-May-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 1FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 1

    Simulations of Simulations of Communication SystemsCommunication Systems

    Download sitehttp://stu71.fju.edu.tw/guest/classsearch.jsp

    FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 2

    Simulations of Communication SystemsSimulations of Communication Systems

    TextContemporary Communication Systems using MATLAB, John G. Proakis and M. SalehiSimulation and Software Radio for Mobile Communications, H. Harada and R. Prasad

    Reference: PRINCIPLES OF COMMUNICATION SYSTEMS SIMULATION WITH WIRELESS APPLICATIONS, TRANTER 2004, PEARSON EDUCATION PTE. LTD.

  • FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 3

    OutlinesOutlinesSignals and Linear SystemsRandom ProcessesAnalog Modulation (Skip)Analog-to-Digital ConversionBaseband digital TransmissionDigital Transmission through Bandlimited ChannelsDigital Transmission via Carrier ModulationChannel Capacity and Coding (Skip)Spread Spectrum Communication SystemsRadio Communication Channel

    FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 4

    GradeGrade

    Homework (30%)Midterm Presentation (20%)Final Presentation and Report (50%)

  • 1FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 1

    Before startBefore start ourour coursecourse

    What is a communication system ?What is difference between digital and analog communication system ?What kind of topics are in communication system ?

    2FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 2

    What is a communication system?What is a communication system?

    What is electrical engineering (EE) ?Production and transmission of electrical energyTransmission of information

    Communication systems areSystems designed to transmit information

  • 3FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 3

    Difference of comm. systemDifference of comm. systemIn electric energy system

    Waveforms are usually knownIn communication systems

    Waveform present at user is unknownOtherwise, no information would be transmitted, there would be no need for communication

    The transmission of information implies the communication of message that are not known ahead of time (a priori)

    4FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 4

    Noise and comm. systemNoise and comm. system

    If there were no noiseWe would communicate messages electrically to the destination using an infinitely small amount of power

    Noise limits our ability to communicate

  • 5FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 5

    Goal of communication systemGoal of communication system

    Transmit and Receive informationWith small power (energy)

    SNR, CNRWith small error

    Probability Error RateUnder noisy channel

    AWGNFading Channel

    6FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 6

    Digital and Analog SourceDigital and Analog Source

    Digital information sourceProduces a finite set of possible message

    Ex: Typewriter

    Analog information sourceProduces messages that are defined on a continuum

    Ex: Microphone

  • 7FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 7

    Digital and Analog SystemDigital and Analog System

    Digital communication systemTransfers information from a digital source to the sink

    Analog communication systemTransfers information from an analog source to the sink

    8FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 8

    Digital communication systemDigital communication system

    Digital waveformHave only a discrete set of values

    Ex: Binary waveform has only two values

    Analog waveformHave a continuous range of values

    Electronic digital communication systemUsually have digital waveformsHowever, it can have analog waveforms

    Ex: 1000Hz sine wave for binary 1 and 500Hz for binary 0Still called Digital communication system

  • 9FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 9

    Why Digital ?Why Digital ?Relatively inexpensive digital circuits may be usedPrivacy is preserved by using data encryptionData from voice, video and data sources may be merged and transmitted over a common digital transmission systemIn long distance system, noise does not accumulate from repeater to repeater

    10FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 10

    Why Digital ? (Cont.)Why Digital ? (Cont.)

    Regenerative repeatersNoise are not accumulated

  • 11FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 11

    Why digital ? (Cont.)Why digital ? (Cont.)Errors in detected data may be small, even when a large amount of noise on the received signalError may often be corrected by the use of coding

    Disadvantage of Digital communicationGenerally, more bandwidth is required than that for Analog systemsSynchronization is required

    Digital System are becoming more and more popular !But we have to know analog system also !

    12FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 12

    Communication systemCommunication system

    Three subsystemTransmitterChannelReceiver

    Signal Processing

    CarrierCircuits

    TransmissionMedium

    (Channel)

    CarrierCircuits

    Signal Processing

    Transmitter

    Receiver

    Information input m(t)

    s(t)

    Noise n(t)

    r(t)To userm(t)

  • 13FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 13

    Typical digital comm. systemTypical digital comm. system

    14FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 14

    Digital comm. transformationDigital comm. transformation

    Transformation from one signal space to anotherSeven basic groups

    Formatting and source codingModulation / demodulationChannel codingMultiplexing and multiple accessSpreadingEncryptionSynchronization

  • 15FJU-EE YUJL Simulations of Communication SystemsSimulations of Communication Systems Chapter0 - Page 15

    In this courseIn this course

    Basic mathematical concepts of digital communication will be givenSome numerical examples using MATLAB is also givenBut, the implementation technique and application is weakly given

    Please use references for these topics

  • MATLAB Tutorial

    Referenced from Tolga Kurt [1]

    23/09/2004 ELG 4174 2

    Getting Started

    Matlab - Matrix laboratoryA high-level technical computing language and interactive environment Useful for :

    analyzing datadeveloping algorithms and applications

  • 23/09/2004 ELG 4174 3

    Defining vectors and matrices (1/2)

    Defining a matrixRows are separated by semicolons.Semicolons will prevent the results display on the command window.To display type the name of the variable.

    23/09/2004 ELG 4174 4

    Defining vectors and matrices (2/2)

    Definition with increments:

  • 23/09/2004 ELG 4174 5

    Basic Operations

    Element by element operations:A+B Element by element additionA-B Element by element subtractionA*B Matrix multiplicationA.*B Element by element multiplicationA/B A*inv(B)A./B Element by element divisionA^B Matrix powerA.' TransposeA' Complex conjugate transposeA^-1 Matrix inverse - inv(A)

    23/09/2004 ELG 4174 6

    Graphs

    Using built in function

  • 23/09/2004 ELG 4174 7

    Writing a function (1/2)

    23/09/2004 ELG 4174 8

    Writing a function (2/2)

  • 23/09/2004 ELG 4174 9

    Calling a function

    23/09/2004 ELG 4174 10

    M-file example-1%%Generate two random shifted BPSKclearclose allclclist=[.5 .6 .7 .8 .9 1]count=0;for k=list;

    count=count+1R1=sqrt(k);R2=sqrt(1-k);mx2=0;itmax=100000;av=0;

    for t=1:itmaxA=R1*(randint(64,1,2)*2-1);B=R2*(randint(64,1,2)*2-1);

    Tran=A+B*j;

    av=av+mean(abs(Tran).^2)/itmax;

    endson(count)=10*log10(mx2/av);

    endplot(list,son)

  • 23/09/2004 ELG 4174 11

    M-file example-1% MATLAB script that generates the probability of error versus the signal to noise ratio.initial_snr=0;final_snr=12;snr_step=0.75; tolerance=eps; % Tolerance used for the integrationplus_inf=20; % This is practically infinitysnr_in_dB=initial_snr:snr_step:final_snr;for i=1:length(snr_in_dB),

    snr=10^(snr_in_dB(i)/10);Pe_2(i)=1-quad8('bdt_int2',0,plus_inf,tolerance,[],snr,2);Pe_4(i)=1-quad8('bdt_int2',0,plus_inf,tolerance,[],snr,4);Pe_8(i)=1-quad8('bdt_int2',0,plus_inf,tolerance,[],snr,8);Pe_16(i)=1-quad8('bdt_int2',0,plus_inf,tolerance,[],snr,16);Pe_32(i)=1-quad8('bdt_int2',0,plus_inf,tolerance,[],snr,32);

    end;

    23/09/2004 ELG 4174 12

    M-file example-1% Plotting commands followt=snr_in_dB;semilogy(t,Pe_2,'-',t,Pe_4,'--',t,Pe_8,'-.',t,Pe_16,':',t,Pe_32,'-')legend('M=2','M=4','M=8','M=16','M=32',0);axis([initial_snr,final_snr,1e-16,1e0])

    xlabel('Input SNR per Bit','fontsize',16,'fontname','Arial')ylabel('Symbol Error Rate (SER)','fontsize',16,'fontname','Arial')set(findobj('Type','line'),'LineWidth',2)set(findobj('fontname','Helvetica'),'fontname','Times new Roman','fontsize',16)title('Symbol error probability for biorthogonal signals')hold off

  • 23/09/2004 ELG 4174 13

    M-file example-2

    f=(0:0.5*10^4:40*10^9);w=2*pi*f;h=exp(i*w.^2*(-2.7*10^-22));Hp=phase(h);hp=Hp*180/pi;plot(f, hp);xlabel('frequency');ylabel('Hp')

    23/09/2004 ELG 4174 14

    Useful Referenceshttp://www.genie.uottawa.ca/~ieee/pdffiles/matlab.ppthttp://webclass.ncu.edu.tw/~junwu/index.htmlhttp://www.cs.nthu.edu.tw/~jang/mlbook/http://caig.cs.nctu.edu.tw/course/NM/slides/MatlabTutorial.pdfhttp://users.ece.gatech.edu/~bonnie/book/TUTORIAL/tutorial.htmlContemporary communication systems using MATLAB / J. G. Proakis, M. Salehi.MATLAB programming for engineers / Stephen J. Chapman. Simulation and Software Radio for Mobile Communications, Chapter2, H. Harada and R. Prasad

  • 1

    Signals and Linear SystemsSignals and Linear Systems

    1.1 Linear Time Invariant (LTI) system1.2 Fourier Series1.3 Fourier Transform1.4 Power and Energy1.5 Lowpass Equivalent of Bandpass Signals

    2

    1.1 1.1 Linear Time InvariantLinear Time Invariant (LTI) system(LTI) system

    Most communication channels, transmitter and receiverare well modeled as LTI systemLTI system means a time shift in the input signal causes the same time shift in the output signal

    0 0then given ( ), output ( )x t t y t t

    LTI System y(t)x(t)

  • 3

    Impulse ResponseImpulse Response

    For arbitrary input

    Impulse response

    LTI System

    LTI System ???

    h(t)

    4

    Convolution IntegralConvolution Integral

    For continuous LTI system

    Input-output relationship of LTI systemh(t) is impulse response of the systemx(t) is input signaly(t) is output signal

    ( ) ( ) ( ) ( ) ( ) ( ) ( )y t x t h t h x t d x h t d

    = = =

  • 5

    Convolution SumConvolution Sum

    For discrete system

    LTI Systemh(t)

    At time t

    ( ) ( )t

    ii

    y t x h t i=

    =

    ( ) ( )

    ( ) ( )

    ( )* ( )

    n

    ii

    n

    i

    y n x h n i

    x i h n i

    x n h n

    =

    =

    =

    =

    =

    6

    Time and Frequency domain ?Time and Frequency domain ?

    Some signals are easier to visualize in the frequency domainSome signals are easier to visualize in the time domainEx: Sine wave

    Frequency domain : 3 data (frequency, Amplitude, Phase)Time domain : lots of information to define accurately

    Frequency domain analysis tools Fourier Series and Fourier Transform

  • 7

    1.2 1.2 FourierFourier SeriesSeriesFourier Series

    An equation to calculate frequency, amplitude and phase of each sine wave needed to make up any periodic signals

    FT (Fourier Transform)Extension of Fourier Series for Non-periodic signalsMathematical formula using Integrals

    DFT (Discrete Fourier Transform)A discrete numerical equivalent using sums instead of integral

    FFT (Fast Fourier Transform)Just a computational fast way to calculate DFT

    8

    Complex exponential input and LTIComplex exponential input and LTI

    Input-output relation of LTI system

    Let input be complex exponential :Then the output is

    The output is complex exponential with the same frequency of input

    ( ) ( ) ( ) ( ) ( )y t x t h t h x t d

    = =

    02( ) j f tx t Ae =

    0 0 02 ( ) 2 20( ) ( ) [ ( ) ] ( ) ( )

    j f t j f j f ty t h Ae d h Ae d Ae H f x t

    = = =

    2( ) ( ) : Frequency response of ( )j fH f h Ae d h t

    =

  • 9

    Exponential Fourier SeriesExponential Fourier Series

    Any periodic signal x(t) with period T0 can be expressed by

    where Fourier series coefficient xn is

    is fundamental frequency is nth harmonics

    is usually used

    { }0 02 2 /with basis : j nf t j nt Tn

    e e

    ==02 /( ) j nt Tn

    nx t x e

    =

    =

    002 /

    0

    1 ( )T j nt T

    nx x t e dtT

    + =

    0 01f T=

    0nf00

    2Tor =

    10

    RealReal--valued periodic signalvalued periodic signal

    x(t) should be periodic if Fourier series is appliedx(t) can be real or complex-valued signalIf x(t) is real-valued signal

    Fourier series coefficient {xn} are complex{xn} are Hermitian symmetry

    Real part(Magnitude) is evenImaginary part(Phase) is odd

    0 00 02 / 2 / * *

    0 0

    1 1( ) [ ( ) ]

    ,

    T Tj nt T j nt Tn n

    n n n n

    x x t e dt x t e dt xT T

    x x x x

    + +

    = = =

    = =

  • 11

    Trigonometric Fourier seriesTrigonometric Fourier series

    Can be applied to real, periodic signals

    Using Hermitian symmetry

    , 2 2

    n n n nn n

    a jb a jbx x +

    = =

    0 002 /

    0 00 0

    1 1( ) ( )[cos(2 / ) sin(2 / )]T Tj nt T

    nx x t e dt x t nt T j nt T dtT T

    + += = 0 0

    0 00 0

    2 2( ) cos(2 / ) , ( ) sin(2 / )T T

    n na x t nt T dt b x t nt T dtT T

    + += =

    02 / 00 0

    1( ) [ cos(2 / ) sin(2 / )]

    2j nt T

    n n nn n

    ax t x e a nt T b nt T

    = =

    = = + + AC componentDC component

    *n nx x =

    12

    Polar form of Fourier seriesPolar form of Fourier series

    Can be applied to real, periodic signalsUsing the relation:Define :

    Then

    2 2 , arctan nn n n nn

    bc a ba

    = + =

    2 2cos sin cos( arctan )ba b a ba

    + = +

    00 0

    1

    00

    1

    ( ) [ cos(2 / ) sin(2 / )]2

    cos(2 / )2

    n nn

    n nn

    ax t a nt T b nt T

    a c nt T

    =

    =

    = + +

    = + +

  • 13

    Discrete SpectrumDiscrete Spectrum

    Relations between FS coefficientFor real-valued periodic signal

    Discrete SpectrumMagnitude spectrum: Phase spectrum:

    2Re[ ] , 2 Im[ ],

    n n n n

    n n n n

    a x b xc x x

    = =

    = =

    0.nx vs n or nf

    0.nx vs n or nf

    n

    2n n

    na jbx =

    14

    FS and realFS and real--even(odd) signaleven(odd) signal

    Real and even signal:Then

    All xn are realFourier series consists of all cosine functions

    Real and odd signal:ThenAll xn are imaginaryFourier series consists of all sine functions

    0

    00

    2 ( ) cos(2 / ) 0T

    na x t nt T dtT

    += =

    ( ) ( )x t x t= 0

    00

    2 ( )sin(2 / ) 0T

    nb x t nt T dtT

    += =

    OddEven

    ( ) ( )x t x t =

  • 15

    IP1IP1--11: FS of a rectangular signal train: FS of a rectangular signal train

    Periodic rectangular signal

    Real and Even signal

    0

    00

    ,

    ( ) ( ) ,2 2

    0,

    A t tt Ax t A t tt

    otherwise

    -1 & x0 & x

  • 23

    IP1IP1--22: : magnitude and phase spectralmagnitude and phase spectral

    25 20 15 10 5 0 5 10 15 20 250

    0.02

    0.04

    0.06

    0.08

    0.1

    0.12

    0.14

    Time

    Am

    plitu

    deThe Discrete Magnitude Spectrum

    25 20 15 10 5 0 5 10 15 20 254

    2

    0

    2

    4

    Time

    Am

    plitu

    de

    The Discrete Phase Spectrum

    24

    IP1IP1--33: : magnitude and phase spectralmagnitude and phase spectral

    Periodic Gaussian signal

    t0l=0.1 tol=0.0001

    2

    21( )2

    , for 6t

    x tt e

    =

    20 15 10 5 0 5 10 15 200

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    0.35

    0.4

    Time

    Amplit

    ude

    Gaussian signal waveform

  • 25

    IP1IP1--33: : magnitude and phase spectralmagnitude and phase spectral

    2

    21( )2

    , for 6t

    x tt e

    =

    25 20 15 10 5 0 5 10 15 20 250

    0.02

    0.04

    0.06

    0.08

    0.1

    Time

    Am

    plitu

    deThe Discrete Magnitude Spectrum

    25 20 15 10 5 0 5 10 15 20 254

    2

    0

    2

    4

    Time

    Am

    plitu

    de

    The Discrete Phase Spectrum

    26

    1.2.1 1.2.1 Periodic Signals and LTI SystemsPeriodic Signals and LTI Systems

    The output of LTI system with periodic inputFrom eq(1.2.3), if input is a complex exponential, the output ofLTI system is also a complex exponential with the same frequency as the input but the magnitude and phase are changedIf the input is a period signal, the output signal is also periodic

    Then the relation between xn and yn ???

    0 02 / 2 /( ) , ( )j nt T j nt Tn nn n

    x t x e y t y e

    = =

    = = x(t) LTI System y(t)

  • 27

    Periodic Signals and LTI SystemsPeriodic Signals and LTI Systems

    From convolution integral

    Define transfer function of LTI

    We haveIf we know xn (x(t)) and H(f) or h(t), we can get yn (y(t))

    0

    0 0 0

    2 ( ) /

    2 / 2 / 2 /

    ( ) ( ) ( ) ( )

    { ( ) }

    j n t Tn

    n

    j n T j nt T j nt Tn n

    n n

    y t x t h d x e h d

    x h e d e y e

    =

    = =

    = =

    = =

    02 ( / )20

    0

    ( ) ( ) ( ) ( ) ( ) j t n Tj ft nH f h t e dt H nf H h t e dtT

    = = =

    0

    ( )n nny x HT

    =

    28

    IP1IP1--44: Filtering of Periodic Signals: Filtering of Periodic Signals

    Triangle pulse and Filter

    LTI SystemH(f)

    H(f0)

    H(f1)

    H(f3)H(f5)

    Sum of below

    x0*H(f0)

    x1*H(f1)

    x3*H(f3)

    x5*H(f5)

  • 29

    IP1IP1--44 : Filtering of Periodic Signals: Filtering of Periodic Signals

    Fourier series of Lambda signal

    Transfer function :using numerical approach (FFT)

    00

    0

    / 2 12 /

    / 2 10

    2/ 2

    1 1 1( ) ( ) ( )2 2

    1 1[ ( )] sinc ( )2 2 2

    T j nt T j nt j ntn T

    f n

    x x t e dt t e dt t e dtT

    nF t

    =

    = = =

    = =

    Period =To=2 fundamental frequency=fo=0.5

    { }( ) ( ) f n F s nH n F H f T DFT h= = =

    TS

    T

    FFS

    DFT

    h(t) H(f)

    30

    IP1IP1--44 : Filtering of Periodic Signals: Filtering of Periodic Signals

    Selection of time parameter TAccording to property of DFT

    Selection of time parameter TsDepends on the number of frequency bins we want to observeIf N is given, then

    Usage of fftshift: generally, we want to display the frequency responses between

    H=fft(h) returns H(0)~H(N-1) H1=fftshift(H) returns

    1 1 and T TsF Fs

    = =

    ( 2) ~ ( 2)H N H N

    0 01 2 aWe want nd 1 2T f FF f = = = =

    2 / 80 1/ 40 (in pp16)S SF N F T T N= = ==

    ( 2) ~ ( 2)H N H N

  • 31

    IP1IP1--44 : Filtering of Periodic Signals: Filtering of Periodic Signals1. % IP1-4 Chapter 1.2. echo on3. n=[-20:1:20];4. % FS coefficients of x(t) vector 5. x=.5*(sinc(n/2)).^2;6. % sampling interval7. ts=1/40;8. % time vector9. t=[-.5:ts:1.5];10. % impulse response

    1. fs=1/ts;2. h=[zeros(1,20),t(21:61),zeros(1,

    20)];3. % transfer function4. H=fft(h)/fs;5. % frequency resolution6. df=fs/80;7. f=[0:df:fs]-fs/2;8. % rearrange H9. H1=fftshift(H);10. y=x.*H1(21:61);11. % Plotting commands follow.

    32

    IP1IP1--44 : Filtering of Periodic Signals: Filtering of Periodic Signals

    20 15 10 5 0 5 10 15 200

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    Frequency

    Am

    plitu

    de

    Frequency Response of System

    20 15 10 5 0 5 10 15 200

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    n

    Am

    plitu

    de

    Frequency Response of System

  • 33

    IP1IP1--44 : Filtering of Periodic Signals: Filtering of Periodic Signals

    20 15 10 5 0 5 10 15 200

    0.1

    0.2

    0.3

    0.4

    0.5

    n

    Am

    plitu

    deInput Signal

    20 15 10 5 0 5 10 15 200

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    0.35

    n

    Am

    plitu

    de

    Outptu Signal

    34

    IP1IP1--44 : Filtering of Periodic Signals: Filtering of Periodic Signals

    Questions: What is the difference if we set ts=1/20 or ts=1/80. Can we still get the correct output signals?How to compute xn by using fft method? (xn is a periodic continuous signal)What is the difference if we select h(t), t=0~2 to perform the fftoperation ?

  • 35

    Homework #1Homework #1

    Problems 1.1, 1.2, 1.3, 1.7, 1.8

    36

    1.3 1.3 Fourier TransformFourier Transform

    FT is the extension of FS to non-periodic signalDefinition of Fourier transform

    Fourier transform

    Inverse Fourier transform

    For a real signal x(t), X(f) is Hermitian Symmetry

    Magnitude spectrum is even about the origin (f=0)Phase spectrum is odd about the origin

    2( ) [ ( )] ( ) j ftX f F x t x t e dt

    = =

    1 2( ) [ ( )] ( ) j ftx t F X f X f e df

    = =

    *( ) ( )X f X f =

  • 37

    Properties of FTProperties of FTLinearity

    DualityIf , Then

    Time ShiftA shift in the time domain results in a phase shift in the frequency domain

    Scaling: An expansion in the time domain results in a contraction in the frequency domain, and vice versa

    1 2 1 2[ ( ) ( )] [ ( )] [ ( )]F x t x t F x t F x t + = +

    ( ) [ ( )]X f F x t= [ ( )] ( )F X t x f=

    { }0 02 20( ( )) ( ) : ( ) ( )j ft j ftF x t t e X f Note e X f X f = =

    1[ ( )] ( ) , 0fF x at X aa a

    =

    38

    Properties of FTProperties of FT

    ModulationMultiplication by an exponential in the time domain corresponds to a frequency shift in the frequency domain

    020

    0 0 0

    [ ( )] ( )1[ ( )cos(2 )] [ ( ) ( )]2

    j f tF e x t X f f

    F x t f t X f f X f f

    =

    = + +

    x(t)

    X(f)cos

    f0f0-f0

    -f0

  • 39

    Properties of FTProperties of FT

    DifferentiationDifferentiation in the time domain corresponds to multiplicationby j2f in the frequency domain

    ConvolutionConvolution in the time domain is equivalent to multiplication in the frequency domain, and vice versa

    [ ( )] 2 ( )

    [ ( )] ( 2 ) ( )n

    nn

    dF x t j f X fdtdF x t j f X fdt

    =

    =

    [ ( ) ( )] ( ) ( )[ ( ) ( )] ( ) ( )

    F x t y t X f Y fF x t y t X f Y f

    ==

    40

    Properties of FTProperties of FT

    Parsevals relation

    Energy can be evaluated in the frequency domain instead of the time domain

    Rayleighs relation

    * *( ) ( ) ( ) ( )x t y t dt X f Y f df

    =

    2 2*( ) ( ) ( ) ( )x t x t dt x t dt X f df

    = =

  • 41

    More on FT pairsMore on FT pairsSee Table 1.1 at page 20

    Delta function FlatTime / Frequency shiftSin / cos input

    impulses in the frequency domainsgn / unit step input

    Rectangular sincLambda sinc2DifferentiationPulse train with period T0

    Periodic signalimpulses in the frequency domain

    42

    FT of periodic signalsFT of periodic signalsFor a periodic signal with period T0x(t) can be expressed with FS coefficientTake FT

    FT of periodic signal consists of impulses at multiples of the harmonics (fundamental frequency 1/T0) of the original signal

    Ex:

    02 /( ) j nt Tnn

    x t x e

    =

    = 0

    0

    2 /

    2 /

    0

    ( ) [ ( )] [ ]

    [ ] ( )

    j nt Tnn

    j nt Tn nn n

    X f F x t F x e

    nx F e x fT

    =

    = =

    = =

    = =

    00 0

    1( ) ( ) ( ) ( )n n

    nx t t nT X f fT T

    = =

    = =

  • 43

    FS FS versus FTversus FT

    FS coefficient can be expressed using FTDefine truncated signal

    FT of truncated signal:Expression of FS coefficient

    0

    0 0( ) ,( ) 2 2

    0 ,T

    T Tx t tx t

    otherwise

    < =

    0 0( ) [ ( )]T TX f F x t=

    0 00 0

    0

    0

    0 0

    2 / 2 /

    0 00 0

    2 /

    0 0 0

    1 1( ) ( )

    1 1( ) ( )

    T Tj nt T j nt Tn T

    j nt TT T

    x x t e dt x t e dtT T

    nx t e dt XT T T

    = =

    = =

    44

    Spectrum of the signalSpectrum of the signal

    Fourier transform of the signal is called the Spectrum of the signal

    Generally complexMagnitude spectrumPhase spectrum

  • 45

    1.3.1 1.3.1 Sampling TheoremSampling Theorem

    Basis for the relation between continuous-time signal and discrete-time signalsA bandlimited signal can be completely described in terms of its sample values taken at intervals Ts as long as Ts 1/(2W)

    Ts

    x(t)

    fW-W

    X(f)

    1

    46

    Impulse samplingImpulse sampling

    Sampled waveform

    Take FT( ) ( ) ( ) ( ) ( )s s s

    n nx t x t t nT x nT t nT

    = =

    = =

    Ts

    x(t)

    ( ) [ ( )] [ ( ) ( )] ( ) [ ( )]

    1 1( ) ( ) ( )

    s sn n

    n ns s s s

    X f F x t F x t t nT X f F t nT

    n nX f f X fT T T T

    = =

    = =

    = = =

    = =

    fW-W

    X(f)

    1/(2Ts)1/Ts

    1/Ts

  • 47

    Reconstruction of signalReconstruction of signal

    Low pass filterWith Bandwidth 1/(2Ts) and Gain of Ts

    fW-W

    X(f)

    1/(2Ts)1/Ts

    Low pass filter

    ( ) ( ),sX f T X f for f W= 1/(2W)Spectrum is overlappedWe can not reconstruct original signal with under-sampled valuesAnti-aliasing methods are needed

    fW-W

    X(f)

    fW-W

    X(f)

    1/Ts

    1/Ts

  • 51

    AliasingAliasing

    We only sample the signal at intervalsWe dont know what happens between the samples

    52

    AliasingAliasing

    We must sample fast enough to see the most rapid changes in the signal

    This is Sampling theorem

    If we do not sample fast enoughSome higher frequencies can be incorrectly interpreted as lower ones

  • 53

    AliasingAliasing

    Called aliasing because one frequency looks like another

    54

    Discrete Discrete Time Time Fourier TransformFourier TransformZ-transform : Discrete Time Fourier Transform (DTFT) of discrete time sequence x[n]

    From sampling theorem, we have FT versus DTFT relation

    ( ) [ ] nn

    X z x n z =

    =

    2

    ( ) ( ) ( ) ( ) ( )

    ( ) [ ( )] [ ( ) ( )] ( ) [ ( )]

    [ ] (DTFT)

    1( ) ( ) ( ) (from Sampling Theorem)

    s

    s s sn n

    s s s sn n

    j fnTn

    ns s

    x t x t t nT x nT t nT

    X f F x t F x nT t nT x nT F t nT

    x n e

    nX f X f X zT T

    = =

    = =

    =

    =

    = =

    = = =

    =

    =

    22( ) ( ) [ ] sj fTs

    j fnTz e n

    X f X z x n e

    = == =

    2( ) ( ) [ ] ,sj fnTs s nX f T X f T x n e for f W

    =

    = =

  • 55

    Discrete Fourier TransformDiscrete Fourier TransformDFT of discrete time sequence x[n],n=0~N-1

    Relation between DTFT and DFT

    Relation between FT and DFT

    Relation between FS and DFT

    02 2 /0 1 1

    0 0

    ( ) [ ] [ ] ( )

    where

    sN Nj kf nT j nk Nn n

    s s

    X f kf x n e x n e X k

    f T T T N

    = =

    = = = =

    = =

    0

    0

    ( ) ( ), , and ( ) ( )( ) ( )

    s

    s

    X f T X f for f W X f kf X kX f kf T X k

    = < = =

    = =

    ( )

    2 /1

    2 /1

    : ( ) [ ]

    : [ ] 1 ( )

    N j nk Nn

    N j nk Nk

    DFT X k x n e

    IDFT x n N X k e

    =

    =

    =

    =

    ( )( ) ( )

    00 0 0

    0

    1 ( ), and ( ) ( )

    1 ( ) 1 ( )k T s

    k s

    x T X kf X f kf T X k

    x T T X k N X k

    = = =

    = =

    56

    SummarySummary

    2: ( ) ( ) j ftFT X f x t e dt

    =

    2 /1

    : ( ) [ ]N j nk Nn

    DFT X k x n e =

    =

    002 /

    0

    1: ( )T j kt T

    kFS x x t e dtT

    + =

    2: ( ) [ ] sj fnTn

    DTFT X f x n e =

    =

    00

    1 ( )kx X kfT=

    0( ) ( )X f kf X k = =

    ( ) ( )sX f T X f=( )1 ( )kx N X k=

    0( ) ( )sX f kf T X k= =

  • 57

    FFT in FFT in MMatlabatlabA sequence of length N=2m of samples of x(t) taken at Ts

    Ts satisfies Nyquist conditionTs is called time resolution

    FFT gives a sequence of length N of sampled Xd(f) in the frequency interval [0, fs=1/Ts]

    The samples are apart byis called frequency resolutionFrequency resolution is improved by increasing N

    /sf f N =f

    58

    DFT in DFT in MatlabMatlabFFT(Fast Fourier Transform) is an Efficient numerical method to compute DFT

    See fft.m and fftseq.m, for more informationTime and frequency is not appeared explicitlyN is chosen to be N=2m

    Zero padding is used if N is not power of 2

    TS

    T

    FFS

    DFT

    h(t) H(f)Zero padding

  • 59

    Zero padding in Zero padding in FFTFFTPadding zeros at time resolution Ts

    Maximum frequency is unchanged = FsNumber of sequence in changed from L to NFrequency resolution is increased from to

    Let

    The frequency response are

    We conclude that

    /sF F N =sF L

    2 /1

    12 / 2 ( / ) /1 1

    ( ) [ ]

    ( ) [ ] [ ] ( / )

    L j nk LnN Lj nk N j n Lk N Ln n

    X k x n e

    X k x n e x n e X Lk N

    =

    = =

    =

    = = =

    [ ], n=0,1, , -1[ ] [ ], n=0,1, , -1, and [ ] 0, n= , , -1, 2K

    x n Lx n x n L x n L N N L= = =

    (0) (0), (1) ( ), (2) (2 ), , ( 1) (( 1) )X X X X L N X X L N X N X N L N= = = =

    60

    IP1IP1--55: F: Fourier ourier TransfoermTransfoerm

    Plot the frequency responses of x1(t) and x2(t)

    Parameters setting:

    Select t=[-5,5] as a time period for x1(t) and x2(t)

    1/ 2, set 10 1/ 2 5 2 10 0.1default drequency resolution = 0.01

    s sBW W F W tF Hz

    = = = = =

  • 61

    IP1IP1--55: F: Fourier ourier TransfoermTransfoerm1. df=0.01;2. fs=10;3. ts=1/fs;4. t=[-5:ts:5];5. x1=(t+1).*(t>=-1 & t=0 & t=0 & t=1 & t

  • 63

    IP1IP1--66: F: Fourier Transformourier Transform

    Plot the frequency response of x(t)

    Parameters setting:

    Select t=[-4,4] as a time period for x1(t) and x2(t)

    1/ 4, set 10 1/ 4 2.5 2 5 0.2default drequency resolution = 0.01

    s sBW W F W tF Hz

    = = = = =

    2 2 11 1 1

    ( )2 1 2

    0

    t tt

    x tt t

    + = + < otherwise

    2 2( ) 4sin (2 ) sin ( )X f c f c f=

    64

    IP1IP1--66: F: Fourier ourier TransfoermTransfoerm

    2.5 2 1.5 1 0.5 0 0.5 1 1.5 2 2.50

    0.5

    1

    1.5

    2

    2.5

    3

    Frequency

    Magnitudepectrum of x(t) derived analytically

    2.5 2 1.5 1 0.5 0 0.5 1 1.5 2 2.50

    0.5

    1

    1.5

    2

    2.5

    3

    Frequency

    Magnitudepectrum of x(t) derived numerically

  • 65

    Frequency domain analysis of LTI systemFrequency domain analysis of LTI system

    The output of LTI system

    Take FT (using convolution theorem)

    Where the Transfer Function of the system

    The relation between input-output spectra

    ( ) ( ) ( )y t x t h t=

    ( ) ( ) ( )Y f X f H f=

    2( ) [ ( )] ( ) j ftH f F h t h t e dt

    = =

    ( ) ( ) ( )( ) ( ) ( )

    Y f X f H fY f X f H f

    =

    = +

    66

    IP1IP1--77: : LTI system analysisLTI system analysis

    Plot the frequency response of x(t)

    Parameters setting:

    Select t=[-5,5] as a time period for x(t)

    5 0.2default drequency resolution = 0.01

    s sF tF Hz

    = =

    2 2 01 0 1

    ( ) 2 2cos(0.5 ) 1 31 3 40

    t tt

    x t t tt

    + < = + < < otherwise

  • 67

    IP1IP1--77: : LTI system analysisLTI system analysis

    Ideal LPF

    5 0 50

    0.5

    1

    1.5

    2

    Time

    Ampl

    itude

    Input Signal

    4 2 0 2 40

    2

    4

    6

    8

    Frequency

    Ampl

    itude

    Input Signal

    4 2 0 2 40

    0.2

    0.4

    0.6

    0.8

    1

    Frequency

    Ampl

    itude

    LPF Frequency Response

    5 0 50

    0.5

    1

    1.5

    2

    2.5

    Time

    Ampl

    itude

    Output Signal

    68

    IP1IP1--77: : LTI system analysisLTI system analysis

    Selective frequency filter

    5 0 50

    0.5

    1

    1.5

    2

    Time

    Ampl

    itude

    Input Signal

    4 2 0 2 40

    2

    4

    6

    8

    Frequency

    Ampl

    itude

    Input Signal

    5 0 50

    0.2

    0.4

    0.6

    0.8

    1

    Time

    Ampl

    itude

    Impulse Response

    10 5 0 5 100

    0.5

    1

    1.5

    2

    2.5

    3

    Time

    Ampl

    itude

    Output Signal

  • 69

    IP1IP1--77: : LTI system analysisLTI system analysis

    Remarks: how to compute output sequence precisely ?By FFT

    By partially FFT (used in text)( ) [ ] ( ) [ ] ( ( ) ( ) and [ ] [ ])( ) ( ) ( )( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )

    [ ] [ ] ( ) [ ] [ ] ( ) [ ] ( [ ])

    o s

    o

    o o o

    s s o o

    x t x n X kf T X k x t X f x n X kh t H f H kfy t x t h t Y f X f H f Y kf X kf H kf

    T Y k T X k H kf Y k X k H kf y n IDFT Y k

    = = = =

    = = =

    ( ) [ ] ( ) [ ] ( ( ) ( ) and [ ] [ ])( ) [ ] ( ) [ ]( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )

    [ ] [ ] [ ] [ ] [ ] [ ] [ ] ( [ ])

    o s

    o s

    o o o

    s s s s

    x t x n X kf T X k x t X f x n X kh t h n H kf T H ky t x t h t Y f X f H f Y kf X kf H kf

    T Y k T X k T H k Y k T X k H k y n IDFT Y k

    = == = =

    = = =

    70

    IP1IP1--77: : LTI system analysisLTI system analysisRemarks: how to compute output sequence precisely ?

    By discrete convolution (used by text, but the authors made a mistake

    The above result is consistent to that by FFT. When the data and channel are transferred from continuous into discrete, the discrete output signal either by FFT multiplication or by directconvolution is equal to the continuous one up to a constant sampling period TS

    ( ) [ ], ( ) [ ]

    ( ) ( ) ( ) ( ) ( ) ( ) ( )

    ( ) [ ] [ ] ( ) [ ]* [ ]

    s s sk

    s s sn

    x t x n h t h n

    y t x t h t x h t d x kT h t kT T

    y nT y n x k h n k T T x n h n

    = =

    = = =

  • 71

    Some remarks on short signalSome remarks on short signalFT works on signals of infinite durationBut, we only measure the signal for a short time

    FFT works as if the data is periodic all the time

    72

    Frequency leakageFrequency leakageIf the period exactly fits the measurement time, the frequency spectrum is correctIf not, frequency spectrum is incorrect

    It is broadened due to the window effect.

  • 73

    HomeworkHomework #2#2

    Problems1.10, 1.12, 1.14, 1.15, 1.18

    74

    1.4 Power and Energy1.4 Power and EnergyDefinition of Power in communication systems

    Instantaneous power

    Average Power

    Rms (Root mean square) value

    Average Power for resistive load

    Normalized PowerUsed by communication engineersR is assumed to be 1

    Average Normalized Power

    ( ) ( ) ( )p t v t i t=/ 2 / 2

    / 2 / 2

    1 1lim ( ) lim ( ) ( )T T

    T TT TP p t dt v t i t dt

    T T = =

    / 2 2

    / 2

    1lim ( )T

    rms TTX x t dt

    T =

    2/ 2 / 22 2 2

    / 2 / 2

    11lim ( ) lim ( )T T rms

    rms rms rmsT TT T

    VP v t dt R R i t dt RI V IT T R

    = = = = =

    / 2 2

    / 2

    1lim ( )T

    TTP w t dt

    T =

  • 75

    DefinitionsDefinitions

    Decibel gain of system

    If dB is known

    0 dB : 3 dB : -3dB :

    ( ) 10log( ) 10log( ) (unit: dB)outin

    Paverage power outP dBaverage power in P

    = =

    ( ) /1010P dBoutin

    PP

    =

    out inP P=3/1010 2out in inP P P= =

    3/10 1102out in in

    P P P= =

    76

    DefinitionsDefinitions

    Decibel SNR(signal-to-noise ratio)

    Decibel power level with respect to 1mW

    / 2 2

    / 2

    / 2 2

    / 2

    1lim ( )( / ) 10log( ) 10log( ) 20log( )

    1lim ( )

    T

    TTsignal rms signaldB T

    noise rms noiseTT

    s t dtP VTS NP Vn t dt

    T

    = = =

    3

    ( )10log( )10

    30 10log( ( ))

    actual power level WattdBm

    actual power level Watt

    =

    = +

  • 77

    Power and EnergyPower and EnergyFor a real signal x(t), energy and power of x(t) are defined respectively by

    Energy-type signal: A signal with finite energyEx: x(t) = (t)

    Power-type signal: A signal with positive and finite powerEx: x(t) = cos(t)

    All periodic signals are power-type signal.

    2 ( )XE x t dt

    =

    / 2 2

    / 2

    1lim ( )T

    X TTP x t dt

    T =

    78

    Energy Spectral DensityEnergy Spectral Density

    Energy spectral density of energy-type signal gives the distribution of energy at various frequency of signal For a real-valued signal x(t),

    Autocorrelation function =ESD =Energy = 22 ( ) ( ) ( )X XE x t dt X f df g f df

    = = =

    2 *( ) ( ) [ ( ) ( )] [ ( ) ( ) ] [ ( )]X xg f X f F x t x t F x t x t d F R

    = = = + =

    ( ) ( ) ( ) ( ) ( )xR x t x t d x t x t

    = + =

  • 79

    PowerPower Spectral DensitySpectral Density

    For a real-valued power-type signal x(t), Autocorrelation function =PSD =Power =

    PSD is always a real nonnegative function of frequencyFind average normalized power

    ( )X XP S f df

    =

    ( ) [ ( )]X xS f F R =

    / 2

    / 2

    1( ) lim ( ) ( )T

    x TTR x t x t d

    T

    = +

    / 2 2

    / 2

    1( ) (0) lim ( )T

    x x x TTP S f df R x t dt

    T

    = = =

    80

    More on PSDMore on PSD

    For a periodic x(t) with period T0 and FS coefficient xn

    PSD is Discrete spectrum !All powers are concentrated at the harmonics

    Power at the nth harmonics at n/T0 is

    20( ) { ( )} ( )x x kkS f F R x f kf = =

    2nx

    0 0

    0

    / 2 / 2 2 / 2 ( ) /

    / 2 / 2

    2 2

    1 1( ) lim ( ) ( )T T j nt T j k t T

    x n kT TT n k

    j kfkk

    R x t x t d x e x e dtT T

    x e

    +

    = =

    = + =

    =

  • 81

    PSD and LTI systemPSD and LTI system

    Output ESD

    Output PSD

    H(f)x(t) y(t)Sx(f) Sy(f)

    2( ) ( ) ( )y xg f H f g f=

    2( ) ( ) ( )y xS f H f S f=

    82

    PSD for discrete time signalsPSD for discrete time signals

    For an aperiodic sampled signal { , x[-1], x[0], x[1], }

    For a periodic sampled signal:

    2

    2

    [ ]

    1lim [ ]2 1

    X sn

    N

    X N n N

    E T x n

    P x nN

    =

    =

    =

    =+

    12

    01

    2

    0

    [ ]

    1 [ ]

    N

    X snN

    Xn

    E T x n

    P x nN

    =

    =

    =

    =

  • 83

    IP1IP1--88: : Power SpectrumPower Spectrum

    Plot the PSD of x(t)

    Parameters setting:

    Spectrum.m : compute Sx(f) using Welch PSD method with nonoverlapped window nonparametric PSD estimatorpsd=spectrum(x,1024) : returns two vectors, one is mean vector and another is variance vector.specplot(psd,fs) : plot spectrum of data in psd with three curves, psd(mean), psd(mean+variance) and psd(mean-variance)

    0.001, [0 : :10]st t ts= =

    cos(2 47 ) cos(2 219 ) 0 10( )

    0t t t

    x t +

    = otherwise

    84

    IP1IP1--88: : Power SpectrumPower Spectrum

    0 100 200 300 400 50010

    20

    1010

    100

    1010

    Pxx X Power Spectral Density

    Frequency

    No noise

    0 100 200 300 400 50010

    5

    100

    105

    Pxx X Power Spectral Density

    Frequency

    SNR=10dB

    0 100 200 300 400 50010

    4

    102

    100

    102

    104

    Pxx X Power Spectral Density

    Frequency

    SNR=0dB

    0 100 200 300 400 50010

    2

    100

    102

    104

    Pxx X Power Spectral Density

    Frequency

    SNR=10dB

  • 85

    1.51.5 Lowpass Equivalent of Lowpass Equivalent of BandpassBandpass SignalsSignals

    Bandpass signalAll frequency components are located in the neighborhood of a central frequency f0

    Lowpass signalAll frequency components are located around the zero frequency

    f0-f0

    2WX(f)

    -W 0 W

    X(f)BP signal LP signal

    86

    Why?Why?

    To increase the efficiency of communication system, bandpass signal is usedBut, the analysis and design is usually done with lowpass signal

  • 87

    Analytic signalAnalytic signal

    Define analytic signal as (in time domain)

    where is Hilbert transform of x(t)Hilbert transform

    whereH(f) = F[h(t)] corresponds to a 90 phase shift

    ( ) ( ) ( )z t x t jx t= +

    ( )x t

    ( ) ( ) ( )x t x t h t= ( ) 1h t t=

    , 0( ) sgn( )

    , 0j f

    H f j fj f >

    = =

  • 89

    Lowpass EquivalentLowpass Equivalent

    Move central frequency of analytic signal to zero by using modulation

    f0-f0

    Z(f)

    f0-f0

    Xl(f)

    0

    0 1 0 0( ) ( ) 2 ( ) ( )lX f Z f f u f f X f f= + = + +

    Analytic signalLP equivalent signal

    90

    Lowpass EquivalentLowpass Equivalent

    In time domain

    From analytic signal, we have

    In general, xl(t) is a complex signal

    02( ) ( ) j f tlx t z t e=

    02( ) ( ) ( ) ( ) j f tlz t x t jx t x t e= + =

    0

    0

    2

    2

    ( ) Re[ ( ) ]

    ( ) Im[ ( ) ]

    j f tl

    j f tl

    x t x t e

    x t x t e

    =

    =

    ( )( ) ( ) ( ) ( ) j tl c sx t x t jx t V t e= + =

    Quadrature (sine) component of x(t)In-phase(cosine) component of x(t)

    ( )( ) arctan( )

    s

    c

    x ttx t

    = 2 2( ) ( ) ( )c sV t x t x t= +

  • 91

    Cartesian Coordinate SystemCartesian Coordinate System

    From

    We have

    Or

    020 0( ) ( ) ( ) ( ) [ ( ) ( )][cos(2 ) sin(2 )]

    j f tl c sz t x t jx t x t e x t jx t f t j f t

    = + = = + +

    0 0

    0 0

    ( ) ( ) cos(2 ) ( )sin(2 )( ) ( )sin(2 ) ( ) cos(2 )

    c s

    c s

    x t x t f t x t f tx t x t f t x t f t

    = = +

    0 0

    0 0

    ( ) ( ) cos(2 ) ( )sin(2 )( ) ( ) cos(2 ) ( )sin(2 )

    c

    s

    x t x t f t x t f tx t x t f t x t f t

    = +=

    92

    PPolarolar Coordinate SystemCoordinate System

    From , we have

    Then

    Envelope is independent of f0Phase depends on f0

    0 02 2 ( )( ) ( ) ( ) ( ) ( )j f t j f t j tlz t x t jx t x t e V t e e = + = =

    0

    0

    2 ( )0

    2 ( )0

    ( ) Re[ ( ) ] ( ) cos(2 ( ))

    ( ) Im[ ( ) ] ( )sin(2 ( ))

    j f t j t

    j f t j t

    x t V t e e V t f t tx t V t e e V t f t t

    = = +

    = = +2 2( ) ( ) ( )

    ( )( ) arctan( 2 )( ) o

    V t x t x tx tt f tx t

    = +

    =

    ( )( ) ( ) j tlx t V t e=

  • 93

    IP1IP1--99: : BP to LP transformationBP to LP transformation

    Given BP signal x(t)( ) sinc(100 )cos(2 200 )x t t t=

    94

    IP1IP1--99: : BP to LP transformationBP to LP transformation

    2 1.5 1 0.5 0 0.5 1 1.5 21

    0.5

    0

    0.5

    1BP Signal

    time

    inpu

    t sig

    nal x

    (t)

    500 400 300 200 100 0 100 200 300 400 5000

    1

    2

    3

    4

    5

    6x 10

    3

    frequency

    mag

    nitu

    de s

    pect

    rum

  • 95

    IP1IP1--99: : BP to LP transformationBP to LP transformation

    2 1 0 1 20.5

    0

    0.5

    1Inphase component,f0=200

    time

    inpu

    t sig

    nal r

    eal

    2 1 0 1 20

    0.2

    0.4

    0.6

    0.8

    1

    1.2Envelope component,f0=200

    time

    inpu

    t sig

    nal i

    mag

    500 400 300 200 100 0 100 200 300 400 5000

    0.002

    0.004

    0.006

    0.008

    0.01

    0.012LP signal

    frequency

    mag

    nitu

    de s

    pect

    rum

    96

    IP1IP1--99: : BP to LP transformationBP to LP transformation

    2 1 0 1 21

    0.5

    0

    0.5

    1Inphase component,f0=200

    time

    inpu

    t sig

    nal r

    eal

    2 1 0 1 20

    0.2

    0.4

    0.6

    0.8

    1

    1.2Envelope component,f0=200

    time

    inpu

    t sig

    nal i

    mag

    500 400 300 200 100 0 100 200 300 400 5000

    0.002

    0.004

    0.006

    0.008

    0.01

    0.012LP signal

    frequency

    mag

    nitu

    de s

    pect

    rum

  • 1

    Baseband Digital TransmissionBaseband Digital Transmission

    5.2 Binary Signal Transmission5.3 Multiamplitude Signal Transmission5.4 Multidimensional Signals

    2

    5.2 Binary Signal Transmission5.2 Binary Signal Transmission

    Data Rate: R [bps] Channel noiseAWGN n(t)

    Binary Input01101001 Mapping

    0

    1

    0 ( ), 01 ( ), 0

    b

    b

    s t t Ts t t T

    ( ) ( ) ( )0,1 , 0

    i

    b

    r t s t n ti t T

    = +=

    Bit time intervalTb = 1/R

    Bit time intervalTb = 1/R

    S0 S1 S1 S0 S1Receiver will determinewhether 0 or 1 is sent by observing r(t)

    Optimum receiver: Minimize the

    probability of error

  • 3

    Optimum receiver for AWGN channelOptimum receiver for AWGN channel

    Consists of 2 Blocks

    Get informationusing received signal(Only two signalss0(t) and s1(t) are expected)

    CorrelatorOr

    Matched FilterDetector

    BinaryDigitalSignal

    +AWGN

    OutputData

    Determine whichsignal is receivedusing the output ofCorrelator orMatched filter

    4

    Signal CorrelatorSignal Correlator

    Cross-correlates the received signal r(t) with the two possible transmitted signal s0(t) and s1(t)

    0( )

    td

    0( )

    td

    Detectorr(t) 01

    ( )( )

    s ts t

    OutputData

    0 00( ) ( ) ( )

    tr t r s d =

    1 10( ) ( ) ( )

    tr t r s d = Samples at t=Tb

  • 5

    Illustrative Problem 5.1Illustrative Problem 5.1: : orthogonal binary signalorthogonal binary signal

    Two possible transmitted signal s0(t) and s1(t), orthogonal binary signal

    Correlator output (at t = T0)

    A

    Tb

    A Tb

    S0(t) S1(t)

    -A

    0( )b

    Td

    0( )b

    Td

    r(t)=S0(t)+n(t) 0

    1

    ( )( )

    s ts t

    20 0 00 0

    20 0

    ( ) ( ) ( )b bT T

    b

    r s d s n d

    A T n n

    = +

    = + = +

    1 0 1 10 0

    1

    ( ) ( ) ( ) ( )b bT T

    r s s d s n d

    n

    = +

    =

    orthogonalSignal energy

    Noise component

    6

    Illustrative Problem 5.1Illustrative Problem 5.1: : orthogonal binary signalorthogonal binary signal

    Output of correlator (Noise free case)

    0( )

    td

    0( )

    td

    r(t)=S0(t)

    0

    1

    ( )( )

    s ts t Tb

    Tb

    /2

    0( )

    td

    0( )

    td

    r(t)=S1(t)

    0

    1

    ( )( )

    s ts t

    Tb

    Tb

    /2

  • 7

    Illustrative Problem 5.1Illustrative Problem 5.1: : orthogonal binary signalorthogonal binary signal

    Noise effects AWGN : n0, n1 are Gaussian process

    With zero mean

    And variances

    0[ ( )] 0, [ ( ) ( )] ( )2

    NE n t E n n t t = =

    0 0 00 0

    1 1 10 0

    [ ] [ ( ) ( ) ] ( ) [ ( )] 0

    [ ] [ ( ) ( ) ] ( ) [ ( )] 0

    b b

    b b

    T T

    T T

    E n E s n d s E n d

    E n E s n d s E n d

    = = =

    = = =

    ( )

    2 2

    0 0

    00 0 0 0

    2 20 0 00 0 0

    [ ] [ ( ) ( ) ( ) ( ) ]

    ( ) ( ) [ ( ) ( )] ( ) ( ) ( )2

    ( ) ( ) ( ) , 1,22 2 2

    b b

    b b b b

    b b b

    T T

    i i i i

    T T T T

    i i i i

    T T T

    i i

    E n E s t s n t n dtd

    Ns t s E n t n dtd s t s t dtd

    N N Ns t t d dt s t dt i

    = =

    = =

    = = = =

    8

    Illustrative Problem 5.1Illustrative Problem 5.1: : orthogonal binary signalorthogonal binary signal

    pdf of r0 and r1 2 200 0

    ( ) / 2

    ( | ( ))1

    2r

    p r s t

    e

    =

    0( )b

    Td

    0( )b

    Td

    r(t)=S0(t)+n(t)

    0

    1

    ( )( )

    s ts t

    r

    2 21

    1 0

    / 2

    ( | ( ))1

    2r

    p r s t

    e

    =

    0( )b

    Td

    0( )b

    Td

    r(t)=S1(t)+n(t)

    0

    1

    ( )( )

    s ts t

    r

    0 1( | ( ))p r s t1 1( | ( ))p r s t

    r0

    r1

    r0

    r1 0

    0

  • 9

    Matched FilterMatched Filter

    Alternative to signal correlator

    Identical output to correlator

    Matched Filterh(t)=s(Tb-t)

    s(t)+

    n(t)

    y(t)

    0

    0 0

    ( ) ( ) ( )

    ( ) ( ) ( ) ( )

    b

    b

    b b

    b

    T

    bt T

    T T

    bt T

    y T s h t d

    s s T t d s s d

    =

    =

    =

    = + = =

    ; convolution

    10

    Illustrative Problem 5.2Illustrative Problem 5.2

    Output of matched filter

    Tb 2Tb

    r(t)=S0(t) Tb

    TbTb Tb 2Tb

    /2

    r(t)=S1(t) Tb

    TbTb

    Tb 2Tb

    /2

    Tb 2Tb

    hi(t)=si(Tb-t)

    t

    t

    t

    t

  • 11

    The detectorThe detector

    Decides the transmitted signal is s0(t) or s1(t) by observing the output of correlator (r0 or r1)

    Optimum DetectorDetector that has minimum probability of error

    12

    Illustrative Problem 5.3Illustrative Problem 5.3 ((Bdt_f57Bdt_f57.m).m)

    Optimal Detector : if binary signals are equally probable and have equal energies. 0 ( s0(t) is sent ) if r0 > r1 1 ( s1(t) is sent ) if r0 < r1

    Probability of error If s0(t) is transmitted, but it detects s1(t)

    r0 > r1r0 < r1

    r0r1

    0

    1

    r

    0 0( | ( ))p r s t1 0( | ( ))p r s t

    Probability of error, Pe(0)r1

  • 13

    Illustrative Problem 5.3Illustrative Problem 5.3 ((Bdt_f57Bdt_f57.m).m)

    Probability of error If s0(t) is transmitted

    BER:

    is called SNR0N

    0 0

    1 1

    r nr n=+=

    2

    0

    1 0 0 1 0 1 0

    / 2

    /0 0

    (0) ( | sent) ( ) ( )

    1 12 22

    e

    x

    N

    P P r r s P n n P n n

    e dx Q erfcN N

    = > = > + = >

    = =

    14

    Illustrative Problem 5.3Illustrative Problem 5.3 ((Bdt_f57Bdt_f57.m).m)

    Same result can be obtained when s1(t) is transmitted Pe(1) Pe=Pe(0)P(0)+Pe(1)P(1)=Pe(0)[P(0)+P(1)]=Pe(0) See Figure 5.7, page 180 (Bdt_f57.m)

    Probability of error for orthogonal signals Pe decreases exponentially as the SNR increasesQ(.) and erfc(.)

    2

    2

    21( ) , probability of (0,1) in [ , )2

    2 1( ) , probability of (0, ) in ( , ]&[ , )2

    1( ) ( )2 2

    ( ) 2 ( 2 )

    t

    x

    t

    x

    Q x e dt N x

    erfc x e dt N x x

    xQ x erfc

    erfc x Q x

    =

    =

    =

    =

  • 15

    Illustrative Problem 5.3Illustrative Problem 5.3 ((Bdt_f57Bdt_f57.m).m)

    16

    Illustrative Problem 5.3Illustrative Problem 5.3 ((Bdt_f57Bdt_f57.m).m)

    1. initial_snr=0;2. final_snr=15;3. snr_step=0.25; 4. snr_in_dB=initial_snr:snr_step:final_snr;5. for i=1:length(snr_in_dB),6. snr=10^(snr_in_dB(i)/10); 7. Pe(i)=Qfunct(sqrt(snr)); 8. echo off;9. end;10. echo on;11. semilogy(snr_in_dB,Pe);12. xlabel('Input SNR per Bit')13. ylabel('Bit Error Rate (BER)')14. set(findobj('Type','line'),'LineWidth',2)

  • 17

    Monte Carlo SimulationMonte Carlo Simulation

    Sometimes the analysis of detector performance is difficult to performThe probability of errors can be estimated by using software to model the received sequences, make decisions by the receiver and count the number of error bits.There are many ways to perform the Monte-Carlo simulations, depending on the parts in communication systems you want to evaluate.The number of samples (N) required to estimate an error probability P(m) based on Monte-Carlo method satisfies N>>1/P(m). A rule of thumb is N>10/P(m). (Sec2.7)

    18

    Illustrative Problem 5.4Illustrative Problem 5.4

    Simulation Model: see Fig. 5.8Uniform random

    number generator

    Binary data source

    0 / E1 / E

    r0r1

    detectorOutput

    data

    Compare

    Error counter

    Gaussian randomnumber generator

    n0

    Gaussian random number generator

    n10 0

    01 1

    if (t) is sentr n

    sr n= +

    =

    0 01

    1 1

    if (t) is sentr n

    sr n=

    = +

  • 19

    Illustrative Problem 5.4Illustrative Problem 5.4

    Simulation Model: see Fig. 5.8 Define SNR :

    Signal generator using uniform random number with a range of [0,1]

    Noise generator:

    Simulation result : smldPe54.mTheoretical result :

    2 0 ( ) 22 2 2N SNR

    SNR SNR = = = =

    100

    ln10 ( )( )10 10

    , ( ) 10log

    10SNR dBSNR dB

    SNR SNR dB SNRN

    SNR e

    = =

    = =

    ( )0

    12 2e

    SNRP Q Q SNR erfcN

    = = =

    Used in textbook

    Suitable in multi -user scenario

    20

    Illustrative Problem 5.4Illustrative Problem 5.4

    12. theo_err_prb(i)=Qfunct(sqrt(SNR)); 13. echo off ;14. end;15. echo on;16. % Plotting commands follow17. semilogy(SNRindB1,smld_err_prb,'*r');18. hold19. semilogy(SNRindB2,theo_err_prb,'-b');20. xlabel('Input SNR per Bit')21. ylabel('Bit Error Rate (BER)')22. set(findobj('Type','line'),'LineWidth',2)

    1. SNRindB1=0:1:12;2. SNRindB2=0:0.1:12;3. for i=1:length(SNRindB1),4. % simulated error rate5. smld_err_prb(i)=smldPe54(SNRindB1(i)); 6. echo off ;7. end;8. echo on ;9. for i=1:length(SNRindB2),10. SNR=exp(SNRindB2(i)*log(10)/10); 11. % theoretical error rate

  • 21

    Illustrative Problem smldPe54Illustrative Problem smldPe54

    21. % matched filter outputs22. if (dsource(i)==0),23. r0=E+gngauss(sgma);24. r1=gngauss(sgma); % if the source output is "0"25. else26. r0=gngauss(sgma);27. r1=E+gngauss(sgma); % if the source output is "1"28. end;29. % detector follows30. if (r0>r1),31. decis=0; % decision is "0" 32. else33. decis=1; % decision is "1" 34. end;35. if (decis~=dsource(i)), % if it is an error, increase the

    error counter36. numoferr=numoferr+1;37. end;38. end;39. p=numoferr/N; % probability of error e

    1. function [p]=smldPe54(snr_in_dB)2. % [p]=smldPe54(snr_in_dB)3. % SMLDPE54 finds the probability of error for the given4. % snr_in_dB, signal to noise ratio in dB.5. E=1;6. SNR=exp(snr_in_dB*log(10)/10); % signal to noise ratio7. sgma=E/sqrt(2*SNR); % sigma, standard deviation of noise8. N=10000;9. % generation of the binary data source10. for i=1:N,11. temp=rand; % a uniform random variable over (0,1)12. if (temp

  • 23

    Antipodal Signals Antipodal Signals for binary signal transmissionfor binary signal transmission

    Antipodal If one signal is negative of other

    Choose s0(t) = s(t), s1(t) = -s(t) to transmit binary signal, where s(t) is arbitrary with energy . Then received signal is

    Are there any advantages using antipodal signal instead of orthogonal signal ?

    Tb

    TbTb

    Tb

    ( ) ( ) ( ), 0 br t s t n t t T= +

    24

    Optimum Receiver with Antipodal signalOptimum Receiver with Antipodal signal

    Matched Filter or Correlator

    0( )

    td

    ( )bs T t

    r(t)=s(t)+n(t)

    ( )s t detectorOutput decision

    Sample at t = Tb

    correlator

    Matched Filter

    Tb

    Tb

    -

    Correlator outputs(t) -s(t)

  • 25

    Noise component with Antipodal signalsNoise component with Antipodal signals

    Let be transmittedOutput of correlator (or Matched filter)

    Statistics of n and rn is Gaussian, with zero mean E[n]=0With Variance

    Therefore 0 0(0, ) and ( , )2 2

    N Nn N r N

    ( ) ( ) ( )r t s t n t= +

    2

    0( ) ( )b

    T

    br A T s t n t dt n= + = + Noise componentSignal energy

    2 2

    0 0

    20 0 0

    0 0 0

    [ ] ( ) ( ) [ ( ) ( )]

    ( ) ( ) ( ) ( )2 2 2

    b b

    b b b

    T T

    T T T

    E n s t s E n t n dtd

    N N Ns t s t dtd s t dt

    = =

    = = =

    26

    Optimum detectorOptimum detector

    Optimal detector and pdf

    0( )

    tdr(t)=

    s(t)+n(t)( )s t

    r>0r

  • 27

    BER & Benefit of antipodal signalBER & Benefit of antipodal signal

    Probability of error : if binary signals are equally probable and have equal energies

    Orthogonal signal case

    Antipodal signal is 3dB more efficient than orthogonal signal Antipodal signal gives better performance (3dB) with same signal energy Same performance with Antipodal signal energy /2 as orthogonal signal with

    energy .

    2 2

    2

    0 ( ) / 20 1

    / / 2

    0

    1(0) (1) (0) ( 0 | ( ) sent)2

    1 2( ) ( )2

    re e e e

    r

    P P P PP P P r s t e dr

    e dr Q QN

    = + = = < =

    = = =

    0

    ( )eP Q N

    =

    28

    Illustrative Problem 5.5Illustrative Problem 5.5

    Binary Antipodal Simulation: see Fig. 5.13

    Uniform random number generator

    Binary data source

    Compare

    Error counter

    detector E rn

    Gaussian random number generator

    Output data

    r n= +

  • 29

    Illustrative Problem 5.5Illustrative Problem 5.5

    Binary Antipodal Simulation: (ip_05_05a.m) Define SNR :

    Signal generator using uniform random number with a range of [0,1]

    Noise generator:

    Simulation result : (smldPe55a.m, content has been modified)Theoretical result :

    2 0 ( ) 22 2 2N SNR

    SNR SNR = = = =

    100

    ln10 ( )( )10 10

    , ( ) 10log

    10SNR dBSNR dB

    SNR SNR dB SNRN

    SNR e

    = =

    = =

    ( ) ( )0

    2 122e

    P Q Q SNR erfc SNRN

    = = =

    30

    Illustrative Problem smldPe5Illustrative Problem smldPe55 (modified)5 (modified)

    1. function [p]=smldPe55(snr_in_dB)2. E=1;3. SNR=exp(snr_in_dB*log(10)/10); % signal-to-noise ratio4. sgma=E/sqrt(2*SNR); % sigma, standard deviation of noise5. N=1000000;6. temp1=rand(N,1);7. temp2=find(temp1>0.5);8. dsource=zeros(N,1);9. dsource(temp2)=1;10. % The detection, and probability of error calculation follows.11. temp3=sgma*randn(N,1); 12. r=ones(N,1)*(-E);13. r(temp2)=E;14. r=r+temp3;15. decis=zeros(N,1);16. decis(find(r>0))=1;17. numoferr=sum(abs(dsource-decis));18. p=numoferr/N % probability of error

  • 31

    Illustrative Problem 5.5Illustrative Problem 5.5

    0 2 4 6 8 1010

    6

    105

    104

    103

    102

    101

    Input SNR (E/No)(dB)

    Bit E

    rror R

    ate

    (BER

    )

    Simulation ResultTheoretical Result

    32

    OnOn--Off signals Off signals for binary signal transmissionfor binary signal transmission

    On-Off signalsNo signal for 0Arbitrary signal s(t) for 1

    Received waveform

    Are there any advantages using On-Off signal ?

    ( ), if 0 is trasnmitted( )

    ( ) ( ), if 1 is trasnmittedn t

    r ts t n t

    = +

    TbTb

    0 1

  • 33

    Optimum detectorOptimum detector

    Detector and pdf

    0( )

    tdr(t)=

    0,s(t)( )s t

    r>r

  • 35

    Illustrative Problem 5.Illustrative Problem 5.66

    On-Off signaling simulation

    Uniform random number generator

    Binary data source

    Compare

    Error counter

    detector0 01 E

    rn

    Gaussian random number generator

    Output data

    36

    Illustrative Problem 5.Illustrative Problem 5.66

    On-Off signaling simulation (ip_05_06a.m) Define SNR :

    Signal generator using uniform random number with a range of [0,1]

    Noise generator:

    Simulation result : (smldPe56.m)Theoretical result :

    2 0 ( ) 22 2 2N SNR

    SNR SNR = = = =

    100

    ln10 ( )( )10 10

    , ( ) 10log

    10SNR dBSNR dB

    SNR SNR dB SNRN

    SNR e

    = =

    = =

    02 2e

    SNRP Q QN

    = =

  • 37

    Illustrative Problem 5.Illustrative Problem 5.66

    0 5 10 1510

    5

    104

    103

    102

    101

    100

    Input SNR (E/No)(dB)

    Bit E

    rror R

    ate

    (BER

    )

    Simulation ResultTheoretical Result

    38

    Signal Constellation Diagram for Binary SignalSignal Constellation Diagram for Binary Signal

    Performance comparison

    (0,)s1(t)

    (,0)s(t)

    (-,0)-s(t)

    (,0)s0(t)Orthogonal

    (0,0)00On-Off

    (,0)s(t)Antipodal

    Avg PowerPeCoordinatesEnergySignalsType

    0

    QN

    02Q

    N

    0

    2QN

    2

    (,0)(-,0) (,0)(0,0) (,0)

    (0,)

    Antipodal On-Off Orthogonal

    s(t)s0(t)

    s(t)

    s1(t)

  • 39

    Illustrative Problem 5.Illustrative Problem 5.7 (Orthogonal signaling)7 (Orthogonal signaling)

    Noise effects and Constellation : (ip_05_07a.m) If s0(t) is transmitted

    If s1(t) is transmitted

    Can you explain why performance of Antipodal > Orthogonal > On-Off using this figure ?

    0 0

    1 1

    r nr n= +=

    0 0

    1 1

    r nr n== +

    40

    Illustrative Problem 5.Illustrative Problem 5.77

    Noise effects and Constellation : See Figure 5.18

    1 0.5 0 0.5 1 1.5 21

    0.5

    0

    0.5

    1

    1.5

    2Signal constellation of orthogonal signals, 2=0.1

    Coefficient in axis X

    Coef

    ficie

    nt in

    axis

    Y

    Signal 1Signal 2

  • 41

    Illustrative Problem 5.Illustrative Problem 5.77

    Noise effects and Constellation : See Figure 5.18

    1 0.5 0 0.5 1 1.5 21

    0.5

    0

    0.5

    1

    1.5

    2Signal constellation of orthogonal signals, 2=0.3

    Coefficient in axis X

    Coef

    ficie

    nt in

    axis

    Y

    Signal 1Signal 2

    42

    Illustrative Problem 5.Illustrative Problem 5.77

    Noise effects and Constellation : See Figure 5.18

    1 0.5 0 0.5 1 1.5 21

    0.5

    0

    0.5

    1

    1.5

    2Signal constellation of orthogonal signals, 2=0.5

    Coefficient in axis X

    Coef

    ficie

    nt in

    axis

    Y

    Signal 1Signal 2

  • 43

    Illustrative Problem 5.Illustrative Problem 5.77

    1. sigma=[0.1 0.3 0.5];2. for ii=1:length(sigma)3. n0=sigma(ii)*randn(100,1);4. n1=sigma(ii)*randn(100,1);5. n2=sigma(ii)*randn(100,1);6. n3=sigma(ii)*randn(100,1);7. x1=1.+n0;8. y1=n1;9. x2=n2;10. y2=1.+n3;11. tt=num2str(sigma(ii));12. figure13. plot(x1,y1,'o',x2,y2,'*')14. axis('square')

    15. grid on16. axis([-1 2 -1 2])17. title(['Signal constellation of orthogonal

    signals, {\sigma}^{2}=',num2str(sigma(ii))],'fontsize',15)

    18. xlabel('Coefficient in axis X','fontsize',15)19. ylabel('Coefficient in axis Y','fontsize',15)20. set(findobj('Type','line'),'LineWidth',2.0)21. set(findobj('fontname','Helvetica'),'fontna

    me','Arial','fontsize',15)22. legend('Signal 1','Signal

    2','fontsize',15,'fontname','Arial')23. hold off24. aa=['IP_05_07' num2str(ii)];25. print('-depsc','-tiff',aa)26. end

    44

    Baseband Digital TransmissionBaseband Digital Transmission

    5.3 Multiamplitude Signal Transmission

  • 45

    Binary Vs. Binary Vs. MultiamplitudeMultiamplitude signalsignal

    Binary signal1 bit of informationTwo level to represent 0 and 1

    If we use multiple amplitude levelsWe can transmit multiple bits per signal waveform

    Questions :Probability of Error Vs. Bandwidth ???

    46

    Signal waveform Signal waveform with 4 amplitude levelswith 4 amplitude levels

    Normalized pulse whose energy is 1

    Consider 4 equally spaced Amplitude

    4 waveform called PAM(Pulse Amplitude Modulated) signal

    See figure 5.19

    1 ,0( )

    0 ,

    t TTg totherwise

    =

    (2 3) , 0,1,2,3or { 3 , , ,3 }

    m

    m

    A m d mA d d d d= =

    =

    ( ) ( ), 0m ms t A g t t T=

  • 47

    Signal waveform Signal waveform with 4 amplitude levelswith 4 amplitude levels

    Signal Constellation DiagramOne dimensional signal : g(t) is basis

    -3d -d d 3d

    S0(t) S1(t) S2(t) S3(t)00 01 11 10

    Euclidean distance = 2d

    t0T

    s t0 ( )

    3dT

    0 t

    T

    s t1( )

    dT

    0 tT

    s t2 ( )dT

    t0 T

    s t3( )3dT

    g(t)

    48

    Signal waveform Signal waveform with 4 amplitude levelswith 4 amplitude levels

    Transmit 2 bits of information per waveformAssign information to waveform

    00 s0(t)01 s1(t)11 s2(t)10 s3(t)

    Definition of SymbolEach pair of information bits {00, 01, 10, 11} is called a symbolTime duration T is called Symbol Duration

    If Bit rate R =1/Tb, then Symbol interval T = 2Tb and baud rate = 1/T=R/2

  • 49

    More on Symbol and Symbol intervalMore on Symbol and Symbol interval

    Bit rate R=1/Tb

    InformationSource

    0100110 ModulatorM=2k

    Symbol

    00011110

    s0(t)s1(t)s2(t)s3(t)

    Tb 2Tb . T=2Tb

    Ex: 9600bps = 4800sps (baud rate)

    50

    Received SignalReceived Signal

    AWGN channel assumption

    Receiver determines which of 4 signal waveform was transmitted by observing the received signal r(t)Optimum receiver is deigned by minimizing the probability of error

    ( ) ( ) ( ), 0,1,2,3, 0ir t s t n t m t T= + =

    White Gaussian processWith power spectrum N0/2

  • 51

    Optimum receiver Optimum receiver for AWGN channelfor AWGN channel

    Implementation

    Correlator

    Correlator(Matched filter)

    AmplitudeDetector

    r(t) DecisionOutput

    0( )

    td

    r(t)

    g(t)

    Samples at t=T

    0

    0

    2

    0 0

    ( ) ( )

    { ( ) ( )} ( )

    ( ) ( ) ( )

    T

    T

    i

    T T

    i

    i

    r r t g t dt

    A g t n t g t dt

    A g t dt g t n t dt

    A n

    =

    = +

    = +

    = +

    52

    Optimum receiver Optimum receiver for AWGN channelfor AWGN channel

    Statistics of correlator output Noise component : Gaussian with Zero mean and Variance of

    Received signal

    0 0

    2 2 20 0

    0

    [ ] [ ( ) ( ) ] ( ) [ ( )] 0

    [ ] ( )2 2

    T T

    T

    E n E g t n t dt g t E n t dt

    N NE n g t dt

    = = =

    = = =

    -3d -d d 3d

    2 2( ) / 21( | ( )) , 3 , , ,32

    ir Ai iP r s t e A d d d d

    = =

  • 53

    Optimum DetectorOptimum Detector

    If all symbols are equally probable , the optimum detector is the smallest distance criterion, where the thresholds are set at (-2d,0,2d) min , 0,1,2,3i iiA D r A i= = =

    Average Probability of Symbol Error

    22 2

    / 24 2/

    0

    3 3 1 3 3 2( )4 2 2 22

    xm d

    d dP P r A d e dx Q QN

    = > = = =

    -3d -d d 3d-2d 0 2d

    54

    Probability of ErrorProbability of Error

    Using Average transmitted signal energy / symbol (bit):

    SER, see figure 5.21

    2

    40

    3 22

    dP QN

    =

    42 2 2

    01

    2

    1 ( ) 54 5

    225

    T avav i i k

    i k

    avbav avb

    P s t dt d d

    d

    =

    = = = =

    = =

    40

    43 3 42 5 2 5

    avbP Q Q SNRN

    = =

  • 55

    Probability of ErrorProbability of Error

    0 2 4 6 8 10 1210

    4

    103

    102

    101

    100

    Input SNR (Eavb/No)(dB)

    Bit E

    rror R

    ate

    (BER

    )

    Simulation Result

    56

    Illustrative Problem 5.Illustrative Problem 5.8 8 44--ary PAM simulation ary PAM simulation : see Fig. 5.: see Fig. 5.2222

    Figure 5.22: Block diagram of four level PAM for Monte Carlo Simulation

    UniformRNG

    Gaussian randomNumber Generator

    compare

    Error counter

    detectorMapping to Amplitude levels +

    X Am r

    2(0, )N

    mAmr A n= +

  • 57

    Illustrative Problem 5.Illustrative Problem 5.8 8 44--ary PAM simulation ary PAM simulation : see Fig. 5.: see Fig. 5.2222

    Signal generator using uniform random number with a range of [0,1]

    Define SNR :

    Noise generator:

    Simulation result : ip_05_08a.m, smldPe58.m

    2 22 25 4(set 1) or (set 1)

    4 5d SNRd d

    SNR = = = =

    ln10 ( )

    2

    ( )10 10

    0

    2

    2 02

    10

    25

    2

    45

    SNR dBSNR dBavb

    avb

    SNR eN

    d d SNRN

    = = =

    =

    =

    =

    0 0.25 0.5 0.75 1

    S0(t) S1(t) S2(t) S3(t)-3d d -d 3d

    58

    Illustrative Problem 5.Illustrative Problem 5.8 8 44--ary PAM simulation ary PAM simulation : see Fig. 5.: see Fig. 5.2222

    0 2 4 6 8 10 1210

    4

    103

    102

    101

    100

    Input SNR (Eavb/No)(dB)

    Bit E

    rror R

    ate

    (BER

    )

    Simulation ResultTheoretical Result

  • 59

    Illustrative Problem 5.Illustrative Problem 5.88

    1. % MATLAB script for Illustrated Problem 8, Chapter 5.2. clear 3. echo on4. SNRindB1=0:1:12; 5. SNRindB2=0:0.1:12; 6. for i=1:length(SNRindB1),7. % simulated error rate 8. smld_err_prb(i)=smldPe58(SNRindB1(i)); 9. echo off;10. end;11. echo on;12. for i=1:length(SNRindB2),13. % signal to noise ratio14. SNR_per_bit=exp(SNRindB2(i)*log(10)/10); 15. % theoretical error rate16. theo_err_prb(i)=(3/2)*Qfunct(sqrt((4/5)*SNR_per_bit)); 17. echo off;18. end;19. echo on;

    20. figure21. semilogy(SNRindB2,theo_err_prb,'r-','LineWidth',2.0);22. xlabel('Input SNR

    (Eavb/No)(dB)','fontsize',15,'fontname','Arial')23. ylabel('Bit Error Rate (BER)','fontsize',15,'fontname','Arial')24. set(findobj('Type','line'),'LineWidth',2.0)25. set(findobj('fontname','Helvetica'),'fontname','Arial','fontsiz

    e',15)26. legend('Simulation Result','Theoretical

    Result','fontsize',15,'fontname','Arial')27. hold off28. print -depsc -tiff IP_05_08a29. figure30. semilogy(SNRindB1,smld_err_prb,'b*','LineWidth',2.0);31. hold32. semilogy(SNRindB2,theo_err_prb,'r-','LineWidth',2.0);33. xlabel('Input SNR

    (Eavb/No)(dB)','fontsize',15,'fontname','Arial')34. ylabel('Bit Error Rate (BER)','fontsize',15,'fontname','Arial')35. set(findobj('Type','line'),'LineWidth',2.0)36. set(findobj('fontname','Helvetica'),'fontname','Arial','fontsiz

    e',15)37. legend('Simulation Result','Theoretical

    Result','fontsize',15,'fontname','Arial')38. hold off39. print -depsc -tiff IP_05_08b

    60

    Illustrative Problem 5.Illustrative Problem 5.8 8 smldPe58smldPe58.m.m

    1. function [p]=smldPe58(snr_in_dB)2. % [p]=smldPe58(snr_in_dB)3. % SMLDPE58 simulates the probability of error for the

    given4. % snr_in_dB, signal to noise ratio in dB.5. d=1;6. SNR=exp(snr_in_dB*log(10)/10); % signal to noise ratio per

    bit7. sgma=sqrt((5*d^2)/(4*SNR)); % sigma, standard deviation of

    noise8. N=10000; % number of symbols being simulated9. % Generation of the quaternary data source follows.10. for i=1:N,11. temp=rand; % a uniform random variable over

    (0,1)12. if (temp

  • 61

    MM--aryary PAM PAM Signal waveforms with multiple amplitude levelsSignal waveforms with multiple amplitude levels

    General case : M=2k M-ary signal waveforms

    where g(t) is a baseband pulse waveform with unit energy

    Each signal waveform conveys k=log2M bits of information If bit rate Rb=1/Tb, then symbol (baud) rate is Rs=1/T=1/kTb=R/k

    ( ) ( ), 0 , 0,1,2,..., 1(2 1) , 0,1,2,..., 1

    m m

    m

    s t A g t t T m MA m M d m M

    = = = + =

    (-M+1)d -3d -d d 3d 5d (M-1)d

    Euclidean distance = 2d

    62

    MM--aryary PAM PAM Signal waveforms with multiple amplitude levelsSignal waveforms with multiple amplitude levels

    Optimum receiverA single correlator (or Matched filter)An amplitude detectorCompute Euclidean distance for m=0,1,2,,M-1

    ( ) ( ) ( ), 0,1, , 1, 0ir t s t n t i M t T= + = White Gaussian process with power spectrum density= N0/2

    0 0

    22 0

    22

    , (0, ), ( , )2 2

    ( )1( | ( )) exp , 222

    i i

    ii

    N Nr A n n N r N A

    r A Np r s t

    = +

    = =

  • 63

    MM--aryary PAM PAM Signal waveforms with multiple amplitude levelsSignal waveforms with multiple amplitude levels

    Probability of Error in M-level PAM system Using the BER analysis of binary signaling scheme, we have

    Furthermore1 1

    2 2 2 2 2

    0 02 2

    2 22

    22

    2 22 2 2

    00

    1 1 1(2 1) ( 1)3

    3 log( 1)3log ( 1)

    6 log 6log , ( 1) ( 1)

    M M

    av ii i

    av avbavb

    avb avb

    E A i M d M dM ME E MM dE dK M ME M EMd SNR SNR

    NM N M

    = =

    = = + =

    = = =

    = = =

    1

    0

    (0) ( 1), ( ) 2 , 1,2, , 2

    1assumi(2 2 n)( ) , g

    e e e

    M

    e iM ii

    d dP Q P M P i Q i M

    M dP P PM

    P i QM

    =

    = = = =

    = =

    =

    64

    Illustrative Problem 5.Illustrative Problem 5.99 MM--aryary PAM simulationPAM simulation

    Probability of Error in M-level PAM system Finally

    figure5_24.m, theoretical result in figure 5.24 for M=2,4,8,16 IP_05_09.m(+smldPe59.m) Monte-Carlo simulation in fig 5.25 for M=16 Note the settings for signal and noise generator

    22

    6(log )2( 1)( 1)M

    MMP Q SNRM M

    =

    2 22

    0 22

    2

    ( 1)given , then 6 log

    85If 16, then 8

    avbE d MSNRN SNR M

    dMSNR

    = =

    = = A bad programming setting

  • 65

    Theoretical BER simulation (figure_05_24.m)Theoretical BER simulation (figure_05_24.m)

    0 5 10 15 20 2510

    8

    106

    104

    102

    100

    Input SNR (Eavb/No)(dB)

    Sym

    bol E

    rror R

    ate

    (SER

    )

    M=2M=4M=8M=16

    M,SER

    66

    Illustrative Problem 5.Illustrative Problem 5.9 9 : Monte: Monte--Carlo trialsCarlo trials

    5 10 15 20 2510

    8

    106

    104

    102

    100

    Input SNR (Eavb/No)(dB)

    Bit E

    rror R

    ate

    (BER

    )

    M=16 PAM

    Simulation ResultTheoretical Result

  • 67

    Illustrative Problem smldPe59Illustrative Problem smldPe59

    1. function [p]=smldPe59(snr_in_dB)2. % [p]=smldPe59(snr_in_dB)3. % SMLDPE59 simulates the error probability for the given4. % snr_in_dB, signal to noise ratio in dB.5. M=16; % 16-ary PAM6. d=1;7. SNR=exp(snr_in_dB*log(10)/10); % signal to noise ratio per bit8. sgma=sqrt((85*d^2)/(8*SNR)); % sigma, standard deviation of noise9. N=10000; % number of symbols being simulated10. % generation of the quarternary data source11. for i=1:N,12. temp=rand; % a uniform random variable over (0,1)13. index=floor(M*temp); % the index is an integer from 0 to M-1,

    where14. % all the possible values are equally likely15. dsource(i)=index;16. end;17. % detection, and probability of error calculation18. numoferr=0;19. for i=1:N,20. % matched filter outputs21. % (2*dsource(i)-M+1)*d is the mapping to the 16-ary constellation22. r=(2*dsource(i)-M+1)*d+gngauss(sgma); 23. % the detector 24. if (r>(M-2)*d),25. decis=15;26. elseif (r>(M-4)*d),27. decis=14;28. elseif (r>(M-6)*d),29. decis=13;30.

    31. elseif (r>(M-8)*d),32. decis=12;33. elseif (r>(M-10)*d),34. decis=11;35. elseif (r>(M-12)*d),36. decis=10;37. elseif (r>(M-14)*d),38. decis=9;39. elseif (r>(M-16)*d),40. decis=8;41. elseif (r>(M-18)*d),42. decis=7;43. elseif (r>(M-20)*d),44. decis=6;45. elseif (r>(M-22)*d),46. decis=5;47. elseif (r>(M-24)*d),48. decis=4;49. elseif (r>(M-26)*d),50. decis=3;51. elseif (r>(M-28)*d),52. decis=2;53. elseif (r>(M-30)*d),54. decis=1;55. else56. decis=0; 57. end;58. if (decis~=dsource(i)), % if it is an error, increase the error counter59. numoferr=numoferr+1;60. end;61. end;62. p=numoferr/N; % probability of error estim

    68

    Baseband Digital TransmissionBaseband Digital Transmission

    5.4 Multidimensional Signals

  • 69

    Multidimensional Vs. Multidimensional Vs. MultiamplitudeMultiamplitude

    Multiamplitude signal is One-dimensional

    With One basis signal: g(t)

    Multidimensional signalCan be defined using multidimensional orthogonal signals

    -3d -d d 3d

    00 01 10 11

    70

    Multidimensional Orthogonal SignalsMultidimensional Orthogonal Signals

    Many ways to constructIn this text, Construction of a set of M=2k waveforms si(t), i=1,2,,M-1Mutual OrthogonalityEqual EnergyUsing Mathematics

    0( ) ( ) , , 0,1,..., 1

    1,where , is Kronecker delta

    0,

    T

    i k ik

    ik

    s t s t dt i k M

    i ki k

    = =

    ==

  • 71

    Example of M=2Example of M=222

    Multiamplitude Vs. Multidimensional

    All signals have identical energy

    See figure 5.27, page 208, for signal constellation M=2, 3

    s3s2s1s0

    t

    3dd

    -d-3d

    22

    0( ) , 0,1,..., 1

    T

    iA Ts t dt i MM

    = = =

    s0 s1 s2 s3

    t or f

    A

    72

    ExampleExampless

    4 orthogonal equal energy signal waveforms

    Signal constellation M=2, 3

    AT

    s t3( )

    34T t

    AT

    s t2 ( )

    34TT

    2t

    T4

    T

    s t0 ( )

    At

    AT

    s t1( )

    T4

    T2

    t

    M=2

    E s0s1

    E

    M=3

    E s0s1

    E

    E

    2s

  • 73

    ExampleExampless

    M-orthogonal equal energy signal waveforms can be represented by a set of M-dimensional orthogonal vectors. The waveform basis contains the unit-energy signal waveforms and the coordinates are shown in the following as M-dimensional orthogonal vectors

    0

    1

    2

    1

    ( ,0,0,0, ,0)

    (0, ,0,0, ,0)

    (0,0, ,0, ,0)

    (0, ,0,0,0, )M

    s E

    s E

    s E

    s E

    =

    =

    =

    =

    74

    Receiver for AWGN ChannelReceiver for AWGN Channel

    Received signal from AWGN channel

    Receiver decides which of M signal waveform was transmitted by observing r(t)Optimum receiver minimizes Probability of Error

    ( ) ( ) ( ), 0,1,..., 1, 0ir t s t n t m M t T= + =

    White Gaussian processWith power spectrum N0/2

  • 75

    Optimum Receiver Optimum Receiver for AWGN Channelfor AWGN Channel

    Needs M Correlators (or Matched Filters)

    0( ) ( ) , 0,1,..., 1

    T

    i ir r t s t dt i M= =

    0( )

    td

    r(t)s0(t)

    Samples at t=T

    0( )

    td

    sM-1(t)Detector

    OutputDecision

    r0

    rM-1

    76

    Signal CorrelatorsSignal Correlators

    Let s0(t) be transmitted

    Statistics of noise component (Gaussian Process)Zero mean and Variance

    0 0 0 00 0

    20 0 00 0

    ( ) ( ) { ( ) ( )} ( )

    ( ) ( ) ( )

    T T

    T T

    r r t s t dt s t n t s t dt

    s t dt s t n t dt n

    = = +

    = + = +

    0 00 0

    00 0

    ( ) ( ) { ( ) ( )} ( )

    ( ) ( ) ( ) ( ) , 0

    T T

    i i

    T T

    i i i

    r r t s t dt s t n t s t dt

    s t s t dt s t n t dt n i

    = = +

    = + =

    Orthogonal

    2 2 20 0

    0

    2 20

    ( ) ( )2 2

    ( , ), (0, )

    T

    i i

    i

    N NE n s t dt

    r N r N

    = = =

  • 77

    pdfpdf of correlator outputof correlator output

    Let s0(t) is transmitted

    Mean of correlator outputE[r0] = , E[ri] = 0

    0( )

    td

    s0(t)+n(t)

    s0(t) Samples at t=T

    0( )

    td

    sM-1(t)

    r0

    rM-1

    2 20

    0 0

    ( ) / 2

    ( | ( ))1

    2r

    P r s t

    e

    =

    2 2

    0

    / 2

    ( | ( ))1

    2i

    i

    r

    P r s t

    e

    =

    0

    78

    Optimum DetectorOptimum Detector

    For equiprobable symbol, the optimum detector is the smallest distance criterion or the largest correlator output.Let s0(t) be transmittedThe probability of correct decision Is probability that r0 > ri

    Symbol error probability

    are linearly independent

    0 1 0 2 0 1( , ,..., )c MP P r r r r r r = > > >

    0 1 2 1, , ,..., Mr r r r 1

    0 1 0 2 0 1 1 0 01

    1 0

    ( , ,..., ) ( | ( ))

    ( )

    Mc M i i

    Mi i

    P P r r r r r r P r r s tP r r

    =

    =

    = > > > = >

    = >

    0 1 0 2 0 11 1 ( , ,..., )M c MP P P r r r r r r = = > > >

  • 79

    Optimum DetectorOptimum Detector

    For a fixed r00

    0 0 0 0( | ) 1 ( | ) 1i irP r r r P r r r Q < = > =

    [ ]1

    1 1 00 1 0 0 1 0 0

    10

    0 0

    ( | ) ( | ) 1 ( | ) 1

    ( | ) 1 ( | ) 1 1

    MM Mi i i i

    M

    rP c r P r r r P r r r Q

    rP e r P c r Q

    = =

    = > = < =

    = =

    r

    20 (0, )r N 2(0, )ir N

    0 r00 0( | )iP r r r>

    80

    Optimum DetectorOptimum Detector

    Using Bayes theorem

    Then

    2 20

    0 0 0

    ( ) 20

    0

    /

    0( / ) ( ) ( / ) ( )

    where 1( )2

    r

    MP P e r P r P e r P r dr

    P r e

    = =

    =

    { }

    2 20

    20

    1( ) / 20

    0

    ( 2 / ) / 21

    11 12

    1 1 [1 ( )]2

    Mr

    M

    y NM

    rP Q e dr

    Q y e dy

    =

    =

    0

    20

    0

    where , 2

    Note : ( ), , for binary caseb bP Q

    ryN

    N

    =

    = =

    In text, use bdt_int.m to describe the integration elements

  • 81

    Symbol Symbol errorerror rate & Bit error raterate & Bit error rate

    Converting probability of symbol error to probability of a binary digit error.For equiprobable orthogonal signals, all symbol errors are equiprobable.The number of possible error symbols is M-1. If the symbol is in error, the bit error probability is

    Average bit error probability12

    2 1

    k

    b MkP P

    =

    Symbol error probabilityBit error probability

    1 12 21 2 1

    K K

    KM

    =

    82

    Theoretical BER simulationTheoretical BER simulation

    Bdt_f527.m SNR settings : SNR per bit

    Use bdt_int.m to describe the integration elements

    Figure 5.29 : We can reduce SNR per bit to get a given probability of error by increasing the number M of waveforms.

    { } 20

    1

    ( 2 / ) / 21

    22 1

    1 1 [1 ( )]2

    k

    b Mk

    y NMM

    P P

    P Q y e dy

    =

    =

    ln10 ( )( )10 10

    20

    0

    2

    Given 10 , th

    2log 2 lo

    e

    nd g

    n

    a

    SNR dBSNb

    b

    R dB

    bEE E

    ESNR

    K E M SNR MN

    eN

    = = =

    = = =i

    Bdt_int.m

  • 83

    Theoretical BER simulationTheoretical BER simulation

    M,BER, WHY???

    84

    Illustrative problemIllustrative problem 5.10 : Monte5.10 : Monte--Carlo trialsCarlo trials

    M=4 Orthogonal signaling simulation: see figure 5.30

    En0 r0

    n1 r1

    n20

    0

    0 n3

    Output decision

    Uniform RNG

    Error counter

    Comparesi with ^si

    Mapping to signal points

    Gaussian RNG

    detector

    Gaussian RNG

    Gaussian RNG

    Gaussian RNG

    2r

    3r

    is

    si

  • 85

    Illustrative problemIllustrative problem 5.10 : Monte5.10 : Monte--Carlo trialsCarlo trials

    M=4 Orthogonal signaling simulation: IP_05_10.mSignal model IUsing si(t) as matched filter

    SNR settings : SNR per bit

    2 2 20 0

    0

    2 2

    or

    ( ) ( )2 2

    ( , ) or (0, )

    i i i i

    T

    i i

    i i

    r n r nN NE n s t dt

    r N r N

    = + =

    = = =

    ln10 ( )( )10 10

    02

    22

    02

    Given 10 , then

    log and2 2

    2 log

    SNR dBSNR dBb

    bb

    ESNR eN

    EN EEE E MSN NRR

    ES M

    ===

    = = =

    =

    i

    86

    Illustrative problemIllustrative problem 5.10 : Monte5.10 : Monte--Carlo trialsCarlo trials

    Signal model IIUsing as matched filter

    SNR settings : SNR per bit

    2 2 20 0

    0

    2 2

    or

    ( ) ( )2 2

    ( , ) or (0, )

    i i i i

    T

    i i

    i i

    r E n r nN NE n t dt

    r N E r N

    = + =

    = = =

    ln10 ( )( )10 10

    0

    02

    22

    Given 10 , then

    2 l

    log ao

    nd2 2 g

    SNR dBSNR dBb

    bb

    ESNR eN

    N EE E MSN SN MR

    ER

    =

    = =

    =

    = =

    =i

    ( )( )

    ( )i

    ii

    s tts t

    =

  • 87

    Illustrative problemIllustrative problem 5.10 : Monte5.10 : Monte--Carlo trialsCarlo trials

    Perform in smldP510.m by using signal model II is misused by signal model I, comparing the signal model ri

    and noise variance.2

    Be careful to the SNR settings. In text, the author mixed two signal models together and misled the readers a lot.

    88

    Illustrative problemIllustrative problem 5.10 : Monte5.10 : Monte--Carlo trialsCarlo trials

  • 89

    Illustrative Problem smldPe5Illustrative Problem smldPe51010

    1. function [p]=smldP510(snr_in_dB)2. M=4; % quarternary orthogonal signalling3. E=1;4. SNR=exp(snr_in_dB*log(10)/10); % signal to noise ratio per

    bit5. sgma=sqrt(E^2/(4*SNR)); % sigma, standard deviation of

    noise6. N=10000; % number of symbols being simulated7. % generation of the quarternary data source8. for i=1:N,9. temp=rand; % a uniform random variable over

    (0,1)10. if (temp

  • 91

    BiorthogonalBiorthogonal SignalsSignals

    Signal Constellation

    Examples M=2 : Antipodal signal M=4

    0 / 2

    1 / 2 1

    / 2 1 1

    ( ) ( ,0,0,...,0), ( ,0,0,...,0)

    ( ) (0, ,0,...,0), (0, ,0,...,0)

    ( ) (0,0,0,..., ), (0,0,0,..., )

    M

    M

    M M

    s t s

    s t s

    s t s

    +