Wednesday, March 30, 2011

Control Operate the PLC - part 1

4.2 Operate the PLC

4.2.1 Applying Procedure of Health and Safety
During implementation of the work, procedures of Health and Safety must be implemented properly so that risk of the workplace accidents can be avoided. Following example application of procedure of Health and Safety at the workplace;
• Using equipment of Health and Safety
Figure 4.2 equipment of Health and Safety


• Obeying the applicable safety instructions
• Understand the signs for emergency / alarm
Figure 4.3. Sign for emergency


4.2.2. Checking Installation and power supply of PLC
Before starting the operation, first checks that should be done to the PLC in accordance with manual instructions, usually include;
• Are all Unit of PLC and equipment of I/O has been installed correctly?
• Are all cables and connectors has been installed correctly in accordance with the wiring diagram and squeezed tightly ?
• Is there a screw is not tight?
• Is there a cable is snafu?
• Is there a connection of the cable is broken or not connect?
• Is the power cable connected correctly?
• Is the voltage of power supply was in accordance with the range?
If everything is in good condition then the operation of the PLC can be started.

4.2.3. PLC Programming
Someone who can operate the PLC first he must already know what it is the PLC and how to program a PLC, so that can be operated to control a piece of equipment in accordance with what we want.

4.2.3.1. Introduction
A PLC (Programmable Logic Controller) is an equipment used to replace a series of relay circuit that found in conventional process control systems. PLC works by observing the input (via associated sensors), then do the process and take action as needed, in the form of turn on or turn off the output (logic 0 or 1, alive or dead). Users create a program (commonly called a ladder or ladder diagrams), which then must be executed by the PLC concerned. In other words, the PLC determines what action should be performed on instruments relating to the status output of a size scale observed. PLC is widely used in industrial applications, eg in the packaging process, material handling, automated assembly, elevator and many others.


The use of PLC has several advantages compared with conventional process control systems, among others:
a. The number of cables required can be reduced up to 80%;
b. PLC lower energy consumption
c. Diagnostic functions in a PLC controller allows fault detection more easy and fast;
d. Changes in operational sequence or a process or application can be done easily, just by making a change or replacement program, either through a console terminal or PC computer;
e. Does not require a lot of spare parts;
f. Cheaper, particularly in the case of the use of the instrument I / O are quite large and operational functions of process are fairly complex ;
g. PLC endurance is much better than the auto-mechanical relays.

4.2.3.2. Components of PLC
PLC is actually a special microcontroller system for industry, meaning a set of hardware and software adapted for used in industrial control applications. Basic elements of a PLC is shown in Figure 4.


figure 4. Basic elements of a PLC


• Power Supply Unit
Power Supply is used to provide power supply to all parts of the PLC (including CPU, memory, etc.). Most PLC is working with the power supply 24 VDC or 220 VAC. Power supply is usually integrated with the CPU but there are also separate in a separate unit. Power supply is also equipped with battery backup, so that in the event of power failure, the battery automatically replaces the main power supply to the CPU, so that the user program memory is not lost.

• Unit CPU (Central Processing Unit)
CPU or central processing unit is the brains of a PLC, which is typically a microcontroller 8 bits, 16 bits or 32 bits. CPU is in charge of communication with external devices, interconnectivity inter division of internal parts of the PLC, program execution, memory management, supervise or observe the input signal and provides output signals (in accordance with the process or program that executed). At the CPU is also equipped with indicator lights as an indicator of errors and damage.

• Unit Input / Output
Units of I / O is an interface unit which functions to convert or change the input signal and output signal to the CPU can communicate with external devices such as buttons, switches, sensors, electric motors, selenoid, relays, lamps and others.


• Memory Unit
Memory unit serves to store data and programs that will be used by the PLC. Memory is divided into two types, ROM and RAM. ROM contains data such as facility data logic programming, program editing facility, the facility monitors the program, facilities for communications and others. The data are stored permanently and will not be lost even if power supply is off. While the program data RAM data containing the user, such as ladder diagrams, data memory data, the status of I / O and others. The data can be written and read. RAM is not permanent, so if power suplply off the data that data will be lost. To avoid this, the power supply system equipped with a battery backup that will to power supply if the main power supply off. To store user data in addition to the RAM program data is now widely used EPROM (Eraseable Program Read Only Memory) and EEPROM (Electrical Eraseable Program Read Only Memory). The advantages of EPROM and EEPROM is readable and written many times, such as data stored on the RAM but will not be lost even if power supply is off like a ROM.

