• No results found

SIMONFR¨OLANDER,ANDR´ES¨ALL ImplementingGyroscopicStabilization

N/A
N/A
Protected

Academic year: 2022

Share "SIMONFR¨OLANDER,ANDR´ES¨ALL ImplementingGyroscopicStabilization"

Copied!
78
0
0

Loading.... (view fulltext now)

Full text

(1)

IN

DEGREE PROJECT MECHANICAL ENGINEERING, FIRST CYCLE, 15 CREDITS

STOCKHOLM SWEDEN 2017,

Implementing Gyroscopic Stabilization

A study on performance and power consumption correlated to flywheel rotational speed

SIMON FRÖLANDER

ANDRÉ SÄLL

(2)
(3)

Implementing Gyroscopic Stabilization

A study on performance and power consumption correlated to flywheel rotational speed

SIMON FR ¨OLANDER, ANDR´E S¨ALL

Bachelor’s Thesis at ITM Supervisor: Lars Svensson Examiner: Nihad Subasic

TRITA: MMK 2017:29 MDAB 647

(4)
(5)

Abstract

In this study the stability as well as the power consumption of an implemented gyroscopic stabilizer, when varying the rotational speed of the flywheel, was investigated. A fully functional demonstrator was constructed utilizing two DC motors for driving the flywheel and rotating the gimbal, respectively. To control the stabilization an Arduino Uno with a PID-controller was used, measurements were made with a second Arduino Uno. Three tests were conducted:

no disturbances, a short impulse, and a constant force ap- plied to the demonstrator. The results showed that the performance in all three tests increased with a higher rota- tional speed of the flywheel, and that the biggest source of power consumption was the flywheel DC motor.

(6)

Referat

Implementering av gyroskopisk stabilisering

I den h¨ar studien unders¨oktes stabiliteten s˚av¨al som ef- fektf¨orbrukningen av en implementerad gyroskopisk stabi- lisator n¨ar sv¨anghjulets rotationshastighet varierades. En fullt fungerande demonstrator konstruerades vilken anv¨ande sig av tv˚a likstr¨omsmotorer f¨or att driva sv¨anghjulet re- spektive den kardanska upph¨angningen. F¨or att reglera sta- biliseringen anv¨andes en Arduino Uno med en PID-regulator, m¨atningar gjordes med en andra Arduino Uno. Tre tester genomf¨ordes: inga st¨orningar, en kort impuls, och en kon- stant kraft applicerad till demonstratorn. Resultaten vi- sade att prestandan i alla tre testerna f¨orb¨attrades med en h¨ogre rotationshastighet hos sv¨anghjulet, och att den st¨orsta k¨allan till effektf¨orbrukning var sv¨anghjulslikstr¨omsmotorn.

(7)

Acknowledgements

This project would have been impossible without the help of others. We would like to start by thanking the other project groups which have been working by our sides with their respective projects, contributing with crucial information as well as company during late working nights. We would also like to thank the ever so supporting Arduino community for all the open source material available. We would like to thank the assistants who always were there when we needed advice, and especially Marcus and Fredrika. Thank you Staffan for your advice and help with the electronics, and thank you Thomas for helping us even after we screwed up your masterfully made parts. Constructing the demonstrator would have been impossible without you.

And last but not least, thank you Lars for being such an awesome supervisor. This project would have been entirely different and not in the least as interesting and fun without your guiding hand.

Simon Fr¨olander and Andr´e S¨all Stockholm, June 2017

(8)

Contents

1 Introduction 1

1.1 Background . . . 1

1.2 Purpose . . . 1

1.3 Scope . . . 2

1.4 Method . . . 2

2 Theory 3 2.1 Gyroscopes . . . 3

2.2 Motor dynamics . . . 5

2.3 Equations of motion . . . 6

2.4 PID-controller . . . 7

3 Demonstrator 9 3.1 Mechanical design . . . 9

3.2 Arduino Uno . . . 11

3.3 Actuators . . . 11

3.3.1 Flywheel DC motor . . . 12

3.3.2 Gimbal DC motor . . . 12

3.3.3 Motor driver . . . 12

3.4 Sensors and measurements . . . 13

3.4.1 Potentiometer . . . 13

3.4.2 Hall effect sensor . . . 13

3.4.3 Current sensor . . . 13

3.4.4 Voltage measurements . . . 14

3.5 Low pass filter . . . 15

3.6 Control system . . . 15

3.7 Power supplies . . . 15

3.8 Test setup . . . 15

4 Results 17 4.1 Performance . . . 17

4.2 Power consumption . . . 19

5 Discussion & Conclusions 23

(9)

5.1 Discussion . . . 23

5.1.1 The results . . . 23

5.1.2 Challenges and considerations . . . 24

5.2 Conclusions . . . 25

Bibliography 27

Appendices 28

A Arduino Uno schematics 29

B Maxon DC motor 31

C Matlab code 33

D Circuit layout 45

E Arduino code 47

F Test results 53

(10)

List of Figures

2.1 Gyroscope with 3 gimbals, image from [4] . . . 3

2.2 Different types of gyrostabilizers, image from [5] . . . 4

2.3 Relation between input-output torque, modeled in Solid Edge ST8 and rendered in KeyShot 5 . . . . 5

2.4 Motion of the body, drawn in PowerPoint 2016 . . . . 6

2.5 PID-control loop, drawn on www.draw.io . . . . 7

3.1 The demonstrator . . . 9

3.2 The gyroscope mounted in the demonstrator . . . 10

3.3 Flywheel, modeled in Solid Edge ST7 . . . 10

3.4 The test mount . . . 11

3.5 The Arduino Motor Shield, image from [8] . . . 12

3.6 The SparkFun Low Current Sensor Breakout, image from [10] . . . 13

3.7 A voltage divider, image from [11] . . . 14

4.1 Test with no disturbances applied, plotted in matlab 2016a . . . 17

4.2 Test with a short impulse disturbance applied, plotted in matlab 2016a 18 4.3 Test with constant force disturbances applied, plotted in matlab 2016a 19 4.4 Gimbal motor power for test with no disturbances applied, plotted in matlab 2016a . . . . 20

4.5 Gimbal motor power for test with a short impulse disturbance applied, plotted in matlab 2016a . . . 20

4.6 Gimbal motor power for test with constant force disturbances applied, plotted in matlab 2016a . . . 21

F.1 Test with no disturbances and short impulses applied, 3300 RPM, plotted in matlab 2016a . . . 54

F.2 Test with constant force disturbances applied, 3300 RPM, plotted in matlab 2016a . . . . 55

F.3 Test with no disturbances and short impulses applied, 3900 RPM, plotted in matlab 2016a . . . 56

F.4 Test with constant force disturbances applied, 3900 RPM, plotted in matlab 2016a . . . . 57

(11)

F.5 Test with no disturbances and short impulses applied, 4500 RPM, plotted in matlab 2016a . . . 58 F.6 Test with constant force disturbances applied, 4500 RPM, plotted in

matlab 2016a . . . . 59 F.7 Test with no disturbances and short impulses applied, 5100 RPM, plotted

in matlab 2016a . . . 60 F.8 Test with constant force disturbances applied, 5100 RPM, plotted in

matlab 2016a . . . . 61 F.9 Test with no disturbances and short impulses applied, 5700 RPM, plotted

in matlab 2016a . . . 62 F.10 Test with constant force disturbances applied, 5700 RPM, plotted in

matlab 2016a . . . . 63

(12)

List of Tables

3.1 PID-controller parameters for different rotational speeds . . . 16 4.1 Average time between constant force being applied and balancing failure 18 4.2 Flywheel DC motor power . . . 19

(13)

Acronyms

CMG Control moment gyroscope. 3 EMF Electromotive force. 6

IDE Integrated development environment. 24 PID Proportional–integral–derivative controller. 7 PWM Pulse-width modulation. 12

(14)
(15)

Chapter 1

Introduction

1.1 Background

In the development of modern transportation, space and low energy consumption is key, especially in cramped cities. One possibility to improve both of these as- pects is to construct small, personal two-wheeled vehicles. These would be more efficient than a conventional four-seated car in both size and power consumption.

It is however desirable to make these easier and safer to drive than, for example, normal motorcycles. This could be achieved by using a balancing system utilizing a gyroscope, thus making the vehicle easier to maneuver.

Gyroscopic control is used in the International Space Station, see [1], and com- mercially available for boats as in [2]. Two-wheeled cars such as the C-1 from Lit Motors, see [3], has been developed although a commercial breakthrough has yet to be made.

1.2 Purpose

The purpose of this report is to investigate how the power consumption and stability of a balancing system being controlled by a gyro implementation correlate to scaling of the rotational speed of the flywheel, and in extension the angular momentum.

The research question that will be investigated is:

How does the stability of the system and power consumption of the demonstrator correlate to the rotational speed of the flywheel?

(16)

CHAPTER 1. INTRODUCTION

1.3 Scope

The only power that was measured was the power fed to the two motors used for rotating the flywheel and turning the gyro to generate torque, respectively. Three cases was studied: no disturbances, short impulse disturbances, and constant force disturbances.

1.4 Method

A demonstrator was constructed in a way so that the rotational speed of the fly- wheel could be adjusted and controlled disturbances be applied. Two Arduino Uno microcontrollers were used, one for controlling the balancing of the demonstrator, and one for gathering test data. To answer the research question of this study three tests were conducted, each of which was run with five different rotational speeds on the flywheel. In the first test the demonstrator was run without disturbances. In the second test the demonstrator was subjected to short impulse disturbances. In the last test a constant force disturbance was applied to the demonstrator. These tests showed the performance during ideal circumstances, short and sudden disturbances, and prolonged disturbances until failure, respectively.

2

(17)

Chapter 2

Theory

This chapter will provide the reader with the necessary theory to understand the following chapters. Most important is to explain the concept of a gyroscope and how this can generate a stabilizing torque.

2.1 Gyroscopes

A gyroscope is a spinning flywheel where the spin axis can be changed since it is mounted in two or three gimbals. Figure 2.1 shows a gyroscope with three gim- bals. A property of a gyroscope is that when tilting or rotating the mounting, the orientation of the spin axis will remain the same due to conservation of angular momentum.

Figure 2.1: Gyroscope with 3 gimbals, image from [4]

By adding constrains to the construction, either by locking an axis from rotation or by actively control the rotation of one or more axes with a motor, the concept can be used as a stabilizer. Figure 2.2 a, c and d shows three possible configura- tions that can be used as a gyrostabilizer, also known as CMG-units. Figure 2.2b defines a gyroscope just as in Figure 2.1. The gyrostabilizer can be of the types

(18)

CHAPTER 2. THEORY single or double gimbal and it can use active or passive actuation. In this work a gyrostabilizer with single gimbal and active actuation as in Figure 2.2c will be used, this can generate larger stabilizing torque than double gimbal systems, the torque is transfered through the gimbal structures. In a double gimbal system the stabilizing torque is transfered through the gimbal motor. This limits the stabilizing torque to the maximum torque of the motor, as explained in [5].

Figure 2.2: Different types of gyrostabilizers, image from [5]

An illustration shown in Figure 2.3 demonstrates how the gyroscopic effect can be used as a stabilizer. In the figure the flywheel spins around the y-axis with angular velocity ωspin and the flywheel gimbal can rotate around the z-axis, this motion is called precession. According to Newton’s second law the spinning wheel will create an angular momentum H given by

H= Jfωspin, (2.1)

where Jf is the moment of inertia in direction of the spin axis, given by Jf =Z

Q

r2dm (2.2)

