DSPRelated.com
Forums

integration of a continuous function

Started by Alex_001 February 23, 2009
clay@claysturner.com wrote:
(snip)

> Hopefully the OP's system is not critically sampled, because then all > sorts of problems show up such as in your example with the sampling on > or near the zero crossings.
The OP said "close to the Nyquist rate." The closer you get, the harder it is to get the right answer, but it shouldn't be so hard. Integration normally averages out noise, so normally the results are better than the data going in. That is unlike differentiation which increases noise. -- glen
On Feb 24, 5:59&#4294967295;pm, Glen Herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> c...@claysturner.com wrote: > > (snip) > > > Hopefully the OP's system is not critically sampled, because then all > > sorts of problems show up such as in your example with the sampling on > > or near the zero crossings. > > The OP said "close to the Nyquist rate." &#4294967295; The closer you get, > the harder it is to get the right answer, but it shouldn't be so hard. > > Integration normally averages out noise, so normally the > results are better than the data going in. &#4294967295;That is unlike > differentiation which increases noise. > > -- glen
That was basically what I was getting without being real clear. Does he need an exact (nearly so) integration or just a lowpass filter funtion? I guess I missed the part where he was close to the Nyquist rate. One doesn't want to design one's self into a corner. Clay
On Feb 24, 11:24&#4294967295;pm, jim <".sjedgingN0sp"@m...@mwt.net> wrote:
> illywhacker wrote: > > > On Feb 24, 8:11 pm, "Alex_001" <a.bast...@email.it> wrote: > > > >What could be simpler then a moving average filter? > > > > it's not what we need..our acquisitions &#4294967295;are on a 5 ms windows at > > > different time instants (when particoular events occur) > > > > >Extra knowledge is harmful to the idiots. > > > > not everybody can spend all his time reading posts and insulting > > > people..someone has also to work. > > > > >"Matlab does all thinking for us" (TM) > > > > what I need is EXACTLY a cookbook solution...I am not a geniuos like you. > > > (and I cited Matlab just as an example). > > > > what's the problem with you man? > > > Chill out! > > > Don't worry Alex. Genius is a long way from what Vladimir is. > > > On the other hand, Jim's suggestion is relevant. The reconstruction > > theorem as stated only applies if sampling is really by delta > > functions which it never is. Presumably what you really want is the > > integral of the force itself, isn't it? You could get much better > > results if you knew more details about the sensor, the filtering, and > > the sampling. > > That was not really my point. He doesn't want the integral of force. Force is > just an abstract concept here so is integration. Movement in space is what > produces a voltage.
Is he not using a piezoelectric sensor, i.e. one that generates a voltage when deformed? This deformation can be produced by a number of effects depending on how the sensor is set up, acceleration being one, applied pressure being another. Since the OP mentions 'force', I assume it is the latter rather than the former. Did I miss something?
> &#4294967295;The amount of voltage output for a given displacement > depends on the frequency at which that dispacement occurs. &#4294967295; &#4294967295; &#4294967295; > The sensor is essentially a filter with a certain frequency response. That > means you move the sensor in space at certain frequencies and it attenuates > those frequencies in a predictable way. It just acts as a linear filter. The > frequency response &#4294967295;of this filter just happens to be very close to proportional > to the square of the frequency. But it isn't exact. For example, just loosening > or tightening the mounting bolt(s) on this type of sensor can change the > frequency response curve. > &#4294967295; &#4294967295; &#4294967295; &#4294967295; If the sensor is mounted in the manner the manufacturer designed it to be and > and the movement in space driving it is at frequencies within a certain band you > can do simple double numerical integration and get an output that follows the > input movement simply because you are applying a filter to the data that happens > to be very close to the exact inverse of the sensor's frequency response and > thus the output is close to a flat response to the input. But in a real > situation it often won't work so nicely because the mounting is not ideal or the > input motion is not strictly limited to those frequencies at which the sensor > has a simple response curve.
Thanks for the lesson, Jim, but these are trivialities. But if he wants the applied pressure then there is no need to do doubly integrate. What produces this applied pressure, and why he might want to integrate that I have no idea. illywhacker;
On Feb 24, 11:03&#4294967295;pm, c...@claysturner.com wrote:
> On Feb 24, 4:10&#4294967295;pm, illywhacker <illywac...@gmail.com> wrote: > > > > > On Feb 24, 8:11&#4294967295;pm, "Alex_001" <a.bast...@email.it> wrote: > > > > >What could be simpler then a moving average filter? > > > > it's not what we need..our acquisitions &#4294967295;are on a 5 ms windows at > > > different time instants (when particoular events occur) > > > > >Extra knowledge is harmful to the idiots. > > > > not everybody can spend all his time reading posts and insulting > > > people..someone has also to work. > > > > >"Matlab does all thinking for us" (TM) > > > > what I need is EXACTLY a cookbook solution...I am not a geniuos like you. > > > (and I cited Matlab just as an example). > > > > what's the problem with you man? > > > Chill out! > > > Don't worry Alex. Genius is a long way from what Vladimir is. > > > On the other hand, Jim's suggestion is relevant. The reconstruction > > theorem as stated only applies if sampling is really by delta > > functions which it never is. Presumably what you really want is the > > integral of the force itself, isn't it? You could get much better > > results if you knew more details about the sensor, the filtering, and > > the sampling. > > > illywhacker;- Hide quoted text - > > > - Show quoted text - > > I guess the question is whether the OP is really trying to calculate > the impulse (momentum transfer)? This usually shows up in situations > where you have a very strong force that exists for a brief period of > time. Thus you talk about f.delta t as a single quantity. But if you > are actually measuring the force and then integrating it over time, > you are clearly resolving f(t). I suspect the integration is used for > a lowpass smoothing operation. Maybe the OP can let us know why he > wants to integrate the force.
Yes - that would be a good idea. illywhacker;

