I am new to signal processing and im trying my best to figure out how to build a high pass filter then later on implement it. (in c#)
Edit: I rewrote the question with math notation,
if someting is still wrong i will try to correct it. It is my first time to write a question in math notation.
This is to learn and for my private work, no school related :P
What i don't understand is how to calculate a high pass filter, the math is from a frend that i work with everyting except the result calculation.
//MaxPeriod and MinPeriod are (2, 10)
wight = (cos(.707 * 360 / MaxPeriod) + sin(.707 * 360 / 20) - 1) / cos(.707 * 360 / 20)
"i" is the currently input and "o" is the stored calculations of previous finalResults
//High Pass calculation
result = i - (o + wight * (i - o))
//Lets all spectrala components over a period of 10 get analyzed
//It is mainly used to make the data smooth and responsive
a1 = exp(-1.414 * 3.14159 / MinPeriod)
b1 = 2 * a1 * cos(1.414 * 180 / MinPeriod)
c2 = b1
c3 = -a1 * a1
c1 = 1 - c2 - c3
prevResult and prevResult2 is the stored calculation of result.
finalResult = c1 * (result * 2) / 2 + c2 * prevResult + c3 * prevResult2
It's difficult since you apparently are not looking for how to generally build a high-pass filter but by what you wrote you apparently have something specific in mind. Maybe it was a school-task or you read something somewhere and then got it somehow wrong. So maybe you should disclose your sources. But as it stands there, your question does not make sense to me. What is alpha, how is it calculated? What are you trying to do? This is not meant to be offensive.
– jan Jul 29 '13 at 21:00