Author Topic: Bessel low pass filter design for DDS  (Read 22477 times)

0 Members and 1 Guest are viewing this topic.

Online Yansi

  • Super Contributor
  • ***
  • Posts: 3324
  • Country: 00
  • STM32, STM8, AVR, 8051
Bessel low pass filter design for DDS
« on: January 10, 2015, 11:11:09 pm »
Hi
I never designed such complex filtering stuff - new for me. I'm just toying with DDS signal generation. I tried to study some materials about what type of filter to choose - and I choosed Bessel, because of the phase linearity (I want to try also arb waveforms, not only pure sine).
I learned, that it is good to have the sampling frequency tripple the max output frequency. So the output filter's passband shoud be fs/3. But I can't decide, what steepnes (order) of the filter I shoud use. I found some recommendation that spurious component rejection ratio should be 70dBc for a good wavegen. I don't understand exactly what this requirement says (it is the ratio of fundamental harmonic to the level of the whole output signal?)
I also found, that 7th order bessel filter of fc = fs/4 shoud do it enough. Is it true?

So i tried to learn how to design sucha passive network filter. I've learned how to work with frequency normalized filter design tables, such as this one. I calculated some values for a filter, just a try, and they have all fit almost exactly what some software told me it shoud be. (I've used AADE filter design tool - old and rusty piece of software, which tried to install some rubbish into my computer).

I have 20Msps multiplying 12bit DAC with current ouput. For the purpose of testing and development only, I am going to use TS613 (common ADSL driver fast high output current OPAmp, 80MHz BW ) opamp both for the I/V and for the output. I am not sure if this is good idea, but I've got a lot of these salvaged from scrap, so I'll give it a try.  This design is only for testing and education only, separate final version will be made after.

There is also a second big unknown and that is what impedance should that filter be designed at? After the I/V stage I will have very low output impedance, so designing the filter at down to 50ohms should be possible, but I'd rather wouldn't do that, so is it ok to go higher, lets say 100 to 300 ohms, to lower the load on the opamp as much as possible, to reduce power consumption and maybe also reduce unnecessary distortion?

First step I think will be I make the filter circuit alone and have a measure of its response, to verify the design. After having some concrete values to work with.

How much critical are the component values? The only readily available for me is the E12 value line, both at capacitance and inductance. So how much accurate should the parts be? Am I right that with increasing filter order, I should keep the values accurate as much as possible? So I should for example 1.438nF make from two capacitors, like 1.2n + 220p (= 1.42nF). Or even more accurate?
Is it good enough to use 0805 surface mount inductors? Top end characteristics of this educational design are not required. Caps could be combined in parralel to easily get desired values, but the inductors are not as much accurate, I think about 10%? Is that enough? I think there not many ways making inductors more accurate then this.

Summary:
For sine and arb generating DDS, 7th order Bessel low pass at fc (-3dB) = fs / 4 should be enough. Or shouldn't? Input and output impedances in the range from 100 to 300 ohms.

And I observed some interesting fact (maybe not much interesting for more experienced designers) with an odd order lowpass filter, beginning and ending with a capacitor, having the same Zsrc and Zload - so having an "symetrical looking" filter, why are the values of components not symmetrical? I used some filter calculating tools and some of them actually made those LC networks symmetrical from both ends. But there was none note about what approximation the filter is. So the question is, does the filter component values symetry happens only with filter of Q=1? (which is not Bessel obviously) And then is the bessel passive filter network symetrical, if the component values are not? I think then it is also not.

Thank you for your kind help,

And I want to apologize for my behaviour in my last thread.

Y
« Last Edit: January 11, 2015, 01:17:51 am by Yansi »
 

Offline KJDS

  • Super Contributor
  • ***
  • Posts: 2442
  • Country: gb
    • my website holding page
Re: Bessel low pass filter design for DDS
« Reply #1 on: January 11, 2015, 08:02:48 am »
I did a post on here a few months back about making these quasi eliiptic to avoid having unnecessarily large orders.

The one thing to watch is inductor Q, which will hurt loss. It's likely you will see much better performance with hand wound coils. Tolerance isn't very critical on low pass compared to band pass. If you need to check, just change a few things in your model and see what the affect is.

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1046
  • Country: fi
