1 of 26

Self Balancing Electric RC Bike

2 of 26

Bicycles are hard to control!

  • Bicycles, electric bikes and motorcycles are ideal city transportation.
  • Driving these vehicles comes with a learning curves and increased danger to the operator.

3 of 26

Autonomous Electric Bicycle

​

  • We will make autonomous, self-balancing bicycle to demonstrate control technology in a 2 wheeled vehicle.
  • The bike will be a riderless system that will be able to drive and steer itself.
  • A remote control will allow the user to give commands to the bicycle.
  • At speed (greater than 12 mph) the bike will rely on a control system operating the standard handle bar steering to keep the bicycle balanced.
  • Depending on the feasibility, at lower speeds (less than 12 mph) the bicycle will remain upright using a reaction wheel.
  • A drive system will control the forward motion of the bike.

4 of 26

System Diagram

Side View

Top View

5 of 26

Reaction Wheel

  • The bicycle is balanced using the inverted pendulum model. The reaction wheel is oriented on the same roll axis as the bicycle.
  • The inertia of the flywheel helps balance out tipping. Using Newton's 2nd law, the inertia created by the acceleration of the reaction wheel has a reaction on the inertia of the bicycle.
  • A feedback system will let the controller know where the roll of the bicycle is and the flywheel will help correct the position.
  • An accelerometer will provide the positional feedback to the control system.

Reaction wheel movement to stabilize a pendulum

Model of a Self-balancing bicycle using an inverted pendulum

6 of 26

Bike Characteristics

  • The mass of the bike was found to be 14.81kg
  • A Solidworks model was used to find the approximate mass properties of the bike.
  • The Solidworks model to found the inertia of the bicycle model around the bottom of the wheel. This was found to be 1.222kg*m^2
  • The height of the center of gravity of the model was found to be 0.34m from the bottom of the tires.
  • The added components will add additional mass and change the inertia and center of gravity. These need to be added to the model.

7 of 26

Control design with matlab

  • Transfer function is found with Matlab.
  • A control system will be designed to stabilize the system.
  • Feedback will be from an accelerometer. The control system will try to keep the angle off of vertical at zero.

Matlab Calculations

Transfer Function

Poles using the Eigenvalues from matrix A. The positive values mean the poles are unstable and the system is uncontrollable

8 of 26

Matlab and simulink models

Reaction wheel simulink design

9 of 26

Control code

Basic PID control loop

Output to the motor controller

10 of 26

Subsystem 1 reaction wheel demo

  • An inverted pendulum controlled by a reaction wheel was created to show proof of concept and to demo.
  • The reaction wheel was able to react to the accelerometer feedback and respond by turning in the appropriate direct to try to return the pendulum back to vertical.
  • Wind down needs to be added and better control gain constants need to be found.

11 of 26

Automated Steering System

  • For this system a control system has been developed for the steering stabilization.
  • This system will be able keep the bike from falling over while the bike in motion. This system is completely automated and will be using, Arduino uno, a high-speed linear actuator, and a accelerometer to execute this control system.
  • The linear actuator will be used for the rapid changes in the steering angle. The accelerometer is going to give the microcontroller the reference lean angle of the bike at any given moment.
  • The microcontroller is going to take this angle and input it into the control system, where the output of this system will be a PID signal to the linear actuator.

12 of 26

Steering Control System

  • The reference lean is the lean angle that we want to be achieving.
  • This angle along with the error is fed into the PID block.
  • The output of the PID block is where the math is being computed to give an output value which will translate to the PWM.
  • By using the arduino’s built in PWM this will control the direction and the speed of the linear actuators movements.

​

13 of 26

Matlab Bicycle Model

14 of 26

Subsystem 1 steering control demo

  • The Steering demo consisted of manually leaning the bike from side to side to show the reaction of the system.
  • The custom rear rack need to be fabricated to hold the battery’s, micro, motor driver, and accelerometer.
  • Custom mounting brackets were fabricated for the linear actuator as well

15 of 26

Steering Control System

Shown to the right is a snip of the serial monitor on Arduino IDE. Using this we are able to display and read some important data values used and calculated in the control system code.

16 of 26

Subsystem 2

  • By March 6th a decision on viability of the reaction wheel to control the bike will be made. If it is determined to be non-viable a polished inverted pendulum model will be built for demonstration purposes.
  • The remaining bike modifications need to be made. This includes installing the drive motor, upgrading the training wheels, and improving the mountings.
  • Basic wireless control will be implemented. This will be a simple remote command for the drive motor. It will include a forward drive command and a toggle between control and uncontrolled.
  • The control systems will be improved. The steering control will be able to keep the bike stable and upright while it is traveling in a straight line at >12 mph and the reaction wheel will be able to keep the bike or pendulum vertical within 1 degree off of vertical.

17 of 26

Gantt Chart 2nd Subsystem

18 of 26

Gantt Chart 2nd Subsystem to Final

19 of 26

Final

  • The final demonstration will have a steering system that is capable of cornering while keeping the bike upright while in motion.
  • A reaction wheel will be able to keep an inverted pendulum or the bike upright under low speeds vertical.
  • There will be a user interface that will provide wireless, real-time feedback on the bike’s speed and angle. It will have an option to toggle each control system into an on or off state to demonstrate the effectiveness of each control system.
  • The control systems will be be robust enough to stabilize even with disturbances such as a sideways 2 lb momentary force applied at the handlebars, and maintaining verticality while traveling sideways across a 2 degree pitch.

20 of 26

Questions?

21 of 26

Next Steps

  • Testing the NRF communication after break
  • Start with a simple test as shown below
  • Progress to test that involves motor, and joystick
  • Interface feedback to the Transmitter NRF
  • Building and testing reaction wheel

22 of 26

Electrical Block diagram

23 of 26

Dc Powered Rear Wheel

  • Having Powered rear wheel will give up the chance to demonstrate the self stabilization as the bike is in motion. We will do this by remote control to drive the bike.
  • For powering the rear wheel are using a chain drive motor.
  • Battery will be mounted on bike to power motor.

Mounted battery pack

24 of 26

Communication With NRF24

  • NRF24 is a transceiver module that can wirelessly communicate between itself and another NRF24 module.
  • These modules easily link up to arduino boards.
  • Communicate on the 2.4gHz band
  • Have a low end range of 100 meters
  • Can get modules with larger antennas for increased range
  • Cheap, low power consumption, widely used.

25 of 26

Division Of Responsibilities

Rigel → Self Balancing portion, Mechanical designs eg. mounting motors, reaction wheel system, frame adjustments, interfacing remote control.

​

Brett → Control system for steering, Rear powered wheel, interfacing remote control, wiring harness, battery implementation.

26 of 26

Key Components

  • Bike frame
  • Reaction wheel
  • DC motor for reaction wheel
  • Servo Motor for steering
  • DC motor kit for driving
  • Microcontroller
  • Accelerometer
  • NRF24

​

Reaction Wheel

NRF24 Single Microcontroller

Accelerometer

​

Bicycle

​