Is there an algorithm to recognize recurring patterns?

Is there an algorithm to recognize recurring patterns?

Example:

An electricity meter measures the consumption of a house. A refrigerator has a recurring consumption pattern. Count the number of times the refrigerator compressor runs.

In this example, there are two refrigerators. The pattern is easy to see, even when both walk together.