Background technology
Basic composition (shown in attached Fig. 1 and 2) based on the electric whiteboard system (comprising duplicating formula electronic whiteboard and interactive electric whiteboard) of ultrasonic locating 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.Positioning Principle 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, just receiver can be known hyperacoustic x time from infrared signal.So the ultrasonic emitting that provides according to infrared signal constantly and two ultrasound waves and the received ultrasonic signal of infrared induction head/range finder module, just can obtain launching a distance to two ultrasound waves and infrared induction head/range finder module, is respectively d1 and d2.Utilize the known separation d3 between two ultrasound waves and the infrared signal receiver again, the locating module of receiver just can be determined the exact position of pen according to the triangle location.
Prior receivers is a kind of " hard receiver ".Concrete implementation is as shown in Figure 3: a dsp processor that is used for doing range finding and location Calculation is specially 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, and the electronic whiteboard software on the main frame mainly is exactly to handle and respond the various message that this HID equipment is issued application program.The system architecture of this " hard receiver " has determined it to have following characteristics:
1. the dsp processor that is used for doing range finding and location Calculation has specially 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 on receiver hardware, to realize the localization by ultrasonic algorithm, have to sacrifice the performance of algorithm sometimes, algorithm is carried out necessary simplification.
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 constantly a development and a 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 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 in the electronic whiteboard product rapidly, 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 of finishing on the receiver hardware has been moved over to receiver links to each other, realize with software, soft receiver just synchronously sends two-way ultrasonic signal and one tunnel infrared signal 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 big 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 application program in real time to from receiver and do not had any problem two-way ultrasonic signal and one tunnel infrared signal by the USB2.0 interface.Along with the improvement (45nm) of semiconducter process and the release of CPU new architecture (hyperthread, double-core), the CPU processing power of active computer is also increasing, has surmounted the demand of existing application fully, has formed the rich and waste of very big MIPS.We can utilize this part to be come to reduce weight to connecting on computers " hard receiver " by idle computational resource fully.
For " soft receiver ", we can improve system performance by upgrading host software (location algorithm) on the basis of original receiver hardware.Enterprise just can be by the mode of software download client's the electronic whiteboard product of upgrading/upgrade like this, and other value-added service is provided, and helps improving satisfaction and the loyalty of client to 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 are gathered 2 road ultrasonic signals and 1 tunnel infrared signal, this 3 road signal are simulated amplification, sampling/quantification, 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, calculate the current location of determining 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; This method comprises the steps:
Ultrasound wave and infrared signal receiver are gathered 2 road ultrasonic signals and 1 tunnel infrared signal, this 3 road signal are simulated amplification, sampling/quantification, 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, calculates the step of the current location of determining 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 the performance of system by update software, the present invention proposes the system architecture of a kind of " soft receiver ",, on computing machine/main frame that supersonic sounding of finishing on the receiver hardware and location Calculation have been moved to receiver links to each other, realize original 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, airborne ultrasonic signal is received on the device 2 independently ultrasonic receiving sensors (transducer) and catches and convert to electric signal, and electric signal is caught and converted to the infrared receiving tube that infrared signal also is received on the 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 a data in synchronization stream at last.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 with 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 way word 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, and the system clock that comprises AD is to guarantee the synchronous clock of entire stream.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 synchronization that TS Gen and S/PConvert produce is to be guaranteed by the LRCK that Timing Control produces.Packet Gen is according to the call format of packet, at first produce data packet head and write FIFO, the TS data integration of one tunnel 16 bit of two-way 16 Bit datas that S/P Convert is produced and TS Gen generation is one group of data then, write FIFO, after having write 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 once more, and S/P Convert indication Packet Gen gets the R circuit-switched data, and TS Gen has also produced the TS value of current two paths of data correspondence simultaneously, and indication Packet Gen gets the TS data.So circulation.Packet Gen had generated packet header and had write FIFO before each packet data arrives, and waited for that then 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 got one group of data, comprised the TS data of the voice data and one 16 bit 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.Data with these three 16 bits write FIFO successively then.Write the back and continue to have waited for next group gathering data arrival of indication, so repeat to have write 16 groups of data after, regenerated packet header and write FIFO, wait for S/P Convert and TS Gen generation data then.
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 of data (by the DREQ indication), if abundant data are arranged among the FIFO, GDMA enters delivery status, reading of 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), and the data in FIFO just continue to enter delivery status greater than threshold value and transmit data.When USB IC indication no datat need be transmitted, GDMA entered 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.Will be up to USB IC indication from the GDMA reading of 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
In " soft receiver " lining, 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 " receiver firmly " lining 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=0xFFFF.If 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) to the IrDA signal monitoring, 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 format, and is read to USB IC's by GDMA.The form of data stream as shown in Figure 8, data stream is made up 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 made up of PackageID and Package Counter, and each synchronization packets is made up 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 calculate the current location of determining 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 that according to algorithm the software of " soft receiver " can be realized with two kinds of frameworks:
A kind of to be receiver hardware be identified as the USB device of a standard by main frame, drives and 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 electronic whiteboard software on upper strata is just handled and is responded the various message that this HID equipment is issued application program, and algorithm just is implemented in 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 0xFFAF, 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 taken place.
Under the normal mode, packet header PID is 0xFF7F, 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 taken place.Noticing that 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 processing
According to digitized infrared signal, we can calculate the zero-time of ultrasonic signal.If the infrared data value that receives is N, the rising edge that does not run into infrared signal in this interval of organizing data is gathered in expression, is called invalid infrared data; If infrared data is the number between [0, T-1], the rising edge that runs into infrared signal in this interval of organizing data is gathered in expression, 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, then the time interval between the rising edge of two of these two effective infrared data correspondences infrared signals is: T*P+T+n2-n1, wherein T represents the maximal value of effective infrared data.
More than, describe in detail and will on computing machine/main frame that the location Calculation of finishing on the receiver hardware has been moved over to receiver links to each other, realize the complete skill scheme of " 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.