illywhacker wrote:
> > On Feb 24, 11:24 pm, jim <".sjedgingN0sp"@m...@mwt.net> wrote: > > illywhacker wrote: > > > > > On Feb 24, 8:11 pm, "Alex_001" <a.bast...@email.it> wrote: > > > > >What could be simpler then a moving average filter? > > > > > > it's not what we need..our acquisitions are on a 5 ms windows at > > > > different time instants (when particoular events occur) > > > > > > >Extra knowledge is harmful to the idiots. > > > > > > not everybody can spend all his time reading posts and insulting > > > > people..someone has also to work. > > > > > > >"Matlab does all thinking for us" (TM) > > > > > > what I need is EXACTLY a cookbook solution...I am not a geniuos like you. > > > > (and I cited Matlab just as an example). > > > > > > what's the problem with you man? > > > > Chill out! > > > > > Don't worry Alex. Genius is a long way from what Vladimir is. > > > > > On the other hand, Jim's suggestion is relevant. The reconstruction > > > theorem as stated only applies if sampling is really by delta > > > functions which it never is. Presumably what you really want is the > > > integral of the force itself, isn't it? You could get much better > > > results if you knew more details about the sensor, the filtering, and > > > the sampling. > > > > That was not really my point. He doesn't want the integral of force. Force is > > just an abstract concept here so is integration. Movement in space is what > > produces a voltage. > > Is he not using a piezoelectric sensor, i.e. one that generates a > voltage when deformed? This deformation can be produced by a number of > effects depending on how the sensor is set up, acceleration being one, > applied pressure being another. Since the OP mentions 'force', I > assume it is the latter rather than the former. Did I miss something?
No you didn't miss that. I was thinking he said acceleration but you are correct he said force. But the concept of force and acceleration are just abstract concepts (they exist in your head but not in reality). In order for a voltage to be produced their needs to be motion. Without motion there is no voltage. Obviously since the device is rigid and fixed and going nowhere that motion needs to be oscillating. As long as that oscillating motion stays with in certain frequency range then he can call the output "force" because the sensor device filters the signal that motion produces in a way that very closely matches that concept of force you have stuck in your head. Numerical integration is also just an abstraction. What it is really is a filter that has a frequency response similar to the frequency response of integration of a continuous function. The important part of the frequency response of summing the samples (moving average filter) is actually 1/sin(f) not 1/f, but since sin(f)=f when f is near zero this isn't a problem when the signal is sufficiently oversampled.
> > > The amount of voltage output for a given displacement > > depends on the frequency at which that dispacement occurs. > > The sensor is essentially a filter with a certain frequency response. That > > means you move the sensor in space at certain frequencies and it attenuates > > those frequencies in a predictable way. It just acts as a linear filter. The > > frequency response of this filter just happens to be very close to proportional > > to the square of the frequency. But it isn't exact. For example, just loosening > > or tightening the mounting bolt(s) on this type of sensor can change the > > frequency response curve. > > If the sensor is mounted in the manner the manufacturer designed it to be and > > and the movement in space driving it is at frequencies within a certain band you > > can do simple double numerical integration and get an output that follows the > > input movement simply because you are applying a filter to the data that happens > > to be very close to the exact inverse of the sensor's frequency response and > > thus the output is close to a flat response to the input. But in a real > > situation it often won't work so nicely because the mounting is not ideal or the > > input motion is not strictly limited to those frequencies at which the sensor > > has a simple response curve. > > Thanks for the lesson, Jim, but these are trivialities. But if he > wants the applied pressure then there is no need to do doubly > integrate. What produces this applied pressure, and why he might want > to integrate that I have no idea.
The reason he wants to integrate seems obvious -> he wants to recover the original signal. I.E. he wants to recover the original continuous signal that was producing the voltage. What isn't obvious are what the circumstances are that are causing him to believe he isn't getting an accurate output that closely matches the input motion. -jim
> > illywhacker;
On Feb 25, 2:57 pm, jim <".sjedgingN0sp"@m...@mwt.net> wrote:
> illywhacker wrote: > > > On Feb 24, 11:24 pm, jim <".sjedgingN0sp"@m...@mwt.net> wrote: > > > > > That was not really my point. He doesn't want the integral of force. Force is > > > just an abstract concept here so is integration. Movement in space is what > > > produces a voltage. > > > Is he not using a piezoelectric sensor, i.e. one that generates a > > voltage when deformed? This deformation can be produced by a number of > > effects depending on how the sensor is set up, acceleration being one, > > applied pressure being another. Since the OP mentions 'force', I > > assume it is the latter rather than the former. Did I miss something? > > No you didn't miss that. I was thinking he said acceleration but you are correct > he said force. > > But the concept of force and acceleration are just abstract concepts (they > exist in your head but not in reality). In order for a voltage to be produced > their needs to be motion. Without motion there is no voltage. Obviously since > the device is rigid and fixed and going nowhere that motion needs to be > oscillating. As long as that oscillating motion stays with in certain frequency > range then he can call the output "force" because the sensor device filters the > signal that motion produces in a way that very closely matches that concept of > force you have stuck in your head. > Numerical integration is also just an abstraction. What it is really is a > filter that has a frequency response similar to the frequency response of > integration of a continuous function. The important part of the frequency > response of summing the samples (moving average filter) is actually 1/sin(f) not > 1/f, but since sin(f)=f when f is near zero this isn't a problem when the signal > is sufficiently oversampled.
Jim, I do not know why you feel obliged to try to explain to me trivial linear algebra things that you learned in your electrical engineering courses, along with snippets of sophomoric philosophy, but it is beginning to irritate me. Before you start using words like 'exist', you should define them as their meaning is not invariant to context. Motion is an abstraction too.
> The reason he wants to integrate seems obvious -> he wants to recover the > original signal. I.E. he wants to recover the original continuous signal that > was producing the voltage. What isn't obvious are what the circumstances are > that are causing him to believe he isn't getting an accurate output that closely > matches the input motion.
Why would he want to integrate to do this? As far as I know, he did not talk about a moving average filter. He is integrating, that is, inverse differentiating. illywhacker;

