You are on page 1of 69

Rota Una A self-balancing, electric

unicycle
by

Max Simmonds

A report submitted to the University of Plymouth in partial fulfilment for the degree of
MEng (Hons) Electrical & Electronic Engineering

May 2016

1
Summary
Rota Una is a self-balancing electric unicycle made from a modified, normal unicycle. It
balances in the forwards and backwards direction using a 1000w three phase, brushless DC
hub motor. The concept is that a user will sit on the unicycle and provide the left/right
stabilisation (much like when a bicycle is ridden). By shifting their weight forwards and back,
the speed and direction of the unicycle can be controlled.

It is deemed that the most difficult part of riding a unicycle is the forwards and backwards
stabilisation, therefore this difficulty has been removed with the help of electronics. When the
system detects that the angle from the horizontal is no longer 0 (and therefore no longer
balanced) the hub motor provides a force to the system to return the centre of mass back
above the pivot point. It uses a three axis accelerometer and gyroscope from an inertial
measurement unit to calculate the angle from the horizontal plane 4000 times per second.
This angle is then put through a PID algorithm to determine the speed and direction of the
motor.

A three phase triple half bridge inverter is used to convert the DC input from a 48v, 10Ah,
lithium polymer battery into a three phase signal. Hall Effect sensors are used to determine
the position of the brushless DC motor before providing the electronic commutation needed
to spin. This is done using the National Instruments myRIO, which has both a Real Time
(RT) Linux operating system and on board Field Programmable Gate Array (FPGA). The
controller is programmed with LabVIEW Real Time and LabVIEW FPGA.

It is seen that conceptually this is a valid idea, but in theory it does not work as well as
expected and limiting factors such as the maximum torque from a gearless direct drive hub
motor result in a unicycle that balances for only a few seconds.

List of keywords: Self-balancing, unicycle, LabVIEW, National Instruments, FPGA, Real


Time, Linux, Triple half bridge, Inverter, IR2110, SI-8235, electric vehicle, hub motor,
BLDC

2
Acknowledgements
The author of this report would like to thank the following people for their contribution, and
making Rota Una a reality:

Vincent and Sharon Simmonds for their support during this project. And for Vinces
assistance during the mechanical build and design
Maija Zuzzalova, for her support and tolerance during the project
Dr Zaki Ahmed For his help with the design of the inverter and overall project
design
Stuart MacVeigh for general help in the laboratories
Plymouth University
National Instruments
Conhis Motor Technologies

3
Glossary
PID Proportional, Integral, Derivative
SSM State Space Modelling
IMU Inertial Measurement Unit
DC Direct Current
AC Alternating Current
FPGA Field Programmable Gate Array
BLDC Brushless Direct Current
ESC Electronic Speed Controller
PSW Pure Sine Wave
MSW Modified Sine Wave
PWM Pulse Width Modulation
IGBTs Insulated Gate Bipolar Junction Transistors
MOSFETs metaloxidesemiconductor field-effect transistor
IC Integrated Circuit
IO Input/output
TIG Tungsten Inert Gas

4
Table of Contents
Summary .................................................................................................................................... 2
Acknowledgements .................................................................................................................... 3
Glossary ..................................................................................................................................... 4
Introduction ................................................................................................................................ 7
Project Planning & Management ............................................................................................... 8
Theory ........................................................................................................................................ 9
Control Theory ....................................................................................................................... 9
PID Control ........................................................................................................................ 9
State Space Modelling (SSM) .......................................................................................... 11
Angular Measurements ........................................................................................................ 12
Deriving an angle from acceleration ................................................................................ 13
Deriving angle from rotation ........................................................................................... 14
Brushless DC (BLDC) Motors............................................................................................. 14
Three Phase Inverter (six phase, trapezoidal, controller) .................................................... 15
Speed control of a BLDC motor .......................................................................................... 18
Design ...................................................................................................................................... 20
BLDC motor considerations ................................................................................................ 20
Wheel Design ....................................................................................................................... 24
Inverter Design..................................................................................................................... 28
Battery Considerations ......................................................................................................... 35
IMU Considerations ............................................................................................................. 36
Buck converter considerations ............................................................................................. 36
Circuit Board Design ........................................................................................................... 37
Controller Considerations .................................................................................................... 42
Software ............................................................................................................................... 43
Reading IMU (Programmed on RT) ................................................................................ 45
Applying Digital Filter (Programmed on RT) ................................................................. 45
Compute the PID Output (Programmed on RT) .............................................................. 45
Communication between RT and FPGA (Programmed on RT) ...................................... 45
Speed control Via PWM Square Wave (Programmed on FPGA) ................................... 46
Electronic commutation of BLDC (Programmed on FPGA) .......................................... 46
Reading Of Deadman Switch (Programmed on FPGA) .................................................. 46
Mechanical Build ................................................................................................................. 46
Testing...................................................................................................................................... 51
Individual Phase Test ........................................................................................................... 51
Resistive load, 3 phase test .................................................................................................. 51

5
Gate Resistance .................................................................................................................... 52
The Effect of the gate diode to assist turning off ................................................................. 52
IR2110 Undershoot .............................................................................................................. 52
Phase deduction ................................................................................................................... 53
Si-8235 ................................................................................................................................. 53
PID control ........................................................................................................................... 53
Results & Discussion ............................................................................................................... 54
Conclusion ............................................................................................................................... 62
Limitations ........................................................................................................................... 62
Future Work ......................................................................................................................... 62
Detailed Cost Breakdown ........................................................................................................ 63
References ................................................................................................................................ 64
Bibliography ............................................................................................................................ 66
Appendix .................................................................................................................................. 67

6
Introduction
As far back as the 1890s there existed patents for electric bicycles. By 2001 the term e-bike
was commonly used to refer to electric bicycles. Now, with the recent rise in fuel prices, the
ever increasing congestion of roads, and a new craze for fitness, electric bicycles are
becoming more and more common. However, bicycles are large and cumbersome and so a
new form of electric vehicle has emerged.

Focus Designs, a company based in America, are the pioneers of self-balancing unicycles.
However, they are currently very costly this project was an investigation into self-balancing
unicycles in an attempt to see if they can be made cheaper.

The objectives of this project were to develop and test a triple half bridge, three phase
inverter to be used in the application of a self-balancing unicycle. As well as this, an Inertial
Measurement Unit will be used to measure the angular displacement and a PID control
system will be implemented. It will outline the design choices made regarding electronic
components, mechanical build, and circuit board design. A detailed review of how the
software works will be written.

Finally, it will outline any test performed and then discuss the result and implications of these
results.

The first section discuss all the relevant theory for the project. It then will go on to talk about
the relevant design considerations, and then concludes with a discussion of the overall project
and the limitations of said project.

7
Project Planning & Management

The Gannt chart for this project can be found in appendix A. Most of the initial soft deadlines
were not met. This was due to the added work load of exams and coursework which was not
considered when making the intial chart. However, the hard deadlines (such as project open
day, VIVAs etc) were met on time.
As mentioned, due to other works loads that were not accounted for, it was not possible to
start the project before Chrsitmas, which set back most deadlines by 2 months.

8
Theory
A self-balancing unicycle is, in essence, an inverted pendulum on a cart. An inverted
pendulum is a classical control problem where the centre of mass is to be held above its pivot
point via a pole. Control theory is then used to determine the force required to keep this mass
balanced. In order to do this, feedback is used to calculate the error in the system (the error is
the difference in the angle of the pole, to the normal of the ground plane).
Figure 1, below, shows how a unicycle can be thought of as an inverted pendulum on a cart.

Figure 1 - Comparing the classical inverted pendulum, left, (Inverted Pendulum Image, 2016) with a unicycle, right

The frame of the unicycle acts as the pole in the inverted pendulum, the mass is of course the
human riding said unicycle, and the cart is the wheel which allows movement in the x axis.
The motor provides the force required to bring the centre of mass back above the pivot point
(which in this case is the axial of the wheel) and hence balance it.
The idea is that when a user leans forward, the motor is used to correct the angle by
accelerating forwards. By continually leaning forwards, the motor will keep accelerating (to a
maximum speed) and this is the method of transportation. To slow down, the rider needs to
simply lean back and the motor will slow down. Control theory is used to determine the
speed at which the motor will spin to correct the angle.

Control Theory

There are many control algorithms that can be used in this situation, the two that will be
discussed here are: Proportional, Integral, and Derivative (PID) control, and State Space
Modelling.

PID Control

PID control is the most common control algorithm used in industry today (Ni.com, 2016).
This can be attributed to the range of applications that benefit from this control method. Since
this method of control does not rely on a mathematical model, it can be applied to many

9
applications. Its ease of use and implementation also allows engineers to incorporate them
into many of their designs.

There are 3 variables (often called gains or coefficients) that are used. As the name
suggests, these are proportional, integral, and finally derivative gains. Each one affects a
system in a particular and important way, together (with the PID algorithm) they create a
controlled system. Whether this system be an open loop or closed loop system comes down to
the engineer. An open loop system has an input but no method to measure the output to see if
the control implemented was successful. This has the disadvantage that there is no feedback
to ensure the system is in the desired state. The advantage of this approach is that there is no
possibility of the system becoming unstable, and open loop controls are often less expensive
than their closed loop counterpart.

A closed loop system does incorporate feedback, allowing the control system to ensure it has
reached its set point. The set point is the desired outcome of the system. For example, in the
application of Rota Una, the set point would be the angle of the unicycle. This angle is
desired to be 0 from the horizontal. A typical closed loop system is shown in Figure 2 below.

Figure 2- The block diagram of a typical closed loop control system (National Instruments, 2016)

To clarify, the compensator in this case is the PID algorithm, the actuator output is how a
change to the system (plant) is implemented, in the case of Rota Una this is the motor. In
actual fact, the output is the speed of the motor. Small deviants from the set point require a
slower speed to correct them, whereas larger errors require faster speeds in order to bring the
system back to stability quickly. Finally, the process variable is what is being measured in
order to ensure the set point is being successfully reached. Figure 3 shows a block diagram of
the compensator / PID algorithm.

10
Figure 3 - Block diagram of a PID control system

As aforementioned, each gain affects the system in a particular manner, these will be briefly
discussed below.

Proportional Gain, Kc

This affects the speed at which the system reacts. It depends only on the error associated in
the system. The error is given by the process variable subtracted by the set point or in
simpler terms, the difference in the desired output compared to the actual output. The
proportional term is the ratio of the output response to this error. For example, if the error in
the system is 5, and the proportional gain (Kc, in Figure 3) is 5, then this would produce a
response of 25.

