Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Experiment # 9 Sampling Theorem Objective: In this lab, we will explore the sampling theorem and its conditions and the aliasing problem and the solution for it. Basic Theoretical Principles A typical time-dependent signal, for example AC voltage, is continuous with respect to magnitude and time. Such signals are called analog signals. Using a normal (analog) oscilloscope we get an analog representation of such a signal. Today mainly digital equipment is used for electrical measurements. The original analog signal is converted to a digital signal. A digital signal is discrete with respect to the magnitude as well as to the time. Therefore, conversion of an analog to a digital signal means the value of the analog signal function F(t) is measured at discrete times t0 = ti + i. Δt during a time interval tm = t – t0 and the indicated values changes with steps ΔF . Mostly the measured value is represented by a binary number and the step ΔF depends on its number of positions, that means of the number of bits processed by the analog-to-digital converter (ADC). The correct use of this measurement technology requires one to know how often the value of a signal must be measured during a given time interval in order to reconstruct its shape tm correctly. The answer is given by the sampling theorem of time functions (Nyquist Criterion): If the given time function F(t) has a limited bandwidth B and the time interval of measurement is infinite, a correct interpolation between the sampling points is tm possible when the function is sampled with a time step. with a sampling rate Assuming a simple harmonic function this theorem says that it is necessary to sample the function more than two times per period. An important example is the digital processing of audio signals Assuming a bandwidth of B= 20kHz for such signals a sampling rate f> 40kHz must be used (usually: f= 44.1kHz.) Experimental Procedures 1. Type the following code in m-file and run it. clc close all fs=10000; f0=1000; n=0:1:50; x=cos(2*pi*f0*n/fs); figure (1) stem(n,x) title('part A') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% figure (2) for f0=300:400:1500; x=cos(2*pi*f0*n/fs); subplot(2,2,(f0+100)/400) stem(n,x) end title('Part B') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% figure (3) for f0=8500:400:9700; x=cos(2*pi*f0*n/fs); subplot(2,2,(f0-8100)/400) stem(n,x) end title('Part C') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% figure (4) for f0=10300:400:11500; x=cos(2*pi*f0*n/fs); subplot(2,2,(f0-9900)/400) stem(n,x) end title('Part D') % close all