目录
💥1 概述
📚2 运行结果
🎉3 参考文献
👨💻4 Matlab代码
💥1 概述
非线性动力学的稀疏识别与模型预测控制(MPC)相结合。该框架从少量测量中学习受外生控制变量影响的非线性动力学模型。由此产生的SINDYc模型能够基于有限的噪声数据增强模型预测控制(MPC)的性能。SINDYc 模型是简洁的,识别模型中解释数据所需的最少项,使它们可解释和推广。
📚2 运行结果
主函数部分代码:
clear all, close all, clc
figpath = '../FIGURES/LORENZ/';
datapath = '../DATA/LORENZ/';
addpath('../utils');
SystemModel = 'LORENZ';
%% Generate Data
ONLY_TRAINING_LENGTH = 1;
InputSignalType = 'sphs'; % prbs; chirp; noise; sine2; sphs; mixed
getTrainingData
%% NARX: Training
ModelName = 'NARX';
Nvar = 3;
rng(2,'twister')
SUBSTRACT_MEAN = 0;
xmean = mean(x)';
if SUBSTRACT_MEAN == 1
xtrain = x' - repmat(xmean',[1 size(x',2)]);
utrain = u;
else
xtrain = x';
utrain = u;
end
% prepare training data
yt = con2seq(xtrain);
yi = con2seq(utrain);
% Neural network
stateDelays = 1; % state delay vector
inputDelays = 1; % input delay vector
hiddenSizes = [10]; % network structure (number of neurons per layer)
% Nonlinear autoregressive neural network
net = narxnet(inputDelays,stateDelays, hiddenSizes);
% Training parameters %nnstart
net.trainFcn = 'trainlm';
net.trainParam.min_grad = 1e-10;
net.trainParam.showCommandLine = 1;
% Prepares training data (shifting, copying feedback targets into inputs as needed, etc.)
[Us,Ui,Si,Ss] = preparets(net,yi,{},yt);
% Train net with prepared training data in open-loop
tic
net = train(net,Us,Ss,Ui,Si);
toc
% view(net)
% Close loop for recursive prediction
netc = closeloop(net);
🎉3 参考文献
[1]孙涛,沈允文,孙智民等.行星齿轮传动非线性动力学模型与方程[J].机械工程学报,2002(03):6-10.
部分理论引用网络文献,若有侵权联系博主删除。