[LogoShip]

Home

Daqarta for DOS Contents

Introduction

Downloads

Free Registration

Contact Us
Daqarta for DOS
Data AcQuisition And Real-Time Analysis
Shareware for Legacy Systems
(Use Daqarta for Windows with modern systems)

From the Daqarta for DOS Help system:
 
DAQARTA - STIM3A
ADVANCED STIMULUS SIGNAL GENERATOR

Modulator Submenus:

Modulation Overview, Page Modulation


AM (Amplitude Modulation):

The AM submenu includes duplicates of the controls in the Freq menu for convenience, plus controls to select the modulator source and modulation depth, as well as to set the frequency and phase of the internal sine source if that is selected.

AM Menu:


AM Mod On/Off:

When this is active, the main Wave for the component page is modulated by the specified Source.


AM Sync:

The Sync control is available whenever AM is active in Dynamic RTime mode, and the AM Source is set to Sine. When you toggle Sync on, it specifies that the trigger sync will be to the Sine modulator instead of the waveform itself. You will thus see a stationary sinusoidal modulation pattern with the wave rolling through it. This control only has an effect when the trigger Source is set to Stim. It has no effect in Intern mode.

There is no "off" toggle: You must select Sync from some other source, either in another modulator or in the main Freq submenu, in any component page of either DAC, or from a DigOut setup page.


AM Source:

The default AM modulator is an internal Sine wave, whose frequency and phase you can control. On the A component page, Sine is the only option. On the B page, you also have the option of selecting page A as the source. Higher pages allow all lower pages, plus all combinations: The D page allows A, B, A+B, C, A+C, B+C, or A+B+C.

When you select one of the other pages as the Source, the Mod Hz and Mod Phase controls are removed from the current page. Instead, you would use the main Freq and Phase on the selected modulator page. The Depth control works normally.


AM Mod Hz:

This sets the modulator frequency when Source is set to Sine. The main Freq Step Mode affects this control as well, but there is no Organ mode.

One unusual use of AM is to produce controllable 2nd-harmonic distortion for testing purposes. If you set the AM Sine modulator frequency to match the main (carrier) Frequency, you can adjust the amount of the 2nd harmonic using the AM Depth control. There will also be a DC term (the difference term, where both frequencies are equal) which you can control by adjusting the relative phases.


AM Depth:

The AM modulation depth can be set from 0 to 200%. STIM3A uses a special scaling scheme for AM. Conventional amplitude modulation would multiply the main wave (carrier) by the sum of one plus the depth-scaled modulator wave:
    sin(carrier) × [1 + Depth × sin(modulator)]
Under that scheme, 0% Depth gives the unmodulated carrier, but 100% Depth gives a modulated wave with peaks twice as large as the unmodulated carrier. That would require that the carrier be readjusted to prevent overdriving the output.

Instead, STIM3A uses a slightly different scheme that gives identical waveforms, but automatically takes care of scaling to insure that the modulated wave exactly fills the available range:

    sin(carrier) × [1 - Depth/2 + Depth/2 × sin(modulator)]
200% Depth is sometimes called "Ring Modulation" by those familiar with old analog music synthesis, named after an early circuit that used 4 diodes connected head-to-tail in a (square) ring to perform multiplication. The above scheme reduces to simple multiplication of the two sine waves in this case.

It is very instructive to view the spectrum of an AM sine wave while you adjust depth and modulation frequency. With Depth set to 0, you see a single line in the spectrum at the main Freq value. (Use the FFT Window function to get rid of distracting spectral leakage skirts, or better yet use the StepN option to set the main Freq to land exactly on a spectral line.)

As you start to raise Depth, you will notice two flanking lines around the main one, each at a distance equal to the modulator frequency. They will rise as Depth increases until at 100% they are half the magnitude of the main line. Keep going, and they keep rising; somewhere around 133% all three components will be the same size, but above that the main carrier becomes smaller than the sidebands, until finally at 200% only the sidebands remain... no carrier at all! This is exactly as predicted by the sine multiplication formula from high school trigonometry:

    sin(A) × sin(B) = 1/2 × cos(A-B) - 1/2 × cos(A+B)
All you have are sum and difference frequencies in the product; neither of the original frequencies are present. Note that this is not limited to sine wave modulators; whatever the modulator spectrum, it will be mirrored about the carrier frequency. (Essentially, you apply the above formula to each modulator component separately.)

