A WEB BASED TRAINING MODULE FOR TEACHING DIGITAL COMMUNICATIONS Ali Kara 1, Cihangir Erdem 1, Mehmet Efe Ozbek 1, Nergiz Cagiltay 2, Elif Aydin 1 (1) Department of Electrical and Electronics Engineering, Ankara, Turkey (2) Department of Software Engineering, Ankara, Turkey {akara@atilim.edu.tr,cerdem @atilim.edu.tr,meozbek @atilim.edu.tr, nergiz@atilim.edu.tr, eaydin@atilim.edu.tr} ABSTRACT An interactive module which simulates a digital transmission link from one end to the other has been designed. Using the module, a user may enter a short audio/message signal using microphone of a PC, and then follows processes on the signal at each stage of the digital transmission link. The user can also analyze the signal at every stage of the link, and compare the performance of various modulation schemes used in the link, and finally may see how the audio signal is corrupted by noise in the transmission link. In this way, from source point to destination point of the signal, the user may study various stages such as analog to digital conversion, analysis of effects of Gaussian noise on the message signal. KEYWORDS Virtual Laboratory, Electrical Engineering Education. 1. INTRODUCTION In engineering education, it is very critical to combine theoretical courses with practices/laboratory works. Ideally, laboratory activities should be repeated as many times as the learners wish. However, face-toface laboratory training have many limitations both at teacher and learner sides. Namely, it requires many teachers and supporting personnel, and it is expensive due to high establishment and maintenance costs of laboratory equipment. Especially, laboratories such as the ones covering radio frequency and microwave techniques, which are well-known in Electrical and Electronics Engineering domain, may need substantial investment. In the conventional laboratory practice students are restricted to a time schedule and location In this regard, virtual and remote laboratory applications seem to be an alternative approach to laboratory experience that learners should have acquired in their education. A Remote laboratory is different from a virtual laboratory in the sense that it provides real time access to lab equipment. In a virtual laboratory, the learner actually runs some computer algorithms on either the client or the server computer without accessing any real equipment. There are plenty of virtual tools for teaching various subjects in a variety of engineering disciplines. However, remote laboratories designed for teaching electromagnetics, radio frequency (RF) systems, communication systems and microwaves are not available in any electrical, electronics, and computer engineering curricula. These subjects may form the backbone of techniques used in industries such as telecommunications, security systems and defense systems. ERRL system is a remote and virtual laboratory platform located at Atılım University (Kara et al., 2007,2008,2009,2010). It has been designed and developed to provide training to students and engineers in the areas of electromagnetics, radio frequency(rf) systems, communication systems and microwaves. The development stage of the system has been supported by European Commission, and the system has been operational for the last two years. The ERRL system has been continuously improved and extended to cover a wide range of subjects in Electrical and Electronics Engineering. In this regard, there are on-going efforts to add virtual tools, and new modules to the platform. In this paper, the progress that have been made toward designing a virtual module to be used in teaching digital communication systems is reported. The structure of the paper is as follows: Section 2 presents fundamentals of digital communication that constitute the subject of the virtual module developed in this study. Section 3 discusses the design of the virtual module, and presents the outcomes.
2. DIGITAL COMMUNICATION SYSTEMS Digital communication systems are widely used in transmission of speech, video and data for telemetry and other purposes. A course on basics of digital transmission systems is usually offered at senior undergraduate or graduate levels. The ERRL system mainly provides materials and remote experiments on some digital signal analysis and modulation schemes. The module presented in this work aims to complement those remote experiments, and is based on the materials in the ERRL system. A simplified block diagram of a digital communication system is shown in Figure 1. At the transmitter block, the input signal or message signal is, first, converted to a digital bit stream using Analog to Digital Converter (ADC), and then modulates a pulse waveform resulting a baseband modulated signal, usually a rectangular pulse sequence. Pulse waveform then modulates a high frequency carrier signal which makes a bandpass modulated signal. A typical channel model in digital communication systems is the AWGN channel which is Gaussian Channel where Additive White Gaussian Noise (AWGN) is assumed to be superimposed on the transmitted signal. In practice, AWGN channel may model a free space propagation channel such as a satellite transmission link. At the receiver block, noisy signal is first, detected and demodulated. Then, detected signal is converted to the original analog signal via a Digital to Analog Converter (DAC). Usually, there is a down converter at the receiver side. 2.1 Analog to Digital Conversion (ADC) There are three stages in a typical ADC. The first one is the sampling process. The analog message signal should be sampled at Nyquist rate, which is twice the maximum frequency of the message signal. As a result of sampling process, continuous time audio signal is converted to a discrete time signal which may have infinite number of distinct values. A typical audio signal may have frequency components up to 20-25 khz. Therefore, the minimum sampling frequency at the ADC should be 40 khz in order to sample those high frequency components adequately. A high quality digital audio signal, such as the one in music CDs, is obtained by sampling at 44.1 khz. The virtual tool developed in this study samples the audio signal at 44.1 khz and then saves it in.wav format for further processing in the next stages. The second stage in ADC is quantization. Quantization is a process performed on discrete-time sampled signal values. Its output generates a finite set of discrete signal values. In this sense, quantization is simply a mapping process of an infinite number of signal values to a finite one. For this purpose, first the discrete time signal values are limited between a maximum and minimum values. Then, number of signal levels, so-called number of quantization levels is determined. Usually, this number is chosen as a power of 2 so that it can be compatible with a binary encoding to be performed after the quantization process. As a process, each resultant sample of sampling process is rounded to the nearest quantization level value. Of course, there is always an error in quantization process because of the fact that an infinite number of distinct samples is mapped to finite one. By increasing the number quantization levels, in other words, by decreasing the step size between quantization levels, the error can be reduced. It is also possible to use non-uniformly spaced quantization levels. Such a quantizer is called non-uniform quantizer. Quantization error is usually called quantization noise, A metric to describe the rate of this error is called signal to quantization noise power ratio, and can be defined as (Sklar,2001) 3 (1) where 2 is the number of quantization levels, and is the number of bits per quantized sample. Here, is determined in the last stage of ADC, namely the encoding process, as discussed in the following. The final stage at ADC is encoding. Usually, binary encoding is used in a typical digital communication system. In binary encoding, each quantized sample is assigned a binary symbol of bits. The codes can be generated traditionally by all variations of binary digits. Consider, for example, a particular signal, with a maximum frequency is 20kHz, and assume that 256 is taken. Then the sampling frequency can be chosen as f 220 khz 40 khz and. 8 bits/sample The binary code set, in this case, can be 00000000, 0000001,... 11111111. From there, the bit rate of the system is then 320 kbits/s. The signal to quantization noise power ratio can be calculated as 3L 52dB. As can be seen from the previous calculations, the error made at ADC is dependent on the sampling frequency and the number of quantization levels. Error can be reduced by increasing the number of quantization levels and the sampling frequency. However, increasing the number of quantization levels
increases the bit rate of the system, i.e. more bits to be transmitted per unit time is generated which requires a high-bit-rate channel, or more spacing in storage device for data recording systems. It follows that, a tradeoff between the quantization noise (level) and bit rate is necessary for any digital processing system. 2.2 Baseband Modulation At the output of the ADC, a bit sequence representing the message signal is generated. The number of bits per unit time determines how much speed is required in the channel. In order to transmit the bit sequence, it is necessary to convert each bit into a waveform, i.e., an electrical signal, that is suitable for the transmission channel. In wireline transmission, a rectangular pulse is usually used to represent a bit since it is the most appropriate. In this way, a bit sequence can be converted to a pulse sequence. The shape of the rectangular pulse can be determined according to certain criteria such as bandwidth, noise robustness, synchronization etc. There are various pulse waveforms, known as line codes, in digital communication systems. The simplest one among these is non-return to zero unipolar pulse waveform which is illustrated in Figure 2. The duration of pulse is proportional to the inverse of the bit rate of the system, that is, the higher the bit rate the lower the pulse duration is. Amplitude of pulses can be determined according to the digital technology to be used in the system, for example, 15V for CMOS or 5V for TTL or even 3.3V for some low power applications. Figure 1: Simplified Block diagram of a Digital Communication System Figure 2: Illustration of unipolar pulse waveform and bandpass modulated signals (ASK,FSK and PSK) 2.3 Bandpass modulation Bandpass modulation is required when the pulse waveform is not compatible with the channel. For example, a low frequency pulse waveform cannot be transmitted through the air. Then, in this stage, the pulse waveform is modulated by a high frequency sin type carrier. A sinusoidal signal can be written as
ct At sin 2 f tt (2) where three parameters are present: amplitude, frequency and phase. There are basically three bandpass modulation schemes, namely amplitude shift keying (ASK), frequency shift keying (FSK) and phase shift keying (PSK), each corresponding to one of these three parameters. In each of the modulation schemes, one of these parameters is varied in accordance with the input pulse waveform which represents the message signal. There may be hybrids of these schemes such as amplitude-phase keying (APK). In this study, only basic bandpass modulation schemes (ASK, FSK, PSK) are considered. Figure 2 illustrates the baseband waveform for a particular bit sequence and the bandpass waveforms corresponding to ASK, FSK, and PSK modulations. 2.4. Channel Transmission medium is called channel in digital communication systems. Then, various channel options are available. The main problem with the channel is that it may corrupt the signal while it is travelling through it. The amount of corruption may depend both on the channel response and the transmitted signal. In an introductory digital communication systems course for undergraduates, Gaussian channel is frequently used in the analyses. In practice, Gaussian channel may represent a clear line of sight (LOS) transmission link such as satellite communications. The only distorting effect in this channel is the noise generated by the radio receiver itself. Statistical character of this noise follows Gaussian probability density function (pdf) given by (3) The noise is additive because it is superimposed on the signal, and it is white because it is present over all frequencies ranging from dc to hundreds of gigahertz. Hence, it is called Additive, White, Gaussian Noise (AWGN) channel. In most of the fundamental textbooks performance of modulation schemes is analyzed under AWGN channel. Similarly the use of AWGN channel for simulations has been preferred in this study. filter and sampler b) detection consisting of decision making step. If the carrier frequency is too high for direct processing, there may be a downconverter, and additionally there may be an equalizing filter if there is a multipath channel. In the tool developed in this study, the two-step receiving structure is used. The received signal is first sampled and filtered, then is detected at the decision making stage. The critical process in this receiving structure is the filtering process. The optimum receiving filter for recovering the message signal with maximum signal to noise ratio is a matched filter. A filter matched to a signal waveform s(t) with a duration of T has the following impulse response (Sklar, 2001) ht c st t (4) where c is a normalization constant. A matched filter is a correlator which performs two successive operations: a) multiplication of the received signal samples with possible signal samples b) integration of these products. Mathematically, for any received signal of r(t), the matched filter output is (5) If there are two signal classes, like in binary transmission, then there should be two matched filters, one for each class. The receiver simply correlates each signal class with the received signal, and then provides an output which will be used at the decision making process at the detector. In the decision making stage, the class which the received signal belongs is determined by comparing the outputs of the filters. The result of the decision block is either binary 1 or binary 0. A typical demodulation and detection block is shown in Figure 3. 2.6 Digital to Analog Conversion (DAC) DAC actually, the reverse of the ADC at the input stage. First the bit stream is split up to bits blocks. Each block represents one of the quantized samples of L. Quantized samples are then converted to the message signal. In the transmission system, the signals need to be synchronized. 2.5. Detection and Demodulation At the receiver, there are several processes dependent on the application and the receiver structure used. In typical binary transmission system, there may be two steps a) demodulation consisting of a receiving
Figure 3: Typical demodulation and detection block for binary receiving system 3. DESIGN OF WEB-BASED MODULE 3.1 Software Structure In virtual laboratory system requiring the users to install software is not desirable since installation may need administrator rights In ERRL system software structure is designed such that only the Flash player is necessary which is already installed on most the PCs. Figure 4: Software structure and flow diagram of web-based virtual module Also users should easily manipulate the plots and outputs of the tool. Finally, as a multi-user environment, the user should get quick response to its request, and the system should be available whenever it is requested. Therefore, a mixture of tools were used as shown in Fig.3. All processes in the blocks of Fig.1 were developed in matlab environment, and using a commercial tool, all matlab codes were converted to stand-alone libraries. Graphical user interface (GUI) for presenting of outputs were developed in Flash Builder (Flex 4). The main characteristic of Web Services is the interoperability with different software platforms. Web Services can be developed easily on diverse Server platforms and client interfaces can be realized in different software environments. (Ozbek at.al. 2010,) Thus, advantages of various level of tools, such as advanced GUI tools (Flex), web service tools (.NET) and computational tools (matlab) were combined in this virtual module. The virtual module may serve simultaneously to multiple users, and the load may be shared by multiple servers if necessary. The Virtual module is base on a client-server architecture. Complex computations are performed at the server side, and results are presented at the client PC, by using download and upload handlers developed. The virtual module allows the teacher evaluate the student by providing logs and files, stored by User ID (UID) in the server, as shown in Fig. 4. 3.2 Integration of the module to the ERRL system The virtual tool is being integrated into the ERRL system. In the ERRL system, a Learning Management Systems (LMS) has already been operational. Service is provided through the LMS system to the users with classical registration process. The theoretical materials in digital communication systems can also be used by the student before using the web module. The web module is an extension to remote communication experiments of the ERRL. Users may access the tool, after registration process of the ERRL system, and run a flash applet at the client side. On the flash applet, the user may initiate the digital communication link after uploading a message/input signal (for example, an audio signal in.wav or.mp3 format). A user ID is assigned to the user automatically by the server, and all files and information about the user is stored in a folder at the server side for further evaluating of the student performance by the teacher. Uploaded message signal follows all stages of digital communication link in Fig. 1, namely, quantization, pulse modulation, bandpass, modulation, channel/noise addition, demodulation and filtering, and finally recovering of the message signal at the output. The user may download the output signal, the received signal, corrupted by AWGN presented in previous section. In Fig.5, a sample signal in time and frequency domain, its ASK and FSK modulated version with and without Gaussian noise are presented. It should be noted that sampling frequency used in the simulations is very important in illustration of the results. For example, the sampling rate in ASK waveforms is 10 samples/bit while it is 50 samples/bit in FSK waveforms. Moreover, the power of the noise can be controlled by the user, and its
effects can be seen in ASK (SNR=15dB) and FSK (SNR=10dB) waveforms. 4. CONCLUSIONS A web-based module has been designed to use in teaching digital communication systems at undergraduate or graduate level. The web module uses advantages of commercial tools, and provides an interaction to the learner. d) PSK signal (SNR=10 db) Figure 5: Virtual tool outputs at various stages of the link REFERENCES a) Audio signal sample in time domain b) Audio signal sample in frequency domain (FFT) Aydın, C.C., G. Turkmen, E. Ozyurt, E.U. Aydin, N.E. Cagiltay, M.E. Ozbek, N.C. Alparslan, A. Kara, 2008, Distance laboratory applications ERRL: A study on radio communication in electronic field, 11th International Conf. on Optimization of Electrical and Electronic Equipment, Brasov, Romania, pp.157-162. Cagiltay, N.E., E.U. Aydın, R. Oktem, A. Kara, M. Alexandru, B. Reiner, 2009, Requirements on Remote RF Laboratory Applications: An Educators Perspective, IEEE Trans. on Education, vol. 52, pp.75-81. Kara, A., Aydin, E., Ozbek. M.E., and Cagiltay, N., 2010, Design and Development of a Remote and Virtual Environment for Experimental Training in Electrical and Electronics Engineering, IEEE 9th Int. Conf. On Information Technology Based Higher Education and Training (ITHET 2010), pp. 194-200, Cappadocia. Ozbek. M.E., Atas, M., and Kara, A., 2010, Software Technologies, Architectures and Interoperability in Remote Laboratories, IEEE 9th Int. Conf. On Information Technology Based Higher Education and Training (ITHET 2010), 402-406, Cappadocia Kara, A., E.U. Aydin, R. Oktem, N. Cagiltay, 2007, A Remote Laboratory for Training in Radio Communications: ERRL, IEEE 18th International Symposium on Personal, Indoor and Mobile Radio Communications(PIMRC), Athens, pp.1-4. Sklar, B., Digital Communications, 2 nd ed., Prentice Hall, 2001. c) ASK signal (SNR=15 db)