Met402 Mechatronics Module 4
Met402 Mechatronics Module 4
MODULE IV
CONTROL SYSTEMS
Controlled Variable – The quantity or condition of the controlled system which can be
directly measured and controlled is called controlled variable.
Indirectly controlled variable – The quantity or condition related to controlled variable, but
cannot be measured directly is called indirectly controlled variable.
Command – The input which can be independently varied is called command.
Reference input – A standard signal used for comparison in the close – loop system.
Actuating signal – The difference between the feedback signal and reference signal is called
actuating signal.
Disturbance – Any signal other than the reference which affects the system performance is
called disturbance.
System error – The difference between the actual value and ideal value is called system
error.
Control systems are classified into the following two basic types :
An Open-loop control system is one in which the control action is independent of the desired
output. The actuating signal depends only on the input command and output has no control
over it.
The elements of an open-loop control system can usually be divided into the following two
parts:
Controller
Controlled Process
An input signal or command is applied to the controller, whose output acts as the actuating
signal; the actuating signal then controls the controlled process so that the controlled
variable will perform according to prescribed standards.
Page | 1
MET402 Mechatronics
In simple cases, the controller can be an amplifier, mechanical linkage, filter, or other
control element, depending on the nature of the system. In more sophisticated cases, the
controller can be a computer such as a microprocessor.
Advantages:
Simple construction.
Easy maintenance.
Less costly than a closed-loop system.
No stability problem
Convenient when output is difficult to measure or measuring the output precisely is
economically not feasible.
Disadvantages:
Since the system is affected by internal and external disturbances, the output may differ
from the desired value.
For getting accurate results, this system needs frequent and careful calibrations.
Any change in system component cannot be taken care of automatically.
Presence of non-linearities causes malfunctioning.
A closed-loop system is one in which control action is somehow dependent on the output.In
this case the controlled output is fed back through a feedback element and compared with
the reference input.
Thus the actuating signal is the difference of desired output and reference input.
Feedback is that property of a closed-loop system which permits the output or some other
controlled variable of the system, to be compared with the input to the system, so that the
appropriate control action may be formed as some function of the output and input.
A feedback is said to exist in system when a closed sequence of cause and effect relations
exists between system vaariables.
Page | 2
MET402 Mechatronics
FEEDBACK DEVICES
Position feedback devices are used to measure the displacement of position of slide or table
and send signals to the comparator to correct the position.
Different types of position feedback devices are;
o Linear transducers
Ferranti System ( Moire Fringe Digitizer)
Inductosyn
o Rotary transducers
Rotary encoder
Absolute encoder
Incremental encoder
Gray coded encoder
Resolver
FERRANTI SYSTEM
A similar device as incremental encoder, but in operation principle its slightly different.
It makes use of Moire fringe detection in order to permit easier detection of position.
In linear transducer, the optical gratings are used. When the two grating overlap each other,
a ‘Moire fringe’ pattern is formed depending on the displacement.
The moire fringe pattern is formed when the linear grating is slightly tilted with respect to
scanner unit grating.
The actual distance moved by the fringe pattern can be calculated since it depends on the
grating spacing, the angle of grating and the distance moved.
Scale grating is available for both linear and rotary forms.
INDUCTOSYN
The principle of operation is similar to a resolver with very large number of stator poles
rather than 2 and with only one rotor.
The linear system has two parts namely scale and slider. The scale is similar to stator and the
slider is similar to rotor winding.
Page | 3
MET402 Mechatronics
They have coils in the form of hair pin turns etched on to glass, steel or aluminium plates.
The coils are bonded to the scale over an insulating layer. The slider is sliding over the scale.
When two different voltages are applied with these two sliding coils, a corresponding emf is
induced. This emf is directly proportional to the position of the slider with respect to scale.
For a machining operation the term AC denotes control systems that measures certain output
variables and uses to control speed or feed. Some of the process variables that have been
used in AC machining systems include spindle deflection or force, torque, cutting
temperature and horse power.
The adaptive control is basically a feedback system that treats the CNC as an internal unit
and in which the machining variables automatically adapt themselves to the actual
conditions of the machining process.
IP (Performance Index) - is usually an economic function such as max production rate or
minimum machining cost.
Adaptive control is not suitable for every machining situation. In general, the following
characteristics can be used to identify situations where adaptive control can be beneficially
applied.
o The in-process time consumes a significant portion of the machining cycle time.
o There are significant sources of variability in the job for which AC can
compensate.
o The cost of operating the machine tool is high.
o The typical jobs involve steels, titanium and high strength alloys.
Identification Function:
Decision Function:
Once the system performance is determined, the next function is to decide how the control
mechanism should be adjusted to improve process performance.
The decision procedure is carried out by means of a pre-programmed logic provided by the
designer
Modification Function
Page | 5
MET402 Mechatronics
The modification involves changing the system parameters or variables so as to drive the
process towards a more optimal state
CLASSIFICATION OF AC SYSTEMS
In practice the AC system of machine tools can be classified into two types:
o AC with optimization (ACO)
o AC with constrains (ACC)
o Geometric Adaptive Control (GAC)
ACC are systems in which machining conditions such as spindle speed or feed rate are
maximized within the prescribed limits of machines and tool constrains such as maximum
torque, force or horse power.
In AC system the correct feed and speed are automatically found and it is not necessary to
spend efforts on calculations of optimum feeds and speeds.
ACC systems do not utilize a performance index and are based on maximizing a machining
variable (e.g., feed rate) subject to process and machine constraints (e.g., allowable cutting
force on the tool, or maximum power of the machine).
The objective of most ACC types of systems is to increase the MRR during rough cutting
operations.
The ACO Systems for N/C machine tools is a control system that optimizes performance
index subjects to various constraints.
It is basically a sophisticated closed loop control system, which automatically works in
optimum conditions, even in the presences of work piece and tools materials variations.
Page | 6
MET402 Mechatronics
Drawbacks of ACO
The main problem is that this require on-line measurement of tool wear.
So far there have been no industrially acceptable methods developed for the direct
measurement of tool wear.
Indirect measurement assumes that tool wear is proportional to other measurable variables
such as cutting forces and temperatures.
The drawback of using these indirect measurements is that variations in their values can be
caused by process variations other than tool wear, such as workpiece hardness or cutting
conditions.
Thus making it difficult to identify the tool wear effect from the effect of the other parameter
variations on the measurements.
Drawback of GAC
Both the dimensional accuracy and the surface finish are affected by the flank wear and the
crater wear of the tools which deteriorate during cutting.
These variables cannot be measured in real time; neither can they be accurately predicted
from off-line tool testing.
Page | 7
MET402 Mechatronics
A major drawback is the unavailability of suitable sensors that have a reliable operation in a
manufacturing environment . (Tool wear sensor).
Another problem is the interface of an AC system with CNC units. As yet, manufacturers
have not standardized interfaces.
All these components are housed in a suitable cabinet designed for the industrial
environment.
Processor
Memory Unit
Contains programs and data files of logic, sequencing and I/O operations.
Also called user or application memory as its contents are entered by user.
In addition, the processor also has a system memory that directs execution of control
program and coordinates I/O operations.
Power Supply
Input/Output Module
Page | 9
MET402 Mechatronics
Programming Device
As far as the PLC user is concerned, the steps in the control program are executed
simultaneously and continuously.
In truth, a certain amount of time is required for the PLC processor to execute the user
program during one cycle of operation.
The typical operating cycle of PLC is called a scan and it consists of three parts :
o Input Scan
o Program Scan
o Output Scan
ADVANTAGES OF PLC
Reliability
Flexibility in programming and reprogramming.
Cost effective for controlling complex systems.
Small physical size, shorter project time.
High speed of operation.
Ability to communicate with computer systems in the plant.
Ease of maintenance /troubleshooting.
Reduced space.
Energy saving.
DISADVANTAGES OF PLC
PLC devices are proprietary it means that part or software of one manufacturer
can’t be used in combination with parts of another manufacturer.
Limited design and cost option
Fixed Circuit Operations.
PLCs manufacturers offer only closed architectures.
TIMERS
There are four fundamental types of timers shown in Figure.
An on-delay timer will wait for a set time after a line of ladder logic has been true before
turning on, but it will turn off immediately.
An off-delay timer will turn on immediately when a line of ladder logic is true, but it will
delay before turning off.
Consider the example of an old car. If you turn the key in the ignition and the car does not
start immediately, that is an on-delay. If you turn the key to stop the engine but the engine
doesn’t stop for a few seconds, that is an off delay.
An on-delay timer can be used to allow an oven to reach temperature before starting
production. An off delay timer can keep cooling fans on for a set time after the oven has
been turned off.
Page | 11
MET402 Mechatronics
A retentive timer will sum all of the on or off time for a timer, even if the timer never
finished.
A nonretentive timer will start timing the delay from zero each time.
Typical applications for retentive timers include tracking the time before maintenance is
needed.
A non retentive timer can be used for a start button to give a short delay before a conveyor
begins moving.
COUNTERS
There are two basic counter types:
o count-up
o count-down.
When the input to a count-up counter goes true the accumulator value will increase by 1 (no
matter how long the input is true.) If the accumulator value reaches the preset value the
counter DN bit will be set.
A count-down counter will decrease the accumulator value until the preset value is reached.
An Allen Bradley count-up (CTU) instruction is shown in Figure above. The instruction
requires memory in the PLC to store values and status, in this case is C5:0.
The C5: indicates that it is counter memory, and the 0 indicates that it is the first location.
The preset value is 4 and the value in the accumulator is 2.
If the input A were to go from false to true the value in the accumulator would increase to 3.
If A were to go off, then on again the accumulator value would increase to 4, and the DN bit
would go on. The count can continue above the preset value.
If input B goes true the value in the counter accumulator will become zero.
Count-down counters are very similar to count-up counters. And, they can actually both be
used on the same counter memory location.
INTERNAL RELAYS
Inputs are used to set outputs in simple programs. More complex programs also use internal
memory locations that are not inputs or outputs. These are sometimes referred to as ’internal
relays’ or ’control relays’.
Knowledgeable programmers will often refer to these as ’bit memory’. In the Allen Bradley
PLCs these addresses begin with ’B3’ by default.
Page | 12
MET402 Mechatronics
The first bit in memory is ’B3:0/0’, where the first zero represents the first 16 bit word, and
the second zero represents the first bit in the word.
The sequence of bits is shown in Figure. The programmer is free to use these memory
locations however they see fit.
SHIFT REGISTERS
A shift register is a digital memory circuit found in calculators, computers, and data-
processing systems. Bits (binary digits) enter the shift register at one end and emerge from
the other end. The two ends are called left and right.
In its most basic form, the shift register is a bidirectional FIFO (first-in first-out) circuit.
When a bit is input on the left, all the bits in the register move one place to the right, and the
rightmost bit disappears. When a bit is input on the right, all the bits move one place to the
left, and the leftmost bit disappears.
Shift register instructions are PLC output instructions that are used to load data into a bit
array, one bit at a time.
The data is shifted through the bit array, and then unloaded from the bit array one bit at a
time. Shift register instructions are useful in conveyor applications and product evaluation
(pass/fail) control.
The PLC on your trainer includes the following shift register instructions: the bit shift left
(BSL) instruction and the bit shift right (BSR) instruction.
To enter a BSL or BSR instruction, the following parameters must be programmed:
File: address of the bit array through which the bits are shifted. The array must start at
the first bit position of a 16-bit element (element 1, 2, 3, etc.) in a binary (B) data file.
Control: 3-word register (R data file) that stores the status bits of the BSL or BSR
instruction and the length of the bit array.
Page | 13
MET402 Mechatronics
Bit Address: location of the source bit that is inserted into the array. With a BSL
instruction, this bit is inserted into the first (lowest) bit position of the array. With a
BSR instruction, this bit is inserted into the last (highest) bit position of the array.
Length: total number of bits to be shifted within the bit array
The vertical lines of the diagram represent the power rails between which circuits are
connected. The power flow is taken to be from the left-hand vertical across a rung.
Each rung on the ladder defines one operation in the control process.
A ladder diagram is read from left to right and from top to bottom. The top rung is read
from left to right. Then the second rung down is read from left to right and so on.
When the PLC is in its run mode, it goes through the entire ladder program to the end, the
end rung of the program being clearly denoted, and then promptly resumes at the start. This
procedure of going through all the rungs of the program is termed a cycle. The end rung
might be indicated by a block with the word END or RET for return, since the program
promptly returns to its beginning.
Page | 14
MET402 Mechatronics
Each rung must start with an input or inputs and must end with at least one output. The term
input is used for a control action, such as closing the contacts of a switch, used as an input to
the PLC. The term output is used for a device connected to the output of a PLC, e.g., a
motor.
Electrical devices are shown in their normal condition. Thus a switch, which is normally
open until some object closes it, is shown as open on the ladder diagram. A switch that is
normally closed is shown closed.
A particular device can appear in more than one rung of a ladder. For example, we might
have a relay that switches on one or more devices. The same letters and/or numbers are used
to label the device in each situation.
The inputs and outputs are all identified by their addresses, the notation used depending on
the PLC manufacturer. This is the address of the input or output in the memory of the PLC.
Basic Symbols
LOGIC FUNCTIONS
AND
It is a situation where an output is not energized unless two, normally open, switches are
both closed. Switch A and switch B have both to be closed, which thus gives an AND logic
situation.
Fig 4.40 (a) AND Circuit (b) AND Logic Gate (c) AND Ladder Diagram Rung
OR
Figure below shows an electrical circuit where an output is energized when switch A or B,
both normally open, are closed. This describes an OR logic gate in that input A or input B
must be on for there to be an output.
Fig 4.41 (a) OR Circuit (b) OR Logic Gate (c) OR Ladder Diagram Rung
Page | 16
MET402 Mechatronics
NOT
Figure below shows an electrical circuit controlled by a switch that is normally closed.
When there is an input to the switch, it opens and there is then no current in the circuit.
This illustrates a NOT gate in that there is an output when there is no input and no output
when there is an input. The gate is sometimes referred to as an inverter.
NAND
Suppose we follow an AND gate with a NOT gate. The consequence of having the NOT
gate is to invert all the outputs from the AND gate.
An alternative, which gives exactly the same results, is to put a NOT gate on each input and
then follow that with OR.
Both the inputs A and B have to be 0 for there to be a 1 output. There is an output when
input A and input B are not 1. The combination of these gates is termed a NAND gate
NOR
Suppose we follow an OR gate by a NOT gate. The consequence of having the NOT gate is
to invert the outputs of the OR gate. An alternative, which gives exactly the same results, is
to put a NOT gate on each input and then an AND gate for the resulting inverted inputs.
The combination of OR and NOT gates is termed a NOR gate. There is an output when neither input
A or input B is 1.
Page | 17
MET402 Mechatronics
EXCLUSIVE OR (XOR)
The OR gate gives an output when either or both of the inputs are 1. Sometimes there is,
however, a need for a gate that gives an output when either of the inputs is 1 but not when
both are 1.
Such a gate is called an Exclusive OR or XOR gate. One way of obtaining such a gate is by
using NOT, AND and OR gates.
LATCHING
There are often situations where it is necessary to hold an output energized, even when the
input ceases.
A simple example of such a situation is a motor, which is started by pressing a push button
switch. Though the switch contacts do not remain closed, the motor is required to continue
running until a stop push button switch is pressed.
The term latch circuit is used for the circuit used to carry out such an operation. It is a self-
maintaining circuit in that, after being energized, it maintains that state until another input is
received.
MULTIPLE OUTPUT
With ladder diagrams, there can be more than one output connected to a contact. Figure
shows a ladder program with two output coils. When the input contacts close, both the coils
give outputs.
For the ladder rung shown in Figure below, output A occurs when input A occurs. Output B
only occurs when both input A and input B occur.
Fig 4.48 Ladder Rung with Two Inputs and Two Outputs
LADDER SYMBOLS
To enter an output
Page | 19
MET402 Mechatronics
FUNCTION BLOCKS
The term function block diagram (FBD) is used for PLC programs described in terms of
graphical blocks. It is described as being a graphical language for depicting signal and data
flows through blocks, these being reusable software elements.
A function block is a program instruction unit which, when executed, yields one or more
output values. Thus, a block is represented in the manner shown in figure below with the
function name written in the box.
LOGIC GATES
Page | 20
MET402 Mechatronics
The ignition and fuelling requirements of a car engine are fulfilled by the car's engine
management system. In a four stroke internal combustion (I.C.) engine there are many
cylinders, each of which has a piston connected to a common crankshaft and each of which
carries out the four strokes namely, suction stroke, compression stroke, power stroke and
exhaust stroke. Figure shows the working of a single-cylinder four-stroke petrol engine.
During the suction stroke, when the piston moves down the inlet-valve (LV.) opens and the
air-fuel mixture is drawn into the cylinder; the exhaust valve (E.V.) however remains closed.
During the compression stroke the piston moves up and the air-fuel mixture is compressed;
both the inlet and exhaust valves do not open during any part of this stroke. When the piston
is near the top of the cylinder the spark plug ignites the mixture with a resulting expansion
of the hot gases.
During power/working stroke the hot gases expand, thus doing work on the piston.
During exhaust stroke, the piston moves up, forcing the exhaust gases to escape to the
atmosphere through the exhaust valve.
The piston of each cylinder are connected to a common crankshaft and their power strokes
occur at different times so that there is continues power for rotating the crankshaft.
The power and speed of the engine are controlled by varying:
o Ignition timing;
o Air-fuel mixture.
In a modern car the above mentioned operations are carried out through a microprocessor.
Figure below shows the basic elements of an engine management system:
Page | 21
MET 402 Mechatronics
To control ignition timing, the crankshaft drives a distributor which makes electrical
contacts for each spark plug in turn and a timing wheel; this timing wheel generates pulses
to indicate the crankshaft position. The microprocessor then adjusts the timing at which high
voltage pulses are sent to the distributor so they occur at the 'right' moments of time.
For controlling the amount of air-fuel mixture entering a cylinder during the suction strokes,
the microprocessor varies the time for which a solenoid is activated to open the inlet valve
on the basis of inputs received of the engine temperature and throttle position.
The amount of fuel to be injected into the air stream can be determined by an input from a
sensor of the mass rate of air flow, or compute from other measurements, and the
microprocessor then gives an output to control a fuel injection valve.
Page | 22
MET402 Mechatronics
Electronic Control Unit: It controls more than one electric systems and subsystems in a
motor vehicle. It helps in regulating and maintaining the amount of fuel
and air the engine need to increase horsepower.
Fuel Injector Sequential: It‟s a type of multi-port injection system in which injection valve
will open just before the cylinder intake valve opens. It has the fast response time when the
driver makes a quick change.
Air Flow Sensor: An air flow meter is a device that measures the actual speed of the air
flowing through the engine in different segments.
Air Temperature Sensor: It helps to measure the air density for fuel mixture control and to
trim the air flow ratio according to the airflow density.
Throttle Position Sensor: This sensor is used to monitor the throttle position of a car. This
sensor moves with the throttle and sends a voltage signal to the computer. This indicating
throttle angle and speed of movement. The computer uses this data to measure engine load,
adjust timing, fuel delivery etc.
Temperature Sensor: Temperature sensors include analog and digital sensor ICs designed
for temperature monitoring of a system.
Oxygen Sensor: It measures the proportion of oxygen to fuel in the engine.
Idle Air Control Valve: The idle air control valve is also known as idle speed control
valve; regulates the idle speed of the engine.
MAP Sensor: This sensor measures air pressure which tells engine the current altitude of a
vehicle.
Knock Sensor: The Knock Sensor detects engine knock and sends a voltage signal to the
engine and the engine uses that signal to control the timing.
Engine Speed Sensor: An engine speed sensor is attached to crankshaft of car's engine and
it indicate the speed that crankshaft is spinning. This information is beneficial to control
both the ignition timing and EMS.
Engine Oil Sensor: It measures the oil pressure inside the engine and gives an alert in case
of any problem with oil pressure.
Crankshaft Sensor: It is used to monitor the position and rotational speed of crankshaft and
these information will be used by the EMS to control the ignition system timing and other
engine parameters.
Camshaft Sensor: The Camshaft sensor determines which cylinder is firing to establish
injector synchronization and coil firing sequence in DIS systems then only crankshaft sensor
set ignition timing, supply the signal and measure the speed.
AUTOMATIC CAMERA
The modern automatic camera has an automatic focussing and exposure. Figure shows the
basic elements of the control system for an automatic camera.
The working of the system is as follows:
For activating the system when the switch is operated, and the camera pointed at the
object being photographed, the microprocessor takes in the output from the "range
sensor" and sends an output to the lens position drive to move the lens to achieve
focussing.
The lens position is fed back to the microprocessor so that the feedback signal can be
used to modify the lens position according to the input from the range sensor.
Page | 23
MET402 Mechatronics
Page | 24
MET402 Mechatronics
The robot has three axes about which motion can occur. The following, movements are
required for this robot.
o Clockwise and anticlockwise rotation of the robot unit on its base.
o Linear movement of the arm horizontally. i.e., extension and contraction of the
arm
o Up and down movement of the arm and
o Open and close movement of the gripper
The above movements can be obtained by pneumatic cylinders which are operated by
solenoid valves with limit switches. Limit switches are used to indicate when a motion is
completed.
The clockwise rotation of the robot unit on its base can be obtained from a piston and
cylinder arrangement during pistons forward movement. Similarly counter clockwise
rotation can be obtained during backward movement of the piston in the cylinder.
Linear movement of the arm can result during forward and backward movement of the
piston in a cylinder.
The upward movement of the arm can result from forward movement of the piston in a
cylinder whereas downward movement from its retardation.
The gripper can also be operated similar ways as explained above. i.e., gripper is opened
during forward movement of the piston and closed during backward movement of the piston
in the cylinder.
Page | 25
MET402 Mechatronics
Gripper Mechanism
Consider an automatic car park system with barriers operated by coin inserts. The system
uses a PLC for its operation.
There are two barriers used namely in barrier and out barrier. In barrier is used to open when
the correct money is inserted while out barrier will open when the car is detected in front of
it. It consists of a barrier which is pivoted at one end, two solenoid valves A and B and a
piston cylinder arrangement.
A connecting rod connects piston and barrier. Solenoid valves are used to control the
movement of the piston.
Solenoid A is used to move the piston upward where as solenoid B is used to move the
piston downwards.
Limit switches are used to detect the foremost position of the barrier. When current flows A,
the piston in the cylinder moves upward and causes the barrier to rotate about its pivot and
raises to let a car through.
Page | 27
MET402 Mechatronics
When the barrier hits the limit switch, it will turn on the timer to give a required time delay.
After that time delay, the solenoid B is activated which brings the barrier downward by
operating piston in the cylinder. This principle is used for both the barriers.
BARCODE READER
Barcodes are simply a set of symbols used to represent alpha-numeric information instead of
seeing a number “1”, or letter “A”, you would see a series of black and white bars in various
combinations and in different widths.
Barcode
These are used to encode data. The data encoded in such bars can be decoded again to
represent it in human readable form.
Barcode reader is an electronic device, which can read an output printed barcodes to a
computer. It consists of light source, a lens and a light sensor translating optical impulses
into electrical ones. Most of the barcode readers contain decoder circuitry to analyse the
barcodes image data provided by the sensor and sending the barcode‟s content to the
scanner‟s output port.
Page | 28
MET402 Mechatronics
A bar code consists of a series of parallel, adjacent bars and spaces. Symbologies are used to
encode small strings of character data into a printed symbol.
A bar code reader decodes a bar code by scanning a light source across the bar code and
measuring the intensity of light reflected back by the white spaces. The pattern of reflected
light is detected with a photodiode which produces an electronic signal that exactly matches
the printed bar code pattern. This signal is then decoded back to the original data by
electronic circuit.
Working
Page | 29
MET402 Mechatronics
Advantages:
Disadvantages:
Applications:
Retail applications: Supermarket, Countet mounted Bar code scanner, Universal Product
code, Price and description information, Ware housing
Heath care application: Drugs, device, instruments, Identification of expiry date, Blood
banking
Page | 30