X 53 Y 23 Z 29 This question is about Fourier synthesis o

X = 53

Y = 23

Z = 29

This question is about Fourier synthesis of a half wave rectified sin wave v(t). The Fourier series for this waveform contains both sine and cosine terms as shown below: In this equation A is the peak value. You should use your value of Y to determine this (measured in Volts). Only the fundamental sine harmonic should be included whereas only even numbered cosine harmonics are needed. The fundamental frequency a) 0 should be chosen such that the period T matches your value of Z (measured in units of milliseconds). Your values of X, Y and Z will depend on your student number as shown on the first page in this and later questions. Complete the following two steps. Submit neat and functional source code that could be used to synthesize any periodic waveform. It should have an internal variable labeled aO and two vectors containing lists of the a_n and b_n values that you have initialized with the correct values to synthesize the function in equation (1). You should initialize the vectors using a loop in your code other than the one that performs the synthesis. This code must be your own work. Sort your three values x y and z into ascending order (smallest first). Provide three overplayed plots showing sums of X, Y and Z harmonic terms.

Solution

In Fourier Synthesis, a partial is generally described by its frequency, its amplitude and optionally its phase offset. Because a partial is an integer multiple of a fundamental frequency and given the fact that wavetables usually store waveforms with a period of exactly 1 Hertz, the frequency is directly related to the number of the partial, so that\'s all we need.

Now that we know what information we need about each partial, we can create such a struct:


Each partial has a number, which stays constant, an amplitude that we might want to change and also a variable phase offset, in radians, which we\'ll usually just set to 0 (no offset).

If you recall from my introductory post on complex waveforms and also from my last post on Fourier synthesis, every waveform has a distinct \"algorithm\" which determines how we get from a bunch of sine waves to, say, a square wave.

Speaking of square waves, they are formed by adding all odd partials (the 1st, 3rd, 5th etc.). To avoid amplitude overflow, we must also set each partial\'s amplitude to the inverse of their respective partial number, so the 3rd partial has 1/3rd the maximum amplitude of the fundamental sine wave for example. Usually the fundamental sine wave has an amplitude of 1, so the amplitude of the partials is literally just the inverse of their partial number.

We can therefore have a vector of Partials for any waveform we want, by just changing the settings of the partials. For a square wave with 64 partials:


Simple! We construct the first 64 odd-numbered partials with their number and their amplitude.

A saw wave would be:


For a ramp wave, change the amplitude\'s sign in the above code (-1.0/i).

And a triangle wave (odd partials, alternating sign for the amplitude):


Now that we have these vectors for our waveforms, here is the function that creates a wavetable for them:

X = 53 Y = 23 Z = 29 This question is about Fourier synthesis of a half wave rectified sin wave v(t). The Fourier series for this waveform contains both sine an

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site