Vertical ladder running path sensing method based on sensor data

Through the quaternion conversion and Fourier transform of nine-axis sensor data, the problems of poor generalization of sensors in outdoor environments and difficulty in quantifying cross-floor data are solved, and accurate perception and status detection of the elevator's running path are achieved.

CN120628057APending Publication Date: 2025-09-12NANHUA UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510727741.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing sensor-based activity recognition technologies have poor generalization in outdoor environments, making it difficult to obtain comprehensive data. Furthermore, it is difficult to obtain cross-floor data directly from raw data. This is especially true in scenarios involving strenuous exercise or when the device is not worn in a fixed position, making it prone to misjudgment and difficult to distinguish between different motion patterns.

Method used

It uses nine-axis sensor data, including a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer. Through quaternion conversion and error compensation, it uses Fourier transform to extract gravity acceleration, and combines integration to calculate the elevator's ascent or descent state and distance.

Benefits of technology

It achieves accurate identification of elevator paths in outdoor environments, improves the model's generalization and cross-floor data quantification capabilities, reduces misjudgments, and automatically detects the status of pedestrians riding elevators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120628057A_ABST
    Figure CN120628057A_ABST
Patent Text Reader

Abstract

The invention provides a vertical ladder running path sensing method based on sensor data. The vertical ladder running path sensing method comprises the following steps: acquiring nine-axis sensor data by using wearable equipment; extracting stable features from the nine-axis sensor data; the measured value of the accelerometer is converted into an earth coordinate system based on the restored attitude, and Fourier transform denoising is carried out on the converted measured value of the acceleration to obtain geocentric acceleration; an overweight time point and a weightlessness time point in the path are identified to estimate whether the vertical ladder is in an ascending or descending state and a distance of ascending or descending. According to the sensor data-based vertical ladder running path sensing method provided by the invention, the generalization problems that sample acquisition and labeling are difficult and comprehensive data are difficult to obtain during sensor-based activity identification at present and the quantization problem that cross-floor data is directly obtained from original data is difficult are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mobile positioning, and in particular to a method for sensing an elevator's running path based on sensor data. Background Art

[0002] The technical background of sensor-based activity recognition encompasses multiple aspects, including sensor technology, data processing methods, and application scenarios. The continuous development of sensor-based activity recognition technology has driven innovative applications in fields such as health monitoring, smart homes, and sports training. However, these activities primarily occur indoors, with most of their trajectories occurring horizontally. When pedestrians venture outdoors, the environment becomes more complex, with not only horizontal trajectories but also vertical trajectories, such as those from taking elevators.

[0003] In the existing technology, there are the following problems:

[0004] 1. Generalization Issues: Like all sensor-based activity recognition, comprehensive and sufficient data is difficult to obtain due to sample collection and labeling difficulties, resulting in poor model generalization.

[0005] 2. Cross-layer quantification is difficult: It is difficult to obtain cross-floor data directly from the original data.

[0006] The Chinese invention patent application with application publication number CN114861713A discloses a method for identifying the operating status of a wearable device, the method comprising: obtaining three-axis acceleration data in a short-time domain, and performing low-pass filtering on the three-axis acceleration data; determining the acceleration axis in the direction of gravity based on the three-axis acceleration data after low-pass filtering, and judging whether the current motion state is the first state based on the power ratio of the acceleration of the acceleration axis in the direction of gravity; when the current state is not the first state, calculating the combined acceleration in the short-time domain based on the three-axis acceleration data, and judging whether the current motion state is the second state based on the range of the combined acceleration in the short-time domain; when the current state is not the second state, calculating the spectrum data of the combined acceleration, and judging the current motion state based on the power ratio of the spectrum data in a preset power frequency band. The disadvantage of this method is that it relies on short-term acceleration data to determine the gravity direction axis, which may lead to misjudgment of the gravity direction in scenarios such as strenuous exercise or non-fixed device wearing (such as severe shaking of the wrist device). It does not consider the impact of changes in the device wearing position (such as dynamic changes in the gravity component when the arm swings) on the acceleration axis selection. The combined acceleration range is highly sensitive to sudden noise (such as device collision and instantaneous impact), which may cause misjudgment of the second state. In addition, the range indicator cannot distinguish between scenarios with similar amplitudes but different motion patterns (such as quickly going up and down stairs and running). Only three-axis acceleration data is used, and gyroscope and magnetometer data are not combined. Summary of the Invention

