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.
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.
> 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.
> 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.
> 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.
> thanks > aizza- Hide quoted text -
> - Show quoted text -
Seems to work for me. I suggest you double-check your procedures
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?