Methods, systems, and circuits for extracting features for embedded artificial intelligence mechanisms
By employing recursive feature calculation and an infinite impulse response filter, the problems of computational density and high energy consumption in feature extraction from inertial sensor data are solved, enabling low-power, highly flexible event detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies for extracting features from inertial sensor data are computationally intensive and energy-intensive, and non-overlapping window methods are inflexible and difficult to accurately detect complex events, such as double-click operations.
A recursive feature calculation method is adopted, which utilizes sequentially input inertial sensor data and combines features such as recursive maximum value, recursive minimum value, recursive peak-to-peak value, recursive root mean square, and recursive variance with an infinite impulse response filter to reduce computation and storage requirements and improve detection flexibility.
It enables efficient detection of complex events in inertial sensor data with low computational and storage requirements, improving the accuracy of event detection and the energy efficiency of the device.
Smart Images

Figure CN115597589B_ABST
Abstract
Description
Technical Field
[0001] This disclosure generally relates to types of electronic devices frequently used in embedded applications. More specifically, but not exclusively, this disclosure relates to extracting sensor features for use in artificial intelligence mechanisms. Background Technology
[0002] Many mobile electronic devices, such as smartphones, include one or more inertial sensors to detect movement. Inertial data obtained from these sensors can be used to rotate displays, control application functions (e.g., control characters in video game applications or detect fitness activities), "wake up" the device, and more. Inertial data can also be used to determine one or more movement activities while the user holds / wears the electronic device. For example, inertial data can be used to determine whether the user is stationary (not moving), walking, or running. This type of movement activity can be determined based on characteristics of the inertial data, such as the frequency and amplitude of specific inertial data. This determination of movement activity can be used to improve the interaction between the user and the electronic device.
[0003] Typically, decision trees, finite state machines, or other machine learning models can be used to identify activity from inertial data. Using these learning mechanisms, signals can be represented using a set of features (e.g., mean, variance, energy, frequency response) containing information about the movement of a device containing inertial sensors. Developing these features to create the learning mechanism is often a computationally intensive process or may result in the loss of features. The embodiments described herein are made in consideration of these and other considerations. Summary of the Invention
[0004] The embodiments described herein utilize sequentially input inertial sensor data to compute recursive features for training machine learning algorithms or for classifying data into known classes. The recursive feature values for the current data sample are computed based on comparisons between the current data sample value and previous recursive feature values. Recursive features include the recursive maximum, recursive minimum, recursive peak-to-peak value, recursive average, recursive root mean square, and recursive variance.
[0005] Other feature extraction methods and systems can utilize overlapping data windows or sequential non-overlapping windows. Unfortunately, feature detection using non-overlapping windows is less flexible, and single-event detection can be problematic when an event occurs between two windows. For example, if a user double-clicks the interface, and the first click occurs during the first window while the second click occurs during the second non-overlapping window, the system might see two separate clicks and miss the double-click. Feature detection using overlapping windows uses a sliding window to analyze data across multiple samples. While overlapping windows can detect most signaling events (e.g., double-clicks), this approach typically consumes more memory, computation time, and overall power.
[0006] The embodiments described herein produce similar benefits to the overlapping window method, but utilize less computation and a smaller memory footprint, resulting in lower power consumption. Attached Figure Description
[0007] Non-limiting and non-exhaustive embodiments are described with reference to the following figures, wherein the same labels refer to the same parts throughout the various views unless the context indicates otherwise. The dimensions and relative positions of elements in the figures are not necessarily drawn to scale. For example, the shapes of various elements have been chosen, enlarged, and positioned to improve the readability of the figures. Specific shapes of the drawn elements have been selected for ease of identification in the figures. One or more embodiments are described below with reference to the figures, wherein:
[0008] Figure 1 This is a block diagram illustrating an example computing device for implementing the embodiments described herein;
[0009] Figure 2 This is a conceptual block diagram illustrating an example of a feature extraction circuit structure according to an embodiment described herein;
[0010] Figure 3 This is a conceptual block diagram illustrating an example of a recursive maximum circuit structure according to the embodiments described herein;
[0011] Figure 4 This is a conceptual block diagram illustrating an example of a recursive minimum circuit structure according to the embodiments described herein;
[0012] Figure 5 This is a conceptual block diagram illustrating an example of a circuit structure for selecting between a minimum value function and a maximum value function, and according to an embodiment described herein;
[0013] Figure 6 This is a conceptual block diagram illustrating an example of a circuit structure based on an infinite impulse response according to an embodiment described herein;
[0014] Figure 7 A logic flowchart outlining the process of training a machine learning algorithm from recursive features, according to embodiments described herein, is shown; and
[0015] Figure 8 A logic flowchart of a process for recursively calculating the characteristics of an inertial sensor signal according to an embodiment described herein is shown. Detailed Implementation
[0016] In the following description, together with the accompanying drawings, certain details are set forth to provide a thorough understanding of various embodiments of the devices, systems, methods, and articles. However, those skilled in the art will understand that other embodiments may be practiced without these details. In other instances, well-known structures and methods associated with, for example, circuits (such as transistors, multipliers, adders, dividers, comparators, integrated circuits, logic gates, finite state machines, accelerometers, gyroscopes, magnetic field sensors, memories, bus systems, etc.) are not shown or described in detail in some figures to avoid unnecessarily obscuring the description of the embodiments. Furthermore, well-known structures or components (including, but not limited to, communication systems and networks) associated with the environment of this disclosure are not shown or described to avoid unnecessarily obscuring the description of the embodiments.
[0017] Unless the context otherwise requires, throughout the following description and claims, the word “comprising” and its variations (such as “including” and “having”) shall be interpreted in an open, inclusive sense, meaning “including but not limited to”.
[0018] Throughout the specification, claims, and drawings, unless the context clearly specifies otherwise, the following terms have the meaning explicitly associated with this document. The term “this document” refers to the specification, claims, and drawings associated with the current application. The phrases “in one embodiment,” “in another embodiment,” “in various embodiments,” “in some embodiments,” “in other embodiments,” and their variations refer to one or more features, structures, functions, limitations, or characteristics of this disclosure and are not limited to the same or different embodiments unless the context clearly specifies otherwise. As used herein, the term “or” is an inclusive “or” operator and is equivalent to the phrases “A or B, or both” or “A or B or C, or any combination thereof,” and lists with additional elements are treated the same. The term “based on” is not exclusive and allows for reliance on additional features, functions, aspects, or limitations not described, unless the context clearly specifies otherwise. Furthermore, throughout the specification, the meanings of “a,” “an,” and “the” include both singular and plural. Additionally, in one or more embodiments, particular features, structures, or characteristics may be combined in any suitable manner to obtain further embodiments.
[0019] Figure 1 This is a block diagram illustrating an example computing device 108 for implementing the embodiments described herein. The computing device 108 includes a MEMS 110, a processor 112, and input / output 116. Although not shown, the computing device 108 may have other computing components.
[0020] MEMS 110 acquires various sensor data, which is provided to processor 112 for processing. MEMS 110 may include an accelerometer or gyroscope configured to sense motion or position data associated with computing device 108. Although Figure 1 The use of MEMS is illustrated, but other sensing technologies or input sensors can also be used. Such other sensors can include, but are not limited to, GPS systems, temperature sensors, gas sensors, pressure sensors, magnetic sensors, imaging sensors, or various combinations thereof.
[0021] Data obtained from MEMS 110 is provided to processor 112 for additional processing. Processor 112 includes one or more processing cores or circuits. The processor may include, for example, one or more processors, state machines, microprocessors, programmable logic circuits, discrete circuit systems, logic gates, registers, etc., and / or various combinations thereof. Processor 112 can control the overall operation of computing device 108, the execution of applications by computing device 108, etc.
[0022] In some embodiments, processor 112 may execute computer-readable instructions to perform the embodiments described herein. In other embodiments, processor 112 may include circuitry or logic that can implement the embodiments described herein. In still other embodiments, additional circuitry or logic (not shown) separate from processor 112 may be used to implement the embodiments described herein.
[0023] The computing device 108 also includes one or more memories (not shown), such as one or more volatile or non-volatile memories or combinations thereof, which may store all or part of the instructions and data relating to applications and operations performed by the computing device 108. For example, the memory may store computer instructions that, when executed by the processor 108, perform the actions described herein. The memory also stores various information for performing the embodiments described herein, including input data, thresholds, or coefficients.
[0024] The computing device 108 also includes an input / output 116. The input / output 116 may be configured to output information or results obtained or determined by the processor 112 (such as by performing the embodiments described herein). In other embodiments, the input / output 116 may be configured to receive input data from other computing devices or external sensors.
[0025] The computing device 108 may also include a bus system (not shown) configured to communicatively couple the processor, MEMS 110, input / output 116, memory, or other circuitry or circuitry systems (not shown) to send or receive data to or from other components. The bus system may include one or more, or some combination thereof, of various components electrically coupled to data buses, address buses, power buses, or control buses.
[0026] While the embodiments described herein may discuss identifying input signal digits for training a classification model, the embodiments are not limited thereto. For example, the processor 112 of computing device 108 (or a classification module (not shown)) may also be configured to use the recursive computation embodiments described herein (e.g., calculating one or more of a recursive maximum, recursive minimum, recursive peak-to-peak value, recursive average, recursive root mean square, or recursive variance) to identify multiple input signal features that can be compared with a classification module (e.g., a classification module trained using the recursive computation embodiments described herein) to identify a known class from multiple known classes. The recursively computed features described herein provide a description or representation of the input signal. Therefore, the recursively computed features can be used to train a machine learning mechanism, or the recursively computed features can be used in conjunction with a previously trained machine learning mechanism to identify or classify an input signal into a known class.
[0027] Figure 2 This is a conceptual block diagram illustrating an example 200 of a feature extraction circuit structure 204 according to an embodiment described herein. Circuit structure 204 includes an infinite impulse response module 206, a recursive maximum module 208, a recursive minimum module 210, and a difference module 212. Feature extraction circuit structure 204 also communicates with RAM 202, which may store various coefficients, thresholds, or other information or parameters used by the infinite impulse response module 206, the recursive maximum module 208, or the recursive minimum module 210.
[0028] Infinite impulse response module 206 receives input data signal x(i), such as from Figure 1 The inertial sensor data of MEMS 110 is used. The infinite impulse response module 206 is configured to calculate and output the recursive average 220, the recursive root mean square 222, and the recursive variance 224 of the input data signal x(i). The following is in conjunction with... Figure 6 Further details of the infinite impulse response module 206 will be discussed in more detail.
[0029] The recursive maximum value module 208 also receives the input data signal x(i). The recursive maximum value module 208 is configured to calculate and output the recursive maximum value 226 of the input data signal x(i). The following is in conjunction with... Figure 3 Further details on the recursive maximum module 208 will be discussed in more detail.
[0030] The recursive minimum value module 210 receives the input data signal x(i). The recursive minimum value module 210 is configured to calculate and output the recursive minimum value 230 of the input data signal x(i). The following is in conjunction with... Figure 4 Further details of the recursive minimum module 210 will be discussed in more detail.
[0031] The difference module 212 receives the recursive maximum value output from the recursive maximum value module 208 and the recursive minimum value output from the recursive minimum value module 210. The difference module 212 is configured to calculate and output the peak-to-peak value 228 of the input data signal x(i).
[0032] Figure 3 This is a conceptual block diagram illustrating an example of a recursive maximization circuit structure 300 according to an embodiment described herein. The recursive maximization circuit structure 300 may be... Figure 2 An embodiment of the recursive maximum value module 208. The recursive maximum value circuit structure 300 includes a first maximum value function module 304, a second maximum value function module 306, a difference module 312, a multiplier module 314, an adder module 316, and a multiplexer module 318.
[0033] The first maximum value function module 304 receives the input data signal x(i) and the previous recursive maximum value 302. The first maximum value function module 304 is configured to determine whether the current sample value of the input data signal x(i) is greater than the previous recursive maximum value 302. This determination is provided as a selection signal to the multiplexer module 318. The first maximum value function module 304 also outputs the maximum value 302 between the current sample value of the input signal x(i) and the previous recursive maximum value.
[0034] The second maximum value function module 306 receives the maximum value output from the first maximum value function module 304 and a threshold 308. The threshold is set by the user or administrator to ensure that the recursive maximum value 320 is not less than the threshold. The second maximum value function module 306 is configured to generate an output that is the maximum value between the maximum value output received from the first maximum value function module 304 and the threshold 308.
[0035] The difference module 312 receives a threshold 308 and a previously recursive maximum value 302. The difference module 312 is configured to generate an output that is the difference between the threshold 308 and the previously recursive maximum value 302.
[0036] Multiplier module 314 receives the output from difference module 312 and a maximum coefficient 310. The maximum coefficient 310 is set by the user or administrator to determine the rate at which the recursive maximum value 320 decreases when the current data sample of the input signal x(i) is less than the previous recursive maximum value 302. Multiplier module 314 is configured to generate an output that is the product of the output from difference module 312 and the maximum coefficient 310.
[0037] Adder module 316 receives threshold 308 and the output from multiplier 314. Adder module 316 is configured to generate an output that is the sum of the output from multiplier 314 and threshold 308.
[0038] Multiplexer module 318 receives the output from second maximum value function module 306 and the output from adder module 316 as input data lines. Multiplexer module 318 also receives an indication of whether the current data sample of input signal x(i) is greater than the previous recursive maximum value 302, as a selection input line or control input line. Multiplexer module 318 is configured to: select the output from second maximum value function module 306 as the recursive maximum value 320 in response to an output indication from first maximum value function module 304 indicating that the current sample value is greater than the previous recursive maximum value 302. Conversely, multiplexer module 318 is configured to: select the output from adder module 316 as the recursive maximum value 320 in response to an output indication from first maximum value function module 304 indicating that the current sample value is not greater than the previous recursive maximum value 302.
[0039] Figure 4 This is a conceptual block diagram illustrating an example of a recursive minimum circuit structure 400 according to an embodiment described herein. The recursive minimum circuit structure 400 may be... Figure 2 An embodiment of the recursive minimum value module 210. The recursive minimum value circuit structure 400 includes a first minimum value function module 404, a second minimum value function module 406, a first difference module 412, a multiplier module 414, a second difference module 416, and a multiplexer module 418.
[0040] The first minimum value function module 404 receives the input data signal x(i) and the previous recursive minimum value 402. The first minimum value function module 404 is configured to determine whether the current sample value of the input data signal x(i) is less than the previous recursive minimum value 402. This determination is provided as a selection signal to the multiplexer module 418. The first minimum value function module 404 also outputs the minimum value between the current sample value of the input signal x(i) and the previous recursive minimum value 402.
[0041] The second minimum value function module 406 receives the minimum value output and a threshold 408 from the first minimum value function module 404. The threshold is set by the user or administrator to ensure that the recursive minimum value 420 is not greater than the threshold. The second minimum value function module 406 is configured to generate an output that is the minimum value between the minimum value output received from the first minimum value function module 404 and the threshold 408.
[0042] The first difference module 412 receives a threshold 408 and a previously recursive minimum value 402. The first difference module 412 is configured to generate an output that is the difference between the threshold 408 and the previously recursive minimum value 402.
[0043] Multiplier module 414 receives the output from first difference module 412 and minimum coefficient 410. Minimum coefficient 410 is set by the user or administrator to set the rate at which the recursive minimum 420 increases when the current data sample of the input signal x(i) is greater than the previous recursive minimum 402. Multiplier module 414 is configured to generate an output that is the product of the output from first difference module 412 and minimum coefficient 410.
[0044] The second difference module 416 receives the threshold 408 and the output from the multiplier 414. The second difference module 416 is configured to generate an output that is the difference between the threshold 408 and the output from the multiplier 414.
[0045] Multiplexer module 418 receives the output from second minimum function module 406 and the output from second difference module 416 as input data lines. Multiplexer module 418 also receives an indication of whether the current data sample of input signal x(i) is less than the previous recursive minimum 402 as a selection input line. Multiplexer module 418 is configured to: select the output from second minimum function module 406 as the recursive minimum 420 in response to an output indication from first minimum function module 404 indicating that the current sample value is less than the previous recursive minimum 402. Conversely, multiplexer module 418 is configured to: select the output from second difference module 416 as the recursive minimum 420 in response to an output indication from first minimum function module 404 indicating that the current sample value is not less than the previous recursive minimum 402.
[0046] Figure 5 This is a conceptual block diagram illustrating an example 500 of a circuit structure 502 for selecting between a minimum value function and a maximum value function, and according to an embodiment described herein. As described above, Figure 3 The recursive maximum circuit structure 300 utilizes the two maximum function modules 304 and 306 mentioned above, and Figure 4The recursive minimum circuit structure 400 utilizes two minimum function modules 404 and 406. In some embodiments, the circuit structure 502 can be used to perform minimum or maximum value determination based on a minimum / maximum value selection input.
[0047] Circuit structure 502 includes a difference module 504, an XOR module 506, and a multiplexer 508. The difference module 504 receives two inputs labeled "A" and "B". In circuit structure 502... Figure 3 In some cases, the input A can be the maximum value function module 304 in the function. Figure 3 The input signal x(i) in the input B can be... Figure 3 The previous recursive maximum value in the circuit is 302; in circuit structure 502 it is Figure 3 In the case of the maximum value function module 306, the input A can be from... Figure 3 The output of the maximum value function module 304 in the code, and the input B can be... Figure 3 The threshold value is 308. In circuit structure 502, it is... Figure 4 In other cases of the minimum value function module 404, the input A can be... Figure 4 The input signal x(i) in the input B can be... Figure 4 The previous recursive minimum value is 402; in circuit structure 502 is Figure 4 In the case of the minimum value function module 406, the input A can be from... Figure 4 The output of the minimum value function module 404 in the middle, and the input B can be Figure 4 The threshold is 408.
[0048] The difference module 504 is configured to calculate the difference (AB) between input A and input B, and output 1 or 0 depending on whether the result is positive or negative. If the result is positive, the difference module 504 outputs 1; if the result is negative, the difference module 504 outputs 0. This sign bit output is provided to the XOR module 506.
[0049] XOR module 506 receives the sign bit from difference module 504 and receives a maximum or minimum value selection input (0 or 1), depending on whether a minimum or maximum value function is used. In various embodiments, when a maximum value function (such as...) is used... Figure 3 When using the maximum value function module 304 or 306, input 0; when using the minimum value function (such as...) Figure 4 When the minimum value function module 404 or minimum value function module 406 is used, the input is 1. The output of the XOR module 506 indicates whether the value of input A is greater than the value of input B, where 1 indicates that input A is greater than input B. This output is provided to the multiplexer module 508 as a selection input bit.
[0050] Multiplexer module 508 receives data inputs A and B, where data input A is aligned with selection input 1 of multiplexer module 508, and data input B is aligned with selection input 0 of multiplexer module 508. If the output of XOR 506 is 1, data input A is output from circuit structure 502; if the output of XOR 506 is 0, data input B is output from circuit structure 502.
[0051] Figure 6 This is a conceptual block diagram illustrating an example 600 of an infinite impulse response-based circuit structure 604 according to an embodiment described herein. The infinite impulse response-based circuit structure 604 includes a first infinite impulse response filter module 608, a second infinite impulse response filter module 610, a first square module 606, a second square module 612, a difference module 614, and a square root module 616.
[0052] The first infinite impulse response filter module 608 receives data input x(i) and is configured to calculate a first infinite impulse response output signal. This output signal is a recursive average 620. The first infinite impulse response filter module 608 can also receive various parameters or configuration information from RAM 602.
[0053] The first squaring module 606 also receives the data input x(i) and is configured to calculate the square of the data input signal, which is output to the second infinite impulse response filter module 610. The second infinite impulse response filter module 610 is configured to calculate the second infinite impulse response output signal. The second infinite impulse response filter module 610 can also receive various parameters or configuration information from RAM 602.
[0054] The square root module 616 receives the output signal from the second infinite impulse response filter module 610. The square root module 616 is configured to calculate the square root of the second infinite impulse response output signal, i.e., the recursive root mean square 624.
[0055] The second squaring module 612 receives the first infinite impulse response output signal from the first infinite impulse response filter module 608. The second squaring module 612 is configured to calculate the square of the first infinite impulse response output signal.
[0056] The difference module 614 receives the output from the second squaring module 612 and the second infinite impulse response output signal from the second infinite impulse response filter module 610. The difference module 614 calculates the difference between the square of the first infinite impulse response output signal and the second infinite impulse response output signal. The output of the difference module 614 is the recursive variance 622.
[0057] Figures 2-6The components, modules, or other features shown may include or be composed of one or more logic gates, or their functions may be executed by one or more processing units.
[0058] Now about Figure 7 and Figure 8 The operation of one or more embodiments is described, and for convenience, the above will be discussed in relation to the following. Figures 1-6 The embodiments are described below. In at least one of the various embodiments, respectively, in conjunction with Figure 7 and Figure 8 The described processes 700 and 800 can be generated by one or more computing devices (such as...) Figure 1 The computing device 108 in the middle is implemented or executed thereon.
[0059] Figure 7 A logic flowchart of an overview process 700 for training a machine learning algorithm from recursive features, according to an embodiment described herein, is shown.
[0060] Following the start block, process 700 begins at block 702, where multiple inertial sensor data samples are received over time. As described above, the inertial sensor data may include multiple samples captured by accelerometers, gyroscopes, or other inertial sensors at set or predetermined time intervals. These multiple inertial sensor data samples may also be referred to as input signals or input inertial data signals.
[0061] Process 700 proceeds to block 704, where multiple features are recursively calculated based on sequential samples obtained from multiple received inertial sensor data samples. This will be combined with the following... Figure 8 To describe in more detail.
[0062] Process 700 continues at block 706, where the received sensor data samples are labeled using known classes. Examples of known classes could be walking, jogging, cycling, resting, etc. In at least one embodiment, a user or administrator provides input that labels the sensor data using known classes.
[0063] Process 700 then proceeds to block 708, where a machine learning algorithm or finite state machine is trained to detect known classes based on features computed recursively. In various embodiments, known machine learning training techniques can be employed to generate predictive models for known classes based on features computed recursively.
[0064] Following block 708, process 700 terminates or otherwise returns to the calling procedure to perform further actions. Although not shown, process 700 may loop back to block 702 to receive additional inertial sensor data, which can be used to recursively calculate features for other known classes.
[0065] Figure 8 A logic flowchart of a process 800 for recursively calculating the characteristics of an inertial sensor signal according to an embodiment described herein is shown.
[0066] After the start block, process 800 begins at box 802, where the current inertial sensor data sample is selected.
[0067] Process 800 proceeds to block 804, where the recursive maximum value of the previous sample is obtained. In various embodiments, using the embodiments described herein, the recursive maximum value of the previous sample is calculated for the inertial sensor data sample immediately preceding the current sample.
[0068] Process 800 continues at box 806, where a recursive maximum value is calculated for the current sample. In various embodiments, this recursive maximum value is calculated based on the recursive maximum value of previous samples and the value of the current sample.
[0069] For example, if the value of the current sample is less than a threshold, the recursive maximum value for the current sample is set to the threshold. If the value of the current sample is greater than the previous recursive maximum value of a previous sample, the recursive maximum value for the current sample is set to the value of the current sample. Furthermore, if the value of the current sample is less than or equal to the previous recursive maximum value, the recursive maximum value for the current sample is set to the threshold plus the sum of the previous recursive maximum value minus the threshold multiplied by the maximum coefficient. In various embodiments, if the value of the current sample is greater than the previous recursive maximum value, the maximum coefficient is set to the default coefficient value. And if the value of the current sample is less than or equal to the previous recursive maximum value, the maximum coefficient is set to the product of the maximum coefficient and the default coefficient value.
[0070] These calculations and determinations are based on the following equation:
[0071] If x i >Max i-1 ,but:
[0072] Max i =x i
[0073] C max =c start
[0074] If x i ≤Max i-1 ,but:
[0075] Max i =THS+(Max) i-1 -THS)·C max
[0076] C max =C max c stat
[0077] If Max i <THS, then:
[0078] Max i =THS
[0079] in,
[0080] x i It is the value of the current inertial sensor data sample i;
[0081] THS is the maximum threshold value set by the administrator;
[0082] Max i This represents the recursive maximum value of the current inertial sensor data sample i;
[0083] Max i-1 It is the previous recursive maximum value of the previous inertial sensor data sample i-1;
[0084] c start This is the default maximum coefficient set by the administrator to indicate the rate at which the recursive maximum value decreases, and it is set between 0 and 1; and
[0085] c max It is the current maximum coefficient.
[0086] Process 800 proceeds to block 808, where the recursive minimum of the previous sample is obtained. In various embodiments, using the embodiments described herein, the recursive minimum of the previous sample is calculated for the inertial sensor data sample immediately preceding the current sample.
[0087] Next, process 800 proceeds to block 810, where a recursive minimum is calculated for the current sample. In various embodiments, this recursive minimum is calculated based on the recursive minimum of previous samples and the value of the current sample.
[0088] For example, if the value of the current sample is greater than a threshold, the recursive minimum for the current sample is set to the threshold. If the value of the current sample is less than the previous recursive minimum of a previous sample, the recursive minimum for the current sample is set to the value of the current sample. Furthermore, if the value of the current sample is greater than or equal to the previous recursive minimum, the recursive minimum for the current sample is set to the threshold and the difference between the threshold and the previous recursive minimum multiplied by the minimum coefficient. In various embodiments, if the value of the current sample is less than the previous recursive minimum, the minimum coefficient is set to the default coefficient value. And if the value of the current sample is greater than or equal to the previous recursive minimum, the minimum coefficient is set to the product of the minimum coefficient and the default coefficient value.
[0089] These calculations and determinations are based on the following equation:
[0090] If x i <Min i-1 ,but:
[0091] Min i =x i
[0092] C min =c start
[0093] If x i ≥Min i-1 ,but:
[0094] Min i =THS-(THS-Min) i-1 )·c min
[0095] c min =c min c start
[0096] If Max i >THS, then:
[0097] Min i =THS
[0098] in,
[0099] x i It is the value of the current inertial sensor data sample i;
[0100] THS is the minimum threshold value set by the administrator;
[0101] Min i It is the recursive minimum value of the current inertial sensor data sample i;
[0102] Min i-1It is the previous recursive minimum of the previous inertial sensor data sample i-1;
[0103] c start This is the default minimum coefficient set by the administrator to indicate the rate at which the recursive minimum decreases, and it is set between 0 and 1; and
[0104] c min It is the current smallest coefficient.
[0105] Next, process 800 continues at box 812, where the recursive peak-to-peak value is calculated for the current sample. In various embodiments, the recursive peak-to-peak value is the difference between the recursive maximum value and the recursive minimum value for the current sample.
[0106] Process 800 proceeds to block 814, where a recursive average is calculated for the current sample. In various embodiments, an infinite impulse response low-pass filter is used on multiple inertial sensor data samples to calculate the recursive average. This calculation and determination are performed according to the following equation:
[0107] Average i =IIR LP [x i ]
[0108] in,
[0109] Average is the recursive average of the current inertial sensor data sample i;
[0110] x i It is the value of the current inertial sensor data sample i; and
[0111] IIR LP It is an infinite impulse response low-pass filter on the inertial data signal of the current inertial sensor data sample i.
[0112] Process 800 continues at block 816, where a recursive root mean square (RMS) is calculated for the current sample. In various embodiments, the RMS is calculated using an infinite impulse response low-pass filter on the squares of multiple inertial sensor data samples. This calculation and determination is performed according to the following equation:
[0113]
[0114] in,
[0115] RMS is the recursive root mean square of the current inertial sensor data sample i;
[0116] x i It is the value of the current inertial sensor data sample i; and
[0117] IIR LP It is an infinite impulse response low-pass filter on the inertial data signal of the current inertial sensor data sample i.
[0118] Process 800 continues at block 818, where the recursive variance is calculated for the current sample. In various embodiments, the recursive variance is calculated based on the difference between the squares of a first infinite impulse response low-pass filter and the squares of a second infinite impulse response low-pass filter on the squares of the plurality of inertial sensor data samples. This calculation and determination is performed according to the following equation:
[0119] Variance i =IIR LP [x i 2 ]-IIR LP 2 [x i ]
[0120] in,
[0121] Variance is the recursive variance of the current inertial sensor data sample i;
[0122] x i It is the value of the current inertial sensor data sample i; and
[0123] IIR LP It is an infinite impulse response low-pass filter on the inertial data signal of the current inertial sensor data sample i.
[0124] Next, process 800 continues at decision block 820, where it is determined whether to select another inertial sensor data sample. In at least one embodiment, if additional data is being received or has already been received from the inertial sensor, the next inertial sensor data sample is selected. If another inertial sensor data sample is to be selected, process 800 flows to block 822; otherwise, process 800 terminates or otherwise returns to the calling procedure to perform other actions.
[0125] At box 822, set the current sample to the previous sample.
[0126] Then, process 800 proceeds to box 824, where the next inertial sensor data sample is selected as the current sample.
[0127] Procedure 800 loops to box 804 to calculate the recursive maximum, recursive minimum, recursive peak-to-peak value, recursive average, recursive root mean square, and recursive variance for the new current sample.
[0128] Process 800 continues to loop until all inertial sensor data has been processed or until it is stopped by the administrator or another process.
[0129] Although process 800 is described as a series of steps in a specific order, the embodiments are not limited thereto. For example, two or more of the recursive maximum, recursive minimum, recursive peak-to-peak value, recursive average, recursive root mean square, and recursive variance may be determined in parallel or in an order other than that shown.
[0130] As mentioned above, Figure 8 The calculations of recursive maximum, recursive minimum, recursive peak-to-peak value, recursive average, recursive root mean square, and recursive variance described in the text can also be used to compare features based on recursive calculations with trained classification models or trained machine learning mechanisms to classify input sensor data signals into known classes.
[0131] In the foregoing description, certain specific details have been set forth to provide a thorough understanding of the various disclosed embodiments. However, those skilled in the art will recognize that embodiments may be practiced without one or more of these specific details, or using other methods, components, materials, etc. In other instances, well-known structures associated with electronic and computing systems and networks, including client and server computing systems, have not been shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.
[0132] The titles and summaries of the disclosures provided herein are for convenience only and do not limit or interpret the scope or meaning of the embodiments.
[0133] One approach can be summarized as follows: receiving multiple inertial sensor data samples over time; recursively computing multiple features over time based on the analysis of sequential samples of the multiple inertial sensor data samples, including: for each current sample among the multiple inertial sensor data samples, computing a current feature value for each corresponding feature among the multiple features based on a comparison between the current sample and a previous recursive feature value for the corresponding feature; labeling the multiple inertial sensor data samples using known classes; and training a machine learning algorithm to detect known classes based on the multiple features computed over time. Recursively computing multiple features over time may include computing a recursive maximum value across the multiple inertial sensor data samples.
[0134] Calculating the recursive maximum value may include: setting the recursive maximum value for the current sample to the threshold in response to the current sample's value being less than the threshold; setting the recursive maximum value for the current sample to the current sample's value in response to the current sample's value being greater than the previous recursive maximum value for multiple inertial sensor data samples; and setting the recursive maximum value for the current sample to the sum of the threshold and the previous recursive maximum value minus the threshold multiplied by the maximum coefficient in response to the current sample's value being less than or equal to the previous recursive maximum value. The method may also include: setting the maximum coefficient to a default coefficient value in response to the current sample's value being greater than the previous recursive maximum value; and setting the maximum coefficient to the product of the maximum coefficient and the default coefficient value in response to the current sample's value being less than or equal to the previous recursive maximum value.
[0135] Recursively calculating multiple features over time can include calculating a recursive minimum over multiple inertial sensor data samples. Calculating the recursive minimum can include: setting the recursive minimum for the current sample to a threshold in response to the current sample's value being greater than a threshold; setting the recursive minimum for the current sample to the current sample's value in response to the current sample's value being less than a previous recursive minimum for previous samples of the multiple inertial sensor data samples; and setting the recursive minimum for the current sample to the difference between the threshold and the threshold minus the previous recursive minimum multiplied by a minimum coefficient in response to the current sample's value being greater than or equal to a previous recursive minimum. The method can also include: setting the minimum coefficient to a default coefficient value in response to the current sample's value being less than a previous recursive minimum; and setting the minimum coefficient to the product of the minimum coefficient and the default coefficient value in response to the current sample's value being greater than or equal to a previous recursive minimum.
[0136] Recursively calculating multiple features over time can include calculating the recursive peak-to-peak value between the recursive maximum and recursive minimum values on multiple inertial sensor data samples.
[0137] Recursively calculating multiple features over time can include: calculating a recursive average of multiple inertial sensor data samples over time. Calculating the recursive average can include: calculating an infinite impulse response low-pass filter over multiple inertial sensor data samples.
[0138] Recursively calculating multiple features over time can include: calculating the recursive root mean square of multiple inertial sensor data samples over time. Calculating the recursive root mean square can also include: calculating the square root of an infinite impulse response low-pass filter over the squares of multiple inertial sensor data samples.
[0139] Recursively calculating multiple features over time may include: calculating the recursive variance of multiple inertial sensor data samples over time. Calculating the recursive variance may include: calculating the difference between the squares of a first infinite impulse response low-pass filter and the squares of a second infinite impulse response low-pass filter on the squares of the multiple inertial sensor data samples.
[0140] A system can be summarized as including: an infinite impulse response module configured to calculate the recursive average, the recursive root mean square, and the recursive variance of the input signal; a recursive maximum module configured to calculate the recursive maximum of the input signal; a recursive minimum module configured to calculate the recursive minimum of the input signal; and a difference module configured to calculate the recursive peak-to-peak value of the input signal from the recursive maximum and the recursive minimum.
[0141] The system may also include a training module configured to train a machine learning algorithm to detect known classes based on multiple features calculated over time from the recursive average, recursive root mean square, recursive variance, recursive maximum, recursive minimum, and recursive peak-to-peak value of the input signal.
[0142] The infinite impulse response module may include: a first infinite impulse response filter module, configured to calculate a first infinite impulse response output signal from the input signal as a recursive average of the input signal; a first squaring module, configured to calculate the square of the input signal; a second infinite impulse response filter module, configured to calculate a second infinite impulse response output signal from the squared input signal; a second squaring module, configured to calculate the square of the first infinite impulse response output signal; a second difference module, configured to calculate the difference between the square of the first infinite impulse response output signal and the second infinite impulse response output signal as a recursive variance; and a square root module, configured to calculate the square root of the second infinite impulse response output signal as a recursive root mean square.
[0143] The recursive maximum value module may include: a first maximum value function module, which can be configured to generate a first output, the first output being the maximum value between the current sample value of the input signal and the previous recursive maximum value, and configured to generate a second output, the second output indicating whether the current sample value of the input signal can be greater than the previous recursive maximum value; a second maximum value function module, which can be configured to generate a third output, the third output being the maximum value between the first output and a threshold; a second difference module, which can be configured to generate a fourth output, the fourth output being the difference between the threshold and the previous recursive maximum value; a multiplier module, which can be configured to generate a fifth output, the fifth output being the product of the fourth output and the maximum coefficient; an adder module, which can be configured to generate a sixth output, the sixth output being the sum of the fifth output and the threshold; and a multiplexer module, which can be configured to: select the third output as the recursive maximum value in response to the second output indicating that the current sample value can be greater than the previous recursive maximum value, or select the sixth output as the recursive maximum value in response to the second output indicating that the current sample value can not be greater than the previous recursive maximum value.
[0144] The recursive minimum module may include: a first minimum function module configured to generate a first output, which is the minimum value between the current sample value of the input signal and the previous recursive minimum value, and configured to generate a second output, which indicates whether the current sample value of the input signal can be less than the previous recursive minimum value; a second minimum function module configured to generate a third output, which may be the minimum value between the first output and a threshold; a second difference module configured to generate a fourth output, which is the difference between the threshold and the previous recursive minimum value; a multiplier module configured to generate a fifth output, which may be the product of the fourth output and the minimum coefficient; a third difference module configured to generate a sixth output, which may be the difference between the threshold and the fifth output; and a multiplexer module configured to: select the third output as the recursive minimum value in response to the second output indicating that the current sample value can be less than the previous recursive minimum value, or select the sixth output as the recursive minimum value in response to the second output indicating that the current sample value can be no less than the previous recursive minimum value.
[0145] A non-transitory computer-readable medium has contents configuring a microcontroller to execute a method, the method being summarized as including: receiving an input signal from an inertial sensor; receiving labeled data indicating known classes associated with the input signal; recursively calculating multiple features over time based on analysis of the input signal, including: generating a recursive maximum value of the input signal over time; generating a recursive minimum value of the input signal over time; generating a recursive peak-to-peak value of the input signal over time from the recursive maximum and recursive minimum values; generating a recursive average value of the input signal over time; generating a recursive root mean square value of the input signal over time; and generating a recursive variance of the input signal over time; and training a machine learning algorithm to detect known classes based on the calculated multiple features.
[0146] One approach can be summarized as follows: receiving multiple inertial sensor data samples over time; employing a classification model on the inertial sensor data to classify the inertial sensor data into known classes among multiple known classes, including: recursively calculating multiple features over time based on the analysis of sequential samples of the multiple inertial sensor data samples, including: for each current sample among the multiple inertial sensor data samples, calculating a current feature value for each corresponding feature among the multiple features based on a comparison between the current sample and the previous recursive feature value for the corresponding feature; and identifying the known classes based on a comparison between the recursively calculated multiple features and the classification model.
[0147] Recursively calculating multiple features over time may include calculating a recursive maximum value over multiple inertial sensor data samples. Calculating the recursive maximum value may include: setting the recursive maximum value for the current sample to the threshold in response to the current sample's value being less than a threshold; setting the recursive maximum value for the current sample to the current sample's value in response to the current sample's value being greater than a previous recursive maximum value for previous samples of the multiple inertial sensor data samples; and setting the recursive maximum value for the current sample to the sum of the threshold and the previous recursive maximum value minus the threshold multiplied by a maximum coefficient in response to the current sample's value being less than or equal to the previous recursive maximum value. The method may also include: setting the maximum coefficient to a default coefficient value in response to the current sample's value being greater than a previous recursive maximum value; and setting the maximum coefficient to the product of the maximum coefficient and the default coefficient value in response to the current sample's value being less than or equal to the previous recursive maximum value.
[0148] Recursively calculating multiple features over time may include calculating a recursive minimum over multiple inertial sensor data samples. Calculating the recursive minimum may include: setting the recursive minimum for the current sample to a threshold in response to the current sample's value being greater than a threshold; setting the recursive minimum for the current sample to the current sample's value in response to the current sample's value being less than a previous recursive minimum for previous samples of the multiple inertial sensor data samples; and setting the recursive minimum for the current sample to the difference between the threshold and the threshold minus the previous recursive minimum multiplied by a minimum coefficient in response to the current sample's value being greater than or equal to a previous recursive minimum. The method may also include: setting the minimum coefficient to a default coefficient value in response to the current sample's value being less than a previous recursive minimum; and setting the minimum coefficient to the product of the minimum coefficient and the default coefficient value in response to the current sample's value being greater than or equal to a previous recursive minimum.
[0149] Recursively calculating multiple features over time can include calculating the recursive peak-to-peak value between the recursive maximum and recursive minimum values on multiple inertial sensor data samples.
[0150] Recursively calculating multiple features over time can include: calculating a recursive average of multiple inertial sensor data samples over time. Calculating the recursive average can include: calculating an infinite impulse response low-pass filter over multiple inertial sensor data samples.
[0151] Recursively calculating multiple features over time can include: calculating the recursive root mean square of multiple inertial sensor data samples over time. Calculating the recursive root mean square can also include: calculating the square root of an infinite impulse response low-pass filter over the squares of multiple inertial sensor data samples.
[0152] Recursively calculating multiple features over time may include: calculating the recursive variance of multiple inertial sensor data samples over time. Calculating the recursive variance may include: calculating the difference between the squares of a first infinite impulse response low-pass filter and the squares of a second infinite impulse response low-pass filter on the squares of the multiple inertial sensor data samples.
[0153] A computing device may be summarized as comprising: an infinite impulse response module configured to calculate a recursive average, a recursive root mean square (RMS) of an input signal, and a recursive variance of an input signal; a recursive maximum module configured to calculate a recursive maximum of the input signal; a recursive minimum module configured to calculate a recursive minimum of the input signal; and a difference module configured to calculate a recursive peak-to-peak value of the input signal from the recursive maximum and recursive minimum; and a classification module configured to classify the input signal into a known class based on a comparison between the recursive average, the recursive RMS of the input signal, the recursive variance of the input signal, the recursive maximum of the input signal, the recursive minimum of the input signal, and the recursive peak-to-peak value of the input signal.
[0154] The infinite impulse response module may include: a first infinite impulse response filter module, configured to calculate a first infinite impulse response output signal from the input signal as a recursive average of the input signal; a first squaring module, configured to calculate the square of the input signal; a second infinite impulse response filter module, configured to calculate a second infinite impulse response output signal from the squared input signal; a second squaring module, configured to calculate the square of the first infinite impulse response output signal; a second difference module, configured to calculate the difference between the square of the first infinite impulse response output signal and the second infinite impulse response output signal as a recursive variance; and a square root module, configured to calculate the square root of the second infinite impulse response output signal as a recursive root mean square.
[0155] The recursive maximum value module may include: a first maximum value function module, which can be configured to generate a first output, the first output being the maximum value between the current sample value of the input signal and the previous recursive maximum value, and configured to generate a second output, the second output indicating whether the current sample value of the input signal can be greater than the previous recursive maximum value; a second maximum value function module, which can be configured to generate a third output, the third output being the maximum value between the first output and a threshold; a second difference module, which can be configured to generate a fourth output, the fourth output being the difference between the threshold and the previous recursive maximum value; a multiplier module, which can be configured to generate a fifth output, the fifth output being the product of the fourth output and the maximum coefficient; an adder module, which can be configured to generate a sixth output, the sixth output being the sum of the fifth output and the threshold; and a multiplexer module, which can be configured to: select the third output as the recursive maximum value in response to the second output indicating that the current sample value can be greater than the previous recursive maximum value, or select the sixth output as the recursive maximum value in response to the second output indicating that the current sample value can not be greater than the previous recursive maximum value.
[0156] The recursive minimum module may include: a first minimum function module configured to generate a first output, which may be the minimum value between the current sample value of the input signal and the previous recursive minimum value, and configured to generate a second output, which indicates whether the current sample value of the input signal can be less than the previous recursive minimum value; a second minimum function module configured to generate a third output, which may be the minimum value between the first output and a threshold; a second difference module configured to generate a fourth output, which may be the difference between the threshold and the previous recursive minimum value; a multiplier module configured to generate a fifth output, which may be the product of the fourth output and the minimum coefficient; a third difference module configured to generate a sixth output, which may be the difference between the threshold and the fifth output; and a multiplexer module configured to: select the third output as the recursive minimum value in response to the second output indicating that the current sample value can be less than the previous recursive minimum value, or select the sixth output as the recursive minimum value in response to the second output indicating that the current sample value can be no less than the previous recursive minimum value.
[0157] The various embodiments described above can be combined to provide further embodiments. If desired, aspects of the embodiments can be modified to incorporate various patented, applied, and disclosed concepts to provide even more advanced embodiments.
[0158] These and other changes can be made to the embodiments based on the detailed description above. Generally, the terminology used in the appended claims should not be construed as limiting the claims to the specific embodiments disclosed in the specification and claims, but should be construed as including all possible embodiments and the full scope of equivalents to which such claims are given. Therefore, the claims are not limited to this disclosure.
Claims
1. A method for feature extraction, comprising: Receives multiple inertial sensor data samples over time; Based on the analysis of sequential samples of the multiple inertial sensor data samples, multiple features are recursively calculated over time, including: For each current sample among the plurality of inertial sensor data samples, a current feature value for each of the plurality of features is calculated based on a comparison between the previous recursive feature value for the corresponding feature and the current sample. The plurality of inertial sensor data samples are labeled using known classes; and Based on multiple features calculated over time, a machine learning algorithm is trained to detect the known class. The recursive calculation of the multiple features over time includes: Calculate the recursive maximum value on the multiple inertial sensor data samples. The calculation of the recursive maximum value includes: In response to the current sample value being less than a threshold, the recursive maximum value for the current sample is set to the threshold; In response to the current sample value being greater than the previous recursive maximum value for previous samples of the plurality of inertial sensor data samples, the recursive maximum value for the current sample is set as the current sample value; and In response to the current sample value being less than or equal to the previous recursive maximum value, the recursive maximum value for the current sample is set to the threshold and the previous recursive maximum value minus the threshold multiplied by the maximum coefficient.
2. The method according to claim 1, further comprising: In response to the current sample value being greater than the previous recursive maximum value, the maximum coefficient is set to the default coefficient value; as well as In response to the current sample value being less than or equal to the previous recursive maximum value, the maximum coefficient is set to the product of the maximum coefficient and the default coefficient value.
3. The method of claim 1, wherein recursively calculating the plurality of features over time comprises: Calculate the recursive minimum value on the multiple inertial sensor data samples.
4. The method according to claim 3, wherein calculating the recursive minimum comprises: In response to the current sample value being greater than a threshold, the recursive minimum value for the current sample is set as the threshold. In response to the current sample value being less than the previous recursive minimum for the previous samples of the plurality of inertial sensor data samples, the recursive minimum for the current sample is set as the current sample value; as well as In response to the current sample value being greater than or equal to the previous recursive minimum, the recursive minimum for the current sample is set as the difference between the threshold and the threshold minus the previous recursive minimum multiplied by the minimum coefficient.
5. The method according to claim 4, further comprising: In response to the current sample value being less than the previous recursive minimum value, the minimum coefficient is set to the default coefficient value; as well as In response to the current sample value being greater than or equal to the previous recursive minimum value, the minimum coefficient is set to the product of the minimum coefficient and the default coefficient value.
6. The method of claim 1, wherein recursively calculating the plurality of features over time comprises: Calculate the recursive peak-to-peak value between the recursive maximum and recursive minimum values on the multiple inertial sensor data samples.
7. The method of claim 1, wherein recursively calculating the plurality of features over time comprises: The recursive average of the multiple inertial sensor data samples is calculated over time.
8. The method of claim 7, wherein calculating the recursive average comprises: Calculate the infinite impulse response low-pass filter on the multiple inertial sensor data samples.
9. The method of claim 1, wherein recursively calculating the plurality of features over time comprises: The recursive root mean square of the multiple inertial sensor data samples is calculated over time.
10. The method of claim 9, wherein calculating the recursive root mean square comprises: Calculate the square root of the infinite impulse response low-pass filter over the square of the plurality of inertial sensor data samples.
11. The method of claim 1, wherein recursively calculating the plurality of features over time comprises: The recursive variance of the multiple inertial sensor data samples is calculated over time.
12. The method of claim 11, wherein calculating the recursive variance comprises: Calculate the difference between the square of the first infinite impulse response low-pass filter on the plurality of inertial sensor data samples and the square of the second infinite impulse response low-pass filter on the plurality of inertial sensor data samples.
13. A system for extracting sensor features for embedded artificial intelligence mechanisms, comprising: The receiving module is configured to receive multiple inertial sensor data samples over time; The recursive calculation module is configured to recursively calculate multiple features over time based on the analysis of sequential samples of the plurality of inertial sensor data samples, including: The current feature value calculation module is configured to calculate the current feature value for each of the plurality of features for each current sample based on a comparison between the previous recursive feature value for the corresponding feature and the current sample. A labeling module is configured to label the plurality of inertial sensor data samples using known classes; and The training module is configured to train a machine learning algorithm to detect the known class based on multiple features computed over time. The current feature value calculation module includes a recursive maximum value module, configured to calculate the recursive maximum value of the input signal on the plurality of inertial sensor data samples by: In response to the current sample value being less than a threshold, the recursive maximum value for the current sample is set to the threshold; In response to the current sample value being greater than the previous recursive maximum value for previous samples of the plurality of inertial sensor data samples, the recursive maximum value for the current sample is set as the current sample value; and In response to the current sample value being less than or equal to the previous recursive maximum value, the recursive maximum value for the current sample is set to the threshold and the previous recursive maximum value minus the threshold multiplied by the maximum coefficient.
14. The system according to claim 13, wherein the current feature value calculation module comprises: An infinite impulse response module is configured to calculate the recursive average of the input signal, the recursive root mean square of the input signal, and the recursive variance of the input signal. A recursive minimum value module is configured to calculate the recursive minimum value of the input signal; as well as The difference module is configured to calculate the recursive peak-to-peak value of the input signal from the recursive maximum value and the recursive minimum value.
Citation Information
Patent Citations
Use state recognition method and device, storage medium and electronic equipment
CN111176465A
Recursive learning for artificial intelligent agents
US20200257963A1