<<

NONLINEAR MULTI-MODE ROBUST CONTORL FOR SMALL TELESCOPES

By

WILLIAM LOUNSBURY

Submitted in partial fulfillment of the requirements for the degree of

Master of Science

Department of Electrical Engineering and Computer Science

CASE WESTERN RESERVE UNIVERSITY

January, 2015 1

Case Western Reserve University School of Graduate Studies

We hereby approve the thesis of William Lounsbury, candidate for the degree of Master of Science*.

Committee Chair Mario Garcia-Sanz

Committee Members Marc Buchner

Francis Merat

Date of Defense: November 12, 2014

* We also certify that written approval has been obtained for any proprietary material contained therein

2

Contents

List of Figures ……………….. 3 List of Tables ……………….. 5 Nomenclature ………………..5 Acknowledgments ……………….. 6 Abstract ……………….. 7 1. Background and Literature Review ……………….. 8 2. Telescope Model and Performance Goals ……………….. 9 2.1 The Telescope Model ……………….. 9 2.2 Tracking Precision ……………….. 14 2.3 Motion Specifications ……………….. 15 2.4 Switching Stability and Bumpiness ……………….. 15 2.5 Saturation ……………….. 16 2.6 Backlash ……………….. 16 2.7 Static Friction ……………….. 17 3. Linear Robust Control ……………….. 18 3.1 Unknown Coefficients……………….. 18 3.2 QFT Controller Design ……………….. 18 4. Regional Control ……………….. 23 4.1 Bumpless Switching ……………….. 23 4.2 Two Mode Simulations ……………….. 25 5. Limit Cycle Control ……………….. 38 5.1 Limit Cycles ……………….. 38 5.2 Three Mode Control ……………….. 38 5.3 Three Mode Simulations ……………….. 51 6. Future Work ……………….. 55 6.1 Collaboration with the Pontifical Catholic University of Chile ……………….. 55 6.2 Senior Project ……………….. 56 Bibliography ……………….. 58

3

List of Figures

Figure 1: TRAPPIST Photo ……………….. 9

Figure 2: Control Design – Aggressive ……………….. 20

Figure 3: Control Design – Azimuth Moderate ……………….. 21

Figure 4: Control Design – Azimuth Aggressive ……………….. 21

Figure 5: Control Design – Altitude Moderate ……………….. 22

Figure 6: System Diagram ……………….. 25

Figure 7: Two-mode altitude controller comparison ……………….. 26

Figure 8: Two-mode azimuth controller comparison ……………….. 27

Figure 9: Two-mode altitude controller torque ……………….. 28

Figure 10: Two-mode azimuth controller torque ……………….. 29

Figure 11: Two-mode altitude bumpless vs. bumpy ……………….. 30

Figure 12: Two-mode azimuth bumpless vs. bumpy ……………….. 31

Figure 13: Two-mode altitude bumpless torque ……………….. 31

Figure 14: Two-mode azimuth bumpless torque ……………….. 32

Figure 15: Two-mode reference tracking robustness ……………….. 33

Figure 16: Two-mode torque robustness ……………….. 33

Figure 17: Two-mode reference tracking disturbance rejection ……………….. 35 4

Figure 18: Two-mode reference tracking robustness ……………….. 35

Figure 19: Two-mode difficult unsticking ……………….. 37

Figure 20: Two-mode easy sticking ……………….. 37

Figure 21: DFE algorithm ……………….. 40

Figure 22: DFE filter design ……………….. 42

Figure 23: DFE example output ……………….. 44

Figure 24: Arbitrary nonlinearity input/output diagram ……………….. 45

Figure 25: Arbitrary nonlinearity describing function ……………….. 46

Figure 26: DFE limit cycle prediction ……………….. 47

Figure 27: Limit cycle simulation ……………….. 48

Figure 28: DF limit cycle control design ……………….. 49

Figure 29: Bang-bang control example ……………….. 50

Figure 30: Three-mode step ……………….. 51

Figure 31: Three-mode step and ramp ……………….. 52

Figure 32: Three-mode disturbance rjection ……………….. 53

Figure 33: Three-mode robustness ……………….. 55

5

List of Tables

Table 1: Telescope properties affecting the theoretical model ……………….. 13

Table 2: Telescope properties affecting desired resolution ……………….. 14

Table 3: Motion Specifications ……………….. 15

Table 4: Table of tables that do not list themselves ……………….. 59

Nomenclature

DF – Describing Function

DFE – Describing Function Estimator

QFT – Quantitative Feedback Theory

Alt-Azimuth mount – A telescope mount that allows for rotation normal to the Earth’s surface (azimuth) and a perpendicular axis (altitude)

Arc Second – A unit of angular measurement equal to 1/3600th of 1 degree

6

Acknowledgments

I would like to extend my thanks to Dr. Mario Garcia-Sanz for his help, encouragement, and guidance throughout my telescope research. Thanks are due as well to Dr. Cenk Cavusoglu for his help through my undergraduate and early graduate career at CWRU. Finally, I would like to thank my family for their ongoing care and support.

7

Nonlinear Multi-Mode Robust Control For Small Telescopes

Abstract

By

William Lounsbury

This paper introduces an innovative robust and design methodology for high-performance motor control in optical telescopes less than one meter in diameter. The dynamics of optical telescopes typically vary according to azimuth and altitude angles, temperature, friction, speed, and acceleration leading to nonlinearities and plant parameter uncertainty. The methodology proposed in this paper combines robust Quantitative Feedback Theory (QFT) techniques, the describing function method, and optimal control with nonlinear switching strategies that achieve simultaneously the best characteristics of a set of very active (fast) robust QFT controllers, very stable (slow) robust QFT controllers, and a pair of controllers designed around system limit cycles for high precision. A general dynamic model and a variety of specifications from several different commercially available amateur Newtonian telescopes are used for the controller design as well as the simulation and validation. It is also proven that the nonlinear/switching controller is stable for any switching strategy and switching velocity, according to described frequency conditions based on common quadratic Lyapunov functions and the circle criterion.

8

1. Literature Review

