Signal go down in low pass filter
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Thimira Asurapmudalige
el 16 de Oct. de 2020
Comentada: Thimira Asurapmudalige
el 16 de Oct. de 2020
I am designing a filter to implement in a microcontroller and testing the filter in Matlab. Filter transfer function is this: .
the differance equation is : .
I designed the filter like this
load('118e12m.mat');
figure(1);
plot(val);
%%
y1 = zeros(1,size(val,2));
for i = 13 : size(val,2)
y1(i) = 2*y1(i-1) - y1(i-2) + val(i) - 2*val(i-6) + val(i-12);
end
figure(2)
plot(y1)
My inpput signal looks like this:
My output is look like this:
I want to know is there a way to avoid this signal going down
0 comentarios
Respuestas (1)
Image Analyst
el 16 de Oct. de 2020
Unfortunately you delayed a solution because you bloew by the posting guidelines and forgot to attach '118e12m.mat'.
However, you can still read them here and then after that probably someone will answer.
TUTORIAL: how to ask a question (on Answers) and get a fast answer - MATLAB Answers - MATLAB Central
It's probably because you're doing your filtering recursively, using the new prior y instead of the original prior y. Try calling your output array y2 instead of y1.
Ver también
Categorías
Más información sobre Digital Filter Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!