Teaching basic measurement algorithms via Internet

Teaching basic measurement algorithms via Internet

Available online at www.sciencedirect.com Measurement 41 (2008) 130–134 www.elsevier.com/locate/measurement Teaching basic measurement algorithms vi...

1MB Sizes 1 Downloads 56 Views

Available online at www.sciencedirect.com

Measurement 41 (2008) 130–134 www.elsevier.com/locate/measurement

Teaching basic measurement algorithms via Internet J. Blaska, M. Sedlacek

*

Czech Technical University in Prague, Department of Measurement, Technicka 2, 16627 Prague 6, Czech Republic Received 2 January 2006; received in revised form 26 April 2006; accepted 21 June 2006 Available online 10 August 2006

Abstract Present-day measurement is oriented to processing digital signals, i.e., sequences of quantized samples of an originally analog signal. The sequences are processed by means of combinations of standard and special numerical algorithms. Knowledge and understanding of the basic signal processing algorithms is therefore a basic condition for the successful design of a complete algorithm for solving a specific measurement task. This paper presents a modern way of teaching basic signal processing algorithms frequently used in measurement, without requiring students to come to the computer laboratory. Students need only to have at their disposal a computer provided with a common web browser. The paper describes materials for teaching three basic DSP algorithms (DFT/FFT, digital filters, and correlation), but the described procedure can be used for teaching other digital processing algorithms as well. All what is necessary for using this type of teaching is MATLAB, the relevant toolboxes, and the new component of MATLAB, called MATLAB Web Server installed on one computer only (the server). Ó 2006 Elsevier Ltd. All rights reserved. Keywords: MATLAB; Internet; Distant teaching; Digital signal processing

1. Introduction Processing digital signals, i.e., sequences of quantized samples of an originally analog signal, is an important aspect of present-day measurement. The sequences are processed by means of combinations of various standard and special numerical algorithms. Knowledge and understanding of the basic signal processing algorithms is therefore a basic condition for the successful design of a complete algorithm for solving a specific measurement

*

Corresponding author. Tel.: +420 2 2435 2177. E-mail address: [email protected] (M. Sedlacek).

task. This paper presents a modern way of teaching some basic signal processing algorithms frequently used in measurement, without requiring students to come to the computer laboratory. The only channel they need is a computer connected to the Internet, i.e., provided with an ordinary web browser. The paper describes the materials for three selected algorithms (DFT/FFT, digital filters, and correlation filtration) that have already been developed and tested. The procedure and the software can be used for teaching other digital processing algorithms using the MATLAB environment (MATLAB and the relevant toolboxes). The MATLAB Web Server [1], a new component of MATLAB, must be installed for this procedure. One of

0263-2241/$ - see front matter Ó 2006 Elsevier Ltd. All rights reserved. doi:10.1016/j.measurement.2006.06.021

J. Blaska, M. Sedlacek / Measurement 41 (2008) 130–134

131

client’’ system) do not even need to have MATLAB installed on their computers. 2. MATLAB Web Server

Fig. 1. Use and configuration of the MATLAB Web Server.

