• No results found

Development and characterization of the data flow for a spacecraft

N/A
N/A
Protected

Academic year: 2022

Share "Development and characterization of the data flow for a spacecraft"

Copied!
84
0
0

Laster.... (Se fulltekst nå)

Fulltekst

(1)

Development and characterization of the data flow for a spacecraft

payload instrument

Eirik Nobuki Kosaka

Thesis submitted for the degree of

Master in Electronics and Computer Technology 60 credits

Department of Physics

Faculty of mathematics and natural sciences

UNIVERSITY OF OSLO

(2)
(3)

Development and characterization of the data flow for a spacecraft

payload instrument

Eirik Nobuki Kosaka

(4)

© 2018 Eirik Nobuki Kosaka

Development and characterization of the data flow for a spacecraft payload instrument

http://www.duo.uio.no/

Printed: Reprosentralen, University of Oslo

(5)

Abstract

The focus of this thesis is to develop and characterize the data flow for a spacecraft payload instrument with ejecting sub-payloads. Equipped with the UiO multi-Needle Langmuir Probe system, the sub-payload collects charged particles in the ionosphere which is used to calculate different plasma pa- rameters. Currently, the sub-payloads transmit raw data, but by doing these calculations in flight, a reduction in the data can be achieved. To define if these calculations can be done in flight a full characterization of the data flow in the system is needed, both with and without the calculations. Before this thesis, earlier measurements had shown that with other test setups, these calculations could be done in flight, but not without a CPU with an FPU, and so this thesis looks at the need for an FPU for this system, or if the calculations can be done without one. The last point this thesis looks at is the possibility to use Matlab coder as a development tool for more natural development for further projects.

The thesis characterizes the full data flow of the system and the bottle- necks in the system. This together with execution time measurements done on the plasma parameters calculations shows that for this system it should be possible to run the science routine with and without FPU. It also shows that Matlab coder can be used as a development tool, but the achieved im- provement in performance is marginal.

(6)

Acknowledgements

I would like to thank Ketil Røed for your supervision and help throughout this thesis, and for introducing me to the world of space technology. I would also like to give a big thanks to everyone at ELAB for the great help and cooperation. Thanks to Fredrik L. Winje and Huy Hoang as co-students working on the 4D-module and making testing, development and the travel- ling done for this thesis a great experience. Thanks to Andøya Space Center, and everyone there that was a part of the G-Chaser project, and the creation of the 4D module. I would also like thank everyone at 333 for making the days more fun, and for technical inputs and discussions, with a special thanks to Yassine Elfarri for support, help, fun and everything else that you have done to make this journey to what it became. Last but not least I would like to thank Maudsen for your incredible support and patience.

(7)

Nomenclature

ADC Analog-to-Digital Converter ASC Andøya Space Center

CCS code composer studio CPU central processing unit CS chip select

DAC digital-to-analog converter DMA direct memory access ELAB electronics laboratory

FPGA field-programmable gate array FPU floating point unit

GCI Grand Challenge Initiative GOF goodness of fit

GPS global positioning system

halcogen hardware abstraction layer code generator HR high resolution

HTU high-end transfer unit

ICI Investigation of Cusp Irregularities IDE integrated development environment LRP loop resolution period

LSB least significant bit

m-NLP multi-Needle Langmuir Probe MCU microcontroller init

N2HET high end timer

(8)

NASA The National Aeronautics and Space Administration OBC on board computer

PCB printed circuit board

PMU performance monitoring unit RAM random access memory RF radio frequency

RMS root-mean-square

RTOS real time operating system SOMI slave out master in

SPI serial peripheral interface UiO University of Oslo

VFP vectored floating point unit

(9)

Contents

1 Introduction 1

1.1 Motivation . . . 1

1.2 Goals . . . 2

1.3 Thesis Outline . . . 2

2 Theoretical Background 4 2.1 Plasma, space weather and the Ionosphere . . . 4

2.2 Theory of Langmuir Probes . . . 5

2.3 The multi-Needle Langmuir Probe Concept. . . 7

2.4 Least Squares and Coefficient of Determination . . . 9

2.4.1 Floating Point . . . 10

2.4.2 Floating point unit . . . 11

3 System Overview 12 3.1 Top level System Overview . . . 12

3.1.1 Mission overview . . . 13

3.2 Radio Communication . . . 14

3.3 The m-NLP system . . . 14

3.3.1 The Microcontroller Unit . . . 15

3.3.2 Electron emitter. . . 15

3.3.3 Measuremeant electronics . . . 16

4 System Design 21 4.1 Downsampling function design . . . 21

4.2 Packet structure . . . 22

4.3 ADC Sampling rate decision . . . 24

4.4 m-NLP Probes release sequence . . . 25

5 Integration and Testing 29 5.1 System testing at UiO . . . 29

5.2 4D Module - Full System Test . . . 32

(10)

5.3 G-Chaser Integration and Testing . . . 34

6 Data Flow and Speed Tests 37 6.1 Calculating maximum m-NLP system throughput . . . 37

6.1.1 AD7768-4 Max speed . . . 38

6.1.2 N2HET/HTU max speed . . . 38

6.1.3 TMS570 throughput . . . 39

6.1.4 SPI Max Speed . . . 41

6.2 Science routine speed tests . . . 43

6.3 Matlab coder efficiency tests . . . 45

6.3.1 Optimizing the science routine . . . 49

7 Results 50 7.1 Maximum m-NLP system throughput . . . 50

7.2 Science routine speed test . . . 50

7.3 Matlab coder efficiency . . . 52

7.3.1 Optimized science routine speed test. . . 52

8 Discussion 53 8.1 Development and testing . . . 53

8.2 Maximum m-NLP system throughput . . . 54

8.3 Science routine speed tests . . . 54

8.4 Matlab Coder and the optimized science routine . . . 56

8.4.1 Future works . . . 57

9 Conclusion 58

Appendicies 59

A Least squares 61 A.1 Matlab - C Version . . . 61

A.2 Matlab - Sum function . . . 61

A.3 Matlab - Polyfit and Corrcoeff . . . 62

A.4 Matlab - Advanced fit function . . . 62

A.5 C code - Original C least squares . . . 62

A.6 C code - Matlab convert to C Version . . . 63

A.7 C code - Sum function . . . 64

A.8 C code - Polyfit and Corrcoeff . . . 65

(11)

List of Figures

2.1 A typical electron density profile both during night and day-

time [9]. . . 5

2.2 A typical I-V curve of a Langmuir Probe placed in Plasma [14]. 7 2.3 R2 equals one minus the sum of red squares divided the sum of the blue squares. (cc-by-sa) [17] . . . 10

3.1 Daughters being release from the main-payload. Illustration by Andøya Space Center. . . 13

3.2 Top level system overview, showing the data flow through the system [22] [23]. . . 14

3.3 A simplified electron emitter with a cathode, anode and a collimator. The gray represents a stream of electrons [26].. . . 15