This is a powerful tool. If you use a low-pass noise for the modulator, you will get a band of noise twice that width centered about the carrier. You can then apply FM or a frequency sweep to the carrier, and it becomes FM or swept noise.


AM Mod Phase:

Controls the phase of the Sine modulator, independent of the main wave (carrier) Phase. This is particularly useful if you have set AM Sync, and want to adjust the trigger point relative to the modulator cycle.

If you set the modulator frequency to match the main frequency, the result is a wave at the main frequency but with strong 2nd harmonic distortion, plus a DC component. Changing the modulator phase allows you to change that DC component.


FM (Frequency Modulation):

As for AM, the FM submenu includes duplicates of the main Freq menu controls, as well as modulator controls.

Unlike AM and Burst, FM is not an available option for noise-type waves, or for Arb or Play waves where the Step Timing option has been selected.

FM Menu:


FM Mod On/Off:

When this is active, the main Wave for the component page is modulated by the specified Source.


FM Sync:

The Sync control is available whenever FM is active in Dynamic RTime mode, and the FM Source is set to Sine. This control only has an effect when the trigger Source is set to Stim. It has no effect in Intern mode.

When you toggle Sync on, it specifies that the trigger sync will be to the Sine modulator instead of the waveform itself. You will thus see a stationary sinusoidal modulation pattern on the main wave. Typically, an FM waveform looks like a spring being stretched and compressed; when you sync to the modulator you see a stationary spring with compressed and stretched portions.

There is no "off" toggle: You must select Sync from some other source, either in another modulator or in the main Freq submenu, in any component page of either DAC, or from a DigOut setup page.


FM Source:

The default FM modulator is an internal Sine wave, whose frequency and phase you can control. On the A component page, Sine is the only option. On the B page, you also have the option of selecting page A as the source. Higher pages allow all lower pages, plus all combinations: The D page allows A, B, A+B, C, A+C, B+C, or A+B+C.

When you select one of the other pages as the Source, the Mod Hz and Mod Phase controls are removed from the current page. Instead, you would use the main Freq and Phase on the selected modulator page. The Deviation/Depth control works normally.


FM Mod Hz:

This sets the modulator frequency when Source is set to Sine. The main Freq Step Mode affects this control as well, but there is no Organ mode.

FM was a popular technique for synthesizing musical instrument tones, prior to the dominance of wavetable methods. It was particularly noteworthy for being the first reasonable method for creating decent brass-like sounds, and was used in many professional keyboard synthesizers. In recent years the technique has been unfairly maligned by association with the simplified one-chip synthesizer used in inexpensive sound cards. Among musicians using professional equipment to create new sounds (as opposed to simply using the preset sounds or "patches" that came built into the intrument), there was the additional criticism that the technique was hard to control and non-intuitive. Nevertheless, there is still room for exploration.

FM synthesis typically uses modulation frequencies that are at particular ratios relative to the main wave frequency. If you want to experiment with this, try starting with the main wave at 440 Hz and the modulator at some particular ratio like 2:1 (880 Hz), or 3:2 (660 Hz), or 1:2 (220 Hz). Adjust the FM deviation to be around +/-400 Hz as well. Now to quickly screen a number of different main/modulator ratios for a fixed deviation, use the main frequency in Organ mode. Each key you press will give a different ratio as well as a different main frequency, and you will notice that not only does the pitch change but the timbre or tone color changes as well... sometimes quite dramatically. Make a note of the ratio when you find an interesting sound, and use it as a basis for further explorations with different deviations.

In FM synthesizers, the modulator is often a wave other than a simple sine, so you may also want to try Page Modulation to explore more exotic modulators.


FM Deviation/Depth:

This control is normally configured for frequency deviation in Hz. This is the maximum frequency difference, positive or negative, from the initial main wave frequency when the modulator is at its positive or negative peak.

STIM3A allows continuous through-zero modulation, so you can set the deviation higher than the main Frequency. When the output frequency moves through zero, the effect is to "reflect" off of zero by reversing polarity and direction of sweep.

When used with Play Waves, which use Rate factor instead of main frequency, this control changes to Depth in percent of the Rate factor. In this case the Depth will be limited to prevent the overall rate from going negative (playing backwards).


