标签: USRP

  • AI-RAN : USRP X410 配置

    Spark 配置

    安装Sionna-rk

    git clone https://github.com/NVlabs/sionna-rk.git
    cd sionna-rk

    安装UHD(Orin平台请勿使用)

    sudo apt install -y \
        autoconf automake build-essential ccache cmake cpufrequtils \
        doxygen ethtool g++ git inetutils-tools libboost-all-dev \
        libncurses6 libncurses-dev libusb-1.0-0 libusb-1.0-0-dev \
        libusb-dev python3-dev python3-mako python3-numpy python3-requests \
        python3-scipy python3-setuptools python3-ruamel.yaml ninja-build
    
    git clone https://github.com/EttusResearch/uhd.git
    
    cd host
    mkdir build && cd build
    cmake -DCMAKE_POLICY_DEFAULT_CMD0167=NEW -GNinja ..
    ninja
    ninja test
    sudo ninja install

    需要建立Python的索引

    cd /usr/lib/python3/dist-packages
    sudo vim uhd.pth
    
    /usr/local/lib/python3.12/site-packages

    查看GPU信息

    nvidia-smi

    GPU信息显示如下:

    Thu Nov 27 19:33:48 2025       
    +-----------------------------------------------------------------------------------------+
    | NVIDIA-SMI 580.95.05              Driver Version: 580.95.05      CUDA Version: 13.0     |
    +-----------------------------------------+------------------------+----------------------+
    | GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
    |                                         |                        |               MIG M. |
    |=========================================+========================+======================|
    |   0  NVIDIA GB10                    On  |   0000000F:01:00.0  On |                  N/A |
    | N/A   42C    P0              5W /  N/A  | Not Supported          |      0%      Default |
    |                                         |                        |                  N/A |
    +-----------------------------------------+------------------------+----------------------+
    

    安装 cupy

    pip install cupy-cuda13x --break-system-packages

    如果要让Spark的网口速率固定为10G,请执行指令

    sudo ethtool -s enP2p1s0f0np0 speed 10000 duplex full autoneg off

    检查速率

    sudo ethtool enP2p1s0f0np0 | grep -i speed

    因为不存在速率自动协商的功能,所以需要手动配置好。

    USRP X410 配置

    当你第一次拿到USRP X410的时候,请按照下图所示的常规的连接方法进行接线。

    • 将Spark和USRP都连接到同一台路由器中。
    • USRP的QSFP28口1和Spark的网口进行连接,注意正反。

    在Spark中启动一下终端,然后在终端中运行

    uhd_find_devices

    会得到如下的输出

    airan1@spark-bbdd:~$ uhd_find_devices 
    [INFO] [UHD] linux; GNU C++ version 13.3.0; Boost_108300; UHD_4.9.0.0-75-g0f522267
    --------------------------------------------------
    -- UHD Device 0
    --------------------------------------------------
    Device Address:
        serial: XXXXXXX
        addr: 192.168.0.104
        claimed: False
        fpga: X4_200
        mgmt_addr: 192.168.0.104
        product: x410
        type: x4xx

    然后输入指令进入终端

    airan1@spark-bbdd:~$ ssh root@192.168.0.104
    The authenticity of host '192.168.0.104 (192.168.0.104)' can't be established.
    ED25519 key fingerprint is SHA256:tu6m3SUsvFbVQxtLQiGBU/5BuEO3QexkXl4BNUh+Ye0.
    This key is not known by any other names.
    Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
    Warning: Permanently added '192.168.0.104' (XXXXXXX) to the list of known hosts.
    

    进入终端之后,也可以查看设备信息

    root@ni-x4xx-XXXXXXX:~# uhd_find_devices 
    [INFO] [UHD] linux; GNU C++ version 9.2.0; Boost_107100; UHD_4.1.0.7-0-g8f9508f7
    --------------------------------------------------
    -- UHD Device 0
    --------------------------------------------------
    Device Address:
        serial: XXXXXXX
        claimed: False
        fpga: X4_200
        mgmt_addr: 127.0.0.1
        product: x410
        type: x4xx

    完成之后,可以看到UHD得版本是4.1,可以来下载完整的镜像

    root@ni-x4xx-XXXXXXX:~# uhd_images_downloader

    下载完成之后,可以查看下载好的镜像

    root@ni-x4xx-XXXXXXX:~# ls /usr/share/uhd/images/

    在4.1版本中,是只能看到“X4_200”

    为了能在Spark中使用,那么就需要安装和Spark一样的UHD版本。

    更新文件系统

    root@ni-x4xx-XXXXXXX:~# usrp_update_fs -t master
    
    /usr/lib/python3.7/site-packages/usrp_mpm/rpc_server.py:24: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['urllib3.contrib.pyopenssl (/usr/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py)']. 
      monkey.patch_all()
    Downloading manifest file from https://raw.githubusercontent.com/EttusResearch/uhd/master/images/manifest.txt...
    [INFO] Using base URL: https://files.ettus.com/binaries/cache/
    [INFO] Images destination: /usr/share/uhd/images
    [INFO] Using manifest file at location: /tmp/tmpsb7jmy6_/manifest.txt
    The file size for this target (438.3 MiB) exceeds the download limit (100.0 MiB). Continue downloading? [y/N]y
    459548 kB / 459548 kB (100%) x4xx_common_mender_default-v4.9.0.0.zip
    [INFO] Images download complete.
    INFO[0000] Loaded configuration file: /etc/mender/mender.conf 
    INFO[0000] Mender running on partition: /dev/mmcblk0p2  
    INFO[0000] Start updating from local image file: [/usr/share/uhd/images/usrp_x4xx_fs.mender] 
    Installing Artifact of size 466179072...
    INFO[0000] No public key was provided for authenticating the artifact 
    INFO[0000] Update Module path "/usr/share/mender/modules/v3" could not be opened (open /usr/share/mender/modules/v3: no such file or directory). Update modules will not be available 
    INFO[0000] Opening device "/dev/mmcblk0p3" for writing  
    INFO[0000] Native sector size of block device /dev/mmcblk0p3 is 512 bytes. Mender will write in chunks of 1048576 bytes 
    ................................   0% 1024 KiB
    ................................   0% 2048 KiB
    ................................   0% 3072 KiB
    ................................   0% 4096 KiB
    ................................   1% 5120 KiB
    ................................   1% 6144 KiB
    ................................   1% 7168 KiB
    ................................   1% 8192 KiB
    ................................   2% 9216 KiB
    ................................   X
    ................................   X
    ................................  97% 444416 KiB
    ................................  97% 445440 KiB
    ................................  98% 446464 KiB
    ................................  98% 447488 KiB
    ................................  98% 448512 KiB
    ................................  98% 449536 KiB
    ................................  98% 450560 KiB
    ................................  99% 451584 KiB
    ................................  99% 452608 KiB
    ................................  99% 453632 KiB
    ................................  99% 454656 KiB
    ..................INFO[0153] All bytes were successfully written to the new partition 
    INFO[0153] The optimized block-device writer wrote a total of 3769 frames, where 1516 frames did need to be rewritten (i.e., skipped) 
    INFO[0155] Wrote 3951034368/3951034368 bytes to the inactive partition 
                   100% 455253 KiB
    INFO[0155] Enabling partition with new image installed to be a boot candidate: 3 
    Use -commit to update, or -rollback to roll back the update.
    At least one payload requested a reboot of the device it updated.
    Applied image. After reboot, check if everything works, and then run the command '$ mender -commit' to confirm (otherwise, this update will be undone).
    Note: Any data stored in this partition will be not accessible after reboot.
    Reboot now? [Yn] y
    Will reboot now. Hit Ctrl-C before the countdown expires to cancel.
    Rebooting in 3...
    2...
    1...
    Connection to 192.168.0.104 closed by remote host.
    Connection to 192.168.0.104 closed.

    也可以指定UHD版本

    usrp_update_fs -t v4.7.0.0

    清除ssh的垃圾信息

    ssh-keygen -f '/home/airan1/.ssh/known_hosts' -R '192.168.0.104'

    重新ssh登陆X410

    root@ni-x4xx-XXXXXXX:~# uhd_find_devices 
    [INFO] [UHD] linux; GNU C++ version 11.5.0; Boost_107800; UHD_4.9.0.0-0-g006d7f76
    --------------------------------------------------
    -- UHD Device 0
    --------------------------------------------------
    Device Address:
        serial: XXXXXXX
        claimed: False
        fpga: X4_200
        mgmt_addr: 127.0.0.1
        name: ni-x4xx-34E40F5
        product: x410
        type: x4xx

    查看对应的固件信息

    root@ni-x4xx-XXXXXXX:~# ls /usr/share/uhd/images/
    inventory.json		       usrp_x410_fpga_UC_200.dts.md5   usrp_x440_fpga_CG_1600.dts      usrp_x440_fpga_X4_1600.bit.md5  usrp_x440_fpga_X4_400.bit
    usrp_x410_fpga_CG_400.bit      usrp_x410_fpga_UC_200.rpt       usrp_x440_fpga_CG_1600.dts.md5  usrp_x440_fpga_X4_1600.dts      usrp_x440_fpga_X4_400.bit.md5
    usrp_x410_fpga_CG_400.bit.md5  usrp_x410_fpga_X4_200.bit       usrp_x440_fpga_CG_1600.rpt      usrp_x440_fpga_X4_1600.dts.md5  usrp_x440_fpga_X4_400.dts
    usrp_x410_fpga_CG_400.dts      usrp_x410_fpga_X4_200.bit.md5   usrp_x440_fpga_CG_400.bit       usrp_x440_fpga_X4_1600.rpt      usrp_x440_fpga_X4_400.dts.md5
    usrp_x410_fpga_CG_400.dts.md5  usrp_x410_fpga_X4_200.dts       usrp_x440_fpga_CG_400.bit.md5   usrp_x440_fpga_X4_200.bit       usrp_x440_fpga_X4_400.rpt
    usrp_x410_fpga_CG_400.rpt      usrp_x410_fpga_X4_200.dts.md5   usrp_x440_fpga_CG_400.dts       usrp_x440_fpga_X4_200.bit.md5
    usrp_x410_fpga_UC_200.bit      usrp_x410_fpga_X4_200.rpt       usrp_x440_fpga_CG_400.dts.md5   usrp_x440_fpga_X4_200.dts
    usrp_x410_fpga_UC_200.bit.md5  usrp_x440_fpga_CG_1600.bit      usrp_x440_fpga_CG_400.rpt       usrp_x440_fpga_X4_200.dts.md5
    usrp_x410_fpga_UC_200.dts      usrp_x440_fpga_CG_1600.bit.md5  usrp_x440_fpga_X4_1600.bit      usrp_x440_fpga_X4_200.rpt

    固件类型

    FPGA Image FlavorNumber of
    Channels
    Bandwidth
    per Channel
    QSFP28 Port 0 InterfaceQSFP28 Port 1 InterfaceDDC/DUCDRAM
    X4_2004 (2 per ZBX)200 MHz4x 10 GbE (All Lanes)UnusedYesYes (4 GiB, 4-Ch Replay)
    UC_2004 (2 per ZBX)200 MHzUnused100 GbEYesYes (4 GiB, 4-Ch Replay)
    CG_4004 (2 per ZBX)400 MHz100 GbE100 GbENoNo

    烧写支持100G的固件

    root@ni-x4xx-XXXXXXX:~# uhd_image_loader --args "type=x4xx,mgmt_addr=127.0.0.1,fpga=CG_400"
    
    [INFO] [UHD] linux; GNU C++ version 11.5.0; Boost_107800; UHD_4.9.0.0-0-g006d7f76
    [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=127.0.0.1,type=x4xx,product=x410,serial=XXXXXXX,name=ni-x4xx-XXXXXXX,fpga=X4_200,claimed=False,skip_init=1
    [INFO] [MPM.main] Launching USRP/MPM, version: 4.9.0.0-g006d7f76
    [INFO] [MPM.main] Spawning RPC process...
    [INFO] [MPM.PeriphManager] Device serial number: XXXXXXX
    [INFO] [MPM.PeriphManager.ClkMgr] Using Clock Configuration:
    DB0: Master Clock Rate: 245.76 MSps @Converter Rate 2.94912 GHz
    DB1: Master Clock Rate: 245.76 MSps @Converter Rate 2.94912 GHz
    [INFO] [MPM.PeriphManager] Initialized 2 daughterboard(s).
    [INFO] [MPM.PeriphManager] init() called with device args `boot_init=True,clock_source=internal,time_source=internal,initializing=True'.
    [INFO] [MPM.RPCServer] RPC server ready!
    [INFO] [MPM.RPCServer] Spawning watchdog task...
    [INFO] [MPMD] Claimed device without full initialization.
    [INFO] [MPMD IMAGE LOADER] Starting update. This may take a while.
    [INFO] [MPM.PeriphManager] Installing component `fpga'
    [INFO] [MPM.PeriphManager] Installing component `dts'
    [INFO] [MPM.RPCServer] Resetting peripheral manager.
    [INFO] [MPM.PeriphManager] Device serial number: XXXXXXX
    [INFO] [MPM.PeriphManager.ClkMgr] Using Clock Configuration:
    DB0: Master Clock Rate: 491.52 MSps @Converter Rate 2.94912 GHz
    DB1: Master Clock Rate: 491.52 MSps @Converter Rate 2.94912 GHz
    [INFO] [MPM.PeriphManager] Initialized 2 daughterboard(s).
    [INFO] [MPM.PeriphManager] init() called with device args `boot_init=True,clock_source=internal,time_source=internal,initializing=True'.
    [INFO] [MPMD IMAGE LOADER] Update component function succeeded.
    [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=127.0.0.1,type=x4xx,product=x410,serial=XXXXXXX,name=ni-x4xx-34E40F5,fpga=CG_400,claimed=False,find_all=1
    [INFO] [MPM.PeriphManager] init() called with device args `find_all=1,fpga=CG_400,mgmt_addr=127.0.0.1,name=ni-x4xx-XXXXXXX,product=x410,clock_source=internal,time_source=internal,initializing=True'.
    [INFO] [0/Radio#0] Clocking reconfigured, running ADC Self Cal on DB0...
    [INFO] [0/Radio#0] Calibrating channel 0...
    [INFO] [0/Radio#0] Calibrating channel 1...
    [INFO] [0/Radio#0] Calibrated 2 channels.
    [INFO] [0/Radio#1] Clocking reconfigured, running ADC Self Cal on DB1...
    [INFO] [0/Radio#1] Calibrating channel 2...
    [INFO] [0/Radio#1] Calibrating channel 3...
    [INFO] [0/Radio#1] Calibrated 2 channels.

    再次查看固件的版本

    root@ni-x4xx-XXXXXXX:~# uhd_find_devices 
    [INFO] [UHD] linux; GNU C++ version 11.5.0; Boost_107800; UHD_4.9.0.0-0-g006d7f76
    --------------------------------------------------
    -- UHD Device 0
    --------------------------------------------------
    Device Address:
        serial: XXXXXXX
        claimed: False
        fpga: CG_400
        mgmt_addr: 127.0.0.1
        name: ni-x4xx-XXXXXXX
        product: x410
        type: x4xx

    重启之后,是需要确认固件的,请执行该指令

    root@ni-x4xx-XXXXXXX:~# mender commit
    INFO[0000] Loaded configuration file: /etc/mender/mender.conf 
    INFO[0000] 'UpdateControlMapExpirationTimeSeconds' is not set in the Mender configuration file. Falling back to the default of 2*UpdatePollIntervalSeconds 
    INFO[0000] 'UpdateControlMapBootExpirationTimeSeconds' is not set in the Mender configuration file. Falling back to the default of 600 seconds 
    INFO[0000] Mender running on partition: /dev/mmcblk0p3  
    Committing Artifact...
    INFO[0000] Executing script: ArtifactCommit_Enter_10_migrate-configuration 
    INFO[0000] Committing update 

    在Spark中可以开启100G网口通道

    配置100G网口的IP地址

    注意IP地址:

    Interface NameDescriptionDefault ConfigurationConfiguration FileEx.: X4_xxx FPGA imageEx.: CG_xxx FPGA image
    eth0RJ45DHCPeth0.networkDHCPDHCP
    int0Internal169.254.0.1/24int0.network169.254.0.1/24169.254.0.1/24
    sfp0QSFP28 0 (4-lane interface or lane 0)192.168.10.2/24sfp0.network192.168.10.2/24192.168.10.2/24
    sfp0_1QSFP28 0 (lane 1)192.168.11.2/24sfp0_1.network192.168.11.2/24N/A
    sfp0_2QSFP28 0 (lane 2)192.168.12.2/24sfp0_2.network192.168.12.2/24N/A
    sfp0_3QSFP28 0 (lane 3)192.168.13.2/24sfp0_3.network192.168.13.2/24N/A
    sfp1QSFP28 1 (4-lane interface or lane 0)192.168.20.2/24sfp1.networkN/C192.168.20.2/24
    sfp1_1QSFP28 1 (lane 1)192.168.21.2/24sfp1_1.networkN/CN/A
    sfp1_2QSFP28 1 (lane 2)192.168.22.2/24sfp1_2.networkN/CN/A
    sfp1_3QSFP28 1 (lane 3)192.168.23.2/24sfp1_3.networkN/CN/A

    切换到Spark中,在Spark的终端中运行

    airan1@spark-bbdd:~$ uhd_find_devices 
    [INFO] [UHD] linux; GNU C++ version 13.3.0; Boost_108300; UHD_4.9.0.0-75-g0f522267
    --------------------------------------------------
    -- UHD Device 0
    --------------------------------------------------
    Device Address:
        serial: XXXXXXX
        addr: 192.168.10.2
        claimed: False
        fpga: CG_400
        mgmt_addr: 192.168.0.104
        mgmt_addr: 192.168.10.2
        name: ni-x4xx-XXXXXXX
        product: x410
        type: x4xx

    在输出中是可以看到已经显示出100G网口的IP信息了。

    安装一下Gnuradio

    sudo apt install gnuradio

    运行基础的频谱软件

    uhd_fft -f 2450M -s 500M

    运行在cpu的软件,会存在一些丢包情况,不够连续。

    系统配置

    方法一,修改缓冲区的大小

    sudo sysctl -w net.core.rmem_max=250000000
    sudo sysctl -w net.core.wmem_max=250000000

    查看修改之后的数值

    sysctl net.core.rmem_max
    sysctl net.core.wmem_max

    方法二,持久化该配置

    sudo nano /etc/sysctl.d/uhd.conf

    写入如下的内容

    net.core.rmem_max = 250000000
    net.core.wmem_max = 250000000

    保存后执行:

    sudo sysctl --system

    开启SCTP内核

    echo sctp | sudo tee /etc/modules-load.d/sctp.conf

    Docker增加信息

    # Add Docker's official GPG key:
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc
    
    # Add the repository to Apt sources:
    echo \
      "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
      $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
      sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    
    sudo nvidia-ctk runtime configure --runtime=docker
    sudo systemctl restart docker
    
    sudo usermod -aG docker $USER

    加载镜像

    docker load -i oai-amf-v2.1.0-1.2.tar
    docker load -i oai-ausf-v2.1.0-1.2.tar
    docker load -i oai-gnb-cuda.tar
    docker load -i oai-lmf-v2.1.0-1.2.tar
    docker load -i oai-nrf-v2.1.0-1.2.tar
    docker load -i oai-nr-ue-cuda.tar
    docker load -i oai-nssf-v2.1.0-1.2.tar
    docker load -i oai-smf-v2.1.0-1.2.tar
    docker load -i oai-udm-v2.1.0-1.2.tar
    docker load -i oai-udr-v2.1.0-1.2.tar
    docker load -i oai-upf-v2.1.0-1.2.tar
    docker load -i ran-base-cuda.tar
    docker load -i ran-build-cuda.tar
    docker load -i trf-gen-cn5g.tar
    docker load -i mysql-8-0.tar

    Python API使用

    创建USRP对象

    import uhd
    # X310、X410、Nxx系列单台设备
    usrp = uhd.usrp.MultiUSRP("addr=192.168.10.2") 
    # X310、X410、Nxx系列多台设备
    usrp = uhd.usrp.MultiUSRP("addr=192.168.10.2,addr=192.168.10.3") 
    # B210系列单台和多台
    usrp = uhd.usrp.MultiUSRP("serial=30BF56C,serial=30BF573") 

    配置参考时钟(10 MHz 和 PPS)

    usrp.set_clock_source("external")
    usrp.set_time_source("external")

    或者

    usrp.set_clock_source("gpsdo")
    usrp.set_time_source("gpsdo")

    接收信号

    samps = usrp.recv_num_samps(
        1e6, # Number of samples
        2.4e9, # Frequency in Hz
        1e6, # Sampling rate
        [0], # Receive on channel 0
        80, # 80 dB of RX gain
    )

  • 基于USRP构建多通道同步系统

    概述

    许多应用需要具有不同同步级别的多输入多输出 (MIMO) 配置。一些 MIMO 系统只需要 ADC 和 DAC 共用一个时钟,而另一些系统则要求每个通道都锁定到一个公共时钟和本地振荡器,以实现完全相位相干操作。

    一种常见的 MIMO 应用是空间复用通信。由于这只需要时钟同步,因此大多数配备外部 10 MHz 参考时钟的 USRP 就足够了。布里斯托大学和隆德大学构建的此类系统就是一个例子,他们使用基于 SDR 的大规模 MIMO 系统打破了无线频谱效率的世界纪录。本应用中使用的系统由 NI USRP 软件定义无线电设备和板载 FPGA 组成。

    图1:带有内置 LO 分布接口的 USRP N320 和 N321

    当需要完全相位相干操作时,您可以考虑以下几种方案。如果您需要最多四个通道的纯接收操作,可以设置带有两个 TwinRx 子板的 Ettus Research USRP X310 来共享 LO 并以相位相干方式运行。

    图2:USRP X310 + 2个TwinRx 子板
    型号描述未含税含税价格
    USRP X310母板(不含子板),万兆网口,PCIe口7680086784
    TwinRX10 MHz – 6 GHz, 80 MHz BW, 2 RX5260059438

    如果需要四个以上的通道,则可以考虑 Ettus Research USRP N320 和 N321(如图 1 所示)或 NI Ettus USRP X440(如图 2 所示)。由于 USRP X440 采用直接采样中频 (IF) 架构,因此可以通过在最多八个发射通道和八个接收通道之间共享采样时钟来实现同步。它已准备好与外部提供的参考时钟信号进行多设备同步。

    图3:USRP X440,8通道收发
    型号描述未含税含税价格
    Ettus USRP X44030 MHz ~ 4 GHz,八通道,1600 MHz带宽,100G 网口,PCIe口,GPSDO口,QSFP+218305246684.65

    USRP N321 配备内置 LO 分配硬件,允许高达 128 x 128 相位相干操作:图 4 显示了 32 x 32 配置示例。

    图4:USRP N320 和 N321 多通道相位相干系统

    关于N320和N321的售价见如下的表格

    型号描述未含税含税价格
    N3203 MHz ~ 6 GHz,双通道, 200 MHz带宽,万兆网口,QSFP+161285182252.05
    N3213 MHz ~ 6 GHz,双通道, 200 MHz带宽,万兆网口,QSFP+181420205004.6

    N320和N321的多通道系统

    在需要将多个发射器或接收器调谐到相同频率的应用中,进一步的要求可能是使LO相位同步。在具有相位同步LO的系统中,LO以及因此的通道本身具有确定性相位。在重新调谐LO时,此确定性相位保持不变。实现确定性相位可以通过使用LO合成器(该合成器接受同步脉冲以便在重新调谐后设置其相位)来实现,也可以通过在各个通道之间共享LO来实现。共享LO可以更好地抑制通道间相对相位随温度漂移的影响。

    USRP N320/N321 收发器采用 LO 共享机制。具体而言,LO 分配采用星型配置,比菊花链配置支持更高的通道数。最多可配置 128×128 通道的解决方案。

    图5:USRP N320 的 LO 分布的框图

    每个通道都包含一个用于接收和发射路径的内部本振 (LO),当 USRP N320 作为独立模块运行时,可以进行调谐。当配置在相位同步系统中,多个模块共享一个 LO 时,内部 LO 将被旁路,以便导入外部 LO。LO 分配器是一个无源分路器,它将单个 LO 从前面板路由到两个通道。Tx 和 Rx 分别使用独立的 LO,以便分别调谐这些路径。

    图6:N320 前面板
    图7:N321 LO 分配框图

    通道 0 为 Tx 和 Rx 路径提供 LO。LO 分配板包含用于 Rx 和 Tx 路径的相同电路。通道 0 的 LO 从 RF 板路由至 LO 分配板中的 1:4 功率分配器。LO 输入 0 用于下游模块,其中 LO 信号路由至 1:4 功率分配器。对于 LO 输入 1,LO 路由至 RF 板。图 8 显示了 N321 的前面板,其中突出显示了 LO 端口。

    图8:N321 前面板

    UHD LO 分配命令

    与 LO 分布相关的命令是 UHD 内的 multi_usrp 对象的一部分。

    RF 板 LO 设置为接受外部 LO Tx 路径:

    set_tx_lo_source(“external”, “lo1”, channel)

    Rx 路径:

    set_rx_lo_source(“external”, “lo1”, channel)

    其中channel= 0 | 1
    将射频板的本振信号路由至本振分配板的 1:4 分路器。这仅适用于主本振信号。发射路径:

    set_tx_lo_export_enabled(true, “lo1”, 0)

    Rx 路径:

    set_rx_lo_export_enabled(true, “lo1”, 0)

    将 LO 从前面板 IN0 端口路由到 1:4 分离器 Tx 路径:

    set_tx_lo_export_enabled(false, “lo1”, 0)

    Rx 路径:

    set_rx_lo_export_enabled(false, “lo1”, 0)

    启用分配输出端口 Tx 路径:

    get_device()->get_tree()->access<bool>("mboards/0/dboards/A/tx_frontends/0/los/lo1/lo_distribution/LO_OUT_<output_number>/export").set(<output_enabled>)

    Rx 路径:

    get_device()->get_tree()->access<bool>("mboards/0/dboards/A/rx_frontends/0/los/lo1/lo_distribution/LO_OUT_<output_number>/export").set(<output_enabled>)
    <output_number> = 0 |1|2|3
    <output_enabled> = true | false

    N321 + N320 布线图

    对于 4×4 通道配置,框图布线图如图 9 和图 10 所示。为了实现最低的相位漂移性能,最好确保电缆长度相似。

    在此用例中,需要以下 UHD 配置:

    N321配置:

    set_tx_lo_source(“external”, “lo1”, 0)
    set_tx_lo_source(“external”, “lo1”, 1)
    set_rx_lo_source(“external”, “lo1”, 0)
    set_rx_lo_source(“external”, “lo1”, 1)
    set_tx_lo_export_enabled(true, “lo1”, 0)
    set_rx_lo_export_enabled(true, “lo1”, 0)
    get_device()->get_tree()->access<bool>("mboards/0/dboards/A/tx_frontends/0/los/lo1/lo_distribution/LO_OUT_0/export").set(true)
    get_device()->get_tree()->access<bool>("mboards/0/dboards/A/tx_frontends/0/los/lo1/lo_distribution/LO_OUT_1/export").set(true)
    get_device()->get_tree()->access<bool>("mboards/0/dboards/A/rx_frontends/0/los/lo1/lo_distribution/LO_OUT_0/export").set(true)
    get_device()->get_tree()->access<bool>("mboards/0/dboards/A/rx_frontends/0/los/lo1/lo_distribution/LO_OUT_1/export").set(true)

    N320配置:

    set_tx_lo_source(“external”, “lo1”, 0)
    set_tx_lo_source(“external”, “lo1”, 1)
    set_rx_lo_source(“external”, “lo1”, 0)
    set_rx_lo_source(“external”, “lo1”, 1)
    图9:4×4 布线框图
    图10:4×4 布线配置

    更高通道数的布线

    图 11 显示了最多 8×8 个共享通道的简化布线图:

    图11. 最多 8×8 通道

    为简单起见,仅显示 Rx LO 布线。Tx 布线相同。电缆上的颜色编码表示电缆长度相似。

    在 9×9 和 32×32 通道之间,使用图 12 所示的布线配置。

    图 12. 最多 32×32 通道

    在 33×33 和 128×128 通道之间,使用图 13 所示的布线配置。

    图 13. 最多 128×128 个通道

    图 13 中,每个 32×32 通道的 Tile 都使用图 12 所示的布线。标记为“主”的 N321 为每个 32×32 Tile 提供 LO 信号。主 N321 仅提供 LO 信号,该模块的 Rx 和 Tx 部分未使用。在每个 Tile 中,主 LO 信号路由至 Tile 的 N321 In0 端口。

    测量性能

    图 14 显示了环境温度为 25 摄氏度时两个通道之间的相位漂移,这两个通道位于不同的模块中。

    图 14. 25 摄氏度时两个通道之间的相位漂移

    相位漂移小于0.1度。

    图 15 显示了当环境温度从 45 摄氏度变为 0 摄氏度时两个通道之间的相位漂移。

    图 15. 温度从 45 摄氏度变化至 0 摄氏度时两个通道之间的相位漂移

    相位漂移小于0.9度。

    星型配置中的本振共享可为多通道应用提供高度稳定的相位相干性。MIMO 和测向是两个需要具有相位相干性的多通道应用示例。USRP N320/N321 具有高度可配置的本振共享拓扑,允许 Rx 和 Tx 共享最多 128 个通道。

    其他产品

    NI是标杆,但是还有其他低成本的产品方案可以参考。

    KrakenSDR

    频率:24 MHz – 1766 MHz,通道带宽:2.56 MHz,通道数(RX Channels):5,本振稳定度(Oscillator Stability):1 PPM