<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC " -//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.2 20190208//EN" "JATS-journalpublishing1.dtd">

<!--

File produced by pipelineRunner package (for JATS 2 SCJATS with pipeline SCJATS)
At: 2025-03-04T14:20:45.048Z

Version        : 1.16.1
Last update    : 2024-08-27
Modified by    : dunnm

-->
<article  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  article-type="research-article" xml:lang="en">
  <front>
    <journal-meta>
      <journal-id journal-id-type="publisher-id">rasti</journal-id>
      <journal-title-group>
        <journal-title>RAS Techniques and Instruments</journal-title>
        <abbrev-journal-title abbrev-type="pubmed">RAS Tech. Instrum.</abbrev-journal-title>
        <abbrev-journal-title abbrev-type="publisher">RASTI</abbrev-journal-title>
      </journal-title-group>
      <issn pub-type="epub">2752-8200</issn>
      <publisher>
        <publisher-name>Oxford University Press</publisher-name>
      </publisher>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.1093/rasti/rzae064</article-id>
      <article-id pub-id-type="publisher-id">rzae064</article-id>
      <article-categories>
        <subj-group subj-group-type="category-toc-heading">
          <subject>Article</subject>
          <subj-group subj-group-type="category-toc-heading">
            <subject>Instrumentation, Detectors and Telescopes</subject>
          </subj-group>
        </subj-group>
        <subj-group subj-group-type="category-taxonomy-collection">
          <subject>rasti/6</subject>
        </subj-group>
        <subj-group subj-group-type="category-taxonomy-collection">
          <subject>AcademicSubjects/SCI00010</subject>
          <subject>AcademicSubjects/SCI01970</subject>
          <subject>AcademicSubjects/SCI00020</subject>
          <subject>AcademicSubjects/SCI02275</subject>
          <subject>AcademicSubjects/SCI00380</subject>
        </subj-group>
      </article-categories>
      <title-group>
        <article-title>RFSoC receiver calibration system for 21-cm global spectrum experiments from space: the CosmoCube case</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author" corresp="yes">
          <contrib-id contrib-id-type="orcid">https://orcid.org/0009-0004-8965-0671</contrib-id>
          <name>
            <surname>Zhu</surname>
            <given-names>Jiacong</given-names>
          </name>
          <email xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple">zhujiacong@nao.cas.cn</email>
          <aff>
            <institution>National Astronomical Observatory, Chinese Academy of Science</institution>, <addr-line>20A Datun Road, Beijing 100101</addr-line>, <country country="CN">China</country></aff>
          <aff>
            <institution>School of Astronomy and Space Science, University of Chinese Academy of Sciences</institution>, <addr-line>Beijing 100049</addr-line>, <country country="CN">China</country></aff>
          <xref ref-type="corresp" rid="cor1" />
        </contrib>
        <contrib contrib-type="author" corresp="yes">
          <name>
            <surname>Acedo</surname>
            <given-names>Eloy de Lera</given-names>
          </name>
          <email xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple">ed330@cam.ac.uk</email>
          <aff>
            <institution>Cavendish Astrophysics, University of Cambridge</institution>, <addr-line>Cambridge CB3 0HE</addr-line>, <country country="GB">UK</country></aff>
          <aff>
            <institution>Kavli Institute for Cosmology, University of Cambridge</institution>, <addr-line>Cambridge CB3 0HE</addr-line>, <country country="GB">UK</country></aff>
          <xref ref-type="corresp" rid="cor2" />
        </contrib>
        <contrib contrib-type="author">
          <contrib-id contrib-id-type="orcid">https://orcid.org/0000-0001-8510-5159</contrib-id>
          <name>
            <surname>Artuc</surname>
            <given-names>Kaan</given-names>
          </name>
          <aff>
            <institution>Cavendish Astrophysics, University of Cambridge</institution>, <addr-line>Cambridge CB3 0HE</addr-line>, <country country="GB">UK</country></aff>
          <aff>
            <institution>Kavli Institute for Cosmology, University of Cambridge</institution>, <addr-line>Cambridge CB3 0HE</addr-line>, <country country="GB">UK</country></aff>
        </contrib>
        <contrib contrib-type="author" corresp="yes">
          <contrib-id contrib-id-type="orcid">https://orcid.org/0000-0001-6475-8863</contrib-id>
          <name>
            <surname>Chen</surname>
            <given-names>Xuelei</given-names>
          </name>
          <email xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple">xuelei@cosmology.bao.ac.cn</email>
          <aff>
            <institution>National Astronomical Observatory, Chinese Academy of Science</institution>, <addr-line>20A Datun Road, Beijing 100101</addr-line>, <country country="CN">China</country></aff>
          <aff>
            <institution>School of Astronomy and Space Science, University of Chinese Academy of Sciences</institution>, <addr-line>Beijing 100049</addr-line>, <country country="CN">China</country></aff>
          <aff>
            <institution>Department of Physics, College of Sciences, Northeastern University</institution>, <addr-line>Shenyang 110819</addr-line>, <country country="CN">China</country></aff>
          <xref ref-type="corresp" rid="cor3" />
        </contrib>
      </contrib-group>
      <author-notes>
        <corresp id="cor1">E-mail: <email xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple">zhujiacong@nao.cas.cn</email></corresp>
        <corresp id="cor2">E-mail: <email xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple">ed330@cam.ac.uk</email></corresp>
        <corresp id="cor3">E-mail: <email xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple">xuelei@cosmology.bao.ac.cn</email></corresp>
      </author-notes>
      <pub-date pub-type="cover">
        <year>2025</year>
      </pub-date>
      <pub-date pub-type="collection" iso-8601-date="2025-01-03">
        <day>03</day>
        <month>01</month>
        <year>2025</year>
      </pub-date>
      <pub-date pub-type="epub" iso-8601-date="2025-02-03">
        <day>03</day>
        <month>02</month>
        <year>2025</year>
      </pub-date>
      <volume>4</volume>
      <issue content-type="empty" />
      <elocation-id>rzae064</elocation-id>
      <history>
        <date date-type="received">
          <day>10</day>
          <month>05</month>
          <year>2024</year>
        </date>
        <date date-type="rev-recd">
          <day>29</day>
          <month>10</month>
          <year>2024</year>
        </date>
        <date date-type="accepted">
          <day>18</day>
          <month>12</month>
          <year>2024</year>
        </date>
        <date date-type="corrected-typeset">
          <day>07</day>
          <month>02</month>
          <year>2025</year>
        </date>
      </history>
      <permissions>
        <copyright-statement>© 2025 The Author(s) Published by Oxford University Press on behalf of Royal Astronomical Society.</copyright-statement>
        <copyright-year>2025</copyright-year>
        <license xmlns:xlink="http://www.w3.org/1999/xlink" license-type="cc-by-nc-nd" xlink:href="https://creativecommons.org/licenses/by-nc-nd/4.0/">
          <license-p>This is an Open Access article distributed under the terms of the Creative Commons Attribution-NonCommercial-NoDerivs License (<ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by-nc-nd/4.0/">https://creativecommons.org/licenses/by-nc-nd/4.0/</ext-link>), which permits non-commercial reproduction and distribution of the work, in any medium, provided the original work is not altered or transformed in any way, and that the work is properly cited. For commercial re-use, please contact <email xlink:type="simple">journals.permissions@oup.com</email></license-p>
        </license>
      </permissions>
      <self-uri xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064.pdf" />
      <abstract abstract-type="abstract">
        <title>ABSTRACT</title>
        <p>The CosmoCube project plans to deploy a global 21-cm spectrometer with 10–100 MHz observation band in a lunar orbit. The farside part of such an orbit, i.e. the part of orbit behind the Moon, offers an ideal site for accurately measuring the 21-cm signal from the dark ages, cosmic dawn, and epoch of reionization, as the effects of the Earth’s ionosphere, artificial radio frequency interference, and complex terrain and soil are all avoided. Given the limitations of a satellite platform, we propose a receiver calibration system design based on a radio frequency system-on-chip, consisting of a vector network analyser (VNA) subsystem, and a source switching subsystem. We introduce the measurement principle of the VNA, and discuss the effect of quantization error. The accuracy, stability, and trajectory noise of the VNA are tested in laboratory experiments. We also present the design of the source-switching subsystem, generating mock data sets, showing that the imperfect return loss, insertion loss, and isolation of surface-mounted microwave switches have a minimal effect on the sky foreground fitting residuals, which are within <inline-formula><tex-math id="TM0001" notation="LaTeX"><![CDATA[$\pm 10$]]></tex-math></inline-formula> mK under optimal fitting condition. When all possible measurement errors in reflection coefficients and physical temperatures are taken into account, the foreground fitting residuals for the 50–90 MHz part of the spectrum remain around <inline-formula><tex-math id="TM0002" notation="LaTeX"><![CDATA[$\pm 20$]]></tex-math></inline-formula> mK.</p>
      </abstract>
      <kwd-group>
        <kwd>Instrumentation</kwd>
        <kwd>Radio Astronomy</kwd>
        <kwd>Dark Ages</kwd>
        <kwd>21 cm Cosmology</kwd>
        <kwd>Calibration</kwd>
      </kwd-group>
      <funding-group>
        <award-group award-type="grant">
          <funding-source>
            <institution-wrap>
              <institution>STFC</institution>
              <institution-id institution-id-type="DOI">10.13039/501100000271</institution-id>
            </institution-wrap>
          </funding-source>
        </award-group>
        <award-group award-type="grant">
          <funding-source>
            <institution-wrap>
              <institution>Chinese Academy of Sciences</institution>
              <institution-id institution-id-type="DOI">10.13039/501100002367</institution-id>
            </institution-wrap>
          </funding-source>
          <award-id>ZDKYYQ20200008</award-id>
        </award-group>
        <award-group award-type="grant">
          <funding-source>
            <institution-wrap>
              <institution>National Natural Science Foundation</institution>
            </institution-wrap>
          </funding-source>
          <award-id>12361141814</award-id>
        </award-group>
      </funding-group>
      <counts>
        <page-count count="14" />
      </counts>
    </article-meta>
  </front>
  <body>
    <sec id="sec1" sec-type="intro">
      <label>1</label>
      <title>INTRODUCTION</title>
      <p>The 21-cm spectral line produced by the hyperfine transition of neutral hydrogen is a good tracer in the study of dark ages, cosmic dawn and epoch of reionization. We try to measure it at low radio frequencies because of cosmological redshift. One 21-cm probe is the sky-averaged signal measured with a wide beam antenna. This is a measurement of great challenge because the Galactic synchrotron radiation foreground is about <inline-formula><tex-math id="TM0003" notation="LaTeX"><![CDATA[$\sim$]]></tex-math></inline-formula>4–5 orders of magnitude stronger. There are many ongoing ground-based experiments, such as EDGES (Bowman et al. <xref ref-type="bibr" rid="bib3">2018</xref>), SARAS3 (Singh et al. <xref ref-type="bibr" rid="bib25">2022</xref>), LEDA (Price et al. <xref ref-type="bibr" rid="bib18">2018</xref>), PRIZM (Philip et al. <xref ref-type="bibr" rid="bib16">2019</xref>), REACH (de Lera Acedo et al. <xref ref-type="bibr" rid="bib9">2022</xref>), and many other experiments. However, the observation frequency for most ground experiments cannot go below <inline-formula><tex-math id="TM0004" notation="LaTeX"><![CDATA[$\sim$]]></tex-math></inline-formula>30–40 MHz due to the ionosphere absorption. Additionally, spectrum measurement above 30 MHz will also be affected by ionosphere opacity and distortion. Moreover, artificial radio frequency interference (RFI) and complex ground and soil conditions will distort the spectrum.</p>
      <p>Lunar orbit is an ideal site which is devoid of these issues. The moon can help shield the RFI from earth (McKinley et al. <xref ref-type="bibr" rid="bib12">2012</xref>), and the strong solar emission caused by flares and coronal activity (Mercier &amp; Trottet <xref ref-type="bibr" rid="bib13">1997</xref>). The absence of the ionosphere allows observation frequencies to go below <inline-formula><tex-math id="TM0005" notation="LaTeX"><![CDATA[$\sim$]]></tex-math></inline-formula>30–40 MHz, which corresponds to the dark ages. In space, there is no spectrum distortion caused by ionosphere, ground, or soil. There are a number of proposals of lunar-based space 21-cm global spectrum experiments. Burns et al. (<xref ref-type="bibr" rid="bib5">2012</xref>) proposed a global spectrum measurement mission called the Dark Ages Radio Explorer (DARE), it is designed to observe 21-cm global spectrum above the lunar far side over 40 to 120 MHz with electrically short, by-conical dipole antennas. More recently, Burns et al. (<xref ref-type="bibr" rid="bib6">2021</xref>) proposed another mission concept called Dark Ages Polarimeter PathfindER (DAPPER), which will use a SmallSat with a total volume of <inline-formula><tex-math id="TM0006" notation="LaTeX"><![CDATA[$\lt 1\mathrm{m}^3$]]></tex-math></inline-formula> to observe global spectrum over the 10–110 MHz band on orbit above the lunar far side. Chen et al. (<xref ref-type="bibr" rid="bib7">2019</xref>) proposed the Discovering Sky at the Longest Wavelengths (DSL), also known as the Hongmeng project (Chen et al. <xref ref-type="bibr" rid="bib8">2023</xref>), planning to launch an array of satellites into lunar orbit. Most of them will form a linear array making interferometric observations below 30 MHz, another one satellite will make high precision global spectrum measurement above 30 MHz. Rao et al. (<xref ref-type="bibr" rid="bib19">2023</xref>) proposed the Probing ReionizATion of the Universe using Signal from Hydrogen (PRATUSH), aiming to precisely measure the global 21-cm spectrum over 40 to 200 MHz in lunar orbit with a mono-cone antenna and a 2<inline-formula><tex-math id="TM0007" notation="LaTeX"><![CDATA[$\times$]]></tex-math></inline-formula>12U bus containing a radio frequency system and a digital receiver.</p>
      <p>CosmoCube is a project led by the University of Cambridge, to perform global 21-cm spectrum measurement experiment over the 10–100 MHz using standardized CubeSat to help study the dark ages and cosmic dawn from the far side of lunar orbit (Artuc &amp; de Lera Acedo <xref ref-type="bibr" rid="bib2">2024</xref>). CubeSats are a class of satellites that are standardized in terms of size, mechanical design, electrical design, and operational design. Such standardization significantly reduces both the financial and time costs, enabling space science research to be conducted efficiently. CosmoCube plans to use a 12U CubeSat, which is about 230-mm <inline-formula><tex-math id="TM0008" notation="LaTeX"><![CDATA[$\times$]]></tex-math></inline-formula> 230-mm <inline-formula><tex-math id="TM0009" notation="LaTeX"><![CDATA[$\times$]]></tex-math></inline-formula> 360-mm large, to deliver the instrument. To fit within the CubeSat platform, the instrument must be as lightweight and compact as possible, and must have a very low power consumption.</p>
      <p>The CosmoCube instrument consists a foldable antenna mounted on the exterior of the satellite; a radio frequency (RF) analogue part including the main receiver and calibration system; and a digital receiver for sampling analogue signals, performing a fast Fourier Transform (FFT) to get the spectra, and then store the data for later transmission, etc. Since the RF system and digital receiver will all be enclosed within the space of a 12U CubeSat, CosmoCube uses a Radio Frequency System-on-Chip (RFSoC) as the core component for system design. The RFSoC integrates the analogue to digital converters (ADCs), the field programmable gate array (FPGA) used for digital data processing, central processing unit (CPU), and several peripheral interfaces on a single board. The highly integrated solution can help reduce the size, power consumption, and complexity of the system, providing high performance and flexibility for various RF applications. In addition, due to the volume constraint of the CubeSat, we need to use surface-mounted devices to form the receiver, potentially sacrificing its performance. This paper describes our design for the calibration system, which consists of a vector network analyser (VNA) subsystem and a source switching subsystem as well as their performance simulations and tests.</p>
      <p>This paper is organized as follows. Section <xref ref-type="sec" rid="sec2">2</xref> introduces the digital performance of RFSoC. Section <xref ref-type="sec" rid="sec3">3</xref> describes the calibration method using noise wave parameters. Section <xref ref-type="sec" rid="sec4">4</xref> first describes the VNA design, tests the performance of the VNA through simulation and laboratory tests, then describes the source switching subsystem design, discusses the effect of surface-mounted devices and measurement errors on sky temperature recovery and foreground fitting residuals. Section <xref ref-type="sec" rid="sec5">5</xref> provides concluding remarks.</p>
    </sec>
    <sec id="sec2">
      <label>2</label>
      <title>DIGITAL RECEIVER</title>
      <p>In this instrument, the digital board we use is a Zynq UltraScale+ RFSoC ZCU111 Evaluation Board from Xilinx. This RFSoC (XCZU28DR-2FFVG1517E) integrates eight 12-bit RF analog-to-digital converter (ADC) channels with a maximum sampling rate of 4.096 gigabit samples per second (GSPS), eight 14-bit RF digital-to-analog converter (DAC) channels with a maximum sampling rate of 6.554 GSPS, an FPGA fabric, and two processors. The board offers only RFMC connectors for ADCs and DACs inherently, but the FMC-XM500 RFMC balun add-on board mates with the ZCU111 board, providing SMA connectors to facilitate user development. However, the balun board only provides two ADCs and two DACs setting for low frequency (10–3000 MHz) with 1:2 transformer, which may require future modification to meet the requirements of the CosmoCube project.</p>
      <p>A document from the manufacturer shows that the full-scale input of the ADC is +1 Vpp, corresponding to +4 dBm, for a 50 <inline-formula><tex-math id="TM0010" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula> impedance system (Xilinx <xref ref-type="bibr" rid="bib28">2020</xref>). Some tests characterizing the performance of the DAC and ADC have been conducted (Artuc &amp; de Lera Acedo <xref ref-type="bibr" rid="bib2">2024</xref>). The DAC has two output modes: 32 and 20 mA. Here we adopt the 20 mA mode, although the maximum power will be smaller, the spurious free dynamic range (SFDR) including harmonics is about 71 dBc in single tune measurements over the frequency range of 10–100 MHz, which is better than the 63 dBc in the 32 mA mode. When we use the DAC of the RFSoC to generate continuous wave signals at varying output power levels and receive these signals with a spectrum analyser (a Keysight PNA-X), we observe that if the output power level exceeds −5 dBm, there is a noticeable increase in the noise floor and many spurious harmonics appear. Therefore, in designing the VNA subsystem, to ensure the highest possible signal-to-noise ratio, −5 dBm is the maximum power for measurement. As noted in Artuc &amp; de Lera Acedo (<xref ref-type="bibr" rid="bib2">2024</xref>), the spectrometer design based on RFSoC can achieve an SFDR of 75 dBc and an effective number of bits of 11.3 bits over the frequency range of 10–100 MHz. This performance meets the requirements of low-frequency measurements where the sky temperature is approximately 30 dB higher than the ambient temperature.</p>
    </sec>
    <sec id="sec3" sec-type="materials|methods">
      <label>3</label>
      <title>CALIBRATION METHODOLOGY</title>
      <p>Since the 21-cm signal we aim to detect is extremely weak, approximately on the order of 100 mK, it is necessary to accurately model the system response and systematic noise. The overall design of the receiver calibration system is based on the REACH receiver introduced in Razavi-Ghods et al. (<xref ref-type="bibr" rid="bib20">2023</xref>), incorporating calibration technique developed in Dicke (<xref ref-type="bibr" rid="bib10">1946</xref>) along with noise wave parameters modelling of low noise amplifier (LNA) (Meys <xref ref-type="bibr" rid="bib14">1978</xref>; Rogers &amp; Bowman <xref ref-type="bibr" rid="bib21">2012</xref>).</p>
      <p>First-order calibration of the system can be achieved by using a Dicke switch (Dicke <xref ref-type="bibr" rid="bib10">1946</xref>) to make power spectral density (PSD) measurement on antenna (<inline-formula><tex-math id="TM0011" notation="LaTeX"><![CDATA[$P_{\mathrm{source}}$]]></tex-math></inline-formula>), a noise source (<inline-formula><tex-math id="TM0012" notation="LaTeX"><![CDATA[$P_{\mathrm{L+NS}}$]]></tex-math></inline-formula>), and an ambient 50 <inline-formula><tex-math id="TM0013" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula> load (<inline-formula><tex-math id="TM0014" notation="LaTeX"><![CDATA[$P_{\mathrm{L}}$]]></tex-math></inline-formula>) at a fixed reference plane to the receiver. A preliminary antenna temperature <inline-formula><tex-math id="TM0015" notation="LaTeX"><![CDATA[$T_{\text{source}}^{*}$]]></tex-math></inline-formula> can be calculated using</p>
      <disp-formula id="update1735362547608">
        <label>(1)</label>
        <tex-math id="TM0016" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\begin{aligned} T_{\text{source}}^{*}=T_{\mathrm{NS}}\left(\frac{P_{\text{source }}-P_{\mathrm{L}}}{P_{\mathrm{L+NS}}-P_{\mathrm{L}}}\right)+T_{\mathrm{L}}, \end{aligned}
\end{eqnarray}$$]]></tex-math>
      </disp-formula>
      <p>where <inline-formula><tex-math id="TM0017" notation="LaTeX"><![CDATA[$T_{\text{NS}}$]]></tex-math></inline-formula> and <inline-formula><tex-math id="TM0018" notation="LaTeX"><![CDATA[$T_{\text{L}}$]]></tex-math></inline-formula> represent the excess noise temperature of the noise source and the physical temperature of the ambient 50 <inline-formula><tex-math id="TM0019" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula> load, respectively. This method is mainly used to calibrate out time-dependent system gain arising from the components within the receiver (Rogers &amp; Bowman <xref ref-type="bibr" rid="bib21">2012</xref>). Since the noise source and the 50 <inline-formula><tex-math id="TM0020" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula> load are well matched (the reflection coefficients of them are typically on the order of 0.005 or less, i.e. the reflected temperature is less than 10 mK), we can assume that the signal reflection due to the mismatch can be ignored (Razavi-Ghods et al. <xref ref-type="bibr" rid="bib20">2023</xref>).</p>
      <p>The PSDs for them can be written as:</p>
      <disp-formula id="equ2">
        <label>(2)</label>
        <tex-math id="TM0021" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\begin{aligned} P_{\mathrm{L}}=g_{\text{sys }}\left[T_{\mathrm{L}}\left(1-\left|\Gamma _{\text{rec }}\right|^2\right)+T_0\right] \end{aligned}
