Sie sind auf Seite 1von 80

DIPLOMA OF ENGINEERING

Engineering Control Study Guide

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

i|Course Outline

Version tracking
Version .01 .11 .21 .22 .23 .25 .31 1.0 1.1 1.2 1.3 1.4 1.5 1.6 2.0 2.1 Date 29/11/2011 13/2/2012 20/3/2012 23/3/2012 27/3/2012 27/3/2012 28/3/2012 29/3/2012 29/3/2012 3/4/2012 4/4/2012 5/4/2012 5/4/2012 16/4/2012 16/4/2012 23/4/2012 Changes Basic r&d phase Content writing 70% complete 90% complete Editing, and building assessment Matching logic to experiment Finalising assessment More finalising assessment Draft 1 Update image p 52;update TOC/TOI Update TOC to include assessments Correction to spelling in KQ 3 Addendum: SI system and prefixes KQ 3 modified according to above change New hyperlink page 3 Release version Minor edit to add content on power calculation Changes authored by Peter Newnham Peter Newnham Peter Newnham Peter Newnham Peter Newnham Peter Newnham Peter Newnham Peter Newnham Peter Newnham Peter Newnham Peter Newnham Peter Newnham Peter Newnham Peter Newnham Peter Newnham Peter Newnham Status Initial design Under development Ongoing development Almost at review stage Almost at review stage Almost at review stage Almost at review stage Beta 1 Beta 2 Beta 3 Beta 4 Beta 5 Beta 6 Beta 7 Beta 8 Beta 9

Table of Contents
Version tracking ...................................................................................................................... i Table of Contents.................................................................................................................... i Table of Figures..................................................................................................................... iii About Outsource Services .................................................................................................... iv The Engineering Course Structure (Phase 4 from January 2012) ......................................... vi Self-paced learning and other information to assist you with your course .........................vii Preamble to this learning guide ...........................................................................................viii Recommended reference books............................................................................................ix Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

ii | C o u r s e O u t l i n e Assessment strategy ..............................................................................................................ix 1. Introduction ................................................................................................................... 1 Knowledge Quiz 1 review of the introduction ........................................................................... 6 2. Control system techniques and hardware ..................................................................... 8

2.1 Electromagnetic devices ................................................................................................ 13 Knowledge Quiz 2 review of the fundamentals of control systems hardware........................ 16 2.2 Sensors ........................................................................................................................... 18 2.2.1 Strain Gauges ..................................................................................................................... 18 2.2.2 Thermistors ........................................................................................................................ 19 2.2.3 The pressure transducer .................................................................................................... 23 2.2.4 Ultrasonic sensors .............................................................................................................. 26 2.2.5 Differential sensors ............................................................................................................ 27 2.2.6 Position sensing ................................................................................................................. 28 2.2.7 Differential sensing ............................................................................................................ 29 2.3 Controlling position ....................................................................................................... 30 2.3.1 Stepper motors .................................................................................................................. 30 2.4 Measurement techniques .............................................................................................. 32 2.4.1 Calibration.......................................................................................................................... 32 2.4.2 Tuning ................................................................................................................................ 33 2.4.3 Correcting for non-linearity ............................................................................................... 34 2.4.4 Other calibration factors.................................................................................................... 35 2.4.5 Common sources of error in measurement ...................................................................... 36 2.4.6 Instrument errors............................................................................................................... 37 2.4.7 Using the measuring instrument ....................................................................................... 38 2.4.8 Universal measuring devices ............................................................................................. 39 Knowledge Quiz 3 review of sensors and measurement......................................................... 40 3. Controlling a Process ................................................................................................... 42 3.1 Relay and Float switch control .............................................................................................. 42 Knowledge Quiz 4 : Observations from practical exercise ......................................................... 45 3.2 Fundamentals of logic in control circuits .............................................................................. 46 3.3 Microcontrollers: principles and programming .................................................................... 50 3.4 Ladder Programming ............................................................................................................ 53 3.5 Computer programming ....................................................................................................... 56 Knowledge Quiz 5 review of controllers and programming .................................................... 60 Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

iii | C o u r s e O u t l i n e 4. Communicating between devices ................................................................................ 61 4.1 Proprietary ............................................................................................................................ 62 4.2 IEEE Standards ...................................................................................................................... 63 4.3 Serial RS232 standard ........................................................................................................... 63 4.4 Ethernet ................................................................................................................................ 64 4.5 USB ........................................................................................................................................ 65 4.6 Firewire ................................................................................................................................. 65 4.7 GSM....................................................................................................................................... 65 Knowledge Quiz 6: Communications .......................................................................................... 67 Final Assessment/RPL Checklist. ................................................................................................. 70

Table of Figures
Figure 1 RJ connectors (Image BLINN.EDU) .......................................................................................... 2 Figure 2 Generator equivalent circuit ................................................................................................... 8 Figure 3 Strain Gauge sensor patches ................................................................................................ 18 Figure 4 Wheatstone Bridge ............................................................................................................... 19 Figure 5 Ratio and degrading graphs .................................................................................................. 20 Figure 6 Ratio chart............................................................................................................................. 21 Figure 7 Bridge sensor connection ..................................................................................................... 22 Figure 8 U tube manometer ............................................................................................................... 24 Figure 9 Pressure transducer, basic .................................................................................................... 24 Figure 10 Ultrasonic T-R...................................................................................................................... 26 Figure 11 Ultrasonic sensing ............................................................................................................... 27 Figure 12 Differential pressure sensor ............................................................................................... 27 Figure 13 Position sensing, linear and angular resistance types ........................................................ 28 Figure 14 LVDT .................................................................................................................................... 29 Figure 15 Selection of stepper motors ............................................................................................... 30 Figure 16 Linear actuators .................................................................................................................. 31 Figure 17 Carbon resistor colour coding............................................................................................. 36 Figure 18 SMD resistors (surface mount devices) .............................................................................. 36 Figure 19 Time domain and frequency domain representations ....................................................... 37 Figure 20 Tank control system during basic setup ............................................................................. 42 Figure 21Gauger Ultrasonic transducer.............................................................................................. 44 Figure 22 Control and power board (IDEC PLC to be fitted) ............................................................... 44 Figure 23 Bottom tank with float switch C and pump (internal) ........................................................ 44 Figure 24 IDEC Microscan PLC example .............................................................................................. 44 Figure 25 Top tank with float switches installed and Microscan ultrasonic height measurement transducer ........................................................................................................................................... 44 Figure 26 Logic circuit families (TTL) ................................................................................................... 47 Figure 27 Simple TTL version of relay controller ................................................................................ 50 Draft version 2.1 23 April 2012 Engineering Control Copyright Outsource Services

iv | C o u r s e O u t l i n e Figure 28 Microcontroller Block Diagram ........................................................................................... 51 Figure 29 Ladder logic and TTL equivalent (From EC&M) ................................................................. 55 Figure 30 Bus depiction - controller system ....................................................................................... 61 Figure 31 Backplane Controller (Source Wikipedia) ........................................................................... 62

About Outsource Services


Our Business Outsource Services is a Registered Training Organisation (RTO) delivering management and engineering programs to some of Australias largest engineering, mining, oil and gas, LNG and public and private sector organizations. The unique nature of our flexible and high quality training and assessment services allows us to quickly design, implement and deliver training solutions that not only meet organizational compliance and performance expectations, but attracts significant state and federal funding support to our client base. Our Team We have the most experienced team of managers and training consultants in the industry. From engineers that have designed internationally recognized engine components to management trainers holding PhDs and years of management experience in leading Australian and international organizations. We not only understand training, we understand industry! Outsource Services is a business-to-business training services provider that delivers nationally recognized qualifications and training to medium and large employers to assist them with, employee retention, skills enhancement, skill shortages, compliance requirements and general human resource development. Because we deliver our services in a flexible and customer focused manner our clients are able to reduce their training costs and production disruptions normally associated with large scale training and development projects. Our Competition: Our competitors offer quality training but in a traditional classroom focused manner. Outsource Services is able to deliver onsite, online or in a blended format in a contextualized manner that meets client and individual needs. Our Financials: Outsource Services has grown between 80-100% in turnover each year since 2003. This growth has been driven by a Queensland and national skills shortage, federal and state government policies that support the skilling of our national workforce and Outsource Services ability to meet client and individual needs using our flexible and customized training approaches. We deliver what you want, where you want, when you want! Our Future

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

v|Course Outline Through the introduction of additional Engineering, Construction and Manufacturing related qualifications Outsource Services will grow its market share in the training and development of para-professional engineering candidates. We currently have Cert III in Engineering Technical (CAD), Cert IV in Engineering (Fluid Power) and (Certified Welding), Diploma of Engineering (Mechanical) and Advanced Diploma of Engineering (Mechanical). The Diploma and Advanced Diploma both have university pathways reducing a Bachelor of Engineering Mechanical by up to 18 months. Other areas of Outsource Services growth will be generated by the ongoing and expanding need for qualified OH&S practitioners in all enterprises due to the harmonization of OH&S legislation nationally. Outsource Services is currently registered to deliver the Cert IV, Diploma and Advanced Diploma of OH&S becoming one of the few providers in the state of Queensland. Outsource Services also has Productivity Placement Program funding through the following Industry Skills Councils and directly with DET under the Userchoice provisions using their preferred supplier offering: Manufacturing Skills Qld ISC $500K Construction Skills Qld ISC $280 Community and Allied Health ISC $50K Local Government ISC $50K Skilling Solutions Qld (Recognition of Prior Learning Funds) $100K Userchoice Dept of Education and Training (DET) Unlimited Co-provider with TAFE Qld 70,000 SCH $410K

All the above preferred-supplier contracts have been held by Outsource Services for a number of years and annually reviewed and increased to meet the demand of each industry.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

vi | C o u r s e O u t l i n e

The Engineering Course Structure (Phase 4 from January 2012)


Advance Dip Engineering Subject Cluster Adv.Dip ENG UNITS MEM12024A MEM12025A MEM30012A MEM16006A MEM16008A MEM30007A MEM23061A MEM23003A MEM23051A Engineering Mechanics of Solids Engineering Drawing 2D & 3D CAD with Solidworks Environmental Sustainability Mechanical Engineering Design MEM30005A MEM30006A MEM30001A MEM30002A MEM30003A MEM30004A MSAENV272B MEM22007A MEM30009A MEM23041A MEM23071A MEM22001A MEM22002A MEM22004A MEM23081A MEM23091A MEM23093A MEM14081A MEM09141A MEM09151A MEM14061A Description Cert 3 Dip

Engineering Mathematics Computers & Communication in Engineering Engineering Material Science Engineering Control

Perform computations Use graphical techniques and perform simple statistical computations Apply mathematical techniques in a manufacturing, engineering or related environment Organise and communicate information Interact with computing technology Select common engineering materials Select and test mechanical engineering material operate and program computers and/or controllers in engineering situations Apply basic electro and control scientific principles and techniques in mechanical and manufacturing engineering situations Calculate force systems within simple beam structures Calculate stresses in simple beam structures Use Computer aided drafting systems to produce basic engineering drawings Produce basic engineering graphics Produce detailed engineering drawings Use CAD to create and display 3D models Participate in environmentally sustainable work practices Manage environmental effects of engineering activities Contribute to the design of basic mechanical systems Apply basic scientific principles and techniques in mechanical engineering situations Select and apply mechanical engineering methods, processes and construction techniques Perform engineering activities Manage self in the engineering environment Manage engineering projects Apply scientific principles and techniques in mechanical engineering situations Apply mechanical system design principles and techniques in mechanical engineering situations Apply plant and process design principles and techniques in engineering situations Apply mechanical engineering fundamentals to support designs and development of projects Represent mechanical engineering designs Apply computer aided modeling and data management techniques to mechanical engineering designs Plan and design mechanical engineering projects

Advanced Engineering Project Management Advanced Mechanical Engineering Design Calculations Advanced Design in Manufacturing Advanced Mechanical Engineering Design

Draft version 2.1

23 April 2012 Engineering Control

Copyright Outsource Services

vii | C o u r s e O u t l i n e

Self-paced learning and other information to assist you with your course
Outsource Services offers a unique clustering of course units to assist you to get the most out of your training in the most effective way, without duplication. Our courses are developed to fully meet the national training requirements of the diploma and advanced diploma of engineering. They are also developed by us to eliminate, as much as possible, you covering the same ground twice. The intent is that you study in a self-paced mode, and we support you with tutorials at our premises at Murarrie, or by arrangement with regional partners, at their premises. Our tutorials are highly concentrated, designed to get you through the difficult spots, to help you with your motivation and to keep you on track to complete the units in the shortest timeframe possible. This is important for you to understand, because we have found that the best learning comes from this immersion process. You will see rapid results and you will reach your qualification goals earlier than by the traditional route. But you need to devote yourself to the process and work hard to keep up with the tutorial programme. We will provide additional telephone or email support to get you over any hurdles you encounter, providing you are putting in your own effort. The commitment you have made by enrolling in the course is towards you career aspirations. We are there to support those aspirations. You will need to make a concerted effort to work though this guide, and to complete the knowledge sheets, assessment items and practical exercises as effectively as you can in the time frame provided for the cluster and in keeping with the tutorial process. Following this guidance will see you graduate earlier than through any other type of participation, and give you the best opportunity for university articulation should you want to advance through to professional engineering qualifications.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

viii | C o u r s e O u t l i n e

Preamble to this learning guide


