How to interpolate 3 matrices?
4 ビュー (過去 30 日間)
古いコメントを表示
Hello everybody,
I have acquired data from testing an electric motor on a test bench. The data is organized in 3 matrices, one matrix for rpm, one for motor torque and one for efficiency. The motor was controlled by arduino and the test consisted on forcing an acceleration ramp at different slopes. The matrices have a size of 5326X15 where each column correspond to a ramp. I am seeking a way to create a grid of rpm and torque and interpolate the efficiency values at those grid points.
0 件のコメント
採用された回答
Mathieu NOE
2021 年 12 月 2 日
hello Federico
this is my suggestion : I give a given RPM target value and serach for all points in the 2D array that are close to this value (with a given tolerance); then I can plot the same coordinate points from the torque and efficiency curves
the second figure I added a bit of smoothing
example for RPM = 3000
rpm_tol = 1;
rpm_target = 3000;
[row, column] = find(abs(rpm-rpm_target) < rpm_tol);
rpm_values = rpm(sub2ind(size(rpm), row, column));
C_mot_values = C_mot(sub2ind(size(C_mot), row, column));
eta_mech_values = eta_mech(sub2ind(size(eta_mech), row, column));
figure,
subplot(311),plot(rpm_values);
ylabel('RPM');
subplot(312),plot(C_mot_values);
ylabel('Torque');
subplot(313),plot(eta_mech_values);
ylabel('Efficiency');
figure,
meth = 'gaussian';
N = 10;
subplot(311),plot(smoothdata(rpm_values,meth,N));
ylabel('RPM');
subplot(312),plot(smoothdata(C_mot_values,meth,N));
ylabel('Torque');
subplot(313),plot(smoothdata(eta_mech_values,meth,N));
ylabel('Efficiency');
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Motor Drives についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!