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.

采纳的回答

Mathieu NOE
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 个)

类别

Help CenterFile Exchange 中查找有关 Motor Drives 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by