3.4 Shows two different LRPs of the current N2HET program. . . 19

3.5 This is the buffers used to handle incoming and outgoing data from the MCU, and the data flow between them. . . 20

4.1 Top view of the probe deck. . . 26

4.2 Fully integrated daughter with released probes. . . 27

4.3 Flow chart of the antenna release function. . . 28

5.1 The four pictures show four different SPI-communication mea- surements on an oscilloscope . . . 30

5.2 4D module simulation test setup. . . 31

5.3 Probe bias circuit of the m-NLP system. . . 32

5.4 Shows the data readout from mother, with and without con- nection to the daughters. . . 33

5.5 The test setup during the check-in tests. . . 34

5.6 G-Chaser mounted to a shaker. . . 35

(12)

List of Tables

2.1 Floating point components [19]. . . 10 2.2 Effective range of IEEE floating point numbers [19]. . . 11 4.1 The Packet structure for the Daughters with 4, 2 and 1 probe

respectively, as well as the hardware packet sent by all daughters 24 4.2 Shows SPI sample rate, fspi depending on the numbers that

probes that a daughter has . . . 25 6.1 Total measured time for the read and write functions in sec-

onds, at100 MHz and 160 MHz . . . 40 6.2 Shows sample rate through the TMS570, and the calculated

bit rate incoming and outgoing data. . . 41 6.3 Shows the SPI sample rate, depending on the numbers of

plasma parameters calculated in the science routine. The bolded row emphasizes the most likely mission setting. . . 43 6.4 Results from science routine performance test, and the ra-

tio between the measurements with and without FPU for the given clock frequency. . . 44 6.5 Shows tmw for different packet structures, at 100 MHz and

160 MHz.. . . 45 6.6 Measured code execution time for five different least squares

methods in Matlab. . . 46 6.7 Measured code execution time for all possible least squares

methods in C. . . 47 6.8 Shows the total measured time from optimized science routine

performance test. . . 49 7.1 Shows the data flow for all possible bottlenecks within the

system.. . . 50

(13)

7.2 The table shows the sample rate, fsci, for all permutation of the parameters. The colors of the mask indicate the number of parameters calculated. The table also shows the relation between the FPU sample rate and the non-FPU sample rate . 51 7.3 Shows the relation between the science unit sample rate and

the corresponding SPI sample rate limit, ffsci

spi. . . 51 7.4 The table shows the run time of code in Matlab and in C, and

also the speed increase for the converted code. . . 52 7.5 Shows the execution time of the original science routine di-

vided by the optimized science routine . . . 52

(14)

1 | Introduction

1.1 Motivation

4Dspace is a strategic research initiative at the University of Oslo whos re- searched is focused on instabilities and turbulence in the ionosphere. For this, satellites and sounding rockets are used for in-situ measurements. To take a sounding means to take a measurement [1], and this is what a sound- ing is designed for. One of the instruments, a multi-Needle Langmuir Probe (m-NLP), collects charged particle and use the collected current to calculate different plasma parameters[2]. These calculations can be used for data re- duction at the cost of increased computational time. The m-NLP system has been flown on multiple spacecraft, both satellites and sounding rockets. The measurement principle is the same for both types of spacecraft, but the con- trol system is different. A satellite mission can last for month or years, while a sounding rocket mission only lasts for minutes. Because of the extended duration of a satellite mission, compared to a sounding rocket a command- based system is used to control the system from earth. The m-NLP systems on satellites, therefore, use a real time operating system (RTOS) to cope with the commands, making it possible, e.g. to turn on or off the m-NLP system during uninteresting areas[3]. Unlike the satellite system, the sound- ing rocket system is more streamlined, and the system is active the whole mission. One downside to both the current systems are that they are only able to measure along the trajectory of the spacecraft. To increase the spa- tial resolution, a sub-payload concept has been developed. When the correct altitude is reached multiple sub payloads with the m-NLP system is released, and so a bigger picture of the plasma can be drawn. The concept has been flown once before but without a successful release. It is planned to be flown on the sounding rocket Investigation of Cusp Irregularities (ICI)–5, a sound- ing rocket lead by University of Oslo (UiO). ICI-5 is part of The Grand Challenge Initiative (GCI), a multi-sounding rocket collaboration between Norway, Japan and the USA. 8 rockets are planned to be flown as part of GCI[4]. One of these rockets is G-Chaser, a student rocket with students

(15)

from nine different institutions. UiO will fly the sub-payload concept as a trial before ICI-5, and the possibility to be a part of this mission as a student is the motivation for this thesis.

1.2 Goals

The goals of this thesis can be divided into four different main goals. The first goal is together with other students, and staff at UiO to test and develop a working module that can be flown on G-Chaser. The main focus for this goal is in the development on the software, specific to G-Chaser, but it will also include testing hardware and software created by others. Because the development of the system is a group effort, I will during the thesis specify which parts of the system has been created by other people. The system is currently designed with a TMS570ls1224 microcontroller init (MCU). The central processing unit (CPU) of the microcontroller is an Arm Cortex R4F.

This CPU has an embedded floating point unit (FPU), which is essential for the next goal.

The second goal for this thesis is to characterize the full data flow of the system. What this entails is to define all possible bottlenecks, and to define the maximum throughput for each bottleneck.

The third goal for this thesis is to extract the so-called science routine, which is a part of the software designed for satellite NORSAT-1, that calcu- lates the plasma parameters, and to define if these calculations could theo- retically be executed during flight, on G-Chaser. If so, is there a need for an FPU, or can the calculations be performed in pure software?

Matlab has a program called Matlab coder which can convert Matlab code to C code. The last goal is to look at the capabilities of Matlab coder and to define if it is possible to do partly system design in Matlab, more specifically a least squares fit calculation, which is the base calculations of the science routine.

1.3 Thesis Outline

Chapter 2 covers the theoretical background needed for this thesis. Chapter 3 gives a full system over, from the top-level overview of G-Chaser, down to the m-NLP system. Chapter 4 covers the design choices made by me for the m-NLP system. Chapter 5 covers the testing and integration done for the m-NLP system at UiO, the 4D-module at Andøya Space Center (ASC), and for G-Chaser at Wallops. Chapter 6 covers the theoretical maximum

(16)

data flow through the system, the science routine speed measurements, and the Matlab coder testing. Chapter 7 covers the shows the final results from chapter 6. Chapter 8discusses the development of the m-NLP system and it discusses the results shown in chapter 7. It also mentions some future work.

Chapter 9concludes this thesis.

(17)

2 | Theoretical Background

This chapter will cover relevant theoretical background that was needed for this thesis.

2.1 Plasma, space weather and the Ionosphere

