ELEC3104: Digital Signal Processing Session 1, 2013

Similar documents
Lab 0: Introduction to TIMS AND MATLAB

MODELLING AN EQUATION

MODELLING EQUATIONS. modules. preparation. an equation to model. basic: ADDER, AUDIO OSCILLATOR, PHASE SHIFTER optional basic: MULTIPLIER 1/10

EE 210: CIRCUITS AND DEVICES

Experiment Five: The Noisy Channel Model

The Sampling Theorem:

Fourier Signal Analysis

Advanced Lab LAB 6: Signal Acquisition & Spectrum Analysis Using VirtualBench DSA Equipment: Objectives:

Electrical & Computer Engineering Technology

Laboratory Experiment #1 Introduction to Spectral Analysis

EE-4022 Experiment 3 Frequency Modulation (FM)

CME 312-Lab Communication Systems Laboratory

ECE 4670 Spring 2014 Lab 1 Linear System Characteristics

EE 422G - Signals and Systems Laboratory

DSBSC GENERATION. PREPARATION definition of a DSBSC viewing envelopes multi-tone message... 37

Sampling and Reconstruction

Department of Electronic Engineering NED University of Engineering & Technology. LABORATORY WORKBOOK For the Course SIGNALS & SYSTEMS (TC-202)

LABORATORY - FREQUENCY ANALYSIS OF DISCRETE-TIME SIGNALS

CME312- LAB Manual DSB-SC Modulation and Demodulation Experiment 6. Experiment 6. Experiment. DSB-SC Modulation and Demodulation

ENGR 210 Lab 12: Sampling and Aliasing

TIMS-301 USER MANUAL. Telecommunications Instructional Modelling System

PRODUCT DEMODULATION - SYNCHRONOUS & ASYNCHRONOUS

Linear Time-Invariant Systems

ELEC3104: Digital Signal Processing Session 1, 2013

ESE 150 Lab 04: The Discrete Fourier Transform (DFT)

ESE 150 Lab 04: The Discrete Fourier Transform (DFT)

UNIVERSITY OF NORTH CAROLINA AT CHARLOTTE Department of Electrical and Computer Engineering

Experiment One: Generating Frequency Modulation (FM) Using Voltage Controlled Oscillator (VCO)

Signal Processing. Introduction

ENG 100 Lab #2 Passive First-Order Filter Circuits

SIGNALS AND SYSTEMS LABORATORY 13: Digital Communication

Discrete Fourier Transform (DFT)

Exercise 1: AC Waveform Generator Familiarization

Reference Sources. Prelab. Proakis chapter 7.4.1, equations to as attached

Lab Assignment 1 Spectrum Analyzers

Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Spring Semester, Introduction to EECS 2

EE370 Communications Engineering

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

ELEC3104: Digital Signal Processing Session 1, 2013 LABORATORY 3: IMPULSE RESPONSE, FREQUENCY RESPONSE AND POLES/ZEROS OF SYSTEMS

On-Line Students Analog Discovery 2: Arbitrary Waveform Generator (AWG). Two channel oscilloscope

Laboratory Assignment 4. Fourier Sound Synthesis

DELTA MODULATION. PREPARATION principle of operation slope overload and granularity...124

ECEGR Lab #8: Introduction to Simulink

Lab Assignment 1 Spectrum Analyzers

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering. EIE2106 Signal and System Analysis Lab 2 Fourier series

EE-4022 Experiment 2 Amplitude Modulation (AM)

The Signals and Systems Toolbox: Comparing Theory, Simulation and Implementation using MATLAB and Programmable Instruments

EE 400L Communications. Laboratory Exercise #7 Digital Modulation

INTRODUCTION TO COMMUNICATION SYSTEMS LABORATORY IV. Binary Pulse Amplitude Modulation and Pulse Code Modulation

SGN Bachelor s Laboratory Course in Signal Processing Audio frequency band division filter ( ) Name: Student number:

The University of Queensland School of Information Technology and Electrical Engineering. ELEC3004/7312: Signals, Systems and Controls

LLS - Introduction to Equipment

3.2 Measuring Frequency Response Of Low-Pass Filter :

EE 460L University of Nevada, Las Vegas ECE Department

Laboratory Assignment 5 Amplitude Modulation

EXPERIMENT 4 INTRODUCTION TO AMPLITUDE MODULATION SUBMITTED BY

LAB #7: Digital Signal Processing

Laboratory Experience #5: Digital Spectrum Analyzer Basic use

Lab 4 An FPGA Based Digital System Design ReadMeFirst

Laboratory Assignment 1 Sampling Phenomena

German Jordanian University Department of Communication Engineering Digital Communication Systems Lab. CME 313-Lab

Lab 4 Digital Scope and Spectrum Analyzer

Pulse-Width Modulation (PWM)