\end{eqnarray}$$]]></tex-math>
      </disp-formula>
      <p>and</p>
      <disp-formula id="equ3">
        <label>(3)</label>
        <tex-math id="TM0022" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\begin{aligned} P_{\mathrm{L+NS}}=g_{\mathrm{sys}}\left[\left(T_{\mathrm{L}}+T_{\mathrm{NS}}\right)\left(1-\left|\Gamma _{\mathrm{rec}}\right|^2\right)+T_0\right] \end{aligned}
\end{eqnarray}$$]]></tex-math>
      </disp-formula>
      <p>Here <inline-formula><tex-math id="TM0023" notation="LaTeX"><![CDATA[$\Gamma _{\mathrm{rec}}$]]></tex-math></inline-formula> is the reflection coefficient of the receiver, <inline-formula><tex-math id="TM0024" notation="LaTeX"><![CDATA[$g_{\text{sys}}$]]></tex-math></inline-formula> and <inline-formula><tex-math id="TM0025" notation="LaTeX"><![CDATA[$T_{\text{0}}$]]></tex-math></inline-formula> are the system gain and receiver noise offset, respectively.</p>
      <p>When considering other sources with non-negligible reflection coefficients, the PSD function can be written as (Monsalve et al. <xref ref-type="bibr" rid="bib15">2017</xref>)</p>
      <disp-formula id="equ4">
        <label>(4)</label>
        <tex-math id="TM0026" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\begin{aligned} P_{\text{source}}=&g_{\text{sys}}\left[T_{\text{source}}\left(1-\left|\Gamma _{\text{source}}\right|^2\right)\left|\frac{\sqrt{1-|\Gamma _{\text{rec}}|^2}}{1-\Gamma _{\text{source}}\Gamma _{\text{rec}}}\right|^2\right. \\
& +T_{\text{unc}}\left|\Gamma _{\text{source}}\right|^2\left|\frac{\sqrt{1-|\Gamma _{\text{rec}}|^2}}{1-\Gamma _{\text{source}}\Gamma _{\text{rec}}}\right|^2 \\
& +T_{\cos } \text{Re}\left(\Gamma _{\text{source}} \frac{\sqrt{1-|\Gamma _{\text{rec}}|^2}}{1-\Gamma _{\text{source}}\Gamma _{\text{rec}}}\right) \\
& \left.+T_{\sin } \text{Im}\left(\Gamma _{\text{source}} \frac{\sqrt{1-|\Gamma _{\text{rec}}|^2}}{1-\Gamma _{\text{source}}\Gamma _{\text{rec}}}\right)+T_{\text{0}}\right] . \\
& \end{aligned}
\end{eqnarray}$$]]></tex-math>
      </disp-formula>
      <p>Here, <inline-formula><tex-math id="TM0027" notation="LaTeX"><![CDATA[$T_{\text{source}}$]]></tex-math></inline-formula> is the calibrated input temperature, <inline-formula><tex-math id="TM0028" notation="LaTeX"><![CDATA[$\Gamma _{\text{source}}$]]></tex-math></inline-formula> is the reflection coefficient of the antenna, and <inline-formula><tex-math id="TM0029" notation="LaTeX"><![CDATA[$\Gamma _{\text{rec}}$]]></tex-math></inline-formula> is the reflection coefficient of the receiver. <inline-formula><tex-math id="TM0030" notation="LaTeX"><![CDATA[$T_{\text{unc}}$]]></tex-math></inline-formula>, <inline-formula><tex-math id="TM0031" notation="LaTeX"><![CDATA[$T_{\text{cos}}$]]></tex-math></inline-formula>, <inline-formula><tex-math id="TM0032" notation="LaTeX"><![CDATA[$T_{\text{sin}}$]]></tex-math></inline-formula> are the noise wave parameters of LNA introduced by Meys (<xref ref-type="bibr" rid="bib14">1978</xref>). <inline-formula><tex-math id="TM0033" notation="LaTeX"><![CDATA[$T_{\text{unc}}$]]></tex-math></inline-formula> represents the portion of input noise that is uncorrelated with the noise at the LNA output, while <inline-formula><tex-math id="TM0034" notation="LaTeX"><![CDATA[$T_{\text{cos}}$]]></tex-math></inline-formula> and <inline-formula><tex-math id="TM0035" notation="LaTeX"><![CDATA[$T_{\text{sin}}$]]></tex-math></inline-formula> are components of the correlated portion.</p>
      <p>Substituting the expressions for <inline-formula><tex-math id="TM0036" notation="LaTeX"><![CDATA[$P_{\mathrm{L}}$]]></tex-math></inline-formula>, <inline-formula><tex-math id="TM0037" notation="LaTeX"><![CDATA[$P_{\mathrm{L+NS}}$]]></tex-math></inline-formula>, and <inline-formula><tex-math id="TM0038" notation="LaTeX"><![CDATA[$P_{\mathrm{source}}$]]></tex-math></inline-formula> into the equation (<xref ref-type="disp-formula" rid="update1735362547608">1</xref>), we can get the calibration equation</p>
      <disp-formula id="update1735363069023">
        <label>(5)</label>
        <tex-math id="TM0039" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\begin{aligned} T_{\mathrm{NS}}\left(\frac{P_{\text{source }}-P_{\mathrm{L}}}{P_{\mathrm{L+NS}}-P_{\mathrm{L}}}\right)+T_{\mathrm{L}} & =T_{\text{source }}\left[\frac{1-\left|\Gamma _{\text{source }}\right|^2}{\left|1-\Gamma _{\text{source }} \Gamma _{\text{rec }}\right|^2}\right] \\
