Merge remote-tracking branch 'origin/srs_phy_simulator' into integration_2026_w03 (!3718)

Introduce SRS physical simulator and improvements

This MR consists of two parts:

- Introduces SRS physical simulator to test different configurations of
  SRS
- Improvements in the SRS channel estimation (Addressing the comments
  from old, unfinished MR !2875)
  - rewrite nr_srs_channel_estimation() to loop over rx antennas and
    antenna ports to be able to parallelize
  - Improvements in timing_advance_offset and timing_advance_offset_nsec
    computation
  - Introduce SRS multi-symbol channel estimation
    - The channel impulse response is estimated from the averaged
      channel frequency response over multiple symbols
    - The channel frequency estimates are left as they are to be able to
      estimate doppler in the future
  - Simplify SRS channel estimation to handle memory alignment in the
    case of different SRS configurations (eg: comboffset)

To use multiple symbols when running gNB, the following parameters needs
to be edited in the function get_srs_resource()

- srs_res->resourceMapping.startPosition with a range from {0,1,..,5}
  corresponds to the start symbol {13, 12, .. 8} with in a slot
- srs_res->resourceMapping.nrofSymbols indicates the number of symbols
  {n1, n2, and n4}

Make sure the that start symbol + number of symbols is < 14

The timing results for SRS in develop and srs_phy_simulator are as follows:

Command used: sudo ./nr_ulsim -n1000 -s50 -S50 -R273 -W2 -y2 -z2 -E 1 -P

develop

|__ RX SRS time                            124.94 us (1000 trials)		(124.94 total [ms])
    |__ Generate SRS sequence time           0.05 us (1000 trials)		(  0.05 total [ms])
    |__ Get SRS signal time                 19.41 us (1000 trials)		( 19.41 total [ms])
    |__ SRS channel estimation time         89.11 us (1000 trials)		( 89.11 total [ms])
    |__ SRS timing advance estimation time  13.10 us (1000 trials)		( 13.10 total [ms])
    |__ SRS report TLV build time            2.80 us (1000 trials)		(  2.80 total [ms])
        |__ SRS beam report build time       0.00 us (  0 trials)
        |__ SRS IQ matrix build time         2.73 us (1000 trials)

srs_phy_simulator

|__ RX SRS time                            211.93 us (1000 trials)		(211.93 total [ms])
    |__ Generate SRS sequence time           0.04 us (1000 trials)		(  0.04 total [ms])
    |__ Get SRS signal time                 19.55 us (1000 trials)		( 19.55 total [ms])
    |__ SRS channel estimation time        152.05 us (1000 trials)		(152.05 total [ms])
    |__ SRS timing advance estimation time  36.67 us (1000 trials)		( 36.67 total [ms])
    |__ SRS report TLV build time            2.96 us (1000 trials)		(  2.96 total [ms])
        |__ SRS beam report build time       0.00 us (  0 trials)
        |__ SRS IQ matrix build time         2.88 us (1000 trials)