[0007] In order to solve the above-mentioned technical problems, the present invention proposes a method for sensing the elevator path based on sensor data, which solves the current problems of sample collection and labeling difficulties in sensor-based activity recognition, the difficulty in obtaining generalization of comprehensive data, and the difficulty in quantifying cross-floor data directly from raw data.

[0008] The present invention aims to provide a method for sensing the running path of an elevator based on sensor data, comprising obtaining nine-axis sensor data using a wearable device, and further comprising the following steps:

[0009] Step 1: extracting stable features from the nine-axis sensor data;

[0010] Step 2: Based on the restored attitude, the accelerometer measurement value is converted to the Earth coordinate system, and the converted acceleration measurement value is denoised using Fourier transform to obtain the Earth's center acceleration;

[0011] Step 3: Identify the overweight and weightlessness time points in the path to estimate whether the elevator is in an ascending or descending state and the ascending or descending distance.

[0012] Preferably, the nine-axis sensor data includes three-axis accelerometer data a=[a x ,a y ,a z ] T 、Three-axis gyroscope data ω=[ω x ,ω y ,ω z ] T and the three-axis magnetometer data m=[m x ,m y ,m z ] T At least one of the following, wherein x, y, and z are x-axis, y-axis, and z-axis data in the sensor coordinate system.

[0013] In any of the above solutions, preferably, step 1 includes the following sub-steps:

[0014] Step 11: Initialize quaternion q = [q w ,q x ,q y ,q z ] T , where q w is the real part, q x ,q y ,q z is the imaginary part;

[0015] Step 12: Read the nine-axis sensor data, calculate the modulus length of the accelerometer data ‖a‖ and the modulus length of the magnetometer data ‖m‖ and normalize them respectively, and record them as and The copied gyroscope data is recorded as the initial value of error compensation Omega;

[0016] Step 13: Convert the initial quaternion into the rotation matrix R, and convert the theoretical value of the earth's gravity in the inertial coordinate system to the current posture as the theoretical gravity direction;

[0017] Step 14: Rotate the magnetometer measurement value to the inertial coordinate system, calculate the modulus of the horizontal component of the magnetometer data and the magnetic field reference vector, and normalize them;

[0018] Step 15: Calculate gravity error, magnetic field error and error angular velocity;

[0019] Step 16: Calculate the gyroscope bias using the integral gain and compensate for the error using the proportional gain.

[0020] Step 17: Calculate the quaternion change rate and update the quaternion using Euler integral to ensure the normalization of the quaternion.

[0021] In any of the above solutions, it is preferred that the accelerometer data is normalized The calculation formula is

[0022]

[0023] In any of the above solutions, it is preferred that the magnetometer data is normalized The calculation formula is

[0024]

[0025] In any of the above solutions, preferably, the formula for the theoretical gravity direction is:

[0026] V a =R T ×g

[0027] Where T is the transpose, g is the theoretical value of the earth's gravity in the inertial coordinate system [0,0,1] T .

[0028] In any of the above solutions, preferably, the formula for rotating the magnetometer measurement value to the inertial coordinate system is:

[0029] h=R×m

[0030] Among them, h is the rotated magnetometer data, and m is the magnetometer data.

[0031] In any of the above solutions, preferably, the modulus of the horizontal component of the magnetometer data is

[0032]

[0033] Among them, h x is the x-axis data of the rotated magnetometer data in the inertial coordinate system, h y is the y-axis data of the rotated magnetometer data in the inertial coordinate system.

[0034] In any of the above solutions, preferably, the formula of the magnetic field reference vector is:

[0035]

[0036] Among them, h z is the z-axis data of the rotated magnetometer data in the inertial coordinate system.

[0037] In any of the above schemes, preferably, the gravity error is the cross product of the direction measured by the accelerometer and the theoretical gravity direction, the magnetic field error is the cross product of the direction measured by the magnetometer and the magnetic field reference vector, and the error angular velocity is the sum of the gravity error and the magnetic field error, and the formula is:

[0038] mes=a×V a +m×V m .