Since Guglielmo Marconi received the first trans-atlantic radio signal at the beginning of the 20th century to today’s satellite communication, wireless sig- nals have become an integral part of the world today [5]. However, the signals may be affected while propagating through the ionosphere. The ionosphere is a part of the atmosphere containing partially ionised gas, i.e. plasma, as well as neutral gas which exceeds the ionised gas from which the ionosphere is named [6]. These effects can be signal absorption, scintillation, Faraday rotation and bandwidth decoherence [7]. The ionosphere ranges from 80 km to 1000 km [8] and the ionization is mainly due ultra violet radiation from the sun [9].

Plasma is the fourth state of matter and is essentially ionised gas. Heating a solid enough will create a liquid. Heating a liquid will produce gas, and heating a gas will produce plasma. What happens is that the atoms in the gas are heated to a point where the atoms will collide, and the electrons of the atom are knocked away. This separation of ions and electrons will create currents, electric fields and magnetic fields. Langmuir gave this state of matter the name "plasma" during his research on ionised gas [10].

The plasma density and temperature of the plasma in the ionosphere is hugely dependent on different factors. Figure 2.1 shows a typical plasma density profile depending altitude both during daytime and nighttime, but there are other factors such as season, solar activity and geomagnetic latitude.

(18)

Figure 2.1: A typical electron density profile both during night and daytime [9].

2.2 Theory of Langmuir Probes

In 1926 H. M. Mott-Smith and Irving Langmuir released the paper "The Theory of Collectors in Gaseous Discharges" introducing the concept of what is known as a Langmuir Probe [11]. By placing an electrode in plasma and biasing it to a reference potential different to the potential of the plasma, either an ion or electron current will arise depending on if the conductor is positively or negatively biased with relation to the surrounding plasma. This current can then be used to calculate electron density, ion density, electron temperature, the floating potential of the spacecraft, and the potential of the plasma [2].

Depending on the voltage of the probe with respect to the plasma poten- tial, the collected current can be plotted against the bias of the probe, and it will look somewhat like Figure 2.2. This I-V curve can be divided into three different regions as shown; the ion saturation region, electron retarda- tion region and the electron saturation region. In the saturation regions the collected current is dependent on the plasma density, and in the retardation region, the collected current is dependent on electron temperature [12]. In Figure 2.2 Vf is the potential of the probe when the total current to and from the probe, both from ions and electrons, is equal to zero. Vp is when the potential of the probe is equal to the potential of the plasma. When this is the case, there is no electric field between the probe and the plasma,

(19)

and the collected current is only dependent on the thermal velocities of the particles. Because the electron mass is much smaller than the mass of an ion, its thermal velocity is higher and this the electron is more likely to hit the probe. The current collected is therefore predominantly and electron current.

When the probe has a potential in the different regions shown in Figure2.2 the collected current can be described with different equations. The following equations explaining collected currents is taken from Bekkeng [2] and F.F.

Chen et al. [13]. When in the ion saturation region the electrons are repelled, and if the conditions are typical ionospheric plasma the ion current for a cylindrical probe with infinite length can be given by:

Ii 'nieAiVi s

1 + kBTi

miVi2 + 2eV

miVi2 (2.1)

where ni is the ion density, e is the charge of an electron, Ai is the cross- sectional area of the probe that is exposed to the plasma, Vi is the ion flow velocity with respect to the spacecraft kB is the Boltzmann constant, Ti is the ion temperature, mi is the ion mass and V is the potential of the probe with respect to the surrounding plasma.

In the electron retardation region, the electron current can be given by:

Ie=neeAe

rkBTe

2πmeeeV /kBTe (2.2)

where ne is the electron density, Ae is the area of the probe and Te is the electron temperature.

In the electron saturation region, the electron current can be given by:

Ie =neeAe

rkBTe

me r

1 + eV

kBTe (2.3)

for a cylindrical probe.

When inserting an electric probe into plasma, a sheathing effect can arise.

This happens when said probe is placed in a plasma and has a potential not equal to the plasma potential. Because particles with opposite charge from the conductor will be attracted and the particles with the same charge will be repelled, the density of the oppositely charged particles in an area around the conductor will increase. This area is dependent on the Debye length, which is the distance from the conductor to were the electric field of the probe is cancelled out [2][13]. This affects measurements and must be taken into consideration. For further explanation see Bekkeng et al.[2], chapter 3.1.

(20)

2.2. THE MULTI-NEEDLE LANGMUIR PROBE SYSTEM 9

0

Va (Volts)

I (amps)

Electron Saturation (geometry dependent) Electron

Retardation

Ion Saturation (geometry dependent)

V (volts) Vf

Floating potential Vp

Plasma potential

Figure 2.2: Shows the IV-curve of a Langmuir probe in a plasma. By Barjatya (2007).

the concern stated in Section 2.1.3 is no longer valid. A Langmuir probe can either operate on a fixed bias voltage, or it can be swept. The m-NLP system utilizes the latter, which is the key to its high spatial resolution (Bekkeng 2009). The probes are biased at different levels to obtain the IV- curve in the electron saturation region shown in Figure 2.2. The common logarithm of the current in this region will be a straight line as function of the applied voltage, and hence only two probes at different voltages are necessary to obtain the IV-characteristics. Having the electron saturation region characterized makes it possible to calculate both the electron density and the floating potential (Bekkeng et al. 2013).

The problem with the fixed bias technique is that the probes must be operated in the electron saturation region. Since the probes are biased with respect to the floating potential of the frame, the voltage of the probe with respect to the plasma potential will decrease if the floating potential of the frame decreases. At the point where the bias voltage of the probe is no longer greater than the difference between the plasma potential and the frame potential, erroneous measurements will be made. It is therefore essential to control the floating potential of CubeSTAR to ensure confident measurements of the electron density.

Figure 2.2: A typical I-V curve of a Langmuir Probe placed in Plasma [14].

2.3 The multi-Needle Langmuir Probe Concept

When using Langmuir Probes, one can either use a probe with a sweeping potential or use multiple probes with a fixed reference voltage. There are pros and cons to both sides. A sweep over a certain range can create an I-V curve as similar to Figure2.2. This curve can then used to calculate different plasma parameters by fitting the curve to equation2.1,2.2and2.3. However, one full sweep will create one curve or one sample for plasma parameter calculations. With a sweep time of about 1 second and with a spacecraft in LEO which might have a speed of about 7km/s this is not a viable option when higher resolution is needed [2]. An alternative to sweeping over the wanted voltage range is using fixed potential in the electron saturated region on multiple probes. This provides a higher resolution as there is no need for a sweep time, but it only measures relative density compared to a sweeping probe which can measure absolute density [2].

Equation 2.3 describes the collected current for a cylindrical probe in plasma with a radius significantly smaller than the Debye length. This equa- tion can be expanded for verbosity to the following:

Ic=nee

rkBTe

2πme2πrl 2

√π r

1 + qV

kBTe (2.4)

wherene is the electron density, e is the electron charge,kB is the Boltzmann constant, Te is the electron temperature,me is the mass of the electron, r is the radius of the probe andlis the length of the probe, andV is the potential of the probe.

