MultipleToneInfo
Advanced Analysis Library Only
AnalysisLibErrType MultipleToneInfo (double waveform[], ssize_t waveformSize, double samplePeriodInSeconds, int sortOrder, double threshold, int maxNumberOfTones, int *detectedTones, double frequency[], double amplitude[], double phase[]);
Purpose
Returns the frequency, amplitude, and phase for each signal tone whose amplitude exceeds a specified threshold.
This function is similar to MultipleToneSignal, except that MultipleToneInfo does not export any values, which makes this function easier to use. If you need to export signal and spectrum information, you can use MultipleToneSignal instead.
A real multiple tone signal can be expressed as shown in the following equation:
where Ai, fi, and i are the amplitude, frequency, and phase, respectively, of the ith tone of a multiple tone signal with N tones and Fs is the sample rate in samples per second of the input waveform signal.
For a real signal, the frequency range is (min frequency, max frequency) = (0, Fs/2).
Parameters
Input | ||
Name | Type | Description |
waveform | double [] | The input waveform to measure. |
waveformSize | ssize_t | The size of the input waveform. This value must be greater than 2. |
samplePeriodInSeconds | double | Sample period of the time-domain signal, in seconds. This value must be greater than 0. |
sortOrder | int | Specifies the sorting order of the detected tones. 0—increasing frequency 1—decreasing amplitude |
threshold | double | The minimum amplitude that each tone must exceed. |
maxNumberOfTones | int | The maximum number of tones that this function extracts. This value must be greater than 0. |
Output | ||
Name | Type | Description |
detectedTones | int | Detected number of tones. This value is less than or equal to maxNumberOfTones. |
frequency | double [] | The frequency of the detected tones, in hertz. You must allocate enough memory for this value before calling this function: maxNumberOfTones*sizeof(double). |
amplitude | double [] | The amplitude of the detected tones. You must allocate enough memory for this value before calling this function: maxNumberOfTones*sizeof(double). |
phase | double [] | The phase of the detected tones, in degrees. You must allocate enough memory for this value before calling this function: maxNumberOfTones*sizeof(double). |
Return Value
Name | Type | Description |
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |
Additional Information
Library: Advanced Analysis Library
Include file: analysis.h
LabWindows/CVI compatibility: LabWindows/CVI 2010 and later