【正文】
PCM 碼 y = zeros( 8, 1)。 end end 12 第 4 章 系統(tǒng)仿真的結(jié)果及其分析 正弦信號(hào)的 仿真 及 結(jié)果分析 仿真 參數(shù)設(shè)置 1: 信號(hào)源 脈沖產(chǎn)生器 量化器 低通濾波器 幅值 頻率(rad/sec) 周期(s) 抽樣間隔(s) 相移量 (s) 增益 (Gain) 帶寬(rad/sec) 1 1*pi 2 1 2048 1*pi 信號(hào)圖 : 圖 7:抽樣過(guò)程圖 圖 8:輸出圖 13 參數(shù)設(shè)置 2: 信號(hào)源 脈沖產(chǎn)生器 量化器 低通濾波器 幅值 頻率(rad/sec) 周期(s) 抽樣間隔(s) 相移量 (s) 增益 (Gain) 帶寬(rad/sec) 1 1*pi 2 2048 1*pi 信號(hào)圖 : 圖 9:抽樣過(guò)程圖 圖 10:輸出圖 參數(shù)設(shè)置 3: 信號(hào)源 脈沖產(chǎn)生器 量化器 低通濾波器 幅值 頻率(rad/sec) 周期(s) 抽樣間隔(s) 相移量 (s) 增益 (Gain) 帶寬(rad/sec) 1 1*pi 2 2048 1*pi 14 信號(hào)圖 : 圖 11: 抽樣過(guò)程圖 圖 12:輸出圖 結(jié)果分析 根據(jù)圖 7 至圖 12 可知,抽樣頻率不得低于信號(hào)最高頻率的 2 倍, 即滿足 抽樣定理。 最后 ,向互聯(lián)網(wǎng)上的 各位 無(wú)私學(xué)者們提供 的各種 資料 ,給我的 論文增添了許多 色彩。 % beginValue = interval* 16 end % 確定所在段內(nèi)量化間隔號(hào) inParagraphIndex: inParagraphIndex = u(5)*8 + u(6)*4 + u(7)*2 + u(8)。 else interval = pow2(paragraphIndex – 2)。 第 一 部分 是輸出圖, 包含 原始信號(hào)、 濾波器輸出信號(hào) 。 下面表格是 A率 (其中 A=)與 13 折線法的比較: 表 1: A壓縮率 (A=)與 13折線法的比較 I 8 7 6 5 4 3 2 1 0 A率的 x值 0 1/128 1/ 1/ 1/ 1/ 1/ 1 13折線法的x = 1 2??? 0 1/128 1/64 1/32 1/16 1/8 1/4 1/2 1 由上表可知, 13 折線法與 A= 時(shí)的 A 率十分接近。為了將該模擬信號(hào)變?yōu)閿?shù)字信號(hào),需要通過(guò)一定的處理,使其在幅值上離散。 本設(shè)計(jì)中采用非均勻量化中的 A 率 13 折線法進(jìn)行量化。 在本設(shè)計(jì)中,采用 A 率 13 折線法對(duì)已抽樣在時(shí)間上離散的模擬信號(hào)進(jìn)行量化,然后使用自定義的編碼函數(shù)和譯碼函數(shù)對(duì)量化電平進(jìn)行編譯碼,后經(jīng)過(guò)濾波器得到還原的模擬信號(hào), 完成 語(yǔ)音信號(hào) PCM 編譯碼 系統(tǒng)。 關(guān)鍵詞 : MATLAB; A率 ; PCM;編譯碼 2 Abstract The main content of this design is implementation the PCM codec of speech signal based on MATLAB. The tool used in this design is MATLAB. MATLAB is a popular software for scientific puting. It is a great tool in Math and a powerful tool in signal processing. The signal in digital transmission systems are mostly coding by pulse code modulation (PCM) at this time. PCM is a way to convert the analog signal into digital signal by three steps: sampling, quantization, and coding. Firstly in this paper, it will introduce the MATLAB and Pulse Code Modulation. The principle of Sampling, Quantization, Coding, and Decoding will be shown. Then it will design the whole system. Finally, acplish the simulation of the system in MATLAB. And, quantify by A law of 13 lines method, coding and encoding by userdefined functions, recover the signal with filter. Key words: MATLAB。 編碼,就是把經(jīng)量化的量化電平通過(guò)一定的方法轉(zhuǎn)化為二進(jìn)制碼。 此過(guò)程 稱為量化。 編碼 (Coding) 經(jīng)過(guò)量化后 信號(hào)變成了離散的數(shù)字信號(hào), 接下 來(lái)就是對(duì)該信號(hào)進(jìn)行編碼。 第二 部分是抽樣過(guò)程圖,包含原始信號(hào)、 抽樣 信號(hào) , 及 抽樣圖。 beginValue = pow2(paragraphIndex +2)。 % 確定該量化電平值與所在段落起始值的差值 toBeginValue: toBeginValue = interval * inParagraphIndex。 由于 本人 學(xué)術(shù) 水平有限,所寫論文難免有不足之處,懇請(qǐng) 各位 老師和 同學(xué)批評(píng) 指正 ! 。 % 獲得歸一化電壓