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

Similar documents
Introduction to Simulink Assignment Companion Document

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

Experiment 1 Introduction to MATLAB and Simulink

ECEGR Lab #8: Introduction to Simulink

ES442 Final Project AM & FM De/Modulation Using SIMULINK

Experiment 1 Introduction to Simulink

ENSC327 Communication Systems Fall 2011 Assignment #1 Due Wednesday, Sept. 28, 4:00 pm

EXPERIMENT 4 INTRODUCTION TO AMPLITUDE MODULATION SUBMITTED BY

Problems from the 3 rd edition

Experiment # 4. Frequency Modulation

ECE411 - Laboratory Exercise #1

ELT COMMUNICATION THEORY

Introduction to Simulink

Electrical & Computer Engineering Technology

Signals and Systems Lecture 9 Communication Systems Frequency-Division Multiplexing and Frequency Modulation (FM)

Lab 1: Simulating Control Systems with Simulink and MATLAB

Experiment 6: Multirate Signal Processing

Lecture 6. Angle Modulation and Demodulation

Communication Channels

Amplitude Modulation Chapter 2. Modulation process

Use of the LTI Viewer and MUX Block in Simulink

EECS 307: Lab Handout 2 (FALL 2012)

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

ECE 3500: Fundamentals of Signals and Systems (Fall 2015) Lab 4: Binary Phase-Shift Keying Modulation and Demodulation

Lab 1: Analog Modulations

Sound synthesis with Pure Data

Amplitude Modulation, II

ECE 3500: Fundamentals of Signals and Systems (Fall 2014) Lab 4: Binary Phase-Shift Keying Modulation and Demodulation

Lab 1B LabVIEW Filter Signal

Lecture 3 Complex Exponential Signals

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

Real and Complex Modulation

Alternative View of Frequency Modulation

COMMUNICATION LABORATORY

Chapter 3: Analog Modulation Cengage Learning Engineering. All Rights Reserved.

EE 422G - Signals and Systems Laboratory

Synthesis: From Frequency to Time-Domain

Midterm 1. Total. Name of Student on Your Left: Name of Student on Your Right: EE 20N: Structure and Interpretation of Signals and Systems

Laboratory Experiment #1 Introduction to Spectral Analysis

LTSpice Basic Tutorial

Problem Set 1 (Solutions are due Mon )

Charan Langton, Editor

PART I: The questions in Part I refer to the aliasing portion of the procedure as outlined in the lab manual.

Laboratory Assignment 5 Amplitude Modulation

Lab #2 First Order RC Circuits Week of 27 January 2015

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

ECE438 - Laboratory 7a: Digital Filter Design (Week 1) By Prof. Charles Bouman and Prof. Mireille Boutin Fall 2015

Experiment 2: Electronic Enhancement of S/N and Boxcar Filtering

ET 304A Laboratory Tutorial-Circuitmaker For Transient and Frequency Analysis

AM Limitations. Amplitude Modulation II. DSB-SC Modulation. AM Modifications

Communication Engineering Prof. Surendra Prasad Department of Electrical Engineering Indian Institute of Technology, Delhi

Laboratory 2: Amplitude Modulation

LabVIEW Basics Peter Avitabile,Jeffrey Hodgkins Mechanical Engineering Department University of Massachusetts Lowell

Amplitude Modulation II

Laboratory Assignment 4. Fourier Sound Synthesis

E x p e r i m e n t 2 S i m u l a t i o n a n d R e a l - t i m e I m p l e m e n t a t i o n o f a S w i t c h - m o d e D C C o n v e r t e r

Demonstrating in the Classroom Ideas of Frequency Response

George Mason University Signals and Systems I Spring 2016

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

Faculty of Engineering Electrical Engineering Department Communication Engineering I Lab (EELE 3170) Eng. Adam M. Hammad

Project 2 - Speech Detection with FIR Filters

Lecture 17 z-transforms 2

DSP First. Laboratory Exercise #7. Everyday Sinusoidal Signals

DT Filters 2/19. Atousa Hajshirmohammadi, SFU

ME 365 EXPERIMENT 8 FREQUENCY ANALYSIS

Experiments #6. Convolution and Linear Time Invariant Systems

Measuring Modulations

MATLAB Assignment. The Fourier Series

Music 171: Amplitude Modulation

Spectrum Analysis: The FFT Display

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

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

Fall Music 320A Homework #2 Sinusoids, Complex Sinusoids 145 points Theory and Lab Problems Due Thursday 10/11/2018 before class

Digital Signal Processing Laboratory 1: Discrete Time Signals with MATLAB

