Hello everyone in this video tutorial
we are going to discuss another type of controller
which may use of the  neural network concept
and the name of this controller is
 
so this controller is comparatively faster then other controller
because in this the controller is simply
a rearrangement of the neural network plant model which is
offline in a batch form so the time consuming
expect of the other controller that is online computation
is taken away from this time
we will see how the controller is created
 
 
 
 
one standard model that has been used to represent general discrete
non linear system is a non linear
auto regressive moving average model
the equation of this is shown on screen
 
 
 
so as in the model predictive model
we will create a neural network to represent a non linear relationship
between the input and output
 
so if we want our output to follow certain reference
let's say
 
so we need to design a controller
 
 
 
 
now if we want to train a neural network
to create a function G that will minimize a mean square error
then we will need to use dynamic back propagation which
is very time consuming
so to overcome that problem what we can do is
approximate the NARMA model that we have discussed before
and the approximate equation shown on the screen
so as you can see in the equation
 
the advantage of this form you can solve for the
control input that causes the system output
follow any reference
so this equation can be re written as shown on the screen
so from this equation we can find the value of the control input
at any time t
now if we use this equation directly
then we need to determine the value of u(k) based on the output
that is same time so instead
we will replace the value
and this equation will be valid
the figure on the screen show the NARMA L2
approximate model
so in the top side we have neural network approximation
of the G non linearity
and at the bottom we have the neural network approximation of the non linearity
and it is predicting the output y
any time t+2
we have supplied the value of y
time t+1 and control input at the same time t+1
so this is our final model look like
we have the reference model or the reference signal
then we make use of plant for training a neural network
 
and we will use the same neural network
for designing the controller by just rearrangement of the
equation
so you can see this our controller will look like
this is same as of the equation shown on the bottom
of the screen
so as you can see this is just the rearrangement of the neural network
plant model that we have already trained
so coming back to  the matlab
type
and this will open up simulink model that will make use of
NARMA L2 controller
so as you can see it involves 2 block
1st will be the controller block and 2nd is the plant block
so let's 1st look which plant we are using
so this is the figure of the plant which we are using
this is the model for calculating the
magnate by passing a current through a block
which is at the bottom of the magnate
so in this we will be controlling
the height or
by varying the value of the current
 
 
this is the equation by which
system is govern
 
 
 
 
 
 
 
 
so double click on plant
so you can this is the simulink model of the equation of the plant
that we have discussed
right click on the NARMA L2 controller
and click on the open in a new tab so as you can see
this is similar to the figure shown on the bottom of the screen
double click on the controller and in this case
we just need to train the neural network model of the plant
so as you may recall in model
predictive controller we also add a different window
optimization block in this case
as the controller is simply the re arrangement of the neural network
plant model so we have only one window
let's keep the value default and
click generate training data
so as in the case of model predictive controller
in this case also plant input and output
will be generated as input and target data set
so we will weight for this simulation
to complete
after the data is generated click on except data
then click on train network
the network will be train
by the specify training function
 
after the training is complete the window will look like this
these are the same graph that are generated
as in the case of model predictive controller
so one you are satisfied with the data click on ok
or apply
and the data trained neural network plant model
will be imported into simulink model
now click on run the model will be simulated
so in the X Y graph
red line is our reference line
and blue line is our output of our plant model
as you can see the blue line is trying to follow
the pattern of our red line
so in this case we imported a magnet
plant model into the simulink
look in also import CSVR model
that we have discussed in model predictive controller
and for the same model compare the result for the same model
so that's it everyone this is it for this video
hope you like it and please
like, subscribe and share and thanks for watching