• Tools I / O
Equipment Input / Output is equipment associated with the Unit I / O. Examples of input devices are sensors, limit switches, buttons, selector and more, while examples of output devices are lights, selenoid, buzzer, motor relay, and others.






• Tools Programmers
Programming tools are tools used to insert, edit, modify and monitor existing programs in the PLC memory. This equipment is usually a computer or a Programming Console.


4.2.3.3. The working principle of PLC
A PLC works by continually scanning program. Supposing we could illustrate one scan cycle is to be 3 steps. Typically more than 3 but his outline there are 3 steps, as shown in Figure 6.

Figure 4.6. The scanning program in the PLC


Description:
  • Check the status of inputs, the first PLC will see the status of each output if its condition is ON or OFF. In other words, whether the sensor is connected to the first input ON? How about that plugged into the second input? So forth, the result is stored into the memory-related and will be used in the next steps;
  • Program execution, next the PLC will do or execute your program (ladder diagram) per instruction. Maybe your program says that if the first input status ON the first output will be ON her. Since the PLC has to know which inputs are ON or OFF, and the first step can be determined if indeed the first output should be ON it or not (based on the status of the first input). Then it would save the execution results for use later;
  • Update the status of output, the PLC will eventually renew or update the status of the output. Renewal of this output depends on which input is ON during step 1 and the results and the execution of the program in step 2. If the input status ON first, then in step 2, program execution will produce the first output ON, so that in step 3 is the first output will be updated to ON

After step 3, the PLC will repeat its scanning program and iangkah 1, and so on. When a scan is defined as the time needed to work on these 3 steps. Each step can have a response time (response time) are different, the total time response or total response time is the sum of all response time of each step:

input response time + time of execution of the program + output response time
=
total response time


4.2.3.4.
Memory allocation at PLC
As the main reference of this module we will discuss the brand PLC from OMRON. but also will be introduced to several others PLC brands that often found in industries such as Siemen and LG as a comparison material. Every brands of PLC have facilities of program instructions and area of internal memory is different. But in principle, work and program instructions and internal memory that exists in every PLC are almost identical, differing only a symbol or code only.


Existing internal memory on the PLC CPU is divided into various functions, such as internal relays, whose function is as a relay within the PLC CPU. Special relay, a relay which has a special function and can not be converted for other purposes.

For example there was a special relay which functions as a clock of 1 second on and 1 sec off, then the special relay can only be used as a contact who always bekeja on and off for 1 second continuously and can not be converted to another. There are many more other functions, which we will discuss one by one based on the reference and each brand of PLC.

a. Memory allocation of Omron PLC
Here is the division of memory allocation on Omron PLC. Because the addressing of each type of PLC memory location is different, in this case depends, and the capacity of each type of PLC. In Table 1. we will see one example and memory allocation on Omron PLC C200H type.
Table 4.1. Memory allocation on the type of Omron PLC C200H


Internal Relay (IR)
  • Internal Relay as Input-Output Area
    IR which is linked to the terminal allocated Input-Output module. In this allocation, the IR will work ON / OFF, based on the response and input signal-output terminal.
  • Internal Relay as WorkArea
    Is the IR that do not have a specific function, can be used free in the PLC program, and not connected directly with the Input-Output module. All the IR bit will reset when the CPU power is OFF.

Special Relay (SR)
Special Relay is a relay that has a function that has been specified or special, and relays can not be converted for other functions, the following definitions and some examples of some functions of the Special Relay, from word
SR253 to word SR255.

Table 4.2. Special Relay

Holding Relay (HR)
Holding Relay bits in the status bits will maintain its ON / OFF when the Power Supply OFF. So these bits can be used to switch memory. For example, if you want a system that works accurately, which will not be affected if there are problems with power OFF, meaning that after a power OFF and then ON again, the system will continue operating the last memory. So we must use the facilities HR.

