# How can I identify a step in an increasing time series?

The time series data, as shown in image 1, has 3 separate steps connected by increasing data. How do I detect these steps?

An easier set of data with one step could be created in R as follows:

x <- seq(1,220)
y <- c(seq(1,100),rep(100, times = 20),seq(101,200))
plot(x,y)


The output is shown in image 2. How would I detect this step? I think a solution to this simple problem would be similar to finding the steps in the earlier dataset.

dy=diff(y)