FM Mod Phase:

Controls the phase of the Sine modulator, independent of the main wave (carrier) Phase. This is particularly useful if you have set FM Sync, and want to adjust the trigger point relative to the modulator cycle.


Phase / Slope / Width Modulation:

As a convenience, this submenu includes duplicates of the main Freq menu controls, as well as modulator controls.

This is actually a multi-purpose submenu, which changes to fit the Wave type and certain Wave settings. The Ramp Wave submenu allows you to select normal Phase modulation or Slope modulation, and Pulse Wave allows Phase or Width modulation.

This is not an available option for noise-type waves, or for Arb or Play waves where the Step Timing option has been selected.

Phase / Slope / Width Menu:


Phase Mod On/Off:

When this is active, the main Wave for the component page is modulated by the specified Source.


PM Sync:

The Sync control is available whenever this modulator is active in Dynamic RTime mode, and the Source is set to Sine. This control only has an effect when the trigger Source is set to Stim. It has no effect in Intern mode.

When you toggle Sync on, it specifies that the trigger sync will be to the Sine modulator instead of the waveform itself.

With Sync set here, the waveform will appear stationary on the trace; otherwise, if you sync to the main wave, the trace will roll continuously.

There is no "off" toggle: You must select Sync from some other source, either in another modulator or in the main Freq submenu, in any component page of either DAC, or from a DigOut setup page.


PM Source:

The default modulator is an internal Sine wave, whose frequency and phase you can control. On the A component page, Sine is the only option. On the B page, you also have the option of selecting page A as the source. Higher pages allow all lower pages, plus all combinations: The D page allows A, B, A+B, C, A+C, B+C, or A+B+C.

When you select one of the other pages as the Source, the Mod Hz and Mod Phase controls are removed from the current page. Instead, you would use the main Freq and Phase on the selected modulator page. The Depth control works normally.

One not-so-obvious use for phase modulation is in conjunction with an Arb file. For example, the EXPNOTE.DAT file holds, instead of the usual wavetable, several separate tables of values representing various musical note frequencies: The set of all notes on a piano keyboard, the set of just the white keys, just the black keys, etc. The tables are simply arranged one after in the file, but Arb treats the file as a single circular list; every table thus represents some range of phases around this circle.

If you want to cycle through just one set of these values, or randomly select values from just one set, what you really need is to select values over that particular range of phases. That's a job for phase modulation. You first set the main Frequency to zero, so the output will stay stationary at one particular value. Then set the main Phase to select the desired range. If you now modulate that phase, the output will change under modulator control.

If you use a noise page as the modulator, you will get random values from within the selected range. Adjusting the Level of noise and the Depth of the phase modulation will control the extent of the selected values within the range. You can set the Arb wave to Round to the nearest table value if you want to avoid interpolated values. That approach is used in the COMPOSER.S3A setup to select only discrete values from the 'black keys' set; if you use Interp you will get non-musical notes, as though playing a keyboard "in the cracks".

This same approach can be used to set up various test schedules, for example, which use random selection from within a predetermined set of values.


PM Mod Hz:

This sets the modulator frequency when Source is set to Sine. The main Freq Step Mode affects this control as well, but there is no Organ mode.


PM Depth:

This control works differently depending on the modulation type.

With Phase modulation, Depth is the percentage of a cycle traversed by the modulator in each direction. For example, with 50% Depth, the main waveform will slide forward by a half cycle (to +180 degrees) and backward by a half cycle (to -180 degrees). At 100% Depth, it will move a full cycle in each direction.

With Slope modulation of a Ramp wave, Depth is the TOTAL slope covered by both positive and negative swings of the modulator. For example, if you set Ramp Rise to 50% and this Slope Depth to 100%, then the modulator will cover the entire range from an equivalent of 0% Rise to 100%.

Note that if you set Depth too large for the Ramp Rise, you can break over into a reversed ramp as the Rise goes below 0 or over 100%. For example, with 25% Rise, you would hit this if you set Depth above 50% (ie, +/- 25%) because you would then go below 0 on the negative modulator peaks.

