Category Archives: Science (科学)

Root-Mean-Square Deviation (Error) – RMS, RMSD, and RMSE

The root-mean-square deviation (or error) characterizes the differences between two sets of data. Its name literally explains its definition: The difference is squared and then averaged, then the final result of the square root of the average.

For example, assume we have two sets of data:

Set A – x: 1, 2, 3 (red)

Set A – y: 1, 1, 2 (red)

Set B – x: 1, 2, 3 (blue)

Set B – y: 2, 3, 1 (blue)

Because the x coordinates of these two sets are identical, the RMSD can be directly calculated from the differences between each corresponding y values, as shown in the figure.

RMSD = sqrt( (e1^2+e2^2+e3^2) / 3 )

Therefore the sign of e1 (2, or 3) doesn’t matter, and only its amplitude affects the RMSD.

However, in real numerical calculations, the x coordinates of the two data sets are often not the same. In this case, we can specify one data set as the reference and the other one as the sample. The sample data will then be projected into the reference data and find the corresponding deviations.

For example, if we change the last x coor
dinate of set B to be 3.5 and select set A as the reference, the RMSD is calculated as illustrated in the figure. This time, the value of e3 is 3 instead of 2.

If the projection happens within two data points of the reference, then its value is a interpretation. If it is located outside the x range of the reference, its value is obtained through extrapolation (like the example).

Note that if we select set B to be the reference, the result will be different, as shown in the figure. Obviously, this time the value of e3 is much smaller than the case when set A is reference.

Here we give a Matlab program to calculate the RMSD. It requires the user to input two data sets and specify which data set is the reference.

link (works with Matlab and GNU Octave)

Advertisements

Shear Force

Shear force is name used to refer to some forces in a certain scenarios. A force is a force. There is no difference in the nature between the all kinds of varying forces. We human beings just like to give specific names to the same thing in different places.

As one example, if a square (let’s constraint ourselves to the 2D plane) experiences two opposite forces, which are applied to its center, the square is compressed and has a net force is the two forces doesn’t equal to each other (high school knowledge). If we shift the two forces to the top and bottom boundaries of the square, the two forces will rotate the square if it is free to rotate because a torque is generated. But if the square cannot rotate, it will deform and these two forces are called the shear forces.

Shear forces are often responsible for the crack and tear of materials. It is not hard to image in the previous example that the square in the 2nd scenario is more likely to break. In academia (or courses for students), the shear force is not very common. But people dealing with cantilever beams or mechanics may encounter shear forces quite often. For example, when a beam is supported by its two endpoints and there is a point force applied at the center, there will be two reactive forces to balance the applied force. When the beam has reached its equilibrium, any section of it should be balanced. So if we only look at left portion of it, there needs to be a shear force on the right boundary to balance the upward-pointing force on its left end.

Shear Force