AR
A lot of AR functions such as Flag / Bits for the Inner Board, Flag / Bits for communication, Flag / Bits in case of Error in the PLC, and others. Here is an example of function definition from Word AR 00 and Word AR 01.


Tabel 4.3 AR


Link Relay (LR)
If the PLC is made of two pieces relate to each other, then the LR is used as a means of communication between the PLC.

Data Memory (DM)
Functions as a data storage facility at the PLC, there are memory allocation that can be read / written, and there also can only be read, for example can be seen in Table 1 concerning the allocation of memory on the DM. DM application can be used as a buffer for the process of programming the PLC.

b. Siemen PLC memory allocation
Memory allocation to each PLC Siemens vary depending on the capacity of each of the PLC, in table 4 is the allocation of memory on Siemens S7 PLC.


Table 4.4. Memory allocation of Siemen PLC


No different from Omron, Siemens was also have the memory such as Internal Relay, Special Relay, Data Memory and others. At Siemens PLC for the allocation of the address input terminals connected directly to the module using the prefix letter (I), for the allocation of the address output terminals are connected directly to the module using the prefix letter (Q). While for the Internal Relay, addressing use prefix letter (M).

c. The allocation of memory on LG PLC
Here is memory allocation type K-Series.
P: I / O Relay
M: Auxiliary Relay
L: Links ReIay
K: Keep Relay
F: Special Relay
T: Timer
C: Counter
S: Step Controller
D: Data register
# D: Indirectly Specified Registry Data
Constant: Constant

Memory Area "P"
Function as the Input-Output Device, which is connected directly with the Input-Output module. In Table 5 is the explanation of memory "P" as the number of Input-Output PLC, based on type and each PLC:


Table 4.5. Memory allocation "P" on LG PLC

Memory Area (M)
Memory Area "M" serves as an Internal Relay, which have no specific function, and can be used freely in PLC program, the memory 'M' is not connected to external equipment of PLC directly , either input or output devices. Here is an example of the memory capacity "M" based on each type of PLC CPUs.



Memory area (F)
Memory Area "F" functions as Special Relay can be used as, an indication if an error occurs in the PLC, or can also serve as a Clock. The memory capacity "F" depending on the PLC and CPU type used.


Here are some examples of functions and the memory area "F" or commonly called the Special Relay.

Memory Area (D)
Memory Area "D", serves as Internal Data Register, ie, to store and access data into the PLC. The capacity of the Internal Data register "D" depending on the type of PLC used, see Table 6.
Table 4.6. Memory allocation "D" on LG PLC
read more "Control Operate the PLC - part 1"

Monday, March 28, 2011

Control Servo Motion Control

read more "Control Servo Motion Control"

Control Servo Motion Control Tuning the PID Loop

There are two primary ways to go about selecting the PID gains.
Either the operator uses a trial and error or an analytical approach.
Using a trial and error approach relies significantly on the
operator’s own prior experience with other servo systems. The one
significant downside to this is that there is no physical insight into
what the gains mean and there is no way to know if the gains are
optimum by any definition. However, for decades this was the
approach most commonly used. In fact, it is still used
today for low performance systems usually found in process control.
To address the need for an analytical approach, Ziegler and Nichols
[1] proposed a method based on their many years of industrial
control experience. Although they originally intended their tuning
method for use in process control, their technique can be applied to
servo control. Their procedure basically boils down to these two steps.

Step 1:
Set Ki and Kd to zero. Excite the system with a step command.
Slowly increase Kp until the shaft position begins to oscillate.
At this point, record the value of Kp and set Ko equal to this value.
Record the oscillation frequency, fo.

Step 2:


Set the final PID gains using equation (6).



Loosely speaking, the proportional term affects the overall response

of the system to a position error. The integral term is needed to force
the steady state position error to zero for a constant position
command and the derivative term is needed to provide a damping
action, as the response becomes oscillatory. Unfortunately all three
parameters are inter-related so that by adjusting one parameter will
effect any of a previous parameter adjustments. As an example of
this tuning approach, we investigate the response of a Compumotor
BE342A motor with a generic servo drive and controller.

