⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 invinit.m

📁 类神经网路─MATLAB的应用(范例程式)
💻 M
字号:
% ------------------------------>  INVINIT.M  <------------------------------

% ----------      Switches       -----------
regty      ='dic';           % Controller type (dic, pid, none)
refty      ='siggener';      % Reference signal (siggener/<var. name>)
simul      ='simulink';      % Control object spec. (simulink/matlab/nnet)


% ------    General Initializations  -------
Ts = 0.20;                   % Sampling period (in seconds)
samples = 200 ;              % Number of samples to be simulated


% --  System to be Controlled (SIMULINK) --
integrator= 'ode45';         % Name of dif. eq. solver (f. ex. ode45 or ode15s)
sim_model = 'spm1';          % Name of SIMULINK model


% ---  System to be Controlled (MATLAB)  --
mat_model = 'springm';       % Name of MATLAB model
model_out = 'smout';         % Output equation (function of the states)
x0        = [0;0];           % Initial states


% ---  System to be Controlled (neural net)  --
% The file must contain: NN, NetDeff, W1f, W2f
nnforw = 'forward';          % Name of file


% ----- Inverse Network Specification ------
% The file must contain the variables:
% NN, NetDefi, W1i, W2i
% (i.e. regressor structure, architecture definition, and weight matrices)
nninv = 'inverse';           % Name of file


% ------------ Reference Filter ---------------
Am = [1];                    % Filter denominator
Bm = [1];                    % Filter numerator


% ------------ Reference signal ------------
dc      = 0;                 % DC-level
sq_amp  = 1;                 % Amplitude of square signals (row vector)
sq_freq = 0.1;               % Frequency of square signals (column vector)
sin_amp = [0];               % Amplitude of sine signals  (row vector)
sin_freq= [0]';              % Frequency of sine signals   (column vector)
Nvar  = 0';                  % Variance of white noise signal


% --------  Linear Controller Parameters  --------- 
K=8;                         % PID parameters
Td=0.8;                      % PID
alf=0.1;                     % PID
Wi=0.2;                      % PID (1/Ti)


% ------- Specify data vectors to plot --------
% Notice that all strings in plot_a and plot_b resp. MUST have the same length
plot_a(1,:) = 'ref_data    ';
plot_a(2,:) = 'y_data      ';
plot_b(1,:) = 'u_data';


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -