idnlgrey fixed step problem

2 views (last 30 days)
erhan aksu
erhan aksu on 7 Jan 2016
function [dx, y] = examp2(t, x, u,a,b,c,d, varargin)
% Output equations.
y = [x(1); ... %
x(2) ... %
];
% State equations.
dx = [a*x(1)+b*x(2); ... %
c*x(1)+d*x(2); ... %
];
Main Programme clear all clc dataall=xlsread('data.xlsx'); t=dataall(:,1); d1=dataall(:,2); d2=dataall(:,3); y=[d1 d2]; data = iddata(y, [], 0.01, 'Name', 'B'); % FileName = 'examp2'; % File describing the model structure. % Order = [2 0 2]; % Model orders [ny nu nx]. % InitialStates = [9; -1]; % Initial initial states. % Ts = 0; % Time-continuous system. % % a=-1; b=6; c=2; d=1; % Parameters = {a,b,c,d}; % nonlinear_model = idnlgrey(FileName, Order, Parameters, InitialStates, Ts); % nonlinear_model.Algorithm.SimulationOptions.Solver = 'ode1'; % Euler forward. % nonlinear_model.Algorithm.SimulationOptions.FixedStep = (????); % Step size. % nonlinear_model = pem(data,nonlinear_model); % compare(data,nonlinear_model)
This main programme is used to estimate a,b,c,d parameter. Main dif.equaition is x'=-2*x+7*y and y'=3*x+2*y . I used grey box model. When I used ode45 programme is working. But When I used ode1 this is fixed step model my final value is zero. Why? How can I do fixed step size value correctly.(0.01 value tried but it is not working?) Good days

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!