& +T_{\text{unc }}\left[\frac{\left|\Gamma _{\text{source }}\right|^2}{\left|1-\Gamma _{\text{source }} \Gamma _{\text{rec }}\right|^2}\right] \\
& +T_{\cos }\left[\frac{\operatorname{Re}\left(\frac{\Gamma _{\text{source }}}{1-\Gamma _{\text{source }} \Gamma _{\text{rec }}}\right)}{\sqrt{1-\left|\Gamma _{\text{rec }}\right|^2}}\right] \\
& +T_{\sin }\left[\frac{\operatorname{Im}\left(\frac{\Gamma _{\text{source }}}{1-\Gamma _{\text{source }} \Gamma _{\text{rec }}}\right)}{\sqrt{1-\left|\Gamma _{\text{rec }}\right|^2}}\right] \end{aligned}
,
\end{eqnarray}$$]]></tex-math>
      </disp-formula>
      <p>which can be simplified as (Roque, Handley &amp; Razavi-Ghods <xref ref-type="bibr" rid="bib22">2021</xref>)</p>
      <disp-formula id="update1735363114136">
        <label>(6)</label>
        <tex-math id="TM0040" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\begin{aligned} T_{\text{source }}=X_{\text{unc }} T_{\mathrm{unc}}+X_{\cos } T_{\cos }+X_{\sin } T_{\mathrm{sin}}+X_{\mathrm{NS}} T_{\mathrm{NS}}+X_{\mathrm{L}} T_{\mathrm{L}} \end{aligned}
.
\end{eqnarray}$$]]></tex-math>
      </disp-formula>
      <p>Using multiple calibrators with different impedance and measuring their reflection coefficients and PSDs, we can obtain the measured quantities (X-terms). With the measured physical temperatures of these sources, we can calculate noise wave parameters <inline-formula><tex-math id="TM0041" notation="LaTeX"><![CDATA[$T_{\text{unc}}$]]></tex-math></inline-formula>, <inline-formula><tex-math id="TM0042" notation="LaTeX"><![CDATA[$T_{\text{cos}}$]]></tex-math></inline-formula>, <inline-formula><tex-math id="TM0043" notation="LaTeX"><![CDATA[$T_{\text{sin}}$]]></tex-math></inline-formula>, <inline-formula><tex-math id="TM0044" notation="LaTeX"><![CDATA[$T_{\text{NS}}$]]></tex-math></inline-formula>, and <inline-formula><tex-math id="TM0045" notation="LaTeX"><![CDATA[$T_{\text{L}}$]]></tex-math></inline-formula>, then recover the sky temperature.</p>
    </sec>
    <sec id="sec4">
      <label>4</label>
      <title>RECEIVER CALIBRATION SYSTEM</title>
      <p>Observations will be conducted on the far side of the lunar orbit, where the change of spacecraft temperature may affect the antenna reflection coefficient. Although the satellite will be equipped with an internal temperature controller, the receiver will inevitably experience temperature drift. So it is necessary to measure the reflection coefficients of different components and calculate noise wave parameters of the LNA in real-time for precise system calibration.</p>
      <p>Fig. <xref ref-type="fig" rid="fig1">1</xref> shows the block diagram of the calibration system in the analogue receiver we will use for simulation and test. The calibration system mainly consists of a VNA subsystem detailed in Section <xref ref-type="sec" rid="sec4-1">4.1</xref>, and a source switching subsystem introduced in Section <xref ref-type="sec" rid="sec4-2">4.2</xref>. We performed simulations to evaluate the measurement accuracy of the receiver. The simulation method is outlined in Section <xref ref-type="sec" rid="sec4-3">4.3</xref>, with the results discussed in Section <xref ref-type="sec" rid="sec4-4">4.4</xref>.</p>
      <sec id="sec4-1">
        <label>4.1</label>
        <title>Vector network analyser subsystem</title>
        <sec id="sec4-1-1">
          <label>4.1.1</label>
          <title>Measurement principles</title>
          <p>We used the DAC and ADC of the RFSoC to build the VNA measurement circuit, as shown within the dashed blue line in Fig. <xref ref-type="fig" rid="fig1">1</xref>. Fig. <xref ref-type="fig" rid="fig2">2</xref> shows the internal algorithms of the RFSoC FPGA. A numerically controlled oscillator (NCO) in the FPGA is used to generate a single-frequency cosine signal <inline-formula><tex-math id="TM0046" notation="LaTeX"><![CDATA[$I = \cos {(2\pi ft)}$]]></tex-math></inline-formula> and a sine signal <inline-formula><tex-math id="TM0047" notation="LaTeX"><![CDATA[$Q = \sin {(2\pi ft)}$]]></tex-math></inline-formula>, where <italic>f</italic> is the frequency and <italic>t</italic> is the time. The signal frequency sweeps across the entire observation band, which is 10–100 MHz for our instrument. The cosine signal is converted to analogue via a DAC, filtered with a direct current (DC) block and passed two cascaded directional couplers before being reflected by the device under test (DUT). The signal flowing out from the coupled port of the first directional coupler DC1 is a portion of the cosine signal generated by the NCO, denoted as <inline-formula><tex-math id="TM0050" notation="LaTeX"><![CDATA[$V_1 = A_1\cos {(2\pi ft+\phi _1)}$]]></tex-math></inline-formula>. The signal flowing out from the coupled port of the second directional coupler DC2 is a portion of the signal reflected by the DUT, denoted as <inline-formula><tex-math id="TM0051" notation="LaTeX"><![CDATA[$V_2 = A_2\cos {(2\pi ft+\phi _2)}$]]></tex-math></inline-formula>. They will be sampled by two ADCs of RFSoC and then mixed with the <italic>I, Q</italic> signal, resulting in four signals <inline-formula><tex-math id="TM0052" notation="LaTeX"><![CDATA[$I_1, Q_1, I_2, Q_2$]]></tex-math></inline-formula>:</p>
          <disp-formula id="equ7">
            <label>(7)</label>
            <tex-math id="TM0053" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\begin{aligned} I_1 &= IV_1 = \frac{1}{2}A_1[\cos (4\pi ft+\phi _1)+\cos (\phi _1)]\\
Q_1 &= QV_1 = \frac{1}{2}A_1[\sin (4\pi ft+\phi _1)-\sin (\phi _1)]\\
I_2 &= IV_2 = \frac{1}{2}A_2[\cos (4\pi ft+\phi _2)+\cos (\phi _2)]\\
Q_2 &= QV_2 = \frac{1}{2}A_2[\sin (4\pi ft+\phi _2)-\sin (\phi _2)] \end{aligned}
\end{eqnarray}$$]]></tex-math>
          </disp-formula>
          <fig id="fig1">
            <label>Figure 1.</label>
            <caption>
              <p>The block diagram of the analogue receiver. ‘SP6T’ is the 6-way microwave switch. ‘SPDT’ is the 2-way microwave switch. ‘DPDT’ is the double pole double throw switch. SP6T2 and two directional couplers 'DC1', 'DC2' constitute the VNA-subsystem. <inline-formula><tex-math id="TM0054" notation="LaTeX"><![CDATA[$\Gamma _{\text{source}}$]]></tex-math></inline-formula> represents the reflection coefficient of the antenna or calibrators, <inline-formula><tex-math id="TM0055" notation="LaTeX"><![CDATA[$\Gamma _{\text{rec}}$]]></tex-math></inline-formula> is the reflection coefficient of the receiver. A microwave switch SPDT1 is used to enhance isolation and reduce antenna signal leakage. The part including SPDT1, SPDT2, SPDT3, SP6T1 and DPDT switches is considered as a multiport microwave network in the mock data sets generation process. The DPDT switch has two different operating states. When the DPDT switch is in state 1, the VNA measures <inline-formula><tex-math id="TM0056" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> of the antenna, calibrators, and the LNA. When the DPDT switch is in state 2, the RFSoC measures the spectrum of antenna and calibrators.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig1.jpeg" mimetype="image" />
          </fig>
          <fig id="fig2">
            <label>Figure 2.</label>
            <caption>
              <p>The internal computation process of the RFSoC FPGA.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig2.jpeg" mimetype="image" />
          </fig>
          <p>Next, we extract the DC components of these four signals by time-averaging, resulting in four DC signals,</p>
          <disp-formula id="update11cf8-14403">
            <label>(8)</label>
            <tex-math id="TM0057" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\begin{aligned} I_{1\rm DC} &= \frac{1}{2}A_1\cos (\phi _1)\\Q_{1\rm DC} &= -\frac{1}{2}A_1\sin (\phi _1)\\I_{2\rm DC} &= \frac{1}{2}A_2\cos (\phi _2)\\Q_{2\rm DC} &= -\frac{1}{2}A_2\sin (\phi _2) \end{aligned}
\end{eqnarray}$$]]></tex-math>
          </disp-formula>
          <p>If <inline-formula><tex-math id="TM0058" notation="LaTeX"><![CDATA[$V_1,V_2$]]></tex-math></inline-formula> represent the incident and reflected voltages of the DUT, the reflection coefficient of DUT can be expressed as:</p>
          <disp-formula id="update1735364099852">
            <label>(9)</label>
            <tex-math id="TM0059" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\Gamma = \frac{A_2}{A_1}e^{i(\phi _2-\phi _1)} = \frac{I_{2\rm DC}-iQ_{2\rm DC}}{I_{1\rm DC}-iQ_{1\rm DC}} .
\end{eqnarray}$$]]></tex-math>
          </disp-formula>
          <p>In the practical case with non-ideal directional couplers, <inline-formula><tex-math id="TM0060" notation="LaTeX"><![CDATA[$V_1$]]></tex-math></inline-formula> and <inline-formula><tex-math id="TM0061" notation="LaTeX"><![CDATA[$V_2$]]></tex-math></inline-formula> are not exactly the incident and reflected voltages of the DUT, and the raw reflection coefficient <inline-formula><tex-math id="TM0062" notation="LaTeX"><![CDATA[$\Gamma$]]></tex-math></inline-formula> is not exactly that of the DUT but needs correction. According to Rytting (<xref ref-type="bibr" rid="bib23">1996</xref>), a single-port vector measurement network can be modelled by a 3-term error model, including the directivity error <inline-formula><tex-math id="TM0063" notation="LaTeX"><![CDATA[$E_D$]]></tex-math></inline-formula>, match error <inline-formula><tex-math id="TM0064" notation="LaTeX"><![CDATA[$E_S$]]></tex-math></inline-formula>, and tracking error <inline-formula><tex-math id="TM0065" notation="LaTeX"><![CDATA[$E_R$]]></tex-math></inline-formula>. By measuring three known standards, these errors can be calculated to determine the true reflection coefficient of the DUT.</p>
          <p>Although, in principle, the errors are eliminated by the VNA calibration process with the open-short-load (OSL) standards, the quantization errors arising from analogue-to-digital conversion could lead to a loss of information. This is particularly noticeable when measuring a 50 <inline-formula><tex-math id="TM0066" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula> load with a very low reflection coefficient or when measuring active components such as LNA with low power. For surface-mounted directional couplers, which is used because of the limited space of the CubeSat, but have higher losses, larger reflection coefficients, and poorer directivity than coaxial directional couplers, this error can be even more significant. In the following subsections, we will investigate the above issues in the RFSoC-based VNA design through simulations and experimentation to assess the measurement accuracy.</p>
        </sec>
        <sec id="sec4-1-2">
          <label>4.1.2</label>
          <title>Quantization error simulation</title>
          <p>We conducted simulation tests using the MATLAB Simulink Platform. A program of VNA measurement simulation built based on the SoC Blockset and SoC Blockset Support Packages for the Xilinx Devices in the MATLAB Simulink library. If the simulation results meet expectations, we can directly generate hardware description language code and deploy it to the RFSoC for laboratory tests, which will be introduced in Section <xref ref-type="sec" rid="sec4-1-3">4.1.3</xref>.</p>
          <p>The configuration of RFSoC data converter should be the same for both simulation and laboratory tests. The stream clock frequency is 256 MHz. Four NCOs are utilized to generate 16-bit signals with the same frequency and adjacent phases, ensuring that the DAC outputs four samples per clock cycle. Similarly, the ADC get four samples per clock cycle. The interpolation factor for DAC and the decimation factor for ADC are both 4. Based on the configuration above, the sampling rate of ADCs and DACs are 4.096 GSPS. The NCO takes a phase increment as input and accumulates it, using the quantized output of accumulator as an index to the lookup table of the sine wave values and then produce accurate single frequency signal. To implement frequency sweeping functionality, a phase increment value is needed by the NCO to generate signals at varying frequencies. This is given by</p>
          <disp-formula id="update1735364443201">
            <label>(10)</label>
            <tex-math id="TM0067" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\Delta \Phi = \text{round}(2^Nf/S),
