A rehabilitation glove flexion signal threshold self-calibration method and system
By constructing a static baseline and a dynamic threshold, zero drift compensation and hysteresis correction are performed on the bending signal of the rehabilitation glove, which solves the problems of false triggering and hysteresis rebound in the bending signal processing of the prior art, and realizes accurate output of multi-level bending states and fine-grained control of pneumatic movements.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHENGDU TECH UNIV
- Filing Date
- 2026-06-09
- Publication Date
- 2026-07-10
AI Technical Summary
Existing methods for processing bending signals in rehabilitation gloves suffer from several problems: static baselines rely on manual adjustment; zero drift and aerodynamic disturbances can easily cause false triggering; single comparison boundaries are difficult to adapt to hysteresis rebound; and the inability to output multi-level bending states.
By collecting the electrical digital data of the flexion signal of each finger, a static baseline and dynamic threshold are constructed. The flexion signal is then subjected to zero drift compensation and hysteresis anomaly joint correction. The parameters are updated based on the tightness of the fit, hand shape differences and historical trigger rate, and multi-level flexion states are output.
It achieves continuous bending state judgment under aerodynamic interference, avoids false triggering, can adjust the threshold boundary online according to wearing conditions, and supports finer-grained aerodynamic motion matching.
Smart Images

Figure CN122365313A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of glove data processing technology, specifically to a method and system for self-calibrating the bending signal threshold of rehabilitation gloves. Background Technology
[0002] In sensor-input-based embedded control systems, sensor output signals are sampled, converted, or read from ports to form electrical digital data. Subsequent control programs typically need to perform baseline modeling, drift correction, threshold determination, and state encoding on this electrical digital data. Flexibility sensors are flexible sensors that output electrical signals that change with the degree of bending. Their output signals are sampled by comparator circuits, analog-to-digital converters, or digital ports to form bending signal electrical digital data that can be read by a microcontroller or single-chip microcomputer. In the rehabilitation glove project, the Flex bending signal is only one source of electrical digital data. The key subsequent processing is not the mechanical drive structure itself, but rather the baseline determination, threshold generation, abnormal sampling identification, parameter updating, and bending state encoding output of the sampled data from each finger channel in the computational control link. Therefore, this type of technology focuses more on the data processing rules of the input data in the computer or embedded processor, and how the processing results can be used as state data that can be read by subsequent control logic.
[0003] Existing Flex bending signal processing methods typically compare sampled values directly with a fixed threshold and convert the comparison result into binary data indicating whether the bending was triggered or not. This method lacks adaptive processing for the timing characteristics of electrical digital data, making it difficult to handle baseline shifts that occur on the same channel under different wearing conditions, different rest periods, and different sampling windows. When zero drift occurs in the static sampled data, the fixed threshold cannot be updated synchronously, easily distorting the judgment boundary between static and bending state data. When there is a hysteresis difference between the bending entry and bending exit processes, a single threshold boundary can cause the state data to repeatedly jump around the boundary. When the sampling sequence is affected by transient disturbances such as port jitter, power supply fluctuations, relay switching, solenoid valve switching, or air pump start-stop, single-point sampling judgment may also mistakenly identify peak data as valid bending data. Binary switch quantities can only provide the result of whether the bending was triggered, and cannot express mild, moderate, or severe bending and their corresponding confidence values, making it impossible for subsequent programs to perform hierarchical control based on bending degree data. Summary of the Invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, the technical problem solved by the present invention is that the existing rehabilitation glove bending signal threshold processing method has problems such as static baseline dependence on manual adjustment, zero drift and aerodynamic disturbances easily causing false triggering, single comparison boundary is difficult to adapt to hysteresis rebound, and how to output multi-level bending states that can be used for aerodynamic motion matching to the control layer.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a self-calibration method for the flexion signal threshold of a rehabilitation glove, comprising collecting electrical digital data of the Flex flexion signal of each finger, and constructing a static baseline and a dynamic threshold.
[0007] Zero drift compensation and hysteresis anomaly correction are performed on the bending signal.
[0008] The parameters are updated based on wearing tightness, hand shape differences, and historical trigger rate, and multi-level bending states are output.
[0009] As a preferred embodiment of the self-calibration method for the flexion signal threshold of the rehabilitation glove described in this invention, the acquisition of electrical digital data of the Flex flexion signal of each finger includes: treating the thumb, index finger, middle finger, ring finger, and little finger as independent finger channels, and timestamping the electrical digital data output by the Flex2.2 unidirectional flexibility sensor and converted by sampling on each finger channel. During the calibration period when the rehabilitation glove body is uninflated and the mirror glove is naturally extended, the original sampling sequence, sampling duration, trigger duration, and channel identifier of each finger channel are recorded, and sampling segments that occur simultaneously with the start of the air pump, relay flipping, or solenoid valve switching are removed, resulting in a static sample set and a motion candidate sample set.
[0010] As a preferred embodiment of the self-calibration method for the bending signal threshold of the rehabilitation glove described in this invention, the construction of the static baseline and dynamic threshold includes: calculating the static baseline, static noise amplitude, and static trigger ratio for each finger channel of the static sample set; calculating the bending response span and response duration for each finger channel of the motion candidate sample set; generating a bending entry boundary and a bending exit boundary for each finger channel using the static baseline as the threshold center and the static noise amplitude, bending response span, and static trigger ratio as threshold boundary correction inputs; forming a dynamic threshold pair using the bending entry boundary and the bending exit boundary, and maintaining a threshold interval determined by the bending response span relative to the bending exit boundary; and updating the static baseline and dynamic threshold pair only using data that are not marked as pneumatic switching segments and not marked as abnormal sampling segments at the end of each sliding time window.
[0011] As a preferred embodiment of the self-calibration method for the bending signal threshold of the rehabilitation glove described in this invention, the zero-drift compensation of the bending signal includes: identifying a stationary holding segment for each finger channel within the current sliding time window, and determining the difference between the center statistic of the stationary holding segment and the initial stationary baseline as the zero-drift offset. When the continuous directional maintenance relationship of the zero-drift offset satisfies the drift judgment condition, the zero-drift offset is subtracted from the original sampling sequence of the current finger channel to form a zero-drift compensated bending sequence. When the zero-drift offset coincides with the start of the air pump, the flipping of the relay, or the switching of the solenoid valve in time, the corresponding sampling segment is marked as an aerodynamic disturbance segment, and the corresponding sampling segment is prohibited from participating in the stationary baseline update.
[0012] As a preferred embodiment of the self-calibration method for the bending signal threshold of the rehabilitation glove described in this invention, the hysteresis anomaly joint correction includes: within each finger channel, comparing the zero-drift compensated bending sequence with the bending entry boundary and the bending exit boundary; generating a bending hold marker when the previous sampling time is in the extension hold state and the current sampled value crosses the bending entry boundary; generating an extension hold marker when the previous sampling time is in the bending hold state and the current sampled value falls back to within the bending exit boundary; and retaining the hold marker from the previous sampling time when the current sampled value is between the bending entry boundary and the bending exit boundary. Before generating the hold marker, anomaly sampling markers are constructed using adjacent sampling differences, median deviation within the window, and aerodynamic disturbance segment identifiers. Neighborhood statistical substitution values are used to compare the sampled values corresponding to the anomaly sampling markers. The state switching of the same finger channel is jointly defined by the hysteresis boundary and the anomaly sampling markers.
[0013] As a preferred embodiment of the self-calibration method for the bending signal threshold of the rehabilitation glove described in this invention, the parameter update based on wearing tightness, hand shape difference, and historical trigger rate includes: constructing a wearing tightness index based on the short-term jitter amplitude and bending response hysteresis in the static holding segment; constructing a hand shape difference index based on the initial static baseline, bending response span, and response order between adjacent finger channels for each finger channel; and constructing a historical trigger rate index based on the proportion, duration, and number of consecutive triggers of bending holding markers within the most recent sliding time window. The wearing tightness index, hand shape difference index, and historical trigger rate index are jointly input into the parameter update rule to update the static baseline update step size, threshold boundary correction coefficient, abnormal sampling judgment boundary, and state holding duration for each finger channel online. When the bending entry boundary after parameter update is lower than the corresponding bending exit boundary, the threshold interval between the bending entry boundary and the bending exit boundary is restored according to the bending response span.
[0014] As a preferred embodiment of the self-calibration method for the bending signal threshold of the rehabilitation glove described in this invention, the output multi-level bending state includes: jointly determining the zero-drift compensation bending sequence, dynamic threshold pair, and hold marker for each finger channel, dividing each finger channel into an extended state, a slightly bent state, a moderately bent state, and a severely bent state. For sampling moments near the boundary of adjacent bending states, a state confidence quantity is generated by combining anomaly sampling markers and historical trigger rate indicators. The finger channel identifier, bending state level, state confidence quantity, and state hold duration are encapsulated into bending state output data and sent to the rehabilitation glove control layer in the order of thumb to little finger, so that the control layer can match the actions of relays, solenoid valves, positive pressure output of the air pump, and negative pressure output of the air pump.
[0015] As a preferred embodiment of the self-calibration system for bending signal threshold of rehabilitation gloves described in this invention, it includes a baseline threshold construction module, a signal joint correction module, and a state hierarchical output module.
[0016] The baseline threshold construction module is used to collect the electrical digital data of the Flex bending signal of each finger and construct a static baseline and a dynamic threshold.
[0017] The signal joint correction module is used to perform zero drift compensation and hysteresis anomaly joint correction on the curved signal.
[0018] The state grading output module is used to update parameters and output multiple bending states based on wearing tightness, hand shape differences and historical trigger rate.
[0019] A computer device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement a method for self-calibrating a bending signal threshold of a rehabilitation glove.
[0020] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a self-calibration method for a bending signal threshold of a rehabilitation glove.
[0021] The beneficial effects of this invention are:
[0022] By acquiring the electrical digital data of the flexion signal of each finger and constructing a static baseline and dynamic threshold, each finger channel obtains an extension reference and flexion boundary corresponding to the current wearing state, avoiding the use of comparator hardware thresholds as the sole criterion for judgment. Therefore, subsequent zero-drift compensation and state classification can be derived based on calibration samples, static noise amplitude, and flexion response span of the same channel, ensuring that the flexion judgment has a repeatable data source.
[0023] By performing zero-drift compensation and hysteresis anomaly correction on the bending signal, slow-varying baseline offset, aerodynamic disturbance segments, isolated spike sampling, and bending rebound hysteresis are incorporated into the processing chain. This ensures that the bending hold marker is no longer dominated by single-point anomalies, and that extension to bending and bending to extension use different boundaries, thus allowing the pneumatic rehabilitation glove to still output continuous state judgment criteria even when there are transient interferences in the relay and solenoid valve actions.
[0024] By updating parameters and outputting multi-level bending states based on wearing tightness, hand shape differences, and historical trigger rates, the threshold boundaries, abnormal sampling judgment boundaries, and state holding duration can be adjusted online during the wearing process. The output results are expanded from a single switch quantity to include finger channel identification, bending state level, state confidence value, and state holding duration. The control layer can then use this information to perform more granular action matching for relays, solenoid valves, and positive and negative pressure outputs of the air pump. Attached Figure Description
[0025] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 The above is an overall flowchart of a self-calibration method for the bending signal threshold of a rehabilitation glove provided in Embodiment 1 of the present invention. Detailed Implementation
[0027] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0028] Example 1, referring to Figure 1 As one embodiment of the present invention, a self-calibration method for the bending signal threshold of a rehabilitation glove is provided, comprising:
[0029] S1: Collect electrical digital data of the Flex bending signal of each finger to construct a static baseline and dynamic threshold.
[0030] The thumb, index finger, middle finger, ring finger, and little finger were each treated as an independent finger channel. The electrical digital data output from the Flex2.2 unidirectional bending sensor and converted through sampling on each finger channel was timestamped. During the calibration period when the rehabilitation glove was uninflated and the mirror glove remained naturally extended, the original sampling sequence, sampling duration, trigger duration, and channel identifier for each finger channel were recorded. Sampling segments occurring simultaneously with the air pump startup, relay flipping, or solenoid valve switching were removed, resulting in a static sample set and a motion candidate sample set.
[0031] Furthermore, the finger channels refer to the independent sampling paths corresponding to the thumb, index finger, middle finger, ring finger, and little finger in the rehabilitation glove project. Each finger channel can be connected to a Flex2.2 unidirectional bendability sensor. The Flex2.2 unidirectional bendability sensor generates an electrical signal that varies with the degree of bend as the mirror glove bends with the finger. The electrical signal is converted into electrical digital data after analog-to-digital conversion, comparator output sampling, or continuous counting at the digital port. In this embodiment, the electrical digital data is uniformly recorded as the original sampling sequence, so that subsequent algorithms do not rely on the fixed threshold of the comparator hardware, but instead perform baseline modeling, sliding window updates, and state output on the sampled digital sequence.
[0032] Furthermore, in this embodiment, the sampling interval is set to 10 milliseconds to 40 milliseconds. This setting is derived from the compatible execution cycle of the 51 microcontroller's polling of the Flex input port, infrared interrupt processing, and relay control output. The advantage of this setting is that it covers the flexion-holding process in finger rehabilitation training, while avoiding scheduling congestion between the microcontroller's air pump control and solenoid valve control due to excessive sampling. The calibration period is set to 5 seconds to 15 seconds. This setting is derived from the engineering preset time required for the wearer to achieve natural extension and stable holding. The advantage of this setting is that it provides sufficient static samples for each finger channel without extending the rehabilitation training start-up waiting time.
[0033] Furthermore, timestamps are used to associate each raw sample value with the sampling time, finger channel identifier, and pneumatic action status, including positive pressure output state of the air pump, negative pressure output state of the air pump, relay flip-flop state, and solenoid valve switching state. For existing projects using... to or to Receive Flex output, by to The connection method for output relay control level, wherein to This indicates the input port numbers, from bit 0 to bit 4, of the P3 port of the 51 microcontroller. to This indicates the spare input port number from bit 0 to bit 4 of port P1. to This indicates the relay control output port number from bit 0 to bit 5 of port P2. The input port sample value and the output port toggle time can be written into the same time window to form the data basis for subsequent elimination of pneumatic switching segments.
[0034] Furthermore, the static sample set consists of sampled values when the glove is uninflated, not triggered by pneumatic action, and naturally extended, while the motion candidate sample set consists of sampled values during active finger bending, passive bending, or bending induced by the airbag of the rehabilitation glove. For short-term level glitches after the solenoid valve or relay flips, this embodiment sets the pneumatic switching protection interval to 50 to 150 milliseconds before and after the flipping moment. This setting is derived from the engineering margins for relay contact action, solenoid valve response, and microcontroller port jitter. The advantage of this setting is that it avoids misinterpreting transient interference caused by pneumatic switching as finger bending.
[0035] For the static sample set, calculate the static baseline, static noise amplitude, and static trigger ratio for each finger channel. For the moving candidate sample set, calculate the bending response span and response duration for each finger channel. Using the static baseline as the threshold center, and the static noise amplitude, bending response span, and static trigger ratio as threshold boundary correction inputs, generate the bending entry and bending exit boundaries for each finger channel. Construct a dynamic threshold pair using the bending entry and bending exit boundaries, maintaining a threshold interval determined by the bending response span relative to the bending exit boundary. At the end of each sliding time window, update the static baseline and dynamic threshold pair using only data not marked as aerodynamic switching segments and not marked as anomalous sampling segments.
[0036] Furthermore, the stationary baseline is used to describe the extension reference level of each finger channel under the current wearing conditions. Unlike manually adjusted comparison threshold potentiometers, the stationary baseline does not directly take a single sampling point, but rather takes the anti-spiking central statistic from the set of stationary samples. In this embodiment, the median or truncated mean is preferably used to construct the stationary baseline, with the truncation ratio set to 5% to 15%. This setting is derived from the engineering observation boundaries of short-time glitches and port jitter in the Flex signal. The advantage of this setting is that it prevents the stationary baseline from being influenced by a small number of outliers. To disclose the calculation method, this embodiment uses the following stationary baseline formula.
[0037]
[0038] in, Indicates finger channel The initial static baseline is derived from the set of static samples within the calibration period, and its range is determined by the sampling conversion accuracy. Indicates finger channel At sampling time The original sampled values are derived from the electrical digital data of the Flex bending signal, and the value range is the output range of the sampling circuit or the range of the unit window trigger duration. This represents the finger channel index, derived from the channel numbers of the thumb, index finger, middle finger, ring finger, and little finger, and is determined by assigning values in finger order. This represents the sampling time index, which is derived from the timestamp of the microcontroller or sampling program, and its value increases with the sampling interval. The sampling window, representing the calibration period, is derived from the natural stretching calibration process and is set to 5 to 15 seconds in this embodiment. This indicates the status of pneumatic operation, derived from the operation records of air pumps, relays, and solenoid valves. The values are either no pneumatic operation or pneumatic operation exists. This indicates pre-labeling of abnormal samples, which originates from the initial screening results of punctures at the sampling port. The value can be either unlabeled or labeled. This represents the median operation, used to obtain the anti-peak center statistic from a static sample set. The determination rule is to take the median position after sorting the sample values.
[0039] The static baseline obtained from the above formula serves as the initial threshold center for each finger channel and is incorporated into the dynamic threshold pair calculation. When zero drift is confirmed in subsequent sliding time windows, the static baseline is adjusted by the update rule.
[0040] Furthermore, the dynamic threshold pair includes a bend-in boundary and a bend-out boundary. The bend-in boundary is used to transition from the extended hold state to the bend-hold state, and the bend-out boundary is used to return from the bend-hold state to the extended hold state. The initial construction of the dynamic threshold pair does not directly use a fixed comparison threshold, but instead simultaneously introduces the static noise amplitude, the bend response span, and the static trigger ratio. The static noise amplitude reflects the sensor's jitter level when not bent, the bend response span reflects the separable distance between the bend data and the static baseline under different hand shapes and wearing tightness, and the static trigger ratio reflects the proportion of triggers that should not have occurred within the calibration period.
[0041] Furthermore, in this embodiment, the sliding time window is set to 1 to 3 seconds, and the sliding step size is set to 0.2 to 1 second. These settings are derived from the duration of the bending motion of the rehabilitation glove, the available storage capacity of the 51 microcontroller, and the online update response requirements. The advantage of this setting is that it allows for threshold updates when the tightness of the glove changes slowly, without altering the baseline due to a single bending motion being too rapid. The minimum interval between the bending entry boundary and the bending exit boundary is set to 8% to 20% of the bending response span. This setting is derived from the statistical results of the response span of the bending sensor. The advantage of this setting is that it reserves a switching range for hysteresis correction.
[0042] Furthermore, the dynamic threshold is calculated according to the following formula, where the bend entry boundary, bend exit boundary, stationary baseline, stationary noise amplitude, bend response span, and stationary trigger ratio are all calculated independently for each finger channel. For connection methods where the Flex signal increases with bend, the bend entry boundary is higher than the bend exit boundary. For connection methods with opposite circuit polarities, it is only necessary to unify the original sampling sequence into a sequence with the bend increase direction being positive during the sampling conversion stage, and the subsequent formulas remain unchanged.
[0043]
[0044]
[0045] in, The value represents the bending entry boundary of the finger channel f within the sliding time window k. It is derived from a combination of the stationary baseline, stationary noise amplitude, bending response span, and stationary trigger ratio, and its value range is constrained by the sampling conversion range. Indicates finger channel In the sliding time window The bend exit boundary is derived from the bend entry boundary and the threshold interval, and the value is set to be lower than the bend entry boundary. Indicates finger channel In the sliding time window The stationary baseline is derived from the statistical results of the stationary hold-up segment, and its range is determined by the sampling conversion accuracy. The static noise correction factor is derived from the online parameter update rules and is set to 1.5 to 4 in this embodiment. This represents the amplitude of stationary noise, derived from the discreteness statistics of a set of stationary samples or a stationary segment, and its value is a non-negative sample value. The bending response span correction coefficient is derived from the hand shape difference index and the wearing tightness index, and is set to 0.08 to 0.30 in this embodiment. The value represents the span of the bending response, derived from the statistical difference between the set of moving candidate samples and the stationary baseline, and is a non-negative sample value. The static triggering percentage correction coefficient is derived from the false triggering tolerance boundary during static calibration. In this embodiment, it is set to 1% to 5% of the sampling range. This represents the percentage of static triggers, derived from the ratio of unexpected trigger samples to the total number of samples within the calibrated time period or sliding window, with a value ranging from 0 to 1. The threshold interval is derived from the bending response span, and in this embodiment it is set to 8% to 20% of the bending response span. This represents the sliding time window index, which is derived from the time window sequence number divided by the sliding step size, and the value is incremented window by window.
[0046] The aforementioned dynamic threshold serves as the input for the hysteresis state switching in step S2, and also as the source of the multi-level bending state grading boundary in step S3.
[0047] It should be noted that the technical difference in this step lies in transforming the existing rehabilitation glove project's single-switch logic, which directly triggers the relay via the FlexDO pin, into a process of constructing a static baseline and dynamic threshold pair for each finger channel. This establishes a calculable data foundation for subsequent zero-drift compensation and multi-level bending state output.
[0048] S2: Perform zero drift compensation and hysteresis anomaly correction on the bending signal.
[0049] The static baseline, dynamic threshold pairs, static sample set, and motion candidate sample set obtained in step S1 are used as inputs for this step. Within the current sliding time window, a static holding segment is identified for each finger channel. The difference between the center statistic of the static holding segment and the initial static baseline is determined as the zero-drift offset. When the continuous directional maintenance relationship of the zero-drift offset satisfies the drift determination condition, the zero-drift offset is subtracted from the original sampling sequence of the current finger channel to form a zero-drift compensation bending sequence. When the zero-drift offset coincides with the start of the air pump, relay flipping, or solenoid valve switching in time, the corresponding sampling segment is marked as an aerodynamic disturbance segment, and the corresponding sampling segment is prohibited from participating in static baseline updates.
[0050] Furthermore, a static hold segment refers to a sampling segment within the current sliding time window where there is no infrared remote control command triggering, no relay output flipping, no solenoid valve switching, and the hold marker remains continuously in an extended hold state. Because the Flex sensor in the rehabilitation glove project is fixed to the mirrored glove via adhesive or stitching, differences in wearer hand shape, the initial angle of sensor bending, and fabric rebound will cause the static sampling level to shift over time. The zero-drift offset is used to describe the slow, variable shift of the current static hold segment relative to the initial static baseline, rather than describing the actual degree of finger flexion.
[0051] Furthermore, in this embodiment, the zero-drift determination window is set to 2 to 5 consecutive sliding time windows. This setting is based on the physical constraints that variations in wearing tightness and the slow drift of the Flex resistor will not be completed within a single sampling point. This setting helps avoid misjudging a single aerodynamic impact as zero drift. The drift determination condition is that the sign of the zero-drift offset is consistent within the consecutive windows, and its absolute value is greater than 1.5 to 3 times the static noise amplitude. This setting is based on static sample statistics and sensor noise boundaries. This setting ensures that zero-drift compensation only applies to stable, slowly varying offsets.
[0052] Furthermore, the identification of pneumatic disturbance segments is based on the positive and negative pressure outputs of the air pump, the actuation of the solenoid valve, and the timing of relay switching in the project. Since the pneumatic actuator and control unit share a power supply or are located in the same control box, relay contact switching may cause transient changes at the sampling end, and solenoid valve actuation may also generate short-term mechanical disturbances through the airbag moving the glove fabric. Therefore, this embodiment does not use pneumatic disturbance segments as the basis for updating the static baseline, but rather reserves them for abnormal sampling filtering and state confidence calculation.
[0053] Furthermore, to disclose the zero-drift compensation calculation method, this embodiment adopts the following formula. The formula uses the difference between the center statistic of the current stationary segment and the initial stationary baseline as the zero-drift offset, and subtracts the zero-drift offset from the original sampling sequence of the current finger channel to obtain the zero-drift compensation bending sequence. For the case where a comparator output state sequence is used, the trigger duration within a unit window is used as the value of the original sampling sequence before executing the same compensation logic.
[0054]
[0055]
[0056] in, Indicates finger channel In the sliding time window The zero drift offset is derived from the difference between the center statistic of the current stationary segment and the initial stationary baseline, and can be positive, negative or zero. This represents the central statistic of the current stationary segment, derived from the median or truncated mean of the stationary segments within the sliding time window. Its range is determined by the sampling conversion precision. Indicates finger channel The initial stationary baseline is derived from the calibration period of step S1, and its range is determined by the sampling conversion accuracy. This indicates a zero-drift compensated bending sequence in the finger channel. and sampling time The value of is derived from the original sampled value after deducting the zero drift offset. Indicates finger channel At sampling time The original sampled values are derived from the electrical digital data of the Flex bending signal. This indicates the finger channel index, derived from the five finger channel numbers. This represents the sliding time window index, which is derived from the sliding time window partitioning result. This represents the sampling time index, which is derived from the sampling timestamp.
[0057] The zero-drift compensation bending sequence obtained by the above formula is used for subsequent anomaly sampling judgment and hysteresis boundary comparison. When the zero-drift offset is marked as being synchronized with aerodynamic actions, the corresponding sampling segment does not enter the static baseline update.
[0058] Within each finger channel, the zero-drift compensated bending sequence is compared with the bending entry and bending exit boundaries. A bending hold marker is generated when the previous sampling time was in the extended hold state and the current sampled value crosses the bending entry boundary. An extended hold marker is generated when the previous sampling time was in the bending hold state and the current sampled value falls back to within the bending exit boundary. When the current sampled value is between the bending entry and bending exit boundaries, the hold marker from the previous sampling time is retained. Before generating the hold markers, anomaly sampling markers are constructed using adjacent sampling differences, median deviation within the window, and aerodynamic disturbance segment identifiers. The sampled values corresponding to the anomaly sampling markers are compared using neighborhood statistical substitution values, ensuring that the state switching of the same finger channel is jointly defined by the hysteresis boundary and the anomaly sampling markers.
[0059] Furthermore, the flexion retention and extension retention markers are not directly obtained from a single threshold comparison, but are determined by the hysteresis interval formed by the flexion entry and flexion exit boundaries. If the zero-drift compensated flexion sequence is between the flexion entry and flexion exit boundaries, the retention marker continues the value from the previous sampling time. A state switch only occurs when the sequence crosses the corresponding boundary. The hysteresis interval is used to adapt to the mechanical hysteresis during the inflation and deflation of the rehabilitation glove's airbag and the rebound hysteresis of the Flex sensor, ensuring that the output state remains continuous with the actual finger movement process.
[0060] Furthermore, anomaly sampling markers are used to handle outliers caused by isolated spikes, port jitter, and aerodynamic disturbance segments. In this embodiment, the adjacent sampling difference boundary is set to the 95th to 99th percentile of the absolute difference within the current sliding time window, and the median deviation boundary within the window is set to 3 to 6 times the stationary noise amplitude. These settings are derived from calibration sample statistics and Flex channel sampling resolution. The advantage of this setting is that it can filter isolated abrupt changes without deleting true, continuous bending data. For sampled values marked as anomalous samples, neighborhood statistical replacement values are used in hysteresis comparisons, with the neighborhood length set to 3 to 7 sampling points.
[0061] Furthermore, the hysteresis-anomaly joint correction is performed in the following order: first anomaly sampling and judgment, then boundary comparison, and finally, record updating. First, anomaly sampling and judgment prevents spikes from directly crossing bends into boundaries and causing false triggering. Then, boundary comparison allows for the use of different boundaries for bend entry and exit. Finally, updating the record allows for the formation of state memory. To disclose the calculation process of anomaly sampling and hysteresis updating, this embodiment uses the following state update formula:
[0062]
[0063]
[0064] in, Indicates finger channel At sampling time The abnormal sampling marker is determined by the median deviation within the window and the difference between adjacent samples, and its value is 0 or 1. This indicates an indicator function derived from the result of a logical judgment. It takes the value 1 when the judgment condition is true and 0 when the judgment condition is false. This represents the median deviation within the window, derived from the absolute deviation between the zero-drift compensated curved sequence and the neighborhood median, and is a non-negative sampled value. The value represents the median deviation boundary within the window. In this embodiment, it is set to 3 to 6 times the static noise amplitude, derived from the calibration sample statistics. This represents the difference between adjacent samples, which comes from the absolute difference between the current sample value and the previous sample value, and takes the value of a non-negative sample value. This represents the boundary of adjacent sampling differences. In this embodiment, it is set to the 95th to 99th percentile of the absolute difference of the current window, which is derived from the sliding window statistics. Indicates finger channel At sampling time The hold flag is derived from the bend entry boundary, bend exit boundary, and the hold flag at the previous sampling time, and its value is either stretch hold or bend hold. This represents the hysteresis mapping function, and the determination rules are as follows: when the sampled value crosses the bend and enters the boundary, output bend hold; when the sampled value falls back to within the bend exit boundary, output stretch hold; and when the sampled value is between the two boundaries, the previous sampling time retains the hold flag. The value represents the abnormal correction sample value, which comes from the neighborhood statistical replacement corresponding to the abnormal sample label or the retention of the unlabeled sample value. The range of the value is determined by the sampling transformation accuracy. This indicates that the bend enters the boundary, which is derived from the dynamic threshold pair of step S1. This indicates the bending exit boundary, derived from the dynamic threshold pair of step S1. The hold flag at the previous sampling time is derived from the recursive result of this formula.
[0065] The above formula first obtains the abnormal sampling marker, and then uses the abnormal correction sampling value to participate in the hysteresis boundary comparison. The marker is kept as input for the historical trigger rate index and multi-level bending state determination in step S3.
[0066] Furthermore, this step outputs a zero-drift compensation bending sequence, aerodynamic disturbance segments, anomaly sampling markers, and hold markers. The zero-drift compensation bending sequence serves as a continuous input for subsequent multi-level state determinations, the anomaly sampling markers serve as a deduction input for subsequent state confidence values, and the hold markers serve as a source of historical trigger rate indicators. These output names remain consistent throughout step S3 to ensure a closed-loop data flow from baseline modeling and sliding window updates to threshold output.
[0067] It should be noted that the technical problem addressed in this step is not to solve the general sensor filtering problem, but rather to solve the threshold false triggering problem caused by the superposition of Flex bending signals, relay flipping, solenoid valve action, and airbag mechanical hysteresis in pneumatic rehabilitation gloves. Zero drift compensation, aerodynamic disturbance segment elimination, and hysteresis boundary memory have a clear data connection relationship and are not simply parallel to conventional filtering and conventional threshold judgment.
[0068] S3: Update parameters and output multi-level bending states based on wearing tightness, hand shape differences and historical trigger rate.
[0069] The zero-drift compensation bending sequence, aerodynamic disturbance segment, abnormal sampling marker, and holding marker obtained in step S2 are used as inputs for this step. A wearing tightness index is constructed based on the short-term jitter amplitude and bending response hysteresis in the static holding segment. A hand shape difference index is constructed based on the initial static baseline, bending response span, and response order between adjacent finger channels for each finger channel. A historical trigger rate index is constructed based on the proportion, duration, and number of consecutive triggers of bending holding markers within the most recent multiple sliding time windows. The wearing tightness index, hand shape difference index, and historical trigger rate index are used together as inputs to the parameter update rule to update the static baseline update step size, threshold boundary correction coefficient, abnormal sampling judgment boundary, and state holding duration for each finger channel online. When the bending entry boundary after parameter update is lower than the corresponding bending exit boundary, the threshold interval between the bending entry boundary and the bending exit boundary is restored according to the bending response span. In this embodiment, at least six recent multiple sliding time windows are used.
[0070] Furthermore, the tightness index reflects the fit between the mirrored glove and the Flex sensor on the wearer's hand. If the fit is too loose, the static hold segment will exhibit increased short-term jitter amplitude, increased flex response hysteresis, and unstable trigger duration. If the fit is too tight, the initial static baseline may deviate from the sensor's natural extension level, and the flex response span may be compressed. The hand shape difference index reflects the inter-channel differences caused by different wearers' finger lengths, joint range of motion, and sensor fixation positions. The historical trigger rate index reflects the pattern of flex hold marker occurrences within recent sliding time windows.
[0071] Furthermore, in this embodiment, the wearing tightness index is set to a value range of 0 to 1. This value is derived from a normalized combination of short-term jitter amplitude and bending response hysteresis. This setting facilitates coupling with the hand shape difference index and historical trigger rate index within the same parameter update rule. The hand shape difference index is also set to a value range of 0 to 1. This value is derived from the deviation of the initial static baseline and bending response span of each finger channel from the statistical center of the five-finger channels. This setting avoids using the exact same threshold boundary correction amplitude for the thumb, little finger, and middle three fingers.
[0072] Furthermore, the historical trigger rate metric is calculated based on the most recent 5 to 20 sliding time windows. Its setting is derived from the duration of single-finger, multi-finger, and grasping movements during rehabilitation training. This setting helps identify trends of prolonged false triggers and prolonged missed triggers. The target trigger rate is not a fixed value subjectively input by the user, but is jointly determined by the training mode, the duration of the most recent flexion-hold marker, and the action matching requirements received by the control layer. For the current project scenario where infrared buttons one to five correspond to single-finger training, button six to multi-finger training, and buttons seven to nine to sequential or finger-to-finger training, the training mode can be used as the boundary source for the target trigger rate.
[0073] Furthermore, to disclose the calculation method for online parameter updates, this embodiment adopts the following formula. The formula combines the wearing tightness index, hand shape difference index, and historical trigger rate index into the threshold boundary correction coefficient, and limits the updated parameter range through a limiting function. The lower and upper limits of the limiting function are derived from the statistical results of the calibration samples to prevent the loss of separability between the bending entry and bending exit boundaries during online updates.
[0074]
[0075] in, Indicates finger channel The static noise correction coefficient for the next sliding time window is derived from the online parameter update rules, and in this embodiment, the range is limited to 1.5 to 4. Indicates finger channel The static noise correction coefficient in the current sliding time window is derived from the dynamic threshold calculation in step S1. This represents the limiting function, which originates from the parameter safety boundary setting. The rule for determining the limit is to take the lower limit if the value is below the lower limit and to take the upper limit if the value is above the upper limit. The weight for adjusting the tightness of the fit is determined by engineering presets and is set to 0.05 to 0.25 in this embodiment. The tightness indicator is derived from the short-term vibration amplitude and bending response hysteresis, and its value ranges from 0 to 1. The weight for updating hand shape differences is derived from the statistics of the calibration sample and is set to 0.03 to 0.2 in this embodiment. The hand shape difference index is derived from the initial static baseline, bending response span, and response sequence of adjacent finger channels, and its value ranges from 0 to 1. The historical trigger rate update weight is derived from the training mode trigger boundary and is set to 0.05 to 0.30 in this embodiment. The historical trigger rate indicator is derived from the percentage of occurrences and duration of the bend-hold marker within the most recent 5 to 20 sliding time windows, with a value ranging from 0 to 1. This represents the target trigger rate, which is derived from the matching requirements of the training mode and the control layer action, and its value ranges from 0 to 1. This represents the lower limit of the static noise correction factor, which is set to 1.5 in this embodiment, derived from the safety margin of static noise. This represents the upper limit of the static noise correction factor, which is set to 4 in this embodiment, derived from the engineering boundary to avoid missed triggers.
[0076] The updated coefficients obtained from the above formula are written back to the dynamic threshold calculation in step S1, and the abnormal sampling judgment boundary and state holding time are updated synchronously. If the updated bending entry boundary and bending exit boundary intersect, the minimum threshold interval is restored according to the bending response span.
[0077] For each finger channel, a joint determination is made based on the zero-drift compensation bending sequence, dynamic threshold pair, and hold marker, classifying each finger channel into extended, slightly bent, moderately bent, and severely bent states. For sampling moments near the boundary of adjacent bending states, a state confidence value is generated by combining abnormal sampling markers and historical trigger rate indicators. The finger channel identifier, bending state level, state confidence value, and state hold duration are encapsulated into bending state output data and sent to the rehabilitation glove control layer in channel order from thumb to little finger, allowing the control layer to match actions to relays, solenoid valves, and positive and negative pressure outputs of the air pump.
[0078] Furthermore, the multi-level bending states are not a single switching quantity of relay closing or opening, but rather hierarchical data for the control layer of the rehabilitation glove. The extended state indicates that the finger channel maintains natural extension. The mild bending state indicates that the sampled value is close to the bending exit boundary but has not reached the moderate boundary. The moderate bending state indicates that the sampled value is stably within the bending range outside the dynamic threshold pair. The severe bending state indicates that the sampled value is close to the upper limit of the bending response under the current wearing conditions. The control layer can adjust the action matching of relays, solenoid valves, and the positive and negative pressure outputs of the air pump according to the bending state level, without having to treat all bends as the same switching result.
[0079] Furthermore, in this embodiment, the boundary for a mild bending state is set as the interval between the bending exit boundary and the bending entry boundary; the boundary for a moderate bending state is set as the interval between the bending entry boundary and 50% of the bending response span; and the boundary for a severe bending state is set as the interval exceeding the moderate bending state boundary. These settings are derived from the bending response span of each finger channel, rather than a fixed voltage value. This setting ensures consistent state meaning even with different hand shapes, varying wearing tightness, and different initial bending degrees of the sensors. The state retention time is set to 80 milliseconds to 300 milliseconds. This setting is derived from the minimum perceptible duration of the airbag inflation / deflation action and the hand bending action. This setting helps avoid frequent jumps in state level at adjacent boundaries.
[0080] Furthermore, the state confidence is used to describe the reliability of the output bending state. If the proportion of abnormal sampling markers in the current state holding segment increases, the state confidence decreases. If the historical trigger rate index deviates from the target trigger rate for a long period, the state confidence is also adjusted accordingly. If the holding markers remain continuous and stable, the state confidence remains in a high range. To disclose the multi-level state generation method, this embodiment adopts the following formula, where the hierarchical boundaries in the formula are all derived from the aforementioned dynamic threshold pairs and bending response span.
[0081]
[0082]
[0083] in, Indicates finger channel At sampling time The bending state level is derived from the anomaly correction sample value, dynamic threshold pair, and bending response span, with values corresponding to extension, mild bending, moderate bending, and severe bending. This represents a multi-level state mapping function, and the determination rule is to divide the bending into extension, mild bending, moderate bending, and severe bending according to the bending exit boundary, bending entry boundary, and bending response span. This indicates the abnormal correction sample value, which comes from the abnormal sampling replacement result of step S2. This indicates the bending exit boundary, derived from the dynamic threshold pair of step S1. This indicates that the bend enters the boundary, which is derived from the dynamic threshold pair of step S1. The span of the bending response is derived from the set of motion candidate samples and the statistical results of the sliding time window. This represents the state confidence level, derived from the percentage of abnormal sampling and the deviation of historical trigger rate, with a value ranging from 0 to 1. The percentage of abnormal sampling is deducted as a weight, which is derived from the engineering preset and is set to 0.2 to 0.6 in this embodiment. This indicates the percentage of abnormal sampling markers within the current state segment, derived from the abnormal sampling markers in step S2, with a value range of 0 to 1. The deviation of the historical trigger rate from the deduction weight is due to the stability requirements of the training mode, which is set to 0.1 to 0.5 in this embodiment. The historical trigger rate metric is derived from the statistical results of the bending hold markers within multiple recent sliding time windows. This represents the target trigger rate, which is derived from the matching requirements of the training mode and the control layer actions.
[0084] The bending state level and state confidence value generated by the above formula are encapsulated together as bending state output data and sent to the control layer in channel order to match the relay, solenoid valve, positive pressure output of air pump and negative pressure output of air pump.
[0085] Furthermore, the bending state output data includes a finger channel identifier, bending state level, state confidence value, and state hold duration. The finger channel identifier is used to distinguish between the thumb and little finger. The bending state level is used to replace a single switching quantity. The state confidence value is used by the control layer to determine whether to delay execution or maintain the current action. The state hold duration is used by the control layer to determine whether the action of the relay and solenoid valve needs to be continued. The bending state output data can be implemented through the microcontroller's internal data structure, serial communication frames, or the control layer reading the buffer. This embodiment does not limit innovation to communication hardware, but rather to the output data content and generation logic.
[0086] It should be noted that this step uses wearing tightness, hand shape differences, and historical trigger rate as inputs for online parameter updates, and converts the dynamic threshold results into multi-level bending states for the control layer. Those skilled in the art in existing FlexDO control relay schemes typically only obtain closed or open switching quantities, and do not naturally obtain bending state output data that can distinguish between mild, moderate, and severe bending and carries confidence values.
[0087] Example 2, an embodiment of the present invention, provides a self-calibration system for the bending signal threshold of a rehabilitation glove, including a baseline threshold construction module, a signal joint correction module, and a state grading output module.
[0088] The baseline threshold construction module is used to collect electrical digital data of the flexion signal of each finger and construct a static baseline and dynamic threshold.
[0089] The signal joint correction module is used to perform zero drift compensation and hysteresis anomaly joint correction on bending signals.
[0090] The status grading output module is used to update parameters and output multiple levels of bending status based on wearing tightness, hand shape differences and historical trigger rate.
Claims
1. A method for self-calibrating the bending signal threshold of a rehabilitation glove, characterized in that, include: Collect electrical digital data of the flexion signal of each finger to construct a static baseline and dynamic threshold; Zero drift compensation and hysteresis anomaly correction are performed on the bending signal; The parameters are updated based on wearing tightness, hand shape differences, and historical trigger rate, and multi-level bending states are output.
2. The self-calibration method for the bending signal threshold of rehabilitation gloves as described in claim 1, characterized in that: The collected digital data of each finger's flexion signal includes, The thumb, index finger, middle finger, ring finger, and little finger are each treated as an independent finger channel. The electrical digital data output by the Flex2.2 unidirectional curvature sensor and converted by sampling on each finger channel is time-stamped. During the calibration period when the rehabilitation glove body is in an uninflated state and the mirror glove is in a naturally extended state, the original sampling sequence, sampling duration, trigger duration, and channel identifier of each finger channel are recorded. Sampling segments that occur simultaneously with the start of the air pump, relay flipping, or solenoid valve switching are removed to obtain a static sample set and a motion candidate sample set.
3. The self-calibration method for the bending signal threshold of rehabilitation gloves as described in claim 2, characterized in that: The construction of the static baseline and dynamic threshold includes, For the static sample set, calculate the static baseline, static noise amplitude, and static trigger ratio separately for each finger channel; For the motion candidate sample set, calculate the bending response span and response duration separately for each finger channel; Using the stationary baseline as the threshold center, and the stationary noise amplitude, bending response span, and stationary trigger ratio as the threshold boundary correction inputs, the bending entry boundary and bending exit boundary of each finger channel are generated. The bend entry boundary and the bend exit boundary are configured as a dynamic threshold pair, and the bend entry boundary is kept at a threshold interval determined by the bend response span relative to the bend exit boundary. At the end of each sliding time window, the stationary baseline and dynamic threshold pair are updated only with data that are not marked as a pneumatic switching segment and not marked as an anomalous sampling segment.
4. The self-calibration method for the bending signal threshold of rehabilitation gloves as described in claim 3, characterized in that: The zero-drift compensation for the bending signal includes... Within the current sliding time window, identify the static hold segment for each finger channel, and determine the difference between the center statistic of the static hold segment and the initial static baseline as the zero drift offset; When the continuous directional relationship of the zero drift offset satisfies the drift judgment condition, the zero drift offset is subtracted from the original sampling sequence of the current finger channel to form a zero drift compensation bending sequence. When the zero drift offset coincides with the start of the air pump, the flipping of the relay, or the switching of the solenoid valve in time, the corresponding sampling segment is marked as an aerodynamic disturbance segment, and the corresponding sampling segment is prohibited from participating in the static baseline update.
5. The self-calibration method for the bending signal threshold of rehabilitation gloves as described in claim 4, characterized in that: The joint correction of hysteresis anomalies includes, Within each finger channel, the zero-drift compensation bending sequence is compared with the bending entry boundary and the bending exit boundary. When the previous sampling time is in the stretch hold state and the current sampling value crosses the bending entry boundary, a bending hold marker is generated. When the previous sampling time was in the bending hold state and the current sampling value falls back to within the bending exit boundary, a stretch hold marker is generated; When the current sampled value is located between the bend entry boundary and the bend exit boundary, the hold flag from the previous sampling time is used; Before maintaining the generation of the marker, anomaly sampling markers are constructed using adjacent sampling differences, median deviation within the window, and aerodynamic disturbance segment identifiers. The sampling values corresponding to the anomaly sampling markers are compared using neighborhood statistical replacement values. The state switching of the same finger channel is jointly defined by the hysteresis boundary and the anomaly sampling markers.
6. The self-calibration method for the bending signal threshold of rehabilitation gloves as described in claim 5, characterized in that: The parameters updated based on wearing tightness, hand shape differences, and historical trigger rate include: The wearing tightness index is constructed based on the short-term jitter amplitude and bending response hysteresis in the static holding segment; A hand shape difference index is constructed based on the initial static baseline, bending response span, and response sequence between adjacent finger channels for each finger channel; A historical trigger rate metric is constructed based on the percentage of occurrences, duration, and number of consecutive triggers of the bend-hold marker within the most recent sliding time window. The wear tightness index, hand shape difference index, and historical trigger rate index are used as input parameters to update the rules, and the static baseline update step size, threshold boundary correction coefficient, abnormal sampling judgment boundary, and state holding duration of each finger channel are updated online. When the updated bend entry boundary is lower than the corresponding bend exit boundary, the threshold interval between the bend entry boundary and the bend exit boundary is restored according to the bend response span.
7. The self-calibration method for the bending signal threshold of rehabilitation gloves as described in claim 6, characterized in that: The output multi-level bending state includes, The zero-drift compensation bending sequence, dynamic threshold pair, and retention mark of each finger channel are jointly determined to classify each finger channel into extended state, slightly bent state, moderately bent state, and severely bent state. For sampling moments near the boundary of adjacent curved states, a state confidence value is generated by combining abnormal sampling markers and historical trigger rate indicators. The finger channel identifier, bending state level, state confidence value, and state holding duration are encapsulated into bending state output data and sent to the rehabilitation glove control layer in the order of thumb to little finger, so that the control layer can match the actions of relays, solenoid valves, positive pressure output of air pump, and negative pressure output of air pump.
8. A self-calibration system for the bending signal threshold of a rehabilitation glove, employing the self-calibration method for the bending signal threshold of a rehabilitation glove as described in any one of claims 1 to 7, characterized in that: Includes a baseline threshold construction module, a signal joint correction module, and a state classification output module; The baseline threshold construction module is used to collect the electrical digital data of the Flex bending signal of each finger to construct a static baseline and a dynamic threshold. The signal joint correction module is used to perform zero drift compensation and hysteresis anomaly joint correction on the bending signal; The state grading output module is used to update parameters and output multiple levels of bending states based on wearing tightness, hand shape differences, and historical trigger rate.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the self-calibration method for the bending signal threshold of the rehabilitation glove as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the self-calibration method for the bending signal threshold of the rehabilitation glove as described in any one of claims 1 to 7.