[0039] In any of the above solutions, preferably, the formula for the gyroscope bias is:

[0040] b=-K I ×mes

[0041] Among them, K I is the integral gain used to estimate and compensate for the long-term deviation of the gyroscope measurement value. In any of the above solutions, it is preferred that the error compensation formula is

[0042] Ω=Omega-b+(K p ×mes)

[0043] Among them, K p The proportional gain is used to directly correct the instantaneous error of the gyroscope measurement value.

[0044] In any of the above solutions, preferably, the formula for the quaternion change rate is:

[0045]

[0046] Where p is a column vector, is quaternion multiplication.

[0047] In any of the above solutions, it is preferred to use Euler integral to update the quaternion, the formula is

[0048]

[0049] Among them, Δt is the time difference corresponding to the sensor sampling frequency F, that is,

[0050]

[0051] In any of the above solutions, preferably, step 2 includes the following sub-steps:

[0052] Step 21: Convert the quaternion to a rotation matrix

[0053] Step 22: Use the rotation matrix R to perform a positive rotation on the accelerometer measurements.

[0054]

[0055] Step 23: Acceleration data a obtained above earth Perform Fourier transform to obtain the frequency domain representation A(f), where A(f) is the signal a earth Amplitude and phase information at frequency f;

[0056] Step 24: Extract the low-frequency part A from the Fourier transformed frequency domain signal through the filter low (f);

[0057] Step 25: Low-pass filtered frequency domain signal A low (f) Return to the time domain through inverse Fourier transform to obtain the extracted gravitational acceleration a g .

[0058] In any of the above solutions, preferably, the low-frequency part A low The formula for (f) is

[0059]

[0060] Among them, f c is the cutoff frequency.

[0061] In any of the above solutions, it is preferred that the gravity acceleration part a g The formula is

[0062] a g =IFFT(A low (f))

[0063] Among them, f c is the cutoff frequency, and IFFT() is the inverse Fourier transform.

[0064] In any of the above solutions, preferably, step 3 includes the following sub-steps:

[0065] Step 31: Analyze the overweight time point and the weightlessness time point based on the extracted gravitational acceleration representation to determine the elevator's ascending or descending range;

[0066] Step 32: Estimate the ascending or descending distance by using integration according to the ascending or descending interval.

[0067] In any of the above solutions, preferably, the method for determining the ascending or descending section of the elevator is:

[0068] (1) When the elevator accelerates upward, it appears to be overloaded, i.e. a g Greater than g; when running smoothly, that is, a g Equal to g; when decelerating and rising, it manifests as weightlessness, that is, a g Less than g;

[0069] (2) When the elevator accelerates and descends, it is manifested as weightlessness, i.e. a g Less than g; when running smoothly, that is, a g Equal to g; when descending and slowing down, it appears to be overweight, i.e. a g Greater than g.

[0070] In any of the above solutions, it is preferred that the calculation formula for the rising or falling distance is:

[0071]

[0072] Among them, v(t) is the real-time speed of the elevator, d(t) is the distance of ascent or descent, and a g (t) is the real-time acceleration, v0 is the initial velocity, t1 and t2 are the start time and end time respectively.

[0073] The present invention proposes a method for sensing the running path of an elevator based on sensor data. Wearable devices are used to measure and process the motion parameters of pedestrians, thereby automatically detecting the status of pedestrians riding the elevator and measuring the trajectory of pedestrians riding the elevator. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 The present invention is a flowchart of a preferred embodiment of a method for sensing an elevator's running path based on sensor data.

[0075] Figure 2 The flowchart is another preferred embodiment of the elevator running path perception method based on sensor data according to the present invention.

[0076] Figure 3The present invention is a schematic diagram of an embodiment of restoring a posture using raw data obtained by the method for sensing the running path of an elevator based on sensor data and obtaining the gravitational acceleration of an object based on the restored posture.

[0077] Figure 4 The present invention is a schematic diagram of an embodiment of the present invention for identifying overweight time points and weightlessness time points in a path to estimate whether the elevator is in an ascending or descending state and the ascending or descending distance according to the method for sensing the elevator running path based on sensor data. DETAILED DESCRIPTION

[0078] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0079] Example 1