\end{eqnarray}$$]]></tex-math>
          </disp-formula>
          <p>where <italic>f</italic> is the output frequency, <italic>N</italic> is the length of accumulator word length, <italic>S</italic> is the sampling rate. Due to the phase increment being an integer, the frequency resolution is constrained by the sampling rate and accumulator word length. In this case, the sampling rate, <italic>S</italic> is <inline-formula><tex-math id="TM0072" notation="LaTeX"><![CDATA[$4 \times 256 \text{ MHz} = 1024 \text{ MHz}$]]></tex-math></inline-formula>. To achieve a frequency resolution better than 0.1 MHz, the word length is set to 14. Additionally, we configure the dither bit of NCOs to add some dithering noise to help convert quantized noise to white noise, reducing harmonics and spurious signals. The cost of this is a lower signal-to-noise ratio. We tested different values, and chose a trade-off value of 4.</p>
          <p>After the ADC samples the RF signal and converts it to a digital signal, the FPGA internally executes the mixing process described in equation (<xref ref-type="disp-formula" rid="equ7">7</xref>) and the averaging process described in equation (<xref ref-type="disp-formula" rid="update11cf8-14403">8</xref>). Subsequently, the data are transferred via the AXI bus into the programmable logic module for further computation and storage. In both simulation and laboratory tests, these data will be imported into MATLAB workspace for raw reflection coefficient calculation and calibration.</p>
          <p>In simulation, we assume that the reflection coefficients (i.e. <inline-formula><tex-math id="TM0073" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula>) of the open, short, load calibration standards are constant across the entire frequency band, with respective values of 1, −1, and 0. We choose two different sources, representing the high and low reflection coefficients. Source 1 has an <inline-formula><tex-math id="TM0074" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> magnitude of 0.5, while that of source 2 is 0.02, which is close to the LNA used in the receiver. The phase of both varies linearly with frequency. Additionally, we used several power levels to study the effects of quantization error, including −5, −20, −25, and −30 dBm. We implemented two different calibration methodologies: one is to calibrate with −5 dBm using OSL calibration standards, and then measure the DUTs with varing power levels; the other is calibrating and measuring both with the same power level. To speed up the simulation, the frequency sweep interval is set to be 1 MHz.</p>
          <p>Fig. <xref ref-type="fig" rid="fig3">3</xref> shows the measurement errors when calibrating with −5 dBm power level and measuring with different power levels. The VNA works well when measuring a DUT with a high reflection coefficient, but it exhibits significant frequency structural errors when measuring a DUT with low reflection coefficient using low power. Fig. <xref ref-type="fig" rid="fig4">4</xref> shows the measurement errors when calibrating and measuring with the same power levels. Fig. <xref ref-type="fig" rid="fig5">5</xref> shows that the measurement error is mainly due to the weak reflected signal of the low reflection coefficient DUT, as the structures are fundamentally similar. Errors during low-power measurement are significantly increased due to the introduction of measurement errors in the raw <inline-formula><tex-math id="TM0075" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> of the load calibration standard.</p>
          <fig id="fig3">
            <label>Figure 3.</label>
            <caption>
              <p>Measurement errors in VNA simulation when calibrating with a −5 dBm power level and measuring with different power levels: The first column corresponds to source 1 with <inline-formula><tex-math id="TM0076" notation="LaTeX"><![CDATA[$\Gamma _1 = 0.5\exp {(-i\times 0.01f)}$]]></tex-math></inline-formula>, and the second column to source 2 with <inline-formula><tex-math id="TM0077" notation="LaTeX"><![CDATA[$\Gamma _2 = 0.02\exp {(-i\times 0.01f)}$]]></tex-math></inline-formula>. The first row represents the magnitude errors in dB, and the second row represents the phase errors in degrees. Different coloured lines represent different power levels. The root mean squares (RMS) of the measurement errors are labelled in the legend.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig3.jpeg" mimetype="image" />
          </fig>
          <fig id="fig4">
            <label>Figure 4.</label>
            <caption>
              <p>Measurement errors in VNA simulation when calibrating and measuring with the same power level. The first column corresponds to source 1 and the second column to source 2. Different coloured lines represent different power levels. The RMS of the measurement errors are labelled in the legend.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig4.jpeg" mimetype="image" />
          </fig>
          <fig id="fig5">
            <label>Figure 5.</label>
            <caption>
              <p>Top panel shows the magnitude of raw measurement <inline-formula><tex-math id="TM0078" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula>. Bottom panel shows the magnitude difference between the raw <inline-formula><tex-math id="TM0079" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> obtained from the low-power measurements and the −5 dBm measurement. Left: Load calibration standards. Right: Source 2.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig5.jpeg" mimetype="image" />
          </fig>
          <p>In simulation, changes in the output power do not affect the single-port VNA error parameters. However, in practice, different output powers might alter the single-port error parameters, and the parameters of directional couplers are not completely the same as those in the simulation. The most crucial insight from the simulation is the need to be vigilant about the measurement accuracy for low reflection coefficients with low power.</p>
        </sec>
        <sec id="sec4-1-3">
          <label>4.1.3</label>
          <title>Performance evaluation</title>
          <p>We conducted laboratory tests on the RFSoC-based VNA and compared it with a commercial VNA to evaluate its practical performance. For this comparison, we utilized a N5247A PNA-X Microwave Network Analyser, which is calibrated with the N4433A Electronic Calibration Module. In the following text, it will be referred to as ‘PNA’. For the RFSoC, only a mechanical calibration kit could be used, specifically the Anritsu 3650 calibration kit in this test. To ensure the accuracy of the comparison and eliminate any potential errors from calibration kits, we adopted the following experimental approach:</p>
          <list list-type="roman-lower">
            <list-item>
              <p>Calibrate the PNA using the N4433A Electronic Calibration Module.</p>
            </list-item>
            <list-item>
              <p>Measure the S-parameters of mechanical OSL calibration standards and a series of different DUTs with the PNA, treating the results as their true S-parameters.</p>
            </list-item>
            <list-item>
              <p>Measure the raw S-parameters of the same OSL calibration standards using the RFSoC-based VNA, and calculate the single-port error parameters.</p>
            </list-item>
            <list-item>
              <p>Measure the raw S-parameters of same DUTs using the RFSoC-based VNA, calibrate them with previous error parameters to obtain the calibrated S-parameters.</p>
            </list-item>
            <list-item>
              <p>Compare the results of the PNA and the RFSoC-based VNA.</p>
            </list-item>
          </list>
          <p>Fig. <xref ref-type="fig" rid="fig6">6</xref> shows the test setup. We integrated two ADC-10-4+ directional couplers on a single circuit board and connected the input port and two coupling ports of this board to the DAC and ADC SMA ports on the balun add-on board. A DC blocker was connected to the DAC output on the balun add-on board to prevent the influence of DC signal. A specially designed connection scheme will be used for the satellite, while here it is just for testing purposes.</p>
          <fig id="fig6">
            <label>Figure 6.</label>
            <caption>
              <p>A photo of the test setup. The ZCU111 evaluation board is connected to the balun add-on board called XM500 providing SMA connectors. At the forefront is a circuit board comprising two ADC-10-4+ directional couplers. The input port is connected to one DAC, and the coupled ports of the two directional couplers are connected to the two ADC ports. The output port is open here and will be connected to different DUTs in the test.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig6.jpeg" mimetype="image" />
          </fig>
          <p>A variety of test objects were selected as DUTs. Our choices included attenuators with variant resistances, primarily to evaluate the accuracy of the VNA when measuring <inline-formula><tex-math id="TM0080" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> with flat amplitude and phase. We also chose a narrowband filter with resonance points in their <inline-formula><tex-math id="TM0081" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> within the band to evaluate the accuracy of VNA in measuring rapidly changing amplitude and phase. Additionally, we selected a cable, as it will be used in noise parameters calculation. Following the aforementioned criteria, we selected a 1 dB attenuator, a 13 dB attenuator, a 22 MHz filter, and a 10-m cable. During measurement, one end of these DUTs is connected to an open calibration standard, and the other end is connected to the output port of the circuit board. We used a 13 dB attenuator because its <inline-formula><tex-math id="TM0082" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> is approximately −26 dB when terminated with an open calibration standard, which is close to the <inline-formula><tex-math id="TM0083" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> of the LNA.</p>
          <p>First, we examined the raw <inline-formula><tex-math id="TM0084" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> measurement results of the load calibration standard to see if there are frequency structural errors caused by quantization errors. Fig. <xref ref-type="fig" rid="fig7">7</xref> compares results using different power levels, with −5 dBm as the standard. A noticeable wiggling pattern appears at measurement with −35 dBm power, and this pattern will become more obvious when using lower power, which is not shown in this figure but has been verified through experiments. Although the measurement result with −25 dBm exhibits higher noise levels, it avoids significant structural errors, and this input power level will not damage the LNA chips. Therefore, in our subsequent tests, we have chosen −25 dBm as the low-power output.</p>
          <fig id="fig7">
            <label>Figure 7.</label>
            <caption>
              <p>The raw <inline-formula><tex-math id="TM0085" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> measurement results of a 50 <inline-formula><tex-math id="TM0086" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula> load calibration standard. Top figure shows the magnitude of the raw <inline-formula><tex-math id="TM0087" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> with different power levels. Bottom figure shows the magnitude difference between the measurement results with −5 dBm power level and with other power levels.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig7.jpeg" mimetype="image" />
          </fig>
          <p>In the accuracy testing of the RFSoC-based VNA, we adopted three different measurement methods, which are listed in Table <xref ref-type="table" rid="tbl1">1</xref>.</p>
          <table-wrap id="tbl1">
            <label>Table 1.</label>
            <caption>
              <p>Calibration power level and measurement power level used in three different measurement methods.</p>
            </caption>
            <table>
              <thead>
                <tr>
                  <th align="left">Method</th>
                  <th align="center">Calibration power (dBm)</th>
                  <th align="center">Measurement power (dBm)</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>I</td>
                  <td>
                    <inline-formula>
                      <tex-math id="TM0088" notation="LaTeX"><![CDATA[$-$]]></tex-math>
                    </inline-formula>5</td>
                  <td>
                    <inline-formula>
                      <tex-math id="TM0089" notation="LaTeX"><![CDATA[$-$]]></tex-math>
                    </inline-formula>5</td>
                </tr>
                <tr>
                  <td>II</td>
                  <td>
                    <inline-formula>
                      <tex-math id="TM0090" notation="LaTeX"><![CDATA[$-$]]></tex-math>
                    </inline-formula>5</td>
                  <td>
                    <inline-formula>
                      <tex-math id="TM0091" notation="LaTeX"><![CDATA[$-$]]></tex-math>
                    </inline-formula>25</td>
                </tr>
                <tr>
                  <td>III</td>
                  <td>
                    <inline-formula>
                      <tex-math id="TM0092" notation="LaTeX"><![CDATA[$-$]]></tex-math>
                    </inline-formula>25</td>
                  <td>
                    <inline-formula>
                      <tex-math id="TM0093" notation="LaTeX"><![CDATA[$-$]]></tex-math>
                    </inline-formula>25</td>
                </tr>
              </tbody>
            </table>
          </table-wrap>
          <p>In the test, the frequency resolution is 0.0675 MHz and the measurement duration is 0.01 s per frequency point. Fig. <xref ref-type="fig" rid="fig8">8</xref> shows the measurement results of the RFSoC-based VNA and the PNA, as well as the differences between them. The shaded area represents the measurement uncertainty of PNA, obtained by the VNA uncertainty calculator provided by Keysight Technologies (<xref ref-type="bibr" rid="bib11">2020</xref>). For sources with low reflection coefficients, the measurement error of RFSoC-based VNA and uncertainty of PNA are both larger, indicating more difficult measurements for sources with low reflection coefficients.</p>
          <fig id="fig8">
            <label>Figure 8.</label>
            <caption>
              <p>The measurement results of the RFSoC-based VNA and the PNA for four DUTs and their differences. The black line represents PNA measurement results, while the other different coloured lines represent measurement results of different power methods for RFSoC-based VNA. The shaded area represents the measurement uncertainty of PNA. The four columns correspond to a 1 dB attenuator, a 13 dB attenuator, a 22 MHz filter, and a 10-m cable, all of which are terminated with an open calibration standard. The first and third rows are magnitude in dB and phase in degrees, respectively. The second and fourth rows are the magnitude and phase differences from the PNA measurements, respectively.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig8.jpeg" mimetype="image" />
          </fig>
          <p>These results show that in the actual experiments, the accuracy of method III is higher than that of method II in most cases. For the 13 dB attenuator, although method I deviates the most from the PNA measurements, this is likely due to the stability of cables and connectors for low reflection coefficient measurement (Buber et al. <xref ref-type="bibr" rid="bib4">2019</xref>). Regarding method I as a standard, method III still outperforms method II. It is different from the conclusions drawn in the simulation, indicating that the 3-term error parameters of single-port VNA have changed after altering the power level. Fig. <xref ref-type="fig" rid="fig9">9</xref> shows the 3-term error parameters calculated with two power levels, and slight differences can be observed. Notably, all measurement errors are within the uncertainty of the PNA, except the resonance point of the 22 MHz filter. It may be due to the rapid change of <inline-formula><tex-math id="TM0094" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> near the resonance point in logarithmic coordinates and is more likely to cause larger measurement errors, which needs to be improved in the future. In Section <xref ref-type="sec" rid="sec4-4">4.4</xref>, we will explore the impact of VNA measurement errors on the 21-cm sky signal by simulating the entire analogue receiver.</p>
          <fig id="fig9">
            <label>Figure 9.</label>
            <caption>
              <p>The error parameters of 3-term error model calculated at two power levels, −5 and −25 dBm.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig9.jpeg" mimetype="image" />
          </fig>
          <p>We also conducted tests on the stability and trajectory noise. Fig. <xref ref-type="fig" rid="fig10">10</xref> illustrates the stability of the RFSoC-based VNA. As expected, when measuring low reflection coefficient devices with low power, the results are the least stable, with the magnitude’s RMS being less than <inline-formula><tex-math id="TM0095" notation="LaTeX"><![CDATA[$10^{-2}$]]></tex-math></inline-formula> dB and the phase’s RMS being less than <inline-formula><tex-math id="TM0096" notation="LaTeX"><![CDATA[$5\times 10^{-3}$]]></tex-math></inline-formula> degrees. Fig. <xref ref-type="fig" rid="fig11">11</xref> illustrates the trace noise of VNA measurement. Here, for better visibility of the noise level, it is assumed that the open calibration standard is ideal, with a reflection coefficient of 0 dB. The noise of a single measurement is about <inline-formula><tex-math id="TM0097" notation="LaTeX"><![CDATA[$\pm 2$]]></tex-math></inline-formula>~<inline-formula><tex-math id="TM0098" notation="LaTeX"><![CDATA[$3\times 10^{-3}$]]></tex-math></inline-formula> dB across the frequency band, and after 10 times of averaging, the noise can be effectively reduced to less than <inline-formula><tex-math id="TM0099" notation="LaTeX"><![CDATA[$\pm 1\times 10^{-3}$]]></tex-math></inline-formula> dB, much less than the measurement error showed in Fig. <xref ref-type="fig" rid="fig8">8</xref>.</p>
          <fig id="fig10">
            <label>Figure 10.</label>
            <caption>
              <p>Continuously measure the 1 and 13 dB attenuators 10 times with powers of −25 and −5 dBm and average the values across frequencies. Then, subtracted the average of these 10 values from their respective magnitudes and phases. The first column is magnitude in dB, the second column is phase in degrees.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig10.jpeg" mimetype="image" />
          </fig>
          <fig id="fig11">
            <label>Figure 11.</label>
            <caption>
              <p>The results of ten continuous measurements of the open calibration standard with −5 dBm power level; the thick black line represents the average of these ten measurements.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig11.jpeg" mimetype="image" />
          </fig>
        </sec>
      </sec>
      <sec id="sec4-2">
        <label>4.2</label>
        <title>Source switching subsystem</title>
        <p>In order to calculate the noise wave parameters of the LNA in real time, several calibrators are required within the instrument. In Razavi-Ghods et al. (<xref ref-type="bibr" rid="bib20">2023</xref>), REACH used 12 different calibrators, including a 2-m and a 10-m cable. This approach was aimed at providing frequency-dependent impedance and filling the Smith chart as much as possible. However, due to the satellite’s size constraints, it is not feasible to use so many calibrators on CosmoCube. As shown in Fig. <xref ref-type="fig" rid="fig1">1</xref>, in addition to the noise source, we use six calibrators as follows:</p>
        <list list-type="roman-lower">
          <list-item>
            <p>A hot 50 <inline-formula><tex-math id="TM0100" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula> load heated to 370 K.</p>
          </list-item>
          <list-item>
            <p>An ambient temperature 50 <inline-formula><tex-math id="TM0101" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula> load</p>
          </list-item>
          <list-item>
            <p>A 0.2-m cable connected to switch SPDT2 (terminated in 10 <inline-formula><tex-math id="TM0102" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula>, or 250 <inline-formula><tex-math id="TM0103" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula>) at ambient temperature.</p>
          </list-item>
          <list-item>
            <p>A 2-m cable connected to switch SPDT3 (terminated in Open, or Short) at ambient temperature.</p>
          </list-item>
        </list>
        <p>The part framed by the dashed orange lines in Fig. <xref ref-type="fig" rid="fig1">1</xref> is the source switching subsystem. Table <xref ref-type="table" rid="tbl2">2</xref> compares the electrical specifications of the surface-mounted microwave switches and the mechanical switches. Insertion loss describes the signal power loss during transmission. Return loss describes the reflection of signal power due to impedance mismatch between different transmission lines or devices. Isolation is the degree to which a device or component prevents unwanted signal coupling between its ports. For surface-mounted switches, the higher return loss complicates system response, necessitating more precise <inline-formula><tex-math id="TM0104" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> measurements for both the antenna and receiver. Higher insertion loss can cause ambient temperature to leak into the spectrum, requiring accurate lab measurements and real-time temperature monitoring. Poorer isolation may lead to signal leakage between paths, making it difficult to eliminate during calibration due to the challenges in accurately measuring isolation. Nevertheless, due to the limited space, the surface-mounted microwave switches will be used due to the limited space available.</p>
        <table-wrap id="tbl2">
          <label>Table 2.</label>
          <caption>
            <p>The RF electrical specifications of mechanical 6-way microwave switch MSP6TA-12+ and surface-mounted 6-way microwave switch JSW6-33DR+. All data are based on typical results from measurements taken within 5–1000 MHz, at 25 <inline-formula><tex-math id="TM0105" notation="LaTeX"><![CDATA[$^{\circ }$]]></tex-math></inline-formula>C ambient temperature and under normal supply voltage, sourced from the Xilinx website.</p>
          </caption>
          <table>
            <thead>
              <tr>
                <th align="left">Microwave switch</th>
                <th align="center">Insertion loss (dB)</th>
                <th align="center">Isolation (dB)</th>
                <th align="center">Return loss (dB)</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>MSP6TA-12+</td>
                <td>0.1</td>
                <td>100</td>
                <td>32.3</td>
              </tr>
              <tr>
                <td>JSW6-33DR+</td>
                <td>0.5</td>
                <td>60</td>
                <td>30.5</td>
              </tr>
            </tbody>
          </table>
        </table-wrap>
        <p>If isolation needs to be taken into account in calibration, the entire calibration process will involve a very large number of parameters, which is too complex and less robust. So we hope to ensure that signals from different paths remain independent and unaffected by each other in our design. We adopted a switch SPDT1 to reduce signal leakage from antenna. It switches to the antenna when the receiver is measuring it, and to a 50 <inline-formula><tex-math id="TM0106" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula> load when the receiver is measuring other calibrators. Similarly, the noise source will be switched off when it is not being measured.</p>
      </sec>
      <sec id="sec4-3">
        <label>4.3</label>
        <title>System modelling and calibration</title>
        <p>It is not easy to analytically express the impact of non-ideal surface-mounted microwave switch performance and VNA measurement errors on 21-cm signal observations (Sun et al. <xref ref-type="bibr" rid="bib26">2024</xref>), so we developed a process to assess the effects by generating mock data sets based on actual electrical specifications of surface-mounted switches, performing calibration and sky temperature recovery, and thus calculating the foreground fitting residuals.</p>
        <sec id="sec4-3-1">
          <label>4.3.1</label>
          <title>Mock spectrum generation</title>
          <p>When the isolation of the microwave switch is not perfect, equation (<xref ref-type="disp-formula" rid="equ4">4</xref>) is inadequate for its description. More generally, the receiver can be modelled as a multiport microwave network, connecting the antenna, multiple calibrators, an LNA, and two ports of the SP6T2. When measuring a particular source, the PSD function can be expressed as</p>
          <disp-formula id="update1735367339172">
            <label>(11)</label>
            <tex-math id="TM0107" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\begin{aligned} P_{\text{source}} = g_{\text{sys}}\left(\sum _{s}K_sT_s+K_{\text{amb}}T_{\text{amb}}+\sum _{\text{nw}}K_{\text{nw}}T_{\text{nw}}\right) \end{aligned}
