Synchronizer
__init__(fs=128000, Rb=400, sync_word='2BEEEEBF', channel_encode=('nrz', 'man'), sync_window=None)
Initializes the symbol synchronizer to identify the moment of maximum correlation between the received signal and the synchronization signal.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fs
|
int
|
Sampling frequency of the received signal. |
128000
|
Rb
|
int
|
Transmission rate of the received signal. |
400
|
sync_word
|
str
|
Synchronization word. |
'2BEEEEBF'
|
channel_encode
|
tuple
|
Tuple with the type of encoding of the I and Q channels respectively. |
('nrz', 'man')
|
Examples:
>>> import argos3
>>> import numpy as np
>>>
>>> Si, Sq = argos3.Preamble(preamble_hex="2BEEEEBF").generate_preamble()
>>>
>>> X = np.random.randint(0,2,20)
>>> Y = np.random.randint(0,2,20)
>>> X, Y = argos3.Multiplexer().concatenate(Si, Sq, X, Y)
>>>
>>> Xn = argos3.Encoder().encode(X)
>>> Yn = argos3.Encoder().encode(Y)
>>>
>>> formatterI = argos3.Formatter(type="RRC", channel="I", bits_per_symbol=1)
>>> formatterQ = argos3.Formatter(type="Manchester", channel="Q", bits_per_symbol=2)
>>>
>>> mfI = argos3.MatchedFilter(type="RRC-Inverted", channel="I", bits_per_symbol=1)
>>> mfQ = argos3.MatchedFilter(type="Manchester-Inverted", channel="Q", bits_per_symbol=2)
>>>
>>> dI = mfI.apply_filter(formatterI.apply_format(Xn))
>>> dQ = mfQ.apply_filter(formatterQ.apply_format(Yn))
>>>
>>> sync = argos3.Synchronizer()
>>> delayQ_min, delayQ_max, delayQ, corr_vec = sync.correlation(dQ, "Q")
>>>
>>> print(delayQ_min)
0.079984375
>>> print(delayQ_max)
0.117484375
>>> print(delayQ)
0.098734375
- Time Domain:
create_sincronized_word(sync_word)
Creates the vectors of symbol \(S_I(t)\) and \(S_Q(t)\), corresponding to the synchronization word of channel \(I\) and \(Q\), respectively. The length of the synchronization word is given by \(\Delta \tau\), according to the expression below.
Where
- \(\Delta \tau\) is the length of the synchronization word.
- \(L_{sync}\) is the length of the synchronization word of \(S_I(t)\) and \(S_Q(t)\).
- \(R_b\) is the bit rate.
- \(f_s\) is the sampling frequency.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sync_word
|
str
|
Synchronization word. |
required |
Examples:
- Time Domain:
correlation(signal, channel)
Performs the cross-correlation between the received signal \(s(t)\) and the synchronization word \(d(t)\), for each time index \(t\).
Where
- \(s(t)\) and \(d(t)\) are the symbol vectors of the received signal and the synchronization word, respectively.
- \(k\) is the time index in the cross-correlation vector.
- \(c[k]\) is the cross-correlation value for the index \(k\).
Subsequently, the index of \(c[k]\) with the highest value is located, resulting in \(k_{max}\), this is the sample index with the highest correlation between the received signal and the synchronization word, finally, the delay \(\tau\) is calculated.
Where
- \(\tau\): Delay between the received signal and the synchronization word.
- \(f_s\): Sampling frequency of the received signal.
- \(k_{max}\): Sample index with the highest correlation between the received signal and the synchronization word.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
signal
|
ndarray
|
Received signal. |
required |
channel
|
str
|
Channel of reception, \(I\) or \(Q\). |
required |
Returns:
Name | Type | Description |
---|---|---|
delay |
tuple
|
Tuple containing the delay \(\tau\), the delay \(\tau_{min}\) and the delay \(\tau_{max}\). |
Examples:
- Correlation Factor: