A Comparative Study of Neural networks and Fuzzy Systems in Modeling of a Nonlinear Dynamic System

The aim of this paper is to compare the neural networks and fuzzy modeling approaches on a nonlinear system. We have taken Permanent Magnet Brushless Direct Current (PMBDC) motor data and have generated models using both approaches. The predictive performance of both methods was compared on the data set for model configurations. The paper describes the results of these tests and discusses the effects of changing model parameters on predictive and practical performance. Modeling sensitivity was used to compare for two methods.


Introduction
Building models of real systems is a central topic in many disciplines of engineering and science.Models can be used for simulations, analysis of the system's behavior and for a better understanding of the underlying physical mechanisms in the system.In control engineering, a model of the plant can be used to design a feedback controller or to predict the future plant behavior in order to calculate optimal control actions [1].
Many of the recent developed computer control techniques are grouped into a research area called Intelligent Control, that result from the integration of Artificial Intelligent techniques within automatic control systems [2].
There is currently a significant and growing interest in the application of Artificial Intelligence (AI) type models to the problems involved with modeling the dynamics of complex, nonlinear processes .
By far the most popular type of AI model for these purposes has been the neural networks, which attempts to produce "intelligent" behavior by recreating the hardware involved in the thinking process.Another type of AI model is the fuzzy model, which defines its inputs and outputs as qualitative values (actually fuzzy reference sets) and then defines the strength of the relationships between these input and output reference sets [3].
Most industrial processes exhibit nonlinear dynamics, and this places additional complexity on the modeling procedure used.In practice, many nonlinear processes are approximated by reduced order models, possibly linear, which are clearly related to the underlying process characteristics.However, these models may only be valid within certain specific operating ranges.When operating conditions change, a different model may be required to be used or the model parameters may need to be adapted.
The tuning of electric drive controller is a complex problem due to the many non-linearities of the machines, power module and controller [4].A system model is necessary for tuning controller coefficients in an appropriate manner (e.g.percent overshoot, settling time).Because some parameters are neglected, the mathematical model cannot represent the physical system exactly in most applications.That"s why, the used electronic devices is not linear characteristic.Few researches have attempted in making a fuzzy model for permanent magnet synchronous motor drive.Zhang Bo and et al. present based-on Takagi and Sugeno fuzzy modeling methodology, the Takagi and Sugeno fuzzy model of permanent magnet synchronous motor chaotic system.Then they used fuzzymodel-based control methodologies to control chaos in chaotic system [5].Jacek proposes several artificial intelligence techniques for fuzzy modeling of electromagnetic and disturbance (friction, ripples) torques/forces in permanent magnet rotational/linear motors.He uses observer-based parameter identifiers approach to plan identification experiments [6].Stator current of BLDC is directly related to developed torque.Therefore current controllers are very important in these drives.
The Proportional Integral (PI) controller is unquestionably the most commonly used control algorithm the process control industry [7].The main reason is its relatively simple structure, which can be easily understood and implemented in practice, and that many sophisticated control strategies, such as model predictive control, are based on it.In spite of its wide spread use there exists no generally accepted design method for the controller [8].
In this study, MCK243 kit is used for a nonlinear system.The MCK243 kit includes a power module and a three phase brushless motor.Mathematical models are complex and include a lot of error, such as linearization and neglecting some parameters.Mathematical approaches are not used for modeling the system inverter, motor and DSP.The whole system is modeled by Artificial Neural Networks (ANN) and Fuzzy Logic using input and output data taken from the controlled system.PI coefficients are taken as inputs.Maximum overshoot (M o ) and settling time (T s ) are taken as outputs.

Experimental setup of modeling system
MCK243 kit is a complete motion structure, including a power amplifier and a motor, thus offering the basic platform for motion applications evaluation.The MCK243 kit includes such a power module and a three phase brushless motor.TMS320F243 programs for DC brushless motor speed control.The MC-BUS connectors include the basic I/O signals required in standard motion control applications with DC, AC or step motors.
The BLDC application control scheme is based on the measurement of two phase currents and of the motor position.The speed estimator block is a simple difference block.The measured phase currents, i a and i b , are used to compute the equivalent DC current in the motor, based on the Hall sensors position information.Remark that the Hall sensors give 60 electrical degrees position information.The speed and current controllers are PI discrete controllers.Only one current controller is needed in this case, similar to a DC motor case.The voltage commutator block implements (by software) the computation of the phase voltages references, Vas*, Vbs* and Vcs*, applied to the inverter.Practically, the 6 full compare PWM outputs of the DSP controller are directly driven by the program, based on these reference voltages.In the BLDC case, only four of the inverter transistors are controlled for a given position of the motor.The scheme will commute to a specific command configuration, for each of the 60 degrees position sectors, based on the information read from the Hall sensors.
The board contains a 1.7 A, 36 V three-phase inverter, and can be connected via the MC-BUS connectors to the MCK243 board.Motor phases, encoder and Hall signals are also connected to the PM-50 board.3-phase brushless motor coupled with 500-line quadrature incremental encoder and 3 hall position sensors.
Also the controllers" parameters are set in DSPMOT32, at Windows level, from the Motion Setup Controller menu command.The proportional and integral control factors, as well as the sampling periods for the current and speed control loops, are set using this DSPMOT32 command.The experimental setup using as a nonlinear system is demonstrated in Figure 1.
DSPMOT is an integrated, graphicalenvironment analysis toll for DMC applications.It offers you the possibility of analyzing your DSP program variables by using online watches or off-line tracking of real-time stored data.PI coefficients are inserted into the block shown in Figure 2.

Figure 2. The motion setup controller
The main purpose of this dialog is to allow the examination and/or modification of the parameters of the digital controllers implemented on the DSP board.These operations may be done before the execution of the DSP program, in order to set the initial values of the controller"s parameters.
h: the sampling period for the selected controller, expressed in milliseconds.K p , K i : the proportional, respectively the integral constant of the discrete PI controller.These values are converted by DSPMOT, for the DSP program level, into sets of two parameters, the scaled values (normalized in Q15 format), and the associated scaling factors.
Finally, the PWM reference signals used the PWM generator block, to drive the power inverter.A symmetric PWM generation technique was used for the application [9].
The system output data taken from the real system for modeling of the system for K p =500, K i =50 are given in Figure 3 as an example.system are also taken from real systems in the same way.The output of the motor is shown in Figure 4 for K p =480, K i =21.

Figure 5. DSP program variables by using online watches
The obtained control signal and system outputs by using on-line watches are shown in Figure 5.

Modeling of the BLDC motor using ANN
Recently, neural networks have been shown to possess good approximation capability for a wide range of nonlinear functions and have been used in the modeling of nonlinear dynamic systems by many researchers [10][11][12][13].By far the most common type of network used for dynamic modeling work is the backpropagation network, which gets its name from its learning strategy.
The ANN model used is a multilayer perceptron model, in which there is more than one layer between input and output.The backpropagation of the error algorithm used as the training algorithm is used for training of generalized delta rule.The training process of this ANN model is shown Figure 6 [4].30 sets of input-output data taken from the application circuit are given in Table 1 [4].The ANN structure for this system is shown in Figure 7, where K p and K i , M o , and T s are PI coefficients, the maximum overshoot, the settling time, respectively.
There was no criterion to select cell number at every layer of the ANN structure; layer number and cell number were determined by experiment.In the same way, the learning and momentum coefficients were determined by experiences with previous studies [13].

Table 1. Data used for the training of the ANN
A part of the training data and change in the error for the training process are shown in Figure 8. Mean-squared error reduced to lower than 0.0016 by 15000 iterations, but iteration was still continued to 30000 iterations.The training process was finished when mean-squared error reduces to 0.0001 at 30000 iterations.

Modeling of the BLDC motor using Fuzzy System
Model-based engineering tools require the availability of suitable dynamical models.Therefore, the development of a suitable nonlinear model is an important issue.Given the high expectations of fuzzy models in the area of identification and control, it becomes necessary to analyze and extract control-relevant information from fuzzy models of dynamical processes.Fuzzy sets provide an appropriate means to define operating regions.Takagi and Sugeno proposed a fuzzy modeling approach to model nonlinear systems.In their approach, the input space of a nonlinear system is divided into several fuzzy regions, and a local linear model is used in each region.Takagi and Sugeno approach was used in this work.Data in Table 1 was used for training of the fuzzy model [4].
The fuzzy modeling for complex processes is regarded as one of the key problems in fuzzy systems research [14,15].
Fuzzy model identification is an effective tool for the approximation of uncertain nonlinear systems on the basis of measured data.The identification of a fuzzy model using inputoutput data can be divided into two tasks: structure identification which determines the type and number of the rules and membership functions, and parameter identification.For both structural and parametric adjustment, prior knowledge plays an important role.
The big disadvantage of rule-based systems for dynamic modeling purposes is that the set of rules have to be formulated by one or more experts on the process behavior.The procedure to obtain and rationalize these rules is complicated, time-consuming, and, since it

Results and Discussion
The modeling methods were tested using the BLDC data.This data consists of 42 samples of data.Each sample contains K p , K i inputs and M o , T s outputs.During this work the only the first 30 samples of data were used to train or identify the model, but performance comparison were carried out using all 12 samples.A program written in C++ language was used to generate the neural networks model and Matlab was used to generate the fuzzy model.The changes in the settling time and maximum overshoot for ANN output and fuzzy output were given in Table 2 [4].These data are different from data in Table 1.The obtained model was tested with data given in Table 2 in order to discern the appropriateness of the ANN model and fuzzy model.The change in the settling time with K i and K p for actual system and ANN model, given in Table 2, is shown in Figure 11.The change in the maximum overshoot value of the speed with K i and K p for the actual system and ANN model are demonstrated in Figures 12  and 13, respectively.Figure 13 shows the zoom in version of Figure 12.The ANN model follows the system output, with a small error that arises from differences between experimental conditions and the model of the nonlinear system.It shows that the ANN has good mapping capabilities.The change in the settling time value of the speed with K i and K p for the actual system and Fuzzy model are demonstrated in Figures 14 and  15. Figure 15 shows the zoom in version of Figure 14.The change in the maximum overshoot value of the speed with K i and K p for the actual system and fuzzy model are demonstrated in Figure 16.
The fuzzy model follows the system output, with a small error that arises from differences between experimental conditions and the model of the nonlinear system.It shows that the fuzzy model emulates real systems successfully.The identification process is very fast and transparent, and this means that alternative model structures and reference set arrangements can be screened very quickly.

Conclusion
The neural networks and fuzzy modeling approaches for BLDC are carried out.The results presented show that both neural networks and fuzzy systems are able to produce accurate dynamic models of process response directly from I/O data (I: K p -K i , O: M o -T s ).Fuzzy model and neural networks model are very similar, but model development is very simple with fuzzy models.
Applications of the two techniques to nonlinear system modeling demonstrate that both techniques are effective in modeling systems with major nonlinearities BLDC motor parameters P: 50 watt Phase resistance: 7.5 ohm Phase inductance: 480 mH Back-EMF constant: 2.1 V/1000 rpm Torque constant: 20 mNm/A Rated voltage: 10 V Max.Voltage: 36 V. Rotor inertia: 4.6x10 -7 kgm 2 Mechanical time constant: 8.6ms

Figure 3 .
Figure 3. Outputs for modeling the system for K p =500, K i =50 As shown in Figure 3, M o and T s values are obtained from graphics.

Figure 4 .
Figure 4. Outputs for testing of the system for K p =480, K I =21 As shown in Table 2, data used for testing the

Figure 6 .
Figure 6.The flow chart for training process.30sets of input-output data taken from the application circuit are given in Table 1[4].The ANN structure for this system is shown in Figure7, where K p and K i , M o , and T s are PI coefficients, the maximum overshoot, the settling time, respectively.There was no criterion to select cell number at every layer of the ANN structure; layer number and cell number were determined by experiment.In the same way, the learning and momentum coefficients were determined by experiences with previous studies[13].

Figure 7 .
Figure 7.The ANN model structure of the system.

Figure 8 .
Figure 8. Mean-squared error values according to iteration number.

Figure 9 .Figure 10 .
Figure 9. Error values for T s according to epoch number

Figure 11 .
Figure 11.The change in the settling time (ANN modeling).

Figure 12 .
Figure 12.The change in the maximum overshoot (ANN modeling)

Figure 13 .
Figure 13.The change in the maximum overshoot (ANN modeling).

Figure 14 .
Figure 14.The change in the settling time (fuzzy modeling)

Figure 15 .Figure 16 .
Figure 15.The change in the settling time (fuzzy modeling) several people with knowledge at a high technical level, rather expensive.Error values for T s and M o according to epoch number are shown in involves

Table 2 .
Data used for testing of ANN output and fuzzy output