SlideShare a Scribd company logo
5/9/13 12:14 PM D:arshad khodroDesign and simulationp...Bensonproject1.m 1 of 3
clc, clear all, close all
%inputs:
L_ur=0.2*13;
L_dr=L_ur;
k_r0=.011172;
k_r1=-.080336;
k_r2=.4686;
k_r3=.6119;
k_m0=-.0070858;
k_m1=1.7673;
k_m2=-.45161;
k_m3=-.31158;
C_ur=.2;
C_dr=.2;
N=6000;
Lsr=13;
teta_dw=10;
teta_v=290;
teta_ur=40;
teta_dr=teta_ur;
teta_ul=100;
teta_dl=teta_ul;
%functions:
%ramp up
teta1=0:teta_ur;
teta_s1=teta1/teta_ur;
L_s1=k_r0+k_r1*teta_s1+k_r2*(teta_s1).^2+k_r3*(teta_s1).^3;
L_teta1=L_s1*Lsr*C_ur;
%main lift up
teta2=teta_ur:teta_ur+teta_ul;
lur=L_teta1(length(L_teta1));
teta_s2=(teta2-teta_ur)/teta_ul;
L_s2=k_m0+k_m1*teta_s2+k_m2*(teta_s2).^2+k_m3*(teta_s2).^3;
L_teta2=lur+L_s2*(Lsr-lur);
%dwell period
teta3=teta_ur+teta_ul:teta_ur+teta_ul+teta_dw;
teta_s3=1;
L_teta3=zeros(1,length(teta3));
L_teta3=L_teta3+Lsr;
%main lift down
teta4=teta_ur+teta_ul+teta_dw:teta_ur+teta_ul+teta_dw+teta_dl;
teta_s4=(teta_ur+teta_ul+teta_dw+teta_dl-teta4)/teta_dl;
L_s4=k_m0+k_m1*teta_s4+k_m2*(teta_s4).^2+k_m3*(teta_s4).^3;
ldr=lur;
L_teta4=ldr+L_s4*(Lsr-ldr);
5/9/13 12:14 PM D:arshad khodroDesign and simulationp...Bensonproject1.m 2 of 3
%ramp down
teta5=teta_ur+teta_ul+teta_dw+teta_dl:teta_ur+teta_ul+teta_dw+teta_dl+teta_dr;
teta_s5=(teta_ur+teta_ul+teta_dw+teta_dl+teta_dr-teta5)/teta_dr;
L_s5=k_r0+k_r1*teta_s5+k_r2*(teta_s5).^2+k_r3*(teta_s5).^3;
L_teta5=C_dr*L_s5*Lsr;
%combine
L_total=[L_teta1 L_teta2 L_teta3 L_teta4 L_teta5];
teta=[teta1 teta2 teta3 teta4 teta5];
%l_smooth(1)=ltotal(1);theta_smooth(1)=theta(1);
%l_smooth(length(theta))=0;theta_smooth(length(theta))=theta(length(theta));
L_smooth=L_total;theta_smooth=teta;
for j=1:10
for i=2:length(theta_smooth)-1
L_smooth(i)=0.5*(L_smooth(i-1)+L_smooth(i+1));
theta_smooth(i)=theta_smooth(i);
end
end
for k=1:length(teta)-2
cv1(k)=6*N/1000*(L_total(k+1)-L_total(k))/1;
cv2(k)=6*N/1000*(L_total(k+2)-L_total(k+1))/1;
gv12(k)=6*N/9.81*(cv2(k)-cv1(k))/1;
theta_v1(k)=teta(k);
theta_v2(k)=teta(k);
cv1_smooth(k)=6*N/1000*(L_smooth(k+1)-L_smooth(k))/1;
cv2_smooth(k)=6*N/1000*(L_smooth(k+2)-L_smooth(k+1))/1;
gv12_smooth(k)=6*N/9.81*(cv2_smooth(k)-cv1_smooth(k))/1;
theta_v1_smooth(k)=teta(k);
theta_v2_smooth(k)=teta(k);
end
% plot:
figure(1)
plot(teta,L_total)
hold on
plot(theta_smooth,L_smooth,'g--')
grid
xlabel('CRANK ANGLE (deg)')
ylabel(' VALVE LIFT (mm)')
legend('NO SMOOTHING','AFTER 10 SMOOTHING')
title('VALVE LIFT')
figure(2)
plot(theta_v1,cv1)
hold on
plot(theta_v1_smooth,cv1_smooth,'g--','linewidth',2)
grid
xlabel('CRANK ANGLE (deg)')
ylabel('VALVE VELOCITY (m/s)')
legend('NO SMOOTHING','AFTER 10 SMOOTHING')
title('VALVE VELOCITY')
5/9/13 12:14 PM D:arshad khodroDesign and simulationp...Bensonproject1.m 3 of 3
figure(3)
plot(theta_v1,gv12)
hold on
plot(theta_v1_smooth,gv12_smooth,'g--','linewidth',2)
grid
xlabel('CRANK ANGLE (deg)')
ylabel('VALVE ACCELERATION (g)')
legend('NO SMOOTHING','AFTER 10 SMOOTHING')
title('VALVE ACCELERATION')