Similarly, with Pulse Width modulation, Depth is again the total width coverered by the modulator. So if you set Pulse A Width to 50% and Pulse B to zero, you will start with a square wave. 100% Depth would then take it from fully off (0% A Width) to fully on (100% A Width) over the course of the modulator cycle. Likewise, you must not set Depth too large for the base pulse widths or the pulse will vanish if the overall width goes to 0, or stay high if it goes to 100%.


PM Mod Phase:

Controls the phase of the Sine modulator, independent of the main wave (carrier) Phase. This is particularly useful if you have set PM Sync, and want to adjust the trigger point relative to the modulator cycle.


Frequency Sweep:

The Sweep menu is different from the AM, FM, and Phase Modulation menus. Like them, it has duplicates of the main Freq menu controls, although main Freq is here called Start. And like the FM and Phase menus, it is also not available for noise-type waves, or Arb/Play in Step Timing mode. But it does not allow selection of any modulator source other than its own Linear / Exponential / Step sweep generator.

Sweep Menu:


Sweep On/Off:

When this is active, the main Wave frequency for the component page is swept from Sweep Start to Sweep End over the interval given by Sweep Duration.


Sweep Sync:

The Sync control is available whenever Sweep is active in Dynamic RTime mode. This control only has an effect when the trigger Source is set to Stim. It has no effect in Intern mode.

When you toggle Sync on, it specifies that the trigger sync will be to the start of a sweep instead of the zero-crossing of the main waveform.

If the main wave Reset on Sweep control is active, this will result in a stable trace if you are monitoring the signal output. In that case, the main wave phase is forced to the Phase setting at the start of each sweep. Otherwise, each sweep will start with the wave at whatever phase ended the prior sweep; the trace will appear to roll, even though the trigger point is indeed at the start of the sweep. If you look carefully, especially on a sweep that covers a large frequency range, you can see that the trace appears more "open" on one end and more "compressed" on the other.

There is no "off" toggle: You must select Sync from some other source, either in another modulator or in the main Freq submenu, in any component page of either DAC, or from a DigOut setup page.


Sweep Start:

This is actually just a copy of the main wave Freq control. In addition to all its usual features, and use of the Fstep Mode control below it, note that the direction of the sweep (up or down) is controlled by the Start-to-End order: If Start is lower than End, the sweep moves upward. Reverse the order to reverse the direction.


Sweep End:

Sets the sweep ending frequency. This control behaves just like the Start control in its use of the Fstep Mode control, with the exception that there is no Organ mode. As noted above, if End is lower than Start the sweep direction will proceed downward.


Sweep Duration:

Sets the duration of the sweep in either samples or seconds, depending on the Smpls / Sec units setting below. In Dynamic RTime mode the only limit on sweep duration is the 32-bit size of the duration variable: Over 4 billion samples, or roughly 24 hours at 48000 samples per second.


Sweep Units (Smpls / Sec):

This is a global control. In the Sweep menu it allows easy entry of the above Sweep Duration in whichever format you find most convenient.


Sweep Lin/Exp/Step:

Toggling this control changes the shape of the sweep, or the nature of sweep operation. When set to Lin, the total distance of the sweep is simply divided by the duration to give a fixed number of Hz per second (or per sample).

In Exp mode, the frequency at each sample time is the value of the prior frequency, times a constant. Thus, the higher the frequency, the faster the motion. This gives a fixed number of octaves per second, rather than Hz per second.

This is useful for testing many real-world systems which exhibit an exponential response; it is necessary to move the driving frequency more slowly at lower frequencies to capture response details with the same resolution as a faster sweep at higher frequencies.

In Step mode, the basic Sweep operation is changed. Instead of smoothly sweeping from Sweep Start to Sweep End during an interval set by Sweep Duration, the frequency moves in steps of size set by the Sweep Step control. At each step, the frequency stays constant for Sweep Duration, then moves to the next step. The total duration is thus Sweep Duration times the number of steps required to move from Sweep Start to Sweep End.


Sweep Step Size:

When the above Lin/Exp/Step control is toggled to Step mode, this control sets the size of each frequency step. Use this just like the Sweep Start, End, or other frequency controls, which adhere to the current frequency adjust step mode (not to be confused with this Sweep Step!). As we'll see below, you will usually want to use StepN, with the step size set to one spectral line. To do this, go to the Misc menu and be sure that StepN is active and equal to 1.00 (assuming you are using N=1024), then return here and set this Sweep Step Size to the minimum non-zero value.

