## Monthly Archives: March 2014

## Measurement setup for current consumption

Since embedded systems usually operate at constant supply voltage, power consumption measurements can be carried out indirectly, by measuring and monitoring the absorbed current. To this aim, various techniques are available, described in the following.

A very common solution is the series insertion of a small resistance R1 (<10Q) between the power supply and the Device Under Test (DUT),as shownin Figure5.Then, by measuring the voltage drop A^^-Vjacross tgereTistor, current: a can be mcasared mdirestly, usmg Ohm’s law, as

s DV V2 – V

I =——- =- -± 1 (1)

Ri Ri ()

and the absorbed power can be estimated as P = I ■ V0.

Figure 5. Measurement setup with a shunt resistor or amperemeter |

Such measurements, performed during normal operation of the platform, allow monitoring the power consumption when different components of the board are active, and its time dependence. A key role in the reliability of such measurement is played by the voltage measurement system accuracy, the tolerance on the shunt resistor value, the stability of the supply voltage, and the measurement rate, that should be compatible with the analyzed phenomena. Notice that, with such a system, the voltage drop across the resistor reduces the supply voltage powering the DUT,

A similar approach to the resistor method is the direct insertion of an amperemeter, capable of measuring currents ranging from the microampere, the typical absorption of a microcontroller settled in sleep mode, to a few tens of milliampere, corresponding to a full workload (data collection/processing, RF transmissions). Uncertainty contributions may be evaluated using an approach similar to that associated to the resistor method. Notice that, depending on the amperemeter architecture, bandwidth limitations may lead to averaging of the measured current, leading to a loss of information [30].

In order to improve the measurement accuracy, alternative approaches have been suggested. For instance, in [33] a method has been proposed, based on inserting a switched pair of capacitors between the power supply and an ARM7TDMI processor, as shown in Figure 6. By alternatively switching the capacitors CS1 and CS2 with the microcontroller clock, the processor can be powered by the capacitors. By also keeping into account the effect of the on-chip capacitance, the energy consumption can thus be estimated by measuring over time the voltage drops across both capacitors, and by recalling that the energy stored in a capacitance C with a

Figure 6. Measurement setup with switch capacitor

voltage drop V is given by CV2/2. This method removes the offset uncertainty introduced by the resistor method.

Another method to reduce measurement uncertainty has been proposed in [30]. Here, a current mirror has been designed as shown in Figure 7, whose symmetric topology replicates the current absorbed by – the microcontroller. Such replica is then measured, without perturbing the microcontronerpowerabsorptthn. rn thir case accuracy cs limited by tolerantes of the current mirroo componrnts, which shou, dSe carehully matchfdinotder frgurranteean accurate replicationo^he currenf afoorbed bythc DUT.

Figure 7. Diagram and circuit of measurement setup with current mirror |

It should also be observed that the proposed approaches are suitable for node level measurements, but may be unpractical in large WSNs, especially if deployed in large of harsh environments. In this case specific solutions are used. Hergenroder et al. in [28] presented a distributed energy measurement system called Sensor Node Management Device (SNMD), used in conjunction with the SANDbed testbed [34]. SNMD is a measurement system suitable for different sensor node (e. g. MicaZ, IRIS, SunSPOT), providing energy measurement on individual nodes. The current measurement is based on shunt resistor (i. e. 1 Ohm) approach as describedbefore. The resulting systemhasacurrentselectable range up to500mA on0-10 Voltage range with 16bits of resolution and a sampling rate up to 500kHz (20kHz without buffering). A key aspect in distributed measurement, using a SNMD device on each WSN node, is the synchrony between the measurements on different nodes. For this reason on SNMD the time is synchronized using the Network Time Protocol (NTP) that provides an accuracy of 10ms. However such accuracy can be too coarse for specific applications, especially in relation to the high sampling frequency of the node. For this reason the authors in [28] proposed the use of offline algorithms to synch and analyze measurements performed on different nodes.

An effective measure of current consumption of a WSN node during operation is presented in Figure 8.

## Passive Stabilization

Passive methods require no power consumption or external control. The stabilization is achieved naturally through the physical properties of the motion. Two typical methods of passive stabilization are gravity-gradient stabilization and spin stabilization. Gravity-gradient stabilization is based on the natural balancing torque due to the gravity differential at two distinct points of a body at different distances from the center of the Earth. It is a particularly effective way for stabilization of elongated structures at low Earth orbit where the gravity pull of the Earth is stronger. The result of this stabilization method is to keep the long dimension of the structure along the local vertical (the direction to the center of the Earth).

Spin stabilization on the other hand, takes advantage of the natural tendency of the angular momentum vector to remain inertially fixed in the absence of external torques. The term gyroscopic stiffness is often used to describe this property of the angular momentum vector. A child’s familiar spinning top is based on the same principle. Spin stabilization aims to keep the axis of rotation (spin axis) and the angular momentum vector parallel. This ensures that the spin axis remains

