Daqarta for DOS Contents
ADVANCED STIMULUS SIGNAL GENERATOR
In Static modes the entire stimulus sequence must fit into the available buffer, so the length of the overall burst is limited. In Dynamic Sequential mode that's only true in ALL Page Mode; in PAIR mode each pair of pages can take up the whole buffer, and in EACH mode each individual page can, so the length limits are increased.
In Dynamic RTime mode there are no memory constraints. A burst can be as long as desired, subject only to the size limits of the 32-bit value storage format... about 4 billion samples, or roughly 24 hours at 48000 samples per second.
Note that you can only get a truly continuous output in RTime mode; in Sequential mode the output stops for data processing between N-sample acquisition passes.
Also, in Static RTime mode, the output is generated by looping through a fixed (static) buffer. To get a continuous waveform you must insure that the buffer contains an exact integer number of cycles of the wave. This is easily achieved by setting the frequency using the StepN adjust mode. You will be limited in frequency resolution by the StepN step size, which is in turn limited by the available buffer size.
Only in Dynamic RTime mode is continuous output completely automatic and independent of buffer size. You can set any frequency you wish, using any frequency adjust mode, down to the system resolution of about 0.0001 Hz.
Burst is active in Dynamic RTime mode. When the trigger Source is set to Stim (not Intern), it allows you to set the trace to sync on the start of the burst interval. This will almost always be what you want to do when Burst is active.
The sync point is the start of the overall burst interval, which includes the Start delay. Start can thus be used to delay the burst relative to the start of the trace.
Note that the waveform in the burst region will not appear stationary unless you have Reset on Burst active in the main Freq menu. That forces each burst to start at the Phase setting; otherwise, the burst just starts at whatever phase the main wave had at the end of the prior burst interval. In that case the burst position will be stationary, but the wave will appear to be rolling through it.
Burst menu and the other menus that have copies of this control (Timing and Play).
This allows you to work in whichever format you find most relevant for your application. You can toggle back and forth as needed to see the equivalent samples or time.
Rise and Fall portions of the burst. It sets the exponent of a cosine-power function used to create the shape, from cos^1 to cos^16, plus a special linear mode when you set cos^0. Although Rise and Fall must use the same Shape exponent, they may use different widths to obtain, for example, a fast attack and slow decay. Each component page allows its own independent Shape setting.
Although cos^n is the standard notation, the tone is actually multiplied by
(0.5 - 0.5 × cos(theta))^nwhere theta goes from 0 to 180 degrees on the rising portion of the burst, and from 180 to 0 on the falling portion. The exponent is thus applied after an ordinary cosine is shifted and scaled to the 0 to 1.0 range, rather than the normal -1.0 to +1.0 range. (Otherwise, odd exponents would flip the polarity of the result.)
The cosine of 0° is 1.0, so at the start of the rise the above formula becomes 0.5 - 0.5 or 0, no matter what the exponent. Similarly, the cosine of 180° is -1, so at the top of the rise the above formula becomes 1.0, again independent of exponent. The tone thus always rises smoothly from 0 to 100% of the Level value, but the selection of the exponent controls the steepness of this shape.
The Rise and Fall durations also control the steepness of this shape by setting the width of the rise/fall areas. Many investigators standardize on one exponent like the cos^2 default used here, and specify only rise/fall durations.
If you set cos^0, no cosine function is used. Instead, the rise and fall are simply linear ramps from 0 to 100%, over the specified Rise or Fall duration.
To see the effect of Shape and the interaction with rise/fall durations, perform the rise/fall experiment with different Shape exponents.
The Shape used here is really a "window function" applied to the stimulus tone, similar to the functions applied to acquired data with the Windo option. The purpose of each is the same: to reduce the "spectral splatter" that would be introduced by a sudden onset or offset of a signal, either a signal being generated (as here) or one being analyzed, whose "onset" and "offset" are artifacts of a finite number of analysis samples.
To compare the cosine-power Shape window to the standard Windo option analysis functions, set the Rise and Fall durations to half the total number of samples N, and set Start and Duration to zero samples. In this condition, the cos^1 Shape is identical to a Hanning window applied to the same wave having Rise and Fall durations set to zero and Duration set to N samples. Verify this for yourself by observing the spectra of these two conditions.
Since applying a window to a continuous wave reduces the signal energy seen by a subsequent FFT, Daqarta automatically applies the appropriate correction factor to the spectrum when the Windo option is active. In the case of the Hanning window, this is a factor of exactly two. (Note that this correction is different from the optional bandwidth correction used for broadband signals.) Thus, if you are comparing the spectrum of a windowed continuous wave to a shaped tone burst, you might want to cut the amplitude of the continuous wave in half for a direct comparison.
You can facilitate comparisons by recording each response in trace Memory, so you can flip quickly back and forth. An even better comparison can be made by using a Memory Array of traces, but for this purpose you will need to save spectral averages, not instantaneous spectra. That's because Daqarta always saves unaveraged traces, including spectra, as WAVEFORMS with no windowing, to allow you to later flip back and forth between waveform and spectrum views, and apply any window you wish. Spectral averages, however, are saved with the windowing included... even if the "average" is of just a single trace or N-sample acquisition pass.
Sync point at the start of the trace. For example, you may want to generate two or more tone bursts during one stimulus interval. If you want the second burst to start 10 msec after the first, simply set the second Start time to 10 msec (or the equivalent number of samples, if you prefer, depending on the Smpls / Secs state). This is the case whether the delay is between bursts on the same DAC channel or between DACs.
Similarly, you could delay a burst to take place after a train of digital output pulses (if you have a lab-type board that supports DigOut).
time or number of samples the burst waveform will take to rise from completely off to completely on. The shape of the rise is typically that of a cosine-power function, whose exponent is controlled by the Shape option. However, you may set the exponent to 0 to get a linear shape.
By making the rise longer, or the exponent smaller (not including 0 for linear), you reduce the amount of "spectral splatter" or audible click associated with the onset of the tone. In a detection experiment, the click might be audible where the tone itself is not, giving a misleading result.
But if you are determining the subject's detection threshold by recording neural responses, you must also take care not to make the rise too LONG, either, as explained in the Rise/Fall Practical Example for auditory evoked responses.
EXPERIMENT: RISE/FALL vs. SPECTRAL WIDTH
To see the effects of the rise (and fall) time on the width of the spectrum, look at the stimulus itself by connecting a DAC output to the acquisition input. (Alternatively, you may use the dummy board driver DEMO.ADC in place of a real board driver in your DQA.CFG file. When the stimulus generator DAC 0 is active, this driver just passes the stimulus through to DEMO Ch 0 as though it were acquired data.)
Set Start to zero and Duration to about 128 samples. With a sample rate of 20 kHz, set Freq to 2000. Set Rise and Fall to 128 samples each. In Sequential mode, you should see a single tone burst which takes up the first 384 samples of the waveform trace. Flip to the power spectrum display with the F-key and Y-key. Note the width of the spectrum spread on either side of 2000 Hz as you cut Rise and Fall in half to 64 samples each. Keep cutting these in half and watch the spectrum widen further. Check out the effects of different Shapes.
RISE/FALL PRACTICAL EXAMPLE - Auditory Evoked Responses:
For auditory evoked responses, a rise time of about 1 msec is commonly used. If you use a shorter rise time, the subject will appear to be more sensitive because the wider spectrum stimulates the firing of more neurons from adjacent frequency regions. This gives less information about the true sensitivity at the frequency of the tone.
As you lengthen the rise time, however, the response gets progressively smaller. This is because an evoked response is the summation of many neurons firing at once. Since the individual firing rates and threshold sensitivities of these neurons are not all alike, to get them to fire at the same time you must give a stimulus that quickly goes from below all neuron thresholds to above many neuron thresholds.
Each neuron will thus start its pulse train at the same time, so all the initial pulses will be superimposed to form the evoked response peak. But subsequent neural pulses will not be in synchrony, so the response rapidly falls. With a slow rise time, the different neural thresholds are reached at differing times, so the number of pulses superimposing to form the evoked response is reduced.
time or number of samples during which the burst waveform will remain at its maximum Level.
time or number of samples the burst waveform will take to fall from completely on to completely off. It is the reverse of the Rise portion and uses the same Shape, though not necessarily the same width. You will probably want Rise and Fall to be equal for most experiments, but they need not be. For example, you may wish to simulate a natural transient with a fast attack and slow decay.
RTime modes; for Sequential modes the Trigger Cycle may be a better choice of controls because it compensates for varying processing times between traces.
Dynamic RTime mode. In other modes, it shows only '-NA-' unless the component page is active and the DAC is active (although the Master control may be Off).
In most modes, the length of the longest component page (burst) sets the overall length, and other pages that are presented simultaneously via ALL or PAIR Page Mode will be padded with nulls to bring them up to the same total.
In Static modes, all pages must be the same length regardless of Page Mode, and the total length must fit into the stimulus buffer. In Dynamic Sequential mode, all pages must still be the same length, but any single page can take up the entire buffer; the buffer is updated between presentations as needed.
In Dynamic RTime mode, the effective buffer length is unlimited. There is no need to make the parallel pages in ALL Page Mode operate synchronously with each other; each page can have an independent burst rate (or be continuous), and there is no length limit imposed by memory size. The Pad display does not appear here.
Similarly, there are no limits placed on Dynamic RTime EACH mode; each page may have a different length. (In fact, ALL mode can be made to emulate EACH via careful choice of Start and Dwell times.) The Pad display does not appear here, either.
In Dynamic RTime PAIR mode, however, it is necessary that both pages that are paired be the same length, though the A+B pair may be a different length than the C+D pair, and again there are no memory-imposed limits. The Pad display is thus used to show the padding relative to the longer page of each pair.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
25 Years of Innovative Instrumentation
© Copyright 1999 - 2006 by Interstellar Research