where Q is the entire mass Q and r is the distance from the point for which the moment of inertia is calculated. Applying a torque τcontrol on the z-axis will rotate the flywheel around the precession axis with angular velocity ωprec. This rotation will cause a gyroscopic torque τgyro orthogonal to both the angular momentum of

4

(19)

2.2. MOTOR DYNAMICS

the flywheel and the applied control torque, Figure 2.3 shows the relation between the control τcontrol and the gyroscopic τgyro torque. The gyroscopic torque is given by the cross product

~

τgyro = ~ωprec× ~H. (2.3)

ωpreccan be written as d θd tprec where θprecis the precession angle. Using this together with (2.1) the stabilizing torque in (2.3) can be expressed in the x-direction as

~ex : τgyro = Jfωspind θprec

d t cos θprec. (2.4)

Equation (2.4) shows that when θprec is ±90° the gyro torque with respect to the x-axis is zero. Hence a balancing torque can only be generated when rotating the flywheel within this precession boundaries.

Figure 2.3: Relation between input-output torque, modeled in Solid Edge ST8 and rendered in KeyShot 5

When designing a gyrostabilizer the most important parameters to generate a larger stabilizing torque are:

• Moment of inertia of the flywheel Jf

• Angular velocity of the flywheel ωspin

• Precession rate ωprec

2.2 Motor dynamics

As described in [6], the characteristics of a DC motor can be modeled by

UA= RAIA+ E (2.5)

(20)

CHAPTER 2. THEORY where UA,RA and IA is the armature voltage, the resistance in the rotor, and the current flowing through respectively. E is the EMF given by

E= K2Φω (2.6)

where K2Φ is a constant depending on motor characteristics and ω is the angular velocity of the motor. Combining equation (2.5) and (2.6) the angular velocity of the motor can be expressed as

ω= IA− RAIA

K2Φ . (2.7)

which will be used to determine the equations of motion.

2.3 Equations of motion

If the construction in Figure 2.3 is seen from the side it can be simplified as in Figure 2.4 and the motion of the body can be described by

H˙ = τtot (2.8)

where ˙H is the total angular momentum of the body and τtot is the sum of the torque from gravitation and the stabilizing torque given by (2.4). The equation of motion is given by

Jbϕ¨= mgl sin ϕ + Jfωspin˙θ cos θ. (2.9) where Jb is the body’s moment of inertia, l is the length from the tilt axis to the body’s center of mass, m is the mass, g is the gravitational acceleration and ϕ is the tilt angle.

Figure 2.4: Motion of the body, drawn in PowerPoint 2016 6

(21)

2.4. PID-CONTROLLER

Introducing the motor dynamics ˙θ can be substituted with ω from (2.7) since the angular velocity of the motor must be same as the precession rate. Using this the equation of motion (2.9) can be written as

Jbϕ¨= mgl sin ϕ + JfωspinUA− RAIA

K2Φ cos θ. (2.10)

2.4 PID-controller

According to [7], a PID-controller is a feedback mechanism that gives an control signal u(t) based on the error e(t) = r(t) − y(t) between a desired setpoint r(t) and the real measured value y(t) according to

u(t) = KPe(t) + KI

Z t 0

e(τ) dτ + KD

d

dte(t). (2.11)

The calculated control signal u(t) is the output from the controller, which is used as input to the system. Output from the system is continuously measured and returned to the controller, which updates the control signal u(t) too minimize the error e(t) = r(t) − y(t). This feedback control loop is described in Figure 2.5. The PID-controller consists of three parts, proportional, integral and derivative which are represented by the parameters KP, KI and KD respectively. Those parameters has to be tuned to get the desired behavior of the system. The most important effects of varying the different parameters are:

• KP-proportional gain: Larger proportional gain gives larger change in out- put for a given error. Operates with a steady-state error and can cause insta- bility if too high.

• KI-integral gain: Eliminates the steady-state error and gives larger output depending on both the magnitude of the error and the duration. Can cause the real value y(t) to overshoot the setpoint.

• KD-derivative gain: Gives better stability but increases the impact of mea- surement noise.

Figure 2.5: PID-control loop, drawn on www.draw.io

(22)
(23)

Chapter 3

Demonstrator

Figure 3.1: The demonstrator

In this chapter the design of the demonstrator will be explained. This will include electronics and software. The demonstrator mounted in the test mount is seen in Figure 3.1.

3.1 Mechanical design

The main feature of the demonstrator was the box containing the gyroscope. The gyroscope was mounted in a position as showed in Figure 3.2 in order to put the least stress on the axle’s bearings, which were of the groove ball bearing type. A +/-90°

rotaion limit was built in order to prevent the wires connected to the gimbal being torn off. This does not affect the balancing in a negative way since the effective

(24)

CHAPTER 3. DEMONSTRATOR

Figure 3.2: The gyroscope mounted in the demonstrator

range is +/-90° anyway, as described in Chapter 2.1. The flywheel was powered by a DC motor which gave it an almost constant speed and power consumption when fed with constant voltage. The torque was transfered from the motor to the axle with a V-belt going around two wheels, one on the motor shaft and one on the axle.

The ratio between the wheel on the motor and the wheel on the axle was about 1 1. To turn the flywheel another DC-motor was used, which was connected directly on the gimbal’s axle.

Figure 3.3: Flywheel, modeled in Solid Edge ST7 10

(25)

3.2. ARDUINO UNO

The flywheels were designed to give large moment of inertia relatively to their size and weight. The design as showed in Figure 3.3 placed the majority of the weight of the flywheel at the edge, which is preferable according to equation 2.2. Each flywheel weighed about 150g and were mounted together for a total flywheel weight of 750g.

Figure 3.4: The test mount

In order to test the characteristics of the balancing system the box was placed in a test mount, shown in Figure 3.4. This allowed the tests to be conducted consistently as well as avoiding damage to the demonstrator since it could only be turned to a limited angle, thus avoiding unnecessary stress on the construction. The resistance upon turning the box was very little and assumed to be negligible.

