0 Voturi pozitive0 Voturi negative

8 (de) vizualizări6 paginiuzorkovanje

Nov 27, 2014

© © All Rights Reserved

PDF, TXT sau citiți online pe Scribd

uzorkovanje

© All Rights Reserved

8 (de) vizualizări

uzorkovanje

© All Rights Reserved

- Steve Jobs
- Wheel of Time
- NIV, Holy Bible, eBook
- NIV, Holy Bible, eBook, Red Letter Edition
- Cryptonomicon
- The Woman Who Smashed Codes: A True Story of Love, Spies, and the Unlikely Heroine who Outwitted America's Enemies
- Contagious: Why Things Catch On
- Crossing the Chasm: Marketing and Selling Technology Project
- Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are
- Zero to One: Notes on Start-ups, or How to Build the Future
- Console Wars: Sega, Nintendo, and the Battle that Defined a Generation
- Dust: Scarpetta (Book 21)
- Hit Refresh: The Quest to Rediscover Microsoft's Soul and Imagine a Better Future for Everyone
- The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution
- Crushing It!: How Great Entrepreneurs Build Their Business and Influence—and How You Can, Too
- Make Time: How to Focus on What Matters Every Day
- Algorithms to Live By: The Computer Science of Human Decisions
- Wild Cards

Sunteți pe pagina 1din 6

Laboratory Exercise 2

Sampling and Aliasing

Objective

The objective of this Lab is to understand concepts and observe the effects of periodically sampling a continuous signal at different sampling rates, changing the sampling rate of a sampled

signal, aliasing, and anti-aliasing filters.

The prelab should be done before the lab, and the answer sheet, not longer than one page,

should be given to the demonstrator to sign before the lab starts. You will not be allowed to do

the prelab during the Lab.

(You will find Chapters 12 and 14 from Roberts, as well as your lecture notes, useful. Also

read the section introductions in this Lab script.)

Your lab report should have a title, a short description of the purpose of the lab, and include

the prelab report. For the experiments, make sure that you label the plots and signals appropriately (and refer to them if necessary), and include any relevant details for the particular question.

The text part of the lab report should also not be more than 1 page long.

Prelab

PQ.1 a) Assume you sample a 2 Hz sinusoid, at a sampling rate fs = 8Hz starting at 0 s. Is

the Nyquist criterion satisfied? Calculate values of the sampled signal during the first

second. (hint: create an appropriate vector in Matlab starting at 0 and ending at 1.

Check help for the sine function.)

b) Now assume you sample a 10 Hz sinusoid at the same sampling rate. What about

the Nyquist criterion now? Calculate the values of the sampled signal during the first

second. Compare the results with the previous calculation. What happened?

Sketch both signals during the first second, and mark the sampling instants and the samples

on your sketch.

Parts of this lab are based on the Sampling and Reconstruction lab by C. Bouman, offered at Purdue University

and Sampling and Quantization lab by Yao Wang and Xiaofeng Xu, offered at Polytechnic Institute of NY.

PQ.2 Consider the signal spectrum shown in Figure 1. What is the Nyquist rate for this signal?

Sketch the spectrum of the sampled signal if it is ideally (impulse) sampled at Nyquist

rate. Mark the relevant frequencies. How would you reconstruct the original signal?

-100

f [Hz]

100

PQ.3 The spectrum shown in Figure 2 is that of a band pass signal.

-400

-300

300

400

f [Hz]

What is its Nyquist rate? Assume that it is ideally (impulse) sampled a) at fs1 = 500Hz

and b) at fs2 = 200Hz. Is the Nyquist criterion satisfied in these two cases? Sketch the

spectra for both cases of sampled signals. Mark the relevant frequencies. Is there aliasing?

Could the original signal be reconstructed? If so, how (in the ideal case)?

Sampling is a process of acquiring values of a continuous-time signal at discrete time instants,

and is a fundamental concept in digital signal processing (DSP). Signal values are acquired at

discrete time instants, which enables them to be processed in a computer or any DSP unit.

Another process necessary for DSP is quantisation. We will look at quantisation in a different

Lab.

In the spectral domain, sampling produces a periodic spectrum, with images of the original

spectrum centered around multiples of the sampling frequency (aliases):

)=