Re: Bessel low pass filter design for DDS
« Reply #2 on: January 11, 2015, 09:38:55 am »
Do a monte carlo-simulation on the filter components, so you'll quickly get an idea how accurate filter components need to be. LTSpice has an example of that in directory examples/educational/MonteCarlo.asc.

Regards,
Janne
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 12451
  • Country: gb
    • Having fun doing more, with less
Re: Bessel low pass filter design for DDS
« Reply #3 on: January 11, 2015, 09:51:07 am »
How much critical are the component values? The only readily available for me is the E12 value line, both at capacitance and inductance. So how much accurate should the parts be? Am I right that with increasing filter order, I should keep the values accurate as much as possible? So I should for example 1.438nF make from two capacitors, like 1.2n + 220p (= 1.42nF). Or even more accurate?

Good question, and one that is best answered by a sensitivity analysis, probably using Spice. In theory an AC analysis will give you all the information you need, but you may feel more comfortable with a transient analysis. Only your application can define how non-ideal the filter can be before it becomes intolerable.

Don't ignore the components' tolerance. There's not much point in having a 1.42nF +-10% capacitor! Components values will also vary with time and temperature. Use the standard filter topogies to minimise such sensitivity.

You may need to select-on-test some components, i.e. measure the value to find which one is nearest your desired value.

You will find that some components' values are more critical than others. Some types of component are easier than othes to tweak at design time (e.g. resistors) or in-circuit (e.g. inductors).

Thank you for a well considered interesting post. I look forward to seeing the responses.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online Yansi

  • Super Contributor
  • ***
  • Posts: 3324
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Bessel low pass filter design for DDS
« Reply #4 on: January 11, 2015, 10:56:06 am »
 I've read somewhere not to use cauer/elliptic, they are fine for generatin pure sine, but pain in the ass for complex waveforms, because of their phase/time characteristics, which are likely to distort the output waveform.

7th order bessel is not so big deal from the component count kind of view, it's "only" three coils and four caps.  But you've pleased me a little with the components not being so critical.

Shame is I cant work with such simulator as spice, so I will find a way how to simulate the filter. Maybe I just write down the transfer function to Wolfram Mathematica and  draw it there. It is also possible to analyze there the step response of the filter, but it is rather.. pain in the ass. It is maybe a year when I did it last time for some passive RLC networks.. But sure I should ispect also the step response, because square wave generation (or something with sharp edges like sawtooth) is also probable to be generated from my ToyDDS.

So what impedance should the filter go? Signal source has almost zero impedance (OPamp output), load will be resistor only plus high impedance OPamp input. So thery is plenty of room to choose. Too low and I have to consider cooling of the opamps and fight with power consuption being wasted, or too high and parasitics will become dominant. But I have no idea, how is the impedance selection critical for such a "slow" thing as 5MHz maximum is.

An for the OPamp selection... is TS613i suitable, or is it still too slow to handle the maximum of 5MHz output? I would prefer using another OPamp than this, only one per package would be a lot nicer, than bodging the filter around dual opammp, which looks like a problem source, using two pieces TS613 looks fine, but I really don't like components being not fully utilized. Does anyone know signle OPamp like TS613, which will not cost a fortune? These 613s are well under $ I think.
And here is the datasheet for TS613: http://www.st.com/web/en/resource/technical/document/datasheet/CD00001981.pdf

Maybe I will just figure a bunch of components out, build the circuit and have it measured to see what crap have I built.

Things to be considered and done:
Filter impedance
suitability of TS613 or another single OPAmp
simulation of the filter with nonprecious components
(filter symmetry - but just an interest)
 

Offline German_EE

  • Super Contributor
  • ***
  • Posts: 2400
  • Country: de
Re: Bessel low pass filter design for DDS
« Reply #5 on: January 11, 2015, 11:12:12 am »
For years I have used this site when designing filters:

http://www.wa4dsy.net/filter/filterdesign.html
Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 

Online Yansi

  • Super Contributor
  • ***
  • Posts: 3324
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Bessel low pass filter design for DDS
« Reply #6 on: January 11, 2015, 12:11:02 pm »
Thats actually interesting! Because the website you've posted  calculated the values exact same as me, but in reverse order, like having input and output of the filter interchanged. So who's correct? Or is the filter symmetrical also when components arent? (That seem odd to be).

