f



band pass filter design on composite sinusoidal signals of 1 khz, 2khz and 3 khz

hi,
   i have 3 sinusoidal signals of frequency 1Khz, 2khz and 3 khz added
up to form a composite signal. i designed one bandpass filter centered
using FDATool in matlab. i tried to give pass band range as small as
1950 to 2050 (remember i want to allow only 2khz rejecting all others)
to as large as 1.5 Khz to 2.5Khz. The designed filter is an FIR filter
with attenuation set at 80. i was able to design many
filters..changing sampling frequency and passband parameters but none
of them gave me my input 2khz signal in output (all gave some
different type of waveforms in output).  i am more interested in
extracting out 2khz signal. i am not getting the output same as my
input sinusoidal 2khz signal. i feel..i am missing some basic theory
in this regard..plz do help me in this regard or guide me.

thanks
aizza


0
aizzaahmed (35)
2/8/2010 5:36:00 PM
comp.dsp 20285 articles. 1 followers. allnor (8506) is leader. Post Follow

5 Replies
1027 Views

Similar Articles

[PageSpeed] 55

On Mon, 08 Feb 2010 09:36:00 -0800, aizza ahmed wrote:

> hi,
>    i have 3 sinusoidal signals of frequency 1Khz, 2khz and 3 khz added
> up to form a composite signal. i designed one bandpass filter centered
> using FDATool in matlab. i tried to give pass band range as small as
> 1950 to 2050 (remember i want to allow only 2khz rejecting all others)
> to as large as 1.5 Khz to 2.5Khz. The designed filter is an FIR filter
> with attenuation set at 80. i was able to design many filters..changing
> sampling frequency and passband parameters but none of them gave me my
> input 2khz signal in output (all gave some different type of waveforms
> in output).  i am more interested in extracting out 2khz signal. i am
> not getting the output same as my input sinusoidal 2khz signal. i
> feel..i am missing some basic theory in this regard..plz do help me in
> this regard or guide me.
> 
> thanks
> aizza

Attenuation set at 80 what?  What sort of "different type of waveforms" 
were you getting?  How are you implementing the filter?  Have you looked 
at a frequency-domain plot of the filter response, to see how well it 
attenuates at 1kHz and 3kHz?

You are specifying a passband, and what sounds like an ultimate 
attenuation (I assume you mean "80dB"), but you're not specifying a shape 
factor -- what attenuation defines your passband ripple, and at what 
frequencies does your filter attain 80dB of attenuation?

You may have specified the filter incorrectly.
Matlab may have built the filter incorrectly.
You may be implementing the filter incorrectly.

You need to figure out which of the above has happened, then you can move 
on to the next step.

-- 
www.wescottdesign.com
0
Tim
2/8/2010 5:59:05 PM
On Feb 8, 11:36=A0am, aizza ahmed <aizzaah...@gmail.com> wrote:
> hi,
> =A0 =A0i have 3 sinusoidal signals of frequency 1Khz, 2khz and 3 khz adde=
d
> up to form a composite signal. i designed one bandpass filter centered
> using FDATool in matlab. i tried to give pass band range as small as
> 1950 to 2050 (remember i want to allow only 2khz rejecting all others)
> to as large as 1.5 Khz to 2.5Khz. The designed filter is an FIR filter
> with attenuation set at 80. i was able to design many
> filters..changing sampling frequency and passband parameters but none
> of them gave me my input 2khz signal in output (all gave some
> different type of waveforms in output). =A0i am more interested in
> extracting out 2khz signal. i am not getting the output same as my
> input sinusoidal 2khz signal. i feel..i am missing some basic theory
> in this regard..plz do help me in this regard or guide me.
>
> thanks
> aizza

Aizza
FDATool requires more data than you are giving for a bandpass design.
You need to have 5 frequencies: stopband1, passband1, passband2,
stopband2, and the sampling frequency.