.
\end{eqnarray}$$]]></tex-math>
          </disp-formula>
          <p>The terms in the brackets correspond to the contributions of the source temperature, the leakage of ambient temperature, and the noise wave parameters of the LNA, respectively. The receiver gain <inline-formula><tex-math id="TM0108" notation="LaTeX"><![CDATA[$g_{\text{sys}}$]]></tex-math></inline-formula> can be determined by calibration across the entire frequency band, and no additional radiometric noise is added. Here <inline-formula><tex-math id="TM0109" notation="LaTeX"><![CDATA[$T_s$]]></tex-math></inline-formula> is the source temperature, for most types of calibrators it is the physical temperature, and for the antenna is the sky temperature. The coefficient of the source temperature <inline-formula><tex-math id="TM0110" notation="LaTeX"><![CDATA[$K_s$]]></tex-math></inline-formula> is calculated using the Python package <sc>scikit-rf</sc> (Arsenovic et al. <xref ref-type="bibr" rid="bib1">2022</xref>). By modelling the source switching subsystem as a multiport microwave network, we can calculate the power received at the LNA port originating from various sources.</p>
          <p>
            <inline-formula>
              <tex-math id="TM0111" notation="LaTeX"><![CDATA[$T_{\text{amb}}$]]></tex-math>
            </inline-formula> is the ambient temperature. The coefficient of the ambient temperature leakage <inline-formula><tex-math id="TM0112" notation="LaTeX"><![CDATA[$K_{\text{amb}}$]]></tex-math></inline-formula> is calculated by the method introduced in Wedge &amp; Rutledge (<xref ref-type="bibr" rid="bib27">1991</xref>). In this simulation, we have assumed that the switches and the two cables have the same temperature, which is a reasonable assumption given the small size of the satellite and its thermostatic regulation.</p>
          <p>
            <inline-formula>
              <tex-math id="TM0113" notation="LaTeX"><![CDATA[$T_{\text{nw}}$]]></tex-math>
            </inline-formula> are the set of noise wave parameter of the LNA. The corresponding coefficients <inline-formula><tex-math id="TM0114" notation="LaTeX"><![CDATA[$K_{\text{nw}}$]]></tex-math></inline-formula> are calculated by treating the multiport network and all sources as an equivalent antenna, then substituting the reflection coefficient of this antenna into the coefficients of <inline-formula><tex-math id="TM0115" notation="LaTeX"><![CDATA[$T_{\text{unc}}$]]></tex-math></inline-formula>, <inline-formula><tex-math id="TM0116" notation="LaTeX"><![CDATA[$T_{\text{cos}}$]]></tex-math></inline-formula>, <inline-formula><tex-math id="TM0117" notation="LaTeX"><![CDATA[$T_{\text{sin}}$]]></tex-math></inline-formula> in equation (<xref ref-type="disp-formula" rid="equ4">4</xref>).</p>
          <p>The frequency band of the simulation is 10–100 MHz. The design of the antenna will be detailed in a subsequent paper, here we merely note that it is a foldable matched antenna. In this simulation we scale the reflection coefficient of the REACH dipole antenna (Lera Acedo et al. <xref ref-type="bibr" rid="bib9">2022</xref>) into the observation frequency band of this instrument, as shown in Fig. <xref ref-type="fig" rid="fig12">12</xref>. Similarly, the same LNA as REACH is used in this simulation. The impedance of the noise source, hot load, and ambient load are all assumed to be 50 <inline-formula><tex-math id="TM0118" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula>. The reflection coefficients of other calibrators consisting of cables and terminals are obtained from advanced design system simulations, also shown in Fig. <xref ref-type="fig" rid="fig12">12</xref>.</p>
          <fig id="fig12">
            <label>Figure 12.</label>
            <caption>
              <p>Reflection coefficients of various components, including antenna, LNA, and calibrators, used to generate the mock data. These data are smoothed and free of noise.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig12.jpeg" mimetype="image" />
          </fig>
          <p>We have selected several commercial microwave switches with relatively good RF performance within the observation frequency band for the simulation. The models and parameters of the microwave switches are shown in Table <xref ref-type="table" rid="tbl3">3</xref>. These parameters are flat in the observation frequency band, so they are set to be frequency-independent in the simulation.</p>
          <table-wrap id="tbl3">
            <label>Table 3.</label>
            <caption>
              <p>The RF electrical specifications of SPDT, SP6T, DPDT microwave switches used in the simulation. All data are based on typical results from measurements taken within 10–100 MHz, at 25<inline-formula><tex-math id="TM0119" notation="LaTeX"><![CDATA[$^{\circ }$]]></tex-math></inline-formula>C ambient temperature and under normal supply voltage, sourced from the official data sheet.</p>
            </caption>
            <table>
              <thead>
                <tr>
                  <th align="left">Type</th>
                  <th align="left">Model</th>
                  <th align="center">Insertion loss (dB)</th>
                  <th align="center">Isolation (dB)</th>
                  <th align="center">Return loss (dB)</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>SPDT</td>
                  <td>HMC784A</td>
                  <td>0.26</td>
                  <td>67</td>
                  <td>34.0</td>
                </tr>
                <tr>
                  <td>SP6T</td>
                  <td>JSW6-33DR+</td>
                  <td>0.5</td>
                  <td>60</td>
                  <td>30.5</td>
                </tr>
                <tr>
                  <td>DPDT</td>
                  <td>CMD272P3</td>
                  <td>1.0</td>
                  <td>52</td>
                  <td>20.5</td>
                </tr>
              </tbody>
            </table>
          </table-wrap>
          <p>The physical temperature of the hot load is 370 K, while all other components are at 300 K. The noise source has a flat excess noise temperature of 1100 K across the band. The sky temperature is dominated by the Galactic synchrotron radiation, which is a smooth power-law-like spectra. We utilize a five-term polynomial used in Bowman et al. (<xref ref-type="bibr" rid="bib3">2018</xref>) to model the sky foreground temperature:</p>
          <disp-formula id="update1735367721887">
            <label>(12)</label>
            <tex-math id="TM0120" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\begin{aligned} T_{\mathrm{F}}(\nu )=\sum _{n=0}^{4} a_n \nu ^{n-2.5} .\end{aligned}
\end{eqnarray}$$]]></tex-math>
          </disp-formula>
          <p>Here <inline-formula><tex-math id="TM0121" notation="LaTeX"><![CDATA[$a_n$]]></tex-math></inline-formula> are the coefficients fitted to the measurement data from EDGES (Bowman et al. <xref ref-type="bibr" rid="bib3">2018</xref>), which will be used to extrapolate the foreground temperature to 10–100 MHz as the antenna temperature in the simulation, shown in Fig. <xref ref-type="fig" rid="fig13">13</xref>. In this simulation, we do not consider the 21-cm signal because it is weak compared to the Galactic synchrotron signal, and our main objective is to study the effect of surface-mounted switches and measurement error on the antenna temperature recovery. The noise wave parameters of LNA for the mock data generation are also plotted in Fig. <xref ref-type="fig" rid="fig13">13</xref>, which are derived from the REACH LNA noise parameter measurements in the laboratory and fitted with second-order polynomials. If there are more complex structures in the actual noise wave parameters once the whole receiver being assembled, we will observe it in the analysis, and then use higher order model for the system calibration.</p>
          <fig id="fig13">
            <label>Figure 13.</label>
            <caption>
              <p>Left: Sky temperature considering only the Galactic synchrotron foreground. Right: The noise wave parameters of the LNA used in mock data generation.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig13.jpeg" mimetype="image" />
          </fig>
        </sec>
        <sec id="sec4-3-2">
          <label>4.3.2</label>
          <title>S-parameter and temperature correction</title>
          <p>The OSL calibration are performed with respect to a reference plane of the VNA at the ports of SP6T2, while the signal paths used to measure <inline-formula><tex-math id="TM0122" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> of the antenna and the LNA include additional paths through the DPDT switch, as shown by the solid red lines in Fig. <xref ref-type="fig" rid="fig1">1</xref>. However, when measuring the spectrum, the signal passes through the DPDT switch along the solid blue line. Therefore, the measured <inline-formula><tex-math id="TM0123" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> needs to be corrected for these differences. In Fig. <xref ref-type="fig" rid="fig1">1</xref>, the reference plane for defining the reflection coefficients of the antenna and the receiver is labelled at the end of the solid blue line near the LNA. To make this translation, we model the difference in signal paths as two-port networks, characterized by the scatter matrix [S], which can be measured in laboratory with high accuracy using the through-reflection-line method (Rytting <xref ref-type="bibr" rid="bib24">2001</xref>). The mock measurement <inline-formula><tex-math id="TM0124" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> data are generated by calculating the ratio of the output and incident voltages at the ports of the SP6T2 switch using the multiport network model described in Section <xref ref-type="sec" rid="sec4-3-1">4.3.1</xref>, then corrected as (Pozar <xref ref-type="bibr" rid="bib17">2011</xref>),</p>
          <disp-formula id="equ13">
            <label>(13)</label>
            <tex-math id="TM0125" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\begin{aligned} \Gamma _{\text{out}}=S_{\text{22}}+\frac{S_{\text{12}} S_{\text{21}} \Gamma _{\mathrm{S}}}{1-S_{\text{11}} \Gamma _{\mathrm{S}}}, \end{aligned}
