.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/electrical_engineering/ac_circuits/plot_03_lodge_resonance.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_electrical_engineering_ac_circuits_plot_03_lodge_resonance.py: Lodge's syntonic tuning: series resonance (1897) ================================================ Early spark transmitters splattered energy over a wide band, so every receiver heard every transmitter. Oliver Lodge's 1897 patent on "syntonic" telegraphy put an inductance in series with the antenna's capacitance at both ends, tuning transmitter and receiver to the same frequency :math:`f_0 = 1/2\pi\sqrt{LC}` (:func:`~engineeringkit.electrical_engineering.resonance_frequency`). At resonance the inductive and capacitive reactances cancel and the current is limited only by the resistance; the sharpness of the peak is the quality factor :math:`Q = \sqrt{L/C}/R`, and the half-power bandwidth is :math:`f_0/Q`. Marconi bought the patent in 1912. This example measures the bandwidth of a tuned circuit (:class:`~engineeringkit.electrical_engineering.SeriesRLC`) and shows how much tuning rejects a neighbouring station. .. GENERATED FROM PYTHON SOURCE LINES 21-26 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from engineeringkit.electrical_engineering import SeriesRLC, resonance_frequency .. GENERATED FROM PYTHON SOURCE LINES 27-29 A tuned receiver ---------------- .. GENERATED FROM PYTHON SOURCE LINES 29-45 .. code-block:: Python L, C = 250e-6, 1e-9 f0 = resonance_frequency(L, C) print(f"f0 = {f0 / 1e3:.1f} kHz") f = np.linspace(0.7 * f0, 1.3 * f0, 200_001) fig, ax = plt.subplots() for R in (5.0, 20.0, 50.0): circuit = SeriesRLC(R, L, C) gain = np.abs(1 / circuit.impedance(2 * np.pi * f)) * R # current relative to its peak band = f[gain >= 1 / np.sqrt(2)] width = band[-1] - band[0] Q = circuit.quality_factor print(f"R = {R:4.0f} ohm: Q = {Q:6.1f}, half-power bandwidth {width:7.0f} Hz, f0/Q = {f0 / Q:7.0f} Hz") assert np.isclose(width, f0 / Q, rtol=1e-3) ax.plot(f / 1e3, gain, label=f"Q = {Q:.0f}") .. image-sg:: /api/gallery/electrical_engineering/ac_circuits/images/sphx_glr_plot_03_lodge_resonance_001.png :alt: plot 03 lodge resonance :srcset: /api/gallery/electrical_engineering/ac_circuits/images/sphx_glr_plot_03_lodge_resonance_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none f0 = 318.3 kHz R = 5 ohm: Q = 100.0, half-power bandwidth 3182 Hz, f0/Q = 3183 Hz R = 20 ohm: Q = 25.0, half-power bandwidth 12732 Hz, f0/Q = 12732 Hz R = 50 ohm: Q = 10.0, half-power bandwidth 31831 Hz, f0/Q = 31831 Hz .. GENERATED FROM PYTHON SOURCE LINES 46-51 Rejecting a neighbour --------------------- A second station 10% higher in frequency is attenuated by the high-:math:`Q` circuit far more than by the low-:math:`Q` one. .. GENERATED FROM PYTHON SOURCE LINES 51-63 .. code-block:: Python neighbour = 1.1 * f0 rejection = [abs(SeriesRLC(R, L, C).impedance(2 * np.pi * neighbour)) / R for R in (5.0, 50.0)] print(f"neighbour 10% away is {rejection[0]:.1f}x weaker at Q=100, {rejection[1]:.2f}x at Q=10") detuning = neighbour / f0 - f0 / neighbour assert np.allclose(rejection, [np.sqrt(1 + (q * detuning) ** 2) for q in (100, 10)]) ax.axvline(neighbour / 1e3, color="gray", ls=":", label="neighbouring station") ax.set(xlabel="frequency [kHz]", ylabel="relative current", title="Series resonance") ax.legend() plt.show() .. rst-class:: sphx-glr-script-out .. code-block:: none neighbour 10% away is 19.1x weaker at Q=100, 2.16x at Q=10 .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.036 seconds) .. _sphx_glr_download_api_gallery_electrical_engineering_ac_circuits_plot_03_lodge_resonance.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/electrical_engineering/ac_circuits/plot_03_lodge_resonance.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_03_lodge_resonance.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_03_lodge_resonance.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_03_lodge_resonance.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_