Searching \ for '[EE] Variable Bandpass Filter' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/logic/dsps.htm?key=filter
Search entire site for: 'Variable Bandpass Filter'.

Exact match. Not showing close matches.
PICList Thread
'[EE] Variable Bandpass Filter'
2006\02\10@063047 by Sean Schouten

face picon face
Hi!

I have a designg for a digitally controlable sign wave generator, using one
of Analog Devices AD9834 DDS's and am looking for a way to turn it's output
signal into a sine-wave that looks near-perfect on an old analog scope. I
had the idea to use a Sallen-Key filter with a butterworth configuration
(2nd order), to filter my DDS's output, but after numerous simulation it
seems that the filter starts deforming the DDS's output because of it's
fase-shift  characteristic of the filter. Taking this into concideration
that the deformations start well before my 'Fc', I would never be able to
output a perfect looking sine at the desired Fc of about 25Khz, unless I
would filter at a far higher frequency - my view anyway.

My options are either using a variable bandpass filter - How do I make one
that is controllable by a pic? Switched capacitor filters? - or building the
circuit and hoping that the sun and moon are in a right setting for it to
work.

Help?

Sean.

2006\02\10@084111 by Sean Schouten

face picon face
Update:

I am currently looking into "All-Pass" filters to correct (counter) the
phase-shift that occurs in the pass-band. If anybody has any tips, tricks or
informative resources are, their more than welcome!

Thanks,

Sean.

p.s. Excuse my mixing up of dutch and english,   "fase" in the last email
was supposed to be "phase". Sorry.



On 2/10/06, Sean Schouten <spam_OUTdev.seantechTakeThisOuTspamgmail.com> wrote:
{Quote hidden}

2006\02\10@085031 by Sean H Breheny

flavicon
face
Hi Sean,

I'm not sure why a phase shift would deform the DDS's output. What frequency is the DDS clock and what max frequency is your desired output? The DDS output spectrum should look like a pure sine wave, plus some phase noise, and then a whole bunch of stuff which is all at higher than half the DDS clock. So, if you want 100kHz max freq output and you have a 10MHz DDS clock, then you would set your Fc for, say, 1MHz, and all the junk at 5MHz and above would be taken out and you would be left with a pure sine wave plus some fairly low noise. Even if your filter has a significant phase shift below Fc, a phase shift doesn't change the shape of a sine wave.

Sean




2006\02\10@085740 by Alan B. Pearce

face picon face
>I am currently looking into "All-Pass" filters to
>correct (counter) the phase-shift that occurs in
>the pass-band. If anybody has any tips, tricks or
>informative resources are, their more than welcome!

Not sure why phase shift is a problem once you have set the frequency. I
thought one of the advantages of a DDS is that the clock frequency is much
higher than the output frequency, meaning that you should be designing the
filter to kill the clock frequency, not just abouve the output frequency.

Whatever, you need you may be able to use a Chebyshev filter and have the
notch at the clock frequency.

2006\02\10@161526 by Sean Schouten

face picon face
So, I just need to filter out the clock frequency and some anomalies at
around half the clock frequency? Sounds pretty straightforward.

I just did a spice AC-analysis on a filter with cutoff @ 500Khz,  and I must
say that it looks quite promising. I am going to do a couple of more
simulations with some other sallen-key filter configurations before I pick
up my PCB design process.

Thanks for your help, it is very much appreciated!

Sean.

2006\02\10@170912 by Sean H Breheny

flavicon
face
Hi Sean S.,

BTW, I like your name ;-)

I still don't have clear what your clock rate is and what your max output frequency is? You may not really be able to use a Sallen-Key type filter (at least if it involves an op-amp) because they usually have very limited bandwidth. The fastest commmonly available op-amps have a gain-bandwidth product of about 2GHz, meaning that they have a gain of 1 at 2GHz, so they are usable up to say 500MHz or so. These are expensive current-feedback types. BUT, most op-amps have a gain-bandwidth product of only about 1MHz, meaning that you can really only use them up to 100kHz at best.

Sean B.


2006\02\10@220226 by Sean Schouten

face picon face
On 2/10/06, Sean H Breheny <.....shb7KILLspamspam@spam@netzero.net> wrote:
>
> Hi Sean S.,
>
> BTW, I like your name ;-)


Haha, yours isn't that bad either ;-)


