Back to search

The Ohio State University

Semantic Analysis of Ladder Logic

Abstract

dc:description

Purpose: A careful examination of Ladder Logic program reveals it’s hierarchicalnature and components, which makes it interpret able. Perhaps, using data miningtechniques to interpret the top level and sub level components can be really useful.This seems like a classification problem. The application of machine learning algorithmson the features extracted from ladder logic can give insights of the whole ladderlogic code. The components and their interactions are intuitive which certainly addto the probability of getting better results. The learning in the PLC programmingcan be alleviated by converting the existing PLC code to commonly used formatssuch as JSON, XML etc. The goal is to consume ladder logic sample, break it downinto minor components, identify the components and interactions between them andlater write them to JSON. As Ladder logic is the most commonly used programminglanguage for PLCs we decided to start the experiment with Ladder logic program samples.Feature engineering combined with machine learning techniques should provideaccurate results for the Ladder Logic data.Methods: The data set contains 6623 records for top level classification with 1421ALARM, 150 STEP SEQUENCE, 96 SOLENOID samples and 5304 UNCLASSIFIEDand 84472 records for sub level classification which contains sub level componentsof the all the ALARM and STEP SEQUENCE samples from the top level dataset. We extract the initial top level and sub level features from GX works. Theiiadvanced features like Sequence, LATCH and comments are extracted by parsingthe information from the output of GX works. The final set of features for Toplevel classification consists of basic features, advanced features, and comments. Dataset for Sub level classification has few more features apart from the already existingfeatures from the top level such as previous instruction - next instruction features(3Window), bi-gram features of the instructions and top level class( the result of toplevel classification). The result of top level classification and sub level classificationare filled into a JSON object which is later written to a JSON file.Results: We have classification results from the top level and sub level. Decisiontrees seem to work the best for both Top Level and Sub level classifications. Sincethe features are discrete we tried Decision trees, Naive Bayes and Support vectormachines. Performance result of each of them was: Decision Tree : Accuracy- 0.91, F1-macro- 0.90, F1-micro 0.90 Naive Bayes : Accuracy- 0.85 , F1-macro- 0.80,F1-micro 0.85 LinearSVC : Accuracy- 0.88 , F1-macro- 0.88, F1-micro 0.88For Sub level classification decision trees out perform any of the other classifiersDecision Tree : Accuracy- 0.90 , F1-macro- 0.91, F1-micro 0.90 Naive Bayes :Accuracy- 0.80 , F1-macro- 0.80, F1-micro 0.81 LinearSVC : Accuracy- 0.75 , F1-macro- 0.78, F1-micro 0.79Conclusions: A decision tree is the best suitable classifier for the purpose here. Thetuning of Decision tree classifier played important role in improving the performance.Using entropy as the classification criteria and restricted the depth of the tree to 6improved the performance of the classifier by 6

Degree

thesis:*
Name thesis:degree_name
Master of Science
Level thesis:degree_level
masters
Discipline thesis:degree_discipline
Computer Science and Engineering
Grantor dc:publisher
The Ohio State University
Year dc:date
2017

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Gad, Soumyashree Shrikant, Gad
Advisor dc:contributor.advisor
  • Parthasarathy, Srinivasan

Subjects

dc:subject × 2

Rights

dc:rights
Statement dc:rights
  • unrestricted
  • This thesis or dissertation is protected by copyright: all rights reserved. It may not be copied or redistributed beyond the terms of applicable copyright laws.
Language dc:language
English

Identifiers

dc:identifier.*

Chain of custody

source
Harvested from
OhioLINK
Base URL
etd.ohiolink.edu/acprod/odb_etd/ws/oai/oai
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
citation

Gad, Soumyashree Shrikant, Gad. Semantic Analysis of Ladder Logic. masters thesis, The Ohio State University, 2017. http://rave.ohiolink.edu/etdc/view?acc_num=osu1502740043946349