[0080] like Figure 1 As shown, a method for sensing the running path of an elevator based on sensor data is shown, in which step 100 is executed to obtain nine-axis sensor data using a wearable device, wherein the nine-axis sensor data includes three-axis accelerometer data a=[a x ,a y ,a z ] T 、Three-axis gyroscope data ω=[ω x ,ω y ,ω z ] T and the three-axis magnetometer data m=[m x ,m y ,m z ] T At least one of the following, wherein x, y, and z are x-axis, y-axis, and z-axis data in the sensor coordinate system.

[0081] Executing step 110 to extract stable features from the nine-axis sensor data includes the following sub-steps:

[0082] Execute step 111, initialize the quaternion q=[q w ,q x ,q y ,q z ] T , where q w is the real part, q x ,q y ,q z is the imaginary part.

[0083] Execute step 112, read the nine-axis sensor data, calculate the accelerometer data modulus ‖a‖, the magnetometer data modulus ‖m‖ and normalize them respectively, and record them as and The copied gyroscope data is recorded as the error compensation initial value Omega.

[0084] Accelerometer data normalization The calculation formula is

[0085]

[0086] Magnetometer data normalization The calculation formula is

[0087]

[0088] Execute step 113 to convert the initial quaternion into a rotation matrix R, and convert the theoretical value of the earth's gravity in the inertial coordinate system to the current posture as the theoretical gravity direction. The formula for the theoretical gravity direction is:

[0089] V a =R T ×g

[0090] Where T is the transpose, g is the theoretical value of the earth's gravity in the inertial coordinate system [0,0,1] T .

[0091] Execute step 114 to rotate the magnetometer measurement value to the inertial coordinate system, calculate the modulus of the horizontal component of the magnetometer data and the magnetic field reference vector, and normalize them. The formula for rotating the magnetometer measurement value to the inertial coordinate system is:

[0092] h=R×m

[0093] Among them, h is the rotated magnetometer data, and m is the magnetometer data.

[0094] The modulus of the horizontal component of the magnetometer data is

[0095]

[0096] Among them, h x is the x-axis data of the rotated magnetometer data in the inertial coordinate system, h y is the y-axis data of the rotated magnetometer data in the inertial coordinate system.

[0097] The formula for the magnetic field reference vector is:

[0098]

[0099] Among them, h z is the z-axis data of the rotated magnetometer data in the inertial coordinate system.

[0100] Execute step 115 to calculate the gravity error, magnetic field error, and error angular velocity. The gravity error is the cross product of the direction measured by the accelerometer and the theoretical gravity direction. The magnetic field error is the cross product of the direction measured by the magnetometer and the magnetic field reference vector. The error angular velocity is the sum of the gravity error and the magnetic field error. The formula is:

[0101] mes=a×V a +m×V m .

[0102] Execute step 116, calculate the gyroscope bias using the integral gain, and perform error compensation using the proportional gain. The formula for the gyroscope bias is:

[0103] b=-K I ×mes

[0104] Among them, K I The integral gain is used to estimate and compensate for the long-term deviation of the gyroscope measurements.

[0105] The error compensation formula is:

[0106] Ω=Omega-b+(K p ×mes)

[0107] Among them, K p The proportional gain is used to directly correct the instantaneous error of the gyroscope measurement value.

[0108] K I and K p Usually a small positive number is used. The specific value needs to be adjusted according to the sensor noise and application scenario. Initialize K p =0.5, K I =0.05 first adjust K p Make the system quickly track the posture changes without obvious oscillation, and then fix K p Adjust K I Eliminate steady-state errors (such as slow drift errors) while avoiding oscillation or instability caused by excessive gain. Verify this by shaking the sensor and observing the attitude convergence speed and stability.

[0109] Execute step 117 to calculate the quaternion change rate and update the quaternion using Euler integral to ensure the normalization of the quaternion. The formula for the quaternion change rate is:

[0110]

[0111]

[0112] Where p is a column vector, is quaternion multiplication.

[0113] Use Euler integral to update the quaternion, the formula is

[0114]

[0115] Among them, Δt is the time difference corresponding to the sensor sampling frequency F, that is,

[0116]

