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
How to Start Working withSimpower: 1. In the Simulink screen, open a new "Model" (File àNewà Model), name it and save it. 2. Expand the SimPowerSystems library, select and

Random numbers: Whenever a program is being written to work with a data, and the data is not yet available, it is frequently useful to test the program first by initializing t

Solve the optimality condition for each P equation against M according to the following relation: Condition for Optimality:         ∇ M = λ ∇ P      with respect to C and T.

Example of Variables and assignment statements: The expression is computed and then that value is stored in the variable. For illustration, this is the way it would appear in

clear clc %% DATA INPUT filename = input('Enter file name, including its extension: ', 's'); D = load(filename); %or load('Mphi.out'); %% %Trendline %Evaluates

Printing Vectors and Matrices: For vector, if the conversion character and newline character are in the format string, it will print in a column in spite of of whether the vec

The natural frequencies of a fixed-fixed uniform shaft made of homogeneous material undergoing longitudinal vibration is given by rad/s, where L is the length of the bar, G is th

how do I make a second main function?


Linspace function: Likewise, the linspace function generates a linearly spaced vector; linspace(x,y,n) generates a vector with n values in the inclusive range from x to y. For