【正文】
0101102103104105050100150200250300350400450500c a p a c i t y v s . b a n d w i d t h i n a n A W G N c h a n n e lB a n d w i d t h ( H z )capacity (bits/second) 信源編 /譯碼 ? 標量量化 ? 預(yù)測量化 標量量化 0 1 2 3 4 5 6 7 81 0 . 8 0 . 6 0 . 4 0 . 200 . 20 . 40 . 60 . 81標量量化信號波形 標量量化 ?????????????xNp a rt i t i o nNip a rt i t i o nxip a rt i t i o nip a rt i t i o nxxi n d x)1(1)1()()1(0)( 標量量化 indx quantiz 0 1 2 N1 0a1a2a1?Na碼本(編碼手冊)- code 標量量化 ? 信源編碼計算過程 序號 + 失真 … 支路 ( 1 ) 支路 ( 2 ) 支路 (N 1) 碼本 ( . )2 存儲 /M 信號 值 ????Miiqu anis igMdi s t or t ion12))()((1 標量量化 2 通信工具箱提供的有關(guān)函數(shù) ◆ quantiz 功能:產(chǎn)生一個量化序號和輸出量化值 。 Examples ? [index,quants] = quantiz([3 34 84 40 23],10:10:90,10:10:100) ? index = ? 0 3 8 3 2 ? quants = ? 10 40 90 40 30 標量量化 ? 3分界點矢量與編碼手冊的參數(shù)訓(xùn)練設(shè)置 ? 量化的關(guān)鍵在于 分界點矢量 和 編碼手冊 的參數(shù)設(shè)置 ? 利用函數(shù) lloyds訓(xùn)練 (training)的方法來獲得這兩個參數(shù)。 預(yù)測量化 (predictive quantization) 1 預(yù)測量化簡介 使用過去的數(shù)據(jù)集和一個預(yù)測器 , 需要預(yù)測的值可以表示為 k表示計算的階數(shù) 。 2 通信工具箱的有關(guān)函數(shù) ? dpcmopt ? 功能:通過訓(xùn)練數(shù)據(jù)優(yōu)化差分脈碼調(diào)制參數(shù) ? 語法: predictor= dpcmopt(training_set, ord); ? [predictor , codebook , partition] =dpcmopt(training_set, ord, ini_codebook); ? 按給定的傳遞函數(shù)階數(shù) ord和訓(xùn)練數(shù)據(jù)來估計預(yù)測傳遞函數(shù)系數(shù) , 還可以優(yōu)化預(yù)測誤差的量化碼本和量化閾值 。y..39。 ? 作業(yè) 1:請編寫程序 , 計算 DPCM的量化誤差 , 并且與上次標量量化的誤差比較 。k39。 ? 語法 :indx= dpcmenco(sig, codebook, partition,predictor) ? [indx , quant] = dpcmenco(sig , codebook ,partition, predictor) ? sig是輸入信號; predictor是預(yù)測器的預(yù)測傳遞函數(shù)系數(shù); codebook是碼本; partition是量化閾值 。 ? 在實際應(yīng)用中 , 通信工程師們通常會知道一些關(guān)于發(fā)送信號的先驗信息 。 在 MATLAB中沒有量化譯碼方面的函數(shù) , 只是簡單地用量化器輸出的索引值構(gòu)造量化后的信號 。ylabel(39。 ? pn0_db=25。 ? title(39。 for i=1:n h(i)=p(i)*log(p(i))/log(2)(1p(i))*log(1p(i))/log(2)。) ?figure(2) %信道容量和每比特信噪比間的關(guān)系曲線 ?semilogx(gamma,capacity); xlabel(39。 ?p_error=q(sqrt(2.*gamma))。 其中 , E為每個 BPSK信號的能量 , 為噪聲功率譜密度 。其中的一些變化本質(zhì)上是必然的,如衰減、線性和非線性失真;還有一些變化是隨機的,如加性噪聲、多徑衰落。) ? 得到結(jié)果 ? p = ? w = 2 示例及 MATLAB實現(xiàn) ? 例如,求一個正態(tài)分布的信源平均信息量 syms x u o %用來定義符號變量和表達式 u=3。 2 示例及 MATLAB實現(xiàn) ? 仿真分析 ? P在 01范圍內(nèi)變化時, H( P) ? P=0, P=1。 %定義數(shù)據(jù)點 y=(x.*log(x)/log(2)+(1x).*log(1x)/log(2))。 ? r=0。 消息是以具體信號的形式表現(xiàn)出來 , 攜帶有抽象的信息 , 為了衡量通信系統(tǒng) , 應(yīng)當(dāng)對被傳輸?shù)南⑦M行定量的測量 。2 3 5] ? y=[1 23 2。b.39。r+39。 ? % Modulate using square QAM. ? msg_a = qammod(msg_d,M)。s group delay, measured in input samples. The actual group delay in the filter design is delay/Fd seconds. r is the rolloff factor for the filter, a real number in the range [0, 1]. The input tol is the tolerance in the IIR filter design. FIR filter design does not use tol. ? 1 眼圖 0 . 5 0 0 . 5420246T i m eAmplitudeE y e D i a g r a m f o r I n P h a s e S i g n a l 0 . 5 0 0 . 5420246T i m eAmplitudeE y e D i a g r a m f o r Q u a d r a t u r e S i g n a l 信號觀測設(shè)備 ? 2散列圖 (scatterplot) ? 散列圖同眼圖有密切的關(guān)系 。filter_type/Fs39。一般要求 Fs> Fd,且 Fs/Fd為一正整數(shù)。 %定義計算的點數(shù) ? msg_d=randint(Pd,1,M)。 ? 通信工具箱對生成這些觀測設(shè)備的 SIMULINK模塊和 MATLAB函數(shù)均提供支持 。第三章 信源、信道容量和信源編碼 信源、信宿和誤差分析 ? 信號產(chǎn)生設(shè)備 ? 通信工具箱的仿真模塊庫包含高斯 、 瑞利 、 泊松和均勻分布的噪聲發(fā)生器 。 信號觀測設(shè)備 ? 觀測設(shè)備包括示眼圖 、 散列圖 (scatter plot)和錯誤率計算 (errorrate putation)設(shè)備 。 ? Fd=1。Fd是信號觀察窗口時間的倒數(shù)。,r,delay,tol) The sample frequency for the digital input signal x is Fd, and the sample frequency for the output signal y is Fs. y = rcosflt(x,Fd,Fs,39。,num,den...) [y,t] = rcosflt(...) delay is the filter39。 % Number of points in the calculation ? % Random integers in the range [0,M1] ? msg_d = randint(Pd,1,M)。 ? scatterplot(rcv_a,N,N+1,39。s ? scatterplot(rcv_a,N,0,39。 3 誤差分析 ? x=[1 1 2。 接收延時 變量名 誤碼儀模塊及對話框 指定輸出數(shù)據(jù)的去向:workspace和 port 3 誤差分析 ? 誤碼儀使用舉例 貝努利分布 高斯信道 誤碼儀 display 信息論基礎(chǔ) ? 通信系統(tǒng)傳遞的是消息 , 如何度量消息中的信息是一個值得研究的問題 。n=2。