Admin Production ni-theme
Current Publication

CxMultipleToneInfo

LabWindows/CVI

CxMultipleToneInfo

Advanced Analysis Library Only

AnalysisLibErrType CxMultipleToneInfo (NIComplexNumber 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.

A complex 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 complex signal, the frequency range is (min frequency, max frequency) = (–Fs/2, Fs/2).

This function is similar to CxMultipleToneSignal, except that CxMultipleToneInfo does not export any values, which makes this function easier to use. If you need to export signal and spectrum, you can use CxMultipleToneSignal instead.

Parameters

Input
Name Type Description
waveform NIComplexNumber [] The input waveform to measure.
waveformSize ssize_t The size of the input waveform.
samplePeriodInSeconds double Sample period of the time-domain signal, in seconds.
sortOrder int 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.
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