How to calculate the closeness between two curves

In engineering practice, it is often necessary to evaluate how close a curve is to the standard curve to evaluate the roughness parameter corresponding to the object.

enter image description here

I want to know which built-in functions can fulfill such requirements.