Ts = 100e-4;                    % SPS/Overall Simulation time step (s)
Tssc = Ts;                      % Simscape simulation time step (s)

G = 10;                         % Gear Ratio
Rdrum = 0.25;                   % Radius of drum (m)
Np = 5;
m_topdrive = 1000;              % Mass of topdrive (lb)
m_drillstring = 22500;          % Mass of drillstring (lb)
Rpulley = Rdrum;                % Radius of pulley (m)
loadScale = 4;                  % Load multiplier
m = m_topdrive + m_drillstring; % Total mass (kg)

% Top/Bottom Distance
xtop = 48*0.3048;               % Height of the rig (m)
xbott = 0;                      % Ground level (m)

% Maximum Torque/Power of Drive
Tmax = 8000*1.36;               % Maximum torque (Nm)
Pmax = 1500*746;                % Maximum poer (W)

% Initial Conditions
v0 = 0;                         % Initial Vertical Speed (m/s)
x0 = 0;                         % Initial Height (m)

% Gravity
g = 9.8;                        % Acceleration due to gravity (m/s^2)