I still don't have clear what your clock rate is and what your max output
> frequency is? You may not really be able to use a Sallen-Key type filter (at
> least if it involves an op-amp) because they usually have very limited
> bandwidth. The fastest commmonly available op-amps have a gain-bandwidth
> product of about 2GHz, meaning that they have a gain of 1 at 2GHz, so they
> are usable up to say 500MHz or so. These are expensive current-feedback
> types. BUT, most op-amps have a gain-bandwidth product of only about 1MHz,
> meaning that you can really only use them up to 100kHz at best.



100Khz is more than enough.  The DDS is actually  probably kind of overkill
as I don't need anything more than audio-frequency filtering up to no more
than about 25Khz, which should not be too much of a problem. I think that I
will select 10Mhz as the clock rate for my AD9834, and filter-simulations
that I have run, make it look like a 500Khz cutoff is just about right for
what I need.

In your first reply you stated that a phase shift does NOT change the shape
of a sine wave. I thought that some one told me that that was the case, but
the more I think of it, the less logical it sounds. The strange thing is
that I encountered some deformities during some spice simulations I run, but
I guess that I have to take a better look at it all, and check and see if
all is what it seems.

After I get all this sorted, I need to finish my PCB-Design and turn what is
on paper into a ready prototype on which I can start experimenting with
software... I can't wait!

Sean S

2006\02\11@091209 by davedilatush

picon face
Sean Schouten wrote...

>I have a designg for a digitally controlable sign wave generator, using one
>of Analog Devices AD9834 DDS's and am looking for a way to turn it's output
>signal into a sine-wave that looks near-perfect on an old analog scope.

Given that you intend to clock the AD9834 at 10MHz and are going
to be generating sine waves only up to 25kHz, that should be very
easy.

>I had the idea to use a Sallen-Key filter with a butterworth configuration
>(2nd order), to filter my DDS's output, but after numerous simulation it
>seems that the filter starts deforming the DDS's output because of it's
>fase-shift  characteristic of the filter.

You don't say exactly how the sine wave is being "deformed", but
whatever the nature of this distortion it is unlikely that it has
anything to do with the filter's phase shift.  When passing a
sine wave, the phase shift of a filter will only affect the delay
between input and output-- not the shape of the wave.

I would guess that any distortion you are seeing in your
simulation is the result of some fluke in the simulation device
models, or a consequence of the way your particular circuit is
designed; without seeing the circuit, it's hard to tell.

In any case, filtering your DDS chip's output to get a
high-quality sine wave should be very easy, since the clock
frequency of your DDS chip is 400X the maximum frequency you want
to generate.  A single-pole passive RC filter with its pole
around 50kHz-100kHz should be more than adequate.

Hope this helps a bit...

Dave D.


2006\02\11@131130 by olin piclist

face picon face
Sean Schouten wrote:
> In your first reply you stated that a phase shift does NOT change the
> shape of a sine wave. I thought that some one told me that that was
> the case, but the more I think of it, the less logical it sounds.

ALL linear filters will preserve the shape of a sine wave, although they can
alter the amplitude and phase.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products

2006\02\11@140804 by Sean Schouten

face picon face
Excuse this late reply, but it seems that the maximum email size that is
accepted is 40Kb, and I didn't know that my email was more like 400Kb with
attached screenshots!


On 2/11/06, Dave Dilatush <davedilatushspamKILLspamcomcast.net> wrote:
{Quote hidden}

Glad to hear that. I am still tempted not to believe it though.


I would guess that any distortion you are seeing in your
> simulation is the result of some fluke in the simulation device
> models, or a consequence of the way your particular circuit is
> designed; without seeing the circuit, it's hard to tell.


I've just been running some more simulations and I still have a problem with
deformations starting in the higher frequencies where the phase shift goes >
X - degrees, just before the cutoff frequency. I have attached some
screenshots so you can see.

3k.gif = perfect sine @ 3Khz, http://seantech.offside.fromadia.com/3k.gif
30k.gif = perfect sine @ 30Khz http://seantech.offside.fromadia.com/30k.gif
300K.gif = more like a triangle @ 300Khz.
http://seantech.offside.fromadia.com/300k.gif

filter_and_response.gif = my current *test* design, and it's simulated
responce characteristic.
http://seantech.offside.fromadia.com/filter_and_response.gif

Why on earth does my output signal deform at 300Khz? I am overlooking
something.

Sean S.

2006\02\11@150904 by davedilatush

picon face
Sean Schouten wrote...

