MATLAB as Interface for Intelligent Digital Control of Dynamic Systems

Digital control systems have shown to the developers the features and their applications in a wide variety of plants. Tools that help the developer to promote a design methodology that is efficient and at the same time reliable, has gained ground in the market and attributions of control engineers. Tasks such as data acquisition system, control design and system implementation can become arduous if there are prerequisites for sensitivity and complexity of the controller for these tasks take time and performance of the developer which will entail additional costs to the final product. These tools provide the designer with the scientist and the smooth progress of their work role has important and necessary in many areas will be subject to this study. The integration of technologies to speed and lower costs as it relates the design phases can be observedwith a proper exploration of the work tool and how knowledge of plant and control techniques that meet in a less costly the goal of being achieved whatever the difficulties of the project. The choice of a tool properly can be a deciding factor in a world where time and efficiency of processes is become extremely important because the applications are growing in scale and more complex, Moudgalya (2007), Andrade (2010). Intelligent Systems has considerable performance in accordance with plans and small large and its design encompasses more robustness to the system as well as ease of expansion. The mathematical simplicity that fuzzy systems can present and adaptability of neural networks are adopted more frequently in the academy and the industry. An approach of intelligent systems requires a systematic and efficient operation because one works with a data stream that needs a consistency so that the iterations will be where made all the decisions may have minimal accounting. A tool that can assist in the design of this requirement is most welcome in engineering projects for control system parameter becomes constant with time,S. Sumathi (2010). The MATLAB software designers can provide facilities for development and interface with different technologies for data acquisition through its communication protocols such as Serial Interface, OPC, Ethernet and others. This work is mainly focused on a methodology design of digital control systems using as development platform and implementing in software MATLAB. 14


Introduction
Digital control systems have shown to the developers the features and their applications in a wide variety of plants.Tools that help the developer to promote a design methodology that is efficient and at the same time reliable, has gained ground in the market and attributions of control engineers.Tasks such as data acquisition system, control design and system implementation can become arduous if there are prerequisites for sensitivity and complexity of the controller for these tasks take time and performance of the developer which will entail additional costs to the final product.These tools provide the designer with the scientist and the smooth progress of their work role has important and necessary in many areas will be subject to this study.The integration of technologies to speed and lower costs as it relates the design phases can be observed with a proper exploration of the work tool and how knowledge of plant and control techniques that meet in a less costly the goal of being achieved whatever the difficulties of the project.The choice of a tool properly can be a deciding factor in a world where time and efficiency of processes is become extremely important because the applications are growing in scale and more complex, Moudgalya (2007), Andrade (2010).Intelligent Systems has considerable performance in accordance with plans and small large and its design encompasses more robustness to the system as well as ease of expansion.The mathematical simplicity that fuzzy systems can present and adaptability of neural networks are adopted more frequently in the academy and the industry.An approach of intelligent systems requires a systematic and efficient operation because one works with a data stream that needs a consistency so that the iterations will be where made all the decisions may have minimal accounting.A tool that can assist in the design of this requirement is most welcome in engineering projects for control system parameter becomes constant with time,S.Sumathi (2010).The MATLAB software designers can provide facilities for development and interface with different technologies for data acquisition through its communication protocols such as Serial Interface, OPC, Ethernet and others.This work is mainly focused on a methodology design of digital control systems using as development platform and implementing in software MATLAB.

Digital control and Data Acquisition Systems
The Data Acquisition System (DAS)is a key part to the project and implementation of digital controllers for the nature of digital systems is based on sampled analog system, ie played by the analog system a digital computer and its Since the interface Digital -Analog system performs the control actions .The Figure 1 shows a diagram of a system digital control and its special features such as the pool Analog -Digital and Digital -Analogue, responsible for interfacing with the analog environment.

Fig. 1. Digital Control System Diagram
A digital control system is obtained from the reconstruction of analog signal contained in nature.This reconstruction is related mainly with the data acquisition system which is also involved modeling digital control system.Figure 2 illustrates the design of a system basic data acquisition of an industry.

Fig. 2. DAQ System Diagram
The modern control concepts applied in the contemporary industry may be appropriated to the development of academic research activities.The introduction of a methodology parameters that specify and clarify the implementation of monitoring and control of dynamic systems.
In Figures 1 and 2 are shown at different levels, primary architectures to industrial control systems.In Figure 1 is exposed a system with minimal complexity, type SISO (Single Input -Single Output) that can occur in n times or a more complex system can be mapped as a black box system, where internal states of the process do not matter.In Figure 2 is noted, however, approach of discrete variables on the process that encompasses the entire plant worrying about sub stages.In this work is explored a way to conceptualize these types of sound architecture in a way such that the system can be modeled and represented whatever its complexity, thus using a powerful tool when it comes to development concepts and analysis.

