Question

O tittps/ualearn blackboard.com/bbcswebdav/pid plot a new function on the same graph overwriting the orizinal function 1 of11

problem2, the file "Test_Data.xlsx" contains in cylinder pressure data from a firing engine. the data is resolved in crank angle degree and is taken every 1/2 degree.

0 0
Add a comment Improve this question Transcribed image text
Answer #1


clc
clear
close all

%LOADING DATASET FROM MS EXCEL - Please note: Data for only 3 cycles was used

data = xlsread('Test_Data.xlsx');

CAD = data(:,1);
PRESSURE = data(:,2);

numer_of_data_points_per_cycle = 1440;
number_of_cycles = length(CAD)/numer_of_data_points_per_cycle;
cycles = 1:number_of_cycles;
anges_per_cycle = CAD(1:1440);

for i=1:number_of_cycles
p(i,:) = PRESSURE((i-1)*numer_of_data_points_per_cycle+1 :numer_of_data_points_per_cycle*i);
end

for i=1:number_of_cycles
plot(anges_per_cycle,p(i,:),'color',rand(1,3))
legInfo{i} = sprintf('Cycle #%d', i);
hold on
end
legend(legInfo)
xlabel('CAD')
ylabel('Pressure')
xlim([min(anges_per_cycle) max(anges_per_cycle)])
title('Pressure vs CAD for all cycles')
grid on

for i=1:number_of_cycles
minimum_pressure_for_each_cycle(i) = min(p(i,:));
end
minimum_pressure_for_each_cycle

for i=1:number_of_cycles
maximum_pressure_for_each_cycle(i) = max(p(i,:));
end
maximum_pressure_for_each_cycle

for i=1:number_of_cycles
avg_pressure_each_cycle(i) =mean(p(i,:));
end
avg_pressure_each_cycle
avg_pressure_all_cycles = mean(avg_pressure_each_cycle)

[psort,pos] = sort(maximum_pressure_for_each_cycle,'descend');

cycle_with_max_peak_pressure = pos(1);
cycle_with_min_peak_pressure = pos(end);

figure
plot(anges_per_cycle,p(cycle_with_max_peak_pressure,:),'-- m')
hold on
plot(anges_per_cycle,p(cycle_with_min_peak_pressure,:),'-. c')
hold on
plot([anges_per_cycle(1) anges_per_cycle(end)],[avg_pressure_all_cycles avg_pressure_all_cycles],'k','linewidth',2)
xlim([min(anges_per_cycle) max(anges_per_cycle)])
xlabel('CAD')
ylabel('Pressure')
title('Minimum,maximum peak pressure,overall average pressure')
grid on
legend(['cycle #' num2str(cycle_with_max_peak_pressure)],['cycle #' num2str(cycle_with_min_peak_pressure)],['overall average'])

minimum pressure for each cycle 0.0053 0.0167 0.0062 maximum_pressure_for_each_eycle - 1.0e+03 1.2612 2.8776 1.9240 avg press

Pressure vs CAD for all cycles 3000 Cycle #1 Cycle #2 2500 ___ Cycle #3)- 2000 1500 1000 500 100 200300 400 500 600 700 CAD

Minimum,maximum peak pressure,overall average pressure 3000 Cycle #2 Cycle #1 2500 _overall average 2000 1500 1000 500 0 100

Excel Data Arrangement Used: L6 1 angle pressure 0.5 1.280199909 1 8.006156603 1.5 1.205456398 16.03408284 10.08110479 16.860

COMMENT DOWN FOR ANY QUERY RELATED TO THIS ANSWER
PLEASE PLEASE GIVE A THUMBS UP