\end{eqnarray}$$]]></tex-math>
          </disp-formula>
          <p>where <inline-formula><tex-math id="TM0126" notation="LaTeX"><![CDATA[$\Gamma _{\mathrm{S}}$]]></tex-math></inline-formula> and <inline-formula><tex-math id="TM0127" notation="LaTeX"><![CDATA[$\Gamma _{\mathrm{out}}$]]></tex-math></inline-formula> are, respectively, the reflection coefficients before and after embedding the DPDT.</p>
          <p>During calibration, the signal path from the calibrators to the S-parameter reference plane can be treated as a two-port network for temperature correction. Fig. <xref ref-type="fig" rid="fig14">14</xref> illustrates this model for calculating the effective temperature of the hot load, applicable to all other calibrators and antenna. The available power gain for this two-port network is the ratio of the power available from the network to the power available from the source, expressed using the following equation in Pozar (<xref ref-type="bibr" rid="bib17">2011</xref>):</p>
          <disp-formula id="update1735373391710">
            <label>(14)</label>
            <tex-math id="TM0128" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\begin{aligned} G=\frac{\left|S_{21}\right|^2\left(1-\left|\Gamma _{\mathrm{R}}\right|^2\right)}{\left|1-S_{11} \Gamma _{\mathrm{R}}\right|^2\left(1-\left|\Gamma _{\text{source }}\right|^2\right)} \end{aligned}
