This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EVM430-FR6047: A Question About USS_calibrateSignalGain function

Part Number: EVM430-FR6047


Hi.

In the API Guide Document, the description of the USS_calibrateSignalGain(USS_SW_Library_configuration *config) is as follows.

USS_message_code USS_calibrateSignalGain ( USS_SW_Library_configuration *  config )

The following API runs the SDHS Signal Gain calibration routine if no errors are encountered during Signal Gain calibration the config->captureConfig->gainRange value will be configured else it will remain the original value. Please refer to agcConstant parameter description in USS_Capture_Configuration structure for more information regarding the configuration for this signal gain calibration parameter.

uint16_t _USS_Capture_Configuration_::agcConstant

This value is use to calculate the Optimal Gain Amplifier setting this value can be determined with the following formula agcConstant = floor(20*log10(adcNom))=floor(20*log10(ADCmax * 10^(-B/20))) where ADCmax = +/- 2^(12-1) for a 12 Bit ADC B = number of db that the ADC output should be backoff (typically 3 db) For USS module for B = 3, agcConstant = floor(20*log10((2^11)*(10^(-3/20)))) = 63

I did not fully understand this explanation. Can you explain it in more detail?

What is the purpose of the USS_calibrateSignalGain function, and what does the agcConstant variable mean?

  • Hi Junsu,

    1. purpose of the USS_calibrateSignalGain function:
    This function is used to help run an Automatic Gain Control (AGC) algorithm. In practice, the signal level can vary based on the temperature of the medium. Additionally, the sensitivity of the transducers also varies over time due to aging. This makes the received signal smaller over the years for a fixed PGA setting. For this reason, it is important to also run an AGC algorithm that modifies the PGA setting and ensure the output of the ADC (SDHS module in USS) stays nearly constant.

    You can also look at the file USSLibGUIApp.c in the MSP430FR6047EVM_USS_Water_Demo project. Please look at the code inside the compile flag USS_APP_AGC_CALIBRATE_ENABLE for the example usage of the function.

    2. what does the agcConstant variable mean?:
    This defines the expected output level of the ADC (SDHS module in USS). As in the documentation, agcConstant =63, indicates the ADC output will range from [-1412:+1412] which is 10^(63/20). The example project has the agcConstant =60 which indicates the ADC output will range from [-1000:+1000] which is 10^(60/20). The PGA setting is modified by the function USS_calibrateSignalGain so that the ADC output corresponds to these specified values.

    Srinivas
  • Your explanation is clear and easy to understand.

    Thank you. Srinivas

**Attention** This is a public forum