MEC8024 Coursework - Railway Bogie Simulation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

MEC8024 

Coursework – Railway Bogie Simulation 
VehicleSimulator is a Matlab program that simulates a train bogie moving down a railway
track. The track is straight but not very good quality, and the vehicle bounces around a lot –
there’s a high risk of derailment.

There are various parameters that can be set at the start of the script:
kwheel The stiffness of the (longitudinal) springs between the bogie and each wheel.
kshaft The stiffness of the (transverse) springs between the bogie and each wheelset.
kbrace The stiffness of the cross-bracing springs between opposite-corner wheels.
Iy, Iz Moments of inertia of wheelset and bogie about y- and z-axes respectively.
mass Masses of the wheelset and the bogie.
D0 Neutral diameter of the wheels (typically 0.7 – 0.9).
c Conicity of the wheels (typically 0.1 – 0.2).
wheelbase Separation between front and back wheelsets.
axle load The load on each wheelset, normal to the track.
Also, a special wheel profile can be defined as a function using the ‘profile’ parameter.
The simulation uses ode23 to solve the dynamical system. The duration and time-step (which
determines the resolution of the results, not the actual solution) can be set, and the power
delivered to the wheelsets can be specified either as a function or a constant. If the system
becomes unstable, it will crash out, saying either ‘Derailed!’ if the transverse displacement is
too large, or ‘Unstable!’ if the wheelset orientations are too large.
On successful completion, the results are saved to an Excel spreadsheet.

Tasks 
Write a short report – no more than six pages – in which you should:
1. Develop a way to characterise and quantify the stability of the bogie, both considering
the safety of the vehicle and the comfort of the passengers.
2. Show how changing the parameters of the simulation affects the stability of the bogie.
3. Find or estimate appropriate values for the wheelbase, masses and moments of inertia
(the default values are just guesses), justifying your choices, and determine suitable
spring stiffness values that maximise stability.
28/03/19 13:07 H:\Downloads\Matlab...\VehicleSimulator.m 1 of 2

% ================================================
% **** Set up the track and adjust parameters ****
% ================================================

T = Track ();

% ==== bogie parameters ====


T.wheelbase = 2.3; % Distance between front wheelset and back wheelset [m]
T.fb_mass = 5000; % bogie: mass [kg]
T.fb_Iz = 8000; % bogie: moment of inertia about z-axis [kg.m2]
T.k_brace = 5E6; % spring constant: cross-bracing [N/m]
T.k_wheel = 1E6; % spring constant: wheel longitudinal spring [N/m]
T.k_shaft = 1E7; % spring constant: wheelset transverse [N/m]

% ==== wheel & wheelset parameters ====


T.D0 = 0.8; % neutral diameter [m]
T.c = 0.1; % conicity
T.ws_mass = 3000; % wheelset: mass [kg]
T.ws_Iy = 350; % wheelset: moment of inertia about y-axis [kg.m2]
T.axle_load = 10000; % 10 tonne axle load

% Optionally, design your own wheel profile; default is conical


% T.profile = @(y) y; % <- default
% T.profile = @(y) (exp (20 * y) - 1) / 20; % <- a bit more realistic

% Notes:
% @1.7m, k = {5E6,1E6,1E7}
% diameter 0.70 .. 1.00, c = 0.1 .. 0.2 are OK (for 60s)
% @2.3m, k = {5E6,1E6,1E7}
% diameter 0.80 .. 1.00, c = 0.1 (conical only) are OK (for 60s)

T.draw (-5, 85); % Plot the track - doesn't affect solution, only the animation

% =========================
% **** Add the vehicle ****
% =========================

B = Bogie (T);
B.draw_vehicle ();

% get_state() returns the current dynamic state of the vehicle:


s0 = B.get_state (); % initial state

% State vector description (also columns in results matrix S):


% s( 1) - front wheelset x-position
% s( 2) - front wheelset y-position
% s( 3) - front wheelset orientation (anticlockwise, about z-axis)
% s( 4) - front wheelset angular velocity (y-axis)
% s( 5) - back wheelset x-position
% s( 6) - back wheelset y-position
% s( 7) - back wheelset orientation (anticlockwise, about z-axis)
% s( 8) - back wheelset angular velocity (y-axis)
% s( 9) - bogie x-position, a.k.a. B.origin(1)
% s(10) - bogie y-position, a.k.a. B.origin(2)
% s(11) - bogie orientation, a.k.a. B.theta (anticlockwise, about z-axis)
28/03/19 13:07 H:\Downloads\Matlab...\VehicleSimulator.m 2 of 2

% s(12) - bogie x-velocity, a.k.a. B.vx


% s(13) - bogie y-velocity, a.k.a. B.vy
% s(14) - bogie angular velocity, a.k.a. B.vtheta (anticlockwise, about z-axis)

% The power supplied to drive the wheelsets is specified as a


% fraction of the total available power (-1..1). This can be a constant
% or a function of time and the vehicle dynamics.
power = @(t, s) 1; % maximum power, forwards, always

% The differential equation


dsdt = @(t, s) B.differential (s, power (t, s));

simulation_complete = false;
try
% solve the differential equations
dt = 0.5; % time step for animation & results matrix
tf = 60; % duraction of simulation
[T, S] = ode23 (dsdt, [0:dt:tf], s0);
% T and S are the time vector and corresponding results matrix

% plot the results & animate


B.draw_results (T, S);

% and we're done


simulation_complete = true;
catch ME
% oops, something went wrong!
% derailed if wheelset more than 20mm out of alignment, i.e., transverse position
% unstable if wheelset more than 2 degrees out of alignment
disp (ME.identifier)
disp (ME.message)
end

% ========================================
% **** Time to analyse the results... ****
% ========================================

if (simulation_complete)
fprintf ('Final position = %.3f m\n', B.origin(1));
fprintf ('Final velocity = %.3f m/s\n', B.vx);

% Save results to a spreadsheet


headers_1 = {'','Front Wheelset','','','','Back
Wheelset','','','','Bogie','','','','',''};
headers_2 = {'Time [s]','x [m]','y [m]','theta [rad]','omega [rad/s]',...
'x [m]','y [m]','theta [rad]','omega [rad/s]',...
'x [m]','y [m]','theta [rad]',...
'x-velocity [m/s]','y-velocity [m/s]','angular velocity
[rad/s]'};
xlswrite ('bogie-sim-data.xls', [headers_1; headers_2; num2cell([T, S])]);
end

You might also like