How do i integrate a matrix between limits

4 views (last 30 days)
I am trying to get the ground roll for a UAV I'm designing as a project but I'm not sure how to integrate the matrix I have formed between the take off velocity and 0.
this is my code so far
clc
Vto=12; % take off velocity m/s
W=12*9.81;
rho=1.013; %Kg/m^3
u=0.03; % runway friction
g=9.81; %m/s^2
C_l=1.7; %coefficent of lift
A_W=1.5945; %m^2
V=[0:0.5:Vto]; %velocity matrix in m/s
L_gr=C_l.*((rho.*(V.^2))./2).*A_W; %Lift at ground roll
F_f=u*(W-L_gr);%rolling friction force
C_D=0.4; %coefficent of drag
D_gr=C_D.*((rho.*(V.^2))./2).*A_W; %drag in N
T=65; %Thrust in N
a=(9.81/W)*(T-D_gr-F_f); % acceleration in m/s^2
V_a=V./a %forming 1 matrix to then integrate
I have attached the equation I want to achieve the answer to. Any help would but much appreciated.

Accepted Answer

Geoff Hayes
Geoff Hayes on 22 Nov 2015
Rob - I think that you may first want to write those equations that depend upon velocity, v, as anonymous functions because it is these functions that you will be integrating over. Start with the lift at ground roll equation which can be written as an anonymous function that takes a single input, the velocity v, as
L_gr = @(v)C_l.*((rho.*(v.^2))./2).*A_W;
The above assumes that all constants have already been declared. We now do the same for the drag
D_gr = @(v)C_D.*((rho.*(v.^2))./2).*A_W;
So you have two functions that take a velocity as the input. (You can evaluate either of these functions as, for example, D_gr(1) where the input is 1 metre per second.) Now, as the equation for acceleration depends upon both of these equations, then we will write a as a function of v
a = @(v)(9.81/W)*(T-D_gr(v)-u*(W-L_gr(v)));
Note that I have replaced the rolling friction force F_f with u(W-L_gr(v)). The last anonymous function that we will write is the one to integrate. According to your equation, this is simply V/a or
f = @(v)v./a(v);
We can then use the MATLAB integral function to integrate the above as
groundDistance = integral(f,0,Vto);
  1 Comment
rob pullen
rob pullen on 23 Nov 2015
Geoff
I have followed your changes and its worked perfectly! Thank you ever so much I now know a little more MATLAB. You sir are a god amongst men!
Rob

Sign in to comment.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!