Closed MattCarrickPL closed 11 months ago
Looking at a broader rework of roll-off. From https://github.com/TorchDSP/torchsig/blob/v0.4.2/tests/test_transforms_figures.py#L86 the roll-off has a nominal passband frequency of 0.05, and a stop band frequency of 0.98. The passband frequency has a 50% chance to be 0 or 0.05, and the stopband frequency has 50% chance to 0.98 or 1. Unclear the impact to the 50% chance to use a different passband or stopband frequency.
Plotting the resulting filter. The top image is the LPF that is designed, and the bottom image is after upconversion to the center frequency:
Based on the paper, presumably the roll-off impairment is intended to generate these three effects:
Considering a rework to include:
Here's the section on roll_off() from the paper for context
Example filter designs for the new roll_off() transform:
The filter is a sinc with randomized length and cutoff. A Bartlett window taper is applied to the filter to remove any nulls in the frequency response.
A slight, randomized center frequency offset is added to the filter as well. Here are some example filter responses:
Branch 201-roll_off-transform-needs-review-of-center_freq-calculation gitrev 84bc22e625e0bc5b6c6157e648fab3c1b14f9174 has the appropriate mods, but needs to be tested against the changes in wideband.py before merging into v0.4.2
Code merged into v0.4.2 via https://github.com/TorchDSP/torchsig/pull/209
The roll_off() transform needs another pass over the center_freq calculation:
https://github.com/TorchDSP/torchsig/blob/v0.4.2/torchsig/transforms/functional.py#L932
The formulation isn't immediately clear. Calculating some test values lowercutfreq = 0.125 and uppercutfreq=0.25, center_freq=-0.3125 which doesn't align with the input parameters. Also possible that I am not using the parameters within the proper units or normalization. Overall a better understanding of center_freq is needed which could result in a new calculation for it's value.