.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/communications/antennas/plot_02_carter_half_wave_dipole.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via JupyterLite. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_communications_antennas_plot_02_carter_half_wave_dipole.py: Carter's half-wave dipole (1932) ================================ The half-wave dipole is the reference antenna of radio engineering. With the sinusoidal current a thin wire carries, its far field varies as :math:`\cos(\tfrac\pi2\cos\theta)/\sin\theta` (:func:`~engineeringkit.communications.half_wave_dipole_pattern`), a little narrower than the :math:`\sin\theta` of a short dipole. Integrating the radiated power gives a directivity of 1.64, or 2.15 dBi (:func:`~engineeringkit.communications.half_wave_dipole_directivity`), and a radiation resistance of 73 ohms (:func:`~engineeringkit.communications.half_wave_dipole_resistance`). Philip Carter of RCA put such calculations in circuit form in 1932: his induced-EMF method gave the self- and mutual impedances of dipoles, the basis of every array design that followed. .. GENERATED FROM PYTHON SOURCE LINES 20-33 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from scipy import integrate from engineeringkit.communications import ( FREE_SPACE_IMPEDANCE, directivity, half_wave_dipole_directivity, half_wave_dipole_pattern, half_wave_dipole_resistance, ) from engineeringkit.communications.visualizers import plot_antenna_pattern .. GENERATED FROM PYTHON SOURCE LINES 34-36 Directivity and radiation resistance ------------------------------------ .. GENERATED FROM PYTHON SOURCE LINES 36-50 .. code-block:: Python theta = np.linspace(0, np.pi, 4001) half_wave = half_wave_dipole_pattern(theta) ** 2 short = np.sin(theta) ** 2 D_half, D_short = directivity(theta, half_wave), directivity(theta, short) print(f"directivity: short dipole {D_short:.4f}, half-wave {D_half:.4f} (closed form {half_wave_dipole_directivity():.4f})") assert np.isclose(D_short, 1.5, rtol=1e-5) and np.isclose(D_half, half_wave_dipole_directivity(), rtol=1e-5) # Radiated power with feed current I0: P = (eta I0^2 / 4 pi) * integral of F^2 sin(theta) d(theta). integral, _ = integrate.quad(lambda th: np.cos(np.pi / 2 * np.cos(th)) ** 2 / np.sin(th), 1e-9, np.pi - 1e-9) R = FREE_SPACE_IMPEDANCE / (2 * np.pi) * integral print(f"radiation resistance {R:.2f} ohm (closed form {half_wave_dipole_resistance():.2f} ohm)") assert np.isclose(R, half_wave_dipole_resistance(), rtol=1e-6) .. rst-class:: sphx-glr-script-out .. code-block:: none directivity: short dipole 1.5000, half-wave 1.6409 (closed form 1.6409) radiation resistance 73.08 ohm (closed form 73.08 ohm) .. GENERATED FROM PYTHON SOURCE LINES 51-53 Beamwidth --------- .. GENERATED FROM PYTHON SOURCE LINES 53-69 .. code-block:: Python half_power = theta[(half_wave >= 0.5) & (theta <= np.pi / 2)][0] beamwidth = np.degrees(np.pi - 2 * half_power) print(f"half-power beamwidth: half-wave {beamwidth:.1f} deg, short dipole 90 deg") assert abs(beamwidth - 78) < 0.5 full = np.linspace(0, 2 * np.pi, 721) fig, axes = plt.subplots(1, 2, figsize=(10, 4.4), subplot_kw={"projection": "polar"}) plot_antenna_pattern(full, half_wave_dipole_pattern(full) ** 2, ax=axes[0], label="half-wave") plot_antenna_pattern(full, np.sin(full) ** 2, ax=axes[0], label="short dipole") axes[0].set_title("Power patterns (axis vertical)") plot_antenna_pattern(full, half_wave_dipole_pattern(full) ** 2, ax=axes[1], db_range=30) axes[1].set_title("Half-wave dipole [dB]") fig.tight_layout() plt.show() .. image-sg:: /api/gallery/communications/antennas/images/sphx_glr_plot_02_carter_half_wave_dipole_001.png :alt: Power patterns (axis vertical), Half-wave dipole [dB] :srcset: /api/gallery/communications/antennas/images/sphx_glr_plot_02_carter_half_wave_dipole_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none half-power beamwidth: half-wave 78.0 deg, short dipole 90 deg .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.148 seconds) .. _sphx_glr_download_api_gallery_communications_antennas_plot_02_carter_half_wave_dipole.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: lite-badge .. image:: images/jupyterlite_badge_logo.svg :target: ../../../../lite/lab/index.html?path=api/gallery/communications/antennas/plot_02_carter_half_wave_dipole.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_02_carter_half_wave_dipole.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_02_carter_half_wave_dipole.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_02_carter_half_wave_dipole.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_