正在加载图片...
models using"drag-and-drop"operations. Simulations of the block diagrams can be used to test a number of what-if"questions. Special purpose block libraries are available for DSP algorithm development, and include a DSP Blockset, a Fixed-Point Blockset, and a Nonlinear Control Design Blockset In order to bridge the gap between interactive prototyping and embedded systems, MATLAB has developed a compiler to generate optimized C code from MATLAB code. Automatic C code generation eliminates manual coding and algorithm recoding, thus providing a hierarchical framework for designing, simulating, and pro totyping DSP solutions. 21.2 Example 1: Signal analys One of the most common DSP applications is the analysis of signals that have been collected from experiments or from a physical environment. These signals are typically stored in data files, and often need preprocessing steps applied to them before we are able to extract the desired information Preprocessing can include removing means or linear trends, filtering noise, removing anomalies, and interpolating for missing data. Once the data ly to analyze, we are usually interested in statistical information(mean, median, variance, autocorrelation, etc. )along with an estimate of the distribution of the values(uniform, Gaussian, etc. ) The frequency content of a signal is also important to determine; if the signal is non-stationary, the frequency content needs to be determined using short time windows. To illustrate the use of MATLAB in computing some of the steps mentioned above, we use a speech signal collected at 8 kHz. After loading the signal from a data file, we will remove any linear trend that might have been introduced in the collection process(this also removes any constant term). Figure 21.1 contains a plot of the signal which clearly shows the time-varying nature of the signal. Figure 21.2 contains a histogram of the distribution of the values, showing that the values are closer to a Laplacian or Gamma distribution than to a uniform or Gaussian distribution Figure 21.3 contains a spectogram which displays the frequency content of he signal computed using short overlapping time windows. The MATLAB code that generated these plots is shown in Fig. 21.4. This code illustrates some of the important characteristics of high-level computational tools. The fundamental data structure is a matrix, and all operations and functions are designed to work with matrices Hence, loops are rarely necessary, and thus the code is generally much shorter, more readable, and more self- documenting. Speech Signal FIGURE 211 Distribution of Speech Values 010.15 FIGURE 21.2 c 2000 by CRC Press LLC© 2000 by CRC Press LLC models using “drag-and-drop” operations. Simulations of the block diagrams can be used to test a number of “what-if” questions. Special purpose block libraries are available for DSP algorithm development, and include a DSP Blockset, a Fixed-Point Blockset, and a Nonlinear Control Design Blockset. In order to bridge the gap between interactive prototyping and embedded systems, MATLAB has developed a compiler to generate optimized C code from MATLAB code. Automatic C code generation eliminates manual coding and algorithm recoding, thus providing a hierarchical framework for designing, simulating, and pro￾totyping DSP solutions. 21.2 Example 1: Signal Analysis One of the most common DSP applications is the analysis of signals that have been collected from experiments or from a physical environment. These signals are typically stored in data files, and often need preprocessing steps applied to them before we are able to extract the desired information. Preprocessing can include removing means or linear trends, filtering noise, removing anomalies, and interpolating for missing data. Once the data is ready to analyze, we are usually interested in statistical information (mean, median, variance, autocorrelation, etc.) along with an estimate of the distribution of the values (uniform, Gaussian, etc.). The frequency content of a signal is also important to determine; if the signal is non-stationary, the frequency content needs to be determined using short time windows. To illustrate the use of MATLAB in computing some of the steps mentioned above, we use a speech signal collected at 8 kHz. After loading the signal from a data file, we will remove any linear trend that might have been introduced in the collection process (this also removes any constant term). Figure 21.1 contains a plot of the signal which clearly shows the time-varying nature of the signal. Figure 21.2 contains a histogram of the distribution of the values, showing that the values are closer to a Laplacian or Gamma distribution than to a uniform or Gaussian distribution. Figure 21.3 contains a spectogram which displays the frequency content of the signal computed using short overlapping time windows. The MATLAB code that generated these plots is shown in Fig. 21.4. This code illustrates some of the important characteristics of high-level computational tools. The fundamental data structure is a matrix, and all operations and functions are designed to work with matrices. Hence, loops are rarely necessary, and thus the code is generally much shorter, more readable, and more self￾documenting. FIGURE 21.1 FIGURE 21.2
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有