piel.models.physical.electrical.transmission_lines.microstrip
=============================================================

.. py:module:: piel.models.physical.electrical.transmission_lines.microstrip


Functions
---------

.. autoapisummary::

   piel.models.physical.electrical.transmission_lines.microstrip.epsilon_e
   piel.models.physical.electrical.transmission_lines.microstrip.Z_0
   piel.models.physical.electrical.transmission_lines.microstrip.alpha_c
   piel.models.physical.electrical.transmission_lines.microstrip.R_s


Module Contents
---------------

.. py:function:: epsilon_e(epsilon_r, width_m, dielectric_thickness_m)

   Calculate the effective dielectric constant (ε_e) for a microstrip.

   The effective dielectric constant accounts for the field distribution
   between the microstrip and the substrate, influencing signal propagation.

   :param epsilon_r: Relative permittivity (dielectric constant) of the substrate.
   :type epsilon_r: float
   :param width_m: Width of the microstrip line (meters).
   :type width_m: float
   :param dielectric_thickness_m: Thickness of the substrate (meters).
   :type dielectric_thickness_m: float

   :returns: **epsilon_e** -- Effective dielectric constant.
   :rtype: float

   .. rubric:: References

   Equation (2):
       ε_e = (ε_r + 1)/2 + (ε_r - 1)/2 * 1/sqrt(1 + 12*dielectric_thickness_m/width_m)


.. py:function:: Z_0(width_m, dielectric_thickness_m, epsilon_e)

   Calculate the characteristic impedance (Z₀) of a microstrip.

   The characteristic impedance represents the inherent resistance that
   the transmission line presents to the signal propagating through it.

   :param width_m: Width of the microstrip line (meters).
   :type width_m: float
   :param dielectric_thickness_m: Thickness of the substrate (meters).
   :type dielectric_thickness_m: float
   :param epsilon_e: Effective dielectric constant of the microstrip.
   :type epsilon_e: float

   :returns: **characteristic_impedance_ohms** -- Characteristic impedance in Ohms.
   :rtype: float

   .. rubric:: References

   Equation (1):
       Z₀ = 120π / [√ε_e * (width_m/dielectric_thickness_m + 1.393 + 0.667 ln(width_m/dielectric_thickness_m + 1.444))]


.. py:function:: alpha_c(surface_resistance_ohms, characteristic_impedance_ohms, width_m)

   Calculate the attenuation constant (α_c) in decibels per meter (dB/m).

   The attenuation constant measures how much signal is lost per meter due
   to resistive (ohmic) losses in the conductor of the microstrip line.

   :param surface_resistance_ohms: Surface resistance of the conductor (Ohms).
   :type surface_resistance_ohms: float
   :param characteristic_impedance_ohms: Characteristic impedance of the microstrip (Ohms).
   :type characteristic_impedance_ohms: float
   :param width_m: Width of the microstrip line (meters).
   :type width_m: float

   :returns: **alpha_c** -- Attenuation constant in dB/m.
   :rtype: float

   .. rubric:: References

   Equation (3):
       α_c (dB/m) = 8.68588 * (R_s / (Z₀ * width_m))


.. py:function:: R_s(frequency_Hz, conductivity_S_per_m, permeability_free_space=mu_0.value)

   Calculate the surface resistivity (R_s) of a conductor at a given frequency.

   The surface resistivity is a measure of how much a conductor resists current
   flow along its surface, and it increases with frequency due to the skin effect.

   :param frequency_Hz: Frequency at which the resistivity is calculated (Hz).
   :type frequency_Hz: float
   :param conductivity_S_per_m: Electrical conductivity of the conductor (S/m).
   :type conductivity_S_per_m: float
   :param permeability_free_space: Permeability of free space (H/m). Default is the value from mu_0.
   :type permeability_free_space: float, optional

   :returns: * **surface_resistance_ohms** (*float*) -- Surface resistivity in Ohms.
             * *Formula*
             * *-------*
             * *R_s = sqrt(ω * μ₀ / (2 * σ))*
             * *Where*
             * *ω = 2π * frequency_Hz (angular frequency in rad/s)*
             * *μ₀ = Permeability of free space (H/m)*
             * *σ = Conductivity (S/m)*


