IEEE 1588 standard may be applied to industrial automation systems to satisfy time-based production environments. Here is what you need to know to improve your operations.
Manufacturing always trends towards faster, more precise part production, but some attempts to achieve this goal can stretch traditional control capabilities to their limits. In traditional sequential-control systems, input sensors, output actuators, and industrial controllers are distributed over a local area network. Some systems use change-of-state or event triggered techniques to make more precise parts, but many others use a combination of scan-based and event-based control mechanisms. While suitable for numerous applications, sometimes these control algorithms can create processing jitter.
Usually, jitter does not matter as long as the required response times are satisfied. For applications that require more precision and have a low tolerance to jitter, the use of time-based control is preferred. Time-based control techniques may enable faster, more precise production of parts. Refer to the IEEE 1588 standard for guidance on implementing time-based control in new equipment and systems.
In a time-based approach, an association is made between input and output events and time. It becomes an integral function of the control system and its algorithms. In such a system, the input events are time-stamped and output events are scheduled. The control system knows when the input was sampled and can determine when the output should be actuated. The output device can schedule the output to actuate at the predetermined time. The only jitter sources for this system are those associated with accurately time-stamping inputs and outputs.
Case in point
For example, in a non-time-based, high-speed conveyor diverter application, individually manufactured parts travel along a conveyor at a constant rate of speed. Ideally, the system identifies individual parts as they move down the conveyor, performs on-the-fly analysis of the parts to determine if they are defective, and then triggers actuation downstream to reject the defective parts. However, if the resolution of the control system does not match the speed of the conveyor system, the wrong part or more than one part will be rejected.
Here is how the application would work using time-based control. When the photoelectric eye detects a part, a time stamp is recorded indicating the time that the part was detected. The controller sends the inspection system a time-stamped schedule to signal when the part should be inspected. The controller then sends the diverter system a time-stamped schedule to signal when a defective part should be diverted. For this case, the maximum speed of the system is limited by the delays through the system from input to output. The maximum speed and parts per minute are calculated as follows:
Part resolution = 12.4 msec jitter
Maximum speed = 1/12.4 = ~80 parts per second
Maximum ppm = 80 * 60 = 4800 parts per minute
Jitter delays are confined to the electrical and mechanical delays for input detection and output actuation devices. Only the transport delays, the time it takes a data packet to go from point A to point B, become a factor. System precision is limited to the transfer delays, and the time-stamping and scheduling accuracies of the respective input and output devices. A time-based control mechanism can improve system operation performance ten-fold because it eliminates jitter sources: the processing speeds of input, control, and output devices.
1588 for industrial control
The IEEE 1588 standard is based on the Open Device Net Vendor Association (ODVA) standard and defines a point-to-point (PTP) configuration for devices compliant with ODVA supported networks. The ODVA adoption of 1588 is referred to as the common industrial protocol (CIP) Sync.
CIP Sync supports version 2 of the 1588 standard and specifies the same set of defaults as the Delay Request/Response Default PTP Profile in the 1588 standard. These defaults satisfy most industrial application requirements for distributing time throughout the control system. The mechanisms suitable for implementing clocks over industrial networks include multicast messaging, sync updates in the one-second range, and the delay request-response path measurement mechanism.
Many I/O devices will implement the 1588 hybrid clock. This clock satisfies long linear distributed applications where daisy-chained connections are preferred over star connections, and reduces wiring and switch requirements. These applications may be as simple as distributing devices along a robot arm or as complex as distributing devices along a quarter-mile paper mill application.
Global positioning system (GPS) clocks are best applied where precise time of day is required or subsystems are distributed over a large geographical area. However, a controller or a switch with a hand set clock is sufficient for many applications.
Time-based control is preferred for applications that require precision and a low tolerance to jitter.
For switches and routers that implement transparent clocks, the end-to-end (E2E) method is preferred over the peer-to-peer (P2P) for best interoperability in non-homogenous systems. P2P works only with P2P devices. Most systems will contain both 1588 and non-1588 compliant switches.
The CIP Sync profile supports PTP clock domain zero for simple device and system implementation and operation. Grandmaster devices such as controllers and GPS clocks should use the PTP Alternate Time Scale option. This option distributes local time zone and daylight savings time throughout the factory floor. For clock backup and redundancy, the normal operation of the Best Master Control Algorithm (BMCA) will suffice for most applications. Backup grandmasters may use the PTP grandmaster clusters option for faster switch over time.
The IEEE 1588 standard defines the mechanism to distribute and synchronize time across the system, but does not specify how to handle perturbations in time that may occur during
normal operation of the control system. These changes may occur due to one or more of the following conditions:
The user adjusts the master clock whose type is “hand set.”
A master with a more accurate clock becomes available (new grandmaster). This may occur during the system startup or after the system has been running for some time.
Delta jitter is the maximum minus the minimum jitter for components. The time-based approach eliminates jitter sources in the control system.
The time master is temporarily disconnected from the slave clock and then reconnected. Here, given any discrepancy in time between the master and the slave, a step change will occur.
A photoelectric eye detects parts and their status on the conveyor belt. Input is sent to the controller as part of the input scan.
Some applications need a very stable clock for scheduling periodic control algorithms. This strategy is especially true for motion-control applications that run precision control loops. A significant jump in the system time will impact periodic control algorithms. Another alternative is using a clock that can tolerate steps in time and still minimize impact to the control system.
CIP Sync clock model
The local clock is a frequency-disciplined clock tuned (synchronized) by the 1588 Precision Time Protocol each time it receives the PTP Sync or follow-up message. The clock will tick at some nominal rate and be adjusted by the PTP protocol and tuning algorithm to match the rate of the master’s clock. This tuning process may take several seconds during startup and system
initialization for a default one-second sync rate. The clock may be set to zero at startup, but the
absolute value is never set thereafter. The accuracy of the clock will depend on whether the implementation is software or hardware assisted, the resolution of the clock, the crystal, and all the other design parameters that go into making an accurate frequency-disciplined clock.
This table of IEE 1588 clocks shows how they best fit automation devices.
CIP Sync defines a clock model to address step changes in time.
The local clock schedules all periodic or cyclic operations on the device. An offset value (ClockOffset) is maintained between PTP time transmitted in sync messages and the local time (LocalTime). When a device needs the current PTP time (PTPTime), it will read the local time and add the offset value to obtain the current system time. ClockOffset and PTPTime equations are:
ClockOffset =PTPTime — LocalTime
PTPTime =LocalTime + ClockOffset
If the Coordinated Universal Time (CUT) is required, the device will adjust the time value for leap seconds.
The slave clock limits the response to the assumed change in frequency of the mater clock. A small step response is incurred for two tuning cycles.
Tuning is adjusted based on two conditions: a small frequency offset form the master clock, or a large frequency offset from the master clock such as a step change. The magnitude of this offset, small or large, is determined by the SyncThreshold value. The SyncThreshold is set based on the synchronization requirements of the application.
Offset from Master < SyncThreshold: Tune clock
Offset from Master > SyncThreshold: Tune clock but clamp clock frequency adjustment
When the offset from the master exceeds the threshold, the clock frequency adjustment is clamped. The clamp rate depends on the requirements of the application. For a step change in time, this normally results in a small one-time perturbation to the clock. If the step is a result of a grandmaster change, then the clamping period may continue for some time as the clock frequency is tuned to the frequency of the new master. During this time, the application may operate in a slightly degraded mode. Periodic or cyclic events may then be scheduled based on the local clock and will not be affected by large step changes in time provided that the local clock remains synchronized to the PTP master-clock frequency.
Time-stamp compensation
When a jump to the master time occurs, not all clocks in the system will see the jump at the same time. If there is a step change to the master’s clock, the amount of time it takes to propagate to the Node 1 slave clock and the Node 2 slave clock will differ by the delay through the PTP boundary clock. For some implementations, the delay may be as long as one sync interval. Time stamps generated by Node 1 will differ by the amount of the time step until all clocks see the same step and adjust their clocks accordingly.
A time step occurs at Node 2 between times 310 and 410. Time 310 is adjusted to time 100310 to account for the step change.
When comparing time stamps between two nodes or two time stamps within the same node, consider whether a step has occurred during the time interval between the two time stamps. Adjusting one or both of the time stamps to account for this time step is referred to as time-stamp compensation. A similar process should be followed when comparing two time stamps from the same node.
One algorithm for compensating time stamps captures the ClockOffset along with the time stamp. This offset value is carried with the time-stamp value to be applied to the compensating algorithm. The offset provides an indication of when the step occurred. Two algorithms are defined in the CIP Sync profile. There is one for comparing time stamps between two notes and one for comparing time stamps within a single node.
IEEE
www.ieee.org
::Design World::
Filed Under: Factory automation, Networks • connectivity • fieldbuses
Tell Us What You Think!