Can anyone tell me how pedelec sensor in PAS bicycles work?
From my experience working with electric bikes, most of what I saw were sensors that were mounted on the crank which measure your biking cadence. A sensor would be fixed around the bottom bracket, and then a ring of magnets would spin with the crank, 'tripping' the sensor every time a magnet passed.

They're called hall effect sensors and should be easy to integrate into your design as buying just the PAS sensor is relatively inexpensive.

You can find a Wikipedia page that covers Pedelec sensors here.