0% found this document useful (0 votes)
155 views5 pages

Sampling Theorem Study with MATLAB

This document provides instructions for a lab experiment on studying the sampling theorem using MATLAB. The sampling theorem states that a signal can be reconstructed from its samples if the sampling rate is at least twice the highest frequency in the signal. Violating this theorem leads to aliasing, where high frequency components are sampled as low frequencies. The experiment involves using MATLAB to generate discrete time signals like impulses, ramps, and unit steps. Observations and calculations are to be recorded, and results and graphs analyzed. The goal is to understand sampling and use MATLAB to implement a digital signal processing system.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
155 views5 pages

Sampling Theorem Study with MATLAB

This document provides instructions for a lab experiment on studying the sampling theorem using MATLAB. The sampling theorem states that a signal can be reconstructed from its samples if the sampling rate is at least twice the highest frequency in the signal. Violating this theorem leads to aliasing, where high frequency components are sampled as low frequencies. The experiment involves using MATLAB to generate discrete time signals like impulses, ramps, and unit steps. Observations and calculations are to be recorded, and results and graphs analyzed. The goal is to understand sampling and use MATLAB to implement a digital signal processing system.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

P.E.S.

COLLEGE OF ENGINEERING
NAGSENVANA, NEAR PANCHAKKI AURANGABAD

MANUAL
CLASS:TE (EC) EXPT 02 NO: AIM OF EXPT:

DEPARTMENT:ELECTRONICS ENGINEERING LABORATORY:DIGITAL SIGNAL PROCESSING SUBJECT:DSP To Study the Sampling Theorem using MATLAB

LIST OF EQIPMENTS/ APPARATUS : 1. MATLAB 2. 3. signal processing toolbox System with P4 and 1GB RAM etc.

DISCRIPTION,CIRCUIT DIA, PROCEDURE


Sampling theorem According to sampling theorem, an analog signal can be exactly reconstructed from its samples if the sampling rate is at least twice the highest frequency component present in the signal. This means, if the signal contains the highest frequency component of 1 KHz, the sampling rate must be at least 2 Kilo Samples/ Second. This sampling rate is also known as Nyquist rate. What if sampling theorem is not satisfied..? violation of sampling theorem means, sampling the signal at a sample rate less than Nyquist rate. This leads to unacceptable distortion in the signal. this distortion is known as aliasing. Due to aliasing, the components present in the input signal whose frequency is higher Nyquist frequency will be sampled as a signal of lower frequency. And this aliased samples in turn corrupts the original signal which is lower than Nyquist frequency. Due to the presence of aliasing, a signal that contains frequency components higher than Nyquist frequency can not be reconstructed from it's samples. The effect of aliasing is shown in the figure below. The signal shown in black color is the original signal. While the signal shown in violate color is the aliased signal because of improper sampling. From the figure it is obvious that the aliased signal will be present in the sampled data as a lower frequency signal. And this will affect the original content at that frequency.

LAB INCHARGE

HEAD OF DEPARTMENT :

It should be noted that the information in between two consecutive samples is lost forever. But still the entire signal can be reconstructed from the samples as long as Sampling theorem is satisfied. Sampling and quantization Sampling can be viewed theoretically as multiplying the original signal with a train of pulses with unit amplitude. This leaves the original signal with information at descrete points with magnitude of signal present in the original signal at that position. This is illustrated in the figure below.

After processing the samples has to be converted back to analog voltage. This is done by using a device known as DAC (Digital to Analog Converter). DAC does exactly opposite to what ADC has done. The DAC takes digital data as input and produces corresponding analog voltage. DACs are less expensive compared to ADCs. Taking all these in account, we can now come to the idea of physical realization of a Digital Signal Processing system. As we know, in a DSP system, the signal has to be first converted in to digital format, process it and then convert back to analog format. All theses things can be achieved by using a system shown below.

PROCEDURE: 1. Double click on MATLAB icon on the desktop. 2. Click on File > New > M-File. 3. Type the program in the M-File Editor. 4. Save the file with a relavant name. 5. Run the program by clicking on the Run Icon in the toolbar and observe the output.
LAB INCHARGE HEAD OF DEPARTMENT :

