Discussion:
Looking to understand (and calculate) work and power from force-length plots
(too old to reply)
Math Dude
2015-06-26 02:49:17 UTC
Permalink
Raw Message
I have some numerically sampled data from a system that generates
cyclical force - length loops.

Such a system seems to be characterized well enough here:

https://en.wikipedia.org/wiki/Work_loop

I want to seperately determine any negative and positive work being done
per cycle. If the force-length loop for a given cycle does not cross
itself, then if the loop has a counter-clock-wise direction then the
work will be positive, and vice-versa for a clock-wise direction.

If the loop crosses itself, then the cycle will contain both negative
and positive work. The animated graph on the above page shows a
sequence of loops, where the red area indicates positive work and blue
is negative.

The first method for computing power and work is stated as follows:

=================
Method 1: Instantaneous power method[edit]

Step 1) Obtain muscle velocity by numerical differentiation of muscle
length data.

Step 2) Obtain instantaneous muscle power by multiplying muscle force
data by muscle velocity data for each time sample.

Step 3) Obtain net work (a single number) by numerical integration of
muscle power data.

Step 4) Obtain net power (a single number) by dividing net work by the
time duration of the cycle.
==================

I simulated a complex loop by mathematically generating one cycle of a
figure-8 (rotated 90 degrees and shifted fully into the positive X-Y
quadrant). The cycle is then composed of the lower loop and upper loop
- one loop has a clockwise direction, the other a counter-clockwise
direction.

Numerically computing the derivative for the X axis (representing
length) to give velocity, and then multiplying by the Y-axis value will
result in a negative result for part of both the upper and lower loops.
This would indicate or imply that during the counter-clock-wise loop (a
loop that is producing work or power) that some of the instantaneous
power results will be negative. If so, then getting a negative
instantaneous power result does not tell me that I am working with that
portion of the loop that is rotating clockwise (ie - the negative loop).

Is there a straight-forward way to take a time-series f(t) and l(t)
where f is force at time t, l is length at time t, from t1 to t2, and
process the series in such a way that I can obtain either the area of
any number of loops that emerge from the path taken by the data (or just
the sum of all clockwise areas and the sum of all counter-clock-wise
areas) without manually determining where in time each loop begins/ends
and the direction of the loop, or

Is there a straight forward way to perform the instantaneous power
method and arrive at the same result - to have a sum total of all
positive work and all negative work per cycle, given a loop with a
complex path that might cross itself one or more times?
James Waldby
2015-06-28 05:42:54 UTC
Permalink
Raw Message
(Set followup to sci.math)
Post by Math Dude
I have some numerically sampled data from a system that generates
cyclical force - length loops.
https://en.wikipedia.org/wiki/Work_loop
(big snip)
Post by Math Dude
Is there a straight-forward way to [...] obtain either the area of
any number of loops [...] without manually determining where in time
each loop begins/ends and the direction of the loop, or
Is there a straight forward way to [...] have a sum total of all
positive work and all negative work per cycle, given a loop with a
complex path that might cross itself one or more times?
In following, suppose the complex path is represented by an
ordered list of n+1 points, P0, P1, P2, ... Pn, P0, or by
an ordered list of n line segments, S1, ... Sn such that Si
spans from P_(i-1) to P_i. Also suppose P0(x) < Pi(x) if i>0
ie suppose P0 is the leftmost point.

Step 1. Finding the left-most crossing point:
<http://www.cs.arizona.edu/classes/cs445/spring07/cg.prn.pdf>
(pages 2 to 4) shows a fairly standard vertical-sweep-line
algorithm for this that runs in O(n lg n) time, where n is the
number of line segments that form the complex path.

You could also use an O(n^2) method for finding intersections,
for ease of programming. It might be good enough if your data
sets are small or few in number, or if you have an ok computer.

Step 2. Checking direction of the loop:
Suppose the first crossing is at xc and Si is the first boundary
segment whose x-interval includes xc. (Ie, none of S1 ... S_(i-1)
cross the line x=xc, while Si crosses it.) Let Sj be the last
such segment. The first loop's area sense is positive
if P_(i-1)(x) < Pi(x), else negative.

Step 3. Area of the left-most loop:
Let C = (xc, yc) represent the point where Si and Sj cross.
Apply Gauss's area formula to { P0, ... P_(i-1), C, Pj, ...
Pn } as in <https://en.wikipedia.org/wiki/Shoelace_formula>.

Step 4. Remove points { P0, ... P_(i-1), Pj, ... Pn } from your
data, add point C as the first point, and repeat the process.
--
jiw
Loading...