I calculated myself an example filter using the table I posted above: 5MHz cutoff, 5th order, 50ohm I/O.
I got these values with the table, from input to output: 1.44nF, 807nH, 512pF, 1.77uH, 111pF
Your website gave me this: 111pF, 807nH, 512pF, 1.77uH, 1.44nF.
.... well okay, it isn't exactly the reverse - only the caps were in reverse order. What the hell is going on?
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 4938
  • Country: gb
Re: Bessel low pass filter design for DDS
« Reply #7 on: January 11, 2015, 12:14:34 pm »
Remember to check the opamp's slew rate as well depending on what amplitude you want.

Also, don't skimp on the power supply, I'd stick with linear and low noise.

Layout around the opamp will be important, be generous with decoupling, generous ground plane, and be aware that these higher speed opamps love to oscillate and ring. Hopefully, with the input band limited, this shouldn't be a problem for you.
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 1831
  • Country: fi
  • Embedded SW/HW.
Re: Bessel low pass filter design for DDS
« Reply #8 on: January 11, 2015, 12:43:13 pm »
If you want to keep your distortion as low as possible, use C0G/NP0 capacitors in the signal path. For decoupling you can use X7R or X5R.
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 1831
  • Country: fi
  • Embedded SW/HW.
Re: Bessel low pass filter design for DDS
« Reply #9 on: January 11, 2015, 12:51:32 pm »
-snip-
Shame is I cant work with such simulator as spice, so I will find a way how to simulate the filter.
-snip-

LTSpice from Linear Technology is a free Spice-based simulator. It runs on Windows, Linux and Mac OS X environments, and it is very well user-supported.

Download link:
http://www.linear.com/designtools/software/#LTspice

Yahoo user-group for LTSpice:
https://groups.yahoo.com/neo/groups/LTspice/info

Unofficial wiki page:
http://ltwiki.org/?title=Main_Page
« Last Edit: January 11, 2015, 12:53:04 pm by Kalvin »
 

Online Yansi

  • Super Contributor
  • ***
  • Posts: 3324
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Bessel low pass filter design for DDS
« Reply #10 on: January 11, 2015, 12:59:24 pm »
Those under 1nF I think I've never seen any else then NP0 / C0G. Or have I?

..slew rate.. whooops... Houston, we gotta problem here. It is 6,28V/us per MHz per V (yw cos(wt)). So with 5MHz and a 1V amplitude we need 5 times that, 32V/us. Heck, the TS613 opamp can haz only 40. Fuck!  :phew:

So with a 1V amplitude sine, it should work, somehow. And I've alread considered much higher amplitudes. Thats bad ass. What OPamp will I use now?   That will be another fortune coster I suspect... >:(

Let the fight with component supply begin. (again and again... choosing  the DAC was also a bit frustrating...)
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 19839
  • Country: nl
    • NCT Developments
Re: Bessel low pass filter design for DDS
« Reply #11 on: January 11, 2015, 01:03:46 pm »
Look at the ADA4870 from analog devices. It's perfect as a final stage for a waveform generator >:D
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online jpb

  • Super Contributor
  • ***
  • Posts: 1725
  • Country: gb
Re: Bessel low pass filter design for DDS
« Reply #12 on: January 11, 2015, 01:05:23 pm »
If you read the literature on DDS, eg the stuff on the Agilent 33522 or 33622 it generally suggests different filters for pure sin (elliptic with sharp cut off) to that for arbitrary waveforms where you want constant time delay at the cost of roll off rate.

See for example:

http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/DDS.pdf
 

Online Yansi

  • Super Contributor
  • ***
  • Posts: 3324
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Bessel low pass filter design for DDS
« Reply #13 on: January 11, 2015, 01:24:53 pm »
I assume, you haven't read my first post, or have you? Or how do you think I got to the idea of using phase linear bessel instead of cauer/elliptic?

//BTW, the document you posted looks almost exactly like one I have read, but is in color.

// that's it! http://www.noise.physx.u-szeged.hu/Online/DigitalSynthesis/DDS.PDF

//$20 ADA4870 is not a thing I wish to use for a lowcost low spec DDS design. ;-)
« Last Edit: January 11, 2015, 01:31:27 pm by Yansi »
 

Offline G0HZU

  • Super Contributor
  • ***
  • Posts: 2576
  • Country: gb
Re: Bessel low pass filter design for DDS
« Reply #14 on: January 11, 2015, 01:44:30 pm »
Have you considered using a high order cheby or elliptic lowpass filter followed by an all pass filter to try to give flat group delay over your passband?

