?
目錄
??1 概述
??2 運(yùn)行結(jié)果
??3?參考文獻(xiàn)
??4 Matlab代碼、Simulink仿真實(shí)現(xiàn)
??1 概述
非線性質(zhì)量彈簧阻尼器(Nonlinear Mass-Spring-Damper,NMSD)是一種常見的振動(dòng)控制裝置,廣泛應(yīng)用于工程結(jié)構(gòu)的減震和振動(dòng)控制中。為了進(jìn)行NMSD的神經(jīng)網(wǎng)絡(luò)仿真研究,以下步驟進(jìn)行:
1. 數(shù)據(jù)收集:收集NMSD系統(tǒng)的輸入和輸出數(shù)據(jù)。輸入可以是外部激勵(lì)力或加速度,輸出可以是系統(tǒng)的位移、速度或加速度響應(yīng)。
2. 數(shù)據(jù)預(yù)處理:對(duì)收集到的數(shù)據(jù)進(jìn)行預(yù)處理,包括數(shù)據(jù)清洗、濾波、降采樣等。確保數(shù)據(jù)的質(zhì)量和準(zhǔn)確性。
3. 神經(jīng)網(wǎng)絡(luò)模型選擇:根據(jù)仿真的目標(biāo)和問題特點(diǎn),選擇合適的神經(jīng)網(wǎng)絡(luò)模型。常用的模型包括多層感知機(jī)(Multi-Layer Perceptron,MLP)、卷積神經(jīng)網(wǎng)絡(luò)(Convolutional Neural Network,CNN)等。
4. 數(shù)據(jù)劃分:將數(shù)據(jù)集劃分為訓(xùn)練集、驗(yàn)證集和測(cè)試集。通常采用交叉驗(yàn)證的方法,確保模型的泛化能力。
5. 網(wǎng)絡(luò)訓(xùn)練:使用訓(xùn)練集對(duì)選定的神經(jīng)網(wǎng)絡(luò)模型進(jìn)行訓(xùn)練。可以采用梯度下降法等優(yōu)化算法來最小化損失函數(shù),調(diào)整網(wǎng)絡(luò)的權(quán)重和參數(shù)。
6. 模型評(píng)估:使用驗(yàn)證集評(píng)估訓(xùn)練得到的模型的性能,包括準(zhǔn)確度、誤差等指標(biāo)。如果需要改進(jìn)模型,可以通過調(diào)整網(wǎng)絡(luò)結(jié)構(gòu)、超參數(shù)等來優(yōu)化模型。
7. 模型測(cè)試:使用測(cè)試集對(duì)優(yōu)化后的模型進(jìn)行測(cè)試,評(píng)估其在未見過的數(shù)據(jù)上的性能表現(xiàn)??梢员容^模型的預(yù)測(cè)結(jié)果和實(shí)際觀測(cè)值,分析模型的準(zhǔn)確度和可靠性。
在進(jìn)行非線性質(zhì)量彈簧阻尼器神經(jīng)網(wǎng)絡(luò)仿真研究時(shí),需要充分理解NMSD系統(tǒng)的原理和特性,并對(duì)神經(jīng)網(wǎng)絡(luò)的訓(xùn)練過程和參數(shù)調(diào)整有一定的了解。同時(shí),根據(jù)具體問題的需求,可以進(jìn)行更加深入和復(fù)雜的模型設(shè)計(jì)與研究。
??2 運(yùn)行結(jié)果
?
?
?
?主函數(shù)代碼:
function[]=main()
close all
clear all
clc
%Call network creating functions
Bnet=NNdamper();
Snet=NNspring();
close all
%Time
timestep=.1;
t=0:timestep:5;
st=size(t,2);
%Choice of Forcing Function
F=2*sin(2*t).*exp(-t/2);
for i=floor(st/2):st
F(1,i)=0;
end
%F=zeros(size(t));
%plot(t,F)
%size init.
pos=zeros(size(t));
vel=pos;
B=pos;
K=pos;
D=pos;
pdot_real=pos;
p_real=pos;
pos_real=pos;
vel_real=pos;
p=pos;
pdot=pos;
%I.C's!
pos(1)=0;%redundant but clear, ok?redundant but clear, ok?
vel(1)=0;
pos_real(1)=pos(1);
vel_real(1)=vel(1);
mass=5;%tons!
p(1)=vel(1)*mass;
p_real=p(1);
K0=sim(Snet,0);% In order to cancel(reduce) steady state error due to neural nets.
B0=sim(Bnet,0);
for i=1:size(t,2)-1;
? ??
? ? D(i)=Dtanal(i);
? ? % D(i)=0;
? ??
? ? K(i)=sim(Snet,pos(i));
? ? B(i)=sim(Bnet,vel(i));
? ??
? ? pdot(i+1)=F(1,i)+D(i)-K(i)-B(i)+K0+B0;
? ??
? ? %Momentum integrator
? ??
? ? p(i+1)=p(i)+pdot(i+1)*timestep;
? ??
? ? vel(i+1)=p(i)/mass;
? ??
? ? %Vel integrator
? ??
? ? pos(i+1)=pos(i)+vel(i+1)*timestep;
? ??
? ??
end
%Real solution
for i=1:size(t,2)-1;
? ??
? ? pdot_real(i+1)=F(1,i)+D(i)-Fxanal(pos_real(i))-Bvanal(vel_real(i));
? ??
? ? %Momentum integrator
? ??
? ? p_real(i+1)=p_real(i)+pdot_real(i+1)*timestep;
? ??
? ? vel_real(i+1)=p_real(i)/mass;
? ??
? ? %Vel integrator
? ? pos_real(i+1)=pos_real(i)+vel_real(i+1)*timestep;
? ??
? ??
end
%-------------------------------------------------
figure(2)
subplot(3,1,3);
plot(t,pdot/mass,'+',t,pdot_real/mass);
legend('acc','acc real');
subplot(3,1,2);
plot(t,vel,'+',t,vel_real);
legend('v','v real');
subplot(3,1,1);
plot(t,pos,'+',t,pos_real);
legend('p','p real');
%-------------------------------------------------
figure(3)
subplot(4,1,1);
plot(t,K,'+',t,Fxanal(pos));
legend('Spring Force','Spring Force real for NN pos');
subplot(4,1,2);
plot(t,B,t,Bvanal(vel));
legend('Damper force','Damper force real for NN vel')
subplot(4,1,3);
plot(t,p,t,p_real);
legend('p','p real')
subplot(4,1,4);
plot(t,pdot,'+',t,pdot_real);
legend('pdot','pdot_real');
figure(4)
a=linspace(-2,2);
subplot(1,2,1)
plot(a,sim(Snet,a),a,Fxanal(a))
legend('k nn', 'k real')
subplot(1,2,2)
plot(a,sim(Bnet,a),a,Bvanal(a))
legend('B nn', 'B real')
figure(5)
plot(t,D)
legend('Disturbance')
??3?參考文獻(xiàn)
部分理論來源于網(wǎng)絡(luò),如有侵權(quán)請(qǐng)聯(lián)系刪除。
[1]譚蔚,賈占斌,聶清德.彈簧阻尼器在塔器防振中的應(yīng)用[J].化學(xué)工程,2013,41(12):16-19+34.
[2]周瑜,李敬豪.基于自適應(yīng)彈簧阻尼器的變頻凝泵低頻共振治理方法研究[J].科技風(fēng),2023(07):58-61.DOI:10.19392/j.cnki.1671-7341.202307019.文章來源:http://www.zghlxwxcb.cn/news/detail-601958.html
[3]梁紅玉,屈鐵軍.基于彈簧阻尼器的風(fēng)機(jī)橋架的減振設(shè)計(jì)[J].北方工業(yè)大學(xué)學(xué)報(bào),2011,23(01):84-88.文章來源地址http://www.zghlxwxcb.cn/news/detail-601958.html
??4 Matlab代碼、Simulink仿真實(shí)現(xiàn)
到了這里,關(guān)于非線性質(zhì)量彈簧阻尼器的神經(jīng)網(wǎng)絡(luò)仿真研究(Matlab代碼&Simulink仿真實(shí)現(xiàn))的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!