610 likes | 731 Views
Dr. Dóra Maros Institute of Telecommunication Óbuda University Telecommunications Techniques II. Source Coding ( speech ) Error detection and Error correction. Transmission from source to destination. Source ( analog ). Destination ( analog / digital ). Source coding. Source
E N D
Dr. Dóra Maros Institute of Telecommunication Óbuda University TelecommunicationsTechniques II. SourceCoding (speech) Errordetection and Errorcorrection
Transmissionfromsourcetodestination Source (analog) Destination (analog/digital) Source coding Source decoding -Microphone -Camera -Pressure, temperatureetcsensors -Speaker (ears) -Displays (eyes) -Alarms (see and hear!) Channelcoding Channeldecoding Channel (digital)
Bandwidthallocation Filter A/D Compression Channelcoding Modulation Channel Source information Filter Channel coding Sourceinformation A/D Compression
Howwe „generate” voice? Glottis Vocalcords Vocaltract (resonator filter system) Excitation
Characterization of Human Speech • Frequency: 300-3400 Hz • The charcaterization of a 20 msdurationsampledoesnotchange (excitation, filter system) • Wecanfindsomecorrelationsbetweentwoconsecutive 20 mssamples • Using a longtimeanalysiswecanpredictthenextpattern (differencialcoding, eg. DPCM) • Ourbraincancorrect a lot of „errors”!
Classification of SpeechEncoders Waveformencoder: describestheanalogsignalsinthetime and frequencydomain Vocoders: describestherules of phonation (howwegeneratethevoice) Hybridencoders: combinesgoodproperties of twocoders (lowrate, goodquality)
Subjective MOS MOS: MeanOpinionScore
Theory of WaveformEncoders Sampling (samplingfrequency) Quantization (number of levels) Coding (length of codeword) Benefits: goodvoicequality Disadvantage: bigrate (PCM: 64 kbit/s)
Theory of Vocoders A, E, O, I etc. vowels Excitation B, F, P, M etc. consonants Benefit: lowrate (pár kb/s) Disadvantage: badquality
Voiced - Vowels Typicalamplitude/timesignal Typical PowerSpectrumDensity/ Frequencysignal Pitchfrequency: 50-500 Hz
Voiceless - Consonants Typical PowerSpectrumDensity/ Frequencysignal Typicalamplitude/timesignal (whitenoise)
Sub-bandCoding • Baseband is dividedintosub-bandsregarding PSD • Eachsub-bandsareencodedseparately • Benefits: lownoisesensitivity (differentsamplingfrequencies and codewordlengthareused) • Bitrate: 16-32 kbit/s • Receiver: sub-bandsaresuperimposed (added)
SpeechCodecs MOS AMR: AdaptiveMultirateCodec (3G és 4G mobile) G723: VoIP (mobile) G728: LD-CELP, Low-Delay code excited linear prediction G729: CS-ACELP, Coding of Speech,Adaptive Code ExcitedLinearPrediction (VoIP) GSM FR and EFR: Fullrate, EnhancedFullRate Internet LowBitrateCodec (iLBC)
Theory of HybridEncoder/Decoder AnalysisbySynthesis (AbS)
Excitation: MPE and RPE MPE: MultiplePulseExcitation RPE: RegularPulseExcitation, GSM-13kbit/s RPE MPE MPE: aplitudes and phasesareencoded RPE: onlyamplitudes is encoded
Excitation: CELP (CodeExcitedLinearPrediction) Excitation Table Index Excitation Table • Codetable: 1024 excitationsamples • Onlythe index of table is sent! • Bitrate: 4,8-16 kbit/s
CodecRate tin Encoder Codecrate: tin-tout Typical: 50-100 ms Fast: G728 CELP (Do-CELP) codec, 2-5 ms tout Decoder
GSM SpeechCodec Voiceactivitydetector Waveformencoder Bitrate: 260 bit/20ms, 13kbit/s
DiscontinousTransmission (DTX) and SID Frame SID: SilenceIndicator
Fletcher-MunsonCurves (sensitivity of ears) Equal-loudness contours for the human ear Phon: Unit of relativeloudness level for pure tones Frequency
ColorSensitivity of Eyes Luminositysensitivity is 3 x more fasterthencolorsensitivity
Compression of SourceInformation Losslesscompression: small part of information is lost Lossycompression:huge part of information is lost CompressionRate: originalinformation/compressedinformation image: lossless : .raw lossy: .jpeg (eg. 25/1)
ErrorCorrection (general) Noisychannel Demodulator Received bit sequence (BER) Errordetectionprocedures Errordetection AutomaticRepeatRequest (ARQ) Errorcorrection ForwardErrorCoding (FEC)
ErrorDetection I. (repetition) • Weusesmallblocks • Eachblock is sentrepeatedly • Efficient, whenwehaveonlyone bit error Sender Receiver 1011 1011 1011 1010 1011 1011 1011 1011 1011 1010 1011 1010
ErrorDetection II. (parity) • Evenoroddparity • Even: we add „1” parityifthenumber of „1”s is odd, otherwiseparityis „0”. • Odd: we add „1” parity, ifthenumber of „1”s is even • Applications: mikrocontollers, databus, datastorage Sender Receiver Evenparity 10110010 10110110 Oddparity 00110010 00110110
ErrorDetection III. (polaritychange) • Wesendtheoriginal and negated bit sequency • Ifthe bit polarity is thesameatthereceiver-error • Disadvantege: bigredundancy • Application: multicarriersystems Sender Receiver Receiver 10110010 10110010 10100010 01001101 01011101 01011101
ErrorDetection IV. (CyclicRedundancyCheck -CRC) • A polimon is generatedfrom bit sequence (data) • Generator polinom is thesame (known) atsender and receiver • CRC= data polinom/generatorpolinom • Application: mobile, RFID, Bluetooth, Ethetnet..etc Sender Receiver MSB LSB 10110010101001 CRC 10100010101001 CRC polinom polinom ? CRC division division generator polinom generator polinom
ErrorDetection V. (CheckSum) • The message is segmentedintoparts • Webinary add theparts (CS) • The message and CS aresent • Webinary add theparts again atreceiverside • IftwoCSsarenotequal-error
ErrorDetection VI. (Hamming coding) Sender Receiver Hamming distance calculator Code i Code i The Hamming distance of thecodewords is greaterorequal d+1 Eg: 4/7 Hamming code …….4 databits – 3 paritybits d=2 errorcan be detected, butonlyone is corrected Number of paritybits = largestexponent (23)
Hamming coding (evenparity) p1: (3,5,7) – 20=1 P2: (3,6,7) – 21=2 P3: (5,6,7) – 22=4 DATA PARITY 7653 p1p2p3 0001 11 0 0010 10 1 0011 011 0100 011 HD:4 7 6 5 4 3 21 HD:3 HD:3
ErrorCorrection (ARQ:AutomaticRepeatRequest) • Fourtypes: • Stop and Wait • Go-Back-N • Selective • Hybrid
Stop and Wait ARQ t1 Data block Sender Receiver t1 Data block Sender Receiver Data block t2 Aftertime out thesenderrepeatsthetransmission Problem: receiverdoesnotknowwhetheritreceivedtherepeatedornextdatablock Solution: 0 and 1 flagbitsinconsecutivedatablocks
Go-Back-N ARQ 1. Wedefine a slidingtimewindow 2. The packetsaresentonebyone (withoutACKs) inthiswindow 3. Ifthefirst ACK is detectedwindowslides. 4. Ifnot, allpacketsaresent again
Selective ARQ Message Long message – one ACK Advantage: if no errors – fasttransmission Disadvantage: Iferrors – themessage is sent again – slowtransmission Smallblock – more ACKs Advantage: werepeateonlythoseblockswhereerrorsaredetected Disadvantage: slow ( ACK)
Hibrid ARQ (Chasecombining) NACK is sent back, receiverdoesnotdropfaultypackets Using an errorscorrectionprocedurewecanrepairthedatafromfaultypackets
Hibrid ARQ (Incrementalredundancy) A FEC (ForwardErrorCoding) is usedatsenderside The redundancybitsaresentafter NACK
ForwardErrorCoding: FEC • Two main types: • Convolutionalcoding • Blockcoding • We add redundancybitswhichhelpcorrectdataatthereceiver
ConvolutionalCoding (theoryexample) • (n,k,m) coder • D laches and modulo2 adders • n: number of outputs • k: number of inputs • m: number of D laches • number of input state : (m-1)2 (3,1,3) coder Generatorpolinoms G1(1,1,1) G2 (0,1,1) G3(1,0,1)
Types of ConvolutionalCoders (Mothercoder and „punctured” coder) Mothercoder:1/n „Punctured” coder: k/n eg: 2/3 coder
Systematiccoder • Wesendoriginaldata (V3,V2,V1 and redundancy (v4)
Non systematiccoder • Wedonotsendoriginaldata • Wesendonlyconvolutionalcodedinfo
Wecode „1” (findtheerror!) Output: 11111011
Butweuseconvolution! Input bitsRespones (codeddata) 1 11111 0 1 1 0 00000000 (twobits shift) 1 11111 0 1 1 1 11111 0 1 1 ----------------------------------------------------------------------------- Kódolt info 1 111 0 1 11 0 1 0 1 11 Weuse modulo2 adderforoutputs! Shift: L-1 (L: number of inner D laches)
Stategraph Info: 1011 Codedinfo: 1 111 0 1 11 0 1 0 1 11
Treestructure Info: 1011 Codedinfo: 1 111 0 1 11 0 1 0 1 11
CodingwithTrellisGraph Info: 1011 Codedinfo: 1 111 0 1 11 0 1 0 1 11