Discrete models of dynamic systems
To be held control of dynamic systems, it is necessary in this environment, the perception of some step that must be met for a procedure with minimum guarantees for the project.In the following sections will show important steps as ways to implement them by programming or graphical interface in MATLAB, Moudgalya (2007) and Charles L. Philips (1995).

Dynamic system identification tools
The identification of dynamic systems can be facilitated so as to make procedures the control design more efficient from the standpoint of technical feasibility and cost.processes of various types can be considered as chemical, mechanical or even behavior, used for macroeconomic modeling systems.The use of tools that comply with the practicality of applying the concept and system design digital control is very suitable as mentioned before, so we introduce a way simple to obtain mathematical models of whatever the process, however in the case of linear or linearized process.To initiate an identification in the MATLAB we can proceed in two ways and the designer must choose whichever is most convenient to your time and level of knowledge that it is your process or your plan.In Command Window use the following command to open the graphical user interface the Identification Toolbox: >> ident will produce the screens shown in Figure 3, where you can begin the process of identification.4 can observe that the user can define various aspects modeling systems such as filtering of data and type of modeling, as well as the analysis of response in time and frequency of the system model, Gene F. Franklin (1998).
Through this tool we can get two different ID type models in the output.The model based on parameters in the output shows a polynomial equation in discrete form It should be added that among the numerous tools of identification, we will use polynomial will be the identification, because it gives us a response in discrete time, which makes this model implementable on digital computers.With the option to generate a polynomial model identification as described in Eq.1.

The plant modeling
The estimation of parameters of the transfer function of the plant is performed with the Toolbox Identification Systems MATLAB.Using the observations of voltage and temperature measurements, table,we can get the parameters of a 2nd order transfer function.
In Figure 5 to represent the operation points thermal plant for a first evaluation of the algorithm, shows the temperature behavior from departure to variations in operating points.

280
MATLAB -A Ubiquitous Tool for the Practical Engineer www.intechopen.com The bands system operation are separated for purposes of calculation of the parameters of a model of second order.The band Operation of this plant is between 58 0 and 60 0 as observed in Figure 5.

Computational and hardware setups
It is understood by Hardware setups and computational specifications of the hardware and and design specifications that are the model order and delay.Description of procedure for conducting the experiment are presented in next sections.

OE model
Using Identification Toolbox to estimate the parameters of the discrete model OE (Output-Error) operated in the delay is given by where Considering the transfer function of the deterministic signal from the ω input we have

The transfer function and polynomial form
The transfer function in Z plane is given by The poles of the transfer function in Z, pz 1 = 0.9697 and pz 1 = 0.5503is the positive axis that divides the first and fourth quadrants.The zero is given by z = 0.9678 and is on top from one pole to the nearest two decimal places.
Applying the transformation C2D command of Toolbox Control gives the model transfer function continuously in the model time we have The poles of the transfer function at s,pc 1 = −0.5973andpc 2 = −0.0308.The zero at zc = −0.0327nearly cancels the effect pole pc 2 .
The MATLAB scrip execution has to read the temperature signals and actuator to estimate the parameters a mathematical model that represents the operating point system's thermal system.where Data is the object containing the information input and output system; nb is the order of the polynomial B(q) from Equation 1; nf is the order of the polynomial F(q) from Equation 1; nk is the input delay

Sys
We can also order the knowledge to perform analysis in continuous time by following the identification commands Thereby generating a frequency domain model type Where the parameters of the function idproc are inherent in the system type, order and constant delay.The graphs in Figure 5 are constructed in accordance with the instructions from design requirements .The first statement stores the vector medt values of temperature around the heat source (resistor) and the actuator speed ω.The third instruction is didactic and for implementation is not required to be codified.

Model survey
The lifting of the method consists of parametric estimation conversion this model of transfer function in Z.

282
MATLAB -A Ubiquitous Tool for the Practical Engineer www.intechopen.com

Model discrete time
The procedure for the identification of parameters of discrete time is encoded in the script, converting (describing) the discrete models in transfer function descriptions.
The Figure 5 shows the comparison of behavior temperature of the continuous model obtained by the process reaction curve

Transfer functions
The purpose of the transfer functions we generate the files contains models of the objects should be stored OE to conversion models.

Estimating parameters scripts
The establishment of a procedure for estimating parameters (connotation: scientific) or lifting of a model (connotation: engineering) presented in this section consists of three steps.The first step is the generation each measurement.The second step consists of estimating the parameters of functions transfer.The third step is the analysis of the model have the impulse response, Bode diagram and step.

A Platform to testing control systems
To validate our experiment we used a platform for experiments with micro digital circuits processed with the support of micro controllers that can be easily programmed using knowledge of language with C and a broad support to this type of application as in Ibrahim (2006), Lewis (2001) and Wilmshurst (2007).
Using the Microchip PIC micro controller family we can turn our platform to run on following

Implementing control systems on MATLAB
The software provides support, form the implementation of acquisition system data to design a control system, which becomes possible with methods of identification and communication required in numerical methods implementation of a controller.This tool was incorporated for the purpose to help engineers and scientists in projects and systems design methods numeric, or for the resolution algorithms and systems simulation.In the following sections will be shown tools that are part of the suite of applications such as MATLAB concepts for implementation of digital control systems.

The serial interface
For the design of systems for data acquisition in MATLAB, an important tool are the protocols for data communications in environments that are common industries.The serial communication is known for its simplicity of connection and implementation in both hardware and software because there are a wide variety software and programming languages that provide libraries for development communication in serial protocol.In MATLAB the simplicity of applying this tool can be translated by code shown below Serial_Obj = Serial('COM1'); fopen(Serial_Obj); var_read = fscanf(Serial_Obj) fprintf(var_read,'Data Receiveve'); fclose(Serial_Obj); Delete(Serial_Obj); With the above script you can communicate and receive data from an external device to your computer.With communication with the external hardware can open, using the following commands, send and receive data relevant to the control system function send_data_tohard(data_ctrl,setpoint_ctrl) fprintf(Serial_Obj,data_ctrl)); fprintf(Serial_Obj,setpoint_ctrl)); Therefore the system receives the data for the implementation of intelligent digital control system: function receiv_data_fromhard(data_ctrl,data_error) data_ctrl = fscanf(Serial_Obj,'data_ctrl'); data_error = fscanf(Serial_Obj,'data_error'); Always observing that the variable Dataa_crtl is used for timing and appropriateness of real-time system.

The user interface
The user interface development system shown in Figure 7 is used with supervisors and control environment of the platform.Using the anointing of the environment development of GUIDE MATLAB can therefore obtain the convenience of the project environment be the same as the deployment environment In the source code below is observed in connection with the generation via the serial port textbf GUID emph MATLAB.Digital Control Systems has its roots in the interface with the analog world and thus the delay time this conversion to occur immediately.In real-time systems is a concern that the execution time of a given instruction does not exceed a predetermined threshold.Converging, the realtime systems are strictly necessary in digital control because it does necessary to guarantee instruction execution control U c within the limit of sampling system T s where a failure of this requirement may lead to instability as the plant design of discrete controllers is directly related T s variable.

Implementing intelligent systems
The implementation of intelligent systems through MATLAB may well become a very profitable it facilitates the testing of new techniques that use features and tools already implemented in this software.Techniques computational intelligence can withdraw from the digital control system the important factor in the T s , however the system still requires real time control.Each execution cycle lets you have the need to perform numerical derivatives and integrals and introducing a context of researching and mapping , which may require less computational effort.The diagram shown in Figure 8   And the controller output and results in a weighted sum that depends exclusively on the method chosen.

Conclusion
With the aid of this important tool can facilitate the development of applications to interface with and control devices industries.A overview of these tools has been shown here to that may be developed to greater diversity of applications according to the need of the designer.
As an environment of the computational complex, MATLAB can provide solutions for engineering, physics and mathematics with the use of its functions basic and therefore leaving the search more efficient and less costly.This platform is an important and necessary tool, it can lead a project, with integration between Software and Hardware, for a safe convergence of results, thus integrating computational resources for simulation design and implementation from a direct single platform.
Fig. 3. Opening The Identification Tool Box -MATLAB On these screens you can start importing the measurement data on the system or even with knowledge in the previous system = OE(Data,[nb nf nk] 281 MATLAB as Interface for Intelligent Digital Control of Dynamic Systems www.intechopen.com

Fig. 8 .Fig. 9 .
Fig. 8. Diagram of the General System Itś possible conclude that with the development of both the hardware and software, these systems are likely to become the largest presence within the control and automation

Fig. 10 .
Fig. 10.The FLT Main Screen Where Negative Large, Negative Small, ZeRo, Positive Small and Positive Large are linguistics vary based on experience.The system output can be given as shown in Figure 9 with a bank of rules based onTable 1 decision-making as an example

Table 1 .
The knowledge from the Rules of Decision System Table 1 decision-making as an example Error \ changing E rror NL NS ZR PS PL