CN115615462A - Wheeled odometer checking system and method based on FPGA - Google Patents

Wheeled odometer checking system and method based on FPGA Download PDF

Info

Publication number
CN115615462A
CN115615462A CN202211327354.8A CN202211327354A CN115615462A CN 115615462 A CN115615462 A CN 115615462A CN 202211327354 A CN202211327354 A CN 202211327354A CN 115615462 A CN115615462 A CN 115615462A
Authority
CN
China
Prior art keywords
square wave
odometer
phase
module
fpga
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
CN202211327354.8A
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.)
Chongqing Huayu Electric Instrument Group Co Ltd
Original Assignee
Chongqing Huayu Electric Instrument Group Co Ltd
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 Chongqing Huayu Electric Instrument Group Co Ltd filed Critical Chongqing Huayu Electric Instrument Group Co Ltd
Priority to CN202211327354.8A priority Critical patent/CN115615462A/en
Publication of CN115615462A publication Critical patent/CN115615462A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C25/00Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03LAUTOMATIC CONTROL, STARTING, SYNCHRONISATION OR STABILISATION OF GENERATORS OF ELECTRONIC OSCILLATIONS OR PULSES
    • H03L7/00Automatic control of frequency or phase; Synchronisation
    • H03L7/06Automatic control of frequency or phase; Synchronisation using a reference signal applied to a frequency- or phase-locked loop
    • H03L7/08Details of the phase-locked loop
    • H03L7/085Details of the phase-locked loop concerning mainly the frequency- or phase-detection arrangement including the filtering or amplification of its output signal
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03LAUTOMATIC CONTROL, STARTING, SYNCHRONISATION OR STABILISATION OF GENERATORS OF ELECTRONIC OSCILLATIONS OR PULSES
    • H03L7/00Automatic control of frequency or phase; Synchronisation
    • H03L7/06Automatic control of frequency or phase; Synchronisation using a reference signal applied to a frequency- or phase-locked loop
    • H03L7/16Indirect frequency synthesis, i.e. generating a desired one of a number of predetermined frequencies using a frequency- or phase-locked loop
    • H03L7/18Indirect frequency synthesis, i.e. generating a desired one of a number of predetermined frequencies using a frequency- or phase-locked loop using a frequency divider or counter in the loop

Landscapes

  • Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Measurement Of Distances Traversed On The Ground (AREA)

Abstract

The invention discloses a wheeled odometer checking system and method based on an FPGA (field programmable gate array), which comprises an upper computer, an FPGA component and an odometer, wherein the FPGA component is used for simulating the work of the odometer and generating a corresponding square wave signal to be used as the input of the odometer. The odometer precision can be verified by comparing the count values of the two paths of output pulse signals of the odometer and the FPGA component simulation odometer, and other peripheral function generators and frequency modulation circuits are not needed. Compared with the existing measuring device, the invention adopts the design of the FPGA, only needs to generate the frequency generator and the phase discriminator by the FPGA, thereby saving an external hardware circuit, saving the cost, having small volume size, simple peripheral circuit and quicker program inspection, and being capable of conveniently evaluating and checking the precision of the odometer between the calibration of the inertial navigation device by using the odometer.

Description