illywhacker wrote:

> > is sufficiently oversampled. > > Jim, I do not know why you feel obliged to try to explain to me
I didn't feel obliged not even a little bit. You asked me a question. Now your whining because I chose to provide a response.
> Why would he want to integrate to do this? As far as I know, he did > not talk about a moving > average filter. He is integrating, that is, inverse differentiating.
No you are right. I have very little information on what he has tried or why he thinks what he has tried didn't work. But you want him to invent a continuous function so that he can do some math on that. Which frankly, in view of what little info he has revealed, IMO is just plain silly. -jim
On Feb 25, 4:12&#4294967295;pm, jim <".sjedgingN0sp"@m...@mwt.net> wrote:
> illywhacker wrote: > > > is sufficiently oversampled. > > > Jim, I do not know why you feel obliged to try to explain to me > > I didn't feel obliged not even a little bit. &#4294967295;You asked me a question. Now your > whining because I chose to provide a response.
No Jim. You answered my question 'Did I miss something?' when you said 'No you didn't miss that. I was thinking he said acceleration but you are correct'. After that, you launched into a couple of paragraphs telling me of trivialities. It is beginning to appear, Jim, that you do not read all that carefully.
> > Why would he want to integrate to do this? As far as I know, he did > > not talk about a moving > > average filter. He is integrating, that is, inverse differentiating. > > No you are right. I have very little information on what he has tried or why he > thinks what he has tried didn't work. But you want him to invent a continuous > function so that he can do some math on that. Which frankly, in view of what > little info he has revealed, IMO is just plain silly.
Since he mentioned by implication the Shannon sampling theorem, I answered him in that vein. Perhaps it was premature. But at least I had *some* idea of what he was talking about, as opposed to reading things that just were not there. illywhacker;

illywhacker wrote:
> > On Feb 25, 4:12 pm, jim <".sjedgingN0sp"@m...@mwt.net> wrote: > > illywhacker wrote: > > > > is sufficiently oversampled. > > > > > Jim, I do not know why you feel obliged to try to explain to me > > > > I didn't feel obliged not even a little bit. You asked me a question. Now your > > whining because I chose to provide a response. > > No Jim. You answered my question 'Did I miss something?'
OK so in the future if you ask again you only want to hear about the parts you didn't miss. Right? I'll make a note. -jim
On Feb 25, 4:31 pm, jim <".sjedgingN0sp"@m...@mwt.net> wrote:
> illywhacker wrote: > > > On Feb 25, 4:12 pm, jim <".sjedgingN0sp"@m...@mwt.net> wrote: > > > illywhacker wrote: > > > > > is sufficiently oversampled. > > > > > Jim, I do not know why you feel obliged to try to explain to me > > > > I didn't feel obliged not even a little bit. You asked me a question. Now your > > > whining because I chose to provide a response. > > > No Jim. You answered my question 'Did I miss something?' > > OK so in the future if you ask again you only want to hear about the parts you > didn't miss. Right? I'll make a note.
Jim, Jim: that was the only question I asked. It was rhetorical, but I guess your reading skills are not up to detecting that. I knew I had not missed anything and that it was you that had failed to read carefully enough. However, even if we take the question straight, it was not out of the blue as you have chosen to quote it. It referred only to the nature of piezoelectric sensors and not to the ontological status of force nor to first-year linear algebra. And even it had referred to those things, your answers were amateurish at best. Look again at the post. And try to pay more attention. illywhacker;