# How to apply a delta-filter

I'm trying to apply delta filter to remove pre-fault conditions from my signal. It is formed by a vector (7680x1), the signal was generated at 60Hz and has 32 samples per cycle lasting 4 seconds.

The problem is that I was unsuccessful with my attempts. I believe I didn't understand correctly, I would like better clarification if possible.

I'm trying to implement it in matlab

TEORY:

The basic delta-filter subtracts from a time waveform the same waveform dalayed by an integral number times the waveform period.

In a delta-filter, the delayed waveform is called the reference signal. The delay implemented in the filter is called the delta-filter delay.

$$\Delta \mathrm{v}(\mathrm{t})=\mathrm{v}(\mathrm{t})-\mathrm{v}(\mathrm{t}-\mathrm{nT})$$

• Okay, I think you wanna go fully discrete-time. You want to let $t=nT$. $$\Delta v[n] = v[n] - v[n-1]$$ and the delay is exactly one sample time. Commented Mar 7 at 23:30
• Or, $$\Delta v[n] = v[n]-v[n-K]$$ with $K$ of your choosing...
– Jdip
Commented Mar 7 at 23:43
• This value of k, what can I choose according to? Would a signal cycle be good? Commented Mar 8 at 0:59
• A question has a question mark at the end. Please edit your question so that it is a question, by asking a question at the end such as "what did I do wrong?". While you're editing your question, saying "I was unsuccessful" is not helpful. Please expand your description to include what you expected to happen and what actually happened. Preferably, show us plots of the input and output to your Delta filter, and show us the exact algorithm you used. Give us code if you must, but try to show us just the filter, not a bunch of extraneous stuff. Commented Mar 9 at 4:27