AUDIO CODER USING PERCEPTUAL LINEAR PREDICTIVE CODING Pratik R. Bhatt B.E., C.U. Shah College of Engineering and Technology
Total Page:16
File Type:pdf, Size:1020Kb
AUDIO CODER USING PERCEPTUAL LINEAR PREDICTIVE CODING Pratik R. Bhatt B.E., C.U. Shah College of Engineering and Technology, India, 2006 PROJECT Submitted in partial satisfaction of the requirements for the degree of MASTER OF SCIENCE in ELECTRICAL AND ELECTRONIC ENGINEERING at CALIFORNIA STATE UNIVERSITY, SACRAMENTO FALL 2010 AUDIO CODER USING PERCEPTUAL LINEAR PREDICTIVE CODING A Project by Pratik R. Bhatt Approved by: __________________________________, Committee Chair Jing Pang, Ph.D. __________________________________, Second Reader Preetham Kumar, Ph.D. ____________________________ Date ii Student: Pratik R. Bhatt I certify that this student has met the requirements for format contained in the University format manual, and that this project is suitable for shelving in the Library and credit is to be awarded for the project. , Graduate Coordinator Preetham Kumar, Ph.D. Date Department of Electrical and Electronic Engineering iii Abstract of AUDIO CODER USING PERCEPTUAL LINEAR PREDICTIVE CODING by Pratik R. Bhatt Audio coder using perceptual linear predictive coding is a new technique for compressing and decompressing audio signal. This technique codes only the information of an audio signal, which is audible to the human ear, all other information is discarded during coding. Audio signal is given to a psychoacoustic model to generate information to control the linear prediction filter. At the encoder side, a signal is passed through a prediction filter, and then the filtered signal contains less information as it is coded according to perceptual criteria. At the decoder side, an encoded signal is decoded using a linear prediction filter, which is the inverse of the filter used at the encoder side. The decoded signal is similar to the original signal. Since information from the audio signal relative to the human hear is coded so the signal contains less data and has a high signal to noise ratio. iv This project is about designing and implementing the MATLAB code for an audio coder using perceptual linear predictive coding. The following tasks were performed in this project. (i) Process the audio signal according to a perceptual model. (ii) Encode and decode the signal using the linear predictor. (iii) Check simulation results for the original audio signal as well as the retrieved audio signal after signal processing. (iv) Listen to the wave file of the original as well as the reconstructed signal. , Committee Chair Jing Pang, Ph.D. ____________________________ Date v ACKNOWLEDGMENTS I would like to thank my project adviser, Dr. Jing Pang, for giving me an opportunity to implement the Audio coder based on perceptual linear predictive coding. I have learned many concepts of signal processing during the implementation of this project. Dr. Pang provided great support and guidance throughout the development of this project. She has been a great listener and problem solver throughout the implementation. Her valuable research experience has helped me to develop fundamental research skills. I would also like to thank Dr. Preetham Kumar for his valuable guidance and support in writing this project report. In addition, I would like to thank Dr. Suresh Vadhva, Chair of the Electrical and Electronic Engineering Department, for his support in completing the requirements for a Master’s degree at California State University, Sacramento. vi TABLE OF CONTENTS Page Acknowledgments ....................................................................................................................... vi List of Tables ............................................................................................................................... ix List of Figures ............................................................................................................................... x Chapter 1. INTRODUCTION .......................................................................................................... 1 1.1 Background ....................................................................................................... 1 1.2 Types of Audio Coding .................................................................................... 1 1.3 Concept ............................................................................................................. 3 1.4 Overview of Design .......................................................................................... 4 2. PSYCHOACOUSTIC MODEL .................................................................................... 6 2.1 Threshold of Hearing ........................................................................................ 6 2.2 Critical Bands.................................................................................................... 8 2.3 Simultaneous Masking .................................................................................... 11 2.3.1 Noise Masking Tone .............................................................................. 12 2.3.2 Tone Masking Noise .............................................................................. 13 2.4 Non-simultaneous Masking ............................................................................ 14 2.5 Calculate Overall Masking Threshold ............................................................ 15 3. LINEAR PREDICTIVE CODING .............................................................................. 18 3.1 Linear Prediction ............................................................................................. 18 vii 3.2 Linear FIR Predictor as Pre-filter ................................................................... 19 3.3 Linear IIR Predictor as Post-filter ................................................................... 21 3.4 Calculation of LPC Filter Coefficients ........................................................... 22 4. MATLAB IMPLEMENTATION ................................................................................ 27 5. SIMULATION RESULTS ........................................................................................... 31 6. CONCLUSION ............................................................................................................ 37 6.1 Future Improvements ...................................................................................... 37 Appendix ........................................................................................................................... 39 References ......................................................................................................................... 49 viii LIST OF TABLES Page 1. Table 1 List of critical bands ................................................................................... 11 ix LIST OF FIGURES Page 1. Figure 1 Audio coder using perceptual linear predictive coding ............................... 4 2. Figure 2 Threshold of hearing for average human ..................................................... 7 3. Figure 3 Frequency to place transformation along the basilar membrane ................. 8 4. Figure 4 Narrow band noise sources masked by two tones ....................................... 9 5. Figure 5 Decrease in threshold after critical bandwidth ............................................ 9 6. Figure 6 Noise masking tone ................................................................................... 12 7. Figure 7 Tone masking noise ................................................................................... 13 8. Figure 8 Non-simultaneous masking properties of human ear ................................ 14 9. Figure 9 Steps to calculate masking threshold of signal .......................................... 16 10. Figure 10 FIR linear predictor structure .................................................................. 19 11. Figure 11 IIR linear predictor structure ................................................................... 21 12. Figure 12 Determination of linear predictor coefficients ........................................ 23 13. Figure 13 Input signal .............................................................................................. 31 14. Figure 14 Pre-filtered signal .................................................................................... 32 15. Figure 15 Reconstructed signal from post-filter ...................................................... 33 16. Figure 16 Spectrogram for masking threshold of input signal ................................ 34 17. Figure 17 Spectrogram for estimated masking threshold ........................................ 35 18. Figure 18 Masking threshold and LPC response for frame of signal ...................... 36 x 1 Chapter 1 INTRODUCTION 1.1 Background In our day-to-day lives, we use various kinds of audio equipment, such as Cell phones, music players and wireless radio receivers. These devices process audio signals in different ways. The basic form of audio signals is analog. It is easier to process a digital signal form rather than an analog signal form. The process of converting an analog signal into a digital representation is described as audio coding. Moreover, audio processing has become significantly highly digitized in recent years. The general procedure of audio processing is as follows. An analog signal is sampled at regular intervals and sampled data is encoded with a coding scheme. At the decoder side, data is converted back to the original form. Therefore, as we increase the sampling rate of the audio signal, the bandwidth required by that