Integral Gain, Ti

The integral sums the error over time, and hence attempts to reduce the steady-state error.
The stead-state error is the difference between the process variable and the set point after a
significant amount of time has passed. This looks at the past values to provide an input to the
system.

Derivative, Td

The derivative term accounts for possible future values, by looking at the current rate of
change. This can be thought of as smoothing the output, slowing the response down.

State Space Modelling (SSM)

SSM is a new branch of control theory that uses linear algebra and mathematical models of
systems in order to control them. This modern control theory has some benefits over classical
control (PID is one such classical control), the main being that it allows for optimum control.
A set point can be reached in the quickest way, with little overshoot. This is mainly due to the
fact that a mathematical model is used, which gives an approximate model of the physical
system.

In this application, the mathematical model was derived from the equations of motion for an
inverted pendulum on a cart, these are shown in equation 1 and equation 2 below.

( + ) + cos + 2 sin = () Equation 1

11
( + 2 ) sin cos = 0 Equation 2

The full derivation of this can be found on page 45 of the log book provided with this report.
Equation 3 shows this in state space form. Equation 4 shows the sensor equation, measuring
the angle and angular velocity.

1 0 0
0 2 2 2 2 0 1 1 2 2 cos2


[ ] = 0 [(+2 )2 2 ] 2 2 +(2 +)0 [2 ] +
Equation 3
0 0 0 1 3 0
0
(+2 )2 2
0 4 cos
[ (+2 )2 2 ] [ ]

= [0 0 1 1] + [0] () Equation 4

However, due to the unnecessary complexity of state space modelling, and time restraints of
the project, it was decided that the classical control method, PID, would be used.

Angular Measurements

The measurements used for calculating the angle are obtained from an Inertial Measurement
Unit (IMU). An IMU generally is any electronic device that has a 3-axis accelerometer, and a
3-axis gyroscope (Spark Fun, 2016). They also often contain a 3-axis magnetometer. Figure 4
(shown below) is a commonly used IMU, the MPU-6050.

Figure 4- A common IMU (MPU-6050) (robu, 2016)

As the name suggests, an accelerometer measures the acceleration in a given direction, this
can either be static (such as the pull of gravity), or dynamic, like a car accelerating forwards.
Gyroscopes measure the speed at which a body rotates. While it is possible to calculate the
angle from the horizontal with only one of these devices, each one has advantages and
disadvantages. When used together, the disadvantages are overcome and the result is a very
accurate angular measurement. The main disadvantage of the accelerometer is that in order to
calculate the angle from the horizontal, the Earths gravitational pull (which is constant) is
used (the mathematics for this are discussed later in this section). When the object is still, this
works. However, when the object is accelerating in another direction, there will be other
components of acceleration acting upon it causing the angular measurement to be inaccurate
(Tutorial.cytron.com, 2012). This can be solved with the use of a low pass filter, smoothing
the response, but this adds latency to the measurement. In a system that is very dynamic (such
as an inverted pendulum) this is not suitable. Gyroscopes, on the other hand, offer fast
response times. The disadvantage is that they drift over time. This means that an initial

12
measurement will not be equal to another measurement taken several hours (or minutes) later,
even if the original setup had not been modified.

One method that is commonly used to take both of these measurements to create a more
accurate output is called sensor fusion (Nxp.com, 2016). Sensor fusion, in this application, is
obtained by combining the values of each sensor through a complimentary filter. It can be
said that due to the drifting nature of gyroscopes, their output is only valid for a short period
of time, but they have a very fast response. Thus, by fusing, and using the accelerometer to
correct the drift of the angle over a long period of time, a very accurate measurement is made.
Figure 5 shows a block diagram of this complimentary filter.

Figure 5- A block diagram of a complimentary filter (Instructables.com, 2016)

It is noteworthy to mention that this is not the only method of sensor fusion. Kalman filtering
can also be used, but this method (however accurate) adds much more complexity to the
system. In contrast, the complimentary filter method is computaionaly efficent and easy to
impliment with sufficent results.
The mathematical representation, that is used to impliment this filter digitally on a
microcontroller, is given below in equation 5 (Gear, 2016).
= (() ( + ( )) + ((1 ) ())) Equation 5

Where:
= filter coefficent
dt = sampling frequency

The filter coefficient can be adjust to trust the integrated gyroscope signal for longer (by
having a smaller value). Or by having a larger value merges the accelerometer signal faster
(Gear, 2016). This value is best set through trial and error.

Deriving an angle from acceleration

An approximate angle can be calculated by first observing the free body diagram of the
unicycle, Figure 6 shows the forces exerted on a unicycle:

13
Figure 6 - forces exerted on unicycle (Kerrywong.com, 2016)

Using trigonometry, the angle , can be calculated as follows:



= tan1 ( ) Equation 6

This method of calculation though requires measuring the acceleration in the y-axis too,
hence Pythagoras theorem can be used to calculate the hypotenuse:

= 2 + 2 = = 9.81 Equation 7

Then, equations 6 and 7 can be combined to give equation 8. Since the hypotenuse is now
being used, the equation uses arcsine:


= sin1 ( ) = sin1 ( ) = sin1 ( ) = sin1 (9.81

) Equation 8
2 +2

Equation 8 is only an approximation, when the unicycle is no longer stationary and


accelerates forward, the acceleration in the x axis (Ax) will be slightly larger likewise the
acceleration reading for Ay will be slight smaller. Nonetheless, this is a good approximation
and is sufficient for the application.
Deriving angle from rotation

Calculating the angle from a gyroscope is much simpler than an accelerometer. A gyroscopes
output is linear to the rate of rotation (measured in degrees/second) (Hobbytronics.co.uk,
2016). Therefore, the only mathematical manipulation that needs to be done is simply
multiply the output by a scaling value (commonly called the gyroscopes sensitivity, the
value can be obtained from the datasheet of said device). By taking measurements at a set
frequency then calculating how many degrees have been turned in that period, and then
summing these, the angle can be assumed. The gyroscope can be initialised using the
accelerometer, then all other measurements are relative to each other.

Brushless DC (BLDC) Motors

14
A Brushless DC Motor (BLDC) was chosen for this project. The reasons why are discussed
in the design section of this report. This is strictly on the theory of operation. BLDC motors
are electronically commutated (IE, there are no brushes that dictate the energising of
particular coils) which can give them greater efficiency at the expense of a more complex and
costly controller. BLDC motors can come in either one, two, or three phase types; the latter
being the most common (Digikey.co.uk, 2016) and is what is used in this application.
A brushless motor uses magnets to push/pull the central rotor, which houses permanent
magnets. The outer case (also known as the stator) holds the electromagnets which repel or
attract the rotor. Figure 7 shows a simplified BLDC motor. In this case, Phase B would need
to be energised, creating a north pole at B, and a south pole at . This would attract the rotor
and produce a torque.

Figure 7 - A simplified BLDC motor showing the outer stator and inner rotor (Texas Instruments, 2016)

An electronic circuit controls which coils/electromagnets to energise (often called an


Electronic Speed Controller, ESC). When the correct sequence of coils are energised, the
motor will spin. Magnetometers are used to measure the magnetic field to deduce the position
of the rotor and hence which coils need to be energised to give a rotation. Commutation is
very important, for without an efficient method of reading the rotor position and switching
the correct phases of the motor, a poor (or even no) rotation will occur.

Three Phase Inverter (six phase, trapezoidal, controller)

As previously alluded to, BLDC motors are electronically commutated. In the application of
Rota Una, a DC battery is used for power. Therefore there arises a need to convert the single
phase DC to a three phase AC signal which can be used to control the motor. The electronic
device that does this conversion from DC to AC is known as an inverter.

The concept behind an inverter is a simple one. In essence, the only function they have is to
reverse the polarity of the DC input at a given frequency. This can be done in a variety of
ways; the output can either be a square wave, a sine wave, or somewhere in-between. Figure
8 shows the 3 possible outputs of an inverter.

15
Figure 8 - The output waveforms of different inverter technologies (nationalvetcontent, 2016)

This leads to two broad categories of inverters, namely pure sine wave inverters (PSW) and
modified sine wave inverters (MSW). In Figure 8, the square wave output and the modified
(or quasi) square wave, both come from the MSW inverter. These are generally cheaper, due
to their simplicity, and are more restricted with the devices they can work with. This is due to
the abrupt manner in which they switch; the sudden change in current can be damaging to
more sensitive electronics. Square waves have a high (48%) total harmonic distortion.
However, most household appliances such as heaters, driers, or refrigerators can accept this
input. The modified square wave is one such that it briefly stays at 0v, this becomes
representative of a rounded square wave. Due to this pause at 0v, it can be used with a wider
range of electronic devices than the square wave inverter since there is a less drastic change
in current. It is noteworthy to mention that, although most appliances work with the modified
sine wave, there can be a reduction in efficiency of up 20% (nationalvetcontent, 2016). The
most efficient by far is the PSW inverter, which will work with all AC appliances and is the
only inverter that can offer optimum output to motors, microwaves, etc.

The most common use for inverters is currently within the renewable energy sector. Since
most forms of renewable energy (such as solar cells) generate DC voltages, and the National
Grid uses AC (since AC can travel longer distances without much powerless) it needs to be
converted via an inverter before it is accepted by the grid.

Inverters use solid state switches to switch the DC input in such a manner to produce an AC
output. The simplest case, which was used in the application of Rota Una, is the six phase
(trapezoidal) inverter which uses 6 switches to produce 3 square wave outputs, 60 degrees out
of phase with respect to each other. Figure 9, below, shows the arrangement of these
switches.

16
Figure 9 - Basic layout of a 6 phase inverter (gozuk, 2016)

This type of inverter resides under the MSW category, since its output is a square wave.
There are 6 possible states and within each state, one switch is high from one phase, low in
another phase, and finally both off (floating) in the last phase. Figure 10 shows one possible
state. The red line indicates current flow, by closing the high side of phase A (S1), and the
low side of phase C (S2), the phases A and C can be energised.

Figure 10 - A six phase inverter energising two coils (gozuk, 2016)

It is paramount that no two switches of the same phase are both on; they must always
complement each other. This prevents shoot through, a condition where the input supply
would be short circuited causing irreversible damage to the electronic circuit or supply.

