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.

 채택된 답변

Mathieu NOE
Mathieu NOE 2021년 12월 2일

1 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

태그

질문:

2021년 12월 2일

답변:

2021년 12월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by