An automatic gear shifting system for bicycles with brain-controlled function comprises: a brain wave sensor being configured to sense a brain wave of an user who is riding a bicycle, so as to obtain and transmit brain wave information a processor being configured to receive the brain wave information, and the brain wave information being calculated by the processor using a Probabilistic Neural Network (PNN) Model, so that the most suitable gear position is obtained and an electrical gear shifting mechanism being disposed on the bicycle and being electrically connected to the processor, so as to shift the gear position from a current position to the most suitable position.本發明係揭露一種具腦波控制功能之自行車自動變速系統,其包含:腦波感測器,係感測使用者騎乘自行車時之腦波,以取得並發送腦波資訊;處理器,係接收腦波資訊,以透過機率式神經網路模型對腦波資訊進行運算動作,進而得到使用者騎乘自行車時之最適檔位;以及電子變速機構,係設置於自行車且電性連接處理器,以將自行車之現行檔位變更為最適檔位。10‧‧‧腦波感測器20‧‧‧處理器30‧‧‧電子變速機構31‧‧‧伺服馬達40‧‧‧手動換檔裝置50‧‧‧車輪轉速感測器60‧‧‧曲柄軸轉速感測器70‧‧‧扭力感測器80‧‧‧坡度感測器90‧‧‧傳輸裝置100‧‧‧可攜式顯示裝置