Table 1 shows the state of the switches with respect to the phase of the inverter. Note the
overlap, this is important when driving the BLDC motor since the permanent magnet rotor
needs to chase the induced magnetic field around in order to produce a rotation.

Table 1 - On/Off states of the inverter with respect to the phase

Phase S1 S2 S3 S4 S5 S6
1 ON OFF OFF OFF OFF ON
2 OFF OFF OFF OFF ON ON
3 OFF OFF OFF ON ON OFF
4 OFF OFF ON ON OFF OFF
5 OFF ON ON OFF OFF OFF
6 ON ON OFF OFF OFF OFF

17
If Table 1 is adhered to, then the output will be a 3 phase square wave, 60 degrees out of
phase from the previous phase. Below shows this.

Figure 11 - Output of a three phase inverter (Brown, 2002)

Speed control of a BLDC motor

Controlling the speed of the motor is an essential part of this application, to correct the angle
(returning the angle to 0 degrees) the motor is used to exert a net force of the system,
bringing the centre of mass back about its pivot point. As previously mentioned, small
deviations from 0 degrees do not require a fast movement from the motor as this is more than
likely going to produce an overshoot or give rise to an unstable system. Therefore, a means of
controlling the motor speed is necessary.

There are several methods of implementing speed control, and these will be discussed in the
design section. However, most designs use pulse width modulation (PWM) to reduce the
speed of the motor. If, for example, the output in Figure 11 was used directly with a motor, it
would rotate at its maximum revolutions per minute (RPM). Not only is this not suitable for
this application, but it also has negative implications on the motor controller. When a BLDC
motor (or any DC motor, for that matter) initially starts up, the resistance of the windings is
very low. This causes a huge current to be drawn, until such time the motor begins spinning
and a back electromotive force (BEMF) is generated. This then resists the flow of current and
brings this initial start-up current down. To solve this issue, PWM can be used to limit the
available voltage at start up, by applying a series of voltage pulse that average out to a value
lower than the DC supply.

Figure 12 below shows how the use of PWM reduces the overall (average) voltage.

18
Figure 12 - Various PWM outputs showing how an average voltage is given (Hirzel, 2016)

Since the voltage applied to a BLDC motor is directly proportional to the speed, the same
method can be used to control the speed. Varying the duty cycle of the phases between 0-100
percent will control the overall speed of the motor. This does have the added effect of altering
the maximum torque of the motor, however. Since the torque of a BLDC motor is
proportional to the current, by providing a PWM input you reduce the available
current/torque.

19
Design
Throughout this project many design decisions, and many revisions to these designs, have
been made. This section is intended to explain each decision with engineering reasons, and
cover any calculations that were needed to aid those decisions.

All of the components of Rota Una were designed with modulatory in mind. The wheel,
motor, foot pegs, saddle, and even the electronics, are capable of being separated into
individual parts making servicing or repairs easy.

BLDC motor considerations

Since the motor was at the heart of this application, it was chosen to be the first design
decision. Once the specifications for the motor, through calculation, had been decided, then
the requirements for the rest of the project could be drawn up. Requirements such as the
maximum power the inverter needed to output, maximum weight of the overall design, and
length and size of the spokes for the wheel, could only be considered once a motor had been
chosen.

The first consideration was the motor package. There are two main types of packages for a
DC motor; a hub motor and a non-hub (or direct drive) motor. Each type has its own
advantages, hub motor can be fitted centrally to the wheel, making a drive chain redundant.
But non-hub motors have the advantage that they can be geared for particular torques
necessary for an application. Figure 13 shows the two broad types of DC motors that were
considered for this project.

Figure 13 - Direct drive motor, left, (Monster Scooter Parts, 2016) and hub motor, right, (Leaf Motor, 2016)

Table 2 was made to compare the relative advantages and disadvantages of each motor
package, a decision was then made based on the outcome of the table.

20
Table 2 - Showing the relative advantages and disadvantages of the two motor packages

Non-Hub Motor Hub Motor


Advantage Disadvantage Advantage Disadvantage
Can provide more torque Needs some method of Symmetrical design, Lower torque at lower
due to available gearing drive chain, which adds which is good for a RPM due to not many
complexity machine that needs to hub motors being geared
balance

Since the availability is Becomes an Allows for greater Can be more expensive
high, the cost is quite unsymmetrical design degree of control
low due to one side having a
drive chain

The motor driver is a lot Greater risk of injury Lighter than the non-hub More complex motor
simpler with drive chain counterpart with the controller
same power output

Requires more routine Simple to fit, since it


maintenance (replacing goes directly in the
and checking drive centre of the wheel
chain)

The decision was made to use a hub motor design. The main reasons for this are due to its
lightweight and symmetrical design, and also its ease of fit. Most hub motors are BLDCs, so
although this was considered when choosing between a hub or non-hub design, it was more
of an indirect choice.
The next design decision to be made was what power motor was needed. It was decided that
the most power would be used during a hill climb, hence the power requirements were
calculated by using a hill as a reference. The hill was chosen to be North Hill in Plymouth.
Using google maps the elevation and distance were measured between the two points, Figure
14 shows this.

11m

169m
Figure 14 - Model of North Hill, Plymouth

could then be calculated using trigonometry, as outlined in equation 9.

21
11
= tan1 = 3.7241 = 6.4% Equation 9
169

Once the angle was known, the power required to climb this hill could be calculated, Figure
15 shows the free body diagram that was used to help with calculations.

Travelling at a constant
d velocity, v

mg
Figure 15 - Free body diagram used to help calculate required power

Power is equal to the change of energy over change in time, given in equation 10 below.
()
() = Equation 10
()

The energy needed to climb the hill is given in equation 11.


= Equation 11
The time taken to climb the hill is simply the distance over the velocity, shown in equation
12.

= = Equation 12

Since the angle is known, and the height is also known, then the distance d can be easily
calculated, through trigonometry, and substituted into equation 12. This is outlined in
equation 13 below.

( )
sin
sin = = = vsin Equation 13

Finally, Equation 11 and 13 can be substituted into equation 10 to give the formula for the
power needed to lift a mass up an incline, equation 14.

() = = = sin Equation 14

vsin

The mass of the unicycle was based off an already existing, commercial design (focus
designs, 2016) and the speed was assumed to be just over walking speed. in equation 14 is
the efficiency of the motor, since no motor produces 100% power this needs to be accounted
for. The values are given below.
Mass, m = 120kg (100kg for rider + 20kg for unicycle)
Velocity, v = 2.2352 ms-1
Angle, = 3.7241

22
Efficiency, = 70%
When these values are substituted into equation 14, the following result is obtained:
() = 120 9.81 sin 3.7241 2.2352 1.7 = 290 Equation 15
This then indicated that a minimum of a 290w motor was needed for this application. A
margin of error was allowed to protect the motor and switching circuitry, ensuring that they
are not running too close to the 290w limit, and so a 500w motor was initially chosen.
Whilst researching the motor, it became apparent that for an extra 20 a 1000w motor could
be bought, with no effect to the weight of the motor since most 500w motors weight the
same as 1000w motors. For these reasons, it was decided to purchase the motor with the
higher output rating. Many hub motors were considered and reviewed, however, most were
far too expensive and exceeded the allocated budget by two or three times. A company in
China was found who could supply a 1000w, 48v BLDC hub motor for a suitable price,
serval times lower than any others that could be found Figure 16 below shows the motor.

Figure 16 - The actual motor purchased from Conhis Motor technology (Conhismotor.com, 2016)

The last requirement was to check the amount of torque the motor could output. Calculating
this value was beyond the scope of this project, since it requires calculating the jacobian of
the system in order to calculate the torque required. Instead, research into other similar
projects was done to see practically how much torque was required. From research it seemed
that any value above 20NM was acceptable.
Figure 17 shows the motor working curve, allowing for the torque to be examined.

23
Figure 17 - 48v motor working curve(Conhismotor.com, 2016)

In order for the torque to be read off the graph, the RPM needs to be calculated. Using the
same velocity as in previous calculations, 2.24ms-1, and knowing that the hub motor will be
fitted into a 20inch diameter wheel, the RPM can be calculated as shown in equation 16
below:
60 602.24
= ( ) = ( ) 70 Equation 16
1.6

Since this value does not exist on the graph, it is to be assumed that it will still give a
minimum of 25NM, the maximum available torque of the motor. The justification is that
torque it inversely proportional to speed, therefore the slower the motor is spinning the more
torque there is available.
Finally, the motor comes with 1 plastic block connector for interfacing with the Hall Effect
sensors, and spare spade connectors and connection block to allow interface between the
inverter and the motor.

Wheel Design

Once the motor had been chosen, the wheel could be designed around it. Since it is a hub
motor, it will dictate the wheel design. Initially, a cast iron wheel was going to be used, as
this did not require calculating spoke lengths and seemed a more elegant design. Figure 18
shows the type of wheel design that was initially considered.

24
Figure 18 - A 16in cast iron wheel with BLDC hub motor

However, it was not possible to find a supplier to supply only the cast iron outer casing that
bolts onto the motor given in the previous section. So this design was no longer looked into.

The alternative was to use spokes to lace the existing unicycle rim to the hub motor. An
online spoke calculator (Ebikes.ca, 2016) was used and the dimensions given from the CAD
drawing (Figure 16) were inputted. Figure 19 shows the output of said calculator; spokes of
length approximately equal to 135mm were needed. The rim and hub accept single butted
spokes of 12gauge (2.8mm in width), with an angle of 90 at the head. Figure 20 shows the
measurements taken.

Figure 19 - After entering the data provided by the CAD drawing, the spoke length of 134mm was calculated

25
Figure 20 - Spoke measurements that were made (Central-wheel.co.uk, 2016)

A = 90
B = 5mm
G = 2.8mm
L3 = 135mm

Four options were considered regarding the sourcing of the spokes. They were as follows:

Option 1 - Purchasing the spokes from an online store


Option 2 Purchasing the tool required to roll a thread onto spokes in order to cut down
the old ones and reuse them
Option 3 Contact a motorcycle company to have them custom made
Option 4 Contact a company who own a rolling tool and outsource the job

The main consideration when choosing which option to take was price. Each option was
looked at to see what would be the cheapest one. Several companies were contacted to see if
they stocked the spokes required. However, the size of the spokes that was needed was not a
standard length, this meant that option 1 was not viable.