An important application of Sweep Step mode is measuring an "ideal" frequency response. To understand why this is needed, consider what happens with a conventional continuous sweep. The normal approach is to set up Start and End to cover the response region, set the Duration fairly long, and use Spectral Averaging in Peak mode. By setting the averager Sweeps request to Continuous (by entering 0 or 1), the trace will hold the peak value of each FFT. Over the course of the sweep, the peak will move through the entire frequency range, and the trace will show the complete frequency response.

Or will it? The problem is that unless the FFT sees an exact integer number of cycles of an input frequency, it will show the spectrum of any fractional cycle as leakage from the the main peak into adjacent sidelobe or "skirt" regions. This reduces the peak value, with the biggest reduction coming from an extra half-cycle, and smaller reductions for smaller or larger (closer to the next full cycle) fractions.

Since the instantaneous frequency is constantly changing, each FFT sees a constantly-changing fractional cycle as well, with the result that the peak bounces around between the true value and something less, giving a ragged-looking response. Additional sweeps may result in "filling in" some of the dips, but in general this is unsatisfactory.

The customary way to deal with this leakage problem is to use a window function with the FFT. Most window functions are designed to give a narrow peak with low sidelobes, but those windows still give a sizeable peak error for the "wrong" input frequencies. The Flat-Top window has a wider peak and higher sidelobes, but gives a fairly flat frequency response when used for this purpose.

However, we can do better. Using Sweep Step mode with the frequency Step Size set to use unity StepN steps, the response can be made to proceed through the selected frequencies one spectral line at a time. The response will be absolutely correct, and only requires a single pass.

To use Sweep Step this way, you need to make sure that each frequency step lasts long enough for Daqarta to acquire and process a full N-sample spectrum. (Note that if you are using the response to create a calibration file, you must use 1024 samples.) Although it is possible to use Dynamic Sequential mode for this purpose, where the output stops and waits for processing after each step, that's not generally the best approach. The reason is that the starts and stops cause unwanted transients that could contaminate the response; you might get around this using Burst mode with a slow Rise and matching Trigger Delay, but it would be cumbersome.

Instead, use Dynamic RTime mode so output is continuous. Set the step Duration to somewhat longer than 1024 samples; how much longer depends upon the speed of your system, but 1500 samples should be enough for even 486-class systems. Run a few trials with the Peak Average to see that you get a continuous spectrum. Missing lines indicate that the system is not fast enough for the step duration.

After you get the complete response, just hit Pause whenever you want to save it. (You can save it as a Daqarta data file with OutDt, a text file with OutTx, a bit-map with OutSc, a Memory trace with MemSv, or as a calibration file.)

Note that you can greatly speed up the display portion of processing by using Line display mode (Line1) instead of the standard Bar mode (Line2). In Bar mode you might see a nice continuous response at first, and then after a certain time you will start to see missing lines. That happens as the filled-in area gets larger and the display requires more time to redraw after each FFT. (The whole display is redrawn, not just the new bar.) Toggling to Line1 can avoid this, without the need for longer sweep steps.

If the response is to go right down to DC (0 Hertz), there are additional considerations. You will of course need to set the Start frequency to 0, but that simply means that the output is a constant voltage for the duration of the first step; it does not specify what that voltage will be. For a sine wave, the instantaneous output voltage is determined by instantaneous phase, which at 0 Hertz is a constant value. So if you set Phase to 90 degrees, the DC output level will be the same as the peak of the sine wave. This is normally what you would set for a frequency response, though you might have occasion to set 45 degrees. That gives 0.707 of the peak, which is the RMS equivalent... it will produce the same heat in a resistive element, for example.

But setting the desired Phase is not quite enough, since this only specifies the STARTING phase of the entire stimulus run, which may be more than one repetition of the stepped sweep series... especially since you will probably want to keep repeating the sweep while you make adjustments, etc. You will thus need to activate the Reset on Sweep option in the Freq menu, so that the phase is reset to the specified value at the start of each sweep. Otherwise, each sweep will start with the same phase as the end of the prior sweep, and the starting phase would thus typically change on each sweep.

GO:

Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
INTERSTELLAR RESEARCH:
25 Years of Innovative Instrumentation
© Copyright 1999 - 2006 by Interstellar Research