(21)

Squaring this expression will give the following:

Ic2 = kBTe

2πme(neq2πrl)24

π(1 + qV

kBTe) (2.5)

which can be rearranged to Ic2 = 2kbTe

me (neq2rl)2+ 2q

me(neq2rl)2V. (2.6) This creates two terms, one independent of the electron temperature,Te, and one independent of the probe potential,V. Therefore if more than one probe is used to measure at different potential within the electron saturated region, the different current expression for each of the probes can be subtracted from each other which gives rise to a term with only the electron density as an unknown factor, shown as such:

Ic22 −Ic12 =2kbTe me

(neq2rl)2− 2kbTe me

(neq2rl)2

+ 2q

me(neq2rl)2V2− 2q

me(neq2rl)2V1

(2.7)

∆Ic2 = 2q

me(neq2rl)2∆V (2.8)

and the electron density will by given by ne=

r K∆Ic2

∆V (2.9)

where K is the constant

K = me

2q(q2rl)2. (2.10)

When ∆I∆Vc2 is known the plasma potential can be calculated by:

Vp = b

a +Ve (2.11)

where a and b are the coefficients for the calculated line ∆I∆Vc2 in the form ax+b andVe is a correction factor that is dependent on the electron density.

(22)

2.4 Least Squares and Coefficient of Determi- nation

Section 2.3 explained the theory behind the m-NLP concept, and to achieve the relation ∆I∆Vc2 only two probes are needed. However, this does not give any error-margin. Using three or more probes provides the ability to calculate a goodness of fit (GOF) of the linear fitted line [2]. For G-Chaser, as well as earlier m-NLP missions, four probes have therefore been used.

To fit the line the linear regression method least squares have been used.

This finds the best fitting line, f, through a set of observations by find- ing the smallest sum of the squared residuals1 from each observed point to the approximated line [15]. It is most common, and it makes for an eas- ier calculation when using the vertical offset for each point, instead of the perpendicular.

The coefficient of determination,R2, is an important measurement when it comes to line fitting. Devore and Berk defines it as "It is interpreted as the proportion of observedy variation that can be explained by the simple linear regression model (attributed to an approximate linear relationship between y and x" [16]. What this means is that R2 tells something about how well the fitted line describes the observed data, from 0 to 100 percent. It is given by:

R2 = 1−SSE

SST (2.12)

where SSE is the sum of squared errors and SST is the sum of squared total.

Better explained; SEE is the sum of each residual squared, and SST is the total squared sum of each residual about the mean value of all observed values[16]. See figure 2.3 for a visual representation of the SSE and SST.

R2 can be rewritten in the form of:

R2 = (

n

P

i=1

(xi−x)(y¯ i−y))¯ 2

n

P

i=1

(xi−x)¯ ×

n

P

i=1

(yi−y)¯

(2.13)

and this is the form that is used in this thesis [16][18]. Herexiis the measured x values from 1 to n, x¯ is mean value of all measured x values, yi is the measured y values from1 ton and y¯is mean value of all measured y values

1A residual is the distance from an observed point to a corresponding predicted point

(23)

(a) SST and the mean value of all observedy values

(b) SSE and the fitted linef

Figure 2.3: R2 equals one minus the sum of red squares divided the sum of the blue squares. (cc-by-sa) [17]

2.4.1 Floating Point

Floating point in computer science and mathematics is a way of representing a number. It refers to the radix point being able to "float", which means that numbers before and after the radix point may vary. It is what is often is referred to as "Scientific Notation" [19]. IEEE 754 is the standard for floating point calculations in arm CPU’s. According to the standard, there are two different data types, single precision and double precision. Single precision stores the number using 32 bits, and double precision uses 64. The floating point has three components, the sign, the exponent and the man- tissa[19]. Table2.1shows how many, and which bits are used for the different components for the two data types.

Table 2.1: Floating point components [19].

Sign Exponent Mantissa Single Precision 1 [31] 8 [30-23] 23 [22-00]

Double Precision 1 [63] 11 [62-52] 52 [51-00]

The sign is one bit, telling if the number is positive or negative. The exponent field stores the exponent as an integer.However, it must be able to store both positive and negative integer. For the IEEE 754 standard, this is done by adding an offset to the number. For single precision this offset is 127, meaning that storing the integer 127 in the exponent corresponds to the exponent of the floating point number being zero. For double precision,

(24)

the exponent is 11 bits, with an offset of 1023. For both data types, the case with 1’s or 0’s are reserved [19]. The mantissa is the fraction bits of the number. The numbers are usually in normalized form, which means that the radix point is placed after the first non-zero digit. When using base two, this leading digit will then always be 1. This means that the first bit does not need storage in the bit field, and the actual number of the mantissa is 224 for single digit precision, but using only 23 bits of memory. The same is the case for double precision with a mantissa of 253 with 52 bits in memory.

The exception to this is when all the exponent bits are set to 0. The number is then interpreted as a denormalized form. What this does is interpreting the number with form (−1)s×0.f ×2−126, where s is the sign digit and f is the fraction digits, but for denormalized form, the number loses precision the smaller the number becomes [19].

Table 2.2: Effective range of IEEE floating point numbers [19].

Binary Decimal

Single Precision ±(2−2−23)×2127 ≈ ±1038.53 Double Precision ±(2−2−52)×21023 ≈ ±10308.25

2.4.2 Floating point unit

Floating point operations can either be done in software or by using dedicated hardware [20]. Some processors have such hardware for doing floating point arithmetic, a coprocessor called a FPU, and for the TMS570LS1224 which has an Arm Cortex-R4 processor, this is the case. This hardware extension is for arm processors called a vectored floating point unit (VFP) [21]. The VFP have a dedicated instruction set for mathematical operations. There are multiple versions of the VFP extension, and the Cortex-R4 uses the VFPv3- D16 architecture. The D16 suffix indicates that this specific architecture extension only has 16 double precision registers compared to the default 32 registers for VFPv3. These 16 registers can either be used as 16 registers for double precision floats, 32 registers for single precision floats, or any other combination of single and double precision floats.

(25)

3 | System Overview

Within G-Chaser is the 4D-module. This is UiO’s and ASC’s module. It can be divided into the main-module and the sub-payloads. The main module is a carousel holding the sub-payloads during launch, as well as electronics used to communicate with the sub-payloads. The sub-payloads can be divided into the radio electronics and the measurement electronics. The main-module and the radio board of the sub-payloads are designed by ASC. The hardware and the base design of the software are designed by electronics laboratory (ELAB), which is a group of engineers at UiO. This chapter will give a system overview, which was needed to be understood before making design choices explained in chapter 4. The main module will from now on be referred to as the "mother" and the sub-payloads as "daughters"

3.1 Top level System Overview