To purchase the tool required to roll a thread onto a spoke was also not viable, simply due to
cost and availability. Usually, threads are threaded on with the use of a die, however with
spokes they are rolled on using a thread roller. To purchase one of these tools (which are now
very rare) cost around 100 with delivery from Hong Kong. Due to the time to receive the
tool, and the uncertainty in manufacturing tolerance of the tool, this method was also deemed
unfit.

A motorcycle company (Central Wheels) was contact and they could offer 36 custom made
galvanised spokes, with nipples, for 48 + VAT + delivery. This seemed rather expensive,
and so option 4 was looked in to, to see if it would be cheaper.

One company (Evans Cycles) did have the ability to cut and rethread spokes and it was
arranged to have the previous 36 spokes reduced in length and threaded with them for the
price of 30. However, when they received the spokes they said it was not possible for them
to do it anymore but they had managed to find the spokes of the correct length for cheaper
than the price to cut and thread them. These were purchased, but it became apparent that there
was an issue in the initial spoke calculation, as they were bending far too much when the
wheel was being laced.

Since it was not possible to reliably use the online spoke calculator for spoke measurements,
a motorcycle mechanic (Jimmy Axeford, based in Steavington, Oxfordshire) with knowledge
of lacing wheels was contacted. An arrangement was made and a design meeting was held

26
and a new value for the spoke lengths was decided upon 105mm. Contact was made again
with bicycle companies however, the new size was still not a standard size spoke and so the
only option left was to have them custom made. New measurements were taken, and these
are tabulated below in Table 3 below.

Table 3 - New measurements for custom made spokes

L3 A B G
105mm 90 5mm 10 gauge (3.2mm)

The company offers several finishes to the spokes they make. These are: Galvanised,
Unpolished Stainless Steel, Polished Stainless Steel, Butted and double Butted Spokes, and
SM Pro Bull Dog Spokes. Of course, the more complex the finish, the more expensive the
spokes are. Since Rota Una is a prototyped design, it was chosen that the cheapest spokes
would be purchased the cheapest option was galvanised spokes with zinc-plated steel
nipples. An engineering decision for zinc-plated steel nipples was made due to the fact that
similar materials seize together over time. Spoke tightening is routine maintenance and so
every precaution must be taken to ensure that the spokes to not become seized inside the
nipples. Choosing galvanised spokes also have the added benefit of being more accurate than
there stainless counterparts during the bending process.

As these were made by a motorcycle company, there was a slight issue that the smallest
width spoke they would manufacture was 3.2mm, 4mm larger than the existing ones. This
meant that the rim and hub would have to be modified. After discussing with Central Wheels
ltd, it was accepted that a discount of 30% would be enforced, bringing the cost of the spokes
down from 56 to 40.

Once the spokes arrived, they were again too long (by around 7mm). Due to time constraints,
it was not viable to send back the spokes and re-order new ones. The solution to this was to
borrow a rolling tool from a motorcycle mechanic. The spokes were corrected, and laced into
the wheel with the hub motor. Figure 21 below shows the process of spoking the wheel.

Figure 21 - The process of lacing the hub motor into the unicycle rim

27
The final wheel design, with tyre, is shown in Figure 22.

Figure 22 - Final Wheel Design

Inverter Design

The inverters only function is to be able to switch the supply voltage in such a manner to
create a 3 phase, square wave output. There are several designs of inverters that can be used,
as already discussed in the Three Phase Inverter section of this report. The one chosen for
this application was the six phase inverter design, due to its simplicity (compared to other
inverter circuits) and the fact that the 3 phase BLDC motor does not require a PSW inverter;
it can handle the square wave input. The general design is 6 solid state switches, 2 in series
for every phase. Since there are 3 phases there will be 3 sets of 2 switches (see Figure 9 for
the basic circuit outline). A circuit that has two switches in series that switches a supply
voltage is known as a half bridge. Therefore, this design of inverter is also known as a triple
half bridge inverter.

The first design consideration was to establish how much current and voltage will need to be
switched. Once this is known, the solid state switches could be chosen. A simple I=P/V
calculation showed that the maximum constant draw of the motor was 21A however, large
peak currents could be expected. These peak currents are hard to calculate and are best done
through practical experimentation, but a ballpark figure was calculated by measuring the
phase resistances of the motor. This was done and a value of 0.6 was obtained. Again, a
quick calculation using Ohms law indicates peak current in the order of 80A. Since this is a
peak current spike, the continuous current rating of the solid state switches does not need to
match this, but it should be able to accept pulsed currents >80A.

Since the voltage requirements were already known (a maximum of 55v, full charge of a
battery) and the current requirements had been established, the next design decision to be
made was whether to use Insulated Gate Bipolar Junction Transistors (IGTBs) technology or
metaloxidesemiconductor field-effect transistor (MOSFETs) technology. Choosing
between these two technologies is very application-specific and cost, size, speed and thermal
requirements should all be considered (Blake and Bull, 2016). Figure 23 shows the preferred

28
technology when considering only switching frequency and voltage. For higher voltages or
lower frequencies, IGBTs are preferred. However, this graph does not take into account
output power.

Figure 23 - A graph showing which technologies are preferred when taking into consideration frequency and voltage
(Blake and Bull, 2016)

At first, it would seem MOSFETs would be the ideal technology to use for this inverter
however, when taking into consideration the output powers (>1000w) IGBTs become the
clear choice - IGBTs have been the preferred technologies under low frequency and high
output power conditions (Blake and Bull, 2016).

While many IGBTs were looked at and considered, there were two which looked acceptable
for this application. Below shows the two IGBTs that were considered above all else, and the
properties that were used to help aid a decision.

Table 4 - Table comparing two IGBTs

CIES ICM (A) Vces IC @ 25C VGE VCE(on) Price


IRG4PC50FDPbF 4100 pF 280 A 600 V 70 A 20 V 1.6 V 3.87
IRGP4640PbF 1490 pF 72 A 600 V 65 A 20 V 1.9 V 1.94

The main differences between the two IGBTs are firstly the price. The second was
considerably cheaper than the first since 6 need to be bought for the inverter, even a small
deviation of price significantly adds up. The next difference is the Collector-to-Emitter
Saturation Voltage, VCE(on). This is directly linked to the power loss through heat of the
IGBTs; It is ideal to have the lowest possible VCE(on).
The value of the input gate capacitance, CIES, affects what the requirements of the gate driver
will be. This will be discussed later. Finally, the pulsed collector current, (ICM), differs greatly
between the two IGBTs. Since high peak currents are likely this value needed careful
consideration and as previously calculated, it is likely these pulsed currents will be in the
order of 80A and higher this means that the second IGBT would not be suitable for this
application and therefore the first one (IRG4PC50FDPbF) was chosen.

Once the IGBT had been chosen, the driver needed to switch the IGBTs could be chosen.
Driver chips are needed in order to act as a current and voltage amplifier, since most IGBTs
are controlled via a microcontroller with very limited output current and voltage levels

29
between 3-5v. Figure 24 shows the need for a driver chip; stepping up the voltage needed to
control the IGBTs.

Figure 24 - Showing the reason for a driver chip

It should be noted that most driver chips phase lock the output signal with the input.

The gates of IGBTs needs to be a minimum of 12vdc higher than the drain-source voltage. In
the case of a triple half bridge inverter, there is both a low side switch and high side switch.
Since the drain of the high side switch is held at the supply voltage, the gate needs to be
driven 12v higher than this thus the need arises to incorporate a dedicated high/lowside
driver that has the capability of bootstrapping. Bootstrapping allows for a floating supply to
be used for the highside IGBT, ensuring the gate voltage is sufficient and the capacitors also
allow amble current during switching.
Due to the circuit having both a high and a low side switch, it was decided that a high/low
side driver would be needed. Again, two IGBT drivers were considered; IR2110 and the
IR2109. The two drivers are very similar but there were a few clear differences.

The first was the output high, short circuit pulsed current. The IR2110 output current was 8
times larger than the IR2109 (2A compared to 250mA) and since this is the current used to
charge the gate, it is also related to the time taken to switch the IGBTs. IGBTs only use
power during the switching stage, and this power is equal to the time taken to switch
multiplied by the conduction losses. Therefore, it is ideal to have the fastest switching
possible in order to increase efficiency and keep the components cooler - ensuring there is no
premature failures. The second difference was that the IR2109 has built in (and
programmable) dead time. Dead time is the term given to the time period when no part of the
H-bridge (or single phase of the inverter) is turned on. This is needed to ensure that there is
never a state where both switches are on in a single phase as this would case a condition
known as shoot-through, when the supply will be short-circuited through the two switches.
This would theoretically draw infinite current and is likely to do irreversible damage to the
driver chip or switches. Figure 25 shows what can occur during this condition. The yellow
and blue traces are gate voltages of two switches. Notice how they are overlapping, since
there is no dead time. The green trace shows the current draw from the system (1A/div).
During the shoot-through condition, 2.5A is drawn in 0.5s; this is an increase of 25 times
the quiescent current.

30
Figure 25 - Oscilloscope output of a shoot-through condition (Axotron.se, 2016)

However, while having inherent dead time within the integrated circuit (IC) is useful, it can
also be implemented in software. It should also be noted here that if the BLDC motor only
intended to go forwards, then dead time is inherent in the system due to each high/low state
of the phases being separated by a floating state. Since the motor in this application will go
both forwards and backwards, dead time is still needed.
The final difference, which is the most important, is the typical turn on and turn off times of
each driver. The IR2110 typically takes 120nS to turn on, and 94nS to turn off, whereas the
IR2109 is significantly longer taking 750nS to turn on and 200nS to turn off. While the
effect on the maximum switching frequency is negligible even with the IR2109 times
(theoretical maximum switching frequency is >1,000,000) it does reduce efficiency by a
factor of 6, since efficiency is directly related to the conduction times of the IGBTs.

For the reasons outlined about, it was chosen that the IR2110 will be used, due to its high
current outputs, high/low side driving ability, and fast turn on/off times. The typical
connection diagram given in the datasheet (Figure 26) was used as a reference for the driver
portion of the inverter,

31
Figure 26 - Typical connection from IR2110 datasheet

Figure 27 shows the proposed driving circuit. Note, to make it more readable, only one of the
3 driving sections is shown. (The full diagram is in appendix B)

Figure 27 - Actual circuit implemented