Add a comment
Know the answer?
Add Answer to:
problem2, the file "Test_Data.xlsx" contains in cylinder pressure data from a firing engine. the data is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • (a) Load the data file data/tips.csv into a pandas DataFrame called tips_df using the pandas read_table()...

    (a) Load the data file data/tips.csv into a pandas DataFrame called tips_df using the pandas read_table() function. Check the first five rows. (b) Create a new dataframe called tips by randomly sampling 6 records from the dataframe tips_df. Refer to the sample() function documentation. (c) Add a new column to tips called idx as a list ['one', 'two', 'three', 'four', 'five', 'six'] and then later assign it as the index of tips dataframe. Display the dataframe. (d) Create a new...

  • DESCRIPTION Complete the program using Java to read in values from a text file. The values...

    DESCRIPTION Complete the program using Java to read in values from a text file. The values will be the scores on several assignments by the students in a class. Each row of values represents a specific student's scores. Each column represents the scores of all students on a specific assignment. So a specific value is a specific student's score on a specific assignment. The first two values in the text file will give the number of students (number of rows)...

  • matlab 1. [suDmit as Iwo JPEGS in Canvas with your netiD in the title of each...

    matlab 1. [suDmit as Iwo JPEGS in Canvas with your netiD in the title of each plot] An electricity startup is looking into the viability of putting solar panels on the rooftops of buildings in Newark, NJ. They want you to help them come up with visualizations for data they have from the National Renewable Energy Laboratory and the National Oceanic and Atmospheric Administration about: - The average amount of sunshine received each month in the form of Global Horizonal...

  • C Programming, getting data from a file and computing them into 5 parallel arrays so that...

    C Programming, getting data from a file and computing them into 5 parallel arrays so that they can be used for later calculation. Also please avoid using structures at all costs for this code as they have not yet been covered. # Melbourne Central Daily Pedestrian Counts day 2 2009 2009 2009 06 06 06 01 02 03 daycount 22663 22960 23618 4 2018 2018 02 02 27 28 33722 33164 4 There will always be two heading lines in...

  • Lab Exercise #15 Assignment Overview This lab exercise provides practice with Pandas data analysis library. Data...

    Lab Exercise #15 Assignment Overview This lab exercise provides practice with Pandas data analysis library. Data Files We provide three comma-separated-value file, scores.csv , college_scorecard.csv, and mpg.csv. The first file is list of a few students and their exam grades. The second file includes data from 1996 through 2016 for all undergraduate degree-granting institutions of higher education. The data about the institution will help the students to make decision about the institution for their higher education such as student completion,...

  • write a code on .C file Problem Write a C program to implement a banking application...

    write a code on .C file Problem Write a C program to implement a banking application system. The program design must use a main and the below functions only. The program should use the below three text files that contain a set of lines. Sample data of these files are provided with the assessment. Note that you cannot use the library string.h to manipulate string variables. For the file operations and manipulations, you can use only the following functions: fopen(),...

  • Before you start For this homework, we will need to import some libraries. You need to...

    Before you start For this homework, we will need to import some libraries. You need to execute the following cell only once; you don't need to copy this in every cell you run. In [ ]: import pandas import numpy from urllib.request import urlretrieve from matplotlib import pyplot %matplotlib inline ​ #This library is needed for testing from IPython.display import set_matplotlib_close set_matplotlib_close(False) Introduction In this homework, you will work with data from the World Bank. The subject of study is...

  • In this project, you will work with sales data from Top’t Corn, a popcorn company with...

    In this project, you will work with sales data from Top’t Corn, a popcorn company with an online store, multiple food trucks, and two retail stores. You will begin by inserting a new worksheet and entering sales data for the four food truck locations, formatting the data, and calculating totals. You will create a pie chart to represent the total units sold by location and a column chart to represent sales by popcorn type. You will format the charts, and...

  • Objеctivеs: 1) Usе rеcursion; 2) Undеrstand and apply backtracking; 3) Usе STL containеr; Projеct dеscription: Writе...

    Objеctivеs: 1) Usе rеcursion; 2) Undеrstand and apply backtracking; 3) Usе STL containеr; Projеct dеscription: Writе a C++ program that, givеn a starting point, finds its way out of a mazе. Thе mazе’s map will bе rеad from a filе at thе start of thе program. Your codе must work for all lеgal mazеs.. Thе mazе is a rеctangular grid rеprеsеntеd as a 2D array, and thе еxit (if thеrе is onе) should bе placеd on an outеr row or...

  • Nay programming languge is fine (MatLab, Octave, etc.) This is the whole document this last picture...

    Nay programming languge is fine (MatLab, Octave, etc.) This is the whole document this last picture i sent is the first page 5. Write and save a function Sphere Area that accepts Radius as input argument, and returns SurfaceArea (4 tt r) as output argument. Paste the function code below. Paste code here 6. Validate your Sphere Area function from the command line, checking the results against hand calculations. Paste the command line code and results below. 7. Design an...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT