24
S. Mandayam/ ECOMMS/ECE Dept./Rowan Universi Electrical Electrical Communications Systems Communications Systems ECE.09.331 ECE.09.331 Spring 2011 Spring 2011 Shreekanth Mandayam ECE Department Rowan University http://engineering.rowan.edu/~shreek/spring11 /ecomms/ Lab 1: Pre-lab Instruction Lab 1: Pre-lab Instruction January 24, 2011 January 24, 2011

Electrical Communications Systems ECE.09.331 Spring 2011

  • Upload
    taran

  • View
    30

  • Download
    2

Embed Size (px)

DESCRIPTION

Electrical Communications Systems ECE.09.331 Spring 2011. Lab 1: Pre-lab Instruction January 24, 2011. Shreekanth Mandayam ECE Department Rowan University http://engineering.rowan.edu/~shreek/spring11/ecomms/. ECOMMS: Topics. Plan. Recall: Deterministic and Stochastic Waveforms - PowerPoint PPT Presentation

Citation preview

Page 1: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Electrical Electrical Communications SystemsCommunications Systems

ECE.09.331ECE.09.331 Spring 2011Spring 2011

Shreekanth MandayamECE Department

Rowan University

http://engineering.rowan.edu/~shreek/spring11/ecomms/

Lab 1: Pre-lab InstructionLab 1: Pre-lab InstructionJanuary 24, 2011January 24, 2011

Page 2: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

ECOMMS: TopicsECOMMS: Topics

Probability

Inform ation

Entropy

Channel Capacity

Discrete

Pow er & Energy Signals

Continuous Fourier Transform

Discrete Fourier Transform

Baseband and Bandpass Signals

Com plex Envelope

Gaussian Noise & SNR

Random VariablesNoise Calculations

Continuous

Signals

AMSw itching M odulator

Envelop Detector

DSB-S CProduct M odulatorCoherent Detector

Costas Loop

SSBW eaver's MethodPhasing M ethod

Frequency M ethod

Frequency & Phase M odulationNarrowband/WidebandVCO & Slope Detector

PLL

Analog

Source EncodingHuffm an codes

Error-control EncodingHam m ing Codes

Sam plingPAM

QuantizationPCM

Line Encoding

Tim e Division M uxT1 (DS1) Standards

Packet Sw itchingEthernet

ISO 7-Layer Protocol

BasebandCODEC

ASKPSKFSK

BPSK

QPSK

M -ary PSK

QAM

BandpassM ODEM

DigitalDigital Com m Transceiver

Systems

Electrical Comm unication Systems

Page 3: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

PlanPlan• Recall:

• Deterministic and Stochastic Waveforms

• Random Variables• PDF and CDF• Gaussian PDF

• Noise model

• Lab Project 1• Part 1: Digital synthesis of arbitrary waveforms with specified

SNR

• Recall: • How to generate frequency axis in DFT

• Lab Project 1• Part 2: CFT, Sampling and DFT (Homework!!!)• Part 3: Spectral analysis of AM and FM signals• Part 4: Spectral analysis of an ECG signal

Page 4: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Lab 1Lab 1

Matlab code>>>>>>>>

0 0.1 0.2 0.3 0.4-10

-5

0

5

10

time in s

Am

plitu

de in

Vol

ts

3400 3600 3800 4000 4200 44000

2

4

6

8x 10

-3

f in Hz

Am

plitu

de in

Vol

ts

Matlab code>>>>>>>>

HP 33120AArb Fn Gn

MathematicalWaveform

ElectricalSignal

Speaker

Agilent InfiniumOscilloscope

Signal Spectrum

Computer Computer

Page 5: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

RecallRecallWaveforms

Deterministic Stochastic

Signal(desired)

Noise(undesired)

• Probability

nn

AP A

