A kind of automatic recognition system terminal device clock Synchronous fluorimetry method
Technical field
The present invention relates to a kind of automatic recognition system terminal device clock Synchronous fluorimetry method, belong to maritime wireless communication skill
Art field.
Background technology
Ship automatic identification system(AIS: Automatic Identification System)In, each user terminal is set
Using the access of self-organizing time division multiple acess during standby access system(SOTDMA -- Self-Organized Time Division
Multiple Address)Technology.The technical stipulation, a frame is considered as by 1 minute time interval, 2250 time slots is divided altogether, often
Individual time slot is about 26.67 milliseconds.Every AIS ship oceangoing ship terminal device needs self-organizing to select wherein one or more time slots to enter line number
According to broadcasting, so as to realize access AIS systems, recognized mutually with other watercraft AIS terminal devices.During again, to protect
Text non-interference in slot transmission between different ships is demonstrate,proved, synchronization jitter redundancy during system design there is provided 6bit is missed
Difference.Because AIS Systems Airs link data rates are that synchronization jitter error should be less than 0.625 between 9600bps, therefore system time gap
Millisecond.
In the division of above-mentioned AIS time slots and synchronizing process, to ensure less time slot between different watercraft AIS terminal devices
Synchronous error, typically relies on two clock sources.One is GNSS(GPS:Global Navigation
Satellite System)The 1PPS of satellite positioning module(Pulse per second (PPS):Pulses Per Second)Second counts;The second is eventually
End equipment crystal oscillator.Under normal circumstances, system relies on the 1PPS pulses progress second timing of GNSS module, is then set using AIS terminals
Standby crystal oscillator carries out slot timing with dividing.Because 1 time slot is 22.67 milliseconds, therefore, there are 37.5 time slots in one second, in order to protect
Hold synchronization and judge to carry out slot count and division, it is necessary to set complex odd even second, this is complex in program realization.
Further, since the crystal oscillator that AIS terminal devices are used under normal circumstances is common crystals, error is larger, such as without above-mentioned frequent
Counting and timer reset, within a very short time, time slot shake just exceeded setting 0.625 millisecond of redundant error(Such as
One 22.1184MHz crystal oscillator, when error is 20PPM, error is 1.2 milliseconds in AIS1 frame times, it is meant that during mono- frames of AIS
In, at least synchronous crystal oscillator timer 2), so as to cause the time slot interference between different AIS terminal devices.
Based on the analysis of above-mentioned technical background, according to the division feature and GNSS of the frame slots of AIS mono- and AIS terminal device crystal oscillators
The characteristics of with total number, if a kind of simple AIS terminal devices slot synchronization optimization method of design, it can both avoid producing frequently
Synchronous GNSS satellite locating module 1PPS pulses and crystal oscillator timer, can be kept away with the high-precision AIS slot synchronizations of simple realization again
The data for exempting to produce between different AIS equipments broadcast interference, are beneficial to improve AIS systematic entirety energy.
The content of the invention
It is an object of the invention to provide a kind of simple, optimization AIS terminal device slotted synchronous methods, including AIS terminals
Synchronous micro-adjusting in equipment Crystal Oscillator Errors initial compensation and running, so that when realizing AIS terminal devices time slot with AIS systems
The high-precise synchronization of gap, improves AIS systematic entirety energy.
The present invention is adopted the following technical scheme that:
A kind of automatic recognition system terminal device clock Synchronous fluorimetry system, including AIS terminal devices, AIS terminal devices
It is made up of AIS RF transceivers, GNSS satellite locating module, local crystal oscillator, main control processor, external interface;Wherein, AIS
RF transceiver is responsible for the data transmit-receive of AIS communication links, and GNSS satellite locating module is responsible for providing to main control processor
1PPS pps pulse per second signals and location data, local crystal oscillator provide the work clock source of AIS terminal devices, and main control processor performs sheet
The related works such as slot synchronization optimization method and AIS protocol stacks and text processing in invention, and result is passed through into outside
Interface enters row information with the external world and exchanged.
A kind of automatic recognition system terminal device clock Synchronous fluorimetry method, comprises the following steps:
The first step:After AIS terminal devices start, equipment initial work is carried out first;
Second step:After initialization, timing first waits the 1PPS of GNSS satellite locating module 3 validity for 2 minutes, if
1PPS pulse per second (PPS)s effectively, are then transferred to the 3rd step of execution in 2 minutes, are otherwise transferred to the 4th step of execution;
3rd step:When the 1PPS pulse per second (PPS)s of GNSS satellite locating module 3 are effective, start the error measure work of local crystal oscillator 4
Make, the process continuously measurement PPS pulse per second (PPS) of 1 minute, i.e., 60, then crystal oscillator count value is carried out to fetch averagely, crystal oscillator is obtained
Real-Time Compensation parameter, and be locally stored;
4th step:If set in 2 minutes, when the PPS pulse per second (PPS)s of GNSS satellite locating module 3 are invalid, then directly
Extract the crystal oscillator compensating parameter of last time start measurement;
5th step:Compensated using crystal oscillator compensating parameter after local crystal oscillator, open slot count and the second counts;
6th step:Synchronous AIS time slots and local crystal oscillator timer, i.e., by the starting edge of the time slot of AIS systems present frame 0 and warp
The slot timer of the local crystal oscillator triggering of error compensation is synchronous;
7th step:Into AIS agreements and text processing procedure, carry out the information between the management of AIS time slots, ship exchange and
The work such as AIS texts processing;
8th step:After each AIS agreements terminate with text process cycle, judge whether AIS present frames terminate, if it is,
It is transferred to the 6th step of execution and carries out AIS slot synchronization fine settings, is otherwise transferred to and performs the text processing work that the 7th step continues next cycle
Make.
Before AIS time slots and local crystal oscillator timer synchronization, local crystal oscillator compensating parameter is measured or obtained first;In AIS
During one frame end, the synchronous micro-adjusting of an AIS time slot and local crystal oscillator timer is performed.
The present invention has the beneficial effect that:Using the present invention, user can simplify AIS slot synchronization processes, effectively improve simultaneously
AIS slot synchronization precision, improves AIS systematic functions on the whole.
Brief description of the drawings
Fig. 1 is AIS terminal device function structure charts;
Fig. 2 execution flow charts of the present invention.
In figure:1st, AIS terminal devices, 2, AIS RF transceivers, 3, GNSS satellite locating module, 4, local crystal oscillator, 5,
Main control processor, 6, external interface.
Embodiment
With reference to embodiment, the present invention will be further described.
As shown in Figure 1:A kind of automatic recognition system terminal device clock Synchronous fluorimetry system, including AIS terminal devices 1,
AIS terminal devices 1 are connect by AIS RF transceivers 2, GNSS satellite locating module 3, local crystal oscillator 4, main control processor 5, outside
Mouth 6 is constituted;Wherein, AIS RF transceivers 2 are responsible for the data transmit-receive of AIS communication links, and GNSS satellite locating module 3 is responsible for
1PPS pps pulse per second signals and location data are provided to main control processor 5, local crystal oscillator 4 provides the work clock of AIS terminal devices 1
Result is entered row information with the external world by external interface 6 and exchanged by source, main control processor 5.
As shown in Figure 2:A kind of automatic recognition system terminal device clock Synchronous fluorimetry method, comprises the following steps:
The first step:After AIS terminal devices start, equipment initial work is carried out first;
Second step:After initialization, timing first waits the 1PPS of GNSS satellite locating module 3 validity for 2 minutes, if
1PPS pulse per second (PPS)s effectively, are then transferred to the 3rd step of execution in 2 minutes, are otherwise transferred to the 4th step of execution;
3rd step:When the 1PPS pulse per second (PPS)s of GNSS satellite locating module 3 are effective, start the error measure work of local crystal oscillator 4
Make, the process continuously measurement PPS pulse per second (PPS) of 1 minute, i.e., 60, then crystal oscillator count value is carried out to fetch averagely, crystal oscillator is obtained
Real-Time Compensation parameter, and be locally stored;
4th step:If set in 2 minutes, when the PPS pulse per second (PPS)s of GNSS satellite locating module 3 are invalid, then directly
Extract the crystal oscillator compensating parameter of last time start measurement;
5th step:Compensated using crystal oscillator compensating parameter after local crystal oscillator, open slot count and the second counts;
6th step:Synchronous AIS time slots and local crystal oscillator timer, i.e., by the starting edge of the time slot of AIS systems present frame 0 and warp
The slot timer of the local crystal oscillator triggering of error compensation is synchronous;
7th step:Into AIS agreements and text processing procedure, carry out the information between the management of AIS time slots, ship exchange and
The work such as AIS texts processing;
8th step:After each AIS agreements terminate with text process cycle, judge whether AIS present frames terminate, if it is,
It is transferred to the 6th step of execution and carries out AIS slot synchronization fine settings, is otherwise transferred to and performs the text processing work that the 7th step continues next cycle
Make.
Before AIS time slots and local crystal oscillator timer synchronization, local crystal oscillator compensating parameter is measured or obtained first;In AIS
During one frame end, the synchronous micro-adjusting of an AIS time slot and local crystal oscillator timer is performed.
A certain AIS terminal devices are surveyed, the local crystal oscillator of configuration is 22.1184MHz.
By actual measurement, its error is as shown in table 1.It was found from being calculated from table 1, in the every frame times of AIS, by local crystal oscillator
Produced error is 4.633 milliseconds, because the time slot error jitter of AIS system designs should be less than 0.625 millisecond, then in a frame
Interior needs are at least synchronous 8 times.Simultaneously because need the even number second to synchronize fine setting when synchronous, and error caused by different crystal oscillator
May be different, it is therefore desirable to as much as possible to be finely adjusted synchronization, cause time slot and crystal oscillator timer synchronization process is miscellaneous
It is complicated.
The 22.1184MHz crystal oscillator substantial measurement errors time comparison tables of table 1
After the inventive method, it is as shown in table 2 that the 5th step-length time performed output.AIS is 0.05 millisecond per frame error,
Far smaller than 0.625 millisecond of redundant error.Add after the 7th step synchronous micro-adjusting, when making AIS terminal slot synchronizations error per frame
Interior both less than 0.05 millisecond, greatly improve AIS system time gap net synchronization capabilities.
The 22.1184MHz crystal oscillator substantial measurement errors time comparison tables of table 1
。