The prediction or estimation of wind energy and wind speed is very important to the operation of wind turbines. How to use the toolbox of MATLAB to achieve it
Once you get your desire ANN model, you have to generate a function by clicking 'MATLAB Function' (Fig. 2).
Then you have to save the function (default name is 'myNeuralNetworkFunction').
(keep file name and function same) (Fig. 4)
Again, you have to create a custom function using 'myNeuralNetworkFunction'
For instance, the function name 'funct' (Fig. 5) (keep file name and function name same).
Now, your objective function is 'funct'. Here, a negative sign is given because the present study is for maximization. (GA toolbox only do minimization, therefore the function has been modified with negative sign). For minimization problem, please keep it positive.
Again, this function can be used for response prediction.
Apart from GA, you can use PSO code for optimization. (Link for code: https://yarpiz.com/50/ypea102-particle-swarm-optimization )
Do not worry, there will be a negative value of an optimum objective function after GA optimization. However, you have to take the mod value of the function.
Recently I have published one article on the application of ANN, SVM, GA and PSO in a biological system (using MATLAB). This paper might help you.
Article Optimization of dark fermentative hydrogen production from o...
You can follow these link to create ANN model in MATLAB
As far as your question is concerned it is a regression task. You can code a simple algorithm in python using tensorflow rather than resorting to inbuilt matlab functions as python allows for more flexibility. But If it is an optimization task it is better that you use grasshopper, rhino3d ... etc for youre purpose.
Once you get your desire ANN model, you have to generate a function by clicking 'MATLAB Function' (Fig. 2).
Then you have to save the function (default name is 'myNeuralNetworkFunction').
(keep file name and function same) (Fig. 4)
Again, you have to create a custom function using 'myNeuralNetworkFunction'
For instance, the function name 'funct' (Fig. 5) (keep file name and function name same).
Now, your objective function is 'funct'. Here, a negative sign is given because the present study is for maximization. (GA toolbox only do minimization, therefore the function has been modified with negative sign). For minimization problem, please keep it positive.
Again, this function can be used for response prediction.
Apart from GA, you can use PSO code for optimization. (Link for code: https://yarpiz.com/50/ypea102-particle-swarm-optimization )
Do not worry, there will be a negative value of an optimum objective function after GA optimization. However, you have to take the mod value of the function.
Recently I have published one article on the application of ANN, SVM, GA and PSO in a biological system (using MATLAB). This paper might help you.
Article Optimization of dark fermentative hydrogen production from o...
You can follow these link to create ANN model in MATLAB
Chandan Mahata gave a detailed answer. Apart from GUI, you can also use the command prompt. After loading the data in your workspace (remember the rows in the data are your independent factors/predictors and columns are the runs/experiments/observations), create a neural network using the command
net = newff(input, target, n); where 'input' is the predictors, 'target' is wind speed and n is the number of nodes in the input layer.
You can set other parameters like performance functions, epoch etc with
net.performFcn = 'mae';
net.trainParam.epochs=5000;
(See help for more details)
To train the network use command
net = train(net, input, target );
For prediction use command
Trained = sim(net, value); where 'value' is the condition on which you want to predict the wind speed.
You should divide your data into two parts use one part to train the network and the other part to check the performance of the network.
To check the performance of the network use
plotregression(target, predicted) 'predicted' is the wind speed predicted by the trained network