Wheeled odometer checking system and method based on FPGA
Technical Field
The invention relates to the technical field of wheel type odometer equipment, in particular to a wheel type odometer checking system and method based on an FPGA (field programmable gate array).
Background
The odometer is a device for estimating the change of the position of an object along with the change of time by using data obtained by a mobile sensor, and in use, the device can be used for initial calibration of an inertial navigation device, and the odometer is used for calibrating the inertial navigation device, and firstly, the accuracy of the odometer needs to meet certain requirements.
Existing odometers typically provide basic pose estimates through wheel encoders, which can provide higher accuracy speed position changes in a short period of time. The basic working principle is that the odometer wheel encoder collects the advancing position information of the wheel, the odometer outputs corresponding pulse signals when the wheel rotates for one circle, two in-phase square wave signals are output if the wheel rotates forwards, two anti-phase square wave signals are output if the wheel rotates backwards, the odometer processes the two square wave signals and outputs one forward signal to calculate the speed position information.
However, as the running distance or the running time of the wheel encoder increases, the output signal of the odometer generates error accumulation, and when the odometer is applied to the initial calibration of the inertial navigation device, the error accumulation causes low calibration accuracy of the inertial navigation device, and in severe cases, the calibration task fails, so that before the odometer is used for calibrating the inertial navigation device, it is necessary to firstly evaluate and verify the accuracy of the odometer, and related odometer accuracy verification systems and verification methods do not exist at present.
Disclosure of Invention
Aiming at the defects of the prior art, the technical problems to be solved by the invention are as follows: the wheel-type odometer calibration system and method based on the FPGA are provided, and the problem that in the prior art, before the odometer is used for calibrating an inertial navigation device, the accuracy of the wheel-type odometer is difficult to accurately and effectively evaluate and calibrate is solved.
In order to solve the technical problems, the invention adopts the following technical scheme:
a wheeled odometer checking system based on an FPGA comprises an upper computer, an FPGA component and an odometer to be checked, wherein the FPGA component comprises a serial port module, a square wave generator module, a square wave phase discrimination module and a counting module; the input end of the odometer is connected with the square wave generator module, and the output end of the odometer is connected with the counting module; wherein the content of the first and second substances,
the serial port module is connected with the upper computer and is used for communicating with the upper computer;
the square wave generator module is connected with the serial port module and used for generating and outputting two original square waves with corresponding frequency and phase according to a control signal sent by the upper computer through the serial port module;
the square wave phase demodulation module is connected with the square wave generator module and is used for receiving the two original square wave signals, judging the phase advance relationship of the two original square waves and then outputting the square wave signals with advanced phases;
the counting module is connected with the square wave phase discrimination module and the odometer to be checked and used for respectively counting the advanced-phase square wave signals output by the square wave phase discrimination module and the odometer to be checked and uploading the count value to an upper computer through the serial port module;
the upper computer is used for sending a control signal for generating an original square wave and displaying the original square wave, a leading-phase square wave signal output by the square wave phase discrimination module and a count value of a leading-phase square wave signal output by the odometer.
Based on the checking system, the invention also provides a wheel type odometer checking method based on the FPGA, the checking system is adopted, and the method comprises the following steps,
1) Sending a preset control signal to the FPGA component through the upper computer;
2) After receiving the control signal, a square wave generator module of the FPGA component generates two original square waves with corresponding frequency and phase, and respectively outputs the original square waves to a odometer to be checked and a square wave phase discrimination module;
3) The odometer and the square wave phase discrimination module respectively process the original square wave to generate a square wave signal with an advanced phase and output the square wave signal to the counting module;
4) The counting module respectively counts the square wave signals with advanced phases sent by the odometer and the square wave phase discrimination module, and uploads the count values of the square wave signals with advanced phases output by the square wave phase discrimination module and the square wave signals with advanced phases output by the odometer to an upper computer;
5) After receiving the count value uploaded by the counting module, the upper computer displays the count value and the count value of the original square wave;
6) Observing whether the count values displayed by the upper computer are consistent, if so, judging that the odometer works normally; and if the square wave signal with the advanced phase output by the odometer is inconsistent with the counting value of the original square wave signal, the odometer works abnormally.
In the step 2), the square wave generator module receives a control signal sent by an upper computer through a serial port, an internal IP core is used for generating an RAM memory for storing a checked control signal data packet, and after the data packet in the RAM is decoded and read, two original square waves corresponding to frequency and phase are generated according to frequency size and phase advance data and output to the odometer and the square wave phase demodulation module.
As an optimization, in step 3), the square wave phase discrimination module processes the original square waves and then generates a leading-phase square wave signal, including setting two original square waves as a and b, respectively, starting counting by taking the rising edge of a as a reference, ending counting when the rising edge of b arrives, and recording the time as T3; starting counting by taking the rising edge of the b as a reference, finishing counting when the rising edge of the a arrives, and recording the time as T4; comparing the magnitude of T3 with that of T4, and when T3 is greater than T4, the phase of a leads b, and a is output as a square wave signal with a leading phase; on the contrary, b leads the phase a, and b is output as a square wave signal with a leading phase.
Compared with the prior art, the application has the following beneficial effects:
the invention can simulate the work of the odometer only through the FPGA component and generate a corresponding square wave signal as the input of the odometer. The odometer precision can be verified by comparing the count values of the two paths of output pulse signals of the odometer and the FPGA component simulation odometer, and other peripheral function generators and frequency modulation circuits are not needed. The invention adopts the FPGA design, and only needs to generate the frequency generator and the phase discriminator by the FPGA, thereby saving the external hardware circuit, saving the cost, having small volume and size, simple peripheral circuit and quicker program inspection.
Drawings
FIG. 1 is a functional block diagram of a verification device of the present invention;
fig. 2 is a phase discrimination schematic diagram of a square wave phase discrimination module according to the present invention;
fig. 3 is a schematic diagram of phase difference calculation according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
In the specific implementation: with reference to figures 1-3 of the drawings,
a wheeled odometer checking system based on an FPGA comprises an upper computer, an FPGA component and an odometer, wherein XC6SLX9 of a sailing company is adopted in the system, the FPGA has high operation speed and abundant logic units. The invention processes signals by using a corresponding hardware module generated in the FPGA, and the internal module comprises,
and the timer module adopts a counter form after the clock frequency division is carried out through an IP core in the FPGA, determines the counting number of the counter according to the clock frequency after the frequency division and the timing time required by the timer module, and the counting time is the timing time after the clock signal is output for counting a period. The counting module is respectively connected with the serial port module and the square wave phase demodulation module and used for counting the square wave signals with advanced phases output by the square wave phase demodulation module and uploading the count values to an upper computer through the serial port module.
And the serial port module is connected with the upper computer and is used for communicating with the upper computer and receiving the control message signal sent by the upper computer and uploading the checked square wave counting period count value.
And the square wave generator module is connected with the serial port module and used for generating and outputting two original square waves with corresponding frequency and phase according to the control message signals sent by the upper computer through the serial port module. Specifically, a counter is used for counting clock edges, and the total count is a square wave period/clock period; and half of the total number of the counts is output at a high level, and the other half is output at a low level, so that the periodic square wave can be generated. In the invention, the problem of checking the wheel vehicle odometer encoder is solved through a design scheme of an FPGA + Labview framework. An upper computer designed by Labview is used for providing a square wave counting function and issuing an analog square wave instruction, and the FPGA generates original square waves a and b of an analog wheel encoder. If the wheel is in forward rotation, an analog square wave with a phase advance of b is generated, and if the wheel is in reverse rotation, an analog square wave with b phase advance of a is generated, the FPGA can simulate an odometer through a square wave phase discrimination module to output a square wave signal with the phase advance.
And the square wave phase discrimination module is connected with the square wave generator module and is used for receiving and discriminating the phases of the two original square waves and outputting a square wave signal with a leading phase.
The input end of the odometer is connected with the square wave generator module, the output end of the odometer is connected with the counting module, and the odometer is used for receiving and processing the original square wave output by the square wave generator module, outputting a square wave signal with an advanced phase, counting the square wave signal by the counting module and uploading the square wave signal to an upper computer;
the upper computer is used for sending a control message signal for generating an original square wave, displaying the original square wave, a count value of a lead-phase square wave signal output by the square wave phase discrimination module and a count value of a lead-phase square wave signal output by the odometer, and judging the working state of the odometer by observing the count value displayed by the upper computer.
Based on the checking device, the invention also provides a wheel type odometer checking method based on the FPGA, the checking device is adopted, and the method comprises the following steps,
1) Sending a preset control message signal to the FPGA component through the upper computer;
2) And after receiving the control message signal, a square wave generator module of the FPGA component generates two original square waves with corresponding frequency and phase, and respectively outputs the original square waves to the odometer and the square wave phase discrimination module. Specifically, the square wave generator module receives a control message signal sent by an upper computer through a serial port, generates an RAM memory by using an internal IP core, is used for storing a checked control message signal data packet, generates two original square waves a and b corresponding to frequency and phase according to frequency size and phase advance data after decoding and reading the data packet in the RAM, and outputs the two original square waves a and b to the odometer and the square wave phase discrimination module.
3) The odometer and the square wave phase demodulation module respectively process the original square wave to generate an advanced phase square wave signal and output the advanced phase square wave signal to the counting module. Specifically, as shown in fig. 2, the square wave phase discrimination module processes an original square wave and generates a leading phase square wave signal, where counting is started with a rising edge of a as a reference, and when a rising edge of b arrives, counting is ended, and time is denoted as T3; starting counting by taking the rising edge of b as a reference, finishing counting when the rising edge of a arrives, and recording the time as T4; comparing the magnitude of T3 with that of T4, and when T3 is greater than T4, the phase of a leads b, and a is output as a square wave signal c with a leading phase; on the contrary, b leads the phase a, and b is output as a square wave signal c with a leading phase. The square wave signal with advanced phase output after the odometer processing is marked as A or B.
4) The technical module counts the advanced phase square wave signals sent by the odometer and the square wave phase discrimination module according to a control command of the upper computer and uploads the count value to the upper computer.
5) And the upper computer displays the count value and the count value of the original square wave after receiving the count value uploaded by the counting module, and judges whether the working state of the odometer is normal or not by observing whether the count values displayed by the upper computer are consistent or not. Specifically, after the upper computer sends a signal mark for starting counting, the FPGA component respectively counts the rising edge of an original advanced phase square wave a and B, the rising edge of a square wave signal c after the phase discrimination of the analog odometer and the rising edge of a square wave A or B output by the odometer, when the mark for ending counting is received, the front square wave counting is ended, the FPGA outputs a square wave counting value to the upper computer through a serial port module for displaying, whether the counting value of the odometer is consistent with or matched with the counting value of the FPGA analog odometer is observed, whether the odometer works normally can be known, meanwhile, the accumulated error range of the odometer can be evaluated according to the difference value between the counting values, so that whether the odometer can be used for calibrating the inertial navigation device or not can be determined subsequently, if the error exceeds a certain range, other odometers with higher precision can be replaced for calibrating the inertial navigation device, or the error condition obtained by referring to the calibration device is convenient for compensating the error in the subsequent calibration of the inertial navigation device.
If we want to know, the phase difference time can also be calculated by observing the phase difference, as shown in fig. 3, the square waves with the phase difference are subjected to exclusive or, and according to the result that the same is 0 and the difference is 1, a waveform of the phase difference of the two square waves is generated, t1 and t2 can be obtained according to the time of a plurality of rising edges or falling edges, namely when the rising edge of the pulse comes, the counter is turned on; the value of the counter is read when the next falling edge comes. the ratio of t1 to t2 is the phase difference of the square wave.
The invention can simulate the work of the odometer only through the FPGA component and generate a corresponding square wave signal to be used as the input of the odometer. The odometer precision can be verified by comparing the count values of the two paths of output pulse signals of the odometer and the FPGA component simulation odometer, and other peripheral function generators and frequency modulation circuits are not needed. Compared with the existing measuring device, the invention adopts the design of the FPGA, and only needs to generate the frequency generator and the phase discriminator by the FPGA, thereby saving an external hardware circuit, saving the cost, having small volume and size, simple peripheral circuit and quicker program inspection.
Although embodiments of the present invention have been shown and described, it will be apparent to those skilled in the art that various changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents, and therefore the embodiments of the present invention are intended to be illustrative examples of the present invention only, and should not be construed as limiting the invention in any way.