Modern astronomy is mostly performed by very large telescope installations and satellites, with the realm of small telescopes confined to amateur astronomy. For this reason, most of the research performed on telescope control systems refers to the construction and maintenance of large telescope control systems. However, with a reasonably large industry for amateur astronomy and many universities installing custom small-scale telescopes for student use, the high-precision control techniques used for these systems is well worth investigating.

The industry surrounding amateur astronomy consists of a few telescope manufacturers as well as a large number of custom systems designed by hobbyist engineers. These engineers do not publish much on the way that they do things, but the current state of the art within the companies’ telescopes can be found within the patents filed on their control systems.

Stepper motor control is a very popular solution due to the high position precision that these motors can achieve. For instance, a telescope control system patented by

Krewalk and Silverburg describes the usage of this technique which does not involve any particularly advanced control algorithms, opting instead for a much more complicated mechanical system to deal with the nonlinear control issues [1]. They claim to solve the problem of backlash by using a mechanism to continuously apply tension to each of the gears within the system to maintain contact. While this solution can be effective, the hardware used is very sensitive to damage and will fatigue with usage. A software solution that can eliminate backlash is desirable. The stepper motor solution also does not 9 take into account the friction and inertias of the system, and thus it cannot be optimized to a particular range of telescopes, and is not a robust solution.

Even with stepper motor systems, modern control telescopes still suffer from large motion blur. The 60 cm TRAPPIST telescope, located in Chile, is such a modern telescope, as seen by a photo that it took in figure 1 [2].

Figure 1 The stars in the above image are clearly blurred out of their normal circular shape by either the motion of the Earth that the telescope was unable to compensate for, or incidental movements introduced to the telescope by its control system. In order to eliminate all of these issues, another solution must be found.

2. Telescope Model and Performance Goals

2.1 The Telescope model

The telescope modeled in this paper is based on a simple 24cm reflecting telescope on an altitude-azimuth mount. This consists of a hollow cylinder for the tube and a disc for the mirror at the end. In the linear case, the frictional force is assumed to 10 always be proportional to the velocity with no sticking effects. Also, note that both axes of rotation intersect at the center of mass. This gives the telescope the property of constant potential . Therefore, potential energy is not taken into account in the model derivation.

Realistically, a system can never be perfectly modeled. The linear model of the telescope relies heavily on two different factors, the inertia and the friction coefficient, neither of which is easy to measure while the telescope is being operated and both of which change with the usage of the telescope. Specifically, friction will change with temperature, humidity, and the usage of the telescope. The moment of inertia depends on the mass and positioning of various components in the telescope, and the moment of inertia about the azimuthal axis will change with altitudinal position. A vertically oriented telescope is easier to rotate than a horizontally oriented one.

A key part of understanding this problem is being able to quantify not only a typical value for inertia or friction, but to calculate a range of values that these coefficients could take on. Solutions to this “range of coefficients” problem are discussed in chapter 3. Another major aspect of this problem is that two different models are used.

The first is a theoretical model that represents the ideal system. This model is derived mathematically and is based on the simple linear physics of telescope motion. Generally, linear models are used for linear controller design, and these controllers are no exception.

The second model is more complicated, taking into account both the linear and nonlinear aspects of the system. This model is used for simulating the telescope as realistically as possible. All telescope control systems are evaluated with the nonlinear model.

11

Theoretical Model derivation

The theoretical model derived blow is used in controller design, but not in simulation. Euler-Lagrange plant derivation for the linear plant:

Equation 1 푑 휕퐿 휕퐿 휕퐷 − + = 휏 푑푡 휕푞̇ 휕푞 휕푞̇

Equation 2 1 퐿 = 퐼휃̇ 2, 퐷 = 휇푁휃̇, 푞 = 휃 2

Equation 3

퐼휃̈ + 휇푁휃̇ = 휏 = 푢

Equation 4 훩 1 = 푈 퐼푠2 + 휇푁푠

Where θ is the angle of the telescope (in either azimuth or altitude), τ is the torque applied by the motor, I is the moment of inertia, μ is the friction coefficient of Teflon, which the telescope is mounted on, and N is the weight of the telescope normal to the frictional surface. Note that L is only a function of kinetic energy as all axes of rotation intersect the center of mass, leaving the potential energy constant.

12

Moment of inertia

Equation 5

푚푟2 1 푚푟2 퐼 = , 퐼 = 푚[6푟2 + 푙2], 퐼 = 푚푟2, 퐼 = 퐷𝑖푠푐푋 4 푇푢푏푒푋 12 푇푢푏푒푍 퐷𝑖푠푐푍 2

Where m is the mass of the object, r is the radius of the telescope, and l is the length of the tube. The parallel axis theorem states that:

Equation 6

2 퐼 = 퐼퐶푀 + 푚푑

Where d is the distance from the center of rotation where ICM is found and m is the mass of the object. Ultimately, we know that the moment of inertia will vary between two values. When the telescope rotates purely about its X axis:

Equation 7

푚 푟2 1 퐼 = 퐷𝑖푠푐 + 푚 푑 2 + 푚 [6푟2 + 푙2] + 푚 푑 2 푥 4 퐷𝑖푠푐 퐷𝑖푠푐 12 푇푢푏푒 푇푢푏푒 푇푢푏푒

When the telescope rotates purely about its Z axis:

Equation 8

푚 푟2 퐼 = 퐷𝑖푠푐 + 푚 푟2 푧 2 푇푢푏푒

13

Table 1. Telescope properties affecting the theoretical model

Quantity Value Units

mDisc 4.667 kg

mTube 9.333 kg

L 1.214 m

R 0.254 m

dDisc 0.2024 m

dTube 0.2024 m

Nscope 137.0 N

Nscope+mount 238.0 N

From these values we can calculate the range of moments of inertia for the telescope, which will range between 2.29 and 3.13 Nm. In the nonlinear model, the force of friction is calculated by a function of velocity, applied torque, and frictional force constant.

Equation 9

휏 − 휏푓(푣, 휏) 휃̈ = 푛표푛푙𝑖푛푒푎푟 퐼

