ArmandMollaGarciaTFG v5
ArmandMollaGarciaTFG v5
ArmandMollaGarciaTFG v5
In partial fulfilment
of the requirements for the degree in
ELECTRONIC SYSTEMS ENGINEERING
Standardized CubeSats, with a mass between 1 and 10 Kg, and a volume defined by the
number of 10x10x10 cm3 cubic units that implement it, need compact and effective attitude
determination and control systems. For fast maneuvers, a reaction wheels system is the best
option. In the near future, University’s own CubeSat program with 3 Cat3 mission, aims to
use this subsystem. The objective of this thesis is to continue developing this attitude control
system implementing the control algorithms for controlling the motors. Most of the development
has been carried out using a test board from Texas Instruments before experimenting with
the final hardware. The boards which control the motors in the satellite are based on the
development board and the motors, from Maxon motors, are special for being able to work in
vacuum conditions. A control system with speed feedback from Hall effect sensors and current
sensors has been developed. FOC has been the algorithm used, with the aim of achieving a
smooth and precise performance. All the results have been obtained evaluating the motors’
behaviour under speed and acceleration tests. All motors and boards have been tested under
the same conditions to simulate slow speed variations, similar to the ones necessary to make
the satellite rotate in space.
i
Resumen
Los CubeSats estandarizados, con una masa de entre 1 y 10 Kg, y un volumen definido por el
número de unidades cúbicas de 10x10x10 cm3 que lo forman, necesitan sistemas de control y
determinación de actitud compactos y efectivos. Para maniobras rápidas, un sistema basado
en Reaction Wheels es la mejor opción. En el futuro, el programa de CubeSats propio de la
universidad, con la misión 3 Cat-3, pretende usar este subsistema. El objetivo de esta tesis
es continuar con el desarrollo de este sistema de control de actitud implementando los algo-
ritmos necesarios para controlar los motores. Gran parte del desarrollo se ha llevado a cabo
usando una placa de desarrollo de Texas Instruments, antes de experimentar con el hardware
definitivo. Las placas que controlan los motores en el satélite están basadas en la placa de
desarrollo y, los motores, de Maxon motors, son especı́ficos para poder funcionar en el vacı́o.
Un sistema de control con realimentación de la velocidad calculada usando sondas Hall y sen-
sores de corriente ha sido desarrollado. Se ha utilizado el algoritmo denominado FOC para
lograr una mayor suavidad y precisión de funcionamiento. Todos los resultados se han obtenido
evaluando el comportamiento de los motores bajo test de velocidad y aceleración. Todos los
motores y placas se han testeado bajo las mismas condiciones para simular variaciones lentas
de velocidad, similares a las necesarias para hacer rotar el satélite en el espacio.
ii
Resum
Els CubeSats estandarditzats, amb una massa d’entre 1 i 10 Kg, i un volum definit pel nombre
d’unitats cúbiques de 10x10x10 cm3 que el formen, necessiten sistemes de control i determi-
nació d’actitud compactes i eficaços. Per maniobres ràpides, un sistema basat en Reaction
Wheels és la millor opció. En el futur, el programa de CubeSats propi de la universitat, amb
la missió 3 Cat-3, pretén utilitzar aquest subsistema. L’objectiu d’aquest tesi és continuar amb
el desenvolupament d’aquest sistema de control d’actitud implementant els algorismes nec-
essaris per controlar els motors. Gran part del desenvolupament s’ha dut a terme utilitzant
una placa de desenvolupament de Texas Instruments, abans d’experimentar amb el hardware
definitiu. Les plaques que controlen els motors en el satèl•lit estan basades en la placa de
desenvolupament i, els motors, de Maxon motors, són especı́fics per poder funcionar en el
buit. Un sistema de control amb realimentació de la velocitat calculada utilitzant sondes Hall i
sensors de corrent ha estat desenvolupat. S’ha utilitzat l’algorisme denominat FOC per acon-
seguir una major suavitat i precisió de funcionament. Tots els resultats s’han obtingut avaluant
el comportament dels motors sota tests de velocitat i acceleració. Tots els motors i plaques
s’han testejat sota les mateixes condicions per simular variacions lentes de velocitat, similars
a les necessàries per fer rotar el satèl•lit a l’espai.
iii
To everyone who has supported me along this process.
iv
Acknowledgements
I am very grateful for the opportunity I have been given to work in the 3 Cat-3 project in the
NanoSat Lab. I want to thank my advisor Professor Adriano José Camps Carmona and all the
laboratory members. Specially for the wide knowledge I have achieved and the challenging
experience that has made me give my best.
Special thanks to former students Mr. Albert Bolet and Mr. Jordi Macià for their invaluable
help and advice regarding the Reaction Wheels system they started developing.
Finally, thanks to all the 3 Cat team members for their support when any difficulty came up
and, of course, for the great working atmosphere in the NanoSat Lab.
Revision history and approval record
Written by: Armand Mollà Garcia Reviewed by: Adriano Camps Carmona
Date 16/05/2016 Date 26/06/2016
Name Armand Mollà Garcia Name Adriano José Camps Carmona
Position Project Author Position Project Advisor
vi
Contents
List of Figures ix
List of Tables xi
List of Acronyms xi
1 Introduction 1
vii
4 Results 23
4.1 Development kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1.1 Kit parameters identification . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1.2 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2 Satellite motors and PCBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2.1 Maxon motors’ parameters identification . . . . . . . . . . . . . . . . . . . 25
4.2.2 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5 Budget 29
Bibliography 32
B PCBs schematics 39
B.1 Motor PCBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
B.2 FTDI board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
C Scilab code 43
D F28069M Code 45
D.1 MAIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
D.1.1 main.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
D.1.2 main.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
D.2 user.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
D.3 hal.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
E Results Complement 68
E.1 Inertia units transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
E.2 Inertia histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
viii
List of Figures
3.1 Block diagram of the entire Attitude Determination and Control System (ADCS)
system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Serial Peripheral Interface (SPI) link between motor control boards and Mas-
terboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 Variation of the angular velocity of the Reaction Wheels (RW) starting at 0 rpm
-simulated with Matlab by Aleix Calderón in his degree thesis-. . . . . . . . . . 14
3.4 Development DRV8312-C2-KIT by Texas Instruments [6] . . . . . . . . . . . . . 16
3.5 Final Printed Circuit Board (PCB) design (a) and the dimensions reduction it
supposed (b) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.6 Maxon EC32 Flat, the flywheel currently used and a flywheel design proposal . 17
3.7 Preliminary RW system design . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.8 Flow diagram of the software’s functioning mechanism . . . . . . . . . . . . . . 19
3.9 Connections done to simulate a low resolution encoder . . . . . . . . . . . . . . 20
3.10 Hardware modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.11 Different speed (top) and acceleration (middle) references and the motor’s
speed evolution (bottom). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
ix
4.4 Speed variations with different successive positive and negative accelerations . 26
4.5 Speed variation from 2000 Revolutions Per Minute (RPM)s to 100 RPMs and
fixed speed zoomed areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.6 Speed variation from -1000 to 1000 RPMs and the central area zoomed. . . . . 28
x
List of Tables
xi
Acronyms list
xii
Chapter 1
Introduction
The ADCS in a satellite is crucial to guarantee a proper orientation towards a defined target.
A wide range of payloads and subsystems have this requirement, e.g. Earth remote sensors,
communication systems, solar panels orientation and camera pointing.
This system can be divided in two: attitude determination and attitude control, which need
to work perfectly together.
1. Attitude determination is the part in charge of acknowledging the satellites orientation with
a given coordinate system, it is the sensing part of the system. Some sensors typically
used are gyroscopes, accelerometers, Sun sensors, Earth sensors and star trackers.
2. Attitude control is the block of actuators that allow the satellite to change its attitude using
the feedback from the sensors. Depending on the end application and payloads require-
ments, the actuators are selected as all of them have pros and cons. When high pointing
accuracy is required as in 3 Cat-3 (medium resolution camera), three-axes active stabi-
lization and star trackers is the selected scheme. In 3 Cat-2, the payload is an antenna
and the actuators are magnetorquers.
The 3 Cat-3 satellite is a 6 unit nano-satellite currently being developed at the Universitat
Politècnica de Catalunya (UPC) NanoSat Lab for an Earth observation mission supported by
the Institut Cartogràfic i Geològic de Catalunya and the Institute of Space Studies of Catalunya.
The payload consists of a powerful camera that needs precise pointing, which leads us to
pursue an accurate ADCS with magnetorquers and RW.
3 Cat-1 and 3 Cat-2 are the two previous missions developed at the UPC NanoSat Lab. Both
projects have met an end and will be launched on July 2016. These satellites do not have a
RW subsystem, they only include magnetorquers as the requirements for both missions have
not made it mandatory. As a faster manoeuvring of the satellite is desired for 3 Cat-3, the RW
are a must.
The purpose of this thesis is to implement and test the control software of the RW brushless
DC motors assuring the subsystem fulfils the requirements to guarantee a proper operation
when having to interact with the magnetorquers and the attitude determination systems. The
inclusion of RW is going to be one of the major improvements in the 3 Cat-3 CubeSat.
A huge work had been previously done by former degree thesis students and the hardware
1
of the RW and its configuration was already established. Albert Bolet and Jordi Macià were in
charge of starting the development and designing the hardware respectively.
The remaining part to complete the subsystem was the accurate control of the motor’s
torque and speed as the system is based on the Angular Momentum Conservation principle,
which states that the total angular momentum of a system is constant – if no external torque is
applied -.
The design developed in this degree thesis needs to fulfil the requirements listed below.
Project Requirements
• Constant speed feedback in order to constantly supervise the motor behaviour and cor-
rect the possible errors with celerity. The control loop needs to run at least at 1000 Hz.
• Speed sensing using current sensors as well as Hall effect sensors for redundancy pur-
poses. The maximum relative error needs to be as low as possible, a 5% relative error is
acceptable.
• Smooth speed change -acceleration- as it is directly related to the torque given by the
motor and the flywheel, which is the most important parameter to control. The changes
between different acceleration commands need to be instantaneous.
• Use of Maxon EC32 flat motors and the hardware designed by Jordi Macià with its MCU
and motor driver while correctly identifying all the parameters needed.
• Follow the system configuration initially defined by Albert Bolet in his degree thesis, where
a masterboard gives torque orders to the motors according to calculations with the attitude
determination data and what the satellite is wanted to do.
The idea at the beginning of the project was to develop the motor control, redesign the
masterboard -which decides the torques needed from each motor through specific algorithms-
and start implementing some these algorithms. The motor control has actually occupied most
of the time, and the development of the algorithms for the attitude control has now become
part of another student‘s degree thesis. Redesigning the masterboard as a reduced size PCB,
was left apart as it was decided that a much versatile ADCS masterboard should be designed,
which is a much more complex task.
During the project development, a continuous supervision of the project advisor, Professor
Adriano José Camps has been performed. Also, three specific meetings have been done to
check the project development status. Detailed work plan, tasks, milestones and Gantt diagram
can be found in the Critical Design Review document attached in Appendix A.
2
Chapter 2
One of the main problems of CubeSat nanosatellites is the attitude control, which is mainly
done using a passive control - magnets - or magnetorquers - coils - because they are cheap
and have low consumption. If the CubeSat mission requires a quick attitude maneuver, these
systems cannot provide enough torque to rotate the spacecraft quickly. For that reason, some
universities and also companies have developed or are developing RW systems. Some com-
panies (e.g. Clyde Space, Blue Canyon Technologies, Maryland Aerospace...) sell finished
systems at very high prices, and that is the reason why some universities opt to build them
themselves.
Figure 2.1: Maryland Aerospace ADCS module including RW with a price of 25.000 US dollars [1]
Thrusters are also common actuators when high torques are required over short periods of
time. They can be easily implemented, but they require fuel and their life is limited.
To build a RW system, normally four wheels are used in order to have a redundant one,
but in a CubeSat, where volume is an important restriction, three wheels -one per each of the
three dimensions- are enough. The motors used, due to its high efficiency and cleanness, are
BrushLess Direct Current (BLDC) motors. In addition, they must be prepared to work in vacuum
conditions and need Braycode vacuum greases. The sensors used for the speed feedback can
be either Hall effect sensors or quadrature encoders.
3 Cat-3 mission is going to use this technology because the performance required is crucial.
It will also be the first UPC nanosat lab test of their new attitude control system. Our RW system
is not still optimized neither in power consumption nor in volume, and it occupies almost one
3
unit of a CubeSat. The masterboard has not yet been integrated with the system.
The BLDC motor is an Alternating Current (AC) synchronous motor with permanent magnets
on the rotor -moving part-, and windings on the stator -fixed part-. Permanent magnets create
the rotor flux and the energized stator windings create electromagnet poles. The rotor is at-
tracted by the energized stator phase. By using the appropriate sequence to supply the stator
phases, a rotation is induced to the rotor as it chases after the electromagnet poles. This is the
fundamental action used in synchronous permanent magnet motor.
Figure 2.3: A three-phase synchronous motor with a one permanent magnet pair pole rotor [2]
On the stator side, three-phase motors are the most common ones. These offer a good
compromise between precise control and the complexity of the power electronics required to
control the three stator currents. The more poles in the rotor, the more precise its control will
be, but the manufacturing costs raise and there is also a point where the torque no longer
increases.
4
BLDC motors are one of the two types of permanent magnet synchronous motors and the
one we have particular interest in. Its differential characteristic is that it is fed with direct Pulse
Width Modulation (PWM) currents signals through a three phase inverter, not with sinusoidal
currents. As a consequence, its control becomes simpler. Fig. 2.4 shows the scheme of the
inverter.
One of the most common, cheap, easy-to-use, and available sensors used are the Hall effect
sensors [7]. Normally with three of them it is possible to calculate relatively well the speed of
the motor -when more precision is needed, the sensors used are encoders, which can detect
thousands of different positions in a single rotation-. Its behaviour is easy to understand and it
can be observed in Fig. 2.5.
The Hall sensors generate a pulse every time the rotor passes in front of them and the
number of pole pairs of the motor corresponds to the number of pulses generated by each
sensor in one complete rotation of the motor. In our case, both the motor Nema 17 [F] from
5
the Texas Instruments kit and the MaxonEC32flat [G] enclose three Hall sensors and have four
pole pairs.
In a closed-loop control of a motor, the speed calculation is done indirectly if only current
sensors are used. That means that irregularities in the currents due to undesired inductions or
unknown sources can vary this measurement. As a consequence, the control feedback could
have a bias or even state the motor is spinning when it is actually stopped. As a satellite’s
hardware cannot be modified once it is launched, and these phenomenons can not be avoided,
direct measure sensors are needed.
When working with three phase motors, there is a mathematical background which is used in
various control schemes [8]. Some transforms are performed in order to have a simpler system
of variables, and to be able to easily control the motor’s behaviour, in this particular case, the
motor’s torque. This is the case of the Field Oriented Control (FOC) control algorithm.
The electric torque of an AC induction motor can be described by the interaction between
the rotor currents and the flux wave resulting from the stator currents induction.
The Clarke transform uses the three-phase currents ia , ib and ic to calculate currents in the
two-phase orthogonal stator axis: iα and iβ . These two currents in the fixed coordinate plane
are transformed to the isd and isq currents components in the d,q rotating reference frame with
the Park transform. See Fig. 2.6 for a better understanding of the frames transformations.
Currents isd , isq and the instantaneous flux angle ρ, calculated by the motor flux model, are
used to calculate the electric torque of an AC induction motor.
The Clarke transform converts the three-phase system into a two-phase orthogonal system,
its mathematical description is the following:
2 2
iα = · ia − (ib − ic ), (2.1)
3 3
2
iβ = √ (ib − ic ), (2.2)
3
2
io = (ia + ib + ic ), (2.3)
3
where iα and iβ are the components in an orthogonal reference frame and io is the homopo-
lar component of the system. Considering the particular case with iα superposed with ia and
ia + ib + ic = 0, the transformation can be done as:
iα = ia , (2.4)
1 2
iβ = √ ia + √ ib , (2.5)
3 3
ia + ib + ic = 0. (2.6)
6
The Park transform rotates the previous frame representation over an angle θ according to
the formulas:
The inverse Park and Clarke transforms are also used. Reversing the process, the formulas
are the following:
ia = iα , (2.11)
√
1 3
ib = − iα + iβ , (2.12)
2 √2
1 3
ib = − iα − iβ . (2.13)
2 2
These mathematics are already pre-implemented in the F28069M MCU, as well as Proportional
Integrative Derivative (PID) controllers and other functionalities. This lets the user benefiting
from it by connecting the different blocks but not having to build them from scratch.
There are different ways to achieve the desired results when talking about a motor’s perfor-
mance. The implementation of the control is important depending on the target behaviour.
For this project, with Texas Instruments’ hardware and software used, some options with pre-
implemented methods have been useful. Various techniques have been implemented although
only one has met the specifications.
7
2.4.1 PID controllers
The first attempt to control the motors was done with the simplest algorithm: a speed PID
controller, and a current PID controller. They were tested separately and finally, combined
together.
The control had a speed feedback from three Hall effect sensors. Fig. 2.7 shows the block
diagram of a PI speed controller. Note that this configuration does not integrate the Clarke and
Park transform modules, as it does not use them.
Figure 2.7: Block diagram for a closed speed loop with PI controller [2]
With the feedback from the sensors and a reference set by the user, the software controls
six PWM which drive the motor’s phases through the three phase inverter.
In the case of a current controller, the scheme is the same, but the feedback is performed
using the current sensors of each phase. When these feedbacks are put together, both the
current and the rate of change of the PWM signals can be changed, and the speed and torque
can be controlled.
Due to poor support from the developer -Texas Instruments- and limited knowledge, the mo-
tor did not have a soft behaviour and the acceleration -torque- could not be controlled precisely
when the two controllers were put together. With the availability of other control techniques, it
was left apart.
FOC (or vector control) is a more advanced method which uses the Park and Clarke transforms
previously described, converting the three-phase static reference frame of the stator windings,
to the two axes rotating reference frame. [4] This is previously done to the signals being pro-
cessed by the PI controllers. It allows the controller to operate on the resulting vector of the
three phase currents rather than controlling each phase independently. The result is a smoother
8
and accurate control and the elimination of torque ripple.
The electrical study of the Direct Current (DC) motor shows that the torque produced and
the flux can be independently used. The strength of the field excitation sets the value of the
flux. The key point here is that the windings are managed to keep the flux produced by the
rotor windings orthogonal to the stator field. Then generating a near optimal torque all the time.
According to the electromagnetic laws, the torque produced in the synchronous machine is
equal to vector cross product of the two existing magnetic fields:
~ stator × B
Tem = B ~ rotor , (2.14)
This expression shows that the torque is maximum if the stator and the rotor magnetic fields
are orthogonal. If this condition is ensured all the time, the torque ripple is reduced and a better
dynamic response is obtained. Torque variations increase when the orthogonality is lost.
With decoupled control of the magnetization, the torque producing component of the stator
flux can now be thought of as an independent torque control. To decouple the torque and flux, it
is necessary to use several mathematical transforms, and this is where the microcontrollers add
the most value. With the MCU used in this project, these mathematics are pre-implemented.
This control was also implemented in the RW system and it was able to control speed
and acceleration of the motors, nevertheless, this was accomplished exclusively using current
sensors, and making an estimation of the speed. Hall effect sensors needed to be integrated
with this control to close the feedback loop. Again, due to poor support from the manufacturer
-Texas Instruments- and the complexity of the pre-implemented control software, the integration
of the sensors was not possible.
9
InstaSPIN-MOTIONT M
InstaSPIN-MOTION [5] is the commercial name of a variation of the FOC control, which adds
some possibilities and some improved performance. The possibility of easier integration for
Hall effect sensors has been one of the strong reasons for using it. The kernel of the algorithm
is the same, based on the Clarke and Park transforms. The overview of the complete control
block diagram can be seen in Fig. 2.9.
Figure 2.9: Insta-SPIN MOTION Control with Mechanical Sensor and and FAST Software Sensor [5]
Note that this block diagram is more complex than the two ones previously seen. This
control has the benefits from the FOC, and it achieves even a better adjusting process and
performance. It also allows the use of Hall effect sensors or an encoder -Enhanced Quadrature
Encoder Pulse (QEP) module in the diagram-. The combination of a sensorless and a sensored
control is explained in section 3.4.
Insta-SPIN MOTION has the benefits of using is the Flux Angle Speed Torque (FAST) uni-
fied observer and the SpinTAC. The observer is a block that measures the rotor flux -magnitude,
angle, and speed- as well as the shaft torque in a sensorless FOC system. It provides exhaus-
tive information using the current sensors to have the best sensorless control possible. In ad-
dition, its output angular speed can be easily toggled by the calculation from the speed sensor
-Hall effect sensors or encoder-. SpinTAC ensures optimal performance across dynamic speed
and position ranges, it simplifies the references setting and parameters adjustment stages.
SpinTAC Move generates a profile based on starting velocity or position, desired velocity or
position, and configured system limitations for acceleration and jerk. Jerk represents the rate
of change of acceleration. A larger jerk will increase the acceleration at a faster rate. This can
be configured as desired when having to develop the control algorithms.
Controlling more precisely the torque applied at any instant ensures a better stability of the
10
speed and acceleration. A graph comparing the response of the SpinTAC controller versus a
simple PI controller is shown in Fig. 2.10, as well as the different configurations of SpinTAC in
Fig. 2.11
The S-curve follows a particular mathematical expression which allows to know exactly how
these variations are made. It is called Sigmoid Curve [9] and it is used to model phenomenons
in a wide range of different fields. Its expression and shape are:
1
S(t) = (2.15)
1 + e−t
Although FAST unified observer is a tool used for sensorless control, it has been useful
for the project development and for the final software implementation. The real benefit of this
control has been an easier integration of the Hall effect sensors.
11
Chapter 3
The actions to be taken by the actuators and the hardware used are described in this chapter.
Both are responsible for the requirements and limitations of the project. The development of
the project will also be explained, with the hardware modifications proposed, and the software
developed for the motor controllers.
It is important to understand what is going to be around the RW system when having to develop
it. How is it going to be used is also crucial to know to fulfil the requirements. This section will
discuss the functioning of the RW system and its interaction with other parts of the satellite.
Starting from a general point of view and, afterwards, talking about its direct relationship with
the magnetorquers.
The RW system is part of a more complex and important part of the satellite, the ADCS, which
encompasses many elements. An overview of the different elements and relationships between
them is made in this section. The block diagram in Fig. 3.1 shows the elements present in the
ADCS system.
The elements in the diagram can be classified in tow groups: the sensors and the actuators.
RW are one of the actuators, together with the magnetorquers. Some of the sensors are still in
development with the aim of having them all ready for the 3 Cat-3 mission.
To make all the parts work together, there is going to be a ”Brain” -an MCU- which is going
to control all the elements and actions performed. It will be in charge of receiving the attitude
commands and, from the information gathered by the sensors, and the torques introduced by
the actuators, give the satellite the right orientation.
12
Figure 3.1: Block diagram of the entire ADCS system.
The ADCS algorithms are complex and become even more difficult to manage when having
to relate the attitude determination system to the control one as any phenomena need to be
taken into account. The controller in charge of the attitude needs to be capable to assume all
this work. It has to make complex mathematics calculus, be able to implement modules such
as PIDs or PWMs and communicate through different interfaces like SPI or Inter-Integrated
Circuit (I2C). Until now, the MCU used has been a STM32F429 Microcontroller embedded in
the Discovery kit from STMicroelectronics [10].
At the beginning of this thesis, one of the tasks was to redesign the Discovery board to make
it fit into the nanosatellite as it would be the final masterboard used. However, it was left apart
because of various limitations. Together with other members of the laboratory, the decision
was that a new board should be built from scratch. This new board would not be based on
the Discovery kit, but following the CubeSat standard which would include connections and
interfaces for all the sensors and actuators needed. The MCU would also be replaced by a
lower power consumer one and with similar computing capabilities. Regarding all that, the task
became more complex and, perhaps, part of a future project or thesis about ADCS integration.
For the particular case of the RW, the communication with the Masterboard is achieved via
SPI. This bus was chosen by Albert Bolet in his thesis as it is easily configurable and both, the
STM32F429 and the TMSF28069M MCUs supported it. The motor controllers give speed and
acceleration information to the Masterboard and it calculates the error by comparing them to the
reference values calculated, and gives new orders. Each of the three driver boards is identified
by a chip select signal which determines which of them is communicating to the Masterboard.
This part was implemented by Jordi Macià during his bachelor thesis as he was in charge of
upgrading the hardware to a 3-axes system. Fig. 3.2 shows the configuration of the SPI link.
13
Figure 3.2: SPI link between motor control boards and Masterboard
The RW have to be used in a particular way so as to make the system stable, ensure a secure
operation not damaging other parts and respecting the physic analyses. For 3 Cat-3, reaction
wheels are chosen in front of momentum wheels. Using the same hardware, the difference is
found in its operation [11]. A reaction wheel is spun up or down to create the torque and force
the vehicle to rotate. A momentum wheel is always spinning at a very high speed and that
creates a stabilization of the spacecraft, making it resistant to changing its attitude. Several
problems caused by the momentum bias generated by moving parts rotating at high speeds
appeared in the analysis and the option of momentum wheels was dismissed. This gives some
freedom to the motor control, as it does not have to work at high speeds.
As well as having to change the satellites attitude towards a desired reference, the system
will also have to compensate disturbance torques at every moment and also make the space-
craft rotate at the same rate as it does around the Earth to preserve the nadir pointing. This
means that each wheel has to periodically accelerate and decelerate in a sinusoidal manner
to keep the angular momentum constant in the inertial reference frame as the satellite rotates
around the Earth. The disturbance torques cause an increase of the amplitude of this sinusoid,
which will be discussed later. Fig. 3.3 shows this behaviour along two orbits, having as the
initial pointing the commanded one and without initial angular velocity of the satellite.
Figure 3.3: Variation of the angular velocity of the RW starting at 0 rpm -simulated with Matlab by Aleix
Calderón in his degree thesis-.
14
3.1.2.2 Momentum unloading
Disturbance torques are not periodic and, as a result of this, RW need to be constantly applying
torque to compensate for attitude perturbations. This was seen in the previous section, where
the sinusoidal form of the wheels’ speed tended to increase without limit.
It is crucial to solve this problem as otherwise, once wheels have been accelerated to their
maximum angular velocity, they would not be able to produce torque in that direction any more.
To reduce the angular velocity of the RW while maintaining the attitude, known as momen-
tum unloading or desaturation, an external torque is needed. For spacecraft in Low Earth
Orbit (LEO) such as the 3 Cat-3, magnetorquers are the most common actuator to provide this
external torque.
The magnetorquers apply a torque by generating a magnetic dipole moment proportional
to the error of the angular momentum:
~ = Kdesat L~e × B,
M ~ (3.1)
where Kdesat is a proportionality constant and L~e , the angular momentum error, is the differ-
ence between the commanded angular momentum and the current one. This dipole momentum
interacts with the Earth’s magnetic field to cause a torque
For the RW control algorithm, nothing has to be changed at all. As soon as the magnetor-
quers apply the desaturation torques, the RW act in the opposite direction, keeping the attitude
steady while adjusting their angular velocity. When implementing the control algorithm, the
speed of the RW does not have to go below 200 RPM, which is enough to avoid momentum
bias inaccuracy.
The hardware used for the development has consisted on a specific kit provided by Texas
Instruments to experiment with three phase motors. It was chosen by Albert Bolet, the former
student who started the design of the RW system. Its different parts are briefly described in
this section.
Texas Instruments F28069M [12] is the chosen MCU to control the motors - one dedicated
MCU for each motor because many of General Purpose Input/Output (GPIO) and Analog to
Digital Converter (ADC) are needed for sensing and controlling -. This MCU is provided by
Texas Instruments, and it is specifically designed to work with BLDC motors. The main reasons
for choosing this MCU are that a lot of pre-implemented functions, examples and libraries are
15
Figure 3.4: Development DRV8312-C2-KIT by Texas Instruments [6]
available -e.g. PID, Parke and Clark Transforms, PWM, current sensing-. In addition, it allows
to work with a Quadrature Encoder, which is not exactly what has been used, but it has helped
to the inclusion of a mechanical sensor, making the speed direct measure possible.
This Texas Instruments Integrated Circuit (IC) [13], is a triple half-H bridge driver, and it is
intended to drive a three-phase motor. It provides total control of each individual half-H bridge
- total torque, acceleration and speed control -. The IC has three different pins for each phase,
and three extra pins to control the whole motor. For each phase we can find two pins to drive
the phase, and another to sense the current flowing trough the phase - very useful for FOC.
The BLY17 [14] is the motor used for experimentation, the one provided in the Texas Instru-
ments development kit. Its manufacturer is Anaheim and the specifications can be found in
Appendix F. A NEMA 17 stepper motor is a stepper motor with a 1.7 x 1.7 inch faceplate. It is
provided with the Hall effect sensors needed for the control desired.
This motor is very different from the ones used in the final design of the RW system but, via
software, it has been possible to identify various motor parameters which has made the control
of different motors simpler. The basis of the control algorithm are the same and the voltages
and currents to be given to the motor only needed to be scaled to work appropriately.
Apart from the mentioned components used for the development of the control, there is a
hardware which is going to be present in the satellite layout. It performs exactly the same
actions and it has the same components, but in a format that fits in a CubeSat -the requirement
is to fit into one unit of 10x10x10 cm3 - and working under specific conditions.
16
3.3.1 Motor controllers PCBs
The development board used in the project had large dimensions and also was oversized in
amount of connections and features to allow the user experiment under different situations.
Once the RW control application was defined, the parts of the board needed could be selected
to delete the rest. With that, the possibility of building a PCB which could fit in the satellite
appeared. Jordi Macià‘s bachelor thesis consisted of building this board (Fig. 3.5).
Figure 3.5: Final PCB design (a) and the dimensions reduction it supposed (b)
There was a very intense work on designing it and, of course, soldering all the components
correctly, and finally making it function properly.
The EC 32 Flat motors [15] manufactured by Maxon are lubricated with Braycote grease to
be able to work in vacuum. They were chosen by the author of this thesis and Albert Bolet
during the Advanced Engineering Project (AEP) subject one year before the creation of this
document. They are three phase BLDC motors and include Hall effect sensors. Furthermore,
despite being a reduced size motor (diameter of 32 mm) they can provide a large torque (25.1
mN·m). The datasheet and the complete drawings are attached in Appendix G.
To give the system an additional amount of inertia, flywheels had to be attached to the
motors. The ideal flywheel has low mass and high inertia. The current design was done by the
previous student working on the RW and it still needs to be improved. In Fig. 3.6 the current
design and an ideal one, proposed by Aleix Calderón, are shown.
(a) Current flywheel (b) Current flywheel (c) Ideal flywheel de-
sign
Figure 3.6: Maxon EC32 Flat, the flywheel currently used and a flywheel design proposal
17
3.3.3 Hardware general configuration
In his bachelor science thesis, Jordi Macià proposed a configuration to fit the reaction wheels
and their controllers in a 1U cube of the satellite -3 Cat-3 is going to be a 6U satellite-. Fig. 3.7
shows this preliminary design.
The three boards are mounted as a stack and fit perfectly in a 1U. Once mounted, they all
can be programmed at the same time with the SPI bus connected to the top board. The size of
the motors and boards did not make it possible to mount all of them on the same level and use
only a half of the 1U volume.
The supporting parts of the motors were built using a 3D printer and are not the ones for
the space borne version, as this material degrades with time and vibration. They could also be
redesigned in order to occupy less space. In addition, the design has spots of volume unused,
what means it still has to be optimized. The ideal final design would include the reaction wheels,
the magnetorquers and the ADCS masterboard all inside a 1U module. Something ambitious,
but achievable.
This final section of the Development chapter is dedicated to the explanation of the final control
software, how the motors’ control has been achieved and the use of the Hall sensors.
As seen in the previous chapter, the control finally used is based on the FOC algorithm
and with the added functionalities available with instaSPIN-MOTION as it also allowed the use
of Hall sensors. However, the control using the Hall sensors at all angular speeds was not
possible. Some problems came up with the motor initial spin-up. To make it work the rotor had
to be forced manually, something which is impractical.
To bypass this issue the idea of mixing two controls came up and became the final solution
indeed. A sensorless control has been used to spin-up the motor and, after a certain number of
RPMs, a flag enables the control change and the Hall effect sensors start doing their function,
as pointed out in section 2.4.2.
When this point is reached, unless the motors need to be stopped for a long time, the open-
loop control never has to be used again. Even if the motor’s rotation has to change its direction,
18
the closed-loop control is able to provide this behaviour. Because of that, the open-loop spin-up
is not critical for the satellite, the only need is to have the motors spinning. In the case some
disturbance appears when starting the motors due to problematic current lectures, this will be
gradually cancelled out. Although, it will not be difficult to balance as the control toggle is set at
100 RPM and there is not enough time to produce fatal disturbances. The flow diagram in Fig.
3.8 shows how the combination of the two controls works.
Note that there are various stages before starting the motor control: the Hardware Abstrac-
tion Layer (HAL) module contains the configuration of the MCU’s pins and must be one of the
first stages. User.h provides the information of the system, such as the motor and board pa-
rameters, and all the definitions that determine the software’s functioning. Finally, modules like
the ADC converters, QEP module and the timers used have to be enabled and linked to com-
plement the HAL initializations. SystemFlag is a binary flag that determines when to start the
control sequence and can also stop it whenever it is needed. The stator resistance is recalcu-
lated instead of being defined in the user.h file because it is easy, and does not need to move
the rotor. The only con is that it takes a few seconds, but it is not critical.
This software has been developed with the Texas Instruments kit and, afterwards, tested
with the ADCS hardware prototype. The solution finally implemented has come after several
failed attempts -only using PID modules, and different closed-loop controls combinations-.
The closed-loop solution has become more complicated to achieve than expected as the
hardware and software from Texas Instruments is not ready to handle Hall effect sensors. Its
mechanical sensor solution is a quadrature encoder -which can provide thousands of different
positions per each spin of the rotor-, and the pre-implemented software solutions are difficult to
modify. Our own boards to control the motors, although they are self-built, they are still based
on the development board design, therefore they perform the same way and support the same
software.
19
The solution has been to use the Hall effect sensors as if they were a low resolution encoder,
then, entering their signals through the QEP module of the microcontroller. This is the reason
for the modifications explained in Section 3.4.2. The signals expected from an encoder have
been simulated connecting two Hall sensors to the A and B inputs -as they are only used to
count the pulses- and the third input -the index signal- could be replaced by software processing
as it is used to reset a counter. Fig. 3.9 compares the Hall sensors signals with the ones
expected from an encoder.
The remaining task, regarding the software part, is the implementation of the SPI communi-
cation -joining the work performed by Albert Bolet and Jordi Macià with the software developed
in this bachelor’s science thesis-.
Due to the need of using the QEP module of the MCU, the motor controller PCBs have been
modified. A beta version of the boards was previously tried in order not to damage the final
ones, but it was unsuccessful and the experimentation had to be done directly with the last
design of the PCBs. As a consequence, modifications in the conditioning part of the Hall effect
sensors’ signals -to enable the MCU read them- have been done, as this part of the boards had
never been tested before. The first modification to be done was to connect two nodes in order
to make the signals go through the desired GPIOs of the microcontroller. The lectures had to be
specifically done through some particular GPIOs and, when tried to change it via software, the
program did not run. Connecting the inputs via hardware has been the only solution possible.
The second modification, also done in the Hall sensors signals conditioning part, has come
from a wrong connected voltage shifter. The PCB is designed so as to use the shifter in the
reverse way, but is is not reversible, the inputs and outputs need to be correctly connected. It
has been removed and fixed with an auxiliary board and cables to switch the connections. Fig.
3.10 shows the aspect of the fix done and the schematic of this last modification [16].
20
(a) Shifter connections chaged (b) Fixed PCB aspect
As it can be seen, few pads of the IC are used and that is because it was thought to support
the encoder and the Hall effect sensors. The encoder would use three of the input/outputs and
the Hall sensors the other three. As our design simulates an encoder only three pairs of pins
would be used but, as one of the signals is not needed and could be replaced by software,
only two pairs of pins are used. For a future board redesign, a different level shifter with less
channels could be used.
Once the software has been implemented, the next key point is the way in which it will under-
stand orders and execute them.
The ADCS algorithm determines the required torque of each motor. These values will be
computed these values at a specific rate. This first step is to convert from torque to angular
acceleration, which is easily accomplished by executing some simple conversions.
The next step is that motors need to be constantly accelerating or decelerating and changing
this value -in most of the cases-, but they also require a speed order. The solution is simple:
give a very low speed -it could even be in the opposite direction- when they have to decelerate
or the motors maximum rated speed when they have to accelerate. While these speeds are not
reached, the motors will keep accelerating or decelerating as desired. If it had not been this
way, once the reference speed had been reached, the acceleration command would have been
ignored and no torque would have been applied. If the acceleration command is set to zero,
the speed reference is ignored and the motor stays spinning at the speed it was rotating at the
moment it received the order. Fig.3.11 shows this operation -remember that the acceleration
is directly related to the torque by a constant, the inertia of the rotor-. A real example of this
behaviour can be found in the Results Chapter 4.
The information sent or received through the SPI bus can be configured easily and, when it
has to be finally decided, any possibility will be available. An option would be to send a sign flag
for the torque command and, depending on it, the controllers’ MCUs would know which speed
reference to set.
21
Figure 3.11: Different speed (top) and acceleration (middle) references and the motor’s speed evolution
(bottom).
The vertical lines in Fig.3.11 mark the instants when speed and acceleration references
change. Note how the speed reference makes the function of being the sign of the acceleration.
When acceleration is set to zero the speed is maintained at the value it was. This is how the
designed system works.
22
Chapter 4
Results
In this chapter, the results obtained are shown for both the development kit and the final hard-
ware. The tests have consisted of executing the code and characterizing the motors‘ behaviour.
Obtaining the parameters of the motors and the boards and plotting the speed evolutions on
graphs are the results shown in this chapter. All the motors and PCBs have been tested sep-
arately to independently identify the parameters, and be able to run the same software with
different configurations.
For the software to know the motor and board actually used, their parameters have to be previ-
ously identified. All of them but the inertia are directly calculated by the software. The provider
suggests calculating the inertia of a motor ten times or more and, then, setting as the result the
average value.
Table 4.1: Kit parameters
Motor
Rs [Ω] 0.41712
Lsd [H] 0.0006374
Lsq [H] 0.0006374
Flux [VpHz] 0.035159
Inertia [pu/(pu/s2 )] 0.0135
Board
IA offset [mA] -0.864467204
IB offset [mA] -0.866962671
IC offset [mA] -0.868413985
VA offset [mV] 0.310694873
VB offset [mV] 0.307737291
VC offset [mV] 0.306734324
The procedure to calculate the inertia in International System of Units (SI) units, as well as
the histograms used to identify it, are explained in Appendix E.
23
4.1.2 Performance
The results obtained with the development kit are shown as speed progressions in the following
graphs. Different accelerations as well as very low acceleration progressions have been tested.
These tests have been done acquiring data at a slower sampling rate than the real control does
for convenience. More precisely, one sample per every 500 control loops has been taken.
Figure 4.1 shows the motor accelerating constantly at a certain value. This test has been
done in order to verify that the control is able to make the motor accelerate slowly during a long
period of time. In this case, the acceleration has been set at 1 RPM per second. The cloud of
samples would not have let to appreciate the tiny variations if the test had been shorter. This
noise is treated more specifically in Appendix E. A good behaviour has been obtained as the
samples draw a perfect line from the initial speed value to the final one, which indicates the
acceleration has been correctly maintained during the test.
Figure 4.2 shows also a speed progression, but this time with varying acceleration. The
motor has been commanded to accelerate at different speeds, simulating a possible real sit-
uation. At the moment it receives the orders, the acceleration changes instantaneously with
the software configuration used. The different stages draw perfect lines, which is the behaviour
aimed. While the reference speed is not reached, the motor is able to keep accelerating at the
desired accelerations. For the test, the reference speed has been set to 2000 RPM and the
accelerations have been 2, 4 and 8 RPM/s, in this order.
24
4.2 Satellite motors and PCBs
The same process as before has been followed to test the small boards with the Maxon
EC32Flat motors.
The parameters are shown in the same format as for the development kit. Table 4.2 contains
the parameters of all three EC32Flat motors.
Motors 1 2 3
Rs [Ω] 1.837922 1.793522 1.950386
Lsd [H] 0.00072354 0.00074802 0.00072085
Lsq [H] 0.00072354 0.00074802 0.00072085
Flux [VpHz] 0.02203494 0.02208626 0.02181357
Inertia [pu/(pu/s2 )] 0.04144 0.04153 0.04157
Boards 1 2 3
IA offset [mA] -0,8644672 -0,8648289 -0,8681313
IB offset [mA] -0,8669627 -0,8700601 -0,8654397
IC offset [mA] -0,8684139 -0,8664956 -0,8614185
VA offset [mV] 0.3106949 0.3045508 0.3023646
VB offset [mV] 0.3077373 0.3041387 0.3015241
VC offset [mV] 0.3067343 0.3033315 0.3022492
Note that the inertias of the EC32Flat motors are larger than the inertia calculated for the
BLY17 motor. Although the EC32Flat have smaller dimensions, their inertia is grater because
of the flywheels used.
4.2.2 Performance
The software was successfully tested with the final PCBs after implementing the modifications
explained in Chapter 3. More precisely, PCB ]2 with its motor were tested. Board ]1 has
not been modified and board ]3 was built with a MCU different from the others, which has no
licence to execute some parts of the code. Spin-TAC is a copyrighted module, and a particular
MCU has different versions depending on whether it has licence or not to use it. This was never
experienced before although the identifications of the MCUs differ in some digits. It will have to
be replaced by a valid one to execute the software developed.
The testing has been performed in the same way as for the development kit. Slow speed
evolutions and successively varying acceleration commands.
Figure 4.3 shows a slow speed evolution to verify, in the same way as for the development
kit, that the control is able to introduce tiny variations in the speed of the motor. The result is the
line expected, which demonstrates that the constant low acceleration is hold during the whole
test. In this case, the acceleration chosen has been 1.5 RPM/s. Apart from the success of
the test, a mention has to be made about the grater dispersion of the speed samples in some
25
instants -around 130, 180, 300, 420 seconds-. This is due to disturbances caused by touching
slightly the rotor when wanting to verify its temperature.
Figure 4.4 demonstrates that both positive and negative accelerations are achieved suc-
cessfully. Moreover, when zero acceleration is commanded to the motor, the speed stays fixed.
This is the behaviour expected and described in Chapter 3. According to the last section of this
chapter 3.4.3, the speed reference was set to a high value for positive accelerations and a low
one for negative accelerations. During the test, these reference speeds are never reached.
Figure 4.4: Speed variations with different successive positive and negative accelerations
Another issue to be verified has been the low speed performance, where the rotation is
more likely to become rough. Some controls have problems when the angular speed goes
blow 1000 RPMs, and that had to be avoided. The control developed has been able to provide
stable speed and good performance in a range between 2100 RPMs and 100 RPMs.
Figure 4.5 shows the motor spinning at almost the mentioned speed limits, as well as the
fixed speed regions zoomed. Something clear that the error is greater when the speed is lower.
This is due to the way of calculating the speed using the Hall effect sensors. If the speed
diminishes, the time between the Hall sensors’ pulses increases and, because the samples
are taken at a constant rate, less pulses are detected. When the speed calculation uses lower
values, the differences between them lead to an increase of the relative error.
26
Figure 4.5: Speed variation from 2000 RPMs to 100 RPMs and fixed speed zoomed areas
The relative error is given for the speed limits mentioned - at 2000 RPMs and 100 RPMs-.
The relative speed measure errors can be calculated with the zoomed areas, looking at the
maximum differences from the ideal value. For the higher speeds, the maximmum difference
with respect the 2000 RPMs is 11 RPMs, which gives a relative error of 0.55 %. This value is
excellent. For the lower speeds, the situation is different and the error increases dramatically.
The worst measure differs 39 RPMs from the ideal 100 RPMs. Which is an error of 39 %.
However, the measures are always oscillating around the optimal value, they do not diverge.
This is what makes it possible to make the motor function properly. When the PWM signals are
driven to the the motor, their duty cycle oscillates as a consequence of this error. This oscillation
has the frequency of the measurements made -which is 500 times higher than the sampling rate
of these tests-, and it is too high for the motor to follow it, so the effect is the same as if it was
an almost constant voltage. The consequence of this phenomenon is a little vibration of the
motor.
The video below shows the motor decelerating and the good behaviour achieved at low
speeds although the commented error -100 RPMs in the final moments of the video-.
27
The error at low RPMs, however, makes it impossible to achieve a smooth control below
100 RPMs. This can be seen, for example, when the motor is asked to change its direction
of rotation. Near zero speed, the behaviour is irregular until it gains angular velocity again.
This situation could be either given or avoided, depending on the bias speed of theRW, which
depends on the torques to compensate and the actuation of the magnetorquers.
If it is found that, when developing the ADCS algorithms, these type of transitions become
necessary for the final application, some changes should be done. Possible solutions can be:
• To use more Hall sensors to increase the resolution of the lectures and reduce the error
at low speed.
• To use a quadrature encoder, which can provide huge resolution. However, this supposes
attaching a magnet to the rotor and having to place an encoder perfectly aligned.
• To change to an open-loop control when the motor’s angular speed is between 100 and
-100 RPMs. The less desirable solution, as the closed-loop control should be maintained.
Figure 4.6 shows a transition from -1000 to 1000 RPMs and the central area zoomed. It can
be observed that the region between 100 and -100 RPMs is where the values vary irregularly.
Figure 4.6: Speed variation from -1000 to 1000 RPMs and the central area zoomed.
28
Chapter 5
Budget
Table 5.1 shows the total cost of the project, taking into account the working hours and used
components.
29
Chapter 6
After some modifications of the work plan, the main objective of this thesis has been achieved:
to control the RW with a closed-loop algorithm using Hall effect sensors, and providing them
with the capability of obeying speed and acceleration instructions. The results show that, on
the one hand, the behaviour of the motors is the desired one, being able to maintain a specific
acceleration, applying it to accelerate or decelerate the motor, and following very slow speed
evolutions. The errors when rotating at a constant speed are very low when the speed is high
-0.55 %, which fulfils the requirements- and big when the speed is near zero -39%-, however,
the configuration of the system makes the control possible and a good performance is achieved
at low speeds although little vibrations appear.
On the other hand, the need of hardware modifications and the need to complete the soft-
ware indicate that there is still work to do. To finish the system different pieces have to be put
together as no additional parts need to be designed and implemented from scratch.
Future work regarding the hardware -motor control PCBs- lists the following tasks:
• Redesign the connections for the voltage level shifter in the sensors’ signals conditioning
and, if possible, find a smaller level shifter with less channels.
• Remove the two buck-boost converters the PCB now includes. 3 Cat-3 Electrical Power
Subsystem (EPS) is going to be able to feed the boards with 3.3 V and 12 V, so no
conversions will have to be done [17].
• Remove the Light Emitting Diode (LED)s to reduce the power consumption.
• Build three boards with the specific MCUs needed -the third board now has a MCU without
licence to execute some copyrighted parts of the code used-.
• With all the previous modifications, redesign the control boards with different dimensions
or into different parts with the objective of fitting the motors and boards in a half of a
10x10x10 cm3 unit.
• Redesign the motor supports and build them in aluminium, as it is rigid and light.
30
With all these remaining hardware modifications, a new design for the RW module is pro-
posed. Fitting the RW in the lower half of the 10x10x10 cm3 volume is the major constraint of
this design. The new design could also propose new shapes and sizes for the motor controller
PCBs. However, it would be again a hard design and testing work as new problems would come
up. Figure 6.1 shows a proposal for a future configuration where the boards are divided in two
halves. This is done in order to keep the current size of the motors and flywheels. Another
option could be reducing the motors’ size if, after physics studies, it was found that the desired
response could be obtained with less momentum motors.
• A requirement is a high frequency of the control loop execution and, with the MCU used, it
is a lot grater -9 times grater than needed-. The running frequency of the microcontroller
could be lowered in order to reduce power consumption while maintaining the motor’s
good monitoring.
Finally, to integrate the reaction wheels in the ADCS of the satellite and make them work
together with the attitude determination system and the magnetorquers:
• Study thoroughly which inertia will the motors be required to have, and redesign the
flywheels accordingly. Purchasing smaller dimensions motors -20mm diameter motors
are also offered by Maxon- could be an option which would help saving space.
• Develop control algorithms for target tracking using attitude determination data from the
Star Tracker and Sun sensors.
• Combine the RW actions with the magnetorquers to implement the momentum unloading
described in Section 3.1.2.2.
• Test the whole system with all the mentioned tasks completed and with the specific ADCS
masterboard.
31
Bibliography
[1] Mariland Aerospace. ”MAI-400 - 1/2U CubeSat ADCS”, 2010. URL http://maiaero.com/
products/s/mai-400/. [Online; accessed June-2016].
[2] Texas Instruments C2000 Systems and Applications Team. ”Trapezoidal Control of BLDC
Motors Using Hall Effect Sensors”. URL http://www.ti.com/tool/controlsuite. Con-
trolSUITE - [Online; downloaded Feb-2016].
[3] Microsemi. ”Park, Inverse Park and Clarke, Inverse Clarke Transformations MSS Software
Implementation - User Guide”, 2013.
[4] Texas Instruments C2000 Systems and Applications Team. ”Sensorless Field Oriented
Control of Multiple Permanent Magnet Motors”, 2010. URL ftp://ftp.ti.com/pub/dml/
DMLrequest/Christy_FTP-10-30-12/controlSUITE/development_kits/LVMultiAxis+
PfcKit_v1.4/2xPM_Sensorless_v1_1/~Doc/Sensorless%20FOC%20of%202xPM.pdf.
[Online; accessed May-2016].
[8] Texas Instruments. ”Clarke and Park Transforms on the TMS320C2xx”, 1997. URL http:
//www.ti.com/lit/an/bpra048/bpra048.pdf. [Online; accessed May-2016].
[9] Mark Humphrys. ”Continuous output, the sigmoid function”, 1990. Properties of the sig-
moid, including how it can shift along axes and how its domain may be transformed.
[10] STMicroelectronics). ”UM1670 User Manual - Discovery kit for STM32F429”, 2013.
[11] Aleix Calderón. ”Attitude Control of 3 Cat-3 Using Reaction Wheels”, 2016. Universitat de
Barcelona, Facultat de Fı́sica.
32
[13] Texas Instruments. ”DRV83x2 Three-Phase PWM Motor Driver”, 2014. URL http://www.
ti.com/lit/ds/symlink/drv8312.pdf. [Online; accessed May-2016].
[16] ON Semiconductors. ”MC14504B - Hex Level Shifter for TTL to CMOS or CMOS to
CMOS”, 2014. URL http://www.onsemi.com/pub_link/Collateral/MC14504B-D.PDF.
[Online; accessed May-2016].
[17] Arnau Solanelles. ”Modular and Scalable Electrical Power System for Nanosatellites”,
2016. Universitat Politècnica de Catalunya, Escola Tècnica Superior d’Enginyeria de Tele-
comunicacions de Barcelona.
[18] Jordi Macià. ”Design and Implementation of a Reaction Wheels Control System Hard-
ware”, 2016. Universitat Politècnica de Catalunya, Escola Tècnica Superior d’Enginyeria
de Telecomunicacions de Barcelona.
[19] Albert Bolet. ”Reaction Wheel-Based 3-axes Attitude Control Systems for Nano-Satellites”,
2015. Universitat Politècnica de Catalunya, Escola Tècnica Superior d’Enginyeria de Tele-
comunicacions de Barcelona.
[21] Assaad Farhat, Jighjigh Ivasc, Ye Lu, Alan Snapp. ”Attitude Determination and Con-
trol System for CubeSat”, 2013. URL https://m.wpi.edu/Pubs/E-project/Available/
E-project-030113-141835/unrestricted/2013_ADC_Report_Final.pdf. Worcester
Polytechnic Institute - [Online; accessed May-2016].
[24] Valdemir Carrera, Adolfo Graciano da Silva and Hélio Koiti Kuga. ”A Dynamic Friction
Model for Reaction Wheels, 2006.
[25] Microsom Inc. Members of the Technical Staff, Attitude Systems Operation and Com-
puter Sciences Corporation. ”Spacecraft Attitude Determination and Control, 1999.
33
Appendix A
Critical Design Review document delivered on May 8th. The Gantt diagram has undergone a
final modification to meet with the project final development.
34
Document: CDR.pdf Project Critical Review
Date: 8/5/2016 3Cat3 3-axes ADCS using
Rev: 01 RW and Magnetorquers
Page 5 of 8
1.1. Incidences
The main incidence in the project has been that Work Package three (WP3) has become much
more complicated than it was expected to be, to control the motors with a closed loop using the Hall
effect sensors is not trivial.
This incidence has affected the other work packages as it has taken almost all the available time
and some of the tasks have been simplified.
Other incidences also have occurred as the unknown complexity of developing the control code for
the reaction wheels system (WP4) and the constraints of redesigning the master board (WP1) as it
is not only a matter of giving orders to the reaction wheels but to control all the sensors and
actuators of the ADCS.
WP1 was first tried to be completed -to design a PCB which performed the STM32 Discovery
board task of giving orders to the motors’ PCBs- but then abandoned due to the incidence
mentioned regarding this work package.
WP2 has been given less time than expected and the distribution modification is not at an
advanced level.
WP3 has eclipsed the rest of packages becoming the main task of the project and taking most
of the time.
WP4 and WP5 (and, by consequence, WP6) have been descoped due to time constraints.
A work package has been added (the new WP4) remarking the difference on developing the
code with the demonstration kit from Texas Instruments and making it work with the PCBs
developed in a previous TFG.
Document: CDR.pdf Project Critical Review
Date: 8/5/2016 3Cat3 3-axes ADCS using
Rev: 01 RW and Magnetorquers
Page 6 of 8
Project: Perform the motors control adding Hall sensors WP ref: WP3
information
Major constituent: Software Sheet 3 of 3
Be able to read the motors speed through the Hall effect sensors Planned start date: 29/02/2016
and add its information to the calculations in order to make the Planned end date: 1/06/2016
control more robust adding redundancy.
(Objectives 2 and 3) Start event: KO
End event: Speed control
validated.
Internal task T1: Sense the motors’ speed using the Hall effect Deliverables: Dates(project
sensors. -Software files week): 13
Internal task T2: Add the new information to the control and close -Validation
the loop. plan
Internal task T3: Test the control with the new software
Project: Motor control using Hall sensors with 3Cat-3 hardware WP ref: WP4
Major constituent: software and hardware Sheet 4 of 6
Short description: Accomplish the same results from WP3 but Planned start date:1/06/2016
now with our own PCB for the control of the motors and the real Planned end date: 27/06/2016
motors the nanosatellite is going to use.
Start event: Speed control
validated with development kit
End event: Speed control
validated with specific
hardware.
Internal task T1: Motors parameters identification Deliverables: Dates(project
Internal task T2: Achieve the closed loop control -Software files week): 17
Internal task T3: Test the control with the new software -Validation
plan
Document: CDR.pdf Project Critical Review
Date: 8/5/2016 3Cat3 3-axes ADCS using
Rev: 01 RW and Magnetorquers
Page 7 of 8
Milestones
PCBs schematics
The final design of the PCBs used developed by the former student Jordi Macià is shown in this
appendix. The board schematics and layout can be seen in Figures B.1, B.2, B.3 and B.4.
The FTDI board has been used to connect the motor boards via Universal Serial Bus (USB)
cable to the computer and program them. As it is not useful once the motor boards have been
loaded with the software, it was built separately in order not to occupy space in the satellite. Its
layout is showed in Figure B.5.
39
Figure B.1: Socket connector and power circuit
40
Figure B.2: DRV8312 driver and motor current/voltage sensing
41
Figure B.4: PCB layout -top layer-
42
Appendix C
Scilab code
Scilab has been used to gather the speed information and then plot it as the debug tool could
not store data for a long time. The code of the application used is the content of this appendix.
1 // Read . txt file with speed information
2 clear ;
3 datafile = uigetfile ([ " *. txt " ] , " " ," Data file " ,% t ) ;
4
11 // Loop over all lines in the file , reading them one at a time
12 num_samples = 1;
13 val0 = 0;
14
15 // Store the speed variables in val1 and differences between them in acc
16 while ~ meof ( fid ) do
17 [ num_read , val1 (1 , num_samples ) ] = mfscanf ( fid , ’% d ’) ;
18 dif ( num_samples ) = ( val1 ( num_samples ) - val0 ) /2;
19 val0 = val1 ( num_samples ) ;
20 num_samples = num_samples + 1;
21 end
22
32 // time axis calculation for one sample every 250 loop counts
33 totalTime = length ( val1 ) /19; // 9.5 if 500 loop counts
34 [ time ] = linspace (0 , totalTime , length ( val1 ) ) ;
35
43
37 subplot (121) ;
38 plot ( time , - speedData , ’ - roo ’) ;
39 ylabel ( " Speed ( rpm ) " ) ;
40 xlabel ( " Time ( s ) " ) ;
41 xtitle ( " Slow speed progression " ) ;
42 xgrid (1 , 1 , 7)
43
44 subplot (122) ;
45 plot ( time , difference , ’ - goo ’) ;
46 ylabel ( " Speed samples differences ) " ) ;
47 xlabel ( " Time ( s ) " ) ;
48 xtitle ( " Values dispersion " ) ;
49 xgrid (1 , 1 , 7)
frame
44
Appendix D
F28069M Code
Appendix with the main code of the application. Main.h and hal.c are also included as files with
some relevance. Minor changes were implemented in other files not included in this document.
D.1 MAIN
This is the code specifically run by the application. main.h complements the main.c file with
initializations and defines.
D.1.1 main.c
4 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
5 // the includes
6
7 // system includes
8 # include < math .h >
9 # include " main . h "
10
11 # ifdef FLASH
12 # pragma CODE_SECTION ( mainISR , " ramfuncs " ) ;
13 # endif
14
17
18 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
19 // the defines
20
21 # define LED_BLINK_FREQ_Hz 5
22
23
24 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
25 // the globals
26
45
27 uint_least16_t g Co un ter _u pd ate Gl ob als = 0;
28
29 bool F l a g _ L a t c h _ so f t w a r e U p d a t e = true ;
30
31 CTRL_Handle ctrlHandle ;
32
33 HAL_Handle halHandle ;
34
35 USER_Params gUserParams ;
36
39 HAL_AdcData_t gAdcData ;
40
43 # ifdef FAST_ROM_V1p6
44 CTRL_Obj * controller_obj ;
45 # else
46 CTRL_Obj ctrl ; // v1p7 format
47 # endif
48
49 ENC_Handle encHandle ;
50 ENC_Obj enc ;
51
52 SLIP_Handle slipHandle ;
53 SLIP_Obj slip ;
54
55 ST_Obj st_obj ;
56 ST_Handle stHandle ;
57
58 uint16_t gLEDcnt = 0;
59
73 # ifdef FLASH
74 // Used for running BackGround in flash , and ISR in RAM
75 extern uint16_t * RamfuncsLoadStart , * RamfuncsLoadEnd , * RamfuncsRunStart ;
76 # endif
77
78
79 # ifdef DRV8301_SPI
46
80 // Watch window interface to the 8301 SPI
81 D RV _ S PI _ 8 301_Vars_t gDrvSpi8301Vars ;
82 # endif
83 # ifdef DRV8305_SPI
84 // Watch window interface to the 8305 SPI
85 D RV _ S PI _ 8 305_Vars_t gDrvSpi8305Vars ;
86 # endif
87
88 _iq g Flux_pu_to_Wb_sf ;
89
90 _iq g F lu x _ pu_to_VpHz_sf ;
91
92 _iq g T o r q u e _ L s _ I d _ I q _ p u _ t o _ N m _ s f ;
93
94 _iq g T o r q u e _ F l u x _ I q _ p u _ t o _ N m _ s f ;
95
96 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
97 // the functions
98
119
123
127
47
132 {
133 gMotorVars . Flag_enableSys = false ;
134 }
135 }
136
137
141
145
154
155 {
156 CTRL_Version version ;
157
164
168
172
176
180
48
183
184
188
195
199
203
207
211
216
234
49
235 // compute scaling factors for flux and torque calculations
236 gFlu x_pu_to_Wb_sf = U S E R _ c o m p u t e F l u x _ p u _ t o _ W b _ s f () ;
237 g F lu x _p u _to_VpHz_sf = U S E R _ c o m p u t e F l u x _ p u _ t o _ V p H z _ s f () ;
238 g T o r q u e _ L s _ I d _ I q _ p u _ t o _ N m _ s f = U S E R _ c o m p u t e T o r q u e _ L s _ I d _ I q _ p u _ t o _ N m _ s f () ;
239 g T o r q u e _ F l u x _ I q _ p u _ t o _ N m _ s f = U S E R _ c o m p u t e T o r q u e _ F l u x _ I q _ p u _ t o _ N m _ s f () ;
240
241
259 // enable / disable the use of motor parameters being loaded from user . h
260 C T R L _ s e t F l a g _ e n a b l e U s e r M o t o r P a r a m s ( ctrlHandle , gMotorVars .
,→ F l a g_en ableU serP aram s ) ;
261
268
50
286 C TR L_ s et F la g_ e na b le Ct r l ( ctrlHandle , gMotorVars . Flag_Run_Identify ) ;
287
51
327 // enable the PWM
328 HAL_enablePwm ( halHandle ) ;
329 }
330 else if ( ctrlState == CTRL_State_Idle )
331 {
332 // disable the PWM
333 HAL_disablePwm ( halHandle ) ;
334 gMotorVars . Flag_Run_Identify = false ;
335 }
336
345 }
346 }
347
348
370 if ( F l a g _ L a t c h _ s of t w a r e U p d a t e )
371 {
372 F l a g _ L a t c h _ so f t w a r e U p d a t e = false ;
373
376 // initialize the watch window kp and ki current values with pre -
,→ calculated values
377 gMotorVars . Kp_Idq = CTRL_getKp ( ctrlHandle , CTRL_Type_PID_Id ) ;
52
378 gMotorVars . Ki_Idq = CTRL_getKi ( ctrlHandle , CTRL_Type_PID_Id ) ;
379
380 // initialize the watch window Bw value with the default value
381 gMotorVars . SpinTAC . VelCtlBw_radps = S T V E L C T L _ g e t B a n d w i d t h _ r a d p s (
,→ stObj - > velCtlHandle ) ;
382
388 }
389 else
390 {
391 F l a g _ L a t c h _ s of t w a r e U p d a t e = true ;
392
397
53
424 else
425 {
426 loopCounter = 0;
427 index = 0;
428 }
429 // Control toggle after initial spin - up
430 if ( gMotorVars . Speed_krpm > 1670000 || gMotorVars . Speed_krpm <
,→ -1670000) // IQ24 format , 100 rpm = 1677721
431 {
432 sensoredControl = true ;
433 }
434 }
435
463
467 // set the default controller parameters ( Reset the control to re - identify
,→ the motor )
468 CTRL_setParams ( ctrlHandle ,& gUserParams ) ;
54
469 gMotorVars . Flag_Run_Identify = false ;
470
479
493
497
501
505
513
520
55
521 // run the controller
522 CTRL_run ( ctrlHandle , halHandle ,& gAdcData ,& gPwmData , SLIP _get Magne ticA ngle (
,→ slipHandle ) , sensoredControl ) ;
523 }
524 else {
525 CTRL_run ( ctrlHandle , halHandle ,& gAdcData ,& gPwmData , ENC_getElecAngle (
,→ encHandle ) , sensoredControl ) ;
526 }
527
531
535 // if we are forcing alignment , using the Rs Recalculation , align the eQEP
,→ angle with the rotor angle
536 if (( EST_getState ( obj - > estHandle ) == EST_State_Rs ) && ( USER_MOTOR_TYPE ==
,→ MOTOR_Type_Pm ) && sensoredControl )
537 {
538 ENC_ setZeroOffset ( encHandle , ( uint32_t ) ( HAL _getQ epPo snMax imum ( halHandle ) -
,→ H A L _getQepPosnCounts ( halHandle ) ) ) ;
539 }
540
541 return ;
542 } // end of mainISR () function
543
544
550
557 // get the real time speed reference coming out of the speed trajectory
,→ generator
558 gMotorVars . SpeedTraj_krpm = _IQmpy ( CT RL _ge tS pd _in t_ re f_p u ( handle ) ,
,→ E S T _get _pu_t o_kr pm_s f ( obj - > estHandle ) ) ;
559
56
564 gMotorVars . MagnCurr_A = EST_getIdRated ( obj - > estHandle ) ;
565
57
610
611 return ;
612 } // end of u p d a t e G l o b a l V a r i a b l e s _ m o t o r () function
613
614
623 // set the kp and ki current values for Id and Iq from the watch window
624 CTRL_setKp ( handle , CTRL_Type_PID_Id , gMotorVars . Kp_Idq ) ;
625 CTRL_setKi ( handle , CTRL_Type_PID_Id , gMotorVars . Ki_Idq ) ;
626 CTRL_setKp ( handle , CTRL_Type_PID_Iq , gMotorVars . Kp_Idq ) ;
627 CTRL_setKi ( handle , CTRL_Type_PID_Iq , gMotorVars . Ki_Idq ) ;
628 }
629
630 return ;
631 } // end of updateKpKiGains () function
632
633
58
657
677 // Set the Iq reference that came out of SpinTAC Velocity Control
678 CTRL _setIq_ref_pu ( ctrlHandle , iqReference ) ;
679 }
680
681
682 // @ } // defgroup
683 // end of file
frame
D.1.2 main.h
1 // the includes
2
3 // modules
4 # include " sw / modules / math / src /32 b / math . h "
5 # include " sw / modules / memCopy / src / memCopy . h "
6 # include " sw / modules / est / src /32 b / est . h "
7 # include " sw / modules / svgen / src /32 b / svgen_current . h "
8 # include " sw / modules / fw / src /32 b / fw . h "
9 # include " sw / modules / slip / src /32 b / slip . h "
10
11 // platforms
12 # ifndef QEP
13 # include " sw / modules / ctrl / src /32 b / ctrl . h "
14 # else
15 # include " sw / modules / ctrl / src /32 b / ctrlQEP . h "
16 # endif
17 # include " hal . h "
59
18 # include " user . h "
19
20 // SpinTAC
21 # include " spintac_velocity . h "
22
23 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
24 // the defines
25
26 // Defines the number of main iterations before global variables are updated
27 # define N U M _ M A I N _ T I C K S _ F O R _ G L O B A L _ V A R I A B L E _ U P D A T E 1
28
60
70 _IQ (0.0) , \
71 _IQ (0.0) , \
72 _IQ (0.0) , \
73 _IQ (0.0) , \
74 _IQ (0.8 * USER_MAX_VS_MAG_PU ) , \
75 _IQ (0.0) , \
76 _IQ (0.0) , \
77 _IQ (0.0) , \
78 _IQ (0.0) , \
79 {0 ,0 ,0} , \
80 {0 ,0 ,0} , \
81 ST_VARS_DEFAULTS }
82
83
84 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
85 // the typedefs
86
99 CTRL_State_e CtrlState ;
100 EST_State_e EstState ;
101
61
123 float_t Rs_Ohm ;
124 float_t RsOnLine_Ohm ;
125 float_t Lsd_H ;
126 float_t Lsq_H ;
127 float_t Flux_VpHz ;
128
135 _iq Vd ;
136 _iq Vq ;
137 _iq Vs ;
138 _iq VsRef ;
139 _iq VdcBus_kV ;
140
150 } MOTOR_Vars_t ;
151
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
153 // the function prototypes
154
167 // Calculates the maximum qFmt value for Ls identification , to get a more
,→ accurate Ls per unit
168 void C T R L _calcMax_Ls_qFmt ( CTRL_Handle handle , uint_least8_t * p_qFmt ) ;
169
173 // Set electrical frequency limit to zero while identifying an induction motor
62
174 void setFeLimitZero ( CTRL_Handle handle ) ;
175
179 // @ } // defgroup
180 # endif // end of _MAIN_H_ definition
frame
D.2 user.h
user.h file contains the information of the motor and the board used -the parameters that have
been identified from each motor and board in the results Chapter 4-. It also has a lot of defines
such as clock frequencies, voltage and current limits of operation, number of voltage and cur-
rent sensors, encoder characteristics, scale factors for the parameters, etc. Finally, it contains
functions to set and update the parameters and error functions.
The file is very long and only a few parameters are shown. Basically the parameters of
the board and motor, which need to be modified every time the code is loaded to a different
hardware.
1 # ifndef _USER_H_
2 # define _USER_H_
3 ...
4 // Board 2 configured
5 // ADC current offsets for A , B , and C phases
6 # define I_A_offset ( -0.864467204)
7 # define I_B_offset ( -0.866962671)
8 # define I_C_offset ( -0.868413985)
9
15 ...
16
63
28 # define U SER_ISR_PERIOD_usec ( USER_PWM_PERIOD_usec * ( float_t )
,→ U S E R _ N U M _ P W M _ T I C K S _ P E R _ I S R _ T I C K )
29
30 ...
31
64
80 ...
81
frame
D.3 hal.c
hal.c file implements the HAL, where the configuration of the microcontroller’s pins are done.
Due to the length of this file, only the fragments where the QEP module is involved are shown.
1 // enable the PIE interrupts associated with the ADC interrupts
2 PIE_enableAdcInt ( obj - > pieHandle , ADC_IntNumber_1 ) ;
3 // enable the ADC interrupts
4 ADC_enableInt ( obj - > adcHandle , ADC_IntNumber_1 ) ;
5
17 // EQEPA
18 GPIO_setMode ( obj - > gpioHandle , GPIO_Number_20 , GPIO_20_Mode_EQEP1A ) ;
19 G P I O _ s e t Q u al ific ation ( obj - > gpioHandle , GPIO_Number_20 , GPIO_Qual_Sample_3 ) ;
20
21 // EQEPB
22 GPIO_setMode ( obj - > gpioHandle , GPIO_Number_21 , GPIO_21_Mode_EQEP1B ) ;
23 G P I O _ s e t Q u al ific ation ( obj - > gpioHandle , GPIO_Number_21 , GPIO_Qual_Sample_3 ) ;
24
25 // STATUS
26 GPIO_setMode ( obj - > gpioHandle , GPIO_Number_22 , G P I O _ 2 2 _ M o d e _ G e n e r a l P u r p o s e ) ;
27
28 // EQEP1I
29 GPIO_setMode ( obj - > gpioHandle , GPIO_Number_23 , GPIO_23_Mode_EQEP1I ) ;
30 G P I O _ s e t Q u al ific ation ( obj - > gpioHandle , GPIO_Number_23 , GPIO_Qual_Sample_3 ) ;
31
40
65
42 QEP_ reset_counter ( obj - > qepHandle [ qep ]) ;
43
91
92 return ;
93 }
66
frame
67
Appendix E
Results Complement
Here, some issues mentioned in the Results Chapter 4 are clarified for a better understanding
and interpretation.
The motor inertia is set by the SpinTAC speed controller using its initialization process. The unit
for inertia is P U/(pu/s2 ). Where PU is the user unit for current [A] and pu/s2 is the user unit
for acceleration [krpm/s]. Typically inertia is specified in Kg ∗ m2 or N ∗ m ∗ s2 . This particular
way of expressing the inertia makes it mandatory to scale the real world inertia to enable the
SpinTAC controller use it.
The equation below can be used to convert between inertia specified in Kg ∗ m2 and the
scaled units that are needed for the SpinTAC speed controller [22]:
PU ωN ORM × 2π
Inertia[ pu ]= × Inertia[Kg × m2 ] (E.1)
s2
ϕEM F × AN ORM × P P
where:
• ϕEM F is defined as the Back EMF in Webers of the motor, which corresponds with the
Flux parameter
• AN ORM is defined as the scale between current in amps and current in PU in the appli-
cation.
68
E.2 Inertia histograms
As seen in Chapter 4, the motors’ inertias have been identified separately from the other param-
eters. In order to identify them, between ten and fifteen measures -depending on the number of
outliers eliminated- have been done with each motor and, to obtain their values, the histograms
here shown have been used. They show the number of times a measure has given a value in
a certain interval.
Measure Value
1 0.01465
2 0.01269
3 0.01009
4 0.01777
5 0.01687
6 0.01012
7 0.01775
8 0.01178
9 0.01168
10 0.01034
11 0.01355
12 0.01274
13 0.01168
14 0.01042
Mean 0.01253
Table E.1: BLY17 inertia values table Figure E.1: BLY17 inertia values histogram
Maxon motor 1
Measure Value
1 0.04146
2 0.04141
3 0.04142
4 0.04143
5 0.04143
6 0.04137
7 0.04148
8 0.04142
9 0.04152
10 0.04147
11 0.04138
12 0.04144
Mean 0.04144
69
Maxon motor 2
Measure Value
1 0.04133
2 0.04175
3 0.04178
4 0.04144
5 0.04148
6 0.04133
7 0.04148
8 0.04163
9 0.04152
10 0.04148
11 0.04146
12 0.04154
Mean 0.04153
Maxon motor 3
Measure Value
1 0.04170
2 0.04161
3 0.04164
4 0.04156
5 0.04139
6 0.04158
7 0.04152
8 0.04152
9 0.04168
10 0.04153
11 0.04167
12 0.04149
13 0.04144
Mean 0.04157
Table E.4: EC32Flat 3 inertia values table Figure E.4: EC32Flat 3 inertia values histogram
The histograms have helped choosing more adequate values for de inertia value determi-
nation. This value is used by the control to relate the acceleration of the rotor with the torque
really applied. It also has feedback from the current sensors to add redundancy to this calcula-
tion -the more current delivered to the motor, the more torque applied-. However, as the motors
never have to be forced by any external force, the torque can always be estimated by the rotor’s
angular speed variation.
70
Appendix F
71
BLY17 Series - Brushless DC Motors
• 42mm Square Body
• Compact Size and Power Density
• Cost-Effective Replacement for Brush DC Motors
• Long Life and Highly Reliable
FEATURES
The BLY17 Series Brushless DC Motors come in a compact package with high power density. These motors
are cost-effective solutions to many velocity control applications. They come in four different stack lengths
DESCRIPTION
to provide you with just the right torque for your application. A number of windings are available off-the-shelf
and all the motors can be customized to fit your machine requirements. The motors come in a standard 8-lead
configuration with three wires for the phases and five wires for the hall sensors. We can also customize the
windings to perfectly match your voltage, current, and maximum operating speed. Special shaft modifica-
tions, cables and connectors are also available upon request.
BLY172S-24V-4000 24 4000 53 54 3.5 0.80 1.20 5.81 3.35 0.00068 0.99 2.37
BLY173S-24V-4000 24 4000 77 79 4.9 0.46 0.70 5.38 3.10 0.00102 1.43 3.19
SPECIFICATIONS
BLY174S-24V-4000 24 4000 104 106 7.0 0.30 0.50 5.32 3.10 0.001359 1.76 3.95
BLY174S-24V-12000 24 2000 41 38.2 3.6 0.07 0.08 1.97 1.02 0.00068 0.99 2.37
BLY171D-17V-8000 17 8000 42 21 3.6 0.20 0.26 1.98 1.14 0.00034 0.66 1.59
BLY171D-24V-1400 24 1400 9.8 27 0.9 8.00 10.50 10.62 8.42 0.00034 0.66 1.59
BLY171D-24V-2800 24 2800 25 31 2.0 2.78 3.36 6.09 4.57 0.00034 0.66 1.59
BLY171D-24V-4000 24 4000 26 27 1.8 1.50 2.10 4.81 2.7 0.00034 0.66 1.59
BLY171D-24V-6000 24 6000 25 27 1.4 1.15 1.47 3.97 4.00 0.00034 0.66 1.59
BLY172D-24V-2000 24 2000 41 54 3.6 1.40 2.25 7.79 5.66 0.00068 0.99 2.37
BLY172D-24V-4000 24 4000 53 54 3.5 0.80 1.20 5.03 3.1 0.00068 0.99 2.37
BLY173D-24V-4000 24 4000 77 79 4.9 0.46 0.70 5.38 4.14 0.00102 1.43 3.19
BLY173D-160V-4000 160 4000 77 79 0.7 26.67 20.00 36.96 18.83 0.00102 1.43 3.19
BLY174D-24V-4000 24 4000 104 106 7.0 0.30 0.50 5.32 3.1 0.001359 1.76 3.95
BLY174D-24V-12000 24 12000 113 38 5.4 0.07 0.76 1.97 1.02 0.001359 1.76 3.95
BLY174S-24V-12000 24 12000 113 38 5.4 0.07 0.09 2.35 1.55 0.001359 1.76 3.95
Notes:
- Custom leadwires, cables, connectors, and windings are available upon request.
- The 7th character “S” denotes a single shaft, use “D” for double shaft.
- Dual Shaft motors have different mounting dimensions; please see drawings on next page.
L010228
910 East Orangefair Ln. Anaheim, CA 92801 Tel. (714) 992-6990 Fax. (714) 992-0471 www.anaheimautomation.com
(Single Shaft)
DIMENSIONS
(Double Shaft)
Winding Type: Delta, 8 Poles Max. Radial Force: 28N @ 20mm from the Flange
Hall Effect Angle: 120 Degree Electrical Angle Max. Axial Force: 10N
Shaft Run Out: 0.025mm Insulation Class: Class B
Radial Play: 0.02mm@450g Dielectric Strength: 500VDC for one Minute
End Play: 0.08mm@450g Insulation Resistance: 100MOhm, 500VDC
910 East Orangefair Ln. Anaheim, CA 92801 Tel. (714) 992-6990 Fax. (714) 992-0471 www.anaheimautomation.com
TORQUE CURVES
910 East Orangefair Ln. Anaheim, CA 92801 Tel. (714) 992-6990 Fax. (714) 992-0471 www.anaheimautomation.com
Appendix G
75
EC 32 flat ∅32 mm, brushless, 6 Watt
EC motor
maxon flat
M 1:2
Stock program Part Numbers
Standard program
Special program (on request)