• Robert Schmidt's avatar
    Merge remote-tracking branch 'origin/srs_phy_simulator' into integration_2026_w03 (!3718) · 93b3a5ae
    Robert Schmidt authored
    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.
    93b3a5ae
nr_common.h 12.8 KB