Because at first I did not explain my problem exactly I decided to provide a detailed explanation below to clear the discussions.

1) I have dc motor model (differential equation) from here: http://ctms.engin.umich.edu/CTMS/index.php?example=MotorPosition§ion=SimulinkModeling

2) I used this ODE eqution and model in simulink to find the prarmteres:

- J - moment of inertia of the rotor
- b - motor viscous friction constant
- K - the motor torque
- R - electric resistance
- L - electric inductance

To do this I measured the real speed of dc motor and position of rotor using PC computer and measurement card. How I messured this varibalies ?.I change the voltage applied to dc motor using measurement card of course. My impu signal **V** was a sinusoidal signal of parametres:

- Amplitude 0.5 volts
- Bias 0.5 volts

Samplig Time 0.01[s]. The input signal is as follows

Ok, the respons of systems

Ok, next I used matlab and simulink to find the parameters J, b, K, R, L of my model using data from csv file. This data was collected using measurement card. In this file **I have data from measurement card**

The columns in this file are:

- Column 1 - Is time vector (a read data with sampling time 0.01[s] for 0[s] to 50[s]
- Column 2 - Is input signal for dc motor
**V. THIS SIGNAL I GENERATE USING BLOK IN SIMULINK.**
- Column 3 -Is position of rotor theta
- Column 4 - Is speed of rotor.

I did not measure the current i(t) because I can't measure this using measurement card. I need a different device. So now I only use wath I have to find parmatres of system.

What next? Next I change my model in simulink as follows:

Finally I wrote the code to find the parameters of my model:

clc,close all,clear
%% Settings
PlotCSVData = 0;
UsePreviousParameters = 1;
%% Load data from csv file
LoadCSVData('servo_open_ident_1_A.csv')
%% Time
t = servo_open_ident_1_A(:,1);
%% Input
In(1).values = servo_open_ident_1_A(:,2);
%% Output
Out(1).values = servo_open_ident_1_A(:,3);
Out(2).values = servo_open_ident_1_A(:,4);
%% Plot open data
if PlotCSVData == 1
figure;
set(gcf,'Position',[291 277 1325 597])
for i=1:length(In)
subplot(length(In)+ length(Out),1,i)
plot(t,In(i).values);
xlabel('Time[s]');
ylabel(['In(',num2str(i),')'])
grid on
end
for i=length(In)+1:(length(In)+length(Out))
subplot(length(In)+ length(Out),1,i)
plot(t,Out(i-1).values);
xlabel('Time[s]');
ylabel(['Out(',num2str(i-1),')'])
grid on
end
end
%% Ident - Set defult value of paramteres and I/O data
if UsePreviousParameters == 0
J = 0.0158;
b = 0.01084;
K = 0.01173;
R = 0.04818;
L = 0.0629;
else
load estParameters
J = estParameters(1).value;
K = estParameters(2).value;
L = estParameters(3).value;
R = estParameters(4).value;
b = estParameters(5).value;
end
exp_data = ParameterEstimator.TransientExperiment('DC_Motor_ident_m');
% Assign input data.
set(exp_data.InputData(1), 'Data', In(1).values, 'Time', t);
% Assign output data.
set(exp_data.OutputData(1), 'Data', Out(1).values, 'Time', t);
set(exp_data.OutputData(2), 'Data', Out(2).values, 'Time', t);
%% Ident - Set paramteres to estimate
est = ParameterEstimator.Estimation('DC_Motor_ident_m');
est.OptimOptions.Method = 'fmincon';
est.OptimOptions.Algorithm = 'active-set';
est.OptimOptions.TolFun = 1e-4;
est.OptimOptions.TolX = 1e-4;
% Select J
est.Parameters(1).Estimated = true;
set(est.Parameters(1), 'Minimum', 0.0000001, 'Maximum', 1);
% Select K
est.Parameters(2).Estimated = true;
set(est.Parameters(2), 'Minimum', 0.001, 'Maximum', 1);
% Select L
est.Parameters(3).Estimated = true;
set(est.Parameters(3), 'Minimum', 0.0000001, 'Maximum', 0.01);
% Select R
est.Parameters(4).Estimated = true;
set(est.Parameters(4), 'Minimum', 0.05, 'Maximum', 10);
% Select b
est.Parameters(5).Estimated = true;
set(est.Parameters(5), 'Minimum', 0.000001, 'Maximum', 20);
%% Specify the experimental data for the estimation:
est.Experiments = exp_data;
%% Display the estimation iterations.
est.OptimOptions.Display ='iter';
%% Estimate parameters and state.
est.estimate
%% Plot measured data and final simulation responses.
[T,X,Y] = sim('DC_Motor_ident_m', t, [], [t In(1).values]);
figure
subplot(2,1,1)
plot(t, Out(1).values , T, Y(:,1), '-');
legend( 'Measured','Simulated');
subplot(2,1,2)
plot(t, Out(2).values , T, Y(:,2), '-');
legend( 'Measured','Simulated');
J = est.Parameters(1).value;
K = est.Parameters(2).value;
L = est.Parameters(3).value;
R = est.Parameters(4).value;
b = est.Parameters(5).value;
A = [0 1 0
0 -b/J K/J
0 -K/L -R/L];
B = [0;...
0;
1/L];
C = [1 0 0;
0 1 0];
%% Save paramteres
estParameters = est.Parameters;
save estParameters estParameters

And This is the results:

The paramters after optimization are:

J = 6.9347e-005;

b = 2.2480e-004;

K = 0.0094;

R = 0.2124;

L = 0.0015;

Now the question is why I need to do this in Maple? In my opinion Maple is very comfortable for analyzing ODE equation.

Now the goal is to find parameters J, b, K, R, and L in similar way like in Matlab.