Student Projects

cancel
Showing results for 
Search instead for 
Did you mean: 

Self Balancing Motorcycle

Contact Information

Country: UK

Year Submitted: 2017

University: University of Southampton

List of Team Members (with year of graduation): Alex Gough (2017), Jaimin Shah (2017), Andrew Tsang (2017), Rob Taylor (2017), Ser Chin Beh (2017), Shoon Yik Lim (2017)

Faculty Advisers:  Prof Roberto Lot

Main Contact Email Address: acyt1g13@soton.ac.uk

 

Project Information

Title:  Self Balancing Motorcycle

Description: An urgent solution to the modern urban environment is required to aid in the reduction of congestion and pollution. A potential solution is powered two-wheeled vehicles. These types of vehicles offer improved space saving and energy efficiency. The problem arises however in that these vehicles are inherently unstable at low speeds and thus are subject to capsize. One method to solve this problem is the use of high velocity gyroscopes to use the torque generated to provide a stabilising moment. The project aimed to demonstrate this and to produce a self-balancing system using automated control. 

 

Products:

 

Software:

LabVIEW 2016, LabVIEW Real-Time Module, LabVIEW FPGA, NI Industrial Communications for EtherCAT, NI Industrial Communications for CANOpen, LabVIEW PID & Fuzzy Logic Toolkit.

Hardware:

NI IC-3120, NI PS-15

Other:

MPU-6050, HundTech Industrial Servo motor & controller, Brushless DC motor & Controller.

       

The Challenge:

 

Development of a self-balancing system for a bike faced many challenges. The mechanical design of the system was designed from the ground up. It was required to be compact and had to withstand the high forces generated from the large heavy flywheel at high spin velocities. In addition to this, a high powered actuator to change the orientation of the flywheel to produce the torque had to be specified and controlled was based on the current state of the system. The instrumentation of sensors to measure useful state information had to to be fast and reliable. The National Instruments hardware and software was used to control the system, providing the link between the actuator for the gyroscope and the system sensors.

A real time operating system was implemented to communicate with the sensor information, perform the necessary calculations and produce the control input.

 

 

The Solution:

 

Overview

Using National Instruments equipment, a system was designed to contain a gyroscope and control it via a high powered industrial servo-motor which was communicated with using LabVIEW via EtherCAT protocol. LabVIEW FPGA was implemented to gain sensor information from an inertial measurement unit and control a brushless DC motor to spin the flywheel.

 

The high torque and fast switching actuator requirements meant that an industrial servo-motor was the best solution. High speed control of the servo-motor led to the decision to use a National Instruments Industrial Controller as the main controller. The IC-3120  has a high speed processor that is extremely powerful and capable of producing the fast control desired. Additionally to this, the IC-3120 also has ethernet ports that can be enabled to communicate with EtherCAT. The standardised industrial servo-motors all used EtherCAT and thus an EtherCAT enabled controller was essential.

 

Measurement of the state of the system required an inertial measurement unit (IMU). The combined accelerometer and gyroscope measured the linear acceleration and angular velocity respectively which were combined via a complementary filter. A MPU-6050 MEMS sensor was used and programmed using LabVIEW FPGA to communicate via I2C. FPGA code was able to be implemented on the industrial controller as it contained a Spartan-6 LX25.

 

The IC-3120 was powered using a NI PS-15. This power supply is the recommended pairing for the IC-3120 and provided a reliable stable DC power for the controller.

 

Using the sensor information, a control input is calculated via a feedback control loop to control the servo-motor. This actuates the gyroscope producing balancing torque and therefore is able to provide stability of the system.

 

The ambitious project began in mid October and ran for the length of roughly 7 months until the end of April. The team produced a good mechanical design, promising simulation results and control of individual subsystems. However, we were unable to finish due to major hurdles in the operation of the system as a whole. The project resulted in successful simulation of the control but was unable to progress onto a completed ‘real-world’ proof of concept beyond hardware in the loop tests.

 

The team managed to successfully implement all aspects of the system individually and also was able to show a working simulation using a software simulation tool ADAMS.

 

The individual subsystems that were implemented successfully include:

  • FPGA brushless DC motor speed control
  • FPGA I2C IMU sensor readings as well as signal processing and state calculations
  • EtherCAT control of the servo-motor via LabVIEW
  • PID and state-space feedback control of the servo-motor via state sensors.

 

All these subsystems were unable to be implemented together in a complete system test. The elements that enabled the implementation of the system were present and demonstrable however fatal signal interference as well as some mechanical setbacks meant that a fully working proof of concept was not achieved.

 

The most significant setback inhibiting the success of the project was the interference experienced by the IMU when the servo-motor and brushless DC motor were operating at the same time in close proximity to each other. The electromagnetic interference generated by the motors caused havoc on the IMU and caused extremely distorted readings and also fatal cutout. This was in the end crippling to the project. Many steps to solve the problem were investigated including connection of a common ground, shortening of wires, alternative power sources and physically separating the sensor from the motors. These solutions all helped a small amount but did not solve the overall problem as the roll angle readings fluctuated too much to implement control. The team recommends investing in shielding of wires and sensors as a potential solution to solve the issue.

 

The team also faced mechanical difficulty with a bearing failure causing a delay in the project which had the knock on effect of not enabling the team to have insufficient time to investigate the electrical sensor issues faced with the IMU.   

 

 

LabVIEW and NI Tools

 

LabVIEW was used due to the rapid ability to implement FPGA, EtherCAT, I2C and real-time. As mentioned previously the system requirements were very high and demanded high quality equipment. FPGA was used due to the fast reliability of code implementation, EtherCAT was an essential communication for the Servo-motor and I2C was required for the IMU.
Signal processing, control algorithms and test scripts were implemented with LabVIEW. The state measurements required signal processing and calculation to provide information useful to generate a control algorithm. Control system design was implemented using PID control with the PID toolkit on LabVIEW.   

 

The LabVIEW implementation was solid and reliable and was not the cause of incompletion of the project. LabVIEW was used to great effect as it provided excellent programming and control implementation.

MODULE.png

 

VI code

 

Link to Video

Hardware in the loop test

Passive Balancing test

 

Poster

 

 

Video links

https://drive.google.com/open?id=0Bxw8Q5ZzplogS00wVXhhZkpIWE0

https://drive.google.com/open?id=0Bxw8Q5ZzplogWG5rNk1YZF9XWTQ

VI code link

https://drive.google.com/open?id=0Bxp4JL5rRw3Da0JDb0g4N3NFOVE

Poster Link

https://drive.google.com/open?id=0Bxp4JL5rRw3DdjhmWGVheFdIMjQ

Pictures:

https://drive.google.com/open?id=0Bxp4JL5rRw3DYXVwenFSRFVKaU0

https://drive.google.com/open?id=0Bxp4JL5rRw3DODZUZUJWbWhVQjA

Comments
RER
NI Employee (retired)
on

I am sorry to hear about the issues you had with EM interference. But, I commend you guys for getting this seriously ambitious project as far as you did. Well done guys.

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
Contributors