piel.analysis.electronic.gain#

Functions#

calculate_voltage_gain_dB([v_in, v_out])

Calculate the voltage gain in decibels (dB).

calculate_voltage_gain_ratio([v_in, v_out])

Calculate the voltage gain ratio.

calculate_power_gain_50ohm_dB([v_in, v_out])

Calculate the power gain in decibels (dB) assuming a 50-ohm system.

calculate_power_gain_dB([p_in, p_out])

Calculate the power gain in decibels (dB).

Module Contents#

calculate_voltage_gain_dB(v_in=1, v_out=1)[source]#

Calculate the voltage gain in decibels (dB).

Parameters: v_in (float): Input voltage (V). Default is 1. v_out (float): Output voltage (V). Default is 1.

Returns: float: Voltage gain in dB.

Formula: .. math:

G_V(dB) = 20 \cdot \log_{10} \left(

rac{V_{out}}{V_{in}} ight)

calculate_voltage_gain_ratio(v_in=1, v_out=1)[source]#

Calculate the voltage gain ratio.

Parameters: v_in (float): Input voltage (V). Default is 1. v_out (float): Output voltage (V). Default is 1.

Returns: float: Voltage gain ratio.

Formula: .. math:

G_V =

rac{V_{out}}{V_{in}}

calculate_power_gain_50ohm_dB(v_in=1, v_out=1)[source]#

Calculate the power gain in decibels (dB) assuming a 50-ohm system.

Parameters: v_in (float): Input voltage (V). Default is 1. v_out (float): Output voltage (V). Default is 1.

Returns: float: Power gain in dB.

Formula: .. math:

G_P(dB) = 10 \cdot \log_{10} \left(

rac{V_{out}^2}{V_{in}^2} ight)

Note: For a 50-ohm impedance, power is proportional to voltage squared.

calculate_power_gain_dB(p_in=1, p_out=1)[source]#

Calculate the power gain in decibels (dB).

Parameters: p_in (float): Input power (W). Default is 1. p_out (float): Output power (W). Default is 1.

Returns: float: Power gain in dB.

Formula: .. math:

G_P(dB) = 10 \cdot \log_{10} \left(

rac{P_{out}}{P_{in}} ight)