MTE 360 Automatic Control Systems University of Waterloo, Department of Mechanical & Mechatronics Engineering

Lab 3 FFT based Spectrum Analyzer

UNIVERSITY OF WARWICK

Instruction Manual for Concept Simulators. Signals and Systems. M. J. Roberts

Speech, music, images, and video are examples of analog signals. Each of these signals is characterized by its bandwidth, dynamic range, and the

EE 215 Semester Project SPECTRAL ANALYSIS USING FOURIER TRANSFORM

Gentec-EO USA. T-RAD-USB Users Manual. T-Rad-USB Operating Instructions /15/2010 Page 1 of 24

Laboratory 3: Frequency Modulation

1.5 The voltage V is given as V=RI, where R and I are resistance matrix and I current vector. Evaluate V given that

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

EE470 Electronic Communication Theory Exam II

6.02 Practice Problems: Modulation & Demodulation

Lab 8: Frequency Response and Filtering

Lab course Analog Part of a State-of-the-Art Mobile Radio Receiver

HW 6 Due: November 9, 4 PM

EE452 Senior Capstone Project: Integration of Matlab Tools for DSP Code Generation. Kwadwo Boateng Charles Badu. May 8, 2006

DFT: Discrete Fourier Transform & Linear Signal Processing

Fourier Signal Analysis

Fourier Transform. Prepared by :Eng. Abdo Z Salah

Lab 1: Analog Modulations

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

World Journal of Engineering Research and Technology WJERT

Contents. Introduction 1 1 Suggested Reading 2 2 Equipment and Software Tools 2 3 Experiment 2

ECE 201: Introduction to Signal Analysis

Each individual is to report on the design, simulations, construction, and testing according to the reporting guidelines attached.

Modeling Communication Systems Using Simulink

Transcription:

EEL 4350 Principles of Communication Project 2 Due Tuesday, February 10 at the Beginning of Class Description In this project, MATLAB and Simulink are used to construct a system experiment. The experiment contains filter and modulation principles. The Fast Fourier transform used in Project 1 will be used in Project 2 as well. Spectrum analysis for AM double-sideband suppressed carrier (AM DSB-SC) modulation is performed. Deliverables Your deliverable will be in the form of a hard-copy report with the following clearly labeled sections: Cover sheet including your name, the name and number of the course, and the project number (2). Brief Description of Project (1 to 2 paragraphs recommended) MATLAB (.m) file and Simulink model diagram. For this project you should create at least a main.m file that performs all operations required along with a Simulink model diagram containing the system construction. You should place comments in the program code that would be helpful to someone reading your program; i.e. at least state where each section of code begins. Use the % sign before placing comments in the.m file. Description of results and answers to questions organized as given below with plots included as numbered figures ( Figure 1, Figure 2, etc.). The Figures should be placed at appropriate places within the body of your descriptions. Conclusions (likely a 1 paragraph summary) Failure to adhere to this format will result in deduction of points. Project Summary: In this project, you will begin with a message signal that is s( t) cos(2 300t) cos(2 500t) (1) Interference from a 60 Hz power-line source will be included in the simulation. The message signal, including the added interference, is given by m( t) cos(2 300t) cos(2 500t) 0.2 cos(2 60t) (2)

2 A high-pass filter is added to the input to filter out the 60 Hz interference. Next, the signal is multiplied by a 1 khz carrier signal to provide amplitude modulation. This provides a shift of the spectrum to center it around the carrier frequency and the negative of the carrier frequency, as described in the text. Following this, demodulation is performed. The demodulation in this case is performed by multiplying by a signal with the carrier frequency; this will provide copies of the spectrum (of half the magnitude) to 2 times the carrier frequency and to DC (0 Hz) (you will be asked to show why multiplication by the carrier produces this result). Finally, appropriate filtering is used to separate the 300 Hz and 500 Hz components of the message at the output. Project Description and Assignment You will create a system model in Simulink, a subprogram operated within and by MATLAB. To create a new model in Simulink, go to New Simulink Model in the main MATLAB window (Figure 1). Once in the Simulink window, click on the Library Browser button, as shown in Figure 2. This will open a window (Figure 3). From the menu, you can select items to place in your system block diagram. Figure 1. Opening a New Simulink Model

3 Figure 2. Opening the Library Browser Figure 3. Simulink Library Browser

