6th International Symposium on Translational Research in Oncology
[IEEE 2009 6th International Symposium on Mechatronics and its Applications (ISMA) - Sharjah, United...
-
Upload
mohd-yunus -
Category
Documents
-
view
212 -
download
0
Transcript of [IEEE 2009 6th International Symposium on Mechatronics and its Applications (ISMA) - Sharjah, United...
Proceeding o/the 6th International Symposium on Mechatronics and its Applications (ISMA09), Sharjah, UAE, March 24-26,2009
REAL-TIME MACHINE CONTROLLER VERIFICATION AND SIMULATION USING CONTROLSIGNALS EMULATION
Mohamed Hussein
Universiti Teknologi MalaysiaFaculty of Mechanical Engineering
81300, Skudai, Johor, [email protected]
Robiah Ahmad
Universiti Teknologi MalaysiaFaculty of Mechanical Engineering
81300, Skudai, Johor, [email protected]
ABSTRACT
The research study explores different types of controllersimulation and verification methods and proposes a new methodwhich employs the use of a control signals emulator. The researchstudy has formulated a novel technique for emulating quadratureencoder signals to provide virtual closed loop control ofservomotors. The deployment of a control signal emulatortechnique makes the system unique and removes its dependencyon proprietary hardware or software. Enabling the real-time datafrom the signal emulation environment eases the task of realisinga real-time machine simulator.
1. INTRODUCTION
Having a fully tested control system is vital [1]. The onlycertain way to test how a control system handles every possiblesituation is to write the code, install it in the controller, and try itout on the system. Normally, testing takes place during the startup phase of the system to be controlled which is an expensive,risky and error-prone way of developing control systems [2]. Thisis also a very costly means of uncovering design flaws. A controlsystem failure can shut down the plant and require expensivemodifications. In the worst case, the entire control system mayhave to be scrapped, redesigned, and rebuilt [3]. One of the mostimportant questions that have arisen since is how to verify controlsystems and control logic. Methods for off-line programming andverification of industrial control systems have been developedover recent years (see [4], [5] and [6]). Although off-linesimulation can be used to help address the control systemverification requirements, additional desired features for systemverification (such as real-time capabilities, auto code generationetc.) still have not been fully accomplished. Several researchers([7], [8] and [9]) have explored improved methods for industrialcontrol verification but almost all the projects reported aresolutions for specific application or for particular developmentframeworks. Several successful implementations have been
Mohd Zarhamdy Md Zain
Universiti Teknologi MalaysiaFaculty of Mechanical Engineering
81300, Skudai, Johor, [email protected]
Mohd Yunus Abdullah
Universiti Teknologi MalaysiaFaculty of Mechanical Engineering
81300, Skudai, Johor, [email protected]
realised of industrial control system emulators (see [1], [10] and[11]), however these systems only partially address the followingimportant areas:
ability to provide real-time off-line programming,verification and optimisationsimulation/emulation of the system with discrete,analogue and hybrid control signalssoftware and hardware independent architecture, i.e. thearchitecture is not dependent on any specific simulationsoftware or industrial control system manufacturer. Inother words, the ability to mix and match simulationsoftware and control systems from different vendors inone application.full synchronisation between the simulated environmentand the real system. A system is said to be real-timeonly if it is correct in operation dependent upon not onlyits logical, but also its temporal behaviour.
Since the advancement of computer technology (softwareand hardware) efforts have been made to close the gap betweenthe virtual and physical environment. In general, there are fourpossible approaches to test control systems which can bedistinguished based on the possible combinations between realityand simulation as shown in Fig. 1 and can be described as follows[1, 2]:
i. The traditional way: Both the controller and systemalready exist. The control system is tested afterinstallation.
ii. Offline simulation: Both the controller and the systemare simulated.
iii. Real System Virtual Controller: Combination of asimulated control system and a real system.
iv. Real Controller Virtual System: Combination of a realcontroller and a simulated system.
978-1-4244-3481-7/09/$25.00 ©2009 IEEE ISMA09-1
Proceeding o/the 6th International Symposium on Mechatronics and its Applications (ISMA09), Sharjah, UAE, March 24-26,2009
.........
.........(i) traditional
(iii) real system virtual
(ii) offline
(iv) real controller virtual
rp}:MotionControTIer---------I~7"~
I I \I . ' I "I motiOn I
: control commands motion :I program generator II II II I~ ---------- 1
feedbackencoderssignals
Fig.l Testing controller system approaches
Beside the traditional way (offline simulation), the otherthree methods described above make use of simulation as a toolfor system verification and validation.
For long, offline simulation has been accepted as a good toolto verify and validate control program. However most of the timethe program generated in virtual environment is not directlyapplicable to the real controller. Time and again the program hasto be modified and refine before it can be used. Moreover, thereare thousands of controllers using a variety of in-house developedsoftware to adapt to the market conditions. Current trends suggestthe use of combination between reality and simulation. Theadoption of reality into simulation has been proven to be veryuseful and can also be used beyond program verification andvalidation.
2. MACHINE CONTROL
Machines are controlled by devices called controllers.Modem industrial controllers which are used in industriesbasically are microprocessor based equipment which requiresprogram instructions, make the control calculation and execute theinstructions by transmitting the proper commands to actuatingdevices. in machine system, servo control is more prominent andvital because a lot of servomechanisms are being used and thesampling rate is very fast (milliseconds).
For servo axis movement in modem automated machineapplications, the set point needs to be generated automatically.Modem industrial controller is equipped with motion controlsystem which is used to generate set points over time. An exampleof a motion control system is shown in Fig. 2. The motioncontroller accepts commands or other inputs to generate a motionprofile using parameters such as distance to move, maximumacceleration and maximum velocity. The motion profile is thenused to generate a set of set points, and times they should beoutput. The set point scheduler will then use a real time clock tooutput these set points to the motor drive [11].
In feedback control system the motor angular displacementand speed is measured by mean of motor encoder and is comparedwith the motion profile. Any mismatch between the measuredprofile and the motion profile will trigger the error routine of thecontrol program.
Fig.2 Typical motion control system
a. Controller Signals ClassificationThe type of signal existing in machine operation can be divided
into three types and are classified into three categories. They are:
• Discrete Digital SignalThese are signals from sensors which are normally used
for discrete events. They only have two states; ON and
OFF or HIGH and LOW. Examples of this type ofsignal are from limit switches, proximity sensors, push
buttons, etc.
• Analogue SignalThese are sensors/transducers signals which typically
vary smoothly and continuously over time. In most
control applications, analogue signals range
continuously over a specified current or voltage range.
Examples of these types of signals are frompotentiometers, tachogenerators, LVDTs, etc.
• Continuous Digital SignalThese are signals from sensors which have two states
HIGH and LOW but are produced continuously.
Examples of these types of signals are from incrementalencoders, absolute encoders, etc.
It should be noted, if these controls signals are to be emulated,
the emulation of the first two types of signals is relatively straight
forward; emulation of the third is found to be very challenging.
Continuous digital signals are considered more important than
analogue signal for machine applications especially wheninvolving encoders [12].
3. CONTROLLER VERIFICATION USING CONTROLSIGNAL EMULATION
In this study, the use of control signal emulation is
suggested for real-time controller verification and machine
simulation. In the integrated system the dynamics of the machine
system is not a concern. What are of concern are the real-time
ISMA09-2
Proceeding o/the 6th International Symposium on Mechatronics and its Applications (ISMA09), Sharjah, UAE, March 24-26,2009
ability to mimic the encoder behaviour is crucial.In order to achieve the above, the hardware for the encoder
signal emulation was designed based on the schematic diagramshown in Fig. 4. Within the circuit, based on a single clock signal,two outputs A and B are generated. Output A is based on thefalling edge of the clock signal and B on the rising edge. A signaldivider is used in such one output signal is produced after twoclock signal edges (either rising or falling) has occurred.
interactions between the target machine system to be controlledand the control system. In this case, both the target machinesystem and the associated control system are of interest. Theultimate objective was to realise machine system solutions withthe receptivity, rapidity and agility required by control systemdevelopers and machine builders. The simplified systemarchitecture is shown in Fig. 3. Within the system the SignalEmulator Module provides real-time feedback signal accuratelyand timely. Thus, no error will be triggered in the controlprogram. The emulated signals information is then used to drivethe 3-D virtual machine. inverter
signaldivider switch amplifier
:MotiooControTI~----------:
: motion :: control commands motion 1
1 program - generator :- - - - ~1 11 11 11- : :: ~ ,
,
Clock
nsignal
divideramplifier
output A
outputB
Fig.3 Simplified controller verification and simulation usingsignal emulation system architecture
Current trends shows that all modem machine uses servomotors which have digital encoders as their feedback element.These digital encoders produce continuous digital signals. It
should be noted that the quadrature encoders are most prevalent inindustry because of their ability to provide direction of rotationbesides its ruggedness and simple wiring ([9] and [12]). Since, atpresene, there is no hardware yet available to mimic thecontinuous digital signals behaviour of quadrature encoder incomparison to analogue signals; the ability to produce one isconsidered novel and important to prove the feasibility of theemulated control signals system. In this paper, the emulation ofthe quadrature encoder will be discussed in detail.
Fig.4 Schematic diagram of encoder signal emulator
Clock
A digital switch with external trigger is used to produced aninverted A (A) signal. An inverted A signal will cause output Aleading output B. Hence, emulates the counter clockwise rotationof the encoder. The timing diagram of the clock, output A, outputB and inverted output A (Le. A) is illustrated in Fig. 5. Amplifiersare used to strengthen the clock signals so that a perfect squarewave is maintained throughout the process.
The clock frequency is changing throughout the wholeencoder emulation process. Hence, the clock signal generatorshould able to change its frequencies timely and accordingly. Acommercial stepper motor driver is used to produce the clocksignal for the encoder signal emulator circuit. The stepper motordriver used is a PC-based. The use of stepper motor driver istwofold. Firstly, the stepper motor driver is capable to produce therequired clock frequencies. Secondly, there is similarity betweenstepper motor operation and servo motor operation. Thus, it iscapable to adapt with almost all motion commands.
emulatedfeedbackencoder signals
",-~~----
EE!~~r ~~[l·~~~~~;J
control signalsrequest
signalsdata3-D
VirtualMachine
a. Encoder Signal EmulationFor the system to function, it is important to be able to
emulate the behaviour of the quadrature incremental encodercorrectly. The produced emulated encoder signal is used as theinput signal to the real controller in continuous feedbackoperation; a defective signal can easily trigger an error in thecontroller and will crash the whole system program. Thus, the
II I
output A -+-t~-.----...-I :
output B --f II II I
output AT1 _
II I
- .....--rlI I
! II II I__......~...-U
1 At present there is encoder simulator available in the market. Theproduct is introduced in October 2006 by Plant Control and AutomationPty. Ltd., an Australian company. However the simulator can only beoperated manually which is not appropriate for proposed applications.
Fig.5 Timing diagram of input clock, output A, output Bandoutput A
ISMA09-3
Proceeding o/the 6th International Symposium on Mechatronics and its Applications (ISMA09), Sharjah, UAE, March 24-26,2009
b. Control Signals Emulator Testing and EvaluationA demonstrator system was built to illustrate the use of the emulated
control signals system. The demonstrator is based on a six degree of
freedom (DOF) Silver Reed ARX articulate robot. The robot consists offour moving axes (only three was used in the study) and nine sensors, and
it represents a machine with mixed continuous and discrete operations.
The controller used for the study is a NextMove; a commercial PC-based
industrial controller produced by Baldor Corporation. Throughout the
building of the system, the robot is regarded as a generic machine for
industrial applications. IGRIP (Interactive Graphics Robot Instruction
Program) simulation package from Delmia Corporation is used for
constructing the virtual environment ofthe machine (the robot). Within the
system, the real controller is used to drive the machine 3-D model with the
assistance of the emulated control signals. Fig. 6 shows the system
prototype.
Fig.6 Prototype of controller verification and simulation using
signal emulation system
Table 1: Encoder emulator configuration for accuracyevaluation
Axis SPEED ACCEL. DECEL. MOTION
Axis 1 20 1000 1000 0° to 100°
Axis 2 20 500 500 0° to 120°
OmmtoAxis 3 10 1000 1000
75mm
4. RESULTS AND DISCUSSIONFig. 7 to Fig. 9 shows the graphs of velocity and
displacement in respect of time for the three axes of the encoder
emulators. Comparison is made on the time taken to reach the
desired position theoretically and from the tests. The results are
tabulated in Table 2.
Angular Velocity vs Time for Encoder Emulator (Axis 1)
25UCD~ 20d»CD:E. 15~'u0 10Q)>'-ca 5'3C)cca 0
-5 time (sec.)
(a)
Angular Displacement vs Time for Encoder Emulator (Axis 1)
Fig.7 The (a) angular velocity and (b) displacement profiles ofencoder emulator for Axis 1 (0° to 1OOomovement)
The test and evaluation on the encoder emulator covers two
main aspects, firstly, to test and evaluate the capability of thesignal emulators to produce the required signals and secondly, to
demonstrate that the encoder emulator is able to provide real-time
capabilities. The initial test was on the encoder emulator. Eachencoder emulator is initiated to produce a motion signal for
movement between two positions. The individual emulator
encoder speed and position data are then recorded. The
configuration for each axis is as shown in Table 1. The speed,acceleration and deceleration units are correspond to the
movement type of each individual axis.To access the real-time capability of system, two identical
NextMove controllers were used to drive the emulated control
signals system and the real machine separately. A five loop
kinematics test was carried on both systems. Both systems were
given the same movement sequences. Comparison was then made
between both sets of systems' data.
12o10o
8g» 0:E. 6-5 0c 4ca 0
2oo
20 time (sec.)
(b)
ISMA09-4
Proceeding o/the 6th International Symposium on Mechatronics and its Applications (ISMA09), Sharjah, UAE, March 24-26,2009
Angular Velocity vs Time for Encoder Emulator (Axis 2)
~ 25'uoQ) 20>
15
-5time (sec.)
(a)
Table 2: Comparison between theoretical and actual timetaken for emulated encoder signal to reach a desired positionfor all axes.
Axis Movement teal. tactual 0.4
(sec.) (sec.) error
Axis 1 0° to 100° 5.020 5.012 0.159
Axis 2 0° to 120° 6.040 6.135 1.573
Axis 3 omm to 75 mm 7.510 7.498 0.160
time (sec.)
time (sec.)
Velocity vs Time for Encoder Emulator (Axis 3)
From the comparison it shows that the time difference toreach a target position between theoretical (column 4) and actual(column 5) is not more than 0.1 second with the highest errorbeing 1.573%. If the percentage error can be regarded as thepercentage of servo error, then the emulator encoders' capabilityare considered acceptable because the satisfactory servo error isbetween 2% to 5% [10].
It should be noted that the encoder emulator for Axis 2produces the most error. It is apparent in the graph shown in Fig. 8(a) that instability exists within the Axis 2 encoder emulatoroutput. This instability was probably due to electrical noise and/orexternal interference.
Fig. 10(a) and (b) shows the results from five loops testscarried out on both the emulated control signals system and thereal system (for Axis 1 only). The position and velocity graphs ofthe real system are superimposed onto the encoder emulatorposition and velocity graphs.
From the graphs it clearly shows that the emulated controlsignals system motion profiles coincide perfectly with the realmachine motion profiles for the axis. Furthermore, the emulatedencoder produces perfectly clean motion profiles compared to thereal system.
The crudeness in tuning the control parameters (PIDparameters) result in unclean motion profile of the real machine.
o
-2
12
10
i a~E 6E~4'u~ 2>
Angular Displacement vs Time for Encoder Emulator (Axis 2)
140
120
100
aoCD'"":"
-g»l60ca-
40
20
o-20
(b)Fig.8 The (a) angular velocity and (b) displacement profiles of
encoder emulator for Axis 2 (0° to 120° movement)
(a)
Displacement vs Time for Encoder Emulator (Axis 3)Angular Velocity vs Time Graph for Repetitive Movement
(Position: 0 • 100 • 0) for Axis 1
ao706050
40
~OaO10o
-10time (sec.)
(b)Fig.9 The (a) angular velocity and (b) displacement profiles of
encoder emulator for Axis 2 (Omm to 75mm movement) (a)
ISMA09-5
Proceeding o/the 6th International Symposium on Mechatronics and its Applications (ISMA09), Sharjah, UAE, March 24-26,2009
Angular Displacement vs Time Graph for Repetitive Movement(Position: 0 • 100 • 0) for Axis 1
(b)
Fig.IO The (a)angular velocity and (b)displacement profilecomparison between emulated control signal system andreal system for Axis 1 (0° to 100° movement)
5. CONCLUSION
This paper has describes the general use of control signalemulation system which is intended to help machine designers andmachine builders to work with their machine in real-time althoughthe machine itself has not necessarily been built. This newapproach is based on control signal emulation. The study hasresulted in the formulation of a technique for emulation ofquadrature encoder signals. The proposed technique can be usedfor servomotor control testing and verification. The devisedencoder emulator is programmable; hence, it can help to providethe desired signals for the control feedback element.
6. ACKNOWLEDGEMENTS
The authors would like to thank the Malaysian Ministry ofHigher Education (MOHE) and Universiti Teknologi Malaysia(UTM) for their continuous support in the research work.
7. REFERENCES
[1] F. Auinger, M. Vorderwinkler and G. Buchtela, "InterfaceDriven Domain-Independent Modeling Architecture for'Soft-Commissioning' and 'Reality in the Loop' ",Proceedings of the 1999 Winter Simulation Conference,1999, pp. 798-805.
[2] A. Pfeiffer, B. Kadar and L. Monostori, "Evaluating andImproving Production Control Systems by Using
Emulation", lASTED International Conference on AppliedSimulation and Modelling (ASM 2003), Spain, 2003.
[3] V. Van Doren, "Test Your Control System with Simulation",Control Engineering, September Issue, 2003.
[4] B. K. Min, A. Huang, Z. 1. Pasek, D. Yip-Hoi, F. Husted andS. Marker, "Integration of Real-time Control Simulation toVirtual Manufacturing Environment", Journal of AdvancedManufacturing Systems, Vol. 1, No.1, 2003, pp. 67-87.
[5] S. F. Scheiber, "Emulation and Control System Assurance",Control Engineering, November Issue, 2003.
[6] T. LeBaron and K.Thompson, "Emulation Of A MaterialDelivery System", Proceedings of the 1998 WinterSimulation Conference, 1998, pp 1055-1060.
[7] F. Danielsson and P.R. Moore, Validation, "Off-LineProgramming and Optimisation of Industrial Control Logic",Mechatronics, Vol. 13. Issue 6, 2003, pp. 571-585.
[8] R.1. Stone, "Virtual Reality: Definition, Technology andSelected Engineering Applications Overview", MechatronicsForum Paper, May 1998.
[9] Encoder Products Company (EPC), Product descriptions,http://www.encoder.comlproducts.html [Accessed: 1 March2007].
[10] National Instrument (NI), "Understanding Servo Tune",http://zone.nLcomldevzone/cdaltut/p/id/2923 [Accessed: 6June 2007]
[11] H. Jack, "Dynamic system modeling and control", Draft Ver.2.6, Unpublished, 2004.
[12] M. Hussein, P. Moore, J. S. Pu and C. B. Wong, "QuadratureEncoder Signal Emulation for Integrated Real-VirtualEnvironments and Systems", International Conference onIntelligent and Advanced Systems, ICIAS 2007.
ISMA09-6