3.2 Arduino Uno

Two Arduino Uno microcontrollers was used for all computations, measurements via sensors and data exports regarding the demonstrator’s control system and power consumption. Schematics is available in Appendix A. All code for the Arduino Uno units was written in the Arduino IDE. All Arduino software and hardware is open source which greatly simplified the developing process, since example scripts were readily available. The original plan was to use a single Arduino Uno for all processes. This proved to be unsuccessful; the time delay caused by printing data to the serial monitor from the Arduino was too large, slowing the program down to the point of rendering the control system useless. This resulted in the use of two Arduinos, one controlling the balancing of the demonstrator and another for taking measurements and printing data to the serial monitor so it could be saved.

3.3 Actuators

As previously mentioned two actuators were utilized in the demonstrator. One DC motor was used to spin the flywheel, and a second DC motor was used to rotate

(26)

CHAPTER 3. DEMONSTRATOR the gimbal perpendicular to the flywheel’s spin axis, thereby generating torque as explained in the Theory chapter.

3.3.1 Flywheel DC motor

The DC motor to drive the flywheel was a Maxon 148877 DC motor. Its nominal voltage and current was noted as 48 V and 3.17 A, respectively. A datasheet is available in Appendix B. The motor was connected directly to a variable voltage supply. Since the voltage fed to the motor was constant once the flywheel had been fully accelerated, and the only variations to the motor torque was due to the gimbal motor’s corrections, the variations were deemed negligible and the power supplied to this motor assumed to be constant. This power was thereby measured by reading the power supply’s voltage and current output and calculating the power as P = UI.

3.3.2 Gimbal DC motor

This motor had a gearbox connected to it which gave it sufficient torque to turn the gimbal. It was supplied with 12 V with a 1.5A limit to avoid damage. No datasheet was found for this motor.

3.3.3 Motor driver

Figure 3.5: The Arduino Motor Shield, image from [8]

To control the gimbal DC motor an Arduino Motor Shield, as seen in Figure 3.5, was used. The Motor Shield is an add on to the Arduino Uno which makes it possible to control both direction and speed of the motor. The Motor Shield has two PWM- outputs capable of an output of 12V, one of which was used to drive the motor and the other to measure the voltage fed to the motor. The voltage measurements will be further described in 3.4.4.

12

(27)

3.4. SENSORS AND MEASUREMENTS

3.4 Sensors and measurements

Information from sensors are needed to implement the control system as well as measuring the power used by the motors. To extract the test data for analysis the measurement values were printed on the serial monitor. The values could then be copied into an Excel file and from there be imported to matlab. The matlab program which was used for creating the data plots in this paper is available in Appendix C.

3.4.1 Potentiometer

A potentiometer was chosen to determine the box’s position relatively to a manually set setpoint. By turning the potentiometer shaft a variable voltage can be read by the Arduino Uno. The Arduino IDE command analogRead() converts the analog voltage read to a number, 0 for 0V read and 1023 for 5V.

The potentiometer shaft was connected to the demonstrator’s turning axle. A set- point used for the control system was found by manually estimating the balancing point of the demonstrator, reading the value from analogRead() at that point and setting that value as the setpoint.

3.4.2 Hall effect sensor

To measure the rotational speed of the flywheel a Hall effect sensor was used. As explained in [9], a Hall effect sensor generates a measurable voltage when subjected to a magnetic field. A small magnet was placed on the flywheel axle so that every full rotation of the flywheel was registered as the magnet passed by the Hall effect sensor.

3.4.3 Current sensor

Figure 3.6: The SparkFun Low Current Sensor Breakout, image from [10]

To measure the current fed to the gimbal DC motor the SparkFun Low Current Sensor Breakout - ACS712, seen in Figure 3.6, was used. It outputs a voltage proportional to the current, and the sensitivity can be adjusted by the built in gain potentiometer. According to [10] it measures DC and AC currents up to 5A.

(28)

CHAPTER 3. DEMONSTRATOR

3.4.4 Voltage measurements

Figure 3.7: A voltage divider, image from [11]

To measure the voltage fed to the gimbal DC motor a voltage divider was imple- mented in order to scale down the input voltage to the Arduino analog pin, since the range of the voltage sensor in the Arduino is 5V and the maximum voltage fed to the motor was 12 V. The voltage across the R2 resistor in Figure 3.7 can be calculated:

Uinput= (R1+ R2)I (3.1)

Udivided= R2I (3.2)

I = Uinput

R1+ R2 = Udivided

R2 (3.3)

Udivided= R2

R1+ R2

Uinput (3.4)

Since the Arduino Uno analog pins can only handle 0-5V, i.e. not negative voltage, the voltage divider could not be put in parallel with the gimbal DC motor, since the direction of the current changes during operation. This was solved by using the second set of output pins of the Arduino Motor Shield. The second set of output pins of the Arduino Motor Shield was programmed to output the same magnitude of voltage as the set used to feed the gimbal motor, but always positive. The voltage divider was then put in series with that pin set.

The resistors in the implementation was set to R1 = 154kΩ and R2 = 110kΩ, resulting in a reduction of Udivided = 5

12Uinput. The magnitude of resistance was chosen to be large in order to prevent damage to the resistors and Arduino Uno from large currents.

14

(29)

3.5. LOW PASS FILTER

3.5 Low pass filter

Since the analogRead() command gives discrete values, which are updated every it- eration of the program loop, the calculated derivative of the input can obtain values which are unrealistically large. If left unfiltered, this defect of the input signal will render the D-part of the PID-controller useless. In order to solve this problem, a digital one pole filter was used to filter the input signal from the potentiometer. As described in [12], a low pass filter is a filter with the purpose of stopping frequency components of a signal above a limit frequency, while letting lower frequency com- ponents of the signal pass. The filter used was from the open source library Filters, available on [13].

