tecnicas de codificacion(1)

download tecnicas de codificacion(1)

of 49

Transcript of tecnicas de codificacion(1)

  • 8/4/2019 tecnicas de codificacion(1)

    1/49

    CodificacinCodificacin dede datosdatos

    ObjetivoObjetivo:: describirdescribir loslos procesosprocesos dedecodificacincodificacin dede datosdatos..

  • 8/4/2019 tecnicas de codificacion(1)

    2/49

    Signal Encoding TechniquesSignal Encoding Techniques

  • 8/4/2019 tecnicas de codificacion(1)

    3/49

    Digital Data, Digital SignalDigital Data, Digital Signal

    Digital signalDigital signal

    discrete, discontinuous voltage pulsesdiscrete, discontinuous voltage pulses

    each pulse is a signal elementeach pulse is a signal element

    binary data encoded into signal elementsbinary data encoded into signal elements

  • 8/4/2019 tecnicas de codificacion(1)

    4/49

    Some TermsSome Terms

    unipolarunipolar

    polarpolar

    data ratedata rate

    duration or length of a bitduration or length of a bit

    modulation ratemodulation rate

    mark and spacemark and space

  • 8/4/2019 tecnicas de codificacion(1)

    5/49

    Interpreting SignalsInterpreting Signals

    need to knowneed to know

    timing of bitstiming of bits -- when they start and endwhen they start and end

    signal levelssignal levels

    factors affecting signal interpretationfactors affecting signal interpretation signal to noise ratio (signal to noise ratio (relacinrelacin sealseal//ruidoruido))

    data rate(data rate(velocidadvelocidad dede transmisintransmisin))

    bandwidthbandwidth

    encoding schemeencoding scheme

  • 8/4/2019 tecnicas de codificacion(1)

    6/49

    Comparison of EncodingComparison of Encoding

    SchemesSchemes

    signal spectrumsignal spectrum clockingclocking

    error detectionerror detection

    signal interference and noise immunitysignal interference and noise immunity

    cost and complexitycost and complexity

  • 8/4/2019 tecnicas de codificacion(1)

    7/49

    Definicin de los formatos deDefinicin de los formatos de

    codificacin digital de sealescodificacin digital de seales No retorno a cero (NRZL)No retorno a cero (NRZL)

    0=nivel alto0=nivel alto 1=nivel bajo1=nivel bajo

    No retorno a cero invertido(NRZI)No retorno a cero invertido(NRZI)

    0= no hay transicin al comienzo del intervalo(un bit cada vez)0= no hay transicin al comienzo del intervalo(un bit cada vez) 1= transicin al comienzo del intervalo1= transicin al comienzo del intervalo

  • 8/4/2019 tecnicas de codificacion(1)

    8/49

    Bipolar AMIBipolar AMI

    0= no hay seal0= no hay seal

    1=nivel positivo o negativo alternante1=nivel positivo o negativo alternante

    PseudoternarioPseudoternario

    0=nivel positivo o negativo alternante0=nivel positivo o negativo alternante

    1=no hay seal1=no hay seal

  • 8/4/2019 tecnicas de codificacion(1)

    9/49

    ManchesterManchester

    0= transicin de alto a bajo en mitad del intervalo0= transicin de alto a bajo en mitad del intervalo

    1= transicin de bajo a alto en mitad del intervalo1= transicin de bajo a alto en mitad del intervalo

    Manchester diferencialManchester diferencial Siempre hay una transicin en mitad del intervaloSiempre hay una transicin en mitad del intervalo

    0=transicin al principio del intervalo0=transicin al principio del intervalo

    1=no hay transicin al principio del intervalo1=no hay transicin al principio del intervalo

  • 8/4/2019 tecnicas de codificacion(1)

    10/49

    B8ZSB8ZS Similar a bipolarSimilar a bipolar AMI excepto que cualquier cadena de cerosAMI excepto que cualquier cadena de ceros se reemplaza porse reemplaza por

    una cadena que tiene dos violaciones de cdigouna cadena que tiene dos violaciones de cdigo

    HDB3HDB3 Igual que bipolar AMI, excepto que cualquier cadena de cuatro ceros seIgual que bipolar AMI, excepto que cualquier cadena de cuatro ceros se

    reemplaza por una cadena que contiene una violacin de cdigo.reemplaza por una cadena que contiene una violacin de cdigo.

  • 8/4/2019 tecnicas de codificacion(1)

    11/49

    Encoding SchemesEncoding Schemes

  • 8/4/2019 tecnicas de codificacion(1)

    12/49

    Nonreturn to ZeroNonreturn to Zero--LevelLevel

    (NRZ(NRZ--L)L)

    two different voltages for 0 and 1 bitstwo different voltages for 0 and 1 bits

    voltage constant during bit intervalvoltage constant during bit interval

    no transition I.e. no return to zero voltageno transition I.e. no return to zero voltage

    such as absence of voltage for zero, constantsuch as absence of voltage for zero, constantpositive voltage for onepositive voltage for one

    more often, negative voltage for one valuemore often, negative voltage for one value

    and positive for the otherand positive for the other

  • 8/4/2019 tecnicas de codificacion(1)

    13/49

    Nonreturn to Zero InvertedNonreturn to Zero Inverted nonreturn to zero inverted on onesnonreturn to zero inverted on ones

    constant voltage pulse for duration of bitconstant voltage pulse for duration of bit data encoded as presence or absence of signaldata encoded as presence or absence of signal

    transition at beginning of bit timetransition at beginning of bit time

    transition (low to high or high to low) denotes binary 1transition (low to high or high to low) denotes binary 1 no transition denotes binary 0no transition denotes binary 0

    example of differential encoding since haveexample of differential encoding since have

    data represented by changes rather than levelsdata represented by changes rather than levels more reliable detection of transition rather than levelmore reliable detection of transition rather than level

    easy to lose sense of polarityeasy to lose sense of polarity

  • 8/4/2019 tecnicas de codificacion(1)

    14/49

    NRZ Pros & ConsNRZ Pros & Cons ProsPros

    easy to engineereasy to engineer

    make good use of bandwidthmake good use of bandwidth

    ConsCons dc componentdc component

    lack of synchronization capabilitylack of synchronization capability

    used for magnetic recordingused for magnetic recording

    not often used for signal transmissionnot often used for signal transmission

  • 8/4/2019 tecnicas de codificacion(1)

    15/49

    Multilevel BinaryMultilevel Binary

    BipolarBipolar--AMIAMIUse more than two levelsUse more than two levels

    BipolarBipolar--AMIAMI zero represented by no line signalzero represented by no line signal

    one represented by positive or negative pulseone represented by positive or negative pulse

    one pulses alternate in polarityone pulses alternate in polarity

    no loss of sync if a long string of onesno loss of sync if a long string of ones

    long runs of zeros still a problemlong runs of zeros still a problem no net dc componentno net dc component

    lower bandwidthlower bandwidth

    easy error detectioneasy error detection

  • 8/4/2019 tecnicas de codificacion(1)

    16/49

    Multilevel BinaryMultilevel Binary

    PseudoternaryPseudoternary one represented by absence of line signalone represented by absence of line signal

    zero represented by alternating positivezero represented by alternating positive

    and negativeand negative

    no advantage or disadvantage overno advantage or disadvantage overbipolarbipolar--AMIAMI

    each used in some applicationseach used in some applications

  • 8/4/2019 tecnicas de codificacion(1)

    17/49

    Multilevel Binary IssuesMultilevel Binary Issues synchronization with long runs of 0s or 1ssynchronization with long runs of 0s or 1s

    can insert additional bits, cf ISDNcan insert additional bits, cf ISDN

    scramble data (later)scramble data (later)

    not as efficient as NRZnot as efficient as NRZ

    each signal element only represents one biteach signal element only represents one bit

    receiver distinguishes between three levels: +A,receiver distinguishes between three levels: +A, --A, 0A, 0

    a 3 level system could represent loga 3 level system could represent log223 = 1.58 bits3 = 1.58 bits

    requires approx. 3dB more signal power for samerequires approx. 3dB more signal power for sameprobability of bit errorprobability of bit error

  • 8/4/2019 tecnicas de codificacion(1)

    18/49

    Manchester EncodingManchester Encoding has transition in middle of each bit periodhas transition in middle of each bit period

    transition serves as clock and datatransition serves as clock and data

    low to high represents onelow to high represents one high to low represents zerohigh to low represents zero

    used by IEEE 802.used by IEEE 802.

  • 8/4/2019 tecnicas de codificacion(1)

    19/49

    Differential ManchesterDifferential Manchester

    EncodingEncoding midbit transition is clocking onlymidbit transition is clocking only

    transition at start of bit period representing 0transition at start of bit period representing 0 no transition at start of bit period representing 1no transition at start of bit period representing 1

    this is a differential encoding schemethis is a differential encoding scheme

    used by IEEE 802.5used by IEEE 802.5

  • 8/4/2019 tecnicas de codificacion(1)

    20/49

    Biphase Pros and ConsBiphase Pros and Cons ConCon

    at least one transition per bit time and possibly twoat least one transition per bit time and possibly two maximum modulation rate is twice NRZmaximum modulation rate is twice NRZ

    requires more bandwidthrequires more bandwidth

    ProsPros synchronization on mid bit transition (self clocking)synchronization on mid bit transition (self clocking)

    has no dc componenthas no dc component

    has error detectionhas error detection

  • 8/4/2019 tecnicas de codificacion(1)

    21/49

    Modulation RateModulation Rate

  • 8/4/2019 tecnicas de codificacion(1)

    22/49

    ScramblingScrambling use scrambling to replace sequences that woulduse scrambling to replace sequences that would

    produce constant voltageproduce constant voltage

    these filling sequences mustthese filling sequences must

    produce enough transitions to syncproduce enough transitions to sync

    be recognized by receiver & replaced with originalbe recognized by receiver & replaced with original

    be same length as originalbe same length as original

    design goalsdesign goals

    have no dc componenthave no dc component have no long sequences of zero level line signalhave no long sequences of zero level line signal

    have no reduction in data ratehave no reduction in data rate

    give error detection capabilitygive error detection capability

  • 8/4/2019 tecnicas de codificacion(1)

    23/49

    B8ZS and HDB3B8ZS and HDB3

  • 8/4/2019 tecnicas de codificacion(1)

    24/49

    Digital Data, Analog SignalDigital Data, Analog Signalmain use is public telephone systemmain use is public telephone system

    has freq range of 300Hz to 3400Hzhas freq range of 300Hz to 3400Hz

    use modem (modulatoruse modem (modulator--demodulator)demodulator)

    encoding techniquesencoding techniques Amplitude shift keying (ASK)Amplitude shift keying (ASK)

    Frequency shift keying (FSK)Frequency shift keying (FSK)

    Phase shift keying (PK)Phase shift keying (PK)

  • 8/4/2019 tecnicas de codificacion(1)

    25/49

    Modulation TechniquesModulation Techniques

  • 8/4/2019 tecnicas de codificacion(1)

    26/49

    Amplitude Shift KeyingAmplitude Shift Keying encode 0/1 by different carrier amplitudesencode 0/1 by different carrier amplitudes

    usually have one amplitude zerousually have one amplitude zero

    susceptible to sudden gain changessusceptible to sudden gain changes

    inefficientinefficient

    used forused for up to 1200bps on voice grade linesup to 1200bps on voice grade lines

    very high speeds over optical fibervery high speeds over optical fiber

  • 8/4/2019 tecnicas de codificacion(1)

    27/49

    Binary Frequency ShiftBinary Frequency Shift

    KeyingKeying most common is binary FSK (BFSK)most common is binary FSK (BFSK)

    two binary values represented by two differenttwo binary values represented by two differentfrequencies (near carrier)frequencies (near carrier)

    less susceptible to error than ASKless susceptible to error than ASK

    used forused for up to 1200bps on voice grade linesup to 1200bps on voice grade lines

    high frequency radiohigh frequency radio

    even higher frequency on LANs using coeven higher frequency on LANs using co--axax

  • 8/4/2019 tecnicas de codificacion(1)

    28/49

    Multiple FSKMultiple FSK each signalling element represents moreeach signalling element represents more

    than one bitthan one bit

    more than two frequencies usedmore than two frequencies used

    more bandwidth efficientmore bandwidth efficientmore prone to errormore prone to error

  • 8/4/2019 tecnicas de codificacion(1)

    29/49

    Phase Shift KeyingPhase Shift Keying phase of carrier signal is shifted tophase of carrier signal is shifted to

    represent datarepresent data

    binary PSKbinary PSK

    two phases represent two binary digitstwo phases represent two binary digits

    differential PSKdifferential PSK phase shifted relative to previous transmissionphase shifted relative to previous transmission

    rather than some reference signalrather than some reference signal

  • 8/4/2019 tecnicas de codificacion(1)

    30/49

    Quadrature PSKQuadrature PSK get more efficient use if each signalget more efficient use if each signal

    element represents more than one bitelement represents more than one bit eg. shifts ofeg. shifts of /2 (90/2 (90oo))

    each element represents two bitseach element represents two bits

    split input data stream in two & modulate ontosplit input data stream in two & modulate ontocarrier & phase shifted carriercarrier & phase shifted carrier

    can use 8 phase angles & more than onecan use 8 phase angles & more than one

    amplitudeamplitude 9600bps modem uses 12 angles, four of9600bps modem uses 12 angles, four of

    which have two amplitudeswhich have two amplitudes

  • 8/4/2019 tecnicas de codificacion(1)

    31/49

    QPSK and OQPSKQPSK and OQPSK

    ModulatorsModulators

  • 8/4/2019 tecnicas de codificacion(1)

    32/49

    Performance of Digital toPerformance of Digital to

    Analog Modulation SchemesAnalog Modulation Schemes bandwidthbandwidth

    ASK/PSK bandwidth directly relates to bit rateASK/PSK bandwidth directly relates to bit rate

    multilevel PSK gives significant improvementsmultilevel PSK gives significant improvements

    in presence of noise:in presence of noise: bit error rate of PSK and QPSK are about 3dBbit error rate of PSK and QPSK are about 3dB

    superior to ASK and FSKsuperior to ASK and FSK

    for MFSK & MPSK have tradeoff betweenfor MFSK & MPSK have tradeoff betweenbandwidth efficiency and error performancebandwidth efficiency and error performance

  • 8/4/2019 tecnicas de codificacion(1)

    33/49

    Quadrature AmplitudeQuadrature Amplitude

    ModulationModulation QAM used on asymmetric digital subscriber lineQAM used on asymmetric digital subscriber line

    (ADSL) and some wireless(ADSL) and some wireless combination of ASK and PSKcombination of ASK and PSK

    logical extension of QPSKlogical extension of QPSK

    send two different signals simultaneously onsend two different signals simultaneously onsame carrier frequencysame carrier frequency use two copies of carrier, one shifted 90use two copies of carrier, one shifted 90

    each carrier is ASK modulatedeach carrier is ASK modulated two independent signals over same mediumtwo independent signals over same medium

    demodulate and combine for original binary outputdemodulate and combine for original binary output

  • 8/4/2019 tecnicas de codificacion(1)

    34/49

    QAM ModulatorQAM Modulator

  • 8/4/2019 tecnicas de codificacion(1)

    35/49

    QAM VariantsQAM Variants two level ASKtwo level ASK

    each of two streams in one of two stateseach of two streams in one of two states four state systemfour state system

    essentially QPSKessentially QPSK

    four level ASKfour level ASK combined stream in one of 16 statescombined stream in one of 16 states

    have 64 and 256 state systemshave 64 and 256 state systems improved data rate for given bandwidthimproved data rate for given bandwidth

    but increased potential error ratebut increased potential error rate

  • 8/4/2019 tecnicas de codificacion(1)

    36/49

    Analog Data, Digital SignalAnalog Data, Digital Signal digitization is conversion of analog datadigitization is conversion of analog data

    into digital data which can then:into digital data which can then: be transmitted using NRZbe transmitted using NRZ--LL

    be transmitted using code other than NRZbe transmitted using code other than NRZ--LL

    be converted to analog signalbe converted to analog signal

    analog to digital conversion done using aanalog to digital conversion done using a

    codeccodec pulse code modulationpulse code modulation

    delta modulationdelta modulation

  • 8/4/2019 tecnicas de codificacion(1)

    37/49

    Digitizing Analog DataDigitizing Analog Data

  • 8/4/2019 tecnicas de codificacion(1)

    38/49

    Pulse Code Modulation (PCM)Pulse Code Modulation (PCM) sampling theorem:sampling theorem:

    If a signal is sampled at regular intervals at aIf a signal is sampled at regular intervals at arate higher than twice the highest signalrate higher than twice the highest signalfrequency, the samples contain all informationfrequency, the samples contain all information

    in original signalin original signal eg. 4000Hz voice data, requires 8000 sampleeg. 4000Hz voice data, requires 8000 sample

    per secper sec

    strictly have analog samplesstrictly have analog samples Pulse Amplitude Modulation (PAM)Pulse Amplitude Modulation (PAM)

    so assign each a digital valueso assign each a digital value

  • 8/4/2019 tecnicas de codificacion(1)

    39/49

    PCM ExamplePCM Example

  • 8/4/2019 tecnicas de codificacion(1)

    40/49

    PCM Block DiagramPCM Block Diagram

  • 8/4/2019 tecnicas de codificacion(1)

    41/49

    NonNon--Linear CodingLinear Coding

  • 8/4/2019 tecnicas de codificacion(1)

    42/49

    CompandingCompanding

  • 8/4/2019 tecnicas de codificacion(1)

    43/49

    Delta ModulationDelta Modulation analog input is approximated by aanalog input is approximated by a

    staircase functionstaircase function can move up or down one level (can move up or down one level () at each) at each

    sample intervalsample interval

    has binary behaviorhas binary behavior

    since function only moves up or down at eachsince function only moves up or down at each

    sample intervalsample interval hence can encode each sample as single bithence can encode each sample as single bit

    1 for up or 0 for down1 for up or 0 for down

  • 8/4/2019 tecnicas de codificacion(1)

    44/49

    Delta Modulation ExampleDelta Modulation Example

  • 8/4/2019 tecnicas de codificacion(1)

    45/49

    Delta Modulation OperationDelta Modulation Operation

  • 8/4/2019 tecnicas de codificacion(1)

    46/49

    PCM verses Delta ModulationPCM verses Delta ModulationDM has simplicity compared to PCMDM has simplicity compared to PCM

    but has worse SNRbut has worse SNR issue of bandwidth usedissue of bandwidth used

    eg. for good voice reproduction with PCMeg. for good voice reproduction with PCM

    want 128 levels (7 bit) & voice bandwidth 4khzwant 128 levels (7 bit) & voice bandwidth 4khz need 8000 x 7 = 56kbpsneed 8000 x 7 = 56kbps

    data compression can improve on thisdata compression can improve on this

    still growing demand for digital signalsstill growing demand for digital signals use of repeaters, TDM, efficient switchinguse of repeaters, TDM, efficient switching

    PCM preferred to DM for analog signalsPCM preferred to DM for analog signals

  • 8/4/2019 tecnicas de codificacion(1)

    47/49

    Analog Data, Analog SignalsAnalog Data, Analog Signals modulate carrier frequency with analog datamodulate carrier frequency with analog data

    why modulate analog signals?why modulate analog signals? higher frequency can give more efficient transmissionhigher frequency can give more efficient transmission

    permits frequency division multiplexing (chapter 8)permits frequency division multiplexing (chapter 8)

    types of modulationtypes of modulation AmplitudeAmplitude

    FrequencyFrequency

    PhasePhase

  • 8/4/2019 tecnicas de codificacion(1)

    48/49

    AnalogAnalogModulationModulationTechniquesTechniques

    Amplitude ModulationAmplitude Modulation

    Frequency ModulationFrequency Modulation

    Phase ModulationPhase Modulation

  • 8/4/2019 tecnicas de codificacion(1)

    49/49

    SummarySummary looked at signal encoding techniqueslooked at signal encoding techniques

    digital data, digital signaldigital data, digital signal analog data, digital signalanalog data, digital signal

    digital data, analog signaldigital data, analog signal

    analog data, analog signalanalog data, analog signal