Welcome to the exciting word of process control and instrumentation. This is probably the most universal technology throughout the industrial world. The sciences and mathematics surrounding and within every manufacturing process, every plant, building, advanced motor vehicle and aircraft have lead to control technologies that permeate the manufacturing process as well as the operation of the product, and give additional safety and environmental protection. By completing this course, you will gain skills and knowledge about the types of devices available, the conditions under which devices will function correctly, and programming principles. These skills will enable you to participate in design, commissioning and tuning of fundamental control systems in industrial settings. Success in this cluster addresses the requirements of the following manufacturing skills training units: MEM23003A Operate and program computers and/or controllers in engineering situations MEM23051A Apply basic electro and control scientific principles and techniques in mechanical and manufacturing engineering situations Training for this cluster involves both theory and application using a basic control system and application of relevant mathematical concepts as covered in the mathematics cluster of units; the maths cluster will precede and develop relevant concepts directly applicable to the control cluster. Your training will involve you in development of a control task with a number of variations, several control approaches including computer and Programmable Logic Controller, software design elements, tuning and adjustment, calibration, selection of transducers and control elements such as pumps and valves, safety procedures for working range and de-energising of the system prior to disassembly of any component, low voltage and AC control considerations and lock-out techniques. Team work will be essential and the nature of the tasks will have direct relevance to real world engineering applications. Attention will focus on design and fine tuning, and documenting the development and any changes made to the design. The object is not to demonstrate the skills of an electrical/instrumentation fitter, but rather the ability to work within a project team, contributing to the outcomes and problem solving by the demonstration of underpinning scientific principles, mathematical skills, research, understanding of programming principles, options for reliability and accuracy, and delivering a result based on client requirements. In this guide, many drawings come from Wikipedia, and there are numerous hyperlinks to additional information found in Wikipedia and other sources. These are fabulous resources where the best information can be easily found. Dont be afraid to use the information commons that are Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

ix | C o u r s e O u t l i n e increasing in the internet research area and obviously there is, ongoing, a building of reliable information and a reduction in unreliable information as experts run their eyes over the content that is found there.

Recommended reference books


These books are on hand at our training rooms at Murarrie: Fundamentals of Industrial Instrumentation and Process Control, William C. Dunn, McGraw Hill, 2005. ISBN 0 07 145735 6 Industrial Control Handbook 3rd edition, E.A.Parr, Newnes, 1998. ISBN 0 7506 3934 2 Programmable Logic Controllers 5th Edition, W. Bolton, Newnes, 2009, ISBN 978 1 85617 751 1

Assessment strategy

Assessment will comprise 1. Successful completion of each of the embedded knowledge quizzes, and wherever there is an identified gap, that is corrected through additional research, support or study. 2. Completion of a practical control exercise using both a non-programmed method and a programmed method. For those attending tutorials, the equipment is made available and a specific exercise is to be undertaken. For those not attending, evidence of the ability to assemble systems and components, run the control system and make calibration and tuning adjustments will be required to be gathered and certified by a colleague or supervisor qualified in the field. 3. Demonstration of the ability to identify requirements, plan solutions to meet client requirements, research available solutions and components needed, and work as part of a team to implement the solution, understanding the testing and safety requirements. This will be recorded by observation and a checklist maintained by the course coordinator. The arrangement for those not attending will need to be addressed as above in (2). 4. A final assessment will be conducted to assess the level of skill and knowledge evident. The assessment instrument used will be common with the RPL process used for these units.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

1|Page

1.

Introduction

Control of tasks by computer or programmable microcontroller requires information (signals or data representing conditions at any time during the execution sequence), instructions (a program of sequenced events), devices to acquire information and devices to perform the functions required. These latter are called IO (input-output) devices, a generalisation because there is a huge variety of devices to measure, and similarly a huge variety of actuators and valves, rams, electrical switchgear and so forth to do the work. Some are off the shelf, but many are designed and built to suit a specific task. Every industry uses some form of automation, and the same concepts are found in buildings, homes, cars, medicine, aircraft, and the list goes on. When we consider how to control a task (that has to be repeated, ongoing, precise, reliable and safe) we need to consider many factors. But in reality the factors come down to four categories: 1. Techniques we can use in the building of logical circuits Techniques include the selection of a group of devices, such as relays, or logical gates, or the clocks and counters and maths units such as shift registers that are available to us. The choice depends on the complexity of the element to be controlled. Once we get past simple functional control, we soon realise that dedicated controllers (PLCs, PLAs) will offer greater overall simplicity and reliability. Computer control using a PC in a rack or on a desk is also feasible as the logical system is very flexible, by means of programming, and multi-tasking is available as a feature. Many systems will commence life as a ground-up design, and developed to perform a specific function. The designer needs to consider reliability, the effects of transient spikes on the system, human safety, environmental safety, and maintenance-safe design using lock-out devices, system power bleeding, safe reservoir capacity, and other factors that may lead to the design rapidly becoming more complex than originally intended. Therefore fixing ones ideas on a particular approach too early may lead to shortcomings in commissioning. Careful understanding of the client requirement and high-quality planning will get the design moving in the right direction and lead to a better outcome with less lead time to construction. 2. I/O Devices Sensors are devices for measuring temperature, height, mass, pressure, level, distance, direction, altitude (really the same as pressure) and anything else that can be measured, and are many and varied. What the designer needs to know is the range over which the device needs to operate in the task to be undertaken, and the conditions in which it has to operate. A thermal sensor for room temperature will not be useful in a blast furnace; something designed for water may not be suitable for acid, and so on. Precision, accuracy and linearity need to be understood in selecting these devices. Actuators - devices for doing the control functions - are also numerous, and again the designer has to understand the function in order to choose a device that will actually do the job. Many are electro-mechanical devices, such as solenoid operated valves, pumps, relays, motors for conveyor belts. Some are purely mechanical, transferring energy from one point to another (now rarely used) and some use available energy such as thermal, solar-thermal, gas pressure or hydro energy Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

2|Page to perform a function. These are highly specialised and we will not attempt to deal with these in this course; however you may encounter something unusual in the field and awareness that these systems can be used will also alert you to the inherent dangers of not being able to shut down the energy source in some circumstances. Transducers are devices that convert energy from one form to another. Most sensors are transducers, and so are many actuators. The term transducer is more commonly applied to sensors. 3. Programming Programming is the technology to bring measurement and control functions under one roof using a digital controller. There are industry standards in the PLC environment, and software tools to accompany commercially used controllers. However, a computer may be used to act as the controller and designing a program may be quite unique to a particular system, such as a banks high technology security and monitoring system. When a program, of whatever type, is developed, obviously it needs to work with all of the inputs, over their range of signal both expected and unexpected (leading to over- range corrections etc); it needs to be able to read changes in information from feedback signals; it needs to understand sequences; it needs to know when certain elements of the task are complete so that others can begin or stop; and it needs to provide alerts to situations that are appearing to trend abnormally. It should also understand all of the limits on all of the devices and provide fail-safe responses. Overall, the program will read inputs, and make adjustments as needed to outputs. This is not unlike a spreadsheet used to calculate an end result (or many outputs) from a number of inputs. Many of the design principles share common ground with spreadsheeting. We describe the parts of a computer program where we describe all of the real-world steps to do something in very simple controller steps, as algorithms. This term came about as computing began but the technique has existed in mathematics for centuries, in the more complex reasoning problems faced by scientists and mathematicians. When we develop an algorithm, we identify all of the miniscule elements of performing a task. Algorithms assist programmers to construct programs in high level computer languages such as FORTRAN or Visual Basic or HTML. After that, the program has to be compiled into something the processor chip can use, i.e converted to the instruction set used by the chip. When designing a controlled process, designers need to develop algorithms to convert the problem into steps that can be programmed. 4. Communications Communications is the means of signalling to and from devices that are deployed in, for example, a large plant, and transmitting to remote points of control or monitoring. By adopting a signals standard, the designer works on a common platform and technical installations will be fool proofed. Historically there have been a number of platforms (protocols, industry standard ISO xyz) used in the field, such as MODBUS and C-BUS, which are still in use, but progression to more Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

Figure 1 RJ connectors (Image BLINN.EDU)

3|Page universal concepts across the technologies has led to increasing ETHERNET -based communications technology to be deployed. This allows use of wired and wireless circuits and means that the majority of future digital control devices will come out of the box with an RJ network connector and behind it an Ethernet interface to communicate with the processor inside, for data in and data out. This is indeed very good news for all of us - including the technical installers and repairers who will eventually require only Ethernet testers for testing the status of a controller element. Perhaps the most common serial communications standards between controller and device are the RS 232 serial bus standard and the 4-20 mA current loop. The 4 to 20 milliamp (4-20mA) two- and four- wire loop is one of the most widely-used sensor interfaces, in use for many decades and continuing to be favoured because it is relatively free from interference from noise (electrical transient pulses from high current equipment switching is a common cause) in industrial plant sites, and immune from voltage drop over a long cable run. This low current analog loop enables simplicity of installation in noisy situations where shielded wiring would otherwise be needed, and allows a current variation in the loop over the range indicated, with 4 being the lowest current (but not zero, so it is self testing) and up to 20mA when the device controlling the loop is at maximum range. And it doesnt matter how long the loop is, because it is not concerned by voltage drop over the circuit. These loops were once run over thousands of kilometres (including the Transatlantic Cable) using conventional telephone wire, in the early days of teletype; and teletype machines were used as the first computer printers, using the same analog loop in the age of the digital computer. Digital sensing is still less convenient than analog sensing, particularly in some heavy plant sites, due to the corruption of small digital signals by plant noise. However, digital control equipment is universal today, so there needs to be a conversion of the 4-20mA signal using an analog to digital converter. Many sensors provide an analog signal (i.e. an analogy, in electrical energy, of the original which may have been mechanical or another energy form). You should always consider the use of a current loop for these transducers if the environment where they will be installed has issues as outlined above. This introduction has been designed to cover the essential principles of measurement and control, and although we havent yet embarked on the specifics of design and selection of IO devices, writing a program or establishing communications, it is absolutely essential that you have understood everything to this point. So you will now review your knowledge about the introductory information. Please advise your tutor of any difficulty and ensure you go on with the course with confidence. Rule #1: if you dont understand something, probably no-one in the course does. So dont be afraid to ask. We suggest you refer to the three reference books listed before this introduction when you undertake the first of the Knowledge Tests to help you to get familiar with research, which will be an important skill for you to work in the control and measurement field. Also make use of websites such as Applied Solid Technologies http://www.solidat.com/content.asp?id=15 Additional notes:

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

4|Page

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

5|Page

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

6|Page Knowledge Quiz 1 review of the introduction 1.1 Define analog

1.2 Digital sensing is less convenient than analog sensing - explain this.

1.3 What sort of device is a transducer?

1.4 Write a brief algorithm for making a cup of tea

1.5 What is a 4-20mA loop?

1.6 What is an actuator? List two types and explain what the transducer action is for each:

1.7 Make a checklist of things to do before commencing the design of a controlled process:

1.8 Go to a website and find one sensor that senses the level or height of a water head in a tank. What are its basic principles as a transducer, and what would be the best way to connect it back to the controller in an industrial plant?

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

7|Page

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

8|Page

2. Control system techniques and hardware


In this section we will look at the devices you can use to read signals, and control outputs. This includes IO devices and examines transducer principles. Since we are mainly concerned about electrical analogs coming from the sensors we use, lets start with a review of some basic electrical, electromagnetic and electromechanical principles.

EMF is electromotive force which is also energy. The unit of measurement is the volt. Sources of EMF include AC generators (alternators), DC storage cells and generators, photovoltaic cells and even quartz crystals. You probably start your barbeque with a button striker that involves a quartz crystal. When struck it converts some of the mechanical energy to noise and some to electrical energy in the form of a spark to ignite the gas supply. This is a good demonstration of important work of Sir Isaac Newton who pondered that the total amount of energy out of a system is equal to the energy put in. For centuries this formed the basis of maths and science study and Albert Einstein was foremost in proving the case under isolated situations, leaving open some key points about whether it applied across the entire universe. Energy may convert to differing forms such as frictional heat, noise and the requirement you intended, but you have to energise your system with enough to meet the total output. Similarly, any generator of EMF has internal resistance made up of heat energy given off, losses in insulation material inside it, and eddy currents circulating in its metallic structure or core that rob energy. And so we can think of every source of EMF as having a circuit like this:
(Source: Wikipedia)

The losses inside the generator are all grouped into RG, which is a resistor equivalent to the open circuit voltage VG (which can be measured by a high impedance1 voltmeter) without the usual load RL being connected, divided by the maximum current the generator can make. This is the current that would flow in a short circuit. So you place a current meter (Ammeter) across the voltage terminals (in theory; there are less dangerous ways to do this with some circuits knowledge) and read the number of amperes out of the generator. Heres where Georg Simon Ohm comes in. The ohm ( ) is the SI unit of electrical resistance of any conducting material, whether it is designed to be a resistor or a Figure 2 Generator equivalent circuit conductor. This definition is worthy of thought, because so much depends on you having a good understanding of resistance and what it can do to create unanticipated errors in your design: The ohm is defined as a resistance between two points of a conductor when a constant potential difference of 1 volt, applied to these points, produces in the conductor a current of 1 ampere. (Note that the conductor in this definition cannot be the source of any electromotive force.) Have a look at http://en.wikipedia.org/wiki/Ohm for more information, but as a basic rule the definition results in the formula that resistance equals voltage applied divided by the current that flows because of it, and this applies to both AC and DC current sources in general. In AC circuit theory, impedance replaces resistance but has the same definition
1

At least 10 times higher impedance than the size of RG so as not to create a meaningful error in reading

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

9|Page at low AC frequencies - such as 50 Hz, and holds fairly true over minor changes in environmental factors such as temperature.

Resistors; Photo by P.J. Newnham