,
\end{eqnarray}$$]]></tex-math>
          </disp-formula>
          <p>where <inline-formula><tex-math id="TM0129" notation="LaTeX"><![CDATA[$S_{\mathrm{21}}$]]></tex-math></inline-formula> and <inline-formula><tex-math id="TM0130" notation="LaTeX"><![CDATA[$S_{\mathrm{11}}$]]></tex-math></inline-formula> are the forward S-parameters of this two-port network. <inline-formula><tex-math id="TM0131" notation="LaTeX"><![CDATA[$\Gamma _{\mathrm{R}}$]]></tex-math></inline-formula> is the reflection coefficient of the calibrator and <inline-formula><tex-math id="TM0132" notation="LaTeX"><![CDATA[$\Gamma _{\mathrm{source}}$]]></tex-math></inline-formula> is the reflection coefficient measured at the reference plane. Due to the non-negligible insertion loss, the microwave switches also contribute to the noise power. With available gain, we can get the effective temperature <inline-formula><tex-math id="TM0133" notation="LaTeX"><![CDATA[$T_{\text{source}}$]]></tex-math></inline-formula> of each source as:</p>
          <disp-formula id="update1735373468397">
            <label>(15)</label>
            <tex-math id="TM0134" notation="LaTeX"><![CDATA[$$\begin{eqnarray}
\begin{aligned} T_{\text{source}}=G T_{\mathrm{cal}}+(1-G) T_{\mathrm{ntw}} ,\end{aligned}
\end{eqnarray}$$]]></tex-math>
          </disp-formula>
          <p>where <inline-formula><tex-math id="TM0135" notation="LaTeX"><![CDATA[$T_{\mathrm{cal}}$]]></tex-math></inline-formula> is the physical temperature of calibrator and <inline-formula><tex-math id="TM0136" notation="LaTeX"><![CDATA[$T_{\mathrm{ntw}}$]]></tex-math></inline-formula> is the physical temperature of the two-port network. Most components would have nearly the same temperature, there are exceptions, for example the 50 <inline-formula><tex-math id="TM0137" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula> hot load and the antenna. In Section <xref ref-type="sec" rid="sec4-3-1">4.3.1</xref>, we assume a common temperature for the switches and cables, and use a multiport network to calculate the ambient temperature leakage.</p>
          <fig id="fig14">
            <label>Figure 14.</label>
            <caption>
              <p>A schematic diagram of temperature correction for 50 <inline-formula><tex-math id="TM0138" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula> hot load. All switches and cables between the 50 <inline-formula><tex-math id="TM0139" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula> load and the LNA are treated as a two-port network. In the simulation, it is assumed that the temperature of each component within this two-port network is the same, denoted as <inline-formula><tex-math id="TM0140" notation="LaTeX"><![CDATA[$T_{\mathrm{ntw}}$]]></tex-math></inline-formula>, which is different from the temperature of the hot load, <inline-formula><tex-math id="TM0141" notation="LaTeX"><![CDATA[$T_{\mathrm{cal}}$]]></tex-math></inline-formula>.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig14.jpeg" mimetype="image" />
          </fig>
        </sec>
        <sec id="sec4-3-3">
          <label>4.3.3</label>
          <title>Calibration steps</title>
          <p>In simulation, we used different configurations, i.e. different model of switches performance and measurement errors. For each configuration, we generated a corresponding mock data set. Each mock data set contains:</p>
          <list list-type="roman-lower">
            <list-item>
              <p>The spectrum of each source as measured by the receiver.</p>
            </list-item>
            <list-item>
              <p>Reflection coefficients of the antenna, calibrators, and LNA measured at the reference plane.</p>
            </list-item>
            <list-item>
              <p>The S-parameters of the two-port networks representing different signal propagation paths within DPDT switch, which are used for the S-Parameter correction.</p>
            </list-item>
            <list-item>
              <p>The S-parameters of the two-port networks representing signal propagation paths from different sources, which are used for the temperature correction.</p>
            </list-item>
            <list-item>
              <p>The physical temperatures of the calibrators, cables, and microwave switches.</p>
            </list-item>
          </list>
          <p>The calibration process is the same for each simulated data set, listed below:</p>
          <list list-type="roman-lower">
            <list-item>
              <p>Correct the S-parameters of different sources and LNA using the method described in Section <xref ref-type="sec" rid="sec4-3-2">4.3.2</xref>.</p>
            </list-item>
            <list-item>
              <p>Build the temperature correction model for different sources using the method described in Section <xref ref-type="sec" rid="sec4-3-2">4.3.2</xref>. Correct the hot load temperature, whilst the switches and cables are assumed to have a common ambient temperature.</p>
            </list-item>
            <list-item>
              <p>Calculate the X-terms of equation (<xref ref-type="disp-formula" rid="update1735363114136">6</xref>) and perform polynomial fit with the least-squares method to calculate the noise wave parameters of the LNA.</p>
            </list-item>
            <list-item>
              <p>Substitute the noise wave parameters into the antenna’s PSD equation to get the antenna temperature, which is then fed into the antenna’s temperature correction model to recover sky temperature.</p>
            </list-item>
            <list-item>
              <p>Using equation (<xref ref-type="disp-formula" rid="update1735367721887">12</xref>) to fit the recovered sky temperature and obtain the residual, which are the systematic errors which contaminate the 21-cm signal.</p>
            </list-item>
          </list>
        </sec>
      </sec>
      <sec id="sec4-4">
        <label>4.4</label>
        <title>Simulation results</title>
        <sec id="sec4-4-1">
          <label>4.4.1</label>
          <title>Simulation for the effect of isolation</title>
          <p>In order to explore the effects of isolation on the calibration results, we generated four different data sets whose differences are listed in Table <xref ref-type="table" rid="tbl4">4</xref>. In <italic>RefSet</italic>, all microwave switches are ideal – there is no insertion loss, reflection loss, or signal leakage – serving as a reference to validate the calibration approach. In <italic>IsoRefSet</italic>, the insertion loss and reflection loss follow the parameters specified in Table <xref ref-type="table" rid="tbl3">3</xref>, while isolation remains ideal. In the two remaining cases <italic>SwitchOffSet</italic> and <italic>SwitchOnSet</italic>, we consider the impact of non-ideal isolation. When the SP6T1 in Fig. <xref ref-type="fig" rid="fig1">1</xref> is switched to internal calibrators, due to the non-ideal isolation of the switch, there could still be some leakage caused by antenna through it to the LNA. In <italic>SwitchOffSet</italic>, we consider the case where the SPDT1 switch is connected to the antenna when not in use, while in <italic>SwitchOnSet</italic>, we consider the case where it switches to a 50 <inline-formula><tex-math id="TM0142" notation="LaTeX"><![CDATA[$\Omega$]]></tex-math></inline-formula> load. This comparison is intended to demonstrate the impact on the system when the SPDT1 switch enhances the isolation of the antenna signal propagation path. All other aspects of these data sets are identical.</p>
          <table-wrap id="tbl4">
            <label>Table 4.</label>
            <caption>
              <p>Parameter differences between the four mock data sets. The first column is the name of the mock data sets. The second to fourth columns are the insertion loss, return loss, and isolation of the microwave switches, respectively. The ‘−’ sign indicates that the effect of this parameter is not considered, i.e. the switches have ideal insertion loss, reflection loss, and isolation. The ‘+’ sign indicates that the corresponding parameter in the datasheet is used for simulation. The fifth columns indicates whether SPDT1 switches to a 50 ohm load when the receiver measures other sources except the antenna. The ‘−’ sign indicates not switching while ‘+’ sign indicates switching.</p>
            </caption>
            <table>
              <thead>
                <tr>
                  <th align="left">Data set</th>
                  <th align="center">Insertion loss</th>
                  <th align="center">Return loss</th>
                  <th align="center">Isolation</th>
                  <th align="center">SPDT1 switch</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>
                    <italic>RefSet</italic>
                  </td>
                  <td>–</td>
                  <td>–</td>
                  <td>–</td>
                  <td>–</td>
                </tr>
                <tr>
                  <td>
                    <italic>IsoRefSet</italic>
                  </td>
                  <td>+</td>
                  <td>+</td>
                  <td>–</td>
                  <td>–</td>
                </tr>
                <tr>
                  <td>
                    <italic>SwitchOffSet</italic>
                  </td>
                  <td>+</td>
                  <td>+</td>
                  <td>+</td>
                  <td>–</td>
                </tr>
                <tr>
                  <td>
                    <italic>SwitchOnSet</italic>
                  </td>
                  <td>+</td>
                  <td>+</td>
                  <td>+</td>
                  <td>+</td>
                </tr>
              </tbody>
            </table>
          </table-wrap>
          <p>First, we compare the spectrum of these data sets to show the impact of signal leakage. The top plot in Fig. <xref ref-type="fig" rid="fig15">15</xref> shows the spectrum of various calibrators in <italic>IsoRefSet</italic>, containing contributions from both the source temperature and LNA noise temperature. The bottom panel illustrates the difference between the spectrum in <italic>SwitchOffSet</italic> and <italic>SwitchOnSet</italic> compared to <italic>IsoRefSet</italic>, showing the effect of non-ideal isolation. If SPDT1 is kept connected to the antenna, signal leakage contributes up to 400 mK to the spectrum. If SPDT1 is switched to the <inline-formula><tex-math id="TM0143" notation="LaTeX"><![CDATA[$50 \Omega$]]></tex-math></inline-formula> load, the signal leakage is reduced to about 3 mK, indicating that SPDT1 effectively enhance the isolation of the antenna signal propagation path.</p>
          <fig id="fig15">
            <label>Figure 15.</label>
            <caption>
              <p>Top: Spectrum temperature (kelvin) for various calibrators in <italic>IsoRefSet</italic>. Bottom left: The difference between the spectrum temperature (millikelvin) in <italic>SwitchOffSet</italic> and that of <italic>IsoRefSet</italic>. Bottom right: The difference between the spectrum temperature (millikelvin) in <italic>SwitchOnSet</italic> and that of <italic>IsoRefSet</italic>.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig15.jpeg" mimetype="image" />
          </fig>
          <p>Similarly, we study the effect of non-ideal isolation on the measurement of reflection coefficients for various components. Fig. <xref ref-type="fig" rid="fig16">16</xref> shows the difference between the corrected <inline-formula><tex-math id="TM0144" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> in <italic>SwitchOnSet</italic> and <italic>IsoRefSet</italic>. The greatest impact of isolation on the measurement of S-parameters occurs at the resonance frequency of the antenna, with a magnitude of <inline-formula><tex-math id="TM0145" notation="LaTeX"><![CDATA[$8\times 10^{-4}$]]></tex-math></inline-formula> dB and a phase of <inline-formula><tex-math id="TM0146" notation="LaTeX"><![CDATA[$6\times 10^{-3}$]]></tex-math></inline-formula> deg. It is negligible compared to the potential VNA measurement inaccuracies. Therefore, the effect of isolation on the S-parameters measurement is not significant.</p>
          <fig id="fig16">
            <label>Figure 16.</label>
            <caption>
              <p>The difference between the corrected <inline-formula><tex-math id="TM0147" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> in <italic>SwitchOnSet</italic> and that of <italic>IsoRefSet</italic>. Left graph shows the magnitude difference of <inline-formula><tex-math id="TM0148" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> in dB. Right graph shows the phase difference of <inline-formula><tex-math id="TM0149" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> in degrees.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig16.jpeg" mimetype="image" />
          </fig>
          <p>We used polynomial functions of different orders to fit the noise wave parameters, then recover the sky temperature and get the foreground fitting residuals. Basically, we want both the recovery error and the fitting residuals to be as small as possible. Fig. <xref ref-type="fig" rid="fig17">17</xref> shows the root mean square (RMS) and frequency structure of these two indicators. As expected, in <italic>RefSet</italic>, the sky temperature can be perfectly recovered by using second-order polynomial functions to fit the noise wave parameters, the same order as used to generate the mock data. For <italic>IsoRefSet</italic>, a higher order polynomial is needed to fully recover the sky temperature. The reflection coefficient of the noise source measured at the reference plane is no longer zero when considering non-ideal switches, so the equivalent temperature of the noise source will vary with frequency. The graph shows that a fifth-order polynomial fitting results in recovery error less than 1 mK, which is sufficiently small compared to the 21-cm signal. However, in the <italic>SwitchOffSet</italic> and <italic>SwitchOnSet</italic> cases, the recovery error cannot be reduced to a very low level. For <italic>SwitchOffSet</italic>, the recovery error obtained by fitting the noise wave parameters with tenth-order polynomial is above 400 mK at low frequencies, where the sky temperature is particularly high. For <italic>SwitchOnSet</italic>, the maximum value of the recovery error obtained by fourth-order polynomial fit is less than 60 mK.</p>
          <fig id="fig17">
            <label>Figure 17.</label>
            <caption>
              <p>Left: The relationship between the RMS of the sky temperature recovery error (top) or fitting residuals (bottom) and the polynomial orders used to fit noise wave parameters in different mock data sets. Right: The recovered sky temperature error (top) or fitting residuals (bottom) for all data sets using the optimal polynomial order, respectively.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig17.jpeg" mimetype="image" />
          </fig>
          <p>In actual experiments, we do not know the true sky temperature, so we are more concerned with foreground fitting residuals as it may contaminate the 21-cm signal. For <italic>SwitchOffSet</italic>, the fitting residuals are approximately within <inline-formula><tex-math id="TM0150" notation="LaTeX"><![CDATA[$\pm 10$]]></tex-math></inline-formula> mK at the optimal polynomial fitting order, while for <italic>SwitchOnSet</italic>, they are within <inline-formula><tex-math id="TM0151" notation="LaTeX"><![CDATA[$\pm 5$]]></tex-math></inline-formula> mK. Higher order polynomials lead to higher fitting residuals because they absorb the undesirable leakage of non-ideal isolation of the switches into the noise wave parameters, improving calibrator fits but increasing sky temperature recovery errors. Considering both indicators, <italic>SwitchOffSet</italic> can achieve low fitting residuals with second-order polynomial but the recovered sky temperature significantly differs from the actual temperature. Overall, the presence of the SPDT1 switch aids in achieving smaller recovery error and fitting residuals.</p>
        </sec>
        <sec id="sec4-4-2">
          <label>4.4.2</label>
          <title>Simulation for the effect of measurement error</title>
          <p>The previous simulation assumes that all measurements are accurate, however the main sources of actual calibration error are the various measurement errors. From equation (<xref ref-type="disp-formula" rid="update1735363069023">5</xref>), calibrating the receiver requires the measurement of three variables: PSDs, the physical temperatures, and reflection coefficients, each with potential errors. We add these measurement errors to <italic>SwitchOnSet</italic> to evaluate if the resulting foreground fitting residuals meet our requirements.</p>
          <p>The PSDs are measured by RFSoC-based digital spectrometer. As demonstrated in Section <xref ref-type="sec" rid="sec2">2</xref>, the dynamic range is sufficient to ensure the linearity of the received PSD. Therefore, PSD measurement errors are not considered in further analyses. For physical temperature measurement, existing commercial probes can achieve an accuracy of less than <inline-formula><tex-math id="TM0152" notation="LaTeX"><![CDATA[$\pm$]]></tex-math></inline-formula>0.1 K. Based on Section <xref ref-type="sec" rid="sec4-1-3">4.1.3</xref> tests, we assume for calibrators connected two cables, the <inline-formula><tex-math id="TM0153" notation="LaTeX"><![CDATA[$S_{11}$]]></tex-math></inline-formula> errors are <inline-formula><tex-math id="TM0154" notation="LaTeX"><![CDATA[$\pm$]]></tex-math></inline-formula>0.01 dB and <inline-formula><tex-math id="TM0155" notation="LaTeX"><![CDATA[$\pm 0.2^{\circ }$]]></tex-math></inline-formula>. For LNA, hot load and ambient load, the <inline-formula><tex-math id="TM0156" notation="LaTeX"><![CDATA[$S_{11}$]]></tex-math></inline-formula> error is <inline-formula><tex-math id="TM0157" notation="LaTeX"><![CDATA[$\pm$]]></tex-math></inline-formula>0.1 dB and <inline-formula><tex-math id="TM0158" notation="LaTeX"><![CDATA[$\pm 0.2^{\circ }$]]></tex-math></inline-formula>. For other calibrators, the <inline-formula><tex-math id="TM0159" notation="LaTeX"><![CDATA[$S_{11}$]]></tex-math></inline-formula> error is <inline-formula><tex-math id="TM0160" notation="LaTeX"><![CDATA[$\pm$]]></tex-math></inline-formula>0.01 dB and <inline-formula><tex-math id="TM0161" notation="LaTeX"><![CDATA[$\pm 0.1^{\circ }$]]></tex-math></inline-formula>. The measurement error occurs at the calibration plane of the VNA, so they will be amplified by the imperfect S-parameters of the DPDT switch in the reference plane. Fig. <xref ref-type="fig" rid="fig18">18</xref> shows that a <inline-formula><tex-math id="TM0162" notation="LaTeX"><![CDATA[$\pm 0.1$]]></tex-math></inline-formula> dB error in the LNA’s reflection coefficient measured at the VNA calibration plane can introduce additional errors of up to 0.07 dB at 100 MHz after shifting the calibration plane.</p>
          <fig id="fig18">
            <label>Figure 18.</label>
            <caption>
              <p>The corrected <inline-formula><tex-math id="TM0163" notation="LaTeX"><![CDATA[$S_{\text{11}}$]]></tex-math></inline-formula> magnitude of the LNA when there is a measurement error of <inline-formula><tex-math id="TM0164" notation="LaTeX"><![CDATA[$\pm 0.1$]]></tex-math></inline-formula> dB at the calibration plane of the VNA. The solid line represents the results in <italic>RefSet</italic>, while the dashed line represents the results in <italic>SwitchOnSet</italic>.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig18.jpeg" mimetype="image" />
          </fig>
          <p>Since the signs of errors in actual measurements are uncertain, we assign different error signs to the <inline-formula><tex-math id="TM0165" notation="LaTeX"><![CDATA[$S_{11}$]]></tex-math></inline-formula> magnitude, <inline-formula><tex-math id="TM0166" notation="LaTeX"><![CDATA[$S_{11}$]]></tex-math></inline-formula> phase, and physical temperature measurements, then observe the foreground fitting residuals in different cases. As before, we calculate the RMS for different polynomial fitting orders and select the order with the lowest RMS to show the residual frequency structure. Given the large 10–100 MHz bandwidth, we divide it into two sub-bands to observe residual variations. The results are the black lines in the Fig. <xref ref-type="fig" rid="fig19">19</xref>. In 10–40 MHz range, the foreground fitting residuals are within <inline-formula><tex-math id="TM0167" notation="LaTeX"><![CDATA[$\pm 300$]]></tex-math></inline-formula> mK except for the edge of the band. It is relatively large due to high foreground temperature in low frequency, making foreground fitting much more difficult, which needs to be improved in the future. In 40–100 MHz range, which is of more interest for ground-based experiments, the recovery errors are within <inline-formula><tex-math id="TM0168" notation="LaTeX"><![CDATA[$\pm 40$]]></tex-math></inline-formula> mK except at the band edges, and up to <inline-formula><tex-math id="TM0169" notation="LaTeX"><![CDATA[$\pm 20$]]></tex-math></inline-formula> mK in 50–90 MHz. The frequency structure of the residuals are related to the foreground model we are using. We also try to introduce half of the measurement error, shown as grey lines, resulting in fitting residuals being halved as well.</p>
          <fig id="fig19">
            <label>Figure 19.</label>
            <caption>
              <p>The fitting residuals at the optimal polynomial fitting order in <italic>SwitchOnSet</italic> when considering all types of measurement errors. The frequency band is divided into 10–40 MHz (left) and 40–100 MHz (right). Black lines represent results with full errors, while grey lines represent results with half errors.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig19.jpeg" mimetype="image" />
          </fig>
          <p>Fig. <xref ref-type="fig" rid="fig20">20</xref> illustrates the contribution of different measurement errors to the final fitting residuals in the 40–100 MHz range. The antenna’s <inline-formula><tex-math id="TM0173" notation="LaTeX"><![CDATA[$S_{11}$]]></tex-math></inline-formula> measurement error is the primary source of residual, followed by the LNA’s <inline-formula><tex-math id="TM0174" notation="LaTeX"><![CDATA[$S_{11}$]]></tex-math></inline-formula> error, while other errors have relatively small contribution to the final fitting residuals.</p>
          <fig id="fig20">
            <label>Figure 20.</label>
            <caption>
              <p>The fitting residuals at the optimal polynomial fitting order in <italic>SwitchOnSet</italic> when considering different types of measurement errors in 40–100 MHz. The left plot considers only the antenna's <inline-formula><tex-math id="TM0170" notation="LaTeX"><![CDATA[$S_{11}$]]></tex-math></inline-formula> measurement error, the middle plot considers only LNA's <inline-formula><tex-math id="TM0171" notation="LaTeX"><![CDATA[$S_{11}$]]></tex-math></inline-formula> measurement error, and the right plot accounts for all other <inline-formula><tex-math id="TM0172" notation="LaTeX"><![CDATA[$S_{11}$]]></tex-math></inline-formula>s and physical temperature measurement errors. Black lines represent results with full errors, while grey lines represent results with half errors.</p>
            </caption>
            <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="rzae064fig20.jpeg" mimetype="image" />
          </fig>
        </sec>
      </sec>
    </sec>
    <sec id="sec5" sec-type="conclusions">
      <label>5</label>
      <title>CONCLUSIONS AND FUTURE WORK</title>
      <p>CosmoCube plans to perform global 21-cm spectrum experiment in lunar orbit to avoid RFI, ground and ionosphere effects. The receiver design is based on RFSoC, which integrates RF data converters, FPGA, CPU, and several peripheral interfaces on a single board, helping to reduce size, weight, and power consumption. We presented the measurement principles and design of the RFSoC-based VNA module, discussed the effect of quantization errors on reflection coefficient measurements using the MATLAB Simulink Platform. The main error arises from low-power measurements on DUTs with low reflection coefficients. We performed laboratory tests on the VNA module, including minimum output power, accuracy, stability, and trace noise. The largest measurement error occurred at the resonance frequency of the filter where the reflection coefficient changed dramatically. In addition, when calibrating and measuring a 13 dB attenuator terminated with an open calibration standard at −25 dBm output power level, the measurements differed from the PNA results in the laboratory by approximately 0.1 dB and <inline-formula><tex-math id="TM0175" notation="LaTeX"><![CDATA[$0.1^{\circ }$]]></tex-math></inline-formula>. We also presented the design of the source switching subsystem. Since it is necessary to use surface-mounted switches, we generated different mock data sets and discussed the effect of the RF electrical performance of these switches on the sky temperature recovery and foreground fitting residuals through simulation. The effect of signal leakage can be reduced by adding a microwave switch to improve the isolation of the antenna signal path. Foreground signals can be accurately subtracted if all physical temperatures and reflection coefficients are accurately measured. Considering all types of measurement errors, the fitting residuals of the foreground in 50–90 MHz can be controlled within <inline-formula><tex-math id="TM0176" notation="LaTeX"><![CDATA[$\pm 20$]]></tex-math></inline-formula> mK, small enough compared to 21-cm signal. The antenna’ <inline-formula><tex-math id="TM0177" notation="LaTeX"><![CDATA[$S_{11}$]]></tex-math></inline-formula> measurement error is the primary source of foreground fitting residual.</p>
      <p>Future work will focus on how to improve the measurement accuracy of the VNA module, especially at the resonance point. For the source switching subsystem, it is still necessary to search better methods to ensure signal isolation, as well as to find more suitable cable lengths and impedances of calibrators to improve system calibration accuracy. Since the VNA measurement error is inevitable, we will try to find a better method that takes this error into account to improve the calibration accuracy and subtract the sky foreground as much as possible, especially at low frequencies.</p>
    </sec>
  </body>
  <back>
    <ack id="ack1">
      <title>ACKNOWLEDGEMENTS</title>
      <p>JZ acknowledges the Chinese Scholarship Council (CSC) for the funding. EdeLA acknowledges STFC for their funding support through a STFC Ernest Rutherford Fellowship. XC acknowledges the support of the Chinese Academy of Science grant ZDKYYQ20200008 and the National Natural Science Foundation grant 12361141814.</p>
    </ack>
    <sec id="sec6" sec-type="data-availability">
      <title>DATA AVAILABILITY</title>
      <p>The data underlying this article will be shared on reasonable request to the corresponding author.</p>
    </sec>
    <ref-list id="ref1">
      <title>REFERENCES</title>
      <ref id="bib1">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Arsenovic</surname>  <given-names>A.</given-names></string-name>  <etal>et al.</etal></person-group>, <year>2022</year>, <source>IEEE Microwave Mag.</source>, <volume>23</volume>, <fpage>98</fpage>  <pub-id pub-id-type="doi">10.1109/MMM.2021.3117139</pub-id></mixed-citation>
      </ref>
      <ref id="bib2">
        <mixed-citation publication-type="other">
          <person-group person-group-type="author">
            <string-name>
              <surname>Artuc</surname>  <given-names>K.</given-names></string-name>, <string-name><surname>de Lera Acedo</surname>  <given-names>E.</given-names></string-name></person-group>, <year>2024</year>, <source>RAS Techniques and Instruments</source>, <volume>4</volume>, <fpage>rzae061</fpage>  <pub-id pub-id-type="doi">10.1093/rasti/rzae061</pub-id></mixed-citation>
      </ref>
      <ref id="bib3">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Bowman</surname>  <given-names>J. D.</given-names></string-name>, <string-name><surname>Rogers</surname>  <given-names>A. E.</given-names></string-name>, <string-name><surname>Monsalve</surname>  <given-names>R. A.</given-names></string-name>, <string-name><surname>Mozdzen</surname>  <given-names>T. J.</given-names></string-name>, <string-name><surname>Mahesh</surname>  <given-names>N.</given-names></string-name></person-group>, <year>2018</year>, <source>Nature</source>, <volume>555</volume>, <fpage>67</fpage>  <pub-id pub-id-type="doi">10.1038/nature25792</pub-id></mixed-citation>
      </ref>
      <ref id="bib4">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Buber</surname>  <given-names>T.</given-names></string-name>, <string-name><surname>Narang</surname>  <given-names>P.</given-names></string-name>, <string-name><surname>Esposito</surname>  <given-names>G.</given-names></string-name>, <string-name><surname>Padmanabhan</surname>  <given-names>S.</given-names></string-name>, <string-name><surname>Zeier</surname>  <given-names>M.</given-names></string-name></person-group>, <year>2019</year>, <source>Microwave J.</source>, <volume>62</volume>, <fpage>90</fpage></mixed-citation>
      </ref>
      <ref id="bib5">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Burns</surname>  <given-names>J. O.</given-names></string-name>  <etal>et al.</etal></person-group>, <year>2012</year>, <source>Adv. Space Res.</source>, <volume>49</volume>, <fpage>433</fpage>  <pub-id pub-id-type="doi">10.1016/j.asr.2011.10.014</pub-id></mixed-citation>
      </ref>
      <ref id="bib6">
        <mixed-citation publication-type="other">
          <person-group person-group-type="author">
            <string-name>
              <surname>Burns</surname>  <given-names>J.</given-names></string-name>  <etal>et al.</etal></person-group>, <year>2021</year>, <comment>preprint</comment> (<pub-id pub-id-type="arxiv">arXiv:2103.05085</pub-id>)</mixed-citation>
      </ref>
      <ref id="bib7">
        <mixed-citation publication-type="other">
          <person-group person-group-type="author">
            <string-name>
              <surname>Chen</surname>  <given-names>X.</given-names></string-name>  <etal>et al.</etal></person-group>, <year>2019</year>, <comment>preprint</comment> (<pub-id pub-id-type="arxiv">arXiv:1907.10853</pub-id>)</mixed-citation>
      </ref>
      <ref id="bib8">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Chen</surname>  <given-names>X.</given-names></string-name>  <etal>et al.</etal></person-group>, <year>2023</year>, <source>Chin. J. Space Sci.</source>, <volume>43</volume>, <fpage>43</fpage>  <pub-id pub-id-type="doi">10.11728/cjss2023.01.220104001</pub-id></mixed-citation>
      </ref>
      <ref id="bib9">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>de Lera Acedo</surname>  <given-names>E.</given-names></string-name>  <etal>et al.</etal></person-group>, <year>2022</year>, <source>Nat. Astron.</source>, <volume>6</volume>, <fpage>984</fpage>  <pub-id pub-id-type="doi">10.1038/s41550-022-01709-9</pub-id></mixed-citation>
      </ref>
      <ref id="bib10">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Dicke</surname>  <given-names>R. H.</given-names></string-name>
          </person-group>, <year>1946</year>, <source>Rev. Sci. Instrum.</source>, <volume>17</volume>, <fpage>268</fpage>  <pub-id pub-id-type="doi">10.1063/1.1770483</pub-id></mixed-citation>
      </ref>
      <ref id="bib11">
        <mixed-citation publication-type="other">
          <person-group person-group-type="author">
            <string-name>
              <surname>Keysight Technologies</surname>  <given-names>I.</given-names></string-name>
          </person-group>, <year>2020</year>, available at: <ext-link xmlns:xlink="http://www.w3.org/1999/xlink" ext-link-type="uri" xlink:href="https://www.keysight.com/zz/en/lib/software-detail/computer-software/downloadable-vector-network-analyzer-uncertainty-calculator-1000000418epsgsud.html">Downloadable Vector Network Analyzer Uncertainty Calculator</ext-link></mixed-citation>
      </ref>
      <ref id="bib12">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>McKinley</surname>  <given-names>B.</given-names></string-name>  <etal>et al.</etal></person-group>, <year>2012</year>, <source>AJ</source>, <volume>145</volume>, <fpage>23</fpage>  <pub-id pub-id-type="doi">10.1088/0004-6256/145/1/23</pub-id></mixed-citation>
      </ref>
      <ref id="bib13">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Mercier</surname>  <given-names>C.</given-names></string-name>, <string-name><surname>Trottet</surname>  <given-names>G.</given-names></string-name></person-group>, <year>1997</year>, <source>ApJ</source>, <volume>474</volume>, <fpage>L65</fpage>  <pub-id pub-id-type="doi">10.1086/310422</pub-id></mixed-citation>
      </ref>
      <ref id="bib14">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Meys</surname>  <given-names>R.</given-names></string-name>
          </person-group>, <year>1978</year>, <source>IEEE Trans. Microwave Theory Techn.</source>, <volume>26</volume>, <fpage>34</fpage>  <pub-id pub-id-type="doi">10.1109/TMTT.1978.1129303</pub-id></mixed-citation>
      </ref>
      <ref id="bib15">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Monsalve</surname>  <given-names>R. A.</given-names></string-name>, <string-name><surname>Rogers</surname>  <given-names>A. E.</given-names></string-name>, <string-name><surname>Bowman</surname>  <given-names>J. D.</given-names></string-name>, <string-name><surname>Mozdzen</surname>  <given-names>T. J.</given-names></string-name></person-group>, <year>2017</year>, <source>ApJ</source>, <volume>835</volume>, <fpage>49</fpage>  <pub-id pub-id-type="doi">10.3847/1538-4357/835/1/49</pub-id></mixed-citation>
      </ref>
      <ref id="bib16">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Philip</surname>  <given-names>L.</given-names></string-name>  <etal>et al.</etal></person-group>, <year>2019</year>, <source>J. Astron. Instrum.</source>, <volume>8</volume>, <fpage>1950004</fpage>  <pub-id pub-id-type="doi">10.1142/S2251171719500041</pub-id></mixed-citation>
      </ref>
      <ref id="bib17">
        <mixed-citation publication-type="book">
          <person-group person-group-type="author">
            <string-name>
              <surname>Pozar</surname>  <given-names>D. M.</given-names></string-name>
          </person-group>, <year>2011</year>, <source>Microwave Engineering</source>. <publisher-name>John Wiley and Sons</publisher-name>, <publisher-loc>Hoboken</publisher-loc></mixed-citation>
      </ref>
      <ref id="bib18">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Price</surname>  <given-names>D.</given-names></string-name>  <etal>et al.</etal></person-group>, <year>2018</year>, <source>MNRAS</source>, <volume>478</volume>, <fpage>4193</fpage>  <pub-id pub-id-type="doi">10.1093/mnras/sty1244</pub-id></mixed-citation>
      </ref>
      <ref id="bib19">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Rao</surname>  <given-names>M.</given-names></string-name>  <etal>et al.</etal></person-group>, <year>2023</year>, <source>Exp. Astron.</source>, <volume>56</volume>, <fpage>741</fpage>  <pub-id pub-id-type="doi">10.1007/s10686-023-09909-5</pub-id></mixed-citation>
      </ref>
      <ref id="bib20">
        <mixed-citation publication-type="other">
          <person-group person-group-type="author">
            <string-name>
              <surname>Razavi-Ghods</surname>  <given-names>N.</given-names></string-name>  <etal>et al.</etal></person-group>, <year>2023</year>, <comment>preprint</comment> (<pub-id pub-id-type="arxiv">arXiv:2307.00099</pub-id>)</mixed-citation>
      </ref>
      <ref id="bib21">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Rogers</surname>  <given-names>A. E.</given-names></string-name>, <string-name><surname>Bowman</surname>  <given-names>J. D.</given-names></string-name></person-group>, <year>2012</year>, <source>Radio Sci.</source>, <volume>47</volume>, <fpage>1</fpage>  <pub-id pub-id-type="doi">10.1029/2011RS004962</pub-id></mixed-citation>
      </ref>
      <ref id="bib22">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Roque</surname>  <given-names>I.</given-names></string-name>, <string-name><surname>Handley</surname>  <given-names>W.</given-names></string-name>, <string-name><surname>Razavi-Ghods</surname>  <given-names>N.</given-names></string-name></person-group>, <year>2021</year>, <source>MNRAS</source>, <volume>505</volume>, <fpage>2638</fpage>  <pub-id pub-id-type="doi">10.1093/mnras/stab1453</pub-id></mixed-citation>
      </ref>
      <ref id="bib23">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Rytting</surname>  <given-names>D.</given-names></string-name>
          </person-group>, <year>1996</year>, <source>White paper</source>.</mixed-citation>
      </ref>
      <ref id="bib24">
        <mixed-citation publication-type="other">
          <person-group person-group-type="author">
            <string-name>
              <surname>Rytting</surname>  <given-names>D. K.</given-names></string-name>
          </person-group>, <year>2001</year>, in <source>58th ARFTG Conference Digest</source>. <publisher-name>IEEE</publisher-name>, <publisher-loc>San Diego</publisher-loc></mixed-citation>
      </ref>
      <ref id="bib25">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Singh</surname>  <given-names>S.</given-names></string-name>  <etal>et al.</etal></person-group>, <year>2022</year>, <source>Nat. Astron.</source>, <volume>6</volume>, <fpage>607</fpage>  <pub-id pub-id-type="doi">10.1038/s41550-022-01610-5</pub-id></mixed-citation>
      </ref>
      <ref id="bib26">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Sun</surname>  <given-names>S.</given-names></string-name>, <string-name><surname>de Lera Acedo</surname>  <given-names>E.</given-names></string-name>, <string-name><surname>Wu</surname>  <given-names>F.</given-names></string-name>, <string-name><surname>Yue</surname>  <given-names>B.</given-names></string-name>, <string-name><surname>Zhu</surname>  <given-names>J.</given-names></string-name>, <string-name><surname>Chen</surname>  <given-names>X.</given-names></string-name></person-group>, <year>2024</year>, <source>Universe</source>, <volume>10</volume>, <fpage>236</fpage>  <pub-id pub-id-type="doi">10.3390/universe10060236</pub-id></mixed-citation>
      </ref>
      <ref id="bib27">
        <mixed-citation publication-type="journal">
          <person-group person-group-type="author">
            <string-name>
              <surname>Wedge</surname>  <given-names>S. W.</given-names></string-name>, <string-name><surname>Rutledge</surname>  <given-names>D. B.</given-names></string-name></person-group>, <year>1991</year>, <source>IEEE Microwave Guided Wave Lett.</source>, <volume>1</volume>, <fpage>117</fpage>  <pub-id pub-id-type="doi">10.1109/75.89082</pub-id></mixed-citation>
      </ref>
      <ref id="bib28">
        <mixed-citation publication-type="other">
          <person-group person-group-type="author">
            <string-name>
              <surname>Xilinx</surname>
            </string-name>
          </person-group>, <year>2020</year>, <source>Zynq UltraScale+ RFSoC RF Data Converter v2.4 Gen 1/2/3</source>.</mixed-citation>
      </ref>
    </ref-list>
    <app-group>
      <app id="sec7">
        <title>APPENDIX A: ABBREVIATIONS</title>
        <p>Some important abbreviations used in the text and their definitions are listed in Table <xref ref-type="table" rid="tblA1">A1</xref>.</p>
        <table-wrap id="tblA1">
          <label>Table A1.</label>
          <caption>
            <p>Abbreviations used in the text and their definitions.</p>
          </caption>
          <table>
            <thead>
              <tr>
                <th align="left">Abbreviations</th>
                <th align="center">Definition</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>RFSoC</td>
                <td>Radio frequency system-on-chip</td>
              </tr>
              <tr>
                <td>VNA</td>
                <td>Vector network analyser</td>
              </tr>
              <tr>
                <td>RFI</td>
                <td>Radio frequency interference</td>
              </tr>
              <tr>
                <td>LNA</td>
                <td>Low noise amplifier</td>
              </tr>
              <tr>
                <td>ADC</td>
                <td>Analog-to-digital converter</td>
              </tr>
              <tr>
                <td>DAC</td>
                <td>Digital-to-analog converter</td>
              </tr>
              <tr>
                <td>GSPS</td>
                <td>Gigabit samples per second</td>
              </tr>
              <tr>
                <td>FPGA</td>
                <td>Field programmable gate array</td>
              </tr>
              <tr>
                <td>SMA</td>
                <td>Subminiature version A</td>
              </tr>
              <tr>
                <td>SFDR</td>
                <td>Spurious free dynamic range</td>
              </tr>
              <tr>
                <td>PSD</td>
                <td>Power spectral density</td>
              </tr>
              <tr>
                <td>NCO</td>
                <td>Numerically controlled oscillator</td>
              </tr>
              <tr>
                <td>DC</td>
                <td>Direct current</td>
              </tr>
              <tr>
                <td>DUT</td>
                <td>Device under test</td>
              </tr>
              <tr>
                <td>OSL</td>
                <td>Open-short-load</td>
              </tr>
              <tr>
                <td>RMS</td>
                <td>Root mean squares</td>
              </tr>
              <tr>
                <td>DPDT</td>
                <td>Double pole double throw</td>
              </tr>
              <tr>
                <td>SPDT</td>
                <td>Single pole double throw</td>
              </tr>
              <tr>
                <td>SP6T</td>
                <td>Single pole six throw</td>
              </tr>
            </tbody>
          </table>
        </table-wrap>
      </app>
    </app-group>
  </back>
</article>