DSPRelated.com
Forums

my problem is unsolved -- how to estimate bandwidth the fastest way?

Started by Vista May 29, 2007
Hi all,

My previous problems are still unsolved.

Problem 1:

In order to sample signal x(t), I have to know its bandwidth. How to 
estimate the 99% bandwidth? Need to do this as fast as possible.

My constraints:

(1) I don't have the closed-form of x(t), its point-wise evaluation is very 
prohibitive and costly;
(2) Doing the trial and error(first do a rough FFT and then do a second FFT 
with an increased number of samples, and then compare the two spectrum, to 
decide how to further adjust the number of samples) is not a wise approach, 
because this procedure has to be repeated in a loop for millions of times; 
also there isno way to automatically and programatically decide if the 
spectrum needs further refinement or not. That's to say, there is no single 
indictor of spectrum quality that can alert the program and help the program 
to decide whether a further increase of the sampling points is needed or 
not. This has to be done automatically and programmatically within the 
program itself without human eye-inspection.

----------------------

Problem 2:

Given a number B, estimate how much percentage of energy is contained in the 
spectrum band in range [-B, B], of signal x(t). Need to do this the fastest 
way.

The constraints are the same as above.

Any smart ideas of how to handle this?

Thanks!



>Hi all, > >My previous problems are still unsolved. > >Problem 1: > >In order to sample signal x(t), I have to know its bandwidth. How to >estimate the 99% bandwidth? Need to do this as fast as possible. > >My constraints: > >(1) I don't have the closed-form of x(t), its point-wise evaluation is
very
>prohibitive and costly; >(2) Doing the trial and error(first do a rough FFT and then do a second
FFT
>with an increased number of samples, and then compare the two spectrum,
to
>decide how to further adjust the number of samples) is not a wise
approach,
>because this procedure has to be repeated in a loop for millions of
times;
>also there isno way to automatically and programatically decide if the >spectrum needs further refinement or not. That's to say, there is no
single
>indictor of spectrum quality that can alert the program and help the
program
>to decide whether a further increase of the sampling points is needed or
>not. This has to be done automatically and programmatically within the >program itself without human eye-inspection. > >---------------------- > >Problem 2: > >Given a number B, estimate how much percentage of energy is contained in
the
>spectrum band in range [-B, B], of signal x(t). Need to do this the
fastest
>way. > >The constraints are the same as above. > >Any smart ideas of how to handle this? > >Thanks! > > > >
Is x(t) a random signal? Is it stationary? How about the auto-correlation function? How about the power density function? Do you know anything that can reveal the nature of the signal in any sense? If not in closed form, you'd at least look at its statistical properties. LBB _____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ?
On May 28, 9:43 pm, "Vista" <a...@gmai.com> wrote:
> Hi all, > > My previous problems are still unsolved. > > Problem 1: > > In order to sample signal x(t), I have to know its bandwidth. How to > estimate the 99% bandwidth? Need to do this as fast as possible. > > My constraints: > > (1) I don't have the closed-form of x(t), its point-wise evaluation is very > prohibitive and costly;
I think you need to know something about the signal's closed-form. Otherwise you could be dealing with one of those pathological functions where sampling would tell you absolutely nothing (e.g. x(t) = 0 for all rational t, and something else for all irrational t, etc.) Perhaps you know something about continuity, or even the continuity and boundedness of the derivatives of x(t)? IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
"Vista" <abc@gmai.com> wrote in message 
news:f3gb24$d9t$1@news.Stanford.EDU...
> Hi all, > > My previous problems are still unsolved.
LOL! Life is like that sometimes.
> > Problem 1: > > In order to sample signal x(t), I have to know its > bandwidth. How to estimate the 99% bandwidth? Need to do > this as fast as possible.
No. You need to estimate the highest frequency where the signal is indistinguishable from the noise, or, if there is no noise, where the signal has lower amplitude than the lowest quantization level.
> > My constraints: > > (1) I don't have the closed-form of x(t), its point-wise > evaluation is very prohibitive and costly;
This is no different from an engineering situation where you fly an airplane around recording stuff and then bring the recordings back for off-line analysis.
> (2) Doing the trial and error(first do a rough FFT and > then do a second FFT with an increased number of samples, > and then compare the two spectrum, to decide how to > further adjust the number of samples) is not a wise > approach,
You're right; it probably isn't a wise approach. So don't do that.
> because this procedure has to be repeated in a loop for > millions of times; also there isno way to automatically > and programatically decide if the spectrum needs further > refinement or not. That's to say, there is no single > indictor of spectrum quality that can alert the program > and help the program to decide whether a further increase > of the sampling points is needed or not. This has to be > done automatically and programmatically within the program > itself without human eye-inspection.
Well, you seem very sure about this so I wouldn't want to challenge your assumptions. I will say that your assumptions would not prevent me from trying several things that have worked for me in the past.
On May 28, 11:43 pm, "Vista" <a...@gmai.com> wrote:
> Hi all, > > My previous problems are still unsolved. > > Problem 1: > > In order to sample signal x(t), I have to know its bandwidth. How to > estimate the 99% bandwidth? Need to do this as fast as possible. >
You can use Parseval's relation. Recall that the Fourier transform is unitary, hence it preserves energy. Make a lowpass filter in analog with bandwidth B. Make sure that the gain of the filter is adjusted. Compare the energy at the output with the energy at the input. If unhappy with result, increase B. Does that help? Julius
Vista wrote:
> Hi all, > > My previous problems are still unsolved. > > Problem 1: > > In order to sample signal x(t), I have to know its bandwidth. How to > estimate the 99% bandwidth? Need to do this as fast as possible. > > My constraints: > > (1) I don't have the closed-form of x(t), its point-wise evaluation is very > prohibitive and costly; > (2) Doing the trial and error(first do a rough FFT and then do a second FFT > with an increased number of samples, and then compare the two spectrum, to > decide how to further adjust the number of samples) is not a wise approach, > because this procedure has to be repeated in a loop for millions of times;
The procedure gets simpler each time you do it. Having found the minimum sample rate *so far*, you need never test lower ones.
> also there isno way to automatically and programatically decide if the > spectrum needs further refinement or not. That's to say, there is no single > indictor of spectrum quality that can alert the program and help the program > to decide whether a further increase of the sampling points is needed or > not. This has to be done automatically and programmatically within the > program itself without human eye-inspection.
You are, if I understand previous posts, solving an ordinary differential equation numerically. Unless there is a novel approach I'm unaware of, your solver uses a step size for the independent variable. *That size is necessary sample period.* It may be adaptively variable, but you can nevertheless record the smallest case. Use that.
> ---------------------- > > Problem 2: > > Given a number B, estimate how much percentage of energy is contained in the > spectrum band in range [-B, B], of signal x(t). Need to do this the fastest > way.
Do an FFT and evaluate the spectrum.
> The constraints are the same as above. > > Any smart ideas of how to handle this?
Get a /very/ fast processor. Get Steve Gibson <www.grc.com/> to show you how do do it in assembly. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
"Jerry Avins" <jya@ieee.org> wrote in message 
news:3MSdnRIbzpsMpMHbnZ2dnUVZ_oOknZ2d@rcn.net...
> Vista wrote: >> Hi all, >> >> My previous problems are still unsolved. >> >> Problem 1: >> >> In order to sample signal x(t), I have to know its bandwidth. How to >> estimate the 99% bandwidth? Need to do this as fast as possible. >> >> My constraints: >> >> (1) I don't have the closed-form of x(t), its point-wise evaluation is >> very prohibitive and costly; >> (2) Doing the trial and error(first do a rough FFT and then do a second >> FFT with an increased number of samples, and then compare the two >> spectrum, to decide how to further adjust the number of samples) is not a >> wise approach, because this procedure has to be repeated in a loop for >> millions of times; > > The procedure gets simpler each time you do it. Having found the minimum > sample rate *so far*, you need never test lower ones. > >> also there isno way to automatically and programatically decide if the >> spectrum needs further refinement or not. That's to say, there is no >> single indictor of spectrum quality that can alert the program and help >> the program to decide whether a further increase of the sampling points >> is needed or not. This has to be done automatically and programmatically >> within the program itself without human eye-inspection. > > You are, if I understand previous posts, solving an ordinary differential > equation numerically. Unless there is a novel approach I'm unaware of, > your solver uses a step size for the independent variable. *That size is > necessary sample period.* It may be adaptively variable, but you can > nevertheless record the smallest case. Use that. > >
Thanks Jerry. My ODE is on another variable, which is not the variable t. But now I am taking FT w.r.t. variable t... I guess the stepsize on another variable will not help the FT w.r.t. variable t....
>> ---------------------- >> >> Problem 2: >> >> Given a number B, estimate how much percentage of energy is contained in >> the spectrum band in range [-B, B], of signal x(t). Need to do this the >> fastest way. > > Do an FFT and evaluate the spectrum. > >> The constraints are the same as above. >> >> Any smart ideas of how to handle this? > > Get a /very/ fast processor. Get Steve Gibson <www.grc.com/> to show you > how do do it in assembly. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Vista wrote:
> "Jerry Avins" <jya@ieee.org> wrote in message > news:3MSdnRIbzpsMpMHbnZ2dnUVZ_oOknZ2d@rcn.net... >> Vista wrote: >>> Hi all, >>> >>> My previous problems are still unsolved. >>> >>> Problem 1: >>> >>> In order to sample signal x(t), I have to know its bandwidth. How to >>> estimate the 99% bandwidth? Need to do this as fast as possible. >>> >>> My constraints: >>> >>> (1) I don't have the closed-form of x(t), its point-wise evaluation is >>> very prohibitive and costly; >>> (2) Doing the trial and error(first do a rough FFT and then do a second >>> FFT with an increased number of samples, and then compare the two >>> spectrum, to decide how to further adjust the number of samples) is not a >>> wise approach, because this procedure has to be repeated in a loop for >>> millions of times; >> The procedure gets simpler each time you do it. Having found the minimum >> sample rate *so far*, you need never test lower ones. >> >>> also there isno way to automatically and programatically decide if the >>> spectrum needs further refinement or not. That's to say, there is no >>> single indictor of spectrum quality that can alert the program and help >>> the program to decide whether a further increase of the sampling points >>> is needed or not. This has to be done automatically and programmatically >>> within the program itself without human eye-inspection. >> You are, if I understand previous posts, solving an ordinary differential >> equation numerically. Unless there is a novel approach I'm unaware of, >> your solver uses a step size for the independent variable. *That size is >> necessary sample period.* It may be adaptively variable, but you can >> nevertheless record the smallest case. Use that. >> >> > > Thanks Jerry. My ODE is on another variable, which is not the variable t. > But now I am taking FT w.r.t. variable t... > > I guess the stepsize on another variable will not help the FT w.r.t. > variable t....
If you want the FFT, you must be interested in the time behavior. If so, you would do well to recast your ODE in terms of t, even if that needs to be done parametrically. Things might come clearer if you work directly in time. ... Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
On 29 May, 18:33, "Vista" <a...@gmai.com> wrote:
> "Jerry Avins" <j...@ieee.org> wrote in message > > news:3MSdnRIbzpsMpMHbnZ2dnUVZ_oOknZ2d@rcn.net... > > > > > > > Vista wrote: > >> Hi all, > > >> My previous problems are still unsolved. > > >> Problem 1: > > >> In order to sample signal x(t), I have to know its bandwidth. How to > >> estimate the 99% bandwidth? Need to do this as fast as possible. > > >> My constraints: > > >> (1) I don't have the closed-form of x(t), its point-wise evaluation is > >> very prohibitive and costly; > >> (2) Doing the trial and error(first do a rough FFT and then do a second > >> FFT with an increased number of samples, and then compare the two > >> spectrum, to decide how to further adjust the number of samples) is not a > >> wise approach, because this procedure has to be repeated in a loop for > >> millions of times; > > > The procedure gets simpler each time you do it. Having found the minimum > > sample rate *so far*, you need never test lower ones. > > >> also there isno way to automatically and programatically decide if the > >> spectrum needs further refinement or not. That's to say, there is no > >> single indictor of spectrum quality that can alert the program and help > >> the program to decide whether a further increase of the sampling points > >> is needed or not. This has to be done automatically and programmatically > >> within the program itself without human eye-inspection. > > > You are, if I understand previous posts, solving an ordinary differential > > equation numerically. Unless there is a novel approach I'm unaware of, > > your solver uses a step size for the independent variable. *That size is > > necessary sample period.* It may be adaptively variable, but you can > > nevertheless record the smallest case. Use that. > > Thanks Jerry. My ODE is on another variable, which is not the variable t. > But now I am taking FT w.r.t. variable t... > > I guess the stepsize on another variable will not help the FT w.r.t. > variable t....
Wait a minute. You have an "ODE" with *two* variables? You solve it with respect to some yet unspecified variable but compute the DFT with respct to time? Chances are that the differential equation is not "Ordinary" ("O" in "ODE"), but a partial differntial equation, PDE. There are standard ways of dealing with that sort of thing. Scan the textbooks and see if your problem already has been solved. If you remain persitant in doing things your own way, Jerry's suggestion that you log the step sizes used by your _O_DE solver and use the smalles tones as your sampling frequency, is probably the easiest to compute numerically, and also the safest one. Rune
Vista wrote:
> Hi all, > > My previous problems are still unsolved. > > Problem 1: > > In order to sample signal x(t), I have to know its bandwidth. How to > estimate the 99% bandwidth? Need to do this as fast as possible. > > My constraints: > > (1) I don't have the closed-form of x(t), its point-wise evaluation is very > prohibitive and costly; > (2) Doing the trial and error(first do a rough FFT and then do a second FFT > with an increased number of samples, and then compare the two spectrum, to > decide how to further adjust the number of samples) is not a wise approach, > because this procedure has to be repeated in a loop for millions of times; > also there is no way to automatically and programatically decide if the > spectrum needs further refinement or not. That's to say, there is no single > indicator of spectrum quality that can alert the program and help the program > to decide whether a further increase of the sampling points is needed or > not. This has to be done automatically and programmatically within the > program itself without human eye-inspection.
I've said this in a different post, I'll reiterate it here: Given the problem _as you have formulated it_, you're screwed. Instead of asking the same question over and over again, with more strident protestations of urgency, you need to change your approach. You need to tell us more about x(t). You make it sound like it's totally unknown and unknowable. If this is true, you're screwed. So you'd better either figure out what _is_ known about it, or you'd better brush up your resume. You don't have a closed form for x(t) -- how are you finding it? Do you know anything about it's derivatives? The behavior of x and it's first few derivatives will tell you a _lot_ about its bandwidth, if you engage your brain. Is x(t) analytical? How do you know? If it's not closed form and it has no physical meaning, who the hell cares about it anyway? It must have some connection to real life or you'd be out spending your time doing something else, and no one would be leaning on you for the "as fast as possible". So please tell us how it relates to real life. Finally, very few people on newsgroups care about your sense of urgency. I'll be happy to climb into your hurry, but not here and not for free. As long as it doesn't involve fraud or illegal weapons I'll happily do the work for you, in a hurry, and charge you my regular rate. There are other folks here who will do the same.
> ---------------------- > > Problem 2: > > Given a number B, estimate how much percentage of energy is contained in the > spectrum band in range [-B, B], of signal x(t). Need to do this the fastest > way. > > The constraints are the same as above. >
We've told you already. Parseval's theorem. Compare the integral of (x(t))^2 over time with the integral of the square of the filtered version over time, or with the total energy in the FFT. If you rejoin that no one knows squat about x(t) and never can, then we're back to you being screwed. If that's the case then you need to either cough up more information about x(t) or brush up your resume. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html