Embodiments of the present disclosure relate generally to estimating the power usage of a body in motion and more particularly to estimating power usage based on a trajectory.
Understanding how power is used to propel a body in motion (e.g., to move people and objects) is useful in a variety of applications. For example, in the case of human- or animal-powered motion (e.g., walking, running, galloping, bicycling, skating, etc.), tracking power usage may be used for applications such as improving the performance of athletes, assisting in the rehabilitation of medical patients, studying the behavior of animals, and/or the like. Similarly, in the case of mechanically powered motion (e.g., the propulsion of cars, boats, airplanes, etc.), tracking power usage may be used for purposes including enhancing the speed and fuel efficiency of vehicles.
Accordingly, it is desirable to develop improved techniques for tracking the power usage of a body in motion.
Competitive athletes, such as racers (e.g., bicycle racers, speed skaters, marathon runners, etc.), are an illustrative group of individuals that may generally be interested in tracking power usage. Parties that may seek to monitor power usage information include the athletes themselves, their coaches, and other members of the athletic team. For example, muscle power usage, possibly in combination with other physiological information (e.g., heart rate information), may be used to develop improved training regimens and racing strategies. Similarly, fans and other enthusiasts of competitive racing may seek deeper engagement in the sport by monitoring power usage information. For example, fans and recreational athletes may enjoy learning how top racers conserve or exert energy at various points in a race.
Before, during, and after competitions, competitive athletes may employ various strategies and tactics based on muscle fatigue. During a bicycle race, for instance, riders are often concerned with the timing of breakaways, e.g., when a sprinter or group of riders should break away from the peloton to maximize the likelihood of success. Whether or not the peloton is able to catch the breakaway group may hinge on the relative muscle fatigue of the racers in each group. Accordingly, riders, coaches, observers, and others may be interested in monitoring the muscle power usage of the racers throughout the race to evaluate the likelihood that the peloton will catch a given breakaway group.
In some cases, power usage may be measured directly using a power meter. For example, a bicycle (and other types of user-powered vehicles) may be equipped with a power meter that directly measures the power exerted on the pedals by the rider. However, dedicated power meters may be prohibitively bulky or expensive for some applications. For example, professional bicycle riders may prefer not to use dedicated power meters out of a desire to reduce the weight of their bicycles as much as possible during a competition. Meanwhile, recreational bicycle riders may be wary of the costs of dedicated power monitoring equipment. Moreover, access to data from dedicated power meters may be restricted, for example, to the rider's team members. Consequently, other interested parties (e.g., racing fans among the general public) may not have access to the power usage information from dedicated power meters.
Accordingly, it is desirable to develop improved techniques for monitoring power usage. In particular, it is desirable to develop techniques to predict power usage based on available data (e.g., publicly available location tracking data), rather than or in addition to directly measuring power usage using a dedicated power meter.
Location data 102 generally corresponds to data received from a location tracker associated with the body in motion. For example, location data 102 may be received from a wearable location tracker worn by a person (e.g., a walker, a runner, a bicycle rider, an ice skater, etc.) or an animal. Similarly, location data 102 may be received from a location tracker mounted to or included in an object or vehicle, such as a location tracker attached to a bicycle seat or a bicycle frame. In some embodiments, location data 102 may correspond to GPS data received from the location tracker. Additionally or alternately, location data 102 may be determined from image or video data, e.g., from a video camera capturing video from a race track, or from other suitable means of determining the location of a body in motion. In some embodiments, location data 102 may be retrieved from a publicly available source, e.g., from an Internet or television broadcaster of an athletic event.
Context data 104 generally corresponds to additional information associated with the person or object in motion that may be used to estimate the power usage. For example, context data 104 may include the wind speed and direction at the location of the body in motion, the altitude and slope at the location, the position of a racer relative to other racers in a cluster, the velocity of the body in motion (which may be derived from location data 102), and/or the like. Such data may be received from a variety of sources, including wind sensors, remote or local databases (e.g., digital maps), and/or the like.
As depicted in
Controller 110 may further include a memory 130 (e.g., one or more non-transitory memories). Memory 130 may include various types of short-term and/or long-term storage modules including cache memory, static random access memory (SRAM), dynamic random access memory (DRAM), non-volatile memory (NVM), flash memory, solid state drives (SSD), hard disk drives (HDD), optical storage media, magnetic tape, and/or the like. In some embodiments, memory 130 may store instructions that are executable by processor 120 to cause processor 120 to perform operations corresponding to processes disclosed herein and described in more detail below.
Processor 120 and/or memory 130 may be arranged in any suitable physical arrangement. In some embodiments, processor 120 and/or memory 130 may be implemented on a same board, in a same package (e.g., system-in-package), on a same chip (e.g., system-on-chip), and/or the like. In some embodiments, processor 120 and/or memory 130 may include distributed, virtualized, and/or containerized computing resources. Consistent with such embodiments, processor 120 and/or memory 130 (or portions thereof) may be located in one or more data centers and/or cloud computing facilities. Additionally or alternately, processor 120 and/or memory 130 (or portions thereof) may be implemented on a mobile device, such as mobile device of the person or object in motion (e.g., a bicycle rider).
In some embodiments, memory 130 may store a model 140 that is evaluated by processor 120 during the estimation of power usage 106. Model 140 may include a plurality of neural network layers. Examples of neural network layers include densely connected layers, convolutional layers, recurrent layers, pooling layers, dropout layers, and/or the like. In some embodiments, model 140 may include at least one hidden layer that is not directly connected to either an input or an output of the neural network. Model 140 may further include a plurality of model parameters (e.g., weights and/or biases) that are learned according to a machine learning process. Examples of machine learning processes include supervised learning, reinforcement learning, unsupervised learning, and/or the like. Embodiments of model 140 are described in further detail below with reference to
Model 140 may be stored in memory 130 using any number of files and/or data structures. As depicted in
Model 200 may include one or more programmed feature branches 210 that evaluate one or more programmed features 211-219 based on location data 202 and/or context data 204. In some embodiments, programmed features 211-219 may evaluate features known to be correlated with power usage 206 based on a priori knowledge, e.g., based on physics models.
In some embodiments, friction 211 may be evaluated based on the following equation:
P
f
=C
f
v
b
mg (Eq. 1)
Where Cf denotes a friction coefficient, vb denotes the velocity of the body in motion (e.g., a bicycle), m denotes the mass of the body in motion (e.g., the total mass of the bicycle and rider), and g denotes the standard gravity.
In some embodiments, wind resistance 212 may be evaluated based on the following equation:
P
w=½CdAρ(vb−vw)2 (Eq. 2)
Where Cd denotes a drag coefficient, A denotes the frontal cross-section area of the body in motion, ρ denotes the air density, and vw denotes the wind velocity.
In some embodiments, potential energy 213 may be evaluated based on the following equation:
Where ΔT denotes a duration of a sampling interval and Δh denotes the change in elevation of the body in motion between the beginning and end of the sampling interval.
In some embodiments, kinetic energy 219 may be evaluated based on the following equation:
Where vv denotes the velocity of the body in motion at the beginning of the sampling interval and vr, denotes the velocity of the body in motion at the end of the sampling interval.
Although standard values for the physical constants used in equations 1-4 (e.g., the friction coefficient, drag coefficient, air density, etc.) are available, using the standard values in model 200 may result in low accuracy due to various non-idealities (e.g., sensor calibration). Accordingly, one or more of the physical constants in equations 1-4 may be trainable parameters that are learned according to a machine learning process.
It is to be understood that programmed features 211-219 are merely illustrative, and that various additional or alternative features may be included in model 200. In some embodiments, various programmed features 211-219 may be included or excluded from model 200 based on application-specific empirical correlations. For example, in bicycle racing, it is empirically observed that wind resistance 212 is a dominant factor in the computation of power usage. It is further observed that the wind resistance encountered by a rider may vary significantly from the measured wind velocity in the vicinity of the rider based on the rider's position in a cluster of riders. For example, a rider in the second row of a cluster may encounter half the wind resistance of the riders in the front of the cluster. Accordingly, the position of a rider in a cluster may be included among programmed features 211-219 to improve the accuracy of model 200 in bicycle racing applications.
Model 200 may further include one or more learned feature branches 220 that evaluate one or more learned features 221-229 based on location data 202 and/or context data 204. Whereas programmed features 211-219 may generally be selected empirically or from physical models for power usage, learned features 221-229 correspond to feature representations that are determined by feature engineering. In this regard, learned features 221-229 may be evaluated using neural network models that are trained according to a machine learning process, as discussed in further detail below with reference to
Model 200 may also include an output stage 230 that evaluates power usage 206 based on representations (e.g., scalar or vector representations) of programmed features 211-219 and learned features 221-229. In some embodiments, output stage 230 may be evaluated using a regression model and/or a neural network model. For example, output stage 230 may be implemented using a decision tree-based regression model such as the random forest regression model or the XGBoost regression model. Although a variety of regression models may be used, the use of a tree-based regression model offers several advantages, including a flexible number of trees, high accuracy in situations where relatively little training data is available, and an explanatory structure that allows interpretation of the results. Tree-based regression models may also be used for latency-sensitive applications of model 200, such as real-time applications (e.g., during a sports event), where the latency associated with evaluating model 200 may be an important consideration. To illustrate, it may be desirable to predict the real-time power usage of each rider in a 200-rider bicycle race once per second. Accordingly, each prediction should be evaluated with an average latency of five milliseconds or less, a budget that includes latency associated with retrieving location data 202 and/or context data 204 (e.g., database retrieval). In such applications, tree-based regression models may achieve sufficiently low latency to satisfy the constraints.
In some embodiments, output stage 230 may be implemented using a recurrent neural network model, such as deep learning models based on stacked long short-term memory (LSTM) layers and/or gated recurrent units (GRUs). The use of a recurrent neural network may improve the accuracy of output layer 230 by detecting temporal relationships that affect power usage 206.
According to some embodiments, model 200 may correspond to a computational graph, in which case programmed feature branches 210, learned feature branches 220, and/or output stage 230 may correspond to collections of nodes in the computational graph. Consistent with such embodiments, various representations used by model 200, such as representations corresponding to location data 202, context data 204, programmed features 211-219, and/or learned features 221-229, and/or any intermediate representations used by model 200, may correspond to real-valued tensors (e.g., scalars, vectors, multidimensional arrays, and/or the like) that are passed along edges of the computational graph. Moreover, each node of the computation graph may perform one or more tensor operations, e.g., transforming one or more input representations of the node into one or more output representations of the node. Examples of tensor operations performed at various nodes may include matrix multiplication, n-dimensional convolution, normalization, element-wise operations, and/or the like.
In general, trajectory encoder 300 may be used in applications where the trajectory of a body in motion is correlated with the power usage of the body in motion. For example, in the case of bicycle racing, a rider is likely to stop pedaling when making a sharp turn. Accordingly, when the bicycle rider follows a curved trajectory, the power usage is likely to be lower than when the rider follows a straight trajectory. In this regard, trajectory encoder 300 generates a representation (e.g., a vector representation) of the trajectory of a body in motion over a sampling interval, which may be used by output stage 230 to evaluate power usage 206.
Trajectory encoder 300 may include a trajectory input layer 310 that receives location data 302 and generates an input representation 315 of the trajectory. For example, input representation 315 may correspond to an image representation of the trajectory (e.g., a two or three dimensional binary image in which pixels along the trajectory are set to a first logical value (e.g., one) and other pixels are set to a second logical value (e.g., zero)), a coordinate representation of the trajectory (e.g., a set of coordinates in two or three dimensions that defines the trajectory), a functional representation of the trajectory (e.g., a set of parameters of a two or three dimensional function that defines the trajectory), and/or the like. Input representation 315 may have a fixed size, which may correspond to a portion of the trajectory having a fixed duration of time, a fixed distance of travel, a fixed number of samples, and/or the like. For example, input representation 315 may include a coordinate representation of the trajectory from t−NΔT to t+NΔT, where t is the current time, ΔT is the sampling interval, and N is the number of samples before and after the current time included in the trajectory. Consistent with such examples, the dimensionality of input representation 315 may be 3(2N+1), in a case where each sample includes three coordinates (e.g., an x, y, and z coordinate).
Although input representation 315 may be directly suitable for generating trajectory representation 304, it is observed that various symmetries (e.g., rotational symmetry, reflection symmetry, etc.) exist that may be used to reduce the sample space and improve training speed. For example, in the case of bicycle racing, power usage is likely to be similar regardless of the direction the rider is travelling (e.g., north, south, east, or west). Similarly, power usage is likely to be similar regardless of the direction the rider is turning (e.g., to the left or to the right). Conversely, power usage is likely to be different depending on whether the rider is travelling uphill or downhill.
Accordingly, trajectory encoder 300 may include a normalization layer 320 that applies one or more geometric transformations (e.g., rotations, reflections, displacements, etc.) to input representation 315 to generate a normalized representation 325 that accounts for one or more symmetries of input representation 315. In some embodiments, normalization layer 320 may apply rotation normalization based on a vector associated with the trajectory. For example, the vector may correspond to a displacement between two points along the trajectory separated by a fixed number of samples, an average direction of the trajectory, and/or the like. In this regard, normalization layer 320 may rotate input representation 315 such that the corresponding vector is oriented along a particular direction and axis (e.g., the positive direction of they axis). In some embodiments, normalization layer 320 may further apply one or more standardization operations, e.g., to center input representation 315 along one or more axes (e.g., the z axis).
Trajectory encoder 300 may further include a feature encoder layer 330 that generates trajectory representation 304 based on normalized representation 325. According to some embodiments, trajectory representation 304 may correspond to a compressed representation of normalized representation 325. For example, the compressed representation may achieve more than a three-fold reduction in dimensionality relative to normalized representation 325.
In some embodiments, trajectory encoder 300 may be implemented using an auto-encoder model, such as a de-noising auto-encoder, a deep auto-encoder, a stacked deep auto-encoder, and/or the like. The auto-encoder model may include a plurality of parameters that are learned according to a machine learning process. During training, a recovered version of the compressed representation is compared to an original input representation that was provided to trajectory encoder 300. In this manner, the plurality of parameters are trained such that that the compressed representation retains the features of the original representation, while reducing the dimensionalities. The depth of the auto-encoder model may be increased to achieve further compression.
As depicted in
Competitive outcome prediction model 400 may further include an outcome estimator 420 that predicts competitive outcome 406 based on power usage 415a-n. In some embodiments, outcome estimator 420 may include a regression model, a neural network model, and/or the like. In addition to power usage 415a-n, outcome estimator 420 may receive other inputs to assist in the prediction of competitive outcome 406. For example, when predicting the likelihood that the peloton will catch the breakaway group, outcome estimator 420 may receive labels indicating which riders are in the peloton and which riders are in the breakaway group.
According to some embodiments, training configuration 500 may be used to train a plurality of model parameters of model 510. During training, a large number of training examples (e.g., example sets of location data and context data) are provided to model 510. The output power usage predicted by model 510 is compared to a ground truth power usage for each of the training examples using a learning objective 520, which determines a loss and/or reward associated with a given prediction. In some embodiments, learning objective 520 may include a supervised learning objective, a reinforcement learning objective, and/or the like. In some embodiments, the ground truth power usage for a given training example may correspond to the power usage determined by a power meter, such as a bicycle power meter that directly measures the power exerted on the pedals by the rider.
The output of learning objective 520 (e.g., the loss and/or reward) is provided to an optimizer 530 to update the model parameters of model 510. For example, optimizer 530 may determine a gradient of the objective with respect to the model parameters and adjust the model parameters using back propagation. In some embodiments, optimizer 530 may include a gradient descent optimizer (e.g., stochastic gradient descent (SGD) optimizer), an ADAM optimizer, an Adagrad optimizer, an RMSprop optimizer, and/or the like. Various parameters may be supplied to optimizer 530 (e.g., a learning rate, a decay parameter, and/or the like) depending on the type of optimizer used.
At a process 610, an encoded trajectory representation is generated based on location data. In some embodiments, the encoded trajectory representation may be generated by a trajectory encoder of the neural network model, such as trajectory encoder 300. In illustrative embodiments, the trajectory encoder may be implemented using an auto-encoder model, such as a de-noising auto-encoder, a deep auto-encoder, a stacked deep auto-encoder, and/or the like. In some embodiments the trajectory encoder may include a normalization layer that applies one or more geometric transformations to the location data, as described previously with respect to
At a process 620, a power usage is estimated based on the trajectory representation. The power usage may further be estimated on one or more programmed features, such as friction, wind resistance, potential energy, kinetic energy, the position of a rider in a cluster of riders (in the case of a bicycle race or other type of race), and/or the like. In some embodiments, the power usage may be estimated using an output stage of the model, such as output stage 230. In some embodiments, the output stage may include a decision tree-based regression model, a recurrent neural network model, and/or the like. In QA applications, the inference may identify a span of text in the document that answers the question.
At a process 710, a series of inferences is generated using the neural network model. In some embodiments, the series of inferences may be generated based on a training example, which may include location data and context data. In some embodiments, the series of inferences (e.g., estimated power usage) may be generated according to method 600.
At a process 720, a learning objective is evaluated based on the series of inferences. In some embodiments, the learning objective may correspond to learning objective 520. Consistent with such embodiments, the learning objective may include a supervised learning objective, a reinforcement learning objective, and/or the like.
At a process 730, the parameters of the neural network model are updated based on the learning objective. In some embodiments, the model parameters may be updated using an optimizer, such as optimizer 530. In some embodiments, the parameters may be updated by determining a gradient of the mixed learning objective with respect to the model parameters and updating the parameters based on the gradient.
Although illustrative embodiments have been shown and described, a wide range of modifications, changes and substitutions are contemplated in the foregoing disclosure and in some instances, some features of the embodiments may be employed without a corresponding use of other features. One of ordinary skill in the art would recognize many variations, alternatives, and modifications. Thus, the scope of the present application should be limited only by the following claims, and it is appropriate that the claims be construed broadly and in a manner consistent with the scope of the embodiments disclosed herein.