Opc 1 PDF
Opc 1 PDF
Opc 1 PDF
00
Printed in Great Britain. # 2003 TEMPUS Publications.
586
OPC-driven Data Exchange between Matlab and PLC-controlled System 587
Fig. 4. Matlab commands for communication with one input and one output.
Matlab was used which enabled communication order to configure this package and Fig. 4 contains
between the OPC and Matlab. This is a collection an example for a communication with one input
of additional commands which are available in the and one output.
Matlab environment and enable connection to any When testing the data transfer rate from a
OPC server. It is necessary to enter a few physical device into Matlab, a continuous
commands into the Matlab command window in sinus signal was used as shown in Fig. 5 where
OPC-driven Data Exchange between Matlab and PLC-controlled System 589
20 ms 60 ms
computer load since data transfer rates ranged of mechatronics and electrical engineering are
from 600 to 1200 ms. Furthermore, the computer taught in this course.
load had a higher influence on reading data into The process, which is connected to the PLC, is
Matlab rather than writing it into the PLC. composed of a flow meter and an electrically-
Finally, the experiment was performed under driven control valve. The overall system is shown
conditions for which the proposed solution is the in Fig. 3 and was described in a previous section.
most suitable: a transfer of data into Matlab for The aim is to control the mass-flow and a PID
simulations, optimisations and testing. In all these algorithm was chosen because it represents simple
processes data had already been acquired by a classical control which can also be `upgraded'. In
SCADA system (see Fig. 2). Thus, a standard addition, at this point in the educational process,
industrial automation system, but now with a the students have had significant exposure to this
link to Matlab, was used. It is important to type of controller and should be relatively comfor-
emphasise that in the described solution there is table in applying it to the mass-flow control prob-
no time delay between the data in Matlab and that lem. Several tests were performed during the
in the SCADA system since both of them are course of this study. However, for brevity, only
connected to the same OPC server. Furthermore salient results are reported. Students began a study
no delays in the operation of the system as a whole of the process in detail and observe the nonlinear
were noticed due to the additional OPC Client. steady-state characteristic (Fig. 8) which was
This option can, therefore, be used for educational, obtained using Matlab and OPC connection.
experimental and research purposes through Then a PID controller was designed in Matlab
having all the advantages of reliable and verified and the controller parameters were downloaded
industrial solutions. directly into PLC. As shown in Fig. 9 the control
was not equally appropriate over all operating
points which indicates a need for gain scheduling
control. Gain scheduling is then a two-step proce-
EXAMPLES OF USING OPC IN A dure where firstly, local linear controllers are
TEACHING PROCESS designed based on linearisation of the nonlinear
system at several different operating points and
The aim of the first example is the implementa- then a global nonlinear controller for the nonlinear
tion of a gain scheduling and adaptive control system is obtained by interpolating or scheduling
system for use in undergraduate engineering among the local operations point design. The
education. The system was developed to demon- combination of PLC, OPC and Matlab was used
strate the benefits of using a connection between again, and Fig. 10 represents a control using gain
Matlab and PLC and this is what senior students scheduling PID. For advanced students there is
Fig. 8. A nonlinear steady-state characteristic of the process. Fig. 9. Classical PID control.
OPC-driven Data Exchange between Matlab and PLC-controlled System 591
also a possibility to design and test an adaptive was changed every time and the same computer
PID controller using on-line identification proce- ran a server, two clients, as well as the SCADA and
dure in Matlab. We have to remember that this Matlab software. The measurements performed
process is controlled by PLC and realisation of show that, due to the fixed dead time, the worst
identification in PLC-code would be very difficult. results are obtained when transferring a single
Our second example of using OPC is also suit- piece of data only. A rate of approximately 1000
able for mechatronic educational purposes. We data per second can be expected with large quant-
have a six-axis Kuka robot at our faculty. The ities of data. The process data is available to
whole system is not very open and the students Matlab virtually at the same time as to the
have found experimenting, evaluating results and SCADA system which makes the application suit-
recording the data quite difficult. On the other able for industrial environments.
hand, there is a vendor-made OPC Kuka Server Two examples for use in undergraduate engin-
available. On-line connection between the robot eering education were also described. The first
and the Matlab could make these things easier. example describes a procedure where the OPC
Furthermore, in Matlab there is also on-line and connection between PLC and Matlab was used in
off-line analysis available for comparing the the educational process for teaching control. The
results, optimisation, etc. Moreover, we are real process was connected to the PLC and
seriously considering the feasibility of adding SCADA system which is quite common in indus-
some additional sensors (acceleration, force . . . ) trial practice. The OPC link to the Matlab was
and connecting these sensors via different PLCs then established and used for several purposes: to
and OPC servers onto the same Matlab/Simulink record the nonlinear steady-state characteristic of
window. In this case the amount of information the process, to download controller parameters
about the whole system would increase signifi- into PLC and also for On-line identification of
cantly, and there is also a possibility for OPC to the process. The second example describes a
become a universal platform, as was proposed by proposal for how to use the OPC connection
Mintchell [15]. between Matlab and Kuka robot to make
students' workload easier. The use of OPC in
laboratory experiments has generated many posi-
CONCLUSIONS tive results. Student reaction to the experiments
has been very good and interest has been increased.
In this paper a solution was proposed on how to The students seem to appreciate the `feel' that they
connect an existing system to the Matlab environ- gain from the laboratory experiments, as opposed
ment by using the OPC. Such a connection can be to a computer simulation.
used for monitoring industrial process data which The proposed solution demonstrates tech-
can then be used for the analyses and optimisation nologies that are just gaining widespread support
of procedures, early fault detection and diagnosis, today in industry and the examples illustrate that
further data processing or data documentation. OPC can form a flexible universal data platform
The proposed solution is particularly suitable for for factory floor automation. The techniques
systems where the industrial process must remain employed in these laboratory experiments will
unchanged, or must not be stopped. likely to be seen by the students in their subsequent
The performance testing system consisted of an employment after completion of their college
OPC server which captured data from the control- careers. The quality of graduates is improving
ler, it checked the data's quality, evaluated it for a and the industry is receiving engineers trained in
change of state, and then forwarded it to the OPC solving real-world problems. Our goal is to reduce
client who returned it along the same route once it the training period for new engineers when they
was processed. Synchronous reading was used for start work and we believe that our paper is a
the `worst case' scenario, where each piece of data contribution to this aim.
592 S. Persin et al.
REFERENCES
1. M. Janke, OPC-plug and play integration to legacy systems, Pulp and Paper Industry Technical
Conference, Atlanta, USA, 228±295 (2000)
2. Mitsugu Kishimoto, Optimized operations by extended X-Factor theory including unit hours
concept, IEEE Transactions on Semiconductor Manufacturing, 14(3), 2001.
3. T. G. Kirner Quality requirements for real-time safety-critical systems, Control Engineering
Practice, 5, 1997, pp. 965±973.
4. W. David Coit, Tongdam Jin, Prioritizing System-reliability prediction improvements, IEEE
Transactions on Reliability, 50(1), 2001.
5. Linda Wills et al., An open platform for reconfigurable control, IEEE Control Systems Magazine,
21(3), 2001.
6. J. Rodgerson, Teaching systems and control using Matlab, Int. J. Electical Eng Educ., Manchester
Univ. Press, Manchester, 6, 1992.
7. OPC Foudation, Data Access Automation Interface Standard 2.04, OPC Foundation (2001).
8. Wu Sitao, Using device driver software in SCADA systems, Power Engineering Society Winter
Meeting, Singapore (2000).
9. P. Studebaker. ALL For OneÐThe Top 10 Trends in Process Control. Control Magazine 1, (1998).
10. Al Chisholm, Intelluton Inc. OPC/OLE for Process Control Overview, World Batch Forum (1998).
www.intellution.com/opchub/opc_wbfoverview.asp
11. M. Stianko, Merz. OPC Server according to the Data Access 1.0 and 2.0 Specification: Technical
Descripton, Czech Avzomatizace Magazine, 11 (2000). www.merz-sw.com/articles/opc_da.php3
12. Mohamed Am, et al., Real-time implementation of a robust H-infinity controller for a 2-DOF
magnetic micro levitation positioner, Journal of Dynamic Aystems Measurement and Control
Transactions of the ASME, 12, 1995.
13. Al Chisholm., A Technical Overview of the OPC DataAccess Interfaces, Intellution Inc. (1998).
14. Frank Iwanitz, Jurgen Lange, OLE for Process Control, Huthig Gmbh Heidelberg, Germany
(2001).
15. G. A. Mintchell, OPC integrates the factory floor, Control Engineering, 1, 2001.
Stojan Persin received the B.Sc. degree in electrical engineering from the University of
Maribor, Slovenia, in 1995. From 1995 to 1999, he was with Metronik, Ljubljana, Slovenia
and was a senior engineer for industrial automation systems and afterward a manager at the
branch office. Since December 1999, he has been with Faculty of Electrical Engineering and
Computer Science, Maribor, Slovenia. He is currently working towards a Ph.D. in electrical
engineering. His research interests include industrial automation, building automation,
fault detection and diagnosis and intelligent systems.
Boris Tovornik received the B.Sc. degree in Electrical Engineering, from the University of
Ljubljana, Slovenia and M.Sc. and Ph.D. from University of Maribor, Slovenia in 1984 and
1991, respectively. He was a teacher of Electrical Engineering school, Maribor 1973,
engineer for automation, Ironworks Store 1975, engineer for automation at Drava river
Power plants 1977. Since 1978 he has been with Faculty of Electrical Engineering and
Computer Science, Maribor, Slovenia. He is Head of Laboratory of Process Automation
and holds the rank of Associate Professor. His fields of research interests are computer
control of industrial processes, modelling and process identification, fuzzy control,
intelligent systems and fault detection.
Nenad Muskinja received the B.Sc., M.Sc. and Ph.D. degrees in electrical engineering from
the University of Maribor, Slovenia, in 1988, 1992, and 1997, respectively. Since 1989, he
has been a faculty member in the Department of Electrical Engineering and Computer
Science, University of Maribor, Slovenia, where he currently holds the rank of Assistant
Professor. His research interests include industrial automation, adaptive control, sampled-
data control, fuzzy control, and intelligent systems.