3.6 Control system

The control algorithm used for the demonstrator was a PID-controller. The input signal for this controller was the potentiometer value and the control signal con- trolled the voltage fed to the gimbal DC motor. The parameters were set manually by the following method:

1. Set KP to the highest possible value without the system becoming unstable.

2. Set KI to the highest possible value without the system becoming unstable.

3. Set KD to the highest possible value without the system becoming unstable.

4. If necessary, decrease one parameter while increasing another to slightly change the characteristics of the control system, e.g. decreasing KI while increasing KD to get stronger damping.

Steps one to three were often enough to get satisfactory results.

3.7 Power supplies

To power the two DC motors one EX354RT Triple Power Supply was used. The two Arduino Uno microcontrollers was supplied power via the PC’s USB ports.

3.8 Test setup

To answer the research question of this project three tests was developed, each of which was run with the flywheel having different rotational speeds.

• In the first test the demonstrator was run without disturbances.

• In the second test the demonstrator was subjected to short impulse distur- bances. A bottle was filled with water giving it the weight of 300g and hung

(30)

CHAPTER 3. DEMONSTRATOR up in a string like a pendulum. The demonstrator was placed right next to the bottle and the bottle was lifted to 90° and then released, causing it to swing into the demonstrator’s side, making contact for an instance. The bottle was caught during the rebound to prevent a longer disturbance.

• During the third test the bottle was placed on top of the demonstrator beside the center of gravity to induce a constant force disturbance.

The highest rotational speed tested was set to the highest speed obtainable by the demonstrator and the lowest rotational speed was set to the lowest speed for which the demonstrator could function. Table 3.1 shows the PID-parameters used for each rotational speed. The circuit layout and the Arduino code used during the testing is showed in Appendix D and E, respectively.

Table 3.1: PID-controller parameters for different rotational speeds

Speed [RPM] KP KI KD

3300 7.0 3.0 0.0

3900 12.0 3.0 0.0

4500 17.0 3.0 0.1

5100 19.0 3.0 0.5

5700 21.0 5.0 1.0

16

(31)

Chapter 4

Results

This chapter contains the results of the tests described in the previous chapter.

First with regard to performance and thereafter with regard to energy consumption.

All the graphs shown in this chapter are parts of the full data samples shown in Appendix F and were created using the matlab program in Appendix C.

4.1 Performance

5 6 7 8 9 10 11 12

Time [s]

535 540 545 550 555 560

Potentiometer value

No disturbances

3300 RPM 3900 RPM 4500 RPM 5100 RPM 5700 RPM

Figure 4.1: Test with no disturbances applied, plotted in matlab 2016a Figure 4.1 show a snippet of time where the demonstrator balances without being

(32)

CHAPTER 4. RESULTS subjected to disturbances. The steady state error and stability improvements of increasing rotational speed are apparent.

0.5 1 1.5 2 2.5 3

Time [s]

480 500 520 540 560 580

Potentiometer value

Impulse

3300 RPM 3900 RPM 4500 RPM 5100 RPM 5700 RPM

Figure 4.2: Test with a short impulse disturbance applied, plotted in matlab 2016a Figure 4.2 and 4.3 show the demonstrators response of being subjected to a short impulse and a constant force disturbance, respectively. The improvements of sta- bility as well as time before failure are apparent. Table 4.1 shows the average time between constant force being applied and balancing failure for each rotational speed. The average times were calculated from the plots in Appendix F. In Table 4.1 balancing failure is defined as the time when the potentiometer value falls below 490.

Table 4.1: Average time between constant force being applied and balancing failure

Speed [RPM] Average time [s]

3300 0.99

3900 2.02

4500 2.74

5100 3.00

5700 3.54

18

(33)

4.2. POWER CONSUMPTION

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

Time [s]

420 440 460 480 500 520 540 560

Potentiometer value

Constant force

3300 RPM 3900 RPM 4500 RPM 5100 RPM 5700 RPM

Figure 4.3: Test with constant force disturbances applied, plotted in matlab 2016a

4.2 Power consumption

The power consumption for the whole system consists of two parts, power to the gimbal motor and the motor that drives the flywheel. Power from the gimbal motor are shown in Figure 4.4, 4.5 and 4.6 respectively. Power consumption from the flywheel motor are treated as constant as explained in Chapter 3.3.1. Power used by the flywheel motor for each test can be seen in Table 4.2.

Table 4.2: Flywheel DC motor power

Speed [RPM] Voltage [V] Current [A] Power [W]

3300 20.4 0.45 9,18

3900 23.6 0.60 14.16

4500 27.4 0.70 19.18

5100 31.1 0.85 26.44

5700 35.2 1.00 35.2

(34)

CHAPTER 4. RESULTS

5 6 7 8 9 10 11 12

Time [s]

0 0.5 1 1.5 2 2.5 3 3.5

Power [W]

Power - No disturbances

3300 RPM 3900 RPM 4500 RPM 5100 RPM 5700 RPM

Figure 4.4: Gimbal motor power for test with no disturbances applied, plotted in matlab 2016a

0.5 1 1.5 2 2.5 3

Time [s]

0 2 4 6 8 10 12

Power [W]

Power - Impulse

3300 RPM 3900 RPM 4500 RPM 5100 RPM 5700 RPM

Figure 4.5: Gimbal motor power for test with a short impulse disturbance applied, plotted in matlab 2016a

20

(35)

4.2. POWER CONSUMPTION

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

Time [s]

0 2 4 6 8 10 12 14 16 18

Power [W]

Power - Constant force

3300 RPM 3900 RPM 4500 RPM 5100 RPM 5700 RPM

Figure 4.6: Gimbal motor power for test with constant force disturbances applied, plotted in matlab 2016a

(36)
(37)

Chapter 5

Discussion & Conclusions

5.1 Discussion

