Home Daqarta for DOS Contents Introduction Downloads Free Registration Contact Us 
 
ADVANCED STIMULUS SIGNAL GENERATOR
Noise Waves:Noise Waves use random number genertors to create data. There is a separate generator for each component page, 8 in all. The generators used in STIM3A are technically "pseudorandom": They create what appear to be totally random values, but the exact sequence of values eventually repeats. However, since the repeat length is very long, there is no feasible way to tell that they are not totally random. How long is "very long"? The complete cycle is 9.22 × 10^18 samples, so if you create one value per output sample (say, with the White noise source), and the output sample rate is 48000 samples per second, then the sequence will take over 6 MILLION YEARS to repeat.Since Noise Waves don't have any specific frequency like the regular repeating waves do, the main Freq menu is replaced with the Timing menu. This allows options like Step (to hold each value for a selected number of samples), or Slow (to create an arbitrarily slowed version by interpolation). You can also add Smoothing, or Quantize the output to a reduced number of levels. By the same token, since there is no repeating pattern in the random output, there is no particular sync interval upon which to trigger a trace. Instead, in Dynamic RTime mode the sync period is controlled by the Step factor in the Timing menu. This is the case regardless of whether the current Timing mode set to Spec, Slow, or Step. (In other modes the repeat interval is determined by the active buffer size, which is related to Burst length or StepN frequency from another active page. If you set Cont alone the default is 512 samples.) Note, however, that Step and Slow timing do affect the noise spectrum, since they effectively slow the sample rate and thus cause aliasing: You will see a series of dips and decreasing peaks at higher frequencies. This may be of no consequence if you are using the slowed version as a controller for some other process, but it might be an issue for certain tests. You can use Static RTime mode to produce "frozen" or "looped" noise. This is a short section of noise that is repeated without changes. Set up a Burst with no Rise/Fall or Start/Dwell delays, and set the desired repeat interval with the Duration control. When this is short, the noise has a very "machine"like quality. At medium ranges it may sound somewhat like ocean surf, while at long durations it may be difficult to detect that there is in fact a repeating pattern. Note that the noise used for this is part of the same very long sequence mentioned above, and every time you change a control (such as Burst Duration) the stimulus buffer will be updated with the "next" section of noise from that sequence. If you want to keep using the same section, although with different lengths, you need to reset the noise generator via the Rand / Copy control in the Timing Menu. Choose one of the 8 noise generators to set aside only as a copy source, never activating it directly. Then just copy that into the active generator after any change. Since the random sources are really pseudorandom, there are also Timing controls that allow you to synchronize two or more generators, and to timeshift their output sequences relative to each other to produce delayed versions.
White Noise:This is a random number generator with a uniform distribution. That means that for any given sample, all possible output values (from negative fullscale to positive fullscale) have equal probability. Because the spectrum of such a source has equal energy at all frequencies, the term "white" is used to describe it in the same sense that white light contains all visble light frequencies.Besides use as a noise source, this is a good choice when you want random values for control of some other component page via Page Modulation. For example, the COMPOSER.S3A setup uses a White source to provide random selections from a certain range of musical note frequencies in the EXPNOTE.DAT Arb file. The duration of each note is set via the Step Timing control. In this setup, the Step value is set to give a 450 msec duration at the default 20 kHz sample rate. This musical note sequence won't repeat exactly for over 100 billion years! If you add two uniformly distributed White noise sources together, you get a triangular distribution which is commonly used for a dither source in digital audio.
Gaussian Noise:Gaussian noise is really "white", just like the above White noise, in the sense that it has equal energy at all frequencies. But while the frequency distribution may be the same, the amplitude distribution is different. Rather than all values having equal probability (as in the uniform distribution of the White source), here the values near zero are more common, and extreme values are less common.This distribution is a good approximation to many realworld processes. Suppose, for example, that you are throwing darts at a target: Most will land near the bullseye (depending upon your skill), some will be farther out, and there will be (hopefully!) very few that are way off the target. Or consider a manufactured part, which is required to be a certain length, weight, resistance, or some other measured value: Most parts should be near the desired value, with fewer parts falling farther away. Statisticians may complain that the proper name for the Gaussian amplitude distribution is "normal". Although that might be more intuitive to a statistician, it is easily confused with the informal usage meaning "the usual case"... not a good label for the control. And even statisticians understand this usage of "Gaussian". An amplitude distribution is plotted using a histogram: As the values come out of the generator you sort them into bins according to their values X, and record the number of counts in each bin as Y. After you do this for a large number of values, you can see the general distribution of a source. Where a uniform distribution should show about the same number of counts for each value bin, the normal/Gaussian distribution has most of them clustered near the 0 bin, smoothly tapering down toward zero counts at the extreme ends of the range. The formula for this curve shape is: 1 Y =  × e^((X^2)/(2 × SD^2)) (2 × pi × SD^2)^(1/2) Here SD is the Standard Deviation, a measure of the amount of spread in the central peak. At low standard deviations, the central bins get almost all the data and the peak is very tall and sharp. At high deviations the peak is lower and more gently rounded, and more values fall in outlying bins. You can view this histogram for yourself by using the Hist option in the Averager control menu. Make sure you have Dynamic mode active (so you get new output values computed for each trace or Nsample acquisition pass), and average about 256 traces into the histogram. (The averager control uses the word "sweeps" instead of "traces", but that's avoided here to prevent confusion with frequency sweeps.) Compare the Gauss source at different SD settings, and also look at the uniform White source. It's instructive to look at the histograms of other waves as well, and think about why they have the shapes they do. STIM3A allows you to adjust the Standard Deviation over a much wider range than you are ever likely to need. Note that in one respect this is not a "true" normal distribution, and you should be glad of that: The true normal requires values that extend to infinity in both directions, even though they might be very infrequent. Infinite output voltages might be rather hard on your ears and speakers, even assuming your sound system had the requisite infinite power supplies. So instead STIM3A simply truncates the distribution at the limits of the DACs.
Pos Std Dev  Gauss Noise:This is the main control for the standard deviation of the Gauss noise source. It allows values from about 0.0002 to 16.000, with a resolution of 0.000244. The default is 1.0000.
Neg Std Dev  Gauss Noise:This control is normally not used, and defaults to 'Track'. That allows the above Pos control to be used alone, and gives a distribution which is symmetrical about 0.However, by entering any value here other than 0, you can independently control the negative half of the distribution, and the Pos control will only control the positive half. Please check out the Hist average mode to be sure you know what you're getting from this, because it is probably not what you might first think: It is NOT a "skew" control, which would shift the mean. It literally changes only the standard deviation of each half (something that is Just Not Done in conventional statistics). That means that there can be a sharp discontinuity right at zero, and the positive peak can be higher of lower than the negative peak. By contrast, a skew control would keep a single peak at zero but would give different slopes on each side. That would cause the average value to fall somewhere other than zero. Just enter 0 for the Neg value to get back to Track mode.
Pink Noise:This is similar to White noise, but has less energy at higher frequencies. Specifcally, the noise energy falls off as the square root of the frequency. If you plot a frequency response of this noise using ordinary spectrum averaging, the curve will slope down at 3 dB per octave of frequency increase.As for White noise, the Pink name is in reference to light: Pink light has more energy at low frequencies (the red end of the spectrum) than at high (the violet end). Pink noise is often used in audio testing because it roughly approximates the energy distribution of music and many other sounds. For a given power applied to the system under test, this is a more reasonable compromise than White. In testing loudspeakers, for example, White noise would tend to blow out highfrequency drivers (tweeters) before the lowfrequency drivers (woofers) even got warmed up. In a system tested with Pink noise, a perfect frequency response would show a an averaged spectrum that falls at the same 3 dB per octave as the test source. This is not the "flat" response we are used to looking at, and it makes it especially difficult to spot a slightly tilted response. To simplify this sort of testing, Daqarta provides a special Tilt option in the CTRLY menu. This allows you to tilt the spectrum up at +3 dB per octave to exactly compensate for the Pink source. Then you can evaluate the spectrum for flatness just as you would a conventional frequency response (say, from a frequency Sweep). Suppose you want to use this Pink source to control some other component page via Page Modulation. Often, for control applications, you may be interested in very low (subaudio) frequencies. The standard Pink source is normally best for frequencies in the range of the FFT analysis, but you can extend this to arbitrarily low frequencies using the Slow Timing option. Since that uses a linear interpolation to spread out (slow down) the output data, you can also use the Smooth option to smooth out the peaks formed by connecting straight lines. Typically, you would set Smooth TC to the same number of samples as the Slow factor. (Set Smpls / Sec to Smpls to do this.) This will give a good approximation to true lowfrequency Pink noise. If you are interested in "colored" noise, the other color you may want to experiment with is "brown" noise, where the energy is inversely proportional to frequency (6 dB/octave), instead of the square root of frequency. There is no specific Wave selection for this, but you can create it easily from White noise by adding a lowpass filter. The 6 dB/octave curve is what you get from a simple RC filter, which is the same as the Smooth TC option available in the Timing menu. Note that the 6 dB/octave portion only applies to frequencies above the reciprocal of the Time Constant (TC). So if you set Smooth TC = 100 msec, the Brown spectrum will be correct for frequencies above about 10 Hz. To get to lower frequencies you must set larger TC values, but you will find that the overall level goes down as TC is raised. (This is just what you should expect from a lowpass filter!) You can use the Tilt option in the CTRLY menu to apply a correction to the FFT spectrum that compensates for a 6 dB per octave response by applying a +6 dB tilt. With this option you can use spectrum averaging to see how closely the spectrum conforms to "ideal" brown noise. You might want to experiment with the Slow Timing option. Start by setting the Slow factor to the same number of samples as the Smooth TC. You will see a lowfrequency peak when you use Slow, but you will greatly boost the flat part of the reponse at the upper frequencies. The reciprocal of the Smooth TC in seconds will determine how low the flat part of the spectrum extends before the peak begins.
Band Noise:This allows you to create either a band of noise, or wideband noise with a gap. You can control the rising and falling band edge frequencies, steepness, and shape using the Band submenu:
Rise Fc / Fall Fc  Noise Band / GapTo create a band of noise between two frequencies, set Rise Fc to the lower frequency and Fall Fc to the upper frequency.To create a wideband noise with a gap between two frequencies, set Fall Fc to the lower frequency and Rise Fc to the upper. Unlike all other frequency controls in STIM3A, these only accept integer Hz, and don't use the various Freq entry modes. Although the Rise and Fall controls set the "frequency" of a noise band, this is not a value that can be modulated directly. Just like the other Noise sources, when Band is active, the modulator options are reduced to Burst and AM only... no FM, Phase, or Sweep. However, it is indeed possible to create a swept or modulated Band frequency under some conditions. This technique works best for narrow to moderate width noise bands. Set Rise to 0 and Fall to HALF the desired bandwidth, giving a lowpass noise. Now go to a higher component page and set up a sine wave whose frequency will be the center of the noise band. Set the AM Source on that page to the page with the lowpass noise, and set AM Depth to 200%. (That changes the AM to straight multiplication.) Turn on AM and you will see the lowpass noise band mirrored about the selected center frequency. To understand what's happening here, consider that when two frequencies are multiplied together, the product contains only the sum and difference of the original frequencies. (Check out the AM Depth section for the formula.) That applies to the individual lowpass noise frequencies as well, so each instantaneous frequency in the original noise becomes two frequencies in the product, one above and one below the center frequency. Now all you need to do is apply a Sweep or FM to the center frequency, and it becomes applied to the noise band instead. Note that if you use too wide a band, or sweep too far, you can run the noise above the Nyquist frequency or below zero. In that case the band folds back on itself, which might not give the desired result. Astute observers might object that a noise band created via this mirror technique is not really the same as the equivalent band created in the normal way. The fact that the noise components always come in matched pairs means it is not totally random. But unless the band is extremely narrow, such that there are not a lot of other components, this fact will not be detected via listening tests. This technique has been used for years with real electronic filters, oscillators, and analog multipliers to create adjustable narrow noise bands for psychoacoustics tests, long before the digital era. This approach also works for noise gaps, but is more limited. Here you use exactly the same concept, but instead of lowpass you use a noise band. The basic idea is that when you multiply this by the center frequency, you will have two bands flanking the center. The distance from the center frequency to each band will be equal to the Rise frequency. (Remember, the lower band has been mirrored; it starts from the center frequency and runs downward.) Now the trick is to adjust the Fall frequency, which controls the outer band edges, so that there are no extra gaps at the extreme high and low frequencies. If the gap were to be at a fixed frequency in the center of the range, this would clearly be no problem; you'd just set Fall to half the total Nyquist range and the outer edges would fall neatly at the ends. But if Fall is larger than half, the outer edges will wrap back into the main range, raising the level of the wrapped region by 3 dB. This is one drawback of this method, but for many applications the slight level change may not be a problem. Next you have to determine how far you will need to move your noise gap from the center of the range. The farther down you move it, the more wrap you get at the bottom and the more chance for another gap to slip in from the top. You need to make Fall large enough so that when the gap has moved to its lowest extreme, there will still be no gap at the high end. But if you make it too large, the wrapped portion will fall into the desired gap from the bottom. The exact same consideration applies when moving the gap up instead of down. This method thus turns out to be best for modest gaps with modest motion near the center of the range. It's cumbersome to set up, but nevertheless this does provide a way to get a moving gap.
Taps  Noise Band / Gap:Taps can be set from 8 to 512 in powers of 2. The higher the Taps setting, the steeper the edges of the selected band. However, a higher value uses more DOS memory (which might restrict the number of Arb files you can load), and also slows operation.The noise band (or gap) is generated by filtering a wideband white noise source, using what is known as a Finite Impulse Response (FIR) filter. Conceptually, this consists of a delay line that the input noise passes through; each stage of delay is one sample period in duration, and after each there is a "tap" to tap off the noise at that stage. That doesn't affect the noise at all, just peeks at it on its way through. The output of each of these taps is still white noise, just delayed differently from the other tap outputs. To see how this might be used to make a filter, consider what happens if we add two tap outputs together: For some frequency of the input (which is white noise containing all frequencies), the delay between the two taps will be exactly the duration of one whole cycle at that particular frequency. At that frequency (and multiples thereof, as it turns out), the two outputs will be "in phase" and the amplitude of that component will be doubled. But at some other particular frequency (and multiples thereof), the delay will be only a half cycle, such that it will be added with a sign change; the output will be cancelled at those frequencies. The net effect of adding two taps is called "combfiltered" noise, with alternating peaks and dips whose spacing is determined by the relative delay. (See the Timing Shift section for further discussion of combfiltered noise.) To get a more useful filter, additional taps can be added, and each tap output can also be multiplied by some weighting constant before being added into the final output. Imagine starting with the multiple peaks and dips of the simple 2tap comb filter, then selecting additional taps and constants such that some peaks are boosted further, and some are cancelled. The more taps you have to work with, the more peaks can be boosted or cancelled. By proper selection of tap constants, an arbitrary filter shape can be created... but using more taps will always allow a better filter. Since each tap requires a multiplication by its constant, and ALL the taps must be added to get EACH output sample, this process can be quite slow. To avoid multiplying, STIM3A uses a trick: To undertand this, first note that binary noise is still white noise; you can verify this by looking at the spectrum of the White source and changing the Timing Quant value from 0 (no quantization) to 1 (binary)... there is only a slight increase in level, but the spectrum remains flat. In listening tests, the binary and ordinary White noise sound absolutely identical except for the overall level difference. Now consider that binary noise is nothing but a string of 1s and 0s (or in this case +1s and 1s). Multiplication by a constant thus turns out to be merely adding or subtracting, depending on the data value; this is much faster than a true multiplication. STIM3A further improves on this concept by building lookup tables containing the summed output for strings of bits, so the final output can be found very quickly via a few table lookups. (Whenever you change any Band parameter, a whole new set of lookup tables is built.) So, how does all this affect actual use of the Band source? For the vast majority of applications it has no effect at all. Use of binary noise only affects the amplitude distribution of the values, not the spectrum. Since our ears don't hear amplitude distributions, this has no effect on listening tests. What's more, even with binary noise as the input, the output of the FIR filter is not in general binary... after all, each output value is the sum of many taps, each of which has been scaled by a different constant to some nonbinary value. So in most respects the final output, including its waveform and amplitude distribution, is indistinguishable from a noise band produced by any other method. However, since the Band source is fully adjustable, it is possible to set it to have very little filtering action. Clearly, if you set Rise Fc to 0 and Fall Fc to maximum, the essentially unfiltered noise will show a binary appearance in its waveform. As you reduce Fall this appearance is less and less apparent, and is essentially gone by the time Fall is half of maximum (ie. half of Nyquist). This binary appearance happens with lowpass noise; if you set Rise much above 0 so you get a band of noise, even with Fall set very high to give a really broad band, you won't see it. You may also see the binary appearance with gap noise, when you set a narrow gap near the top of the range. Since this binary appearance is inaudible, the main issue is whether there is some other effect it might have. If you are using the Band output to modulate some other source via the Page Modulation option, for example, then the distribution of the values might make a difference. You might want to add a small amount of Smoothing to reduce this, although it will cause the spectrum to tilt downward. (Note that in general you should not use Slow or Step Timing with the Band source. If you do, you will get a series of decreasing "images" in the spectrum: Copies of the desired band that appear due to aliasing, since you have effectively reduced the sample rate.)
Window  Noise Band / Gap:STIM3A derives the tap constants using a simplified Fourier series approach that assumes an infinite number of taps. Since the number of taps is actually limited, the filter response would have peaks and dips. This is similar to the way that an FFT looking at a truncated (instead of infinite) waveform would show a spectrum with peaks and dips. The cure is the same in both cases: Window functions. In the FFT case the window function is used to taper off the input waveform gently to zero at the ends; in the FIR case the window tapers off the values of tap constants near the ends of the delay line.Just like FFT windowing, there are lots of possible window functions and lots of opinions on which to use under what conditions. The default here is a Hanning (Hann) window, but you can toggle to Hamming, Blackman, Blackman Exact, BlackmanHarris, or Rectangular (no window at all). The best bet is to fool around with this control while doing spectral averages of the output, to get familiar with the various response shapes. Note that unlike the Taps control, there is no performance or memory penalty related to the Window selection. It doesn't change the number of taps or size of lookup tables, only the values in the tables.


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 