You will recall that direct current (DC) flows from one terminal of the source, through the load, and back into the other terminal, as a one-way flow like a stream flowing from a lake. In the case of water from a lake, the equivalent of EMF is the mass of the water and its elevation, as stored energy. Nothing flows if there is a closed sluice gate, (an off-switch) and nothing would flow if the source and the end terminal were at the same energy levels (you dont have currents flowing in a lake unless water is leaving it, going downhill and causing energy differences). So when the sluice opens, down the stream goes the water, limited by the size of the conducting path and the height of the point to where it flows. DC has the same behaviour. AC exhibits similar behaviour, except that it is dynamic current coming from a source such as an alternator, swinging through sinusoidal varying peaks, zeros, negative peaks, zeros and positive peaks, flowing in the circuit and able to pass through resistors unchanged in nature (but amplitude will lessen as EMF is converted to heat in the resistor), and reactive components (capacitors and coils or inductors) where it changes behaviour by current leading voltage or current lagging voltage. More later. AC is cyclical. A bike wheel behaves the same way. Paint a spot on a bike wheel and move the bike along a path, and the spot will rise and fall around the axle level as the wheel travels forward, making a similar locus to the time-based AC sine wave. The repetitive period of AC current generated in the Australian energy grid system is 50 revolutions per second, so the bike wheel could do that easily if the rider was pedalling along at about 1000 KPH. Other sources of AC current include microphones because they produce an electrical analog of voice or music, made up of many sine wave electrical currents but at very low energy levels. Any shape of sound signal is made up of multiple sine waves with amplitudes and timing (and phases) all adding up to create the shape we see on an oscilloscope; so a display may not look sinusoidal, but it is the instantaneous sum of sine wave signal amplitudes. Microphones are sensors, and also transducers (Im sure you understand that now). If the diaphragm of the microphone receives a single frequency movement of air (a clean note from a guitar struck about the centre of the string will produce hardly any harmonic tone) it will output a sine wave at the same frequency as an electrical signal with amplitude proportional to the energy of the source.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