5.1.1 The results

The results show that increasing the rotational speed, as could be expected, improves performance. This holds true for all three tests conducted. For the test where no disturbances were applied the improvements are most dramatic for the first increase in rotational speed, while increasing to 5700rpm from 5100 rpm only marginally decreases the balancing error. This could be explained by the proportional part of the PID-controller and the gimbal DC motor being unable to turn the gimbal for voltages below a certain value due to friction. A higher KP

value translates to a stronger reaction to offset from the setpoint, i.e. a higher voltage output to the gimbal DC motor in this case, and since a higher value for KP could be achieved without the system becoming unstable with higher rotational speeds, the voltage output rose above the friction threshold much faster in those cases than the lower rotational speed cases, leading to a faster response.

A different control system which takes the friction into consideration might be able to reduce the differences in performance during these tests. Another explanation might be the fact that as the angular momentum of the flywheel increases with higher rotational speeds, the inherent tendency to keep the current position, as found in gyroscopes even without control systems, increase.

When it comes to the test where a short impulse disturbance was applied the biggest difference is also seen between the 3300rpm and 3900rpm cases. Considering the big offset errors even without disturbances in the 3300rpm case this is unsurprising.

In the higher rotational speed cases the performance improvements regarding rise time, overshoot and settling time could be said to be roughly proportional to the increased rotational speed. There is however quite a performance jump between 5100rpm and 5700rpm where the settling time improves a lot.

(38)

CHAPTER 5. DISCUSSION & CONCLUSIONS One of the biggest reasons why a higher rotational speed, which is synonymous to a increased angular momentum of the flywheel, is desirable when implementing gyro stabilization is the performance increase with regard to longer disturbances in the same direction. This performance increase is highly noticeable when looking at the results from the test with a constant force disturbance.

Considering the differences between power consumption for the different rotational speeds the results implies that the power consumption contribution from the gimbal DC motor is relatively small compared to the contribution from the flywheel motor in all cases. This power consumption difference between the two motors increases with the rotational speed. The gimbal DC motor power consumption was however not negligible; even at 5700rpm it made up for about 20% of the total power consumption in the worst case for the short impulse disturbance tests.

It is although worth noting that depending on the application for a gyro based balancing system the power consumption by the actuator controlling the gimbal might never rise to such large numbers, and even if that is the case the power spikes might not last very long. Thus the power consumption contribution from the flywheel motor should be the most important aspect when optimizing power consumption in an application.

5.1.2 Challenges and considerations

In this study some challenges had to be overcome when implementing the gyro stabilization which might be worth noting for future similar projects. Regarding implementing the control system the most important aspect was filtering the input signal before sending to the controller. In this case this was needed due to the discrete outputs from the potentiometer, but projects utilizing a different kind of sensor will probably need to use some kind of signal processing as well. A good example would be if an inertial measuring unit (IMU) was used instead of a potentiometer; an IMU was originally tested in place of the potentiometer for this study, but discarded in favor of the potentiometer which function is simpler.

In that case the small irregularities and asymmetries in the flywheel and flywheel axle caused vibrations during functioning which the IMU detected and added a great amount of noise to the signal. A low pass filter similar to the one used in this project should be able to solve that problem.

Another challenge arose when the code for measurements was to be implemented.

Printing data to the serial monitor is really slow in the Arduino software, and also when saving to a SD card or similar due to the same command being used in both cases. This lead to the usage of two Arduino Uno units, since the measurement script slowed down the control system code to such a degree that it was rendered useless. This problem is somewhat specific to the Arduino IDE, and the problem was mentioned in Chapter A, but the importance of having this in mind when

24

(39)

5.2. CONCLUSIONS

working with the Arduino IDE and the common usage of Arduino microcontrollers makes this worth noting again.

A property of the demonstrator worth noting is that when the gimbal DC motor is not in active use, the gimbal can rotate freely within the built in +/- 90° limitation.

An upside of this design derived aspect is that some of the inherent properties of a gyroscope is preserved, which might make the demonstrator slightly less suscep- tible to disturbances. This property might however also affect the control system implementation in a negative way if one would want to optimize the control system, since complete control of the gimbal movement is not achieved.

5.2 Conclusions

A higher rotational speed on the flywheel was proven to increase performance in all three tests that were conducted. The performance came however with the cost of higher power consumed by the flywheel DC motor, which in all cases were the biggest source of power consumption. Thus the most important aspects, while developing a gyro based stabilization or balancing implementation where low power consumption and high performance is of importance, is maximizing the flywheel power train efficiency and the flywheel’s rotational speed. Depending on application there might also be a possibility that settling for less than the highest attainable rotational speed gives sufficient performance while also decreasing power consumption.

(40)
(41)

Bibliography

[1] NASA. “NASA - International Space Station Zero-Propellant Maneuver (ZPM) Demonstration”. In: (2016). url: https://www.nasa.gov/mission_

pages/station/research/experiments/274.html (visited on 06/11/2017).

[2] Seakeeper. “Eliminate boat roll”. In: (). url: https://www.seakeeper.com/

(visited on 06/11/2017).

[3] Lit Motors. “C-1 - Lit Motors”. In: (2013). url: http://litmotors.com/c1/

(visited on 06/11/2017).

[4] Maritime Park Association. “Principles of Guided Missiles and Nuclear Weapons”. In: (2013). url: https://maritime.org/doc/missile/part1.

htm(visited on 06/11/2017).

[5] Nicholas C. Townsend et al. “Gyrostabilizer Vehicular Technology”. In:

Applied Mechanics Reviews 64.1 (2011), p. 010801. issn: 0003-6900. doi:

10 . 1115 / 1 . 4004837. url: http : / / appliedmechanicsreviews . asmedigitalcollection.asme.org.focus.lib.kth.se/data/journals/

amread/25940/010801_1.pdf(visited on 06/11/2017).