[0117] Executing step 120, based on the restored posture, converting the accelerometer measurement value into the Earth coordinate system, and using Fourier transform to denoise the converted acceleration measurement value to obtain the Earth's center acceleration, including the following sub-steps:

[0118] Execute step 121 to convert the quaternion into a rotation matrix

[0119] Execute step 122 to perform a forward rotation on the accelerometer measurement using the rotation matrix R.

[0120] Execute step 123 to obtain the acceleration data a earth Perform Fourier transform to obtain the frequency domain representation A(f), where A(f) is the signal a earth Amplitude and phase information at frequency f.

[0121] Execute step 124, extract the low-frequency part A from the frequency domain signal after Fourier transformation through the filter low (f), the low-frequency part A low The formula for (f) is

[0122]

[0123] Among them, f c is the cutoff frequency.

[0124] Execute step 125, the frequency domain signal A after low-pass filtering low (f) Return to the time domain through inverse Fourier transform to obtain the extracted gravitational acceleration a g , the formula is

[0125] a g =IFFT(A low (f))

[0126] Among them, IFFT() is the inverse Fourier transform.

[0127] Step 130 is executed to identify the overweight time points and weightlessness time points in the path to estimate whether the elevator is in an ascending or descending state and the ascending or descending distance, including the following sub-steps:

[0128] Execute step 131 to analyze the overweight time point and the weightlessness time point based on the extracted gravitational acceleration representation, thereby determining the elevator's ascending or descending interval. The method for determining the elevator's ascending or descending interval is as follows:

[0129] (1) When the elevator accelerates upward, it appears to be overloaded, i.e. a g Greater than g; when running smoothly, that is, a g Equal to g; when decelerating and rising, it manifests as weightlessness, that is, a g Less than g;

[0130] (2) When the elevator accelerates and descends, it is manifested as weightlessness, i.e. a g Less than g; when running smoothly, that is, a g Equal to g; when descending and slowing down, it appears to be overweight, i.e. a g Greater than g.

[0131] Execute step 132, estimate the ascending or descending distance by using the integral according to the ascending or descending interval, and the calculation formula of the ascending or descending distance is:

[0132]

[0133] Among them, v(t) is the real-time speed of the elevator, d(t) is the distance of ascent or descent, and a g (t) is the real-time acceleration, v0 is the initial velocity, t1 and t2 are the start time and end time respectively.

[0134] Example 2

[0135] This paper discloses a sensor-based elevator path sensing solution, which relates to the field of sensor-based activity recognition. The challenges addressed include: 1. Generalization: As with all sensor-based activity recognition, difficulties in sample collection and labeling make it difficult to obtain comprehensive and sufficient data, resulting in poor model generalization. 2. Difficulty in cross-floor quantification: It is difficult to directly derive cross-floor data from raw data.

[0136] The present invention aims to disclose a solution for sensing the running path of an elevator based on sensor data, which further comprises the following steps:

[0137] 1. Using a nine-axis sensor, pedestrians receive data from the three-axis accelerometer, three-axis gyroscope, and three-axis magnetometer provided by the nine-axis sensor in the wearable device when riding the elevator.

[0138] 2. Extract stable features from the nine-axis sensor data: geocentric acceleration, and use the raw data provided by the nine-axis sensor to restore the sensor posture, usually expressed in the form of quaternions;

[0139] The specific sub-steps are as follows:

[0140] 2.1: Initialize the quaternion, which usually includes the real part (scalar part) and the imaginary part (vector part);

[0141] 2.2: Read sensor data, including the following data: three-axis gyroscope data, three-axis accelerometer data, and three-axis magnetometer data; calculate the modulus of the accelerometer data and magnetometer data and normalize the accelerometer data and magnetometer data; copy the gyroscope data and record it as the initial value for error compensation.

[0142] 2.3: Convert the initial quaternion into a rotation matrix, and convert the theoretical value of the earth's gravity in the inertial coordinate system to the current posture as the theoretical gravity direction.

[0143] 2.4: Rotate the magnetometer measurements to the inertial coordinate system; calculate the modulus of the horizontal component of the magnetometer data and the magnetic field reference vector, and normalize them.