I don't see the Bessel LPF as a viable solution because it provides a very poor rolloff rate. Your 7th order Bessel would not work very well at all in terms of rejection at 15MHz.
 

Online Yansi

  • Super Contributor
  • ***
  • Posts: 3324
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Bessel low pass filter design for DDS
« Reply #15 on: January 11, 2015, 02:07:46 pm »
That is a nice advice, I appreciate that, but I can't do that so I haven't considered at all.  :-//

7th order 3 * fc about 40dB (fast guess). That is not enough? Thats 100 times reduction in amplitude. Is that really not enough for a simple lowcost gen?

//I might screwed the calculation, but if 7th order is 42dB/octave, at 3fc it will give  42*log(3)/log(2) = 66dB reduction.. Hell, that is a lot!(an I've just plotted a graph in the AADE rubbish, it also says me about 66dB at that kind o frequency, of course using lossless ideal parts)
Screwed crap...  guess was close enough, might be around that, about 35dB
« Last Edit: January 11, 2015, 02:25:30 pm by Yansi »
 


Online Yansi

  • Super Contributor
  • ***
  • Posts: 3324
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Bessel low pass filter design for DDS
« Reply #17 on: January 11, 2015, 02:35:56 pm »
Thanx for the design approach description. But I should first learn how to simulate that kind off stuff.

By the way, what would happen to the output signal, I'd use the 7th order Bessel? Can it be somehow expressed, how much bad harmonic crap would come out? I want only to build a reasonable quality fgen for home use, not a hightech machine. Problem is that I just can't see where's the border of what is not going to work, what is good enough to work (that's what I want) and what is suitable for a pretty spec.

So is it possible to design the filter, according to a requirement of getting lets say 1% THD sine at 1MHz output?
Well I think it is possible, but would require to calculate all the harmonics present on the output. So firstly get the transfer function of the filter and then use it for getting the right amplitudes of the harmonic content and then calculate the THD. with it, at least for the first 5 harmonics?

Is Butterworth suitable? Gives a lot faster rolloff. Often used for audio applications demanding high precision and low distortion, would it work here?
« Last Edit: January 11, 2015, 02:43:17 pm by Yansi »
 

Offline KJDS

  • Super Contributor
  • ***
  • Posts: 2442
  • Country: gb
    • my website holding page
Re: Bessel low pass filter design for DDS
« Reply #18 on: January 11, 2015, 02:40:37 pm »
That design was simulated using RFSim99, which is readily available, but a bit awkward to install on a 64 bit machine.

A Butterworth will cause phase distortion, but how much will depend on what is acceptable.

Online Yansi

  • Super Contributor
  • ***
  • Posts: 3324
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Bessel low pass filter design for DDS
« Reply #19 on: January 11, 2015, 03:19:56 pm »
For this kind of educational purpose first test is acceptable almost anything, but I'd rather not to build a pile of  dog turd. So the question remains, what is a reasonambleamount of filtering? I will use this project as a base to learn how to make a complete diy DDS, using PLD, fast memory, DAC and all support circuitry such as amplitude/offset control, PSU and main processor. Based on this skill I will probably make it into final design, where I correct at least some mistakes made before.

I've just consulted google a little and found this: http://www.crbond.com/papers/bsf.pdf
I'd like to try to calculate the approximate THD on the output for such a presumption: Consider 1MHz sinewave being produced with  the DAC at  fs of 20MHz. After the DAC, bessel filter appears with fc about 5MHz and order of 5 (or 7).

How can I calculate this? I know how to calculate THD ratio with knowing what the harmonic contents are. How can I get the amplitudes for lets say first 10 harmonics (1,2,3,4,5,....10MHz) behind that filter, to estimate the THD like that?

That sounds like pretty school homework from an EE college, but EE colleges today really do not teach us anything like that, they only employ students with piles of unnecessary crap with the excuse of "preparing us for work". Sorry for the offtopic rant.. :-) (at least in our country, not sure if others are as bad as ours)
« Last Edit: January 11, 2015, 03:25:50 pm by Yansi »
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 4938
  • Country: gb
Re: Bessel low pass filter design for DDS
« Reply #20 on: January 11, 2015, 03:38:54 pm »
Try:

LMH6642/3/4
LMH6611/2
OPA354/2354/4354

I am working on a design at the moment (a high speed 12 bit flash ADC filter and buffer) and all three of these have been used during the development. I needed rail-rail output (save a few pennies on the BOM on the PSU that way).

