Invntr
Source

All instruments

antenna_array

Linear antenna array of equally spaced isotropic elements: the array factor against angle from the array axis for N elements, spacing in wavelengths and a progressive phase step (or a steering angle), with uniform, binomial, Dolph-Chebyshev or custom symmetric amplitude taper.

Gives beam direction, half-power and first-null beamwidths, every null, first and highest sidelobe, directivity (exact sum), and a grating-lobe check.

Array factor only: element pattern, mutual coupling and losses are not modelled.

Field
Waves, optics and circuits
Version
0.1.0
Runs as
Compiled (Rust)
Typical run
0.05 s

Compiled from source: run sh packs/install.sh once before admitting it.

Known answers it must pass

Admission replayantenna_array 0.1.0 · files f46a84d05c30…4b26
  1. r0001uniform broadside N = 4, d = λ/2 (Balanis, Antenna Theory, sec. 6.3): nulls at cos(θ) = m λ/(N d) = 0, ±1/2, ±1 → 0, 60, 120, 180°; AF = cos(ψ/2) cos(ψ), so the sidelobe is 2/(3 √6) = -11.3033 dB and the half-power point solves cos(ψ/2) cos(ψ) = 1/√2; half-wave spacing gives D = N = 4; closed forms, 10⁻⁶passed

    beam_angle_deg90 ± 10⁻⁹90lockedunder 0.01 % of the tolerance used
    null_count= 44lockedexact match
    nulls_deg.0= 0, within 1.000000 × 10⁻⁶reading not recorded on this page
    nulls_deg.1= 60, within 1.000000 × 10⁻⁶reading not recorded on this page
    nulls_deg.2= 120, within 1.000000 × 10⁻⁶reading not recorded on this page
    nulls_deg.3= 180, within 1.000000 × 10⁻⁶reading not recorded on this page
    fnbw_deg60 ± 10⁻⁶60lockedunder 0.01 % of the tolerance used
    first_sidelobe_db-11.3033 ± 10⁻⁶-11.3033lockedunder 0.01 % of the tolerance used
    hpbw_deg26.323 ± 10⁻⁶26.323lockedunder 0.01 % of the tolerance used
    directivity4 ± 4 × 10⁻⁹4lockedunder 0.01 % of the tolerance used
    grating_lobe_free= truetruelockedexact match
  2. r0002uniform broadside N = 3, d = λ/2: AF = (1 + 2 cos ψ)/3, nulls at cos(θ) = ±2/3, one sidelobe each side at endfire of level 1/3 = -9.5424 dB, D = N = 3; closed forms, 10⁻⁶passed

    null_count= 22lockedexact match
    first_null_low_deg48.1897 ± 10⁻⁶48.1897lockedunder 0.01 % of the tolerance used
    first_null_high_deg131.81 ± 10⁻⁶131.81lockedunder 0.01 % of the tolerance used
    sidelobe_count= 22lockedexact match
    first_sidelobe_db-9.54243 ± 10⁻⁶-9.54243lockedunder 0.01 % of the tolerance used
    directivity3 ± 3 × 10⁻⁹3lockedunder 0.01 % of the tolerance used
  3. r0003two elements in phase, d = λ/2: AF = cos((π/2) cos θ), no sidelobe, nulls on the axis (0 and 180°), half power at cos(θ) = ±1/2 so HPBW = 60°, D = 2; closed forms, 10⁻⁶passed

    sidelobe_count= 00lockedexact match
    first_sidelobe_db= lockedexact match
    hpbw_deg60 ± 10⁻⁶60lockedunder 0.01 % of the tolerance used
    first_null_low_deg0 ± 10⁻⁶0lockedunder 0.01 % of the tolerance used
    first_null_high_deg180 ± 10⁻⁶180lockedunder 0.01 % of the tolerance used
    directivity2 ± 2 × 10⁻⁹2lockedunder 0.01 % of the tolerance used
  4. r0004two elements in phase, d = λ/4: D = 2/(1 + sin(k d)/(k d)) = 2/(1 + 2/π) = 1.2220309 (Kraus, Antennas, two isotropic sources); no null and no sidelobe (the pattern is exactly at half power on the axis, cos²(π/4) = 1/2, so the beamwidth is not graded); closed form, 10⁻⁹passed

    directivity1.22203 ± 1.2 × 10⁻⁹1.22203lockedunder 0.01 % of the tolerance used
    null_count= 00lockedexact match
    sidelobe_count= 00lockedexact match
  5. r0005steering, N = 8, d = λ/2, β = -90°: peak where k d cos(θ) + β = 0 → cos(θ) = 1/2, 60°; first nulls at ψ = ±2 π/N → cos(θ) = 3/4 and 1/4; half-power point solves sin(4 ψ)/(8 sin(ψ/2)) = 1/√2; half-wave spacing gives D = N = 8 at any scan; closed forms, 10⁻⁶passed

    beam_angle_deg60 ± 10⁻⁹60lockedunder 0.01 % of the tolerance used
    first_null_low_deg41.4096 ± 10⁻⁶41.4096lockedunder 0.01 % of the tolerance used
    first_null_high_deg75.5225 ± 10⁻⁶75.5225lockedunder 0.01 % of the tolerance used
    fnbw_deg34.1129 ± 10⁻⁶34.1129lockedunder 0.01 % of the tolerance used
    hpbw_deg14.8356 ± 10⁻⁶14.8356lockedunder 0.01 % of the tolerance used
    directivity8 ± 8 × 10⁻⁹8lockedunder 0.01 % of the tolerance used
    max_spacing_no_grating_wavelengths0.666667 ± 6.7 × 10⁻¹⁰0.666667lockedunder 0.01 % of the tolerance used
  6. r0006ordinary endfire, N = 10, d = λ/4, β = -k d = -90° (Balanis sec. 6.3.3): beam on the axis, first null at cos(θ) = 1 - λ/(N d) = 0.6 → 53.1301°, FNBW twice that; HPBW = 2 acos(1 - psi_h/(k d)) with sin(5 psi_h)/(10 sin(psi_h/2)) = 1/√2; every lag term sin(2 l k d) vanishes so D = N = 10; closed forms, 10⁻⁶passed

    beam_angle_deg0 ± 10⁻⁶0lockedunder 0.01 % of the tolerance used
    first_null_high_deg53.1301 ± 10⁻⁶53.1301lockedunder 0.01 % of the tolerance used
    fnbw_deg106.26 ± 10⁻⁶106.26lockedunder 0.01 % of the tolerance used
    hpbw_deg69.4185 ± 10⁻⁶69.4185lockedunder 0.01 % of the tolerance used
    directivity10 ± 10⁻⁸10lockedunder 0.01 % of the tolerance used
  7. r0007large-N asymptotes at N = 200, d = λ/2: first sidelobe tends to the sinc value -13.2615 dB (tan x = x at x = 4.4934; the N = 200 value differs by x²/(6 N²) = 0.0007 dB, so abs_tol 0.002 dB) and HPBW tends to 0.8859 λ/(N d) rad = 0.50758° (terms of order 1/N² dropped, so rel_tol 10⁻⁴); D = N = 200 exactlypassed

    first_sidelobe_db-13.2615 ± 0.002-13.2607locked37 % of the tolerance used
    hpbw_deg0.507579 ± 5.1 × 10⁻⁵0.507586locked14 % of the tolerance used
    directivity200 ± 2 × 10⁻⁷200lockedunder 0.01 % of the tolerance used
    null_count= 200200lockedexact match
  8. r0008Dolph-Chebyshev N = 10, 26 dB, d = λ/2 (Dolph 1946): AF = T₉(x₀ cos(ψ/2)), T₉(x₀) = R: every sidelobe at -26 dB, first nulls where x₀ cos(ψ/2) = cos(π/18), half power where T₉ = R/√2 → cosh(acosh(R/√2)/9)/x₀; closed forms, 10⁻⁶passed

    first_sidelobe_db-26 ± 10⁻⁶-26lockedunder 0.01 % of the tolerance used
    max_sidelobe_db-26 ± 10⁻⁶-26lockedunder 0.01 % of the tolerance used
    first_null_low_deg73.9909 ± 10⁻⁶73.9909lockedunder 0.01 % of the tolerance used
    first_null_high_deg106.009 ± 10⁻⁶106.009lockedunder 0.01 % of the tolerance used
    hpbw_deg12.3459 ± 10⁻⁶12.3459lockedunder 0.01 % of the tolerance used
    null_count= 1010lockedexact match
  9. r0009Dolph-Chebyshev N = 3, 20 dB (R = 10): T₂(x₀ cos(ψ/2)) = (x₀² - 1) + x₀² cos(ψ) with x₀² = (R + 1)/2, so centre/edge = 2 (R - 1)/(R + 1) = 18/11 and the sidelobe is -20 dB; closed forms, 10⁻⁹ and 10⁻⁶ dBpassed

    centre_over_edge1.63636 ± 1.6 × 10⁻⁹1.63636lockedunder 0.01 % of the tolerance used
    max_sidelobe_db-20 ± 10⁻⁶-20lockedunder 0.01 % of the tolerance used
  10. r0010Dolph-Chebyshev weights N = 8, 30 dB, d = λ/2: T₇(x₀ z), z = cos(ψ/2), x₀ = cosh(acosh(10¹.5)/7), expanded as a polynomial in z and turned into harmonics with cos^p = 2^-p sum C(p, j) cos((p - 2j) ψ/2) (algebra, not the program's Fourier sum): weights 0.26221649, 0.51874705, 0.81196007, 1 (largest = 1); half-wave broadside so D = (sum a)²/sum a² = 6.7328972; first null where x₀ z = cos(π/14); half power where T₇ = R/√2; closed forms, 10⁻⁹ relative and 10⁻⁶ deg or dBpassed

    weights.0= 0.262216, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    weights.1= 0.518747, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    weights.2= 0.81196, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    weights.3= 1, within 1.000000 × 10⁻¹² relativereading not recorded on this page
    weights.7= 0.262216, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    directivity6.7329 ± 6.7 × 10⁻⁹6.7329lockedunder 0.01 % of the tolerance used
    max_sidelobe_db-30 ± 10⁻⁶-30lockedunder 0.01 % of the tolerance used
    first_null_low_deg67.573 ± 10⁻⁶67.573lockedunder 0.01 % of the tolerance used
    hpbw_deg16.4432 ± 10⁻⁶16.4432lockedunder 0.01 % of the tolerance used
    null_count= 88lockedexact match
  11. r0011binomial N = 5, d = λ/2 (Stone's array): AF = cos⁴(ψ/2), no sidelobe, nulls only on the axis, HPBW = 2 asin((2/π) acos(2^(-1/8))) = 30.2826°, D = (sum a)²/sum a² = 256/70; closed forms, 10⁻⁶passed

    sidelobe_count= 00lockedexact match
    null_count= 22lockedexact match
    hpbw_deg30.2826 ± 10⁻⁶30.2826lockedunder 0.01 % of the tolerance used
    directivity3.65714 ± 3.7 × 10⁻⁹3.65714lockedunder 0.01 % of the tolerance used
    centre_over_edge6 ± 6 × 10⁻¹²6lockedunder 0.01 % of the tolerance used
  12. r0012grating lobe: N = 8, d = 0.7 λ steered to 60°: β = -360 (0.7)(0.5) = -126°; d exceeds 1/(1 + |cos 60|) = 2/3 λ, so ψ = -360° is visible at cos(θ) = 1/2 - 1/0.7 → 158.2132°; closed forms, 10⁻⁶passed

    phase_deg-126 ± 10⁻⁹-126lockedunder 0.01 % of the tolerance used
    beam_angle_deg60 ± 10⁻⁹60lockedunder 0.01 % of the tolerance used
    grating_lobe_free= falsefalselockedexact match
    grating_lobe_count= 11lockedexact match
    grating_lobe_angles_deg.0= 158.213211, within 1.000000 × 10⁻⁶reading not recorded on this page
    max_spacing_no_grating_wavelengths0.666667 ± 6.7 × 10⁻¹⁰0.666667lockedunder 0.01 % of the tolerance used
  13. r0013custom weights [1, 3, 3, 1], d = λ/2: AF = cos³(ψ/2) (the N = 4 binomial array given by hand): nulls only on the axis, no sidelobe, D = (sum a)²/sum a² = 64/20 = 3.2, HPBW =2 asin((2/π) acos(2^(-1/6))) = 34.9334°; closed forms, 10⁻⁶passed

    n_elements= 44lockedexact match
    null_count= 22lockedexact match
    sidelobe_count= 00lockedexact match
    directivity3.2 ± 3.2 × 10⁻⁹3.2lockedunder 0.01 % of the tolerance used
    hpbw_deg34.9334 ± 10⁻⁶34.9334lockedunder 0.01 % of the tolerance used
  14. r0014main beam outside visible space: 4 elements at a quarter wavelength with a 180° phase step; |β| = 180° exceeds k d = 90°, so there is no full-strength peak and the verdict must fail (closed form: visible only when |β| ≤ 360° · d/λ)passed

    main_beam_visible= falsefalselockedexact match
    single_main_beam= falsefalselockedexact match
14 of 14 cases passed · sandbox macos-seatbeltrecorded from the kernel in a fresh lab

Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.

Inputs

NameUnitDefaultMeaning
n_elements18Number of elements N. With taper = custom the number of weights is used instead.
spacing_wavelengths10.5Element spacing divided by the wavelength, d / λ.
phase_degdeg0Progressive phase β from one element to the next. 0 is broadside; -360 d / λ is endfire toward 0°. Ignored when steer_angle_deg is given.
steer_angle_degdegOptional: point the beam at this angle from the array axis (90 = broadside); sets β = -360 (d / λ) cos(angle) deg.
taperuniformAmplitude taper. binomial: C(N-1, n), no sidelobes at half-wave spacing. chebyshev: Dolph-Chebyshev, all sidelobes at sidelobe_db. custom: the weights input.
sidelobe_db26Chebyshev taper only: sidelobe level below the main beam, a positive number of dB.
weightstaper = custom only: one real amplitude per element, zero or positive, symmetric about the centre, 2 to 500 values.

Readings

NameUnitMeaning
n_elements1
taper1
spacing_wavelengths1
array_length_wavelengths1(N - 1) d / λ
phase_degdegthe progressive phase used
main_beam_visible1false when |β| > k d: no full-strength peak in visible space
beam_angle_degdegmain-beam direction from the array axis: cos(θ) = -β / (k d)
beam_from_broadside_degdeg90 - beam_angle_deg
hpbw_degdeghalf-power beamwidth; for a beam on the axis, twice the angle from the axis to the half-power point; null when the pattern never drops 3 dB
half_power_low_degdeg
half_power_high_degdeg
fnbw_degdegwidth between the first nulls either side of the main beam
first_null_low_degdeg
first_null_high_degdeg
null_count1
nulls_degdegevery null in 0 to 180°, ascending (first 200; out/nulls.csv holds all)
sidelobe_count1lobe peaks in 0 to 180° other than the main beam and grating lobes
first_sidelobe_dbdB relative to the main beam: the higher of the two lobes next to the main beam; null when there is none
first_sidelobe_angle_degdeg
max_sidelobe_dbdB relative to the main beam: the highest sidelobe (grating lobes are counted separately)
max_sidelobe_angle_degdeg
directivity1peak power over the average over the sphere, isotropic elements
directivity_db10 log10(directivity), dBi
directivity_check_rel_diff1relative gap between the exact sum and Simpson's rule for the sphere average
taper_efficiency1(sum a)² / (N sum a²)
centre_over_edge1largest weight over the end element's weight
weights1element amplitudes, largest = 1 (first 200; out/weights.csv holds all)
grating_lobe_free1true when no second full-strength peak (ψ = 360 m deg) is in visible space
single_main_beamtrue when the main beam is in visible space and no grating lobe is: the verdict
grating_lobe_count1
grating_lobe_angles_degdeg
max_spacing_no_grating_wavelengths11 / (1 + |cos(beam angle)|): below this spacing no grating-lobe peak enters visible space; files: out/pattern.csv, out/lobes.csv, out/nulls.csv, out/weights.csv
warnings1

Try the call

Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.

Terminal
MCP call