C1,C2 and C5 are the bootstrap capacitors. As previously mentioned they allow for a floating
supply to be made to ensure the voltage is sufficient at the gate of the highside driver. These
capacitors are charged when the lowside IGBT is turned on, grounding the capacitors
allowing them to be charged through the bootstrap diode, D5, connected to Vcc. The
capacitors are increasing in decades (1uF, 10uF to 100uF) due to the fact that over time they
provide a constant current source. The smallest value provides current initially, and can be
quickly recharged whereas the larger capacitors can provide current for longer. C3, C4, and
C6 are decoupling capacitors. However, C6 also is used to reduce the inductive effect of an
electrolytic capacitor that is periodically charged and discharged.

R1 and R2 are the gate capacitors that make up a resistor-capacitor (RC) circuit with the gate
capacitance of the IGBT. This not only limits the current draw from the IR2110, ensuring it
does not exceed the rated output high, short circuit pulsed current, but also reduces ringing
on the gate. Figure 28 shows this ringing effect if there is no gate resistor. This can cause
unwanted switching due to the voltage transients. The RC circuit smooths this out, but this is
at a trade off with efficiency, since it will take longer to switch.

32
Figure 28 - Figure showing ringing on the gate of an IGBT

The diodes D4 and D3 allow fast discharging when the input to the gate is low. Together,
these resistors and diodes are known as a slow turn on/fast turn off circuit. UF4007 diodes
where chosen due to the fast turn recover times (75nS) and high current (30A pulsed) and
voltage (1000v) ratings. Resistors R3 and R4 are a precautionary method to ensure that the
gates of the IGBTs are discharged even if the circuit fails between the gate driver and the
gate. The values are chosen using the input gate capacitance and the following equation:

= 5 Equation 17

is the period at which the gate is high, solving for R and inputting the gate capacitance
gives a value of approximately 10k.

The last design choice for the inverter was the protection diodes, D10, D2, D6 and D7. These
diodes are needed since the load to be driven will be inductive, therefore during the dead-time
stages, this inductive load will generate a large voltage/current spike in the opposite direction,
and this will need a path to ground. If a path to ground is not provided (via the diodes) then it
is possible for the voltage to become high enough to break down the air gap between the
driver circuit and a ground causing a spark. Not only will this damage components, but it is
also a health and safety risk. Figure 29 shows the conduction through the diodes in a full
bridge inverter. The conduction seen in Figure 29 is identical to this inverter.

33
Figure 29 - Diagram showing conduction through protection diodes in a full bridge rectifier (Al-Omari, 2016)

MUR820 diodes were chosen, again due to the ultra-fast recovery times (25nS), the 8A
forward current rating, and 600v reverse voltage. MUR820s had been used before in similar
applications and exceeded expectations.

The penultimate design consideration was regarding the design requirements to control the
speed of the motor. There are two main circuit designs to control the speed. These are shown
in Figure 30 below.

Figure 30 - Two circuit designs for speed control, multiple PWM, left, (gozuk, 2016) and a bus controlled circuit, right,
(B, 2008)

The two designs are very similar, the only difference is that the one on the right of Figure 30
has an extra switch to control the bus line voltage. In this method, only PWM is applied to the
gate of the bus switch, controlling the average voltage. Whereas the design on the left applies
PWM to all the gates of the switches.

The relative advantages and disadvantages were considered to ensure the best design for this
application was chosen. The bus controlled method simplifies the software since only one
PWM signal needs to be generated, instead of 6. However, it complicates the overall design
since another driver circuited it needed. It also increases the price of the inverter, since more
capacitors, IGBTs, resistors, diodes and drivers and needed. The other design has slightly

34
more complicated software needs, but is less expensive. Therefore, the 6 switch design was
chosen compromising software complexity, for hardware complexity and reduction in
costs.

Finally, the last design consideration regarding the inverter was the frequency for the PWM
signal used to control the speed. The factors that needed to be taken into account when
choosing this were: the correct switching frequency for a motor, whether it should be audible,
and the current switching specifications of the IGBTs. The switching frequency of the motor
could be anywhere between 2 KHz-40 KHz, giving a wide range of possibilities and so this
was not focused on too much. However, the IGBTs can only switch certain currents at
particular frequencies, from the datasheet a graph was used to help deduce the possible
switching frequencies. Figure 31 shows the graphs used.

Figure 31 - Graph of load current vs switching frequency

To be out of the audible range, the switching frequency must be higher than 22KHz, however
it can be seen from the graph that this would only allow approximately 13A to be switched.
As this is almost half of the maximum current draw of the motor, this was not an option. 5
KHz was chosen, as this allows ~27A to be switched. These particular IGBTs are also
optimised for frequencies between 1 5 KHz. Although this was within the audible range, it
is used as a safety feature to ensure that others are aware of the unicycles presence due to
the distinct 5 KHz tone it generates.

The full schematic for the inverter design can be found in appendix A.

Battery Considerations

For this application, the battery must be very light (to keep the net weight of the machine
down), small (since it has to fit on the unicycle), but also provide the correct voltage and
current. The voltage needed is 48v, and the maximum the motor can draw is 21A. The battery
also needs to have a high C rating meaning that it can supply current incredibly quickly.
Since the motor that was chosen is also used for electric bikes, it made sense to also purchase
a battery designed for ebikes. For this reason, a 48v 20A, 10ah lithium polymer battery was
chosen. See Figure 32 below.

35
Figure 32 - The battery chosen for this project

A voltmeter was also decided to be purchased that would display battery percentage and
volts. This is to ensure that the level of the battery did not drop below 41.6v, if it did then the
battery would fail and no longer charge. The battery meter simply had two wires that connect
to the output of the battery.

IMU Considerations

The main considerations of the IMU were primarily that it would be easy to communicate
with via a microcontroller, synchronise accelerometer and gyroscope readings, and be low
cost, easily sourced, and accurate enough to detect changes of angles with a tolerance of 3
degrees (as this was the minimum amount the BLDC motor could be turned).

The MPU-6050, Figure 33, is a commonly used 9 axis (3 axis accelerometer, gyroscope, and
magnetometer) IMU that fits all the required specifications.

Figure 33 - The MPU-60 used in the application of Rota Una (robu, 2016)

It is cost effective and widely available from a number of sources. The I2C or SPI protocol
can be used to communicate with the device to take measurements. Since all the sensors are
on the same die, they are all synchronised, and the on-board interrupt line is pulled high when
data is available; this makes reading the data very easy.

Buck converter considerations

Since the supply of Rota Una would be a 48v battery, a method of obtain 12Vdc and 5Vdc
was needed. 12V would power the controller and provide the gate voltage for the driver IC.
5v was needed for the logic supply of the driver chip, Figure 34 shows a high level abstract of
the relevant voltages for this application.

36
Figure 34 - High level abstract of relevant voltages

It was decided that a 48v to 12v DC-DC convert was needed, capable of providing a
minimum of 6A (3x2A) for the driver chips and enough for the controller (<1A). Therefore, a
buck converter was chosen, due to its high efficiency. The buck converter chosen was 93%
efficient and dropped voltages from 30-60v down to 12v, working most efficiently at 48v.
Figure 35 below shows the buck converter used, which is rated to 15A continuous current
draw.

Figure 35 - Buck converter used in Rota Una (Amazon.co.uk, 2016)

Circuit Board Design

All of the circuit board designs were done using the National Instruments Circuit Design
Suite which consists of National Instruments Ultiboard, which allows for PCB design, and
National Instruments Multisim, which allows for schematic design and simulation.

Inverter boards
The inverter design was initially very long. As the requirement was that all the electronics
must be mounted to the unicycle and that it must be modular, size and modularity were a big
consideration in the design of the circuit board. As well as this, the company that was chosen
to have the circuit boards manufactured had a minimum size of 10cm x 10cm, the next size
up was too expensive, and the minimum order was 10 circuit boards. Due to the size

37
restrictions, and the fact that 10 boards would be sent, a stackable design was decided upon.
This would allow 3 inverters to be made (2 spare inverters) plus 1 space circuit board.

While looking at the overall circuit, as seen in appendix B, it became apparent that it is the
same circuit repeated 3 times. A list (see Table 5) was made to outline what signals needed to
be passed between boards so that the best method of doing so could be designed.

Table 5 - list of IO (inputs/Outputs) and proposed method of transferring

Input/output Transfer Method


48v from battery Screw terminals with wire jumpers
12v from buck Screw terminals with wire jumpers
Battery ground Screw terminals with wire jumpers
Buck ground Screw terminals with wire jumpers
Phase output Screw terminals with wire jumpers
5v from controller Stackable header pins
Controller ground Stackable header pins
7 DIO lines Stackable header pins

The only difference between each section of the controller was the input of the highside and
lowside signal to the IR2110; this was unique to each IGBT. The solution for this was to send
all the DIO lines up through the boards, via stackable headers, and select which ones to use
with a 0 resistor. All the high side lines would be connected together with the possibility to
insert a resistor. If the resistor was absent, the line would be disconnected; if the resistor was
present that DIO line would be connected to the IR2110. The same process was done for the
lowside. Figure 36 shows the circuit board design that was used.

Figure 36 - PCB design with selectable DIO lines

Since the circuit boards would be stacked, the height of all the components has to be assessed
to ensure that the PCB standoffs would hold the boards at the correct height, and the
stackable header pins would be the correct height to pass the signals through the boards. The
tallest component of the circuit board would be the IGBTs. The datasheet CAD drawing
shows that they stand no taller than 22mm. Therefore, a distance of 25 mm was chosen to be
between the boards. Figure 37 shows the design.

38
Figure 37 - Design of stackable inverter

3 stackable headers (of height 8.3mm) are used to pass the signals and power up through the
boards. The IGBTs are placed on the edge of the board so that a single heat sink can be used,
this was chosen to be handmade from a 10mm wide block of aluminium. The reason for this
was it was significantly cheaper (10 times less than a commercial heat sink of the same
length) and it could be custom designed to fit the stackable inverter. Thermal insulating pads
were used to ensure the drains of the IGBTs (which are connected to the backs of the
switches) were not shorted together. M3, 25mm standoffs were used to hold the boards
together.
The screw terminals which were used to pass the higher voltage and current lines are not
shown in the above diagram. Figure 38 shows the final design.

Figure 38 - Final design of the stackable inverter. 3 of these boards are needed to make the inverter

39
The top layer of this PCB was designed to have a 12v power plane, and the bottom layer was
a ground plane. This made the entire PCB act as a decoupling capacitor, stopping the
switching frequency from the surrounding boards causing any problems. Rubber o rings
were used to insulate the metal PCB standoffs from the top power plane to ensure no short
circuits occurred.

