Hey everyone, I am a DSP newbie, so please forgive me if my question is pretty trivial. In all DSP literature, you come across this term DC. I am trying to figure out what it really means... I was just going through a small chapter on low pass filters. Everything seems fine till this statement which I cannot understand! "If a low pass filter has a gain of one at DC (zero frequency), then the sum of all points in impulse response must be equal to 1. What does the author mean by a gain of one at DC? The filter is working in the time domain and I am not sure what this zero frequency means either. :( I would be really thankful if someone can help me understand what all this means... Thank you for your help. Luca
DC of a filter
Started by ●October 7, 2007
Reply by ●October 7, 20072007-10-07
On 7 Okt, 13:36, luca.pampar...@gmail.com wrote:> Hey everyone, > > I am a DSP newbie, so please forgive me if my question is pretty > trivial. > > In all DSP literature, you come across this term DC. I am trying to > figure out what it really means... > > I was just going through a small chapter on low pass filters. > Everything seems fine till this statement which I cannot understand! > > "If a low pass filter has a gain of one at DC (zero frequency), then > the sum of all points in impulse response must be equal to 1. > > What does the author mean by a gain of one at DC? The filter is > working in the time domain and I am not sure what this zero frequency > means either. :(The term DC is inherited from electronics where it means "Direct Current" as opposed to "Alternating Current" (AC). For the purpose of DSP (which is about maths, not electronics) the term refers to the mean of the signal. Rune
Reply by ●October 7, 20072007-10-07
On Oct 7, 12:43 pm, Rune Allnor <all...@tele.ntnu.no> wrote:> On 7 Okt, 13:36, luca.pampar...@gmail.com wrote: > > > > > Hey everyone, > > > I am a DSP newbie, so please forgive me if my question is pretty > > trivial. > > > In all DSP literature, you come across this term DC. I am trying to > > figure out what it really means... > > > I was just going through a small chapter on low pass filters. > > Everything seems fine till this statement which I cannot understand! > > > "If a low pass filter has a gain of one at DC (zero frequency), then > > the sum of all points in impulse response must be equal to 1. > > > What does the author mean by a gain of one at DC? The filter is > > working in the time domain and I am not sure what this zero frequency > > means either. :( > > The term DC is inherited from electronics where it means > "Direct Current" as opposed to "Alternating Current" (AC). > For the purpose of DSP (which is about maths, not electronics) > the term refers to the mean of the signal. > > RuneHey Rune, Thanks for the reply. So, what does it mean when the filter has a gain of one at DC? Also, if the DC is 1... should not the sum of all points in the input response be N (number of points in input response) as the mean would than be N/N = 1. Thanks, Luca
Reply by ●October 7, 20072007-10-07
On 7 Okt, 13:53, luca.pampar...@gmail.com wrote:> On Oct 7, 12:43 pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > > > > On 7 Okt, 13:36, luca.pampar...@gmail.com wrote: > > > > Hey everyone, > > > > I am a DSP newbie, so please forgive me if my question is pretty > > > trivial. > > > > In all DSP literature, you come across this term DC. I am trying to > > > figure out what it really means... > > > > I was just going through a small chapter on low pass filters. > > > Everything seems fine till this statement which I cannot understand! > > > > "If a low pass filter has a gain of one at DC (zero frequency), then > > > the sum of all points in impulse response must be equal to 1. > > > > What does the author mean by a gain of one at DC? The filter is > > > working in the time domain and I am not sure what this zero frequency > > > means either. :( > > > The term DC is inherited from electronics where it means > > "Direct Current" as opposed to "Alternating Current" (AC). > > For the purpose of DSP (which is about maths, not electronics) > > the term refers to the mean of the signal. > > > Rune > > Hey Rune, > > Thanks for the reply. So, what does it mean when the filter has a gain > of one at DC?To understand this you need to understand the Fourier transform. Basically, the signal is represented as a set of sines at different frequencies, including f = 0 which is the DC term. In linear systems, each frequency component is multiplied by some factor, which is the "gain" at that frequency; again, the terminology is inherited from analog electronics. "The gain equals 1 at DC" just means that the DC component is unaltered by the system.> Also, if the DC is 1... should not the sum of all points in the input > response be N (number of points in input response) as the mean would > than be N/N = 1.There are a couple of scaling factors involved. In order to analyze the numerical values you need to use the computational machinery of the Fourier transform (FT) before you can start discussing details. One needs to look at the precise details of the FT before answering such questions. Rune
Reply by ●October 7, 20072007-10-07
On Oct 7, 1:16 pm, Rune Allnor <all...@tele.ntnu.no> wrote:> On 7 Okt, 13:53, luca.pampar...@gmail.com wrote: > > > > > On Oct 7, 12:43 pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > On 7 Okt, 13:36, luca.pampar...@gmail.com wrote: > > > > > Hey everyone, > > > > > I am a DSP newbie, so please forgive me if my question is pretty > > > > trivial. > > > > > In all DSP literature, you come across this term DC. I am trying to > > > > figure out what it really means... > > > > > I was just going through a small chapter on low pass filters. > > > > Everything seems fine till this statement which I cannot understand! > > > > > "If a low pass filter has a gain of one at DC (zero frequency), then > > > > the sum of all points in impulse response must be equal to 1. > > > > > What does the author mean by a gain of one at DC? The filter is > > > > working in the time domain and I am not sure what this zero frequency > > > > means either. :( > > > > The term DC is inherited from electronics where it means > > > "Direct Current" as opposed to "Alternating Current" (AC). > > > For the purpose of DSP (which is about maths, not electronics) > > > the term refers to the mean of the signal. > > > > Rune > > > Hey Rune, > > > Thanks for the reply. So, what does it mean when the filter has a gain > > of one at DC? > > To understand this you need to understand the Fourier transform. > Basically, the signal is represented as a set of sines at > different frequencies, including f = 0 which is the DC term. > In linear systems, each frequency component is multiplied by > some factor, which is the "gain" at that frequency; again, the > terminology is inherited from analog electronics. > > "The gain equals 1 at DC" just means that the DC component > is unaltered by the system. > > > Also, if the DC is 1... should not the sum of all points in the input > > response be N (number of points in input response) as the mean would > > than be N/N = 1. > > There are a couple of scaling factors involved. In order to > analyze the numerical values you need to use the computational > machinery of the Fourier transform (FT) before you can start > discussing details. One needs to look at the precise details > of the FT before answering such questions. > > RuneThanks for the reply! The fourier transform is the next chapter. So, I hope to jump into it soon! So, if you have a signal and you take the fourier transform of it...than the value at index 0 is the DC term... Is that correct? Thanks again, Luca
Reply by ●October 7, 20072007-10-07
luca.pamparana@gmail.com writes:> On Oct 7, 12:43 pm, Rune Allnor <all...@tele.ntnu.no> wrote: >> On 7 Okt, 13:36, luca.pampar...@gmail.com wrote: >> >> >> >> > Hey everyone, >> >> > I am a DSP newbie, so please forgive me if my question is pretty >> > trivial. >> >> > In all DSP literature, you come across this term DC. I am trying to >> > figure out what it really means... >> >> > I was just going through a small chapter on low pass filters. >> > Everything seems fine till this statement which I cannot understand! >> >> > "If a low pass filter has a gain of one at DC (zero frequency), then >> > the sum of all points in impulse response must be equal to 1. >> >> > What does the author mean by a gain of one at DC? The filter is >> > working in the time domain and I am not sure what this zero frequency >> > means either. :( >> >> The term DC is inherited from electronics where it means >> "Direct Current" as opposed to "Alternating Current" (AC). >> For the purpose of DSP (which is about maths, not electronics) >> the term refers to the mean of the signal. >> >> Rune > > Hey Rune, > > Thanks for the reply. So, what does it mean when the filter has a gain > of one at DC?Hi Luca (and Rune), Please allow me to step in and give you my perspective/answer. The volume knob on your TV controls the gain G. That gain applies to ALL frequencies equally. For example, if the knob is set for a gain of 2 (G = 2), then the gain at DC (0 Hz) is 2, the gain at 100 Hz is 2, the gain at 1000 Hz is 2, the gain at 2.391102 Hz is two, etc., etc. In other words, the gain of the entire signal (all frequencies) is multiplied by 2. You can think of a filter as a FREQUENCY-DEPENDENT volume control. It has a independent gain associated with EACH FREQUENCY f, |G(f)|. So it might provide a gain at one frequency f1, |G(f1)|, that is different from the gain at another frequency f2, |G(f2)|. So when you read that a filter has a DC gain of 1, that means that at f = 0 (DC), |G(f)| = 1. Or, more succinctly, |G(0)| = 1.> Also, if the DC is 1... should not the sum of all points in the input > response be N (number of points in input response) as the mean would > than be N/N = 1.Yes. This is from the more general expression for the average A of any set of N numbers x[1], x[2], ..., x[n] as A = (x[1] + x[2] + ... + x[N]) / N. However, be careful of your terminology - "input response" is not a good way to phrase it. It would be better to say "filter response." -- % Randy Yates % "Ticket to the moon, flight leaves here today %% Fuquay-Varina, NC % from Satellite 2" %%% 919-577-9882 % 'Ticket To The Moon' %%%% <yates@ieee.org> % *Time*, Electric Light Orchestra http://www.digitalsignallabs.com
Reply by ●October 7, 20072007-10-07
On Oct 7, 5:16 am, Rune Allnor <all...@tele.ntnu.no> wrote:> On 7 Okt, 13:53, luca.pampar...@gmail.com wrote: > > > > > On Oct 7, 12:43 pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > On 7 Okt, 13:36, luca.pampar...@gmail.com wrote: > > > > > Hey everyone, > > > > > I am a DSP newbie, so please forgive me if my question is pretty > > > > trivial. > > > > > In all DSP literature, you come across this term DC. I am trying to > > > > figure out what it really means... > > > > > I was just going through a small chapter on low pass filters. > > > > Everything seems fine till this statement which I cannot understand! > > > > > "If a low pass filter has a gain of one at DC (zero frequency), then > > > > the sum of all points in impulse response must be equal to 1. > > > > > What does the author mean by a gain of one at DC? The filter is > > > > working in the time domain and I am not sure what this zero frequency > > > > means either. :( > > > > The term DC is inherited from electronics where it means > > > "Direct Current" as opposed to "Alternating Current" (AC). > > > For the purpose of DSP (which is about maths, not electronics) > > > the term refers to the mean of the signal. > > > > Rune > > > Hey Rune, > > > Thanks for the reply. So, what does it mean when the filter has a gain > > of one at DC? > > To understand this you need to understand the Fourier transform. > Basically, the signal is represented as a set of sines at > different frequencies, including f = 0 which is the DC term. > In linear systems, each frequency component is multiplied by > some factor, which is the "gain" at that frequency; again, the > terminology is inherited from analog electronics. > > "The gain equals 1 at DC" just means that the DC component > is unaltered by the system. > > > Also, if the DC is 1... should not the sum of all points in the input > > response be N (number of points in input response) as the mean would > > than be N/N = 1. > > There are a couple of scaling factors involved. In order to > analyze the numerical values you need to use the computational > machinery of the Fourier transform (FT) before you can start > discussing details. One needs to look at the precise details > of the FT before answering such questions. > > RuneMaybe we should say "cosines" or "cosines and sines" instead of "sines" to a DSP beginner as the DC term has no sine component. It takes a cosine to get a non-zero response at a frequency of zero. Dale B Dalrymple http://dbdimages.com http://stores.lulu.com/dbd
Reply by ●October 7, 20072007-10-07
dbd wrote: ...> Maybe we should say "cosines" or "cosines and sines" instead of > "sines" to a DSP beginner as the DC term has no sine component. It > takes a cosine to get a non-zero response at a frequency of zero.Indeed. And yes, for a transversal (the usual kind of FIR) filter, the DC response is the sum of the coefficients. Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by ●October 7, 20072007-10-07
dbd wrote: ..>>There are a couple of scaling factors involved. In order to >>analyze the numerical values you need to use the computational >>machinery of the Fourier transform (FT) before you can start >>discussing details. One needs to look at the precise details >>of the FT before answering such questions. >> >>Rune > > > Maybe we should say "cosines" or "cosines and sines" instead of > "sines" to a DSP beginner as the DC term has no sine component. It > takes a cosine to get a non-zero response at a frequency of zero. >Well, if we are including DC in the set of "signals" described by sines and cosines, one can reasonably identify a DC level as being a 0Hz sinusoid at some fixed possibly non-zero phase. In that case, a sine term is just as meaningful as cosine. On the other hand, if that is deemed not to be helpful, there is a reasonable distinction to be made bewteen the meanings of "DC" and "O Hz". The former term ~does~ relate primarily to analogue electronics (where it matters a lot in purely physical situations, such as a signal with a net DC offset delivered to speakers which may in time melt them). OK, of course DSP is "about maths"; but in practice DSP is frequently used to model analogue processes and systems, and shares much of its language with them. I would therefore suggest to anyone who is a newbie at DSP to at least read up on the fundamentals of analogue as well (up to at least basic LCR filters), so that terms such as DC and AC are already understood; it is so much easier to make sense of the maths (and the quasi-analogue language people are using) if it can be related to familiar real-world stuff. For example: http://www.play-hookey.com/dc_theory/index.html Richard Dobson
Reply by ●October 7, 20072007-10-07
On 7 Okt, 17:58, Richard Dobson <richarddob...@blueyonder.co.uk> wrote:> OK, of course DSP is "about maths"; but in practice DSP is frequently > used to model analogue processes and systems, and shares much of its > language with them.Correct on both accounts.> I would therefore suggest to anyone who is a newbie > at DSP to at least read up on the fundamentals of analogue as well (up > to at least basic LCR filters), so that terms such as DC and AC are > already understood; it is so much easier to make sense of the maths (and > the quasi-analogue language people are using) if it can be related to > familiar real-world stuff.Eh... I have to disagree. Except for the etymology of traditional DSP terminology, knowledge of analog electronics is *not* a prerequisite for learning DSP. I would, in fact, go so far as to say that such knowledge to some extent prevents people from learning advanced DSP. Unless one is able to handle abstract maths one can not fully exploit the power of the funnier aspects of DSP. A too "practical" approach (i.e. reliance of analog "physical" models) prevents the development of abstract concepts. For instance, once upon a time I developed a prototype passive sonar processor which apparently pushed the detection threshold in existing systems by some 8-10 dB. I never got to pursue those ideas because they were based on very simple but nonetheless abstract mathematical concepts. The people in charge were unable to grasp such ideas -- they were unable to grasp anything that was not expressed as LRC networks -- so my ideas dwindled away. Rune