This servomotor has the following parameters:

Motor Total Inertia J = 50E-6 kgm^2
Motor Damping b = .1E-3 Nm/ (rad/sec)
Torque Constant Kt = .6 Nm/A

We begin with observing the response to a step input command with
no disturbance torque (Td = 0).

Step 1:
Fig. 2a shows the result of slowly increasing only the proportional term.
The system begins to oscillate at approximately .5 Hz (fo = .5Hz) with
Ko of approximately 5E-5 Nm/ rad.

Step 2:

Using these values, the optimum P.I .D. gains according to
Ziegler-Nichols (Z-N) are then (using equation (6)):

Kp = 3.0E-4 Nm/ rad
Ki = 3.0E-4 Nm/ (rad/sec)
Kd = 7.4E-5 Nm/ (rad/sec)

Fig. 2b shows the result of using the Ziegler Nichols gains.
The response is somewhat better than just a straight proportional gain.
As a comparison, other gains were obtained by trial and error. One set
Of additional gains is listed in Fig. 2b. Although the trial and error gains
gave a faster, less oscillatory response, there is no way of telling if a
better solution exits without further exhaustive testing.





One characteristic that is very apparent in Fig.2 is the length of
the settling time. The system using Ziegler Nichols takes about
6 seconds to finally settle making it very difficult to incorporate
into any highperformance motion control application. In contrast,
the trial and error settings gives a quicker settling time, however
no solution was found to completely remove the overshoot.

Source ( pdf )
http://www.compumotor.com/whitepages/ServoFundamentals.pdf


read more "Control Servo Motion Control Tuning the PID Loop"

Sunday, March 27, 2011

Control DC Servo motor control


NEURAL ADAPTIVE TACKING CONTROL OF A
LOW SPEED DC SERVO SYSTEM


Hu Hongjie Chen Jingquan Er Lianjie


DC SERVO SYSTEM
The low speed system’s hardware setup is composed of a
permanent dc motor, driving circuit, servo amplifier
(PWM), a mechanical frame as an inertial load, interface
circuit (A/D and D/A), an encoder for position sensing,
and a personal computer (PETIUM I 133) is used as the
programming environment, using Borlandc31 as
programming language for the real-time control
application. Sampling time is defined as 5ms. The block
diagram of the hardware setup is shown in figure


more ( pdf )

Two Adaptive Friction Compensation for DC Servomotors

Abstract
Two advanced control strategies of adaptive friction
Compensation For DC servomotor are presented in this paper,
the first is used for The direct on-line friction compensation in
the velocity control system, The second is making use of an
adaptive inverse neural network controller In the position control
system. Both are composed of an adaptive Compensator for
the nonlinear stiction and Coulomp friction in Parallel with a
PID regulator. Experiments show that much improvement
Of performance has attained respect to conventional controller



more ( pdf )


Feedforward and IMP Control Applied to a DC Servo Motor

1.0 Introduction
The purpose of this report is to compare feedforward and internal
model principle (IMP) control applied to a DC servo motor.
These control schemes will be tested with known sinusoidal inputs.
The performance of the control schemes will be compared to the
Open loop performance of the system. System identification of
the motor is another task that will be performed.

Feedforward Control
Feedforward control was implemented by inverting (2) to yield:


this gives an overall transfer function of one for the system as
can be seen from figure 3. Even though H(s) is not a proper
transfer function, the control system could be implemented
because the input signal is a known sine wave so the first and
second derivatives can be readily calculated.



Internal Model Principle Control (IMP)
The internal model principle [Control System Design, Goodwin
et. al.] can be used to design a controller when the input to the
system is know and can be modeled in the Laplace domain.



more ( pdf )

MODELLING AND CONTROL OF A DC SERVO MOTOR
WITH LABVIEW

OBJECTIVES
This is a hands-on session on the application of computer-based
control to a voltage-controllable electro-mechanical system – the
DC motor. The session is mainly concerned with the modelling
and control of a DC servo motor system, fully instrumented with
position and velocity measurements. National Instrument’s
LabVIEW will be the control software for the experiment. At the
end of the experiment, you should have some experience in

