413 feasibility

Upload: samet-develi

Post on 06-Apr-2018

238 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 413 Feasibility

    1/12

    DOKUZ EYLUL UNIVERSITY

    Faculty of Engineering

    Electrical & Electronics Engineering Department

    EE 413

    DIGITAL COMMUNICATION SYSTEMS

    PROJECT # 1

    FEASIBILITY REPORT

    2006502011 Onur NE2006502012 Samet DEVEL

    18 November 2011

  • 8/3/2019 413 Feasibility

    2/12

    THEORY

    HOW IS SOUND RECORDED DIGITALLY?

    Recording onto a tape is an example of analog recording. Audacity deals with digital

    recordings - recordings that have been sampled so that they can be used by a digital computer,

    like the one you're using now. Digital recording has a lot of benefits over analog recording.

    Digital files can be copied as many times as you want, with no loss in quality, and they can be

    burned to an audio CD or shared via the Internet. Digital audio files can also be edited much

    more easily than analog tapes.

    The main device used in digital recording is an Analog-to-Digital Converter (ADC).

    The ADC captures a snapshot of the electric voltage on an audio line and represents it as a

    digital number that can be sent to a computer. By capturing the voltage thousands of times per

    second, you can get a very good approximation to the original audio signal:

    Figure 1: Audio signal with audio samples

    Each dot in the figure above represents one audio sample. There are two factors that

    determine the quality of a digital recording:

    Sample rate: The rate at which the samples are captured or played back, measured in

    Hertz (Hz), or samples per second. An audio CD has a sample rate of 44,100 Hz, often

    written as 44 KHz for short. This is also the default sample rate that Audacity uses,

    because audio CDs are so prevalent.

    Sample format orsample size: Essentially this is the number of digits in the digital

    representation of each sample. Think of the sample rate as the horizontal precision of

    the digital waveform, and the sample format as the vertical precision. An audio CD

    has a precision of 16 bits, which corresponds to about 5 decimal digits.

    Higher sampling rates allow a digital recording to accurately record higher frequencies

    of sound. The sampling rate should be at least twice the highest frequency you want torepresent. Humans can't hear frequencies above about 20,000 Hz, so 44,100 Hz was chosen as

  • 8/3/2019 413 Feasibility

    3/12

    the rate for audio CDs to just include all human frequencies. Sample rates of 96 and 192 KHz

    are starting to become more common, particularly in DVD-Audio, but many people honestly

    can't hear the difference.

    Playback of digital audio uses a Digital-to-Analog Converter (DAC). This takes the

    sample and sets a certain voltage on the analog outputs to recreate the signal, which the

    Analog-to-Digital Converter originally took to create the sample. The DAC does this as

    faithfully as possible and the first CD players did only that, which didn't sound good at all.

    Nowadays DACs use Oversampling to smooth out the audio signal. The quality of the filters

    in the DAC also contributes to the quality of the recreated analog audio signal. The filter is

    part of a multitude of stages that make up a DAC.

    PULSE - CODE MODULATION (PCM)

    PCM is a digital transmission system with an analog-to-digital converter (ADC) at the

    input and a digital-to-analog converter (DAC) at the output.

    When the digital error probability is sufficiently small, PCM performance as an analog

    communication system depends primarily on the quantization noise introduced by the ADC.

    PCM Generation and Reconstruction

    Figure 2: PCM Generation System

    Figure 5 is the functional blocks of a PCM generation system. The analog input

    waveform x(t) is lowpass filtered and sampled to obtain x(kTs). A quantizer rounds off the

    sample values to the nearest discrete value in a set of q quantum levels. The resulting

    quantized samples xq(kTs) are discrete in time (by virtue of sampling) and discrete in

    amplitude (by virtue of quantizing).

    To display the relationship between x(kTs) and xq(kTs), let the analog message be a

    voltage waveform normalized such that . Uniform quantization subdivides the 2-

    V peak to peak range into q equal steps of height 2/q V, as shown in figure 6.

  • 8/3/2019 413 Feasibility

    4/12

    Figure 3: Quantization characteristic

    The quantum levels are then taken to be at 1/q, 3/q, , (q-1)/q in the usual case

    when q is an even integer. A quantized values such as corresponds to any

    sample value in the range .

    Next an encoder translates the quantized samples into digital code words. The encoder

    works with M-ary digits and produces for each sample a codewords with digits per word,

    unique encoding of the q different quantum levels requires that . The parameters

    and should be chosen to satisfy the equality, so that

    Thus, the number of quantum levels for binary PCM equals some power of 2, namely

    .

    Finally, successive codewords are read out serially to constitute the PCM waveform,

    an M-ary digital signal. The PCM generator thereby acts as an ADC, performing analog - to

    digital conversions at the sampling rate . A timing circuit coordinates the samplingand parallel - to serial read out.

    Each encoded sampl is represented by a -digit output word, so the signaling rate

    becomes with . Therefore, the bandwidth needed for PCM baseband

    transmission is

  • 8/3/2019 413 Feasibility

    5/12

    Fine grain quantization for accurate reconstruction of the message waveform

    requires , which increases the transmission bandwidth by the factor times

    the message bandwidth W.

    Now consider a PCM receiver with the reconstruction system in figure 7.

    Figure 4: PCM receiver

    The received signal may be contaminated by noise, but regeneration yields a clean and nearly

    errorless waveform if is sufficiently large. The DAC operations of serial to

    parallel conversion, M-ary decoding, and sample and hold generate the analog waveform

    drawn in figure 8. This waveform is a staircase approximation of , similar to flat

    top sampling except that the sample values have been quantized. Lowpass filtering then

    produces the smoothed output signal , which differs from the message to the extent

    that the quantized samples differ from the exact sample values .

    Figure 5: Reconstructed waveform

    Perfect message reconstructed is therefore impossible in PCM, even when random

    noise has no effect. The ADC operation at the transmitter introduces permanent errors that

    appear at the receiver as quantization noise in the reconstructed signal.

  • 8/3/2019 413 Feasibility

    6/12

    PROPOSAL

    Learning objectives

    In order to accomplish this project we have to know digital communicationtechniques. The learning subjects can be listed as below:

    General Digital Communication Systems

    o Source of the Digital Communication Systems

    o Advantages & Disadvantages of Digital over Analog Systems

    o The Main Blocks that forms the Digital Communication Systems

    Learning MATLAB

    o General functions that are going to be used

    o Learning performance improvement algorithms

    Source Encoding and Decoding

    o Propose and Importance of the Coding

    o Techniques for Source Coding & Decoding

    o Detailed examination Pulse Code Modulation (PCM)

    o Signal to Quantization Noise Ratio (SQNR)

    Channels

    o Types of the Channel Models

    o Important Characteristics of the Channels

    o Detailed Analysis of Additive White Gaussian Noise (AWGN)

    Modulator & Demodulator

    o The importance of these blocks

    o Types of the Modulator & Demodulator

    o Learning PSK technique

    o Learning Gray Mapping Techniques

    Channel Encoding & Decoding

    o The Main Propose of this Coding

    o Techniques for Channel Coding & Decoding

    o Learning Convolution Code (Non-systematic) Techniques

    o Viterbi Decoding Algorithm

    o Important Characteristics and Issues that Affect the System Performance

    o To evaluate the Bit Error Rate (BER)

  • 8/3/2019 413 Feasibility

    7/12

    o Signal to Noise Ratios

    o Preparation of some important performance test and their outputs

    The Goal of This Project:

    1. To understand the fundamentals of digital communications techniques.

    2. To understand the underlying concepts of channel encoding decoding and baseband

    digital modulation-demodulation.

    3. To generate a white Gaussian noise sequence and to observe the effect of channel

    noise with varying power on overall system performance.

    4. To evaluate the Bit Error Rate (BER) versus signal to noise ratio (SNR) of a digital

    communication system.

    MATLAB CODES

    Analog to Digital Conversion (ADC)

    %EE413_Digital Communication Systems

    %Project 1

    %Group Members: ONUR NE - SAMET DEVEL

    %ADC- Analog to Digital Conversion

    clc

    clear all

    close all

    Fs = 8000;%sampling frequency

    n=3;%digits is eqal to n-1

    x=sin(2*pi*(0:(Fs-1))/Fs); %sampling equation of sinusoidal input signal

    %eps returns the distance from 1.0 to the next largest double-precision

    %number

    %find(x)= Find indices and values of nonzero elements

    x(find(x>=1))=(1-eps);

    %B = floor(A) rounds the elements of A to the nearest integers less than or

    %equal to A.For complex A, the imaginary and real parts are rounded

    %independently.

    xq=floor((x+1)*2^(n-1)); %quantized samples signal

    xq=xq/(2^(n-1));

    xq=xq-(2^(n)-1)/2^(n);

    stem(xq) %quantized signal plot

    grid on

  • 8/3/2019 413 Feasibility

    8/12

    hold on

    plot(x,'r') %sinusoidal sampling signal plot

    xlabel('fs')

    ylabel('voltage')

    title('quantized signal and sinusoidal sampling signal(red one)')

    figure

    plot(x,xq) %quantization characteristic screen

    grid on

    xlabel('x(kTs)')

    ylabel('xq(kTs)')

    title('quantizatation characteristic')

    0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0 7 0 0 0 8 0 0 0

    - 1

    - 0 . 8

    - 0 . 6

    - 0 . 4

    - 0 . 2

    0

    0 . 2

    0 . 4

    0 . 6

    0 . 8

    1

    f s

    v

    o

    lta

    g

    e

    q u a n t i z e d s i g n a l a n d s i n u s o i d a l l i i

  • 8/3/2019 413 Feasibility

    9/12

    - 1 - 0 . 8 - 0 . 6 - 0 . 4 - 0 . 2 0 0 . 2 0 . 4 0 . 6 0 . 8 1- 1

    - 0 . 8

    - 0 . 6

    - 0 . 4

    - 0 . 2

    0

    0 . 2

    0 . 4

    0 . 6

    0 . 8

    1

    x ( k T s )

    x

    q(kT

    s

    )

    q u a n t i z a t a t i o n c h a r a c t e r i s t i c

    Digital to Analog Conversion (DAC)

    %EE413_Digital Communication Systems

    %Project 1

    %Group Members: ONUR NE - SAMET DEVEL

    %DAC- Digital to Analog Conversion

    clc

    clear all

    close all

    Fs = 8000;%sampling frequency

    n=6;%digits is equal to n-1

    x=sin(2*pi*(0:(Fs-1))/Fs); %sinusoidal input signal

    %eps returns the distance from 1.0 to the next largest double-precision

    %number

    %find(x)= Find indices and values of nonzero elements

    x(find(x>=1))=(1-eps);

    %B = floor(A) rounds the elements of A to the nearest integers less than or

    %equal to A.For complex A, the imaginary and real parts are rounded

    %independently.

    xq=floor((x+1)*2^(n-1)); %quantized samples signal

    xq=xq/(2^(n-1));

    xq=xq-(2^(n)-1)/2^(n);

    stem(xq) %quantized signal plot

  • 8/3/2019 413 Feasibility

    10/12

    grid on

    hold on

    plot(x,'r') %sinusoidal sampling signal plot

    xlabel('fs')

    ylabel('voltage')

    title('quantized signal and sinusoidal sampling signal(red one)')

    figure

    plot(x,xq) %quantization characteristic screen

    grid on

    xlabel('x(kTs)')

    ylabel('xq(kTs)')

    title('quantizatation characteristic')

    k=0:7999; %sample

    m = 0:length(xq)-1;

    for i=1:length(k)y(i) = sum(xq.*sinc(m- k(i)));

    end

    figure

    plot(k,y); %DAC signal

    hold on

    plot(x,'r') %sinusoidal sampling signal plot

    title('DAC signal and sinusoidal signal plot(red one)')

    grid on

    0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0 7 0 0 0 8 0 0 0- 1

    - 0 . 8

    - 0 . 6

    - 0 . 4

    - 0 . 2

    0

    0 . 2

    0 . 4

    0 . 6

    0 . 8

    1

    f s

    voltage

    q u a n t iz e d s i g n a l a n d s in u s o i d a l s a m p l i n g s i g n a l ( r

  • 8/3/2019 413 Feasibility

    11/12

    -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

    -0.8

    -0.6

    -0.4

    -0.2

    0

    0.2

    0.4

    0.6

    0.8

    1

    x(kTs)

    xq(kTs)

    quantizatation characteristic

    0 1000 2000 3000 4000 5000 6000 7000 8000-1

    -0.8

    -0.6

    -0.4

    -0.2

    0

    0.2

    0.4

    0.6

    0.8

    1DAC signal and sinusoidal signal plot(red one)

  • 8/3/2019 413 Feasibility

    12/12

    GROUP WORK PLAN

    After taking project and researching some information about project topic, we

    determine tasks about project studying time. For this aim, we prepare gantt chart. This table

    includes planning programs for time duration. Both group members are responsible for each

    tasks.

    Task \ Date Nov/15Nov/1

    8Nov/2

    2Nov/2

    9Dec/6

    Preparing a feasibility report

    A/D and D/A conversion using MATLAB

    Preparing Interim Report 1

    Modulator-demodulator using MATLAB

    Preparing Interim Report 2

    Channel encoder/decoder using MATLAB

    Designing a GUI

    Preparing poster presentation

    Writing final report

    REFERENCES

    Communication Systems, A. Bruce Carlson, Paul B. Crilly, Janet C.Rutledge, Mc

    Graw Hill

    Modern Digital and Analog Communication Systems, B. P. Lathi, Oxford

    University Press 1998

    Communication Systems, Simon Haykin, John Wiley & Sons, Inc.