EP1002263A2 - A method for synchronising process control events and measurements in a real-time process control automation system - Google Patents

A method for synchronising process control events and measurements in a real-time process control automation system

Info

Publication number
EP1002263A2
EP1002263A2 EP99931291A EP99931291A EP1002263A2 EP 1002263 A2 EP1002263 A2 EP 1002263A2 EP 99931291 A EP99931291 A EP 99931291A EP 99931291 A EP99931291 A EP 99931291A EP 1002263 A2 EP1002263 A2 EP 1002263A2
Authority
EP
European Patent Office
Prior art keywords
sample
real
counter
time
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
EP99931291A
Other languages
German (de)
French (fr)
Inventor
Ilmari WÄLJAS
Kimmo HÄMYNEN
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ABB Research Ltd Switzerland
ABB Research Ltd Sweden
Original Assignee
ABB Research Ltd Switzerland
ABB Research Ltd Sweden
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ABB Research Ltd Switzerland, ABB Research Ltd Sweden filed Critical ABB Research Ltd Switzerland
Publication of EP1002263A2 publication Critical patent/EP1002263A2/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G7/00Synchronisation
    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G15/00Time-pieces comprising means to be operated at preselected times or after preselected time intervals
    • G04G15/006Time-pieces comprising means to be operated at preselected times or after preselected time intervals for operating at a number of different times

