MSP430UltrasonicLibrary  02_30_00_03
Data Fields
_USS_Algorithms_User_Configuration_ Struct Reference

Contains USS SW Lib Algorithms User Configuration. More...

#include <ussSwLib.h>

Collaboration diagram for _USS_Algorithms_User_Configuration_:
Collaboration graph
[legend]

Data Fields

uint16_t absTOFInterval
 
float ADCAdditionalCaptureDelay
 
float dcOffset
 The constant value calibrated by Zero flow drift (sec) More...
 
float ratioOfTrackLobeToPeak
 The ratio of side lobe closest to threshold and peak lobe amplitudes. More...
 
uint8_t numPulsesBeforeThreshold
 The number of pulses/cycles before selected threshold value. More...
 
uint8_t windowingMode
 
float signalValueThresholdCheck
 
uint8_t numCycleSearchCorrPeak
 The number of cycles to search for correlation peak. More...
 
uint16_t searchLobeSampleSteps
 
float maxRatioPeak2PeakVariation
 
uint8_t winStartIndexBackOffNumCycles
 
uint8_t winTrapzRampOverNumCycles
 The number of cycles over which the trapezoid window should ramp. More...
 
uint8_t winPeakIndex2EdgeNumCycles
 
float corrValueThresholdCheckFactor
 
int16_t calibratedDCOffsetUPS
 
int16_t calibratedDCOffsetDNS
 
bool isInitAlgorithms
 This flag is used to indicate if the algorithms have been initialized. More...
 
USS_dtof_volume_flow_calculation_interval dtofVolInterval
 
int16_t * pLEAMemBuffer1
 
int32_t * pNvMemBuffer
 
USS_highFlow_option highFlowOption
 
float cycleSlipThreshold
 
int32_t thresholdX1X3
 
_iq27 clockRelativeError
 
uint32_t winNumCycles
 
bool enableFilter
 
uint16_t filterLength
 This parameter is used to specify the filter length. More...
 
int16_t * filterCoeffs
 
USS_Alg_AbsToF_Calculation_Option absToFOption
 User selection for Absolute Time of Flight calculation option. More...
 
int16_t * pLEAMemBuffer2
 
int16_t * hilbertTransformCoeffs
 Pointer to hilbert coefficients, coefficients must 32-bit aligned. More...
 
uint16_t hilbertTransformCoeffsLength
 Length of hilbert coefficients. More...
 
int16_t negSearchRange
 Negative search range for tracking envelope maximum. More...
 
int16_t posSearchRange
 Positive search range for tracking envelope maximum. More...
 
float crossThreshold
 Threshold for tracking crossing point of envelope relative to envelope maximum. More...
 
int16_t * pBinaryPattern
 
uint16_t binaryPatternLength
 
uint16_t maxBinaryPatternLenght
 
int16_t * pAdditionalBinaryPattern
 
uint16_t additionalPatternLength
 Length of additional binary pattern the length. More...
 
uint16_t maxAdditionalBinaryPatternLength
 
USS_Alg_dToF_Calculation_Option dtoFCalcOption
 Specifies Delta ToF Calculation option. More...
 
USS_Alg_volume_flow_Calculation_Option volumeCalOption
 Specifies Volume Flow Rate Calculation option. More...
 
int16_t maxSampleShift
 
const int16_t(* pInterpCorrectionTablePtr )[2]
 
int16_t interpCorrectionTableLenght
 
USS_Alg_volume_flow_Calibration_Option volumeCalibrationOption
 Specifies Volume Flow Rate Calibration option. More...
 
union {
   USS_Alg_volume_Flow_Calib_Object *   flowCalibObject
 
