Unexpected output of octaveFilter

조회 수: 2(최근 30일)
Leonard 2022년 8월 10일
편집: jibrahim 2022년 8월 15일
Hey Guys,
I have a problem with the OcataveFilter or do not understand the specific output yet. Maybe you could help me.
So first I create an octaveFilter object.
centerFreq = 800;
bw = '1/3 octave';
Fs = 16000;
octFilt = octaveFilter(centerFreq,bw,'SampleRate',Fs);
My audio data is available as a vector (audio_data). I pass this vector to the system object. Here I keep to the appropriate documentation
filtered_audio_data = octfilt(audio_data);
Now I have presented the data here: I do not understand this behavior. Why is the course between filtered and undfiltered exactly identical ? My expected result is shown at the very bottom. What am I doing wrong in the calculation and what do I have to do to get the expected result ?
Thanks fpr your advice and help
Before Filtering (audio_data):
After Filtering (filtered_audio_data):
Expected Result:

채택된 답변

jibrahim 2022년 8월 12일
Hi Leonard,
The first thing to check is that your input is a column vector. octaveFilter treats each column of data as an independent channel. Second, keep in mind the filter has memory, so there will be transient behavior. If you call the object with a short input, you might be still in the transient region. You need to either call it with more data, or call it more times with more data
  댓글 수: 2
jibrahim 2022년 8월 15일
편집: jibrahim 2022년 8월 15일
Hi Leonard,
Maybe this code helps if you compare with yours. Not sure what's the problem, but this snippet shows the same filter actually modifying a simple test signal:
centerFreq = 800;
bw = '1/3 octave';
Fs = 16000;
octFilt = octaveFilter(centerFreq,bw,'SampleRate',Fs);
octFilt.visualize % see the theoretical response
% Hopefully the filter will attenuate one sine and pass the other one:
osc = audioOscillator(NumTones=2, Frequency=[800 2000],SampleRate=Fs);
scope = timescope(SampleRate=Fs);
for index=1:100
x = osc();
y = octFilt(x);
scope([x,y]) % compare before and after

댓글을 달려면 로그인하십시오.

추가 답변(0개)


Find more on Audio Processing Algorithm Design in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by