ELG3175 INTRODUCTION TO COMMUNICATION SYSTEMS

EECS 452 Midterm Exam Winter 2012

EEL 4350 Principles of Communication Project 2 Due Tuesday, February 10 at the Beginning of Class

ME 365 EXPERIMENT 8 FREQUENCY ANALYSIS

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

Sept 13 Pre-lab due Sept 12; Lab memo due Sept 19 at the START of lab time, 1:10pm

CARRIER ACQUISITION AND THE PLL

Additive Synthesis OBJECTIVES BACKGROUND

Sampling and Quantization

Laboratory Exercise 6 THE OSCILLOSCOPE

Discrete-Time Signal Processing (DTSP) v14

George Mason University Signals and Systems I Spring 2016

Department of Communication Engineering Digital Communication Systems Lab CME 313-Lab

ECE 2111 Signals and Systems Spring 2012, UMD Experiment 9: Sampling

1. In the command window, type "help conv" and press [enter]. Read the information displayed.

Notes on Experiment #1

EC310 Security Exercise 20

EE 462G Laboratory #1 Measuring Capacitance

Memorial University of Newfoundland Faculty of Engineering and Applied Science. Lab Manual

L A B 3 : G E N E R A T I N G S I N U S O I D S

AMPLITUDE MODULATION

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2015 Lecture #5

Experiment # 4. Frequency Modulation

Fourier Series and Gibbs Phenomenon

EECS 216 Winter 2008 Lab 2: FM Detector Part II: In-Lab & Post-Lab Assignment

Electrical and Telecommunication Engineering Technology NEW YORK CITY COLLEGE OF TECHNOLOGY THE CITY UNIVERSITY OF NEW YORK

Lab Report #10 Alex Styborski, Daniel Telesman, and Josh Kauffman Group 12 Abstract

DSP First Lab 03: AM and FM Sinusoidal Signals. We have spent a lot of time learning about the properties of sinusoidal waveforms of the form: k=1

Costas Loop. Modules: Sequence Generator, Digital Utilities, VCO, Quadrature Utilities (2), Phase Shifter, Tuneable LPF (2), Multiplier

Journal of Asian Scientific Research SIGNALS SPECTRAL ANALYSIS AND DISTORTION MEASUREMENTS USING AN OSCILLOSCOPE, A CAMERA AND A PC. A. A.

ECE 3155 Experiment I AC Circuits and Bode Plots Rev. lpt jan 2013

Lab 3 FFT based Spectrum Analyzer

Experiments #6. Convolution and Linear Time Invariant Systems

Here are some of Matlab s complex number operators: conj Complex conjugate abs Magnitude. Angle (or phase) in radians

YEDITEPE UNIVERSITY ENGINEERING FACULTY COMMUNICATION SYSTEMS LABORATORY EE 354 COMMUNICATION SYSTEMS

Knowledge Integration Module 2 Fall 2016

EE 438 Final Exam Spring 2000

Transcription:

ELEC3104: Digital Signal Processing Session 1, 2013 The University of New South Wales School of Electrical Engineering and Telecommunications LABORATORY 1: INTRODUCTION TO TIMS AND MATLAB INTRODUCTION The TIMS (Telecommunication Instructional Modelling System) system was first developed by Tim Hooper, then a senior lecturer at The University of New South Wales in early 1970s. It is now a very advanced system for telecommunications training (http://www.tims.com.au). TIMS is a rack and module system, in which each module performs a basic communication or signal processing function, eg: oscillator, multiplier, filter, etc. Modules can be plugged into each of the twelve slots in the rack and then connected with other modules to create a variety of systems. Several permanent modules are located in the lower part of the rack. It provides for students an easy way of modelling communication and signal processing systems in the laboratory. In addition to the TIMS system, each experimental bay contains a personal computer (PC) and oscilloscope. The oscilloscope is connected to the TIMS system Scope Selector module, a permanent module, by BNC terminated cables. The Scope Selector module enables any two from four inputs to be viewed simultaneously on the oscilloscope. The PC provides measurement and signal processing functions. The Analog to Digital converter interface between the PC and TIMS is a SoundBlaster ASP16 system. The SoundBlaster and TIMS are connected by the stereo audio cable terminated with RCA plugs. For stereo recording the RCA plugs should be connected to the sockets at the X and Y inputs of the oscilloscope, but for mono recording only the red RCA plug should be connected. Only mono recording is required for this laboratory. Data acquisition and processing software is provided by MATLAB. MATLAB is a useful software package designed for scientific and technical computation. It is a convenient numeric computation and visualization tool that may be used for a wide range of applications in engineering and science. MATLAB may also provide several tool boxes (additional software packages) specially developed for telecommunication, signal processing, control, applied mathematics, image processing etc. You may easily extend and customize the capabilities of MATLAB by writing your own functions and procedures. This laboratory is intended to familiarize you with MATLAB and TIMS, but the experiments also illustrate some signal processing concepts and methods. Both facilities will be new to most of you, but before you graduate you can expect to use them for several core and elective subjects in the signal processing, control and communication area. The laboratory introduces some basic TIMS building blocks: adder, multiplier, filter etc, and connects up a few simple systems. Note that, you may also want to try the evaluated version of TutorTIMS which can be downloaded at http://www.tims.com.au/html/tutortims.html. The TutorTIMS-Freeware, a feature-limited version of TutorTIMS can be downloaded at the same URL. By using the above software, students can do pre-lab preparation on the TutorTIMS Simulator by creating their own experiments. ELEC 3104 Session 1, 2013 Page 1 of 6

TIMS Experimental System Plug-in Module Fixed Module Master Signals Frequency Counter Trunk Panel Oscilloscope Coax cable Computer Sound card Matlab Audio cable Some Rules for Connecting TIMS Modules For all the modules used in the TIMS system the following rules apply: Left hand socket Input Right hand socket Output Red socket Digital or TTL level (0 and 5 volts). Yellow socket Analog level (nominally 4 volts peak to peak, maybe larger) Green socket Common, ground or earth level DO NOT CONNECT YELLOW OUTPUTS TO RED INPUTS! EXPERIMENTS 1. Sinusoidal Signals and Frequency Measurement Refer to the TIMS Laboratory Manual for details about the Audio Oscillator, Frequency Counter and Scope Selector modules. Connect the Audio Oscillator to the oscilloscope via the Scope Selector and use the Frequency Counter to set the signal frequency to ELEC 3104 Session 1, 2013 Page 2 of 6

about 3 khz. Observe the waveform on the oscilloscope and also note the effect of the Gate Time of the Frequency Counter measurement. Use only one channel of oscilloscope for the audio cable, either channel 1 or channel 2. a) Note the Frequency Counter reading. b) Estimate the signal frequency from the oscilloscope. How well does this measurement agree with that in Part a)? c) Use the PC with the following MATLAB commands to record and display 400 samples of the signal sampled at 44,100 Hz (and quantized at 16 bits per sample), x = getrec1(400, 44100, 16); t = (0:399)/44.1; plot (t, x), grid % acquire the data % set the time scale % plot with grid Note: On line information is available for MATLAB functions; simply type help function_name, for example help getrec1. Furthermore, simply type doc function_name if you need more information, i.e. example codes, etc. Also see Matlab Exercises of this Laboratory experiment. The amplitude (or magnitude) of the frequency spectrum of the signal record x is computed and displayed using the MATLAB command, ampspec(x, 44100); Sketch this amplitude spectrum and compare it with the theoretical frequency spectrum of a sinusoidal signal (of infinite duration). 2. A Simple System: Signal Cancellation or Nulling Connect up the TIMS modules for the system shown below. (Refer to the TIMS Manual for module details). Audio Oscillator cos(wt) Phase Shifter Adder Oscilloscope sin(wt) Set the Audio Oscillator frequency to about 2 khz and 1. Observe the inputs of the Adder on the oscilloscope. 2. Show that the phase of the upper signal ( cos wt ) and the amplitude of the lower signal can be adjusted so that the output from the Adder can be reduced (almost) to zero, ie nulled. 3. Observe, record and think a) Are the amplitude and phase adjustments in Part 2 independent of each other? b) What minimum voltage level at the Adder output can you achieve? c) Is the null adjustment no longer achieved if the frequency of the Audio Oscillator is changed? ELEC 3104 Session 1, 2013 Page 3 of 6

3. Multiplier Connected as a Squarer Connect up the Audio Oscillator and Multiplier modules as shown below. Audio Oscillator cos(wt) x(t) z(t) Output y(t) Set the Audio Oscillator frequency to about 2 khz and a) Observe and sketch the Multiplier input and output signals on the oscilloscope which should be DC coupled. b) Write down an algebraic expression for the multiplier output. Is the observed output 2 1 consistent with this? Hint: cos 1 2 2 cos 2 c) The TIMS Manual indicates that for input signals x(t) and y(t), the Multiplier output signal is z t k xt yt where k is the multiplier scaling parameter or factor. Determine the value of k including its units. d) Use the PC with the following MATLAB commands to obtain a sample of the multiplier output signal and display its amplitude spectrum. x = getrec1(400, 44100, 16); ampspec (x, 44100); e) Sketch the amplitude spectrum signal. Is it consistent with the results from Part a)? 4. Tuneable Lowpass Filter Read the TIMS Manual entry for the Tunable Lowpass Filter (TLF) and then connect up the modules shown in the block diagram below. Audio Oscillator TTL Signal Adder (0 5V) (2Vpp) Tuneable Lowpass Filter Filter Output Choose the Audio Oscillator TTL (red) output and set the frequency to obtain a square wave signal with a fundamental frequency of approximately 1 khz. Use the Adder module to reduce the square wave amplitude to about 2 volts peak peak. Set the Tuneable Lowpass Filter cutoff frequency to 1.5 khz (use the Frequency Counter to set the LPF clock frequency). Hint: Read the TIMS Manual entry for the TLF. a) Observe the filter input and output signals on the oscilloscope and sketch their waveforms. ELEC 3104 Session 1, 2013 Page 4 of 6

b) Use the PC with the following MATLAB commands to obtain samples of the filter input and output signals (separately) and display their amplitude spectra. x = getrec1(400, 44100, 16); ampspec(x, 44100); c) Sketch the amplitude spectra of the square wave and the filtered signal. How do they compare with (theoretically) expected results? d) Repeat the getrec1 and ampspec commands with 2048 points or samples. Does the frequency spectrum look different at all? MATLAB EXERCISES Signal acquisition and spectrum analysis will be carried out digitally by means of an analog to digital converter and a personal computer (PC) with the MATLAB software package. Analog to-digital conversion is provided by a SoundBlaster 16 ASP card in the PC. The discrete Fourier transform (DFT) of the sampled signal is computed by means of a MATLAB Fast Fourier Transform (FFT) algorithm. The sampled signal and the amplitude spectrum can be processed and displayed using the appropriate MATLAB commands. 1. Signal Acquisition Use the MATLAB function getrec1 to obtain a sampled record of a signal. eg: The following MATLAB statement will cause the SoundBlaster to acquire 1024 samples of a signal at a sampling rate of 44100 samples per second with 16 bits per sample, x = getrec1(1024, 44100, 16); The result is stored in the vector x. To display the sampled signal x versus a time scale t in milliseconds use the following MATLAB commands (Note that the number of points plotted can be varied and is 100 in the present case). t = ( 0:length(x) 1 )/44.1; plot( t(1:100), x(1:100) ), grid 2. Magnitude Spectrum The MATLAB function ampspec computes the amplitude spectrum of the signal x and displays the result, eg: Xamp = ampspec (x, 44100); where the vector Xamp contains the amplitude spectrum values. The function ampspec uses a fast Fourier transform algorithm, the MATLAB function fft, to compute the discrete Fourier transform (DFT) of the data vector x. The computation is faster if the length of x is a power of 2; alternatively the data can be padded with zeros to make the length a power of two. For example: if N = length (x) = 1000, we might write fft(x, NFFT) where NFFT=1204 instead of fft(x). The difference in computation time is significant for longer vectors eg: N = 10 4 or greater. The following figure illustrates the relationship between number of FFT points (NFFT), normalized frequency ( rad/sample) and sampling frequency (Hz). ELEC 3104 Session 1, 2013 Page 5 of 6

NFFT, i.e. 1024 0 512 1024 (rad/sample) Hz, if we know Fs 0 0 Fs/2 Suppose that we have a sinusoid signal of 1 khz sampled at 8 khz with duration of 1024 samples. Plot the magnitude spectrum of the signal in rad/sample, and in Hz. Fs = 8000; n = 0:1023; x = sin(2*pi*1000/fs*n); NFFT = 1024; % set sampling frequency to 8000 Hz % create a time index for 1024 samples 2 Fs % create a sinusoid signal with frequency of 1 khz % set number of FFT is 1024 samples Y = abs(fft(x, NFFT)); % get an absolute magnitude of the FFT % create a frequency axis for plotting, note that for a real signal, we only need to plot half of the spectrum, because the other half is only the mirror image of the first one. figure(1) faxis1 = (0:511)/512; % NFFT/2 = 512 plot(faxis1, Y(1:512)); % plotting only half of the spectrum xlabel('normalized Frequency (\times\pi rad/sample)'); ylabel('magnitude'); % Plot the spectrum with x axis in Hz and y axis in db figure(2) faxis2 = (0:511)/512*(Fs/2); plot(faxis2, 20*log10(Y(1:512))); % db = 20*log10( ) xlabel('frequency (Hz)'); ylabel('magnitude (db)'); % multiply by Fs/2 to get x axis in Hz Note that, to clear all the variables and close all the graphs, type the following commands: clear all; close all; References: Etter, D.M., Introduction to MATLAB 6, Pearson Education 2003. (P620.00151/70) Joe King, MATLAB 6 for engineers: hands on tutorial, R.T. Edwards 2001. (P620.00151/67) D.C. Hanselman & B.C. Littlefield, Mastering MATLAB 6: A Comprehensive Tutorial and Reference, Prentice Hall 2001. (P519.4028553/9) ELEC 3104 Session 1, 2013 Page 6 of 6