Compute Wave Form Average: Algorithm Help Needed

  • Thread starter Thread starter last_to_go
  • Start date Start date
  • Tags Tags
    Average Form Wave
last_to_go
Messages
3
Reaction score
0

Homework Statement



My son is working on a school-related project. He is being asked how to compute the average of both systolic and diastolic (heart rate) values. The assignment eludes to averaging measurements over an entire wave form (visualize a heart rate monitor you'd see on ER). The systolic values would be the peak values on a graph whereas the distolic values would be the non-peak values. He needs to be able to disregard minor blips between the actual high and low values. What type of formula/algorithm would work for determining the average of these wave forms?

Homework Equations



I am sorry, I don't have anything to provide.

The Attempt at a Solution



My son has created an algorithm within his computer model, but it doesn't identify and disregard the "blips" that occur inbetween the actual high and low values.

Any help with this would be appreciated...I am simply attempting to help my son while he catches up on some sleep...he's been working for hours/days on his program. Thank you!
 
Physics news on Phys.org
Welcome to Physics Forums!

I think I have a method your son could implement to isolate the high and low points out of the rest of the curve, although I can only explain the mathematics of it, hopefully he will see how to program it, it should be pretty straight forward:

Basically we will be using the idea of the derivative, which is the value of the gradient of the tangent to the curve at a point. More information is easily found on derivatives on the internet. Basically its value at a point x=a on the curve y= f(x) is calculated by:

f'(a) = \lim_{h\to 0} \frac{ f(a+h) - f(a)}{h}

where f'(a) denotes the derivative of f(x) at x=a. The "lim of h to 0" part basically means make h a very small number. Something effective enough for this purpose should be f'(a) = \frac{f(a+ 0.0000001) - f(a)}{0.0000001}.

You can easily imagine that if we drew the tangent at a peak point on the curves, it will be a horizontal line. In other words, its tangent will be zero.

So basically your son can isolate those points on the curve by specifying he only wants the points where the derivative is equal to zero.

I hope that helps!
 
Thank you for your suggestion. I will print it out and show it to him. He attends a local college in MN and has been working on a summer project to display heart pressure readings on a person's cell phone...a bit beyond my comprehension, however I was doing my own research for him on the internet and couldn't focus on the best approach (a bit beyond my comprehension level...I kept getting diverted to RMS calculations...). He's been very diligent in working on the overall solution all summer outside of his summer job (burning the midnight oil). I do appreciate your response. Have a great weekend!
 
I wanted to get back to the person that assisted me with my question. My son did complete his project earlier this year and recently learned that he placed 2nd in the development contest. Not too bad for an entering Sophmore if I may say (parent, of course). Although I'm not sure he used your advice I am certain that all input was helpful and definitely appreciated. And, from his father, thank you for your help.

Tom
 
Oh that was me! I wouldn't mind knowing it anything I suggested to him was used lol. Good work on 2nd place! 1st next time I'm sure =]
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top