More Related Content

Featured

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 

Featured (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Sayed rasool zojaji nezhad

  • 1. 5/9/13 12:14 PM D:arshad khodroDesign and simulationp...Bensonproject1.m 1 of 3 clc, clear all, close all %inputs: L_ur=0.2*13; L_dr=L_ur; k_r0=.011172; k_r1=-.080336; k_r2=.4686; k_r3=.6119; k_m0=-.0070858; k_m1=1.7673; k_m2=-.45161; k_m3=-.31158; C_ur=.2; C_dr=.2; N=6000; Lsr=13; teta_dw=10; teta_v=290; teta_ur=40; teta_dr=teta_ur; teta_ul=100; teta_dl=teta_ul; %functions: %ramp up teta1=0:teta_ur; teta_s1=teta1/teta_ur; L_s1=k_r0+k_r1*teta_s1+k_r2*(teta_s1).^2+k_r3*(teta_s1).^3; L_teta1=L_s1*Lsr*C_ur; %main lift up teta2=teta_ur:teta_ur+teta_ul; lur=L_teta1(length(L_teta1)); teta_s2=(teta2-teta_ur)/teta_ul; L_s2=k_m0+k_m1*teta_s2+k_m2*(teta_s2).^2+k_m3*(teta_s2).^3; L_teta2=lur+L_s2*(Lsr-lur); %dwell period teta3=teta_ur+teta_ul:teta_ur+teta_ul+teta_dw; teta_s3=1; L_teta3=zeros(1,length(teta3)); L_teta3=L_teta3+Lsr; %main lift down teta4=teta_ur+teta_ul+teta_dw:teta_ur+teta_ul+teta_dw+teta_dl; teta_s4=(teta_ur+teta_ul+teta_dw+teta_dl-teta4)/teta_dl; L_s4=k_m0+k_m1*teta_s4+k_m2*(teta_s4).^2+k_m3*(teta_s4).^3; ldr=lur; L_teta4=ldr+L_s4*(Lsr-ldr);
  • 2. 5/9/13 12:14 PM D:arshad khodroDesign and simulationp...Bensonproject1.m 2 of 3 %ramp down teta5=teta_ur+teta_ul+teta_dw+teta_dl:teta_ur+teta_ul+teta_dw+teta_dl+teta_dr; teta_s5=(teta_ur+teta_ul+teta_dw+teta_dl+teta_dr-teta5)/teta_dr; L_s5=k_r0+k_r1*teta_s5+k_r2*(teta_s5).^2+k_r3*(teta_s5).^3; L_teta5=C_dr*L_s5*Lsr; %combine L_total=[L_teta1 L_teta2 L_teta3 L_teta4 L_teta5]; teta=[teta1 teta2 teta3 teta4 teta5]; %l_smooth(1)=ltotal(1);theta_smooth(1)=theta(1); %l_smooth(length(theta))=0;theta_smooth(length(theta))=theta(length(theta)); L_smooth=L_total;theta_smooth=teta; for j=1:10 for i=2:length(theta_smooth)-1 L_smooth(i)=0.5*(L_smooth(i-1)+L_smooth(i+1)); theta_smooth(i)=theta_smooth(i); end end for k=1:length(teta)-2 cv1(k)=6*N/1000*(L_total(k+1)-L_total(k))/1; cv2(k)=6*N/1000*(L_total(k+2)-L_total(k+1))/1; gv12(k)=6*N/9.81*(cv2(k)-cv1(k))/1; theta_v1(k)=teta(k); theta_v2(k)=teta(k); cv1_smooth(k)=6*N/1000*(L_smooth(k+1)-L_smooth(k))/1; cv2_smooth(k)=6*N/1000*(L_smooth(k+2)-L_smooth(k+1))/1; gv12_smooth(k)=6*N/9.81*(cv2_smooth(k)-cv1_smooth(k))/1; theta_v1_smooth(k)=teta(k); theta_v2_smooth(k)=teta(k); end % plot: figure(1) plot(teta,L_total) hold on plot(theta_smooth,L_smooth,'g--') grid xlabel('CRANK ANGLE (deg)') ylabel(' VALVE LIFT (mm)') legend('NO SMOOTHING','AFTER 10 SMOOTHING') title('VALVE LIFT') figure(2) plot(theta_v1,cv1) hold on plot(theta_v1_smooth,cv1_smooth,'g--','linewidth',2) grid xlabel('CRANK ANGLE (deg)') ylabel('VALVE VELOCITY (m/s)') legend('NO SMOOTHING','AFTER 10 SMOOTHING') title('VALVE VELOCITY')
  • 3. 5/9/13 12:14 PM D:arshad khodroDesign and simulationp...Bensonproject1.m 3 of 3 figure(3) plot(theta_v1,gv12) hold on plot(theta_v1_smooth,gv12_smooth,'g--','linewidth',2) grid xlabel('CRANK ANGLE (deg)') ylabel('VALVE ACCELERATION (g)') legend('NO SMOOTHING','AFTER 10 SMOOTHING') title('VALVE ACCELERATION')