Handwritten track information acquisition method
阅读说明:本技术 一种手写轨迹信息获取方法 (Handwritten track information acquisition method ) 是由 崔敏 周昕雨 黄用 孟铭 王鹏程 于 2019-09-18 设计创作,主要内容包括:本发明公开了一种手写轨迹信息获取方法,是通过手写感知系统向电子笔处理器提供笔杆沿横滚、俯仰、航向轴的线加速度和角速度信息,处理器根据方向余弦矩阵微分方程式便可以实时地计算出载体坐标系和地理坐标系的方向余弦矩阵的一阶微分矩阵,以起笔前惯导的惯性信息作为初始条件,计算出两坐标系之间相互转化的方向余弦矩阵,通过这个矩阵的计算就可以实时地获取载体的姿态信息。本发明脱离了手写板的约束,能在任意的地方比如空中、桌面、纸张等书写,将会对手写输入技术起到很大的推动作用。(The invention discloses a handwritten track information acquisition method, which provides linear acceleration and angular velocity information of a penholder along a roll axis, a pitch axis and a course axis to an electronic pen processor through a handwriting perception system, the processor can calculate a first-order differential matrix of a carrier coordinate system and a direction cosine matrix of a geographic coordinate system in real time according to a direction cosine matrix differential equation, calculates a direction cosine matrix which is converted between the two coordinate systems by taking inertia information of inertial navigation before starting a pen as an initial condition, and can acquire attitude information of a carrier in real time through calculation of the matrix. The invention breaks away from the constraint of a handwriting board, can write in any place such as air, a desktop, paper and the like, and can play a great role in promoting the handwriting input technology.)
1. A handwritten track information acquisition method is characterized by comprising the following steps: the position after the electronic pen switch is turned on is recorded as the initial position S0(ii) a From a starting position S0The inertial information is used as an initial condition, as the electronic pen moves in space, twelve MEMS accelerometers in the electronic pen can calculate the linear acceleration and the angular velocity information of the roll, pitch and course axes of the electronic pen through a handwriting sensing system according to an attitude calculation algorithm embedded in an FPGA in advance, and the electronic pen processor obtains the linear acceleration and the angular velocity information and then obtains the direction cosine at the momentThe matrix differential equation is:
2. The handwritten trajectory information acquisition method according to claim 1, characterized in that the velocity update equation of the electronic pen is a direction cosine matrix update equation, and the direction cosine matrix update equation is:
wherein
3. The handwritten trajectory information acquisition method according to claim 1, wherein the calculation of linear acceleration and angular velocity information of the roll, pitch, and course axes of the electronic pen is performed by using a twelve-degree-of-freedom configuration scheme diagram, the arrow direction corresponding to each digit is the measurement direction of an accelerometer, the O point corresponds to the centroid of the pen, the accelerometer cannot be installed at the centroid, the Z axis is the axis direction of the pen, and the change of the trajectory attitude of the pen holder is measured by using the cantilever effect of the accelerometer;
the sensitive direction of each accelerometer is respectively set as
And the installation position of each accelerometer is as follows:
the specific force equation for twelve accelerometers is:
f2=aωzωx-aαy+Az
f4=-aωzωx+aαy+Az
f6=aωzωy-aαx+Az
f8=-aωzωy+aax+Az
in the formula: omegax、ωyAnd ωzAre the angular velocity components of the electronic pen, respectively; alpha is alphax、αyAnd alphazRespectively the angular acceleration component of the electronic pen; a. thex、AyAnd AzAcceleration components at the centroid of the electronic pen, respectively;
and the analytic solutions of the three axial angular velocities of the electronic pen satisfy the following relations:
in the formula:
generally, due to the small installation error angle, the following 3 small rotations can be used for sequentially describing:
in the formula:
the specific force equation for the twelve accelerometer outputs containing the error is thus expressed as:
in actual test, the value on the left side of the above formula is measured by the test system in real time, and the value at any moment is recorded as
This is a mathematical model of the calculated angular velocity including the mounting error, and the instantaneous angular velocity at that time can be obtained from each instantaneous system of solved equations.
4. The method according to claim 1, wherein each accelerometer in the twelve-degree-of-freedom layout has an equal or similar distance from a centroid point.
5. The method for acquiring handwritten trajectory information according to claim 1, wherein an ICA blind source separation method is adopted for acquiring the posture parameter information of the electronic pen, and the ICA blind source separation method includes the following steps:
firstly, measuring Gaussian characteristics of electronic pen aliasing signals acquired from an electronic pen through fourth-order cumulant, and dividing random variables into a super-Gaussian random variable, namely, a kurtosis is positive, a Gaussian random variable, namely, the kurtosis is zero, and a sub-Gaussian random variable, namely, the kurtosis is negative according to the positive and negative of a kurtosis value, wherein the super-Gaussian signal has a typical 'long-tip' probability density function curve, and the typical super-Gaussian distribution is Laplace distribution; secondly, performing Wavelet decomposition by using Wavelet and combining Principal Component Analysis (PCA), and calculating the number of signal sources; and finally, separating noise signals such as motion signals of the electronic pen, installation error noise and the like through Independent Component Analysis (ICA) to obtain attitude parameter information of the electronic pen.
6. The method for acquiring handwritten locus information according to claim 1, wherein the calculation of the direction cosine matrix of the mutual transformation between the two coordinate systems is performed by using an accelerometer to measure the specific force of the electronic pen in the axial direction of the carrier coordinate system, the navigation calculation is performed only by transforming the output information of the accelerometer to the navigation coordinate system, and the matrix required by the transformation is the matrix required by the transformationIs a matrix of gestures
the relative position between the two coordinate systems can be determined with three independent rotation angles, which can be represented by three coordinate rotations in the following order: the first rotation is xnynznAround znPositive rotation of the shaft
wherein
attitude transformation matrix
Assume that the directional cosine matrix is represented as:
the attitude angle is then:
θ=sin-1(T32)
Technical Field
The invention belongs to the technical field of information perception and man-machine interaction, and particularly relates to a handwritten track information acquisition method.
Background
With the development of computer science and technology, man-machine interaction modes gradually develop from keyboard and mouse interaction modes to pen type, voice and vision natural interaction modes. Among these, pen interaction is the most desirable interaction, both in terms of convenience, naturalness and controllability. Based on these advantages of pen-based interaction, in recent years, various handwriting input devices are in a great variety, which can more accurately capture a handwriting track of a user, and provide a wider development prospect for realizing handwriting input in a computer. The handwriting input of the computer is completed by the handwriting input equipment, which is a basic function of pen type interaction. The pen-type interaction technology is an important interaction mode in the man-machine interaction technology, particularly the multi-channel interaction technology, and efficient interaction can be realized by a user at the fastest speed by providing interaction modes such as sketching, writing gestures and the like. Handwriting is an important way for information interaction between people. With the development of the internet, handwriting can also be used as an important interactive tool between people and between human and machine. From the development process of the computer, the traditional desktop computer is gradually replaced by the mobile computer, and now the development is more towards the tablet computer, which also means the significant change of the man-machine interaction mode, and the man-machine interaction technology of the natural computing mode including pen type, vision and voice is more widely applied.
The common handwriting products on the market at present are composed of a pen and a substrate, the interaction between the pen and the substrate can achieve the functions of writing and drawing, and the digital handwriting board is divided into the following types according to the working principle: resistive pressure plates, electromagnetic induction plates, and capacitive touch pads. The existing mode does not deviate from the constraint of a handwriting board, and restricts the handwriting input technology.
Disclosure of Invention
In order to overcome the constraint of a handwriting board in the prior art, the invention provides the method for acquiring the handwriting track information, which is free from the constraint of the handwriting board, can write in any places such as air, a desktop, paper and the like and can greatly promote the handwriting input technology.
The technical scheme adopted by the invention for realizing the purpose is as follows:
a handwritten track information acquisition method comprises the following steps: the position after the electronic pen switch is turned on is recorded as the initial position S0(ii) a From a starting position S0The inertial information is used as an initial condition, along with the spatial movement of the electronic pen, twelve MEMS accelerometers in the electronic pen can calculate the linear acceleration and the angular velocity information of the roll, pitch and course axes of the electronic pen according to an attitude calculation algorithm embedded in an FPGA in advance through a handwriting sensing system, and after the electronic pen processor obtains the linear acceleration and the angular velocity information, the direction cosine matrix differential equation obtained at the moment is as follows:
for three-axis angular velocity omegax、ωy、ωzThe formed anti-symmetric matrix is a matrix with a plurality of anti-symmetric matrixes,a direction cosine matrix for the solution; solving a direction cosine matrix differential equation in real time according to a first-order differential matrix of a direction cosine matrix of an electronic pen carrier coordinate system and a geographic coordinate system to obtain a direction cosine matrix representing the posture of the electronic pen, and then integrating linear acceleration information and updating an equation of the speed of the electronic pen; further integrating the linear acceleration information to deduce the track change displacement of the electronic pen; after the angular acceleration of the roll, the pitch and the course axis is subjected to secondary integration, the angle change of the electronic pen is obtained, so that the track change of the electronic pen is calculated, the attitude parameter information of the electronic pen is obtained in real time, and the track change of the electronic pen is displayed on a two-dimensional screen.
Further, the speed update equation of the electronic pen is a direction cosine matrix update equation, and the direction cosine matrix update equation is as follows:
whereinIs [ t ]m-1,tm]Angular increment within a time period and noting the value of delta thetam=|Δθm|。
Furthermore, the calculation of the linear acceleration and the angular velocity information of the roll, pitch and course axes of the electronic pen adopts a twelve-degree-of-freedom configuration scheme diagram, the arrow direction corresponding to each number is the measuring direction of the accelerometer, the O point corresponds to the mass center of the pen, the accelerometer cannot be installed at the mass center, the Z axis is the axial direction of the pen, and the change of the track posture of the pen holder is measured by using the cantilever effect of the accelerometer;
the sensitive direction of each accelerometer is respectively set as
And the installation position of each accelerometer is as follows:
the specific force equation for twelve accelerometers is:
f2=aωzωx-aαy+Az
f4=-aωzωx+aαy+Az
f6=aωzωy-aax+Az
f8=-aωzωy+aαx+Az
in the formula: omegax、ωyAnd ωzAre the angular velocity components of the electronic pen, respectively; alpha is alphax、αyAnd alphazRespectively the angular acceleration component of the electronic pen; a. thex、AyAnd AzAcceleration components at the centroid of the electronic pen, respectively;
and the analytic solutions of the three axial angular velocities of the electronic pen satisfy the following relations:
in the formula:
because the installation error angle is very small, the following 3 small rotations are used for sequentially describing:
in the formula:
the mounting error angle of each accelerometer can be measured by a multi-position test through a discrete calibration method;the specific force equation for the twelve accelerometer outputs containing the error is thus expressed as:
in actual test, the value on the left side of the above formula is measured by the test system in real time, and the value at any moment is recorded as
Namely the above type is changed into
This is a mathematical model of the calculated angular velocity including the mounting error, and the instantaneous angular velocity at that time can be obtained from each instantaneous system of solved equations.
Preferably, each accelerometer in the twelve degree-of-freedom configuration map is equidistant or close to the centroid point.
Further, an ICA blind source separation method is adopted for acquiring the attitude parameter information of the electronic pen, and the ICA blind source separation method includes the following steps: firstly, measuring Gaussian characteristics of electronic pen aliasing signals acquired from an electronic pen through fourth-order cumulant, and dividing random variables into a super-Gaussian random variable, namely, a kurtosis is positive, a Gaussian random variable, namely, the kurtosis is zero, and a sub-Gaussian random variable, namely, the kurtosis is negative according to the positive and negative of a kurtosis value, wherein the super-Gaussian signal has a typical 'long-tip' probability density function curve, and the typical super-Gaussian distribution is Laplace distribution; secondly, performing Wavelet decomposition by using Wavelet and combining Principal Component Analysis (PCA), and calculating the number of signal sources; and finally, separating noise signals such as motion signals of the electronic pen, installation error noise and the like through Independent Component Analysis (ICA) to obtain attitude parameter information of the electronic pen.
Further, the calculation of the direction cosine matrix of the mutual conversion between the two coordinate systems is to measure the specific force of the electronic pen in each axial direction of the carrier coordinate system by using the accelerometer, and the navigation calculation can be performed only by converting the output information of the accelerometer into the navigation coordinate system, wherein the matrix required by the conversion is the attitude matrixI.e. a transformation matrix between the carrier coordinate system and the navigation coordinate system,
the relative position between the two coordinate systems can be determined with three independent rotation angles, which can be represented by three coordinate rotations in the following order: the first rotation is xnynznAround znPositive rotation of the shaft
Angle of arrival xn1yn1zn1A location; the second rotation is xn1yn1zn1Around xn1The shaft being rotated forwardly through an angle theta to xn2yn2zn2A location; the third rotation is xn2yn2zn2Around yn2Is rotated through an angle gamma to xbybzbA location;
wherein
Theta and gamma are respectively expressed as a heading angle, a pitch angle and a roll angle of the carrier. According to the rotation sequence, a coordinate conversion relation from a navigation coordinate system to a carrier coordinate system can be obtained;attitude transformation matrix
Is the angle of courseGamma functions of pitch angle theta and roll angle, ofCan determineθ、γ;Assume that the directional cosine matrix is represented as:
the attitude angle is then:
θ=sin-1(T32)
preferably, the electronic pen comprises an electronic pen main body, a laser light source is arranged at the bottom of the electronic pen main body, a handwriting switch is arranged at the top of the electronic pen main body, the laser switch is arranged on the side face of the electronic pen main body, an electronic pen processor and a handwriting sensing system are arranged in the electronic pen main body, and the handwriting switch, the laser light source, the laser switch and the handwriting sensing system are respectively connected with the electronic pen processor.
The invention provides the linear acceleration and the angular speed information of the penholder along the rolling, pitching and course axes to the electronic pen processor through the handwriting perception system, the processor can calculate the first order differential matrix of the carrier coordinate system and the direction cosine matrix of the geographic coordinate system in real time according to the direction cosine matrix differential equation, the direction cosine matrix which is converted between the two coordinate systems is calculated by taking the inertia information of inertial navigation before starting pen as the initial condition, and the attitude information of the carrier can be obtained in real time through the calculation of the matrix. The invention breaks away from the constraint of a handwriting board, can write in any place such as air, a desktop, paper and the like, and can play a great role in promoting the handwriting input technology.
Drawings
The invention is further described with reference to the accompanying drawings, in which:
FIG. 1 is a twelve degree-of-freedom configuration model;
FIG. 2 is a flow chart of accelerometer signal processing;
FIG. 3 is a flow chart of blind source separation;
FIG. 4 is a flow chart of a carrier attitude calculation and error correction method;
FIG. 5 is a diagram of a transformation relationship between a navigation coordinate system and a carrier coordinate system;
fig. 6 is a front view of the electronic pen.
1. Laser lamp source, 2, laser switch, 3, handwriting switch.
Detailed Description
As shown in fig. 1, the method for acquiring handwritten track information of this embodiment includes the following steps: the position after the electronic pen switch is turned on is recorded as the initial position S0(ii) a From a starting position S0The inertial information is used as an initial condition, along with the spatial movement of the electronic pen, twelve MEMS accelerometers in the electronic pen can calculate the linear acceleration and the angular velocity information of the roll, pitch and course axes of the electronic pen according to an attitude calculation algorithm embedded in an FPGA in advance through a handwriting sensing system, and after the electronic pen processor obtains the linear acceleration and the angular velocity information, the direction cosine matrix differential equation obtained at the moment is as follows:
for three-axis angular velocity omegax、ωy、ωzA component antisymmetric matrix.A direction cosine matrix for the solution; according to a carrier coordinate system of the electronic pen and a first-order differential matrix of a direction cosine matrix of a geographic coordinate system, solving a direction cosine matrix differential equation in real time to obtain a direction cosine matrix representing the posture of the electronic pen, integrating linear acceleration information, updating a speed equation of the electronic pen, integrating the speed, and deducing the track change displacement of the electronic pen; obtaining the angle of the electronic pen after carrying out secondary integration on the angular acceleration of the roll, the pitch and the course axisAnd the degree is changed, so that the track change of the electronic pen is calculated, the attitude parameter information of the electronic pen is acquired in real time, and the track change of the electronic pen is displayed on a two-dimensional screen.
Further, the speed update equation of the electronic pen is a direction cosine matrix update equation, and the direction cosine matrix update equation is as follows:
wherein
Is [ t ]m-1,tm]Angular increment within a time period and noting the value of delta thetam=|Δθm|。Furthermore, the calculation of the linear acceleration and the angular velocity information of the roll, pitch and course axes of the electronic pen adopts a twelve-degree-of-freedom configuration scheme diagram, the arrow direction corresponding to each number is the measuring direction of the accelerometer, the O point corresponds to the mass center of the pen, the accelerometer cannot be installed at the mass center, the Z axis is the axial direction of the pen, and the change of the track posture of the pen holder is measured by using the cantilever effect of the accelerometer;
the sensitive direction of each accelerometer is respectively set as
And the installation position of each accelerometer is as follows:
the specific force equation for twelve accelerometers is:
f2=aωzωx-aαy+Az
f4=-aωzωx+aαy+Az
f6=aωzωy-aαx+Az
f8=-aωzωy+aαx+Az
in the formula: omegax、ωyAnd ωzAre the angular velocity components of the electronic pen, respectively; alpha is alphax、αyAnd alphazRespectively the angular acceleration component of the electronic pen; a. thex、AyAnd AzAcceleration components at the centroid of the electronic pen, respectively;
and the analytic solutions of the three axial angular velocities of the electronic pen satisfy the following relations:
in the formula:
generally, due to the small installation error angle, the following 3 small rotations can be used for sequentially describing:
in the formula:the mounting error angle of each accelerometer can be measured by a multi-position test through a discrete calibration method;
the specific force equation for the twelve accelerometer outputs containing the error is thus expressed as:
in actual test, the value on the left side of the above formula is measured by the test system in real time, and the value at any moment is recorded as
Namely the above type is changed into
This is a mathematical model of the calculated angular velocity including the mounting error, and the instantaneous angular velocity at that time can be obtained from each instantaneous system of solved equations.
Preferably, each accelerometer in the twelve degree-of-freedom configuration map is equidistant or close to the centroid point.
As shown in fig. 2 to 5, an ICA blind source separation method is adopted to obtain the posture parameter information of the electronic pen, and the ICA blind source separation method includes the following steps: firstly, measuring Gaussian characteristics of electronic pen aliasing signals acquired from an electronic pen through fourth-order cumulant, and dividing random variables into a super-Gaussian random variable, namely, a kurtosis is positive, a Gaussian random variable, namely, the kurtosis is zero, and a sub-Gaussian random variable, namely, the kurtosis is negative according to the positive and negative of a kurtosis value, wherein the super-Gaussian signal has a typical 'long-tip' probability density function curve, and the typical super-Gaussian distribution is Laplace distribution; secondly, performing Wavelet decomposition by using Wavelet and combining Principal Component Analysis (PCA), and calculating the number of signal sources; and finally, separating noise signals such as motion signals of the electronic pen, installation error noise and the like through Independent Component Analysis (ICA) to obtain attitude parameter information of the electronic pen.
Further, the calculation of the direction cosine matrix of the mutual transformation between the two coordinate systems is to measure the specific force of the electronic pen in the axial direction of the carrier coordinate system by using the accelerometer, and the output information of the accelerometer needs to be transformed to the navigation coordinate systemNavigation calculation can be carried out, and the matrix required by the transformation is the attitude matrix
I.e. a transformation matrix between the carrier coordinate system and the navigation coordinate system,
the relative position between the two coordinate systems can be determined with three independent rotation angles, which can be represented by three coordinate rotations in the following order: the first rotation is xnynznAround znPositive rotation of the shaft
Angle of arrival xn1yn1zn1A location; the second rotation is xn1yn1zn1Around xn1The shaft being rotated forwardly through an angle theta to xn2yn2zn2A location; the third rotation is xn2yn2zn2Around yn2Is rotated through an angle gamma to xbybzbA location;
wherein
Theta and gamma are respectively expressed as a heading angle, a pitch angle and a roll angle of the carrier. According to the rotation sequence, a coordinate conversion relation from a navigation coordinate system to a carrier coordinate system can be obtained;attitude transformation matrix
Is the angle of coursePitch angle θ and yawGamma function of roll angle ofCan determineθ、γ;Assume that the directional cosine matrix is represented as:
the attitude angle is then:
θ=sin-1(T32)
as shown in fig. 6, the electronic pen includes an electronic pen main body, a