Ranging Module

The ranging module provides ranging and timing analysis capabilities for space communications systems.

Calculations related to two-way sequential or pseudo-noise (PN) radiometric ranging.

This module provides functions for calculating range ambiguity and power allocations between residual carrier and modulated components.

References

[1] 810-005 203, Rev. D “Sequential Ranging”

[2] 810-005 214, Rev. C “Pseudo-Noise and Regenerative Ranging”

[3] CCSDS 414.1-B-3 “Pseudo-Noise (PN) Ranging Systems Recommended Standard”

[4] CCSDS 414.0-G-2 “Pseudo-Noise (PN) Ranging Systems Informational Report”

class spacelink.core.ranging.PnRangingCode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

The type of PN ranging code used.

DSN = 1
CCSDS_T4B = 2
CCSDS_T2B = 3
class spacelink.core.ranging.DataModulation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

The type of data modulation used alongside ranging.

BIPOLAR = 1
SINE_SUBCARRIER = 2
class spacelink.core.ranging.RangeClockWaveform(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

The shape of the ranging clock component.

SQUARE = 1
SINE = 2
class spacelink.core.ranging.TrackingArchitecture(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

The architecture of the ranging clock tracking system.

CLOSED_LOOP = 1
OPEN_LOOP = 2
spacelink.core.ranging.CODE_LENGTH = 1009470

The length of the full PN ranging sequence.

The DSN and CCSDS PN ranging codes all have the same length.

References

[2] Equation (9).

[3] Sections 3.2.2 and 3.2.3.

Type:

int

spacelink.core.ranging.COMPONENT_LENGTHS = {1: 2, 2: 7, 3: 11, 4: 15, 5: 19, 6: 23}

The lengths of the six components of the PN ranging codes.

The DSN and CCSDS PN ranging codes all have the same component lengths.

The key is the component index (1-6). The value is the length of the component in chips.

References

[2] Table 2.

[3] Sections 3.2.2 and 3.2.3.

Type:

dict[int, int]

spacelink.core.ranging.pn_sequence_range_ambiguity(ranging_clock_rate)[source]

Compute the range ambiguity of the standard PN ranging sequences.

Parameters:

ranging_clock_rate (Frequency) – Rate of the ranging clock \(f_{RC}\). This is half the chip rate.

Returns:

The range ambiguity distance.

Return type:

Distance

References

[2] Equation (11).

[4] p. 2-2.

spacelink.core.ranging.chip_snr(ranging_clock_rate, prn0)[source]

Compute the chip SNR \(2E_C/N_0\) in decibels.

Parameters:
  • ranging_clock_rate (Frequency) – Rate of the ranging clock \(f_{RC}\). This is half the chip rate.

  • prn0 (DecibelHertz) – The ranging signal-to-noise spectral density ratio \(P_R/N_0\).

Returns:

The chip SNR \(2E_C/N_0\).

Return type:

Decibels

References

[4] p. 2-3.

spacelink.core.ranging.carrier_to_total_power(mod_idx_ranging, mod_idx_data, modulation)[source]

Ratio of residual carrier power to total power \(P_{C}/P_{T}\).

This applies under the following conditions:

  • The ranging clock (chip pulse shape in the case of PN ranging) is a sinewave.

  • Uplink or regenerative downlink.

This does not apply to the downlink case when a transparent (non-regenerative) transponder is used.

Parameters:
  • mod_idx_ranging (Angle) – The RMS phase deviation by ranging signal; \(\phi_{r}\) for uplink or \(\theta_{rs}\) for downlink.

  • mod_idx_data (Angle) – The RMS phase deviation by data signal; \(\phi_{cmd}\) for uplink or \(\theta_{tlm}\) for downlink.

  • modulation (DataModulation) – The data modulation type.

Returns:

The ratio of residual carrier power to total power \(P_{C}/P_{T}\).

Return type:

Dimensionless

References

[1] Equation (10) for sequential ranging uplink.

[2] Equation (19) for PN ranging uplink, (50) for regenerative downlink.

spacelink.core.ranging.ranging_to_total_power(mod_idx_ranging, mod_idx_data, modulation)[source]

Ratio of usable ranging power to total power \(P_{R}/P_{T}\).

This applies under the following conditions:

  • The ranging clock (chip pulse shape in the case of PN ranging) is a sinewave.

  • Uplink or regenerative downlink.

This does not apply to the downlink case when a transparent (non-regenerative) transponder is used.

Parameters:
  • mod_idx_ranging (Angle) – The RMS phase deviation by ranging signal; \(\phi_{r}\) for uplink or \(\theta_{rs}\) for downlink.

  • mod_idx_data (Angle) – The RMS phase deviation by data signal; \(\phi_{cmd}\) for uplink or \(\theta_{tlm}\) for downlink.

  • modulation (DataModulation) – The data modulation type.

Returns:

The ratio of usable ranging power to total power \(P_{R}/P_{T}\).

Return type:

Dimensionless

References

[1] Equation (11) for sequential ranging uplink.

[2] Equation (20) for PN ranging uplink, (51) for regenerative downlink.

spacelink.core.ranging.data_to_total_power(mod_idx_ranging, mod_idx_data, modulation)[source]

Ratio of usable data power to total power \(P_{D}/P_{T}\).

This applies under the following conditions:

  • The ranging clock (chip pulse shape in the case of PN ranging) is a sinewave.

  • Uplink or regenerative downlink.

This does not apply to the downlink case when a transparent (non-regenerative) transponder is used.

Parameters:
  • mod_idx_ranging (Angle) – The RMS phase deviation by ranging signal; \(\phi_{r}\) for uplink or \(\theta_{rs}\) for downlink.

  • mod_idx_data (Angle) – The RMS phase deviation by data signal; \(\phi_{cmd}\) for uplink or \(\theta_{tlm}\) for downlink.

  • modulation (DataModulation) – The data modulation type.

Returns:

The ratio of usable data power to total power \(P_{D}/P_{T}\).

Return type:

Dimensionless

References

[1] Equation (12) for sequential ranging uplink.

[2] Equation (21) for PN ranging uplink, (52) for regenerative downlink.

spacelink.core.ranging.pn_component_to_ranging_power(code, component)[source]

Usable PN component power to total ranging power ratio.

This returns the power ratio \(P_n / P_R\) for the \(n\)-th component of the PN ranging signal. For \(n = 1\) this is equivalent to \(P_{RC} / P_R\) where \(P_{RC}\) is the usable power in the ranging clock component.

Parameters:
  • code (PnRangingCode) – The PN ranging code type.

  • component (int) – The component index \(n\) in [1, 6]. Component 1 is the ranging clock.

Returns:

The fraction of usable ranging power \(P_n / P_R\).

Return type:

Dimensionless

References

[2] Tables 3–5 (\(R_n\) values; power fraction is \(R_n^2\)).

spacelink.core.ranging.pn_component_acquisition_probability(ranging_to_noise_psd, integration_time, code, component)[source]

Compute the acquisition probability for one component of the PN ranging code.

Successful acquisition means that the correct phase of the component code is identified by the receiver. The number of possible phases is equal to the component length.

This calculation assumes that the received signal is correlated against all possible cyclic shifts of the component code in parallel and that the shift with the maximum correlation output is selected. See [4] Section 2.6.2 for details.

This function uses equation (91) from [2]. [4] has an equivalent equation in Section 2.6.3.2, but it uses slightly different values for the cross-correlation coefficients which leads to slightly different acquisition probabilities.

Parameters:
  • ranging_to_noise_psd (Frequency) – The ranging-to-noise power spectral density \(P_R/N_0\).

  • integration_time (Time) – The integration time \(T\).

  • code (PnRangingCode) – The PN ranging code type.

  • component (int) – The component index in [1, 6].

Returns:

The acquisition probability for the given component.

Return type:

Dimensionless

References

[2] Equation (91).

spacelink.core.ranging.pn_acquisition_probability(ranging_to_noise_psd, integration_time, code)[source]

Compute the overall acquisition probability for the PN ranging code.

This is the product of the acquisition probabilities for all components.

This calculation assumes that correlations for all component codes are performed in parallel. See [4] Section 2.6.2 for details.

Parameters:
  • ranging_to_noise_psd (Frequency) – The ranging-to-noise power spectral density \(P_R/N_0\).

  • integration_time (Time) – The integration time \(T\).

  • code (PnRangingCode) – The PN ranging code type.

Returns:

The overall acquisition probability for the PN ranging code.

Return type:

Dimensionless

References

[2] Equation (90).

spacelink.core.ranging.pn_acquisition_time(ranging_to_noise_psd, success_probability, code)[source]

Compute the acquisition time for the PN ranging code.

Successful acquisition means that the correct phase of the full PN ranging sequence is identified by the receiver. For the same receiver architecture, higher probability of successs requires either higher \(P_R/N_0\) or more time.

This calculation assumes that correlations for all component codes are performed in parallel, which is typical for ground station receivers. [3] and [4] refer to this as “station acquisition,” though it could also apply to a regenerative transponder that uses the same parallel correlation architecture. The See [4] Section 2.6.2 for details.

Keep in mind that this only accounts for the acquisition time of a single PN ranging receiver. If a regenerative transponder is used, the ground station receiver’s acquisition processing can’t begin until the on-board transponder has completed its acquisition processing.

Parameters:
  • ranging_to_noise_psd (Frequency) – The ranging-to-noise power spectral density \(P_R/N_0\).

  • success_probability (Dimensionless) – The desired probability of successful acquisition.

  • code (PnRangingCode) – The PN ranging code type.

Returns:

The minimum integration time required to achieve the desired probability of successful acquisition.

Return type:

Time

References

[2] Inverse of Equation (90).

class spacelink.core.ranging.RangeJitterParameters(loop_bandwidth, range_clock_to_noise_psd, range_clock_waveform, reference_clock_waveform, tracking_architecture=None)[source]

Bases: object

Parameters for range estimator jitter or variance calculations.

Parameters:
  • loop_bandwidth (Frequency) – The one-sided bandwidth \(B\) of the ranging clock tracking loop. If the tracking system uses an open-loop architecture then \(B = 1 / (2T)\) where \(T\) is the integration time.

  • range_clock_to_noise_psd (DecibelHertz) – The ranging-clock-to-noise power spectral density \(P_{RC}/N_0\). In general this is smaller than the ranging-to-noise power spectral density \(P_R/N_0\) because the ranging clock is only one component of the composite ranging signal.

  • range_clock_waveform (RangeClockWaveform) – The shape of the ranging clock.

  • reference_clock_waveform (RangeClockWaveform) – The shape of the reference clock in the receiver, which may or may not be matched to the transmitted ranging clock waveform.

  • tracking_architecture (TrackingArchitecture | None) – The architecture of the ranging clock tracking system (open or closed loop). Only required if the range clock and reference clock are both square.

loop_bandwidth: Annotated[Quantity]
range_clock_to_noise_psd: Annotated[Quantity]
range_clock_waveform: RangeClockWaveform
reference_clock_waveform: RangeClockWaveform
tracking_architecture: Optional[TrackingArchitecture] = None
__init__(loop_bandwidth, range_clock_to_noise_psd, range_clock_waveform, reference_clock_waveform, tracking_architecture=None)
spacelink.core.ranging.pn_regen_end_to_end_jitter(range_clock_rate, uplink_params, downlink_params)[source]

Calculate the standard deviation of end-to-end range measurement error for regenerative pseudo-noise (PN) ranging.

An approximation is used to determine how much of the uplink jitter contributed to the end-to-end jitter. This approximation is most accurate when the loop bandwidth of the transponder is significantly different from the loop bandwidth of the ground station. When the bandwidths are similar then the most accurate approach is to multiply the transfer functions of the two systems but this is not implemented here.

Parameters:
  • range_clock_rate (Frequency) – Frequency of the ranging clock (half the chip rate).

  • uplink_params (RangeJitterParameters) – Uplink ranging parameters.

  • downlink_params (RangeJitterParameters) – Downlink ranging parameters.

Returns:

The standard deviation of the end-to-end range estimation error (1-sigma).

Return type:

Distance

References

[2] Section 2.5.4.

[4] Sections 2.5 and 2.7.