CN116105737A - RISC-V-based pedestrian autonomous positioning method - Google Patents

RISC-V-based pedestrian autonomous positioning method Download PDF

Info

Publication number
CN116105737A
CN116105737A CN202310120493.1A CN202310120493A CN116105737A CN 116105737 A CN116105737 A CN 116105737A CN 202310120493 A CN202310120493 A CN 202310120493A CN 116105737 A CN116105737 A CN 116105737A
Authority
CN
China
Prior art keywords
matrix
pedestrian
updated
speed
coordinate system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310120493.1A
Other languages
Chinese (zh)
Inventor
阎波
史超凡
王鹏飞
章子恒
邓宇志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN202310120493.1A priority Critical patent/CN116105737A/en
Publication of CN116105737A publication Critical patent/CN116105737A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/10Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration
    • G01C21/12Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning
    • G01C21/16Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning by integrating acceleration or speed, i.e. inertial navigation
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/10Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration
    • G01C21/12Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning
    • G01C21/16Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning by integrating acceleration or speed, i.e. inertial navigation
    • G01C21/18Stabilised platforms, e.g. by gyroscope
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/20Instruments for performing navigational calculations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/277Analysis of motion involving stochastic approaches, e.g. using Kalman filters

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Operations Research (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Navigation (AREA)

Abstract

The invention discloses a pedestrian autonomous positioning method based on RISC-V, which comprises the following steps: acquiring three-dimensional data of pedestrian motion in an acceleration sensor and a gyroscope sensor; calculating an attitude angle and converting the attitude angle from a carrier coordinate system to a coordinate transformation matrix of a navigation coordinate system; according to the three-dimensional data of pedestrian movement, the attitude angle and the coordinate transformation matrix, carrying out inertial navigation basic calculation to solve the current attitude, speed and position of the pedestrian; zero-speed detection based on the neural network is carried out, whether the moment point of the current state of the pedestrian is a zero-speed point or not is judged, and if yes, the next step is carried out; otherwise, returning to the first step; the Kalman filtering EKF is utilized to carry out positioning calculation and update the current gesture, position and speed of the pedestrian; and completing autonomous positioning of the pedestrian according to the updated posture, the updated position and the updated speed. The invention can reduce noise error; the method reduces the calculation amount, reduces the time and resources required by the execution of the processor, and has good portability.

Description

RISC-V-based pedestrian autonomous positioning method
Technical Field
The invention relates to the technical field of vector processors, in particular to a pedestrian autonomous positioning method based on RISC-V.
Background
RISC-V is an open source instruction set architecture based on the reduced instruction set principle. The RISC-V adopts a modularized design mode, and comprises other expansion instruction sets such as RV32M, RV32F, RV32V and the like besides the basic RV 32I. RV32V is a vector extended instruction set of RISC-V, unlike conventional SIMD instructions, which supports variable length vector registers while separating the length of the vector from the maximum number of operands that can be performed per clock cycle. Based on the RV32V vector expansion instruction set, the performance of a plurality of algorithms can be improved.
Positioning navigation algorithms are widely used in various fields of today's society, wherein inertial navigation systems based on inertial sensors can realize autonomous positioning navigation without relying on external information. The conventional inertial navigation system has high requirements on the sensor, and is not applied to pedestrian positioning. The existing micromechanical inertial measurement unit has the advantages of small volume, weight, price and the like, and is widely applied to the pedestrian inertial navigation system. The basic inertial measurement unit is typically composed of a three-axis accelerometer and a three-axis gyroscope. However, current measurement methods suffer from noise interference, and many positioning navigation algorithms use kalman filtering to estimate the state of the dynamic system to reduce noise errors. However, since the kalman filter algorithm contains a large amount of operations, the execution of these algorithms in the processor of the conventional architecture requires a large amount of resources and time, which also limits the application of these positioning navigation algorithms in devices with resources shortage and limited performance.
Disclosure of Invention
Aiming at the defects in the prior art, the pedestrian autonomous positioning method based on RISC-V solves the problems that the prior art is easy to be interfered by noise, has poor portability and alteration, large resource and time expenditure and limited application in equipment with tense resource and limited performance.
In order to achieve the aim of the invention, the invention adopts the following technical scheme: a pedestrian autonomous positioning method based on RISC-V comprises the following steps:
s1, acquiring three-dimensional data of pedestrian motion in an acceleration sensor and a gyroscope sensor;
s2, calculating an attitude angle according to the three-dimensional data of the pedestrian motion, and converting the attitude angle from a carrier coordinate system to a coordinate transformation matrix of a navigation coordinate system;
s3, carrying out inertial navigation basic calculation according to the three-dimensional data of the pedestrian motion, the attitude angle and the coordinate transformation matrix to solve the current attitude, the speed and the position of the pedestrian;
s4, detecting zero speed based on a neural network through the current gesture, speed and position of the pedestrian, judging whether the moment point of the current state of the pedestrian is the zero speed point, if so, entering a step S5; otherwise, entering a step S1;
s5, performing positioning calculation by using Kalman filtering EKF to update the current posture, position and speed of the pedestrian; obtaining updated gestures, updated positions and updated speeds;
s6, completing autonomous positioning of pedestrians according to the updated posture, the updated position and the updated speed.
Further, the specific implementation manner of step S2 is as follows:
s2-1, calculating an attitude angle according to three-dimensional data of pedestrian movement; the attitude angle comprises a roll angle gamma, a pitch angle theta and a heading angle phi;
s2-2, converting the roll angle gamma, the pitch angle theta and the heading angle phi from a carrier coordinate system to a 3*3 coordinate transformation matrix of a navigation coordinate system, and storing the values of the coordinate transformation matrix into a 3*3 floating point array C.
Further, the specific implementation manner of step S3 is as follows:
s3-1, respectively averaging three-dimensional pedestrian motion data collected by a gyroscope sensor to obtain omega x (t)、ω y (t)、ω z (t), and taking the average value omega x (t)、ω y (t)、ω z (t) sequentially storing array variable gyr 3 of floating point type respectively]The method comprises the steps of carrying out a first treatment on the surface of the Wherein t is time; omega x (t) is a first dimension data average; omega y (t) is a second dimension data average; omega z (t) is a third dimensional data average;
s3-2 according to omega x (t)、ω y (t)、ω z (t) calculating the oblique symmetry matrix Ω t
S3-3, according to the formula:
Figure BDA0004079834320000031
obtaining an updated pose matrix
Figure BDA0004079834320000036
As the current posture of the pedestrian; wherein (1)>
Figure BDA0004079834320000032
3*3 floating point array C; i is an identity matrix; Δt is the sampling time interval; />
Figure BDA0004079834320000033
Is an oblique symmetry matrix of the gyroscope at the moment t;
s3-4, according to the updated gesture matrix
Figure BDA0004079834320000034
And obtaining the current speed and the current position of the pedestrian.
Further, the specific implementation manner of the step S3-4 is as follows:
according to the formula:
Figure BDA0004079834320000035
v(t)=v(t-Δt)+[a n (t-Δt)+a n (t)*Δt/2]
p(t)=p(t-Δt)+[v(t-Δt)+v(t)*Δt/2]
obtaining the time-varying acceleration a of inertial navigation n (t), velocity v (t) and position p (t); wherein a is b (t) is a matrix formed by the average value of the pedestrian motion three-dimensional data collected by the acceleration sensor; [] T Is the transpose of the matrix; v (t- Δt) is the speed at the previous time; p (t- Δt) is the position at the previous time; a, a n And (t- Δt) is the acceleration at the previous time.
Further, the specific implementation manner of step S5 is as follows:
s5-1, according to the formula:
P k|k-1 =F k P k-1 (F k ) T +Q
obtaining covariance matrix P of predictive vector at k moment k|k-1 The method comprises the steps of carrying out a first treatment on the surface of the Wherein Q represents the covariance matrix of the noise vector; f (F) k A state transition matrix is represented and is used to represent,
Figure BDA0004079834320000041
I 3×3 is 3*3 in unit matrix->
Figure BDA0004079834320000042
For the oblique symmetrical cross matrix composed of triaxial acceleration measurement values under the navigation coordinate system,/and->
Figure BDA0004079834320000043
Acceleration at time k in the z-axis direction in the navigation coordinate system, +.>
Figure BDA0004079834320000044
Representing acceleration in the navigation coordinate system in the direction of the y-axis at time k,/>
Figure BDA0004079834320000045
The acceleration at the moment k in the direction of the x axis in the navigation coordinate system is represented; (. Cndot. T Representing a transpose of the matrix;
s5-2, according to the formula:
Figure BDA0004079834320000046
obtaining error vector
Figure BDA0004079834320000047
Wherein H is k Is an observation matrix; />
Figure BDA0004079834320000048
Is the transposed matrix of the observation matrix; r represents a covariance matrix of the multiple independent normal distribution; (. Cndot. -1 Representing the inverse of the matrix;
s5-3, updating the posture, the position and the speed of the pedestrian according to the error vector; and obtaining updated gestures, updated positions and updated speeds.
The beneficial effects of the invention are as follows: the invention uses Kalman filtering method, which can reduce noise error; the method and the device can reduce the number of instructions executed in the running process, further reduce the calculated amount, reduce the time and resources required by the execution of a processor, increase the feasibility of the method and the device in resource shortage and performance limitation, and overcome the defect of poor portability caused by the fact that the conventional instructions have fixed data width and the program needs to be constructed according to the specific data width.
Drawings
FIG. 1 is a flow chart of the present invention;
fig. 2 is a block diagram of the system of the present invention.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and all the inventions which make use of the inventive concept are protected by the spirit and scope of the present invention as defined and defined in the appended claims to those skilled in the art.
As shown in fig. 1, a pedestrian autonomous positioning method based on RISC-V includes the following steps:
s1, acquiring three-dimensional data of pedestrian motion in an acceleration sensor and a gyroscope sensor;
s2, calculating an attitude angle according to the three-dimensional data of the pedestrian motion, and converting the attitude angle from a carrier coordinate system to a coordinate transformation matrix of a navigation coordinate system;
s3, carrying out inertial navigation basic calculation according to the three-dimensional data of the pedestrian motion, the attitude angle and the coordinate transformation matrix to solve the current attitude, the speed and the position of the pedestrian;
s4, detecting zero speed based on a neural network through the current gesture, speed and position of the pedestrian, judging whether the moment point of the current state of the pedestrian is the zero speed point, if so, entering a step S5; otherwise, entering a step S1;
s5, performing positioning calculation by using Kalman filtering EKF to update the current posture, position and speed of the pedestrian; obtaining updated gestures, updated positions and updated speeds;
s6, completing autonomous positioning of pedestrians according to the updated posture, the updated position and the updated speed.
The specific implementation manner of the step S2 is as follows:
s2-1, calculating an attitude angle according to three-dimensional data of pedestrian movement; the attitude angle comprises a roll angle gamma, a pitch angle theta and a heading angle phi;
s2-2, converting the roll angle gamma, the pitch angle theta and the heading angle phi from a carrier coordinate system to a 3*3 coordinate transformation matrix of a navigation coordinate system, and storing the values of the coordinate transformation matrix into a 3*3 floating point array C.
The specific implementation manner of the step S3 is as follows:
s3-1, respectively averaging three-dimensional pedestrian motion data collected by a gyroscope sensor to obtain omega x (t)、ω y (t)、ω z (t), and taking the average value omega x (t)、ω y (t)、ω z (t) storing floating point classes in orderArray variable gyr [3 ]]The method comprises the steps of carrying out a first treatment on the surface of the Wherein t is time; omega x (t) is a first dimension data average; omega y (t) is a second dimension data average; omega z (t) is a third dimensional data average;
s3-2 according to omega x (t)、ω y (t)、ω z (t) calculating the oblique symmetry matrix Ω t
S3-3, according to the formula:
Figure BDA0004079834320000061
obtaining an updated pose matrix
Figure BDA0004079834320000062
As the current posture of the pedestrian; wherein (1)>
Figure BDA0004079834320000063
3*3 floating point array C; i is an identity matrix; Δt is the sampling time interval; />
Figure BDA0004079834320000064
Is an oblique symmetry matrix of the gyroscope at the moment t;
s3-4, according to the updated gesture matrix
Figure BDA0004079834320000066
And obtaining the current speed and the current position of the pedestrian.
The specific implementation manner of the step S3-4 is as follows:
according to the formula:
Figure BDA0004079834320000065
v(t)=v(t-Δt)+[a n (t-Δt)+a n (t)*Δt/2]
p(t)=p(t-Δt)+[v(t-Δt)+v(t)*Δt/2]
obtaining the time-varying acceleration a of inertial navigation n (t), velocity v (t) and position p (t); wherein the method comprises the steps of,a b (t) is a matrix formed by the average value of the pedestrian motion three-dimensional data collected by the acceleration sensor; [] T Is the transpose of the matrix; v (t- Δt) is the speed at the previous time; p (t- Δt) is the position at the previous time; a, a n And (t- Δt) is the acceleration at the previous time.
The specific implementation manner of the step S5 is as follows:
s5-1, according to the formula:
P k|k-1 =F k P k-1 (F k ) T +Q
covariance matrix Pk of prediction vector at k moment k-1 The method comprises the steps of carrying out a first treatment on the surface of the Wherein Q represents the covariance matrix of the noise vector; f (F) k A state transition matrix is represented and is used to represent,
Figure BDA0004079834320000071
I 3×3 is 3*3 in unit matrix->
Figure BDA0004079834320000072
For the oblique symmetrical cross matrix composed of triaxial acceleration measurement values under the navigation coordinate system,/and->
Figure BDA0004079834320000073
Acceleration at time k in the z-axis direction in the navigation coordinate system, +.>
Figure BDA0004079834320000074
Representing acceleration in the navigation coordinate system in the direction of the y-axis at time k,/>
Figure BDA0004079834320000075
The acceleration at the moment k in the direction of the x axis in the navigation coordinate system is represented; (. Cndot. T Representing a transpose of the matrix;
s5-2, according to the formula:
Figure BDA0004079834320000076
obtaining error vector
Figure BDA0004079834320000077
Wherein H is k Is an observation matrix; />
Figure BDA0004079834320000078
Is the transposed matrix of the observation matrix; r represents a covariance matrix of the multiple independent normal distribution; (. Cndot. -1 Representing the inverse of the matrix;
s5-3, updating the posture, the position and the speed of the pedestrian according to the error vector; and obtaining updated gestures, updated positions and updated speeds.
As shown in fig. 2, the system block diagram mainly comprises a basic resolving module, a zero-speed updating module and an autonomous positioning module; the basic calculation module is used for obtaining the attitude angle, speed and position information of the pedestrian from the data collected from the gyroscope and the accelerometer; the zero-speed updating module is used for distinguishing zero-speed points and non-zero-speed points, and the zero-speed updating module can be combined with the autonomous positioning module to effectively correct the attitude angle, the speed and the position at the current moment so as to inhibit the track divergence caused by errors.
In one embodiment of the present invention, RISCV is typically accomplished using the most basic SISD (single instruction single data) in the existing calculation mode of RISCV calculation matrix addition, subtraction, multiplication. Taking matrix addition as an example, in SISD, a computer loads one element in a matrix and immediately adds the element to one element in another matrix, and stores the addition result in an address corresponding to the result matrix. The matrix addition calculation can be completed only by adding one by one and repeating the process for a plurality of times, each addition involves loading, adding and storing three instructions, and is very time-consuming. In the improved matrix addition, the effective vector length (vl) matrix elements can be directly read from the address, and the matrix elements are added simultaneously in parallel, so that the processing of a plurality of elements still only needs to load, add and store three instructions, and the calculation time and the instruction number can be effectively reduced. The principles of matrix subtraction and matrix multiplication are essentially the same as matrix addition.
An inertial measurement unit (comprising a gyroscope and an accelerometer) is used for collecting 131601 points of data of a tested person around a teaching building, and a pedestrian positioning algorithm is used for calculating the track according to the data. In linux, the GCC tool chain is used for compiling an original algorithm, the total time consumption is 20.317361 seconds, the total number of executed instructions is 20317365811, the improved algorithm is compiled, the total time consumption is 1.670458 seconds, the total number of executed instructions is 1670463626, the amplitude reduction reaches 91.7%, and the calculation time and the instruction number are effectively reduced.
The matrix addition and the matrix subtraction used in the invention, the matrix multiplication depends on the vector expansion instruction set of RISC-V and vector calculation.
Matrix addition, calling an inline assembly function vsetvl_e32m1 in a header file < riscv_vector.h >, according to a given matrix, SEW and LMUL, to obtain an effective vector length (vl); defining pointer variables ptr_a, ptr_b, ptr_c respectively pointing to the matrices to be added a and b and the result matrix c; calling an inline assembly function vle32_v_f32ml in a header file < riscv_vector.h >, and loading matrixes a and b to vfloat32m1_t type variables vec_a and vec_b to be added with a vl length from a memory pointed to by a start address of a pointer variable; calling an inline assembly function vfadd_vv_f32m1 in header file < riscv_vector.h > for adding vector vec_a and vec_b and storing vector vec_c; calling an inline assembly function vse32_v_f32m1 in a header file < riscv_vector.h > for storing the result of the addition to a memory pointed to by the starting address of the pointer variable ptr_c;
matrix subtraction, calling the inline assembly function vsetvl_e32m1 in header < riscv_vector.h > for obtaining the effective vector length (vl) according to the given matrix, SEW and LMUL; defining pointer variables ptr_a, ptr_b and ptr_c to the matrices a and b to be operated and the result matrix c respectively; calling an inline assembly function vle32_v_f32ml in a header file < riscv_vector.h >, and loading matrixes a and b to vfloat32m1_t type variables vec_a and vec_b to be added with a vl length from a memory pointed to by a start address of a pointer variable; calling an inline assembly function vfsub_vv_f32m1 in a header file < riscv_vector.h > for subtracting vector vec_a from vec_b and storing vector vec_c; calling an inline assembly function vse32_v_f32m1 in a header file < riscv_vector.h > for storing the result of the subtraction to a memory pointed to by the start address of the pointer variable ptr_c;
matrix multiplication, calling an inline assembly function vsetvl_e32m1 in header file < riscv_vector.h > for obtaining an effective vector length (vl) according to a given matrix, SEW and LMUL; defining pointer variables b_n_ptr, c_n_ptr respectively pointing to a matrix b to be operated and a result matrix c, defining pointer variables a_k_ptr, b_k_ptr respectively pointing to a matrix a to be operated and a pointer variable b_n_ptr, and defining a vfoat 32m1_t type matrix acc for temporarily storing the results of matrix element multiplication in each iteration; calling an inline assembly function vfmv_v_f 32m1 in a header file < riscv_vector.h > for initializing a matrix acc; calling an inline assembly function vle32_v_f32ml in a header file < riscv_vector.h >, loading a matrix b_k_ptr to be added with a vl length to a vfloat32m1_t type variable b_n_data from a memory pointed by a start address of a pointer variable, calling an inline assembly function vfmacc_vf_f32m1 in the header file < riscv_vector.h >, performing iteration, multiplying elements corresponding to the vl length in the operation matrices a and b respectively, and adding the elements with a matrix acc into the matrix acc; this process is repeated until all elements in the matrix are calculated, and the inline assembly function vse32_v_f32m1 in the header file < riscv_vector.h > is called for storing the result of the multiplication to the memory pointed to by the starting address of the pointer variable c_n_ptr.
The cross compiling simulation mode of the invention is as follows: installing LLVM 14 and RISCV-GNU-toolchain in the linux system; installing a Spike instruction set simulator and a pk proxy kernel; creating a makefile file; compiling and operating the target program according to the makefile file; compiling and operating a target program according to the makefile file, and matching a LLVM Clang compiler with a GCC tool chain compiler; the target program was simulated in Spike.
The invention uses Kalman filtering method, which can reduce noise error; the method can reduce the number of instructions executed in the running process, further reduce the calculated amount, reduce the time and resources required by the execution of the processor, increase the feasibility of the method in the equipment with tense resources and limited performance, and have good portability.

Claims (5)

1. The pedestrian autonomous positioning method based on RISC-V is characterized by comprising the following steps:
s1, acquiring three-dimensional data of pedestrian motion in an acceleration sensor and a gyroscope sensor;
s2, calculating an attitude angle according to the three-dimensional data of the pedestrian motion, and converting the attitude angle from a carrier coordinate system to a coordinate transformation matrix of a navigation coordinate system;
s3, carrying out inertial navigation basic calculation according to the three-dimensional data of the pedestrian motion, the attitude angle and the coordinate transformation matrix to solve the current attitude, the speed and the position of the pedestrian;
s4, detecting zero speed based on a neural network through the current gesture, speed and position of the pedestrian, judging whether the moment point of the current state of the pedestrian is the zero speed point, if so, entering a step S5; otherwise, entering a step S1;
s5, performing positioning calculation by using Kalman filtering EKF to update the current posture, position and speed of the pedestrian; obtaining updated gestures, updated positions and updated speeds;
s6, completing autonomous positioning of pedestrians according to the updated posture, the updated position and the updated speed.
2. The pedestrian autonomous positioning method based on RISC-V as set forth in claim 1, wherein the specific implementation manner of step S2 is as follows:
s2-1, calculating an attitude angle according to three-dimensional data of pedestrian movement; the attitude angle comprises a roll angle Y, a pitch angle theta and a heading angle psi;
s2-2, converting the roll angle gamma, the pitch angle theta and the heading angle phi from a carrier coordinate system to a 3*3 coordinate transformation matrix of a navigation coordinate system, and storing the values of the coordinate transformation matrix into a 3*3 floating point array C.
3. The pedestrian autonomous positioning method based on RISC-V as set forth in claim 2, wherein the specific implementation manner of step S3 is as follows:
s3-1, collecting three-dimensional pedestrian motion data collected by a gyroscope sensorRespectively averaging to obtain omega x (t)、ω y (t)、ω z (t), and taking the average value omega x (t)、ω y (t)、ω z (t) sequentially storing array variable gyr 3 of floating point type respectively]The method comprises the steps of carrying out a first treatment on the surface of the Wherein t is time; omega x (t) is a first dimension data average; omega y (t) is a second dimension data average; omega z (t) is a third dimensional data average;
s3-2 according to omega x (t)、ω y (t)、ω z (t) calculating the oblique symmetry matrix Ω t
S3-3, according to the formula:
Figure FDA0004079834310000021
obtaining an updated pose matrix
Figure FDA0004079834310000022
As the current posture of the pedestrian; wherein (1)>
Figure FDA0004079834310000023
3*3 floating point array C; i is an identity matrix; Δt is the sampling time interval; />
Figure FDA0004079834310000024
Is an oblique symmetry matrix of the gyroscope at the moment t;
s3-4, according to the updated gesture matrix
Figure FDA0004079834310000025
And obtaining the current speed and the current position of the pedestrian.
4. A pedestrian autonomous positioning method based on RISC-V as claimed in claim 3, wherein the specific implementation manner of step S3-4 is as follows:
according to the formula:
Figure FDA0004079834310000026
v(t)=v(t-Δt)+[a n (t-Δt)+a n (t)*Δt/2]
p(t)=p(t-Δt)+[v(t-Δt)+v(t)*Δt/2]
obtaining the time-varying acceleration a of inertial navigation n (t), velocity v (t) and position p (t); wherein a is b (t) is a matrix formed by the average value of the pedestrian motion three-dimensional data collected by the acceleration sensor; [] T Is the transpose of the matrix; v (t- Δt) is the speed at the previous time; p (t- Δt) is the position at the previous time; a, a n And (t-deltat) is the acceleration at the previous time.
5. The pedestrian autonomous positioning method based on RISC-V as set forth in claim 4, wherein the specific implementation manner of step S5 is as follows:
s5-1, according to the formula:
P k|k-1 =F k P k-1 (F k ) T +Q
obtaining covariance matrix P of predictive vector at k moment k|k-1 The method comprises the steps of carrying out a first treatment on the surface of the Wherein Q represents the covariance matrix of the noise vector; f (F) k A state transition matrix is represented and is used to represent,
Figure FDA0004079834310000031
I 3×3 is a unit matrix of 3*3 and is formed by a matrix,
Figure FDA0004079834310000032
for the oblique symmetrical cross matrix composed of triaxial acceleration measurement values under the navigation coordinate system,/and->
Figure FDA0004079834310000033
Acceleration at time k in the z-axis direction in the navigation coordinate system, +.>
Figure FDA0004079834310000034
Representing k in the y-axis direction in the navigational coordinate systemAcceleration of the scale->
Figure FDA0004079834310000035
The acceleration at the moment k in the direction of the x axis in the navigation coordinate system is represented; (. Cndot. T Representing a transpose of the matrix;
s5-2, according to the formula:
Figure FDA0004079834310000036
obtaining error vector
Figure FDA0004079834310000037
Wherein H is k Is an observation matrix; />
Figure FDA0004079834310000038
Is the transposed matrix of the observation matrix; r represents a covariance matrix of the multiple independent normal distribution; (. Cndot. -1 Representing the inverse of the matrix;
s5-3, updating the posture, the position and the speed of the pedestrian according to the error vector; and obtaining updated gestures, updated positions and updated speeds.
CN202310120493.1A 2023-02-13 2023-02-13 RISC-V-based pedestrian autonomous positioning method Pending CN116105737A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310120493.1A CN116105737A (en) 2023-02-13 2023-02-13 RISC-V-based pedestrian autonomous positioning method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310120493.1A CN116105737A (en) 2023-02-13 2023-02-13 RISC-V-based pedestrian autonomous positioning method

Publications (1)

Publication Number Publication Date
CN116105737A true CN116105737A (en) 2023-05-12

Family

ID=86263659

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310120493.1A Pending CN116105737A (en) 2023-02-13 2023-02-13 RISC-V-based pedestrian autonomous positioning method

Country Status (1)

Country Link
CN (1) CN116105737A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116629320A (en) * 2023-07-21 2023-08-22 美智纵横科技有限责任公司 Neural network optimization method, device, storage medium and chip

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116629320A (en) * 2023-07-21 2023-08-22 美智纵横科技有限责任公司 Neural network optimization method, device, storage medium and chip
CN116629320B (en) * 2023-07-21 2023-11-28 美智纵横科技有限责任公司 Neural network optimization method, device, storage medium and chip

Similar Documents

Publication Publication Date Title
Allotta et al. A new AUV navigation system exploiting unscented Kalman filter
CN103017763B (en) State estimation equipment and skew update method
Sheng et al. MEMS-based low-cost strap-down AHRS research
Wu et al. A super fast attitude determination algorithm for consumer-level accelerometer and magnetometer
CN116105737A (en) RISC-V-based pedestrian autonomous positioning method
Wu et al. Fast symbolic 3-D registration solution
Quan et al. Interlaced optimal-REQUEST and unscented Kalman filtering for attitude determination
Pikuliński et al. Adjoint method for optimal control of multibody systems in the Hamiltonian setting
Babu et al. FPGA implementation of multi-dimensional Kalman filter for object tracking and motion detection
Shi et al. Fault-tolerant SINS/HSB/DVL underwater integrated navigation system based on variational Bayesian robust adaptive Kalman filter and adaptive information sharing factor
CN110940336B (en) Strapdown inertial navigation simulation positioning resolving method and device and terminal equipment
Panahandeh et al. Observability analysis of a vision-aided inertial navigation system using planar features on the ground
CN116608859A (en) Navigation method, storage medium and device of self-adaptive unscented Kalman filtering based on threshold processing
CN112182042A (en) Point cloud feature matching method and system based on FPGA and path planning system
CN114777762A (en) Inertial navigation method based on Bayesian NAS
Dutt et al. A high speed and low complexity architecture design methodology for square root unscented Kalman Filter based SLAM
Thalagala Comparison of state marginalization techniques in visual inertial navigation filters
CN114111797B (en) Kalman filter, IP core and navigation chip based on FPGA
CN112304309A (en) Method for calculating combined navigation information of hypersonic vehicle based on cardiac array
CN113340297B (en) Attitude estimation method, system, terminal, medium and application based on coordinate system transmission
Purwanto et al. Comparative performance evaluation of direction cosine matrix and Madgwick’s as 3D orientation estimation algorithm
CN110879066A (en) Attitude calculation algorithm and device and vehicle-mounted inertial navigation system
Shaaban et al. Gyro-free Kalman filter with unknown inputs for SO (3)-based attitude estimation
Minnaar et al. Removing accelerometer redundancy in non-gyro inertial measurement unit
Ning et al. MIMU error calibration method of turntable free platform based on improved genetic algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination