Real-time Performance Improvement of EPICS on F3RP61Yokogawa Electric Corporation
agendaEPICS on F3RP61 Features of F3RP61Stability and Record Application ExampleReal-time Performance Latency Measurement Measured PerformanceDemonstration Video 2011Conclusions
EPICS on F3RP61KEK placed a request for FA-M3-PLCs CPU, F3RP6x (e-RT3), to run LinuxEPICS device support and driver for F3RP61 was developed by Mr. J.Odagiri (KEK) To turn PLCs themselves into IOCsMost of ladder programs can be replaced with EPICS SequencerFor fully EPICS-based front-end controlRapid application development cycleEasier maintenanceFiner and more flexible control
Features of F3RP61Pb free RoHSOperating SystemLinux and VxWorks availableProcesser and InterfacePowerPC 533MHzEthernet x2, Serial IO, IEEE1394, CF CardCan use many kind of PLC modulesMaintenanceOperation under 55 circumstance Long term product supllyOther featureMulti CPU Function, I/O Open
Stability and Records F3RP61 has served as IOC for more than two years to prove its stabilityThe number of F3RP61-based IOCs has reached dozens in the KEK sites (Tsukuba and Tokai)KEKB (Main Ring / Linac) / PF-Ring / PF-AR / J-PARC / cERL etc.Standard kernel 2.6.24.3/2.6.26.8-basedModification was minimized in the porting
Application Examples
Real-time PerformanceLatest Board Support Package(BSP) supports CONFIG_PREEMPT_RT optionAll improvements are in the kernelMore preemptive than CONFIG_PREEMPTLarge part of interrupt handlers were demoted to kernel threads to give way to real-time threadsNo changes in APIsNo need to modify applications already in operationJust choosing uImageRT in the BSP will do it for you
Latency MeasurementLatency Measurement by using fixed cycle interruptWith CPU load caused by hackbenchhackbench creates many processes communicating with each other under the schedulers control
1ms/2ms
Fixed cycle interruption
Fixed cycle interruption
CPU Timer
Kernel
Test App.
Ideal start time
Actual start time
Latency
Measured PerformanceTable for Latency frequency distribution of application start of fixed cycle with I/O process(load : hackbenchLatency [micro second]Appearance [times]
Max. Latency1,065 92
StandardPREEMPT_RT
Demonstration Video 2011Inversed pendulum controlled by EPICS on F3RP61A metal bar on a movable cartMonitor inputAngle of the pendulumPosition of the cartControl outputVelocity of the cartBy using an EPICS special recordDeveloped by Dr. N. Yamamoto (J-PARC)To calculate the feedback outputBy processing the record every 0.005 second
ConclusionsA new type of EPICS IOC was realized with F3RP61Widely adopted in EPICS-based accelerator control for various purposesSignificantly improved real-time performance with PREEMPT_RT patchTo Extend the range of applications
We do need feedback from EPICS users for further improvements
************