Daqarta
Data AcQuisition And Real-Time Analysis
Scope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
The following is from the Daqarta Help system:

Features:

Oscilloscope

Spectrum Analyzer

Signal Generator
(Absolutely FREE!)

Spectrogram

True RMS Voltmeter

Sound Level Meter

Frequency Counter

Period Counter

Event Counter

Spectral Event Counter

Waveform Averager

Histogram

Post-Stimulus Time
Histogram (PSTH)

Macro System

Multi-Trace Arrays

Trigger Controls

Auto-Calibration

Spectral Peak Track

Direct-to-Disk Recording

Accessibility

Applications:

Frequency response

Distortion measurement

Speech and music

Microphone calibration

Loudspeaker test

Musical instrument tuning

Animal sound

Evoked potentials

Rotating machinery

Vehicle pass-by noise

Product test

Contact us about
your application!

Making Waves via Sine Wave Synthesis

Any waveform can be synthesized from pure sinusoids. You can use the Daqarta Generator to demonstrate the basics of this by generating the fundamental and first few harmonics of square, ramp, or triangle waves.

Toggle the Left output on and the Right off. Set the Left Stream 0 component to be the fundamental frequency... we'll use 100 Hz in this example:

 Stream On
 Wave =  Sine
 Tone Freq = 100
 Modulators all off
 Level = 100.00%
 Offset = 0

Now set Stream 1 to be the 3rd harmonic, with Tone Freq = 300 and Level = 33.33%, which is 1/3 of the fundamental. Stream 2 will be the 5th harmonic with a Level of 20% and and Stream 3 the 7th at 14.29%. As you add each harmonic, you will see the initial sine wave get steeper sides, and the ripples at the peaks get smaller. Notice how each higher harmonic acts to reduce the ripples by providing a complementary wave that fills in dips and rounds off peaks. Although a perfect square wave requires an infinite number of harmonics, it should be clear that if you extended this process you could approximate one to any desired degree of precision.

Notice that the addition of odd harmonics reduces the peak of the fundamental. This leads to the surprising result that a perfect square wave has a fundamental that is 1.27 times the peak amplitude of the square wave itself (+2.07 dB).

One curious fact: Notice the "bat-ears" due to overshoot and ringing on the intended horizontal portions. As you add more harmonics according to the formula, these ears become sharper but the peaks never go below about 9% overshoot with any finite number of harmonics. This is known as "Gibb's Phenomenon", and requires a slight modification to the harmonic levels to taper them to zero instead of truncating the series after some arbitrary harmonic number. This is "windowing" in the frequency domain in order to improve the time domain, and is exactly analogous to the time domain window functions commonly used to reduce leakage "skirts" or "sidelobes" in the frequency domain.

You may wish to experiment with other wave shapes, like ramps or triangles. A ramp is made just like the square wave, only using all integer harmonics, not just the odd ones. So the 2nd harmonic is 1/2 the fundamental, the 3rd is 1/3, and the 4th is 1/4. Set the fundamental level to 50% instead of 100% and scale the other components proportionally, since otherwise the waveform would have peaks exceeding 100%.

This will be a "descending" ramp, with the steep side on the left. An identical ramp shifted 90 degrees relative to this can be made by setting the phase of the odd components to 180 degrees. If you want to see both ramps at the same time for comparison, you can build the other one on the Right output.

To reverse the ramp to an "ascending" version, you can set all the phases to 180 degrees. A shifted ascending ramp results if the odd components are set to 0 degrees and the evens are at 180.

A triangle is made with only odd harmonics, but instead of falling off proportional to the reciprocal of frequency like the square wave, they fall off with the square of the reciprocal. In addition, the phase changes between 0 and 180 degrees with each harmonic used. Again, you will need to start at a reduced level to avoid going over 100%. Try this:

 Stream   Freq   Phase    Level
    0     100      0     50.00
    1     300    180      5.56    (50 / 3^2)
    2     500      0      2.00    (50 / 5^2)
    3     700    180      1.02    (50 / 7^2)

See also Sine Wave Basics, Sine Wave Phase, Magnitude via Vector Sum

GO:

Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
INTERSTELLAR RESEARCH:
Over 25 Years of Innovative Instrumentation
© Copyright 2007 - 2008 by Interstellar Research
All rights reserved