4 Figure 4 shows the completed drawing of your diagram. Begin by placing three sinusoidal sources in the drawing. Go to the Sources menu and select Sine Wave. Place three copies in the drawing, as shown in Figure 4. To place the Sine Wave sources, go to the Sources menu and select Sine Wave. Left click on the Sine Wave icon and hold the mouse button down, dragging it onto the model screen. Release the button to place the component. If you desire to give the component a different name, double click on the text below the icon and type in the desired name. Next, modify the properties of the icon by double clicking on the icon itself. The properties box with the appropriate settings for the 300 Hz cosine wave sources appear as shown in Figure 5. Note that we want to create a cosine, so the phase of the sine will be 90 degrees (a sine function shifted to the left by pi/2 radians is a cosine function). The sample time should be set small enough so that the sine wave can be clearly defined given the frequencies to be used in the problem. Use 0.0001 seconds in this project for all of the sine wave sources (including the carrier for the modulation). The Scope and To Workspace boxes come from the Sinks menu. The scope allows the time plot of the signal at this point in the diagram to be plotted just by double clicking on the icon. The To Workspace creates a vector of values that can be manipulated by a MATLAB script or in the MATLAB command window. We will use this to pass on the vector of values for our function mt, (or m(t), the message signal). We will write code in our MATLAB script to plot the Fast Fourier Transform of this signal (similar to your first project). After inserting each To Workspace diagram, name it by clicking on the box. Also, you must change the Save Format of each box to Structure, as shown in Figure 6.

Figure 4. Completed Simulink Model for Experiment 5

Figure 5. Properties Box for 300 Hz Cosine Wave 6

7 Figure 6. Block Parameter Block for To Workspace Blocks: Structure must be chosen as the Save Format. Enter a Transfer Function icon. This icon will come from the Continuous menu. Enter the settings as shown in Figure 7. This transfer function will be set up to describe a high-pass Butterworth filter that will be used to remove the 60 Hz interference from the signal. The entries b and a will be vectors containing polynomial coefficients defined by the Butterworth filter function to be utilized in your MATLAB program.

8 Figure 7. Settings for the Transfer Function Describing the Interference-Removing Filter The product operator can be found in the Math Operations library and can simply be placed in the window without modification of its settings. A sine wave is added into the system to represent a 1000 Hz carrier for the modulation; its settings should appear as shown in Figure 8. Complete the diagram as shown in Figure 4. For the second transfer function block, enter d as the numerator and c as the denominator, and for the third block, enter f as the numerator and e as the denominator. Finally, go to the pull-down menus in Simulink, select Simulation Configuration parameters, and set the start time to 0 and the stop time to 0.1, as shown in Figure 9.

Figure 8. Settings for Carrier Signal 9

10 Figure 9. Configuration Parameters Settings Following the completion of the Simulink diagram, create a new.m file with the following code (or some similar version). The first code defines the three transfer function blocks. Note that the first transfer function is for the interference removal; a high-pass filter with a cutoff frequency of 100 Hz should be sufficient to remove the unwanted 60 Hz component. The second set of coefficients [d,c] selects the 300 Hz component at the output, describing a low-pass filter with a 400 Hz cutoff frequency. Note that the cutoff frequency is somewhat close to the desired signal frequency; this may cause some modification of the amplitude of the signal, since the filter is not an ideal filter. However, this is necessary because the 500 Hz signal must be rejected by this filter. Finally, a bandpass filter is created with [f,e] with a vector describing the two cutoff frequencies: 400 Hz and 600 Hz. We must use a bandpass filter rather than a high-pass filter because there is a spectral component at 2000 Hz due to the demodulation that must also be rejected.

11 %ELC 4350 - Principles of Communication %Project 2 %Dr. Charles Baylis %This project plots different signals in a simple communication system %simulated with Simulink. %Define the filter parameters [b,a]=butter(9,2*pi*100,'high','s'); [d,c]=butter(9,2*pi*400,'low','s'); [f,e]=butter(9,[2*pi*400 2*pi*600],'s'); %Simulate the model: sim('diagram'); %Plot the Fourier Transform of m(t), the message signal: N0 = length(mt.signals.values); T0=0.1; Ts = T0/(N0-1); m = mt.signals.values; Dn=fft(mt.signals.values)/N0; [Dnangle,Dnmag] = cart2pol(real(dn),imag(dn)); k=0:length(dn)-1;k=k'; f = k/t0; figure stem(f,dnmag);axis([0 1000-1 1]) title('spectrum of the Message Signal with Interference M(f)') %Plot the exponential Fourier series of mft, the filtered message signal: N0 = length(mft.signals.values); T0=0.1; Ts = T0/(N0-1); m = mft.signals.values; Dn=fft(mft.signals.values)/N0; [Dnangle,Dnmag] = cart2pol(real(dn),imag(dn)); k=0:length(dn)-1;k=k'; f = k/t0; figure stem(f,dnmag);axis([0 1000-1 1]) title('spectrum of the Filtered Message Mf(f)') %Plot the exponential Fourier series of x(t), the modulated signal: N0 = length(xt.signals.values); T0=0.1; Ts = T0/(N0-1); m = xt.signals.values; Dn=fft(xt.signals.values)/N0; [Dnangle,Dnmag] = cart2pol(real(dn),imag(dn)); k=0:length(dn)-1;k=k'; f = k/t0; figure stem(f,dnmag);axis([0 2000-1 1]) title('spectrum of the Modulated Signal X(f)') %Plot the exponential Fourier series of y(t), the demodulated signal: N0 = length(yt.signals.values); T0=0.1; Ts = T0/(N0-1);

