# Lecture 29 - Practical Control and Calibration

1. How to give a demo

# Practical Control

## Data

What data do you have?

• train number
• speed requested
• track segment
• length of track segment
• absolute times at ends

How do you find out where the train is?

• last sensor hit, plus
• (travel time since last sensor) * velocity

We need to use the data to get a good estimate of the velocity, which may be a function of

• speed requested
• train number
• track segment
• time because of train degradation

This data has three types of errors

1. screw-up errors
1. throw them out
2. sometimes you can eliminate them
2. random errors
• average them out
• often you can turn random errors into systematic ones
3. systematic errors
• project them out

How useful is yesterday's data?

#### Eliminating screw-up errors

Redefine the track

For example, if a sensor malfunctions frequently

• combine the two track segments into one

#### Transforming random errors

You can sometimes identify patterns in what you think are random errors

• e.g., you have one speed calibration for curved segments
• another for straight segments
• and discover that segments with switches are different.

Subdivide the data.

• Do this as little as possible, but not too little

## Processing Data

### Averaging

Subdivide data into cells, average within cells.

#### Averaging techniques

1. whole series: average' = average * (n-1)/n + data / n
2. moving window, varying
• size
• weighting

equal weighting: average' = average + (new-data - dropped-data)/n