Equation 10 −6 푡 ≥ 0 푟 (푡) = {휋 + 1.842 ∗ 10 푡 퐴푧𝑖푚푢푡ℎ 0 푡 < 0 14

2.2 Tracking Precision:

The first issue with all telescope control is the extreme degree of precision demanded to track drastically magnified objects across the sky. The desired precision is calculated from the geometry of the telescope, the magnification of the lens, and the resolution of the camera that is performing the imaging. The optical limit of the modeled telescope is 0.46 arc seconds, although this is not the limiting factor.

Equation 11

−1 1 2 tan 퐹 퐴푟푐 푆푒푐표푛푑푠 푝푒푟 푃푖푥푒푙 = 3600 푅 푀 ∗ 푅

Equation 11 determines the amount of the sky seen by a single pixel in a camera of resolution R at magnification M for a telescope with a focal ratio of FR. The focal ratio is simply the length of the telescope divided by the diameter of the telescope.

Table 2. Telescope properties affecting desired resolution [3]

Focal Ratio 4.7

Unmagnified field of view 24.02 degrees

Typical magnification for photography 48x

Effective field of view 0.5005 degrees, or 1801 arc seconds

Arc seconds per pixel with a 1080p camera 1.668

15

Table 2 shows the key numbers for the 24cm telescope used in future simulations.

Clearly, any motion of the telescope below 1.668 arc seconds will be very difficult for the camera to detect. It is important to note now that atmospheric conditions typically constrain the optical limit to as much as 2 arc seconds, although this goal will not be considered for the purposes of evaluating the control methods described here.

2.3 Motion Specifications

To perform well, the telescope needs to meet a certain set of motion specifications. The essential goal of robotic astronomy is to observe as many targets in the sky as possible in a given night. The observation time spent on a given object varies with the astronomer’s desires, but the transitions between these objects will be consistent across all telescope operation. The telescope should not move so quickly that it would damage itself or a person if they happened to stand in its way, and it should not accelerate so fast as to saturate its motors.

Table 3

Maximum Velocity 100 degrees per second, or 1.75 radians per second

Maximum Acceleration 3.2 radians per second2

Phase Margin 55 degrees

Maximum acceleration is calculated from the desired maximum torque and the maximum moment of inertia of the telescope. The phase margin is typical for motor control systems. 16

2.4 Switching Stability and Bumpiness

An issue that arises when switching between controllers is that of maintaining stability. It is possible for the act of switching threaten the of a system. Fortunately, this is relatively easy to prevent. It has been shown that as long as the phase difference between the two controllers at any given frequency differs by no more than 90 degrees, the switch between them will be stable [4].

Even when stability is ensured, the switch itself may be associated with a bump, a discontinuity in the first derivative of the system that can cause the telescope to appear to twitch or even reverse direction temporarily. Particularly, when switching from a slow controller to a faster one, the faster controller has a tendency to overreact, which can drive the motor torque to undesirable levels and cause the telescope to jerk violently.

2.5 Saturation

Typical motors for this application can provide as much as 20 Nm of torque, but to avoid saturating the motors to the widest extent possible the controllers should be designed to demand no more than 10 Nm. Related to this value is an implied maximum desired velocity, above which the telescope could be dangerous to itself and anyone that it bumps into. Equation 12 shows mathematically how this works.

Equation 12

휏퐿 휏퐿 < 휏퐼푛 휏푂푢푡 = { 휏퐼푛 −휏퐿 < 휏퐼푛 < 휏퐿 −휏퐿 휏퐼푛 < −휏퐿

2.6 Backlash 17

Any mechanical system with gearing will have some amount of backlash between the gears. For simplicity, backlash is assumed to be 1 degree of motion in this paper. This value of backlash is not derived directly from a physical system, but it is a typical and realistic amount for gearboxes.

2.7 Static Friction

Static Friction, or “stiction”, is modeled using a modified version of the Karnopp

Model to create realistic dynamic friction and static friction (stiction). Dynamic friction force is simply a force opposite the direction of motion with a magnitude proportional to velocity. This is a linear effect and is identical to how the friction is modeled in the linearized plant. Stiction is a highly nonlinear effect and is modeled as a force opposite the direction of motion with magnitude identical to the applied torque. This effectively cancels out the motor’s attempts to move the telescope, leaving it “stuck” in place. The system sticks when the velocity is very small and unsticks when the supplied torque exceeds a given threshold [5]. This model was modified for the purposes of simulation by adding a term proportional to velocity to the stiction term. This was done because the velocity in simulation is never precisely zero, which means that when the system sticks in place the velocity will remain constant at whatever value was determined to be “close enough” to zero. In order to drive the velocity to zero when the telescope sticks, a term proportional to velocity had to be added. 18

Equation 13

휏𝑖푛 + 휇푣 |휏 | < 휏 , |푣| < 푣 퐹 = { 𝑖푛 푡 푡 푓 휇푣 푂푡ℎ푒푟푤푖푠푒

3. Linear Robust Control

3.1 Unknown Coefficients

As laid out in the model specifications, the precise values of the friction and inertia of the telescope are very difficult to know at any time, but it is easy to determine the ranges that they will fall within. In the case of friction, this comes down to knowing the behavior of the Teflon pads that these telescopes often rest on. Fortunately, Teflon is a thoroughly studied material and a range of coefficients for friction can be determined from past experiments.

The inertia will vary based on the position of the telescope, which is a nonlinear aspect of the model that needs to be dealt with. In this case, a robust control method was used to design controllers that will perform within the same specifications no matter how the system parameters change within their ranges.

3.2 QFT Controller Design 19

Quantitative Feedback Theory (QFT) is a robust control design technique that uses the feedback to simultaneously and quantitatively (1) reduce the effects of plant uncertainty and (2) satisfy performance control specifications. The method searches for a controller that guarantees the satisfaction of the required performance specifications for every plant within the model uncertainty (robust control). QFT is rooted in the classical frequency domain and utilizes Nichols diagrams (magnitude/phase). It balances quantitatively (a) the simplicity of the controller structure, (b) the minimization of the controller magnitude at each frequency, (c) the plant model uncertainty and (d) the achievement of the desired performance specifications, all at each frequency of interest.

The technique has been successfully applied to a wide variety of real-world control problems [6]. The design itself is carried out in a special Matlab toolbox for QFT design

[7].

More specifically, the goal of QFT is to shape a system “L” curve in the frequency domain. Switching stability is very easy to guarantee with this kind of design, where the system can be shown to be stable as long as there is never more than a 90 degree phase difference between L1+1 and L2+1, where L1 and L2 are stable and represent the systems with the two different controllers.

Equation 14

퐿(푠) = 푃(푠)퐶(푠)

Several different boundaries are also used for QFT design, notably a desired phase margin, reference tracking boundaries, and a disturbance rejection boundary. The disturbance rejection specification is designed based on a step output disturbance, which qualifies as a worst case scenario for what can happen to the system. 20

Equation 55 푃(푗휔)퐶(푗휔) |푇 | ≤ |푇| = | | ≤ |푇 | 퐿 1 + 푃(푗휔)퐶(푗휔) 푈

Equation 66 1 |푆(푠)| ≤ | | 1 + 푃(푠)퐶(푠)

All four controllers take similar forms with different coefficients. The aggressive controllers have double-integrators, while the moderate controllers have single- integrators. This behavior means that while the moderate controllers can track a step response with no steady-state error, the aggressive controllers will be necessary to track the ramp part of the input with no theoretical error. The following equations and Nichols charts show the results of the QFT loop-shaping process.

Equation 77

14.13푠3 + 155.5푠2 + 1415푠 + 0.1413 퐶 = 퐴푧퐴 0.01푠3 + 푠2

Figure 2. Nichols plot of open loop azimuth system with aggressive controller

Equation 88

4.182푠2 + 43.06푠 + 12.33 퐶 = 퐴푧푀 0.001푠2 + 푠 21

Figure 3. Nichols plot of open loop azimuth system with moderate controller

Equation 99

85.79푠2 + 47.2푠 + 0.0102 퐶 = 퐴푙퐴 0.01푠3 + 푠2

Figure 4. Nichols plot of open loop altitude system with aggressive controller

Equation 20 54.55푠 + 30 퐶 = 퐴푙푀 0.01푠2 + 푠 22

Figure 5. Nichols plot of open loop altitude system with moderate controller

Prefilter Design

The advantage of using a prefilter is that a very aggressive controller can be designed to follow a smoother, less aggressive path, increasing the robustness of the final solution. The velocity configuration allows each controller to receive a different error signal. This means that different controllers can use different prefilters to shape the input signal. Of the controllers presented in this paper, only the moderate azimuthal controller uses a prefilter. The rest did not require one.

Equation 101 1 퐹 = 퐴푧푀 6푠 + 1

The prefilter in equation 21 is simply a low pass filter designed to smooth out any inputs into the controller. This allows the azimuthal moderate controller to be a little bit more aggressive.

23

4. Regional Control

In this paper, there are aggressive and moderate controllers which are designed to perform differently in different circumstances. The moderate controller is used by default and is designed to be able to move the telescope between any given two configurations whilst never applying more than 10 Nm of torque from the motor. When the telescope error is sufficiently low, say less than a value of A degrees, the system switches to using the aggressive controller. If a new target is specified and the telescope error suddenly becomes higher than B degrees away, the telescope will use the moderate controller to start moving towards the new target and switch again when the error becomes small.

Note that the hysteresis demands that A be less than B.

4.1 Bumpless Switching

Switching control, or gain scheduling, is the act of instantaneously switching between two different controllers depending on the system state. Switching between two controllers has been shown to be stable as long as the phase response of [1 + Lk(jω)] for any given frequency undergoes no more than a [90°-a(w)°] shift between the two controllers. To reduce the chance of oscillatory or otherwise undesirable behavior around switching, hysteresis is introduced.

When the system switches from one control scheme to another, there can be a bump or discontinuous behavior in the first derivative. The telescope will appear to jerk and may even reverse directions temporarily. A smooth transition is desired, so a bumpless switching scheme must be used. An incremental algorithm is used with a 24 discretized version of the controller to achieve this. The algorithm works by taking advantage of the following representation of the controller:

Equation 112

푢1[푘 + 1] = 푢[푘] + 훥푢1

Equation 123

푢2[푘 + 1] = 푢[푘] + 훥푢2

Equation 134

푢3[푘 + 1] = 푢[푘] + 훥푢3

Equation 145

푢1[푘] 퐸푟푟표푟 푖푠 푙푎푟푔푒 푢[푘 + 1] = {푢2[푘] 퐸푟푟표푟 푖푠 푠푚푎푙푙 푢3[푘] 퐿푖푚푖푡 퐶푦푐푙푒 퐷표푚푖푛푎푡푖표푛

The increments Δun are determined by their respective control schemes, and the u[k] term is shared by both. This way no matter which controller is selected, the next control value can be assured to be relatively close to the previous one, particularly for small time steps [8]. Feedback control is necessary to reduce the effects of system uncertainty by measuring the real output of the system and compensating for it. Similarly, feedback control also allows the system to compensate for uncertain disturbances. 25

Figure 6 Figure 6 shows an example system diagram. The reference input is the desired position for the telescope to be in. The reference signal is filtered, then the actual position is subtracted from it to obtain an error signal for the controllers to utilize. This telescope model used can be either the azimuth or altitudinal model. The position of the telescope is the observed output. Note that each controller and the supervisor can receive a different

“error” signal. Another important note is the 1/z delay terms, which implement the velocity configuration for bumpless switching.

4.2 Two-Mode Simulations

Linear control vs. switching control

Figure 7 compares an aggressive controller, a moderate controller, and a control scheme that switches between them with the altitude axis. The aggressive controller reduces error the fastest initially, but ultimately takes a long time to finally settle to a low error point. The moderate controller is never able to settle to a low error, instead leaving a 26 steady state error over two orders of magnitude higher than the steady state conditions demonstrated by the other two controllers. Finally, the switching controller is able to settle to the same level of error as the aggressive controller, but achieves it in a much shorter period of time. The reason for the steady-state oscillation is that the telescope sticks in place near the target position, and then slightly over-corrects and sticks in a new position, then overcorrects back. While this happens many times throughout the telescope’s operation, in the steady state a sort of equilibrium is found where the amount of overcorrection is both the minimum that the controller can achieve for a system and equal between peaks of oscillation.

Figure 7. Altitude axis. Solid line: Switching control. Short dashed line: moderate controller. Long dashed line: aggressive controller. The azimuthal controllers demonstrate similar results in figure 8, however with a much more aggressive controller. In this case the switching controller eventually settles to a low steady-state oscillating error, but not for a long time after the aggressive 27 controller alone would settle. This is a situation that the bumpless control scheme will solve.

Figure 8. Azimuth axis. Solid line: Switching control. Short dashed line: moderate controller. Long dashed line: aggressive controller. Figure 9 compares torque between the same three altitudinal controllers. The error results demonstrate the superiority of using an aggressive controller to drive the error to a very low value, and the following torque graphs will demonstrate the superiority of the moderate controller in demanding low levels of torque from the motor. In the case of the following altitude simulation, the aggressive controller produces torque in extreme excess of 10 N-m, and in fact exceeds 100 N-m, while the moderate controller demands fewer than 5 N-m for nearly all time. This is good as it will prevent saturation and keep the motor operating in a relatively linear region. The switching scheme follows the moderate controller and thus never demands undesirable torques.

28

Figure 9. Altitude axis. Solid line: Switching control. Short dashed line: moderate controller. Long dashed line: aggressive controller. Similarly in the Azimuth case, as demonstrated in figure 10, the aggressive controller demands extremely high torques, while the moderate controller never demands more than the accepted upper limit of 10 N-m. Note that the switching controller behaves well until the switch occurs, where it behaves in a much more extreme fashion. Again, this issue will be resolved with a bumpless scheme. 29

Figure 10. Azimuth axis. Solid line: Switching control. Short dashed line: moderate controller. Long dashed line: aggressive controller.

30

Bumpless control vs. bumpy control

The following figure shows how the bumpless version of the altitudinal controller is superior to the normal switching scheme. While they both ultimately settle to a very low error level, the bumpless controller is able to achieve this low error much faster than the normal scheme.

Figure 11. Altitude axis. Solid line: Bumpless switching control. Short dashed line: Normal switching control. The bumpless advantage is seen even more clearly for the azimuthal controller in figure 12. The bumpless scheme not only achieves a low level of error much more rapidly, it achieves a lower level of error entirely.

31

Figure 12. Azimuth axis. Solid line: Normal switching control. Short dashed line: Bumpless switching controller. The bumpless control also never demands high torques from the motors, while in the normal case the act of switching between the controllers causes a huge spike in torque.

Figure 13. Altitude axis. Solid line: Bumpless switching control. Short dashed line: Normal switching controller. The azimuthal control even loses the large associated oscillations that it would otherwise have under the normal switching scheme. Note here that there is still a 32 noticeable bump in the torque levels. While it is much smaller than the oscillations seen in the normal scheme, the bumpless scheme cannot achieve perfect smoothness in the transition.

Figure 14. Azimuth axis. Solid line: Normal switching control. Short dashed line: Bumpless switching control. Robustness

The primary goal of using QFT is to obtain robust controllers that perform well with uncertain parameters. In this situation, the worst case scenario is when the telescope is most responsive, i.e. when the moment of inertia is lowest and linear friction is also lowest. Figures 15 and 16 show the overall magnitude of the error from both axes in this situation with the lowest possible coefficients. Note that even in this situation the steady state error remains below 20 arc seconds. Performance is worse than in less responsive cases, but still acceptable. These figures also show that the torques also remain well below dangerous levels for both controllers. 33

Figure 15. Magnitude of error from target from both azimuth and altitude axes.

Figure 16. Solid line: Altitude bumpless switching control torque. Short dashed line: Azimuth bumpless control torque.

34

Disturbance Rejection

The following figures show the results of a simulation with a unit step at the input of the plant is inserted at the 50 second mark. This is after the telescope has settles in place. This disturbance simulates a constant 1 N-m torque resulting from a constant force being applied to some part of the telescope, such as a stiff breeze. The error in figure 17 takes quite a bit of time to recover to pre-disturbance levels, but it is eventually able to in a comparable amount of time to its original settling. The torque levels never rise to unacceptable values in this situation. 35

Figure 17. Solid line: Azimuth bumpless switching control error. Short dashed line: Altitude bumpless e control error.

Figure 18. Solid line: Azimuth bumpless switching control torque. Short dashed line: Altitude bumpless e control torque.

36

Worsened Stiction

Finally, the impact of the nonlinear stiction can be observed. There are two ways that the nonlinear stiction in this model can be made more difficult. The first is to make sticking easier, and the second is to make unsticking harder. The following two charts demonstrate three different levels of these nonlinearities applied to the bumpless controller. In the difficult unsticking case, seen in figure 19 for the azimuth controller, the torque that is required to unstick the telescope is increased from 1 N-m to 5 N-m and 10

N-m. With the jump to 5 comes a drastic increase in steady-state error and the jump to 10 makes this even worse, although to a lesser degree. The telescope may settle more quickly, but when it settles it will be at a much worse error level. Easier sticking is a relatively minor problem, as seen in figure 20. The steady state error levels were not affected at all; the only negative effect was an increased settling time. The velocity threshold below which the telescope will stick was raised from 0.01 radians per second to

0.1 radians per second and 1 radian per second. 37

Figure 19. Solid line: 1 N-m to unstick, Short dashed line: 5 N-m to unstick, Long dashed line: 10 N-m to unstick. All lines show the response of the azimuth controller.

Figure 20. Solid line: 0.01 rad/sec to stick, Short dashed line:0.1 rad/sec to stick, Long dashed line: 1 rad/sec to stick. All lines use the azimuth controller.

38

5. Limit Cycle Control

5.1 Limit Cycles

Each of the nonlinearities considered here can induce a limit cycle in the system, stiction and backlash in particular. For the purposes of this paper, limit cycles will be separated into two categories.

A “type-1”, or position-based limit cycle occurs when the telescope cannot reach a stationary or low-velocity target due to nonlinear effects. For instance, the telescope could stick in place near the target, build up the torque to break the stiction, then overshoot and stick on the other side because it cannot cancel the torque fast enough to stop at the target. This process is repeated to form the cycle.

A “type-2”, or velocity-based limit cycle occurs when the movement of the earth moves the telescope away from the target, and the telescope must overcome the nonlinearities to catch the target again. This is almost exclusively a stiction problem that occurs when the telescope is required to move at a velocity lower than the minimum stiction velocity. The telescope will stick on one side of the target, the target will move passed the telescope, and when it is far enough away the telescope will jump towards it, overshooting in most cases, and wait for the target to catch up again.

5.2 Three Mode Control

Three mode control is a simple extension of two mode control where a third controller is added for extremely low errors. In these circumstances, the nonlinearities in the system will introduce limit cycles. The two types of limit cycles discussed previously 39 will require two different kinds of controllers to overcome them. These limit cycle controllers will sometimes have poorer reference tracking and disturbance rejection than the aggressive controller.

Describing Function Estimation

The theory and method behind determining the describing function (DF) of a given nonlinearity is discussed at length in most texts on nonlinear , and as such only a brief overview will be provided here [9] [10] [11]. The DF method is an attempt to represent the behavior of certain nonlinear functions in the frequency domain, and to that end it is exceedingly successful at predicting the existence and frequency of limit cycles. The DF method can only be applied for systems which have a global low pass filter characteristic, naturally passing the fundamental frequency and suppressing all high frequency components.

To calculate a DF, a sine wave of amplitude A and frequency f is inputted into the nonlinearity. The Fourier Series of the output is calculated, and the phase and magnitude coefficients for the fundamental frequency together comprise the DF. The DF is then used by plotting phase and magnitude against each other on a Nichols plot and comparing this DF curve to the curve produced by the open-loop system, L, in the same space. The frequency on L at which it intersects the DF curve is a candidate frequency for a limit cycle in the feedback system behavior, and if L does not intersect the DF curve then no limit cycle will be produced from that nonlinearity.

Equation 156

퐿(푠) = 푃(푠)퐶(푠) 40

Thus, controllers can be designed to move L(s) in relation to the DF curve with the intention of specifying the frequency of a limit cycle or, more commonly, eliminating the limit cycle entirely. It is more common for a DF to be expressed as a function of γ, as described in equation 27, than the raw amplitude of the sine wave. This coefficient describes the ratio of the size of the nonlinearity’s region of influence. The region of influence for a nonlinearity is a set of one or more numbers describing the values where the nonlinearity takes effect. For example, the width of a dead zone or the ultimate value of saturation both describe the regions of influence.

Equation 167 푁표푛푙푖푛푒푎푟 푅푒푔푖표푛 표푓 퐼푛푓푙푢푒푛푐푒 훾 = 퐴푚푝푙푖푡푢푑푒 표푓 푖푛푝푢푡 푠푖푛푒 푤푎푣푒

The Describing Function Estimation (DFE) Algorithm

Figure 21. DFE Algorithm diagram The operation of the algorithm is shown in figure 21. The user selects a set of sine wave amplitudes to collect data at. The best set of amplitudes will asymptotically approach the regions of influence of the system nonlinearities in order to examine a wide range of γ. The system is then simulated once for each of these amplitudes. The simulator generates a sine wave at the desired amplitude and feeds it into the system of 41 nonlinearities as constructed by the user. The output of this system is put through a very narrow high-Q band pass filter centered at the frequency of the input sine wave.

The result very closely approximates the Fourier series coefficients at the fundamental frequency of the output wave, and thus the gain and phase of the output of the filter very closely approximate the gain and phase in the describing function at that γ value. By using a sine wave at the same frequency for every simulation we can guarantee the same fundamental frequency in the output wave, and therefore only need one filter for every use of the program.

The filter takes some time to respond, and the “settled” wave after this response is compared to the original input to determine phase and magnitude variance, which then constitute a point on the describing function.

42

Filter Design

Figure 22. Band Pass Filter The filter design, whose Bode plot is shown in figure 22, is fairly straightforward.

For the examples shown in this paper, an 18th order Butterworth band pass filter centered at 1 radian per second was used with very good results, although any frequency can be selected instead. This filter does an excellent job of isolating components extremely close to the desired frequency in terms of magnitude, but the phase values are extremely sensitive. In order to achieve such extreme magnitude characteristics, the slope of the phase at the center frequency is extremely large. The only frequencies that are allowed through the filter are those that are very close to the desired central frequency, but these frequencies can have a very wide range of phases associated with them. The ultimate result is a very accurate impression of the magnitude portion of the DF and a less certain 43 . It is recommended that anyone implementing this algorithm experiment with several different algorithms acting on both the nonlinearity output signal as well as the filtered signal to estimate the phase.

DF Control design

Describing functions are relatively simple to use alongside QFT. Because limit cycle characteristics can be predicted from the intersection of the system L-curve and the

DF on a Nichols plot, the limit cycle characteristics can be controlled by changing the shape of the L-curve. Limit cycles can even, in some cases, be entirely eliminated.

Example: Backlash and Saturation Compound Nonlinearity

A major advantage to the DFE technique is that it allows the analysis of the way that multiple nonlinearities distributed in arbitrary places interact together in a system.

For instance, consider the nonlinear characteristics of backlash and saturation, both of which are present in a geared motor. Calculating the DF by hand for this system is very complex, and the result isn’t globally useful because the DF will be different based on the relative size of the backlash region and the saturation values. 44

Backlash and Saturation 120

100

80

60

Magnitude 40

20

0

-20 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90 Phase

Figure 23. Backlash width of 1, dots correspond to saturation of ±0.5, circles correspond to ±10 Figure 23 shows the estimated DFs for the combination of backlash and saturation obtained with the new algorithm. DF1 is the result when the saturation values are very close to the backlash width, while DF2 is the result when the saturation values are very large compared to the backlash width. Not only do these results allow for the design of controllers that avoid the DF, they allow the user to see precisely how two different nonlinearities can interact with each other.

45

Example: Arbitrary Nonlinearity

Arbitrary Nonlinearity 2.5

2

1.5

1

0.5

0

Output -0.5

-1

-1.5

-2

-2.5 -6 -4 -2 0 2 4 6 Input

Figure 24. Input/output diagram for an arbitrary nonlinearity Figure 24 shows an arbitrary nonlinearity input/output diagram. Manual calculation of a describing function for this nonlinearity would be tedious, time consuming, and potentially impossible. Fortunately, the DFE method works extremely well. 46

Figure 25. Estimated describing function for arbitrary nonlinearity Figure 25 shows the estimated describing function for the arbitrary nonlinearity in figure 24. The DF has several different regions of interest, but behaves precisely as expected for γ close to zero as well as γ close to one. When γ approaches zero, this nonlinearity resembles saturation, resulting in a vertical line on the -180 axis. Similarly, for γ approaching 1 for the central nonlinear region, both the nonlinearity and as a result its describing function resemble a dead-band, which shows up in the DF as the phase approaches -135 degrees. The loop in the center arises because of the negative slopes in the arbitrary nonlinearity, which essentially introduce a small element of positive feedback.

Another important issue with the implementation of the DFE method is clearly demonstrated in figure 10. Errors in the calculation of the phase of the output signal can and will lead to unexpected discontinuities in the describing function. Figure 10 shows at least two of these issues, the first is the upper-rightmost point at the end of the curve. The simulator used to generate these points necessarily has quantized data, which leads to phase errors. The other problematic spot is the region on the -180 degree axis, at just 47 below 50 dB. The points seem to trail off here, an error which again is attributed to difficulties in calculating the phase of the output wave.

Example: Limit Cycle Prediction:

Nichols - Backlash 120

100

80

60

40

20

Magnitude 0

-20

-40

-60

-80 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90 Phase

Figure 26. L curve and Backlash Describing Function with intersection at 0.44 rads/sec The two curves in figure 11 intersect, so we know that a limit cycle can arise. We can now simulate the system to see if a limit cycle arises where predicted: 48

Step Response 1.5

1

Output 0.5

0 0 50 100 150 200 250 300 350 400 450 500 Time Step Response 0

-2

-4

log10(|Error|) -6

-8 0 50 100 150 200 250 300 350 400 450 500 Time

Figure 27. Plant output and control error Figure 27 shows the step response of the system. It takes some time, but the output eventually moves into a limit cycle, bouncing back and forth near the target without being able to attenuate to it. To avoid this, a controller can be designed around the DF so that the two curves never intersect.

49

Third mode controller

Figure 28 2849푠 + 470 퐶 (푠) = 2 0.004775푠 + 1

Finally, the figure 28 shows the estimated describing function for the nonlinearities experienced by the telescope and a controller designed to totally eliminate the limit cycle created by these nonlinearities.

Bang-bang control design

The DF method breaks down for the velocity-induced limit cycle problem because a DF cannot be generated that takes varying target velocity into account. In this case, a bang-bang control solution is desirable. 50

120 Reference Upper Bound 100 Lower Bound Position

80

60

Angle 40

20

0

-20 0 10 20 30 40 50 60 70 80 90 100 Time

Figure 29. Simple bang-bang control The above graph shows a simplified example of what happens in the bang-bang solution. First, a maximum and minimum desired error are determined by the astronomer.

These error values will also determine the frequency of the limit cycle introduced, with tighter error specification corresponding to higher frequencies. The telescope, whose position is indicated by the cyan line, is allowed to stick in place until it meets the lower error bound. At this point, enough torque is applied to break the stiction and move the telescope. Ideally, when the telescope reaches the upper bound it is allowed to stick in place again.

Realistically, the telescope will reach the upper bound almost immediately after unsticking, so the motors will only be activated for a few time steps. A simple way to implement this algorithm, and the way that is demonstrated later in this paper, is to 51 activate the motors whenever the error indicates that the telescope is below the reference and de-activate the motors whenever the error is above the reference.

5.3 Three Mode Control Simulations

Reference Tracking

The two and three mode controllers are compared directly to show the advantages and disadvantages of the three mode scheme.

Figure 30 The first thing to note about the responses in figure 30 is that no controller is able to push lower than the -5 mark, meaning that there will be some noticeable offset of the target from the center of the image in all cases. The position three mode controller line can be difficult to see, but it settles just above the velocity three mode line. This means 52 that the DF controller achieves almost the same level of precision as the bang-bang controller, but does so without oscillation, making it the idea choice for zero and low velocity targets. Both third mode controllers drastically outperform the two mode solution which jumps around the target, occasionally achieving better precision but never for long.

Figure 31 Figure 31 shows the response of each control scheme to the 180 degree step and ramp signal described earlier. Each controller behaves in the same fashion until about 20 seconds, when the error becomes low enough to trigger the third mode control schemes.

The position-based three mode controller does not perform well when the target is moving, but it introduces very little oscillation, favoring instead a larger steady-state error. The final value of this controller corresponds to roughly 100 pixels of error, which 53 may be acceptable to the astronomer depending on the size of the object that they are observing.

If vibration is acceptable, then the velocity-based third mode controller is a clear winner, achieving a mere 0.2 arc seconds of error. The tradeoff for this low error is the high-frequency of the limit cycle, 43.5 Hz.

Disturbance Rejection

Figure 32 In this scenario, a 1.2 Nm step input disturbance is introduced at 50 seconds. 1.2

Nm was chosen because it is a large enough value to unstick the telescope. The bang- bang controller cannot reject the disturbance well enough, so the aggressive controller is 54 used again to overcome it. The control scheme will eventually settle back into the bang- bang controller, but will take some time to do so.

Position three mode control is actually helped by the disturbance, which pushes the telescope slightly closer to the target. This effect could be easily replicated in the controller by adding a feed-forward element to the position three mode controller that will push it to stick closer to the target position, but the design of such an element is outside the scope of this paper.

The two mode control scheme is largely unaffected by the disturbance. Its oscillations temporarily increase in amplitude, but the aggressive controller is able to quickly revert back to its original cycle.

55

Robustness

Figure 33 Finally, a robustness test was performed. The telescope coefficients were taken to their extremes for this simulation, and it is clear that all controllers are fairly robust.

There is some distortion of the two-mode wave, but it does not gain or lose any error overall. The three mode signals are virtually unchanged from before.

6. Future Work

6.1 Collaboration with the Pontifical Catholic University of Chile (PUC)

At the SPIE conference on telescope control this summer, I was approached by an engineer from the PUC looking for control systems help for a set of telescopes that are being constructed in Chile. The PUC currently own two telescopes, the Virtud telescope, located in France, and the Puc40 telescope located in Chile. Puc40 is an older telescope that the team is automating, and is the telescope that these control methods will be 56 applied to. As of the time of this writing, the telescope is still under construction, but is nearly ready for basic testing to determine model coefficients.

The PUC plan on building a small array of six telescopes in northern Chile, and want control support for all of them. If these algorithms prove successful on Puc40, we will continue to apply these control techniques to the rest of the telescopes in their array.

All of these telescopes are intended for use by astronomy students at the PUC.

6.2 Senior Project

In order to support the Chilean teams as well as possible, a telescope for control teams at Case to work on is ideal. Unfortunately, telescopes of this variety are fairly expensive to produce, and only one particular telescope would be worked on. The solution to these problems is to make a telescope emulator that is smaller, less expensive, and can have customizable characteristics to emulate a range of different telescopes. To complete this task, a senior project group of electrical engineers were recruited.

The telescope emulator consists of two DC brush motors coupled together with an extremely high-precision (1,000,000 ppr) encoder attached to them as well to measure rotation. The primary motor is the same make and model as the motors being used on the

Chilean telescopes, as is the encoder. The secondary DC motor, which is being used as a generator with a customizable load circuit, is intended to have the same rotation characteristics from the primary motor’s perspective as the real telescope would.

Essentially, by varying the inductance and resistance of the load circuit on the secondary motor, the motor will be easier or harder to turn, and when these values are carefully selected, the motor will turn in the same fashion as the real telescope. Selection of these 57 values depends on the internal resistance of the motor, the motor’s natural inductance, and the desired friction and inertia characteristics to be emulated.

While the linear properties of this system are relatively easy to emulate, the nonlinear behavior will be inherently different. DC brush motors have more stiction than the telescope will, as from a non-moving position the motor needs to briefly fight the stiff bristles of the brush to start moving. Also, this system does not involve gearboxes, so there will be very little backlash within it to control for. These differences are acceptable as they do not affect the describing function controller design and only increase the amount of “on” torque supplied by the bang-bang controller.

Conclusion

Three mode control schemes that switch between aggressive, moderate, and limit cycle-based control are extremely effective at controlling telescope motors to a high degree of precision, reducing steady-state error to values small enough that the camera cannot distinguish motion errors. The usage of quantitative feedback theory to design the linear controllers does a good job keeping the telescope tracking well against disturbances regardless of changing telescope parameters. Two different methods were suggested for designing the third control mode around the limit cycles of the system to fit the astronomer’s tracking and vibration needs, each of which performs well in a wide set of circumstances.

58

Bibliography

[1] J. J. Krewalk and E. C. Silverburg, "Telescope control system". United States of America Patent US4682091 A, 21 July 1987.

[2] E. Jehin, M. Gillon, D. Quelox, P. Magain, J. Manfroid, V. Chantry, M. Lendi, D. Hutsemekers and S. Udry, "TRAPPIS: TRAnsiting Planets and Planeteslmals Small Telescope," The Messenger, pp. 2-6, September 2011.

[3] Orion Telescopes & Binoculars, "Orion XT10," 2014. [Online]. Available: http://www.telescope.com/Telescopes/Dobsonian-Telescopes/pc/1/12.uts. [Accessed October 2014].

[4] M. Garcia-Sanz and C. Houpis, Wind Energy Systems: Design, CRC Press, Taylor & Francis, 2012.

[5] D. Karnopp, "Computer simulation of stick-slip friction in mechanical dynamical systems," Journal of Dynamic Systems, Measurement, and Control, pp. 100-103, 1985.

[6] C. Houpis, S. Rasmussen and M. Garcia-Sanz, Quantitative Feedback Theory: Fundamentals and Applications, CRC Press, Taylor & Francis, 2006.

[7] M. Garcia-Sanz, A. Mauch and C. Philippe, The QFT Control Toolbox (QFTCT): An Interactive Object-Oriented Matlab CAD Tool for QFT Robust Control Systems Design, European Space Agency, Public University of Navarra, Case Western Reserve University, 2008-2014.

[8] K. J. Astrom and T. Hagglund, Advanced PID Control, ISA, 2005.

[9] D. Atherton, Nonlinear Control Engineering, Van Nostrand Reinhold, 1982.

[10] A. Gelb and W. E. Vander Velde, "Sinusoidal-Input Describing Function (DF)," in Multiple- Input Describing Functions and Design, McGraw Hill, 1968, pp. 41-109.

[11] M. Shinners, "An analysis of surface-detected EMG as an amplitude-modulated noise," in International Conference on Medicine and Biological Engineering, Chicago, 1998.

[12] W. P. Lounsbury and M. Garcia-Sanz, "High-performance quantitative robust switching control for optical telescopes," in SPIE 9152, Software and Cyberinfrastructure for Astronomy III, 9152F, Montreal, 2014.

[13] W. Lounsbury and M. Garcia-Sanz, "A Practical Describing Function Estimator and Control Design Methodology for Systems with Multiple Nonlinearities," in American Control Conference 2015, Chicago, 2015 - Submitted.