active filter frequency fc and phase relationship

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I have been playing with a marantz cdp and have changed the op amps to ad797b x2 on brown dogs also changed and tried many different passive components.

have tried smt components of different types and they sound bright edgy

so I am now redoing the filter using ridiculously priced through hole components hopefully without inductive noise.

I am having trouble trying to set and or simulate a filter and hoping someone can give some real world advice

If I am trying for a cutoff of say 23khz the bode plot for phase looks a mess.

Is why the original circuit datasheet for tda1549 output makes for 74khz fc?

do I want a 23khz (about?) fc on any of the filters from dac out?

where do you set cutoff frequency for best q ?

reading another thread here

http://www.diyaudio.com/forums/digital-line-level/15551-simple-good-quality-dac-5.html

where Elso Kwak setting his cutoff at 10khz??
presumably to avoid 44khz phase inter modulation?
but if oscillator is on separate board (my cdp) would you get 44khz noise at dac?

I have also heard of others trying to bypass internal op amps on tda1549 on same thread by Rudolf Broertjes

did Lukasz Fikus (lampizator) not try this and it did not work?

I will try to contact Rudolf on that one.

my main question is what to set filter frequency to get phase right or does that matter?
well I will post pictures and multisim bitmaps in the hopes someone that knows op amp behavior can give advice


ps

thanks for all the help from stephen sank and others on this forum and 6 months of googleing I am grasping small amounts of this stuff.

oh well I am a carpenter by trade and would not want a noob of 6 months building my home If you know what I mean;)

thanks
Glen
 

Attachments

  • marantz ose mods.jpg
    marantz ose mods.jpg
    377.8 KB · Views: 282
  • marantz multisim.doc
    18.8 KB · Views: 45
  • tda_1549.pdf
    230.8 KB · Views: 37
  • AD797.pdf
    373.8 KB · Views: 37
Op amps are not normally compensated for stability below unity gain or capacitive loads above 100pF. Additionally, the 797 tends to want added source resistance for good phase margin---see figure 16 in the datasheet. So, from a glance, I'd expect the feedback and output load portion of your schematic to cause the 797s to oscillate. The cap across the input is a similar problem---expect oscillation around the roughly 300kHz RC pole formed by the 10k resistor + DAC source impedance and 47pF cap.

I would suggest evaluating standard output buffer designs before trying to roll your own. Personally I like Cirrus' topologies and would recommend the CS4398 eval board schematic as a starting point. You may also want to consider op amps which are less sensitive to output impedance and capacitive loading such as the LME49720 or LME49990.

The primary tradeoff in choosing the corner frequency of the analog lowpass is rejection versus phase accuracy in the audio band. By Q I'm guessing you're asking about filter alignments such as Bessel, Butterworth, or Chebyshev, all of which are easy to find Q and frequency tables and component calculators for. There's a lot of material available on the alignments which you can read up on but, in a nutshell, Bessel has minimum phase error in the passband but widest transition band while Chebyshev has the most phase error but narrowest transition. Butterworth's in the middle. For a third order lowpass on a DAC I tend to choose an alignment about halfway between Butterworth and Bessel that corners around 50kHz. This produces about three degrees of phase error at a few kHz, which is below what I can discriminate in ABX testing---if you're worried about it sim up some Bessels cornering in the 50 to 100kHz range.
 
Op amps are not normally compensated for stability below unity gain or capacitive loads above 100pF. Additionally, the 797 tends to want added source resistance for good phase margin---see figure 16 in the datasheet. So, from a glance, I'd expect the feedback and output load portion of your schematic to cause the 797s to oscillate. The cap across the input is a similar problem---expect oscillation around the roughly 300kHz RC pole formed by the 10k resistor + DAC source impedance and 47pF cap.

I would suggest evaluating standard output buffer designs before trying to roll your own. Personally I like Cirrus' topologies and would recommend the CS4398 eval board schematic as a starting point. You may also want to consider op amps which are less sensitive to output impedance and capacitive loading such as the LME49720 or LME49990.

The primary tradeoff in choosing the corner frequency of the analog lowpass is rejection versus phase accuracy in the audio band. By Q I'm guessing you're asking about filter alignments such as Bessel, Butterworth, or Chebyshev, all of which are easy to find Q and frequency tables and component calculators for. There's a lot of material available on the alignments which you can read up on but, in a nutshell, Bessel has minimum phase error in the passband but widest transition band while Chebyshev has the most phase error but narrowest transition. Butterworth's in the middle. For a third order lowpass on a DAC I tend to choose an alignment about halfway between Butterworth and Bessel that corners around 50kHz. This produces about three degrees of phase error at a few kHz, which is below what I can discriminate in ABX testing---if you're worried about it sim up some Bessels cornering in the 50 to 100kHz range.

thanks for your reply