[6] Hans Johansson. Elektroteknik. 2013th ed. Stockholm: KTH, Institutionen f¨or Maskinkonstruktion, Mekatronik, 2006.

[7] Torkel Glad and Lennart Ljung. Reglerteknik - Grundl¨aggande teori. 4:13.

Lund: Studentlitteratur AB, 2006.

[8] Arduino. “Arduino Motor Shield”. In: (). url: https://www.arduino.cc/

en/Main/ArduinoMotorShieldR3(visited on 06/11/2017).

[9] Edward Ramsden. Hall-Effect Sensors: Theory and Application. 2006.

[10] SparkFun. “ACS712 Low Current Sensor Hookup Guide - learn.sparkfun.com”. In: (). url: https : / / learn . sparkfun . com / tutorials / acs712 - low - current - sensor - hookup - guide ? _ga = 2 . 195027053.1560214655.1495362211- 1647181921.1495362211#hardware- overview(visited on 06/11/2017).

[11] Tony R. Kuphaldt. “Lessons In Electric Circuits – Volume I (DC) - Chapter 6”. In: (). url: http://www.ibiblio.org/kuphaldt/electricCircuits/

DC/DC_6.html(visited on 06/11/2017).

(42)

BIBLIOGRAPHY [12] Hans Bod´en, Kjell Ahlin, and Ulf Carlsson. Applied Signal Analysis. Stock-

holm: KTH Aeronautical and Vehicle Engineering, 2014.

[13] Arduino. “A realtime digital signal processing (DSP) library for Arduino.”

In: (). url: https://playground.arduino.cc/Code/Filters (visited on 06/11/2017).

28

(43)

Appendix A

Arduino Uno schematics

(44)

(ADC5)PC528(ADC4)PC427(ADC3)PC326(ADC2)PC225(ADC1)PC124(ADC0)PC0)23 (SCK)PB519(MISO)PB418(MOSI)PB317(SS)PB216(OC1)PB115(ICP)PB014

(AIN1)PD713(AIN0)PD612(T1)PD511(T0)PD46(INT1)PD35(INT0)PD24(TXD)PD13(RXD)PD02 GND8VCC7 AVCC20AREF21 XTAL19 XTAL210 RESET1

AGND22 123456

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 9 101 2 3 4 5 6

1 1

2 2

33

1234

P$1 P$1P$2

P$2

1 2INOUT34

(AIN0/INT1)PD17 (AIN2/PCINT11)PC25

(CTS/HWB/AIN6/TO/INT7)PD713 (INT4/ICP1/CLK0)PC722

(INT5/AIN3)PD410

(OC0B/INT0)PD06 (OC1A/PCINT8)PC623 (PCINT5)PB519(PCINT6)PB620(PCINT7/OC0A/OC1C)PB721

(PCINT9/OC1B)PC525(PCINT10)PC426 (PD0/MISO/PCINT3)PB317(PDI/MOSI/PCINT2)PB216

(RTS/AIN5/INT6)PD612

(RXD1/AIN1/INT2)PD28 (SCLK/PCINT1)PB115(SS/PCINT0)PB014 (T1/PCINT4)PB418

(TXD1/INT3)PD39 (XCK/AIN4/PCINT12)PD511 AVCC32

D+29D-30 GND3

PAD33 RESET(PC1/DW)24

UCAP27

UGND28 UVCC31 VCC4 XTAL11 XTAL2(PC0)2 123456

21 21

1 8

27 36

4 5

1 8

2 7 3

6

4 5

18 27 36 45

18

27

36 45

1 2

3 4

2 31

6 57

8 4

1 2 3 4

5

IN1

ON/OFF3

NC/FB4 OUT5

GND2 12345678

2 1

(45)

Appendix B

Maxon DC motor

(46)

186

max on DC mot or

M 1:2

148866148867 148877 218008 218009 218010 218011 218012 218013 218014

4.7 K/W 1.9 K/W 41.5 s 809 s -30…+100°C +155°C

0.05 - 0.15 mm 0.025 mm 5.6 N 110 N 1200 N

28 N

1 13

480 g

ESCON Mod. 50/5 417

ESCON 50/5 418

ESCON 70/10 418

EPOS2 24/5 425

EPOS2 50/5 425

EPOS2 70/10 425

EPOS2 P 24/5 428 EPOS4 Module 50/8 431 EPOS4 Comp. 50/8 CAN 431

MAXPOS 50/5 435

12 24 48 48 48 48 48 48 48 48

6920 7580 7590 6420 5560 3330 2690 2130 1720 1420 241 137 68.6 53.7 43.7 21.9 16.6 12.5 9.66 7.76 6380 6940 7000 5810 4930 2710 2060 1510 1080 781

94.9 177 187 186 180 189 190 192 192 190

6 6 3.17 2.66 2.23 1.4 1.13 0.909 0.73 0.6

1720 2420 2560 2040 1620 1020 814 655 523 424 105 80.2 42.4 28.6 19.7 7.43 4.79 3.06 1.97 1.32

88 91 92 91 91 89 89 88 86 85

0.115 0.299 1.13 1.68 2.44 6.46 10 15.7 24.4 36.3 0.024 0.082 0.33 0.46 0.613 1.7 2.62 4.14 6.41 9.32 16.4 30.2 60.3 71.3 82.2 137 170 214 266 321 581 317 158 134 116 69.7 56.2 44.7 35.9 29.8 4.05 3.14 2.97 3.16 3.45 3.29 3.31 3.27 3.29 3.37 5.89 4.67 4.28 4.2 4.19 4.16 4.15 4.15 4.15 4.16

139 142 137 127 116 121 120 121 120 118

Stock program Standard program Special program (on request)

Specifications Operating Range Comments

n [rpm] Continuous operation

In observation of above listed thermal resistance (lines 17 and 18) the maximum permissible winding temperature will be reached during continuous op- eration at 25°C ambient.

= Thermal limit.

Short term operation

The motor may be briefly overloaded (recurring).

Assigned power rating

maxon Modular System Overview on page 20–27

Part Numbers

maxon DC motor April 2016 edition / subject to change

RE 40 ∅40 mm, Graphite Brushes, 150 Watt

Values at nominal voltage

1 Nominal voltage V

2 No load speed rpm

3 No load current mA

4 Nominal speed rpm

5 Nominal torque (max. continuous torque) mNm 6 Nominal current (max. continuous current) A

7 Stall torque mNm

8 Stall current A

9 Max. efficiency %

Characteristics

10 Terminal resistance W

11 Terminal inductance mH

12 Torque constant mNm/A

13 Speed constant rpm/V

14 Speed / torque gradient rpm/mNm

15 Mechanical time constant ms

16 Rotor inertia gcm2

Motor Data

Thermal data

17 Thermal resistance housing-ambient 18 Thermal resistance winding-housing 19 Thermal time constant winding 20 Thermal time constant motor 21 Ambient temperature 22 Max. winding temperature

Mechanical data (ball bearings)

23 Max. speed 12 000 rpm

24 Axial play 25 Radial play

26 Max. axial load (dynamic) 27 Max. force for press fits (static)

(static, shaft supported) 28 Max. radial load, 5 mm from flange

Other specifications 29 Number of pole pairs

30 Number of commutator segments 31 Weight of motor

Values listed in the table are nominal.

Explanation of the figures on page 151.

Option

Preloaded ball bearings

* Industrial version with radial shaft seal ring (resulting in increased no load current).

IP54 protection only if mounted on brush side, in compliance with maxon modular system.

Planetary Gearhead

42 mm 3 - 15 Nm Page 349

Recommended Electronics:

Notes Page 24

Planetary Gearhead

52 mm 4 - 30 Nm Page 354

Brake AB 28 24 VDC 0.4 Nm Page 446 Encoder MR 256 - 1024 CPT, 3 channels Page 393

Encoder HED_ 5540 500 CPT, 3 channels Page 399/402

Industrial Version IP54*

Encoder HEDL 9140 Page 405

Brake AB 28 Page 447 End cap Page 451

1606_DC_motor.indd 186 14.04.16 13:07

(47)

Appendix C

Matlab code

1 %{

Implementing g y r o s c o p i c s t a b i l i z a t i o n

3 Bachelor ’ s t h e s i s in mechatronics at KTH − ITM Simon Fr¨o lander & Andr´e S¨a l l

5 TRITA: MMK 2017:29 MDAB 647

7 Matlab code f o r data p r o c e s s i n g

Reads experiment data from e x c e l s h e e t s and g e n e r a t e s graphs showing

9 potentiometer value and power . Written in Matlab 2016 a

11 %}

13 %% Read data from Excel s h e e t s c l e a r a l l; c l o s e a l l; c l c

15

Test 3300 1 = x l s r e a d (’ TesterTillMatlab ’, ’ 3300−1 ’) ;

17 Test 3300 2 = x l s r e a d (’ TesterTillMatlab ’, ’Ny−3300−2 ’) ;

19 Test 3900 1 = x l s r e a d (’ TesterTillMatlab ’, ’ 3900−1 ’) ; Test 3900 2 = x l s r e a d (’ TesterTillMatlab ’, ’Ny−3900−2 ’) ;

21

Test 4500 1 = x l s r e a d (’ TesterTillMatlab ’, ’ 4500−1 ’) ;

23 Test 4500 2 = x l s r e a d (’ TesterTillMatlab ’, ’Ny−4500−2 ’) ;

25 Test 5100 1 = x l s r e a d (’ TesterTillMatlab ’, ’ 5100−1 ’) ; Test 5100 2 = x l s r e a d (’ TesterTillMatlab ’, ’Ny−5100−2 ’) ;

27

Test 5700 1 = x l s r e a d (’ TesterTillMatlab ’, ’ 5700−1 ’) ;

29 Test 5700 2 = x l s r e a d (’ TesterTillMatlab ’, ’Ny−5700−2 ’) ;

31 %% S p l i t matrices i n t o v e c t o r s

33 % 3300 RPM Impuls

Current 3300 1 = Test 3300 1 ( : , 1 ) ;

35 RPM 3300 1 = Test 3300 1 ( : , 2 ) ; Pot 3300 1 = Test 3300 1 ( : , 3 ) ;

37 Voltage 3300 1 = Test 3300 1 ( : , 4 ) ;

References

Related documents

90 dagar Facebook Ja, du kan välja att motsätta dig cookies för riktad annonsering vid ditt första besök på svenskaspel.se med en ”ny” webbläsare. Om du i efterhand

* Min studierätt har tidigare indragits på grund av min hälsa eller för att jag har äventyrat andra personers säkerhet nej ja. * Jag har hälsofaktorer som kan vara

K analýze dat byl z obou zařízení vybrán pro každou polohu jeden graf, který bude porovnáván s odpovídajícím grafem z druhého zařízení. Učinilo se tak

Äldre personer som vårdas på sjukhus på grund av akut sjukdom löper ökad risk för försämrad funktionell status.. Studier indikerar att träning under sjukhusvistelsen kan

Hlavním cílem této části je ověřit přesnost simulace splývavého chování oděvu na virtuální figuríně v počítačovém programu VStitcher za pomoci zařízení

Risken för framtida havsytehöjning bedöms inte utgöra något hot mot området då den befintliga bebyggelsen ligger som lägst på +4 meter och markområden för ny

a) Först vill man undersöka om data från de 7 patienterna stöder vår misstanke att medicinen sänker salivproduktionen Ställ upp lämpliga hypoteser. b) Beräkna medelvärdet

With TRUE, the function block has been started, distance-to-go pending Active BOOL FALSE Display of the command activity in the function block. With TRUE, the command is