I am not sure how super low noise your opamp needs to be bearing in mind the quantisation noise you'll have from the DAC anyway, but I stand to be corrected.
 

Online jpb

  • Super Contributor
  • ***
  • Posts: 1725
  • Country: gb
Re: Bessel low pass filter design for DDS
« Reply #21 on: January 11, 2015, 03:48:40 pm »
I assume, you haven't read my first post, or have you? Or how do you think I got to the idea of using phase linear bessel instead of cauer/elliptic?

//BTW, the document you posted looks almost exactly like one I have read, but is in color.

// that's it! http://www.noise.physx.u-szeged.hu/Online/DigitalSynthesis/DDS.PDF

//$20 ADA4870 is not a thing I wish to use for a lowcost low spec DDS design. ;-)
Yes, I did read your post.

The point I was trying to make is that many (if not most) commercial DDS systems switch different filters in.  Often the sampling rate on modern systems is much higher
than three times the intrinsic bandwidth of other components such as the power amplifier stage. The Rigol DG4000 series extends the bandwidth by using different amplifications for different bandwidths and the new Agilent 33622 does a similar thing. On some systems filters are applied for sine waves and no filters used for square waves (though this tends to be on true ARGs).

As an example, the DS4000 uses a 500MS/s DAC so has an image reject filter of around 150MHz but the frequency limit on many waveforms is more like 60MHz.

Rather than designing a single filter it might make sense to have a sharp cut off fs/3 filter and then a separate filter to be switched in for some waveforms and not for others.
 

Online Yansi

  • Super Contributor
  • ***
  • Posts: 3324
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Bessel low pass filter design for DDS
« Reply #22 on: January 11, 2015, 04:40:27 pm »
Howardlong: Oh, these OPamp puppies looks great and affordable. About a buck each, no pissful wallet killers.  :) Bu? I'd rather appreciate bigger amplitude capabilities, than having 5V or 12V max R2R opamp. I assume well built fgen shoud deliver at least 10V peak-peak signal amplitude.

jpb: Now I understand ur point! I will consider this for the second/final version, to have two switchable filters. No I need only some estimation what to use for a prototype, where I could start toying with VHDL and so, to generate at least something looking like a waveform. So should I slap there the 7th order bessel? Is it a good starting point for this kind of job? I will gradually make my project better, after I learn the basics first.

500Msps to 150MHz is about 3.3 ratio...  I have only 20Msps DAC. At least something reasonable to begin with. I understand that generating a waveform with high harmonic xomplexity for example square at 5MHz will give me pile of turd instead of waveform on teh output - so I thought exactly - to limit arb waveforms to lets say 1MHz and leave only sinewave to about 5MHz, which is ratio of 4. (20MHz fs) Shouldn't be that fine?

So can I use the 7th order passive bessel as a starting point, to have at least something, which I can use to learn thing on? I remind that I haven't built anything like that, so there is also a lot of other stuff to learn. For example the HDL design. I haven't done much stuff in VHDL. It is great to have practice on some real design problem such as this DDS (or my other PCI crap experiment), than play with LEDs, buttons and switches on a minimalistic kit.

//I am considering now to implement both filterways right into the first prototype.. Not a big complication, only some PCB space will be eaten and two SPDT signal relays. //
« Last Edit: January 11, 2015, 04:56:48 pm by Yansi »
 

Online jpb

  • Super Contributor
  • ***
  • Posts: 1725
  • Country: gb
Re: Bessel low pass filter design for DDS
« Reply #23 on: January 11, 2015, 05:04:05 pm »
An interesting practical paper I found when I was searching this topic sometime ago is:

The Design and Construction of a DDS based
Waveform Generator
Darrell Harmon

I couldn't find the pdf directly when I looked just now but if you google it you should find the option to read it. You may have already looked at it as his design seems very similar to what you are working with.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 12451
  • Country: gb
    • Having fun doing more, with less
Re: Bessel low pass filter design for DDS
« Reply #24 on: January 11, 2015, 05:29:19 pm »
As a sanity check, you might like to be aware of the filter shown in Analog Device's AD9851, on p21 of the datasheet http://www.analog.com/static/imported-files/data_sheets/AD9851.pdf

It is 70MHz, 7th order elliptical, 200ohm, for a 180MHz clock frequency, and component values are shown.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf