Generate two waveforms-analog waveform, MATLAB Programming

The purpose of this lab is to introduce students to the basic concept of overtones. In order to generate two tones at the same time, you need to generate two waveforms and add them together using the following equation:

W(t) = A0 + A1 sin(2πf1 t + θ1)  +  A2 sin(2πf2 t + θ2)

Where W is the pulse width at time t, f1and f2 are the angular frequencies of the tones, and theta1 and theta2 are the phases.  The amplitudes A0, A1, A2 must be chosen by you so that the pulse width stays positive and is not greater than the sampling period.

PWM can be used to represent any analog waveform. At a uniform time interval the signal can be sampled and translated into a digital form representing its corresponding analog value. The faster the sampling rate, the smoother the reconstructed analog waveform will be. The sampling rate is expected to be much higher than the highest frequency of the sinusoidal waveform that you will produce, in order to generate a smoother waveform. The Nyquist sampling theory states that the sampling frequency should be at least twice the maximum frequency of the signal.

The PWM signal is simply a square wave with a variable duty cycle. The duty cycle of the square wave is proportional to the sampled value of the analog waveform as illustrated in Figure 2 for a sinusoidal analog waveform. Duty cycle is the fraction of time that a PWM signal is active in one sampling period.

 

Posted Date: 3/12/2013 6:20:44 AM | Location : United States







Related Discussions:- Generate two waveforms-analog waveform, Assignment Help, Ask Question on Generate two waveforms-analog waveform, Get Answer, Expert's Help, Generate two waveforms-analog waveform Discussions

Write discussion on Generate two waveforms-analog waveform
Your posts are moderated
Related Questions
Error-Checking user input in the While Loop: In many applications, whenever the user is prompted to enter anything, there is a valid range of values. When the user enters a wr

Implement a MatLab function to calculate y.  The function should take two input arguments 1) A vector of parameters In the above example this would be of length 3, the first

You are a quant analyst reporting directly to a portfolio manager. Your manager requires you to generate a simple code to compute several statistics for the following potential por

Constants: The variables are used to store values which can change, or that are not known ahead of the time. Most of languages also have the capacity to store constants that a

Scripts to Produce and Customize the Simple Plots: The MATLAB has many graphing capabilities. In most cases, customizing plots are desired and this is the simplest to accompli

Show the output - algorithms: Where does the output go? The two possibilities are (i) to an external file, or (ii) to a window on the screen. Based on system, one of these wil


You are given data similar to the examples and sample problems in the statistics topic. Write MATLAB program to do the following: 1. Plot histogram, relative frequency histogram

Input in a for Loop: The script below repeats the process of prompting the user for a number, and echo printing the number (that means simply printing it back out). A for loop