Industrial Automation Industrielle Realtime Control Systems Dr JeanCharles

  • Slides: 89
Download presentation
Industrial Automation Industrielle Real-time Control Systems Dr. Jean-Charles Tournier CERN, Geneva, Switzerland 2015 -

Industrial Automation Industrielle Real-time Control Systems Dr. Jean-Charles Tournier CERN, Geneva, Switzerland 2015 - JCT The material of this course has been initially created by Prof. Dr. H. Kirrmann and adapted by Dr. Y-A. Pignolet & Dr. J-C. Tournier

Enterprise Applications • Real Time Industrial System • Resource planning • Maintenance • •

Enterprise Applications • Real Time Industrial System • Resource planning • Maintenance • • Cyclic Condition-based • Planning & Forecasting • SCADA • • Supervision Alarm management (EEMU 191) Real-Time Databases • Domain Specific Applications • EMS/DMS • Outage management • GIS connections Rea l-Tim e Device Access • HART • MMS • OPC Field Buses Rel iabi lity • Time Synchronization PLCs/IEDs Sensors/Actuators • Reliability and Dependability • Calculation • Architectures • Protocols Industrial Automation Physical Plant 2 • PPS, GPS, SNTP, PTP, etc. • Traditional - Modbus, CAN, etc. • Ethernet-based - HSR, White. Rabbit, etc. • PLC • Soft. PLC • PID • • Instrumentation 4 -20 m. A loop Sensors accuracy Examples (CT/VT, water, gaz, etc. ) • Plant examples • Why supervision/control? 8 – Real Time Control Systems

Real-Time Constraints Marketing calls "real-time" anything "fast", "actual" or "on-line" Definition: A real-time control

Real-Time Constraints Marketing calls "real-time" anything "fast", "actual" or "on-line" Definition: A real-time control system is required to produce output variables that respect defined time constraints. Levels of real-time requirements: • meet all time constraints exactly (hard real-time) • meet timing constraints most of the time (soft real-time) • meet some timing constraints exactly and others mostly. These constraints must be met also under certain error conditions Effects of delays • In regulation tasks, delays of the computer appear as dead times, which additionally may be affected by jitter (variable delay). • In sequential tasks, delays slow down plant operation, possibly beyond what the plant may tolerate. Industrial Automation 3 8 – Real Time Control Systems

Real Time Systems • Real Time is not only required in industrial control systems,

Real Time Systems • Real Time is not only required in industrial control systems, but also present in: – Smartphones – Game consoles – Smart TV – Stock trading systems – Etc. • Real time system does not only include the SW, but the whole system – E. g. Mechanical parts, communications, memory access, etc. Industrial Automation 4 8 – Real Time Control Systems

Hard and Soft Real-Time hard real-time (deterministic) soft real-time (non-deterministic) probability deadine tmin t.

Hard and Soft Real-Time hard real-time (deterministic) soft real-time (non-deterministic) probability deadine tmin t. A tmax tdl deadine delay tmin bound ! tmax tdl unbound ! the probability of the delay to exceed an arbitrary value is zero under normal operating conditions, including recovery from error conditions Industrial Automation t. A delay the probability of the delay to exceed an arbitrary value is small, but non-zero under normal operating conditions, including recovery from error conditions 5 8 – Real Time Control Systems

Hard and Soft Real-Time • Hard Real-Time System – A real-time system is said

Hard and Soft Real-Time • Hard Real-Time System – A real-time system is said to be hard, if missing its deadline may cause catastrophic consequences on the environment under control. • Soft Real-Time System – A real-time system is called soft, if meeting the deadline is desirable for performance reasons, but missing its deadline does not cause serious damage to the environment and does not jeopardize correct system behavior. Industrial Automation 6 8 – Real Time Control Systems