inertially fixed. If the spin axis and the angular momentum vector are not parallel, the spacecraft is said to exhibit nutation, which manifest itself as a wobbling motion. In the presence of damping (i. e., energy dissipation) the vehicle spin axis tends to align itself with the angular momentum axis. In practice nutation dampers are used to introduce artificial damping in order to align the spin and the angular momentum axis and thus keep the spin axes constant in inertial space.

Gravity-gradient or spin stabilization cannot be used to control the body about the gravity vector or the spin axis. In addition, it may not always be possible to use spin stabilization. For example, mission requirements may demand that the communications antenna always point toward Earth, or the solar panels point always toward the sun. In this case, it is necessary that the antenna and the solar panels be stationary with respect to an inertial frame. They cannot be part of a continuously spinning satellite. The solution to this problem is the use of dual spin spacecraft or dual spinners, which consist of two parts, the rotor and the stator. The rotor rotates about its axis and provides the angular momentum necessary for stabilization as with case of the spin-stabilized spacecraft. The stator remains fixed and contains all the scientific instruments that have to remain inertially fixed. Thus, dual-spin spacecraft combine scanning (rotating) and pointing (inertially fixed) instruments in one platform. This clever solution comes at the expense of increased complexity of the spacecraft design and its operation, however.

A momentum bias design is very common for dual-spin satellites in low-Earth orbit, in which the rotor is mounted along the normal to the orbit plane. This allows the instruments to scan the Earth. Other common methods of passive stabilization include magnetic torques or use of solar panels.

Although simple and cheap, passive stabilization schemes have two main drawbacks: First, they achieve pointing accuracy of the controlled axis only up to a few degrees. Several applications (e. g., communications satellites, space telescopes, etc.) require accuracy of less than a few arc seconds (1 arc – second = 1/3600 deg). Second, control systems based on passive schemes cannot be used effectively to perform large attitude maneuvers. Reorientation of the spin axis for a spinning spacecraft, for instance, requires excessively large control torques to move the angular momentum vector. Also, gravity – gradient and magnetic torques are limited by the direction of their respective force fields and, in addition, are not strong enough to be used for arbitrary, large angle maneuvers.

Both of the previous problems encountered in the use of passive stabilization schemes can be resolved using active stabilization methods. The most common active control methods incorporate use of gas actuators or momentum wheels. Both can be used to achieve three-axis stabilization, that is, active control of the spacecraft orientation about all three axes, as well as three-axis large angular (slew) maneuvers.

Gas actuators use a series of gas nozzles distributed (usually in pairs) along the three perpendicular axes of the spacecraft. Gas jets are classified either as hot gas jets (when a chemical reaction is involved) or cold gas jets (when no chemical reaction is present). The gas jets (thrusters) are usually of the on-off type. Continuously varying control profiles can be generated, however, using pulse-width pulse-frequency (PWPF) modulators. These modulators produce a continuously varying control torque by generating a pulse command sequence to the thruster valve by adjusting the pulse width and pulse frequency. The average torque thus produced by the thruster equals the demanded torque input. This will wear out the jet valves in the long run. A better choice for generating continuously varying torques is the use of momentum wheels.

Gas jets achieve stabilization by generating external torques, which change the total angular momentum of the spacecraft. Alternatively, flywheels can be used to generate internal torques or redistribute the angular momentum between the main vehicle and the wheels. The total angular momentum of the vehicle plus the wheels remains constant in this case. This is akin to a gymnast throwing a somersault. While in the air, the gymnast’s angular momentum is constant. The gymnast changes position and rotates in midair by redistributing the angular momentum by extending or contracting the arms, bending at the waist, and so on. Momentum exchange devices (sometimes collectively referred to as momentum wheels) are also preferable for application of continuously varying torques. There are three main types of actuators that use momentum exchange for attitude control.

1. Reaction wheels do not rotate under normal conditions. When an angular maneuver is commanded or sensed, the reaction wheel spins in the opposite direction to the sensed or commanded rotation. Thus a reaction wheel provides a torque along the wheel spin axis. A minimum of three reaction wheels is necessary to control the attitude about all three axes.

2. Momentum wheels spin at a constant speed under normal conditions, and are used to increase stability about the corresponding axis. A dual-spin spacecraft, for example, is a special case of a spacecraft with a momentum wheel about the axis of symmetry. A minimum of three wheels are necessary to achieve stability about all three axes.

3. Control moment gyros (CMG) consist of a single spinning flywheel that is gimballed and free to rotate about two or three perpendicular axes. Contrary to the momentum wheel, the magnitude of the angular velocity vector remains constant. The torque produced is proportional to the change in the direction of the angular momentum vector.

A more complete discussion on the use of momentum wheels in attitude control problems can be found elsewhere (1,2).

## LEGENDRE FUNCTIONS

The expression of the harmonics of the field in terms of Cartesian coordinates provides a simple insight into the source of the harmonics. However, as the order of the harmonic increases, the complexity of the Cartesian expressions renders manipulation very cumbersome, and an alternative method is needed. The Laplace equation for the magnetic field in free space is conveniently solved in spherical coordinates. These solutions are spherical harmonics, and they are valid only in the spherical region around the center of the solenoid, extending as far as, but not including, the nearest current element. Figure 3 illustrates the coordinate system for spherical harmonics. The convention followed here is that dimensions and angles without subscripts refer to a field point, and with subscripts they refer to a current source.

The axisymmetric z field generated by a coaxial circular current loop can be expressed in the form of a Legendre polynomial, thus,

TO

Bz = ^2 gnrnPn (cos в) (8)

n=0

where r and в define the azimuth of the field point in spherical coordinates, and u is cos(e). Pn(u) is the zonal Legendre polynomial of order n and gn is a generation function given by

gn = wPn+1 cos(e0) sin(e0)/(2pn+i) (9)

where в0 and p0 define the position of the current loop in spherical coordinates. In this text, it is the convention that n = 0 represents a uniform field. The field strength given by Eqs. (8) and (9) is constant with azimuth at constant radius r.

Equations (8) and (9) are equivalent in spherical coordinates to those of Eqs. (4), (5), and (7) on the z axis but additionally predict the z field off axis. In the design of the main coils Eqs. (8) and (9) offer no more information than Eq. (5). However, in the calculation of the off-axis z fields, they provide important additional information that can be used in the optimization of coil design when fringing fields must be considered.

The harmonic components of the z field can also be expressed in the form of associated Legendre functions of order n, m (7). Those functions define the variation of the local z field strength at points around the center of the magnet and include variation of the field with azimuth p. Thus,

Bz(n, m) = rn(n + m + 1)Pn, m(u)

X [Cn, m

cos(m<p) + Sn, m sin(m^)]

where Cn, m and Sn, m are the harmonic field constants in tesla per metern, Pn, m(u) is the associated Legendre function of order n and degree m, and u is cos(e). The order n is zonal, describing the axial variation of z field. The degree m is tes – seral, describing the variation of the z field in what would be the x-y plane in Cartesian coordinates. p is the azimuth to the point at radius r from an x-z plane. в is the elevation of the point from the z axis. Tables of the values of the Legendre polynomials can be found in standard texts on mathematical functions (8).

In Eq. (10), m can never be greater than n. For example, if n = m = 0, Bz(0,0) is a uniform field independent of position. If n = 2 and m = 0, Bz(2,0) is a field whose strength varies as the square of the axial distance [i. e., B2 of Eq. (7)]. If n = 2 and m = 2, Bz(2,2) is a field that is constant in the axial direction but increases linearly in two of the orthogonal radial directions and decreases linearly in the other two. Figure 4 shows a map of the contours of constant field strength of a Bz(2,2) field harmonic for which S22 = 0. The Bz(2,2) field has zero magnitude at the origin and along the x and y coordinate axes. Of course, the direction of the zero values of the Bz(2,2) harmonic will not generally lie in the Cartesian x and y planes. Depending on the relative values of Cn, m and Sn, m in Eq. (10), the zero harmonic planes will lie at an angle other than ф = 0 or mn/2. The constant field contours of Bz(2,2) extend to infinity along the z axis and represent, arbitrarily in this figure, values for Bz(2,2) of 10 4, 10~6, and 10~8, for example. Within the indicated cylinder centered on the z axis, the value of the harmonic is everywhere less than 10~6. For

y

x |

Figure 4. Surfaces of constant magnitude of a B(2,2) harmonic field, showing that the tesseral harmonic is zero when the azimuth ф is a multiple of лУ2. |

(11) |

520 mm |

Optimization Methods

Figure 5. Surfaces of constant magnitude of a B(3,0) harmonic field, showing that the zonal harmonic is zero when the elevation ^ is 39c or 90°. |

With the recent rapid increase in the speed and size of computers, an alternative technique for the design of uniform field magnets has been developed. Not only is a uniform field of specific magnitude required but that should be combined with other criteria. For instance it could be accompanied by the smallest magnet, that is, the minimum of conductor, or by a specified small fringing field. To achieve these ideal solutions, an optimization technique is now generally used. The field strength of a set of coils is computed at points along the axis, and, if fringing field is a consideration, at points outside the immediate vicinity of the system. The starting point may be a coil set determined by a harmonic analysis as described earlier. Now however, mathematical programming methods are employed to minimize the volume of the windings satisfying the requirement that the field should not vary by more than the target homogeneity for each of the chosen points. Again, for purposes of homogeneity, only field on axis is considered because the radial variation of axisymmetric components of field is zero if the axial component is zero. The field strengths at points outside the magnet will be minimized by inclusion of a set of coils of much larger diameter than the main coils but carrying current of reverse polarity.

