✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
更多Matlab仿真内容点击👇
⛄ 内容介绍
神经网络是一种黑箱建模方法,具有很高的非线性映射能力.研究了基于神经网络的液压系统动态模型建模方法.首先建立液压系统的传递函数模型,通过该模型产生样本数据,以液压系统的输入压强,节流阀截面积及四通阀控制信号为输入,液压缸压强为输出;构建NARX神经网络,建立液压系统动态模型.经过与系统的传递函数模型的输入输出进行对比,证明采用NARX神经网络建立动态模型的方法是可行的.与RNN神经网络模型进行对比,证明NARX神经网络在建立液压系统动态模型方面更具有优越性.
⛄ 代码
trainFcn = 'trainlm'; % Levenberg-Marquardt backpropagation.
% Create a Nonlinear Autoregressive Network with External Input
inputDelays = 1:5;
feedbackDelays = 1:5;
hiddenLayerSize = 10;
net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize,'open',trainFcn);
% Prepare the Data for Training and Simulation
% The function PREPARETS prepares timeseries data for a particular network,
% shifting time by the minimum amount to fill input states and layer
% states. Using PREPARETS allows you to keep your original time series data
% unchanged, while easily customizing it for networks with differing
% numbers of delays, with open loop or closed loop feedback modes.
[x,xi,ai,t] = preparets(net,X,{},T);
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
% Train the Network
[net,tr] = train(net,x,t,xi,ai);
% save('net.mat',net)
% Test the Network
y = net(x,xi,ai);
e = gsubtract(t,y);
performance = perform(net,t,y)
% View the Network
view(net)
⛄ 运行结果
⛄ 参考文献
[1] Zhan L , Hayashibe M , Qin Z , et al. FES-Induced Muscular Torque Prediction with Evoked EMG Synthesized by NARX-Type Recurrent Neural Network[C]// IEEE/RSJ International Conference on Intelligent Robots & Systems. IEEE, 2012.
[2] Dipietro R , Rupprecht C , Navab N , et al. Analyzing and Exploiting NARX Recurrent Neural Networks for Long-Term Dependencies[J]. 2017.
[3] 許庭偉. 應用NARX-RNN學習法則模擬壓電致動器之磁滯模型. 2006.
[4] 李岩, 何周. 基于MATLAB GUI的光伏发电预测平台设计[J]. 电器与能效管理技术, 2016, 000(024):49-53.
⛳️ 代码获取关注我
❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料