S(f

+

X

S(f kfs )

(1)

k=

where S is the sampled signal spectrum, and S is the original signal spectrum. (More details

on sampling and reconstruction can be found in your lecture notes and in chapters 12 and 14

of Roberts.) If the signal is sampled properly, it is possible to reconstruct it perfectly from the

discrete values. The simplest way of reconstruction in the case of the ideal impulse sampling

is by using a brick wall filter that eliminates all the aliases of the baseband spectrum. This is

equivalent to a sinc function interpolation (more details in Chapter 12 of the Roberts textbook,

section on ideal impulse sampling). Sampling frequencies that are too low lead to aliasing frequencies from the aliases of the original spectrum will appear in the original band, and the nature

2

of the spectrum is changed. If the sampling frequency is too low, some harmonic components

can end up being aliased into the negative frequency range. These components fold back around

zero frequency and appear in the original band as low frequency components.

In this part of the lab you will build Simulink models that simulate sampling and observe the

effects of sampling a continuous signal at different rates in both time and spectral domain. All

required blocks can be found either in the samplinglab blocks model that is in your working

directory, and in standard Simulink blocksets.

LQ1.1. Before you start, copy the files from the Lab 3 - Sampling and Aliasing folder on W

drive to your working directory. Construct the model shown in Figure 3. Save it in the

same directory. Before running the model, make sure that Matlab is set to the same

directory. Signal Generator and Scope blocks can be found in the Sources and Sinks

blocks, respectively.

Figure 3: sampling

Set the parameters for the Signal Generator as follows:

(a) waveform: sine

(b) amplitude: 1

(c) frequency: 1 Hz

Set the parameters for the Impulse Generator as follows:

(a) sampling period: 0.25 (What is the sampling frequency?)

(b) sample width: 0.001

Set the simulation time to 120, solver to ode45, type to variable step and maximum

step size to 0.05. Leave other parameters unchanged. Run the simulation and observe

the results in the scope window and in the Matlab generated figure. Identify the original

3

signal component in the sampled signal spectrum, and identify the aliases (frequency

pairs). Show the relationship between the sampling frequency and the aliases in the

sampled signal spectrum (mark all the relevant frequencies in the plots) and explain.

LQ1.2. Repeat the above for sampling periods of 0.2, 0.1, and 0.8. Compare the results to those

you obtained in the previous task. How do the results change? Particularly pay attention

to the case with sampling period 0.8. What happened here? Identify any aliased low

frequency components in the spectrum plot. Can you guess the aliased frequency value

from the scope plot of the sampled signal? Explain.

LQ1.3. Repeat the procedure for a sawtooth wave with frequency set to 0.25, and sampling

periods set to 0.1 and 0.2. Comment on the spectrum structure. Describe the differences

from the case with a sinusoid, particularly with aliasing in view (remember, a sawtooth

wave has an infinite spectrum).

LQ1.4. To reduce the effects of aliasing, anti-aliasing filters can be used. They limit the bandwidth of the signal so that sampling introduces no or very little aliasing. If the sampling

rate is fs , what should be the cutoff frequency of the anti-aliasing filter? Why?

Modify your model by inserting the Analog Butterworth LP Filter before the Impulse

Generator. Adjust the model so that you can see plots from the Signal Generator, filter

output, and the sampled signal on the scope.

Re-run the simulation for the sawtooth with frequency set to 0.25 and sampling period

to 0.1. Set the filter cutoff frequency first to 5 Hz, and then to 2 Hz. (note that the filter

requires input in rad/s, so be careful what you type in). What can you say about spectra

and aliasing in this case? What was the price that had to be paid to reduce aliasing? How

does the filter bandwidth affect the results?

Reconstruction

In order to reconstruct the signal from the series of discrete values we need to eliminate the

periodicity of the sampled signal spectrum. The simplest way to do this is by low-pass filtering.

From the time-domain point of view, reconstruction can be seen as filling in the missing values

between the samples, i.e. interpolation. There are many ways of interpolation, and this topic is

out of the scope of this course. However, all interpolators can be seen as specific types of filters.

LQ2.1. Build the model from Figure 4. Set the Gain value to 100. Run the simulation for a

sinewave with frequency 1 Hz, sampling period 0.25, sample width 0.001 and the lowpass filter cutoff frequency of 1.2 Hz. Observe the results.

Change the sampling period to 0.8, and repeat the simulation. Comment on how the

results have changed in both spectral and time domains.

LQ2.2. Repeat the above procedure for a square wave with frequency 0.5 Hz, sampling period

0.1, sample width 0.001 and low pass filter cutoff frequency 1.2 Hz. Now change the

4

cutoff frequency to 5 Hz and compare the results. How close does the reconstructed

signal match the original one in these two cases? How does the filter bandwidth influence

the reconstruction?

Change the sampling period to 0.8, and re-run the simulation. Comment on the results.

It is sometimes necessary to change the sampling rate of signals. The reasons for this could

be reducing the storage requirements, or transmission speed, or sometimes a move between two

processing or transmission systems with different data rates. Sometimes it is necessary to convert

data from one format to another, and that can involve changing the sampling rate. Two basic

operations are downsampling (or decimation) and upsampling (or interpolation). The theory

that covers these topics is out of the scope of this course and this lab, but we will nevertheless

investigate the effects that changing the sampling rate can have on the signals and how certain

adverse effects can be mitigated.

You will find Matlab scripts down6up6 NF and down6up6 F in the directory downsample upsample. We will use these scripts to demonstrate the effects of downsampling and upsampling audio files. The first one reads an audio file and then downsamples and upsamples

it without using filters and uses the simplest interpolation (repeating the given sample value M

times). The second one does the same but filters the signal before downsampling and uses a

5

special interpolation filter to upsample the signal. To see how to use these scripts, type help

filename. The sound file is provided in the same directory.

LQ3.1. Run down6up6 NF with the sound file, and comment on the subjective differences

between the original sound and its downsampled and upsampled versions. Note the

differences between the time-series and spectra for these three cases.

Run down6up6 F with the sound file, and comment on the subjective differences between the original sound and its downsampled and upsampled versions. Note the differences between the time-series and spectra for these three cases.

The upsampled audio files have been saved to your working directory. Play them and

comment on the subjective quality.

Comment on the differences between the spectra and time-series of two different upsampled versions of the sound. How did the use of the filters in the second case affect the

result?

Report

Prelab

In no more than one page, answer the following questions:

PQ.1 Answer the questions. Include tables of values for both a) and b). Attach the sketch of the

