Introduction
Figure 2: System Overview
This system consist of three main applications which are control system,
database application and monitoring system. Control system communicate with the air heater through a USB 6008 DAQ device or through the Raspberry PI
computer. Also, control system has posibility of simulate the mathematical model of the system. Four variables (air heater output temperature, control voltage,
set point and ambient temperature) will be sent to the database application through a OPC server. Database application receibe these four variables through
the OPC server and these will be stored in a SQL database which has been deployed in Azure cloud service. Monitoring system will read those variables and will
display on the web page. Monitoring system also has been deployed in the Azure cloud service.
Following technologies have been used by this system.
- IIoT and Industry 4.0
- OPC UA
- Database Systems-SQL Server
- Web Technology-ASP.NET
- Microsoft Azure (Cloud Platform)
Stability Analysis
Before moving into the controlling system, it is good to perform a
frequency response stability analysis to have a idea about PI controller tuning parameters. Python script has been written to carry out this
analysis and resulting plots have been mentioned in figures 4, 5 and 6.
Figure 3: Python Code for the Stability Analysis
Figure 4: Step Response
Figure 5: Bode Plot
Figure 6: Poles and Zeros for the selected controller parameters
Figure 7: Pole values, PM and GM
Control System
Control system was developed in LabVIEW. It can simulate mathematical model and also it can be
connected to the real air heater by using USB6008m DAQ device. Front panel of the control system is shown in the figure 8. It send data to the database application
via OPC communication. OPC server information and nodes information are shown in the figure 9.
Figure 8: Front panel of the control system
Figure 9: Server and nodes information of the OPC communication
LabVIEW application was developed by using the state machine. Figures 10 to 14 shows the states
of the application for different purpases.
Figure 10: State for initilization
Figure 11: State for changing between pages and for button events
Figure 12: State for PI controller
Figure 13: State for air heater operation
Figure 14: State for OPC communication
In addition to the control system, OPC server also was created with LabVIEW. Front panel of the OPC
server is shown in figure 15 and block diagram is shown in figure 16.
Figure 15: OPC UA Server
Figure 16: Block diagram of the OPC UA Server
Database Application
Database application was developed by C# programming. It has a login page as shown in the figure 17.
Figure 18 shows the main window of the program. It has button to coonect and disconnect with the OPC server. Also it has buttons to start and stop data logging
into the SQL database. Also it plot the current OPC reading.
Figure 17: Login window for the database application
Figure 18: Main window of the databse application
SQL Database
Database has 4 tables and ER diagram is shown in the figure 19. Figure 20 shows the SQL Query
used to create the tables and figure 21 shows the trigger which is generate alarms. From figure 22 to 24 shows data inside the tables.
Figure 19: ER Diagram
Figure 20: SQL query to create tables
Figure 21: SQL query to make a trigger for creating alarms based on the temperature value
Figure 22: Table for data storage
Figure 23: Table for users
Figure 24: Table for limits
Monitoring System
Figure 25: Login page
Figure 26: Data monitoring page and data plots
Cyber Security
Following methods have been used by this system to increase the security.
- Different users for SQL Database for reading and writing (Figure 27 and 28)
- Using combo box to filter data signals – Prevent SQL Injection (Figure 29)
- Introducing login pages for Database Application and Monitoring System (Figure 30)
Figure 27: Different permissions for different users
Figure 28: Use different users for different application based on the permissions without using sa user
Figure 29: To prevent SQL Injection
Figure 30: Login pages
Discussion
In this project, following tasks have been mainly focued.
- Controlling
- Data communication
- Data logging
- Data monitoring
PI controller parameters should have a good Kp and Ti and make the system stable. That is the purpose of the carrying out stability analysis. PI controller
can have different parameter sets abd based on this, some properties like time constant and system overshoot can be different. Control system made by the LabVIEW
has simulator that can be run the mathematical model. Purpose of this is to simulate the system before testing on real prototype. However, it is also possible
to add time delay and then the mathematical model will be much accurate. Control system has a low pass filter and purpose of this is to cancel the noises
generate in the temperature sensor. OPC UA communication has been established to send data to the database application which has been developed by the C#
programming language. Further, it is possible to use MQTT or Modbus protocols for data communications. Database application has different security measures to prevent unauthorized access for the application and database itself. SQL database
has been used to store the data and seperate users have been created for reading and writing for the database. ASP.NET core web applcation has been developed to monitor
the data and alarms. Also, recent data are shown in the plots. Following features can be added to improve the user experience and security.
- Login page for the control system
- Can be introduced an option to create new users to access database application and web app
- Can be introduced log out option
- Monitoring system can be introduced to search historical data within the given time frame
- Monitoring system can be introduced alarm acknowledgement option
- Data encryption before communication
Conclusion
As mentioned in the discussion, this project has been mainly focued on controlling, data communication, data logging and data monitoring. Therefore, this
can be identified as a SCADA system which provide real time data acquisition. Here, system mainly handling the data by using communication protocols, it is
necessary to establish essential security measures. When creating database tables, it is essential to focus on structure of the present data and possible future
data and it is possible to add new data when available without having many changes to current structure.