Dc motor speed measurement issue
The problem is velocity measurements are more susceptible to noise and the resolution of the encoder, this is especially apparent at low speeds (low speed meaning the speed of the motor relative to what the encoder can resolve).
There are two ways to look at this:

The motor is not spinning fast enough for the resolution of the encoder

The encoder needs to have more resolution if you wish to run it at low speeds.


Also slowing down the sampling of the encoder will actually increase velocity resolution. Another thing you could try is down-sample the position vector and then take the differential to get velocity.
If down sampling affects the system id then you may need a higher resolution encoder, or a different sensor that gives you velocity directly.
Another thing:
A ramp does not capture system dynamics across many frequencies, you'll want to do a sine sweep, or pulses.