. SOFTWARE PROGRAM: (AS PER THE REQUIREMENT OF THE EXPERIMENT & IT SHOULD BE COMPUTER PRINT) 1) % generation of discrete time signals h = [1; zeros(99,1)]; xlabel('n'); ylabel('h(n)'); title('generation of impulse discrete time signals'); stem(h) 2) % generation of discrete time signals t = (0:0.001:1); r = t; xlabel('n'); ylabel('r(n)'); title('generation of ramp discrete time signals'); stem(r) 3) % generation of discrete time signals u = ones(100,1); xlabel('n'); ylabel('u(n)'); title('generation of unit step discrete time signals'); stem(u)

OBSERVATION TABLE: (AS PER THE REQUIREMENT OF THE EXPERIMENT)

CALCULATIONS (AS PER THE REQUIREMENT OF THE EXPERIMENT)

RESULT, GRAPH:

CONCLUTION: By using MATLAB DTS are generated and studied.

LAB INCHARGE

HEAD OF DEPARTMENT :

2
EXPERIMENT

LAB INCHARGE

HEAD OF DEPARTMENT :

GRADE : TEACHER

SIGNATURE OF THE SUBJECT

*WILL BE PREPARED FOR EACH EXPERIMENT SUBJECTWISE. *THIS WILL BE A GUIDELINE TO THE STUDENT TO CONDUCT PRACTICAL. HE WILL HAVE TO DRAW CIRCUIT ( IF REQUIRED), WRIT PROCEDURE, TAKE THE OBSERVATIONS, DO CALCULATIONS AND OBTAIN RESULTS,GRAPHS ETC. ON THE JAURNAL PAPERS IN THIS FORMAT.

LAB INCHARGE

HEAD OF DEPARTMENT :

Common questions

Powered by AI

To generate a ramp discrete time signal using MATLAB, you define the time variable t in appropriate increments, then assign the ramp signal r to be equal to t. Finally, use the 'stem' function to visualize the ramp signal with appropriate axis labels and a title .

In a DSP system, an analog signal is first converted to a digital format using an Analog to Digital Converter (ADC). The digital signal is then processed computationally. Afterwards, a Digital to Analog Converter (DAC) is used to convert the processed digital signal back into an analog format. This conversion process is necessary because digital processing allows for precise and flexible manipulation of the signal .

Sampling in digital signal processing is theoretically modeled as multiplying the analog signal by a series of unit impulses. This process captures the signal's amplitude at discrete time intervals, effectively creating a discrete representation of the continuous signal, facilitating digital processing and analysis .

The Nyquist frequency is half the sampling rate of a discrete signal processing system, which corresponds to the highest frequency that can be accurately represented. It is significant because it defines the threshold above which aliasing occurs if the sampling rate is insufficient .

Aliasing causes higher frequency components of the input signal to be misrepresented as lower frequencies, resulting in distortion. This distortion means the reconstructed signal from the samples will not accurately represent the original analog signal, as information higher than the Nyquist frequency is lost .

A unit step discrete time signal is generated in MATLAB by assigning a matrix of ones to the signal variable and using the 'stem' function to plot the signal with axes labeled accordingly. This signal is important because it serves as a fundamental building block for analyzing and characterizing other digital signals through convolution and system response analysis .

The Nyquist rate is the minimum sampling rate that is twice the highest frequency component present in the analog signal. It is important because if the sampling rate is below this rate, aliasing occurs, leading to signal distortion where higher frequency components are incorrectly sampled as lower frequencies .

Using a sampling rate lower than the Nyquist rate results in aliasing. Aliasing distorts the signal by inaccurately representing higher frequency components as lower ones, leading to an incorrect and irrecoverable representation of the original signal. This prevents accurate reconstruction of the original analog signal from the digital samples .

The lab suggests using MATLAB to generate and study discrete time signals. The procedure involves analyzing sampled data visually and computationally to verify whether sampling was performed at or above the Nyquist rate, thus preventing aliasing effects .

The DAC is responsible for converting digital data back into an analog signal. This conversion is crucial for interfacing digital processing results with real-world analog systems, such as audio equipment or sensors, to produce an analog signal that mirrors the intended output after digital processing .

You might also like