I have some conceptual problems properly relating "physical real" and
"mathematical real".
I don't have problems with equations such as
sin(wt) = (e^jwt - e^-jwt)/2 [ did I confuse sin with cos ? ;]
That's a mathematical expression following mathematical rules &/or
conventions.
I don't have any real { poor word? ;} problem taking the FFT of a
physically realizable signal ( eg lab square wave generator ). The FFT
result is complex. But I sort of grok* that its complex nature provides
me with phase information.
What confuses me is "reality"/"physical significance" of a complex input
to an FFT. I can accept that as a mathematical operator an FFT can
operate on real, imaginary, or complex data and produce a result.
But just
a. where do you physically get said complex input?
b. what is a complex input?
c. what question should I be asking? ;]
Jerry objects to me claiming "newbie" status ;}
I'll just claim "confused" status ;!
Reality check -- What constitutes a "real signal" ?
Started by ●January 18, 2005
Reply by ●January 18, 20052005-01-18
Richard Owlett wrote:> I have some conceptual problems properly relating "physical real" and > "mathematical real". > > I don't have problems with equations such as > > sin(wt) = (e^jwt - e^-jwt)/2 [ did I confuse sin with cos ? ;] > That's a mathematical expression following mathematical rules &/or > conventions.You got half & half -- your expression is for -j sin(wt) -- multiply by j for the correct answer.> > I don't have any real { poor word? ;} problem taking the FFT of a > physically realizable signal ( eg lab square wave generator ). The FFT > result is complex. But I sort of grok* that its complex nature provides > me with phase information.Actually it's complex nature is constrained such that if you know the input was real-valued you only need half of the samples to predict the other half.> > What confuses me is "reality"/"physical significance" of a complex input > to an FFT. I can accept that as a mathematical operator an FFT can > operate on real, imaginary, or complex data and produce a result. > > But just > a. where do you physically get said complex input?The place that I know of to get such an input is by demodulating a band limited signal with a complex sinusoid. For example if I want to build a SSB radio and I have a signal that occupies 1900 - 1903kHz I can multiply it by e^jwt, with w = 2 * pi * 1900000. I'll get a signal with energy from 0 to 3kHz and energy from 3800 to 3803kHz. I can easily discard the stuff at 3.8kHz and save the stuff around DC. As to how to do this I have two mixers: my inphase mixer multiplies by cos(wt)and my quadrature mixer multiplies by sin(wt). I sample the inphase and quadrature channels, and internally in my software I declare the quadrature channel to be imaginary.> b. what is a complex input?See above.> c. what question should I be asking? ;]Gee, that's a tough one -- it's so open ended. "Why am I here"? "Why am I Republican (Democrat, Nazi, Communist, Labor, Christian Democrat, Likud, etc.)"? "Why didn't I go into prostitution when I was good looking"?> > Jerry objects to me claiming "newbie" status ;} > I'll just claim "confused" status ;! >-- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●January 18, 20052005-01-18
Richard Owlett wrote:> I have some conceptual problems properly relating "physical real" and > "mathematical real".> I don't have problems with equations such as> sin(wt) = (e^jwt - e^-jwt)/2 [ did I confuse sin with cos ? ;] > That's a mathematical expression following mathematical rules &/or > conventions.Is should be divided by 2i, but pretty close.> I don't have any real { poor word? ;} problem taking the FFT of a > physically realizable signal ( eg lab square wave generator ). The FFT > result is complex. But I sort of grok* that its complex nature provides > me with phase information.If you really don't like complex numbers there is the Hartley transform. Just as valid physically, it isn't as nice mathematically.> What confuses me is "reality"/"physical significance" of a complex input > to an FFT. I can accept that as a mathematical operator an FFT can > operate on real, imaginary, or complex data and produce a result. > > But just > a. where do you physically get said complex input? > b. what is a complex input? > c. what question should I be asking? ;]In most cases, signals will be real. There are some physical quantities that are best described as complex, but not usually the ones you Fourier transform. Index of refraction, and the related dielectric constant, where the imaginary part is related to absorption (attenuation). It works pretty much the same as complex impedance. It could also be used to describe quadrature modulation, such as the color subcarrier in TV signals. While it is really amplitude and phase it is sometimes easier to understand as real and imaginary parts of a complex value, though with no odd real or even imaginary part. -- glen
Reply by ●January 18, 20052005-01-18
in article 10uqp7od5u07579@corp.supernews.com, Richard Owlett at rowlett@atlascomm.net wrote on 01/18/2005 14:35:> a. where do you physically get said complex input?complex signals are "constructed" in the mind of the computer or DSP. they are a pair of real signals where one of those real signals is called the "real part" or the "in-phase signal" and the other real signal is called the "imaginary part" or the "quadrature signal". then the pair are always processed together with the rules of doing mathematics to complex numbers (how they're added, multiplied, divided, exponentiated, etc.).> b. what is a complex input?an input consisting of two part (both real signals), one representing a real part, the other representing the imaginary part.> c. what question should I be asking? ;]i dunno. there have been some philosophical discussions here regarding if complex quantities really exist in nature. i'm of the belief that complex numbers are a very useful mathematical abstraction and that you will not be hooking up a voltmeter to some voltage and read a complex value (without some interpretation, at least). -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●January 18, 20052005-01-18
in article BE12DE92.3E10%rbj@audioimagination.com, robert bristow-johnson at rbj@audioimagination.com wrote on 01/18/2005 15:41:> there have been some philosophical discussions here regarding if complex > quantities really exist in nature. i'm of the belief that complex numbers > are a very useful mathematical abstraction and that you will not be hooking > up a voltmeter to some voltage and read a complex value (without some > interpretation, at least).more specifically, i meant to say that *imaginary* numbers are a useful mathematical abstraction (and then so also are complex numbers). there are folks that say the terms "real" and "imaginary" are sorta misnomers for the two parts of a complex number, but i think they are very appropriate terms. imaginary numbers truly exist only in our imagination. all mathematics done at the root physical level are real, IMHO. even, ultimately, quantum mechanics, although doing it with complex numbers sure saves you a headache. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●January 18, 20052005-01-18
"robert bristow-johnson" <rbj@audioimagination.com> wrote in message news:BE12DE92.3E10%rbj@audioimagination.com...> in article 10uqp7od5u07579@corp.supernews.com, Richard Owlett at > rowlett@atlascomm.net wrote on 01/18/2005 14:35: > >> a. where do you physically get said complex input? > > complex signals are "constructed" in the mind of the computer or DSP. they > are a pair of real signals where one of those real signals is called the > "real part" or the "in-phase signal" and the other real signal is called the > "imaginary part" or the "quadrature signal". then the pair are always > processed together with the rules of doing mathematics to complex numbers > (how they're added, multiplied, divided, exponentiated, etc.).That meshes with the way I think about it too. I was once told that sometimes we make real signals into complex ones because the analysis becomes easier. Then when you are done with the math, you often throw away part of the data to get a real answer (e.g. the magnitude of a particular FFT frequency bin). Another simple example is phasor analysis in elementary circuits. A lot of complex numbers are thrown in to deal with e.g. both voltage and current simultaneously.
Reply by ●January 19, 20052005-01-19
Richard Owlett wrote:> I have some conceptual problems properly relating "physical real" and> "mathematical real".Some people have accused me (and probably rightly so) of being too concerned about linguistic details. I prefer to use the terms "real-world signal" for an actually measured (as opposed to simulated) signal, and the terms "real-valued data" for measured or simulated data that are represented as real (as opposed to complex) numbers. Some words have just too many possible meanings to take any chances wih.> I don't have problems with equations such as > > sin(wt) = (e^jwt - e^-jwt)/2 [ did I confuse sin with cos ? ;] > That's a mathematical expression following mathematical rules &/or > conventions.You didn't confuse it with cos, you forgut the "i" in the denominator. Now, what you need to contemplate with the above equation, is that the real-valued sin(wt) is *represented* by two complex numbers. These two *representations* are equally valid since the imaginary parts of the complex-valued exp terms cancel. I am sure you remember calculus in school, where one often encountered tricks like adding one and subtracting one to an equation. The overall value of the equation is unchanged, but the algebraic representation has changed so that it is easier to get a step or two further.> I don't have any real { poor word? ;} problem taking the FFT of a > physically realizable signal ( eg lab square wave generator ). TheFFT> result is complex. But I sort of grok* that its complex natureprovides> me with phase information.Well, that's the difference between the real-valued and complex- valued representations. Remember that the DFT of a realvalued signal is ymmetrical, i.e. F(-w) = conj(F(w)), so you need to take the whole spectrum into account to get a mathematically correct representation. Usually, we prefer to view only the half spectrum (the band 0 - Fs/2) since we basically only nead that to understand the essentials of the spectrum.> What confuses me is "reality"/"physical significance" of a complexinput> to an FFT. I can accept that as a mathematical operator an FFT can > operate on real, imaginary, or complex data and produce a result. > > But just > a. where do you physically get said complex input?Generally, you don't. There *might* be situations where one measures two real-valued signals and combine them as a real and imaginary part of a complex number prior to further processing. If that can be dne and if anything useful come out of it, it would be purely coincidential. You generally have to take one or more real-valued inputs, do some voodoo on them, and produce complex numbers as a result of manipulations (e.g. quadrature sampling, Hilbert transforms, other weird stuff).> b. what is a complex input?A complex-valued input is an input to a routine, that consist of complex numbers. Just to give you a hint of how useful the distinction is, I exploited the difference between complex-valued and real-valued inputs in the techniques I developed in my thesis (you can find a PDF copy at http://www.fysel.ntnu.no/~allnor/thesis/thesis.pdf but be quick, I'm clearing out my office now so the link will disappear in a couple of days). What we did was to use an array of M sensors to record time series. What you end up with, is a set of M timeseries, each containing N samples. This is arranged in an N x M matrix, where all coefficients are real-valued. The analysis we did was based on inspecting the 2D spectrum of these 2D (t,x) data. The naive way of doing that is to compute a 2D DFT of the NxM matrix. Now, let's just take a closer look at how one actually does that. Step 1 is to compute the 1D DFT (using a standard FFT routine) along the t axis, the columns. After doing that, you still have a NxM matrix, but the coefficients are no longer real-valued, they are complex-valued. There is a symmetry in that the complex conjugated complex numbers that merge to form real-valued time series are found in different rows. But there is no connection between the numbers found in each row. The last step of computing the 2D DFT is to compute the 1D DFT of the rows. These are complex valued, and are therefore complex-valued inputs to the 1D FFT routine.> c. what question should I be asking? ;]I think you are (and have been, for a long time now) asking the correct questions. These questions are good indicators that you actually have been contemplating the material you ask about. Which makes it more inspiring to try to help out.> Jerry objects to me claiming "newbie" status ;}And right he is! As I said above, these types of questions are founded on a certain type of contemplation that separate the "experienced student" from the complete newbie.> I'll just claim "confused" status ;!Heh, that makes at least two of us. As they say, "once you've become one of us, there is no way back." Once confused, always confused. Seriously, over the years I have found myself more and more often confused about seemingly "obvious" technical details, like the questions you ask. Interestingly, I find that the keys to solving problems are often found in those tiny details. For instance, in my PhD work I found that since the Nyquist sampling theorem only applies to real-valued data, I could achieve my target results with only half as long arrays as everybody expected. Nah, you are asking just the kind of questions that can bring you a long way forward. Contemplating "trivial" questions and being aware of "curious" answers, are the key. Rune
Reply by ●January 19, 20052005-01-19
Rune Allnor wrote: (big snip)> Well, that's the difference between the real-valued and complex- > valued representations. Remember that the DFT of a realvalued signal > is ymmetrical, i.e. F(-w) = conj(F(w)), so you need to take the > whole spectrum into account to get a mathematically correct > representation. Usually, we prefer to view only the half spectrum > (the band 0 - Fs/2) since we basically only nead that to understand > the essentials of the spectrum.Well, if it really is symmetric, then you only need half. On the other hand, you don't know that the original function was real valued unless you see the symmetry in the transform result. Consider the Fourier transform symmetries of transform pairs: real even <--> real even real odd <--> imaginary odd imaginary even <--> imaginary even If you consider the Hartley transform instead, where real and imaginary aren't mixed, but instead real <--> real imaginary <--> imaginary odd <--> odd even <--> even It seems much simpler to understand. But then if you want to see the important parts of the result, you have to separate the result into even and odd parts.>>What confuses me is "reality"/"physical significance" of>> a complex input to an FFT. I can accept that as a >> mathematical operator an FFT can operate on real, >> imaginary, or complex data and produce a result.>>But just >> a. where do you physically get said complex input?One place is from the result of Fourier transforms. -- glen
Reply by ●January 19, 20052005-01-19
glen herrmannsfeldt wrote:> Rune Allnor wrote: > (big snip) > > > Well, that's the difference between the real-valued and complex- > > valued representations. Remember that the DFT of a realvaluedsignal> > is ymmetrical, i.e. F(-w) = conj(F(w)), so you need to take the > > whole spectrum into account to get a mathematically correct > > representation. Usually, we prefer to view only the half spectrum > > (the band 0 - Fs/2) since we basically only nead that to understand > > the essentials of the spectrum. > > Well, if it really is symmetric, then you only need half. > On the other hand, you don't know that the original function > was real valued unless you see the symmetry in the transform > result.Good point. Most of the time, one knows that from the statement of the problem. In most applications one deals with real-valued signals, and know from the scope of the problem that half the spectrum suffices. In fact, this assumption is so common that one could think that it is a fundamental property of DSP, based on most, if not all, entry-level and mid-level texts on DSP. Actually, off the top of my head I can't think of a single book on DSP that actually discusses complex-valued signals in their own right. Rune
Reply by ●January 19, 20052005-01-19
Richard Owlett wrote:> I have some conceptual problems properly relating "physical real" and> "mathematical real". > > I don't have problems with equations such as > > sin(wt) = (e^jwt - e^-jwt)/2 [ did I confuse sin with cos ? ;] > That's a mathematical expression following mathematical rules &/or > conventions. > > I don't have any real { poor word? ;} problem taking the FFT of a > physically realizable signal ( eg lab square wave generator ). TheFFT> result is complex. But I sort of grok* that its complex natureprovides> me with phase information. > > What confuses me is "reality"/"physical significance" of a complexinput> to an FFT. I can accept that as a mathematical operator an FFT can > operate on real, imaginary, or complex data and produce a result. > > But just > a. where do you physically get said complex input? > b. what is a complex input?I am newbie to posting here. So pls. bear with my mistakes. First of all I agree with all the previous replies. I would like to add some of my thoughts here. IMHO, one way to make sense out of complex numbers is, as special cases of two dimensional vector spaces. A 2D vector space is spanned by the two orthogonal(not unique) basis vectors. In the case of complex numbers we call one of them as real and the other imaginary. IMHO, What makes their case special is that, in addition to all the mathematical properties of vector spaces, complex numbers gives the ability to describe the operation of rotating a vector by 90 degrees, by the operation of multiplying by j. Rotation is useful in describing many physical phenomena where a system changes the phase of an input signal and the phase information of the output is important. Then one may be able to use the complex number operations to model parts of that system. One example is phase modulations in communications. The concept of angle(phase) is very fundamental to vector spaces. Specifically a vector space defines the vector inner product. From that we can calculcate the angle between the two multiplicand vectors. angle b/w vectors x and y = arccos(<x,y>/(mag(x)*mag(y)) But vector spaces do not need to define a rotation operation. (I am not sure if it a byproduct of any of the vector space properties.) Now lets take an example where complex numbers are used, the fourier transform. In the case of fourier transforms, each frequency represents a 2D vector space spanned by the basis vectors cos(wt) and sin(wt) which are orthogonal bases. Note that we can obtain the second basis vector sin(wt) by rotating the first basis vector cos(wt) by 90 degrees( = pi/2 rad). Physically this rotation operation is achieved by delaying the cost(wt) signal by td = pi/2/w. cos(w(t - td)) = cos(wt - pi/2) = cos(pi/2 - wt) = sin(wt). If we take the rotated signal sin(wt) and again rotate it by the same delay we get -cos(wt). i.e. sin(w(t - td)) = sin(wt - pi/2) = -sin(pi/2 - wt) = -cos(wt). I.e, two rotations by 90 degrees each in the same direction result in multiplication by -1. So intuitively, rotation by 90 degrees is multiplication by sqrt(-1). (Also think about the polar coordinate representations, where j = exp(j*pi/2) ) Now lets see how some of the vector space quantities are defined in the case of complex numbers. Vector spaces require that a vector inner product be defined *uniquely* on a vector space between any two non-zero vectors. In the case of complex numbers this is <z1,z2> = real(z1 * Z2') where * is the complex multiplication and ' is the conjugation operation. Vector inner products are by definition scalars. So the output of real(Z1*Z2) is interpreted as a scalar. Interestingly complex multiplication also provides the vector outer product(cross product) as the imaginary part of the complex product(i.e. z1*z2'). But by definition the vector outerproduct is a vector and is perpendicular to the direction of both the multiplicands vectors. IMHO, this is a place where the complex numbers differ from the usual vector spaces, that here the vector outer product *SEEMS to* lie within the 2D complex plane itself. But usually this does not create any confusion because there are only two possible directions that the vector outerproduct can have *IF* the two multiplicands are always lie in a certain 2D plane. So we can interpret the outerproduct as a real number either positive or negative depending on the two directions. I have not listed the other vector space properties, but one can easily show that complex numbers do provide all of them as definitions of complex number operations. So IMHO complex numbers represent a 2D vector space. To describe physical phenomena/systems where one is interested in the relative phases of the input/output signals, complex numbers is a very useful tool. Going back to the question of fourier transforms. We use complex multiplications and not just either vector inner/outer products in the case of fourier transfoms. And there are physical phenomena to back up these mathematical operations. E.g. Fraunhauffer doffraction pattern is the 2D fourier transform of the aperture of the light source. (Note, here each of the dimension in the "time domain" actually has units of length. And so frequencies are spatial frequencies with units 1/length.)> c. what question should I be asking? ;]Here are some suggestions. 1. What is the definition of a vector space? (Also think about inner products, norms, angle, ...) 2. Give a proof that complex plane is a 2D vector space defined over the field of real numbers. 3. How do we interpret vectors in the physical world? E.g. we know force is a vector, but we measure force as a scalar quantity. The direction is implied. Can we apply a similar approach to complex numbers where we do not measure the j part, but we infer it from the context? 4. How to interpret negative frequencies and complex frequencies? There are many more interesting questions. There was a thread on a very similar topic on this newsgroup, perhaps a few yrs ago. You can google it i think. Also I found a short thread "why do complex numbers work in physics? " on sci.physics.research. Very interesting discussion. Half of it was greek and latin to me though! I am interested to hear some examples and counter examples from Physicist on this "complex" problem.> > Jerry objects to me claiming "newbie" status ;} > I'll just claim "confused" status ;!I have seen some other threads on comp.dsp where it was asked whether one can measure a complex signal? I think, it is possible to build a device that measures the magnitude and also phase (w.r.to a reference) of a signal. And IMHO, that is measuring a complex signal. A watt meter is close to such a device 'coz, it measures real(<v(t),i(t)>) and if we know the magnitude of the v(t) and i(t) signals we can calculate the angle between v(t) and i(t) and we have the relative phase between v and i(arc cosine of power factor). Thanks for putting up with me until here :) -Kal