Definitions

  • the invention relates to a method for synchronising process control events and measurements in a real-time process control automation system comprising at least two units connected to each other by a communication channel, each unit having a real-time counter and generating continuous fixed rate sampling pulses for process control events and measurements.
  • two different protection relays should be synchronised with each other for example in the distance relay function.
  • Differential relay protection is another function where the measurements taken by different relays should be synchronised.
  • the need for synchronisation is based on the basic function of these protection relays. It is very important in these relays to know in real time which one of the relays has operated first or first registered an abnormal change in the quantity to be monitored by the relay. By comparing the real-time stamps provided by the relays it is possible to conclude where in the power transmission line a failure or other abnormal situation has occurred. This information is also needed for correct operation of the relays.
  • A/D converter samplings of two separate devices are synchronised with each other but not normally to system real time.
  • Such A/D converter units typically have one or more counters controlling A/D converters, interrupts and binary I/O, and a separate real-time (external battery supported) clock and a central processing unit (CPU) using the real-time clock to time stamp the samples taken by the A/D converters.
  • This object can be achieved with a method of the present invention which comprises the steps of synchronising the real-time counters of all units but one to the realtime counter of said one unit by communication through the communication channel by updating the real-time counter values of all said units but one by writing a new value to the real-time counter and/or by making an input frequency correction to the real-time counter and synchronising the generation of the continuous fixed rate sampling pulses in each of said units to the real-time counter in the unit in question.
  • the communication channel used can be one of various known communication channels like Ethernet, Fieldbus or a modem connection.
  • the real-time counters are preferably synchronised to each other with an accuracy leading to a time difference between the times of the realtime counters that is smaller than the interval between the generated sampling pulses.
  • the sampling interval can be e.g. somewhat smaller than 400 ⁇ s, and the synchronisation between the real-time counters can lead to a time difference between the times of the real-time counters that is smaller than 10 ⁇ s.
  • the step of synchronising the generation of sampling pulses comprises the steps of setting a predetermined threshold value defining a time distance between successive timing pulses, comparing a value based on the current value of the real-time counter to a predetermined value and when the values match, loading said predetermined threshold value to a first counter, counting by said first counter the real-time clock pulses and, upon reaching said predetermined threshold value, giving a timing pulse, setting a predetermined sample distance value as a number of clock cycles to a first register, loading said predetermined sample distance value to a second counter, counting clock cycles by said second counter and upon reaching said predetermined sample distance value, giving a sampling pulse and resetting said second counter when said sampling pulse is given and when said timing pulse is received to restart the counting of the clock cycles by said second counter and supplying a synchronised sampling pulse whenever said sampling pulse and said timing pulse are given, unless said timing pulse is given after a certain number of sampling pulses have already been given after a preceding timing pulse.
  • the invention is based on the idea that the sampling pulses are synchronised to the real-time counter by counting on one hand the clock pulses generated by a local oscillator and on the other hand the real-time clock pulses generated by the real-time clock.
  • the frequencies of the oscillators are known, the following can be calculated: a number of local oscillator clock pulses corresponding to a certain number of sampling pulses to be given by the counter generating sampling pulses and a number of real-time clock pulses covering the same time-distance as said number of clock pulses.
  • the method of the present invention is used to synchronise sampling in separate units each having a real-time counter it is preferred that the synchronisation is done equally in all units. This can be achieved by setting said predetermined value which is compared to a value based on the current value of the real-time counter to be the next real-time counter value evenly dividable with said predetermined threshold value defining the time- distance between successive timing pulses.
  • the timing of the sampling pulses given between the timing pulses based on the real-time clock can be made more accurate by setting a new sample distance value as a number of clock cycles to said second counter when resetting said second counter, said new sample distance value being based on comparison of the value of the second counter at the instance of giving said timing pulse to a predetermined value.
  • Figure 1 is a simplified block diagram illustrating, by way of example, a system in which the method of the present invention can be utilised
  • Figure 2 is an exemplary block diagram illustrating the steps of the method according to the present invention which relate to the generating and phasing of the timing pulses and
  • Figure 3 is an exemplary block diagram illustrating the steps of the method according to the present invention which relate to the generating of the synchronised sampling pulses based on clock pulses given by a local oscillator and on timing pulses created by the block diagram of Figure 2.
  • FIG. 1 is a simplified block diagram illustrating, by way of example, a system in which the method of the present invention can be utilised.
  • This system comprises two units, MASTER and SLAVE, which both comprise a real-time counter RTC.
  • the real-time counter RTC in one unit can have the same real time as corresponding real-time counters in other corresponding units generating synchronised sampling pulses SAMPLE_SYNC they shall be synchronised to each other.
  • This can be done in several known ways known for example from patent application PCT/FI98/00481 , which is incorporated herein by reference, or from US Patent No. 4,185,110.
  • the real-time counter of unit SLAVE is synchronised to the real-time counter of unit MASTER by communication through the communication channel by updating the real-time counter values of all the units SLAVE by writing a new value to the real-time counter and/or by making an input frequency correction to the real-time counter.
  • the system can comprise any number of units SLAVE, but for simplicity only one is shown in Figure 12. Because the real-time counters can be synchronised in several known ways, the synchronisation will not be described in more detail in this context. However, it is important to note that the real-time counters are synchronised to each other with an accuracy leading to a time difference between the times of the real-time counters that is smaller than the interval between the generated sampling pulses SAMPLE_SYNC. In practice the sampling interval can be e.g. somewhat smaller than 400 ⁇ s and the synchronisation between the real-time counters can lead to a time difference between the times of the real-time counters that is smaller than 10 ⁇ s.
  • the communication channel CCH used between the units for synchronising the real-time counters RTC can be one of various known communication channels like Ethernet, Fieldbus or a modem connection.
  • Systems according to Figure 1 in which the method of the present invention can be implemented include industrial automation systems and power transmission systems. It is particularly suitable for continuous generation of synchronised sampling pulses for A/D converters which take samples continuously at a frequency over 1 kHz. Consequently, the method is used for measurements and for controlling continuous processes.
  • FIG. 2 is an exemplary block diagram illustrating the steps of the method according to the present invention which relate to the generating and phasing of timing pulses SAMPLE_24.
  • the timing pulses are synchronised to the frequency and phase of the real-time counter RTC.
  • the oscillator of the real-time counter RTC can have a frequency of 1 MHz, for example.
  • the cycle time of the pulses given by this oscillator of the RTC is 1 ⁇ s.
  • the synchronisation of the timing pulses SAMPLE_24 is controlled by two registers, ADIFSDUS and ADIFRTCSVAL, that control the sample frequency and, correspondingly, the sampling phase of the timing pulses.
  • Register ADIFSDUS contains the distance between 24 samples in microseconds. This value is used to determine the correct sampling frequency, based on a 1 MHz clock RTC1 M from the RTC. Periodically, according to ADIFSDUS setting, the sample start is generated according to the RTC clock. At the same time the sample distance in clock cycles of the local oscillator CLKADIF (not shown) is checked and adjusted by one clock cycle, if necessary, to match the two settings. This means that every 24th sample is initiated by the RTC clock, and the samples therebetween by CLKADIF with the adjusted sample period.
  • the sampling phase is controlled with the register ADIFRTCSVAL which contains a value corresponding to the 16 LSBs of the RTC.
  • Phase adjustment starts when ADIFRTCSVAL is written. Synchronisation takes place when the RTC value (RTCVAL in the Figure) matches the value ADIFRTCSVAL.
  • a status bit ADI FSPEND is set when ADIFRTCSVAL is written and cleared when the synchronisation takes place. ADIFRTCSVAL needs to be calculated and written only once. Thereafter the sampling stays in phase with the RTC. The preferred way to select the ADIFRTCSVAL is to take the next
  • RTC value evenly dividable with ADIFSDUS. This way the synchronisation can be done equally in all corresponding units.
  • the synchronisation accuracy can be calculated from the following formula, where ERR RTC denotes the maximum error in the RTC value and CLKADIF denotes the ADC interface clock frequency:
  • ERR SAMPLE ERR RTC + (4 / CLKADIF)
  • the max. sampling error from the correct moment is less than 4 microseconds.
  • the block diagram of Figure 2 is divided into two parts, one is the RTC microsecond down counter MDC / phase comparison, which operates with a clock CLKCPU (not shown) of the central processing unit (not shown) and the other is the sample timing block, which operates with CLKADIF.
  • the MDC counter generates a SAMPLE_24 timing signal with intervals defined by the ADIFSDUS value.
  • the SAMPLE_24 timing signal is used to synchronise the sample timing block shown in Figure 3 as described later in the text.
  • the microsecond down counter MDC counts down with every RTC1 M pulse from the RTC.
  • the counter is loaded with ADIFSDUS, when the count reaches 1 or when the phase synchronisation is done.
  • the phase synchronisation is done by writing to the ADIFRTCSVAL register, which is also indicated by signal WE-RTCSVAL.
  • the writing also sets a status bit ADIFSPEND indicating that phase synchronisation is in progress.
  • the register setting ADIFRTCSVAL equals the RTCVAL from the RTC
  • the status bit ADISPEND is cleared and the counter MDC is reloaded with the ADIFSDUS value.
  • a toggle flip flop TFF changes state. This change is detected with an edge detector ED in CLKADIF clock domain, and a SAMPLE_24 signal is generated from each edge.
  • the circuitry shown in Figure 3 which can be called to a sample timing block generates a synchronised sampling signal SAMPLE_SYNC for an A/D converter, for example, 24 times in every SAMPLE_24 period.
  • the sample distance timing is adjusted every SAMPLE_24 period to match the frequencies.
  • the sample timing block comprises two registers. One is the sample distance register SDR indicating the number of CLKADIF clock cycles in one SAMPLE_SYNC period. The other is a binary rate multiplier register
  • a sample distance counter SDC which counts down from the value loaded to it from the SDR register, generates the SAMPLE signal whenever the counter reaches value 1.
  • the counter is also loaded with a new value from the sample distance register SDR.
  • SAMPLE_24 signal also loads the counter and thus synchronises the sample timing to SAMPLE_24 timing. Accordingly, whenever the SAMPLE_24 is received at the SDC, the SDC starts to count down from the new value given by the SDR register, without ending the count going on at that instance. Consequently, in some occasions it does not give the sampling pulse
  • This sampling pulse is generated by an output generation block OG to be described below.
  • the sample counter SC is used to count internally generated samples; every SAMPLE signal increases the count and SAMPLE_24 resets the counter.
  • the output of the sample counter SC and the signals SAMPLE and SAMPLE_24 are supplied to the output generation block OG.
  • the output generation block OG gives a synchronised sampling pulse SAMPLE_SYNC whenever it receives said sampling pulse SAMPLE and the timing pulse
  • timing pulse SAMPLE_24 unless the timing pulse SAMPLE_24 is received after a certain number of sampling pulses SAMPLE have already been given after a preceding timing pulse SAMPLE_24.
  • the certain number of sampling pulses SAMPLE is 24.
  • SAMPLE_24 which is tied to the real-time counter, is used as a pulse synchronising the generation of a synchronised sampling pulse at every 24th sampling pulse.
  • the sampling pulses SAMPLE given between these 24th pulses can however be slightly misplaced if the local oscillator runs fast or slow. Such cases are taken care of by the value of the sample counter SC together with the BRM register value.
  • BRM binary rate multiplier
  • the sample counter SC and the sample distance counter SDC values are examined, and compared with the correct values at the evaluation block EB. If the values are lower than they should, the sample period should be decreased. If the values are higher than they should, the sample period should be increased.
  • the increment/decrement is done by first increasing/decreasing the BRM register value. If the BRM value is going to over/underflow, the sample distance register is increased/decreased.
  • the precision of the adjustment is better than 2 CLKADIF periods.
  • Another source of uncertainty in the sampling instance is the interface between CLKCPU and CLKADIF.
  • the maximum error in the edge detection done by the edge detector ED is always 1 CLKADIF cycle. So the maximum error in sampling is less than 3 CLKADIF periods + the error in the RTC value itself.
  • Power transmission systems use several frequencies of which three are the most common: 16 2/3 Hz, 50 Hz and 60 Hz.
  • the number of synchronised sampling pulses per period is preferably the same for all these frequencies.
  • the number of samples taken per period is 128.
  • the local oscillator CLKADIF can have e.g. a frequency of 9.8304 MHz.
  • the sample distance counter SDC must have a different counting limit or threshold for every different power transmission frequency.
  • the counting limits are 4608 for the frequency of 16 2/3 Hz, 1536 for 50 Hz and 1280 for 60 Hz. With these counting limits the number of sampling pulses is always 128 for one period independent of the power transmission line frequency.
  • the correct counting limit or threshold as a number of local oscillator clock pulses is first supplied to the sample distance register SDR in accordance with the line frequency used in the application in question.
  • the timing of the sampling pulses SAMPLE is synchronised with the timing pulses SAMPLE_24 after 24 sampling pulses, the synchronised sampling pulses SAMPLE_SYNC thereby being correctly synchronised 16 times in three line frequency periods.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Feedback Control In General (AREA)

Abstract

The invention relates to a method for synchronising process control events and measurements in a real-time process control automation system comprising at least two units connected to each other by a communication channel, each unit having a real-time counter (RTC) and generating sampling pulses (SAMPLE_SYNC) for process control events and measurements, the method comprising the steps of synchronising the real-time counters of all units (SLAVE) but one to the real-time counter of said one unit (MASTER) by communication through the communication channel, and synchronising the generation of sampling pulses (SAMPLE_SYNC) in each of said units to the real-time counter (RTC) in the unit in question.

Description

A METHOD FOR SYNCHRONISING PROCESS CONTROL EVENTS AND MEASUREMENTS IN A REAL-TIME PROCESS CONTROL AUTOMATION SYSTEM
BACKGROUND OF THE INVENTION The invention relates to a method for synchronising process control events and measurements in a real-time process control automation system comprising at least two units connected to each other by a communication channel, each unit having a real-time counter and generating continuous fixed rate sampling pulses for process control events and measurements. In several power transmission applications, two different protection relays should be synchronised with each other for example in the distance relay function. Differential relay protection is another function where the measurements taken by different relays should be synchronised. The need for synchronisation is based on the basic function of these protection relays. It is very important in these relays to know in real time which one of the relays has operated first or first registered an abnormal change in the quantity to be monitored by the relay. By comparing the real-time stamps provided by the relays it is possible to conclude where in the power transmission line a failure or other abnormal situation has occurred. This information is also needed for correct operation of the relays.
It is typical of the relays mentioned above that, for example, A/D converter samplings of two separate devices are synchronised with each other but not normally to system real time. Such A/D converter units typically have one or more counters controlling A/D converters, interrupts and binary I/O, and a separate real-time (external battery supported) clock and a central processing unit (CPU) using the real-time clock to time stamp the samples taken by the A/D converters.
DISCLOSURE OF THE INVENTION It is an object of the present invention to present a method for synchronising process control events and measurements in a real-time process control automation system e.g. for synchronising the sampling made by an A/D converter unit so that samples taken by the A/D converters are synchronised to real time and can have a real-time stamp which can be compared with samples taken by other corresponding units which are also synchronised to a real-time clock. This object can be achieved with a method of the present invention which comprises the steps of synchronising the real-time counters of all units but one to the realtime counter of said one unit by communication through the communication channel by updating the real-time counter values of all said units but one by writing a new value to the real-time counter and/or by making an input frequency correction to the real-time counter and synchronising the generation of the continuous fixed rate sampling pulses in each of said units to the real-time counter in the unit in question. The communication channel used can be one of various known communication channels like Ethernet, Fieldbus or a modem connection.
The real-time counters are preferably synchronised to each other with an accuracy leading to a time difference between the times of the realtime counters that is smaller than the interval between the generated sampling pulses. In practice the sampling interval can be e.g. somewhat smaller than 400 μs, and the synchronisation between the real-time counters can lead to a time difference between the times of the real-time counters that is smaller than 10 μs.
According to a preferred embodiment of the invention the step of synchronising the generation of sampling pulses comprises the steps of setting a predetermined threshold value defining a time distance between successive timing pulses, comparing a value based on the current value of the real-time counter to a predetermined value and when the values match, loading said predetermined threshold value to a first counter, counting by said first counter the real-time clock pulses and, upon reaching said predetermined threshold value, giving a timing pulse, setting a predetermined sample distance value as a number of clock cycles to a first register, loading said predetermined sample distance value to a second counter, counting clock cycles by said second counter and upon reaching said predetermined sample distance value, giving a sampling pulse and resetting said second counter when said sampling pulse is given and when said timing pulse is received to restart the counting of the clock cycles by said second counter and supplying a synchronised sampling pulse whenever said sampling pulse and said timing pulse are given, unless said timing pulse is given after a certain number of sampling pulses have already been given after a preceding timing pulse. The invention is based on the idea that the sampling pulses are synchronised to the real-time counter by counting on one hand the clock pulses generated by a local oscillator and on the other hand the real-time clock pulses generated by the real-time clock. When the frequencies of the oscillators are known, the following can be calculated: a number of local oscillator clock pulses corresponding to a certain number of sampling pulses to be given by the counter generating sampling pulses and a number of real-time clock pulses covering the same time-distance as said number of clock pulses. By comparing the times when these numbers of clock pulses, on one hand, and the real-time clock pulses, on the other hand, are reached the sampling pulses given can be synchronised to the real-time clock at predetermined intervals.
When the method of the present invention is used to synchronise sampling in separate units each having a real-time counter it is preferred that the synchronisation is done equally in all units. This can be achieved by setting said predetermined value which is compared to a value based on the current value of the real-time counter to be the next real-time counter value evenly dividable with said predetermined threshold value defining the time- distance between successive timing pulses.
The timing of the sampling pulses given between the timing pulses based on the real-time clock can be made more accurate by setting a new sample distance value as a number of clock cycles to said second counter when resetting said second counter, said new sample distance value being based on comparison of the value of the second counter at the instance of giving said timing pulse to a predetermined value.
BRIEF DESCRIPTION OF THE DRAWINGS
The invention will now be discussed more in detail with reference to the attached drawings in which
Figure 1 is a simplified block diagram illustrating, by way of example, a system in which the method of the present invention can be utilised, Figure 2 is an exemplary block diagram illustrating the steps of the method according to the present invention which relate to the generating and phasing of the timing pulses and
Figure 3 is an exemplary block diagram illustrating the steps of the method according to the present invention which relate to the generating of the synchronised sampling pulses based on clock pulses given by a local oscillator and on timing pulses created by the block diagram of Figure 2.
DETAILED DESCRIPTION OF THE INVENTION
Figure 1 is a simplified block diagram illustrating, by way of example, a system in which the method of the present invention can be utilised. This system comprises two units, MASTER and SLAVE, which both comprise a real-time counter RTC. In order that the real-time counter RTC in one unit can have the same real time as corresponding real-time counters in other corresponding units generating synchronised sampling pulses SAMPLE_SYNC they shall be synchronised to each other. This can be done in several known ways known for example from patent application PCT/FI98/00481 , which is incorporated herein by reference, or from US Patent No. 4,185,110. To be more specific, the real-time counter of unit SLAVE is synchronised to the real-time counter of unit MASTER by communication through the communication channel by updating the real-time counter values of all the units SLAVE by writing a new value to the real-time counter and/or by making an input frequency correction to the real-time counter. The system can comprise any number of units SLAVE, but for simplicity only one is shown in Figure 12. Because the real-time counters can be synchronised in several known ways, the synchronisation will not be described in more detail in this context. However, it is important to note that the real-time counters are synchronised to each other with an accuracy leading to a time difference between the times of the real-time counters that is smaller than the interval between the generated sampling pulses SAMPLE_SYNC. In practice the sampling interval can be e.g. somewhat smaller than 400 μs and the synchronisation between the real-time counters can lead to a time difference between the times of the real-time counters that is smaller than 10 μs.
The communication channel CCH used between the units for synchronising the real-time counters RTC can be one of various known communication channels like Ethernet, Fieldbus or a modem connection. Systems according to Figure 1 in which the method of the present invention can be implemented include industrial automation systems and power transmission systems. It is particularly suitable for continuous generation of synchronised sampling pulses for A/D converters which take samples continuously at a frequency over 1 kHz. Consequently, the method is used for measurements and for controlling continuous processes.
Figure 2 is an exemplary block diagram illustrating the steps of the method according to the present invention which relate to the generating and phasing of timing pulses SAMPLE_24. By the blocks of Figure 2 the timing pulses are synchronised to the frequency and phase of the real-time counter RTC. The oscillator of the real-time counter RTC can have a frequency of 1 MHz, for example. Thus, the cycle time of the pulses given by this oscillator of the RTC is 1 μs.
In the block diagram of Figure 2 the synchronisation of the timing pulses SAMPLE_24 is controlled by two registers, ADIFSDUS and ADIFRTCSVAL, that control the sample frequency and, correspondingly, the sampling phase of the timing pulses.
Register ADIFSDUS contains the distance between 24 samples in microseconds. This value is used to determine the correct sampling frequency, based on a 1 MHz clock RTC1 M from the RTC. Periodically, according to ADIFSDUS setting, the sample start is generated according to the RTC clock. At the same time the sample distance in clock cycles of the local oscillator CLKADIF (not shown) is checked and adjusted by one clock cycle, if necessary, to match the two settings. This means that every 24th sample is initiated by the RTC clock, and the samples therebetween by CLKADIF with the adjusted sample period.
The sampling phase is controlled with the register ADIFRTCSVAL which contains a value corresponding to the 16 LSBs of the RTC. Phase adjustment starts when ADIFRTCSVAL is written. Synchronisation takes place when the RTC value (RTCVAL in the Figure) matches the value ADIFRTCSVAL. A status bit ADI FSPEND is set when ADIFRTCSVAL is written and cleared when the synchronisation takes place. ADIFRTCSVAL needs to be calculated and written only once. Thereafter the sampling stays in phase with the RTC. The preferred way to select the ADIFRTCSVAL is to take the next
RTC value evenly dividable with ADIFSDUS. This way the synchronisation can be done equally in all corresponding units. One possible formula to calculate the value in question is the following (note that the RTC has 64 bits): ADIFRTCSVAL = (RTC - (RTC mod ADIFSDUS) + N * ADIFSDUS) mod 65536, where N > 2 is selected so that all the calculations can be performed before synchronisation.
The synchronisation accuracy can be calculated from the following formula, where ERRRTC denotes the maximum error in the RTC value and CLKADIF denotes the ADC interface clock frequency:
ERRSAMPLE = ERRRTC+ (4 / CLKADIF)
For example, if the maximum RTC error is 3 microseconds, and the ADC Interface clock frequency is 19.6608 MHz, the max. sampling error from the correct moment is less than 4 microseconds.
The block diagram of Figure 2 is divided into two parts, one is the RTC microsecond down counter MDC / phase comparison, which operates with a clock CLKCPU (not shown) of the central processing unit (not shown) and the other is the sample timing block, which operates with CLKADIF. The MDC counter generates a SAMPLE_24 timing signal with intervals defined by the ADIFSDUS value. The SAMPLE_24 timing signal is used to synchronise the sample timing block shown in Figure 3 as described later in the text.
The microsecond down counter MDC counts down with every RTC1 M pulse from the RTC. The counter is loaded with ADIFSDUS, when the count reaches 1 or when the phase synchronisation is done.
The phase synchronisation is done by writing to the ADIFRTCSVAL register, which is also indicated by signal WE-RTCSVAL. The writing also sets a status bit ADIFSPEND indicating that phase synchronisation is in progress. When the register setting ADIFRTCSVAL equals the RTCVAL from the RTC, the status bit ADISPEND is cleared and the counter MDC is reloaded with the ADIFSDUS value.
Whenever the counter MDC wraps around i.e. has counted down to
1 from the number of microseconds indicated by the ADIFSDUS value, a toggle flip flop TFF changes state. This change is detected with an edge detector ED in CLKADIF clock domain, and a SAMPLE_24 signal is generated from each edge.
The circuitry shown in Figure 3 which can be called to a sample timing block generates a synchronised sampling signal SAMPLE_SYNC for an A/D converter, for example, 24 times in every SAMPLE_24 period. The sample distance timing is adjusted every SAMPLE_24 period to match the frequencies.
The sample timing block comprises two registers. One is the sample distance register SDR indicating the number of CLKADIF clock cycles in one SAMPLE_SYNC period. The other is a binary rate multiplier register
BRM containing a fractional part of the sample distance ( BRM / 24 ).
A sample distance counter SDC, which counts down from the value loaded to it from the SDR register, generates the SAMPLE signal whenever the counter reaches value 1. When the SAMPLE signal is given, the counter is also loaded with a new value from the sample distance register SDR. The
SAMPLE_24 signal also loads the counter and thus synchronises the sample timing to SAMPLE_24 timing. Accordingly, whenever the SAMPLE_24 is received at the SDC, the SDC starts to count down from the new value given by the SDR register, without ending the count going on at that instance. Consequently, in some occasions it does not give the sampling pulse
SAMPLE which it otherwise would. This sampling pulse is generated by an output generation block OG to be described below.
The sample counter SC is used to count internally generated samples; every SAMPLE signal increases the count and SAMPLE_24 resets the counter. The output of the sample counter SC and the signals SAMPLE and SAMPLE_24 are supplied to the output generation block OG. The output generation block OG gives a synchronised sampling pulse SAMPLE_SYNC whenever it receives said sampling pulse SAMPLE and the timing pulse
SAMPLE_24, unless the timing pulse SAMPLE_24 is received after a certain number of sampling pulses SAMPLE have already been given after a preceding timing pulse SAMPLE_24. In the embodiment described above the certain number of sampling pulses SAMPLE is 24.
According to the principles described above the timing pulse
SAMPLE_24, which is tied to the real-time counter, is used as a pulse synchronising the generation of a synchronised sampling pulse at every 24th sampling pulse. The sampling pulses SAMPLE given between these 24th pulses can however be slightly misplaced if the local oscillator runs fast or slow. Such cases are taken care of by the value of the sample counter SC together with the BRM register value. These values are used to control the BRM (binary rate multiplier) logic, which increases by the block INC the sample distance counter SDC load value for as many local oscillator clock pulse periods as the BRM register indicates. The increases are evenly spread over the SAMPLE_24 period. This enables a more precise control of the sample period.
Every time the SAMPLE_24 signal is given, the sample counter SC and the sample distance counter SDC values are examined, and compared with the correct values at the evaluation block EB. If the values are lower than they should, the sample period should be decreased. If the values are higher than they should, the sample period should be increased. The increment/decrement is done by first increasing/decreasing the BRM register value. If the BRM value is going to over/underflow, the sample distance register is increased/decreased.
With the BRM fractional correction, the precision of the adjustment is better than 2 CLKADIF periods. Another source of uncertainty in the sampling instance is the interface between CLKCPU and CLKADIF. The maximum error in the edge detection done by the edge detector ED is always 1 CLKADIF cycle. So the maximum error in sampling is less than 3 CLKADIF periods + the error in the RTC value itself.
Power transmission systems use several frequencies of which three are the most common: 16 2/3 Hz, 50 Hz and 60 Hz. In order that the A/D converter unit according to the invention could be used in all power transmission systems having one of the above mentioned frequencies, the number of synchronised sampling pulses per period is preferably the same for all these frequencies. In one example according to the invention the number of samples taken per period is 128. In order that this number of samples per period can be used, the local oscillator CLKADIF can have e.g. a frequency of 9.8304 MHz. As can be concluded from this, the sample distance counter SDC must have a different counting limit or threshold for every different power transmission frequency. In this example where the number of sampling pulses per period is 128 the counting limits are 4608 for the frequency of 16 2/3 Hz, 1536 for 50 Hz and 1280 for 60 Hz. With these counting limits the number of sampling pulses is always 128 for one period independent of the power transmission line frequency. In the method of the present invention the correct counting limit or threshold as a number of local oscillator clock pulses is first supplied to the sample distance register SDR in accordance with the line frequency used in the application in question. As explained in detail above, the timing of the sampling pulses SAMPLE is synchronised with the timing pulses SAMPLE_24 after 24 sampling pulses, the synchronised sampling pulses SAMPLE_SYNC thereby being correctly synchronised 16 times in three line frequency periods.
In the above the invention has been described with reference to block diagrams giving only one example of the logic that can be used to implement the method of the invention. It is therefore self-evident that the diagrams could be modified in many ways without, however, deviating from the method as defined in the enclosed claims. The shown embodiment and other similar hardware solutions for implementing the method of the present invention are preferred because they can be easily integrated into an integrated semiconductor chip.

