| As a result of pollution caused by automobile exhaust, the lack of oil resources, urban traffic jam problems, the demand for clean, convenient and environmentally friendly transport is growing.The development of electric bikes has become an effective solution to this problem. Based on the characteristics of China’s large population, per capita income is not high, the electric bicycle has a broad application prospects in China.The electric bicycle has a advantage of being easy to control, wide speed regulation and so on. Recently most motors for electric bicycle are brushless DC motors. The electric bicycle controller is the core of the electric bicycle, and it controls the motor coordination with other functional modules. In order to improve comfort for riders, the paper made a deep research on the electric bicycle controller, and describes the hardware and software design briefly.First, the paper expound the principle of the brushless DC motor, proposes the mathematical model, analyzes the reason for the torque pulsation of the brushless DC motor, proposes the measures for decreasing the torque pulsation caused by varying phase. Meanwhile the paper states the principle the regenerative braking, presents the control law of the regenerative braking; and proposes control strategy for the brushless DC motor, adopting PWM modulation for up tube and reach for down tube, making a study on the double loop for varying speed, and describes the functions of the controller.Secondly, the paper presents a system block diagram of the electric bicycle controller, and the hardware design around the block diagram. The microcontroller STM8S903K3is the core of the electric bicycle. Every functional module is based on the core, including inverter circuit, handlebars for varying speed circuit, current detection circuit and so on. And the paper presents the measures for improving the hardware reliability.Again, on the basis of the control theory and the hardware circuit, the paper presents the software design.Finally, the paper presents the electric debug, including the controller, the motor and other functional modules. And the waveform on the detecting points reflects the reliability of the electric bicycle system. |