[0144] 2.5: Calculate the cross product of the direction measured by the accelerometer and the theoretical gravity direction mentioned above to represent the gravity error. Calculate the cross product of the direction measured by the magnetometer and the magnetic field reference vector mentioned above to represent the magnetic field error. Calculate the error angular velocity, which is the sum of the above two errors.

[0145] 2.6: Calculate the gyroscope bias using integral gain. Compensate for errors using proportional gain.

[0146] 2.7: Calculate the rate of change of the quaternion and update the quaternion using the Euler integral; finally, ensure the normalization of the quaternion to maintain the properties of the unit quaternion.

[0147] 3. Convert the accelerometer measurement value to the earth coordinate system through the attitude information. Specifically, using the quaternion calculated above and the accelerometer measurement value, there are the following sub-steps: 3.1: Convert the quaternion obtained above into a rotation matrix.

[0148] 3.2: Use the rotation matrix R to positively rotate the accelerometer measurement value. Since gravity is a stable low-frequency signal, the gravity acceleration representation can be extracted from the acceleration data through a low-pass filter, such as Fourier transform.

[0149] 3.3: Perform Fourier transform on the acceleration data obtained above to obtain frequency domain representation.

[0150] 3.4: Extract the low-frequency part from the frequency domain signal after Fourier transform through the filter.

[0151] 3.5: The low-pass filtered frequency domain signal is returned to the time domain through inverse Fourier transform to obtain the extracted gravitational acceleration.

[0152] 4. Based on the extracted gravitational acceleration, analyze the overweight and weightlessness time points to determine the elevator's ascent or descent range, as shown in the following:

[0153] (1) When the elevator accelerates upward, it appears to be overweight; when it is running smoothly, it appears to be unchanged; when it decelerates upward, it appears to be weightless;

[0154] (2) When the elevator accelerates and descends, it appears to be weightless; when it is running smoothly, it appears to be unchanged; when it decelerates and descends, it appears to be overweight;

[0155] After obtaining the ascending and descending intervals, use the integral to estimate the ascending or descending distance;

[0156] The raw sensor data is fed into a neural network, such as a Transformer, and a neural network is used to train a model that can solve such problems and identify the elevator's path.

[0157] Example 3

[0158] like Figure 2 As shown, the purpose of the present invention is to disclose a solution for sensing the running path of an elevator based on sensor data, which also includes the following steps:

[0159] 1. Using the nine-axis sensor, when pedestrians take the elevator, the wearable device receives the data of the three-axis accelerometer, three-axis gyroscope, and three-axis magnetometer provided by the nine-axis sensor, as well as the inherent sampling frequency F of the sensor device.

[0160] Includes the following data:

[0161] Gyroscope data: ω = [ω x ,ω y ,ω z ] T ;

[0162] Accelerometer data: a = [a x ,a y ,a z ] T ;

[0163] Magnetometer data: m = [m x ,m y ,m z ] T .

[0164] Where x, y, and z represent the x-axis, y-axis, and z-axis data in the sensor coordinate system. 2. Use the raw data provided by the nine-axis sensor to restore the sensor posture, usually expressed in the form of quaternions. The specific steps are as follows:

[0165] Step 2.1: Initialize the quaternion, usually set to q = [qw ,q x ,q y ,q z ] T ;q w is the real part (scalar part), q x ,q y ,q z is the imaginary part (vector part).

[0166] Step 2.2: Calculate the modulus length of the accelerometer data ‖a‖ and the modulus length of the magnetometer data ‖m‖ and normalize them respectively, denoted as and The gyroscope data is recorded as the error compensation initial value Omega.

[0167] Accelerometer data normalization The calculation formula is

[0168]

[0169] Magnetometer data normalization The calculation formula is

[0170]

[0171] Step 2.3: Convert the initial quaternion into the rotation matrix R, and convert the theoretical value of the earth's gravity in the inertial coordinate system to the current posture as the theoretical gravity direction;

[0172] V a =R T ×g

[0173] Where T represents transposition, and g is the theoretical value of the earth's gravity in the inertial coordinate system [0,0,1] T Step 2.4: Rotate the magnetometer measurements to the inertial frame:

[0174] h=R×m

[0175] Calculate the modulus of the horizontal component of the above magnetometer data:

[0176]

[0177] And the magnetic field reference vector:

[0178]

[0179] The obtained magnetic field reference vector is then normalized.