Maurice Givens
0
maury
2/8/2010 6:12:23 PM
On Feb 8, 11:12=A0pm, maury <maury...@core.com> wrote:
> On Feb 8, 11:36=A0am, aizza ahmed <aizzaah...@gmail.com> wrote:
>
>
>
>
>
> > hi,
> > =A0 =A0i have 3 sinusoidal signals of frequency 1Khz, 2khz and 3 khz ad=
ded
> > up to form a composite signal. i designed one bandpass filter centered
> > using FDATool in matlab. i tried to give pass band range as small as
> > 1950 to 2050 (remember i want to allow only 2khz rejecting all others)
> > to as large as 1.5 Khz to 2.5Khz. The designed filter is an FIR filter
> > with attenuation set at 80. i was able to design many
> > filters..changing sampling frequency and passband parameters but none
> > of them gave me my input 2khz signal in output (all gave some
> > different type of waveforms in output). =A0i am more interested in
> > extracting out 2khz signal. i am not getting the output same as my
> > input sinusoidal 2khz signal. i feel..i am missing some basic theory
> > in this regard..plz do help me in this regard or guide me.
>
> > thanks
> > aizza
>
> Aizza
> FDATool requires more data than you are giving for a bandpass design.
> You need to have 5 frequencies: stopband1, passband1, passband2,
> stopband2, and the sampling frequency.
>
> Maurice Givens

hi maurice and wescott,
         thanks for response. i am giving all details. plz let me know
if you need any.

Each signal i.e. (1khz, 2khz and 3khz sinusoidal signal is sampled at
96khz and added to form a composite signal. and i need to extract 2khz
signal by passing it through bandpass filter designed below). i used

 % All frequency values are in Hz.
 Fs =3D 96000;  % Sampling Frequency
 Fstop1 =3D 1900;        % First Stopband Frequency
 Fpass1 =3D 1950;        % First Passband Frequency
 Fpass2 =3D 2050;        % Second Passband Frequency
 Fstop2 =3D 2100;        % Second Stopband Frequency
 Astop1 =3D 80;          % First Stopband Attenuation (dB)
 Apass  =3D 1;           % Passband Ripple (dB)
 Astop2 =3D 80;          % Second Stopband Attenuation (dB)
 match  =3D 'passband';  % Band to match exactly

i tried in all possible types of FIR filter based designs available in
matlab..but still couldnt get the original signal after filtering. The
signals i get are usually chirp signals and they dont show sinusoidal
shape.

thanks
aizza
0
aizza
2/9/2010 2:30:41 PM
On Feb 9, 8:30=A0am, aizza ahmed <aizzaah...@gmail.com> wrote:
> On Feb 8, 11:12=A0pm, maury <maury...@core.com> wrote:
>
>
>
>
>
> > On Feb 8, 11:36=A0am, aizza ahmed <aizzaah...@gmail.com> wrote:
>
> > > hi,
> > > =A0 =A0i have 3 sinusoidal signals of frequency 1Khz, 2khz and 3 khz =
added
> > > up to form a composite signal. i designed one bandpass filter centere=
d
> > > using FDATool in matlab. i tried to give pass band range as small as
> > > 1950 to 2050 (remember i want to allow only 2khz rejecting all others=
)
> > > to as large as 1.5 Khz to 2.5Khz. The designed filter is an FIR filte=
r
> > > with attenuation set at 80. i was able to design many
> > > filters..changing sampling frequency and passband parameters but none
> > > of them gave me my input 2khz signal in output (all gave some
> > > different type of waveforms in output). =A0i am more interested in
> > > extracting out 2khz signal. i am not getting the output same as my
> > > input sinusoidal 2khz signal. i feel..i am missing some basic theory
> > > in this regard..plz do help me in this regard or guide me.
>
> > > thanks
> > > aizza
>
> > Aizza
> > FDATool requires more data than you are giving for a bandpass design.
> > You need to have 5 frequencies: stopband1, passband1, passband2,
> > stopband2, and the sampling frequency.
>
> > Maurice Givens
>
> hi maurice and wescott,
> =A0 =A0 =A0 =A0 =A0thanks for response. i am giving all details. plz let =
me know
> if you need any.
>
> Each signal i.e. (1khz, 2khz and 3khz sinusoidal signal is sampled at
> 96khz and added to form a composite signal. and i need to extract 2khz
> signal by passing it through bandpass filter designed below). i used
>
> =A0% All frequency values are in Hz.
> =A0Fs =3D 96000; =A0% Sampling Frequency
> =A0Fstop1 =3D 1900; =A0 =A0 =A0 =A0% First Stopband Frequency
> =A0Fpass1 =3D 1950; =A0 =A0 =A0 =A0% First Passband Frequency
> =A0Fpass2 =3D 2050; =A0 =A0 =A0 =A0% Second Passband Frequency
> =A0Fstop2 =3D 2100; =A0 =A0 =A0 =A0% Second Stopband Frequency
> =A0Astop1 =3D 80; =A0 =A0 =A0 =A0 =A0% First Stopband Attenuation (dB)
> =A0Apass =A0=3D 1; =A0 =A0 =A0 =A0 =A0 % Passband Ripple (dB)
> =A0Astop2 =3D 80; =A0 =A0 =A0 =A0 =A0% Second Stopband Attenuation (dB)
> =A0match =A0=3D 'passband'; =A0% Band to match exactly
>
> i tried in all possible types of FIR filter based designs available in
> matlab..but still couldnt get the original signal after filtering. The
> signals i get are usually chirp signals and they dont show sinusoidal
> shape.
>
> thanks
> aizza- Hide quoted text -
>
> - Show quoted text -


