WAVEFORM
From ICE Enterprises
Revision as of 18:05, 27 April 2020 by ConvertBot (talk | contribs) (creates signal waveforms of various shapes)
creates signal waveforms of various shapes
<out> Name of output file
<form> Format of output file (SF, CF, SB, etc.)
<elem> Number of elements in output file
<shape> Shape of waveform [DEF=SIN]
<amp> Waveform amplitude
<freq> Waveform (IF) frequency (Hz)
<phase> Waveform phase offset (fractions of a cycle)
<start> Abscissa start time
<delta> Abscissa delta
Keyword Only Parameters:
[CHIRP] - Chirp the frequency by this accumulated amount at each /TL=n
boundary. [DEF=0.0]
[MEAN] - Adds this amplitude offset to all waveforms. [DEF=0.0]
[SDEV] - WhiteNoise standard deviation parameter. [DEF=<amp/log(10)>]
[VARIANCE] - WhiteNoise variance parameter. [DEF=<sdev**2>]
[SR] - Overrides <delta> by specifying Sample Rate in Hz. (Since NeXtMidas 3.3.2)
[DURATION] - Overrides <ELEM> by specifying the duration of the file in sec.
Since number of elements must be an integer, this will round up
to the nearest sample, as required. (Since NeXtMidas 3.3.1)
[RF] - Overrides <FREQ> (which is IF) by giving RF of the signal in Hz.
This must be used with [VRF] and [BW]. (Since NeXtMidas 3.3.1)
[VRF] - Center frequency of the simulated tuner in Hz. This is usually
combined with [RF] and [BW], but can be used on its own as it
causes the VRF= key to be set in <OUT>. (Since NeXtMidas 3.3.1)
[BW] - Bandwidth of the simulated tuner in Hz. Although intended for use
with [RF] and [VRF] this can be used on its own as it overrides
<DELTA>. (Since NeXtMidas 3.3.1)
This primitive generates the following shaped waveforms:
Sine - Sinusoid with MAX <amp> and MIN of -<amp>
CoSine - CoSinusoid with MAX <amp> and MIN of -<amp>
Square - Square waveform with MAX <amp> and MIN of -<amp>
Triangle - Triangle waveform with MAX <amp> and Min of -<amp>
SawTooth - Sawtooth or RIGHT triangle waveform with MAX <amp> and MIN of -<amp>
Pulse - Single sample pulse of <amp>
Constant - Constant values given by <amp>
Zero - Same as CONSTANT with all zeros
LRS - Efficient noise generator using a linear recursive sequence
White - White noise algorithm with standard deviation of <sdev>. See note below.
Ramp - Ramp that increments by one with MAX <amp>-1 and MIN of -<amp>.
If you want to adjust the RAMP increment using <freq> and <delta>, use SAWTOOTH.
The most current list of waveforms may be listed as follows:
nM> invoke list nxm.sys.prim.waveform.shapeList
nM> results list
The /RT or /THROTTLE= switch can be applied to simulate a throttled data source.
In FULL mode, the primitive runs as fast as it can. In REALTIME mode the data
is throttled to be produced at a rate of 1 element per <delta> second(s).
In the BLOCK mode, no data is produced.
Note that the data values for White noise will often be 3 to 4 times the stdDev.
Make sure the amplitude/stdDev is scaled correctly for the output data type to
avoid clipping (if necessary). The command line <amp> is scaled by 1/log(10) to
set the default <sdev>. If the user supplies both <amp> and <sdev>, the ratio
will be preserved when setting amplitude and shape with realtime widgets.
Note that, unlike X-Midas, the units of the command line <phase> are fractions
of a cycle, that is, 0.5 rather than 180. The PHASE OFFSET widget is expressed
in terms of fractions of a cycle as well.
Examples:
1. Simulate 10 seconds of a CW signal at 300.1 MHz as it would look in a
receiver with a bandwidth of 1 MHz that is tuned to 300 MHz.
nM> WAVEFORM myfile.tmp FORM=CF ELEM=16M SHAPE=SINE &
RF=300.1e6 VRF=300e6 BW=1e6 &
DURATION=10
or
nM> WAVEFORM myfile.tmp FORM=SF ELEM=16M SHAPE=SINE &
RF=300.1e6 VRF=300e6 BW=1e6 &
DURATION=10
Switches:
/DP - Use double precision buffers [DEF=single precision] or
[DEF=double precision] if <out> is type double]
/EXACT - use slower but exact SIN/COS algorithm
/RT - RealTime mode
/SEED=<num> - Set seed number [DEF=-1]
/THROTTLE=<mode> - Data Throttle Mode (RealTime,Full,Block). Overrides /RT.
/TL=n - Transfer Length elements [DEF=4096]