Claims

1. Method for synchronising process control events and measurements in a real-time process control automation system comprising at least two units connected to each other by a communication channel, each unit having a real-time counter (RTC) and generating continuous fixed rate sampling pulses (SAMPLE_SYNC) for process control events and measurements, c h a r a c t e r i s e d in that the method comprises the steps of synchronising the real-time counters of all units (SLAVE) but one to the real-time counter of said one unit (MASTER) by communication through the communication channel by updating the real-time counter values of all said units (SLAVE) but one by writing a new value to the real-time counter and/or by making an input frequency correction to the real-time counter and synchronising the generation of the continuous fixed rate sampling pulses (SAMPLE_SYNC) in each of said units to the real-time counter (RTC) in the unit in question.
2. A method according to claim 1 , c h a r a c t e r i s e d in that the real-time counters are synchronised to each other with an accuracy leading to a time difference between the times of the real-time counters that is smaller than the interval between the generated sampling pulses (SAMPLE_SYNC).
3. A method according to claim 1 or 2, c h a r a c t e r i s e d in that the step of synchronising the generation of sampling pulses (SAMPLE_SYNC) comprises the steps of setting a predetermined threshold value (ADIFSDUS) defining a time-distance between successive timing pulses (SAMPLE_24), comparing a value (RTCVAL) based on the current value of the real-time counter to a predetermined value (ADIFRTCSVAL) and when the values match, loading said predetermined threshold value to a first counter (MDC), counting by said first counter (MDC) the real-time clock pulses and, upon reaching said predetermined threshold value (ADIFRTCSVAL), giving a timing pulse (SAMPLE_24), setting a predetermined sample distance value as a number of clock cycles to a first register (SDR), loading said predetermined sample distance value to a second counter (SDC), counting clock cycles by said second counter (SDC) and, upon reaching said predetermined sample distance value, giving a sampling pulse
(SAMPLE) and resetting said second counter when said sampling pulse is given and when said timing pulse (SAMPLE_24) is received to restart the counting of the clock cycles by said second counter (SDC) and supplying a synchronised sampling pulse (SAMPLE_SYNC) whenever said sampling pulse (SAMPLE) and said timing pulse (SAMPLE_24) are given, unless said timing pulse (SAMPLE_24) is given after a certain number of sampling pulses (SAMPLE) have already been given after a preceding timing pulse (SAMPLE_24).
4. A method according to claim 3, c h a r a c t e r i s e d in that it further comprises the step of setting said predetermined value (ADIFRTCSVAL).which is compared with a value (RTCVAL) based on the current value of the real-time counter, to provide the next real-time counter value evenly dividable with said predetermined threshold value (ADIFSDUS) defining the time-distance between successive timing pulses (SAMPLE_24).
5. A method according to claim 3, c h a r a c t e r i s e d in that it further comprises the step of setting a new sample distance value as a number of clock cycles to said second counter (SDC) when resetting said second counter, said new sample distance value being based on the comparison of the second counter value with a predetermined valued at the moment when said timing pulse (SAMPLE_24) is given.
EP99931291A 1998-06-15 1999-06-14 A method for synchronising process control events and measurements in a real-time process control automation system Withdrawn EP1002263A2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
FI981388A FI981388A (en) 1998-06-15 1998-06-15 Procedures for synchronizing process control events and metrics are in a real-time process control automation system
FI981388 1998-06-15
PCT/FI1999/000517 WO1999066377A2 (en) 1998-06-15 1999-06-14 A method for synchronising process control events and measurements in a real-time process control automation system