Reaction Time 10 µs: positioning of cylinder in offset printing (0, 1 mm at

Reaction Time 10 µs: positioning of cylinder in offset printing (0, 1 mm at 20 m/s) 46 µs: sensor synchronization in bus-bar protection for substations (1º @ 60 Hz) 100 µs: resolution of clock for a high-speed vehicle (1 m at 360 km/h ) 100 µs: resolution of events in an electrical grid 1, 6 ms: sampling rate for protection algorithms in a substation 10 ms: resolution of events in the processing industry 20 ms: time to close or open a high current breaker 200 ms: acceptable reaction to an operator's command (hard-wire feel) 1 s: acceptable refresh rate for the data on the operator's screen 3 s: acceptable set-up time for a new picture on the operator's screen 10 s: 1 min: acceptable recovery time in case of breakdown of the supervisory computer general query for refreshing the process data base in case of major crash Industrial Automation 7 8 – Real Time Control Systems

Cycle Times for Control Applications 100 ns: 1 µs: 100 µs: 1 ms: 10

Cycle Times for Control Applications 100 ns: 1 µs: 100 µs: 1 ms: 10 ms: Electronic ranging (power interlock, beam control) High speed control Precision motion control (e. g medical applications) Motion control (e. g. robotics) Drive control system Low speed sensors (e. g. temperature sensor) Industrial Automation 8 8 – Real Time Control Systems

Processing Time 0, 1 µs: addition of two variables in a programmable logic controller

Processing Time 0, 1 µs: addition of two variables in a programmable logic controller execution of an iteration step for a PID control algorithm. 30 µs: back- and forth delay in a 3'000 m long communication line. 40 µs: coroutine (thread) switch within a process 160 µs: send a request and receive an immediate answer in a field bus 100 µs: task switch in a real-time kernel 200 µs: access an object in a fast process database (in RAM) 1 ms: execution of a basic communication function between tasks 2 ms: sending a datagram through a local area network (without arbitration) 16 ms: cycle time of a field bus (refresh rate for periodic data) 60 ms: cycle time of the communication task in a programmable logic controller. 120 ms: execution of a remote procedure call (DCOM, CORBA). Industrial Automation 9 8 – Real Time Control Systems

Illustration of Real-Time Needs Emergency stop The operator keep one hand on the “rotate”

Illustration of Real-Time Needs Emergency stop The operator keep one hand on the “rotate” button while he washes with the other. If the towel gets caught, he releases the button and expects the cylinder to stop in 1/2 second. . . Industrial Automation 10 8 – Real Time Control Systems

Signal Path From Emergency Button to the Motor Main controller (processing every 30 ms)

Signal Path From Emergency Button to the Motor Main controller (processing every 30 ms) Motor control IBS (2 ms, 500 kb/s) IBS-M Display BA emergency button Lokalbus DIO MCU LBA loop IO IO Safety controller BA AIO MCU LBA SERCOS ring (4 ms) IBS-S IBS (2 ms, 500 kb/s) tower bus (1. 5 Mbit/s, 32 ms) tower control processing every 40 ms section control section bus (1. 5 Mbit/s, 32 ms) Total delay path: 2 + 30 + 32 + 40 + 4 = 180 ms ! Industrial Automation 11 8 – Real Time Control Systems

Delay Path and Reaction Time • Most safety systems operate negatively: – lack of

Delay Path and Reaction Time • Most safety systems operate negatively: – lack of “ok” signal (life-sign toggle) triggers emergency shutdown • The motor control expects that the information “emergency button not pressed” is – refreshed every 3 x 180 = 540 ms to deal with two successive transmission errors, – otherwise it brakes the motors to standstill. • Excessive signal delay causes false alarms -> affects availability of the plant – (client won’t accept more than 1 -2 emergency shutdown due to false alarm per year) • Therefore, control of signal delays is important: – for safety – for availability Industrial Automation 12 8 – Real Time Control Systems

Determinism and Transmission Failure bus master 1 1 2 3 4 5 Individual period

Determinism and Transmission Failure bus master 1 1 2 3 4 5 Individual period 6 2 1 4 3 2 3 4 5 6 5 1 6 2 3 4 5 6 time [ms] Individual period probability TCD (heaps are exaggerated) response time no more data expected after TCD contingency deadline, e. g. emergency shutdown Example: probability of data loss period = 0. 001, probability of not meeting TCD after three trials = 10 -9, same order of magnitude as hardware errors -> emergency action is justified. Industrial Automation 13 8 – Real Time Control Systems

Deterministic System • A deterministic system will react within bound delay under all conditions.

Deterministic System • A deterministic system will react within bound delay under all conditions. – A deterministic system can be defeated by external causes (failure of a device, severing of communication line), but this is considered as an accepted exceptional situation for which reaction is foreseen. • Determinism implies previous reservation of all resources (bus, memory space, . . . ) – needed to complete the task timely. • All elements of the chain from the sensor to the actor must be deterministic for the whole to behave deterministically. • Non-deterministic components may be used, provided they are properly encapsulated, so their nondeterminism does not appear anymore to their user. • Examples: – queues may be used provided: a high-level algorithm observed by all producers ensures that the queues never contains more than N items. – Interrupts may be used provided: the interrupt handler is so short that it may not cause the interrupted task to miss its deadline, the frequency of interrupts being bound by other rules (e. g. a task has to poll the interrupts) Industrial Automation 14 8 – Real Time Control Systems

Communication By Traffic Memory Periodic Tasks R 1 R 2 R 3 Event-driven Tasks

Communication By Traffic Memory Periodic Tasks R 1 R 2 R 3 Event-driven Tasks R 4 E 1 Variables Services (Broadcast) E 3 Message Services Traffic Memory Process Data E 2 Queues Supervisory Data Message Data (unicast) bus controller Applications communicate through the communication stack, as if they were on different nodes, but faster, since communication is through a shared memory. Condition for traffic memory communication: “pseudo-continuous operation” Industrial Automation 15 8 – Real Time Control Systems

Deterministic Control System For real-time systems, small and well-understood kernels are used: VRTX, Vx.

Deterministic Control System For real-time systems, small and well-understood kernels are used: VRTX, Vx. Works, RTOS, QNX, etc. . The tasks in these systems normally operate cyclically, but leave room for event processing when idle - the cyclic task must always be able to resume on time. Control network does not depend on raw speed, but on response time. Control loops need timely transmission of all critical variables to all sink applications. If an application sends one variable in 7 ms to another application, transmission of all variables may require n x 7 ms (except if several variables are packed in one message). If several applications are interested in a variable, the number of transfer increases, except if transmission is (unacknowledged) broadcast. Smooth execution of control algorithms require that data are never obsolete by more than a certain amount. Determinism is closely related to the principle of cyclic operation Industrial Automation 16 8 – Real Time Control Systems

Non-deterministic systems A non-deterministic system can fail to meet its deadline because of internal

Non-deterministic systems A non-deterministic system can fail to meet its deadline because of internal causes (congestion, waiting on resource), without any external cause. Computers and communication may introduce non-deterministic delays, due to internal and external causes: - response to asynchronous events from the outside world (interrupts) - access to shared resources: computing power, memory, network driver, . . . - use of devices with non-deterministic behavior (hard-disk sector position) Non-determinism is especially caused by: • Operating system with preemptive scheduling (UNIX, Windows, . . ) or virtual memory (in addition, their scheduling algorithm is not parametrizable) • Programming languages with garbage collection (Java, C#, . . . ) • Communication systems using a shared medium with collision (Ethernet) • Queues for access to the network (ports, sockets) Non-determinism is closely related to on-demand (event-driven) operation Industrial Automation 17 8 – Real Time Control Systems

Failures in Ethernet - Style transmission 2 1 4 3 5 6 multi-master bus

Failures in Ethernet - Style transmission 2 1 4 3 5 6 multi-master bus with CSMA (will not come) 1 1 data 6 ack lost data retry time-out ack 6 2 4 data retry time-out 6 time [ms] Probability of transmission failure due to collision: e. g. 1% (generous) (Note: data loss due to collision is much higher than due to noise !) With no collision detection, retransmission is triggered by not receiving acknowledgement of remote party within a time Trto (reply time-out). This time must be larger than the double queue length at the sender and at the receiver, taking into account bus traffic. Order of magnitude: 100 ms. The probability of missing three Trto in series is G 3 times larger than a cyclic system with a period of 100 ms, G being the ratio of failures caused by noise to and failures caused by collisions (here: 1% vs. 0. 1% -> 106 more emergency stops). Industrial Automation 18 8 – Real Time Control Systems

Deterministic Task Scheduling Suppose that the controller executes three cyclic tasks, Task 1: every

Deterministic Task Scheduling Suppose that the controller executes three cyclic tasks, Task 1: every 10 ms and taking 5 ms Task 2: every 20 ms and taking 4 ms Task 3: every 40 ms and taking 4 ms There exist a deterministic schedule: 40 ms period 1 2 1 3 2 1 1 1 2 time 10 ms Would a deterministic schedule be possible with periods of 10 ms, 30 ms and 50 ms ? No, because every 150 ms (least common multiple), all tasks should be executed in the same 10 ms interval. Relaxing timing does not provide determinism, correct scheduling using power of 2 multiples does. Industrial Automation 19 8 – Real Time Control Systems

Determinism = preallocation of ressources: task scheduling memory CPU time Of course, memory and

Determinism = preallocation of ressources: task scheduling memory CPU time Of course, memory and CPU time is underutilized (over reservation). This is the price to pay for determinism. Tasks may only communicate in a non-blocking fashion. Industrial Automation 20 8 – Real Time Control Systems

Implication on Task-to-Task Communication Task-to-task communication may not be blocking. No semaphores, locked data

Implication on Task-to-Task Communication Task-to-task communication may not be blocking. No semaphores, locked data structures, rendezvous, … may be used. The maximum execution time of each task, txi, must be fixed. The period of each task is tpi. The condition (but not sufficient) for execution to be possible is: Σ txi tpi Industrial Automation < N (with N < 1) 21 8 – Real Time Control Systems

Task Scheduling - Definitions • A Schedule is an assignment of tasks to the

Task Scheduling - Definitions • A Schedule is an assignment of tasks to the processor(s) such that each task is executed until completion. • A pre-emptive schedule is a schedule in which the running task can be arbitrarily suspended at any time, to assign the processor to another task according to a pre-defined scheduling policy. • Arrival time is the time at which a task becomes ready for execution • Computation time is the time needed by the processor to execute the task without interruption • Deadline is the time at which the task should be completed • Start time and End time are the time at which the task starts and ends its execution respectively • Lateness is the delay of the task between its end time and deadline (lateness in negative if the task is completed before its deadline) • Laxity or Slack Time is the maximum time a task can be delayed on its activation to be completed within its deadline • Periodic Task is an infinite sequence of identical activities that are regularly activated at a constant rate. Industrial Automation 22 8 – Real Time Control Systems

Task Scheduling Definitions - Example Suppose that the controller executes three cyclic tasks, Task

Task Scheduling Definitions - Example Suppose that the controller executes three cyclic tasks, Task 1: every 10 ms and taking 5 ms Task 2: every 20 ms and taking 4 ms Task 3: every 40 ms and taking 4 ms Computation Time Lateness of T 1 < 0 Laxity of T 2 Deadlines 40 ms period 1 2 1 3 2 1 1 1 2 time 10 ms Arrival time Industrial Automation 23 8 – Real Time Control Systems

Classes of Scheduling Algorithms • Preemptive Algorithms – The running task can be interrupted

Classes of Scheduling Algorithms • Preemptive Algorithms – The running task can be interrupted at any time to assign the processor to another active tasks according to a pre-defined scheduling policy • Non-preemptive Algorithms – A task, once started, is executed by the processor until its completion • Static Algorithms – Scheduling decisions are based on fixed parameters assigned to tasks before their activation • Dynamic Algorithms – Scheduling decisions are based on dynamic parameters that may change during system execution Industrial Automation 24 8 – Real Time Control Systems

Aperiodic and Periodic Tasks Scheduling • Examples for aperiodic tasks – Earliest Deadline Due

Aperiodic and Periodic Tasks Scheduling • Examples for aperiodic tasks – Earliest Deadline Due (EDD) – Earliest Deadline First (EDF) • Examples for periodic tasks with static priority – Rate Monotonic (RM) – Deadline Monotonic (DM) • Examples for periodic tasks with dynamic priority – Earliest Deadline First Industrial Automation 25 8 – Real Time Control Systems

Rate Monotonic Scheduling • A preemptive method where the priority of the process determines

Rate Monotonic Scheduling • A preemptive method where the priority of the process determines whether it continues to run or is disrupted (most important process first) • On-line scheduler (does not pre-compute the schedule) • Preemptive • Priority based with static priorities • Tasks are assigned priorities dependent on length of period, the shorter it is, the higher the priority (or the higher the rate, the higher the priority). Tasks with higher priority interrupt tasks with lower priorities • RM is the optimal fixed priority scheduling – If a task set can not be scheduled using RM, it can not be scheduled using fixedpriority algorithm • Main limitations of fixed priority algorithm is that the CPU can not be always fully utilized – Tend to be 70%, exactly ln(2), when the number of tasks increases Industrial Automation 26 8 – Real Time Control Systems

Deadline Monotonic Algorithm • Fixed-priority • Uses relative deadlines: the shorter the relative deadline,

Deadline Monotonic Algorithm • Fixed-priority • Uses relative deadlines: the shorter the relative deadline, the higher the priority. Tasks with higher priority interrupt tasks with lower priority • RM and DM are identical if the relative deadline is proportional to its period • Otherwise DM performs better in the sense that it can sometimes produce a feasible schedule when RM fails, while RM always fails when DM fails Industrial Automation 27 8 – Real Time Control Systems

Conclusions • Determinism is a basic property required of a critical control and protection

Conclusions • Determinism is a basic property required of a critical control and protection system. A non-deterministic system is a "fair-weather" solution. • A deterministic control system guarantees that all critical data are delivered within a fixed interval of time, or not at all. • A deterministic system operates in normal time under worst-case conditions this implies that resources seem wasted. • The whole path from application to application (production, transmission and processing) must be deterministic, it is not sufficient that e. g. the medium access be deterministic. • One can prove correctness of a deterministic system, but one cannot prove that a non-deterministic system is correct. • Any non-deterministic delay in the path requires performance analysis to prove that it would work with a certain probability under realistic stress conditions. Industrial Automation 38 8 – Real Time Control Systems

Always consider the whole system. . Industrial Automation 39 8 – Real Time Control

Always consider the whole system. . Industrial Automation 39 8 – Real Time Control Systems

Industrial Automation Industrielle Instrumentation – Sensors & Actuators Dr. Jean-Charles Tournier CERN, Geneva, Switzerland

Industrial Automation Industrielle Instrumentation – Sensors & Actuators Dr. Jean-Charles Tournier CERN, Geneva, Switzerland 2015 - JCT The material of this course has been initially created by Prof. Dr. H. Kirrmann and adapted by Dr. Y-A. Pignolet & J-C. Tournier

Enterprise Applications • Real Time Industrial System • Resource planning • Maintenance • •

Enterprise Applications • Real Time Industrial System • Resource planning • Maintenance • • Cyclic Condition-based • Planning & Forecasting • SCADA • • Supervision Alarm management (EEMU 191) Real-Time Databases • Domain Specific Applications • EMS/DMS • Outage management • GIS connections Rea l-Tim e Device Access • HART • MMS • OPC Field Buses Rel iabi lity • Time Synchronization PLCs/IEDs Sensors/Actuators • Reliability and Dependability • Calculation • Architectures • Protocols Industrial Automation Physical Plant 41 • PPS, GPS, SNTP, PTP, etc. • Traditional - Modbus, CAN, etc. • Ethernet-based - HSR, White. Rabbit, etc. • PLC • Soft. PLC • PID • • Instrumentation 4 -20 m. A loop Sensors accuracy Examples (CT/VT, water, gaz, etc. ) • Plant examples • Why supervision/control? 8 – Real Time Control Systems

2. 1. 1 Market 2. 1 Instrumentation 2. 1. 1 Market 2. 1. 2

2. 1. 1 Market 2. 1 Instrumentation 2. 1. 1 Market 2. 1. 2 Binary instruments 2. 1. 3 Analog Instruments 2. 1. 4 Actuators 2. 1. 5 Transducers 2. 1. 6 Instrumentation diagrams 2. 1. 7 Protection classes 2. 2 Control 2. 3 Programmable Logic Controllers Industrial Automation 42 8 – Real Time Control Systems

The instrumentation market Global Process Automation and Process Instrumentation Market, 2013 -2018 ($Billion) Source:

The instrumentation market Global Process Automation and Process Instrumentation Market, 2013 -2018 ($Billion) Source: Markets And Markets - Process Automation Market & Instrumentation Market – By Technology (SCADA, PLC, DCS, MES), Communication (Profibus, Fieldbus, Wireless HART, ISA 100), Transmitter (Flow, Temperature, Level, Pressure) - Analysis and Forecast (2013 – 2018) Industrial Automation 43 8 – Real Time Control Systems

Example Nuclear power plant Nombre de capteurs et d’actionneurs pour une tranche et selon

Example Nuclear power plant Nombre de capteurs et d’actionneurs pour une tranche et selon les paliers (number of sensors and actors for each slice and according to the level) Capteur ou actionneur (sensor or actor) | (Sensor oder Aktor) Tranches 900 MW Tranches 1300 MW Tranches 1450 MW Capteurs tout ou rien (binary sensors) | (Initiatoren) 1 930 1 560 1 660 Fins de course de vannes manuelles et de registres (position sensor for manual valves and dampers   330   140   700 Capteurs analogiques (mesures) (analog sensors) | (Analoge Messgaräte) 1 360 2 050 2 280 Appareils de coupure 6, 6 / 7, 2 k. V (circuit breakers) | (Leistungsschalter)    40    95    74 Contacteurs 380 V (switches 380 V) | (Schalter)   340   600   540 Vannes motorisées (motor valves) | (Steuerschieber)   190   300   250 Robinets pneumatiques TOR (on-off pneumatic switches) | (pneumatische Schalter)   480   470   670 Vannes réglantes (proportional valves) | ( Regelschieber)   180   500   110 Jean CHABERT, Bernard APPELL, Guy GUESNIER, 1998 Industrial Automation 44 8 – Real Time Control Systems

Concepts instruments = sensors (capteurs, Messgeber) and actuators (actionneurs, Stellglieder) binary (on/off) and analog

Concepts instruments = sensors (capteurs, Messgeber) and actuators (actionneurs, Stellglieder) binary (on/off) and analog (continuous) instruments are distinguished. industrial conditions: • temperature range commercial: (0°C to +70°C) industry (-40°C. . +85°C) extended industrial(– 40°C. . +125°C) • mechanical resilience (shocks and vibrations) EN 60068 • protection: Electro-Magnetic (EM)-disturbances EN 55022, EN 55024) • protection: water and moisture (IP 67=completely sealed, IP 20 = normal) • protection: NEMP (Nuclear EM Pulse) - water distribution, civil protection • mounting and replacement • robust connectors • power: DC mostly 24 V= because of battery back-up, sometimes 48 V= Industrial Automation 45 8 – Real Time Control Systems

2. 1. 2 Binary Instruments 2. 1 Instrumentation 2. 1. 1 Market 2. 1.

2. 1. 2 Binary Instruments 2. 1 Instrumentation 2. 1. 1 Market 2. 1. 2 Binary instruments 2. 1. 3 Analog Instruments 2. 1. 4 Actors 2. 1. 5 Transducers 2. 1. 6 Instrumentation diagrams 2. 1. 7 Protection classes 2. 2 Control 2. 3 Programmable Logic Controllers Industrial Automation 46 8 – Real Time Control Systems

Binary position measurement binary sensors (Geber, "Initiator", indicateur "tout ou rien"): • micro-switch (Endschalter,

Binary position measurement binary sensors (Geber, "Initiator", indicateur "tout ou rien"): • micro-switch (Endschalter, contact fin de course) +cheap, -wear, bouncing • optical sensor (Lichtschranke, barrière optique) +reliable, -dust or liquid sensitive • magnetic sensor (Näherungsschalter, détecteur de proximité) +dust-insensitive, - magnetic Industrial Automation 47 8 – Real Time Control Systems

Binary Signal processing Physical attachment Level adaptation, Galvanical separation EMC barrier (against sparks, radio,

Binary Signal processing Physical attachment Level adaptation, Galvanical separation EMC barrier (against sparks, radio, disturbances) Acquisition Convert to standard levels Relay contacts 24 V (most frequent), 48 V, 110 V (electrical substations) Electronic signals 24 V —>10 V-60 V, Output: 0. . 24 V@100 m. A Counter inputs: Gray, BCD or binary Processing Filtering (e. g. 0. . 8 ms filter), Plausibility (Antivalenz, Antivalence), Bounce-free (Entprellen, Anti-rebond) Industrial Automation 48 8 – Real Time Control Systems

2. 1. 3 Analog Instruments 2. 1 Instrumentation 2. 1. 1 Market 2. 1.

2. 1. 3 Analog Instruments 2. 1 Instrumentation 2. 1. 1 Market 2. 1. 2 Binary instruments 2. 1. 3 Analog Instruments 2. 1. 3. 1 Position and speed 2. 1. 3. 2 Temperature 2. 1. 3. 3 Hydraulic 2. 1. 4 Actors 2. 1. 5 Transducers 2. 1. 6 Instrumentation diagrams 2. 1. 7 Protection classes 2. 2 Control 2. 3 Programmable Logic Controllers Industrial Automation 49 8 – Real Time Control Systems

Precision (repeatability) and accuracy (deviation) Not precise Accurate Not precise Not accurate Precise Accurate

Precision (repeatability) and accuracy (deviation) Not precise Accurate Not precise Not accurate Precise Accurate Precise Not accurate Accuracy is a consequence of systematic errors (or bad calibration) accuracy and precision may depends on time (drift) Industrial Automation 50 8 – Real Time Control Systems

Resolution • Resolution expresses how many different levels can be distinguished – resolution is

Resolution • Resolution expresses how many different levels can be distinguished – resolution is the smallest number that can be displayed or recorded by the measurement device. • Example – A reading device that has a specified accuracy of ± 0. 015% will actually give a reading that is between 0. 99985 and 1. 00015 times the actual value. – measuring 1 volt within ± 0. 015% accuracy requires a 6 -digit instrument capable of displaying five decimal places. The fifth decimal place represents 10 microvolts, giving this instrument a resolution of 10 microvolts. Industrial Automation 51 8 – Real Time Control Systems

Precision, Accuracy and Precision Summary • PRECISON – How reproducible or close identical measurements

Precision, Accuracy and Precision Summary • PRECISON – How reproducible or close identical measurements will be reported as a percentage of full scale. • ACCURACY – The ability of the instrument to measure a quantity to the absolute true and correct value. • RESOLUTION – The smallest unit of measure or the smallest change that can be displayed or recorded by an instrument (sometimes referred to as granularity) Industrial Automation 52 8 – Real Time Control Systems

2. 1. 3. 1 Analog mechanical position +cheap, -wear, bad resolution +cheap, -bad resolution

2. 1. 3. 1 Analog mechanical position +cheap, -wear, bad resolution +cheap, -bad resolution +reliable, robust - small displacements potentiometer capacitive balanced transformer (LVDT) (linear or sin/cos encoder) strain gauges piezo-electric Industrial Automation +reliable, very small displacements +extremely small displacements 53 8 – Real Time Control Systems

Variable differential transformer (LVDT) – Linear displacement The LVDT is a variable-reluctance device, where

Variable differential transformer (LVDT) – Linear displacement The LVDT is a variable-reluctance device, where a primary center coil establishes a magnetic flux that is coupled through a mobile armature to a symmetrically-wound secondary coil on either side of the primary. Two components comprise the LVDT: the mobile armature and the outer transformer windings. The secondary coils are series-opposed; wound in series but in opposite directions. When the moving armature is centered between the two series-opposed secondaries, equal magnetic flux couples into both secondaries; the voltage induced in one half of the secondary winding is 180 degrees out-of-phase with the voltage induced in the other half of the secondary winding. When the armature is moved out of that position, a voltage proportional to the displacement source: www. sensorland. com appears Industrial Automation 54 8 – Real Time Control Systems

Capacitive angle or position measurement C = ε A ≈ a d movable capacitance

Capacitive angle or position measurement C = ε A ≈ a d movable capacitance is evaluated by modifying the frequency of an oscillator a fixed Industrial Automation 55 8 – Real Time Control Systems

Small position measurement: strain gauges Dehnungsmessstreifen (DMS), jauges de contrainte Principle: the resistance of

Small position measurement: strain gauges Dehnungsmessstreifen (DMS), jauges de contrainte Principle: the resistance of a wire with resistivity ρ increases when this wire is stretched A l' ρ = resistivity R=r l = r A l" R 1 compensation Industrial Automation V measurement using a Wheatstone bridge (if U 0 = 0: R 1 R 4 = R 2 R 3) measure R 2 ≈ l 2 volume = constant, r = constant R 3 U Uo l 2 R 4 temperature compensation by “dummy” gauges frequently used in buildings, bridges, dams for detecting movements. 56 8 – Real Time Control Systems

Piezo-electrical effect Piezoelectric materials (crystals) change form when an electrical field is applied to

Piezo-electrical effect Piezoelectric materials (crystals) change form when an electrical field is applied to them. Conversely, piezoelectric materials produce an electrical field when deformed. Quartz transducers exhibit remarkable properties that justify their large scale use in research, development, production and testing. They are extremely stable, rugged and compact. Of the large number of piezoelectric materials available today, quartz is employed preferentially in transducer designs because of the following excellent properties: • high material stress limit, around 100 MPa (~ 14 km water depth) • temperature resistance (up to 500 C) • very high rigidity, high linearity and negligible hysteresis • almost constant sensitivity over a wide temperature range • ultra high insulation resistance (10+14 ohms) allowing low frequency measurements (<1 Hz) Industrial Automation 57 source: Kistler 8 – Real Time Control Systems

Principle of optical angle encoder Optical encoders operate by means of a grating that

Principle of optical angle encoder Optical encoders operate by means of a grating that moves between a light source and a detector. The detector registers when light passes through the transparent areas of the grating. For increased resolution, the light source is collimated and a mask is placed between the grating and the detector. The grating and the mask produce a shuttering effect, so that only when their transparent sections are in alignment is light allowed to pass to the detector (Moiré pattern). An incremental encoder generates a pulse for a given increment of shaft rotation (rotary encoder), or a pulse for a given linear distance travelled (linear encoder). Total distance travelled or shaft angular rotation is determined by counting the encoder output pulses. An absolute encoder has a number of output channels, such that every shaft position may be described by its own unique code. The higher the resolution the more output channels courtesy Parker Motion & Control are required. Industrial Automation 58 8 – Real Time Control Systems

Incremental angle encoder Photo: Lenord & Bauer open mounted Photo: Baumer Industrial Automation 59

Incremental angle encoder Photo: Lenord & Bauer open mounted Photo: Baumer Industrial Automation 59 8 – Real Time Control Systems

Absolute digital position: Gray encoder binary code: if all bits were to change at

Absolute digital position: Gray encoder binary code: if all bits were to change at about the same time: glitches 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 LSB MSB Gray code: only one bit changes at a time: no glitch 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 LSB courtesy Parker Motion & Control MSB Gray disk (8 bit) Industrial Automation 60 8 – Real Time Control Systems

Gray Code Example Decimal Gray Binary 0 000 1 001 2 011 010 3

Gray Code Example Decimal Gray Binary 0 000 1 001 2 011 010 3 010 011 4 110 100 5 111 101 6 101 110 7 100 111 Cyclic: from 7 to 0 only one bit changes Industrial Automation 61 8 – Real Time Control Systems

Linear encoder • A linear encoder is a sensor encoding position: • Optical •

Linear encoder • A linear encoder is a sensor encoding position: • Optical • Magnetic • Capacitive • Inductive Industrial Automation 62 8 – Real Time Control Systems

Force measurement Force / Torque / Weight / Pressure is measured by small displacements

Force measurement Force / Torque / Weight / Pressure is measured by small displacements (F = k • x): - piezo-electrical transducers - strain gauges Acceleration is measured by way of force / displacement measurement (F = M • g) Industrial Automation 63 8 – Real Time Control Systems

Analog speed measurement: tachometer angular speed N S Ui ~ d / dt, transducer

Analog speed measurement: tachometer angular speed N S Ui ~ d / dt, transducer f ~ analog: 4. . 20 m. A digital: 010110110 a simple tachometer is a rotating permanent magnet that induces a voltage into a stator winding. this voltage is converted into an analog voltage or current, later converted to a digital value, alternatively, the frequency of the signal can be measured to yield directly a digital value Industrial Automation 64 8 – Real Time Control Systems

Measuring distance without mechanical contact principle inductive optical ultra-sound range 0. . 10 mm

Measuring distance without mechanical contact principle inductive optical ultra-sound range 0. . 10 mm 15. . 1000 mm 20. . 2599 mm resolution 0, 1µm 2µm 300µm repeatability 1µm 2µm 500µm linearity 0, 4. . 5% 0, 06. . 1, 2% 0, 5% reactivity 0, 35 ms 0, 9 ms 30 ms remark for electrically for small and highly linear conducting mobile parts long range materials, small dust resilient cheap CCD Example: optical rangefinder laser Industrial Automation 65 8 – Real Time Control Systems

2. 1. 3. 2 Temperature measurement the most frequently measured value in industry Protection

2. 1. 3. 2 Temperature measurement the most frequently measured value in industry Protection and head assembly Extension Assemblies Thermowell www. omega. com Industrial Automation 66 8 – Real Time Control Systems

Temperature measurement Thermistance (RTD - resistance temperature detector): metal whose resistance depends on temperature:

Temperature measurement Thermistance (RTD - resistance temperature detector): metal whose resistance depends on temperature: + cheap, robust, high temperature range ( -180ºC. . 600ºC), - require current source, non-linear. Thermistor (NTC - negative temperature coefficient): semiconductor whose resistance depends on temperature: + very cheap, sensible, - low temperature, imprecise, needs current source, strongly non-linear, fragile, self-heating Thermo-element (Thermoelement, thermocouple): pair of dissimilar metals that generate a voltage proportional to the temperature difference between warm and cold junction (Seebeck effect) + high precision, high temperature, punctual measurement - low voltage, requires cold junction compensation, high amplification, linearization Spectrometer: measures infrared radiation by photo-sensitive semiconductors + highest temperature, measures surfaces, no contact - highest price Bimetal (Bimetall, bilame): mechanical (yes/no) temperature indicator using the difference in the dilatation coefficients of two metals, very cheap, widely used (toasters. . . ) Industrial Automation 67 8 – Real Time Control Systems

Thermo-element and Thermo-resistance Thermo-element (Thermocouple) 1 two dissimilar electrical conductors Fe-Const also: Pt/Rh -

Thermo-element and Thermo-resistance Thermo-element (Thermocouple) 1 two dissimilar electrical conductors Fe-Const also: Pt/Rh - Pt 4 Fe extension wire 2 3 Cu 4. . 20 m. A U ≈ ( 2 - 1) Constantan measured temperature (hot junction) Cu reference temperature (cold junction) Platinum (Pt 100) Thermoresistance (semiconductor or metal) one material whose resistance is temperaturedependent i = constant 2, 3 - or 4 -wire connection 4. . 20 m. A U ≈ 2 or 4 wire connection (to compensate voltage drop) Industrial Automation 68 8 – Real Time Control Systems

Cold junction box Industrial Automation 69 8 – Real Time Control Systems

Cold junction box Industrial Automation 69 8 – Real Time Control Systems

2. 1. 3. 3 Hydraulic measurements • Flow, • Mass Flow, • Level, •

2. 1. 3. 3 Hydraulic measurements • Flow, • Mass Flow, • Level, • Pressure, • Conductivity, • p. H-Sensor, • Viscosity, • Humidity, special requirements: intrinsic safety = explosive environment, sea floor = high pressure Industrial Automation 70 8 – Real Time Control Systems

Level measurement • pulsed laser • load cell • pulsed microwave • ultrasonic (40

Level measurement • pulsed laser • load cell • pulsed microwave • ultrasonic (40 -60 k. Hz) • low power ultrasonic F = mg detector row Industrial Automation 71 8 – Real Time Control Systems

Flow measurement Distinguish: volumetric flow ( m 3/s) mass flow: (kg / s) identical

Flow measurement Distinguish: volumetric flow ( m 3/s) mass flow: (kg / s) identical when the density of the liquid is constant main methods: -floater -turbine -pressure difference -vortex -temperature gradient -ultrasonic -electrodynamics Industrial Automation 72 8 – Real Time Control Systems

Flow measurement Other means: Magnetic-dynamic Coriolis Ultra-sound Industrial Automation 73 8 – Real Time

Flow measurement Other means: Magnetic-dynamic Coriolis Ultra-sound Industrial Automation 73 8 – Real Time Control Systems

Flow measurement in a plant Industrial Automation 74 8 – Real Time Control Systems

Flow measurement in a plant Industrial Automation 74 8 – Real Time Control Systems

2. 1. 4 Actuators 2. 1 Instrumentation 2. 1. 1 Market 2. 1. 2

2. 1. 4 Actuators 2. 1 Instrumentation 2. 1. 1 Market 2. 1. 2 Binary instruments 2. 1. 3 Analog Instruments 2. 1. 4 Actuators 2. 1. 5 Transducers 2. 1. 6 Instrumentation diagrams 2. 1. 7 Protection classes 2. 2 Control 2. 3 Programmable Logic Controllers Industrial Automation 75 8 – Real Time Control Systems

Actuators Stellantriebe, Servomoteurs About 10% of the field elements are actors (that influence the

Actuators Stellantriebe, Servomoteurs About 10% of the field elements are actors (that influence the process). Actors can be binary (on/off) or analog (e. g. variable speed drive) The most common are: - electric contactors (relays) - heating elements - pneumatic and hydraulic movers (valve, pump) - electric motors (rotating and linear) Actors are controlled by the same electrical signal levels as sensors use (4. . 20 m. A, 0. . 10 V, 0. . 24 V, etc. ) but at higher power levels, e. g. to directly move a contactor (disjoncteur). Industrial Automation 76 8 – Real Time Control Systems

Electric Motors Solenoids, DC motor Asynchronous Motors (Induction) Synchronous motors Step motors, reluctance motors

Electric Motors Solenoids, DC motor Asynchronous Motors (Induction) Synchronous motors Step motors, reluctance motors Industrial Automation 77 8 – Real Time Control Systems

Drives (variateurs de vitesse, Stellantriebe) Variable speed drives control speed and acceleration and protect

Drives (variateurs de vitesse, Stellantriebe) Variable speed drives control speed and acceleration and protect the motor (over-current, torque, temperature). High-power drives can feed back energy to the grid when braking (inverters). Drives is an own market (“Automation & Drives”) simple motor control cabinet for power of > 10 k. W small drive control < 10 k. W (Rockwell) Motors and drives are separate businesses Industrial Automation 78 8 – Real Time Control Systems

Hydraulics and fluidics… Pumps, valves, rods, … the most widespread actor in industry (lightweight,

Hydraulics and fluidics… Pumps, valves, rods, … the most widespread actor in industry (lightweight, reliable, cheap) fluidic switches I/P or E/P = electro-pneumatic transducers switchboard ("Ventilinsel") Industrial Automation 79 source: www. bachofen. ch 8 – Real Time Control Systems

2. 1. 5 Transducers 2. 1 Instrumentation 2. 1. 1 Market 2. 1. 2

2. 1. 5 Transducers 2. 1 Instrumentation 2. 1. 1 Market 2. 1. 2 Binary instruments 2. 1. 3 Analog Instruments 2. 1. 4 Actuators 2. 1. 5 Transducers 2. 1. 6 Instrumentation diagrams 2. 1. 7 Protection classes 2. 2 Control 2. 3 Programmable Logic Controllers Industrial Automation 80 8 – Real Time Control Systems

Transducer A transducer converts the information supplied by a sensor (piezo, resistance, …) into

Transducer A transducer converts the information supplied by a sensor (piezo, resistance, …) into a standardized signal which can be processed digitally. Some transducers have directly a digital (field bus) output and are integrated in the sensor. Other are located at distances of several meters from the sensor. Industrial Automation 81 8 – Real Time Control Systems

Example of analog transducer High voltage Field house Transducer Current Transformer Protection 0. .

Example of analog transducer High voltage Field house Transducer Current Transformer Protection 0. . 1 A rms R = Load Control Room 4. . 20 m. A Emergency panel PLC Industrial Automation 82 8 – Real Time Control Systems

4 -20 m. A loop standard Object Transducer instrument 1 instrument 2 instrument 3

4 -20 m. A loop standard Object Transducer instrument 1 instrument 2 instrument 3 voltage source 10. . 24 V R 2 R 1 R 3 measurand i = f(v) 0, 4. . 20 m. A The transducer acts as a current source which delivers a current between 4 and 20 m. A, proportional to the measurand (Messgrösse, valeur mesurée). Information is conveyed by a current, the voltage drop along the cable induces no error. 0 m. A signals an error (wire disconnection) The number of loads connected in series is limited by the operating voltage (10. . 24 V). e. g. if (R 1 + R 2+ R 3) = 1. 5 k , i = 24 / 1. 5 = 16 m. A, which is < 20 m. A: NOT o. k. ) Simple devices are powered directly by the residual current (4 m. A) allowing to transmit signal and power through a single pair of wires. Industrial Automation 83 8 – Real Time Control Systems

Analog measurements processing in the transducer Acquisition (Erfassung/Saisie) Normalized Signals: 0 -10 V, 2

Analog measurements processing in the transducer Acquisition (Erfassung/Saisie) Normalized Signals: 0 -10 V, 2 -10 V, (0/4 -20 m. A), ± 20 m. A, Resistance thermometer (Pt 100), Thermo-element Shaping (Aufbereitung/conditionnement) Filtering against 50 Hz/60 Hz noise and its harmonics Scaling, Linearization of sensors (Pt 100, Fe-Const), correction (square root for flow). Averaging and Computation of Root Mean Square (Effektivwert, valeur efficace), Analog-Digital Conversion Plausibility Range, Limit supervision, Wire integrity Error report, diagnostic, disabling. Combined measurement Correction of pressure and temperature measurement for moist gases, correction of level in function of pressure, power and energy computation, cumulative measurements Industrial Automation 84 8 – Real Time Control Systems

2. 1. 6 Instrumentation diagrams: P&ID 2. 1 Instrumentation 2. 1. 1 Market 2.

2. 1. 6 Instrumentation diagrams: P&ID 2. 1 Instrumentation 2. 1. 1 Market 2. 1. 2 Binary instruments 2. 1. 3 Analog Instruments 2. 1. 4 Actuators 2. 1. 5 Transducers 2. 1. 6 Instrumentation diagrams 2. 1. 7 Protection classes 2. 2 Control 2. 3 Programmable Logic Controllers Industrial Automation 85 8 – Real Time Control Systems

Instrumentation Diagrams Similarly to electrical schemas, the control industry (especially the chemical and process

Instrumentation Diagrams Similarly to electrical schemas, the control industry (especially the chemical and process industry) describes its plants and their instrumentation by a P&ID (pronounce P. N. I. D. ) (Piping a. Nd Instrumentation Diagram), sometimes called P&WD (Piping and wiring diagrams) The P&ID shows the flows in a plant (in the chemical or process industry) and the corresponding sensors or actors. At the same time, the P&ID gives a name ("tag") to each sensor and actor, along with additional parameters. This tag identifies a "point" not only on the screens and controllers, but also on the objects in the field. Industrial Automation 86 8 – Real Time Control Systems

P&ID The P&ID mixes pneumatic / hydraulic elements, electrical elements and instruments on the

P&ID The P&ID mixes pneumatic / hydraulic elements, electrical elements and instruments on the same diagram It uses a set of symbols defined in the ISA S 5. 1 standard. Examples of pneumatic / hydraulic symbols: pipe 350 k. W heater valve one-way valve (“diode”) vessel / reactor binary (or solenoid) valve (on/off) analog valve (continuous) heat exchanger pump, also Industrial Automation 87 8 – Real Time Control Systems

P&ID example Industrial Automation 88 8 – Real Time Control Systems

P&ID example Industrial Automation 88 8 – Real Time Control Systems

Instrumentation identification The first letter defines the measured or initiating variables such as Analysis

Instrumentation identification The first letter defines the measured or initiating variables such as Analysis (A), Flow (F), Temperature (T), etc. with succeeding letters defining readout, passive, or output functions such as Indicator (I), Record (R), Transmit (T), see next slides, here: flow indicator digital FIC V 1528 tag name of the corresponding variable here: V 1528 mover (here: solenoid) S function (here: valve) Industrial Automation 89 8 – Real Time Control Systems

ISA S 5. 1 General instrument or function symbols Primary location accessible to operator

ISA S 5. 1 General instrument or function symbols Primary location accessible to operator Field mounted Auxiliary location accessible to operator Discrete instruments Shared display, shared control Computer function Programmable logic control 1. Symbol size may vary according to the user's needs and the type of document. 2. Abbreviations of the user's choice may be used when necessary to specify location. 3. Inaccessible (behind the panel) devices may be depicted using the same symbol but with a dashed horizontal bar. Source: Control Engineering with data from ISA S 5. 1 standard Industrial Automation 90 8 – Real Time Control Systems

Example of P&ID The output of FIC 101 is an electrical signal to TY

Example of P&ID The output of FIC 101 is an electrical signal to TY 101 located in an inaccessible or behind-the-panel-board location. TIC 101’s output is connected via an internal software or data link (line with bubbles) to the setpoint (SP) of FIC 101 to form a cascade control strategy Square root extraction of the input signal is part of FIC 101’s functionality. FT 101 is a field-mounted flow transmitter connected via electrical signals (dotted line) to flow indicating controller FIC 101 located in a shared control/display device TT 101 and TIC 101 are similar to FT 101 and FIC 101 but are measuring, indicating, and controlling temperature The output signal from TY 101 is a pneumatic signal (line with double forward slash marks) making TY 101 an I/P (current to pneumatic transducer) Industrial Automation 91 8 – Real Time Control Systems

The ISA code for instrument type A B C D E F G H

The ISA code for instrument type A B C D E F G H I J K L M N O P Q R S T U V W X Y Z First letter Measured or initiating variable Analysis Burner, combustion User's choice Voltage Flow rate User's choice Hand Current (electrical) Power Time, time schedule Level User's choice Pressure, vacuum Quantity Radiation Speed, frequency Temperature Multivariable Vibration, mechanical analysis Weight, force Unclassified Event, state, or presence Position, dimension Industrial Automation Modifier Differential Ration (fraction) Scan Time rate of change Momentary Integrate, totalizer Safety X axis Y axis Z axis 92 8 – Real Time Control Systems

Common connecting lines Connection to process, or instrument supply Pneumatic signal Electric signal Capillary

Common connecting lines Connection to process, or instrument supply Pneumatic signal Electric signal Capillary tubing (filled system) Hydraulic signal Electromagnetic or sonic signal (guided) Internal system link (software or data link) Source: Control Engineering with data from ISA S 5. 1 standard Industrial Automation 93 8 – Real Time Control Systems

P&ID in computer readable form: IEC 62424 CAEX component library 1 role 2 3

P&ID in computer readable form: IEC 62424 CAEX component library 1 role 2 3 Industrial Automation 94 location categories auxiliary signals connection s between objects 8 – Real Time Control Systems

2. 1. 7 Protection Classes 2. 1 Instrumentation 2. 1. 1 Market 2. 1.

2. 1. 7 Protection Classes 2. 1 Instrumentation 2. 1. 1 Market 2. 1. 2 Binary instruments 2. 1. 3 Analog Instruments 2. 1. 4 Actors 2. 1. 5 Transducers 2. 1. 6 Instrumentation diagrams 2. 1. 7 Protection classes 2. 2 Control 2. 3 Programmable Logic Controllers Industrial Automation 95 8 – Real Time Control Systems

German IP-Protection classes 1 st digit touching 0 1 objects 2 nd digit water

German IP-Protection classes 1 st digit touching 0 1 objects 2 nd digit water none 0 none 1 vertically falling 2 large body object > 50 mm Ø surface finger object >12. 5 mm Ø 2 vertically dropping, 15° from vertical 3 tools, wires object > 2. 5 mm Ø 3 spraying, 60° from vertical 4 covered 4 spraying, any direction 5 dust 5 jet, any direction 6 hermetical for dust 6 strong jet, any direction 7. 8. protection against temporary dipping (30 mn, 1 m) protection against permanent dipping 9. 9 K water in high-pressure steam washing 96 8 – Real Time Control Systems object >1 mm Ø e. g. IP 67 connector Industrial Automation

Explosion protection Instruments that operate in explosive environments (e. g. petrochemical, pharmaceutical, coal mines,

Explosion protection Instruments that operate in explosive environments (e. g. petrochemical, pharmaceutical, coal mines, . . . ) are subject to particular restrictions. e. g. They may not contain anything that can produce sparks or high heat, such as electrolytic capacitors or batteries without current limitation. Their design or programming may not be altered after their acceptance. Their price is higher than that of standard devices because they have to undergo strict testing (Typentest, type test) by a qualified authority (TÜV in Germany) Such devices are called Eex - or "intrinsic safety devices" (Eigensichere Geräte, "Ex. Schutz", protection anti-déflagrante, "Ex" ) and are identified by the following logo: Industrial Automation 97 8 – Real Time Control Systems

Summary • Precision vs. Accuracy • Different sensors familly • Transducers • 4 -20

Summary • Precision vs. Accuracy • Different sensors familly • Transducers • 4 -20 m. A loop • P&ID Industrial Automation 99 8 – Real Time Control Systems