100 likes | 231 Views
From control software to control systems. Wojciech Kurek. Why?. Lets assume we have a control system simulation implemented in Matlab, This system meets the desired specs What next?. Implementing the control system. We do not want to use Matlab on site, because:
E N D
From control software to control systems WojciechKurek
Why? • Lets assume we have a control system simulation implemented in Matlab, • This system meets the desired specs • What next?
Implementing the control system • We do not want to use Matlab on site, because: • The cost of industrial licence is high • Maintenance of Matlab is expensive and requires a PC class computer on site • Reliablecontinousoperation of computational unit isrequired!
What can we do then? • Take the code and rewrite it in C/C++ or other programming language • Compile the Matlab code using Matlab Compiler and get: • Standalone application • Shared library • C/C++, NET or COM component or Java class
Issues with porting the code • A simple control algorithm (i.e. PI controller) can be easily ported to C/C++ or other • However, we require something more that copying the code; we need to get a robust code • Code that is safeguarded against malformed input data, • Immune to malicious attacks • Reliable • Execution time
Why use Matlab instead of writing the code directly in C/C++ • Rapid prototyping environment is needed to test new algorithms • Matlab is very easy to debug • Using rapid prototyping allows us not to consider the data types, hardware limitations, connectivity issues etc. • Rapid prototyping allows us to use simulation models thus reducing the time and cost of developing new control solutions • Next step – hardware-in-the-loop
Storing data • Lest assume that we have all the control software in place; what we need next is monitoring and data logging • A simple SQL database is insufficient as it can be insecure due to • input - output data rates • consistency issues when large amount of data is considered
Using recorded data • Consider a system that has pressure and flow recoded in a database. What potential problems can be encountered? • Missing and/or malformed data due to communication errors • The time instant when the measurement is performed not necessary coincide with each other
Example potential problems with recorded data • We have a monitoring system that checks if pressure and flow relation meets the specified formula • The pressure and flow are measured and recorded in a database with a time stamp correponding to the measurement time instant • Can we use the data directly? Why not?
Things to be considered • Security of systems – i.e. recent SCADA systems hacker attacks • Security of data – frequent backup • Reliability • Communication links usage