Discrepancy Between Impulse Response Equation and Python Code Implementation
Closed this issue · 1 comments
The equation that defines the impulse response of the raised-cosine filter is available at:
https://github.com/777arc/PySDR/blob/master/content/pulse_shaping.rst?plain=1#L104
However, the Python code implementation, found at:
https://github.com/777arc/PySDR/blob/master/content/pulse_shaping.rst?plain=1#L197
appears to be missing the term 1/Ts.
After conducting a search on the internet, I concluded that the equation is correct. However, upon further examination, I realized that the Python code is also correct. This is because when the term 1/Ts is added, the result is approximately 0.2 instead of approximately 1.
Could you please add an explanation in this section to describe why there is a difference between the equation and the Python code?"
Ahhh ok I see the discrepancy. I think the equation for the filter has a 1/Ts because it causes the filter to have unity gain, e.g. when applied to a signal it wont change the power in the signal if the 1/Ts is there. But when using it as a pulse-shaping filter on a pulse train of 1's and -1's, if you want the output to have its values stay at 1 and -1 then you cant use the 1/Ts. So no wrong answer, but I'll go ahead and remove the 1/Ts from the equation in pysdr but also add a note about why it doesnt match equations found on wikipedia and elsewhere.