A kind of object space determines method and system
Technical field
The present invention relates to the communications fields, determine method and system in particular to a kind of object space.
Background technique
In public domain, robot mobile security is critically important.Robot needs that path is selected to go to avoid collision.It is practical
In environment, object space will not immobilize, for example People are hurrying to and fro.Robot cannot walk according to the map pre-stored in advance.
Some sensors of laser, vision or detecting distance are able to detect most of range, and map can be planned again, to avoid touching
It hits.But to realize 360 degree without dead angle, that just need to fill it is multiple, thus will limit the shape of robot, information processing when
Between it is elongated, while cost will also become very high.
Ultrasound examination: multiple ultrasonic waves are housed in robotic surface.Each ultrasonic wave is responsible for detecting certain angle range
It is interior whether there is or not object, multiple ultrasonic waves can form no dead zone detection range.After each ultrasonic wave obtains processor trigger command, hair
The PWM sound wave that pipe issues certain pulse is penetrated, when detecting object, reception pipe receives reflected PWM sound wave, passes through calculating
Time difference calculates the distance of object and obtains the Position Approximate of object.
Laser detection: sensor passes through the region of the pre-configured detection of upper computer software.Processor is configured by IO and is selected
Select the detection zone that equipment needs under different operation conditions.When an object is detected, a switching value is exported accordingly.
For ultrasound examination, each ultrasonic wave response time need several milliseconds to a few tens of milliseconds, multiple ultrasonic waves responses
Time will greatly increase;For the I/O resource of processor, at least one IO of each sensor is used for detection data, multiple sensors
Processor requirement will be increased.
For laser detection, general laser sensor can reach 270 degree of detection range, although laser sensor possesses
Additional detection function, such as regional planning, triggering distance setting, but it is fairly expensive in opposite cost.
It is long or at high cost there are the response time to object space positioning for ultrasonic wave or laser is passed through in the related technology
Problem, not yet proposition solution.
Summary of the invention
The embodiment of the invention provides a kind of object spaces to determine method and system, at least to solve to pass through in the related technology
Ultrasonic wave or laser have that the response time is long or at high cost to object space positioning.
According to one embodiment of present invention, it provides a kind of object space and determines system, comprising:
Detection circuit, the n infrared emission pipe including connecting into linear array, wherein the 1st infrared emission pipe and the first output
Port connection, n-th of infrared emission pipe are connect with second output terminal mouth, and the n infrared emission pipe is used for 360 degree of ranges
Interior object emission infrared signal, and receive the reflection signal that the object reflects the infrared signal;
Processor, the processor is connect with first output port, the second output terminal mouth respectively, for acquiring
The voltage of the voltage of first output port and the second output terminal mouth, and according to the voltage of first output port and
The voltage of the second output terminal mouth determines the position of the object.
Optionally, the n infrared emission pipe is also used to emit the infrared signal by transmitting terminal, and passes through reception
End receives the reflection signal.
Optionally, the detection circuit further include: first resistor R0, second resistance R0, n+1 resistance r, wherein the n
+ 1 resistance r series connection;
One end of the first resistor R0 and the second resistance R0 are all connected to power supply V0, and the first resistor R0's is another
One end is connect with the 1st resistance r, and the 1st infrared emission pipe passes through the 1st resistance r and first output port
Connection;
The second resistance R0 is connect with (n+1)th resistance r, and n-th of infrared emission pipe passes through (n+1)th electricity
Resistance r is connect with the second output terminal mouth;
One end of the n infrared emission pipe is connected respectively to the tie point between two resistance r, and the n infrared right
Penetrate the other end ground connection of pipe.
Optionally, the connection between the collector of the receiving end of the n infrared emission pipe and described two resistance r
Point connection, the transmitting collection ground connection of the receiving end of the n infrared emission pipe;
The anode of the transmitting terminal of the n infrared emission pipe is connect with power supply V, the institute of the n infrared emission pipe
The cathode for stating transmitting terminal is grounded by current-limiting resistance R1.
Optionally, the processor is also used to determine the center of the object in the following manner:
Wherein, the VL1 is the voltage of first output port, and the VL2 is the voltage of the second output terminal mouth.
According to another embodiment of the invention, it additionally provides a kind of object space and determines method, comprising:
By connecting into n infrared emission pipe of linear array in detection circuit to the infrared letter of object emission within the scope of 360 degree
Number, and receive the reflection signal that the object reflects the infrared signal, wherein the 1st infrared emission pipe and detection electricity
First output port on road connects, and n-th of infrared emission pipe is connect with the second output terminal mouth of the detection circuit;
The voltage of first output port and the voltage of the second output terminal mouth are acquired, and according to first output
The voltage of the voltage of port and the second output terminal mouth determines the position of the object.
Optionally, the infrared signal is emitted by the transmitting terminal of the n infrared emission pipe, the reflection signal
It is received by the receiving end of the n infrared emission pipe.
Optionally, the detection circuit further include: first resistor R0, second resistance R0, n+1 resistance r, wherein the n
+ 1 resistance series connection,
One end of the first resistor R0 and the second resistance R0 are all connected to power supply V0, and the first resistor R0's is another
One end is connect with the 1st resistance r, and the 1st infrared emission pipe passes through the 1st resistance r and first output port
Connection;
The second resistance R0 is connect with (n+1)th resistance r, and n-th of infrared emission pipe passes through (n+1)th electricity
Resistance r is connect with the second output terminal mouth.
Optionally, the tie point between the collector of the receiving end of the n infrared emission pipe and described two resistance r connects
It connects, the transmitting collection ground connection of the receiving end of the n infrared emission pipe;
The anode of the transmitting terminal of the n infrared emission pipe is connect with power supply V, the transmitting terminal of the n infrared emission pipe
Cathode be grounded by current-limiting resistance R1.
Optionally, in the following manner according to the voltage of the voltage of first output port and the second output terminal mouth
Determine the position of the object:
Wherein, the VL1 is the voltage of first output port, and the VL2 is the voltage of the second output terminal mouth.
According to still another embodiment of the invention, a kind of storage medium is additionally provided, meter is stored in the storage medium
Calculation machine program, wherein the computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
According to still another embodiment of the invention, a kind of electronic device, including memory and processor are additionally provided, it is described
Computer program is stored in memory, the processor is arranged to run the computer program to execute any of the above-described
Step in embodiment of the method.
Through the invention, by connecting into n infrared emission pipe of linear array in detection circuit to the object within the scope of 360 degree
Emit infrared signal, and receive the reflection signal that the object reflects the infrared signal, wherein the 1st infrared emission pipe with
First output port of the detection circuit connects, and the second output terminal mouth of n-th of infrared emission pipe and the detection circuit connects
It connects;The voltage of first output port and the voltage of the second output terminal mouth are acquired, and according to first output port
Voltage and the voltage of the second output terminal mouth determine the position of the object, can solve and pass through ultrasonic wave in the related technology
Or laser has that the response time is long or at high cost to object space positioning, due to only needing two signal output ports,
Cost is relatively low, and the position of object is determined according to the voltage of two output ports, and response ratio is very fast.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair
Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the hardware block diagram that a kind of object space of the embodiment of the present invention determines the mobile terminal of method;
Fig. 2 is the flow chart that a kind of object space according to an embodiment of the present invention determines method;
Fig. 3 is the block diagram that object space according to an embodiment of the present invention determines system;
Fig. 4 is the schematic diagram for the detection circuit that object space according to an embodiment of the present invention determines;
Fig. 5 is extraction single-point schematic diagram according to an embodiment of the present invention;
Fig. 6 is the relation schematic diagram of infrared emission pipe output voltage and distance according to an embodiment of the present invention.
Specific embodiment
Hereinafter, the present invention will be described in detail with reference to the accompanying drawings and in combination with Examples.It should be noted that not conflicting
In the case of, the features in the embodiments and the embodiments of the present application can be combined with each other.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.
Embodiment 1
Embodiment of the method provided by the embodiment of the present application one can be in mobile terminal, terminal or similar fortune
It calculates and is executed in device.For running on mobile terminals, Fig. 1 is that a kind of object space of the embodiment of the present invention determines method
The hardware block diagram of mobile terminal, as shown in Figure 1, mobile terminal 10 may include that one or more (only shows one in Fig. 1
It is a) (processor 102 can include but is not limited to the processing of Micro-processor MCV or programmable logic device FPGA etc. to processor 102
Device) and memory 104 for storing data, optionally, above-mentioned mobile terminal can also include the biography for communication function
Transfer device 106 and input-output equipment 108.It will appreciated by the skilled person that structure shown in FIG. 1 is only to show
Meaning, does not cause to limit to the structure of above-mentioned mobile terminal.For example, mobile terminal 10 may also include it is more than shown in Fig. 1
Perhaps less component or with the configuration different from shown in Fig. 1.
Memory 104 can be used for storing computer program, for example, the software program and module of application software, such as this hair
The corresponding computer program of message method of reseptance in bright embodiment, processor 102 are stored in memory 104 by operation
Computer program realizes above-mentioned method thereby executing various function application and data processing.Memory 104 may include
High speed random access memory, may also include nonvolatile memory, as one or more magnetic storage device, flash memory or its
His non-volatile solid state memory.In some instances, memory 104 can further comprise remotely setting relative to processor 102
The memory set, these remote memories can pass through network connection to mobile terminal 10.The example of above-mentioned network includes but not
It is limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Transmitting device 106 is used to that data to be received or sent via a network.Above-mentioned network specific example may include
The wireless network that the communication providers of mobile terminal 10 provide.In an example, transmitting device 106 includes a Network adaptation
Device (Network Interface Controller, referred to as NIC), can be connected by base station with other network equipments to
It can be communicated with internet.In an example, transmitting device 106 can for radio frequency (Radio Frequency, referred to as
RF) module is used to wirelessly be communicated with internet.
Provide in the present embodiment it is a kind of run on above-mentioned mobile terminal or the object space of the network architecture determines method,
Fig. 2 is the flow chart that a kind of object space according to an embodiment of the present invention determines method, as shown in Fig. 2, the process includes as follows
Step:
Step S202, the n infrared emission pipe by connecting into linear array in detection circuit are sent out to the object within the scope of 360 degree
Infrared signal is penetrated, and receives the reflection signal that the object reflects the infrared signal, wherein the 1st infrared emission pipe and institute
The first output port connection of detection circuit is stated, n-th of infrared emission pipe is connect with the second output terminal mouth of the detection circuit;
Step S204 acquires the voltage of first output port and the voltage of the second output terminal mouth, and according to institute
The voltage of the voltage and the second output terminal mouth of stating the first output port determines the position of the object.
S202 to S204 through the above steps, by connecting into n infrared emission pipe of linear array in detection circuit to 360 degree
Object emission infrared signal in range, and receive the reflection signal that the object reflects the infrared signal, wherein the 1st
Infrared emission pipe is connect with the first output port of the detection circuit, and the of n-th infrared emission pipe and the detection circuit
The connection of two output ports;The voltage of first output port and the voltage of the second output terminal mouth are acquired, and according to described
The voltage of the voltage of first output port and the second output terminal mouth determines the position of the object, can solve the relevant technologies
In by ultrasonic wave or laser there is a problem of that the response time is long or at high cost to object space positioning, due to only needing two letters
Number output port, cost is relatively low, and the position of object is determined according to the voltage of two output ports, and response ratio is very fast.
In an alternative embodiment, above-mentioned infrared signal can be the transmitting by the n infrared emission pipe
End transmitting, above-mentioned reflection signal can be received by the receiving end of the n infrared emission pipe.
In the embodiment of the present invention, the detection circuit is specific further include: first resistor R0, second resistance R0, n+1 resistance
R, wherein the n+1 resistance series connection,
One end of the first resistor R0 and the second resistance R0 are all connected to power supply V0, and the first resistor R0's is another
One end is connect with the 1st resistance r, and the 1st infrared emission pipe passes through the 1st resistance r and first output port
Connection;
The second resistance R0 is connect with (n+1)th resistance r, and n-th of infrared emission pipe passes through (n+1)th electricity
Resistance r is connect with the second output terminal mouth.
Further, the tie point between the collector of the receiving end of the n infrared emission pipe and described two resistance r
Connection, the transmitting collection ground connection of the receiving end of the n infrared emission pipe;
The anode of the transmitting terminal of the n infrared emission pipe is connect with power supply V, the transmitting terminal of the n infrared emission pipe
Cathode be grounded by current-limiting resistance R1.
The embodiment of the present invention, can be in the following manner according to the voltage of first output port and second output
The voltage of port determines the position of the object:
Wherein, the VL1 is the voltage of first output port, and the VL2 is the voltage of the second output terminal mouth.
Embodiment 2
The embodiment of the present invention additionally provides a kind of object space and determines system, and Fig. 3 is object according to an embodiment of the present invention
The block diagram of position determination system, as shown in Figure 3, comprising:
Detection circuit 32, the n infrared emission pipe including connecting into linear array, wherein the 1st infrared emission pipe and first defeated
Exit port connection, n-th of infrared emission pipe are connect with second output terminal mouth, and the n infrared emission pipe is used for 360 degree of models
Interior object emission infrared signal is enclosed, and receives the reflection signal that the object reflects the infrared signal;
Processor 34, the processor 34 connect with first output port, the second output terminal mouth respectively, are used for
The voltage of first output port and the voltage of the second output terminal mouth are acquired, and according to the electricity of first output port
The voltage of pressure and the second output terminal mouth determines the position of the object.
In the embodiment of the present invention, n above-mentioned infrared emission pipe is also used to emit the infrared signal by transmitting terminal,
And the reflection signal is received by receiving end.
Specifically, the detection circuit 32 can also include: first resistor R0, second resistance R0, n+1 resistance r,
In, the n+1 resistance r series connection;
One end of the first resistor R0 and the second resistance R0 are all connected to power supply V0, and the first resistor R0's is another
One end is connect with the 1st resistance r, and the 1st infrared emission pipe passes through the 1st resistance r and first output port
Connection;
The second resistance R0 is connect with (n+1)th resistance r, and n-th of infrared emission pipe passes through (n+1)th electricity
Resistance r is connect with the second output terminal mouth;
One end of the n infrared emission pipe is connected respectively to the tie point between two resistance r, and the n infrared right
Penetrate the other end ground connection of pipe.
Further, the company between the collector of the receiving end of the n infrared emission pipe and described two resistance r
Contact connection, the transmitting collection ground connection of the receiving end of the n infrared emission pipe;
The anode of the transmitting terminal of the n infrared emission pipe is connect with power supply V, the institute of the n infrared emission pipe
The cathode for stating transmitting terminal is grounded by current-limiting resistance R1.
In the embodiment of the present invention, the processor 34 is also used to determine the center of the object in the following manner:
Wherein, the VL1 is the voltage of first output port, and the VL2 is the voltage of the second output terminal mouth.
Above-described embodiment 1 and 2 is described in detail below.
Fig. 4 is the schematic diagram for the detection circuit that object space according to an embodiment of the present invention determines, as shown in figure 4, two
Resistance R0, one end are all connected to voltage source V0, and other end is connected respectively to resistance r, and resistance R0 is with the connected junction voltage of resistance r
It is denoted as VL1, VL2 and the i-th=0 column and i-th=n+1 column for being denoted as linear array herein respectively;The resistance r other end of the i-th=0 column
It is connected to one end of another resistance r, the resistance r being consecutively connected at i-th=n+1 makes all resistance r connect into one
Linear array.
On the receiving end collector of the indirect infrared emission pipe of every two resistance r, it is successively denoted as i=0 column, i=1 respectively
Column, i=2 column ... i=n-1 column, i=n column, i=n+1 column.The transmitting collection of infrared emission pipe receiving terminal is connected to the GND of system.
The transmitting terminal anode of infrared emission pipe connects power supply, and cathode connecting resistance meets GND, and whole infrared tubes keep shape to be detected
State.
Algorithm solves: be evenly distributed in each on X-axis (- 1,1) to penetrating pipe, i.e. i=1 to penetrating pipe coordinate as x
=-1,
At i=n is x=1 to pipe coordinate is penetrated, due to being generally evenly distributed on X-axis (- 1,1), so the i-th column are corresponding
Reception pipe coordinate representation are as follows:
- 2x (i)=0 (2) x (i-1)+x (i+1)
Fig. 5 is extraction single-point schematic diagram according to an embodiment of the present invention, as shown in fig. 5, it is assumed that the i-th column reception pipe flows into electricity
Stream is I (i), and voltage is Va (i), and voltage is Va (i-1) at the (i-1)-th column, and voltage is Va (i+1) at i+1, by kirchhoff electricity
Stream law has:
Similarly, online array edge is available:
It determines examined object center, the electric current at the center by reception pipe detection object can be converted into, express are as follows:
(3) are substituted into and arranges and can obtain:
By equation (7), can be obtained after arrangement
It (8), is 0, after arrangement by the first item that equation (2) can obtain (8) formula are as follows:
By equation (2), acquire:
Online array edge has Va (0)=VL 1, Va (n+1)=VL 2
By six equatioies and equation (4), (5) above, finally obtain:
Again by Kirchhoff's current law (KCL), the whole electric currents for flowing into reception pipe can be indicated are as follows:
In conclusion the coordinate of detection object center can be with is defined as:
In equation (12), n, R0, r are determining value, and VL1, VL2 can be obtained by the available value of processor
To the position of detection object.
In the embodiment of the present invention, in order to obtain farther away detecting distance, infrared tube should select electric current transmission rate CTR
It is biggish to pipe, Fig. 6 is the relation schematic diagram of infrared emission pipe output voltage and distance according to an embodiment of the present invention, such as Fig. 6
It is shown, such as the RPR220 of rom ROHM;If CTR is smaller, such as the VCNT2020 of prestige generation VISHAY, sensor detection will have a direct impact on
The ability of object distance.
The embodiment of the present invention, compared to other types sensor, since it is final only, there are two analog quantitys VL1, VL2 to need
Processor is obtained by AD value, so the I/O port quantity needed is to have quite big advantage compared to ultrasonic wave or laser sensor.
Equally, when detection range needs very big, multiple other types sensors all compare processor frequencies requirement, processing data speed
Linear array is infrared big more, and response speed linear array is infrared possesses absolute predominance.Compared to laser sensor, I/O port quantity is with valence
Lattice are with the obvious advantage, it is only necessary to which detection can be completed with infrared emission sensor in several resistance.Fast response time takes up less resources,
At low cost, detection range is without dead angle.
It should be noted that above-mentioned modules can be realized by software or hardware, for the latter, Ke Yitong
Following manner realization is crossed, but not limited to this: above-mentioned module is respectively positioned in same processor;Alternatively, above-mentioned modules are with any
Combined form is located in different processors.
Embodiment 3
The embodiments of the present invention also provide a kind of storage medium, computer program is stored in the storage medium, wherein
The computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
Optionally, in the present embodiment, above-mentioned storage medium can be set to store by executing based on following steps
Calculation machine program:
S1 is infrared to the object emission within the scope of 360 degree by n infrared emission pipe for connecting into linear array in detection circuit
Signal, and receive the reflection signal that the object reflects the infrared signal, wherein the 1st infrared emission pipe and the detection
First output port of circuit connects, and n-th of infrared emission pipe is connect with the second output terminal mouth of the detection circuit;
S2 acquires the voltage of first output port and the voltage of the second output terminal mouth, and according to described first
The voltage of the voltage of output port and the second output terminal mouth determines the position of the object.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to: USB flash disk, read-only memory (Read-
Only Memory, referred to as ROM), it is random access memory (Random Access Memory, referred to as RAM), mobile hard
The various media that can store computer program such as disk, magnetic or disk.
Embodiment 4
The embodiments of the present invention also provide a kind of electronic device, including memory and processor, stored in the memory
There is computer program, which is arranged to run computer program to execute the step in any of the above-described embodiment of the method
Suddenly.
Optionally, above-mentioned electronic device can also include transmission device and input-output equipment, wherein the transmission device
It is connected with above-mentioned processor, which connects with above-mentioned processor.
Optionally, in the present embodiment, above-mentioned processor can be set to execute following steps by computer program:
S1 is infrared to the object emission within the scope of 360 degree by n infrared emission pipe for connecting into linear array in detection circuit
Signal, and receive the reflection signal that the object reflects the infrared signal, wherein the 1st infrared emission pipe and the detection
First output port of circuit connects, and n-th of infrared emission pipe is connect with the second output terminal mouth of the detection circuit;
S2 acquires the voltage of first output port and the voltage of the second output terminal mouth, and according to described first
The voltage of the voltage of output port and the second output terminal mouth determines the position of the object.
Optionally, the specific example in the present embodiment can be with reference to described in above-described embodiment and optional embodiment
Example, details are not described herein for the present embodiment.
Obviously, those skilled in the art should be understood that each module of the above invention or each step can be with general
Computing device realize that they can be concentrated on a single computing device, or be distributed in multiple computing devices and formed
Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored
It is performed by computing device in the storage device, and in some cases, it can be to be different from shown in sequence execution herein
Out or description the step of, perhaps they are fabricated to each integrated circuit modules or by them multiple modules or
Step is fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific hardware and softwares to combine.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.It is all within principle of the invention, it is made it is any modification, etc.
With replacement, improvement etc., should all be included in the protection scope of the present invention.