signals with samples marked.

PQ.2 and PQ.3 Answer the questions and attach the sketches for both.

Lab Exercise

In no more than one page, answer the questions in all sections. Attach the plots.

75% of the grade will be awarded for correct answers, and up to 25% will be awarded for the

quality of answers.

- Doppler in ObstetricsÎncărcat dedrmrtwindowslive
- Orban Optimod-PC 1100Încărcat deDr. Emmett Lathrop "Doc" Brown
- Sampling 1.sÎncărcat deumesh_maiet
- Lab6Încărcat deNhật Hoàng
- DSP Final Paper: Digital Filtering ImplementationÎncărcat deKerry Chayka
- Ecg Sampling Unit for Elecprosurgical EnvironmentsÎncărcat devineelchandra_u9518
- Ch2 Fundamentals 2017 2Încărcat detarek moahmoud khalifa
- 06145663Încărcat dedabalejo
- Experiment-9-Sampling-Theory.pdfÎncărcat desrinivasa2
- 434378Încărcat deyukiozu
- lab2Încărcat decorban_dallas146
- Lab 9Încărcat deImran Shaukat
- PowerSupplyDesignÎncărcat detrinaths
- LAB PRojectÎncărcat deHas Nain Khaan
- Cs Lab Student ManualÎncărcat dereddykishore_me
- DSP_Lab_01-1Încărcat dePette Ming
- 2110016_ModelÎncărcat deJit Jag
- Lab 6Încărcat dechusmanullah
- Signal 10Încărcat deNesma Gamal
- VSAÎncărcat deDevendran Jayakanthan
- Lab_05Încărcat deiskadir123
- Question 6Încărcat detarun6554
- 4daqsc223-225_ETC_194-196Încărcat deDhamu Dharan
- Operative Guide MaswÎncărcat deNajib EL GOUMI
- linear prediction of analog signalÎncărcat deilclod
- GNU RADIOÎncărcat dePrateekMittal
- Tektr0nic Catal0g0Încărcat deFranquicio Perez Javier
- D.COM(GTU).pdfÎncărcat dedilawar sumra
- 00b7d52343acb9a0a7000000 (1)Încărcat deharan
- AcousticaPE400us.pdfÎncărcat deMatthew Thomas

- Complex MathsÎncărcat deBrian Wheeler
- 0122Încărcat deAnonymous WkbmWCa8M
- TutorialÎncărcat deAnonymous WkbmWCa8M
- TutorialÎncărcat deCharles
- hu2013.pdfÎncărcat deAnonymous WkbmWCa8M
- Chapter_9Încărcat deNur Afiqah
- Notes-Nyquist Plot and Stability CriteriaÎncărcat deMoiz Hussain
- Note_15-2006Încărcat deAnil Yadav
- Rao 2014Încărcat deAnonymous WkbmWCa8M
- Design of PID Controllers Integrator System with Time Delay and Double Integrating ProcessesÎncărcat deijicsjournal
- lec8H2-OptimalControl.pdfÎncărcat deAnonymous WkbmWCa8M
- a243895.pdfÎncărcat deAnonymous WkbmWCa8M
- 35.Încărcat deAnonymous WkbmWCa8M
- Chapter 4 Practice Solving Log and Exp EquationsÎncărcat deAnonymous WkbmWCa8M
- Kinematics and Kinetics Basic Knowledge EnglishÎncărcat deAnonymous WkbmWCa8M
- Nguyen 2011Încărcat deAnonymous WkbmWCa8M
- 9783319412993-c2(1)Încărcat deAnonymous WkbmWCa8M
- Manual Becker BE V4 en 57Încărcat deAnonymous WkbmWCa8M
- ! maximini2004Încărcat deAnonymous WkbmWCa8M
- 2014 Lec 15 Control Basics IIÎncărcat deAnonymous WkbmWCa8M
- 2014_Lec_10_BodeÎncărcat deAnonymous WkbmWCa8M
- Eksponencijalne i Logaritamske JednacineÎncărcat deAnonymous WkbmWCa8M
- PID Control - ARAKIÎncărcat deLuiz Carlos da Silva
- ventiliÎncărcat deAnonymous WkbmWCa8M

- Plug & Mix User ManualÎncărcat deRuggero Catania
- uaf42Încărcat deRinson Jawer Rivera Gonzalez
- firpmÎncărcat deRakesh Inani
- Narrowband Microstrip Filter DesignÎncărcat dedwissel
- Bucket BrigadeÎncărcat dezluizneto
- What Exactly is Impulse ResponseÎncărcat deVenkatraman Natarajan
- Respuestas Del ManualÎncărcat degabriel_30
- UAF42 Filtro NotchÎncărcat deJuan Jose Arrieta
- DSP-Ch11-S1-5Încărcat deCarriceiros Tour
- FilterÎncărcat deĐỗ Quang Việt
- Ch04-Frequency Domain ProcessingÎncărcat deInnocent Cool
- Practical Introduction to Digital Filter Design - MATLAB ExampleÎncărcat deEdson
- Training Document 1Încărcat dehossam_fadeel2560
- OlpokÎncărcat deGeorgeGeorgiadis
- Diseño de filtros IIR y FIRÎncărcat deacajahuaringa
- Implementation of Radio – Over – Fiber Technology with Different Filtartion TechniquesÎncărcat deIJRASETPublications
- pp1Încărcat deSanjay Soni
- Assignment 2Încărcat deLuke Gahan
- tk-2202-2206-msÎncărcat deperico_007
- Ma Meng ThesisÎncărcat deSandesh Aloysius
- Osciloscópio PIC 16f877.pdfÎncărcat deJorge Perdigon
- lpf.pdfÎncărcat demohit
- EcoSYSTEM ManualÎncărcat dedaniel
- OptiSystem Getting StartedÎncărcat deAmish Tankariya
- Basic Signal Processing TechniquesÎncărcat deAbhishek Arora
- signal basics.PDFÎncărcat debswamina
- DSP Lab ReportÎncărcat devaamarnath
- PSD Expt LabsheetÎncărcat deYogesh Mahajan
- Manual GSSI AntennasÎncărcat deEdwin
- Velodyne MiniVee 10 ManualÎncărcat deWalther

## Mult mai mult decât documente.

Descoperiți tot ce are Scribd de oferit, inclusiv cărți și cărți audio de la editori majori.

Anulați oricând.