Archive for the 'Engineering' Category

Fixing Noise in Physics Engine

Recently I have fixed one long-standing issue in the physics used for Subtransit. Previously all of the physics variables (velocity, slip and other ones) were plagued by noise – the values which one would expect to be stable were actually jittery and noisy.

One of most notable results of this was the fact that acceleration experienced by the train body was so jittery that attempting to attach camera motion to it would result in a sickening constant camera movement.

Subtransit uses a custom physics engine for handling wheel versus rails physics response (the collision and forces between rails and the train wheels) and PhysX for handling the rigid body physics. In the current version of the game, PhysX is used to calculate the secondary suspension (between the train and the bogey) and coupling between the train cars.

Continue reading ‘Fixing Noise in Physics Engine’

Compensating Train Performance with Automode – Electric Part

An important detail of the metro train is its ability to compensate its performance based on amount of passengers in the train. The Newton’s first law shows that acceleration is equal to force divided by mass (F = m*a or A = F/m), so if the engine power stays the same, increasing number of passengers (and therefore the total mass of the train) would result in train acceleration and deceleration decreasing. The end result is that it takes considerably longer to reach the target speed and the braking distance grows very considerably.

To compensate for its weight, the train uses a device called an automode (automatic mode). It’s an electropneumatic device which adjusts both electric and pneumatic performance of the train and its operation is fully recreated in Subtransit. This post only explores the electric part of the automode.

Continue reading ‘Compensating Train Performance with Automode – Electric Part’

Train Aerodynamics (part 1)

The metro trains experience an interesting set of aerodynamic effects in the tunnels. The train itself is used to circulate air through the tunnels and ventilation systems (hence its shape is not very aerodynamic at all, not that it matters at these low speeds). Of course, the main aerodynamic effect on the train is the drag force. On long sloped down sections of track (where the train moves without any power input) the aerodynamic drag can provide about 5 km/h of speed difference as train accelerates from 30 km/h to 80 km/h.

For Subtransit, I’m working on an aerodynamic model that would account for both drag produced by the train as it moves through the tunnel as well as additional torque force produced when train passes by a ventilation shaft. Currently, the CFD results are only preliminary, although there are a few interesting results already.

Continue reading ‘Train Aerodynamics (part 1)’

How Does a Rheostat Work?

The last post might look confusing without knowing what rheostats are and what they are used for. So this post will explain that without going into too much detail.

First, a simple reminder from the electric motor theory: any electric motor is a reversible machine, meaning that it can be used for both converting electricity into mechanical force and for converting mechanical energy back into electric energy.

Taking for example the train acceleration, as train starts to gain velocity its motors start acting as electric generators, generating counter-current that negates the externally applied voltage. If one would simply connect an electric motor to the DC power, it would simply spin up to a certain finite (and fixed) RPM value – at that point the generated voltage would be equal to external voltage.

The Ohm law applies for electric motors as well. A motor has very low internal electric resistance. Applying a high voltage would quite literally burn the motor. This is why when DC motor is starting, it requires only a fraction of voltage. One of the easiest way to adjust voltage is to dissipate the excess energy using extra resistance.

As train accelerates, the resistance should be decreased to compensate for constantly decreasing voltage (which is caused by motors generating electric voltage in the opposite direction of externally applied voltage). A rheostat is simply a variable electric resistance. The 81-717 train we simulate in Subtransit uses a rheostat controller to switch contacts through preset positions, resulting in parts of rheostat being shorted out and total current adjusted as needed (the schematic is a simplified version just for illustration):
(black square indicates closed contact, empty square indicates contact is open)

Continue reading ‘How Does a Rheostat Work?’

Rheostat Arrays

I have completed some work on the undertrain equipment for the 81-717 train, specifically the rheostat arrays. They are an array of resistances which are connected together in a specific way – as the train accelerates or brakes, the extra electric power that cannot be utilized by train is dissipated on these resistors as waste heat.

The rheostat array in Subtransit is all wired up correctly on each type of train – every single resistor, wire and conducting link are in their correct places and correspond to the physically simulated model. Of course, I don’t think anybody would notice if it was wrong, but these are the kinds of details that I want to see in the game.


Continue reading ‘Rheostat Arrays’