some of the terminology is very difficult and the math is way beyond me. so I have been using online calculators and have tried all sorts of filter design software as well as trying pspice (student), ltspice and now have a full copy of multisim 11. I need to spend more time with it so I can learn labview and run some sims.

just messing with values at one site (best calculator site)

Op-amp circuit analysis using a transfer function

I am finding that to keep frequency higher, say 100000khz gives flat phase to at least 10khz with maybe 3 degrees out at 20khz.

will that high of a pass band introduce noise?

is phase more problematic?

I appreciate your input and response

anyway to answer some of the things from your reply

because of inverting gain needs to be set at -1.46 (stock curcuit) so volume levels remain the same or close, is that less than unity?

the 220p cap after op amp can be removed.
does that present a load to op amp?

I put notes on first schematic to show some new values (which are wrong
qILE2BYsylJiDhQ844DCxC9Z4xS8qbqDiMA5lQTKsfHVyiNzhpS4MsCUUtUUe3ylsdUIQwgWkDw5gHiERgZcLbT0CSPNDKshPyKZ48WIWQA2qbhIuIGpDYAIoI6RSHOUZ0QBQQh46NCgDJufBU+m1MAzhtakJVVIgKnlYxgiLICQ0Yo50bxghCabdFDIAGeUc0scM3iz1CVbvHLNF0XAIIklSEAUEAA7
) and perceived frequency cutoffs (also wrong lol)

so the values can change on most, but because of gain being fixed and ad797b needs less than 1000ohms source r or z to keep noise low (datasheet). R1 needs to be 1000ohms or less + 10ohms dac output z

the 47p and 10k pole was original circuit and pcb did not have the 47p and the 10k was 6800ohm on stock board

all the filter software wants to create sallen key filters and short of point to point soldering I am stuck with the design on schematic (also no room to add a board)

I realize now 6mo later that 797b was not the best choice for this circuit but would still like to try with what I have.

by q I meant quality or thought that's what it meant
I was told by you and others that butter-worth or linear phase is best for audio applications

