Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] testing the filter in matlab

Status
Not open for further replies.

lakshmikalyani

Member level 1
Joined
Jan 5, 2014
Messages
36
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Location
kakinada
Activity points
248
hi i am using a filter of passband frequency [4768 7500] of order 128 hamming filter
i am giving sine signal of frequency 6500 and the sine signal is not perfect because it is higher frequency. i am getting glitches and when test the frequency in fft i am getting glitches.
please help me in testing that filter
 

Possibility: Does your filter have a high Q? Perhaps it responds by resonating, at its own frequency, when an outside signal is applied. As a result the output no longer appears sinelike.

Try installing some damping effect. Example, by adding some ohmic resistance in the filter.
 

actually the signal i am generating is not sine like since it is higher frequency between 4768 to 7500
and sampling frequency is 16000
since it is higher frequency no of samples per cycle are very less like 2 so it is not generating sine like signal

and this is a digital filter not analog filer
 

If you want the output waveform to display any resemblance to the input, then you must sample at least 6 or 7 or 8 points per input cycle. Try a frequency sweep upward, starting your input at 1kHz. The output will look good at first, then become more 'jaggedy' around 5 kHz. As you approach the nyquist limit, the output waveform will consist mostly of a difference frequency.

Therefore if you wish to filter 7500 Hz, consider sampling at 50 or 60 kHz.

The value of the output (smoothing) capacitor also has an effect on the output waveform. To see the effects, you'll have to try various values.
 

Thank you for the response is there any other way to test this filter
 

If you want the output waveform to display any resemblance to the input, then you must sample at least 6 or 7 or 8 points per input cycle. Try a frequency sweep upward, starting your input at 1kHz. The output will look good at first, then become more 'jaggedy' around 5 kHz. As you approach the nyquist limit, the output waveform will consist mostly of a difference frequency.

Therefore if you wish to filter 7500 Hz, consider sampling at 50 or 60 kHz.

The value of the output (smoothing) capacitor also has an effect on the output waveform. To see the effects, you'll have to try various values.

if i give a signal with high sampling frequency my filter is 16000 sampling freq it is not showing a good responce though the signal is a good sine wave
 

If you want the output waveform to display any resemblance to the input, then you must sample at least 6 or 7 or 8 points per input cycle. Try a frequency sweep upward, starting your input at 1kHz. The output will look good at first, then become more 'jaggedy' around 5 kHz. As you approach the nyquist limit, the output waveform will consist mostly of a difference frequency.

Therefore if you wish to filter 7500 Hz, consider sampling at 50 or 60 kHz.

The value of the output (smoothing) capacitor also has an effect on the output waveform. To see the effects, you'll have to try various values.

i have a doubt that should the input sampling frequency and sampling frequency of the filter be same or can it differ
because if i differ the sampling frequency the signal is not being passed through the filter
 

Sorry, I'm not sufficiently knowledgeable about digital filters. That has to do with Fourier analysis.

My reply about sampling rate was from a theoretical standpoint, regarding a switched-capacitor filter. The switching action takes individual samples of volt levels.

It is quite easy to see the method works properly for a particular frequency range, however it breaks down when you push the performance envelope too much. I confess I don't know how similar or different this is from a hamming filter which you are using.
 

Sorry, I'm not sufficiently knowledgeable about digital filters. That has to do with Fourier analysis.

My reply about sampling rate was from a theoretical standpoint, regarding a switched-capacitor filter. The switching action takes individual samples of volt levels.

It is quite easy to see the method works properly for a particular frequency range, however it breaks down when you push the performance envelope too much. I confess I don't know how similar or different this is from a hamming filter which you are using.

i had done many trail and error methods in testing the filters. according to my observation the input sampling frequency should be same as filter's. i just wanted to know whether we can test a filter other than sine samples
 

according to my observation the input sampling frequency should be same as filter's.
The observation is correct, doing so is required by the nature of time discrete signals. Under circumstances, you may want to resample a sampled signal at a different rate, resulting either in under- or oversampling and a respective modification of signal waveform and spectrum.

i just wanted to know whether we can test a filter other than sine samples
Sure you can.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top