Seems to work for me. I suggest you double-check your procedures

Maurice Givens
0
maury
2/10/2010 9:30:25 PM
On Tue, 09 Feb 2010 06:30:41 -0800, aizza ahmed wrote:

> On Feb 8, 11:12 pm, maury <maury...@core.com> wrote:
>> On Feb 8, 11:36 am, aizza ahmed <aizzaah...@gmail.com> wrote:
>>
>>
>>
>>
>>
>> > hi,
>> >    i have 3 sinusoidal signals of frequency 1Khz, 2khz and 3 khz
>> >    added
>> > up to form a composite signal. i designed one bandpass filter
>> > centered using FDATool in matlab. i tried to give pass band range as
>> > small as 1950 to 2050 (remember i want to allow only 2khz rejecting
>> > all others) to as large as 1.5 Khz to 2.5Khz. The designed filter is
>> > an FIR filter with attenuation set at 80. i was able to design many
>> > filters..changing sampling frequency and passband parameters but none
>> > of them gave me my input 2khz signal in output (all gave some
>> > different type of waveforms in output).  i am more interested in
>> > extracting out 2khz signal. i am not getting the output same as my
>> > input sinusoidal 2khz signal. i feel..i am missing some basic theory
>> > in this regard..plz do help me in this regard or guide me.
>>
>> > thanks
>> > aizza
>>
>> Aizza
>> FDATool requires more data than you are giving for a bandpass design.
>> You need to have 5 frequencies: stopband1, passband1, passband2,
>> stopband2, and the sampling frequency.
>>
>> Maurice Givens
> 
> hi maurice and wescott,
>          thanks for response. i am giving all details. plz let me know
> if you need any.
> 
> Each signal i.e. (1khz, 2khz and 3khz sinusoidal signal is sampled at
> 96khz and added to form a composite signal. and i need to extract 2khz
> signal by passing it through bandpass filter designed below). i used
> 
>  % All frequency values are in Hz.
>  Fs = 96000;  % Sampling Frequency
>  Fstop1 = 1900;        % First Stopband Frequency 
>  Fpass1 = 1950;        % First Passband Frequency 
>  Fpass2 = 2050;        % Second Passband Frequency
>  Fstop2 = 2100;        % Second Stopband Frequency
>  Astop1 = 80;          % First Stopband Attenuation (dB) 
>  Apass  = 1;           % Passband Ripple (dB)
>  Astop2 = 80;          % Second Stopband
>  Attenuation (dB) match  = 'passband';  % Band to match exactly
> 
> i tried in all possible types of FIR filter based designs available in
> matlab..but still couldnt get the original signal after filtering. The
> signals i get are usually chirp signals and they dont show sinusoidal
> shape.

Perhaps your problem is that you are blindly applying library functions 
from Matlab without really understanding what you're doing.

So you apply a filter design, and you get back this ENORMOUS vector of 
numbers -- right?  What does the FFT of that vector look like?  What you 
_should_ get is something whose amplitude, after normalizing by the 
vector size and sampling rate, is the desired amplitude response of your 
filter.  Are you getting that?  And do you know why you should?

-- 
www.wescottdesign.com
0
Tim
2/11/2010 12:24:03 AM
Reply: