本論文主要的是設計一個適當的演算法以估測在使用G-sensor來測量以馬達作圓周運動來模擬騎腳踏車踩踏板時所轉動之角度。本論文共提出兩種演算法,其一為使用數據之斜率來判斷相位角。而另外一種方法是比較數據的最大點及最小點發生的位置來估測數據的相位角。利用所推導出來之演算法應用於實際所量測之角度來比較這兩個演算法之優劣點及其準確度。 The main task of this thesis is to design a proper algorithm to calculate and estimate the angle a bicycle peddle has revolved in a circular motion when a motor is equipped with a G-sensor and is mounted on the bicycle peddle. Two algorithms have been designed, one of the algorithms calculates the slope of the measured data and form this slope to determine and estimate the angle while in the other algorithm it compares the location of the data with the locations of the maximum and minimum values of the measured data to estimate its possible revolving angle. These two algorithms are applied to many sets of measurement data to determine the angle associated with each measured data, the accuracy, advantages and performance of each algorithm are compared and it concludes that the second algorithm with data location comparison has better performance.