• Simple static and dynamic modelling of the DC motor system,

• Manual and feedback control of the system for velocity tracking

To benefit more fully from this session, students should read the
manual and answer the pre-laboratory questions (Q1-Q3) before
going to the laboratory.
Fig1. DC Servomotor

More pdf



Real –Time DC Motor Position Control by Fuzzy Logic
and PID Controllers Using Labview


Abstract
This paper presents the position control of a DC
motor using Fuzzy Logic and PID Control algorithms. Fuzzy
Logic and PID controllers are designed based on labview
program, and the real - time position control of the DC motor
was realized by using DAQ device. The experimental results
demonstrate that the responses of DC motor with FLC show a
satisfactory, well damped control performance.



Fig .3. The block diagram of proposed PID Controller structure

More pdf

DC Servomotor Controller
This is an experiment on the closed loop DC servomotor control
system (SMC). It will able to be used for practical use with/without
some modifications. The closed loop servo mechanism requires
real-time servo operations, such as position control, velocity
control and torque control. It will be suitable for implementation
to any embedded 32 bit RISC processors as a middleware. In this
project, these operations are processed with only a cheap 8 bit
microcontroller.

Figure 5. Operation diagram for the SMC (Cascaded control)
read more "Control DC Servo motor control"

Control System Modeling - Linear Permanent Magnet Motors



Two types of position dependent disturbances are
considered: cogging force and force ripple. Cogging is
a magnetic disturbance force that is caused by attraction
between permanent magnets and translator. The force
depends on the relative position of the translator with
respect to the magnets, and it is independent of the motor
current. Force ripple is an electro-magnetic effect and
causes a periodic variation of the force constant c. Force
ripple occurs only if the motor current is different from
zero, and its absolute value depends on the required thrust
force and the relative position of the translator to the
stator. Both disturbances are periodic functions of the
position. [9]

Cogging is negligible in motors with iron-less translators
[14]. Figure 3 shows the nonlinear block diagram of a
servo system with brushless linear motor. The nonlinear
disturbances are the velocity depended friction force
Ffriction, and the position dependent cogging force
Fcogging and force ripple




The friction force is modeled with a kinetic friction
model. In the kinetic friction model the friction force is a
function of velocity only. The friction curve is identified
with experiments at different velocities. The friction has
a discontinuity at





because of stiction. Stiction
avoid accurate measurement of the thrust force without
motion of the carriage. A survey of friction models and
compensation methods is given in [17].
Aim of the force ripple identification is to obtain a
function of the thrust force Fthrust versus the control
signal u and the position x. A possible solution to identify
this function is to measure the thrust force Fthrust at
different positions x and control signals u. In this case an
additional force sensor and a screw cylinder for manual
position adjustment is necessary. In order to measure the
force ripple accurately, without motion of the carriage, a
frictionless air bearing support is necessary [7]. A solution
to avoid frictionless air bearings is the measurement of the
thrust force with moving carriage. At constant velocities
the friction force is also constant and can be treated as
additional load force. In this case an additional servo
system is needed to achieve the movement [18].

The main idea of the proposed identification method is
to identify the force ripple in a closed position control loop
by measuring the control signal u at different load forces
Fload and positions x. Neither additional force sensor nor
device for position adjustment are necessary. In order to
avoid inaccuracy by stiction the measurement is achieved
with moving carriage. The position of the carriage is
obtained from an incremental linear optical encoder with
a measurement resolution of 0:2m. The experiment
consists of several movements at constant low velocity
(1mm=s) and different load forces (0 : : : 70N). The
output of the position controller is stored at equidistant
positions. A controller with an integral component is used
to eliminate steady position error. During motion with
constant low velocity the dynamics of the motor have no
significant effect on the control signal u.

Figure 4 shows the controller output u versus the
translator position x. In this first experiment there is no
additional load force attached to the carriage. The period
spectrum of the controller signal ui is carried out via FFT.








Source ( pdf )

http://www.inf.fh-dortmund.de/personen/professoren/

roehrig/papers/ldia01.pdf
read more "Control System Modeling - Linear Permanent Magnet Motors"