Matched Filter
__init__(alpha=0.8, fs=128000, Rb=400, span=6, type='RRC-Inverted', channel=None, bits_per_symbol=1)
Initializes a matched filter to maximize the SNR of the received signal.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alpha
|
float
|
Roll-off factor of the matched filter. |
0.8
|
fs
|
int
|
Sampling frequency. |
128000
|
Rb
|
int
|
Bit rate. |
400
|
span
|
int
|
Duration of the pulse in terms of bit periods. |
6
|
type
|
str
|
Type of filter, currently only "RRC-Inverted" and "Manchester-Inverted" are supported. |
'RRC-Inverted'
|
channel
|
str
|
Channel type, select between "Q" and "I". |
None
|
bits_per_symbol
|
int
|
Number of bits per symbol. |
1
|
Raises:
Type | Description |
---|---|
ValueError
|
If the filter type is not supported. |
Examples:
>>> import argos3
>>> import numpy as np
>>>
>>> Y = np.random.randint(0, 2, 20)
>>> X = np.random.randint(0, 2, 20)
>>>
>>> Xn = argos3.Encoder().encode(X)
>>> Yn = argos3.Encoder().encode(Y)
>>>
>>> formatterI = argos3.Formatter(Rb=1000, type="RRC", channel="I", bits_per_symbol=1)
>>> formatterQ = argos3.Formatter(Rb=1000, type="Manchester", channel="Q", bits_per_symbol=2)
>>>
>>> dI = formatterI.apply_format(Xn)
>>> dQ = formatterQ.apply_format(Yn)
>>>
>>> mfI = argos3.MatchedFilter(Rb=1000, type="RRC-Inverted", channel="I", bits_per_symbol=1)
>>> mfQ = argos3.MatchedFilter(Rb=1000, type="Manchester-Inverted", channel="Q", bits_per_symbol=2)
>>>
>>> dI_prime = mfI.apply_filter(dI)
>>> dQ_prime = mfQ.apply_filter(dQ)
- Time Domain:
- Frequency Domain:
inverted_pulse(pulse)
Inverts the pulse g(t) to be used as the matched filter g(-t).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pulse
|
ndarray
|
Pulse to be inverted. |
required |
Returns:
Name | Type | Description |
---|---|---|
pulse_inverted |
ndarray
|
Inverted pulse. |
Examples:
- RRC Matched Filter Impulse Response:
- Manchester Matched Filter Impulse Response:
apply_filter(signal)
Applies the matched filter to the input signal \(s(t)\).
\[
x(t) = s(t) \ast g(-t)
\]
Where
- \(x(t)\): Filtered signal.
- \(s(t)\): Input signal.
- \(g(-t)\): Inverted pulse.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
signal
|
ndarray
|
Input signal \(s(t)\). |
required |
Returns:
Name | Type | Description |
---|---|---|
signal_filtered |
ndarray
|
Filtered signal \(x(t)\). |