>I have attached some
>screenshots so you can see.
>
>3k.gif = perfect sine @ 3Khz, http://seantech.offside.fromadia.com/3k.gif
>30k.gif = perfect sine @ 30Khz http://seantech.offside.fromadia.com/30k.gif
>300K.gif = more like a triangle @ 300Khz.
>http://seantech.offside.fromadia.com/300k.gif
>
>filter_and_response.gif = my current *test* design, and it's simulated
>responce characteristic.
>http://seantech.offside.fromadia.com/filter_and_response.gif
>
>Why on earth does my output signal deform at 300Khz? I am overlooking
>something.

Aha!!! What you're seeing has absolutely NOTHING to do with the
filter phase shift: what's happening is the opamp model you're
using is undergoing slew-rate limiting at that high frequency
(just like a real opamp would); it can't swing its output fast
enough.  That's why the sine wave is degrading into a triangle
wave.

I've been doing the "analog circuits for food" thing for almost a
third of a century; trust me, phase shift is not a factor here.

The cure, of course, is to use a faster opamp if you're going to
be generating frequencies that high.

Dave D.

2006\02\11@154811 by Sean H Breheny

flavicon
face
>In any case, filtering your DDS chip's output to get a
>high-quality sine wave should be very easy, since the clock
>frequency of your DDS chip is 400X the maximum frequency you want
>to generate.  A single-pole passive RC filter with its pole
>around 50kHz-100kHz should be more than adequate.

I agree with Dave, there is no need for fancy filtering here. Just a single RC would work. You may need to buffer the output AFTER the RC filter depending on what this needs to drive. Just use an R in series, then a C to ground. Cutoff frequency in Hz is 1/(2*pi*R*C) where R is in ohms and C is in Farads. Remember that you'll need a non-polarized cap since your signal goes + and -. A ceramic or polyester type should work fine.

The problem you were seeing was because the output of the op-amp is limited in how fast it can change (in terms of Volts per second). When you start to exceed that rate, you get a linear ramp output, which is why it was changing all but the slowly-changing parts of the sine wave into straight lines.

All linear systems pass sine waves undistorted because the most a linear system can do is add delayed,scaled copies of the input together to get the output. It cannot alter the frequency of the input. Any number of sine waves of different amplitudes and phases, as long as they are all at the same frequency, when added together will still give you a sine wave.

Sean


Sean




2006\02\11@172338 by Sean H Breheny

flavicon
face
One correction to my own email.... I said:

"All linear systems pass sine waves undistorted"

I should have said "All linear TIME-INDEPENDENT systems pass sine waves undistorted."

There are linear time-dependent systems which alter frequency, such as some mixers. A true multiplying mixer fed by an oscillator and then considered as a single input, single output system is linear, but will generate multiple output frequencies.

The criterion for linearity is the following:  

If F(q(t)) is the output of the system when operating on input q(t), then the system is linear if and only if F(a*X(t)+b*Y(t))=a*F(X(t))+b*F(Y(t)). Said in words, this means that scaling the input just scales the output by the same amount and that feeding a sum into the input is the same as operating on the two components separately in two idtentical linear systems and adding the outputs.

Sean



2006\02\11@205435 by Sean Schouten

face picon face
On 2/11/06, Sean Schouten <.....dev.seantechKILLspamspam.....gmail.com> wrote:
>
>  I am overlooking something.
>

It seems that I was overlooking something that I haven't seen in the basic
opamp material I have had at school. Thanks for that, the picture just
became more clear to me.

As for the use of a simple RC-filter; Say I would use a simple RC filter,
then pass the signal trough an opamp to add some gain to the story, would
the amplified output have a constant peak-to-peak value throughout the
frequency range?

Sean.

2006\02\11@220730 by davedilatush

picon face
Sean Schouten wrote...

>As for the use of a simple RC-filter; Say I would use a simple RC filter,
>then pass the signal trough an opamp to add some gain to the story, would
>the amplified output have a constant peak-to-peak value throughout the
>frequency range?

It should, provided a) you choose an appropriate opamp-- mainly,
one that is sufficiently fast that it won't distort the signal by
slew-rate limiting (as you saw in your simulation), and b) your
filter cutoff frequency is at least several times the maximum
frequency of the sinewave; otherwise, the amplitude will begin to
drop as you get up near the maximum frequency.

Dave D.

More... (looser matching)
- Last day of these posts
- In 2006 , 2007 only
- Today
- New search...