12 m = yt.signals.values; Dn=fft(yt.signals.values)/N0; [Dnangle,Dnmag] = cart2pol(real(dn),imag(dn)); k=0:length(dn)-1;k=k'; f = k/t0; figure stem(f,dnmag);axis([0 1000-1 1]) title('spectrum of the Demodulated Signal Y(f)') %Plot the exponential Fourier series of Output1, the received 300 MHz %signal: N0 = length(output1.signals.values); T0=0.1; Ts = T0/(N0-1); m = Output1.signals.values; Dn=fft(Output1.signals.values)/N0; [Dnangle,Dnmag] = cart2pol(real(dn),imag(dn)); k=0:length(dn)-1;k=k'; f = k/t0; figure stem(f,dnmag);axis([0 1000-1 1]) title('spectrum of the Received 300 MHz Signal') %Plot the exponential Fourier series of Output2, the received 500 MHz %signal: N0 = length(output2.signals.values); T0=0.1; Ts = T0/(N0-1); m = Output2.signals.values; Dn=fft(Output2.signals.values)/N0; [Dnangle,Dnmag] = cart2pol(real(dn),imag(dn)); k=0:length(dn)-1;k=k'; f = k/t0; figure stem(f,dnmag);axis([0 1000-1 1]) title('spectrum of the Received 500 MHz Signal') Report Run your MATLAB script and provide the following items and discussions in your report. 1. Provide a copy of your MATLAB script (no need to label this as a Figure) and your Simulink diagram (label this as Figure 1). 2. The Input Signal. Double-click on the scope following the input signal including the interference and show a snapshot in time of the scope output (you will need to figure out how to adjust the scope scale appropriately: click on the magnifying glass icon with the x on it and drag it over the time interval you would like to show in the plot; a similar operation can be done to modify the y-axis scale). Place the scope output in your report and label it as Figure 2. Comment on the shape of this wave does it appear like the sum of three sinusoids would be expected to appear? Your MATLAB script has computed the FFT of signal 1 show this as Figure 3 in your report (MATLAB will label it as Figure 1, but do not

13 worry about this). Note that the script plots the spectrum versus Hz frequency, not radian frequency. Does this spectrum correspond with your expectations? 3. Provide the plot from the scope associated with the signal following interference removal (mft) and show this as Figure 4 in your report. How does this signal appear different from the signal that included the interference? The FFT has been computed for this signal as well; plot this as Figure 5. According to this spectral plot, has the interference been successfully removed? 4. Show the plot of the FFT of xt (the signal after modulation) and label this as Figure 6. Does this spectral plot correspond with your expectations from the theory developed in the lecture and in the textbook? State appropriate identities. How are the amplitudes of the copies of the message spectrum changed? Is this expected from the identities? 5. Show the FFT of the signal after the next multiplication (the demodulation); this is yt. Label this as Figure 7. Where are the spectral components? How does this correspond mathematically with your expectations (hint: argue based on cos 2 x = ½ + ½ cos 2x and the half-angle identities given on the first day of class)? 6. Examine the time (scope) and FFT plots (from the script) of Output 1; this should be the received 300 MHz signal. Label these as Figures 8 and 9, respectively. Was the filtering successful? 7. Examine the time (scope) and FFT plots (from the script) of Output 2; this should be the received 500 MHz signal. Label these as Figures 10 and 11, respectively. Was the filtering successful? 8. List any conclusions you may have reached concerning the modulation/demodulation/filtering process. Submit your report with a cover sheet as in Project 1. The format of your answers to the above questions should be a coherent report, answering the questions in order; no numbering for the questions is required; you may choose to subsection the work into reasonable subsections if desired for organization.