Claims (4)

1. A wheeled odometer checking system based on an FPGA is characterized by comprising an upper computer, an FPGA component and an odometer to be checked, wherein the FPGA component comprises a serial port module, a square wave generator module, a square wave phase discrimination module and a counting module; the input end of the odometer is connected with the square wave generator module, and the output end of the odometer is connected with the counting module; wherein, the first and the second end of the pipe are connected with each other,
the serial port module is connected with the upper computer and is used for communicating with the upper computer;
the square wave generator module is connected with the serial port module and used for generating and outputting two original square waves with corresponding frequency and phase according to a control signal sent by the upper computer through the serial port module;
the square wave phase discrimination module is connected with the square wave generator module and is used for receiving two original square wave signals, judging the phase advance relation of the two original square waves and then outputting the square wave signals with advanced phases;
the counting module is connected with the square wave phase discrimination module and the odometer to be checked and used for respectively counting the advanced-phase square wave signals output by the square wave phase discrimination module and the odometer to be checked and uploading the count value to an upper computer through the serial port module;
the upper computer is used for sending a control signal for generating an original square wave and displaying the original square wave, a leading-phase square wave signal output by the square wave phase discrimination module and a count value of a leading-phase square wave signal output by the odometer.
2. A wheeled odometer verification method based on FPGA, using a verification system according to claim 1, characterized by comprising the steps of,
1) Sending a preset control signal to the FPGA component through the upper computer;
2) After receiving the control signal, a square wave generator module of the FPGA component generates two original square waves with corresponding frequency and phase, and respectively outputs the original square waves to a speedometer to be checked and a square wave phase discrimination module;
3) The odometer and the square wave phase demodulation module respectively process the original square wave to generate square wave signals with advanced phases and output the square wave signals to the counting module;
4) The counting module respectively counts the square wave signals with advanced phases sent by the odometer and the square wave phase discrimination module, and uploads the count values of the square wave signals with advanced phases output by the square wave phase discrimination module and the square wave signals with advanced phases output by the odometer to an upper computer;
5) The upper computer displays the count value and the count value of the original square wave after receiving the count value uploaded by the counting module;
6) Observing whether the count values displayed by the upper computer are consistent, and if the count values are consistent, the mileometer works normally; and if the square wave signal with the advanced phase output by the odometer is inconsistent with the counting value of the original square wave signal, the odometer works abnormally.
3. The wheeled odometer checking method based on the FPGA according to claim 2, wherein in the step 2), the square wave generator module receives a control signal sent by the upper computer through a serial port, the RAM memory is generated by using an internal IP core, and is used for storing a checked control signal data packet, and after the data packet in the RAM is decoded and read, two original square waves with corresponding frequency and phase are generated according to frequency size and phase advance data and output to the odometer and the square wave phase discrimination module.
4. The wheeled odometer checking method based on the FPGA of claim 2, wherein in the step 3), the square wave phase discrimination module processes an original square wave to generate a leading phase square wave signal, and includes setting two original square waves as a and b, respectively, starting counting with a rising edge of a as a reference, ending counting when a rising edge of b arrives, and recording time as T3; starting counting by taking the rising edge of b as a reference, finishing counting when the rising edge of a arrives, and recording the time as T4; comparing the magnitude of T3 with that of T4, and when T3 is greater than T4, the phase of a leads b, and a is output as a square wave signal with a leading phase; on the contrary, b leads the phase a, and b is output as a square wave signal with a leading phase.
CN202211327354.8A 2022-10-27 2022-10-27 Wheeled odometer checking system and method based on FPGA Pending CN115615462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211327354.8A CN115615462A (en) 2022-10-27 2022-10-27 Wheeled odometer checking system and method based on FPGA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211327354.8A CN115615462A (en) 2022-10-27 2022-10-27 Wheeled odometer checking system and method based on FPGA

