Dear stackoverflow community
I have been struggeling with the following problem. I have got this code to estimate Parameters with provided Matlab functions for Greybox Modeling. Matlab doesnt give me a step response for my given idnlgrey element. How can that be? If I code one of the given example. I have tried to change the code of one of the given examples regarding greybox identification and the same problems occurrs. I really dont understand what can be the problem here.
clear all; close all; clc;
ParName = {'a'; ... %3x3
'b'; ... %3x3
'c' ... %1x1
};
ParUnit = {'kg'; 'kg/s'; 'm'};
ParValue = {diag([2652.25; 2825.29; 4201.26]); ...
diag([848.05; 10161.62; 22719.39]); ...
100};
FileName = 'boat_c';
Order = [3 2 3];
Parameters = struct('Name', ParName, 'Unit', ParUnit, 'Value', ParValue, 'Minimum', 0, 'Maximum', Inf, 'Fixed', false);
Ts = 0;
InitialStates = struct('Name', {'r'; 's'; 't'}, 'Unit', {'m/s'; 'm/s'; '1/s'}, ...
'Value', [0; 0; 0], 'Minimum', -Inf, 'Maximum', Inf, 'Fixed', true);
nlgr = idnlgrey(FileName, Order, Parameters, InitialStates, Ts, 'Name', 'Boot', ...
'InputName', {'x'; 'y'}, 'InputUnit', {'N'; 'rad'}, ...
'OutputName', {'r'; 's'; 't'}, 'OutputUnit', {'m/s'; 'm/s'; '1/s'}, 'TimeUnit', 's');
step(nlgr)
function [dx, y] = boat_c(t, x, u, m, d, varargin)
y = [x(1); x(2); x(3)];
dx = [m(2,2)/m(1,1)*x(2)*x(3)-d(1,1)/m(1,1)*x(1)+u(1)*cos(u(2))/m(1,1); ...
-m(1,1)/m(2,2)*x(1)*x(3)-d(2,2)*m(2,2)*x(2)+u(1)*sin(u(2))/m(2,2); ...
(m(1,1)-m(2,2))/m(3,3)*x(1)*x(2)-d(3,3)/m(3,3)*x(3)+L/2*u(1)*sin(u(2))/m(3,3)];
end