[0180] Step 2.5: Calculate the cross product of the direction measured by the accelerometer and the theoretical gravity direction, which represents the gravity error.

[0181] Calculate the cross product of the direction measured by the magnetometer and the magnetic field reference vector above to represent the magnetic field error; calculate the error angular velocity, which is the sum of the above two errors:

[0182] mes=a×V a +m×V m

[0183] Calculate the gyroscope bias using the integral gain calculation:

[0184] b=-K I ×mes

[0185] Error compensation is performed through proportional gain:

[0186] Ω=Omega-b+(K p ×mes)

[0187] where K P =1.0,K I =0.3

[0188] Calculate the quaternion rate of change:

[0189]

[0190] in, is quaternion multiplication

[0191] Update the quaternion using Euler integration:

[0192]

[0193] Where Δt is the time difference corresponding to the sensor sampling frequency F, that is

[0194]

[0195] Finally, make sure to normalize the quaternion to preserve the properties of the unit quaternion.

[0196] like Figure 3 As shown, the measured acceleration value is converted to the North-East coordinate system through attitude information, specifically including:

[0197] Using the quaternion q and the measurement value a calculated above, the following steps are performed:

[0198] Step 3.1: Convert the quaternion obtained above into a rotation matrix Step 3.2: Perform a positive rotation on the accelerometer measurements using the rotation matrix R:

[0199]

[0200] Because gravity is a stable low-frequency signal, the gravitational acceleration representation is extracted from the acceleration data through a low-pass filter, such as Fourier transform.

[0201] Step 3.3: For the acceleration data a obtained above earth Perform Fourier transform to obtain frequency domain representation A(f):

[0202] A(f) is the signal a earth Amplitude and phase information at frequency f.

[0203] The low-frequency part is extracted from the frequency domain signal after Fourier transformation through the filter:

[0204]

[0205] where f c is the cutoff frequency;

[0206] The frequency domain signal A after low-pass filtering low (f) Return to the time domain through inverse Fourier transform to obtain the extracted gravitational acceleration a g .

[0207] like Figure 4 As shown in the figure, based on the extracted gravitational acceleration, the overweight time point and the weightlessness time point are analyzed to determine the elevator's rising or falling range, which is specifically manifested as follows:

[0208] (1) When the elevator accelerates upward, it is overloaded, i.e. a g Greater than g; when running steadily, it is unchanged; when ascending and decelerating, it is weightless, i.e. a g Less than g;

[0209] (2) When the elevator accelerates and descends, it is manifested as weightlessness, i.e. a g Less than g; when running smoothly, it is unchanged; when descending and decelerating, it is overweight, i.e. a g greater than g;

[0210] After obtaining the ascending and descending intervals, the integral is used to estimate the ascending or descending distance. The formula is as follows:

[0211]

[0212] Where a(t) is the acceleration, v0 is the initial velocity, t1 and t2 are the start time and end time respectively.

[0213] Through the above solution, wearable devices are used to measure and process pedestrian motion parameters, thereby automatically detecting the status of pedestrians taking the elevator, and using this to measure the trajectory of pedestrians when taking the escalator, solving the generalization problem and the cross-layer quantification problem.

[0214] In order to better understand the present invention, the above is described in detail in conjunction with the specific embodiments of the present invention, but it is not intended to limit the present invention. Any simple modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention. Each embodiment in this specification focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A method for sensing the running path of an elevator based on sensor data, comprising obtaining nine-axis sensor data using a wearable device, characterized in that: The following steps are also included: Step 1: extracting stable features from the nine-axis sensor data; Step 2: Based on the restored attitude, the accelerometer measurement value is converted to the Earth coordinate system, and the converted acceleration measurement value is denoised using Fourier transform to obtain the Earth's center acceleration; Step 3: Identify the overweight and weightlessness time points in the path to estimate whether the elevator is in an ascending or descending state and the ascending or descending distance.

2. The method for sensing an elevator's running path based on sensor data according to claim 1, wherein: The nine-axis sensor data includes three-axis accelerometer data a=[a x ,a y ,a z ] T 、Three-axis gyroscope data ω=[ω x ,ω y ,ω z ] T and the three-axis magnetometer data m=[m x ,m y ,m z ] T At least one of the following, wherein x, y, and z are x-axis, y-axis, and z-axis data in the sensor coordinate system.

3. The method for sensing an elevator's running path based on sensor data according to claim 2, wherein: The step 1 includes the following sub-steps: Step 11: Initialize quaternion q = [q w ,q x ,q y ,q z ] T , where q w is the real part, q x ,q y ,q z is the imaginary part; Step 12: Read the nine-axis sensor data, calculate the modulus length of the accelerometer data ‖a‖ and the modulus length of the magnetometer data ‖m‖ and normalize them respectively, and record them as and The copied gyroscope data is recorded as the initial value of error compensation Omega; Step 13: Convert the initial quaternion into the rotation matrix R, and convert the theoretical value of the earth's gravity in the inertial coordinate system to the current posture as the theoretical gravity direction; Step 14: Rotate the magnetometer measurement value to the inertial coordinate system, calculate the modulus of the horizontal component of the magnetometer data and the magnetic field reference vector, and normalize them; Step 15: Calculate gravity error, magnetic field error and error angular velocity; Step 16: Calculate the gyroscope bias using the integral gain and compensate for the error using the proportional gain. Step 17: Calculate the quaternion change rate and update the quaternion using Euler integral to ensure the normalization of the quaternion.

4. The method for sensing an elevator's running path based on sensor data according to claim 3, wherein: The formula for the theoretical gravity direction is V a =R T ×g Where T is the transpose, g is the theoretical value of the earth's gravity in the inertial coordinate system [0,0,1] T .

5. The method for sensing an elevator's running path based on sensor data according to claim 4, wherein: The formula for rotating the magnetometer measurement value to the inertial coordinate system is h=R×m Among them, h is the rotated magnetometer data, and m is the magnetometer data.

6. The method for sensing an elevator's running path based on sensor data according to claim 5, wherein: The modulus of the horizontal component of the magnetometer data is The formula for the magnetic field reference vector is: Among them, h x is the x-axis data of the rotated magnetometer data in the inertial coordinate system, h y is the y-axis data of the rotated magnetometer data in the inertial coordinate system, h z is the z-axis data of the rotated magnetometer data in the inertial coordinate system.

7. The method for sensing an elevator's running path based on sensor data according to claim 6, wherein: The gravity error is the cross product of the direction measured by the accelerometer and the theoretical gravity direction, the magnetic field error is the cross product of the direction measured by the magnetometer and the magnetic field reference vector, and the error angular velocity is the sum of the gravity error and the magnetic field error, and the formula is: we=a×V a +m×V m 。 The formula for the gyroscope bias is b=-K I ×mes The error compensation formula is: Ω=Omega-b+(K p ×mes) Among them, K I K is the integral gain used to estimate and compensate for the long-term deviation of the gyroscope measurement value. p The proportional gain is used to directly correct the instantaneous error of the gyroscope measurement value.

8. The method for sensing an elevator's running path based on sensor data according to claim 7, wherein: The formula for the quaternion change rate is Use Euler integral to update the quaternion, the formula is Where p is a column vector, is the quaternion multiplication, Δt is the time difference corresponding to the sensor sampling frequency F, that is 9. The method for sensing an elevator's running path based on sensor data according to claim 8, wherein: The step 2 includes the following sub-steps: Step 21: Convert the quaternion to a rotation matrix Step 22: Use the rotation matrix R to perform a positive rotation on the accelerometer measurements. Step 23: Acceleration data a obtained above earth Perform Fourier transform to obtain the frequency domain representation A(f), where A(f) is the signal a earth Amplitude and phase information at frequency f; Step 24: Extract the low-frequency part A from the Fourier transformed frequency domain signal through the filter low (f); Step 25: Low-pass filtered frequency domain signal A low (f) Return to the time domain through inverse Fourier transform to obtain the extracted gravitational acceleration a g .

10. The method for sensing an elevator's running path based on sensor data according to claim 9, wherein: The low-frequency part A low The formula for (f) is a g =IFFT(A low (f)) Among them, f c is the cutoff frequency, and IFFT() is the inverse Fourier transform.

Citation Information

Patent Citations

  • Motion state recognition method and device based on wearable device

    CN114861713A