well I thank you for your time and input and hopefully I can make these 797`s behave nicely in this circuit

Glen
 
will that high of a pass band introduce noise?
You may want to back up a step and spend some understanding amplifier concepts (such as open loop gain, gain bandwidth product, closed loop gain, phase margin and stability, noise gain, slew rate, transient induced distortion) as well as the basics of DACs (discrete time, sampling, Nyquist's theorem, oversampling, upsamping, switched capacitor filters, and dynamic element matching)---yeah, it's a learning curve but the design skills gained pay off in the ability to execute projects well. Anyway, to summarize, the DAC's analog output carries some switching noise as well as copies of the audio signal shifted to higher frequency (usually centered around multiples of 352.8kHz but it can vary). The analog lowpass filter's job is to absorb the noise and copies so the output buffer's performance is focused on the audible audio signal. Preferably without messing up the signal itself much.

Third order lowpasses in the Bessel-Butterworth range cornering in the 50-150kHz range offer reasonable tradeoffs between passband audio quality, stopband rejection, implementation complexity, and cost. So that's what you'll tend to find on manufacturer's eval boards and in their reference designs. This being DIYA you'll find plenty of folks advocate for different points along the design continuum based on their personal preferences for how to select the tradeoffs. You may want to break out of the "schematic is what it is" box, though---consider breadboarding or even toner transfer DIY PCBs.

is that less than unity?
Unity gain is 0dB or 1. Doesn't matter if it's inverting or non-inverting with respect to phase margin considerations for stability. There are lots of resources to consult if you want an understanding of gain, phase margin, and stability. Analog's op amp handbooks would be a good start (pretty much anything written by Walt Jung is good, actually, and nearly all of it can be freely downloaded as pdf). Doug Self's preamp book could be worth a look as well (disclaimer: I haven't read it).

does that present a load to op amp?
Yes. So does the capacitance of the interconnect cable. Which is why, if you look at eval boards and reference designs, you'll usually see 22 to 47 ohm resistors in series with the op amp output. This pulls the RC pole formed by the output resistor can cable capacitance down to a frequency low enough the op amp remains stable.

Ask to have the thread moved.
Last time I did that some folks weren't so OK with it, creating some sideband discussion which distracted from the thread. I'll be completely unsurprised, however, if one of our fine moderators puts this in analog or digital line level.
 
You may want to back up a step and spend some understanding amplifier concepts (such as open loop gain, gain bandwidth product, closed loop gain, phase margin and stability, noise gain, slew rate, transient induced distortion) as well as the basics of DACs (discrete time, sampling, Nyquist's theorem, oversampling, upsamping, switched capacitor filters, and dynamic element matching)---yeah, it's a learning curve but the design skills gained pay off in the ability to execute projects well. Anyway, to summarize, the DAC's analog output carries some switching noise as well as copies of the audio signal shifted to higher frequency (usually centered around multiples of 352.8kHz but it can vary). The analog lowpass filter's job is to absorb the noise and copies so the output buffer's performance is focused on the audible audio signal. Preferably without messing up the signal itself much.

been reading so much the girlfriend's getting annoyed. when you say analog you mean the passive filter before feedback loop right?

so set that a little lower say 70khz depending how phase looks at 20khz and set feedback to be phase aligned at 20 khz?



Third order lowpasses in the Bessel-Butterworth range cornering in the 50-150kHz range offer reasonable tradeoffs between passband audio quality, stopband rejection, implementation complexity, and cost. So that's what you'll tend to find on manufacturer's eval boards and in their reference designs. This being DIYA you'll find plenty of folks advocate for different points along the design continuum based on their personal preferences for how to select the tradeoffs. You may want to break out of the "schematic is what it is" box, though---consider breadboarding or even toner transfer DIY PCBs.

this is a 5 disk player with literally 1/2 inch one side of pcb 3/4 inch other side so mods have to be compact even if that means building traces or point to point



Unity gain is 0dB or 1. Doesn't matter if it's inverting or non-inverting with respect to phase margin considerations for stability. There are lots of resources to consult if you want an understanding of gain, phase margin, and stability. Analog's op amp handbooks would be a good start (pretty much anything written by Walt Jung is good, actually, and nearly all of it can be freely downloaded as pdf). Doug Self's preamp book could be worth a look as well (disclaimer: I haven't read it).

read them, just understanding them is still spoty


Yes. So does the capacitance of the interconnect cable. Which is why, if you look at eval boards and reference designs, you'll usually see 22 to 47 ohm resistors in series with the op amp output. This pulls the RC pole formed by the output resistor can cable capacitance down to a frequency low enough the op amp remains stable.

yes and I have tested cable for capacitance and get none

should I put another passive filter after 797?

keeping capacitance below 100pf?

does phase matter as much on passive filters?



Last time I did that some folks weren't so OK with it, creating some sideband discussion which distracted from the thread. I'll be completely unsurprised, however, if one of our fine moderators puts this in analog or digital line level.

sorry if this is wrong place for this
and thanks again for your time
Glen
 
how about this, I have not simulated this yet but my filter lands at 159khz with only a few degrees off phase at 20khz

I am not understanding the 100 ohm resistor recommended by datasheet for damping filter loop capacitor larger than 50pf

using 1000pf there should I go higher say more than 100 less than 690 and what is the effect of a larger value?

thanks again for the advice
Glen
 

Attachments

  • marantz ose mods 2.jpg
    marantz ose mods 2.jpg
    345.6 KB · Views: 54
Tweaking values in the current schematic will not address the stability problems cited in post 2. The circuit topology has to change to achieve that.

Reading up on the amplifier fundamentals mentioned in post 5 should lead to the output resistor making sense.

Is feedback resistance and capacitance part of output load?

what I don't understand why this would oscilate when my circuit is identical to datasheet (other than values) topology for dac buffer in figure 53?

I could probaby change this topology to sallen, would that help?

thanks for your time and I think I am closer to understanding
Glen
 
Hmm, that's interesting. Generally the application notes in datasheets from good companies like Analog are quite solid but this case is a bit concerning. Earlier on the data sheet says to use figure 39 for the same purpose and the later text refers to Cf in figure 53 being connected to ground, which it isn't. I've accidentally implemented a similar circuit with a comparable op amp (LME49990) and it oscillated until I removed the cap between the op amp inputs. Even if it doesn't oscillate on the A797 I still would still be wary of low phase margin.

By the way, it's not usually desirable operate DACs below the minimum load resistance called out in the datasheet. Exactly how cranky it makes them varies from part to part but in the best case you'll still see an increase in THD compared to an in spec load.

Is feedback resistance and capacitance part of output load?
It does load the output but usually the feedback loop(s) are analayzed separately from other loading considerations.
 
Last edited:
A few manufacturers warn against hanging any capacitance off the -IN pin. Even to the extent of being wary of parasitic capacitance from the PCB traces around the _IN pin trace.

I see this on many chipamps and recommend they remove the capacitor to -IN pin connection.
 
Hmm, that's interesting. Generally the application notes in datasheets from good companies like Analog are quite solid but this case is a bit concerning. Earlier on the data sheet says to use figure 39 for the same purpose and the later text refers to Cf in figure 53 being connected to ground, which it isn't. I've accidentally implemented a similar circuit with a comparable op amp (LME49990) and it oscillated until I removed the cap between the op amp inputs. Even if it doesn't oscillate on the A797 I still would still be wary of low phase margin.

By the way, it's not usually desirable operate DACs below the minimum load resistance called out in the datasheet. Exactly how cranky it makes them varies from part to part but in the best case you'll still see an increase in THD compared to an in spec load.

It does load the output but usually the feedback loop(s) are analayzed separately from other loading considerations.

thanks again for the input and I did notice tda1549 min output r load is 3k but with combined resistance of r1 and rf as well as 797 input impedance being very high I thought it might still work

I also noticed in text cf shunting noise to ground and did not understand but I am a noob so there is lots I don't understand and phase margin is one.

If I keep the phase flat out to 20 to 23 khz with gain -3db about 160khz I think will work on active filter but inverting configuration what should I try to achieve for phase margin?

and what of group delay? if it shows peaking is that bad?

incidentally I did try a cap allready in that spot across inputs and got very audible distortion. that was with rs 260ohm and .022uf giving pole of 28 khz

when I removed it cleared up so I think you are right and I may need closer to fig 39 which is also closer to original curcuit.

I am still wondering if someone was able to bypass dac op amps (internal) on tda1549 and use the 797 i/v externally then strait to rca maybe passive filtèr between

I will try to use labview see what it says

thanks again
Glen
 
what of group delay? if it shows peaking is that bad?
If you refer to the definition of a Bessel alignment you'll see any non-Bessel alignment exhibits peaking. How much peaking is acceptable depends on the design requirements but, if phase deviation is kept below subjectively audible limits, any associated peaking is most likely also inaudible. I'm not, however, aware of any rigorous studies of this in a DAC context. (The closest results I know of are Siegfried Linkwitz's investigation of group delay audibility in LR2 and LR4 crossovers but there are so many other factors involved there---most notably driver cone breakup and operation at frequencies where the ear has better phase descrimination---I wouldn't consider the findings particularly relevant here.)
 
even though AD call AD797 unity gain stable and it can in fact be used that way, it takes quite some skill to get it behaving properly and its definitely not a dropin replacement, which is why the AD797's popularity with opamp rollers horrifies me! some of them even running them as buffers, one guy I saw paralleled 4 of them per channel, airwired without any change in compensation, in fact without any comp at all...

its a nice chip, I like it a lot, but with many new much better behaved chips available now it really doesnt make much sense to use it for low, or unity gain applications driving cables, headphones etc.

I would also go for something like the lme49990
 
If you refer to the definition of a Bessel alignment you'll see any non-Bessel alignment exhibits peaking. How much peaking is acceptable depends on the design requirements but, if phase deviation is kept below subjectively audible limits, any associated peaking is most likely also inaudible. I'm not, however, aware of any rigorous studies of this in a DAC context. (The closest results I know of are Siegfried Linkwitz's investigation of group delay audibility in LR2 and LR4 crossovers but there are so many other factors involved there---most notably driver cone breakup and operation at frequencies where the ear has better phase descrimination---I wouldn't consider the findings particularly relevant here.)

thanks again for your reply

I have been looking at this and thinking I cound change op to something else or try it in that curcuit or try bypassing internal opamps on tda1549 and use ad797 strait from dac out then to rca (maybe passive filter between)

supposedly Rudolf Broertjes did this (best known for his dac i/v) but he has not replied to me so I may just try it.

here is basic schematic


Glen
 

Attachments

  • tda1549 Rudolf Broertjes .gif
    tda1549 Rudolf Broertjes .gif
    9.4 KB · Views: 58
even though AD call AD797 unity gain stable and it can in fact be used that way, it takes quite some skill to get it behaving properly and its definitely not a dropin replacement, which is why the AD797's popularity with opamp rollers horrifies me! some of them even running them as buffers, one guy I saw paralleled 4 of them per channel, airwired without any change in compensation, in fact without any comp at all...

its a nice chip, I like it a lot, but with many new much better behaved chips available now it really doesnt make much sense to use it for low, or unity gain applications driving cables, headphones etc.

I would also go for something like the lme49990

yes all us noobs did not realize when you change the op amp some need the filter and other values to change

I am going to buy a used oscilloscope soon and then I will know for sure what the circuit is doing

see above for new plan of attack which I think ad797 is better suited but I need to check gains with and without internal ops on tda1549

I don`t think they are unity and even in the first curcuit it is not unity 1.46 . I know not far from unity

thanks for the reply
Glen
 
thats close enough to just call unity.... so I did... really without careful layout and without some additions, I wouldnt use it lower than 4x. AD797 not properly implemented will be handily beaten by lme49990, which is a fairly bulletproof chip too, cheap as well.
AD797 even has completely different pins that need to be used to gain best performance from it (pin 8) that are probably just tied to ground or unconnected on your layout. once you combine figure 39. figure 42. and figure 44 (along with the recommended psu bypassing) without a suitable PCB..... I dont think your noise performance will be lower than lme49990, which requires none of that (except the bypassing)

great chip, but its a princess (sorry Scott =) you know its true)
 
Last edited:
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.