Publications (1)

Publication Number Publication Date
CN115615462A true CN115615462A (en) 2023-01-17

Family

ID=84877203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211327354.8A Pending CN115615462A (en) 2022-10-27 2022-10-27 Wheeled odometer checking system and method based on FPGA

Country Status (1)

Country Link
CN (1) CN115615462A (en)

Similar Documents

Publication Publication Date Title
US9031736B2 (en) Channel diagnostic system for sent receiver
CN104569472B (en) A kind of velocity acquiring method based on photoelectric pulse coder
US20050223787A1 (en) Engine crankshaft position recognition and tracking method applicable to cam and crankshaft signals with arbitrary patterns
CN106645780B (en) DSP-based rotating speed detection method and system
US10451647B2 (en) Method and device for measuring speed of permanent magnet synchronous motor
CN110579618A (en) Motor rotating speed acquisition and analysis device and method based on FPGA
CN105245203A (en) System and method for duty ratio detection employing high precision and low speed clock
CN100514068C (en) Method for measuring rotating speed of rotating shaft by sliding time window method
CN115615462A (en) Wheeled odometer checking system and method based on FPGA
CN110879298B (en) Speed acquisition method based on communication type encoder
JP2016115357A (en) Device and method for inspecting operation clock signal of position determination device
JPH04326410A (en) Clock monitor device
CN117970373B (en) Satellite navigation chip, rotating speed calculation method thereof, receiver and electronic equipment
RU105787U1 (en) DEVICE FOR DETERMINING THE ERROR OF THE "ANGLE-CODE" CONVERTER
CN202300375U (en) Drilling depth tester for roller-bit hole rig
CN111562798A (en) Device capable of generating fixed-angle pulse at specified position and working method thereof
CN103546076B (en) Turn count method and apply its computer readable media
EP2660565B1 (en) Digital logic circuit and method for detecting a relative shaft position on geared shafts
US6310458B1 (en) Blended velocity estimation
CN104406545A (en) Device for measuring and calculating rotating angle based on incremental rotary optical encoder
CN108627670B (en) Method and device for detecting motor rotation speed
JPH1146184A (en) Bit error measuring instrument
KR19990043005A (en) Motor speed detection device using incremental encoder
JPH05332788A (en) Data processing device for rotary encoder
CN110186488A (en) It is a kind of for improving the detection method of orthogonal coding rotary angle transmitter counting precision

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