G-Chaser is a The National Aeronautics and Space Administration (NASA) funded student rocket, with students from nine different institutions partic- ipating, and coordinated by the Coloradio Space Grant Consortium1. UiO together with ASC, has a mission of measuring plasma parameters in the ionosphere in 3D-space. The measurements are done using the m-NLP prin- ciple explained in section 2.3, but most previous missions have only had measurement equipment installed on the payload and is therefore only able to measure along the trajectory of the spacecraft. To be able to measure with a greater spatial resolution a daughter concept has been developed.

The m-NLP system is installed on multiple daughters that are ejected from the main-payload making it possible to create a bigger picture of the plasma.

In the payload of G-Chaser, NASA has a on board computer (OBC) which receives data from the 4D-module and transmits this to earth over radio. Within the module, there is installed a mechanical carousel holding

1The Norwegian Space Centre provided the funds for the development 4D module for G-Chaser

(26)

six daughters. UiO also has their own OBC connected to NASA’s with a physical connection. Each of the daughters are connected to UiO OBC via radio after release from the main-payload.

3.1.1 Mission overview

After launch, the rocket will rise to an altitude of 65km before the release se- quence of the daughters starts. At altitude, the two doors of the carousel will deploy, and the carousel with the sub-payloads will start to spin. Through centrifugal force, from the payload spinning, the daughters are released in pairs shown in figure 3.1.

Figure 3.1: Daughters being release from the main-payload. Illustration by Andøya Space Center.

The daughters are equipped with a micro switch controlling power. The space within the carousel is tight enough so that the micro switch is held in place by the floor. After a daughter is deployed the micro switch is released, and power is turned on. When a daughter is powered mainly two things happen; the daughter tries to establish a connection between the mother and itself and a measurement startup sequence begins. This startup sequence is explained in more detail in section 4.4, but in short, the probes are released and are biased to correct potential, and the system starts its in-situ measure- ments. The electron emitter is then turned on. The data from the daughters is transferred wirelessly to the 4D-module, then to the G-Chaser OBC and down to earth, shown in figure 3.2.

(27)

Figure 3.2: Top level system overview, showing the data flow through the system [22] [23].

3.2 Radio Communication

This section will explain a simple version of radio communication protocol designed by ASC.

After powerup, the mother will start to send broadcast messages to the daughters regularly. This broadcast is received by the daughters after release, and the message contains timing information used for each daughter to es- tablish when to send data to the back. The mother uses a total of 132.5ms to cycle through all the six daughters and receive their current data. Each daughter has a 22ms transmission window within each broadcast window, for data transmission.

Each time window a daughter will send 13 32-byte packets. The first packet is hardware data from ASC’s radio board. The 12 subsequent packets will be 4 bytes of header data from ASC and 28 bytes of data coming from the serial peripheral interface (SPI) from the m-NLP system.

3.3 The m-NLP system

The m-NLP system consists of two main parts used for the in-situ measure- ments. A printed circuit board (PCB) inside the daughter, and an "antenna- deck" which is exposed to the environment. The following sections will de- scribe the m-NLP system.

(28)

3.3.1 The Microcontroller Unit

The MCU used for the m-NLP system is from the TMS570 family Texas Instruments, more specifically the TMS570ls1224. It is a high-performance microcontroller with a large array of functionalities. It uses an ARM Cortex R4F CPU and can run at frequencies up to 160MHz[24]. It has two built-in Analog-to-Digital Converter (ADC) which is used to measure hardware sta- tus. It has multiple communication protocols; SPI used for data acquisition, SCI/UART used for a command interface and an I2C used for controlling an electron emitter on board. It also has a coprocessor called high end timer (N2HET) used together with a dedicated direct memory access (DMA) mod- ule called high-end transfer unit (HTU) which is used to sample data to the TMS570. There are also other DMA modules used to send data to the SPI.

The F-suffix in R4F refers to that the CPU has an FPU[25]. The FPU can be enabled or disabled during build time which is essential for this thesis.

The software development tools used to the MCU is code composer studio (CCS) and hardware abstraction layer code generator (halcogen). CCS is the integrated development environment (IDE) used to develop code, and halcogen is a tool that generate hardware abstraction layer device drivers for the code used in CCS with a graphical user interface.

3.3.2 Electron emitter

To control the platform potential of our spacecraft an in-house built electron emitter is used. This emitter is placed on the antenna-deck with the probes.

The emitter was initially designed and developed as part of a master thesis [26], and has recently been adopted to fit on the daughter platform.

The base components in an electron emitter consist of a cathode which acts as a source of electrons, and an anode which is used to accelerate the electrons out of the emitter. Optionally a collimator can be added if a more focused electron beam [26].

Figure 3.3: A simplified electron emitter with a cathode, anode and a colli- mator. The gray represents a stream of electrons [26].

To be able to remove electrons from a metal the electrons need more kinetic energy than the energy from the oppositely charged ions that are

(29)

holding them back. This kinetic energy can be provided through thermionic emission, field emission, photoelectric emission and secondary emission. The emitter on the daughter uses thermionic emission because of its simplicity.

In thermionic emission, the electrons are provided with energy through heat- ing of the metal. This can be done either directly, e.g. by running current through the cathode or indirectly by placing a heat source close to the cath- ode [26]. On the daughters, the cathode is directly heated.

By placing an apertured anode as shown in figure 3.3 which is posi- tively biased relative to the cathode, an electric field between the anode and the cathode will accelerate the electrons towards the anode and is released through the aperture [26].

3.3.3 Measuremeant electronics

The most essential part of the electronics on the daughter is the measurement circuit. As explained earlier the probes must be biased to the wanted poten- tial, and this is done using a four channel digital-to-analog converter (DAC) controlled by the MCU. The following sections will explain parts of the elec- tronics used in the data acquisition, and the data flow from the through the system.

AD7768-4

The ADC that is used to sample the data from the m-NLP’s is an ad7768-4.

This is a Sigma-Delta (Σ−∆) ADC, which is in its core an oversampling ADC [27].

The Σ−∆ has three different stages of operation, a Σ−∆ modulator, a digital filter and a decimator. The modulator samples the signal with a higher frequency than the band of interest and also shapes the signal so that noise is shifted towards the higher frequencies of the sampled signal. When an analog signal is sampled with a frequency of fs, the root-mean-square (RMS) quantization noise is given by:

√q

12 (3.1)

where q is the value of the least significant bit (LSB) [28]. The noise is not dependent on fs, meaning that increasing the sampling rate will distribute the constant noise over a wider frequency band [28].

Following the modulator is a digital low pass filter that filters away the shifted noise. The remaining signal now only contains frequencies within the band of interest and so the last step is the decimation of the signal [28]. When

(30)

talking about decimation, it is in this thesis used as act of reducing samples to the output by keeping only a certain number of samples and discarding the rest.