All design techniques, but particularly that of optimization, are complicated by the highly nonlinear relationship between the harmonic components generated by a coil and the characteristics of the coil. Thus the reversal in sign of the harmonic components occurs rapidly as the dimensions or po – higher values of m, there are more planes of zero value. sition of a coil are changed. In the example of an NMR mag-

Thus, Bz(4,4) has eight planes of zero value, Bz(8,8) has 16, net shown in Fig. 6 the value of the second harmonic changes

and so forth. A harmonic Bz(4,2) defines a field in which the by 4 ppm for an increase in the diameter of the wire in the

second-degree azimuthal variation itself varies in second or – sma^ coil l of only 0.1 mm. The optimization of the ampere-

der with axial distance. turns, shape and position of a coil thus affects the various The zonal harmonics Bz(2,0), Bz(3,0), Bz(4,0) have conical harmonics in highly nonlinear and often conflicting ways.

surfaces on which the value of the field is zero. Thus, for in – . Dfign optimization involves the computation of an objec

tive function which contains all the elements that have to be

stance, Bz(3,0) has contours of zero value such as are shown

+8-1+6- II +4- +2- IIі / / / / +3- |

I I |

-8+ 2/7 /2/3 1/3/ |

и / / " / / " / / " / и і / , її і / Hi’ ‘ ‘ її// / ^ и // ^ |

-4+ |

2 |

J2Bi, p – Bo |

< AB2 |

(12) |

+8- |

where V is the volume of a coil, N is the number of coils, and L is the length of the magnet. The factor p weights the relative importance of the volume and of the length. This objective function is then minimized subject to the following constraints: |

(13)

In Eq. (12) B, p is the field at point p due to coil i. The equation represents the constraint on uniformity of field. It could also be expressed in terms of harmonic terms; for example, each even term up to P10j0 being less than 106 B0, the center field. [The inclusion of the squared terms in Eq. (12) allows for either positive or negative error field components.] Equation (13) expresses the condition that the fringing field should be less than, say, 1 mT (10 gauss) at a point, outside the magnet system. The 10 gauss criterion frequently represents the maximum field to which the public may be exposed in accessible areas around an MRI system.

The minimization of the objective function is performed by a mathematical programming algorithm, whereas the solution of the constraining Eqs. (12) and (13) will require a nonlinear technique (such as Newton-Raphson), in order to deal with the extremely nonlinear variation of the harmonics as they change with coil geometry (11).

## THE INFINITESIMAL, OR HERTZIAN, DIPOLE

Before we do the analysis for a practical antenna, namely a linear antenna, let us establish the analysis procedure for an infinitesimal, elementary, or Hertzian dipole. These are building blocks for more complex antenna systems. Since the dipole is infinitesimal, the current is assumed to be constant.

2n r2 k0I0 sin 9 |

Ee = jn0 |

Eф = 0 |

M0I0 dl |

Er = |

4n r |

and |

Near and Far Fields

The near-field region are at a close enough distance such that kr ^ 1.

U = — Ед(г, в,ф)2 (30)

2n0

The maximum directivity D0 turns out to be equal to 1.5.

Radiation Resistance

The radiation resistance is obtained by dividing total power radiated by the lossless antenna by |I0|2/2 and is given by

exp (-jkr)

2jrk0r3 exp(-jkr) .

Er = – Л0І0 dl

(25a)

(25b)

(25c)

(25d)

cos 0 |

Ee = – jn0I0 dl

sin 0

0 4nk0rs

V ~ T i, exp(-jkr) .

ф 0 4тгг2 sme Еф = Hr = Hg = 0

Rr = 80тг2 |

(31) |

Several observations are in order. Er and Ев have (1/r2) variation as distance and therefore decays very fast. These are induction components and die down rapidly with distance. The electric field components Er and Ев are in time phase, but the magnetic field component Hф is in time quadrature with them. Therefore, there is no time-average power flow associated with them. Hence, the average power radiated will be zero, and the Poynting vector is imaginary. This can easily be verified by integrating the average power density over a sphere in the near region.

The space surrounding the antenna can be divided into three regions, namely, induction, near-field (Fresnel), and far – field regions. The induction region has 1/r3 space variation, the near field has 1/r2 variation, and the far field has a 1/r variation with distance r.

Far Field

The far-field expression can be obtained with kr > 1 and by extracting the (1/r) term and is given by