
% Flash 22.04.22
%developed during a lecture / computer simulation of mechtronic systems
%evoled example from the book "Helmut Scherf- Modellbildung und Simulation"
% Parameter Parachute Jumper
h_0  = 3000 ;   % m     height of the jump from plane
h_1  = 1500 ;   % m     height for open the parachute
h_test = 10 ;
h_SP = 1.2  ;   % height of legs of the jumper touching the grond
A_S  = 0.5 ;    % m^2   bodysurface of the jumper
A_FS = 30 ;     % m^2   surface ot the opened parachute
m_S  = 85 ;     % kg    mass of the jumper
c_w_F = 1.3 ;   %       coefficient of drag of the air
rho  = 1.2 ;    % kg/m^3 air density assumed constant
g    = 9.81 ;   % m/s^2 gravity
SimTime = 300;   %simulation time

k_O = 1/2*c_w_F*rho*A_FS %decay factor with opened parachute
k_L = 1/2*c_w_F*rho*A_S  %decay factor of the jumper falling
k_F = 2*g*m_S/0.5; %jumper can carry twice of his mass devided with 0.5 Meter  // a spring constant
k_D = 1/2*g*m_S/2;% proportionality facor of the velocity proportinal damping
h_SP = 1.2; % heigt of the point of mass of the jumper // stomach area

%PID-Controller parameter 
k_p =  -k_F;  %P
k_d =  -k_D;  %D
k_i =  -0.1*k_p; %I

%open simulation 
%simfile = '$PATH'
%sim(simfile);

figure(3); %plot it
subplot(3,1,1)

plot(out.simout.time,out.simout.signals.values(:,1));
xlabel('Time in seconds');
ylabel('velocity in m/s');
title('velocity of the free fall-chart');

subplot(3,1,2)
plot(out.simout.time,out.simout.signals.values(:,2));
xlabel('time in seconds');
ylabel('height in meter');
title('falling height path-time-chart');

subplot(3,1,3)
plot(out.simout.time,out.simout.signals.values(:,2));
xlabel('time in seconds');
ylabel('heigth in meter');
title('velocity-time chart');
ylim([0,25])
xlim([270,310]);
title('landing area / jumper path-time-chart')

