×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Matlab Driveline Modelling Help

## Matlab Driveline Modelling Help

(OP)
Hello,
I am trying to run a theoreical driveline modelling program. I'm not the best at Matlab, which you may see with my program, if any help could be thrown my way to aid in actually making the program able to run would be greatly appreciated.

Mark

--------------------------

function ydot = bm(t,y)
global A B C D E J T ydot y Jw m r i1 i2 Je Te Tfric cair A p Td t

J = Jw + m*r^2 + i1^2 *i2^2 * Je;
T = Te - Tfric;
A = -m * r^2;
B = -0.5 * cair * A * p * r^3;
C = -r * m;

D = [T]*[i1*i2];
E = [A B C]*[y;y^2;1];
ydot = (D + E)/J;

Td=Te*i1;

---------------------------------

global A B C D E J T ydot y t Jw m r i1 i2 Je Te Tfric cair A p

t=[0:1:10];
y = 2 * pi / 60 * (7000 + 5000 * sin[t/1.5]);
r = 0.1625;
m = 500;
i1 = 1.086;
i2 = 3;
Jw = 25 * r^2;
Je = 0.1;
Te = Je * ydot;
Tfric = 0.1 * Te * ( 1 + cos[t/1.5] * sin [t/1.5]);
cair = 0.8;
A = 1.7;
p = 1.2;

[t,y] = ode23('basicmodel', [0, 10], [0, 250]);

subplot(2,2,1)
subplot(2,2,2)
subplot(2,2,3)
plot(y,Td), xlabel('rpm'), ylabel('Nm'), gtext('Driveshaft Torque');

-----------------------------------------

Thanks for looking,
Mark

### RE: Matlab Driveline Modelling Help

(OP)
have changed bracket type on sin and cos functions, but obviously not underlying problem :S

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!