The ADC runs on an external master clock (MCLK). Two digital clock signals are created from MCLK, the modulator clock and the data clock (DCLK). The frequency of the modulator, fmod, is decided the division of MCLK but is limited by the power mode of the ADC. The power mode of the ADC can be set to fast mode for high sampling rate and power consumption, median for medium sampling rate and power consumption and eco for low sampling rate and power consumption. The MCLK division can divide the incoming MCLK by a factor of 4, 8 and 32. The other clock derived from MCLK is the data clock (DCLK) which is the clock for the outgoing data from the ADC to the microcontroller. The division factor used to create DCLK can be none, 2, 4 or 8 [27].

When choosing the values of the different parameters the most important thing that must be known is the total sampling rate, and what power limi- tation exists if any. The datasheet has a recommendation for power modes for ranges of frequency for fmod [27]. For the daughters, the sampling rate does not exceed the point of 32kSPS and so this is not an issue. When the sampling rate is decided, it can be achieved by varying the MCLK division factor and the Decimation Rate. The total sampling rate is then decided by

fout = fmod

Decimation Rate (3.2)

wherefmod is given by M CLK_DIVM CLK . When the sample rate is decided one can also decide the speed of DCLK which has to be fast enough to output all the bits of a sample before the next sample. The output for each channel is 32 bits, containing 8 bits of header data and 24 bits of sampling data. When outputting data, the ADC has two different options, either all the data can be shifted out on the same output data line, or each input channel can have its separate output line [27]. In the daughters, the second format is chosen, and the minimum speed of DCLK is then given by:

DCLKmin =Samples per second · 32bit (3.3) The last outgoing line from the ADC other than DCLK and the data lines is the data ready (DRDY) [27]. This line will indicate the start of each new sample and will be set one clock cycle before the first bit of a new sample, and the falling edge will indicate the start of the new sample, meaning that it will stay high for one clock cycle of DCLK.

(31)

High-End Timer and the High-End Timer Transfer Unit

The N2HET is a programmable timer module. It uses a dedicated assembler language with an instruction set of 30 different instructions [24]. The pro- gramming is done through a dedicated IDE which assembles the code into a C program file and a header file [29]. The N2HET program used in the system is made Halvor Strøm at ELAB

For the N2HET there are a few timing "concepts" which is essential to understand. The high resolution (HR) clock which is the clock that the N2HET unit uses, derived from the main clock of the Hercules. The other is the loop resolution period (LRP) which is the longest time that a given program can use to complete before a reset. The program time can vary if it uses conditional statements, and the longest possible route through the program must be shorter than the LRP. The last instruction in an N2HET program must use a branch instruction to jump to the first instruction in the program and then start executing the program over when the LRP starts again.

As stated earlier any given program will always start with the same in- struction each loop cycle and can then branch out to different instructions.

The program used in the daughters always starts with checking for a rising edge on the DRDY pin. If this is the case, a new sample is ready from the ADC. The program then waits for a falling edge on the DCLK pin, before shifting in the values of all four data channels. A note to make is that the N2HET program in the daughters must have an LRP shorter than half of a clock cycle of DCLK. If not, the program will not always be able to detect the rising edge of the DRDY pin, and not all data would be sampled. Figure 3.4 shows how one is not able to detect the rising edge. The LRP curve in figure3.4is shown high when it is sampling a bit, and low when it is listening for a falling edge on DCLK or a rising edge on DRDY.

When a sample is fully buffered a 16 bit sample counter is added, before an interrupt is generated for the HTU. The HTU is a dedicated DMA module for the N2HET. When the interrupt is received by the HTU, the data and the counter is moved from the N2HET to the microcontroller random access memory (RAM).

(32)

DCLK

LRP DRDY

Does not detect DRDY low to high Shifting in last bit of a sample

(a) Shows an N2HET program with a LRP larger than half of a DCLK cycle.

DCLK

LRP DRDY

Detects DRDY low to high Shifting in last bit of a sample

(b) Shows an N2HET program with a LRP smaller than half of a DCLK cycle.

Figure 3.4: Shows two different LRPs of the current N2HET program.

Data downsampling in the TMS570

The data rate from the HTU must be reduced in software to match the specifications on SPI-line. In the SPI communication, the TMS570 is the slave, and have to send data on request from the master, which is ASC’s radio board. The HTU transfers data directly to the MCUs RAM without any response from the CPU, and the same is the case for outgoing data on the SPI line. Since the CPU only can listen to the peripherals, temporary buffers both for incoming and outgoing data are used to avoid data corruption.

This is because the same memory location must not be read and written to simultaneously. Between these temporary buffers is a larger buffer which the CPU can read and write to. These buffers and the data flow between them is shown in Figure 3.5.

The two leftmost buffers in figure 3.5 will from now be referred to as the "receive" buffers, the middle will be referred to as the "sample" buffer, and the rightmost the "transmit" buffer. The HTU alternate between filling receive buffer A and B. When one is full an interrupt is given to CPU, and the CPU moves the data from the full receive buffer to the sample buffer, before the HTU fills the other. The SPI uses this same principle to move

(33)

CPU Read/HTU Write Buffer A

CPU Read/HTU Write Buffer B

CPU Read/Write Buffer

CPU Write/SPI Read

Buffer Outgoing SPI data Samples from HTU

Figure 3.5: This is the buffers used to handle incoming and outgoing data from the MCU, and the data flow between them.

data from the transmit buffer the the SPI. When the SPI has read half of the transmit buffer, an interrupt is given to the CPU. The CPU can then overwrite these memory locations, while the SPI reads the other half. One packet over the radio contains 28 bytes of data from the m-NLP board. The size of the sample buffer must be large enough to store the data sampled by the ADC and N2HET between each broadcast of the radio, 132.5 ms. When moving data from the sample buffer to the transmit buffer a downsampling of the samples is performed in software. The downsampling rate is calculated and adjusted during flight. This downsampling will be explained in more detail in section 4.1.

(34)

4 | System Design

A big part of this thesis has been in the creation of the m-NLP, with a focus on the software. What this entails is the measurement startup sequence for each of the daughters. It also includes the downsampling of the samples from the ADC and N2HET to the SPI and finding a suitable sampling speed for the ADC. This chapter will cover how these functions work within the more extensive system explained in chapter 3.

4.1 Downsampling function design

The ADC works with limited configuration possibilities. Therefore it was not possible to match the output data rate from the ADC to the SPI. This difference in data rate is given by:

Rin/out = Gin

Gout (4.1)

whereGin is the incoming data rate from the ADC, and Gout is the outgoing data rate over the SPI. To match the outgoing data rate, a downsampling function was created. Since the first implementation of this downsampling function, some changes have been done to the specification of the SPI inter- face. Both approaches will therefore be explained, the older version and the newer version respectively.

When the downsampling function where designed, the specification for the SPI had some changes to the current version of the onboard software.

Therefore both calculations will be explained, the older and the newer version respectively.

The outgoing data rate of the older version was not constant. The broad- cast window was only 120 ms, and the radio sent as many packets as possible each window, so the number of packets would vary each window. This meant that the downsampling rate had to be varying as well, to be sure that the sample buffer in the MCU did not overflow, or was read before new samples

(35)

had arrived. The number of packets would vary between eight and twelve packets in each window. To calculate the ratio as evenly as possible, the ratio should be calculated with an even time distribution, once per broad- cast window. The best option would be to calculate the ratio each broadcast window, but the CPU only gets an interrupt every fourth package, indepen- dent of the broadcast window. So the next best option was to calculate the ratio after the first interrupt from the SPI, in a new broadcast window. To detect a new broadcast window, a timer was set each interrupt, and if there were more then 20 ms since the last interrupt, it would be a new broadcast window. The last step that had to be done was to round the ratio calculated to the nearest integer to be able to pick out the correct samples. The actual calculation done is then given by:

Rin/out =round(Nin

Nout) (4.2)

where Nin is the incoming data since the last calculation, and Nout is the outgoing data since last calculation. In the latest and final version of the broadcast protocol, ASC made the change so that a constant twelve packets would be sent each broadcast window, and so the calculations could be done each third interrupt instead of using a timer. It should be noted that both the incoming and outgoing data now was constant, but the calculation had to be done, to account for the rounding offset that was needed for downsampling.

4.2 Packet structure

Each packet sent to the 4D module is 32 bytes. 28 bytes is our data read from the SPI, and four bytes are ASC’s header, which contain there sync word the packet number. Two daughters are equipped with four probes, two with two probes and two with one probe. Therefore the packets have been customized for each of the pairs of daughters. Table 4.1shows the individual bytes of each packet sent by the daughters, but will be further explained in this section.

To more easily be able to sift through, and post-process the data from the daughters, all the packets contains a one-byte header, to indicate the start of our data. This word is in hexadecimal eb. The next byte is the ID of the daughters from one to six. Then there is a difference in the packet structure depending on if it is a raw data packet or a hardware status packet.

For all data that is larger than one byte, the most significant byte is sent first. If it is a raw data packet, the next two bytes are the sample counter for the first sample in the packet. Then the rest of the packet is the sampled

(36)

raw data. The daughters fly with a different number of probes, and so only the data from the channels connected to a probe is packaged and sent to the transmit buffer. Therefore, a sample with data from several probes will contain more data, than a sample from fewer probes. In table 4.1, the same color indicates the same sample, except for the daughters with one probe, because each sample is only from one channel. The last packet a daughter send each transmission window is a hardware packet.

The first byte after the UiO header is a byte containing the status of the antenna detect buttons. The first bit from the right is the current status of the detect button detecting the top probes. The third bit is the status that the same button had during initialization of the system. Bit five is the current status of the bottom probes detect button, and the seventh button is the initial status of the bottom probes detect button. The next byte is the current calculated sample ratio. Then the following bytes are voltage and current values on the PCB measured by the internal ADCs in the TMS570.

The last two bytes in the hardware packet is a synchronization word to indicate the end of data transmission from the daughter. This word is abab in hexadecimal.

(37)

0 1 2 3 4 5

6 Antenna Byte

7 Sample Ratio

8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

31 Sample CH4 Sample CH3 Sample CH4 Hardware Sync word Sample CH2 Sample CH3 Sample CH4 Egun Fillament current Sample CH3 Sample CH2 Sample CH4 Egun Fillament Voltage

Sample CH4 Sample CH3 Sample CH4 Bias Ch4

Sample CH1 Sample CH1 Sample CH4 1V2 Current

Sample CH2 Sample CH3 Sample CH4 Bias Ch2

Sample CH3 Sample CH1 Sample CH4 Bias Ch3

Sample CH4 Sample CH3 Sample CH4 3V3 Current

Sample CH1 Sample CH1 Sample CH4 Bias Ch1

P12V

Sample CH2 Sample CH3 Sample CH4 N12V

Sample CH3 Sample CH1 Sample CH4 5V Current

Sample Counter Sample Counter Sample Counter Sample CH1 Sample CH1 Sample CH4

Packet Number Packet Number Packet Number Packet Number UiO Sync word UiO Sync word UiO Sync word UiO Sync word Hardware Packet ASC sync word ASC sync word ASC sync word ASC sync word Byte Data Packet 4 probes Data Packet 2 probes Data Packet 1 probe

Table 4.1: The Packet structure for the Daughters with 4, 2 and 1 probe respectively, as well as the hardware packet sent by all daughters

4.3 ADC Sampling rate decision

When deciding the speed of the ADC there were a few factors that had considered. It had to sample faster than the outgoing data of SPI, but not so fast that it would overflow buffers with data. The amount of data read over the SPI in the final version of the daughters is 12 packets of data, with each packet being 28 bytes of m-NLP data for each broadcast window. The time from the start of one broadcast window to the next is 132.5 ms. The

(38)

total output bit rate can be given by Gspi= Npbc×Nbpp

tb

≈20 287 bit/sec (4.3) whereNpbcis the number of packets per broadcast window,Nbppis the number of bits per packet and tb is the time of the broadcast window. Each packet contains 24 bytes of sample data, thus the sample rate of the SPI can be given by

fspi=Gspi× Ndbp

Nbpp×Nbps ×Ndpt

12 (4.4)

where Nbps is the number of bits per sample,Ndbp is the number of data bits per packet and Ndbt is the number of data packets per transmission. This is shown for all the daughters in table 4.2

Table 4.2: Shows SPI sample rate,fspidepending on the numbers that probes that a daughter has

Probes fspi 4 249.06 S/s 2 498.12 S/s 1 996.24 S/s

Using equation 3.2 one can calculate the sampling rate of the ADC sampling rate. The lowest possible with an ADC sample rate higher than fspi= 996.24 S/s is1953.125 S/s with the clock provided by the MCU. How- ever, to decrease the offset from the rounding when calculating, percentage- wise, the downsampling the sampling rate was set to 3906.25 samples/s.

This is well within the boundaries to avoid overflowing the sample buffer.

The same sampling speed was set for all the daughters for easier version control.

4.4 m-NLP Probes release sequence

When the m-NLP board is powered the release sequence starts and this section explains this in detail.

On the top side of the daughter is the probe deck. The probes and the electron emitter are mounted to the probe deck as shown in figure 4.2. To fit the daughters inside the carousel of the 4D module, the probes are bent inwards and held against the daughter using a wire, strapped over the probes.

The probes are held down in pairs. Each wire is strapped over a low ohm

(39)

(a) Picture of the top deck, with un- released probes.

(b) Transparent top view of the probe deck to show placement of resistor and buttons.

Figure 4.1: Top view of the probe deck.

resistor on each side of the probe pairs. By running a high current through the resistor, enough heat is created by the resistor to melt and cut the wire.

The probes are mounted to the board with a spring, and when the wire is cut they bounce back up into a released position as shown in Figure 4.2. On the top deck, there are also two buttons, one under probe 1 and one under probe 3. These two buttons are pushed when the probe is held in place. The buttons are used as an antenna-release-detect signal. When the buttons are pushed the circuit is open, but when they release, the circuit closes allowing current to flow, which can be detected by the TMS570.

The system automatically starts on power up when the power button is released. Since burning probe wires, and burning the electron gun filament is a non-reversible action, a five-second timer is set before the release se- quence start. This timer is just a precaution so that if the button is released, e.g. when placing the pucks inside the carousel, the probes do not release instantly. After these five seconds, the actual burning of the wires begins.

To ensure the release of the probes, and speed up the process as much as possible, a more sophisticated function than a hard burn time was devel- oped. Figure 4.3 is a flowchart showing the release sequence for one pair of probes. First, the probe-detect-signal for the switches is read to see if the probes are holding the buttons. If the buttons are released before the burning has happened the probes might have released during the deployment of the

(40)

Figure 4.2: Fully integrated daughter with released probes.

daughters, but it might be the case that the probes have loosened, but the wire has not been cut. This means that there is no way to check if the probes have been released and the burning of the wires is then entirely dependent on a fixed time. In theory, it is enough to burn just one side of the wire, but in some cases, e.g. if the wire is not sufficiently tightened over the resistor, testing showed that both sides should be burned to be sure.

See figure 4.1b for the different numbering used in the following para- graph. If button one is released from the start, resistor one draws current for four seconds. Then resistor three is active for four seconds and since no antenna release detect is possible the sequence continues to the bottom pair.

However, if button one is pushed from the start, a change in the state of the button can be detected, and the release process can be decreased. First resistor one burns for two seconds. If the button is released, the probes can be assumed to be released, and we continue to the bottom pair, if not resistor three is burned for two seconds. If the state button one is not changed this process is executed two more times, before we continue to the bottom pair.

In the case where button one has not yet released, we still continue. We then assume that either the probes have released and the button is stuck, or that more time to burn the wires will not release the probes. If however the bottom probes release, but the top pair has not, the increased force on the top pair from the bottom might put enough strain on the wire to snap.

After the sequence for the top probes is completed, the same sequence for the bottom pair is executed. For the payloads flying with an electron emitter, this is turned on, and the startup sequence is finished.

(41)

Wait until pucks are released from carousel

Is Antenna Detect switch 1 released from start?

Burn Antenna 1, Burn_time Burn Antenna 1, using some

extra clearence time to be sure. Extended_Burn_Time

Is Antenna Detect switch 1 released?

Burn Antenna 3, Burn_time

Is Antenna Detect switch 1 released?

int i = 0; i++;

i <

Burn_tries?

Burn Antenna 3, using some extra clearence time to be sure. Extended_Burn_Time

Repeat the same sequence for bottom pair antennas

Yes

No No No

No Yes Yes

Yes Burn_tries = How

many times should burn wires tried to be cut before continuing Variables to be set:

Extended_Burn_Time = Time to burn wires if switch was released from start

Burn_time = Time to burn the burnwire

Figure 4.3: Flow chart of the antenna release function.

(42)

5 | Integration and Testing

Testing was performed throughout the development of the system. The sys- tem design described in chapter 4 was mostly performed with a prototype version of the 4D module electronics. This chapter will cover the tests and test setups of that were used

5.1 System testing at UiO

ASC provided us with their hardware and software to be able to simulate the full 4D module. Fredrik L. Winje assembled the hardware for the daughters, and initially burned a bootloader onto the microcontrollers to be able to program the chips. Erlend Bårdsen at ELAB created an SPI-to-PC dongle to confirm that our SPI worked as intended, but to confirm that the SPI between the actual radio board and the m-NLP was set up correctly an oscilloscope was used. The timing parameters for the daughters are provided by the mother, during flight, but was hardcoded for this SPI test. Figure 5.1 shows four oscilloscope measurements. Subfigure 5.1a shows the chip select (CS) during two broadcast windows. Each low cycle is the duration of a packet transmission, and a cluster is a full transmission during a broadcast window. Subfigure5.1bis the again CS, but with a smaller change in time per square. It shows all the packets sent from one daughter, during a broadcast window. These tests were done before the latest version of the software were complete, which is why there are not twelve packets sent each window, and the time between the start of each broadcast window is nominally 120ms.

Subfigure 5.1c shows the clock line for one packet, 28 bytes. Subfigure 5.1d shows the data on the slave out master in (SOMI) line. The amount of time where the clock and SOMI are active is ∼80 µs, showing that the TMS570 sends data when the radio board asks for it.

After the SPI connection within the daughters was confirmed, the radio link was to be tested. Ketil Røed did the initial the radio tests and confirmed that the radio was working correctly and that the mother could get a connec-

(43)

(a) CS - Two transmissions (b) CS - One Transmission

(c) SCLK - One Packet (d) SOMI - One Packet

Figure 5.1: The four pictures show four different SPI-communication mea- surements on an oscilloscope

tion with the daughter. The next step was to test the data readout from the mother, sent from the daughter. On G-Chaser, the readout from the mother is through a parallel interface, but this was not yet completed, and so the data readout test had to be done through a serial interface on the mother.

The readout from the mother worked, and it showed correct daughter ID for the one that was connected, confirming connection with the daughter-radio.

The test setup is shown in figure 5.2. It shows two radio boards, one with an antenna connected, the mother and the readout data on the computer. It also shows the spectrum analyzer, with the peak being the frequency of the radio.

The final step was to confirm data flow through the whole system. The m- NLP system was connected to the radio board, and hardcoded packets were sent. The serial interface had a lower data rate than the parallel interface.

The software in the mother, therefore, dropped packets after receiving them from the daughter, but since the data dropped was not data within packets,

Referanser

RELATERTE DOKUMENTER

As part of enhancing the EU’s role in both civilian and military crisis management operations, the EU therefore elaborated on the CMCO concept as an internal measure for

In April 2016, Ukraine’s President Petro Poroshenko, summing up the war experience thus far, said that the volunteer battalions had taken part in approximately 600 military

This report documents the experiences and lessons from the deployment of operational analysts to Afghanistan with the Norwegian Armed Forces, with regard to the concept, the main

Based on the above-mentioned tensions, a recommendation for further research is to examine whether young people who have participated in the TP influence their parents and peers in

Overall, the SAB considered 60 chemicals that included: (a) 14 declared as RCAs since entry into force of the Convention; (b) chemicals identied as potential RCAs from a list of

An abstract characterisation of reduction operators Intuitively a reduction operation, in the sense intended in the present paper, is an operation that can be applied to inter-

HTAi Board members also attend meetings of the Forum (the main discussion of the Forum is held alongside the “winter” meeting of the Board), and leading international experts

There had been an innovative report prepared by Lord Dawson in 1920 for the Minister of Health’s Consultative Council on Medical and Allied Services, in which he used his