Programming Attenuation Using NI-RFSA
- Updated2023-02-20
- 8 minute(s) read
Programming Attenuation Using NI-RFSA
Given a reference level, NI-RFSA configures the hardware attenuation for optimal performance. However, you can customize some aspects of the configuration.
The topics in this section provide information about the ways in which you can customize attenuation-related properties and attributes, as well as any special considerations your adjustments might require.
Device Attenuation Value Relationships
The coupling between the reference level, solid-state attenuation, and mechanical attenuation varies depending on which attributes or properties are set.
The following table describes the relationship between the applicable attributes or properties. In the following table, Total Attenuation comprises both mechanical attenuation and solid-state attenuation.
The Set Mixer Level Offset, Set Mechanical Attenuation, and Set Total Attenuation columns indicate whether you need to set the applicable property or attribute to achieve the behavior specified in the Description column. The Restriction column specifies any parameter relationships you should observe.
Set Mixer Level Offset | Set Mechanical Attenuation | Set Total Attenuation | Description | Restriction |
---|---|---|---|---|
No | No | No | There are no user constraints on the settings. The total attenuation is calculated based on the specified reference level and default mixer level.
Note Even if you do not set the Reference Level property or the NIRFSA_ATTR_REFERENCE_LEVEL, the default value of 0 dBm is used in all calculations.
|
|
Yes | No | No | Total attenuation is calculated based on the reference level and mixer level. |
|
No | Yes | No | The total attenuation, consisting of mechanical and solid state attenuators, is calculated based on the stated reference level and default mixer level. The amount of mechanical attenuation is user-constrained; the remaining solid-state attenuation is calculated to best match the values you specify. |
|
Yes | Yes | No | This configuration is similar to the preceding configuration, with the exception that a user-specified mixer level (offset) constraint is taken into the equation instead of a default value. |
|
No | No | Yes | The attenuators are set based on the user-specified total attenuation constraint. The balance between mechanical and solid state attenuators is calculated by NI-RFSA. |
|
No | Yes | Yes | This configuration is similar to the preceding configuration, with the exception that the balance between mechanical and electronic attenuation is calculated based on the user-specified constraints. |
|
Yes | N/A | Yes | This configuration produces an error. The mixer level and the total attenuation are both specified as part of the same setup. In this invalid configuration, mechanical attenuation is irrelevant. | N/A |
where
Attenuation-Related Properties and Attributes
You can customize the hardware attenuation configuration by explicitly setting the following NI-RFSA properties and attributes.
LabVIEW Property | LabWindows CVI/C Attribute |
---|---|
RF Attenuation | NIRFSA_ATTR_ATTENUATION |
RF Attenuation Step Size | NIRFSA_ATTR_RF_ATTENUATION_STEP_SIZE |
Mechanical Attenuation | NIRFSA_ATTR_MECHANICAL_ATTENUATION |
Mixer Level | NIRFSA_ATTR_MIXER_LEVEL |
Mixer Level Offset | NIRFSA_ATTR_MIXER_LEVEL_OFFSET |
IF Output Power Level | NIRFSA_ATTR_IF_OUTPUT_POWER_LEVEL |
IF Output Power Level Offset | NIRFSA_ATTR_IF_OUTPUT_POWER_LEVEL_OFFSET |
External Gain | NIRFSA_ATTR_EXTERNAL_GAIN |
Relationship Between Reference Level, RF Attenuation, and Mixer Level
The reference level, RF attenuation, and mixer level settings interact with each other. Customizing the value of one setting can have an effect on the value of another setting.
RF attenuation refers to all the attenuation that occurs before the mixer, which includes both solid-state (or electronic) attenuators and mechanical attenuators. NI-RFSA uses the value of the Reference Level property or the NIRFSA_ATTR_REFERENCE_LEVEL attribute even if you do not set it. The default value is 0 dBm. The reference level determines the amount of RF attenuation deployed based on the mixer level. If you do not specify a value for the Mixer Level property or the NIRFSA_ATTR_MIXER_LEVEL attribute, the default value is -10 dBm.
If you set the mixer level, the RF attenuation is calculated so that it satisfies the following equation:
reference level - RF attenuation ≤ mixer level
NI-RFSA adjusts the settings to get close to the desired mixer level, but it does not return an error if the signal level is too low. NI-RFSA does return an error if the reference level is so high that even with the maximum available RF attenuation, it cannot lower the signal at mixer below the specified mixer level. Because of the relationship between mixer level and RF attenuation, you cannot set both the mixer level and the RF attenuation at the same time or NI-RFSA returns an error.
To configure the mixer level, specify the value of the Mixer Level property or the NIRFSA_ATTR_MIXER_LEVEL attribute, or the Mixer Level Offset or the NIRFSA_ATTR_MIXER_LEVEL_OFFSET attribute (but not both-setting both results in an error). If you are interested in particular mixer levels, specify a mixer level. If you are interested in the noise/distortion, specify a mixer level offset. Mixer level offset does not depend on absolute mixer levels, so it supports the PXIe-5665 as well as other devices. When the mixer level is specified in conjunction with the reference level, the RF attenuation is determined by the formula reference level - RF attenuation ≤ mixer level. Notice that no matter how low the reference level is, the RF attenuation never drops below the minimal amount designed to protect the front end of the downconverter. The default RF attenuation for the PXIe-5603/5605 is 10 dB.
To control the RF attenuation setting directly, use the RF Attenuation property or the NIRFSA_ATTR_ATTENUATION attribute. You can specify a value as low as 0 dB.
Controlling RF Attenuation Step Size
To change the RF attenuation step size for your device, use the RF Attenuation Step Size property or the NIRFSA_ATTR_RF_ATTENUATION_STEP_SIZE attribute.
Controlling Mechanical Attenuation
To control the mechanical attenuator directly, specify a mechanical attenuation value using the Mechanical Attenuation property or the NIRFSA_ATTR_MECHANICAL_ATTENUATION attribute.
The value you specify works together with the value of the RF Attenuation property or the NIRFSA_ATTR_ATTENUATION attribute. You can set both values, but you are not required to do so. For example, you can set the mechanical attenuation to a certain value and then perform a power sweep by changing the reference level in a loop. Without specifying a mechanical attenuation value, NI-RFSA calculates the attenuation value every time based on the prescribed algorithm, and that calculation could include different amounts of mechanical and electronic attenuation. By constraining the mechanical part, you can achieve faster sweep times, resulting from the lower settling times for the electronic attenuators compared to the mechanical attenuators, and it can cause less wear on the mechanical attenuator.
Enabling the RF Preamplifier
The last RF front-end property and attribute, which can be set in addition to the mixer level or attenuation, are the RF Preamplifier Enabled property or the NIRFSA_ATTR_PREAMP_ENABLED attribute. You can enable the preamplifier in conjunction with low reference levels but only if the input signals are low.
Controlling IF Output Power Level and Offset
You can specify either the IF output power level or the IF output power level offset.
Choose between IF output power level and IF output power level offset as follows:
- If you are familiar with your digitizer requirements, set the IF Output Power Level property or the NIRFSA_ATTR_IF_OUTPUT_POWER_LEVEL attribute to the expected value.
- If you want to achieve better dynamic range at the output without considering the absolute value of the output, use the IF Output Power Level Offset property or the NIRFSA_ATTR_IF_OUTPUT_POWER_LEVEL_OFFSET attribute.
Resetting Attenuation-Related Settings
After you set attenuation-related properties and settings, the settings you select persist until you reset them.
If you are using LabVIEW, use the NI-RFSAProperty Node to reset a property. To reset a property in the Property Node, select the property, right-click the Property Node, and select from the shortcut menu.
If you are using LabWindows/CVI, use the niRFSA_ResetAttribute function to reset an attribute.
In This Section
- Device Attenuation Value Relationships
- Attenuation-Related Properties and Attributes
- Relationship Between Reference Level, RF Attenuation, and Mixer Level
- Controlling RF Attenuation Step Size
- Controlling Mechanical Attenuation
- Enabling the RF Preamplifier
- Controlling IF Output Power Level and Offset
- Resetting Attenuation-Related Settings