One important feature to note on this circuit board was that a DIL 8 pin socket was used to
house the IR2110. This was a design consideration based on the fact that these chips are
likely to fail during the testing stages and replacing them needed to be as easy as possible.

Si-8235 to IR2110 interface board

Due to some issues relating to bugs in code, which is covered in more detail in the results
section of this report, it became necessary to design a circuit board that would slot into the
existing 8 pin DIL socket on the inverter boards. Figure 39 below shows the circuit schematic
that remaps the pins of the IR2110 and adds in a DC-DC isolator, and more bootstrap
circuity.

Figure 39 - IR2110 to SI8235 interface board

For testing purposes, this circuit was made initially on a breadboard, then moved on to
veriboard to ensure the design was correct and functioning. However, due to faults in the
PCBs during the manufacturing stage, the designs did not progress to printed circuit boards.
For this reason, the IR2110s were used in the final design despite the clear advantages and
benefits of the SI8235. For more information, see the results/discussion section of this
report. Figure 40 below shows the 3 daughter boards installed into the inverter.

40
Figure 40 - Prototype design of the interface board, installed into the inverter board

Hall Effect Sensors and IMU boards

Two separate interface boards were developed in order to connect the BLDC motors Hall
Effect sensors to the controller, and also connect the MPU-6050 to the controller. The MPU-
6050 was a basic interface board, connecting the IMU to 1 port of the controller. 2 power
lines and 3 control lines where needed to interface with the IMU the I2C communication
was chosen due to its speed (100kbps) and the fact it needs only 2 wires to communicate. The
general connection is shown below in Figure 41.

Figure 41 - connection diagram of IMU interface board

To interface with the Hall Effect sensors, a slightly more complicated board was made. Pull-
up resistors are needed on each Hall Effect line because the sensor is in an open-collector
design. The pull-up resistor value is determined by the amount of current drawn by the
sensor. Since the sensor was unknown, a typical value for a unipolar Hall Effect sensor was

41
used, 20mA. Therefore any value of resistor over Vcc/0.02 would be suitable (>250).
22K was used as this was above the specification and easily available. The circuit design is
shown below.

Figure 42 - Circuit diagram of the Hall Effect sensor interface board

The controller board can source 3mA in total from one of its ports. The total current draw of
the Hall Effect interface board is 227uA per sensor, a total of 681uA which is within
specification of the controller.

The two circuits were made of a proto board that was specific to the controller, allowing easy
integration between the sensors and the controller. It also allows for the design to be modular
everything in Rota Una was designed to be modular to make servicing and repairing easy.

Figure 43 below shows the two interface boards.

Figure 43 - The two interface boards

Controller Considerations

The National Instruments myRIO was chosen as the controller for this project. It has several
features that make it the ideal controller. It has 40 DIO lines, an on-board processor running a
real-time (RT) Linux operating system, Wi-Fi capabilities, dedicated I2C lines, and a 5v
output. As well as all this, it also has an on-board Field Programmable Gate Array (FPGA)
chip, which allows for fast and deterministic switching. The intention was to run all of the
three phase switching code and Hall Effect readings on the FPGA, since this could be done at
a theoretical maximum of 40,000,000 times per second. It also allows for exact dead time to
be inserted between switching, since it is physical hardware doing the switching, if a 625nS
delay is programmed you will receive a 650nS delay. It also has a built in power regulator,
meaning any input from

42
Due to a very large section of this project being the mechanical build, the development time
of the code wanted to be kept to a minimum. The myRIO is programmed in LabVIEW, a
language designed to speed up time to market of products by allowing quick and easy
programming. Of course, the myRIO could be deemed slightly overkill for this project a
simple Pic chip or the STM32f4 Discovery board could replace the function of the myRIO
and for the most part it would work identically. However, it would not allow for a scalable,
future proof design, and they are is better suited to final products as appose to prototype
designs. They also do not offer the same level of determinism that the myRIOs RT operating
system and FPGA allow. In a system that balances, millisecond determinism is needed so that
the angle, PID output, and inverter are all read or written to with sub millisecond delays.
Another benefit of the FPGA is that any parallel while loops written in code will run in true
parallelism. This is ideal because there are many separate processes running (such as reading
from DIO lines, communicating over I2C, and writing to DIO lines, and checking the state of
the safety Deadman switch). Each process is important as the other and so careful
consideration would have to of been taken if this was implemented in C on another
microcontroller, taking up time.

Software

National Instruments LabVIEW was chosen as the programming language due to its rapid
development times and exceptional integration with the myRIO. Since the project in question
is very large, and the time scale is reasonably short, a programming language that aims to
speed up development times was deemed appropriate.

The software was designed to be able to do the following:

Control the speed of the motor


Read the state of the Hall Effect sensors
Switch the 6 IGBTs with respect the Hall Effect sensors
Provide a wireless link back to a computer to display results
Compute and apply the PID algorithm.
Read the state of the Deadman switch and instantly stop the power to the motor if it
goes high
Insert dead time between switching to ensure no shoot through

Since the myRIO has both an RT operating system running on the controller, and an FPGA
chip, the first design decision was to decide what parts of the code should go on the FPGA
and what should run on the RT operating system. The following flow chart (Figure 44) shows
the overall structure of the program, and which parts are run on the FPGA or RT.

43
Figure 44 - Flow chart showing the overall structure of the code

44
The white boxes indicate separate loops in the program. Each loop will run in parallel with
the other loops due to the inherent parallelism of FPGAs, and LabVIEWs memory
management unit that runs each loop on a separate core of the processor. Now the program
has been broken down into steps, it can be discussed separately and in more detail.

Reading IMU (Programmed on RT)


As previously mentioned, the protocol used to communicate with the IMU is I2C. LabVIEW
has drivers available for I2C, but no such drivers exist for the MPU-6050 in LabVIEW.
Therefore, drivers were written using the datasheet provided. Initially, several registers are
set to configure the IMU. The PWR_MGMT register was written to in order to reset the sleep
register and set the data clock to be the gyroscope, as advised in the datasheet. The data ready
interrupt was enabled so that the INT line on the IMU could be polled when the line goes
high the accelerometer and gyroscope data is ready. Finally, two registers were set to set the
sample rate of the IMU and configure the on board digital filter.
Once the configuration data had been sent, the IMU Read Loop starts, and only stops when
the program is stopped. Within this loop, the INT line is polled at 4 KHz, and when true, the
data is read from the relevant x axis accelerometer and gyroscope registers. There are two
registers per axis per sensor. So, for the acceleration measurement to be taken, two 8 bit
registers are read and then combined to give a 16bit value for either acceleration or
gyroscopic rotation. It is then divided by the relevant sensitivity value (given in the datasheet)
and then finally the maths is applied that was outlined in the angular measurement section
of this report and outputted.

Applying Digital Filter (Programmed on RT)


Once the values of angles and rate of rotation have been outputted from the previous section
of code, the digital filter (complimentary filter) is applied. This complimentary filter is
implemented in .m script and is code modified from a community example found online
(Gear, L., 2016). The .m script implements the mathematical representation of the
complimentary filter outlined in the theory section of this report. There is also an added
Angle Offset which is used to adjust the angle by a certain amount. This is used when the
IMU is not entirely perpendicular to gravity, or if the balance point of the unicycle is a few
degrees in the other direction due to unbalanced weights.

Compute the PID Output (Programmed on RT)


The filter angle is then sent to the PID Control Loop via a local variable. It is then checked
to see if it is within a particular range (2 degrees) and if it is not, the PID output is
calculated using the PID advance.vi. The set point and PID gains are inputted into this
subvi, along with PID loop rate (4 KHz), the maximum and minimum values, and the filtered
angle. The output of this subvi is the duty cycle in terms of a percentage (100%). A negative
duty cycle tells the programme to run the motor in reverse.

Communication between RT and FPGA (Programmed on RT)


Again, the output of the PID algorithm is sent to the FPGA Comms Loop via a local
variable. This loop also runs at 4 KHz. The duty cycle is accessed to see if it is negative, if so,
a value is sent down to the FPGA to tell it to reverse the motor. The value is also coerced
between 4 and 20% duty cycle. This is because the motor has no torque and cannot rotate at
any values of duty cycle below 4%. To limit the maximum speed of the unicycle, 20% is used
as the maximum duty cycle.

45
The method used to communicate between the Real Time operating system and the FPGA is
the Read/Write Control Functions. During the execution of this timed loop, data is written
but also read from the FPGA. The data read is the Hall Effect sensors, which IGBTs are
being switched, and the state of the Deadman switch.

Speed control Via PWM Square Wave (Programmed on FPGA)


The speed control, as already mentioned, is done via ORing the high side output waves with a
square wave that is physically written to a DIO line. It was decided that instead of having a
square wave in software, which would require a complex method of sending between parallel
while loops, it would be easier to write it to DIO line and then simply read the DIO line when
needed. The square wave is generated on the PWM Loop and is done by reading the duty
cycle sent from the RT. Two delays are then calculated (one delay for the high time, another
for the low time) and then the DIO line is switched for these given periods.

Electronic commutation of BLDC (Programmed on FPGA)


This section of code is done in the Phase Switching Loop which runs at almost 40,000,000
per second. Within this loop, the Hall Effect sensors are read, then converted into a binary
representation which allows a look up table to be used to find the sequence of IGBTs to be
switched. The lowside IGBTs are switched first, to ensure there is a path to ground, then a
delay of 25 ticks (650nS), then the highside IGBTs are ORd with the PWM square wave and
switched. The values of the IGBTs and Hall Effect Sensors are also written to the RT for
debugging purposes.

Reading Of Deadman Switch (Programmed on FPGA)


The Deadman switch is a safety feature. It was designed so that if the user falls off the
unicycle during operation, then the power to the motor would need to be instantly stopped to
the motor. This prevents any further injuries via a spinning motor out of control. The switch
is connected to a DIO line via a 40K internal pull up resistor. If the switch is not pressed,
the shutdown pins of all the IR2110s is pulled high and the motor stops spinning.

Mechanical Build

A large part of this project was the design and manufacture of the unicycle itself. A unicycle
was purchased to be modified and adapted to house the electronics and hub motor. To being
with, templates of the electronics were made from cardboard so that there was no risk of
damaging them, see Figure 45 below.

46
Figure 45 - Cardboard template of the electronics

An aluminium mounting bracket was made so that the electronics could be mounted to a
central pole. Figure 46 shows the mounted electronics.

Figure 46 - Electronics mounted to aluminium plate and steel central pole

A case was made from sheet steel, and welded together using a TIG (tungsten inert gas)
welder. The metal case is shown in Figure 47 below.

47
Figure 47 - Metal case used to enclose the electronics

The old unicycle was then modified, and the central bar welded in place. This is shown in
Figure 48. The motor was then used so that bracket could be measured and made to hold the
wheel in place (Figure 49). The old unicycle saddle was also welded to a cylindrical bar and
fitted via a removable bolt. This allows the saddle to be removed.

Figure 48 - Modification of the unicycle

48
Figure 49 - Unicycle with saddle and motor fitted

Foot pegs were then made and welded to the motor retaining brackets. Figure 50 shows all
the separate parts of Rota Una, highlighting its modularity.

49
Figure 50 - All the parts of Rota Una

Finally, it was painted and assembled. Decals were cut out on a plotter a 2 dimensional
CNC machine with a blade that cuts vinyl to make stickers/decals. Design were done on a
computer and sent to the machine. These were then stuck on to the case and the final product
is shown in Figure 51.

Figure 51 - The final product

50
Testing

Individual Phase Test


The first test that was done was to ensure the switching circuitry was working correctly, and
that a square wave input into Phase A, B, and C circuit boards resulted in a 12v peak-peak
square wave. A quick LabVIEW programme (see Figure 52) was written, allowing each
phase to be individually turned on and the frequency of the square wave to be set. The
shutdown pins were also tested, to ensure it was working correctly.

Figure 52 - The front panel of the LabVIEW programme

An oscilloscope was used to confirm the output was in phase with the input, was 12v peak-
peak, and that both the highside and lowside switches of the phase were indeed being
switched, with adequate dead time. The rise and fall times of the IGBTs was tested and the
dead time adjusted to ensure it was appropriately protected.

Resistive load, 3 phase test

The output of the 3 phase inverter was tested with a resistive load. Three 10K resistors were
soldered together in a star formation, to imitate the motor. Since the resistance was so high,
this test was only to check the output waveform and not whether the circuit could handle high
currents. Another LabVIEW programme was written, this time simulating the position of the
Hall Effect sensors, to produce the 6 phase (trapezoidal) output of the inverter and ensure that
the code and circuit design was correct.

Three probes from a 4-channel oscilloscope were connected to the resistive load. The grounds
of the probes were connected together in the centre of the star of resistors. Then the
measurements was taken across the resistors, as shown in Figure 53 below.

51
Ground all Measure across all
probes here resistors

Figure 53 - Resistive load test on inverter

The output should be 3 modified square waves, 60 degrees out of phase with respect to the
previous waveform.

Once this test had been done, another was performed with smaller resistor values (47) using
high power resistors. This was to ensure that the circuit could handle high current switching.
At low voltage (12v) this setup drew just over 1A.

Gate Resistance

This test was to ensure that there was no ringing on the gates of the IGBTs, and to make sure
that the value of 10 was optimum; little or no ringing, without slowing down the turn on
times too much.
To test, an oscilloscope probe was used to check the waveform of the gates of all the IGBTs.
The probe ground was connected to ground and the gates were probed.

The Effect of the gate diode to assist turning off

This test was to see the effects of having a diode in series with the gate of the IGBT and the
driver. As mentioned, the reason is to turn off the gates as quickly as possible, to reduce the
likelihood of shoot through conditions. An oscilloscope was used to probe the gate voltages
with and without diodes to see the effects.

IR2110 Undershoot

With inductive loads and parasitic capacitances inherent in the circuit board design, a
condition called Vs undershoot can occur. This is where negative transients can cause the
Vs pin on the IR2110 to undershoot. A negative transient greater than 5V with respect to the
COM line will cause irreversible damage to the IC. These effects can be minimised by
reducing trace lengths from the IC to the IGBT, reducing lead inductance by keeping the
IGBTs close to the PCB, and by mounting the source or emitter of the high-side device very
close to the drain or collector of the low side device (HV Floating MOS-Gate Driver ICs,
2007). All of these steps had been taken, but the test was done nonetheless.

52
Figure 54 - Test procedure for Vs undershoot

As outlined in Figure 54, an oscilloscope probe ground should be connected to COM, and the
other end to Vs. The resulting waveform, when the device is switching an inductive load,
should not be more less than -5vdc.

Phase deduction

Since no documentation was received with the motor regarding which coloured wires were
which phase, tests had to be performed by comparing the output waveform with each Hall
Effect sensor. This then allowed the phase wires and hall affect sensors to be paired.

Si-8235
Due to issues regarding the IR2110, a new driver IC was tested to see if it would be better
suited for this application. The reasons for this are outlined in the results/discussion section of
this report.
The tests that were carried out are identical to those outlined in the Individual Phase Test,
Resistive load, 3 phase test, and inductive (BLDC) Test of this section.

PID control
Testing the PID control required the project to be finished, so this was a test done at the very
end. Stabilisers were added to the unicycle to replicate a human rider balancing in the left and
right direction. The PID control was then tested by letting go of the unicycle and ensuring it
self balanced. The output of the PID was displayed on a PC and so could be analysed to
ensure it was not oscillating out of control indicating the PID gains chosen produced an
unstable system.

53
Results & Discussion
The results of most of the tests were positive and had the expected output. For example, the
individual phase test passed and each phase outputted a square wave, at 12v peak-peak. The
waveforms had to be analysed to ensure the rise and fall times were sufficient and not taking
too long to switch as this would mean that the IGBTs would lose a lot of energy as heat
which is inefficient and could be an indication that the bootstrap capacitor values are wrong.
However, as shown in Figure 55 the rise time is approximately 500nS and a fall time of
approximately 300nS. The rise time is longer than the value given in the datasheet, but this is
due to the gate resistor which slows down the switching speed in order to reduce ringing.

Figure 55 - Output of IR2110 showing a smooth, 12v peak square wave

The fall time is close to the value given in the IR2110 datasheet, and this is due to the fast
recovery diode placed in parallel with the gate drive resistor this discharges the gate
quickly.

The resistive load test was, at first, thought to be correct. The output is shown below in
Figure 56.

Figure 56 - Initial output of the 3 phase inverter with a resistive load

54
As mentioned earlier in this report, the output should be a trapezoidal wave, with a floating
state between each high or low state. However, the application note that was used to design
the inverter was misleading, and the tabulated switching pattern was weighted by the Hall
Effect sensors. The program was written with this switching pattern, and was of course wrong
and as a result, shoot through conditions occurred and this put a lot of strain on the IR2110s,
causing them to fail. However, the reason for this failure was not known at the time, and it
was assumed that having an inductive load was causing negative transients and resulted in
failed IR2110s. Many hours were spent attempting to find the root cause of the IR2110
failure. The first test that was undertaken to attempt to find the cause of failure was by
removing the fast turn off diode that was in series with the gates. Figure 57 shows that with
the diode connected, a large -3V transient can be seen during the turn off of the IGBT.

Figure 57 - Negative voltages on gate lines with diode connected

This diode was removed to see if it did indeed solve the issue outlined above, but of course it
did not. It did however reduce this negative transient, as shown in Figure 58.

Figure 58 - With the fast turn off diode removed, there is no negative transient

The Vs undershoot was measured then measure to see if this had any negative transients. As
Figure 59 shows, the Vs pin only goes to a maximum of -500mV, 10 times less than the
maximum rating.

55
Figure 59 - Negative transient of the Vs pin

The gate resistors were also changed and tested to see if this would solve the issue by limiting
the current draw of the IR2110. The diodes were removed so that even during the switching
off states the current was limited. This test was also a valid way of ensuring that 10 was a
sufficient resistance to use. Starting with no gate resistor, and steadily increasing it, the
following outputs were obtained, shown in Figure 60, Figure 61, Figure 62, and Figure 63.

56
Figure 60 - output with no gate resistor, very large switching transients

Figure 61 - 2Ohm gate resistance, still with a large transient

Figure 62 - 4Ohm gate resistor. Transients are now much smaller

57
Figure 63 - a negative peak of 500mV is seen with a 10ohm gate resistor

It is clear that the 10 gate resistor is the best choice. But this still did not solve the issue of
the IR2110s failures (which is to be expected since it was a switching fault).

Since the solution could not be found, it was assumed that the IR2110s were not suitable for
this application due to the inductive load. Therefore a new driver chip with isolated
high/lowside outputs was to be used in the hope that the isolation would prevent the chips
from failing. The SI-8235 chip that was used is also much more tolerant to transients
(Transient immunity >45 kV/s). As outlined in the circuit design section, a new board was
made to slot into the existing socket that the IR2110 used. The same tests where then
preformed with the new driver chip, the square wave output during the gate test is shown
below in Figure 64.

Figure 64 - Output of the SI-8235

It was then pointed out that the method that was being used to switch was incorrect and that
the application note was being misinterpreted. The code was revised and another resistive
load test was undertaken, providing the output seen in Figure 65 below.

58
Figure 65 - Correct 3 phase output of the inverter

The motor was then connected and it successfully span, proving that the code was incorrect.
To further prove this, the SI-8235 were replaced back to the IR2110s and they too would spin
the motor without failing. Thus, the fault was down to an incorrect switching pattern, causing
shoot through which caused irreversible damage to the driver chips. Since both chips were
correctly working, the decision was made to compare the two and see what the differences
were.

The main difference that was observed was the rise and fall times.

Figure 66 - Comparing the turn off times of the IR2110 (left) and the SI-8235 (right)

As can be seen from the two outputs shown in Figure 66, the IGBT turned off twice as fast
when driven with the SI-8235. It also has a much cleaner output, the output from the IR2110
has a peculiar. This could be down to the non-isolated gate drives causing fluctuations when
switching. The same comparison was made with rise times.

59
Figure 67 - Comparison of rise times of IR2110 (left) and SI-8235 (right)

Again, the SI-8235 driver outperformed the IR2110 driver by switching approximately 2.5
times faster. Since the efficiency is directly related to the time taken to switch, an inverter
with the SI-8235 chips would not only be more tolerant transients, but also a lot more
efficient. In applications such as the conversion of DC to AC for grid tied systems, efficiency
is very important, therefore incorporating the SI-8235 would help increase this and reduce the
size of the inverter.

