www.pudn.com > nnctrl_v5.zip > invinit1.m, change:1997-06-06,size:2601b


% ------------------------------>  INVINIT1.M  <------------------------------ 
% Initialization file for the program "special1" 
 
 
% ----------      Switches       ----------- 
simul      = 'simulink';     % Control object spec. (simulink/matlab/nnet) 
refty      = 'siggener';     % Reference signal (siggener/<variable name>) 
if exist('simulink')~=4, 
  simul      ='matlab';      % Simulink not present 
end 
 
 
% ------    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 
  
 
% ----- Neural Network Specification ------ 
% The "forward model file" must contain the following variables which together 
% define a NNARX-model: 
% NN, NetDeff, W1f, W2f 
% and the "inverse model file" must contain 
% NN, NetDefi, W1i, W2i 
% (i.e. regressor structure, architecture definition, and weight matrices) 
nnforw = 'forward';          % Name of file containing forward model 
nninv  = 'inverse';          % Name of file containing inverse model 
 
 
% ------------ Reference Model --------------- 
Am = [1 -0.7];               % Model denominator 
Bm = [0.3];                  % Model numerator (starts in z^-1) 
Am=1; Bm=1; 
 
% ---------- Training alg. parameters -------- 
maxiter = 10;                % Number of epochs. iterations=maxiter*samples 
eta = 0.1;                   % Step size 
 
 
% ------------  Reference signal  ------------ 
% Reference generated by the signal generator 
dc      = 0;                 % DC-level 
sq_amp  = 0.5;               % 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 
 
 
% ------- 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_a(3,:) = 'ym_data     '; 
plot_a(4,:) = 'yhat_data   '; 
plot_b(1,:) = 'u_data';