particle encoder