nlim)(

Random Experiment

Random Event

outcome

Page 6: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Communications WaveformsCommunications Waveforms

0 200 400 600 800 1000-4

-2

0

2

4

time in ms

Am

plitu

de in

Vol

ts

0 2 4 6 8 10-1

-0.5

0

0.5

1

time in s

Am

plitu

de in

Vol

ts

“Random” noise Hallelujah chorus

0 0.1 0.2 0.3 0.4-10

-5

0

5

10

time in s

Am

plitu

de in

Vol

ts

6102cos10)( ttw

Page 7: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Random VariableRandom Variable

Random Event,

s

Real Number,

a

Random Variable,

X

• Definition: Let E be an experiment and S be the set of all possible outcomes associated with the experiment. A function, X, assigning to every element s S, a real number, a, is called a random variable.

X(s) = a

RandomVariable

RandomEvent

RealNumber

Appendix BProb & RV

Page 8: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

The Probability Density Function The Probability Density Function (PDF) of a Random Variable (PDF) of a Random Variable

b

adxxfaFbFbxaP )()()()(

x

f(x)

a b0 200 400 600 800 1000

-4

-2

0

2

4

time in ms

Am

plitu

de in

Vol

ts

a

b

1)( dxxf

Page 9: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

PDF Model: PDF Model: The Gaussian Random VariableThe Gaussian Random Variable

• The most important pdf model• Used to model signal, noise……..

• m: mean; 2: variance

• Also called a Normal Distribution

• Central limit theorem

),(21

)( 22 2

2

mNexf

mx

x

f(x)

m

2

1

Page 10: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Examples of Normal DistributionExamples of Normal Distribution

-10 -5 0 5 100

0.1

0.2

0.3

0.4

x in Volts

f(x)

0 200 400 600 800 1000-10

-5

0

5

10

time in ms

Am

plitu

de in

Vol

tsN(+3,1)

N(-3,1)

>> plot(x,pdf('Normal',x,-3,1),'b', x,pdf('Normal',x,3,1),'r' ) >> t=[0:999]';

>> plot(t,randn(1,1000)-3,'b',t,randn(1,1000)+3,'r')

Page 11: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Examples of Normal DistributionExamples of Normal Distribution

-10 -5 0 5 100

0.1

0.2

0.3

0.4

x in Volts

f(x)

0 200 400 600 800 1000-4

-2

0

2

4

time in ms

Am

plitu

de in

Vol

ts

0 200 400 600 800 1000-10

-5

0

5

10

time in ms

Am

plitu

de in

Vol

ts

N(0,1)

N(0,4)>> plot(x,pdf('Normal',x,0,1),'b', x,pdf('Normal',x,0,4),'r' )

>> plot(randn(1,1000))

>> plot(2*randn(1,1000),'r')

Page 12: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Generating Normally Distributed Generating Normally Distributed Random VariablesRandom Variables

• Most math software provides you functions to generate - • N(0,1): zero-mean, unit-variance, Gaussian RV

• Theorem:• N(0,2) = N(0,1)• Use this for generating normally distributed r.v.’s of any

variance

• Matlab function:• randn

• Variance Power (how?)

Page 13: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Why are we doing this?Why are we doing this?

Transfer Characteristic

h(x)

Input pdffx(x)

Output pdffy(y)

• For many situations, we can “model” the pdf using standard functions

• By studying the functional forms, we can predict the expected values of the random variable (mean, variance, etc.)

• We can predict what happens when the r.v. passes through a system

Page 14: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Lab Project 1:Lab Project 1:Waveform Synthesis and Waveform Synthesis and

Spectral Analysis Spectral Analysis

Part 1: Digital Waveform SynthesisPart 1: Digital Waveform Synthesis

http://users.rowan.edu/~shreek/spring11/ecomms/lab1.html

Page 15: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Recall: CFTRecall: CFT

)f(j

ft2j

e )f(W)f(W

)f(Y j)f(X)f(W

dte )t(w)t(w)f(W

F

Continuous Fourier Transform (CFT)

Frequency, [Hz]

AmplitudeSpectrum

PhaseSpectrum

dfe )f(W)f(W)t(w ft2j1-

F

Inverse Fourier Transform (IFT)

Page 16: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Recall: DFTRecall: DFT• Discrete Domains

• Discrete Time: k = 0, 1, 2, 3, …………, N-1• Discrete Frequency: n = 0, 1, 2, 3, …………, N-1

• Discrete Fourier Transform

• Inverse DFT

Equal time intervals

Equal frequency intervals

1N

0k

nkN2

j;e ]k[x]n[X

1N

0n

nkN2

j;e ]n[X

N1

]k[x

n = 0, 1, 2,….., N-1

k = 0, 1, 2,….., N-1

Page 17: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

How to get the frequency axis in the DFTHow to get the frequency axis in the DFT

• The DFT operation just converts one set of number, x[k] into another set of numbers X[n] - there is no explicit definition of time or frequency

• How can we relate the DFT to the CFT and obtain spectral amplitudes for discrete frequencies?

1N

0

x

.

x

]k[x

1N

0

X

.

X

]n[X

(N-point FFT)

n=0 1 2 3 4 n=N

f=0 f = fs

N

fs

Need to know fs

Page 18: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

DFT PropertiesDFT Properties• DFT is periodic

X[n] = X[n+N] = X[n+2N] = ………

• I-DFT is also periodic!

x[k] = x[k+N] = x[k+2N] = ……….

• Where are the “low” and “high” frequencies on the DFT spectrum?

n=0 N/2 n=N

f=0 fs/2 f = fs

Page 19: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Part 2: CFT, DFT and Part 2: CFT, DFT and SamplingSampling

• This is homework!!!

tin ms

w(t)

0.6 0.7 1.0

1V

0V

Page 20: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Part 3: AM and FM SpectraPart 3: AM and FM Spectra

AMs(t) = Ac[1 + Amcos(2fmt)]cos(2fct)

FMs(t) = Accos[2fct + f Amsin(2fmt)]

t

s(t)

t

s(t)

Page 21: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Part 4: ECG SignalsPart 4: ECG Signals• This experiment must be conducted with the instructor present at all times

when you are obtaining the ECG readings.• The procedure that has been outlined below has been determined to be safe

for this laboratory. • You must use an isolated power supply for powering the instrumentation

amplifier.• You must use a 1-X scope probe for recording the amplifier output on the

oscilloscope. • This objective of this experiment is compute the amplitude-frequency spectrum

of real data - this experiment does not represent a true medical study; reading an ECG effectively takes considerable medical training. Therefore, do not be alarmed if your data appears"different" from those of your partners.

• If you observe any allergic reactions when you attach the electrodes (burning sensation, discomfort), remove them and rinse the area with water.

• If, for any reason, you do not want to participate in this experiment, obtain recorded ECG data from your instructor.

Page 22: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Components of the Electrocardiogram

P-Wave Depolarization of the atriaP-R Interval Depolarization of the atria, and delay at AV junctionQRS Complex Depolarization of the ventriclesS-T Segment Period between ventricular depolarization and repolarizationT-Wave Repolarization of the ventriclesR-R Interval Time between two ventricular depolarizations

A “Normal” ECGHeart Rate 60 - 90 bpm PR Interval 0.12 - 0.20 sec QRS Duration 0.06 - 0.10 sec QT Interval (QTc < 0.40 sec)

ECG SignalECG Signal

P wave

T wave

Q

R

S

Page 23: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

Lab Project 1:Lab Project 1:Waveform Synthesis and Waveform Synthesis and

Spectral Analysis Spectral Analysis

http://users.rowan.edu/~shreek/spring11/ecomms/lab1.html

Page 24: Electrical  Communications Systems ECE.09.331 Spring 2011

S. Mandayam/ ECOMMS/ECE Dept./Rowan University

SummarySummary