Note that in srs_phy_simulator, to compute timing offset ns, an
oversampling factor of 2 is performed. Also, for peak detection, we
average the channel estimates for every port.
This commit is contained in:
Robert Schmidt
2026-01-13 13:39:32 +01:00
36 changed files with 1493 additions and 535 deletions
+21
View File
@@ -341,6 +341,27 @@ add_physim_test(physim.5g.nr_prachsim.test8 "15kHz SCS, 25 PRBs" nr_prachsim -a
add_physim_test(physim.5g.nr_psbchsim.test1 "SLSS Search" nr_psbchsim -I)
add_physim_test(physim.5g.nr_psbchsim.test2 "PSBCH TxRx" nr_psbchsim -n 30)
####################################################################################
###### nr_srssim unit test ######
####################################################################################
add_physim_test(physim.5g.nr_srssim.test1 "SRS: 30KHz SCS, 106 PRBs, ToA 24, Combsize 2" nr_srssim -n300 -R106 -s0 -S5 -y2 -z2 -d 24)
add_physim_test(physim.5g.nr_srssim.test2 "SRS: 30KHz SCS, 106 PRBs, ToA 15, Combsize 2, Threequarter sampling" nr_srssim -n300 -R106 -s0 -S5 -y2 -z2 -d 15 -k)
add_physim_test(physim.5g.nr_srssim.test3 "SRS: 30KHz SCS, 217 PRBs, ToA 8, Combsize 2" nr_srssim -n300 -R217 -s0 -S5 -y2 -z2 -d 8)
add_physim_test(physim.5g.nr_srssim.test4 "SRS: 30KHz SCS, 273 PRBs, TOA 30, Combsize 2" nr_srssim -n300 -R273 -s0 -S5 -y2 -z2 -d 30)
add_physim_test(physim.5g.nr_srssim.test5 "SRS: 30KHz SCS, 106 PRBs, ToA 16, Combsize 2, Cyclic shift 3" nr_srssim -n300 -R106 -s0 -S5 -y2 -z2 -d 16 -i 1)
add_physim_test(physim.5g.nr_srssim.test6 "SRS: 30KHz SCS, 106 PRBs, ToA 23, Combsize 2, Comb offset 1" nr_srssim -n300 -R106 -s0 -S5 -y2 -z2 -d 23 -f 1)
add_physim_test(physim.5g.nr_srssim.test7 "SRS: 30KHz SCS, 106 PRBs, ToA 8, Combsize 2, Symbol start 9" nr_srssim -n300 -R106 -s0 -S5 -y2 -z2 -d 8 -a 9)
add_physim_test(physim.5g.nr_srssim.test8 "SRS: 120KHz SCS, 32 PRBs, ToA 19, Combsize 2" nr_srssim -n300 -R32 -s0 -S5 -y2 -z2 -d 19 -u 3)
add_physim_test(physim.5g.nr_srssim.test9 "SRS: 30KHz SCS, 106 PRBs, ToA 11, Combsize 4" nr_srssim -n300 -R106 -s5 -S10 -y2 -z2 -d 11 -e 1)
add_physim_test(physim.5g.nr_srssim.test10 "SRS: 30KHz SCS, 106 PRBs, ToA 7, Combsize 4, Comb offset 1" nr_srssim -n300 -R106 -s5 -S10 -y2 -z2 -d 7 -e 1 -f 1)
add_physim_test(physim.5g.nr_srssim.test11 "SRS: 30KHz SCS, 106 PRBs, ToA 24, Combsize 2, SRS symbols 2, SRS start symbol 8" nr_srssim -n300 -R106 -s0 -S5 -y2 -z2 -d 24 -b 2 -a 8)
add_physim_test(physim.5g.nr_srssim.test12 "SRS: 30KHz SCS, 106 PRBs, ToA 24, Combsize 2, SRS symbols 4, SRS start symbol 8" nr_srssim -n300 -R106 -s0 -S5 -y2 -z2 -d 24 -b 4 -a 8)
add_physim_test(physim.5g.nr_srssim.test13 "SRS: 30KHz SCS, 106 PRBs, ToA 24, Combsize 4, SRS symbols 2, SRS start symbol 8" nr_srssim -n300 -R106 -s5 -S10 -y2 -z2 -d 24 -b 2 -e1 -a 8)
add_physim_test(physim.5g.nr_srssim.test14 "SRS: 30KHz SCS, 106 PRBs, ToA 24, Combsize 4, SRS symbols 4, SRS start symbol 8" nr_srssim -n300 -R106 -s5 -S10 -y2 -z2 -d 24 -b 4 -e1 -a 8)
add_physim_test(physim.5g.nr_srssim.test15 "SRS: 30KHz SCS, 217 PRBs, ToA 8, Combsize 2, SRS symbols 4, SRS start symbol 8" nr_srssim -n300 -R217 -s0 -S5 -y2 -z2 -d 8 -b 4 -a 8)
add_physim_test(physim.5g.nr_srssim.test16 "SRS: 30KHz SCS, 106 PRBs, SNR 2 dB to 30 dB in steps of 5 dB, ToA 24, Combsize 2" nr_srssim -n300 -R106 -s2 -S30 -y2 -z2 -d 24)
####################################################################################
###### offload-specific tests ######
####################################################################################