Summary of the invention
Below provide the brief overview of one or more aspect to provide the basic comprehension to these aspects.Detailed the combining of this not all aspect contemplated of general introduction is look at, and both not intended to be pointed out out the scope of key or decisive any or all aspect of elements nor delineate of all aspects.Its unique object is the sequence that some concepts that will provide one or more aspect in simplified form think the more detailed description provided after a while.
According to an aspect of the present invention, provide a kind of method for automatically adjusting the clock in visible light communication system, this visible light communication system comprises receiving terminal and at least one transmitting terminal.The method comprises: receive the visible light signal from the first transmitting terminal in this at least one transmitting terminal; The clock running parameter of this first transmitting terminal and the clock running parameter of this receiving terminal is determined according to this visible light signal being received from this first transmitting terminal; The clock speed factor of this first transmitting terminal is determined according to this clock running parameter of this first transmitting terminal and this clock running parameter of this receiving terminal; And upgrade the clock information of this first transmitting terminal that receiving terminal this locality stores every the scheduled time according to this clock speed factor of this first transmitting terminal.
In one example, the clock running parameter of this first transmitting terminal refers to the standard time of the unit interval actual experience corresponding to the system time of this first transmitting terminal, and the clock running parameter of this receiving terminal refers to the standard time of this unit interval actual experience corresponding to the system time of this receiving terminal, wherein standard time of actual experience be all measure in units of the system cycle of the crystal oscillator of this receiving terminal.
In one example, the clock speed factor of this first transmitting terminal is the standard time of this unit interval actual experience of the system time corresponding to this receiving terminal and the ratio of this unit interval actual standard time experienced of the system time corresponding to the first transmitting terminal.
In one example, this scheduled time is scheduled time of the system time of this receiving terminal, every this scheduled time, the error of this clock information of this first transmitting terminal that this receiving terminal this locality stores is the clock speed factor and the product of this scheduled time that deduct this first transmitting terminal this scheduled time, and this clock information wherein upgrading this first transmitting terminal that this receiving terminal this locality stores comprises and deducts this error with this clock information of this first transmitting terminal of this locality storage.
In one example, this unit interval is the nominal duration of a light pulse of this visible light signal being received from this first transmitting terminal, and this nominal duration equals the inverse of the nominal baud rate of this visible light signal.
In one example, be received from that duration of a light pulse of this visible light signal of this first transmitting terminal obtains in this receiving terminal place measurement and be designated as MT in units of the system cycle of the crystal oscillator of this receiving terminal corresponding to standard time of this unit interval actual experience of the system time of this first transmitting terminal
2 systems, and be calculated as (T corresponding to the standard time of this unit interval actual experience of the system time of this receiving terminal
0 nominalf
2 nominals) T
2 systems, wherein T
0 nominalfor the nominal duration of a light pulse of this visible light signal, f
2 nominalsfor the nominal frequency of the crystal oscillator of this receiving terminal, and T
2 systemsfor the system cycle of the crystal oscillator of this receiving terminal.
In one example, the duration being received from a light pulse of this visible light signal of this first transmitting terminal in this receiving terminal place measurement comprises: convert this visible light signal being received from this first transmitting terminal to digital signal; And timing is carried out until this high level or low level terminate with the system cycle of the crystal oscillator of this receiving terminal from the high level or low level of a pulse of this digital signal.
In one example, convert the visible light signal being received from the first transmitting terminal to digital signal to comprise: convert this visible light signal to electric impulse signal by photodiode, when the current value that this photodiode passes through is higher than output HIGH voltage level during threshold value, and when the current value that this photodiode passes through is lower than output LOW voltage level during this threshold value.This threshold value is at least decided by the distance between receiving terminal and the first transmitting terminal according to predetermined mathematical model.
In one example, the method also comprises: follow-up receive the visible light signal from this first transmitting terminal each time time, the clock running parameter repeating this clock running parameter determining this first transmitting terminal and this receiving terminal extremely upgrades the step of this clock information of this first transmitting terminal stored.
In one example, follow-up receive the visible light signal from this first transmitting terminal each time time, select corresponding pseudo-code signal to decode to the visible light signal received according to this clock information of this stored the first transmitting terminal.
In one example, this clock information of this first transmitting terminal that this receiving terminal this locality stores be at first store when this receiving terminal receives the visible light signal of this first transmitting terminal first and be set as and equal this receiving terminal clock information at that time.
According to a further aspect in the invention, provide a kind of communicator for automatically adjusting the clock in visible light communication system, this visible light communication system comprises at least one transmitter and this communicator, this communicator comprises: receiver, and it receives the visible light signal from the first transmitter in this at least one transmitter; Clock running parameter determination module, it determines the clock running parameter of this first transmitter and the clock running parameter of this communicator according to this visible light signal being received from this first transmitter; Clock speed factor determination module, determines the clock speed factor of this first transmitter according to this clock running parameter of this first transmitter and this clock running parameter of this communicator; And clock information adjusting module, it upgrades the clock information of this first transmitter that this communicator this locality stores every the scheduled time according to this clock speed factor of this first transmitter.
According to another aspect of the invention, provide a kind of communicator, comprise: processor, this processor is configured to receive the visible light signal from the first transmitter in this at least one transmitter, the clock running parameter of this first transmitter and the clock running parameter of this communicator is determined according to this visible light signal being received from this first transmitter, the clock speed factor of this first transmitter is determined according to this clock running parameter of this first transmitter and this clock running parameter of this communicator, and upgrade the clock information of this first transmitter that this communicator this locality stores every the scheduled time according to this clock speed factor of this first transmitter, and be coupled to the memory of this processor.
In accordance with a further aspect of the present invention, provide a kind of equipment, comprising: for receiving the device of the visible light signal from the first transmitter at least one transmitter; For determining the device of the clock running parameter of this first transmitter and the clock running parameter of receiving equipment according to this visible light signal being received from this first transmitter; For determining the device of the clock speed factor of this first transmitter according to this clock running parameter of this first transmitter and this clock running parameter of this receiving equipment; And for the device of the clock information that upgrades this first transmitter that this receiving equipment this locality stores according to this clock speed factor of this first transmitter every the scheduled time.
According to a further aspect in the invention, provide a kind of computer program, it comprises computer-readable medium, and this computer-readable medium comprises: for receiving the code of the visible light signal from the first transmitter at least one transmitter; For determining the code of the clock running parameter of this first transmitter and the clock running parameter of receiving equipment according to this visible light signal being received from this first transmitter; For determining the code of the clock speed factor of this first transmitter according to this clock running parameter of this first transmitter and this clock running parameter of this receiving equipment; And for the code of the clock information that upgrades this first transmitter that this receiving equipment this locality stores according to this clock speed factor of this first transmitter every the scheduled time.
According to method and apparatus of the present invention, the clock information of the transmitting terminal that receiving terminal this locality is preserved can upgrade in time, thus basically identical with the real clock information of transmitting terminal.This communication for transmitting-receiving two-end is significant.When visible light signal is encrypted with the pseudo-code signal changed according to the clock information of transmitting terminal, the clock information of this transmitting terminal that receiving terminal can store according to this locality selects corresponding pseudo-code signal to decode to the visible light signal received.The pseudo-code sequence selected thus is inevitable is corresponding with transmitting terminal place for the pseudo-code sequence encrypted, thus ensure that and correctly decipher.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is described in detail.Note, the aspects described below in conjunction with the drawings and specific embodiments is only exemplary, and should not be understood to carry out any restriction to protection scope of the present invention.
Fig. 1 shows one can realize visible light communication system 100 of the present invention wherein.Visible light communication system 100 comprises transmitting terminal 110 and receiving terminal 120.The pseudo-code signal generator 112 that transmitting terminal 110 comprises encoder 111 and is coupled with encoder 111.Encoder 111 receives original communication data, and the pseudo-code signal adopting pseudo-code signal generator 112 to produce encodes to produce scrambler signal to original communication data.Because the scrambler signal produced is different from original communication data, therefore serve the effect of encryption.As used in this article, term " encryption " and " coding ", and " deciphering " and " decoding " can use interchangeably.Original communication data can be the id informations be associated with transmitting terminal 110.Encoder 111 exports scrambler signal to luminescence unit 113, and the scrambler signal received sends with the form of visible ray by the latter.Luminescence unit 113 can be LED or other there is the element of lighting function.Transmitting terminal 110 can be the hand-hold type client in photon Internet of Things.
Receiving terminal 120 comprises the visible light signal for receiving transmitting terminal 110 transmitting and visible light signal is converted to the receiving element 123 of digital signal.Decoder 121 receives the digital signal exported by receiving element 123 and the pseudo-code signal adopting pseudo-code signal generator 122 to produce is decoded to it, to recover original communication data.In the visible light communication system 100 shown in Fig. 1, illustrate only a transmitting terminal 110, but those skilled in the art are comprehensible, often there is multiple transmitting terminal 110 corresponding to a receiving terminal 120.
In order to make the communication between transmitting terminal 110 and receiving terminal 120, there is higher fail safe, prevent high-speed camera from taking and copy light signal, so all employ time dependent pseudo-code sequence to have carried out encryption and decryption to original communication data in transmitting terminal 110 and receiving terminal 120.Therefore, as shown in Figure 1, the clock signal that provides with crystal oscillator 114 of pseudo-code signal generator 112 is for benchmark is according to the time dependent pseudo-code signal of the State-output of the state machine of transmitting terminal 110.Correspondingly, the clock signal that the pseudo-code signal reflector 122 in receiving terminal 120 also provides with crystal oscillator 124 is for benchmark is according to the time dependent pseudo-code signal of the State-output of the state machine of receiving terminal 120.
Fig. 2 shows a kind of flow chart of the encipher-decipher method used in visible light communication system 100.In step 201, transmitting terminal 110 pairs of original communication data and time dependent first pseudo-code signal carry out logical operation to obtain scrambler signal.Original communication data can be the information that will send, such as user identity (ID) information etc., and can be a kind of numerical sequence signals.Pseudo-code signal can be the Serial No. with unit interval change, and wherein this unit interval can be arranged as required, such as, every day, per hour, per minute, per second etc.The logical operation of original communication data and the first pseudo-code signal can be logical AND, logic OR, logic XOR etc., also can be in above-mentioned computing arbitrarily both or more the combination of person.
Such as original communication data are the user ID of transmitting terminal, and are always 00001101.Transmitting terminal N state corresponding after 5 unit interval T+5 times, the first pseudo-code signal can be 10101010, then the logical operation of original communication data and the first pseudo-code signal, and the process of such as distance is as shown in the table:
Original communication data |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
1 |
First pseudo-code signal |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
Scrambler signal |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
In step 202, this scrambler signal sends with the form of visible light signal by transmitting terminal 110.Such as, modulation signal is sent with flash of light form by LED by transmitting terminal 110.For above-mentioned scrambler signal 10100111, LED can produce high-frequency flicker, have light to represent 1, unglazedly represent 0, or vice versa, thus have effectively achieved visible light communication.
In step 203, receiving terminal 120 receives the visible light signal that transmitting terminal 110 sends, and this visible light signal is converted to digital signal.Such as, for the high-frequency flicker that LED produces, there is light to represent 1, unglazedly represent 0, otherwise or, thus the visible light signal of reception can be converted to digital signal.The process that light signal is converted to digital signal is as follows: be first opto-electronic conversion, utilizes the signal of telecommunication of photodiode and the characteristic of light signal, forms electric impulse signal.But because the position of transmitting terminal and receiving terminal is different, namely each transmitting terminal is transmitted into the light signal strength of receiving terminal is different, so its signal of telecommunication power is also different, so need the electric current to photodiode is formed to carry out commutating ratio comparatively.As the current value that passes through when diode higher than certain certain threshold value time, the voltage level values of output is adjusted to high level by photoelectric switching circuit; When the current value by photodiode is lower than a certain threshold value, the voltage level values of output is adjusted to low level by photoelectric switching circuit.The setting of this threshold value is set according to different environment by a Mathematical Modeling, and as time distant, threshold value may reduce; May relatively raise apart from threshold value time near, the variation relation namely between threshold value and threshold value is determined by Mathematical Modeling, can be linear relationship, also can be non-linear relation.By above process, can level be adjusted in certain limit, ensure correct pulse shape with this, to ensure the correct of sampling, thus ensure the correctness of clock calculation.
In step 204, receiving terminal 120 to be decoded such as logical operation to this digital signal and the second pseudo-code signal, to obtain original communication data.Particularly, under receiving-end state N+5 corresponding after 5 unit interval T, the second pseudo-code signal is also 10101010, identical with the first pseudo-code signal pattern, start-stop phase place.Receiving terminal 120 to the received signal with the logical operation of the second pseudo-code signal, such as distance process is as shown in the table:
The signal received |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
Second pseudo-code signal |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
Decoded output signal |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
1 |
Visible, decoded output signal is 00001101, identical with original communication data, has namely decoded original communication data.
As described above, in order to make receiving terminal be correctly decoded, the pseudo-code signal that the pseudo-code signal that the pseudo-code signal generator of receiving terminal produces needs and the pseudo-code signal generator of transmitting terminal produces synchronously changes.Particularly, the change of pseudo-code signal is by the Determines of the state machine of transmitting-receiving two-end, through certain unit interval (such as, the time period of 1 second, 1 minute or miscellaneous stipulations) after, the state of the state machine of transmitting-receiving two-end will jump to next state by Last status, and the pseudo-code signal that the encryption and decryption corresponding with state machine state simultaneously use also can do identical change.
In visible light communication system, the precision of the clock system of VISIBLE LIGHT EMISSION end 110 and receiving terminal 120 determined by respective crystal oscillator 114,124.Due to each side such as manufacturing process, operational environment, all can there is certain error in crystal oscillator 114,124, and this just makes the time variations of transmitting terminal 110 and receiving terminal 120 can be different.Suppose transmitting-receiving two-end all timing from 0 second, but the clock system of receiving terminal 120 is hurried up relatively, as with the time of standard for reference, through the time of 1 second, clock system in possible transmitting terminal 110 just arrives 0.999999 second, but at this moment the clock system of receiving terminal 120 has arrived 1.000001 seconds, and both errors are 1.000001-0.999999=0.000002 second, after 500000 seconds of the standard time, the display of the clock system of transmitting-receiving two-end was by difference 1 second.
In the specific implementation of system, the time variations of transmitting-receiving two-end clock system is that number measures with the respective system least unit time---i.e. cycle of crystal oscillator---, note, the cycle of crystal oscillator refers to the actual cycle (hereinafter referred to as the system cycle of crystal oscillator) of crystal oscillator herein.Such as, suppose that the nominal frequency of the crystal oscillator 114 of transmitting terminal 110 is f
1 nominal=1MHz, the nominal period T of crystal oscillator
1 nominal=10
-6s.Ideally, if crystal oscillator 114 does not definitely precisely have error, i.e. actual frequency (hereinafter referred to as the system frequency of the crystal oscillator) f of crystal oscillator 114
1 system=f
1 nominal=1MHz, then the actual cycle T of crystal oscillator 114
1 system=T
1 nominal=10
-6s, the every f in transmitting terminal 110 place
1 nominal(=10
6) individual T
1 systembe designated as system time 1 second of transmitting terminal clock system, ideally this, transmitting terminal system time 1 equals second standard time 1 in second.Similarly, suppose that the nominal frequency of the crystal oscillator 124 of receiving terminal 120 is f
2 nominals=1MHz, the nominal period T of crystal oscillator
2 nominals=10
-6s.Ideally, if crystal oscillator 124 does not definitely precisely have error, i.e. the system frequency f of crystal oscillator 124
2 systems=f
2 nominals=1MHz, then the actual cycle T of crystal oscillator 124
2 systems=T
2 nominals=10
-6s, the every f in receiving terminal 120 place
2 nominals(=10
6) individual T
2 systemsbe designated as system time 1 second of receiving terminal clock system, ideally this, second receiving terminal system time 1 equals second standard time 1.
But, due to the factor of each side such as manufacturing process or operational environment, between the actual frequency of crystal oscillator and nominal frequency, there is certain error, and unequal.Such as, if f
1 system<f
1 nominal=1MHz, then T
1 system>T
1 nominal=10
-6second, but transmitting terminal 110 remains f
1 nominal(namely 10
6) individual T
1 systembe designated as 1 second of clock system time, this point is extremely important for the speed reason of the system time understanding transmitting terminal.Now, in 1 second of the clock system at transmitting terminal 110 place, actual experienced by is f
1 nominalt
1 systemstandard time, the standard time that standard time of this actual experience is greater than 1 second, namely the system time at transmitting terminal 110 place comparatively the standard time slow.If f
2 systems>f
2 nominals=1MHz, then T
2 systems<T
2 nominals=10-
6second, but receiving terminal 120 remains f
2 nominals(namely 10
6) individual T
2 systemsbe designated as 1 second of clock system time.Now, in 1 second of the clock system at receiving terminal 120 place, actually experienced by f
2 nominalst
2 systemsstandard time, the standard time that standard time of this actual experience is less than 1 second, namely the system time at receiving terminal 120 place comparatively the standard time fast.Can be clear that thus, the system time of the clock system of transmitting-receiving two-end why is faster or slower than the standard time.
The state variation of transmitting terminal 110 and receiving terminal 120 is all is benchmark with the clock system of self, due to above-mentioned transmitting-receiving two-end clock system between error, cause the state variation of the state machine of transmitting terminal 110 and receiving terminal 120 may be asynchronous.Be changed to example with the state machine of transmitting-receiving two-end with the unit interval T of standard, suppose that the clock system of transmitting terminal 110 is slower than standard time, and the clock system of receiving terminal 120 be faster than standard time.After a certain standard time, the system time of transmitting terminal 110 and receiving terminal 120 differs a unit interval T.Now, transmitting terminal 110 is in N state, and receiving terminal 120 is in N state+1, namely receiving terminal 120 be used for the pseudo-code signal deciphered and transmitting terminal 110 pseudo-code signal that is used for encrypting different, therefore receiving terminal 120 can not correctly be deciphered.
Fig. 3 shows the time dependent schematic diagram of state of the state machine of transmitting terminal and receiving terminal.As shown in Figure 3, in the standard time t0 moment, suppose that the clock system of transmitting terminal and receiving terminal aims at, transmitting terminal and receiving terminal are all in N state, after a period of time has passed, arrive the standard time t1 moment.Now, transmitting terminal due to clock system comparatively slow, be also in N state+5, and receiving terminal due to clock system very fast, be in N state+6.The pseudo-code signal of the encryption that the pseudo-code signal of the deciphering therefore selected by receiving terminal and transmitting terminal are selected is inconsistent, causes deciphering to make mistakes.
As mentioned above, the system time of clock system may be faster or slower than the standard time, in order to weigh the speed degree of the system time of transmitting terminal 110 and receiving terminal 120, introduces the concept of " clock running parameter " in the present invention.Clock running parameter can be the standard time of the unit interval actual experience corresponding to system time.Assuming that in units of 1 second the time.As mentioned above, corresponding to unit 1 seconds of the system time of transmitting terminal 110, the standard time of actual experience is f
1 nominalt
1 system.Depend on the speed of system clock, the standard time f of this actual experience
1 nominalt
1 systemmay be less than or greater than for 1 standard time in second.Corresponding to unit 1 seconds of the system time of receiving terminal 120, the standard time of actual experience is f
2 nominalst
2 systems, the time of this actual experience depends on that the speed of system clock also may be less than or greater than for 1 standard time in second.
Corresponding to the system time that transmitting-receiving two-end is onesize, the fact of actual experience various criterion time reflects the speed relation between their system times.In this article, the standard time of the unit interval actual experience of the system time corresponding to receiving terminal 120 and the ratio of the same unit interval actual standard time experienced of the system time corresponding to transmitting terminal 110 are called the clock speed factor of transmitting terminal 110.Be 1 second for the unit interval, the clock speed factor Q=(f of transmitting terminal 110
2 nominalst
2 systems)/(f
1 nominalt
1 system).Obviously, this clock speed factor equals through the ratio of the amplitude of variation of the system time of same time transmitting terminal with the amplitude of variation of the system time of receiving terminal.Therefore, the change of the system time of transmitting terminal 110 can be determined according to the change of the system time of receiving terminal 120 at receiving terminal 120 place.
In order to this clock speed factor can be determined at receiving terminal 120 place, the system cycle T of the local crystal oscillator of receiving terminal 120 can be used
2 systemsnumber measure standard time of the unit interval actual experience corresponding to the system time of transmitting-receiving two-end.This unit interval is made to be the nominal duration T of a light pulse of the visible light signal that transmitting terminal 110 is launched
0 nominal.T
0 nominalbe determined by the nominal baud rate of signal, be in particular the inverse of baud rate.Such as, when nominal baud rate is 4800bps, the nominal duration T of a light pulse
0 nominal=1/4800 second.In visible light communication system, the baud rate for the visible ray communicated generally is reached an agreement on by transmitting-receiving two-end, therefore by receiving terminal 120 is known.Corresponding to the T of the system time of receiving terminal 120
0 nominalthe standard time of actual experience can calculate, and is specially (T
0 nominalf
2 nominals) T
2 systems, i.e. (T
0 nominalf
2 nominals) individual system cycle.Corresponding to the T of the system time of transmitting terminal 110
0 nominalthe standard time of actual experience can obtain in the duration of receiving terminal 120 place's actual measurement from a light pulse of the visible light signal of transmitting terminal 110 and be designated as MT in units of the system cycle of the crystal oscillator of receiving terminal 120
2 systems.Correspondingly, the clock speed factor Q=(T of transmitting terminal 110
0 nominalf
2 nominals)/M.Thus, according to the system time of receiving terminal 120 process, the change of the system time of transmitting terminal 110 can be calculated.
Usually, visible light communication system set up early stage, the error of transmitting-receiving two-end clock system is not also exaggerated in time, therefore can think aim at.Therefore, when during such as equipment debugging, receiving terminal 120 communicates for the first time with transmitting terminal 110 in early days, at the clock information of the local stored transmit end 110 of receiving terminal 120, the clock information of transmitting terminal 110 can be set to consistent with the clock information of now receiving terminal 120 particularly.Clock information can refer to the system time value of clock system.When supposing that now transmitting terminal 110 is 0 with the system time value of the clock system of receiving terminal 120.Because transmitting-receiving two-end clock system aims at, so the clock information of transmitting terminal 110 that now receiving terminal 120 this locality stores is consistent with the real clock information of transmitting terminal 110.
Note, the change of the clock information of the transmitting terminal 110 that receiving terminal 120 place preserves is consistent with the change of the system time of receiving terminal 120 self, therefore, after system foundation as time goes by, error is produced between the clock information of the transmitting terminal 110 that receiving terminal 120 place preserves and the real clock information at transmitting terminal 110 place.Particularly, through the scheduled time of the system time of receiving terminal 120, the amplitude of variation of the clock information of the transmitting terminal 110 that receiving terminal 120 this locality stores also is this scheduled time, but in fact, the amplitude of variation of the real clock information of transmitting terminal 110 should be the time speed factor that this scheduled time is multiplied by transmitting terminal 110.Therefore, every this scheduled time, this error of generation equals the clock speed factor and the product of this scheduled time that this scheduled time deducts transmitting terminal 110.Correspondingly, the clock information of available stored transmitting terminal 110 deducts this error to upgrade it.Every predetermined amount of time, receiving terminal 120 just eliminates this margin of error on the clock information of stored transmitting terminal 110, to make the clock information of the transmitting terminal 110 after upgrading consistent with the real clock information at transmitting terminal 110 place.
As illustrated examples, suppose that this scheduled time is 5 minutes, and suppose Q=4/5.From 0 time, when receiving terminal 120 place was through system time 5 minutes, when the clock information of the transmitting terminal 110 that receiving terminal 120 this locality is preserved is 05 points.But the change of the real clock system of transmitting terminal 110 is 5 × 4/5=4 minute, and namely error is 5-4=1 minute.Correspondingly, during the clock information 0 of transmitting terminal 110 preserved this locality, 5 points deduct 1 minute error, when being updated to 04 points.Similarly, when receiving terminal 120 place is again through 5 minutes system times, when the clock information of the local transmitting terminal 110 preserved is 09 points, wherein comprise again produced error 1 minute, therefore, when the clock information of the transmitting terminal 110 after renewal is 08 points.
Because the error of transmitting-receiving two-end crystal oscillator is likely with changes in environmental conditions such as temperature, therefore the clock speed factor of transmitting terminal 110 also may change.So, follow-up when receiving the visible light signal of this transmitting terminal 110 at every turn, this clock speed factor can be recalculated according to the visible ray newly received.Correspondingly, the clock information of transmitting terminal 110 that receiving terminal 120 stores according to this locality selects the pseudo-code signal for deciphering.Due to, the clock information of the local transmitting terminal 110 stored is self-adjusting every predetermined amount of time, so can not amplify with the error of the real clock information at transmitting terminal 110 place.And then, ensure that the pseudo-code signal that the clock information of the transmitting terminal 110 stored according to receiving terminal 120 place is selected can be synchronous according to the pseudo-code signal that real transmitting terminal 110 clock information is selected with transmitting terminal 110 place.
Fig. 4 shows the flow chart of the method for automatically adjusting the clock in visible light communication system according to an aspect of the present invention.The method illustrated although simplify for making explanation and is described as a series of actions, it should be understood that and understand, these methods not limit by the order of action, because according to one or more embodiment, some actions can occur by different order and/or occur concomitantly with from other actions illustrating herein and describe.
In step 401, receiving terminal receives the visible light signal from the first transmitting terminal at least one transmitting terminal.This receiving terminal transmitting terminal 110 that can be receiving terminal 120, first transmitting terminal in Fig. 1 can be in Fig. 1.This visible light signal is light pulse signal, such as, have light to represent 1, unglazedly represents 0, otherwise or.This visible light signal generally comprises user identity (ID) information of this first transmitting terminal, and this id information is that the pseudo-code signal adopting the system time with the first transmitting terminal to change is encrypted.In addition, this visible light signal also comprises the identifier for identifying this first transmitting terminal, such as the device number of the first transmitting terminal.The device number of transmitting terminal is uniqueness in systems in which, therefore identifies a certain transmitting terminal uniquely by device number.This identifier is unencrypted, directly can understand and obtain in receiving end.
In step 402, determine the clock running parameter of the first transmitting terminal and the clock running parameter of receiving terminal according to the visible light signal being received from the first transmitting terminal.As mentioned above, the clock running parameter of the first transmitting terminal is the unit interval institute actual standard time experienced of the system time corresponding to the first transmitting terminal, and wherein the standard time of this actual experience can be that unit measures with the system cycle of the crystal oscillator of receiving terminal.In one example, this unit interval is the nominal duration of a light pulse of visible light signal from the first transmitting terminal, and the latter equals the inverse of the nominal baud rate of visible light signal.Corresponding to the system time of the first transmitting terminal this unit interval standard time of actual experience can be obtained by the duration of a light pulse at this visible light signal of receiving terminal place actual measurement and be designated as MT in units of the system cycle of the crystal oscillator of receiving terminal
2 systems.In one example, receiving terminal can convert this visible light signal to digital signal, and until this high level or low level terminate experienced by how many T from the high level or low level of a pulse of this digital signal
2 systemscount, the number obtained is M.
The clock running parameter of receiving terminal can refer to the standard time of this unit interval actual experience corresponding to the system time of receiving terminal, and wherein the standard time of this actual experience can be that unit measures with the system cycle of the crystal oscillator of receiving terminal.Be the nominal duration T of a light pulse of visible light signal from the first transmitting terminal in this unit interval
0 nominalexample in, the standard time of actual experience this unit interval corresponding to the system time of receiving terminal is calculated as (T
0 nominalf
2 nominals) T
2 systems.
In step 403, determine the clock speed factor of the first transmitting terminal according to this clock running parameter of the first transmitting terminal and this clock running parameter of receiving terminal.The clock speed factor of the first transmitting terminal is the standard time of this unit interval actual experience of the system time corresponding to receiving terminal and the ratio of this unit interval actual standard time experienced of the system time corresponding to the first transmitting terminal.Be the nominal duration T of a light pulse of visible light signal from the first transmitting terminal in this unit interval
0 nominalexample in, the clock speed factor Q=(T of this first transmitting terminal
0 nominalf
2 nominals)/M.Due to T
0 nominal, f
2 nominalsbe all that receiving terminal is known, and M is actual measurement obtains, therefore, the size of the clock speed factor of the first transmitting terminal can be obtained at receiving terminal.
In step 404, upgrade the clock information of the first transmitting terminal that this receiving terminal this locality stores every the scheduled time according to this clock speed factor of the first transmitting terminal.As mentioned above, the clock speed factor equals through same time, the ratio of the amplitude of variation of the system time of the first transmitting terminal and the amplitude of variation of the system time of receiving terminal.Therefore, often pass the system time of this scheduled time in receiving terminal place, the real change amplitude of the system time of the first transmitting terminal should be the product of this clock speed factor and this scheduled time, but the amplitude of variation of system time of the first transmitting terminal that receiving terminal this locality stores be this scheduled time, so the error of the clock information of the first transmitting terminal of local storage deducts this product for this scheduled time.And then the clock information of the first transmitting terminal stored with this locality deducts this error and can eliminate this error to carry out renewal.In this way, often pass through this scheduled time, just upgrade once the clock information of local the first transmitting terminal stored.
The clock information of this first transmitting terminal of receiving terminal this locality can be at first receiving terminal and the first transmitting terminal system set up the initial stage store when (such as, first) communicates and can be set as and equal receiving terminal clock information at that time.This is because the communication first of transmitting-receiving two-end in visible light communication system is generally set up the initial stage in system, such as set up between limber up period in system, now receiving terminal place does not also store the clock information of the first transmitting terminal.Owing to thinking that at the system initial stage of setting up the clock information of transmitting-receiving two-end is consistent substantially, so, directly clock information current for receiving terminal can be stored in receiving terminal this locality as the clock information of the first transmitting terminal.Clock information can refer to the system time of clock system.Such as, receiving terminal is when receiving the visible light signal of the first transmitting terminal first, from visible light signal, the identifier of the first transmitting terminal can be read by Directly solution, such as device number, and store the clock information of the first transmitting terminal explicitly at identifier that is local and this first transmitting terminal.
Although clearly do not illustrate in Fig. 4, when but the method can also be included in the follow-up visible light signal received each time from this first transmitting terminal, this clock speed factor can be recalculated according to the visible ray newly received, thus upgrade the clock information of local the first transmitting terminal stored every this scheduled time according to the clock speed factor newly calculated.In this way, the clock information of the transmitting terminal that receiving terminal this locality is preserved can upgrade in time, thus basically identical with the real clock information of transmitting terminal.Receiving terminal, when the visible ray of subsequently received first transmitting terminal, can select corresponding pseudo-code signal to decode to the visible light signal received with the clock information of the first transmitting terminal stored according to this locality.The pseudo-code sequence selected thus is inevitable is corresponding with the first transmitting terminal place for the pseudo-code sequence encrypted, thus ensure that and correctly decipher.
Fig. 5 shows the block diagram of communicator 500 according to an aspect of the present invention.Receiver 502 can receive the visible light signal from the first transmitter at least one transmitter.Clock running parameter determination module 504 can determine the clock running parameter of the first transmitter and the clock running parameter of communicator 500 self according to the visible light signal being received from the first transmitter.As previously described, clock running parameter can be the standard time of the unit interval actual experience corresponding to system time.When this unit interval is the nominal duration of a light pulse of visible light signal from the first transmitter, standard time of the actual experience of the unit interval corresponding to the system time of the first transmitter measures at this communicator 500 duration being received from a light pulse of the visible light signal of the first transmitter by clock running parameter determination module 504 and obtains and be designated as MT in units of the system cycle of the crystal oscillator of communicator 500
2 systems, and be calculated as (T corresponding to the standard time of this unit interval actual experience of the system time of this communicator 500 by clock running parameter determination module 504
0 nominalf
2 nominals) T
2 systems, wherein T
0 nominalfor the nominal duration of a light pulse of this visible light signal, f
2 nominalsfor the nominal frequency of the crystal oscillator of this communicator 500, and T
2 systemsfor the system cycle of the crystal oscillator of this communicator 500.Clock speed factor module 506 can determine the clock speed factor of the first transmitter according to the clock running parameter of the clock running parameter of the first transmitter and communicator 500 self.According to an aspect of the present invention, the clock speed factor of the first transmitter is defined as the standard time of this unit interval actual experience of the system time corresponding to this communicator 500 and the ratio of this unit interval actual standard time experienced of the system time corresponding to the first transmitter by clock speed factor determination module.Clock information modulation module 508 upgrades the clock information of the first transmitter that communicator 500 this locality stores every the scheduled time according to the clock speed factor of the first transmitter.According to an aspect of the present invention, this scheduled time is scheduled time of the system time of communicator 500, every this scheduled time, the error of the clock information of the first transmitter that communicator 500 this locality stores is the clock speed factor and the product of this scheduled time that deduct the first transmitter this scheduled time, thus, clock information adjusting module 508 clock information of local the first transmitter stored deducts this error to upgrade.Follow-up receive the visible light signal from the first transmitter each time time, decoder 510 can select corresponding pseudo-code signal to decode to the visible light signal received according to the clock information of the first stored transmitter.
Communicator 500 also can comprise memory 514.Memory 514 can store clock information 516, the such as clock information of the first transmitter.Communicator 500 also comprises processor 512.This processor 512 can be exclusively used in the processor analyzing the information that receives of receiver 502, the one or more assemblies controlling communicator 500 processor and/or not only analyzed the information but also the processor of the one or more assemblies controlling communicator 500 that receiver 502 receives.
Fig. 6 shows the block diagram of communicator 600 according to an aspect of the present invention.Should understand, communicator 600 is represented as and comprises functional block, and these functional blocks can represent the functional block realized by processor, software or its combination (such as firmware).Communicator 600 comprises the logic groups 602 of the electronic building brick that can cooperate.Such as, logic groups 602 can comprise the electronic building brick 604 for receiving the visible light signal from the first transmitter at least one transmitter.Logic groups 602 can comprise the electronic building brick 606 for determining the clock running parameter of this first transmitter and the clock running parameter of receiving equipment according to this visible light signal being received from this first transmitter.Logic groups 602 also can comprise the electric assembly 608 for determining the clock speed factor of this first transmitter according to this clock running parameter of this first transmitter and this clock running parameter of this receiving equipment.In addition, logic groups 602 also can comprise the electronic building brick 610 of the clock information for upgrading this first transmitter that receiving equipment this locality stores every the scheduled time according to this clock speed factor of this first transmitter.In addition, communicator 600 can comprise the memory 612 of the instruction of preserving for performing the function be associated with electronic building brick 604,606,608 and 610.Although show the outside for being in memory 612, to be to be understood that in electronic building brick 604,606,608 and 610 one or more is present in memory 612.
Those skilled in the art it will be appreciated that, information and signal can use any technology in various different technologies and skill and skill to represent.Such as, above description is quoted from the whole text data, instruction, order, information, signal, position (bit), code element and chip can be represented by voltage, electric current, electromagnetic wave, magnetic field or magnetic particle, light field or optical particle or its any combination.
Those skilled in the art will understand further, and the various illustrative logic plates, module, circuit and the algorithm steps that describe in conjunction with embodiment disclosed herein can be embodied as electronic hardware, computer software or the combination of both.For clearly explaining orally this interchangeability of hardware and software, various illustrative components, frame, module, circuit and step are done vague generalization above with its functional form and are described.This type of is functional is implemented as hardware or software depends on embody rule and puts on the design constraint of total system.Technical staff can realize described functional by different modes for often kind of application-specific, but such realize decision-making and should not be interpreted to and cause having departed from scope of the present invention.
The various illustrative logic plates, module and the circuit that describe in conjunction with embodiment disclosed herein can realize with general processor, digital signal processor (DSP), application-specific integrated circuit (ASIC) (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete door or transistor logic, discrete nextport hardware component NextPort or its any combination being designed to perform function described herein or perform.General processor can be microprocessor, but in alternative, and this processor can be the processor of any routine, controller, microcontroller or state machine.Processor can also be implemented as the combination of computing equipment, the combination of such as DSP and microprocessor, multi-microprocessor, with one or more microprocessor of DSP central cooperation or any other this type of configure.
The method described in conjunction with embodiment disclosed herein or the step of algorithm can be embodied directly in hardware, in the software module performed by processor or in the combination of both and embody.Software module can reside in the storage medium of RAM memory, flash memory, ROM memory, eprom memory, eeprom memory, register, hard disk, removable dish, CD-ROM or any other form known in the art.Exemplary storage medium is coupled to processor and can reads and written information from/to this storage medium to make this processor.In alternative, storage medium can be integrated into processor.Processor and storage medium can reside in ASIC.ASIC can be in the user terminal resident.In alternative, it is in the user terminal resident that processor and storage medium can be used as discrete assembly.
In one or more exemplary embodiment, described function can realize in hardware, software, firmware or its any combination.If be embodied as computer program in software, then each function can as one or more bar instruction or code storage on a computer-readable medium or mat its transmit.Computer-readable medium comprises computer-readable storage medium and communication media, and it comprises facilitates computer program from a ground to any medium that another ground shifts.Storage medium can be can by any usable medium of computer access.Exemplarily non-limiting, such computer-readable medium can comprise RAM, ROM, EEPROM, CD-ROM or other optical disc storage, disk storage or other magnetic storage apparatus, maybe can be used to carry or store instruction or data structure form desirable program code and can by other medium any of computer access.Any connection is also properly termed a computer-readable medium.Such as, if software be use coaxial cable, fiber optic cables, twisted-pair feeder, digital subscribe lines (DSL) or such as infrared, radio and microwave and so on wireless technology from web site, server or other remote source transmission, then this coaxial cable, fiber optic cables, twisted-pair feeder, DSL or such as infrared, radio and microwave and so on wireless technology are just included among the definition of medium.Dish as used herein (disk) and dish (disc) comprise compact disc (CD), laser dish, laser disc, digital versatile dish (DVD), floppy disk and blu-ray disc, its mid-game (disk) is often with the mode rendering data of magnetic, and dish (disc) laser rendering data to be optically.Above-mentioned combination also should be included in the scope of computer-readable medium.
Thering is provided previous description of the present disclosure is for making any person skilled in the art all can make or use the disclosure.To be all apparent for a person skilled in the art to various amendment of the present disclosure, and generic principles as defined herein can be applied to other variants and can not depart from spirit or scope of the present disclosure.Thus, the disclosure not intended to be is defined to example described herein and design, but the widest scope consistent with principle disclosed herein and novel features should be awarded.