Publications (1)

Publication Number Publication Date
EP1002263A2 true EP1002263A2 (en) 2000-05-24

Family

ID=8552003

Family Applications (1)

Application Number Title Priority Date Filing Date
EP99931291A Withdrawn EP1002263A2 (en) 1998-06-15 1999-06-14 A method for synchronising process control events and measurements in a real-time process control automation system

Country Status (4)

Country Link
EP (1) EP1002263A2 (en)
AU (1) AU4784599A (en)
FI (1) FI981388A (en)
WO (1) WO1999066377A2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2476029B1 (en) * 2009-09-08 2013-07-03 Siemens Aktiengesellschaft Time synchronization in automation devices
DE112021001936A5 (en) * 2020-03-27 2023-02-23 Dspace Gmbh Process for the time-synchronized input and/or output of signals with a selectable sampling rate
CN111880641B (en) * 2020-07-29 2023-01-13 深圳星康医疗科技有限公司 Wearable device sampling precision calibration method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4455611A (en) * 1981-05-11 1984-06-19 Rca Corporation Multiplier for multiplying n-bit number by quotient of an integer divided by an integer power of two
JPH0282835A (en) * 1988-09-20 1990-03-23 Sony Corp Digital signal receiver
EP0574598A1 (en) * 1992-06-13 1993-12-22 International Business Machines Corporation Data buffer
JP3524967B2 (en) * 1994-09-22 2004-05-10 株式会社アドバンテスト Timing generator for multiple reference oscillators
GB2297854B (en) * 1995-02-07 1999-04-07 Nokia Mobile Phones Ltd Real time clock

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See references of WO9966377A3 *

