Digital-Analog Input/Output Device with the Matlab/Simulink Environment in Real Time Mode.
The development of automatic control systems of technological processes and production is closely connected with the collection and date analysis on the control object. The software MATLAB / Simulink is more preferable for data analysis, identification of the model control object and synthesis of control systems , , . The software package allows to make researches of student scientific researches and serious scientific ones, allowing to develop your own solutions using the built-in programming language. It is necessary to make experiments on real equipment with obtaining empirical data for consolidate the theoretical knowledge and confirm the effectiveness of the developed control algorithms.
The most appropriate equipment for these tasks are DAQ-devices (Data acquisition), which are presented by Nation Instruments , , . DAQ devices can work with a wide range of signals; they have a high-speed inner tire with convenient high-level system, but DAQ ones are expensive. Industrial input-output devices , , equipped with a network interface (RS485, Ethernet, RS232) can be used as alternative clients. These devices can work directly from the MATLAB / Simulink field via the OPC driver or via manually created network exchange code. This approach allows you to organize two-way data exchange, but with high delays, that can play a good role in the process of control dynamic objects in real time. The developments are known [9-10] with using low-budget equipment as DAQ devices, but these devices do not need an electromechanical compatibility with standards of industrial automation.
2. Problem statement
According to the work, the task is to develop the input-output device for industrial signals, which makes possible to obtain data in real-time conditions which are sufficient for solving the learning tasks of researching control systems and scientific research developing new and improve existing control algorithms. The device should be maintainable, cheap and developed with using transparent technologies for exchanging two-way data.
3. Field of application and tasks of the input-output device
The main propose of input/output devise is transferring data between the virtual implementation and the real object. Laboratory stand, industrial technology process and programmable logic controller can serve as a real object and a similar objects in a Matlab / Simulink field can be served as a virtual object. Thus, we can use input/output device in two base configurations. The first type configuration (fig. 1) is aimed to train identification skills of control object, to research its description, to synthesize and research the regulator of the control object in real time. This configuration is appropriate as for educational purposes and as well as for scientific work and for development new algorithms.
The second type configuration (fig. 2) is used to implement new modern algorithms, to control technological process, to train skills of programming control systems on industrial equipment with next training on virtual object. This approach provides an unlimited number of virtual control objects in MATLAB/Simulink with visualization of the process for education and organization laboratory or practical classes. It allows to get empirical data on the effectiveness of new control algorithms before their implementation and validation on real industrial objects.
4. Technical solutions of the input/output device
In accordance with requirements, the block-diagram of device is showed on fig. 3. 8-bit microcontroller ATMega2560 is chosen as a processing core, it has a sufficient processing power 16MIPS for signal processing, user programs and organization of necessary communication interfaces with external equipment. Using a specialized program loader in the microcontroller by open project <<Arduino>> will allow to convert the microcontroller to a DAQ device for two-way data exchange with the Simulink. Data exchange between the microcontroller and the top-level system is realized through USB or Ethernet interfaces inside the interface module. This configuration allow to make some researches, data capture and real time control of technological process.
For creation communication input-output device in real time with real control object or programmable logical controller, we developed the modules of digital input-output operations with appropriate industrial standard 0-24V according to the industrial standard  and also the models of analog input-output operations with appropriate industrial standard 0-10V . On fig. 4 digital input channel is showed. Its contents are D1 and D2 LEDs, which are indicate about wrong connection and about logic "1" level of signal.
The U1 optocoupler is used to protect the input circuits of microcontrollers and matching signals level. Trigger Schmitt U2 is used for forming a logic level and for the input of the microcontroller. The U3 signal inverter changes the signal after the trigger transmits direct signal for ATMega2560 chip through the current limiting resistor R3.
Digital output channel (fig. 5) consists of optocoupler U4 which matches signal levels between microcontroller and MOSFET Q1, fuse FU1 which protects short circuit and LEDs D3 and D4 as indicators. Without signals on the input circuit of optocoupler, the gate of transistor Q1 has a voltage 24 V, which makes a difference between potentials GateSource channel to 0 V.
Microcontroller makes a logic <<1>> signal on the input circuit of optocoupler, and it opens the last one, which makes potential on transistor's gate close to zero. Also, difference between potentials Gate-Source channel is going to max, which is fully open transistor. Also, difference between potentials Gate-Source channel is going to max, which is fully open transistor. Power current from drain Q1 passes through the fuse FU1 to load. There is LED D4 with the limited resistor R8 in parallel with load here. If there is a short circuit or unacceptable load on the output channel here, the fuse opens power circuit. After that circuit with the LED D3 and the limited resistor R7 will signal about emergency operation.
For measuring operations in range 0-10V is used 10-bit analog-to-digital convertor in microcontroller ATMega2560 (on fig. 6).
Voltage divider on resistors R9-R10 is installed on input circuit. The operation amplifier (AO) U5, which workes in voltage limit mode, has limiting input voltage on ADC in range allowed for microcontroller 0-5V. While input voltage is smaller then 5 V, operation amplifier is in a positive SATURATION, which makes diode in REVERS SHIFT and doesn't work in circuit. Input voltage is gone to output through resistor R11. When input voltage is bigger than the limited, output voltage on AO changes its sing, diode opens, feedback circuit is closed, and on the output of circuit is setting limited voltage.
The analog output channel (fig. 7) consists of the microchip U4 (12-bit digital-to-analog converter), which receives digital value via I2C tire and generate voltage in range 0-5V. Convention of signal to standard industrial 0-10V takes place through operation amplifier, which works in amplifier mode. On this circuit, the signal 0-5V is applied to noninverted amplifier's input. The amplifier circuit has series inverted feedback by voltage, which created by resistor R13 and applied on inverted amplifier's input.
5. Experimental study of input-output devices
The investigation of the module was done at a compact station, which could meet the goals of holding liquid, spending and pressure level. Schematic structure of the compact station is shown in the fig. 8. The station operates with 3 analog output signals (level, spending and pressure) in the range of 0-10 v; with 1 analog input signal (pump speed) 0-10 v; with 2 digital output signals (extreme positions of the liquid level in the tank) 0-24 v; with 2 digital input signals 0-24 v (analog/discrete operating mode and discrete pump control).
The test is a permanent control for the pump to achieve the free motion of the controlled object. During the experiment, the input/output module continually reads the analog parameters of the station (level, spending and pressure) and transmits their values to the Simulink model, where they are recorded for further analysis. The Simulink model which was used during the experiment is shown in fig. 9.
The data which are shown in the fig. 10 were obtained in the test results. The measuring frequency of each channel is 40 Hz (Sample time = 0.025), which is sufficient to track the channels of level and spending without losing their information. The pressure parameter requires a higher data density (Sample time < 0.025) per unit of time, but the module can't provide it without garbling and losing the information. The Simulink model complexity impacts significantly on value of frequency of input/output module poll program. In that way making simple tasks such as monitoring of system parameter values and the polling frequency value can be up to 40 Hz, as it is shown in the experimental schedule, and during the implementation of PID controller the upper threshold of an effective value of Silulink model poll frequency doesn't exceed 10 Hz. This study shows the limited processing power of the input/output module and suggests that in future a more efficient controller can be used for fast parameters such as pressure.
The issue in the cheap method of acquisition and processing data from industrial control objects in real-time conditions is solved by the proposed input / output module.
The input-output device providing two-way data transfer between the real object and Matlab / Simulink field are proposed in this work. The device allows to work in two base modes: using real industrial process or laboratory stand with industrial electrical signals and virtual control system inside MATLAB/Simulink field or using programmatic logical controller with virtual control object. The obtained information in the Matlab system allows to evaluate the nature of the control object and also to control the object in real time by setting the desired slider for a particular parameter.
The device is developed with cheap computing platform, which provides electrical compatibility with signals of industry standards (0-10V) and data transfer to the virtual environment of Matlab / Simulink. The device allows to work with a polling frequency up to 40 Hz without distortion and data loss in real time.
In the future, we plan to increase the performance of the MCU to obtain a higher signal polling frequency, to work with processes with a low time constant. A device prototype of the input / output module of the industrial signals having the extended nomenclature in accordance with the IEC 61131-5 standard is being developed.
 Martyanov A.S.; Solomin E.V., Korobatov D.V. (2015). "Development of control algorithms in Matlab/Simulink" Procedia Engineering 129. Elsevier, 2015. pp.922-926.
 Outeiro M.; Carvalho A. (2011). "MatLab/Simulink as design tool of PEM Fuel Cells as electrical generation systems", European Fuel Cell Forum 2011.
 Saghafinia A.; Hew W., Ping M., Uddin N., Amindoust A. (2013). "Teaching of Simulation an Adjustable Speed Drive of Induction Motor Using MATLAB/Simulink in Advanced Electrical Machine Laboratory" Procedia-Social and Behavioral Sciences 103 Elsevier, 2013. pp.912-921.
 Wang L.; Tan Y., Cui X. and Cui H. (2012). "The Application of LabVIEW in Data Acquisition System of Solar Absorption Refrigerator", 2012 International Conference on Future Energy, Environment, and Materials.
 Liao H. Q.; Qiu Z. R. and Feng G. H. (2011). "The Design of LDF Data Acquisition System Based on LabVIEW", 2011 3rd International Conference on Environmental Science and Information Application Technology
 Bruce-Boye C.; Rudiger zum Beck, Kazakov D. (2006). "An approach to distributed remote control based on middleware technology, MATLAB/Simulink-LabMap/LabNet framework", Advances in Computer, Information, and Systems Sciences, and Engineering. Springer, 2006. pp.37-41.
 Owen Input output modules Mx110// Owen.-URL: http://www.owen.ru/catalog/99197162 (accessed 08 June 2017).
 Remote I / O Modules-Advantech// OWEN.-URL: http://www.advantech.ru/products/remote-i-o-modules/sub_12mlcjf (accessed 08 June 2017).
 Gula M.; Zakova K. (2015) "Matlab Adapter-Online Access to Matlab/Simulink Based on REST Web Services", Advances in Intelligent Systems and Computing 348. Springer International Publishing Switzerland 2015. pp.199-205.
 Barber R.; Horra M., Crespo J. (2013). "Control Practices using Simulink with Arduino as Low Cost Hardware", 10th IFAC Symposium Advances in Control Education The International Federation of Automatic Control. August 28-30, 2013. pp.250-255.
 IEC 61131-2-2012. Programmable controllers. Part 2. Equipment requirements and tests. Functional requirements. 5.2 Digital I/Os Introduced 2014-07-01.
 IEC 61131-2-2012. Programmable controllers. Part 2. Equipment requirements and tests. Functional requirements. 5.3. Analogue I/Os Introduced 2014-07-01
Caption: Fig. 1. First configuration with input/output device
Caption: Fig. 2. Second configuration with input/output device
Caption: Fig. 3. Structure of Input-output device based on ATMega2560
Caption: Fig. 4. Digital input channel
Caption: Fig. 5. Digital output channel
Caption: Fig. 6. Analog input channel
Caption: Fig. 7. Analog output channel
Caption: Fig. 8. Schematic structure of the test bench
Caption: Fig. 9. Simulink model for the removal of analog data from the test bench
Caption: Fig. 10. Signal Data from the test bench
|Printer friendly Cite/link Email Feedback|
|Author:||Michael, Peshko; Vladislav, Ryabchevsky|
|Publication:||Annals of DAAAM & Proceedings|
|Date:||Jan 1, 2018|
|Previous Article:||Postnonclassical Paradigm of Ergonomic Design of Complex Systems.|
|Next Article:||The Application Of Thermographic Diagnostic In Investment Casting Process.|