   USS_Alg_volume_Flow_Temperature_Calib_Object *   flowTempCalibObject
 
calibObject
 
USS_Alg_temperature_Calculation_ObjecttempCalcObject
 
USS_Alg_temperature_Calculation_Option temperatureCalcOption
 Specifies Temperature Calculation option. More...
 

Detailed Description

Contains USS SW Lib Algorithms User Configuration.

Field Documentation

§ absTOFInterval

uint16_t _USS_Algorithms_User_Configuration_::absTOFInterval

This parameter determines the interval to calculate absolute Time of Flight. The interval at which Absolute Time of Flight is calculated has a dependency with dtofVolInterval configuration. If dtofVolInterval == USS_dtof_volume_flow_calculation_interval_1 and absTOFInterval == 1 absolute Time of Flight everytime USS_runAlgorithmsFixedPoint or USS_runAlgorithms API are called. If dtofVolInterval == USS_dtof_volume_flow_calculation_interval_2 and absTOFInterval == 10 absolute Time of Flight is calculated the 20th time USS_runAlgorithmsFixedPoint and USS_runAlgorithms are invoked. The last calculation of Absolute time of flight is return until the next update occurs. Increasing the value for "absTOFIteration" reduces the average consumption of the application. (valid range 1-65535)

§ ADCAdditionalCaptureDelay

float _USS_Algorithms_User_Configuration_::ADCAdditionalCaptureDelay

The additional time it takes during firing and capturing the data, which is not accounted for anywhere else.

§ dcOffset

float _USS_Algorithms_User_Configuration_::dcOffset

The constant value calibrated by Zero flow drift (sec)

§ ratioOfTrackLobeToPeak

float _USS_Algorithms_User_Configuration_::ratioOfTrackLobeToPeak

The ratio of side lobe closest to threshold and peak lobe amplitudes.

§ numPulsesBeforeThreshold

uint8_t _USS_Algorithms_User_Configuration_::numPulsesBeforeThreshold

The number of pulses/cycles before selected threshold value.

§ windowingMode

uint8_t _USS_Algorithms_User_Configuration_::windowingMode

This variable is used to define which windowing configuration is enabled . When windowing is enabled, it allows you to specify the window type to be used. This window is only applied on the captured DNS & UPS signals for the Delta ToF (DToF) computation. The options below are only applicable when using USS_ALG_DTOF_COMPUTATION_MODE= USS_ALG_DTOF_COMPUTATION_OPTION_ESTIMATE. The memory (in bytes) required when windowing is not USS_ALG_DTOF_EST_WINDOW_OPTION_DISABLED can be calculated using: USS_SW_LIB_APP_MAX_WINDOW_RAMP_SIZE = 2 * [ROUND ( USS_ALG_WIN_TRAP_RAMP_NUM_CYCLES * [(USS_PLL_FREQ / USS_SDHS_OVER_SAMPLE_RATE) / USS_F1_FREQ ] ) + 2];

USS_ALG_DTOF_EST_WINDOW_OPTION_DISABLED : This setting disables the window application on the captured signal.

USS_ALG_DTOF_EST_WINDOW_OPTION_STATIC: The applied window is static with reference to the start of the capture signal. Even if the captured DNS and UPS signals move because of changes in flow rates or due to temperature, the applied window is always the same with reference to the start of the capture signal. The applied window is trapezoidal in nature and specified by .winTrapzRampOverNumCycles (USS_ALG_WIN_TRAP_RAMP_NUM_CYCLES), .winNumCycles (USS_ALG_WIN_NUM_CYCLES) and .winStartIndexBackOffNumCycles (USS_ALG_WIN_START_INDEX_BACK_OFF_NUM_CYCLES). In all these parameters, the NumCycles refers to the number of transducer cycles. winStartIndexBackOffNumCycles defines the window start with reference to the start of the capture signal. The window is 0 from the start of the capture to winStartIndexBackOffNumCycles. winTrapzRampOverNumCycles defines the number of cycles over which the window ramps from 0 to 1. It similarly defines the number of cycles over which the window ramps down from 1 to 0. winNumCycles defines the length of the window in terms of transducer cycles when it is 1. In effect, the total window length is defined by winTrapzRampOverNumCycles + winNumCycles + winTrapzRampOverNumCycles and the position is defined by winStartIndexBackOffNumCycles.

USS_ALG_DTOF_EST_WINDOW_OPTION_ESTIMATE: The applied window is static in terms of the length but the start position of the applied window is dependent on the start of the signal defined by AbsToF for UPS and DNS independently. The applied window shape is similar to the window defined in USS_ALG_DTOF_EST_WINDOW_OPTION_STATIC.

USS_ALG_DTOF_EST_WINDOW_OPTION_DYNAMIC: The applied window is dynamic in terms of the size of the window itself and is defined with reference to the position of the peak of the signal. The applied window is trapezoidal in nature and specified by .winTrapzRampOverNumCycles (USS_ALG_WIN_TRAP_RAMP_NUM_CYCLES), .winStartIndexBackOffNumCycles (USS_ALG_WIN_START_INDEX_BACK_OFF_NUM_CYCLES) and .winPeakIndex2EdgeNumCycles (USS_ALG_WIN_PEAK_INDEX_2_EDGES_NUM_CYLES). winStartIndexBackOffNumCycles defines the window start with reference to the start of the capture signal. winTrapzRampOverNumCycles defines the number of cycles over which the window ramps from 0 to 1. It similarly defines the number of cycles over which the window ramps down from 1 to 0. The window is set to 1 till winPeakIndex2EdgeNumCycles after the peak of the signal. In effect, the total window length is not known and is dependent on the position of the peak of the signal.

If USS_ALG_DTOF_COMPUTATION_MODE= USS_ALG_DTOF_COMPUTATION_OPTION_WATER, then the windowingMode is a flag to enable or disable windowing. Memory in bytes required for windowing is USS_SW_LIB_APP_MAX_WINDOW_RAMP_SIZE = 2 * (USS_SW_LIB_APP_MAX_CAPTURE_SIZE + USS_SW_LIB_APP_MAX_FILTER_LENGTH) The options below are only applicable when using USS_ALG_DTOF_COMPUTATION_MODE= USS_ALG_DTOF_COMPUTATION_OPTION_WATER.

USS_ALG_DTOF_WATER_WINDOW_OPTION_DISABLED: This setting disables the window application on the captured signal

USS_ALG_DTOF_WATER_WINDOW_OPTION_ENABLE: The applied window is static in terms of the length but the start position of the applied window is dependent on the start of the signal defined by AbsToF for DNS. The same start position is also used for UPS. The applied window shape is similar to the window defined in USS_ALG_DTOF_EST_WINDOW_OPTION_STATIC.

§ signalValueThresholdCheck

float _USS_Algorithms_User_Configuration_::signalValueThresholdCheck

The signal value check parameter which has to be crossed for a valid signal

§ numCycleSearchCorrPeak

uint8_t _USS_Algorithms_User_Configuration_::numCycleSearchCorrPeak

The number of cycles to search for correlation peak.

§ searchLobeSampleSteps

uint16_t _USS_Algorithms_User_Configuration_::searchLobeSampleSteps

The number of samples to increment/decrement while searching/tracking the side lobe

§ maxRatioPeak2PeakVariation

float _USS_Algorithms_User_Configuration_::maxRatioPeak2PeakVariation

The maximum ratio of allowed peak to peak variation from one measurement to another before setting flag for search.

§ winStartIndexBackOffNumCycles

uint8_t _USS_Algorithms_User_Configuration_::winStartIndexBackOffNumCycles

The number of cycles to back off from start of received pulse (derived from absTOF) (applies to static windowing only)

§ winTrapzRampOverNumCycles

uint8_t _USS_Algorithms_User_Configuration_::winTrapzRampOverNumCycles

The number of cycles over which the trapezoid window should ramp.

§ winPeakIndex2EdgeNumCycles

uint8_t _USS_Algorithms_User_Configuration_::winPeakIndex2EdgeNumCycles

The number of cycles from peak of signal to edge (or start) of window down ramp (applies to dynamic windowing only)

§ corrValueThresholdCheckFactor

float _USS_Algorithms_User_Configuration_::corrValueThresholdCheckFactor

The factor of maximum lobe energy which has to be crossed for a valid correlation value

§ calibratedDCOffsetUPS

int16_t _USS_Algorithms_User_Configuration_::calibratedDCOffsetUPS

This is a constant value which is subtracted to UPS captures before running the Delta ToF algorithms. This parameter can be obtained using USS_estimateDCoffset API

Referenced by USS_estimateDCoffset().

§ calibratedDCOffsetDNS

int16_t _USS_Algorithms_User_Configuration_::calibratedDCOffsetDNS

This is a constant value which is subtracted to DNS captures before running the Delta ToF algorithms. This parameter can be obtained using USS_estimateDCoffset API

Referenced by USS_estimateDCoffset().

§ isInitAlgorithms

bool _USS_Algorithms_User_Configuration_::isInitAlgorithms

This flag is used to indicate if the algorithms have been initialized.

§ dtofVolInterval

USS_dtof_volume_flow_calculation_interval _USS_Algorithms_User_Configuration_::dtofVolInterval

This configuration specifies the interval at which delta ToF and volume flow are calculated. The last calculated DToF and volume flow will be return between intervals.

§ pLEAMemBuffer1

int16_t* _USS_Algorithms_User_Configuration_::pLEAMemBuffer1

pointer to LEA RAM memory reserved to place windowing coefficients. memory minimum size (sampleSize*numberOfAcquisitions + filterLength * 2) bytes

§ pNvMemBuffer

int32_t* _USS_Algorithms_User_Configuration_::pNvMemBuffer

pointer to non volatile memory reserved for algorithm computations. memory minimum size (sampleSize*2) bytes

§ highFlowOption

USS_highFlow_option _USS_Algorithms_User_Configuration_::highFlowOption

Setting this configuration to true will enable highflow rate (> 5 gpm) operation. NOTE: enabling this option will increase power consumption

§ cycleSlipThreshold

float _USS_Algorithms_User_Configuration_::cycleSlipThreshold

This setting is only need if USS_highFlow_option_version1 is selected typical values are 1.1 and 1.2

§ thresholdX1X3

int32_t _USS_Algorithms_User_Configuration_::thresholdX1X3

§ clockRelativeError

_iq27 _USS_Algorithms_User_Configuration_::clockRelativeError

This setting is used to correct AbsToF calculation clockRelativeError = (clk_freq_measured-clock_freq_nominal)/clock_freq_nominal Users can take advantage of USS_verifyHSPLLFrequency API. Which will return the the expected timer counts and actual measured timer count For more details about USS_verifyHSPLLFrequency implementation please refer the Library API guide. Valid range is [_IQ27(-0.1),_IQ27(0.1)] If USS_verifyHSPLLFrequency API is used then the error can be calculated as follows: gUssSWConfig.algorithmsConfig->clockRelativeError = _IQ27div((int32_t)(hspll_results.actualTestCount - hspll_results.expectedResult),hspll_results.expectedResult);

§ winNumCycles

uint32_t _USS_Algorithms_User_Configuration_::winNumCycles

This parameter is used to control the windowLength when enableWindowing is set to true. winLength = (2* winRampLength) + (numSamplesPerCycle *winNumCycles) Where, winRampLength = numSamplesPerCycle * winTrapzRampOverNumCycles; numSamplesPerCycle = sampleFreq/transducerFreq; For DToF Gas SingleTone Correlated: winLength is Dynamic internally and set as winLength = numSamples2Peak + (numSamplesPerCycle * winPeakIndex2EdgeNumCycles)