Also Published As

Publication number Publication date
AU4784599A (en) 2000-01-05
WO1999066377A3 (en) 2000-02-24
FI981388A0 (en) 1998-06-15
WO1999066377A2 (en) 1999-12-23
FI981388A (en) 1999-12-16

Similar Documents

Publication Publication Date Title
US6535926B1 (en) Time synchronization system for industrial control network using global reference pulses
SE507227C2 (en) Method and device for synchronizing time stamping
KR920701895A (en) Time synchronizer of data in computer system
KR20010072630A (en) Slave clock generation system and method for synchronous telecommunications networks
US20060001498A1 (en) Fractional divider system and method
JPH07182067A (en) Detection device of frequency difference between local oscillator and reference signal
CN100459486C (en) Data processing apparatus that identifies a communication clock frequency
US4229824A (en) Method and apparatus for synchronizing electrical signals
WO1999066377A2 (en) A method for synchronising process control events and measurements in a real-time process control automation system
WO2014118984A1 (en) Signal processing apparatus
US4878233A (en) Data pattern synchronizer
US7249272B1 (en) Apparatus and method for coordinating activities of one or more computers
US5070517A (en) Method and circuit for retuning the frequency of a frequency source
KR19990007430A (en) Measurement and compensation method of inaccurate clock signal
US4462031A (en) Traffic synchronization device
CN113359948A (en) Time synchronization device and synchronization method
CN103227707A (en) Synchronization processing apparatus, synchronization processing method and program
US6859912B2 (en) Method and circuit arrangement for clock recovery
KR19990009340A (en) Synchronous device and method
JPS56680A (en) Electronic clock
JPH08278828A (en) Timer correction device for computer system
SU1034162A1 (en) Device for shaping pulse train
KR100291004B1 (en) Frequency offset detection device of input reference signal
SU1228248A1 (en) Multichannel device for generating delayed pulses
KR100455340B1 (en) Synchronized signal generation circuit

Legal Events

Date Code Title Description
PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

17P Request for examination filed

Effective date: 20000128

AK Designated contracting states

Kind code of ref document: A2

Designated state(s): DE FR GB

GRAH Despatch of communication of intention to grant a patent

Free format text: ORIGINAL CODE: EPIDOS IGRA

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN

18D Application deemed to be withdrawn

Effective date: 20030722