Background technology
Basic composition (shown in attached Fig. 1 and 2) based on the electric whiteboard system (comprising copying electronic whiteboard and interactive electric whiteboard) of ultrasound wave positioning principle: ultrasound wave and infrared signal emission pen, ultrasound wave and infrared signal receiver, the computing machine at electronic whiteboard software place, connecting line between receiver and the computing machine, and blank.Wherein receiver (ultrasound wave and infrared signal receiver) comprises two ultrasound waves and infrared induction head/range finder module, and locating module; Although two of example ultrasound waves and infrared induction head/range finder module are arranged on two angles at blank top in the accompanying drawing 1, and separate with locating module, but those skilled in the art will know that, two ultrasound waves and infrared induction head/range finder module are can be placed on the angle, and and locating module be incorporated on the receiver hardware.The principle of location is: ultrasonic signal and infrared signal are sent from the emission pen, ultrasonic signal is with the aerial propagation of the velocity of sound, and received by two ultrasound waves and infrared signal infrared induction head/range finder module, infrared signal propagates into infrared receiving diode on the receiver with the light velocity from the position of emission pen.With respect to the travel-time of ultrasonic signal, the skyborne travel-time of infrared signal can ignore, so infrared signal is equivalent to the synchronizing signal between pen and the receiver, namely receiver can be known hyperacoustic x time from infrared signal.So the ultrasound wave x time that provides according to infrared signal, and two ultrasound waves and the received ultrasonic signal of infrared induction head/range finder module just can obtain launching pen to the distance of two ultrasound waves and infrared induction head/range finder module, are respectively d1 and d2.Recycle the known separation d3 between two ultrasound waves and the infrared signal receiver, the locating module of receiver just can be determined the exact position of pen according to the triangle location.
Existing receiver is a kind of " hard receiver ".Concrete implementation is as shown in Figure 3: a dsp processor that is used for specially doing range finding and location Calculation is arranged on the acceptor circuit plate, receiver is the position coordinates at nib place to the main frame transmission, receiver hardware is identified as Man Machine Interface (the HID--Human Interface Device) equipment of a standard by main frame, the electronic whiteboard software on the main frame mainly is exactly to process and respond the various message that this HID equipment is issued application program.The system architecture of this " hard receiver " has determined that it has following characteristics:
1. the dsp processor that is used for specially doing range finding and location Calculation has increased the hardware cost of whole receiver widely;
2. limited hardware resource (computing power and storage unit) has limited the implementation complexity of algorithm on the receiver.In order to realize the localization by ultrasonic algorithm at receiver hardware, the Algorithm Performance of sometimes having to sacrifice carries out necessary simplification to algorithm.
3. because the localization by ultrasonic algorithm is to be solidificated in the hardware circuit of receiver, in order to improve system accuracy, upgrade or upgrade the algorithm on the hardware, be very difficult.Generally must throw away old receiver hardware, and buy brand-new receiver hardware.
Supersonic sounding and location are a development and perfect technology.Particularly recent years, high-precision location algorithm (time-frequency, located in connection) emerges in an endless stream.It is increasing that but the common feature of these new algorithms is computation complexities, and the calculated amount that needs and storage space are also more and more.The system architecture of " hard receiver " has just hindered the application process of advanced location algorithm in electric whiteboard system.
Summary of the invention
In order to make advanced signal processing algorithm can be applied to rapidly in the electronic whiteboard product, and the upgrading of algorithm can farthest utilize original hardware resource again, reduce electronic waste, the present invention is based on receiver must and computing machine this characteristics of working together, the system architecture of a kind of " soft receiver " has been proposed.
As shown in Figure 4, in " soft receiver ", originally on computing machine/main frame that the location Calculation that receiver hardware is finished has been moved over to receiver links to each other, realize with software, soft receiver just sends two-way ultrasonic signal and one road infrared signal synchronous ground to main frame with certain data stream format, receiver just is a simple data acquisition equipment like this, no longer has any computing power, the signal processor that accounts for a very large hardware cost in " hard receiver " has not just needed yet, so the hardware cost of whole receiver has also just greatly lowered, and is real " thin (thin) " receiver.
Along with the continuous expansion of USB interface bandwidth and USB2.0 popularizing on computers, (bandwidth is: 96kHz*3*16bits) send in real time application program to from receiver and do not had any problem two-way ultrasonic signal and one tunnel infrared signal by the USB2.0 interface.Improvement (45nm) and CPU new architecture (hyperthread along with semiconducter process, double-core) release, the CPU processing power of active computer is also increasing, has surmounted the demand of existing application fully, has formed very large MIPS affluence and waste.We can utilize this part computational resource that is left unused to reduce weight to connecting on computers " hard receiver " fully.
For " soft receiver ", we can on the basis of original receiver hardware, improve system performance by upgrading host software (location algorithm).Enterprise just can be by the mode that software is downloaded client's the electronic whiteboard product of upgrading/upgrade like this, and other value-added service is provided, and is conducive to improve the client to satisfaction and the loyalty of enterprise.
The present invention has the feature of following several respects:
First aspect has been invented a kind of electric whiteboard system based on host process, and it comprises: ultrasound wave and infrared signal emission pen, and ultrasound wave and infrared signal receiver, computing machine, between the receiver and the connecting line between receiver and the computing machine, blank; It is characterized in that:
Ultrasound wave and infrared signal receiver gather 2 road ultrasonic signals and 1 tunnel infrared signal, this 3 road signal are simulated amplification, sampling/quantize, buffer memory/synchronously, form one road synchronous data flow, computing machine/main frame unpacks the synchronous data flow that receives, recover 2 road ultrasonic signals and 1 tunnel infrared signal, come calculative determination to go out the current location of nib according to this 3 tunnel original signal, so just reduce receiver hardware cost, make the receiver hardware resource can obtain recycling, and can upgrade core algorithm by software, improve the performance of system.
Second aspect, the implementation method of having invented a kind of electric whiteboard system based on host process, this system comprises: ultrasound wave and infrared signal emission pen, ultrasound wave and infrared signal receiver, computing machine, between the receiver and the connecting line between receiver and the computing machine, blank; The method comprises the steps:
Ultrasound wave and infrared signal receiver gather 2 road ultrasonic signals and 1 tunnel infrared signal, this 3 road signal are simulated amplification, sampling/quantize, buffer memory/synchronously, form the step of one road synchronous data flow;
Data stream is transferred to the step of host interface by the line between receiver and the main frame;
Computing machine/main frame unpacks the synchronous data flow that receives, and recovers 2 road ultrasonic signals and 1 tunnel infrared signal, comes calculative determination to go out the step of the current location of nib according to this 3 tunnel original signal;
According to position coordinates and other event messages of nib, the electronic whiteboard application software is made the step of response.
Embodiment
For the hardware cost that reduces receiver, recycling receiver hardware resource, and can improve by update software the performance of system, the present invention proposes the system architecture of a kind of " soft receiver ", originally on supersonic sounding that receiver hardware is finished and location Calculation has been moved to receiver links to each other computing machine/main frame, realize with software.
For realizing " soft receiver (Soft Receiver) " or " host process (Host processing) " this method, the hardware and software system need do following corresponding adjustment:
First: the Hardware Design of receiver
In " soft receiver ", the 2 road ultrasonic original signals that the receiver hardware system captures 2 ultrasonic receiving sensors and 1 infrared receiving diode are sensed 1 tunnel infrared original signal and are transferred on the main frame, do not do any location Calculation, or only do part and calculate.
As shown in Figure 4, on the received device of airborne ultrasonic signal 2 independently ultrasonic receiving sensor (transducer) catch and convert to electric signal, electric signal is caught and converted to the infrared signal also infrared receiving tube on the received device.This 3 road ultra-weak electronic signal amplifies through simulation, through over-sampling and quantification, has become digital signal, is buffered with synchronously again, forms at last a synchronous data stream.By the line between receiver and the main frame, deliver to main frame and get on.
From ultrasonic and infrared receiving sensor, simulation is amplified, and to becoming digital signal through analog to digital converter ADC, arrives synchronization caching again, and " soft receiver " all is the same with " hard receiver ".Different from hard receiver is, soft receiver is after 3 the road ultrasonic and infrared data packings of synchronization caching, directly by the USB interface chip, data is sent to main frame.Below we just are described in detail this part digital display circuit to interface chip of 3 railway digital signals behind the ADC.
As shown in Figure 5, this part system is divided into Timing Control, TS Gen, S/P Convert, Packet Gen, these 6 modules of FIFO and GDMA (State Management is integrated among the GDMA).Timing Control produces all required clocks of system, comprises that the system clock of AD is to guarantee the clock of whole synchronization of data streams.The serial data parallelization that S/P Convert produces A/D, and indication Packet Gen fetched data in the suitable moment.TS Gen calculates TS according to the mistiming of the rising edge appearance of LRCK rising edge and IrDA, and indication Packet Gen fetched data in the suitable moment.The data that TS Gen and S/PConvert produce be to be guaranteed by the LRCK that Timing Control produces synchronously.Packet Gen is according to the call format of packet, at first produce data packet head and write FIFO, the TS Data Integration of a road 16 bit that two-way 16 Bit datas that then S/P Convert produced and TS Gen produce is one group of data, write FIFO, after writing 16 groups of data, restart to produce data packet head, so circulation.The packet that the FIFO buffer memory collects reads by the GDMA module for USB IC.GDMA is responsible for safeguarding the state of FIFO and under the requirement of USB IC, by the GDMA interface data is read out from FIFO and sends USB IC to.
1.Timing Control and S/P Convert
As shown in Figure 5, ADC produces two-way 96KHZ, the voice data of 24BIT, and offer S/P Convert module in the mode of serial.S/P Convert adopts number with the clock BCK of 96KHZ*64=6.144MHZ.ADC and S/P Convert are synchronous by LRCK, and LRCK is a dutycycle 50%, the square-wave signal of frequency 96KHZ.When LRCK was high, ADC began to produce the sampled value on L road, and S/P Convert gets a bit of the sampled value on L road at the rising edge of each BCK, had adopted data on L road after 24 bats, and what remaining 8 bats were adopted is invalid value.After 32 bats, the LRCK step-down, S/P Convert indication Packet Gen gets the L circuit-switched data, ADC begins to produce the sampled value on R road, S/P Convert gets a bit of the sampled value on R road at the rising edge of each BCK, adopted data on R road after 24 bats, and what remaining 8 bats were adopted is invalid value.After 32 bats, LRCK uprises again, and S/P Convert indication Packet Gen gets the R circuit-switched data, and TS Gen has also produced TS value corresponding to current two paths of data simultaneously, and indication Packet Gen gets the TS data.So circulation.Then Packet Gen generated packet header and write FIFO before each packet data arrives wait for that S/P Convert and TS Gen produce data.
2.Package?Gen
When the L circuit-switched data was got in S/P Convert indication, Packet Gen took the L circuit-switched data away, and when the R circuit-switched data was got in S/P Convert indication, Packet Gen took the R circuit-switched data away, and TS Gen also indicates Packet Gen to take the TS data away simultaneously.This moment, Packet Gen took one group of data, comprised the TS data of voice data and 16 bits of two 32 bits.This moment Packet Gen the voice data of two 32 bits is blocked is the voice data of two 16 bits.Then the data with these three 16 bits write FIFO successively.Write rear continuation and wait for the arrival of next group data of indication, so repeat to write 16 groups of data after, regenerated packet header and write FIFO, wait for that then S/P Convert and TS Gen produce data.
3.FIFO and GDMA
So circulation.The data that Packet Gen writes FIFO read the IC to USB by GDMA.When USB IC indication will be from the GDMA reading out data (by the DREQ indication), if abundant data are arranged among the FIFO, GDMA enters delivery status, reading out data sends USB IC to from FIFO, if in transport process, data among the FIFO are less than a certain threshold value, and then GDMA enters halted state and indicates USB IC to suspend transmission (keeping DIOW for high), transmits data until the data among the FIFO just continue to enter delivery status greater than threshold value.When USB IC indication is countless when transmitting according to needs, GDMA enters halted state.In halted state, if it is full that FIFO also has data just to write, then Drop Packets Block begins to take over the work of reading FIFO, and this moment is whenever Packet Gen writes data of FIFO, Drop Packets Block just reads data, prevents that FIFO from overflowing.Until USB IC indication will be from the GDMA reading out data, Drop Packets Block quits work, and changes normal transmission state over to.
4. original infrared signal is carried out digitized a kind of new method
Inner at " soft receiver ", for the two-way ultrasonic signal, we directly carry out digitizing (sampling and quantification) with ADC to the amplitude of signal.And for infrared signal (IrDA), we not picture " firmly receiver " inner with AD directly to the digitizing of carrying out of infrared signal amplitude.Consider that we mainly are the temporal information (positional information on time shaft) in order to obtain infrared pulse from infrared signal IrDA, we have designed the rising edge detecting device of an IrDA.If there is not rising edge, the digitized infrared signal of current 96kHz is exactly N, and N is any one outer number of time stamp T S codomain, such as N=OxFFFF.If to the IrDA signal monitoring to rising edge, as shown in Figure 6, the mistiming that TS Gen occurs according to the rising edge of LRCK rising edge and IrDA is as time stamp T S (Time Stamp), and the digitized infrared signal of the value of time stamp T S as current time.
5. the form of data stream
Package Gen writes FIFO to data according to certain data layout, and is read to USB IC's by GDMA.The form of data stream as shown in Figure 8, data stream is comprised of continuous one by one FPGA Package, each Package has following form: the Package Header of 4 bytes, the back is followed by 16 sync packet.Package Header is comprised of PackageID and Package Counter, and each synchronization packets is comprised of 2 ultrasonic samples and 1 tunnel infrared time signal.
Second portion: software architecture
In order to cooperate " soft receiver ", computing machine/main frame will unpack the road synchronous data flow that receives, recover 2 road ultrasonic signals and 1 tunnel infrared signal, and come calculative determination to go out the current location of nib according to this 3 tunnel original signal, position coordinates and other message with pen send to electronic whiteboard software again.
Whether realize in driving according to algorithm, the software of " soft receiver " can be realized with two kinds of frameworks:
A kind of is receiver hardware is identified as a standard by main frame USB device, drives to be responsible for data are delivered to the location algorithm that upper strata/application layer realizes from the USB oral instructions.As shown in Figure 7, because hardware sends to main frame is 2 road ultrasonic and 1 tunnel infrared raw data, the hardware drive program on the main frame will receive the data that hardware is sent up, and give application program data.In order in real time mass data to be delivered to application layer from hardware, this device drives must operate at ISO pattern (synchronous data transmission pattern).Can use cyclic buffer (Ring Buffer) drive and application program between swap data real-time and efficiently.
Another kind is that algorithm has been integrated in the receiver apparatus driving, this drives the Man Machine Interface equipment HID equipment that is identified as a standard by main frame, the various message that this HID equipment is issued application program are just processed and responded to the electronic whiteboard software on upper strata, and algorithm is just realized at the kernel layer like this.
The packet packet loss detection
Whether after main frame is received synchronous data flow, correctly parse original ultrasonic and infrared data, at first will detect packet has and damages and lose.
Under the test pattern, packet header PID is OxFFAF, and Packet counter is fixed as 0x0808.16 figure places of data for increasing progressively continuously in the packet.If detect discontinuous data, perhaps PID and Packet counter are wrong, and perhaps the data in packet are not 96 16 figure places, illustrate mistake has occured.
Under the normal mode, packet header PID is OxFF7F, and Packet counter increases progressively continuously.If find that PID is wrong, perhaps Packet counter is not 16 figure places that increase progressively continuously, and perhaps the data in packet are not 96 16 figure places, illustrate mistake has occured.Note, the data that just begun to read not necessarily are packet header just, may be that the centre from certain packet begins to read.
Infrared signal: data are processed
According to digitized infrared signal, we can calculate the zero-time of ultrasonic signal.If the infrared data value that receives is N, expression gathers the rising edge that does not run into infrared signal in this interval of organizing data, is called invalid infrared data; If infrared data is the number between [0, T-1], expression gathers the rising edge that runs into infrared signal in this interval of organizing data, is called effective infrared data; If invalid infrared data number is P between two effective infrared datas, these two effective infrared datas are respectively n1 and n2, the time interval between the rising edge of two infrared signals that then these two effective infrared datas are corresponding is: T*P+T+n2-n1, wherein T represents the maximal value of effective infrared data.
Above, describe the location Calculation that will finish at receiver hardware in detail and be moved over to the complete skill scheme that the computing machine that links to each other with receiver/main frame is realized " soft receiver ", and describe the feature of this structure framework and each building block in detail.
Obviously, those skilled in the art can carry out various changes and distortion to the present invention and not break away from the spirit and scope of the present invention.If these modifications of the present invention and distortion belong within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and is out of shape interior.