10 | P a g e When a wire moves through a magnetic field it creates a flow of electrons in the wire, if something is connected that enables the flow (a circuit). If the magnetic field reverses as it cuts the wire, the current flow will reverse and go through the circuit the other way. This simple device uses both poles contributing to generation of current at once, because the wire is looped. The device is converting rotary energy (from a handle, the wind, a motor or a steam turbine to electrical current flow, which will be sine wave shaped, and the amplitude and frequency are both dependent on the energy source (This is an energy in = energy out + energy lost situation). In industrial use alternators are frequently more complex that something like this, but something almost this simple could be used as a tachometer, to sense rotary speed from a motor of some type.
(source Wikipedia)

Now take a look at Wikipedia for a model of a three phase alternator using, not fixed magnets, but electromagnets, which is the common way of providing the magnetic field. We are about to review electromagnetism in the next section of this workbook. http://en.wikipedia.org/wiki/File:3phase-rmf-noadd-60fairopt.gif

Additional notes:

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

11 | P a g e

Lets examine a simple circuit using a 12 volt battery (or DC supply - our source of EMF) and a variable resistor, so that the current flow can be varied. We will monitor the current flow in the circuit, and discuss the basic principles of what is going on. Then we will replace the variable resistor with a sensor that responds to changes in temperature.
Variable Resistor 0-50 ohm Amps Lamp

12 Volts

Calculating power
..

Power is consumed by losses and the load (the lamp in the above example). The load is where the work is done in the real world, and the source provides the energy to deliver the function at the load. To calculate power, simply measure the voltage at, and the current in, the load, and multiply .. these together.

So if we have 12 volts at the load, and measure 0.5 amps in the circuit, the lamp above will be consuming 6 watts. Notes:

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

12 | P a g e

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

13 | P a g e

2.1 Electromagnetic devices


Electromagnetism plays an important role in sensing and control devices. The underlying principle of electromagnetism is the formation of a magnetic field around a current-carrying wire. The inverse is also true. Moving a magnet past a wire will cause current to flow. This latter effect requires a dynamic change in the field as it intersects, gives us the principle of the dynamo and explains why transformers require AC current to work. A way to determine the polarisation of the field formed by a current in a wire is to use the right hand grip rule which is true for conventional current flow - from positive terminal to negative terminal. The field resulting is in the direction B. Again, this is the conventional depiction whereby in a permanent magnet, the field direction is from North pole to South pole.
(All images sourced from Wikipedia)

By making the wire into a solenoid (coil), the field can be concentrated through the centre of the coil. The diagram below shows a slice view.

The dot in the cross section of the wire represents the head of an arrow while the cross is the tail feather of the arrow, so current is flowing towards your face at the top of the coil and away from you at the bottom. If you curl your fingers of your right hand in the same way so that the current flows out of the fingertips, your thumb indicates the direction of the North pole. If the current in the coil is AC, the field will collapse to nothing then reverse on each successive half cycle of the sine wave of current. The current will be found to lag behind the EMF, due to the time factor of building the field. Interesting point, and the higher the frequency the more the time lag, so keep this in mind with electromagnetic transducers. Adding a core of iron or ferrite material assists in drawing the field into a higher concentration of magnetic flux, or energy. This helps to make electromechanical devices work more efficiently. The relay is one such device, but so is the electric motor.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

14 | P a g e

PCB relay

Miniature relay in circuit

Automotive relay

(Source: Photos by P.J. Newnham)

Relays were invented in early telegraphy when words were encoded into pulses using a code such as Morse code, keyed and interpreted by humans. As the voltage dropped across the miles of wire cable, the signal weakened until it was refreshed by a relay. The relay needs only a small activation current, and at the next signal relay station along the route, this small residual signal switched a battery pack thereby replicating the signal at full strength. We know that the current loop would have achieved a simpler result but the genius of that idea had not yet been uncovered. Relay based systems formed the basis of automation and signal switching up until the late 1970s, providing industry with the fundamental logical building block, the gate. Very complex systems needed large numbers of relays, and reliability was an issue. The semiconductor and the emergence of digital semiconductor-based logical devices and controllers provided the miniaturisation of these systems and reduced the power wasted by the massive relay banks in heat alone, although, for a time, the relay endured in the interface between low voltage controllers and the high current AC or DC circuits they controlled. Despite excellent isolation between the activating source and the controlled source, relays are rarely designed into electrical circuits any more, fading away even in the car industry, and increasingly replaced in DC systems by transistor and SCR devices and in AC systems by TRIACS. Semiconductor switches compete favourably in reliability, cost and operational effectiveness; they can provide virtually the same isolation between input signal and output signal as a relay (optoisolators in particular),can handle large currents, have no moving parts and no mechanical contacts that may burn and erode. Essentially, a relay is a solenoid2 device; there are many contactors, actuators, one- and two-way solenoid valves, and other solenoid activated switch systems found in any plant where they control large amounts of energy such as high current supplies, fluid power systems, water mains, storage hoppers and so on. Links to manufacturer information are easily
2

Solenoid = electromagnetic actuator

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

15 | P a g e found, an example being MGA controls at http://www.mgacontrols.com/2011/02/24/mminternational-solenoid-valves/ The semiconductor is the future. Many solenoid devices, increasingly, are being replaced by semiconductor devices. In the electric train speed controller circuit, QRs electric trains use massive TRIACS with water cooling. Though semiconductor theory is not required here, you may want to discuss or read up on the basics. In a nutshell: conventional junction diodes conduct one way only; zener diodes have designed reverse breakdown points that enable them to control voltage; a junction transistor operates by injection of minute current into the base-emitter junction, controlling a large current in the emitter-collector circuit; a field-effect transistor (FET and MOSFET) uses a voltage on the gate (no current flows) to control large current in the drain circuit; SCRs (also called thyristors) use a small gate current to switch on current flow from cathode to anode, whereby it will remain on until the power is cut; the silicon controlled switch (SCS) can gate the current on and off; TRIACs are bilateral gate-controlled switches for AC; once the control current into the gate is set, the device operates on each successive half cycle to control its current from cathode to anode, which obviously also interchange. Additional notes:

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

16 | P a g e Knowledge Quiz 2 review of the fundamentals of control systems hardware 2.1 Define EMF

2.2 Name one important source of EMF, and the principle of energy conversion associated with this. Bonus points for finding a source not yet discussed. Bonus points also for discussing losses and the conservation of energy principle.

2.3 Ohms law enables us to determine the current that flows in a circuit when energised by an EMF. What limitations are associated with this law?

2.4 Calculate the current that flows in the following circuit and the voltage between A and B:
330 ohm A

12 Volts

870 ohm

B
..

Draft version 2.1 Engineering Control


..

23 April 2012 .. Copyright Outsource Services

17 | P a g e

2.5 What is electromagnetism?

2.6 What applications of electromagnetism can you list? (At least four please)

2.7 What is meant by the equivalent circuit of a generating device?

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

18 | P a g e

2.2 Sensors
At this point we are ready to get across the huge range, or a bit of it at least, of the devices used to measure things happening in the system we want to automate, control or monitor. Here we will cover a cross section, but you will need to be able to research the devices we cover, and more too, if you have a special requirement. Therefore you will be doing some research in this section. Lets start with sensors that are used to weigh. The butcher might have once put his finger on the scale to up his profit, but if he uses modern scales that would be extremely obvious and also ineffective, because the sampling techniques used in digital electronics run averaging and correcting algorithms, designed to improve the accuracy of the sensing system as peaks and bumps occur. Imagine a control system for a conveyor belt feeding a ship loading facility, being loaded from hoppers or other belts where product is dumped into the system quite randomly. The averaging of the load is essential so that the loading system is not adjusted or overcorrected for normal loading. The most frequently encountered weighing transducer is the strain gauge sensor. A close second is the pressure transducer. Lets discover these two and their characteristics. 2.2.1 Strain Gauges

These are strain gauge patches that are glued onto bridges and beams, and also onto smaller weighing apparatus to measure deflection within a piece of metal, or composite plastic. They have wide ranging application. The patch is applied (A) at normal beam load (usually glued in place when the system is built, and can be applied at any key point in the beam where load consideration is critical). The beam can be any sort of beam from a short aluminium bar to a heavy duty joist. If the patch stretches, as in (B), the resistor on the patch becomes narrower and resistance increases. If the beam compresses as in (C), resistance is reduced. They could be used to monitor changes in a system that may be suspected of future failure, to develop information about the changes occurring. They can be used in weighing systems. They can be used on crane booms. They would have been used somewhere in the Leaning Tower of Pizza in modern times to inform engineers of the structural contortions going on as it started to lean outside of its tolerance. This is a very useful postage stamp. How do we use it in our application?

Figure 3 Strain Gauge sensor patches

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

19 | P a g e The concept that makes this, and many other sensors, work best is as an arm of a very clever bridge comprising four elements in a rest-state balanced configuration like so: If all resistors in this circuit are identical, the voltage at the two points B and D will be exactly the same (and this hold true if R1=R2, and R3=RX). Therefore the voltage VG will be zero. If RX is our strain gauge, installed at the test site, and its resistance before being deformed is the same as R3, (R1 and R2 also being identical) the circuit is perfectly balanced and the output of the feedback signal VG is zero. This is a very nice arrangement because VG will become dependent upon the deformation of the beam to which RX is attached, and will be a positive (B more positive than D) if the strain deformation stretches the gauge and a negative (B more negative than D) it the deformation compresses the gauge.
Figure 4 Wheatstone Bridge

2.2.2 Thermistors

330

330

25 volts 330

Rx is a positive temperature coefficient thermistor (a PTC) for sensing temperature inside a refrigeration plant. It has a nominal resistance of 470 ohms @ 25oC and senses from -55oC to +125oC at +/- 1% tolerance.

Q: What would be the expected reading on the voltmeter VG at -40oC, -20oC, -10oC and 0oC? To understand how this device varies with temperature, you will need a data sheet. One manufacturer of close tolerance PTCs is Vishay Dale (Vishay type number TFPT0603L4700FV). Other sources are Digikey and AllDatasheet.com but when selecting, you need to always visit the manufacturers website and recheck. Data and products develop and improve, or get replaced, and as a result the key information changes; 2nd and 3rd party vendor links are often out of date. http://www.vishay.com/docs/33017/tfpt.pdf or 33017 This will get you the TFPT0603 family PDF data sheet. Have a look at the data and find tables or graphs of temperature vs. resistance and calculate the nominal resistance at each of the above temperatures.
Temperature C Multiplier Resistance
o

-40 .75

-20 .823

-10 .861

0 .9

+25 1 470 +/- 1%

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

20 | P a g e The data for the Vishay TFPT0603 family of SMD thermistors (see reproduced below, courtesy Vishay) provides a ratio or multiplier value. Obtain the number for each temperature (from the table, as above. Verify these are correct.) While this is a high tolerance PTC, there may still be a physical calibration required. Using these values will help us achieve the design of the system and later calibration will pick up and compensate for any error. Note the error table in the PDF, for later reference. From the tables
Temperature C Resistance
o

-40 353

-20 387

-10 405

0 423

+25 470 +/- 1%

Figure 5 Ratio and degrading graphs

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

21 | P a g e

Figure 6 Ratio chart Tables and graph reproduced with permission from Vishay Dale

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

22 | P a g e (Further Training information on these devices may be found at http://dkc1.digikey.com/au/EN/tod/VishayDale/CRCW-HP/CRCW-HP.html)

Refer back to the circuit, which your knowledge tells you is a Wheatstone Bridge; if all resistors are equal, there will be no potential difference between points D and B

Refer to http://en.wikipedia.org/wiki/Wheatstone_bridge or a textbook for the derivation of the formula below:

VG
Figure 7 Bridge sensor connection

Substituting each value of resistance from the table we created enables us to calculate the value

of VG and ultimately to calibrate the voltmeter scale to indicate temperature.


Temperature C Resistance Voltage VG
o

-40 354

-20 388

-10 405

0 423

+25 470 +/- 1%

Complete the table using Excel or another spreadsheet for your calculation. A sample is attached below:
o

Vs 25

Temp C 25 0 -10

Ratio 1 0.9 0.862 0.825 0.753

Rx 470 423 405.14 387.75 353.91

VG 2.1875 1.543825 1.277648 1.005747 0.437009

R1=R2=R3 330

-20 -40

According to its scale, the meter to the right reads from 10 to 16 volts. That means it swings over a range of 0 volts (pointer at the left) to 6 volts (pointer at the right). This is a good illustration of the card in the meter display representing something different to the actuating force. We could make a new card and slip in inside the cover, with the corresponding temperatures such as 25 oC Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

23 | P a g e just above the current 12, -10 oC just above the 11, and so on. This would not give much precision but the principle is illustrated. Or we could use a converter to make a digitised version of the analog signal (AD Converter) and drive a seven segment display panel containing whatever number of digits we require for precision. 2.2.3 The pressure transducer Pressure metrology requires transducing pressure into an electrical analog, varying around a nominal value (reference value, usually indicated by zero volts) (perhaps that could represent the zero pressure of a vacuum 0 PSI or 0 kPa but it may be anything, e.g. in a barometer, sea level pressure: 14.7 PSI or 101.325kPa). There are a number of ways to do this, including a diaphragm with strain gauges bonded to it acting as resistive elements as described above. Pressure transducers can be used to read changes in air pressure, gas pressure, and head of fluid in a container and so the analog signal can be calibrated for volume or weight. Often these are found in applications controlling the level of water in a vessel. The types of pressure gauges found in industry are based on a number of technologies
Piezoresistive Strain Gage: Uses the piezoresistive effect of bonded or formed strain gauges to detect strain due to applied pressure. Capacitive: Uses a diaphragm and pressure cavity to create a variable capacitor to detect strain due to applied pressure. Magnetic: Measures the displacement of a diaphragm by means of changes in inductance (reluctance), LVDT, Hall Effect, or by eddy current principal. Piezoelectric: Uses the piezoelectric effect in certain materials such as quartz to measure the strain upon the sensing mechanism due to pressure. Optical: Uses the physical change of an optical fiber to detect strain due applied pressure. Potentiometric: Uses the motion of a wiper along a resistive mechanism to detect the strain caused by applied pressure. Resonant: Uses the changes in resonant frequency in a sensing mechanism to measure stress, or changes in gas density, caused by applied pressure.

Historically, pressure transducers converted the pressure signal into mechanical energy and then some means had to be found to convert that to electrical energy. For example, expanding or shrinking bellows systems, the U Tube manometer and the Bourdon tube have been used for scientific and industrial measurement and developed into highly accurate analog instruments; but in the digital age there are other means to achieve the outcome, as above.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

24 | P a g e

Figure 8 U tube manometer

There are five types of references used for pressure sensing: 1. Absolute: reference is 0 pressure where there is no atmospheric weight (space) 2. Vacuum: something less than atmospheric pressure as a reference point, a man-made vacuum 3. Differential: the pressure drop across a system, i.e. one point becomes the reference, and the reading at the monitoring point is relative to that pressure 4. Gauge: the reference point is the atmospheric pressure at the point of measurement 5. Sealed: A reference pressure is sealed into the sensor unit at manufacture. Low cost pressure sensors such as the one below are now generally a silicon wafer whose conductivity is altered by pressure in the top port, compared with atmospheric pressure in a small breather port on the reverse side.
(Source: Photo by P.J. Newnham; diagram from Dunn W.C. Fundamentals of Industrial Instrumentation and Process Control)

Figure 9 Pressure transducer, basic

Notes:

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

25 | P a g e

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

26 | P a g e

2.2.4 Ultrasonic sensors Used across many industries and in numerous applications, ultrasonics (in medicine, ultrasound) utilise high frequency sound waves (i.e. above the limit of human hearing) generated by a signal source and converted to mechanical sound waves by a piezo crystal transducer (which is very similar to the device in a piezo tweeter in hi fi audio systems). Quartz crystals are capable of very rapid physical change when a voltage is applied across the crystal, one element of the Piezo Effect. (Another element of the PE is that if quickly distorted by a mechanical impact, the crystal produces a high voltage - a discovery attributed to the Curies during the C19th). Driven by a high frequency ac voltage, the crystal oscillates at its natural resonant frequency and its walls radiate sound energy - emit pressure waves - similar to the way a speaker cone moves the air, except very much faster. Depending on the application, frequencies anywhere between 21KHz and 4MHz are used. There are applications in the hearing range (around 3KHz) where pulses of sound (SONAR) are transmitted and the echo delay is measured, for range finding, usually in water. This is used in defence and survey applications. Modern medicine incorporates SONAR and ultrasound principles using piezo and other transmitting devices for human tissue analysis, etc.
Figure 10 Ultrasonic T-R (Source: edaboard.com)

Ultrasonic devices (transceivers when they both send and receive) are designed for a variety of industrial conditions and are robust units, compact, cost effective, and very reliable. In general, ultrasonic measurement relies on receiving an altered or delayed signal reflected from the system under measurement. Some means of interpreting the amount of alteration (or the error result) is part of the modular unit, as is a means to calibrate it to develop an accurate indication of the measurement being taken. An industrial ultrasonic transducer includes all of the system elements, but calibration can be external to the module. For distance measurement using a pulsed signal, the mathematics is to halve the time between the sent pulse and its echo - as it travels both to and back from the object at the same speed (caution: Doppler effect can come into play here if the object is moving to or away from the source) and to multiply the speed of sound in the medium by the time for the one-way trip. The speed of a sound wave depends on the medium in which it travels. Sound pressure waves travel by elastic vibrations of the particles forming the medium through which it is travelling, be it air, a fluid, a gas or a solid like wood or steel. In air, at 20oC, median pressure and relative humidity (moisture content) of 5% the velocity of sound is 343.2 metres per second (1,126 ft/s; 1235.5 KPH for Mach 1 at low altitude, rising as temperature decreases with altitude but falling with a reduction in air density). In ultrasonics, calculations need to compensate for the type of medium, the altitude, and other factors relevant to the specific measurement. Ultrasonics is often used in distance measurement, motion and speed detection in robotics, level of fluid in a tank, flow rate, weight, strain and pressure and there have been many other applications deployed across industry and in medicine. The isolation of the transducer from direct contact with the system under measurement (acids, fuels and so on) means added safety and longevity, and inherent immunity to electrostatic discharge energies. (Cautionary note: any components that are Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

27 | P a g e electrically connected to the transceiver, including a 4-20mA loop driver, may reduce this immunity if such circuits are not isolated from ESD). Generally, pressure or other reading losses (errors) due to an ultrasonic measuring system can be ignored or contribute a small fixed measuring error, whereas many other types of measurement impact on the system under measurement, and error tables need to be developed. In applications such as controlling the pump-out level in a vessel, of all the choices of transducer available, the right ultrasonic transducer will provide the most precise measurement and flexibility in calibration for the controller to adjust pump speeds and to control valves.

(Diagram Source: from Article supplied by Hawker Electronics Ltd - www.hawker-electronics.co.uk)

Figure 11 Ultrasonic sensing

Some ultrasonic transceivers in high precision work use multiple beams and digital signal processing in, or associated with, the transceiver. For these, DSP is essential to interpret the information from the beams and to produce a coherent result out of the device. Such transceivers are associated with flow rate meters and turbulence situations (including human body blood flow associated with the heart chambers and so on). From laboratory studies, calibration algorithms have been developed that are embedded in the DSP software. These are generally quite high-cost systems, but industrial flow rate meters using three beams and on-board signal processing are used in large plant situations and are cost-effective for the accuracy of their output signals. 2.2.5 Differential sensors We briefly alluded to a differential sensor when discussing pressure sensing. This type of sensor produces an output relative to another fixed reference point. This is very useful if we are attempting to control a system around a reference value within the system. Pressure in a gas storage vessel may be many times higher than the atmospheric pressure reference and controlling the peak and low pressurisation points is difficult when comparing to something so different. Establishing a reference point at maximum pressure would be much more useful and would provide a safety alarm trigger point.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

Figure 12 Differential pressure sensor

28 | P a g e

(Source: Sensiron http://www.sensirion.com/en/04_differential_pressure_sensors/00_differential_pressure_sensors.htm)

2.2.6 Position sensing There are a number of sensors designed to sense the position of a tool, a conveyor, machine tilt, sensing the complex articulation and positioning of a robotic arm, or any number of other precise movements. Sometimes, when motion of the entire machine is not able to be tied to the ground, the reference point for the basis of measurement comes from a stabilised plane employing a gyroscope. The simplest way, when travel or rotation/angular position is finite, is to use a potentiometer. Potentiometers are resistive dividers operating either by linear position or by rotary or angular position. A circuit potentiometer as shown in this image may be the volume control in an audio amplifier, but industrial position sensors are designed for the ambient conditions, robustness and precision required, and are much more structurally solid. Industrial units can be geared to sense quite extensive travel; rotary types can range from sensing just a few degrees of travel (good for tilt) or rotate many turns, e.g.200 (good for conveyors) and provide a high accuracy at every point during travel. The images to the right Figure 13 Position sensing, linear and (Courtesy Unimeasure http://www.unimeasure.com/) show a miniature string angular resistance potentiometer (linear position) and a rotary sensor that could be coupled to a types drive shaft. Below is a Honeywell linear potentiometer and its mounting information. For more information on other Honeywell types of linear potentiometers see

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

29 | P a g e http://www.potentiometers.com/select_honeywell.cfm

2.2.7 Differential sensing There are numerous applications where differential sensors are needed. One very important use is when measuring a change in position of a component relative to a fixed point which may sit in a moving system such as an aircraft wing flap system, a precision NC milling machine3, an earthmoving or mining machine control component, a vane in a wind turbine, etc. Linear Variable Differential Transformers or LVDTs are very accurate analog devices for sensing mechanical change into or away from a reference point. The system inside a basic LVDT uses three coils fed by an input ac signal (A), with a moving core which alters the coupling and hence the output signal (B) relative to the input. It is a transformer where the core is adjustable.
(Image below sourced from Wikipedia, at right from RDP Group)

Figure 14 LVDT

Apart from a myriad applications in sensing linear motion and distance, these devices have been adapted to many types of sensing including pressure, flow, wind speed, rotary motion and so on. They have the advantage of isolation from the system under measurement and so are widely used in industry. Digital signal conversion is now built into many units. For additional explanation, see http://en.wikipedia.org/wiki/Linear_variable_differential_trans former http://www.rdpe.com/displacement/lvdt/lvdt-principles.htm, and for images and more information and data sheets, see http://www.rdpe.com/ex/d5-d6.htm Other types of position sensors involve hybrid analog and digital incorporating devices incorporating a combination of technologies such as ultrasonic, optical, LVDT, Hall Effect, and digital. (See http://www.positek.com/rotary.htm?gclid=CJrN2LuQoa4CFQFLpgodR0dJ4A for examples of digital sensors and for use in a variety of applications). Other useful information for sensors may be sourced from http://www.sensortechnics.com/ Notes:
3

NC=Numerical Control, such as a programmed machine for complex machining operations involving multiple shaping operations and tooling changes all done by programming

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

30 | P a g e

2.3 Controlling position


In practice, the majority of motion control is achieved by controlling energy either stored or available through a reticulated power source. For example, a system may energise/pressurise fluid, gaseous or mechanical energy which is then used in a mechanically enabled circuit, controlled using a controller of some type. A car is such an example, where the engine is managed by a controller circuit with human input to adjust how the energy of the engine is deployed to the wheels. We have also discussed how minute motion can be created using the properties of quartz crystals, and this finds use in microcontrol applications. But there is also a requirement in many specialised situations for converting an electrical signal directly into motion, which requires some form of actuator and many of these operate on electromagnetism. A relay is just such an example, as is the electric motor. 2.3.1 Stepper motors T he digital age has given us a relatively new type of motor called the stepper motor, and this is the device that gives the laser printer its precise printing capability and the hard disk drive the speed and accuracy it features, just two of millions of examples. It, or its hybrid derivatives, is also used in heavy industry, as it has the beauty of scalability with significant torque at its output shaft. The stepper motor is driven by TTL signals (+/-12v) sent to two sets of coils (sometimes printed on a circuit board, more often wound on cores or poles, positioned as two phase sets around the armature. The armature (the rotating part) contains a plate to hold evenly-spaced permanent magnets. The direction of rotation depends on the timing of signals into the two phases. The armature can operate in two modes: freewheeling, akin to a regular motor, or stepping through precise angles. A third mode is locked, i.e. stationary. The difference between a stepper that is locked and an ordinary motor that is stationary is that the shaft will not turn. (Images from Anaheim Automation) Stepper motors can be controlled to go forwards and backwards, either freewheeling or stepping. They have low mass armatures Figure 15 Selection of stepper motors and can change motion very quickly, and this will not cause them to have shorter lives, as would be the case with many conventional electric motors. There are dedicated chip controllers available for motor control. For more theory, go to http://www.zaber.com/wiki/Tutorials/Microstepping A control circuit for a milling machine stepper motor and other details of the project can be found at Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

31 | P a g e http://www.instructables.com/id/Easy-to-build-CNC-Mill-Stepper-Motor-and-Driver-ci/ More details on motor drive circuits can be found at many supplier sites including: www.phytron.eu/1-step-drive More details on motor specifications can be found at many supplier sites including: www.anaheimautomation.com 2.3.2 Linear motors Many types of solenoid-based linear motor are available. Some types are referred to as voice-coil motors. In fact a speaker voice coil is a motor and it uses electromagnetism (or a piezzo crystal surface) to convert an analog electrical signal into mechanical energy to pressurise air and create sound energy. The best ones are less than 10% efficient and that is why - there are two

Figure 16 Linear actuators

conversions taking place. Linear actuators for industrial use are generally on or off devices, i.e. when energised, they travel their full range. They are then able to be mechanically coupled in a variety of ways (including spring system) to a mechanical action such as locking a shaft, opening or closing a valve or switch, or changing a conveyor belt or rail track to an alternative configuration. The above images are from Transmotec and other good information can be found at TecHome.

Additional notes

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

32 | P a g e

2.4 Measurement techniques


Metrology, or measurement in science and technology, universally adheres to the Systme international (SI) protocols initially established in 19th century Paris and reviewed in 1960 to make it a metre-kilogram-second based system. Imperial or alternative measures such as miles, gallons and degrees Fahrenheit are used widely in many countries but the SI convention is the convention of science and mathematics, and applies across industry very widely at the technical levels. The SI is a metric system setting out seven base units of measure. In practice, though, it uses the metric measures of litres, meters, kilograms and kelvin (using Celsius increments; it is common practice in the technical world to use Celsius measurement. Zero kelvin is -273oC); Metric multipliers (prefixes) are assigned as follows: (Source: Nist)

Factor Name 1024 yotta 1021 zetta 1018 exa 1015 peta 1012 tera 109 giga 6 10 mega 3 10 kilo 2 10 hecto 1 10 deka

Symbol Y Z E P T G M k h da

Factor Name 10-1 deci -2 10 centi -3 10 milli -6 10 micro -9 10 nano -12 10 pico -15 10 femto -18 10 atto -21 10 zepto -24 10 yocto

Symbol d c m n p f a z y

All technical personnel are involved at some point, especially during design, in the measurement of data in an experimental sense. The real world has a habit of giving us unknown effects of our work and it is our responsibility to produce a system that works as it should and minimises any impacts on other systems or, indeed, others. So taking readings under a variety of experimental scenarios is part of the business. Recording these readings accurately, the conditions under which they were gathered, and how they were gathered, is key to making any sense of them. Please take the time to document all details and readings in a tabular form , with all other factors such as time of day, ambient conditions, types of instrument, and if elevation above the sea is known, also record it along with the barometric pressure present at the time. Imagine for now that our project has advanced to the point where we have already selected the sensors and the controller system. To ensure the system operates accurately it has to be calibrated and tuned. Two concepts, two purposes, each as important as the other. The principles are common to every system. 2.4.1 Calibration is setting up each of the sensors to produce outputs corresponding to their inputs, as an electrical signal (analog or digital) so that the output truly corresponds to the input. For example, if a volume is at maximum, the signal is maximum. If the volume is halved, then the Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

33 | P a g e signal is halved. And so on. Sometimes these have to be carefully adjusted because vessels are not uniform in shape. In maths terms, the calibration equation has to be a non-linear function if there are variations that are not linear. In this section we will often refer to the quantity being measured as the measurand. Calibration may also describe the process whereby we substitute a scale of one value for a scale of another. Our earlier Wheatstone Bridge problem enabled us to calibrate a scale to indicate temperature when it was really reading voltage. Calibration involves two stages, one the equivalent scale substitution and the other correcting any errors to meet required tolerance. Its also worthwhile at this juncture to discuss accuracy and precision. Accuracy is the property of tolerance of an indicated result against a reference. If there is a difference, it can be expressed as an error or tolerance. Tolerance is that error that can be accepted. Accuracy also implies repeatability, or the ability to obtain the same result under the same conditions many times. Precision is the property of being able to say how finely a variation can be measured. The degree to which a value is stated is an indicator of preciseness. My name is John is an imprecise description if there are many Johns. My name is John Henry is more precise unless there are many John Henrys. My name is John George William Henry is a factor of 24 times more precise than the first example, and thus separates the available information from more general data. The number 1 is precise if it counts exactly 1. The temperature 1 oC is not as precise at the temperature 1.000oC. Can we have precision without accuracy? Of course we can. The above-named might in fact be using an alias. 2.4.2 Tuning Tuning is the calibration of the total control circuit, rather than the sensing system. Once the inputs are within tolerance, the controller has to perform its tasks to a tolerance to control energy, move fluids, gases, mass, machines or any combination of the above to meet the clients objective, accurately. One method of tuning is set point tuning. This is adjusting the system to react to signals that are provided when sensors or switches react at a specific fixed level. During the control sequence, there will be measurements taken that provide the controller with feedback on the process, ensure safety tolerances are not breached, provide quality reports, etc, to enable the process to run at its optimum productive rate. There may be a number of feedback loops, and loops within loops. The designer sets the tolerances and the technical team take readings and adjust to ensure the system works as intended. Many control systems are based on analog signal processing and have adopted digital remedies to the tuning process, making the task somewhat easier (modern car ECUs (electronic control unit)are a good example). But it is an appreciation of the analog systems such as the PID controller (proportional integral differential) that helps us understand that tuning is sequence dependent, and there are right methods and wrong methods. Read this article for an appreciation and explanation of what is involved: http://www.ecircuitcenter.com/circuits/pid1/pid1.htm Draft version 2.1 23 April 2012 Engineering Control Copyright Outsource Services

34 | P a g e 2.4.3 Correcting for non-linearity Lets look at a linear situation and a non-linear one. Tank A: Symmetrical cylinder Volume max (Vm) = area of base (A) x height (h) Volume x (at any height x) = A x If we drew a graph of volume against height (for any value of x), it would be a straight line or linear function. A=r2 Tank B: assymetrical shape Volume max (Vm) = V1 +V2 + V3 where V1 is the volume of the top cylinder, V2 the volume of the conic shape, and V3 the volume of the bottom cylinder. Volume x (at any height x) needs to be calculated for each value of x. If we drew a graph of volume against height (for any value of x), it would not be a straight line i.e a nonlinear function.

h x x

In either case, height of the fluid head is reasonably easy to measure, but if volumetric information is required the options become: 1. Use height measurement and correction in the control logic by calibration; or 2. Use a different sensing arrangement, such as weight of the fluid corrected for the static weight of the vessel. Note that either is possible, the correction algorithms are available, but your maths will need to be accurate, and you will need to test your theoretical model when you put it into practice, by taking readings at known volumes across the range. So build a table based on the theory, and take readings to compare them with the theoretical calculations, as follows below. Errors should be brought to within tolerance set by the designers of the system in keeping with the clients requirement. Errors outside 10% would be in most circumstances not acceptable, although if the errors at critical points are within tolerance, intermediate errors may not be important. Critical points may be 25%, 50%, 75% and 100%. If this is so, measure at these points only.
Volume added Calculated height of fluid head Measured height Error %
(0%) (10%) (20%) (30%) (40%) (50%) (60%) (70%) (80%) (90%) (100%) (110%)

0mm

150mm

300mm

500mm

600mm

700mm

800mm

900mm

950mm

1000m m

1050m m

1100m m

0 0%

143 5%

285 5%

470 6%

559 7%

628 11%

740 8%

850 6%

933 2%

978 2%

1046 0%

1110 0%

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

35 | P a g e

2.4.4 Other calibration factors It should be noted that Australian Standards apply to industrial measurement and control, controlled by the NMI (the National Measurement Institute) and Standards Australia. Laboratory accreditation is overseen by NATA (the National Association of Testing Authorities) and reference instruments need to be properly tested and calibrated by a NATA certified organisation. SIMTARS is one such organisation in Queensland. For information about NMI, NATA and measurement in Australia, go to http://www.measurement.gov.au/Pages/default.aspx The following is a useful extract from Handbook of Multiphase Flow Metering, 2005, Norwegian Society for Oil and Gas Measurement. It may be of use to people who will be encountering measurement situations where there are multiphase components (in this case oil+gas+water) which will create complex measurement situations. This work is well detailed and this is the second review of the original document. It is based on well and rig experience knowledge from around the world. A PDF copy of the full document can be freely downloaded from http://www.nfogm.no/docup/dokumentfiler/MPFM_Handbook_Revision2_2005_%28ISBN-8291341-89-3%29.pdf
Accuracy of measurement Closeness of the agreement between the result of a measurement and the value of the measurand (ISO-VIM, 2003). NOTE 1: The value of the measurand may refer to an accepted reference value. NOTE 2: Accuracy is a qualitative concept, and it should not be used quantitatively. The expression of this concept by numbers should be associated with (standard) uncertainty. Corrected results Error of measurement Result of a measurement after correction for systematic error (ISO-VIM, 2003). Error of measurement is the result of a measurement minus the value of the measurand (ISO-VIM, 2003). In general, the error is unknown because the value of the measurand is unknown. Therefore, the uncertainty of the measurement results should be evaluated and used in specification and documentation of test results. Influence quantity Limiting conditions Quantity that is not the measurand, but that affects the result of the measurement (ISO-VIM, 2003). Extreme conditions that a measuring instrument is required to withstand without damage, and without degradation of specified metrological characteristics when is subsequently operated under its rated operating conditions (ISO-VIM, 2003). Particular quantities subject to measurement (ISO-VIM, 2003). Set of values of measurands for which the error of a measuring instrument is intended to lie within specified limits (ISO-VIM, 2003). The result of a measurement minus the mean that would result from an infinite number of measurements of the same measurand carried out under repeatable conditions. NOTE: Because only a finite number of measurements can be made, it is possible to determine only an estimate of the random error. Since it generally arises from stochastic variations of influence quantities, the effect of such variations is referred to as random effects in the ISO-Guide (1995). Rated operating conditions Conditions of use for which specified metrological characteristics of a measuring instrument are intended to lie within given limits (ISO-VIM, 2003).

Measurand Measuring range Random error

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

36 | P a g e

2.4.5 Common sources of error in measurement In the art of measuring, experience is the great teacher. When you use a ruler, your experience tells you that you will make errors if your eye is not directly over the scale and vertical to the plane of the object being measured. This is parallax error and experience has taught us to be prepared for the false information it could convey. There are many potential errors in calibrating the physical world, and being aware that this is so is most of the battle. Your awareness of science and math principles is the other part. Common errors in measuring current and voltage In electrical theory, we use Ohms Law at 0Hz, or DC, and can be confident in calculating the voltage across a resistor of known quantity when a current flows through the resistor. There are several potential sources of error: one is the tolerance of the resistor; another is its behaviour if it changes temperature; another is the accuracy of the instrument used to measure the current flow (more follows on this topic later in this section). When manufactured, components have tolerances roughly proportional to their cost. There are precision components and there are non-precision components. For resistors, metallic film (tin oxide for example) deposited as a vapour onto a highly stable physical substrate (usually ceramic) makes the most accurate device, and the most stable under most operating conditions. Below that, there are carbon resistors, and there are wire-wound resistors. Wire wound is an expensive type usually used for high power, but despite the cost, the operating tolerances are not high. Carbon resistors are inexpensive, and can be medium or low tolerance. The colour code on the resistor indicates its value and its tolerance. Metal film types have the value written on them. Surface mount resistors are generally metal film or metal oxide. Their value can be found with a strong magnifying aid. Some manufacturers make special resistors that are extremely accurate for the purpose they are made, for example, in precision guidance mechanisms. These are Mil Spec devices (Military Specification) and often cant be purchased individually.
Figure 18 SMD resistors (surface mount devices)

Figure 17 Carbon resistor colour coding

(For details on carbon resistor colour codes and what they mean, the picture at right contains the basics (Source: Wikipedia) but the link http://www.hirophysics.com/Labsheet/resis-codes/resis-codes.html contains all the fine detail and mnemonics to remember the codes. For all resistor types, see http://en.wikipedia.org/wiki/Resistor) Resistors have frequency tolerances too. When we talk about Ohms Law, we know it is accurate for DC and possibly low frequency AC. That dependence is more about the frequency-sensitive nature Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

37 | P a g e of circuits, than the law itself. Resistors, especially wire-wound, begin to look more like reactive components as frequency rises, because they have inductive properties and generate a magnetic field. This causes the current to lag the voltage, as the current is doing work to build that field. For a time, the device stores energy, so as the voltage is applied, the current lags behind. As well as for high frequency sinewaves of voltage, this applies when a rapid impulse (a step, transient or spike) is applied. Recall that all non-sinewave signals are made up of sinewaves of a number of amplitudes, frequencies and harmonic relationships. A spike is made up of extremely high frequency sinewaves.

Figure 19 Time domain and frequency domain representations


(Source: Wikipedia)

This picture on the left shows a sine wave in red and a cosine wave in blue. Note that a cosine wave is the same shape but lagging by /2 radians or 90o. This is what would happen in a perfect inductor with no resistive losses. The applied voltage the red sine wave would lead the (blue) current by 90o. So there is potential for the measurement of current in a resistor under AC conditions to be inaccurate due to time delay. It will never be 90 o behind in a resistor, but it may be producing an error, of significance. If a circuit/device being measured is capacitive, the current leads the voltage. Again, capacitors store charge. As the charge builds, the voltage rises, but follows the current by a phase delay that can result in errors. The picture on the above right shows a triangular waveform, and beneath it, its frequency spectrum. The fundamental frequency is indicated at the left, and its harmonics and their relative amplitudes are to the right. If we drew each of these, the fundamental and each harmonic, on a page as a sine wave, and added up the instantaneous amplitudes, they would create the triangular waveshape. One representation (the wave) is in the time domain, the other (the spectrum) is in the frequency domain. If you go on to study electronics engineering, this interchange will be commonplace, and you can apply transformational maths to waves and circuits to determine what will happen to the wave in the circuit. It is also the fundamental technology of your iPod: this is where the technology of digital sampling and digital recording has its roots. The Fast Fourier Transform is the technique used in the analog to digital processor. It is also used in instrumentation and process control. 2.4.6 Instrument errors The most accurate instruments available are those that have been calibrated against standards, at a NATA laboratory. Field instruments are mostly uncalibrated to a standard since leaving the Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

38 | P a g e factory where they were assembled. Even at the factory, they are calibrated against secondary standards and only to the rated tolerance. Good quality modern digital voltmeters (DVMs) are very good instruments and may be highly accurate as they arrive on your desk or workbench. In precision work, a high quality suite of measuring standards or instruments calibrated against such standards will be required. All instrumentation workshops need these standards to be able to certify the standard of the instrument. Each instrument thus calibrated will be accompanied by its calibration information. 2.4.7 Using the measuring instrument Instruments have a set of parameters that should be understood. Think of every instrument as a black box, with an input circuit and if applicable an output circuit (some transducers are calibrated measuring devices and they do have outputs). It has a frequency response (its range of frequencies in which it operates uniformly, and limitations outside that range where it can still be used if the error is understood) and it may consume energy from the system it is measuring.
Measuring instrument

Circuit under measurement

The output of stage 1 and the input of stage 2 have resistive (and most likely reactive) equivalent values. We can draw an output as a generator and its resistance, and the input as a resistor4. The circuit becomes:

Stage 1

Stage 2
Stage 2

We need to ensure that Rin (m), the resistance of the measuring device, does not impact on the circuit being measured. Therefore Rin (m) has to be of an order of at least 10, preferably 100 times the value of Rin (2). Using MOS measurement input circuits is the best way to avoid error due to input loading. MOSFET devices have a very high input impedance of about 1012 which is usually sufficiently high as to remove this error. This setup above is for voltage sampling. For current sampling the circuit is as below:

This holds good for low frequencies, but if frequency is high another method is required.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

39 | P a g e
Measuring instrument

Circuit under measurement

Stage 1

Stage 2
Stage 2

The equivalent circuit for a current generator and load is shown here. This time, we want Rin (m) to be in the order of 10 to 100 times lower than Rin (2), so as not to increase the input impedance of stage 2 to the generator of stage 1, and provide an error of significance.

These general principles apply to all test and measurement procedures and have equivalence in terms of frequency, phase, energy and power, in fact every quantity that can be measured. If you are sampling something, consider the losses introduced by the sample taken, and consider the inpacts at other temperatures, pressures and environmental conditions that apply to the system being measured. Remember such things as the speed of sound in air at the ground is different in a fluid, a gas, at altitude, in a metal, and accommodate these parameters in the situation in which you are measuring. 2.4.8 Universal measuring devices There are a wide range of specialised calibration tools available to the technical staff in a measurement laboratory or workshop, off-the-shelf units that meet the highest standards. There are also a range of universal devices that can be placed into the field or control room to provide information on the many parameters we want to measure. That is, these can be easily configured to read a number of parameters, and calibrated for accuracy. We will use one such unit in this course, and we will acquaint ourselves with the setting up of the device.

Additional notes:

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

40 | P a g e

For emphasis on its importance, we need to summarise a few points about measurement, accuracy and precision: Measuring instruments are able to alter the quantity being read and therefore distort the results. Knowing the interplay between the instrument and the circuit helps us to minimise the error result by either accounting for the error, or choosing an instrument that does not contribute any significant distortion of the result. Accuracy is a measure of error from the true result. 100% accurate means there is no error, whereas 95% accuracy indicates that the result may be within five percentage points over or under the true reading. Accuracy error is a compounding factor across a system. Precision is the degree to which a quantity can be stated. The number of significant figures of a reading indicates preciseness. Taking a reading and expressing it in very precise terms indicates that the measuring technique justifies the result, so accuracy and measurement error are implicated in quoting a quantity very precisely. If I quote a voltage as e.g. 3 volts, that is a nominal quantity, and it may be a fraction under or over that value in the circuit (2.6 to 3.4 volts). If I quote it as 3.0 volts, we understand that it is within 2.96 volts and 3.04 volts. If I quote 3.00 volts, it will be between 2.996 and 3.004 volts. Use the rounding method for calculations and you will understand the range limits. It is not valid to quote high precision readings without taking into account the possible errors of obtaining the reading, including the accuracy and precision of the instruments used. Knowledge Quiz 3 review of sensors and measurement 3.1. What is the SI system of units and why is it important?

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

41 | P a g e

3.2. What does tolerance tell us about a nominal component value?

3.3. What do we mean by calibration?

3.4. What do we mean by correcting for non-linearity in tuning a system?

3.5. What is an actuator? Describe one such device and show its means of operation.

3.6. What key measurement techniques will you use when capturing data during design and commissioning?

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

42 | P a g e

3. Controlling a Process
In this section we will examine the principles that underpin a control system and the programming of the system to perform the control tasks, respond to feedback signals, and make adjustments to keep the process on-track and within safe limits. Our approach is to launch you straight into a practical situation and undertake both assembly tasks and programming tasks.

The following experiment is designed to take you through a number of approaches to solving a control problem, using (1) fixed reference points and (2) measurement and control techniques. One set-up will enable two different solutions to be achieved, yielding the same result, but showing how measurement and control systems can provide additional flexibility. The task is to transfer fluid (water in this case) from a holding tank into a second tank, and then for the second tank to top up the first tank. The system can run indefinitely, and can be adapted to bulk handling situations. During the experiment you will use relays, float switches, solenoid valves, an ultrasonic transceiver, a programmable controller and a 4-20mA current loop. The system is scalable to any capacity, and the principles will be applicable to industrial situations. This experiment will use low voltage DC devices which may also be converted to high current AC devices in a scaled-up version. THEREFORE WE WILL EMPHASISE SAFETY throughout the experiment, noting that safety also applies to charged systems where pressure may be present at dangerous levels. Safe shutdown and device lock-out procedures will be discussed. The experiment will run over several sections of the course and assist to combine many parts into a meaningful and practical course. 3.1 Relay and Float switch control

At this stage, the programmable logic controller (PLC) will not be connected. However, the ultrasonic transceiver and 4-20mA loop will be used in the initial stage to enable calibration of the system for the second stage using the PLC. Complete the assembly of the system, fill Tank A and operate the start process. Observe and make note of the cycle of events and record on the page following the schematic.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

Figure 20 Tank control system during basic setup

43 | P a g e Basic circuit, relay control version: Note: This circuit is drawn at no water level in either tank. 240VAC
L
240V AC to 24V DC PSU

N E
COM

N E
DC COMMON
/ / /

+24

R1/2

Pump Motor

TOP TANK HIGH LEVEL SWITCH NC R1/1 R1 DPDT TOP TANK LOW LEVEL SWITCH NC BOTTOM TANK LOW LEVEL SWITCH NO

Description of control circuit operation: The tank system is initially charged with sufficient water to enable the float switches to be operated in both open and closed modes. The pump is a submersible type fitted in the lower of the two tanks pumpint to the top tank via a top filling hose with anti-syphon air gap. On powering up the system, the water levels may be at any level, so the pump will either operate or remain off until the float switch conditions require it to be activated. Lets assume that the top tank has drained to the point where both of its float switches are in their released state. These two switches will be wired into circuit as normally closed (NC) for this state. At this time, the lower tank switch must be in its operated state. This switch needs to be wired so that it is normally open when the tank is empty, and closed when the fluid is above its float arm. The three float switches now complete the current path to activate relay R1. One of R1s contact sets (R1/1) latches the relay on regardlesss of the lower float switch in the upper tank. The other Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

44 | P a g e contact (R1/2) connects the pump motor to 24V DC, so the transfer of fluid commences from the lower to the upper tank. Pumping continues until one of two events occurs. Either the lower tank runs out of water (the lower float switch opens) or the upper tank reaches capacity (the upper float switch in the top tank operates, opening the circuit. This is a simple and quite fail-safe system, and has probably enough sophistication for the purpose of a simple water top-up system. Where it will not cut the ice is when the fluids involved are perhaps more precious or dangerous, or wheer the quantities being handled are many times larger and other factors come into play. But we can use this simple test bed to engineer much more sophistication into the task, starting with the ultrasonic sensing system and adding a PLC controller which is capable of numerous inputs and much more sophisticated output control. Here are some images of this current set up and the instruments we will be discussing:

Figure 21Gauger Ultrasonic transducer Figure 22 Control and power board (IDEC PLC to be fitted)

Figure 25 Top tank with float switches installed and Microscan ultrasonic height measurement transducer

Figure 23 Bottom tank with float switch C and pump (internal) Figure 24 IDEC Microscan PLC example

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

45 | P a g e

Knowledge Quiz 4 : Observations from practical exercise

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

46 | P a g e

3.2 Fundamentals of logic in control circuits The relay circuit you have constructed contains simple logic, where events are triggered by switches under pre-arranged conditions. Logic is described in terms of if, then, else in human language, broken down more into simpler steps for digital circuits, which are two-state circuits, one being on and the other being off. The logic terms for digital circuits are those that can be constructed using on-off conditions. To develop a circuit to achieve a desired outcome we use Boolean expressions, a type of algebra for logic. We can also make pictures of logical conditions called Venn diagrams. Both of these tools, and another mapping tool (Karnaugh Maps), help to simplify logic and circuits. DeMorgans laws also assist us to transform logic from one combination of logic to another that will provide the same or equivalent results. Most initial Boolean expressions can be simplified to the smallest number of conditions to make all the functions happen. A Boolean expression uses a special algebra that indicates AND and OR, their inverse conditions NAND and NOR, and NOT which simply inverts the signal logic. An AND condition shows two or more variables A and B joined by a dot. So A AND B is written A.B An OR condition shows two or more variables joined by + so A OR B is written A+B Lets look at the circuit and try to write the conditions that are required to cause the pump to activate. Well call the pump P and the float switches from top to bottom A, B and C. The pump activates when both A and B are released and the switch inside each is closed. C must be still in float mode, when its internal switch is closed. What we need is for A and B to release while C is still operated. This is an AND condition, NOT A AND NOT B AND C. This is written

P A.B.C
While this condition remains true the pump runs. However, soon after the pump starts B will operate, so the pump would stop. It has to keep running regardless of B. This is where the latch R1/1 comes in. The expression becomes NOT A AND (NOT B OR R1/1) AND C

P A.( B R1 / 1).C
We want the pump to run until until A operates or C opens, while A OR NOT C (when it is C , this is the Tank B empty condition, and we dont want the pump active under that condition). Check the above to see if this is going to hold true. This represents the two conditions and so the system will behave as intended. We could begin to add sophistication with a solenoid valve to replace the manual tap which we can call S. Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

47 | P a g e

S shuts off (becomes S ) when the pump operates and will not be reactivated until P becomes false. Write the new equation to include S as an output condition.

So we are building expressions that can be translated into electronic logic using gates rather than relays and switches. Relays are basic on/off elements and were used as the basis for these logic gates until the semiconductor arrived. There are still devices available for modern logic solutions that came directly from the relay days, such as the family of flip flop devices. From these came registers, shift registers, arithmetic logic units and finally CPU devices - all still current, all involved in everyday computing and control, but using newer technologies in the underpinning electronics. These gates are the underpinning logical devices (universal gate logic) for the highly advanced programmable controllers in the field today and tomorrow, although the MOS technology on those devices is ever developing and ever more complex, capable and flexible. Another difference is that programming languages and standards are evolving and you will not need too often to get near the basic gate logic. But, you may need to build a small logic interface to crack a nut, and this information could be your get out of jail card. If you have some experience at this level you will know what to do with a TTL device you get over the counter. These days the TTL (transistor-transistor logic) devices are packed as quad gates and if you buy a NAND or NOR pack, you can use some clever tactics to do just about Figure 26 Logic circuit anything. NAND logic can build any of the logical gates you will ever need. families (TTL) And you can buy TTL or CMOS quad gates, all of which are interconnectable - virtually infinitely - to build any type of logic. (Picture: Wikipedia) Additional notes:

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

48 | P a g e

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

49 | P a g e Basic logic gate drawing symbols and truth tables (which simply table the outputs according to the inputs): Gate AND
A B

OR
A B

A 0 0 1 1 A 0 0 1 1

INVERTER (NOT GATE)


A

Truth Table Input Output B A AND B 0 0 1 0 0 0 1 1 B A OR B 0 0 1 1 0 1 1 1 A NOT A 0 1 1 0 B 0 1 0 1 B 0 1 0 1 B 0 1 0 1 A NAND B 1 1 1 0 A NOR B 1 0 0 0 A XOR B 0 1 1 0

NAND
A B

NOR
A B

XOR (ECLUSIVE OR)


A B

A 0 0 1 1 A 0 0 1 1 A 0 0 1 1

Now lets go back to the basic tank transfer controller and build that solution using gates. We may as well use the 74xx series of TTL devices, since this is a small circuit with no consideration required for infinite expansion, where CMOS would be the better choice. And speed of circuit operation and voltage switching parameters are of no significance. Well be happy with TTL characteristics and 0 5 volts representing off and on states. In practice you would develop the circuit to use NAND gates and use a couple of the ubiquitous 7400 quad NAND gate, for simplicity of build, whether you used a breadboard or developed a printed circuit for a more permanent circuit. Our inputs are A, B, C and R1/1. Our output is P, but we could also use R1/2 because that in fact is the same logical condition. When R operates, so does the pump. This is a subtle point but well revisit this shortly when we look at ladder logic. Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

50 | P a g e In the circuit you built, you were switching 24v; TTL requires 5v, so we will use a 5:1 resistor divider on each input. On the output P, well switch a TTL- compatible relay. The relay will enable a 24volt pump or a 240v pump to be switched on and off, and isolate that voltage from the TTL circuit. There are semiconductor relays available, but TTL coil relays are very reliable and safe, so lets remain in the cheap, reliable, robust corner for now.

Figure 27 Simple TTL version of relay controller

The circuit above is simple, but its drawback is that we may have an issue with the sequence of events that happen during the sequence, e.g. as the B float switch reactivates. This logic is real time and, in control situations, there are events that change with time, hence requirements to differentiate between switching operations. This is called sequencing. We overcome this type of issue with devices which trigger only when a clocking signal allows them to. That signal can be a real clock pulsing away (electrical pulses) on prearranged beats, or just another event in a sequence. These devices are found in the flip-flop family and are included in TTL and CMOS logic families, but are the core of microprocessors and microcontrollers. Thats where we are heading now.

3.3 Microcontrollers: principles and programming Microcontrollers are fundamentally dedicated microprocessors, designed to control a more limited range of specialised outputs than a microcomputer or computer assembly. At its heart is a CPU unit that works very much the same way as a computer processor, but with specialised instruction set Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

51 | P a g e and capabilities that enable it to be more efficient for its purpose than more universal microprocessors. They are very similar to earlier generations of computer CPUs. The microcontroller family includes the PLC, or programmable logic controller. As a block diagram, most of these units contain the following central components:
Figure 28 Microcontroller Block Diagram

Input and output information, functional control signals Input signal interface

CPU Control signal interface

ALU (Arithmetic Logic Unit)

Plant /machine interface

MEMORY Human /supervisory interface Programme Instruction set Data Processing memory

Output signal interface

Power supply

The diagram above shows the four main functional sections of the microcontroller. Everything in this discussion relates to the generic families of microcontroller and microprocessor-based PLC, although there are OEM differences in how the functions are achieved across the range. 1. The core CPU component has three main sub-parts and an interconnecting bus way, data highway or bus for short. The construction of the bus tells us how many bits of data can be transferred back and forth every time the clock signal triggers a read or write. So speed is dependent on the bus and the clock speed. At the PLC level, high performance is not a big issue in most monitoring and control systems on the ground, giving way to reliability as a performance measure. There are situations where high speed is important and the designer will choose a PLC or controller according to that requirement. Draft version 2.1 23 April 2012 Engineering Control Copyright Outsource Services

52 | P a g e There are multiple buses in modern controllers, at least one for data and one for control signals within the CPU and one for interconnecting peripheral devices. The double headed arrows represent these buses. The ALU is the part of the chip that is capable of responding to instructions and doing the calculations, in accordance with a programme. Associated with the CPU is a storage element (a non-volatile memory device) that holds the initial instructions for starting the system and directing the controller to the location of the next instruction, usually in a type of memory that is capable of holding large sets of data and instructions semi permanently. These memory devices may be external to the CPU, although CPUs are capable of holding a series of data and instructions in buffer memory space. Data and instructions are rapidly switched in and out from main storage by the processor. 2. We have to interface the device with the real world whereby information is fed in, in the form recognised by the device, analysed and an action determined by the program is then carried out. The circuitry to do these tasks is called the I/O. 3. In carrying the action out, the signals have to be converted back to real-world actions, involving energy control, perhaps electrical, mechanical, hydraulic, magnetic or any form of energy control requirement that exists. Many PLCs have multiple electrical external control functions built into the unit and these can control other devices to do heavier work or work of a different kind. PLCs feature output switches in various types for a range of AC and DC control applications. 4. There has to be a way for the human to interface with the controller to set it up correctly, to monitor and calibrate, tune and adjust. The task of the technical team is to understand the problem, apply scientific and engineering principles to build the external systems, choose the controller, and set it up to do the work. All of what we have covered to this point is to do the peripheral work. Now we have to learn about the controller and how to make it work. We have to have an appreciation of the communications protocols used to talk to the controller and between controllers, and other industrial devices used in the field. Fortunately, the different systems of the last two to three decades now have more in common and the tasks can be guided by better practice, better interconnectivity, and better devices across the range. When you use a Windows or Mac personal computer, you connect to the device using a keyboard, watch what happens on a monitor and listen to audible information using speakers or headphones. Your instructions are in everyday language or something you have learned to do in almost every day language. This is because the applications you use and the CPU have been designed to work together using protocols and standards. The standards apply at layers of software, firmware and machine code. A modern high quality inkjet printer is really a dedicated controller with firmware that registers the signals at its communications interface, and drives an output system of stepper motors and quartz crystal injection jets to produce the correct result. Buried in the firmware is

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

53 | P a g e error correction to compensate for the difference between the colours viewed on the screen and the colours to be used on the type of paper to give us a perfect result. Inside the workings of a desktop PC and under the top layer of human communications with the device is a second layer of task control and interpretation, and there are several layers below that until at the chip level everything is happening in bits and bytes made up of binary data in 0s or 1s. In engineering, languages such as FORTRAN and COBOL have been developed to make the life of the engineer easier than thinking and developing at machine level. Other languages, PASCAL, ADA, Modulo, C have emerged to meet the needs of other designers and developers. Each has structure and routines that become familiar with practice, and enable certain sequences to be reused as needed, when called. Operating systems such as Windows, LINUX, and UNIX are written in these languages and compiled into machine level coded instructions. In the world of the PLC, a form of programming was developed to represent on-screen the process or plant being controlled. This is called ladder programming. In essence, it achieves the same outcome. It is interpreted by the controller to perform sequential tasks of reading and controlling various tasks. The difference is that it is not the intention of the PLC to do anything other than controlling one fairly confined suite of tasks. It doesnt have to perform general computing, accounting, entertainment, solve other problems. It is dedicated to one job only. PLCs are designed to talk to other PLCs, and so a whole plant may be controlled by a rack full of PLCs, which on occasion wait for instructions and transfer some control for a period. Other computers may also supervise the PLC work. For this to happen, the manufacturers of PLCs, being keen to get their controllers into the market, developed their own proprietary differences and protocols for communication, so that the plant owners and engineers had to stay fairly much with the same PLC family for the duration. This still applies, although universal communications standards have been added in to enable a variety of interconnection types. Once, Siemens controllers Square D, Modicon, or Yokogawa would not connect to each other or to a supervisory computer except via their own standard, except possibly via a serial RS232 interface. RS232 has been a feature for some time due to the need to work with serial sensor and control circuits out in the plant. But now, each comes with the standard Ethernet interfaces, or at least an adapter to connect to its proprietary comms port at these standards. Interconnectivity is therefore a possibility as the PLCs can form part of a standard computer network. We will be training on PLC usage with the IDEC Microsmart and WindLDR software (http://www.idec.com). This is a representative system and we will be incorporating an ultrasonic sensing unit as an input device, interfacing this with the PLC via a 4-20mA loop and calibration system, replacing the float switch signals in our automatic tank top-up system. 3.4 Ladder Programming Recall that one of the problems implementing the basic relay controlled solution was that of timing. This is what we can do with ladder programming and the PLC: build timing into the solution. What you will need are some fundamental encoding skills...not as difficult as you might think. Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

54 | P a g e Well start with a couple of ladder programming basics. Ladder logic came directly from relay logic, and is a graphical representation of the steps involved in executing a sequence. It uses symbols to represent the switches and relays that perform the logical functions, and is depicted as a ladder with rungs. The PLC keeps checking the state of the ladders rungs in the light of tasks being complete and a new condition starting, or an external signal changing the rules, so to speak. The ladder, of course, is inside the PLC. Bet you didnt think it would fit! It does, in memory. Just as you can see your own ladder in your memory. So, a switch turning on a relay which switches a motor looks something like this as a circuit:
Circuit 1

The type of switch indicated is called a momentary switch, so the motor will be connected only while the switch is operated, like the windscreen washer pump in your car. To overcome some of its shortcomings well make a new version, circuit 2, where the relay R self-latches after the switch A is briefly operated. Well also add a lamp P to indicate that the motor M is latched on, and a momentary release switch B to turn the circuit back off.

Circuit 2

When A is momentarily operated, current flows in the relay coil and both R1 and R2 close; R1 supplies current to M and P, and R2 connects the supply to R to keep it closed until the current path through it is momentarily interrupted by operating B. So this is a form of simple logic. It has a true condition and a false condition. Since the motor is the target (or the lamp to represent it if the motor is somewhere else, as motors usually are), if the motor is this is a true state and motor off is a false state. The relay is a logical transducer, or switch. Because it has been connected a particular way it can be called a latch and that in turn can be called a memory bit. In ladder logic we represent the circuit only by its control elements, because that is all the PLC cares about. In the case of our test setup, that means the three input control switches A B and C, the output control relay R, and its two switches R1/1 and R1/2, one of which becomes an input. In our circuit above we included a lamp P. This is also a logical device, because it tells us about the Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

55 | P a g e circuits state, like an alarm might do, so we would include it as an output if we used it in our test rig. Ladder logic symbols are different from electrical and electronic drawing symbols, and are all representable by ordinary keyboard character combinations. This set of images shows us the equivalent logic symbols to represent the TTL versions we have already discussed.

Figure 29 Ladder logic and TTL equivalent (From EC&M)

In each of the above, A and B represent logical inputs which can also be thought of as input switches (they are all either 1 or 0, on or off).
Common representative symbols for ladder logic:

-- ( )-- the coil of a relay normally unactivated until connected to its supply. -- [ ]-- the normally open contacts of a relay/switch or a state 0 -- [/]-- the normally closed contacts of a relay/switch (NOT contacts) or a state 1

We redraw the circuit with the voltage supply represented by the two ladder sides, L1 (AC Active or DC +) on the left, L2 (Neutral, 0V) on the right as follows:

L1 Rung 1

L2

------[ / ]------------[ / ]---- ---------[ ] ------------------( )-------------------A B -----[ ]---- -R1/1 C Relay R

Rung 2

------------[ ]---- -------R1/2

Rung 3 Draft version 2.1

-----------[ / ]---- --------23 April 2012 Copyright Outsource Services

Engineering Control

56 | P a g e

This diagram is for discussion purposes and represents the relay circuit logic, not the PLC program precisely. The PLC polls each rung in sequence looking for changes, whereupon it executes the instructions of its program and outputs the control voltage to operate the relay/pump. Rung 2 and Rung 3 are purely for illustration of the rungs. The rest of this discussion will be part of the practical exercise and there will be practice at ladder programming during that exercise. An interesting PLC video clip can be found at: http://www.plcs.net/animation.htm

3.5 Computer programming

Computers, as we have mentioned already, use high-level programming languages to control the behaviour of the core processor(s) using the native instruction set of the processor. The high level language uses code more like the language we use in everyday life. After the program is developed a translator -- called a compiler -- is used to build the machine-readable sequence of instructions in the native instruction format. The evolution of programming in the internet or web environment has altered what was once a dark art into a game, at least for gamers. Javascript, Flash and a myriad of tools enable programmers to create immediate results by programming into the HTML (hypertext mark-up language) which was designed to be relatively easily manipulated and modified to build new web applications...and is! One common Windows applications programming tool is Visual Basic. The tool label here and in the previous paragraph means that it is something to enable us to adapt existing capability to our own special design. Advanced programmers can create substantial programs using Visual Basic, but laypeople can use it with almost no understanding of programming. The laypersons way of using Visual Basic is to build a macro. Controlling a feature of a spreadsheet or performing a frequently required task in a text document is a common example of how a macro can be used; however, a macro can read inputs and thereby produce a result. That result could be used to determine an output response, such as controlling a printer, etc. If an output is possible, a control function is possible. The easiest way to introduce the macro is to open Microsoft Office Word or a similar word processor that has macro programming available to the user. This company (Outsource Services) uses Microsoft Office 2010 so lets go forward by opening a new word document and building a useful macro. We earlier needed a 6 x 2 table for calibration purposes, so a macro to produce a table with headers and labels could come in handy.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

57 | P a g e If you have access to You Tube, you could watch this video to assist your understanding. If happy to proceed, 1. Open a new blank document 2. In the ribbon to the right of the Office button (top left) click on the View tab. At the right youll see the Macros menu tab. Click the arrow head and select Record Macro. A dialogue pane will appear, like so:

For this exercise, we will use a keyboard code to activate our macro. Office will store this macro, not in the document, but in a template folder which it automatically calls normal.dot. This means you can access it whenever you need it, but it is limited to documents only on your computer. If you want to distribute it more widely, there are ways to do that, but there are some conventions and protections around doing so to prevent malicious use of macros. 3. Now click on the keyboard symbol. This will take you to a prompt box to enter a combination of keys to activate your macro. Press and hold the Alt key and any two alpha keys one after the other, such as your initials, so that you can remember what you did! Now click on Assign. Note that anything you do now until step 6 forms part of the building of your macro. 4. Click on the Insert tab on the ribbon, then on Table, and hold the left mouse button down while scrolling over the top two rows (scroll from the left across) to create a 6x2 grid. On your blank workbook the following grid will appear. 5. Now add labels as shown using a bold 9 pt font:
Temperature C Resistance -40 -20 -10 0 15

6. Finally, go back to the Macro tab and click Stop Recording and the task is complete. 7. Now, test your macro in a new blank document by applying the keystroke sequence from step 3.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

58 | P a g e For more reference information from Microsoft on Visual Basic, enabling macros, viruses/malicious code and macros, and file saving conventions, click here. In terms of control systems, using macros in Excel is probably more relevant than in Word, because Excel can be used to read real-time data and output control values. For example, look-up tables can be built to produce a scaled-up or -down result or even to change a code set. For example, let us imagine a system receives calibrated data from a sensor in oC, but a display system connected to it displays oF; using Excel, first well build a lookup table to convert value from Celsius to Fahrenheit. A reasonably accurate conversion formula is F=C x9/5 +32. This lets us build a table that looks like: Degrees C Degrees F

0 32

1 33.8

2 35.6

3 37.4

4 39.2

5 41

6 42.8

7 44.6

8 46.4

Well make the table range from -40 oC to +150 oC which is much too wide to display here. Next, well use some Excel array techniques to find the temperature in oC and determine the corresponding oF to display... then a macro to grab the value. For the rest of this exercise we will be using Excel so only the steps will be outlined here. So open a spreadsheet and get two things happening on the same screen, or if you have two screens, one on each. In your Excel spreadsheet, you need to use an array formula to search the array for the value in Centigrade and return the corresponding value in Fahrenheit. There are numerous approaches, but maybe the easiest is to use the horizontal lookup (HLOOKUP) formula, tell the formula what you are searching with (i.e. the cell that holds the value in 0C), where to look (the array), and what to return. So, create the array formula as follows: 1. Enter values in Centigrade from -400 to +1500 in row 1 of a new spreadsheet, by entering 40 in the first cell, -39 in the second, and then drag these two cells to the right until you reach 150 (or do this in conjunction with the next step and save some effort). 2. Enter the formula in the first cell of row 2 =A1*9/5+32 and drag it to the right as above. Now the table array is built. 3. Go to a blank cell below the array and enter -40. Go to the cell beside it. 4. In the cell beside the -40, enter the HLOOKUP array formula as follows: type =HLOOKUP($X$Y [x,y being the address of the cell you put -40 in, followed by a comma], drag the mouse over the entire array from top left to bottom right, release the mouse and use the cursors to get back to the start of the spreadsheet, enter a comma followed by 2 comma 0 close brackets, hit the enter key. Clicking on the cell and looking at the formula bar, the finished formula should look like this: =HLOOKUP($A$3,A1:GI2,2,0) There could be differences depending on the specific cell addresses you used. Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

59 | P a g e 5. If it works according to the plan, that cell will now hold the value -40 which is correct because -40 C and -40 F are the same temperature. If you type 151 in the first cell, the second should give an error as we dont have that value in our range. Try a few other values. We havent recorded any macro yet. Now we can do that since we have debugged our table array and got it all working. Now, open the VIEW tab, and click on Macros (down arrow), and click on Record Macro. In the dialogue box that opens, leave the default name (macro x where x is the value assigned by Excel) and, if you want, type in the lower box a description such as C to F. Important: you need to assign a key combination and the default first key is CTRL. If you assign a capital letter, you will not overwrite any other macros, so SHIFT T or something similar that will give you a key combination you can remember. Do this and then click OK. Now, in cell B6 type Enter Value: This will have gone over two cells so go two more cells to the right to E6 and type =hlookup($D$6,A1:GI2,2,0) and then ENTER....as you do! Click again on the Macro down arrow and then Stop recording. The macro has now been recorded. To test it, clear everything except the array. Now go to the cell B6. Type Ctrl Shift t (if you used that), and the macro will place the text and the result for 0 in the cell E6. If you enter a new temperature in D6, it will give you the corresponding Fahrenheit result. (Just a note about those $ signs: $D$6 locks the cell reference to D6, so dragging the formula anywhere will keep the reference at D6.) Why would we want do this? The reason is that you are actually creating visual basic code, and this code may be edited. It is possible to reference port addresses in visual basic, therefore you can interface externally with your spreadsheet. Have a look at your code now. Is the Developer tab visible at the ribbon bar at the right? If not, go to the Office icon top left, open the Options tab, and enable Developer to appear on the ribbon. Now click on Developer, double click on Macros, select your macro, and Edit and your code will be shown in a new Visual Basic editor screen. Be impressed! There were easier options to do all this, including a macro just containing the formula we used to build the array rather than the interrogation formula with the array; but we did all these steps for exposure to a variety of principles that can help you problem solve using Excel and macros, and even Visual Basic, once you study it in more depth. Additional notes: Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

60 | P a g e

Knowledge Quiz 5 review of controllers and programming 5.1. What is a NOR gate? Draw the symbol and its truth table.

5.2. What are the main disadvantages associated with TTL logic solutions to a control problem?

5.3. What do we mean by the term latch?

5.4. You need to demonstrate that you have successfully recorded and used a macro. Please forward your macro for assessment. If it is recorded in your normal.dot template it resides on your computer and not in the file where you used it, so ensure that if you are sending a file it contains the macro. The file will need to be in Microsoft Word or Excel for us to access and review it. 5.5. The remainder of this quiz will be related to ladder programming and the use of the PLC during the practical exercise. A checklist is to be provided to you for that exercise.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

61 | P a g e

4. Communicating between devices


Communications technologies can be both analog and digital, with a number of standards or protocols used within and between control systems, in combinations depending on what is being sent, and in what environment. We have already referred before to the 4-20mA loop which is analog. Other analog wiring is used as well. Once digital communications is at play, there are rules about the way the data is organised and transferred. For example, how many bits of data are required to make up a piece of information; what arrangements are there to send the data so that the controller is ready to accept it, etc, etc. There are serial and parallel data arrangements too. Serial data is sent bit after bit, and this can be (and usually is) on a (twisted) pair of wires. Parallel data is sent down a multiple pathway either in physical wires or multiplexed on a carrier and sent in a pipe (fibre, radio signal or coax cable) Within a computer, and this includes backplane controller systems, communications take place physically on a bus; a bit of discussion will enhance the understanding of the meaning of bus in computer control. Actually, in a controller or computer three buses are required.

Figure 30 Bus depiction - controller system

The data on the data bus is determined by the address bus, which accesses I/O, RAM or ROM memory. You can think of this as opening a letterbox to see what it contains. One of the early and most important advancements in computing was to treat I/O in the same way as memory: give each peripheral device (or its controller) an address and read to it or write to it the same way as to memory. The control bus carries commands to and from memory or peripheral devices and the CPU. The CPU has registers (memory) to hold quite a lot of data so operands and values can be placed in these registers as appropriate for the CPU to do something with them. Outside the computer/ controller, transmissions occur using protocols that are recognisable to each end of the chain, and to other systems that might be connected (perhaps to supervise or Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

62 | P a g e monitor). Serial bus arrangements are the most common form of communications, and ASCII is the most frequently used encoding standard. Over the last 40 or so years as the industrial world totally embraced the digital age interconnectivity protocols had to be developed. As is human nature, they were influenced by older practice and as a result early protocols fitted within the confines of purpose and manufacturer choice. Many manufacturers contributed to the emergence of common standards but there were still many standards developing and these were not interchangeable, at least not easily. In bus development, there is continuous innovation and modification within hardware systems, so variations and enhancements will always be ongoing.

Figure 31 Backplane Controller (Source Wikipedia)

For outlines and information on the large number of bus standards that have been developed, go to http://en.wikipedia.org/wiki/Bus_(computing)#Background_and_nomenclature and for a list of control bus protocols, http://en.wikipedia.org/wiki/Control_bus. Lets look at the interconnectivity types that you might encounter as a summary: 4.1 Proprietary There are two types: 1. The originating PLC OEMs (manufacturers), in the absence of agreed communication standards and in the interest of maintaining not only their own commercial advantage but system integration capability, developed bus standards (codes, flag command protocols and code/word width) peculiar to their own PLC system. While it is possible to translate codes, the sequencing and protocols used within the proprietary system make the interconnection very difficult. E.g. Modbus was the bus developed by and used by Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

63 | P a g e Modicon. CAN bus was developed by Bosch for the automotive engine management systems they developed. 2. Collaboration led to groups of manufacturers adhering to a particular interconnectivity standard, allowing their systems to be interconnected. These include C-Bus, VME, Multibus and many others. 4.2 IEEE Standards The majority of communications uses one or another protocol for serial data transmission, where bytes are sent in a series of bits one after the other. ASCII is the most frequently used encoding standard. A notable exception is HP-IB, which became IEEE-488, and which is a parallel bus designed for instrumentation. 4.3 Serial RS232 standard. The RS232 standard means that any connection on the serial bus conforms to the standard using the ASCII signalling standard. The standard cabling connectors are either a 25-pin or a 9-pin D Shell cable plug; 9-pin being most often encountered in current systems, pins are assigned as follows:
Pin Number 1 2 3 4 5 6 7 8 9 Direction of signal Input Input Output Output Input Output Input Input Signal Data Carrier Detect Received Data Transmitted Data Data Terminal Ready Signal Ground Data Set Ready Request To Send Clear To Send Ring Indicator Conventional label DCD RXD TXD DTR Common DSR RTS CTS RI

Note that pins 2 and 3 are data in and data out respectively, with pin 5 the data signal common connection, a common wire or a connection to an appropriate signal ground5. All of the other pins are used to ready the send and receive processes. RS232 uses an asynchronous receiver/transmitter (UART, Universal Asynchronous Receiver Transmitter) on the processor board, and, being asynchronous, it can be triggered at any time to perform a read in or a write out function, just not at the same time. Further information can be found in text books or on the internet at numerous places, for example at Windmill Software Ltd.

Signal grounds are to be carefully planned to reduce earth loops. Earth loops can introduce 50Hz hum signals which can lead to major problems if not filtered out. Prevention is better than cure. More.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

64 | P a g e 4.4 Ethernet Control systems that are interconnected sets of measuring, controlling, and communications between small systems and supervisory systems are called Distributed Control Systems, or DCS. Many major processing plants use DCS systems and the control room at left is an example of how multiple systems are monitored and supervised by senior plant engineers. Obviously the type of plant will have individual requirements, but will generally be oversighting production and safety, managing materials and maintenance, performing import and export operations, monitoring environment, quality, cost elements and rate of production (production optimisation). The control computers run system checks automatically and raise alarms for abnormal parameter conditions.

The system at right shows a hierarchical connection from the control room down to the sub equipment level racks and modems for individual element measurement and control. This is based on the Ethernet protocol, which is the same as the now universally adopted computer interconnectivity protocol for computer networking (WAN and LAN). This enables both a wired connection and the WiFi standard to be used to communicate between hundreds of connected devices, each with their own unique MAC identifier or address. (Images: Google
Images)

Many PLCs now have the ability to be connected using Ethernet though some PLCs require a separate adapter. Other connectivity technologies will still be used to connect to actuators, transducers and so forth.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

65 | P a g e 4.5 USB The universal serial bus standard was developed for simplicity of interconnectivity of a myriad of emerging devices such as camera, keyboards, mice and disk drives. It has largely replaced the RS232 serial protocol in the computer world, as its speed has developed and overtaken the capability of the former standard (RS232 is not being developed further, unlike USB). USB is not yet a big player in PLC connections but will be in the future, unless USB gives way to another improved standard. Leap-frogging technologies is common in industrial applications where return on investment is seen as being an important measure of the need for change. USB offers four data flow modes of communication: isosynchronous, control, interrupt and bulk.

Pin 1 Pin 2 Pin 3 Pin 4

VCC (+5 V) DataData+ Ground

Symbol

(Images: Wikipedia)

4.6 Firewire IEEE 1394, or as developed by Apple as Firewire, is also used in the communications family because in its time it was the fastest serial communications standard available. While USB has overtaken Firewire in speed, flexibility in mode of operation and universality of adoption across the world of interconnected componentry it continues to be developed with the latest being IEEE 1394 2008. Firewire attracts a royalty payment when implemented by 3rd party manufacturers. The Firewire connection standard uses six and four pin plugs as shown. Pins for power and two signal pairs are provided in the 6 pin format. It can accommodate two modes of communications, asynchronous and isosynchronous.
(Images: Wikipedia)

An interesting article on Firewire for DCS is at: http://www.automation.com/resourcestools/articles-white-papers/fieldbus-serial-bus-io-networks/ieee-1394-and-industrial-automationa-perfect-blend 4.7 GSM TheGlobal System for Mobile Communications (mobile telephone technology) is emerging in control and monitoring applications and can be expected to become more prevalent in times ahead. Applications can be found in industry where measuring devices contain telephone units and require a SIM card and a carrier account. These units can send and receive data, and are in some cases able to control elements of a process. The MonoScan ultrasonic device we are using in this course has the capacity to send information via GSM. Draft version 2.1 Engineering Control 23 April 2012 Copyright Outsource Services

66 | P a g e

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

67 | P a g e Knowledge Quiz 6: Communications 6.1. What is the difference between OEM/proprietary bus standards and universal bus standards?

6.2. Describe one universal standard for communications in terms of the type of connection, data transfer and where it might be used as a preference.

6.3. Describe in basic terms the bus structure of a desktop computer system.

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

68 | P a g e Summary

Congratulations, by this point in the course you have covered the core content to become a valuable member of a control design team and have the underpinning skills and knowledge to talk the language. If you can talk AND listen with understanding of the tasks involved, the devices that can be used, the controller families and the communications protocols you will make a very sound contribution to industry. You will need to be able to travel through the vast minefield of manufacturers and the choices on offer, and there is still much to be gained from experience. But this is the first step in that journey. Lets summarise the essential points: A control system comprises measurement, calibration, and responses to the data gained through that process. Measurement devices are designed to meet the industrial, environmental and accuracy requirements of virtually every situation, and there are many different choices in selecting the means of measurement. Cost has to be weighed against reliability and robustness to stay the distance. One of the most important factors in choosing a transducer for measurement is to ensure it meets all range requirements as well as accommodating outof-range circumstances, and thus be able to trigger fail-safe routines. Field actuators are available to meet every industrial situation, but there is a requirement to ensure that actuators can be relied on to provide fail-safe responses. Manual overrides are recommended for safety of maintenance personnel, and to provide safeguards in terms of system failure. Tuning is the process of ensuring a control system responds as designed, or as intended to function. The design may require a number of revisions to meet the overall requirement prior to the tuning process. Control system design requires a clear and concise understanding of the clients needs and constraints, including the clients existing control and supervisory methods and protocols. It is almost certain that the design of a control system will require team work with those who have expertise in special areas of the overall requirement. A good understanding and awareness of the meaning of protocols and standards will enable the best available solutions to be adopted and accommodated in the end design. Dropping a choice in favour of an alternative will not carry the burden of redesign of the entire system if the designer is comfortable about researching the alternative and what it requires to function as part of the system. This gives the design team a building-block approach and will allow the best flexibility. Controllers are the heart of the control system, but there are numerous choices of approach in choice of hardware, interfaces, and programming techniques. It is possible and advantageous to build working models in a simulated computer environment to assist the team to cover all requirements before commencing the stage of component choice. Some parts of a system may be able to employ simple real-time TTL, some may require triggered 23 April 2012 Copyright Outsource Services

Draft version 2.1 Engineering Control

69 | P a g e logic, and other parts will need to draw together complex functions to control the total process and keep it inside its designed safety boundaries. Additional notes to the summary:

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

70 | P a g e Final Assessment/RPL Checklist.


TASK 1 Describe the essential elements of a process control system in terms of input and output signals, core controller and communications protocols. Alternatively, you may refer to, and describe, a specific control system with which you are familiar, providing you cover each of the four elements. TASK 2 Identify two types of industrial sensor and refer to manufacturers data to identify: 2.1. 2.2. 2.3. 2.4. TASK 3 Identify one type of output controller, specifically for controlling position. For your selection, identify: 3.1. Control range 3.2. Operating requirements TASK 4 This task will require access to control system using a PLC controller and its associated software. The requirement is to program the controller to perform the task for which the system has been designed, and to test and tune the system to ensure that it operates according to its design including safety provisions. An alternative to performing this task is to provide satisfactory evidence of performing this as a routine function of your current or a previous role in industry. Please refer to the Outsource Services RPL processes for the requirements if this approach is to be followed. TASK 5 Outline the key points of measuring quantities in an industrial system, to minimise accuracy errors. TASK 6 Demonstrate the ability to record a macro and save the macro for general use in any document or spreadsheet. TASK 7 Describe two communications protocols widely used in industrial control applications. The description is to include the type of signal, and, if analog, the benefits and limitations and an example of how it can be used. If digital the connectivity standard and the interface requirements, and an example of the use of the communications in industry. Digital or analog output Operating range and limits (cover dynamic range, temperature derating, etc) Accuracy characteristic Interface requirements or options

Draft version 2.1 Engineering Control

23 April 2012 Copyright Outsource Services

Das könnte Ihnen auch gefallen