The penultimate test was to ensure the phase and Hall Effect sensors were correctly paired,
the output of the inverter was compared to the Hall Effect sensors. This was then compared to
the timing diagram in the application note Brushless DC Motor Control Made Easy. The
inverter and the hall affect sensors were correctly paired, and the output of this test is shown
in below.

Figure 68 - Result of phase pairing test the yellow wave is the Hall Effect Sensor

The final test was to ensure they system as a whole worked, and that it could indeed balance
and be ridden as a vehicle. The unicycle was not as stable as was initially expected, since it
would balance for a few seconds before oscillating out of control. The PID gains were tuned
and changed several different times to try and maintain stability (the results are in the log
books provided with this report). Riding the unicycle proved more successful, however a

60
rolling start was needed otherwise the motor would stall. This is thought to be because the
motor does not have enough torque at such low RPM.

61
Conclusion
The objectives of this project were to design and build an inverter to be used on a unicycle to
enable it to balance. The use of Inertial Measurement Units was to be used to calculate the
angular position, and control theory was to be implemented. While all of these objectives
were met, it is believed that limitations in motor torque meant that the ability for the unicycle
to balance in its own with no assistance was not as well executed as would have been hoped.

Limitations

The use of a BLDC motor meant that only angles >3 could be resolved, since the coils only
allow for the motor to be rotated in 3 intervals. This fact, coupled with the use of an IMU for
angular measurements as opposed to the more expensive option of encoders, means that
balancing is very difficult. Vibrations from the motor cause sporadic IMU readings (which
can be filtered out at the expense of latency) means that noise is injected into the system
again causing instability.

Future Work

A recommended improve that would likely solve the short stability times would be a geared,
hub motor. This would provide greater torque at lower RPMs, meaning the motor would not
stall. Another method of calculating the tilt angle would also be advised, or a better method
of mounting an IMU to reduce vibrations.

62
Detailed Cost Breakdown

Unicycle 20.00
PCB manufacture 28.00
IRGP4640PBF IGBT x6 11.64
IR2110PBF x3 5.07
TERMINAL BLOCK x9 3.49
MUR820 x 12 8.53
M3X25-NI SPACER x 12 4.608
MPU-6050 6.59
Digital Volt Meter 13.49
M3x6+6mm female/male hex standoffs x25 4.94
M3 screws x 1/4in x50 1.79
180W 48v buck converter 24.00
myRIO connector x5 50
48v 10ah battery 165.00
TO-247 insulator 2.99
Aluminium Bar (heat sink) 13.00
10 pin stackable headers x7 2.52
1uF electrolytic capacitor x3 0.12
10uF electrolytic capacitor x6 0.24
100uF electrolytic capacitor x3 0.12
10nF ceramic capacitor x6 0.11
UF4007 Diodes x9 0.31
National Instrument myRIO 200
Custom spokes 40.00
100w BLDC motor 100
10K Resistors x20 0.2
5 Resistors x20 0.2

Total 706.96

63
References
Inverted Pendulum Image, (2016). [image] Available at:
https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Cart-pendulum.svg/2000px-
Cart-pendulum.svg.png [Accessed 23 May 2016].

Fun, S. (2016). Accelerometer, Gyro and IMU Buying Guide - SparkFun Electronics. [online]
Sparkfun.com. Available at: https://www.sparkfun.com/pages/accel_gyro_guide [Accessed
20 May 2016].
Instructables.com. (2016). IMU Part 2: Complementary Filter. [online] Available at:
http://www.instructables.com/id/PCB-Quadrotor-Brushless/step15/IMU-Part-2-
Complementary-Filter/ [Accessed 20 May 2016].
Tutorial.cytron.com.my. (2012). Measuring Tilt Angle with Gyro and Accelerometer
Tutorial by Cytron. [online] Available at:
http://tutorial.cytron.com.my/2012/01/10/measuring-tilt-angle-with-gyro-and-accelerometer/
[Accessed 20 May 2016].
National Instruments, (2016). Block diagram of a typical closed loop system. [image]
Available at: http://www.ni.com/cms/images/devzone/tut/a/12fbdcae1635.gif [Accessed 20
May 2016].
Ni.com. (2016). PID Theory Explained - National Instruments. [online] Available at:
http://www.ni.com/white-paper/3782/en/ [Accessed 20 May 2016].
robu, (2016). [image] Available at: http://robu.in/wp-content/uploads/2014/12/mpu_-
_6050_gyro_sensor.png [Accessed 20 May 2016].
Nxp.com. (2016). Sensor Fusion|NXP. [online] Available at:
http://www.nxp.com/products/sensors/nxp-sensor-fusion:XTRSICSNSTLBOX [Accessed 20
May 2016].
Kerrywong.com. (2016). Kerry D. Wong Blog Archive A Self-Balancing Robot I.
[online] Available at: http://www.kerrywong.com/2012/03/08/a-self-balancing-robot-i/
[Accessed 20 May 2016].
Gear, L. (2016). myComplementry Filter. 1st ed. [ebook] pp.13-15. Available at:
https://decibel.ni.com/content/docs/DOC-22933 [Accessed 20 May 2016].
Digikey.co.uk. (2016). An Introduction to Brushless DC Motor Control | DigiKey. [online]
Available at: http://www.digikey.co.uk/en/articles/techzone/2013/mar/an-introduction-to-
brushless-dc-motor-control [Accessed 20 May 2016].
Texas Instruments, (2016). [video] Available at:
https://www.youtube.com/watch?v=0mQunSe2_FM [Accessed 20 May 2016].
nationalvetcontent, (2016). [image] Available at:
https://nationalvetcontent.edu.au/alfresco/d/d/workspace/SpacesStore/f3d90138-e7ed-41ce-
8346-4d6756d0d52a/ims/content_sections/learn_about/images/06_system_page_003_5.gif
[Accessed 21 May 2016].

64
gozuk, (2016). [image] Available at: http://www.gozuk.com/image/3-phase-inverter-basic-
circuit.jpg [Accessed 21 May 2016].
Hirzel, T. (2016). Arduino - PWM. [online] Arduino.cc. Available at:
https://www.arduino.cc/en/Tutorial/PWM [Accessed 21 May 2016].
Leaf Motor, (2016). [image] Available at: http://www.leafmotor.com/image/12inch-250w-
electric-hub-motor.jpg [Accessed 21 May 2016].
Brown, W. (2002). Brushless DC Motor Control Made Easy. 1st ed. [ebook] Microchip
Technology Inc. Available at: http://ww1.microchip.com/downloads/en/appnotes/00857a.pdf
[Accessed 21 May 2016].
Monster Scooter Parts, (2016). [image] Available at:
http://www..com/media/catalog/product/2/4/24-volt-500-watt-direct-drive-electric-motor-
rear-wheel-assembly_1.jpg [Accessed 21 May 2016].
focus designs. (2016). focus designs. [online] Available at: http://www.focusdesigns.com/
[Accessed 21 May 2016].
Conhismotor.com. (2016). Conhis Motor Technology. [online] Available at:
http://www.conhismotor.com/ProductShow.asp?id=96 [Accessed 21 May 2016].
Ebikes.ca. (2016). Online Spoke Calculator for Hubmotors and Ebikes. [online] Available at:
http://www.ebikes.ca/tools/spoke-calc.html [Accessed 21 May 2016].
Central-wheel.co.uk. (2016). Motorcycle Spokes from Central Wheel Components Limited.
[online] Available at: http://www.central-wheel.co.uk/spokes/spokes.html [Accessed 21 May
2016].
Blake, C. and Bull, C. (2016). IGBT or MOSFET: Choose Wisely. 1st ed. [ebook]
International Rectifier. Available at:
http://www.infineon.com/dgdl/choosewisely.pdf?fileId=5546d462533600a40153574048b73e
dc [Accessed 22 May 2016].
Axotron.se. (2016). Axotron. [online] Available at:
http://axotron.se/print.php?page=34&chapter=0 [Accessed 22 May 2016].
Al-Omari, A. (2016). Inverter Design. 1st ed. [ebook] Available at:
http://www.dle.plymouth,ac.uk [Accessed 22 May 2016].
Amazon.co.uk. (2016). DEOK DC 180W Buck Step Down Power Supply Converter:
Amazon.co.uk: Electronics. [online] Available at: https://www.amazon.co.uk/DEOK-
Converter-Waterproof-37V-60V-
Regulator/dp/B00IZ9G85O/ref=sr_1_5?ie=UTF8&qid=1463926639&sr=8-
5&keywords=48v+buck+converter+15A [Accessed 22 May 2016].

65
Bibliography
USER GUIDE AND SPECIFICATIONS NI myRIO-1900. (2016). 1st ed. [ebook] National
Instruments. Available at: http://www.ni.com/pdf/manuals/376047a.pdf [Accessed 23 May
2013].
IR2109 Datasheet. (2003). 1st ed. [ebook] International Rectifiers. Available at:
http://www.irf.com/product-info/datasheets/data/ir2109.pdf [Accessed 23 May 2016].
IR2110 Datasheet. (2005). 1st ed. [ebook] International Rectifier. Available at:
http://www.irf.com/product-info/datasheets/data/ir2110.pdf [Accessed 23 May 2016].
Si823x Datasheet. (2016). 1st ed. [ebook] Silicon Labs. Available at:
https://www.silabs.com/Support%20Documents/TechnicalDocs/Si823x.pdf [Accessed 23
May 2016].
IRG4PC50FDPbF Datasheet. (2004). 1st ed. [ebook] International Rectifier. Available at:
http://www.irf.com/product-info/datasheets/data/irg4pc50fdpbf.pdf [Accessed 23 May 2016].
MPU-6000 and MPU-6050 Register Map and Descriptions Revision 4.0. (2016). 1st ed.
[ebook] InvenSense. Available at:
https://www.olimex.com/Products/Modules/Sensors/MOD-MPU6050/resources/RM-MPU-
60xxA_rev_4.pdf [Accessed 23 May 2016].
MUR8x Datasheet. (2013). 1st ed. [ebook] Multicomp. Available at:
http://www.farnell.com/datasheets/1719903.pdf [Accessed 23 May 2016].
3kVDC Isolated 1W Single & Dual Output DC/DC Converters. (2012). 1st ed. [ebook]
Murata ps. Available at: http://power.murata.com/datasheet?/data/power/ncl/kdc_nmv.pdf
[Accessed 23 May 2016].

66
Appendix

Appendix A

67
Appendix B

68
69

You might also like