I am practicing some DSP techniques along with desktop application development using Python and PyQt. In my filter design application, I am able to create a filter by placing zeros and poles on a unit circle plot and then apply this filter to imported signal data or generate a signal by the movement of the mouse on a mouse pad area I defined in my code. However, a weird effect happened, when I generated a signal by mouse and applied a high-pass filter (zero at (0.5, 0) and pole at (-0.9, 0), a zigzag pattern (I don’t exactly know what its name is) appeared in the filtered data, like it was multiplied by the whole signal. though this effect doesn’t happen on an imported signal.
In my code, I am using SciPy to apply the filter in the following line:
self.filtered_data = signal.lfilter(
self.numerator, self.denominator, self.original_data
).real
As for the signal generation, I’m just getting the ‘y’ values of mouse movement along a PyQtgraph plotwidget.
Can anyone just refer to what the reason may be to learn it and solve it?