the advantages of teaching algorithms using the procedure described here is the low cost. It is not necessary to keep upgrading the MATLAB software on all the computers used in the computer laboratory, as the students (‘‘clients’’ in the ‘‘server –

The MATLAB Web Server enables MATLAB applications that use the capabilities of the Internet (especially World Wide Web) to send data to MATLAB for computation and to display the results in the Web browser. In the simplest configuration, a Web browser runs on client workstations, while MATLAB, the MATLAB Web Server, and the Web server daemon run on a separate server. The MATLAB Web Server depends on TCP/IP networking for transmitting data between the client system and MATLAB. To submit input and to receive output from the MATLAB Web Server, a Web browser must be installed on the client computers. The current version of the MATLAB Web Server has been tested with Netscape Navigator and Microsoft Internet

Fig. 2. Screen of the WWW browser for demonstrating the FFT.

132

J. Blaska, M. Sedlacek / Measurement 41 (2008) 130–134

Explorer. It is necessary to install Web server software on the system where MATLAB is running. There are many suitable programs, for example the freely distributed Apache Web Server or Microsoft Personal Web Server. MATLAB Web Server applications are a combination of M-files (source files for MATLAB), Hypertext Markup Language (HTML) [2], and graphics. Fig. 1 shows the philosophy and configuration of the MATLAB Web Server. The application development process requires three simple steps. The first step is to create the HTML documents to collect the input data from the users (left side of the screen in Fig. 2). The next step is to create the HTML document for display output from MATLAB (right side of the screen in Fig. 2). The last step is to write a MATLAB M-file that receives data entered in the HTML input form, analyzes the data and generates any requested graphics. All communication between the user and MATLAB therefore proceeds only through the

WWW interface. The user need not even know that the output comes from MATLAB. The following sections describe three examples of some basic teaching items using the MATLAB Web Server. Figs. 2–4 show screens of the WWW browser on the client computer, and what the user sees. 3. The basic algorithms taught using the MATLAB Web Server Our system teaches three basic signal processing topics that are frequently applied in digital measurement, namely DFT/FFT, digital filters, and correlation. The section on DFT/FFT demonstrates leakage, introduces various windows, teaches methods for changing the frequency bin width, etc. The section on digital filters introduces FIR and IIR filters, investigates their frequency and impulse responses and shows how various signals mixed with noise can be filtered. In the correlation

Fig. 3. Screen of the WWW browser for demonstrating the design of a digital filter type FIR.

J. Blaska, M. Sedlacek / Measurement 41 (2008) 130–134

133

Fig. 4. Screen of the WWW browser for demonstrating correlation techniques.

section, both auto- and cross-correlation functions can be computed, displayed and used for requested tasks.

in the graphs. We have therefore provided a zoom, by means of which the user can choose a region of the graph for detailed inspection.

3.1. Demonstration of the discrete Fourier transform

3.2. Demonstration of digital filtering

Some characteristic features of the discrete Fourier transform, e.g., leakage in the DFT spectrum, can be studied. The user can choose one of the offered types of periodic signals, enter its parameters (signal frequency and amplitude), sampling frequency, the type of data window, and the DFT length of the left side part of the screen (Fig. 2). The signals pass on by means of the HTTP server and the MATLAB Web Server into MATLAB for calculation. MATLAB returns a signal waveform graph and signal spectrum, both displayed on the right-hand side of the window of the client WWW browser. Because all graphs are returned as JPEG figures, it is impossible to check appropriate details

The next task concerns the design of digital filters, both the FIR- and IIR type filters. The user sets the parameters of the signal to be filtered, as frequency, amplitude, DC offset, sampling rate and type of additive noise. As parameters of the filter, we can set the type of filter (lowpass, highpass, bandpass or bandstop), the cut-off frequencies and the order of the filter (Fig. 3). We can choose the type of window with an FIR type digital filter and choose the analog model with IIR type filters. MATLAB generates the required signals and computes the coefficients of the desired filter. The outputs are graphs of the input waveform, the filtered signal and the frequency response of the designed filter.

134

J. Blaska, M. Sedlacek / Measurement 41 (2008) 130–134

3.3. Demonstration of correlation Correlation algorithms are demonstrated in this task. The user can again choose signal characteristics such as frequency, amplitude, phase, type of additive noise and value of the sampling rate. He then selects the time length of the measurement (number of samples of the generated signals). It is also possible to select the type of correlation function (autocorrelation of the first or of the second signal, or cross-correlation of the two signals). The results are waveform graphs of particular signals and the selected correlation graph (Fig. 4). The auto-correlation function of a noisy signal is used for finding signal-to-noise ratio. 4. Conclusion To create a MATLAB Web Server application it is necessary to have elementary knowledge of HTML and of programming in MATLAB. Creating or modifying applications is therefore not too time-consuming, but the results are very useful. Our system is currently being used in classwork in Czech and English versions. It has the following advantages: availability by means of the Internet and a WWW browser, simple control from the WWW browser environment, high-speed response

of MATLAB, and, last but not least, no investment in hardware is needed. Our web server can be found on http://merux.feld.cvut.cz. Preliminary information about this www application in teaching was presented at the ICPR-16 conference (16th International Conference on Production Research which took place in Prague in August 2001 [3]). Acknowledgments The research of M. Sedlacek was supported by the research program MSM6840770015 ‘‘Research of Methods and Systems for Measurement of Physical Quantities and Measured Data Processing’’ of the CTU in Prague sponsored by the Ministry of Education, Youth and Sports of the Czech Republic. References [1] The MathWorks, Inc.: Matlab Web Server – Users Guide, 1999. [2] . Introduction to HTML. [3] J. Blasˇka, M. Sedla´cˇek, Interactive learning of signal processing using Internet. ICPR-16 Summaries, parts 3 + 4, Czech Association of Scientific and Technical Societies, Prague, Czech Republic, 2001, ISBN 80-02-01438-3, pp. 89.