All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
AIM OF PROJECT:- In a laboratory experiment, data of voltage and current has been recorded and the same is attached in an excel file ( Click on this link VI.xlsx ). Read the excel file in the Matlab program and perform the interpolation in the range of -17.3:0.1:0.9. Generate the interactive plot for the interpolated…
Swapnil Shinde
updated on 11 Oct 2022
AIM OF PROJECT:-
In a laboratory experiment, data of voltage and current has been recorded and the same is attached in an excel file ( Click on this link VI.xlsx ). Read the excel file in the Matlab program and perform the interpolation in the range of -17.3:0.1:0.9. Generate the interactive plot for the interpolated data and store them in a text file.
Key Highlights:
Deliverables:
PROGRAM SOLUTION:-
1.Interpolation
Interpolation is a useful Mathematical and Statistical tool that is used to estimate values between any two given points.
Interpolation can be defined as the process of finding a value between two points on a line or curve.
Now to help us remember what it means, we should think of the first part of the word, which is 'inter,' and which means 'enter,' and that reminds us to look 'inside' the data we originally had.
Interpolation is a tool which is not only useful in Statistics, but is a tool that is also useful in the field of science, business or any time whenever there is a need to predict values that fall within any two existing data points.
In this Project values are plotted by using Linear Interpolation and Spline Interpolation.
2. LINEAR INTERPOLATION
Linear interpolation is a form of interpolation, which involves the generation of new values based on an existing set of values. Linear interpolation is achieved by geometrically rendering a straight line between two adjacent points on a graph or plane. All points on the line other than the original two can be considered interpolated values.
PROGRAM CODE
fileid1=xlsread('VI'); %Excel file Read from this command
V = fileid1(:,1); %Variable V defined from Excel file and seperated
I = fileid1(:,2); %Variable I defined from Excel file and seperated
VV = [-17.3:0.1:0.9]; %Interpolation Range Defined as per Question
VV1 = interp1(V,I,VV); %Using Interpolation Command and storing data in VV1
VV2 = interp1(V,I,VV,'spline'); %Using Spline Interpolation
figure(1);
plot(V,I,'o',VV,VV1,':.'); %Graph Plotted
grid;
xlabel('Voltage'); ylabel('Current'); %Labelled X-axis and Y-axis
title('Linear Interpolation(VoltagevsCurrent)');
legend('Actual Value', 'Interpolated value');
figure(2);
plot(V,I,'o',VV,VV2,'r-.');
grid;
xlabel('Voltage'); ylabel('Current');
title('Spline Interpolation(VoltagevsCurrent)');
legend('Actual Value', 'Spline Interpolated value');
fileid = fopen('Interpolationoutput.txt','w'); %Text File opened in written mode
fprintf(fileid,' Voltage Current\n');
fprintf(fileid,'%4f %4f\n',VV,VV1); % Storing the interpolation data in txt file
fileid2 = fopen('Spline Interpolationoutput.txt','w'); %Text File opened in written mode
fprintf(fileid2,' Voltage Current\n');
fprintf(fileid2,'%4f %4f\n',VV,VV2); % Storing the Spline interpolation data in txt file
fclose(fileid);
fclose(fileid2);
VIunknown = [-17.2 -13 -11 -9 -6 -1 0.11 0.25 0.5 0.61 0.66]'; %Voltage Value from Sheet 2 of excel file VI.xlsx
IS1 = interp1(V,I,VIunknown);
figure(3);
plot(V,I,'o',VIunknown,IS1,'-.');
grid;
xlabel('Voltage'); ylabel('Current');
legend('Actual Value', 'Interpolated value');
fileid3 = fopen('VIunknown calculated output.txt','w'); %Text File opened in written mode
fprintf(fileid3,' Voltage Current\n');
fprintf(fileid3,'%4f %4f\n',VV,IS1); % Storing the interpolation data in txt file
fclose(fileid3);
OUTPUT:-
program.m file attached as interpolation.m and 3 text files attached
Program Code
WORKSPACE VARIABLES
Linear Interpolation Graph in which actual values and interpolated values of voltage and current are plotted.
Spline Interpolation Graph in which actual values and interpolated values of voltage and current are plotted.
Current value plotted by interpolation with only voltage value available
Output Saved in .txt file
SUMMARY OF THE CODE:-
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Project 2 - Modeling of 3 phase Induction Motor Drive
AIM: The aim is to design the 3 Phase Inverter using Simulink with switching frequency of 10KHz and Controlling the 3 phase Squirrel Cage Induction motor, using V/F method from 3 Phase Inverter. Given Parameters: Power = 100 HP DC Voltage = 800 V Output Voltage = 460 VRMS – line to line Initial Speed = 1500 RPM Final…
17 Mar 2023 12:25 PM IST
Project 1 - Loss calculation for a DC/DC converter-MATLAB
Design of boost converter, and calculating the loss of different components including power switching device and deriving efficiency of boost converter. This is applicable in power supply industry, electric vehicles etc where DC-DC converter is required to boost the voltage from DC source. All the aspects of this project…
11 Mar 2023 01:21 PM IST
Project 2
AIM: Using MATLAB/simulink and the drive cycle from the attached excel sheet, find- The max heat generation of the battery The SOC of the battery at 2 *104second of the battery operation Time Time Step Battery Current 00:00.4 0.1 -0.9632 00:00.5 0.2 -0.952 00:00.6 0.3 -0.9072 00:00.7 0.4 -0.9632 00:00.8 0.5…
20 Jan 2023 02:45 PM IST
Project 1
1. Design a battery pack for a car roughly 150 Kw with 120 V. Use 3500 mAh 3.6V nominal NMC chemistry cell. A battery management system (BMS) is said to be the brain of a battery pack. The BMS is a set of electronics that monitors and manages all of the battery’s performance. Most importantly, it keeps…
19 Jan 2023 02:34 PM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.