  • (winRampLength) Where, numSamples2Peak = Dynamically estimated each measurement as Peak of signal winNumCycles is ignored in this mode

§ enableFilter

bool _USS_Algorithms_User_Configuration_::enableFilter

This parameter is used to enabling filtering of the signal before running AbsToF, DeltaToF and Volume algorithms

§ filterLength

uint16_t _USS_Algorithms_User_Configuration_::filterLength

This parameter is used to specify the filter length.

Referenced by commonSDHSRestoreSDHSDTCA().

§ filterCoeffs

int16_t* _USS_Algorithms_User_Configuration_::filterCoeffs

This parameter is used to provide the memory location were the filter coefficients will be loaded from

§ absToFOption

USS_Alg_AbsToF_Calculation_Option _USS_Algorithms_User_Configuration_::absToFOption

User selection for Absolute Time of Flight calculation option.

§ pLEAMemBuffer2

int16_t* _USS_Algorithms_User_Configuration_::pLEAMemBuffer2

pointer to LEA RAM memory reserved temporary LEA operations. This section of memory can be reused in the application for temporary operations. The content of in this memory is not preserved during when USS_run* functions are called.

§ hilbertTransformCoeffs

int16_t* _USS_Algorithms_User_Configuration_::hilbertTransformCoeffs

Pointer to hilbert coefficients, coefficients must 32-bit aligned.

§ hilbertTransformCoeffsLength

uint16_t _USS_Algorithms_User_Configuration_::hilbertTransformCoeffsLength

Length of hilbert coefficients.

§ negSearchRange

int16_t _USS_Algorithms_User_Configuration_::negSearchRange

Negative search range for tracking envelope maximum.

§ posSearchRange

int16_t _USS_Algorithms_User_Configuration_::posSearchRange

Positive search range for tracking envelope maximum.

§ crossThreshold

float _USS_Algorithms_User_Configuration_::crossThreshold

Threshold for tracking crossing point of envelope relative to envelope maximum.

§ pBinaryPattern

int16_t* _USS_Algorithms_User_Configuration_::pBinaryPattern

Pointer to array containing binary reference pattern used by USS_Alg_AbsToF_Calculation_Option_lobeWide and USS_Alg_AbsToF_Calculation_Option_hilbertWide The library can use the binary pattern calculated by USS_generateMonoDualToneBinaryPattern and USS_generateMultiToneBinaryPattern APIs or user can passed a predefined binary pattern.

§ binaryPatternLength

uint16_t _USS_Algorithms_User_Configuration_::binaryPatternLength

Length of binary pattern the length is automatically calculated by USS_generateMonoDualToneBinaryPattern and USS_generateMultiToneBinaryPattern APIS if using predefined binary patterns user must specify the length of the pattern.

§ maxBinaryPatternLenght

uint16_t _USS_Algorithms_User_Configuration_::maxBinaryPatternLenght

This value is used by USS_generateMultiToneBinaryPattern and USS_generateMonoDualToneBinaryPattern to avoid overflowing the binary pattern array

§ pAdditionalBinaryPattern

int16_t* _USS_Algorithms_User_Configuration_::pAdditionalBinaryPattern

Pointer to additional binary pattern. This pattern will be append to the binary pattern calculated by USS_generateMonoDualToneBinaryPattern USS_generateMultiToneBinaryPattern

§ additionalPatternLength

uint16_t _USS_Algorithms_User_Configuration_::additionalPatternLength

Length of additional binary pattern the length.

§ maxAdditionalBinaryPatternLength

uint16_t _USS_Algorithms_User_Configuration_::maxAdditionalBinaryPatternLength

This value is used by USS_generateMultiToneBinaryPattern and USS_generateMonoDualToneBinaryPattern to avoid overflowing the binary pattern array

§ dtoFCalcOption

USS_Alg_dToF_Calculation_Option _USS_Algorithms_User_Configuration_::dtoFCalcOption

Specifies Delta ToF Calculation option.

§ volumeCalOption

USS_Alg_volume_flow_Calculation_Option _USS_Algorithms_User_Configuration_::volumeCalOption

Specifies Volume Flow Rate Calculation option.

§ maxSampleShift

int16_t _USS_Algorithms_User_Configuration_::maxSampleShift

Maximum shift in samples for calculating deltaTOF (setting for high flow) Parameter specifying maximum shift in samples for deltaTOF calculation, e.g. setting of 8 with 4 samples per cycle supports high flow +/- 2 cycles.

§ pInterpCorrectionTablePtr

const int16_t(* _USS_Algorithms_User_Configuration_::pInterpCorrectionTablePtr)[2]

Pointer to look-up table (LUT) used for interpolation correction. A null pointer will disable using offset correction (less accuracy for absTOF).

§ interpCorrectionTableLenght

int16_t _USS_Algorithms_User_Configuration_::interpCorrectionTableLenght

Length of look-up table (LUT) used for interpolation correction. Must be a power of two.

§ volumeCalibrationOption

USS_Alg_volume_flow_Calibration_Option _USS_Algorithms_User_Configuration_::volumeCalibrationOption

Specifies Volume Flow Rate Calibration option.

Referenced by USS_calibrateVolumeFlowRate(), and USS_scaleVolumeFlowRate().

§ flowCalibObject

USS_Alg_volume_Flow_Calib_Object* _USS_Algorithms_User_Configuration_::flowCalibObject

Specifies Volume Flow Rate Flow (only) Calibration object, it must be initialized for when volumeCalibrationOption = USS_Alg_volume_flow_Calibration_Option_flow

Referenced by USS_calibrateVFRFlow().

§ flowTempCalibObject

USS_Alg_volume_Flow_Temperature_Calib_Object* _USS_Algorithms_User_Configuration_::flowTempCalibObject

Specifies Volume Flow Rate Flow + Temperature Calibration object, it must be initialized for when volumeCalibrationOption = USS_Alg_volume_flow_Calibration_Option_flow_temperature

Referenced by USS_calculateVolumeFlowRate(), USS_calibrateVFRFlowTemperature(), USS_initialSearchQuad(), USS_isPtInside(), and USS_searchNeighborQuad().

§ calibObject

union { ... } _USS_Algorithms_User_Configuration_::calibObject

§ tempCalcObject

USS_Alg_temperature_Calculation_Object* _USS_Algorithms_User_Configuration_::tempCalcObject

Specifies Temperature Calculation object used to calculate temperature using UPS and DNS absToF.

Referenced by USS_calculateVelocity(), and USS_computeTemperature().

§ temperatureCalcOption

USS_Alg_temperature_Calculation_Option _USS_Algorithms_User_Configuration_::temperatureCalcOption

Specifies Temperature Calculation option.

Referenced by USS_runAlgorithms().


The documentation for this struct was generated from the following file:
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale