NARMA-L2 (Feedback Linearization) Control - MATLAB & Simulink - MathWorks India
NARMA-L2 (Feedback Linearization) Control - MATLAB & Simulink - MathWorks India
http://www.mathworks.in/help/nnet/ug/narma-l2-feedback-linearization-co...
where u(k) is the system input, and y(k) is the system output. For the identification phase, you could train a neural network to approximate the nonlinear function N. This is the identification procedure used for the NN Predictive Controller. If you want the system output to follow some reference trajectory y(k + d) = yr(k + d), the next step is to develop a nonlinear controller of the form:
The problem with using this controller is that if you want to train a neural network to create the function G to minimize mean square error, you need to use dynamic backpropagation ([NaPa91] or [HaJe99]). This can be quite slow. One solution, proposed by Narendra and Mukhopadhyay [NaMu97], is to use approximate models to represent the system. The controller used in this section is based on the NARMA-L2 approximate model:
This model is in companion form, where the next controller input u(k) is not contained inside the nonlinearity. The advantage of this form is that you can solve for the control input that causes the system output to follow the reference y(k + d) = yr(k + d). The resulting controller would have the form
Using this equation directly can cause realization problems, because you must determine the control input u(k) based on the output at the same time, y(k). So, instead, use the model
where d 2. The following figure shows the structure of a neural network representation.
1 of 5
8/8/2013 9:55 PM
http://www.mathworks.in/help/nnet/ug/narma-l2-feedback-linearization-co...
NARMA-L2 Controller
Using the NARMA-L2 model, you can obtain the controller
which is realizable for d 2. The following figure is a block diagram of the NARMA-L2 controller.
This controller can be implemented with the previously identified NARMA-L2 plant model, as shown in the following figure.
2 of 5
8/8/2013 9:55 PM
http://www.mathworks.in/help/nnet/ug/narma-l2-feedback-linearization-co...
where y(t) is the distance of the magnet above the electromagnet, i(t) is the current flowing in the electromagnet, M is the mass of the magnet, and g is the gravitational constant. The parameter is a viscous friction coefficient that is determined by the material in which the magnet moves, and is a field strength constant that is determined by the number of turns of wire on the electromagnet and the strength of the magnet. To run this example: 1. Start MATLAB. 2. Type narmamaglev in the MATLAB Command Window. This command opens the Simulink Editor with the following model. The NARMA-L2 Control block is already in the model.
3 of 5
8/8/2013 9:55 PM
http://www.mathworks.in/help/nnet/ug/narma-l2-feedback-linearization-co...
3. Double-click the NARMA-L2 Controller block. This opens the following window. This window enables you to train the NARMA-L2 model. There is no separate window for the controller, because the controller is determined directly from the model, unlike the model predictive controller.
4. This window works the same as the other Plant Identification windows, so the training process is not repeated. Instead, simulate the NARMA-L2 controller. 5. Return to the Simulink Editor and start the simulation by choosing the menu option Simulation > Run. As the simulation runs, the plant output and the reference signal are displayed, as in the following figure.
4 of 5
8/8/2013 9:55 PM
http://www.mathworks.in/help/nnet/ug/narma-l2-feedback-linearization-co...
5 of 5
8/8/2013 9:55 PM