% m-file to generate the Force-Velocity curve for the DTS2500KN system
% there are options to use 1 or 2 servovalves/actuator and 1 or 2 actuators
% together

% maximum force of 1 actuator is considered to be 2250 KN
MaxForce = 2250
MaxStaticForce = 2500

% I have to do conversion to inches/sec velocity and then figure out how
% many meters per sec.
% 1600 liters/minute = 422.675 gallons/minute
% 3.85 cubic-inches/sec = 1 gallon/minute
% therefore, 1600 liters/minute = 1627.3 cubic-inches/sec
% 2500 KN = 562,022 pounds which means 187.34 square-inches piston area
% so 1627.3/187.34 = 8.69 inches/sec max velocity = 0.2207 meters/sec
% for 1 actuator and 1 servovalve

MaxVel = 0.2207
MaxStaticVel = 0.25

NValve = 2
NActuator = 2

FMax = NActuator * MaxForce
VMax = NValve * MaxVel
YMaxScale = MaxStaticForce * NActuator
XMaxScale = MaxStaticVel * NValve

vel = 0.0
deltav = 0.01
for i = 1:101,
    f(i,1) = FMax * (1.0 - (vel)^2)
    v(i,1) = VMax * vel
    vel = vel + deltav
end;
plot(v(:,1),f(:,1))
axis([ 0 XMaxScale 0 YMaxScale])
title('DTS2500 Force-Velocity Curve')
ylabel('Force (KN)')
xlabel('Velocity (M/Sec)')
grid on

