Filters for Dynamic Rocket Thrust Measurements

Richard B.H. Ahlfeld Master of Science Thesis

Aerospace Engineering

Deconvolution Filters for Dynamic Rocket Thrust Measurements

Master of Science Thesis

For the degree of Master of Science in Aerodynamics at Delft University of Technology

Richard B.H. Ahlfeld

August 19, 2014

Faculty of Aerospace Engineering · Delft University of Technology The work in this thesis was carried out at Airbus Defence and Space in Ottobrunn, Germany.

Copyright © Aerodynamics Group All rights reserved. DELFT UNIVERSITY OF TECHNOLOGY DEPARTMENT OF AERODYNAMICS

The undersigned hereby certify that they have read and recommend to the Faculty of Aerospace Engineering for acceptance the thesis entitled “Deconvolution Filters for Dynamic Rocket Thrust Measurements” by Richard B.H. Ahlfeld in fulfilment of the requirements for the degree of Master of Science.

Dated: August 19, 2014

Supervisors: ii

Richard B.H. Ahlfeld Master of Science Thesis Abstract

Every spacecraft carries small rocket engines called thrusters for the purpose of orbit and position corrections in space. A precise operation of the thrusters saves fuel and a lower fuel consumption can extend the service life of the spacecraft. Precise thrust levels can be better obtained by pulsed firing than by continuous firing of the thrusters. To guarantee a precise operation, thrusters are tested extensively in a vacuum chamber beforehand on earth to measure their thrust. Measurement errors always impede the accurate determination of the rocket thrust. The measurement of pulsed rocket thrust is especially difficult, if using strain gage type thrust stands typical for the space industry. Their low first natural frequency results in a dominant transient response of the thrust stand structure, which interferes with the thrust . In this thesis, an augmented state-space is proposed as a low-cost and easy-to-implement solution to deconvolute the thrust signal from the transient thrust stand response. The typical weakness of the Kalman Filter - the complicated determi- nation of its process and measurement noise covariance matrices - is overcome by presenting several methods of choosing the matrices for pulsed thrust measurements. The measurement state covariance matrix of the Deconvolution Kalman Filter is used to obtain an estimate of the uncertainty attached to the deconvoluted thrust signal. Using several test cases, the De- convolution Kalman Filter’s superiority to evaluate pulsed thrust measurements is proven by comparing it with Infinite filters commonly used in the industry. Finally, a sequential Monte Carlo method is applied to the dynamic thrust measurement problem for the first time to show that while precise thrust levels may be better obtained by pulsed firing, the attached uncertainty can become up to three times higher.

Master of Science Thesis Richard B.H. Ahlfeld iv Abstract

Richard B.H. Ahlfeld Master of Science Thesis Table of Contents

Abstract iii

Acknowledgements xiii

1 Introduction1

2 Literature Review7 2-1 Rocket Thrust Measurements...... 7 2-1-1 Thrust Stands...... 7 2-1-2 Steady-State and Pulsed Thrust Measurements...... 8 2-2 The Dynamic Thrust Measurement Problem...... 9 2-2-1 Analytical Calculation of the System Response...... 10 2-2-2 Building a Distortionless Measurement System...... 13 2-2-3 Experimental Determination of the System Response...... 14 2-3 Digital Deconvolution Filters...... 15 2-3-1 Deconvolution...... 16 2-3-2 Ill-Posedness of the Deconvolution Problem...... 17 2-3-3 Thrust Compensation Filters...... 19 2-3-4 Low-Pass Filter...... 20 2-4 Infinite Impulse Response (IIR) Deconvolution Filters...... 23 2-4-1 (FIR) andIIR Filters...... 23 2-4-2 Autoregressive-Moving-Average Models...... 25 2-4-3 Discrete-Time Linear Least Squares System Identification for IIR Filters. 26 2-4-4 Stabilisation of IIR Filters...... 28 2-4-5 Approximation Error and Error Statistics...... 29 2-5 The Kalman Filter...... 31 2-5-1 Advantages of the Kalman Filter for the Dynamic Thrust Measurement Problem...... 31

Master of Science Thesis Richard B.H. Ahlfeld vi Table of Contents

2-5-2 State-Space Representation...... 32 2-5-3 Kalman Filter Algorithm...... 34 2-5-4 IIR Deconvolution from Noisy Observations Using the Kalman Filter... 39 2-5-5 Determination of Q and R ...... 41 2-6 Uncertainty Evaluation for Deconvolution Filters...... 42 2-6-1 Monte Carlo Uncertainty Quantification for Thrust Deconvolution Methods 42 2-6-2 Sequential Monte Carlo Method...... 44 2-6-3 Setting up the Filter Covariance Matrix Uba ...... 45 2-7 Conclusion...... 46 2-8 Objectives...... 47

3 Airbus DS Thrust Measurement Equipment and Evaluation Method 49 3-1 Measurement Evaluation Procedure...... 49 3-2 Measurement Equipment...... 52 3-2-1 Thrust Stand...... 52 3-2-2 Thrust Force Sensor...... 53 3-2-3 Thruster...... 54 3-3 The Airbus DS Thrust Compensation Method...... 56 3-3-1 The and its History...... 56 3-3-2 Linearity Check...... 57 3-3-3 High-Pass Filter...... 58 3-3-4 IIR System Identification...... 58 3-3-5 Filter Order...... 60 3-3-6 Gain Change Caused by Order Reduction...... 63 3-3-7 Second Order System Low-Pass Filter...... 63 3-3-8 Design of the Compensation Filter...... 65 3-3-9 Error Analysis for Pulse Mode Firing (PMF) Measurements...... 65 3-4 The MATLAB Edition of the TDMS Method...... 67 3-4-1 Lower Identification Order...... 67 3-4-2 Step-Function as Identification Input...... 68 3-4-3 Zero-Point Correction...... 69 3-4-4 Results Obtained by the Matlab Edition...... 70 3-5 Improvement Possibilities...... 72 3-5-1 Inverse Method...... 72 3-5-2 System Identification with Firing Signal...... 73 3-5-3 Filter Order...... 75 3-5-4 Low-Pass ...... 78 3-5-5 Phase Correction...... 80 3-5-6 Stability...... 82 3-5-7 Design of Inverse Compensation Filter...... 82

Richard B.H. Ahlfeld Master of Science Thesis Table of Contents vii

3-6 Uncertainty Analysis for the Airbus DS Thrust Measurements...... 84 3-6-1 Electronic Noise...... 85 3-6-2 Identification Error...... 87 3-6-3 Non-Repeatability Force Transducer...... 88 3-6-4 Firing Noise...... 89 3-6-5 Monte Carlo Simulation...... 90 3-7 Conclusion...... 92

4 Kalman Filter for Deconvolution 93 4-1 Preliminary Conditions for the Use of the Kalman Filter...... 93 4-2 Test of Bora’s Deconvolution Kalman Filter...... 94 4-2-1 Set-Up of Test Scenario...... 94 4-2-2 Removal of Initialisation Error...... 95 4-2-3 Determination of Q and R ...... 96 4-3 Deconvolution Kalman Filter for Dynamic Thrust Measurements...... 99 4-3-1 Choosing the Integrated Low-Pass Filter...... 99 4-3-2 Heuristic Tuning of Q and R ...... 103 4-3-3 Rational Tuning of Q and R ...... 106 4-3-4 Automatic Tuning of Q and R ...... 107 4-4 Uncertainty Analysis for the Deconvolution Kalman Filter...... 108 4-4-1 Uncertainty Analysis Using the Deconvolution Kalman Filter...... 108 4-4-2 Uncertainty Analysis Using an Efficient Implementation of the Monte Carlo Method...... 111

5 Test Results 115 5-1 Performance of Deconvolution Filters in Test Scenarios...... 115 5-1-1 Comparison of Deconvolution Filters...... 118 5-1-2 White Gaussian Random Noise...... 122 5-1-3 Low-Pass Filter Effects...... 123 5-2 Realistic Test Scenario...... 126 5-3 Computational Effort...... 128 5-4 Summary of Test Results...... 129

6 Conclusion 131 6-1 Further Research Possibilities...... 133

Bibliography 137

Glossary 143 List of Acronyms...... 143 List of Symbols...... 143

Master of Science Thesis Richard B.H. Ahlfeld viii Table of Contents

Richard B.H. Ahlfeld Master of Science Thesis List of Figures

1-1 ATV firing its thrusters [1]...... 1 1-2 Hot firing test of an AHRES engine [2]...... 2 1-3 Airbus DS Bipropellant Thrusters [3]...... 3

2-1 Typical thrust stand configuration [4]...... 8 2-2 Illustration of Steady-State Firing (SSF) and PMF...... 9 2-3 Dynamic thrust measurement example...... 10 2-4 Analytical multi-degree of freedom thrust stand model [4]...... 11 2-5 Normed step response of a thrust stand behaving like a system of order 2..... 11 2-6 Analytical single-degree-of-freedom thrust stand model [4]...... 12 2-7 of the PMF measurement platform designed by Gao [7].... 14 2-10 White noise cancellation performance of deadbeat and non-deadbeat digital com- pensator [8]...... 20 2-11 Ideal frequency response for a thrust compensation low-pass filter according to [4]. 21 2-12 Schematic frequency response of an elliptic low-pass filter...... 21 2-13 Comparison of the amplitude characteristics of Butterworth of order 3, Chebychev and digitalised Bessel filter...... 22 2-14 Illustration of the working principle of FIR and IIR filters...... 24 2-15 Idea of Kalman filtering...... 32 2-16 Kalman filtering to recover a noise corrupted input signal [9]...... 39 2-17 Performance of the Kalman Filter for different noise covariance matrices [10]... 41 2-18 Relation between Number of Monte Carlo Trials and Digit Accuracy from [11].. 43

3-1 Flowchart illustrating the steps of a thrust measurement evaluation...... 50 3-2 Measurement signal of thruster showing constructive interference...... 51

Master of Science Thesis Richard B.H. Ahlfeld x List of Figures

3-3 Offset of zero point during longer SSF measurement...... 51 3-4 Thrust stand sketch...... 52 3-5 Characteristics of SM S-Type Load Cell [12]...... 53 3-6 External influences on the Thrust Measurement Bridge (TMB)...... 53 3-7 Thruster characteristics [13]...... 54 3-8 Isp for SSF and PMF[13]...... 54 3-9 Ibit repeatability and test range [13]...... 55 3-10 The algorithm of the TDMS method...... 56 3-11 Band-stop filter...... 56 3-12 Check of linearity...... 57 3-13 Frequency spectrum of PMF test showing low frequency noise...... 58 3-14 Calibration with impulse hammer...... 59 3-15 used for identification...... 59 3-16 System identification flow chart...... 60 3-17 Frequency spectra of two tests...... 61 3-18 Example for frequency, damping, amplitude and phase of a transfer function of order 60...... 62 3-19 Frequency response and reconstructed thrust input...... 63 3-20 Frequency response of inverted, reduced transfer function...... 64 3-21 Frequency response of low-pass filter Second Order System (SOS)...... 65 3-22 Frequency response of the Airbus DS thrust compensation filter...... 65 3-23 Frequency, damping, amplitude and phase for a transfer function of order 60.. 67 3-24 Frequency spectrum of measurement signal...... 68 3-25 Impulse and step-function input used for system identification...... 69 3-26 Zero point correction...... 69 3-27 Thrust signal validation...... 70 3-28 Two exceptional test cases...... 71 3-29 Algorithm of the Inverse Transfer Function method...... 72 3-30 Firing signal used as input for identification...... 73 3-31 Thrust pulses reconstructed using different identification routines...... 73 3-32 Choice of order for least squares identification...... 76 3-33 Beat in measurement signal...... 76 3-34 Compensated thrust signal for filter of order 2 and 8...... 77 3-35 Frequency response for Inverse Transfer Function filter of order 2 and 8..... 77 3-36 Time response of Bessel and Butterworth filter...... 78 3-37 Thrust stand sketch...... 79 3-38 Frequency and phase response of the Inverse Transfer Function method...... 80 3-39 Forward, reverse and bidirectionally filtered thrust signal...... 80 3-40 Phase jump when frequency passes through 0...... 81

Richard B.H. Ahlfeld Master of Science Thesis List of Figures xi

3-41 One and bidirectionally filtered thrust pulse...... 81 3-42 Pole-zero plot of the Inverse Transfer Function compensator...... 82 3-43 Frequency response of Inverse Transfer Function Filter...... 83 3-44 Last pulse of measurement signal and transient response...... 84 3-45 Error sources considered in the uncertainty quantification for Airbus DS...... 85 3-46 Electronic noise in a thrust measurement signal...... 85 3-47 Histogram of electronic noise...... 86 3-48 Frequency spectrum of electronic and ideal white Gaussian noise...... 86 3-49 Left: Identification error, Right: Histogram of modeling error...... 87 3-50 Frequency spectrum of modelling error...... 87 3-51 Measured (black) and predicted (red) output using an Autoregressive-Moving Av- erage (ARMA) model of order 27...... 88 3-52 Example of firing noise caused by inconsistent combustion...... 89 3-53 Histogram of firing noise...... 89 3-54 Frequency spectrum of firing noise...... 90 3-55 Example of one input and output signal including noise...... 90 3-56 Uncertainty and 95% credibility intervals for a thrust signal...... 91 3-57 Uncertainty and 95% credibility intervals for a thrust signal...... 91

4-2 Deconvolution of a random input signal using Bora’s method [9]...... 95 4-3 Convergence of Kalman gain...... 96 4-4 Deconvolution of random input signal with initial guess for P determined in a pre-run. 96 4-5 Q/R-ratio for the Deconvolution Kalman Filter...... 97 4-6 Relative error for different Q/R ratios...... 98 4-7 Different effects of Butterworth low-pass filter...... 99 4-8 Thrust inputs deconvoluted with the Kalman Filter using Butterworth filters with different order...... 100 4-9 Steady-state error caused by the Inverse Transfer Function and Kalman Filter.. 101 4-10 Steady-state system error for different types of feedback systems [14]...... 102 4-11 Thrust signal recovered by Deconvolution Kalman Filter for different values of Q 104 4-12 Absolute error x − xˆ for different Q/R ratios...... 104 4-13 Four pulses used to determine the value of Q ...... 105

4-14 Error metrics J1 and J2 for the Deconvolution Kalman Filter...... 106 4-15 Input Signal and Output Signal used for Autocovariance Determination...... 108 4-16 95% credible intervals reconstructed with the Deconvolution Kalman Filter... 110 4-17 95% credible intervals calculated with a sequential Monte Carlo method..... 111 4-18 Input and output signal used for the sequential Monte Carlo method...... 112 4-19 Input and output signal used for the sequential Monte Carlo method for PMF test. 112 4-20 Input and output signal for a PMF test...... 113

Master of Science Thesis Richard B.H. Ahlfeld xii List of Figures

4-21 Uncertainty for a single thrust pulse, for which the rise of the thrust has been triple 113

5-1 Flowchart illustrating how synthetic data are generated to compare different de- convolution methods...... 116 5-2 Measurement signal generated with the (n,n) or (n,n-1) transfer function..... 116 5-3 Frequency response of the two test models constructed to have the same frequency response...... 117 5-4 Delay of one sample caused when identifying a (n,n) model with a (n,n-1) transfer function...... 118 5-5 Bias in the TDMS, Inverse Transfer Function and Deconvolution Kalman Filter method...... 119 5-6 Recovery of prescribed input with on and off times of the same duration: 10ms and 50ms...... 120 5-7 Effect of random noise with standard deviation of σ = 0.15 on deconvolution methods...... 122 5-8 Inverse Transfer Function method without and with Butterworth low-pass filter.. 124 5-9 Effect of white noise with standard deviation 0.15N on deconvolution methods.. 124 5-10 Synthetic input and output data for realistic test scenario...... 126 5-11 Reconstruction of input signal including firing noise...... 127

6-1 The theoretical model built by Ren with a nonlinear modal analysis is accurate enough to replace the actual frequency response [15]...... 133 6-2 Effect of errors in the noise covariances of Kalman Filter and OUFIR filter estimates [10]...... 134

Richard B.H. Ahlfeld Master of Science Thesis Acknowledgements

I would like to thank my supervisors Johann Keppeler (Airbus Defence and Space) and Fer- dinand Schrijer (Delft University of Technology) for their advice and assistance during the writing of this thesis. A special thanks goes to Robert Wagner (Airbus Defence and Space) for his critical comments and Sascha Eichstädt (Physikalisch Technische Bundesanstalt Berlin) for his helpful insights and impulses.

Delft, University of Technology Richard B.H. Ahlfeld August 19, 2014

Master of Science Thesis Richard B.H. Ahlfeld xiv Acknowledgements

Richard B.H. Ahlfeld Master of Science Thesis Chapter 1

Introduction

The International Space Station (ISS) remains on its nominal orbit by firing its thrusters on a regular basis to compensate for the effect of gravitational forces [6]. Likewise, every satellite, space shuttle or spacecraft carries thrusters for orbit and gesture controlling, docking rendezvous or landing operations [8].

Figure 1-1: ATV Edoardo Amaldi and the International Space Station firing their thrusters to boost their orbit, captured by ESA astronaut André Kuipers [1].

During an attitude adjustment of the ISS or a satellite, an imprecise firing of the thrusters can cause an imbalance. By contrast, a more accurate firing can save fuel, extend the service life of the spacecraft and consequently increase the payload or reduce the cost of a mission [8]. Because precise thrust levels can be better obtained by a pulsed firing than by continuous firing of the thrusters [15], the design of highly accurate measurement evaluation methods for pulsed liquid rocket engines has received more attention in the last decade [8, 15, 16, 17], even though most of the concepts have been known since the 1960s [4, 18].

Master of Science Thesis Richard B.H. Ahlfeld 2 Introduction

To determine the exact performance of a thruster in space, an experimental determination of the thrust can be conducted in a vacuum chamber beforehand on earth. Although the thrust of a liquid rocket engine can by determined by analytical or computational methods, a reliable experimental validation of every thruster is unavoidable. It has to be ensured that the thruster will function flawlessly in space for many years, where there is no opportunity of maintenance. Even if a good computational or mathematical model is available, each thruster still has to be tested extensively on a thrust stand. A thrust stand is a mechanical structure equipped with force transducers onto which the thruster is mounted. An example of a thrust stand operated by Airbus DS and the German Aerospace Center (DLR) in Lampoldshausen is shown in Figure 1-2.

Figure 1-2: Hot firing test of an AHRES engine by the German Aerospace Center DLR in Lampoldshausen [2].

The thrust of chemical rocket engines is usually determined using a displacement type thrust stand. For steady-state thrust measurements, during which the engine is fired continually, displacement-type thrust stands can be very precise [16]. However, most displacement-type thrust stands found in literature are not suitable for pulsed firing frequencies of higher than 50Hz [16]. The reason is that during pulsed thrust measurements the transient response of the mechanical structure interferes with the thrust signal. The amplitude of the interfering thrust stand oscillation can become larger than the thrust value, so that the true thrust value cannot be determined without first compensating the oscillations of the thrust stand. Since the mathematical relation between the thrust signal and the thrust stand response is best described by a convolution-type integral, the inverse process of separating the thrust from the transient system response is called deconvolution. The flexible bearing between the thruster and the load cell is mainly responsible for the high amplitudes in the transient thrust stand response. Therefore, pulsed thrust can be measured more accurately when a stiffer bearing with higher natural frequencies is used. Novel designs of thrust stands with favourable frequency spectra were proposed by [15, 16, 17,7]. While such thrust stands will improve the precision of pulsed thrust measurements in the future, at the moment industrial rocket engine providers mostly use displacement type thrust stands. For such thrust stands it is a challenge to reduce the error below 20% for pulsed tests, where the on and off times of the thruster firing are twenty times shorter than sampling rate. The main aim of this thesis is to develop a digital deconvolution filter, which is able to reduce the measurement accuracy of pulsed thrust measurements below 5%, if a displacement type thrust stand is used.

Richard B.H. Ahlfeld Master of Science Thesis 3

This thesis was initiated by Airbus Defence and Space (Airbus DS)1 and carried out in the department for data reduction and statics (TP24) in Ottobrunn in cooperation with the test department of liquid rocket engines in Lampoldshausen. The data made available by Airbus DS are proprietary and cannot be published in this work. However, surrogate data containing the relevant aspects of the problem were generated to perform tests. It is generally difficult to refer the reader to freely available data in the literature. There are, however, a few papers indicating the state-of-the-art [8, 16], which describe the typical model for dynamic thrust measurements. Chen [8] outlines three methods to compensate the transient thrust stand response (see Section 2-3-3) and Xing [16] outlines the calibration and design of a new thrust stand system for liquid pulsed rocket engines.

For Airbus DS the primary goal of this thesis was the trans- fer of their digital thrust compensation method from a SciL- ab/Java environment in the local Technical Data Management System (TDMS) in Lampoldshausen to a Matlab/C++ envi- ronment in Airbus’ global Measurement Data Base (MDB) in Ottobrunn. Furthermore, it should be investigated whether the method could be improved considering recent advances in dy- namic measurement filtering. Any improvement or alternative method should take into account that Airbus DS has a whole range of thrust stands and that the evaluation method should be easily adaptable to all of them. The thruster fired on the Airbus DS 10N thrust stands is depicted in Figure 1-3. Conventionally, the thrust stand response is filtered by a dig- ital IIR or FIR filter and the operator tries to improve the accuracy by shifting the zeros and poles of the digital filter. However, the designing effort increases significantly for increas- ing demands on accuracy, because the design of a deconvolution filter requires extensive manual testing. In addition, the system order has to be chosen carefully as a trade-off it is necessary to choose the system order carefully as a trade off between accu- racy and stability. Above all, it is important that the operator can discern whether a signal component is characteristic for the thrust signal or caused by the evaluation method. Using data provided by Airbus DS, an entirely new method Figure 1-3: Airbus DS Bipro- for pulsed rocket thrust measurements for displacement type pellant 10N Hydrazine Thruster thrust stands was developed: an augmented version of the op- [3] timal linear Kalman Filter. As this filter essentially performs the deconvolution of the thrust signal from the transient thrust stand response the method is called a Deconvolution Kalman Filter. To apply it, only an Autoregressive-Moving Average (ARMA) model describing the transient response has to be provided. Unlike for other filters, the Deconvolution Kalman Filter needs no stability analysis, even if an unstable model is used. It requires no other

1 The former Astrium Space Transportation.

Master of Science Thesis Richard B.H. Ahlfeld 4 Introduction designing choices of the operator than a sensible choice of its covariance matrices and, if an additional is wanted, a cut-off frequency for its low-pass filter component. The commonly known weak-spot of the Kalman Filter is that its measurement noise and process noise covariance matrices Q and R are unknown and need to be determined. Guidelines on how to choose the covariance matrices for dynamic thrust measurements were developed and shown to be effective. The Deconvolution Kalman Filter is simple to implement. Due to its special set-up, it is possible to conveniently integrate an evaluation of the measurement uncertainty into the deconvolution process. Tests on synthetic data have shown its great ca- pacity to extract even the shortest firing pulses with an error of less than 5%, for tests where the error of a comparable IIR Filter was never less than 20%.

Summary of Contents

The literature study in Chapter2 introduces the basics concepts of rocket thrust measure- ments and the dynamic rocket thrust measurement problem. Three different methods are presented to solve it: the analytical calculation of the dynamic system response, the con- struction of a distortionless measurement system and the experimental determination of the dynamic response with a subsequent removal by a digital filter. The basic properties of digital deconvolution filters are explained. The ill-posedness of the deconvolution problem requires that any thrust correction filter is complemented by a low-pass filter. Low-pass filters suitable for thrust measurements are elaborated. The focus lies on IIR filters for deconvolution, as used by Airbus DS. It is described how ARMA models can be identified using linear least squares system identification and how the modelling error can be quantified using error statistics. As innovative solution to most problems faced in dynamic thrust measurement evaluations, the use of a Kalman Filter for deconvolution is proposed. An adaptation of the Kalman Filter for deconvolution has already been attempted by Bora [9]. The choice of the Kalman Filter tuning parameters is different than for the linear optimal Kalman Filter and has not yet been treated in the literature. Only two methods, one by Saha and the other by Rajamani, are found to be adaptable for the Deconvolution Kalman Filter. The derivation of the Kalman Filter algorithm is used to illustrate how the Kalman Filter can be used for uncertainty quan- tification. The basics of uncertainty quantification are explained and the Monte Carlo method is suggested to evaluate the uncertainty in dynamic thrust measurements. It results in a high accuracy and has low memory requirements. The study is concluded by the industrial and academic objectives of this thesis. In Chapter3 , the Airbus DS main digital filter and thrust stand are described. First, an overview of the entire measurement evaluation procedure is given and specific properties of the used measurement equipment are explained. Then, the design of the digital filter is described in detail. The implementation of the described method in a Matlab/Octave environment required a few changes, which are explained. It is attempted to improve the method by making several adaptations. The performance of the improved method is analysed in the Test Chapter5. Finally, the measurement uncertainty is evaluated using a sequential Monte Carlo method provided by the Physikalisch Technische Bundesanstalt Berlin and conclusions are drawn from the results. This chapter is not included in the public version of this thesis, but the accuracy of the Airbus DS filters is a point of reference for the new methods developed. It partly contains real test data in scaled form, while synthetic data are used throughout the other chapters of this thesis. This is done not only because real data are proprietary, but also

Richard B.H. Ahlfeld Master of Science Thesis 5 because it is only for synthetic test data that the true input signal is available and can be used to compare the accuracy of different deconvolution methods. The Deconvolution Kalman Filter is developed and adapted to the dynamic thrust measure- ment problem in Chapter4 . The concept of the Deconvolution Kalman Filter is adapted from a design made by Bora [9]. His method is tested and adapted for the dynamic thrust measurement problem. As the correct choice of the measurement and process noise covariance matrices is crucial for the accuracy of the method, three ways to determine correct values are described: a heuristic approach, a rational method suggested by Saha [19] and an automatic method developed by Rajamani [20]. Due to the special set-up of the augmented Kalman Filter, an estimate of the uncertainty in the thrust signal can be extracted from the measure- ment state covariance matrix. It is found that the Deconvolution Kalman Filter produces a stable system, robust against numerical errors, and provides the optimal recursive solution for linear-time invariant systems when the noise is white Gaussian and its statistics are exactly known. Finally, the model uncertainty is evaluated once more using codes provided by the Physikalische Technische Bundesanstalt Berlin [21] for a model of order two. This is neces- sary, because the determination of the model uncertainty for dynamic force measurements is not yet standard practice in the industry [21]. In Chapter5 , the performance of the Deconvolution Kalman Filter, the Airbus DS IIR Filter and the alternative IIR Filter improving the Airbus DS method is evaluated in a series of synthetic test cases with different on and off times. The evaluation is divided into deconvolution filter, noise and low-pass filter effects to identify error sources separately. The computational effort is compared and the results are summarised. The results of this thesis are summarised in Chapter6 and possibilities for further research are pointed out.

Master of Science Thesis Richard B.H. Ahlfeld 6 Introduction

Richard B.H. Ahlfeld Master of Science Thesis Chapter 2

Literature Review

This chapter introduces the basic concepts of rocket thrust measurements in Section 2-1. The dynamic thrust measurement problem is introduced and three different methods of solving it are presented: the analytical calculation of the dynamic system response in Section 2-2-1, the construction of a distortionless measurement system in Section 2-2-2 and the experimen- tal determination of the dynamic response with a subsequent removal by a digital filter in Section 2-2-3. The concept and basic properties of digital deconvolution filters are developed in Section 2-3. A digital deconvolution filter always consists of a compensating and a noise attenuating part. This is described in Section 2-3-3 and Section 2-3-4, respectively. IIR filters for deconvolution, as used by Airbus DS, are explained in Section 2-4. It is described how Autoregressive-Moving Average (ARMA) models can be identified using linear least squares system identification and how the modelling error can be quantified. As innovative solution to most problems faced in dynamic thrust measurement evaluations, the Kalman Filter is introduced in Section 2-5. Its algorithm is derived in a way which illustrates how the Kalman Filter can be used for uncertainty quantification in Section 2-5-3. The basics of uncertainty quantification are explained in Section 2-6. A Monte Carlo method suitable to evaluate the uncertainty in dynamic thrust measurements with high accuracy and low memory require- ments is explained in Section 2-6-2. The chapter is concluded by the industrial and academic objectives of this work.

2-1 Rocket Thrust Measurements

2-1-1 Thrust Stands

The thrust force of a rocket engine can be determined by mounting the thruster onto a mechanical measurement system equipped with force transducers: the thrust stand. Although various different thrust stand types exist, their measurement principles are the same. The rocket engine is mounted onto a movable platform. The platform is attached to a fixed basement through one or several flexures. The flexures allow the thrust force to move the

Master of Science Thesis Richard B.H. Ahlfeld 8 Literature Review platform, so that the displacement of the movable platform is proportional to the thrust to be measured. A sensing element or force transducer is fixed to the movable platform to detect the displacement [16]. The thrust of chemical rocket engines is usually determined using a load cell as sensing element. Load cells can handle large amounts of thrust, but are also very sensitive [22]. They are the conventional choice for measuring thrust forces in the order of several Newton [23]. A load cell measures force through a set of sensitive strain gages. The strain gages measure the deformation of a material with known elasticity by recording the change in electrical resistance accompanying a deformation [24]. Three typical and simplified displacement-type thrust stands are displayed in Figure 2-1. In all of them, the thruster (3) is attached to a load cell (2), which is firmly connected to a thrust butt and to the ground. In the graph on the far left-hand side, the thruster is not directly fixed to the load cell but to flexures (4) which bend when the thrust force is exerted. This intermediate step has the advantage that the measurable strain of the bent beam can be described by a time-invariant and linear model of order 2. Moreover, the sensitivity of the thrust stand can be altered by changing the stiffness of its flexures.

Figure 2-1: Typical configurations of thrust stands. One horizontal (left) and two vertical (middle and right) configurations [4].

2-1-2 Steady-State and Pulsed Thrust Measurements

Thrusters can be fired in two different modes: steady-state and pulsed. If the thruster is fired once, continuously and long enough for the relevant parameters like the thrust and the pressure in the combustion chamber to reach quasi-stationary conditions, the firing of the thruster is referred to as Steady-State Firing (SSF). If the thruster is fired repeatedly in an either periodic or non-periodic sequence of on and off times, the firing is referred to as Pulse Mode Firing (PMF) and the measurement is known as dynamic thrust measurement. The particular case that the thruster is fired only once, but not long enough to reach an equilibrium can be counted as SSF.

Precise thrust levels can be better obtained by PMF than by SSF[15]. An exact knowledge of the thrust saves fuel, extends the service life of the spacecraft, increases the payload and reduces the cost of a mission [8]. Therefore, the design of thrust stands with high natural frequencies and adequate sensitivity for pulsed liquid rocket engines has received more at- tention during the last decade. For SSF measurements displacement-type thrust stands can reach high precision.

Richard B.H. Ahlfeld Master of Science Thesis 2-2 The Dynamic Thrust Measurement Problem 9

Figure 2-2: Illustration of SSF and PMF, using an input signal of amplitude 10N and a transfer function of order 2. One can see that the measurement signal reaches a new steady state at 10N after about 300ms in the graph on the left.

2-2 The Dynamic Thrust Measurement Problem

The classic reference work for dynamic rocket thrust measurement techniques was written by Crosswy and Kalb in 1967 at the Arnold Engineering Development Center (AEDC) in the United States [4]. The authors were the first to investigate the relevant components of the problem and suggested different solutions. In a nutshell, the dynamic thrust measurement problem can be formulated as follows: a thrust measurement is defined as dynamic if the input thrust varies faster in time than the response of the measurement system. If the input signal varies more slowly than the rate at which the system responds, the measurement is defined as static. For dynamic measurements, the fast variations of the input signal have a great effect on the accurate estimation of the measurand1 and the measurement uncertainty connected with it. In addition, there is usually a time delay between the thrust input and measured thrust stand response and the amplitude scaling is wrong [26].

That the mechanical thrust stand system is dynamic can be seen when observing the oscilla- tions in the measurement signal following an abrupt change in the input thrust, as depicted in Figure 2-3. If the thruster is turned on or off (green curve), the thrust force (red curve) changes abruptly and the thrust stand responds with oscillations (blue curve). Since rocket engines do not produce exact sinusoidal waves [16], the sinusoidal oscillation can only have one cause: the harmonics of a thrust stand frequency. If the thruster is fired with a frequency close to a natural frequency of the mechanical structure, the firing can even excite resonance effects.

1 Expression used in metrology to refer to the quantity sought in a measurement.

Master of Science Thesis Richard B.H. Ahlfeld 10 Literature Review

Figure 2-3: Example of a thrust measurement signal distorted by the thrust stand’s system response (blue curve). The firing signal (green curve) indicates when the thruster was turned on or off (1 or 0) and the reconstructed thrust (red curve) is the thrust input estimated by a digital filtering method.

To solve the dynamic thrust measurement problem, a technique has to be devised, which can reconstruct an accurately scaled and undistorted replica of the thrust force from a measure- ment signal corrupted by thrust stand dynamics. The existing techniques can be classified into three categories:

1. Calculating the system response analytically: - distributed parameter methods - lumped parameter methods 2. Building a distortionless measurement system. 3. Determining the system response experimentally: - analogue filter - digital filter

2-2-1 Analytical Calculation of the System Response

The mechanical system of the thrust stand is a composition of continuous mass members, whose motion response is a function of both space and time. In the past, a treatment of the thrust stand as a distributed parameter system2 could only be approximated with methods like Rayleigh-Ritz. Nowadays, the availability of high performance computers make it possi- ble (but still time-consuming) to set up a three-dimensional distributed model of the stand and simulate its dynamic motions with finite element software using Galerkin or Collocation

2 For an introduction to the notion of a distributed parameter systems see Chapter 2 in [27].

Richard B.H. Ahlfeld Master of Science Thesis 2-2 The Dynamic Thrust Measurement Problem 11 methods [28]. In 2013, the thrust stand of the historic Russian Vostock rocket engines was technically overhauled with an ANSYS model, as this was much cheaper than designing a new thrust stand [29]. Nevertheless, an analytical approach characterising all objects as rigid and only connected by joints, springs or dampers, as illustrated in Figure 2-4, provides insight into the parameters that govern the thrust stand and is less time intensive to perform. It can be used as a guideline, especially when designing a new thrust stand.

Figure 2-4: Example for an analytical multi-degree of freedom thrust stand model suitable for all thrust stands.

For a lumped parameter model, the mass, elasticity and energy dissipation of all rigid objects is assumed to be located at discrete points in space. In this way, only ordinary linear differ- ential equations with constant coefficients have to be solved instead of multi-variable partial differential equations. The system can be built analytically and solved with little computa- tional effort, as the equation of motion is derivable by application of D’Alembert’s principle or the Lagrangian formalism: [M(t)]q ¨ + [B(t)]q ˙ + [K(t)] q = {F } (2-1) where [M(t)] is the mass and moment of inertia matrix, [B(t)] is the damping matrix, and [K(t)] the stiffness matrix. If all coefficients [M(t)], [B(t)] and [K(t)] are constants, the dynamic system (2-1) is called time-invariant or stationary. All three matrices are square matrices of size n × n, where n is the number of degrees of freedom; q¨ and q˙ and q are single column matrices with n elements.

Figure 2-5: Normed step response of a thrust stand behaving like a system of order 2.

Master of Science Thesis Richard B.H. Ahlfeld 12 Literature Review

The transient response of a thrust stand is mostly characterised by a single predominant frequency and looks like the response of a stationary single-degree-of-freedom system of order 2 as shown in Figure 2-5. To describe the system with a classical Mass-Spring-Damper (MSD) system of order 2, which can be illustrated as in Figure 2-6, all components (the rocket engine, the propellant lines and the mounting structure) have to be regarded as one lumped mass to be contained in a single mass parameter M. The dynamic and static deflections need to be small to assume linear damping with parameter B. The spring rate should be a linear and time invariant function of spring deflection to apply Hooke’s Law with stiffness K. In addition, it is assumed that the energy dissipation mechanism is linearly dependent upon velocity and time invariant and that the thrust butt is rigid [4]. That an ordinary MSD system of order 2 with these assumptions is a good approximation for a limited range was validated for example by [6,8, 17]. However, the complex mechanical thrust stand structure does not respond like a single-degree-of-freedom system for an unlimited range of excitation frequencies. It will be discussed in Chapter3 why efficient dynamic response compensation using a system of order 2 is difficult to realise [8].

Figure 2-6: Analytical single-degree-of-freedom thrust stand model [4].

For a single-degree-of-freedom system, the external force is equivalent to the sum of the system’s reaction forces. Summing them up to determine the thrust is called the Reaction Force Summation Technique and was extensively adopted to solve the dynamic thrust problem [8], for example in [30]. The adequacy of any model formulation still has to be verified by correlation with an experimentally- determined system response. To obtain a transfer function for the system of order 2, the continuous Laplace transform is performed under the assumption that the coefficients are constant and the initial conditions are all set to 0:

Ms2Y (s) + CsY (s) + kY (s) = X (s) . (2-2)

Rearranging shows that the transfer function of the system is

Y (s) 1 H (s) = = . (2-3) X (s) Ms2 + Cs + k

Using a regression method, a system with two poles and no 0 can be fitted to this model.

Richard B.H. Ahlfeld Master of Science Thesis 2-2 The Dynamic Thrust Measurement Problem 13

2-2-2 Building a Distortionless Measurement System

The perfect thrust measurement system would be a device that returned an exact replica of the thrust force produced by a thruster without time delay, noise or modulation. However, this is practically impossible to accomplish. First of all, there is an unavoidable time delay td between the action of the thruster and the reaction of the thrust stand structure. Furthermore, the measurand of the thrust stand system is not the thrust force per se, but an electrical signal. Because the electrical signal has a different scaling than the thrust force, the ideal thrust measurement system could at best be a system h(t) with a different scaling but constant gain h and only a short known time delay td:

Fthrust (t) h (t − td) = y (t) , with h (t) = h h = scalefactor (2-4)

When building a thrust stand, the designer should try to conform as closely as practically possible to the ideal requirements described in Equation (2-4). However, even systems with nearly ideal specifications are hard to construct. The reason why a measurement system as described in Equation (2-4) is virtually impossible lies in the mechanical structure of a thrust stand. Its mechanical components require the system h(t) to be frequency dependent. In addition, stochastic processes in the force transducer and electronics overlay the measurement signal y(t). Hence, realistically, the thrust stand dynamics can be only described with a relation Fthrust (ω) H (ω) = Y (ω) + ∆. (2-5) where ∆ is a vector containing the measurement errors. Such a system can be achieved by Laplace transforming the time dependent measurement signals. The procedure will be explained in detail in Section 2-3-1. Systems with a similar behaviour to the ideal system described by Equation (2-4) can be achieved, if the lowest natural frequency of the thrust stand is about five times higher than the ‘highest appreciable amplitude Fourier frequency component of the input thrust’ [4]. As a consequence, the design of a PMF measurement thrust stand strongly depends on the firing frequency of the thruster.

Building a Distortionless Systems for PMF Measurements

Most displacement-type thrust stands in the literature are not suitable for PMF frequencies higher than 50Hz [16]. To avoid resonance effects in dynamic thrust measurements, the natural frequency of the thrust stand should be about five times higher than the PMF frequency of the thruster [16]. Since PMF measurements reach frequencies up to 50Hz, a PMF thrust stand should have no natural frequency below 250Hz. While it is generally difficult to build a thrust stand with a higher natural frequency than 200Hz, it is virtually impossible to build a displacement-type thrust stand with such a high first natural frequency [16]. Buchholz [31] describes a time-resolved thrust measurement system using a strain-gage-based force transducer, which had a resonant frequency of 62Hz. Haag [32] built two-torsional thrust stands for pulsed plasma thrusters but as the natural frequencies of both stands were too low, the stands could only register the average level of the PMF thrust. A thrust stand capable of registering time-resolved thrust and with a natural frequency of about 1KHz was built by Cubbin [17]. The stand measured the dynamic response of a

Master of Science Thesis Richard B.H. Ahlfeld 14 Literature Review swinging arm using two-sensor laser interferometers. Most systems developed for PMF thrust measurements were realised using a piezoelectric load cell. Ren [15] designed a piezoelectric thrust stand with a natural frequency of higher than 1000Hz. Xing [16] described the design of a piezoelectric thrust stand with nearly ideal properties. The lowest natural frequency of the thrust stand is 1245Hz and the relation between thrust input and output is almost linear with a linearity error of less than 0.24% and a repeatability error of less than 0.25%. This thrust stand also shows excellent properties regarding the reconstruction of short pulses. For 3ms rising to maximum thrust time, 4ms on time and 10ms off time, the error is less than 5% [16]. Gao [7] specifically investigated the possibilities of piezoelectric thrust stand designs and was able to design a system, where the lowest resonant frequency along the axial direction is larger than 2000 Hz, far exceeding their original design requirement of 1000Hz. Figure 2-7 shows the frequency response of the PMF measurement platform designed by Gao. Piezoelectric sensors are ideal for measuring small, volatile forces, but cannot pick up steady forces. Their quartz crystals only register an electrostatic charge when the force applied to them changes. During a SSF measurement, the measurable charge will eventually leak to 0, no matter how good the electrical insulation is [33]. While displacement-type thrust stands can be used to measure both SSF and PMF thrust, a piezoelectric thrust stand can only be used for the measurement of PMF thrust.3

Figure 2-7: Frequency response of the PMF measurement platform designed by Gao [7].

2-2-3 Experimental Determination of the System Response

In an experimental solution of the dynamic thrust measurement problem, the thrust force is measured using a thrust stand with not ideal properties. The effect of the thrust stand is filtered from the measurement signal. For this purpose, the thrust stand is regarded as a block- box system as shown in Figure 2-8. The input to the system is the rocket engine thrust force and the output is the analogue electric signal produced by the load cell. The electric signal can be converted to a digital signal with an Analogue-Digital Converter. Both the electric and digital signal contain the thrust signal as well as the system response of the thrust stand and measurement errors. Hence, to reconstruct the thrust force either an analogue or a digital filter has to be designed and joined up in circuit. Since the principal purpose of this filter is to compensate the transient response, one can call it a thrust compensation filter. The process

3 More information on the comparison of strain gages and piezoelectric crystal can be found in [34, 35].

Richard B.H. Ahlfeld Master of Science Thesis 2-2 The Dynamic Thrust Measurement Problem 15 of removing the transient response from the measurement signal of liquid rocket engines is sometimes called ‘thrust compensation’ in the literature, see for example [8, 18], and it is also the way it is referred to at Airbus DS.

Figure 2-8: Thrust stand system with electronic noise εy.

To design a digital filter which is able to compensate the dynamic system response in a thrust measurement, a more mathematical definition of the behaviour of the thrust stand is needed. Using system analysis, the thrust stand is regarded as a black box system with unknown input and known output signal. Then, it is established that the thrust stand behaves like a Linear Time-Invariant (LTI) system. A system is classified as linear if its input and output signal are related by a linear mapping. The necessary requirements for a linear mapping are additivity and homogeneity. Both requirements hold if one can show that

ay1 (t) + by2 (t) = h (ax1 (t) + bx2 (t)) . (2-6)

A system is time-invariant if only input and output but not the system change over time. Therefore an input x(t) will result in an output y(t), irrespective of the point in time, that is x(t + δ), results in y(t + δ) [26]:

y (t + δ) = h (x (t + δ)) . (2-7)

Whether a system behaves like a linear system can empirically be established: for example when the amplitude of the input signal is doubled, the amplitude of the output doubles as well. The system is time-invariant if the impulse response is the same irrespective of the time. As the output signal is obtained from the input by convolution, the input signal can be calculated from the output signal by performing the inverse operation of convolution. The process of estimating the input signal from the output signal by correcting the effects of the instrumentation and sensing system is called deconvolution [36].

Master of Science Thesis Richard B.H. Ahlfeld 16 Literature Review

2-3 Digital Deconvolution Filters

For an LTI system the relation between output y (t) and input signal x (t) is defined by convoluting the input signal with the transfer function h (t):

Z +∞ Z +∞ y (t) = h (t − τ) x (τ) dτ = h (t) x (t − τ) dτ. (2-8) −∞ −∞ If, like in case of the thrust measurements, the data are only discretely available, the relation between input and output signal is described by a discrete convolution:

∞ y [n] = X h [n − k] · x [k], (2-9) k=−∞ where n stands for the sample at time T = ndt, x[n] is the input thrust, y[n] is the measure- ment signal, and h [n] is a system model of the thrust stand at time n. The system model h [n] and input thrust x[n] are unknown, while the measurement signal y[n] is known, but spoiled by measurement errors.

2-3-1 Deconvolution

Deconvolution is defined as the process of finding a solution x(t) to the convolution equation

Z +∞ y (t) = H (t) ∗ x (t − τ) dτ, (2-10) −∞ whether in continuous form like in Equation (2-8) or in discrete form as in Equation (2-9)[36]. The convolution equation can mathematically be classified as an inhomogeneous Fredholm integral equation of the first kind. Solving an inhomogeneous Fredholm integral equation of the first kind is not trivial and commonly avoided in Digital (DSP) due to the rather complicated mathematics involved. In addition, it has not yet been shown that purely numerical approaches are more accurate than commonly used filtering approaches [37]. One possible advantage is that recently much progress has been made in the development of parallel algorithms for integral equations, so that a direct numerical method becomes preferable in terms of computation time. A fast and parallelised solver for integral equations with convolution-type Kernel was proposed by Ye and Zhang [38]. Instead of solving Equation 2-10 numerically, the typical approach in DSP is to transform the convolution equation into the using a Laplace transform. The Laplace transform is a mostly bijective integral transform of a function. For a continuous function h(t), it can be defined as Z ∞ L {h (t)} = h (t) e−stdt = H(s), (2-11) 0 where t is the continuous time variable and the function space of h(t) is called the time domain; s is the complex parameter s = σ + iω and the function space of H(s) is called the frequency domain. For the , s is evaluated at the imaginary argument s = iω. The Fourier transform can be applied to determine the frequency spectrum of a dynamical system.

Richard B.H. Ahlfeld Master of Science Thesis 2-3 Digital Deconvolution Filters 17

The z-transform is the discrete equivalent of the Laplace transform. For a discrete function h[n] it can be defined as ∞ Z{h} = X h [n] z−n = H(z), (2-12) n=−∞ where the square brackets indicate the discreteness of the variable n [39]. Using the property of the Laplace and z-transform that, in the time domain, convolution becomes multiplication in the frequency domain, instead of solving

Z t y (t) = h (t − τ) x (τ) dτ (2-13) 0 for x(t), one can Laplace transform Equation (2-13) and obtain

Y (s) = H (s) · X (s) , (2-14)

so that X(s) can be obtained by a division in the Laplace domain:

Y (s) X (s) = , (2-15) H (s) if Y (s) and H(s) are fully and accurately known. Unfortunately, for thrust measurements, Y (s) is affected by measurement noise and H(s) is unknown and can only be determined using the measurement signal.

2-3-2 Ill-Posedness of the Deconvolution Problem

To demonstrate the effect of errors on the solution of the deconvolution problem, let Ym(z) 4 and Hm(z) denote the measurement signal and the identified transfer function, respectively. As the signals are discrete, the z-transform is used. Using the flawed signals, the estimate Xm(z) of the thrust input is determined:

Ym (z) Xm (z) = (2-16) Hm (z) Since the true signal is hidden underneath the coat of errors, the measured signal is be split into a correct and an error part:

Y (z) = Y (z) + Y (z) m ε , (2-17) Hm (z) = H (z) + Hε (z) where H (z) and Y (z) are accurate and Hε (z) and Yε (z) contain the errors.

The accurate input X(z) can be calculated once the errors are known by rearranging Equation (2-17) as Y (z) − Y (z) X (z) = m ε . (2-18) Hm (z) − Hε (z)

4Note that while h[n] is a discrete function its z-transform H(z) is continuous.

Master of Science Thesis Richard B.H. Ahlfeld 18 Literature Review

In regions where Hm is as small as the errors contained in the signal, the denominator is close to 0 and the input becomes very large. A small change in the data can trigger a large change in the results. This is the textbook definition of an ill-conditioned or ill-posed prob- lem. ill-conditioned or ill-posed problems can be stabilized by using regularization methods [36]. The ill-posedness is also the reason why purely mathematical approaches are difficult. Nevertheless, Maleknejad [40], for instance, overcomes the ill-posedness of the deconvolution problem by using wavelets and the collocation method to solve the Fredholm integral equation and even obtains accurate error bounds for the solution. In practical situations, the bandwidth of the measured signal is always finite and has regions in which H(z) is fairly small. Practical deconvolution is thus inherently unstable [41]. Even if the errors are small enough to avoid the solution blowing up, the reconstructed signal is likely to contain unrealistically high frequency oscillations. For this reason, every deconvolution has to be combined with a suitable low-pass filter. When adding the low-pass filter it has to be decided which range of the signal is relevant and which merely amplifies noise. It is important to realise at this point that deconvolution is an estimation problem, and not a problem to which an exact solution exists. This means that it is not possible to perform deconvolution without subjective judgement. The filter designer has to decide, whether the found estimate is acceptable.

Summed up, a digital deconvolution filter hc corrects the output signal of a sensor for dynamic effects by employing deconvolution. The input signal x can be estimated by convoluting the _  _ _ filter h with the output signal y: x [n] = hc ∗ y [n] where y [n] is the sensor output signal at _ time instant nTs after an A/D conversion with error  [n] = y [n]−y [nTs] where n ∈ N specifies the sample and Ts = 1/fs denotes the used sampling rate [26]. Practical deconvolution is inherently unstable so that the compensator has to be complemented with a low-pass filter.

Figure 2-9: Every deconvolution filter is a combination of compensation filter and low-pass filter.

2-3-3 Thrust Compensation Filters

The documentation of digital filters specifically designed for the purpose of thrust compen- sation available in freely-available publications is rather limited, because research in this particular direction is mostly done by governmental research institutions or companies pro- tecting their intellectual property. The easiest approach to find a thrust compensation filter is to assume that the errors are small compared to the thrust force. In case ε  FT , also Yε ≈ 0 and Hε ≈ 0 so that the measurement signal and the transfer function, which is identified from it, can be assumed to be fairly consistent with their unknown correct values:

hm [n] ≈ h [n] ym [n] ≈ y [n] . (2-19)

Richard B.H. Ahlfeld Master of Science Thesis 2-3 Digital Deconvolution Filters 19

In this case, an acceptable estimation of the solution is provided by:

Y (z) X (z) ≈ m . (2-20) Hm (z)

If this is not the case, a stable filter imitating the behaviour of the inverse transfer function H−1 as closely as possible has to be found. The common procedure is to try to find an inverse compensation filter HC (z), such that the product of filter and compensation filter becomes one:

H (z) HC (z) = 1. (2-21)

A design according to Equation (2-21) is only feasible, if there is no time delay between input and output signal. If there is a delay n, then a compensation filter satisfying

−n H (z) HC (z) = z (2-22) has to be found. If the requirements to treat the thrust stand as a system of order 2 (described in Section 2-2-1) apply, a compensation filter HC (z) based on the ideal transfer function of order 2 can be designed:

C   H (z) = = C z2 + 2ζ ω z + ω2 , (2-23) C H (z) 0 0 0 where C is a constant. The resulting filter is unstable, if its zeros lie outside the unit circle. Due to the ill-posedness of the problem, the filter is likely to amplify high frequency noise. One should therefore try to choose a denominator polynomial that creates a system with a high natural frequency. Placed in the denominator it will then have the reverse effect of attenuating high frequencies.

Deadbeat Compensator Developed by Chen

The approach of Equation (2-23) is called the ‘construction of an ideal transfer function’ by Chen [8]. He criticises this method for its limitation in bandwidth and suggests three differ- ent filters with a broader bandwidth and better noise attenuation instead: the non-deadbeat, deadbeat and two-deadbeat compensator. Chen shows that the accuracy of a thrust compen- sation filter can be influenced by changing the time delay caused by the compensator HC (z). If a filter causes a time delay of one sample they call it a deadbeat compensator, of two samples a two-beat-delay or two-deadbeat and a combination of the two a non-deadbeat digital com- pensator. Comparing deadbeat filters with inverse filters without time delay, Chen [8] shows that by foregoing a small amount of response speed, white noise is better attenuated by the non-deadbeat digital compensator (of which the two-beat-delay and deadbeat compensators are the specific cases) Figure 2-10. So far only the design of filters specifically designed for the purpose of dynamic thrust compensation have been discussed. In the following section, the concept is extended to the general design of digital filters.

Master of Science Thesis Richard B.H. Ahlfeld 20 Literature Review

Figure 2-10: White noise cancellation performance of deadbeat (top) and non-deadbeat (bottom) digital compensator [8].

2-3-4 Low-Pass Filter

The ideal low-pass filter to complement a thrust deconvolution filter should be designed so that none of the appreciable amplitude frequency components of the input thrust are amplitude or phase-distorted [4]. To that end, the passband should be as flat as possible, the transition band should be short to provide a clean cut-off, and the stop band should guarantee no noise amplification, as depicted in Figure 2-11.

Figure 2-11: Ideal frequency response for a thrust compensation low-pass filter according to [4].

The phase response should be linear to prevent phase distortions. If ω¯ is the cut-off fre- quency separating the relevant from the noisy frequency components, the ideal filter can be

Richard B.H. Ahlfeld Master of Science Thesis 2-3 Digital Deconvolution Filters 21 characterised as H (ω) = cons ω ≤ ω¯ low . (2-24) Hlow (ω) = 0 ω > ω¯ The characteristics of the passband, transition and stop band are determined by the type of low-pass filter used. The cut-off frequency has to been chosen dependent on the width of the transition band and frequency spectrum of the thrust signal.

Common Low-Pass Filter Types

A low-pass filter is designed to extract a part of the entire frequency band of a signal and attenuate all other frequencies. As its name suggests, it extracts lower frequencies and at- tenuates higher frequencies. The ideal low-pass filter for thrust compensation should have a frequency response similar to the one characterised in Figure 2-11. The most commonly used low-pass filters in digital signal processing are Elliptic, Chebyshev and Butterworth filters. Their effect on a signal can be visualised by regarding their frequency response. An exemplary frequency response for the Elliptic filter is shown in Figure 2-12. It can be seen that Elliptic filters have ripples in both their stop and pass band. If the number of ripples in the stop band nears 0, the filter becomes a Chebyshev type I filter. If the number of ripples in the pass band nears 0, the filter becomes a Chebyshev type II filter. If the number of ripples in both bands approach 0, the filter becomes a Butterworth filter.

Figure 2-12: Schematic frequency response of an elliptic low-pass filter.

The ideal low-pass filter for thrust compensation can under no circumstances have ripples in the passband, because a flat passband is essential to preserve the correct thrust amplitude. Hence, the Elliptic and Chebyshev type I filter can be ruled out. Only Butterworth and Chebyshev type II filters have a flat passband. Butterworth filters have a slower roll-off than Chebyshev filters, but in the pass band, they have a more response. On the downside, Butterworth filters need a higher order to achieve the same stop band attenuation obtained with a Chebychev filter. Both filters produce overshoot at the signal edges, as can be seen in Figure 2-13, but the overshoot of the Chebyshev type II filter is larger for the same order. A high stop band attenuation and fast roll off are not as important as a maximally flat passband, smaller overshoot and a more linear phase response in the pass band. Thus, of the common low-pass filter types, the Butterworth filter is the most suitable one for thrust compensation. Crosswy suggests an analogue Bessel filter for thrust measurements, because it does not produce overshoot [4]. However, it produces blunter edges and slower rise times. Therefore, Crosswy recommends the use of a Butterworth-Thomson filter to combine the amplitude

Master of Science Thesis Richard B.H. Ahlfeld 22 Literature Review characteristics of the Butterworth filter with the linear phase of the Thomson filter, which has maximally flat time delay, but a poor rise time and amplitude characteristics [42]. However, he has an analogue filter in mind, since the Bessel filter is not intended for digital use. Furthermore, it is very difficult to get access to the paper referred to by Crosswy.

Figure 2-13: Comparison of the amplitude characteristics of Butterworth of order 3, Chebychev and digitalised Bessel filter.

Nevertheless, he mentions another important property the low-pass filter should have for thrust compensation: fast rise and fall times. If the edges of the thrust pulse are to be represented accurately, the filter should not smooth them too much. This is another argument in favour of the Butterworth filter and is demonstrated in Section 3-5-4.

Cut-off Frequency

The low pass filter cut-off frequency should chosen such that most of the signal is kept but still the noise is attenuated. A high cut-off frequency will minimise the error caused by a modulation of the relevant frequencies, but increases the error caused by noise amplification. A low cut-off frequency reduces the signal noise but distorts the signal and increases the estimation error. This trade-off is mostly done by a trial-and-error method in engineering approaches. There have been attempts to find automatic methods, but they are not wholly reliable and limited in their applicability to different cases. One approach is suggested by Eichstädt [26]. They suggest the formulation of an optimisation problem by minimising the

Richard B.H. Ahlfeld Master of Science Thesis 2-4IIR Deconvolution Filters 23 root-mean-squared (RMS) error r[n] to determine the optimal cut-off frequency:

v u K u 1 X r [n] = t (ˆx [n] − x [n])2 for k = 1, .., K, (2-25) K k k=1

where xˆk [n] is 1 of K estimates obtained for the input signal x using different cut-off fre- quencies. This approach can only be used if the true input signal is known. For the dynamic thrust measurement problem, the input signal is unknown, so that the approach can only be applied on test cases with known solution.

2-4 Infinite Impulse Response (IIR) Deconvolution Filters

Airbus DS only uses IIR filters. Therefore, the focus of this thesis is also on IIR filters. An IIR filter is essentially a rational polynomial model which is applied to correct a signal. The determination of the polynomial coefficients for a system like the thrust stand from its input and output signal is referred to as system identification. It can be done with an automated iterative procedure if an appropriate model structure (like Autoregressive (AR), Moving Average (MA) or ARMA defined in Section 2-4-2) and the polynomial order of the model are specified. The usual procedure to find a suitable model for a problem is to fit many different models to the data. The standard method to find an optimal model for a LTI system is linear least squares regression and is explained in Section 2-4-3. To determine the best model a goodness of fit statistic like Normalised Root Mean Square (NRMS), which is defined in Section 2-4-5, can be used. Once the system has successfully been identified, the model can be used to predict, analyse or filter the behaviour of the system.

2-4-1 Finite Impulse Response (FIR) and IIR Filters

Analogue and digital filters are classified according to how long they respond to a unit impulse: finite or infinite. For digital filters, this classification is only theoretical, because infinite responses also become finite when they are truncated by the digital floating point arithmetic. Digital FIR and IIR Filters are better distinguished by how they compute an output. FIR filters express each output sample as a weighted sum of the last N input samples. IIR filters express each output sample as a linear combination of the previous N input and M output samples, meaning that they use feedback. Any LTI system can be approximated arbitrarily well with a FIR filter when an adequate time delay is introduced [43] and any FIR filter can be approximated by a stable IIR filter [44].

Master of Science Thesis Richard B.H. Ahlfeld 24 Literature Review

Figure 2-14: Illustration of the working principle of FIR and IIR filters. IIR Filters take feedback into account and can therefore be unstable.

IIR filters are the digital equivalent of analogue filters and can be analysed using traditional filter design techniques. When an analogue filter is to be replaced with a digital filter, an IIR filter can be designed based on the previous analogue filter design. The usage of a feedback loop allows IIR filters to solve a problem with a significantly lower order than a FIR filter would require. For IIR filters, the use of higher orders implies the possibility of instability and arithmetic overflow. Arithmetic overflow can be avoided if the order 10 is not exceeded [37]. Instability can also occur for lower orders. The phase of IIR filters is a nonlinear function of frequency and can cause distortions. FIR filters do not employ feedback, so they are naturally stable. If their coefficients are chosen symmetrically, they possess a linear phase which means that signals of all frequencies equally delayed by them and the resulting signal is not distorted. Their main drawback is that they require considerably higher orders and longer processing time than IIR Filters for the same performance. IIR filters are harder to design than FIR filters. Table 2-1 shows that the pros and cons of FIR and IIR filters are rather well balanced. It mostly depends on the application, which filter is preferable.

FIR Filters IIR Filters + unconditionally stable analogue equivalents linear phase response more efficient – no analogue equivalents possibly unstable less efficient nonlinear phase response

Table 2-1: Comparison of the key properties of FIR and IIR Filters.

2-4-2 Autoregressive-Moving-Average Models

ARMA models combine a MA model with anAR model. They are called autoregressive, because a regression is performed on the time series itself (auto). An ARMA model is appro- priate when a system is a function of a series of random shocks, described by theMA part, as well as its own behaviour, described byAR part [45].

Richard B.H. Ahlfeld Master of Science Thesis 2-4IIR Deconvolution Filters 25

Conventionally, ARMA models are applied to model the physical persistence of a random time series, where the random process is more dominant than the physical. When an ARMA model is used to model a thrust stand, the physical process is more dominant. The transient response is modelled by theAR part and measurement errors by theMA part. Essentially, an ARMA model is based on the same equations as anIIR filter. The close connection between ARMA models and IIR transfer function, can be demonstrated by considering a z-transformed transfer function H (z) of an IIR filter:

Na −d P −j   z ajz −d −1 −Na Y (z) j=0 z a0 + a1z + ... + aNa z H (z) = = = , (2-26) X (z) Nb 1 + b z−1 + ... + b z−Nb P −i 1 Nb biz i=0 where z−d includes the possibility of a time delay. Rearranging Equation (2-26) to include the input and output signal, gives:

Nb Na X −i −d X −j Y (z) biz = X (z) z ajz . (2-27) i=0 j=0

Taking the inverse z-transform of Equation (2-27) results in the discrete finite difference equation used for describing ARMA processes:

N N Xb Xa biy (k − i) = ajx (k − d − j), (2-28) i=1 j=0 | {z } | {z } AR MA where the left-hand side stands for theAR, the right-hand side for theMA part and d represents the delay between input and output signal. Taking the term for i = 0 out of the left sum, results in the difference equation (2-29). This illustrates that in discrete form, the current output value of y(k) depends on the n past values of the output y(k − i) and m + 1 values of the input x(k − d − j):

N N Xb Xa y (k) = − biy (k − i) + ajx (k − d − j). (2-29) i=0 j=0

The information contained in a discrete rational transfer function can be described by a difference equation and an ARMA model, just like the information contained in a continuous transfer function can be described by a differential equation, as shown in Section 2-2-1.

2-4-3 Discrete-Time Linear Least Squares System Identification for IIR Filters

The time domain identification approach described in this section is one of the most elemen- tary approaches to start an IIR filter design. The coefficients, obtained with this approach, can be used directly for the design of a stable IIR filter or as basis for the design of an FIR filter. In the following, it is assumed that a time delay between input and output signal has already been eliminated by an appropriate shift of input signal. A method to design an IIR

Master of Science Thesis Richard B.H. Ahlfeld 26 Literature Review

filter, which can automatically determine the existing time delay can be found in Vuerinckx [46]. Applying a linear least squares regression to anIIR transfer function means that the coefficients of a rational polynomial, relating input to output signal, are determined in such a way that the error between model and measurement is minimised. The coefficients of an IIR transfer function H(z) can be described by the discrete finite difference equation

N N Xb Xa y (k) = − biy (k − i) + aju (k − d − j), (2-30) i=0 j=0

where k = 1, ..., K and K is the number of samples, n and m are the orders of the denominator and enumerator polynomials, respectively. To find the closed form solution to the linear least squares problem in the time domain, a system of equations is set up. For this purpose, Equation (2-30) is at first considered only for sample k. The input values uk and output values yk are summarised in one vector xk:

T x (k − 1) = [y (k − 1) y (k − 2) y (k − Na) u (k − 1) u (k − 2) ... u (k − Nb)] (2-31)

and their corresponding coefficients are summarised in a vector θ

T θ = [−a0 − a1 ... − aNa b0 b1 ... bNb ] . (2-32)

Regarding the problem for k = 1, ..., K where K is the total number of samples considered, Equation (2-30) can be reformulated in matrix form:      a1 (k)         .  y (1) y (0) ··· y (1 − Na) u (0) ··· u (1 − N )  .  b    y (2)   y (1) ··· y (2 − Na) u (1) ··· u (2 − N )   a (k)     b   Na   .  =  .    .  .   .   b1 (k)        u (k − Nb)  .  y (k) y (k − 1) y (k − Na) u (k − 1)  .  | {z } | {z }   Yk XT  bNb (k)  k   | {z } ˆ θk (2-33) Summarising all vectors xk for k = 1, ..., K in the matrix Xk, Equation (2-33) can be abridged to T ˆ Yk = Xk θk. (2-34) where the hat indicates that θˆ is an estimate. Equation (2-34) has no unique solution. The number of measurement points K usually exceeds the sum of numerator Nb and denominator order Na, so that Equation (2-34) is an overdetermined system of equations. Hence, the prob- lem must be reformulated as an optimisation problem. For this purpose, the approximation error produced by the overdetermined systems is added to Yk in Equation (2-34): T ˆ Yk + εk = Xk θk. (2-35)

This estimation error can be expressed as

T ˆ εk = Xk θk − Yk. (2-36)

Richard B.H. Ahlfeld Master of Science Thesis 2-4IIR Deconvolution Filters 27

Because there is no unique solution to Equation (2-33), the problem is transformed into a minimisation problem by taking the square of the errors:

k 2 T X h T ˆ i εk εk = yi − Xi−1θk . (2-37) l=i

Since this is a quadratic equation in θˆ, the error function is convex and its minimum can be found where the derivative is 0: ∂εT ε k k = 0. (2-38) ˆ ∂θk The first derivative of Equation (2-37) is

T ˆ − 2XkYk + 2Xk Xkθk = 0 (2-39) and the second derivative is ∂2εT ε k k = 2XT X > 0. (2-40) ˆ2 k k ∂θk That the second derivative is larger than 0 means that there is a unique minimum of the error squares function at −1 ˆ  T  T θk = Xk Xk Xk Yk. (2-41)

If Xk is a square invertible matrix, the pseudo-inverse equals the inverse, so that an estimate for the coefficients can be found with

ˆ T θk = Xk Yk. (2-42)

In order for the closed form solution of Equation (2-41) to exist, all input and output values Yk and Xk should be known. The optimal solution to the minimisation problem in Equation (2-41) or Equation (2-42) is not necessarily the best solution to the problem at hand. The system may not be perfectly linear. In this case, a nonlinear least squares approach has to be used instead. In addition, the measurement signal is affected by noise. The presence of noise is not so problematic if it is zero mean white Gaussian, but non-Gaussian noise will reduce the quality of the obtained estimate. Gaussian white noise can be defined as a sequence of random uncorrelated variables αt with finite variance and zero mean:

E (αt) = µa 2 var (αt) = σa . (2-43) cov (αt, αt+k) = 0 for k 6= 0

Gaussian white noise approximates many real-world situations, like measurement errors, fairly well and generates mathematically tractable models [39].

For the deconvolution problem, the input signal Xk is unknown. This complication can be solved by generating an idealised input, such as an impulse, pulse or trapezium, for the input signal and inserting it as an approximation for Xk in Equation (2-41).

Master of Science Thesis Richard B.H. Ahlfeld 28 Literature Review

2-4-4 Stabilisation of IIR Filters

Unlike FIR filters,IIR filters are not inherently stable and their stability has to be ensured [47]. For a stable IIR transfer function, all poles have to be either in the left-half plane of the complex plane if the function is continuous, or within the unit circle if the function is discrete. The stability of an IIR Filter can be ensured using either of the four following methods:

- cancelling unstable poles with zeros [4,8] - reflecting unstable poles into the unit circle see Section 2-4-4 or [46] - asynchronous time reversal filtering, see [48, 49] - decomposition into an all-pass and minimum-phase system, see [46, 47]

In this thesis, the reflection of poles outside the unit circle into the unit circle will be used for stabilisation of IIR filters.

Reflection of Poles Outside the Unit Circle

A discrete digital filter is stable when all poles of its z-domain transfer function lie within the unit circle. The unit circle serves as stability boundary. It is possible to stabilise a discrete transfer function by reflecting the zeros of the denominator polynomial, that is to say, the poles, into the unit circle by inverting their radius [50]:

1 rp exp (±jθp) → exp (±jθp) , (2-44) rp where rp is the radius and θp is the angle of the unstable pole. While this procedure preserves the amplitude, it modifies the phase characteristics of the signal:

1 Astab (ωTs) = A(ω) φstab (ωTs) 6= −φ (ω) , (2-45) where Astab is the amplitude and φstab is the phase of the stabilised transfer function Hstab[z]. If the phase becomes strongly nonlinear, the signal becomes distorted [50]. The nonlinear phase can be corrected either by linearising it [51] or with an all-pass filter Hall(z) of amplitude 1 [52]: Hcomp (z) = Hstab (z) Hall (z) . (2-46)

2-4-5 Approximation Error and Error Statistics

An effective least squares system identification requires the choice of a suitable model order. The frequency response is a useful tool to find the order. If one can restrict the identification frequency region to the bandwidth of the input signal, a lower filter order can be chosen. For thrust stands, it was explained in Section 2-2-1 that a rational polynomial of order 2 provides a good analytical approximation. One can thus safely assume that a IIR filter of order 2 will perform comparatively well. Nevertheless, a higher identification order can still lower the approximation error at the cost of higher computational effort. This works only up to the point where a further increase of the identification order only integrates signal noise

Richard B.H. Ahlfeld Master of Science Thesis 2-4IIR Deconvolution Filters 29 into the model; or, the increase in numerical errors becomes larger than the improvement in estimation. The quality of the least squares fit can be determined either with an error statistic or visually, by looking at the reconstructed input signal. A reliable error statistic is the reprojection error. The measurement signal is re-calculated using the model and the approximation error is determined as difference between model and true value. The reprojec- tion error is especially suitable for a visual comparison of the error. For a one-dimensional thrust signal, the reprojection error can be defined as

Z t εrp = ky − yˆk with yˆ = H (t − τ)x ˆ (τ) dτ, (2-47) 0 where H (t − τ) is a transfer function and xˆ is the deconvolved input thrust. Another way to visually evaluate the performance of a deconvolution filter in the time domain is to apply the filter to a problem with known solution. To create such a synthetic test case, one takes a known input signal, for example a thrust pulse of uniform amplitude, convolutes it with a transfer function resembling the thrust stand dynamics and adds white Gaussian random noise. A visual evaluation in the time domain has the advantage that the designer can see how the filter affects the reconstructed input signal, so that an incorrect time delay, a bias in the thrust amplitude, or an inappropriate cut-off frequency (too much random noise in the end product) can all easily be seen. If a test scenario is used, the NRMS error values provides a good error statistic. The NRMS error is a normalised version of the commonly most used accuracy measure: the Root Mean Square (RMS) error.    kxˆ − xref k  εNRMS = 1 − n  · 100 (2-48)  1 P  xˆ − n xref (i) i=1 where k.k indicates the 2-norm, xˆ is the deconvoluted estimate of the input signal and xref is the prescribed thrust input. For the NRMS statistic, a 100% fit means that the new function fits the original perfectly, 0% means that the new function is not better at approximating the original function than a straight line, and −∞ means a very bad fit. In this thesis, the reprojection error of reconstructed thrust input signals is used for visual comparison and the NRMS error for statistical comparison. An upper bound for the time domain estimation error of a deconvolution filter was reported by Eichstädt [21, 26] and is

1 Z πfs   iωnd/fs iω/fs ¯ |∆ [n]| ≤ e HC e H (iω) − 1 · X (ω) dω, (2-49) 2π −πfs where ∆ [n] is the estimation error at sampling nTs, and X¯ (ω) is an known upper bound for the magnitude spectrum of the input signal. This error bound is especially suitable for deconvolution filters, as it takes the low-pass filter into account: if the low-pass filter has a broad pass-band, the error is primarily influenced by the compensation filter. While Equation (2-49) provides an upper boundary for the compensation error, it does not evaluate to what extent estimation and measurement errors degrade the accuracy of the deconvoluted input signal. This can be done by performing an uncertainty evaluation.

Master of Science Thesis Richard B.H. Ahlfeld 30 Literature Review

2-5 The Kalman Filter

2-5-1 Advantages of the Kalman Filter for the Dynamic Thrust Measurement Problem

It was shown in Section 2-3-1 that the deconvolution problem is ill-posed and that this leads to an amplification of the signal noise. The conventional way to deal with this problem is to design an IIR or FIR filter and to complement it with a low-pass filter to prevent noise amplification, as described in Section 2-4 and 2-3-4. Both filter types are time-consuming to design and require a secure foundation in DSP, such as knowledge of pole-zero plots, frequency response and frequency spectra. IIR filters are especially difficult to design, because they can be unstable and stabilisation is difficult to perform without destroying the phase, see Section 2-4-4. The Kalman Filter is known for its simple design and intuitive algorithm. It does not require stabilisation. It improves the signal-to-noise ratio by taking the statistics of the measurement and process noise into account. It provides the optimal solution for a LTI system if the noise is white Gaussian. Its only disadvantage is that the covariance matrices of the measurement and process noise have to be provided by the operator. Otherwise, it offers an innovative solution to all the problems commonly encountered when designing a filter for dynamic thrust compensation. Thus, the Kalman Filter offers an ideal way to solve the dynamic thrust measurement problem, if it can be adapted to deconvolute the thrust signal from the transient response of the thrust stand.

IIR Filters Kalman Filter + no choice of covariance matrices required optimal for white Gaussian noise improves signal-to-noise ratio stable, even with unstable IIR coefficients simple design simple implementation integrated uncertainty analysis – not optimal requires choice of covariance matrices worsens signal-to-noise ratio unstable complicated design complicated implementation additional uncertainty analysis

Table 2-2: Comparison of the properties of IIR and Kalman Filters.

Richard B.H. Ahlfeld Master of Science Thesis 2-5 The Kalman Filter 31

The Kalman Filter was published by Rudolf E. Kalman as a recursive solution to the discrete time linear estimation problem [53]. Its first major application was in the on-board computer that guided the descent of the Apollo 11 lunar module to the moon. The idea behind the Kalman Filter is that of a two step predictor-corrector method: a state is predicted using a model for the system dynamics based on previous steps only. This estimate for the next step is then corrected, once the measurement outcome is known, by forming a probabilistic weighted average between the measurement outcome and the prediction, as illustrated in Figure 2-15.

Figure 2-15: Illustration of the working principle of the Kalman Filter. The next step of the signal αˆk+1,k+1 is estimated by combining the probability of the prediction of the next step gained by a model αˆk+1,k and the actual measurement yk+1.

The Kalman Filter’s typical role within the realm of dynamic force measurements is that of a noise cancellation filter, and for good reason: if the noise is white Gaussian, as it usually is for measurement signals, the Kalman Filter is optimally suited for the task. Haddab [54], for instance, applies the Kalman Filter to smooth a micro-force measurement signal obtained by a strain gage, before applying a deconvolution filter. In the following, a more unusual use of the Kalman Filter is suggested: a modification to perform the deconvolution itself. A few simple adjustments are sufficient to make the Kalman Filter suitable for this task. Successful attempts to use the Kalman filter for deconvolution were already made in other fields than thrust measurement. Sayman [55] uses a Deconvolution Kalman filter to recover seismic traces, Rotunno [56] for ion quantisation and Rousseaux [57] describes the retrieval of the time-varying active states in a muscle with a Deconvolution Kalman Filter. Bora [9] reports that the signal-to-noise ratio could be improved significantly using a Deconvolution Kalman Filter, although deconvolution filters in general have the tendency to reduce the signal-to-noise ratio. Furthermore, Bora was even able to reconstruct an input signal of complete white Gaussian random noise after a convolution with a fifth order transfer function using a Deconvolution Kalman Filter. Especially this last result makes the Kalman Filter a promising candidate to extract even the sharper edges of short firing pulses overlaid with Gaussian firing noise.

2-5-2 State-Space Representation

The state-space representation of a LTI system is a time-domain approach, in which a differ- ence equation of order N is rewritten as a vector difference equation of order 1. The state variables constitute the smallest possible subset of variables by which the entire system can

Master of Science Thesis Richard B.H. Ahlfeld 32 Literature Review be described. For a system of m inputs, n states and r outputs, the state-space representation can be defined as: α˙ (t) = Aα (t) + Bx (t) , (2-50) y (t) = Cα (t) + Dx (t) where α(t) is the state, x(t) is the input and y(t) the output signal. The matrix A (size n × n) is the system matrix, B (size n × m) is the input matrix, C (size r × n ) is the output matrix and D (size r × m) is the called the feedthrough matrix, because it represents direct connections between input and output signal [58]. The connection between the state-space model and the differential equation can be illustrated using the analytical model of order 2, used to describe the thrust stand In Section 2-2-1, the differential equation (2-3) was transformed into a transfer function: Y (s) 1 H (s) = = ⇔ My¨(t) + Cy˙ (t) + Ky (t) = x (t) . (2-51) X (s) Ms2 + Cs + k To transform the differential equation (2-51) into a state-space representation, the derivatives of y are substituted with components of a vector. In this case, two equations of order 1 replace a differential equation of order 2: α1 (t) = y (t) dy(t) . (2-52) α2 (t) = dt The derivatives of this state vector are dy(t) α˙ 1 (t) = dt C K . (2-53) α˙ 2 (t) = − M y2 (t) − M y1 (t) + x (t) The two equations (2-53) can be written in matrix form as " # " # " # " # α˙ 1 (t) 0 1 α1 (t) 0 = K C + 1 x (t) , (2-54) α˙ 2 (t) − M − M α2 (t) M | {z } | {z } A B which, introducing the matrix A and B can be summarised as α˙ (t) = Aα (t) + Bx (t) . (2-55) The output equation is given by y (t) = α1 (t) , (2-56) which can also be expressed in matrix form as " # h i α (t) y (t) = 1 0 1 + [0] x (t) , (2-57) α2 (t) | {z } |{z} C D which is in short y (t) = Cα (t) + Dx (t) . (2-58) The matrix D represents direct connections between the output and the input feedthrough. Equation (2-55) and (2-58) together represent the commonly used short form of a linear state-space model: α˙ (t) = Aα (t) + Bx (t) . (2-59) y (t) = Cα (t) + Dx (t) The Kalman Filter is a particular algorithm that is used to solve state-space models in the linear case. Occasionally, state-space models are even referred to as Kalman Filter models.

Richard B.H. Ahlfeld Master of Science Thesis 2-5 The Kalman Filter 33

2-5-3 Kalman Filter Algorithm

The Kalman Filter is famous for its straightforwardness. Kalman himself declared in later life that the simplicity and intuitiveness of the final equations (2-91) had surprised him. For the Kalman Filter, a set of simple equations is the result of a series of simplifying assumptions. In the following, the assumptions made during the derivation of the Kalman filter are identified. The general problem addressed by the Kalman Filter is that of estimating the state α of a discrete-time controlled process that can be described by the linear stochastic difference equations (2-60) and (2-61): αk+1 = Aαk + Bxk + wk, (2-60)

yk = Ckαk + vk, (2-61)

where the subscript k denotes the sampling of the values at time tk = k∆t. The matrix A in difference Equation (2-60) relates the state at time step k to the state at step k + 1. Matrix B relates the control input x to the state α and matrix C in Equation (2-61) relates the state α to the measurement signal y. For further reference, Equation (2-60) will be referred to as state equation and Equation (2-61) as measurement equation. Essentially, the state equation (2-60) contains the model which is used to predict the behaviour of the next measurement value. The states and the measurements are corrupted by additive noise: the process noise wk and measurement noise vk, respectively. Both are usually assumed to be mutually uncor- related (E [wkvk] = 0), independent, and white Gaussian, because the Kalman Filter yields optimal results for this case.

For the assumption of white Gaussian noise with zero mean, the probability distribution of the process and measurement noise can be defined as

p (w) ∼ N (0,Q) . (2-62) p (v) ∼ N (0,R)

where QA and R are the covariance matrices of the process and measurement noise, re- spectively. The prediction and update state essentially describe the same value of xk, many authors mark the prediction with a minus superscript to set it apart from the correction. In the following, however, a two index system will be used. The first index indicates the iteration step, while the second designates the availability of measurement data. This index system is more conform with the typical notation for random processes and is more suitable for probabilistic proofs and derivations. In this notation, the predicted (a priori) and the corrected (a posteriori) estimates can be written as:

- αˆk,k−1 denotes the predicted a priori state estimate of step k given measurement data up to yk−1

- αk,k denotes the updated/corrected a posteriori state estimate at step k + 1 given mea- surement yk. Occasionally also αk is written for αˆk,k.

There are many ways to derive the Kalman Filter. The following derivation is based on the idea that the Kalman filter is an efficient recursive weighted least-squares solution to an estimation problem considered from a probabilistic point of view [59]. This way of derivation

Master of Science Thesis Richard B.H. Ahlfeld 34 Literature Review is chosen, because it will be used later on to extract an estimate of the uncertainty attached to the measurement states for thrust measurements by using the Kalman Filter. Kalman himself insisted on regarding the estimation problem probabilistically, because he agreed with Norbert Wiener [60] that the natural setting of the estimation problem belonged to the realm of probability theory and statistics [53]. Any estimation problem starts with defining a model. The estimation aim is to fit a model f(α, θ) (where α are the states and θ the model parameters) as closely as possible to the measurement data y by minimising the error between model and data: ε = y − f (α, θ) . (2-63) To penalise modelling errors, a cost function J = J (ε) is defined, which fulfils the additional requirements J (0) = 0 J (ε2) ≥ J (ε1) ≥ 0 for ε2 ≥ ε1 ≥ 0 (2-64) J (ε) = J (−ε) .

The model coefficients are determined, such that the cost function becomes minimal θˆ = arg min J (x, θ) , (2-65) where θˆ again denotes an estimate for θ.5 For the Kalman Filter, a weighted least squares cost function is defined to equally penalise state and measurement prediction errors [61]. 1 J = (ˆα − αˆ )T P −1 (ˆα − αˆ ) 2 k+1,k+1 k+1,k k+1,k k+1,k+1 k+1,k | {z } penalisestateprediction error

1 T −1 (yk+1 − Ck+1αˆk+1,k+1) Rk+1 (yk+1 − Ck+1αˆk+1,k+1), (2-66) 2 | {z } penalise measurement prediction error where R is the covariance matrix of the measurement errors and P is the state estimation error covariance matrix. The cost function in Equation (2-66) illustrates what is minimised by the Kalman Filter. The next state αˆk+1,k+1 has to be predicted in such a way that the prediction error αˆk+1,k+1 − αˆk+1,k is small with respect to the variance of the state measure- ment errors represented by P . It also has to be chosen such that the measurement error yk+1 − Ck+1αˆk+1,k+1 is minimised with respect to the measurement noise represented by R.

Optimal State Correction

To find a relation for the optimal estimate αˆk+1,k+1 of the next step αk+1, the cost function ∂J is minimised with respect to the next step αk+1 by finding the location where = 0: ∂αˆk+1,k+1

∂J T −1 T −1 = (ˆαk+1,k+1 − αˆk+1,k) Pk+1,k + (yk+1 − Ck+1αˆk+1,k+1) Rk+1Ck+1 = 0. (2-67) ∂αˆk+1,k+1 T −1 Adding and subtracting Ck+1Rk+1Ck+1αˆk+1,k to the right-hand side of Equation (2-67) and rearranging it in terms of αˆk+1,k+1 and αˆk+1,k leads to

 −1 T −1  Pk+1,k + Ck+1Rk+1Ck+1 αˆk+1,k+1 =

5 argmin stands for the argument of the minimum, for which the given function attains its minimum value.

Richard B.H. Ahlfeld Master of Science Thesis 2-5 The Kalman Filter 35

 −1 T −1  T −1 Pk+1,k + Ck+1Rk+1Ck+1 αˆk+1,k + Ck+1Rk+1 [yk+1 − Ck+1αˆk+1,k] . (2-68)

Transposing the equation for αˆk+1,k+1 gives −1 T −1  −1 T −1  αˆk+1,k+1 =α ˆk+1,k + Ck+1Rk+1 [yk+1 − Ck+1αˆk+1,k] Pk+1,k + Ck+1Rk+1Ck+1 . (2-69) −1  −1 T −1  T −1 Below in Equation (2-87) is shown that the terms Pk+1,k + Ck+1Rk+1Ck+1 Ck+1Rk+1 can be summarised into one vector called the Kalman gain K, so that the formula for the state correction is αˆk+1,k+1 =α ˆk+1,k + Kk+1 [yk+1 − Ck+1αˆk+1,k] . (2-70) Equation (2-70) demonstrates the working principle of the Kalman Filter. The next state αˆk+1,k+1 is calculated as a weighted average between the measured and the predicted state.

State Covariance Prediction

The Kalman gain is found by minimising the state error covariance matrix Pk. The use of a quadratic cost function in Equation (2-66) allows to define the expectation of the states as the estimate of the sought quantity [62]. Therefore, the estimates for αk are the expected value of αk: E [αk] =α ˆk. (2-71) The covariance matrix of the state prediction error εˆk+1,k =α ˆk+1,k − αk+1 is called Pk and is defined as h T i h T i E (αk − αˆk)(αk − αˆk) = E εˆkεˆk = Pk. (2-72)

Hence, the probability density function of the states p (ˆαk) is  h T i N (ˆαk,Pk) = N E [αk] ,E (αk − αˆk)(αk − αˆk) . (2-73)

if the current measurement value yk is known. Using Equation (2-60), the next state is predicted as

αˆk+1,k = Aαˆk,k + Bxk (2-74)

without consideration of the process noise. The real measurement value αk+1 is assumed to deviate from the predicted value by a random noise constant wk:

αk+1 = Aαk + Bxk + wk. (2-75) The difference between Equation (2-74) and Equation (2-75) constitutes the state prediction error εˆk+1,k =α ˆk+1,k − αk+1, which has the covariance h T i h T i E εˆk+1,kεˆk+1,k = E (Aεˆk,k + wk)(Aεˆk,k + wk) . (2-76) Multiplying Equation (2-76) out, results in h T i T h T i T h T i T h T i T A E εˆkεˆk A + E wkwk + A E εˆkwk + E wkεˆk A , (2-77) The cross-covariances in Equation (2-77) are 0, because the process noise and the state pre- diction error are uncorrelated. The process and the state prediction variance were defined as h T i h T i E wkwk =Qk and E εˆkεˆk = Pk, respectively. Therefore, the a priori error covariance can be predicted with T Pk+1,k = APkA + Qk. (2-78)

Master of Science Thesis Richard B.H. Ahlfeld 36 Literature Review

State Covariance Correction

The a posteriori state error covariance Pk+1,k+1 is calculated as:

Pk+1,k+1 = cov (αk+1 − αˆk+1,k+1) . (2-79)

If αˆk+1,k+1 is replaced by the formula for the state correction of Equation (2-70):     = cov αk+1 − (ˆαk+1,k + Kk+1 (yk+1 − Ck+1αˆk+1,k)) (2-80)  | {z } αˆk+1,k+1 and yk by the measurement relation in Equation (2-61):         Pk+1,k+1 = cov αk+1 − αˆk+1,k + Kk+1 Ck+1αk+1 + vk+1 −Ck+1αˆk+1,k . (2-81) | {z } yk+1

The measurement error αk − αˆk,k−1 can be extracted as

Pk+1,k+1 = cov ((αk+1 − αˆk+1,k)(I − Kk+1Ck+1) + Kk+1vk+1) (2-82) and the covariance can be applied on the individual parts of the sum:6

T (I − Kk+1Ck+1) cov (αk+1 − αˆk+1,k)(I − Kk+1Ck+1) + Kk+1cov(vk+1)Kk+1 (2-83)

T = (I − Kk+1Ck+1) Pk+1,k (I − Kk+1Ck+1) + Kk+1Rk+1Kk+1 (2-84) Multiplying out and rearranging results in an extended formula for the a posteriori error covariance, gives: Pk+1,k+1 =

T T  T  T Pk+1,k −Kk+1Ck+1Pk+1,k −Pk+1,kCk+1Kk+1 +Kk+1 Ck+1Pk+1,kCk+1 + Rk+1 Kk+1. (2-85) The best estimator is the one minimising this variance.

Kalman Gain

The Kalman gain is determined as the value for Kk resulting in the optimal estimator for Pk. For this purpose, the trace of the matrix in Equation (2-85) is minimised by setting the matrix derivative with respect to Kk to 0:

∂trace (P )   k+1,k+1 = −2P CT + 2K C P CT + R = 0. (2-86) ∂K k+1,k k+1 k+1 k+1 k+1,k k+1 k+1 Rearranging yields the minimum mean square error gain, also called the optimal Kalman gain: −1 T  T  Kk+1 = Pk+1,kCk+1 Ck+1Pk+1,kCk+1 + Rk+1 . (2-87)

6It holds that cov(AX) = Acov (X) A.

Richard B.H. Ahlfeld Master of Science Thesis 2-5 The Kalman Filter 37

When the Kalman gain equals the optimal value, the a posteriori error covariance can be computed in a simplified manner. The formula for the optimal Kalman gain can then be rearranged:  T  T T T Kk+1 Ck+1Pk+1,kCk+1 + Rk+1 Kk+1 = Pk+1,kCk+1Kk+1 (2-88) and inserted into Equation (2-85), so that the last two terms cancel each other out and the a posteriori error covariance can be computed with

Pk+1,k+1 = Pk+1,k − Kk+1Ck+1Pk+1,k. (2-89)

Each measurement has an associated standard deviation σy and each input σx has an associ- ated standard deviation. Their noise covariance matrices can be defined as follows:

    σy1 0 0 σx1 0 0  ..   ..  R =  0 . 0  Q =  0 . 0  (2-90)

0 0 σyn 0 0 σxn

The Kalman Filter algorithm can be summarised with the five equations:

αk+1,k = Aαk,k + Bxk state prediction T Pk+1,k = APk,kA + Qk covariance prediction −1 T  T  Kk+1 = Pk+1,kCk+1 Rk + Ck+1Pk+1,kCk+1 Kalman gain (2-91) Pk+1,k+1 = Pk+1,k (I − Kk+1Ck) covariance correction αˆk+1,k+1 =α ˆk+1,k + Kk+1 (yk+1 − Ck · αˆk+1,k) state correction

Measurement State Uncertainty

The derivation of the state covariance prediction and correction performed above have shown h T i that the Kalman Filter predicts and optimally corrects the variance Pk = E εˆkεˆk of the error contained in the state vector α in each iteration. The use of a quadratic cost function in Equation (2-66) allows the definition of the mean of the posterior distribution of the states as the estimate of the sought quantity [62], as in Equation (2-71). This assumption, namely that E [αk] =α ˆk, means that the covariance matrix P summarises the dispersion of the probability distribution around the expected value. In other words, P contains the entire information of the uncertainty associated with the state error. Normally, the calculation of the variance for the estimates of a dynamic measurement evaluation method requires an extensive computational method, like the Monte Carlo method. For the Kalman Filter, such an estimation of the uncertainty can be obtained simply by retrieving the information during each iteration from the measurement state error covariance matrix. This approach will be developed in Chapter 4-4-1 for the Deconvolution Kalman Filter. To the knowledge of the author, this has not been attempted so far. However, to validate the results a Monte Carlo method will be needed.

Master of Science Thesis Richard B.H. Ahlfeld 38 Literature Review

2-5-4 IIR Deconvolution from Noisy Observations Using the Kalman Filter

Bora [9] developed a Deconvolution Kalman Filter for the general scenario of extracting an ARMA process after convolution with an IIR Filter and corruption by white Gaussian noise. The innovation of the method is to combine the Kalman Filter with a low-pass filter in state- space representation to form a single augmented state-space system. The resulting augmented system can perform noise removal and deconvolution simultaneously. The set-up of Bora’s method is depicted in Figure 2-16.

Figure 2-16: Kalman filtering to recover a noise corrupted input signal convoluted with an IIR transfer function developed by Bora [9].

An unknown input signal x(k) is convoluted with an IIR transfer function H(z) and white Gaussian random noise v(k) with probability distribution v ∼ N 0, σ2 is added. The mea- surement signal is theoretically generated with

K y[n] = X h [n − k] · x [k] + σv[n] (2-92) k=1 and the Deconvolution Kalman Filter is applied to find an estimate xˆ of x. The z-transformed IIR transfer function H(z) can be described by

m P −j −1 −m ajz a0 + a1z + ... + amz j=0 H (z) = −1 −n = n (2-93) 1 + b1z + ... + bnz P −i 1 + biz i=0 and is brought into state-space form by inserting the denominator coefficients bi and nu- merator coefficients ai into the matrices AH in Equation (2-94) and BH in Equation (2-95), respectively.

 0 1 ··· 0   . . . .   ......  AH =   (2-94)    0 ··· 0 1  −bN −bN−1 · · · −b1

 0     0  h i BH =  .  CH = aN aN−1 ··· a1 DH = a0 (2-95)  .   .  1

Richard B.H. Ahlfeld Master of Science Thesis 2-5 The Kalman Filter 39

The resulting state-space model is defined as

αk+1 = AH αk + BH xk 0 , (2-96) yk = CH αk + DH xk

0 where yk is the output of the system H(z) without noise and α is the state-space variable. In a similar way, the coefficients of a Butterworth low-pass filter can be expressed in state-space form as β = A β + B w k+1 G k G k , (2-97) xk = CGβk + DGwk where β is the state-space variable for the low-pass filter. Both state-space systems, Equation (2-97) and Equation (2-96), are combined into a single augmented state-space system with matrices A, B and C defined in Equation (2-98) and (2-99):   AH BH 0 0   A =  0 0 CG DG  (2-98) 0 0 AG BG h i h i B = 0 0 0 I C = CH DH 0 0 (2-99) and corresponding state vector ζ

T h T T T T i ζk = αk xk βk wk . (2-100)

A closer look at matrix A reveals that the augmentation of the state-space system with the low-pass filter is not very complicated. Following the way a matrix-vector multiplication is carried out, αk is multiplied with AH , xK with BH , and the noise components of the signal are affected by the low-pass filter matrices only. The Deconvolution Kalman Filter for the augmented state-space system is almost identical to the ordinary Kalman Filter:

ζk+1,k = Aζk,k T T Pk+1,k = APk,kA + BQB −1 T  T  Kk+1 = Pk+1,kC R + CPk+1,kC (2-101) Pk+1,k+1 = Pk+1,k (I − Kk+1C) ζk+1,k+1 = ζk+1,k + Kk+1 (yk+1 − C · ζk+1,k)

Compared to the conventional Kalman Filter code in Equation (2-91), the augmented code shows only a few alterations:

1. In the normal Kalman Filter, the first line also contains the matrix B: αk+1 = Aαk + Bxk. In the augmented system, Bxk is contained in the matrix A, so that the next state can be predicted with ζk+1,k = Aζk,k. T T 2. In Pk+1 = AkPkAk + BQkB , BQkB appears to be different, but for the case that Q is a number, BBT = 1.

The algorithm of the Deconvolution Kalman Filter is not different to the algorithm of the ordinary Kalman Filter. Its working principle can be understood by looking at the algorithm

Master of Science Thesis Richard B.H. Ahlfeld 40 Literature Review in Equation (2-101). Instead of applying an inverse model, the Kalman Filter computes the output value of the model with ζk+1,k = CAζk,k and subtracts the calculated value from the measurement value at step k. Hence, the transient response described by the model is removed from the measurement signal by subtracting it. The Kalman Filter corrects the amplitude of the calculated input by multiplying it with the optimal Kalman gain. As the model is applied without inverting the transfer function, no stabilisation or regularisation is needed. The problem is not ill-posed. The drawback of the Deconvolution Kalman Filter becomes apparent from its way of working. The Kalman gain may be calculated incorrectly, if inappropriate values are chosen for the covariance matrices Q and R. In this case, the Kalman Filter returns a qualitatively correct signal, meaning that the shape of the signal is correct, but the amplitude is wrong. Since the amplitude of the thrust is the value which needs to be found, this kind of error is fatal and has to prevented.

2-5-5 Determination of Q and R

The Kalman Filter provides a simple yet effective method for state estimation by accounting for not modelled dynamics and measurement noise with the use of the system covariance matrices Q and R [19]. These filter tuning parameters have to be supplied by the designer to guarantee a convergence to the correct solution. Shmaliy [10] depicts the dependency of the Kalman Filter’s accuracy on the noise covariance as a parabola, shown in Figure 2-17, to illustrate that the Kalman Filter’s optimality is strictly dependent on the correct choice of Q and R.

Figure 2-17: Performance of the Kalman Filter for different noise covariance matrices [10].

Figure 2-17 shows that the Kalman Filter is only optimal if the noise covariance matrices are prescribed correctly. However, Q and R are still chosen heuristically most of the time in engineering applications [63]. If the Kalman Filter is applied as a low-pass filter the heuristic tuning is based on the effect of the tuning parameters [64]:

- small Q: Dynamics trusted more - small R: Measurements trusted more

Richard B.H. Ahlfeld Master of Science Thesis 2-6 Uncertainty Evaluation for Deconvolution Filters 41

As the Deconvolution Kalman Filter’s main objective is not noise removal, but the removal of a transient system response, the same logic cannot be transferred to the Deconvolution Kalman Filter. To the knowledge of the author, no method exists which describes how to choose the tuning parameters, if the Kalman Filter is used for deconvolution. Various researchers have developed methods to rationalise and automatise the choice of the tuning parameters, see for example [65, 66, 67]. From the available methods only two methods could be identified, which show the potential to be applied to the Deconvolution Kalman Filter. One was developed by Saha [19]. Saha suggest the use of two metrics, which measure the effect of Q and R. The designer can use the two metrics to find suitable choices of Q and R for the deconvolution problem. The other is the Autocovariance Least Squares (ALS) method developed by Rajamani [20]. The method is available in form of an open-source Octave toolbox. The software routines can be adapted to any form of ARMA model. Hence, it should be possible to adapt them to the Deconvolution Kalman Filter.

2-6 Uncertainty Evaluation for Deconvolution Filters

The deconvoluted input signal is of little use unless its accuracy is known. The accuracy is difficult to ascertain, because it is diminished by environmental factors, like ground vibra- tions, and mistakes made by the operator or the measuring equipment. The measured value is merely an indication of the quantity that is really sought: the measurand. In an error analysis, systematic and random errors are quantified to give the best possible estimate of the measurand. In an uncertainty analysis, the best estimate of the measurand is given along with an associated measurement uncertainty and confidence intervals. An uncertainty analy- sis is based on the premise that, because it is impossible to state how well the true value of a measurand is known, it is better to quantify the result of a measurement in terms of probabil- ity. Therefore, all quantities influencing the accuracy of the measurand are mathematically defined as random variables with a probability distribution assigned to them. It is possible that the assigned random variables are correlated and have joint distributions. Measurement errors can often by described well with a normal distribution. If no estimate of a variable is known, but only that the value is to be found within a certain interval, a uniform distribution can be used. Relevant data to define distributions can be found by analysing the measurement data in reference books and manufacturer specifications. Concerning the uncertainty caused by a deconvolution filter, exact formulas to calculate the mean and variance are available for FIR filters, but not for IIR filters [68]. The formulation of closed mathematical expressions for IIR filters generally requires linearisation. For this reason, the uncertainty attached to IIR filters is generally evaluated by performing a Monte Carlo simulation.

2-6-1 Monte Carlo Uncertainty Quantification for Thrust Deconvolution Meth- ods

The term Monte Carlo method is used to encompass stochastic computational methods, which obtain numerical results by repeated random sampling for cases in which deterministic results are difficult to obtain. The random numbers are obtained using random number generators [69]. To apply the Monte Carlo method to the Deconvolution problem, the thrust input X is

Master of Science Thesis Richard B.H. Ahlfeld 42 Literature Review

regarded to be unknown and depending on one or more other quantities, denoted by Yn:

X = f (Y1,Y2, ..., Yn) . (2-102)

As before, the thrust input can be obtained by a convolution of the measurement signal Y with an inverse filter hc, so that the input thrust becomes known up to a constant ∆[n], representing a local bias, introduced by the application of the deconvolution filter:

X [n] = (Y ∗ hc)[n] + ∆ [n] . (2-103)

To characterise the uncertainty, which propagates from the measurement signal through to the model and the deconvoluted thrust input, a probability distribution needs to be assigned to the model coefficients ai and bi and to the error in the measurement signal y. Then, random draws y(r)b(r)a(r) can be made from the distributions and the input signal can be calculated for each draw, transferring the effect of the model and measurement uncertainty to the input thrust: (r) (r) (r) x = y ∗ hc . (2-104) The number of random draws made is referred to as the number of Monte Carlo trials M. The uncertainty attached to each vector of length M, calculated for each sample of the thrust input by the Monte Carlo method, can be interpreted as the uncertainty in the input signal. Hence, for each sample M values have to be saved. This shows that while the procedure of a Monte Carlo simulation is not complicated, the achievable accuracy depends strongly on the computational power and storage capacity. The higher the number of trials M, the more reliable are the estimates as shown in Figure 2-18.

Figure 2-18: Number of Monte Carlo trials needed to obtain two and three digits accuracy for uncertainty evaluations in dynamic measurements [11]. While an accuracy of two digits is still achievable with capacities of desktop computers today, the usage of a computer server system is needed for three digits.

Richard B.H. Ahlfeld Master of Science Thesis 2-6 Uncertainty Evaluation for Deconvolution Filters 43

To achieve an accuracy of three digits, more than M = 106 Monte Carlo trials have to be performed. That this is currently difficult to perform on a conventional desktop PC, as used for this thesis, can be shown by the following example: Eichstädt [21] reported an ‘Out of memory warning’ in Matlab for a signal length of N = 3000 with 106 Monte Carlo trials on a workstation computer with 24 cores, 96GB of RAM running on a 64-bit Linux operating system. Hence, for this thesis, a memory efficient alternative to a direct Monte Carlo method is needed to evaluate the uncertainty of a deconvolution filter: the sequential Monte Carlo method. The signal of N = 3000 and 106 Monte Carlo trials of the example above runs without difficulty on a desktop PC if a sequential Monte Carlo method is applied.

2-6-2 Sequential Monte Carlo Method

The sequential Monte Carlo method differs from the direct Monte Carlo method mainly in the amount of computer memory that it requires. The Monte Carlo simulation is performed sequentially for each measurement point in the signal, column by column in Equation (2-105), instead of traversing and saving the entire measurement signal:

 (1) (1)   x [1] ··· x [K]   (2) (2)   x [1] ··· x [K]  XMC = . . . , (2-105)  . . .     x(M) [1] ··· x(M) [K]  Sequential Monte Carlo −→ where M is the number of Monte Carlo trials and K is the length of the measurement signal. This procedure requires considerably less memory, because only the M Monte Carlo realizations of the Nθ = Na + Nb + 1 filter coefficients have to be stored: X X Xˆ [n] = bjY [n − j] − ajXˆ [n − j], (2-106) | {z } | {z } 2·(Nb+1)·M 2·Na·M in contrast to the direct Monte Carlo method where N filter input values and MK output quantity values have to be stored. The storage requirements for the sequential Monte Carlo method compared with the direct Monte Carlo method can be summarised to:

direct MC (M + 2) K + Nθ , (2-107) sequential MC M (2Nθ + 2) where the most striking difference is the absence of K for the sequential Monte Carlo method [68]. Storing the output quantity values for only a small number of time samples does not impede the results obtainable with the sequential Monte Carlo method, which are identical to those obtained from a direct implementation. Several efficient implementations of the Monte Carlo method to evaluate the measurement uncertainty of deconvolution filters were programmed by Eichstädt [68] and can be downloaded online.7 In order to apply the toolbox, not only the model coefficients of an IIR or FIR filter are needed, but also either a proba- bility distribution connected to them or an uncertainty covariance matrix Uba for the model coefficients bi and ai has to be provided. 7 The software can be downloaded at http://www.ptb.de/cms/en/fachabteilungen/abt8/fb-84/ag-842/ dynamischemessungen-842/download.html.

Master of Science Thesis Richard B.H. Ahlfeld 44 Literature Review

2-6-3 Setting up the Filter Covariance Matrix Uba

The filter covariance matrix Uba for an IIR filter with coefficients bi and ai can be found by using another Monte Carlo simulation. During M Monte Carlo trials, random draws are made from probability distributions assigned to the input and output signal to identify the filter coefficients of the model under the influence of changing noise. For the case of random zero mean Gaussian white noise, the noise distributions in the input and output identification time series are characterised as

 2   2  εin ∼ N 0, σinp εoutp ∼ N 0, σoutp , (2-108) and the input and output identification time series become

Xε = X + εin Yε = Y + εoutp. (2-109)

The model parameters can be identified M times by solving the linear least squares problem:

−1 ˆ  T  T θm,k = Xε,kXε,k Xε,kYε,k for m = 1, ,M. (2-110)

ˆ The set of M randomly flawed filter coefficients θm,k is divided into numerator and denom- inator coefficients, bm,i and am,i respectively. The numerator coefficients am,i are saved to matrix A in Equation (2-111), and the denominator coefficient bm,i are saved to a matrix B in Equation (2-112):

 (1) (1) (1) (1)  a1 a2 ··· aN−1 aN  a   (2) .. (2)   a1 . aN   a   . .  A =  . .  (2-111)    (M−1) . (M−1)   a .. a   1 Na  a(M) a(M) ··· a(M) a(M) 1 2 N−1 Na

  b(1) b(1) ··· b(1) b(1) 1 2 N−1 Nb    (2) .. (2)   b1 . bN   b   . .  B =  . .  , (2-112)    (M−1) . (M−1)   b .. b   1 Nb  b(M) b(M) ··· b(M) b(M) 1 2 N−1 Nb

where A is a M × Na and B is a M × Nb matrix, so that every column corresponds to an observation and every row to a variable. The covariance matrix of the model Uba needed for the toolbox can be found as covariance of the matrix Uba = [A, Bˆ] where the first column of B is left out, because it is constantly 1:

 b(1) ··· b(1)  2 Nb  . . .  Bˆ =  . . .  . (2-113)  . . .  b(M) ··· b(M) 2 Nb

Richard B.H. Ahlfeld Master of Science Thesis 2-7 Conclusion 45

The covariance matrix Uba becomes an Na × Nb matrix and can be calculated with

M 1    T Uba = Cov ([A, B]) = X U − U¯ U − U¯ , (2-114) M − 1 i i i=1 where Ui for i = 1, ..., M represents a column of Uba, and U¯ is the mean of the corresponding 8 column. The best estimate for the filter coefficients ai or bi can be determined by calculating the mean of each column in matrix A or B, respectively:

M 1 P bk = M bi , for k = 1, ..., Nb i=1 M . (2-115) 1 P ak = M ai , for k = 1, ,Na i=1

All the filter approaches described so far have focused on the characterisation of the transient response of the thrust stand and only suppressed measurement errors by using a low-pass filter. However, there are methods, which use the occurrence of random measurement errors to their advantage by incorporating them into the optimisation process. One of them is the Kalman Filter.

2-7 Conclusion

As private companies have ventured into the space sector during the last decade increasing the competition, the development of more cost efficient rocket engines has attracted renewed interest. The fuel efficiency of thrusters can be improved by pulsed firing. Therefore, the measurement methodologies and evaluation strategies for pulsed rocket engines have been revisited. To improve their measurement accuracy, several scientific institutions have designed novel thrust stands based on piezoelectric force sensors for PMF measurements. However, the currently prevalent type of thrust stand is based on load cells containing strain gages. This type is not well suited to pulsed rocket thrust measurements as it produces large oscillations. To avoid costly new designs for the majority of industrial suppliers, a new evaluation method is needed to adapt displacement type thrust stands to the demands of PMF measurements. Many different FIR and IIR filter methods are available and can be designed to fulfil this task. Yet, trimming them to the high precision needed to increase the measurement accuracy in PMF measurements, is a difficult task. Therefore, in this thesis, an amended version of the linear optimal Kalman Filter is proposed as a simple, highly accurate and easy-to-implement solution to the dynamic force measurement problem. The Kalman Filter provides the optimal solution, as long as the noise is white Gaussian (which it usually is for thrust measurements). To apply the Deconvolution Kalman Filter, only an ARMA model describing the transient response of the thrust stand has to be provided. As the Deconvolution Kalman Filter applies the model without inversion, the ill-posedness of the deconvolution problem does not affect it. Thus, it needs no stability analysis, even if an unstable model is used. It requires no other designing choices of the operator than a sensible choice of the noise covariance matrices and the low-pass filter’s cut-off frequency. It conveniently integrates the evaluation of the measurement uncertainty into the deconvolution process, as it estimates states by minimising

8 In Matlab , the integrated cov function can simply be used.

Master of Science Thesis Richard B.H. Ahlfeld 46 Literature Review the error variance. Results obtained by Bora [9] have shown that the Deconvolution Kalman Filter can reconstruct random noise which changes at the frequency of the sampling rate. This suggests that the Deconvolution Kalman Filter can also reconstruct short firing pulses of the length of five to ten samples during a PMF measurement.

2-8 Objectives

Objectives by Airbus

This thesis was carried out for Airbus DS, which is in possession of a range of thrust stands and a huge data base of validated test results to correlate new methods with. For Airbus DS, the primary goal of this thesis was the transfer of their digital thrust compensation method from its SciLab/Java environment within the local Technical Data Management System (TDMS) in Lampoldshausen to a Matlab/C++ environment in the Airbus DS global Measurement Data Base (MDB). During this transfer, the method should be documented carefully. It should be investigated, whether the method could be improved or replaced by an alternative method considering recent advances in dynamic measurement filtering. Any improvement or alternative method should take into account that Airbus DS has a whole range of thrust stands and that the evaluation method should be adaptable to all of them. While suggestions on how to improve the measurement efficiency by changes in hardware were encouraged, the focus of this work should be the documentation and improvement of the software and not the hardware of the thrust stand. It is suggested to proceed as follows: first of all, the characteristics of the Airbus DS rocket engine, thrust stand and measurement equipment should be specified. Then, the methodology used by Airbus DS should be extracted from the Java and SciLab codes used in Lampold- shausen and implemented in Matlab and C++. After that, it could be investigated how the method works and whether it is possible to improve it. Because only an error analysis, but no uncertainty analysis has been performed for the 10N rocket thrust measurements, an uncer- tainty analysis should be performed for the Airbus DS evaluation method. This uncertainty quantification should try to include the most important sources of uncertainty caused by the Airbus DS thrust measurement equipment.

Academic Objectives

Deconvolution methods can only be validated using an analytical model or with synthetic test cases. Analytical models with sufficiently high accuracy to validate deconvolution filters are difficult and time-consuming to develop, as described in Section 2-2-1. Therefore, only the effectiveness of the simplest analytical model, a MSD system should be investigated. Several authors have mentioned that a system of order 2 can approximate the thrust stand dynamics well, but have not discussed the degree to which this proposition is valid. To compare the performance of deconvolution filters, including the Airbus DS thrust mea- surement method, a suitable test scenario has to be developed to generate realistic surrogate thrust measurement signals, for which the thrust input is known.

Richard B.H. Ahlfeld Master of Science Thesis 2-8 Objectives 47

It was shown in this literature study that the Kalman Filter offers an attractive solution to most of the problems encountered when designing a deconvolution filter, if it can be adapted to the purpose of deconvolution. Furthermore, it was found that Bora [9] already devel- oped a Kalman Filter for deconvolution. Therefore, the method developed by Bora should be implemented and adapted to deconvolute the input thrust from dynamic rocket thrust measurements. As the only disadvantage of the Kalman Filter is that the noise covariance matrices Q and R have to be specified, a way has to be found to choose the matrices for PMF thrust measurements. From the methods available in the literature, only the two metrics de- veloped by Saha [19] and the ALS method developed by Rajamani [20] seem to be applicable to the Deconvolution Kalman Filter. Their applicability for deconvolution in dynamic thrust measurements should be tested. In addition, it was observed that the Deconvolution Kalman Filter calculates an estimate of the uncertainty associated to the input thrust during each it- eration. If this uncertainty could be extracted, an evaluation of the measurement uncertainty could be directly incorporated into the deconvolution filter. That the uncertainty estimate contained in this way is realistic could be validated with a sequential Monte Carlo method. Finally, the performance of the Deconvolution Kalman Filter should be compared with the method used by Airbus DS to see whether it improves the measurement accuracy for PMF rocket thrust measurements.

Master of Science Thesis Richard B.H. Ahlfeld 48 Literature Review

Richard B.H. Ahlfeld Master of Science Thesis Chapter 3

Airbus DS Thrust Measurement Equipment and Evaluation Method

This chapter describes the software evaluation, which is used by Airbus DS to analyse thrust measurements performed with their 10N thrusters. To distinguish this method from alterna- tives developed throughout this thesis, it will be referred to as TDMS method, deduced from the Technical Data Management System (TDMS) in Lampoldshausen. First, an overview of all required evaluation steps is given in Section 3-1, illustrating the evolution of data from the test bench to the performance parameters of the rocket engine. The measurement equipment and its characteristics are described in Section 3-2. The thrust compensation algorithm of the TDMS method is explained in detail in Section 3-3. One major aim of this thesis was to implement the TDMS method, which was programmed in SciLab and Java, in Matlab. To perform this task a few alterations were needed. They are described in Section 3-4. Results of the new Matlab edition’s performance are presented in Section 3-4-4. Further possibilities of improving the TDMS method are suggested in Section 3-5. They are implemented in an alternative method referred to as Inverse Transfer Function method. Tests comparing the performance of the two approaches can be found in Chapter5.

3-1 Measurement Evaluation Procedure

The test conditions on ground are different to the operational conditions of the thruster in space. Since an accurate prediction of the engine performance in space is needed, the measurement data obtained on ground needs to be corrected. An overview of these corrections is given in Figure 3-1: before a measurement, the thruster has to be mounted onto the thrust stand, where it is fired continually in Steady-State Firing (SSF) or repeatedly in Pulse Mode Firing (PMF). The created thrust force bends the measurement bridge of the thrust stand like a beam. The deformation is registered by a load cell underneath the stand and transformed into an electric signal by a quarter bridge. The electrical signal is interpreted and digitalised by an Analogue-Digital (A/D) converter and stored on a server. The unaltered measurement signal is referred to as raw thrust.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 50 Airbus DS Thrust Measurement Equipment and Evaluation Method

Figure 3-1: Flowchart illustrating the steps of a thrust measurement evaluation.

Thrust compensation is the first correction taking place, because correct thrust values are needed for all consecutive steps. The term thrust compensation is used as an umbrella term for the removal of the dynamic response of the thrust stand and random measurement errors. While a simple low-pass filter is sufficient to perform this task for steady-state measurements, a more intricate filter design is needed for transient measurements. The main purpose of thrust compensation is to compensate the dynamic response of the thrust stand. However, random errors, caused by ground fluctuations, the electric circuitry and inconsistent com- bustion, complicate this compensation because they interfere with the well-posedness of the deconvolution problem and transform it into an ill-posed problem, as described in Section 2-3-1. Furthermore, deconvolution filters have the unavoidable drawback of strongly ampli- fying high frequency noise. Hence, every deconvolution filter has to be complemented with a low-pass filter. The design of a deconvolution filter with the purpose of removing the thrust stand’s dynamic response from the measurement signal is the main topic of this thesis. The reason for this is that the dynamic response causes by far the largest error for the series of test stands considered here. This is exemplified in Figure 3-2, where the red graph represents the deflection of the Thrust Measurement Bridge (TMB) caused by rocket thrust. The true thrust value lies hidden underneath the oscillations. The green graph indicates the thrust value that one would expect if there were no oscillations. This is called the firing signal. The amplitude of the firing signal is chosen to display the expected thrust amplitude (for example 10N for a Airbus DS Hydrazine thruster). In the following it is chosen as either 1 or 0, equivalent to the thruster being either on or off.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-1 Measurement Evaluation Procedure 51

Figure 3-2: Measurement signal of thruster showing constructive interference. The amplitude of the oscillation doubles from the first to the third firing.

The cause of the large oscillations of the TMB (the red graph in Figure 3-2) is the soft bearing of the 10N thrust stands: it leads to a low damping, a high amplitude and a low first natural frequency. For strain gage type thrust stands, as used by Airbus DS, the first natural frequency is so low that during a PMF test the firing frequency of the thruster can approach to the first natural frequency and cause resonance effects. In Figure 3-2, one can see how the oscillation builds up after each firing of the thruster due the constructive interference. Offset correction refers to correcting the drift in measurement values seen in Figure 3-3. The high temperature of the thruster inevitably heats up the entire thrust stand so that the zero point of the measurement signal increases continuously. The offset can be corrected easily, because it is approximately linear.

Figure 3-3: Offset of zero point during longer SSF measurement

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 52 Airbus DS Thrust Measurement Equipment and Evaluation Method

Vacuum correction is still embedded into the evaluation software, although it is not needed any more. Nowadays all data are obtained under almost vacuum-like conditions in a vacuum chamber. The vacuum correction routine was used to transfer data obtained at sea level conditions - that is, at atmospheric pressure and room temperature - to vacuum conditions. After these corrections, the performance parameters of the rocket engine (such as Isp, Ibit and thrust integral) are calculated.

3-2 Measurement Equipment

3-2-1 Thrust Stand

The thrust that a rocket engine generates is the most fundamental indicator of its perfor- mance. It can be determined by several basic methods, such as force measurement, internal momentum balance and calculations using a nozzle coefficient [70]. Airbus DS mainly uses a force measurement approach. The thrust force is measured using a strain gage thrust stand and a digital correction filter. In this thesis the term thrust stand is used for a test stand specifically designed for the purpose of measuring rocket thrust. Another commonly-used expression is thrust bench. The 3D sketch in Figure 3-4 was designed to depict the most important features of the Airbus DS thrust stand.

Figure 3-4: Left: Thrust stand sketch, side view with load cell and fuel lines, Right: Thrust stand sketch displaying the Thrust Measurement Bridge (TMB).

The thruster (1) is vertically mounted into the arch-shaped part at the front (2) and it is refuelled by the fuel lines (3). The basic construction of the stand can be divided into two main components: a fixating structure (7), which is firmly attached to the ground, and the thrust measurement bridge (TMB) (8). The bridge is connected to the fixating structure by two elements: a soft spring (4) with variable stiffness and a thin steel plate at the end of the bridge (6). The spring is soft for the same reason the plate at the end of the bridge is thin: to ensure that the bending moment caused by the thruster results in a large deflection.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-2 Measurement Equipment 53

The high flexibility is needed to make the TMB more sensitive to small changes in the thrust force, which is required to evaluate SSF tests with an error of less than 5%. On the downside, the soft bearing responds dynamically to rapid changes in the thrust signal similar to a Mass- Spring-Damper (MSD) of order 2 described in Section 2-2-1. The load cell (5) sits below the TMB and records its deflection. The deflection can be mathematically converted into the thrust force, but first the transient response of the TMB has to be removed.

3-2-2 Thrust Force Sensor

The deflection of the TMB is transformed into an interpretable electrical signal by the load cell underneath it. Force transducers are sensors used to convert force into other mea- surable entities. For that purpose many different devices like magnets, pressure probes, lasers, strain gages or piezoelectric crystals can be used. The force exerted on the stand by the thruster is measured using a SM S-Type Load Cell. This is a general purpose beam strain gage cell produced by Interface Inc. Its main characteristics are described in Figure 3-5. Forces can be measured with strain gages as they change their electrical resistance pro- Figure 3-5: Characteristics of SM S-Type portionately to the undergone deformation. This lin- Load Cell [12]. ear relationship is the reason that strain gages are the most commonly used force measurement sensors. A conditioning circuit converts the electrical signal to a change in voltage, which is converted to a binary signal by an A/D converter, so that the signal can be stored and edited by a computer. As not only force but also temperature has an effect on elastic deformation and the thrust chamber can reach temperatures up to 1500◦C, a highly temperature resistant type of load cell is used. The SM S-Type Load Cell has less than 0.0015% temperature effect on output.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 54 Airbus DS Thrust Measurement Equipment and Evaluation Method

Figure 3-6: External influences on the TMB.

3-2-3 Thruster

The Airbus DS 10N Bi-Propellant Thruster is a small rocket engine for attitude, trajectory and orbit control of large satellites and deep space probes. Its history in space goes back more than 40 years with over 3000 units having steered numerous international scientific and commercial spacecraft. The thruster uses the storable propellants Monomethylhydrazine MMH as fuel and pure Di-Nitrogen-Tetroxide N2O4, or Mixed Oxides of Nitrogen (MON-1, MON-3) as oxidizer. Its operating range goes from 6 to 12N at regulated pressure, where the pressure is kept constant by an additional pressurant vessel, or in system blow down mode, where it decreases continually. Two important characteristics of the thruster performance are Specific Impulse and Impulse Bit. The Specific Impulse (Isp) is a measure of how efficiently a thruster delivers a certain force. The Impulse Bit (Ibit) is used to describe the change in momentum per pulse.

Figure 3-7: Thruster characteristics of the Airbus DS 10N Hydrazine Thruster [13].

For the Airbus DS 10N range, the Isp depends on several parameters but is generally higher for higher thrust values, as seen in the graph on the left in Figure 3-8. If a manoeuvre requires a lower thrust than 10N, the thrust can be throttled in one of the two following ways: either the thruster can be fired continually with lower chamber pressure or it can be fired in pulses at its nominal operation point. As mentioned above, the first mode is called Steady-State Firing (SSF), the latter Pulse Mode Firing (PMF). PMF is an efficient way to reduce the required average thrust level over time. The thruster is fired in pulses long enough to guarantee the highest possible Isp (on times), but with breaks in between (off times) to reduce the average thrust level.

Figure 3-8: Left: Isp for SSF, Right: Isp for PMF[13].

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-2 Measurement Equipment 55

In pulse mode, full thruster efficiency is reached for pulse durations over 500 milliseconds, as can be seen in the graph on the right in Figure 3-8. In general, efficiency is lower for shorter on times, since the share of start-up and turn-off times increasingly approach the total pulse duration. Another important performance indicator is the Ibit repeatability shown in the graph on the left in Figure 3-9. The Ibit shows the change of momentum per pulse. A high Ibit repeatability means that the thruster is capable of delivering pulses with similar momentum when fired in pulses. For ratios with on/off times higher than 1/100, the repeatability of the Ibit of the thruster approaches the nominal operation point of 100mNs. To guarantee efficient and reliable pulse mode operation, Airbus DS tests its thrusters extensively for numerous combinations of different on and off times. An overview of the test range is given in the graph on the right in Figure 3-9. The evaluation software used to quantify the performance of the thruster should be as accurate as possible for the entire range of on and off time tests.

Figure 3-9: Left: Ibit repeatability of the Airbus DS 10N thruster, Right: Range of on and off time tests performed with 10N thrusters [13].

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 56 Airbus DS Thrust Measurement Equipment and Evaluation Method

3-3 The Airbus DS Thrust Compensation Method

The Airbus DS thrust compensation method is a digital IIR deconvolution filter with manually designed low pass filter. The finer details of the methodology depend on the involved SciLab routines and their functionality. The flow chart in Figure 3-10 gives an overview of the algorithms used. All steps displayed in the chart are elaborated in detail in the next sections.

Figure 3-10: The algorithm of the TDMS method.

3-3-1 The Digital Filter and its History

Until 1998 Airbus DS filtered raw thrust data with an analogue band-stop filter. A band-stop filter simply blocks a band of unwanted frequencies as illustrated in Figure 3-11. Although this was effective, it also resulted in phase shifts. In addition, the filtering was performed electronically so that the raw thrust data were lost.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-3 The Airbus DS Thrust Compensation Method 57

Figure 3-11: Band-stop filter.

Due to their higher accuracy and simply because digital filters allow for the possibility of evaluating measurements repeatedly with different methodologies, the analogue filter was replaced with a digital filter in the late 1990s. SSF tests are sampled at a rate of 125Hz. For PMF tests, the sampling rate is 1000Hz. For SSF measurements, the compensation is performed by filtering the signal with a 40Hz low-pass filter. This removes all oscillations except the thrust and its amplitude. In principle, the same method can be applied to PMF tests, depending on the on and off time of the valve. However, the results obtained in this way are not very accurate for shorter on/off times. To remove the entire dynamic response of the thrust stand, the low-pass filter’s cut-off frequency has to be in the region of 30Hz. This removes almost the entire measurement signal and causes a large approximation error. Moreover, short pulses are smoothed out almost entirely by a strong low-pass filter. Hence, a more refined method is needed for dynamic firing. For dynamic measurements, the signal is filtered with a low-pass filter of 500Hz to avoid effects. Afterwards, it is filtered with the compensation filter described later on in this chapter. The following sections are entirely devoted to the evaluation of PMF tests.

3-3-2 Linearity Check

Most of the analysis available for system models is performed for Linear Time-Invariant (LTI) systems. Thus, the assumption that a thrust stand can be described by a LTI system has several advantages: the theory is better developed and easier than for nonlinear systems. Linearity is assumed for the TDMS method. A linearity check is performed before every measurement by attaching a range of different weights to the thrust stand and measuring the force. This is to guarantee that the measured signal is still linearly dependent on the acting force and the load cell is operating flawlessly. Figure 3-12 shows the output of such a calibration run. The maximum discrepancy from a linear relationship is smaller than 0.0005 for any of the measured weights. The static system is almost ideally linear.

Figure 3-12: Check of linearity.

Linearity is more difficult to determine for a dynamic force input. For this case, the intern rule of thumb is that a linear relation between signal and acting force can only be assumed,

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 58 Airbus DS Thrust Measurement Equipment and Evaluation Method if the force does not change faster than a sine wave of less than 20% of the thrust stand’s lowest natural frequency. For the 10N series, this means that if the thruster needs less than 1/80s, or 12.5ms to increase its thrust from 0s to 10N, the relation cannot be linear. The 10N thruster only needs about 2ms. Therefore, the measured signal cannot be considered to behave linearly during the 2ms long start-up and turn-off phase of the thruster.

3-3-3 High-Pass Filter

If excited by the right firing frequency, the tubing system of the fuel lines can cause strong low frequency oscillations as shown in Figure 3-13. To remove these oscillations, the measurement signal is filtered with a Butterworth high-pass filter of of order 6 and a cut-off frequency of 10Hz.

Figure 3-13: Frequency spectrum of PMF test showing low frequency noise.

3-3-4 IIR System Identification

When the first filter was designed it had still been intended to determine the transfer func- tion coefficients by a calibration test. Calibration has to be performed for any thrust stand configuration individually and again after any alteration. The transfer function can be as- sumed to remain unchanged, if all elements remain fixed and neither the spring stiffness nor fuel lines are changed. Calibration means that before any measurement, the stand is excited with a known impulse, which triggers a clean impulse response. The known impulse can be generated by an articulated hit with an impulse hammer, as demonstrated in Figure 3-14. By analysing the decaying vibrations immediately after the hit, the system parameters can be determined. In theory, this is the cleanest way of obtaining the IIR coefficients.

In practice, the hit with the hammer results in a different impulse response depending on the point where the hammer hits the stand. An impulse response identical to the one caused by the thruster is difficult to attain. The best approximation of the coefficients can be obtained by using an extract from the actual measurement signal as output for the system identification. The real input signal - the true rocket thrust - is unknown. Thus, an input for the identification is missing and has to be created manually.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-3 The Airbus DS Thrust Compensation Method 59

Figure 3-14: Calibration with impulse hammer.

In the TMDS method, the identification input is chosen as impulse realised as a zero vector with x(1) = 1. For the identification output, a time series, which can be seen as response to this impulse, must be extracted from the measurement signal. Here, 1 second after the last pulse is chosen. The last pulse is chosen to avoid interference of a next pulse. The starting point of the identification time series is chosen as the point in time when the thruster is turned off for the last rime during a test. First, a local maximum is sought within the vicinity of this point. When the maximum has been found, the beginning point of the identification time series is shifted forward in time to the first point after the signal falls below 40 % of the average thrust amplitude. This is done in order to ensure that the gain of the filter is not adversely affected by the height of the thrust amplitude. To make absolutely certain that only the decaying curve goes into the identification series another 10 samples are added to the starting point. How the identification output is chosen is illustrated in Figure 3-15.

Figure 3-15: Time series used for identification. Only the decaying oscillation is used for system identification.

A SciLab routine ‘time_id’ is used to determine a discrete transfer function H[z] with 60 poles and 59 zeros from input and output data employing a linear least squares system identification approach: 59 Y [z] a0 + a1z + ... + a59z H [z] = = 60 . (3-1) X [z] 1 + b1z + ... + b60z

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 60 Airbus DS Thrust Measurement Equipment and Evaluation Method

How the real unknown thrust signal is idealised in order to obtain a model with least squares system identification is depicted in Figure 3-16.

Figure 3-16: Flow chart illustrating the filter design through system identification.

3-3-5 Filter Order

According to the documentation of the method, the identification order is set to 60, because it should not be too small in comparison to the lowest eigenfrequency of the system. While this reasoning could not be confirmed during testing (there was no difference between order 60 and order 10), another reasoning could: more poles result in a better resolution of the frequency spectrum of the thrust stand. From a physical point of view, the thrust stand can be approximated well with a system of order 2 as described in Section 2-2-1. That this is true for the Airbus DS 10N thrust stand is shown by the two frequency spectra in Figure 3-17. It can be seen that the main mode at 150Hz remains the same and only the other frequency components vary from test to test, especially below about 100Hz. The single mode at 150Hz can be described by a physical system of order 2.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-3 The Airbus DS Thrust Compensation Method 61

Figure 3-17: Frequency spectra of two tests.

The cause of the varying components is the complex layout of the thrust stand and a changing excitation through different firing frequencies. If the varying frequencies are integrated into the compensation filter, the results become more inconsistent. Since robustness is the main design criterion for the TDMS method, the varying effect of the additional frequencies is removed from the compensation filter. To that end, the transfer function is first identified with a high order, usually 60. The high order guarantees that there are many poles available to separate all occurring frequencies. To find the main mode, the high order system is split into sub-systems of order 2. From these sub-systems the system causing the highest amplitude is extracted. Only the system causing the highest amplitude is used for the compensation filter. The extraction is mathematically accomplished with a partial fraction decomposition:

Let m be the multiplicity of a pole, then the transfer function can be expressed as

r1 rk H (z) = m + ... + m , (3-2) (z − p1) (z − pk)

where pi for i = 1, .., k are the poles and rj for j = 1, ..., k the residues of the partial fractions. Numerically, partial fraction decomposition of a ratio of polynomials represents an ill-posed problem.

From a control-theoretical point of view, partial fraction decomposition is equivalent to paral- lelising the transfer function of order 60 into a series of systems of order 1 and 2. The SciLab function computing the partial fraction decomposition does this automatically and returns all systems of order 1 and 2. For the obtained systems, the frequency, damping, amplitude and phase are calculated using equations (3-5) to (3-9). The results are plotted as shown in Figure 3-18.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 62 Airbus DS Thrust Measurement Equipment and Evaluation Method

Figure 3-18: Example for frequency, damping, amplitude and phase of a transfer function of order 60 computed with a partial fraction decomposition for all residues.

Since the physical solution for a mode is a pair of conjugate complex poles, all systems of order 60 can be neglected. Only the amplitudes belonging to the systems of order 2 have to be computed and sorted in decreasing order. Let the system of order 2 responsible for the strongest mode be denoted by HR and defined by 2 NR (z) a1 + a2z + a3z HR (z) = = 2 . (3-3) DR (z) 1 + b1z + b2z The poles of this transfer function are computed by solving

2 1 + b1z + b2z = 0. (3-4) The solution of Equation (3-4) ought to be a conjugate complex pair of poles. Their real parts have the same value, and their imaginary parts have the same absolute value but different signs. Hence, it is sufficient to continue with one pole, say p1. In the Airbus DS method, this pole is first divided by the sampling rate and its logarithm is taken: log (z ) p = 1 . (3-5) 1 dt

The frequency f1 is computed with imag (p ) f = 1 . (3-6) 1 2π The damping d by real (p ) d = 1 . (3-7) imag (p1) The amplitude A is with   2iπdtf1 A = HR e (3-8) and the phase p by    2iπdtf   HR e 1 p = imag log  2iπdtf  . (3-9) |HR (e 1 )| The mode at 117Hz in Figure 3-18 is more than 50 times stronger than all the others. This mode is chosen for the compensation filter and all the others are disregarded.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-3 The Airbus DS Thrust Compensation Method 63

3-3-6 Gain Change Caused by Order Reduction

Reducing the order of the transfer function inevitably changes the gain, which in turn alters the amplitude of the thrust. Hence, the reduced-order transfer function cannot recover the correct thrust amplitude, unless the gain is corrected. This can be done by making sure that at least for t = 0, the gain of both functions is identical:

 iωt  iωt H e = HR e . (3-10)

This means practically H (1) = HR (1) for t = 0. The gain can be corrected with

HR HR = H (1) . (3-11) HR (1) That this way of correction is very efficient can be seen in Figure 3-19. The graph on the left shows the frequency response and thrust signal without gain correction. The graph on the right was corrected using Equation (3-11).

Figure 3-19: Top Left: Frequency response of inverted transfer function, Top Right: Frequency response of inverted transfer function without gain correction, Bottom Left: Thrust input re- constructed with inverted transfer function, Bottom Right: Thrust input reconstructed with gain corrected inverted transfer function.

3-3-7 Second Order System Low-Pass Filter

−1 Figure 3-20 shows the frequency response of the inverted transfer function HR of the main mode and the frequency spectrum of a representative measurement signal. The spectrum shows that from 0.4fNyquist upwards the signal consists mainly of noise. Hence the signal amplification visible in the frequency response affects only noise from 250Hz upwards.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 64 Airbus DS Thrust Measurement Equipment and Evaluation Method

Figure 3-20: Top: Frequency response of inverted, reduced order transfer function, Bottom: Frequency spectrum of a typical thrust measurement.

In the TDMS method such amplification is avoided by constructing an artificial pole at 400Hz. This pole pushes the right part of the frequency response in the top graph in Figure 3-20 down to the frequency response seen in Figure 3-22. The value is chosen manually as 400Hz to keep the noise attenuating properties of the pole away from the important frequency range at around 150Hz. It is designed with a Second Order System (SOS). The SOS is created as continuous system by inserting the circular frequency

2  dt ω = tan 2πf · (3-12) dt SOS 2

into

ω2 H = . (3-13) sos (s − ω)(α − i) · (s − ω)(α + i)

Equation (3-13) is discretised using a and frequency warping is counteracted by inserting Tustin’s formula

2 z − 1 s = . (3-14) dt z + 1

The denominator of Equation (3-13) is called DSOS and is used as low-pass filter component for the compensator.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-3 The Airbus DS Thrust Compensation Method 65

Figure 3-21: Frequency response of low-pass filter SOS.

3-3-8 Design of the Compensation Filter

The numerator of the compensator is constructed by convolution of the polynomials DR (z) from Equation (3-3) and DSOS from Equation (3-13):

DR (z) ∗ Dsos (z) Hinv = . (3-15) (z − 0.1)2

For the compensator denominator a double pole at 0.1 is chosen. The value is set to 0.1, because for this value the arch between the two poles reaches exactly up to 0. Inserting a different value will move the arch either up or down. In this way, most of the signal can be kept without amplifying the noise. For 10N thrusters the default value is 0.1. For other thrusters the low-pass filter’s noise attenuating characteristics can be tuned by inserting a different value.

Figure 3-22: Frequency response of the Airbus DS thrust compensation filter.

3-3-9 Error Analysis for PMF Measurements

The error analysis performed in this section follows the error analysis performed by Dr. Garus in Lampoldshausen for 10N thrusters, as documented in the intern technical report ‘IP43- TN-02-015’. It assumes that the reconstructed input thrust FT (i) can be regarded as the sum of a physical process Fp plus stochastic random noise FS:

FT (i) = Fp (i) + Fs (i) . (3-16)

The random noise is white Gaussian with an expected value of E [Fs (i)] = 0 and standard deviation σ. An important quantity to characterise the rocket engine in pulse mode is the

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 66 Airbus DS Thrust Measurement Equipment and Evaluation Method thrust integral, because the movement of the spacecraft is determined by the entire thrust delivered and not a temporary fluctuation. In the following, formulas are derived to approx- imate the error of the physical and stochastic thrust integrals in PMF. The integral of the physical part is given by Z t2 Z t2

IFT = Fp (t) dt+ Fs (t) dt. (3-17) t1 t1 2π It is assumed that the thruster is fired periodically, with period T = ω defined as

T = Ton (i + 1) − Ton (i) . (3-18)

where i counts the number of times the thruster is fired. Let F (t) denote the time-resolved thrust. F (t) can be approximated as a periodic function using a Fourier Series Expansion as

a ∞ ∞ F (t) = 0 + X a sin (kωt) + X b cos (kωt) (3-19) 2 k k k=1 k=1

a0 with k ∈ N. The integral of this function over one period is always 2 T , where a0/2 is the amplitude of F (t) in its Fourier spectrum at ω = 0. For a LTI system, the frequency response converges to 1 for ω → 0 and the value of the frequency response at ω = 0 is invariant if only linear operations are performed like convolution. Hence, if only linear transforms are used, the integral of the physical component of the reconstructed thrust can be estimated with

t Z 2 a0 Fp (t) dt ≈ T = FnomT, (3-20) t1 2 where t1 = Ton (i) and t2 = Ton (i + 1) and Fnom is the nominal thrust value.

The integral of the stochastic part of the reconstructed thrust is a stochastic quantity itself. Using the trapezoidal rule of integration, the integral can be defined as

i2 F (i ) − F (i ) I = X F (i) − s 1 s 2 · dt, (3-21) Fs s 2 i1 where dt is the time step. For a sampling rate of 1Khz dt is 0.001. Since E [Fs (i)] = 0, IFs has mean 0: i2 [F (i )] − [F (i )] I = X [F (i)] − E s 1 E s 2 · dt = 0. (3-22) Fs E s 2 i1 The variance can be calculated as1   i2 X Fs (i1) − Fs (i2) 2 2 var (IF ) = var  Fs (i) − dt = (n − 1) σ (dt) , (3-23) s 2 i1 √ if n = i2 − i1 + 1. The standard deviation is σ n − 1dt.

1 2 The result is obtained using the fact that if the normal random variable Fs(i) has variance σ then Fs(i)dt has variance σ2dt2.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-4 The MATLAB Edition of the TDMS Method 67

The entire thrust integral error can be approximated by p √ √ var (IFs ) σ n − 1dt σrel n − 1 εI = R ∼ = , (3-24) Fp Fnommdt m where σ is the standard deviation in relation to the nominal thrust value σ = σ . rel rel Fnom The factor m is introduced as the number of samples during which the thruster is turned on, and n is the entire number of samples used for integration. From Equation (3-24) it can be concluded that the integral thrust error increases if the on time decreases. This is confirmed by the test results in Section 5-1-1.

3-4 The MATLAB Edition of the TDMS Method

SciLab and Matlab share a similar programming syntax. Nonetheless, most of the tools and routines in SciLab have a different functioning than their counterparts in Matlab. Overall, the implementation was performed by finding the counterparts and adapting the programme’s syntax to yield the same results as SciLab. This worked well in general. Only SciLab’s linear least squares identification and partial fraction decomposition had to be adapted to have the exact same functionality available in Matlab. Moreover, the transfer function class was omitted in Matlab and replaced with vectors of polynomial coefficients. This was done because the class of transfer function is different in Matlab , and its freely-available clone Octave, and the method should be executable from both platforms. Otherwise, the methodology could be kept, except for the three points described below.

3-4-1 Lower Identification Order

The high identification order of 60 sometimes causes the order reduction to go wrong. Fig- ure 3-23 and Figure 3-24 show an example of an amplitude spectrum found for a transfer function of order 60 obtained for a step input, which cannot be correct. There are two sim- ilarly strong frequencies in the decomposition in Figure 3-23 marked in green and red. 1 is the correct main amplitude found at 151Hz, the other is found at 96Hz.

Figure 3-23: Frequency, damping, amplitude and phase obtained by applying a partial fraction decomposition to a transfer function of order 60 for test 0M15_010.

The frequency spectrum in Figure 3-24 shows that there is no similarly strong frequency at 96Hz in the measurement signal. Numerical errors have distorted the partial fraction decomposition.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 68 Airbus DS Thrust Measurement Equipment and Evaluation Method

Figure 3-24: Frequency spectrum of the entire measurement signal for test 0M15_010.

To avoid such errors, the identification order was lowered to 10. No drawbacks could be found for this lower order. Up to an order of 10, numerical errors do not become disproportion- ately large. If it is discovered at a later point that the higher order is required for certain cases, a numerically more stable alternative to the partial fraction decomposition should be implemented.

3-4-2 Step-Function as Identification Input

The SciLab method uses an impulse as input for the identification: a zero vector with x(1) = 1 as illustrated in the graph on the left in Figure 3-25. This input cannot be used in Matlab. An input vector consisting almost entirely of zeros means that the right half of the system identification matrix in Equation (2-33) is filled with zeros, so that the matrix has an insuffi- cient rank. SciLab ignores this fact when computing the coefficients, but the insufficient rank results in extremely small numerator coefficients:

As the numerator coefficients are disregarded (only the denominator coefficients are used for the compensator, see Section 3-3-8), this error is of no importance for the TDMS method. Unlike SciLab, the Matlab equation solver aborts the iteration when the numerator coeffi- cients fall below a certain tolerance level. This results in a bad estimate for the denominator coefficients in Matlab:

The matrix’s insufficient rank cannot be disregarded in Matlab. Either an alternative equa- tion solver or a different input has to be chosen. As a different solver has no effect on the

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-4 The MATLAB Edition of the TDMS Method 69 matrix’s rank, the latter approach is preferable. Instead of an impulse, a step-function input is suggested, as shown in the graph on the right in Figure 3-25. This has the advantage that the matrix is filled with ones instead of zeros, so that the rank becomes sufficient. The decaying signal can be transformed into a step-response with

outpID − outpID (1) outpID = , (3-25) outpID (1) where outpID denotes the extract of the measurement signal used for identification in the time domain.

Figure 3-25: Impulse and step-function input used for system identification. They behave similarly, except that the step response oscillates around 1 and the impulse response around 0.

3-4-3 Zero-Point Correction

The comparison of results obtained by the Matlab edition of the TDMS method with TDMS data base values revealed a small bias correction, shown in Figure 3-26. This bias correction is not corrected in the SciLab code, which is used as foundation of this chapter. It must be corrected in a later post-processing step, which is currently not included in the documentation of the TDMS method.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 70 Airbus DS Thrust Measurement Equipment and Evaluation Method

Figure 3-26: Zero point correction of a small signal bias caused by the deconvolution filter in the TDMS data base and the Matlab edition of the TDMS method. For all tests contained in the TDMS data base, a zero point correction is performed after 4s. In the new Matlab edition, it is performed from the beginning of a measurement.

The blue graph in Figure 3-26 is shifted to 0 after 4s. This correction is performed for all tests found in the TDMS data base, always shortly before the first ignition of the thruster. Hence, this zero point correction was also included into the Matlab edition. In contrast to the SciLab version, however, the signals are shifted to 0 from the beginning, as seen in the red graph. The zero point correction is achieved in Matlab by determining the mean of the noise before the first pulse and shifting the entire measurement signal y by this mean:

y0 = y − µn, (3-26) where y0 is the nulled measurement signal. The mean of the noise is computed in the usual way: 1 N µ = X y (i), (3-27) n N 1 where N is the index of a sample 10ms before the first pulse and y is the entire measurement signal.

3-4-4 Results Obtained by the Matlab Edition

Figure 3-27 compares results computed with the Matlab and SciLab edition of the TDMS method to data saved to the TDMS data base for the same test.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-4 The MATLAB Edition of the TDMS Method 71

Figure 3-27: Thrust signals obtained using Airbus DS’s own SciLab codes (red), the new Mat- lab edition (blue) and the result saved to the TDMS data base (dark green). The red and the blue curve are qualitatively identical apart from a small bias. The green curve extracted from the data base in Lampoldshausen has a different thrust amplitude.

The Matlab and SciLab codes yield the same result, apart from a small bias of about 0.01. The bias is constant for all tests, so it can be corrected. However, neither of the methods confirms the graph saved to the TDMS data base. The deviation of both methods suggests that something else, not contained in the SciLab codes used as foundation for this chapter, is done to the signals either before or after the SciLab codes are applied. One possibility is that the SciLab and Matlab version used here determine the transfer function coefficients for each test individually, while the TDMS method might use one test to determine the coefficients for an entire test series. The two graphs in Figure 3-28 confirm this. In both, the dynamic response is not entirely removed from the thrust pulse. The reason for this could be that coefficients from another test were used, which had a slightly different frequency spectrum. To differentiate between the value saved to the TDMS data base and the one computed with Matlab for the Measurement Data Base MDB in Ottobrunn, the TDMS thrust is denoted by Fcomp TDMS and the Matlab computed thrust by Fcomp MDB.

Figure 3-28: Two tests for which the Matlab method (FcompMDB) yields smoother results than TDMS (FcompTDMS).

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 72 Airbus DS Thrust Measurement Equipment and Evaluation Method

3-5 Improvement Possibilities

This section investigates further possibilities with the potential to improve the TDMS method. The most promising alterations are implemented in a method, which is named Inverse Transfer Function method in Chapter5 to distinguish it from the Matlab edition of the TDMS method. The filter is called Inverse, because it is essentially obtained by inverting the transfer function after reducing the order.

3-5-1 Inverse Transfer Function Method

The methodology of the Inverse Transfer Function method depicted in Figure 3-29 has its origin in the insufficient rank of the matrix in the original SciLab TDMS method. The system identification with an impulse as input signal created a system identification matrix with insufficient rank in the original TDMS method. Due to the insufficient rank, the numerator coefficients obtained by the order reduction were meaningless. The problem can be solved by replacing the impulse input with a step function input for the system identification. This increases the rank of the matrix so that the correct numerator can be found and the transfer function can be inverted. This was already explained in Section 3-4-2. However, due to the new way of identification, the reduced order transfer function can be inverted instead of choosing the compensator poles manually, as in Section 3-3-8. This is the basic idea behind the Inverse Transfer Function method discussed in the following sections.

Figure 3-29: Algorithm of the Inverse Transfer Function method.

The Inverse Transfer Function method was developed during the process of validating the single design parts of the TDMS method. It was investigated why certain parts of the TDMS

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-5 Improvement Possibilities 73 method were chosen in the way they are and what effect a change in the methodology has. The changes mostly concern the system identification and the low-pass filter. As can be seen from Figure 3-29, these were also the only parts which were eventually changed in the new method.

3-5-2 System Identification with Firing Signal

Another feature that was added to the codes is a special identification mode for tests with short on times. The option can be enabled in the code by passing the string ‘dynamic’ to the function ‘pulseextraction()’. The idea behind the alternative identification mode is that for short pulses, the decaying measurement signal used for system identification is influenced by the rising and falling flanks of the pulse. The effect of the falling flank on the transient response can be seen clearly in Figure 3-30. Hence, whenever the on time ton of a pulse is not long enough for the dynamic response to subside (which is usually the case for any on time shorter than 300ms), a trapezoidal pulse should be used instead of a step-input function for identification in order to integrate the effect of the rising and the falling flank into the system identification.

Figure 3-30: Left: Firing signal pulse used as input signal for identification with padding, time delay, on time and effect of falling flank labelled, Right: Thrust pulse reconstructed using static and dynamic identification routines.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 74 Airbus DS Thrust Measurement Equipment and Evaluation Method

Figure 3-31: Left: Thrust pulse reconstructed using static and dynamic identification routines, Right: Synthetic thrust pulse reconstructed dynamic identification routines.

According to a warning in Matlab , large changes should not occur too early in the measure- ment signal. To avoid this, the signal should be padded with zeros at the beginning. However, the number of zeros in the beginning can change the outcome of the system identification. The correct padding order also depends on the order of the system. The best results were obtained by a padding with 2n zeros for a transfer function of order n.

The system identification fails completely, if the timing of the pulse used as input signal does not correspond to the timing of the output signal. The firing signal records the theoretic thrust level. It was tried to use the firing signal as input signal for identification. However, there is an unknown time delay between the firing and the measurement signal and it is not constant for different tests. It sometimes varies by ± one sample. The variation is enough to adversely affect the system identification. In an early prototype of the TDMS method, this was addressed by pausing the code while a pop-up window showed the firing and measurement signal for the last pulse. The operator could then read out the time delay by counting the samples between the edges of the firing and measurement signal. While this is reliable, it is very time-consuming. To reduce the effort, a short routine was programmed, which determines the time delay automatically. It computes the difference between two vector elements and shifts the firing and the measurement signal so that the maxima of the difference vectors coincide. An alternative identification routine was programmed, which extracts a pulse from the firing signal as input signal for identification, ensures that enough zeros are padded to the beginning of the identification signals, compensates the time delay automatically and performs a linear least squares system identification. This identification mode can be enabled by passing the string ‘dynamic’ to the main identification method. The identification with a step-function is used with the string ‘static’. In Figure 3-30, the dynamic identification mode was enabled to evaluate the real measurement test 0M15012. The method yields similar results to an identification with a step function input, but the ripples in the signal caused by firing noise of the combustion are at different positions. This effect becomes more important for shorter pulses. While the deviation looks small for 0M15012, which has an on time of 30ms, it looks larger for test 0M15011 in the graph on the left in Figure 3-31. To validate which identification mode is more reliable, both identification modes were used on synthetic test cases. While the results coincide most of the time, there are cases in which the dynamic identification mode fails. The test case shown in the graph on the right in Figure 3-31, gives an example for the reconstruction of a wrong amplitude with the dynamic identification mode, whereas the static mode is correct. No reason has been found so far why the dynamic mode is unreliable sometimes. Nevertheless, the default option for system identification is set to ‘static’.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-5 Improvement Possibilities 75

3-5-3 Filter Order

It is well known that a physical Autoregressive-Moving Average (ARMA) model of order 2 can approximate the transient response of a thrust stand [4,8, 17]. In this section, it is investigated to what degree this proposition is valid for the Airbus DS thrust stand by using the MatlabSystem Identification Toolbox. The toolbox is used to identify a model from the decaying signal after a long pulse and to obtain a goodness of fit value in percent.

IIR Ident. Order Zeros 1 2 3 4 Poles 1 9.22% 9.51% 10.40% 11.35% 2 89.38% 89.43% 90.61% 91.08% 3 93.76% 93.76% 93.76% 93.75% 4 89.67% 93.76% 93.76% 94.62% 5 94.30% 94.65% 94.60% 94.55%

Table 3-1: Nonlinear least squares fit to measurement data with Matlab SI Toolbox.

A(n, n − 1) transfer function (denominator degree n, enumerator degree n − 1) is used in the TDMS method. In Table 3-1, the goodness of fit for different combinations of numerator and denominator orders is shown. Lower order transfer functions of degree (n, n − 1) as used by Airbus are highlighted in red. Bi-proper transfer functions (n,n) are highlighted in blue. In general, the goodness of fit increases for an increasing number of poles. The fit also becomes better for an increasing number of zeros, but the effect is much weaker. Four poles increase the accuracy from 10% to 95% for one zero, while four zeros only increase the accuracy from 9.22% to 11.35% for one pole. Comparing the result obtained for four and five poles, it becomes apparent that there is an upper boundary to the achievable accuracy. In conclusion, from the results in Table 3-1, the reason why an identification order of n, n − 1 is advantageous does not become apparent. On the contrary, bi-proper transfer functions are more accurate and easier to invert.

The identification order of the TDMS method is chosen as 60. As mentioned before, this high order can result in the divergence of the method. Tests have shown that a maximum possible identification order exists, up to which the identification is not affected by noise. For any order higher than this maximum order, numerical errors will adversely affect the identification. In the following, it is attempted to find the optimal linear system identification order. Figure 3- 32 shows the NRMS error in percent for linear least squares identifications of different order. The upper boundary to the achievable accuracy is approximately 95% and is already reached from an order of 4 upwards. Comparing the results of the nonlinear optimisation performed by Matlab in Table 3-1 with the linear identification of a (n, n) transfer function Figure 3-32, no big difference in accuracy can be seen.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 76 Airbus DS Thrust Measurement Equipment and Evaluation Method

Figure 3-32: Left: Measurement signal and simulated response of a least squares identified transfer function of order 8, Right: Goodness of Fit for increasing linear least squares (n,n) transfer function identification orders.

Figure 3-33: Left: The amplitude of the transient system response is not accurately represented by the model of order 2, Right: The amplitude of the transient system response is accurately represented by a model of order 8, but the beat in the signal is not captured.

Linear least squares system identification is efficient enough for the dynamic thrust measure- ment problem. It is only for a transfer function of order 2 that the linear fit is considerably worse than a nonlinear one, in this case 78% for the linear fit and 95% for the nonlinear one. The main reason for the worse fit is that the damping is not estimated correctly. The linearly identified model curve decays too rapidly as illustrated in the left graph of Figure 3-33. In addition, it is difficult to obtain a NRMS fit better than 80% with a linear least squares approach if the off time between pulses is short enough for a beat to develop, as shown in Figure 3-33. A beat is a periodic variation in amplitude and occurs if two sounds with similar frequencies interfere. As shown in Figure 3-33, a higher polynomial order, in this case 8, improves the model fit to the measurement data. As described in Section 3-3-5, this problem is solved in the TDMS method with a combination of high order linear system identification and partial fraction decomposition.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-5 Improvement Possibilities 77

Figure 3-34: Left: Filter of order 2, inverted and stabilised, Right: Filter of order 8, inverted and stabilised.

The two graphs in Figure 3-34 exemplify, however, that a better fit to the decaying curve is no guarantee for a better deconvolution filter. The graph on the left was reconstructed with the model of order 2 from Figure 3-33, the graph on the right with the model of order 8. Although the model of order 2 only had a NRMS fit of 78% and not 96% as the model of order 8, the model of order 2 reconstructs the thrust for the real thrust test 0M15010 significantly better. The overshoot at the beginning and at the end of a pulse, seen in the graph on the right, becomes more extreme when the order of the Inverse Transfer Function filter increases. A good explanation for this particular phenomenon has not yet been found. It appears to be a type of overshoot, however. A reason why the lower system is better suited for compensation can be found by looking at the frequency response of both filters, as shown in Figure 3-35. The high order creates a filter with a nonlinear phase. This nonlinear phase distorts the signal when the filter is applied to it.

Figure 3-35: Left: Inverse Frequency Response for a transfer function of order 2, Right: Inverse Frequency Response for a transfer function of order 8.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 78 Airbus DS Thrust Measurement Equipment and Evaluation Method

One can conclude that for a thrust stand filter, the correct identification of the entire transient system response is less important than the correct identification of the main thrust stand mode. The order reduction approach used by Airbus is an excellent way to find a good compensation filter. The additional poles of the first higher identification step absorb weaker frequencies and allow the construction of a stable and robust filter of order 2.

3-5-4 Low-Pass Filter Design

A digital low-pass filter is suitable to complement a thrust compensator if it does not alter the amplitude characteristics or amplify the noise. That these requirements are fulfilled by the Butterworth, the Chebyshev type II and the Bessel filter was introduced in Section 2-3-4. The Bessel filter suggested for thrust compensation by Crosswy [4] produces no overshoot, but it is an analogue filter not intended to be used digitally. In analogue signal processing, the main reason for choosing the is its approximately equal group delay. A bilinear transform destroys this group delay. Hence, the main advantage of the Bessel filter is destroyed by digitalisation. For thrust compensation the Bessel Filter is not attractive because of its equal group delay, but because it does not cause overshoot. Thus, the analogue Bessel filter contained in the Matlab Digital Signal Processing (DSP) toolbox can be digitalised using an impulse invariant transform. An impulse invariant transform converts an analogue to a digital transfer functions filter in such a way that the impulse response of the analogue filter is not changed [71].2

Figure 3-36: Time response of Bessel and Butterworth filter. As Butterworth filters overshoot for higher orders, they are not suitable for thrust compensation.

In Section 3-3-9, it was established that one of the main disadvantage of the TDMS method is that it is less accurate for shorter pulses. In Chapter5 the main cause of this is going to be identified as the wrong characterisation of the rising and falling rate in the pulse flanks. But- terworth filters can produce overshoot, but have superior rising rate characteristics than the manually designed low-pass filter of the TDMS method. Moreover, their overshoot becomes negligibly small, if a filter of order 1 or 2 is used. Figure 3-36 shows how the rectangular pulse is best preserved by the Butterworth filter of order 1. Hence, a Butterworth filter of order 1 is chosen as low-pass filter. The Butterworth filter of order 1 takes only two samples into account and, in consequence, can only have a small averaging effect on the flanks of the

2 More Information on impulse invariant methods can be found at https://ccrma.stanford.edu/~jos/ pasp/Impulse_Invariant_Method.html.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-5 Improvement Possibilities 79 signal. In general, the higher the order of the filter, the more samples are considered and the smoother the flanks of a pulse become. The time output of two Butterworth and one Bessel filter is depicted in Figure 3-36.

The cut-off frequency of the low-pass filter can be selected manually by convoluting the inverse filter with a low-pass filter in the frequency domain and plotting the frequency response of the resulting combination. The picture on the left in Figure 3-37 shows the inverse frequency response of a reduced order transfer function. One can see how the inverse filter amplifies all frequencies higher than 0.35fNyquist. An application of the inverse filter without additional low-pass filter will amplify all signal components higher than 0.35fNyquist. For the Airbus DS thrust measurements, the signal only consists of noise above 0.4 as can be seen in the frequency spectrum in Figure 3-20. If the inverse filter is applied without adding a low-pass filter, the reconstructed thrust will look like the signal in the picture on the right in Figure ??. To avoid such noise amplification, the frequency response in picture on the left in of Figure 3- 37 has to be changed to look like the frequency response in Figure 3-38. To achieve this, the cut-off frequency and the noise attenuation properties of the low-pass filter have to be adapted. Since the signal above 0.4fNyquist only consists of noise, the low-pass filter needs a cut-off frequency in this region. The order of the Butterworth filter determines the behaviour of its transition band and stop band. The transition band becomes shorter and steeper and the noise attenuation stronger for higher order Butterworth filters. On the downside, they produce overshoot. A Butterworth filter of order 1 does not cause overshoot, but its transition band is larger and flatter and the noise cancellation is weaker.

Figure 3-37: Left: Frequency response of the inverse of the IIR model describing the thrust stand, Right: Example of noise amplification taking place through deconvolution without additional low- pass filter.

In order to avoid a reduction of the relevant thrust frequencies, the cut-off frequency is chosen higher than the required 0.3fNyquist: it is set to 0.5fNyquist. This keeps many of the high frequency dynamics, but still has the desired effect of suppressing the noise amplification properties of the inverse reduced transfer function from 0.4fNyquisty upwards as can be seen in Figure 3-38.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 80 Airbus DS Thrust Measurement Equipment and Evaluation Method

Figure 3-38: Frequency and phase response of the Inverse Transfer Function method.

Unlike the manually designed low-pass filter of the TDMS method, the Butterworth filter allows the designer to increase the noise attenuation when a test has higher background noise than usual. Should the operator not be content with the remaining noise in the final result, he can easily increase the order of the Butterworth filter by 1 or 2. As long as he does not lower the cut-off frequency below 0.4fNyquist, the important frequency components of the signal will not be harmed. Only the signal flanks will become smoother when using a higher order.

3-5-5 Phase Correction

The graph on the left in figure Figure 3-39 shows a thrust pulse reconstructed with the TDMS method and shows that the rising and falling edges of the reconstructed thrust pulses look different. The thrust curve was created by applying the TDMS method to a synthetic measurement signal generated as explained in Chapter5. The asymmetry in Figure 3-39 is not typical for the thrust signal, but caused by the nonlinear phase of the filter. If a signal shows a left-right symmetry after the application of a filter, it indicates that the filter’s phase is either 0 or linear. If the falling and rising edges look different, it may be due to the nonlinear phase of the filter.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-5 Improvement Possibilities 81

Figure 3-39: 1. Left-right applied, 2. Right-left applied, 3. Bidirectionally applied TDMS filter on surrogate signal without noise.

At first glance, the TDMS filter’s phase response shown in Figure 3-40 seems mostly linear. Its most striking nonlinearity is a jump of π-radians when the frequency passes through the 0 belonging to the main mode. This jump results in a phase inversion (a sign inversion in the signal) of any oscillation occurring above 0.3fNyquist. As this frequency range is mostly characterised by noise, a sign reversal is of no importance. Less obvious, but still recognisable is that the phase is not actually linear from 0 to 0.3fNyquist, in Figure 3-40. This is what causes the different edges on the left and the right.

Figure 3-40: The phase jumps when the frequency passes through the 0 belonging to the main mode.

The conventional way to correct the nonlinear phase of a recursive filter is to filter the signal bidirectionally, which means applying the filter on the signal and subsequently on the reversed filter signal [47]. Bidirectional filtering is implemented in Matlab with the function filtfilt(). It is usually employed for low-pass, high-pass or band-pass filters with a nonlinear phase, which are ideally 1 in their passband and 0 in their stop band. For such cases, a reduction of the amplitude can be excluded. This is, however, not the case for the inverse filter created here. Its passband changes the signal.

Figure 3-41: One and bidirectionally filtered thrust pulse

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 82 Airbus DS Thrust Measurement Equipment and Evaluation Method

On the other hand, applying bidirectional filtering, as illustrated in graph 3 of Figure 3-39 and in Figure 3-41, to either a synthetic or a real measurement signal does not have an effect on the amplitude of the thrust signal. The real measurement signal in Figure 3-41 even shows another possible advantage: the curve is much smoother than the one-directionally filtered one. One disadvantage for bidirectional filtering is a duplication of computational effort. Another is that the causality of the signal is impaired. The thrust may start rising before the rocket has been turned on, as is the case in graph number 2 of Figure 3-39.

3-5-6 Stability

To ensure the stability of the inverted reduced order system, all poles must be within the unit circle and not too close to the circle boundary to avoid poles with a very small damping. In all tests, the system’s poles lie well inside the unit circle (red crosses in Figure 3-42). Therefore, the reduced order system is a minimum-phase system, which means that the transfer function and its inverse are stable [26]. Therefore, it is not necessary to check the stability of the transfer function of reduced order.

Figure 3-42: Pole-zero plot of the Inverse Transfer Function compensator (zeros are circles, poles are x-es).

3-5-7 Design of Inverse Compensation Filter

Similar to the Matlab TDMS method, the system is first identified with an IIR transfer function with order 8 using a step function input as described in Section 3-3-4. Then, the system of order 2 describing the main mode is extracted using a partial fraction decompo- sition as described in Section 3-3-5. The resulting compensator of order 2 is inverted and convoluted with a Butterworth low-pass filter of order 1 in the frequency domain to suppress the compensator’s tendency to amplify high-frequency noise:

(z − p1)(z − p¯1) (z − b1) HR = . (3-28) (z − r1)(z − r2) (z − b2) | {z } | {z } Compensator Low−P ass

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-5 Improvement Possibilities 83

The frequency response of the system in Figure 3-43 shows that all frequency components higher than 0.3fNyquist are attenuated. As the Butterworth filter is easily adaptable, the cut-off frequency and noise attenuation can simply be changed if a stronger attenuation of the noise should be required.

Figure 3-43: Frequency response of Inverse Transfer Function Filter.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 84 Airbus DS Thrust Measurement Equipment and Evaluation Method

3-6 Uncertainty Analysis for the Airbus DS Thrust Measurements

The measurement uncertainty for the thrust measurements performed by Airbus DS can be determined by means of a Monte Carlo simulation as described in Section 3-3-4. In the subsequent analysis, the uncertainty attached to results obtained by the TDMS filter is quantified using a representative test case: 0M15_011 (TDMS data base test number). The test 0M15_011 is used, because it is a PMF test with 10ms on time and 1s off time as can be seen in the graph on the left in Figure 3-44. Consequently, there is virtually no interference between the pulses and, due to the short on time, the response can approximately be considered as impulse response. For these reasons, a transfer function of order 2 described in Equation (3-29) can be identified directly using the linear least squares system identification approach described in Section 2-4-3:

0.5786z2 + 0.1772z + 0.06977 H = . (3-29) 11 z2 − 1.152z + 0.9849

No higher identification with subsequent order reduction is necessary for the transient response in Figure 3-44. The response simulated with transfer function H11 fits the measured transient response very well, as can be seen in the graph on the right.

Figure 3-44: Left: Last pulse in the measurement signal of test 0M15_011, Right: Transient response simulated using model H11.

To determine the measurement uncertainty, a probability distribution has to be assigned to each quantity that influences the deconvolution process. The error sources which were included in the uncertainty analysis are depicted in Figure 3-45. The electronic noise is caused by the A/D conversion and the entire electric circuitry. It adds random noise to the entire measurement signal. The identification error is caused by a loss of information when the real transient response of the thrust stand is approximated with the model H11 of order 2. The repeatability error of the load cell is ±0.01 of the measured signal amplitude according to specifications supplied by the manufacturer. The firing noise occurs due to inconsistent combustions in the rocket combustion chamber and introduces randomness to the measurement signal during the on times of the thruster. These four sources of uncertainty are investigated below and a probability distribution is assigned where possible.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-6 Uncertainty Analysis for the Airbus DS Thrust Measurements 85

Figure 3-45: Error sources considered in the uncertainty quantification for the deconvolution method used by Airbus DS to evaluate thrust measurements.

3-6-1 Electronic Noise

An easily identifiable random component of the measurement signal is the noise caused by the electronic circuitry and the Analogue-to-Digital conversion. The electronic noise becomes apparent during measurement intervals with no thrust input and no thrust stand oscilla- tions, for example before the start of a measurement. Typical electronic noise for a thrust measurement is depicted in Figure 3-46.

Figure 3-46: Electronic noise in a thrust measurement signal.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 86 Airbus DS Thrust Measurement Equipment and Evaluation Method

The histogram in Figure 3-47 shows that the probability distribution of the electronic noise is approximately Gaussian with a mean of -0.05. A histogram can only be fed by a limited number of samples. Hence, it is often difficult to ascertain in practice to what degree a real process is Gaussian [53]. While the distribution of the electronic noise is not a perfect bell curve, the approximation as Gaussian noise is still legitimate, because the noise is evenly distributed around a mean which occurs most often.

Figure 3-47: Histogram of electronic noise obtained from a thrust measurement before the first ignition of the thruster.

Figure 3-48: Top: Frequency spectrum of electronic measurement noise with a standard deviation of σ = 0.025, Bottom: Frequency spectrum of ideal white Gaussian noise also with a standard deviation of σ = 0.025.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-6 Uncertainty Analysis for the Airbus DS Thrust Measurements 87

That the electronic noise is also white, can be seen when computing its frequency spectrum. Figure 3-54 compares the frequency spectrum of the electronic noise with ideal Gaussian white noise generated in Matlabwith the same variance. The electronic noise is mostly distributed evenly over the entire frequency spectrum. There are only two more dominant frequencies, one at about 50Hz and the other at 130Hz. In general, the electronic noise has a similar amplitude as the ideal noise, so that the it can be approximated well with white Gaussian noise generated by Matlab. For the uncertainty analysis, electronic noise is generated using the random number generator from Matlabwith a standard deviation of σ = 0.008. This is the average standard deviation of the electronic noise, determined using several thrust tests.

3-6-2 Identification Error

The identification error can be determined by subtracting the simulated from the actual system response of a real measurement. The transient response is obtained as before by looking at the decaying signal after the last firing pulse. The resulting identification error is shown in Figure 3-49 and looks stochastic. Its histogram shows that the series can be approximated as zero-mean Gaussian. However, a closer inspection reveals that there are deterministic elements contained in the signal, like a periodicity of approximately 0.2s.

Figure 3-49: Left: Identification error, Right: Histogram of modeling error.

The deterministic part can clearly be revealed by analyzing the frequency spectrum of the identification error, which is shown in Figure 3-50. Several peaks are observed: the most dominant ones occur at about 90Hz and 150Hz.

Figure 3-50: Frequency spectrum of modelling error.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 88 Airbus DS Thrust Measurement Equipment and Evaluation Method

Therefore, a simple modelling of the identification error with white Gaussian random noise is not possible. The best representation of the physical and random components of the signal can be obtained by simulating the noise itself with another Autoregressive-Moving Average (ARMA) process (see Section 2-4-2). Due to the strong random character of the noise, it is better to identify it with the Matlab System Identification Toolbox instead of using a linear least squares approach. Due to the complexity of the noise, only higher order processes are capable of describing it. A model of order 4 can only achieve a fit of 25%. The best fit is achieved by using a model of order 27, which results in a goodness of fit of 86%. The simulated model response is shown in Figure 3-51.

Figure 3-51: Measured (black) and predicted (red) output using an ARMA model of order 27.

The coefficients of the identified ARMA process are integrated into the uncertainty evaluation by passing the coefficient vectors φ and θ to the function. As noted in Equation (2-28), the vectors φ and θ describe the random process with

φXk = θYk, (3-30) where φ represents the coefficients of the autoregressive part and θ of the moving average part.

3-6-3 Non-Repeatability Force Transducer

According to the manufacturer Interface Advanced Force Measurement, the SM S-Type Load Cell (described in Section 3-2-2) used in the Airbus DS 10N thrust stands has a non- repeatability error of ± 0.01% of the measured output. The repeatability error is defined as the maximum difference in output when the same load is measured repeatedly under identical conditions. It is expressed as a percentage of the rated output.3 No probability distribution for the repeatability error is specified by Interface Inc. This suggests the use of a uniform distribution. A normal distribution cannot be used, because its

3 See https://www.tml.jp/e/product/transducers/catalog_pdf/terminology.pdf.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-6 Uncertainty Analysis for the Airbus DS Thrust Measurements 89 standard deviation would have to be guessed. In the following, the assignment of a probability distribution is entirely avoided by making use of a feature of the measurement uncertainty evaluation toolbox programmed by Eichstädt [68]. The software provides a tool to evaluate uncertainty caused by a local bias ∆k at each sample influencing the measurement outcome:

Yk = Xk ∗ H + ∆k. (3-31)

The repeatability error is incorporated into the uncertainty analysis as a local bias ∆k = 0.01 at each sample for a thrust amplitude of 1N.

3-6-4 Firing Noise

The term firing noise is used to describe random fluctuations occurring in the combustion chamber during the firing of the thruster. An exemplary extract of firing noise recorded during a long firing session is depicted in Figure 3-52.

Figure 3-52: Example of firing noise caused by inconsistent combustion.

Using data from a very long firing test to feed the histogram, it can be shown that the firing noise is almost ideally Gaussian distributed, as can be seen in Figure 3-53.

Figure 3-53: Histogram of firing noise in a thrust measurement signal recorded during the on time of a long SSF test.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 90 Airbus DS Thrust Measurement Equipment and Evaluation Method

The frequency spectrum of the firing noise shows that it is evenly distributed, but not with the same magnitude. The magnitude is larger in the region from 0 to 100Hz. Consequently, firing noise could be simulated using noise of one amplitude from 0 to 100Hz and another from 100Hz to 500Hz. However, the noise up to 100Hz is not changed by the low-pass filter which follows after the deconvolution filter. The noise above 100Hz, on the other hand, is filtered. Hence, for simulation purposes, it is sufficient to approximate the firing noise with white noise of only one amplitude, corresponding to the stronger noise from 0 to 100Hz. This noise is added to the input signal before convolution with the system model.

Figure 3-54: Frequency spectrum of firing noise.

3-6-5 Monte Carlo Simulation

In this section, a sequential Monte Carlo simulation is performed using Matlab codes pro- vided by Eichstädt [72]. The simulation input is generated manually as a thrust pulse with 800ms on time and an amplitude of 1N to which random white Gaussian firing noise with a standard deviation of 0.02 is added. The measurement output is calculated by convolution with model H11 and electronic noise of standard deviation 0.0008 is added to the synthetic measurement signal. The non-repeatability error is included as ∆k = 0.0001 corresponding to 0.01% of the nominal thrust amplitude of 1N. The generated measurement signal is displayed in Figure 3-55.

Figure 3-55: Example of one input and output signal including noise used for the sequential Monte Carlo simulation.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis 3-6 Uncertainty Analysis for the Airbus DS Thrust Measurements 91

The uncertainty is calculated with a sequential Monte Carlo method with M = 106 trials. It can be seen in graph on the left in Figure 3-56 that the calculated uncertainty is constantly about 0.035N. The 95% credibility intervals in the graph on the right suggest that the resulting deconvoluted thrust can be trusted up to a degree of ±0.1N, that is, 10%. This is quite a high degree of uncertainty. It is mostly due to the system identification error described with the ARMA model, as testing the different uncertainty components separately revealed.

Figure 3-56: Uncertainty and 95% credibility intervals for a thrust signal, calculated with a sequential Monte Carlo method with 106 trials.

If system identification errors are left out of the simulation, the uncertainty becomes almost ten times smaller and the uncertainty margins are reduced to 0.03N as shown in the graph on the right in Figure 3-57. Hence, the uncertainty would only be ± 0.015% of the thrust amplitude. The uncertainty without consideration of identification errors is shown in Figure 3- 57. There are two significant peaks. One when the thruster is turned on, and one when the thruster is turned off. Therefore, the uncertainty is dependent on the amplitude of the transient response, but the effect is overshadowed by the larger error caused by the system identification.

Figure 3-57: Uncertainty and 95% credibility intervals for a thrust signal without identification error, calculated with a sequential Monte Carlo method with 106 trials.

Master of Science Thesis CONFIDENTIAL Richard B.H. Ahlfeld 92 Airbus DS Thrust Measurement Equipment and Evaluation Method

3-7 Conclusion

The strain gage type thrust stand used by Airbus DS is highly accurate for SSF tests, for which it achieves accuracies of 0.3%. However, the strain gage type thrust stand is not suitable for PMF measurements with on times lower than 100ms, corresponding to firing frequencies of higher than 10Hz (depending on the chosen on and off times). The TDMS compensation algorithm used by Airbus DS to evaluate PMF measurements is very robust. Its performance data were largely confirmed by other departments. The order reduction is a very efficient and innovative way to extract the main mode of the thrust stand. For certain tests, like the ones in Figure 3-28, it still has to be checked why the method fails. Moreover, it also has to be investigated why it is not possible to recreate the same measurement results saved to the TDMS data base with the original Airbus DS SciLab method. The answer to both questions might be that the coefficients of one test are used to evaluate several others. For PMF measurements, the NRMS error is always higher than 4%. Depending on the combination of on and off times, it can rise up to 40%. For on times shorter than 100ms, the error is always higher than 10%. The error decreases for longer on or off times. The thruster becomes more efficient for longer on times and is most efficient for on times longer than 500ms. For such cases, the accuracy is about 5%. Thus, the current evaluation method is sufficiently accurate for cases in which the thruster is fired most efficiently. Nevertheless, the Normalised Root Mean Square (NRMS) error for on times shorter than 100ms is too high. There is still room for improving the accuracy. The test series in Chapter5 shows that the error is largest at the flanks of the signal pulses. They are not hit accurately, because the smoothing effect of the method is too great. Of the improvement possibilities described, it is recommended to change the input signal for the system identification to a step input and to reduce the identification order to achieve more numerical stability. The other adaptation suggested in Section 3-5 will inevitably change the design of the filter so that new results can no longer be compared to old results obtained by the TDMS method. Nevertheless, the use of the numerator coefficients of the reduced order system results in more accurate results than the manual choice of a double pole at 0.1. Furthermore, a Butterworth low-pass filter allows significantly more flexibility in terms of filter tuning. As result of the performed Monte Carlo simulation, it should be noted that the uncertainty is tripled immediately after the thruster is turned on or off. Therefore, the results obtained for PMF tests with high frequencies are more uncertain. For the future, it is recommended to perform more detailed Monte Carlo simulations with a higher number of trials and to incorporate the knowledge into the designing process of new thrusters. In the short term, it is recommended to increase the sampling rate for PMF measurements from 1000Hz to 5000Hz. Independent of the evaluation method used, higher accuracy can be obtained at the pulse flanks, without changing the algorithm. In addition, the implementation of the Kalman Filter described in Section4 is suggested to improve the accuracy for short tests. In the long term, the construction of a piezoelectric thrust stand with a higher first natural frequency is recommended for the evaluation of PMF measurements, as described in Chapter2.

Richard B.H. Ahlfeld CONFIDENTIAL Master of Science Thesis Chapter 4

Kalman Filter for Deconvolution

This chapter discusses the theory that is required to apply the linear optimal Kalman Filter for the purpose of deconvolution to the dynamic thrust measurement problem. The requirements needed to apply the Kalman Filter are checked in Section 4-1. The design of the Deconvolution Kalman Filter suggested by Bora [9] is described in Section 4-1. The adaptations needed to apply Bora’s method to the dynamic thrust measurement problem are presented in Section 4- 3. The most important adaptation concerns the choice of the measurement and process noise covariance matrices for the case of Pulse Mode Firing (PMF) thrust measurements. How to choose them is discussed in Sections 4-3-2 to 4-3-4. In Section 4-4-1, it is explained how the measurement state error covariance matrix of the Deconvolution Kalman Filter can be used to obtain an estimate of the uncertainty in the input thrust. A time-varying analysis of the uncertainty in the input thrust using a Monte Carlo simulation is performed in Section 4-4-2. The analysis is similar to the one performed in Section 3-6, but is repeated here because the uncertainty analysis in Chapter3 is tailored to Airbus DS data and could not be included in the public version of this thesis.

4-1 Preliminary Conditions for the Use of the Kalman Filter

To apply the Kalman Filter it is assumed that the measurement signal can be modelled with an Autoregressive-Moving Average (ARMA) process, introduced in Section 2-4-2. This assumptions implies that

- The model effectively describes the persistence in the signal. - The model residuals are random, uncorrelated in time and approximately normally distributed.

If the model residuals are random, uncorrelated in time and approximately normally dis- tributed, it is likely that the ARMA model also successfully captures the persistence in the signal. If this random series is white Gaussian, the Kalman Filter is optimal.

Master of Science Thesis Richard B.H. Ahlfeld 94 Kalman Filter for Deconvolution

To check whether the Kalman Filter is optimal to evaluate thrust measurements, the output of the model simulating the transient system response has to be subtracted from the real transient system response. This was done in Section ??, using measurement data provided by Airbus DS. It was found that the frequency spectrum of the thrust stand is too complex to be modelled by a transfer function. The model residues are not white Gaussian. Figure 3-50 shows that there are still physical components. However, they are distributed approximately normal, as can be seen in Figure 3-49. In Section ??, the measurement noise could be shown to be white Gaussian. Hence, the Kalman Filter’s optimality for the dynamic thrust measurement problem is ques- tionable. The measurement noise is white Gaussian, and a physical model can describe the main persistence in the signal. However, the model residues are only Gaussian, not white Gaussian. The Infinite Impulse Response (IIR) filters described in Chapter3 are capable of reconstructing the unknown input signal, even if the model residuals contain certain deter- ministic elements. Since the same model coefficients are inserted into the Kalman Filter, the filter should be equally able to perform the deconvolution. However, there is no guarantee that the result is optimal.

4-2 Test of Bora’s Deconvolution Kalman Filter

To check if the Deconvolution Kalman Filter suggested by Bora is implemented correctly, it is applied to the same test scenario as described in their publication. That the method is implemented correctly is demonstrated in Section 4-2-1 The sought input signals can be reconstructed with the Deconvolution Kalman Filter. However, two difficulties are encoun- tered. First, the initial conditions prescribed by Bora result in a larger initial error as shown in Bora’s publication. Second, the accuracy of the method depends strongly on the values chosen for the process noise covariance matrices Q and R. However, no recommendation on how to choose these values is given by Bora [9]. In the following section, the set-up of the test scenario is described. Then, the two difficulties are investigated: the dependency of the solution on the initial values and the covariance matrices Q and R.

4-2-1 Set-Up of Test Scenario

The Deconvolution Kalman Filter is applied to reconstruct an ARMA process x(k), which has passed through an IIR filter F (z) and is corrupted by measurement noise v(k). The ARMA process x(k) is generated by exciting a system G(z) with white noise w(k). The system G(z) is designed as a low-pass filter using the Yule-Walker equations with cut-off frequency wc = 0.5π and order 10. The measurement noise v(k) is chosen as white Gaussian random noise of unit variance. This procedure is illustrated in Figure 4-1.

Figure 4-1: Flowchart showing how Bora tests the Kalman Filter for Deconvolution [9].

Richard B.H. Ahlfeld Master of Science Thesis 4-2 Test of Bora’s Deconvolution Kalman Filter 95

The IIR transfer function F (z), which is used by Bora to add a transient response to the input signal x(k), is defined as 0.4652 − 0.1254z−1−0.3151z−2+0.0975z−3−0.0259z−4 F (z) = . (4-1) 1 − 0.6855z−1+0.3297z−2−0.0309z−3+0.0032z−4 The state vector ζ is initialised as ζˆ(0, 0) = 0 and the state error covariance matrix as P (0, 0) = I. Bora gives no indication how to choose the covariance matrices Q and R. For the reconstruction of his results depicted in Figure 4-2, they are chosen as Q = 1000000 and R = 1.

Figure 4-2: Deconvolution of a random input signal from a noisy signal using Bora’s method. Left: Reconstruction of Bora’s test results, Right: Benchmark test results supplied by Bora [9].

Although the instructions given by Bora are closely followed, it can be seen in Figure 4-2 that the imitated results differ from the original results in two ways:

- The absolute error xr − x, which subtracts the input signal reconstructed with the Deconvolution Kalman Filer xr from the original input signal x, is significantly larger for the initial 20 iterations than claimed by Bora. - The scale in the left graph is 2x1011 and not only 2, as in Bora’s graph on the right. This is because the input signal could only be reconstructed, if Q was chosen significantly higher than R. Bora prescribes random noise v of unit variance. Hence R should be chosen as 1. For this case, it was only possible to reconstruct the input signal when Q was set to values at least 10000 times larger.

4-2-2 Removal of Initialisation Error

It can be seen in Figure 4-2 that the largest error occurs during the initialisation phase of the Deconvolution Kalman Filter. This error is caused by using 0 as initial condition for the state error covariance matrix P . For Linear Time-Invariant (LTI) systems, the entries of the matrix P and the Kalman gain converge to constant values after a few iterations. In Figure 4-3, it is illustrated how the Kalman gain K converges to the constant value 1.381 within the first 10 iterations. Similarly, all entries of the 16 × 16 matrix P converge to constant values.

Master of Science Thesis Richard B.H. Ahlfeld 96 Kalman Filter for Deconvolution

Figure 4-3: The Kalman gain converges after 6 iterations and then remains constant.

The large initialisation error can be prevented if the matrix P is obtained in a short pre-run. Usually, the solution for P is obtained by solving the Riccati Equation. The Riccati Equation is an ordinary differential equation of order 1 of the state error covariance matrix P . It can be derived by combining the update and prediction steps of the Kalman Filter in such a way that a quadratic equation in P is obtained. However, because the equation is quadratic, it is simpler to find P using a different method instead of the standard Riccati approach: the Deconvolution Kalman Filter is applied to the problem until P has converged to its final value. If this value is then used as as initial guess for P , the initial error is reduced, as can be seen in Figure 4-4.

Figure 4-4: Deconvolution of random input signal, for which the initial guess for P was deter- mined in a pre-run.

4-2-3 Determination of Q and R

For Bora’s test scenario the value of R is chosen as 1, because the measurement noise v is supposed to be of unit variance. However, no value for Q is suggested by Bora. Because R

Richard B.H. Ahlfeld Master of Science Thesis 4-2 Test of Bora’s Deconvolution Kalman Filter 97 is constant, different Q/R ratios, rather than single values of Q, are used for a series of tests to find a suitable value for Q. The code is run in a loop for Q/R ratios from Q/R = 10−5 to Q/R = 200000 and the absolute error ε =x ˆ − x is computed.

In all cases, in which the Q/R ratio is chosen smaller than or close to 1, the Deconvolution Kalman Filter greatly reduces the amplitude of the input signal, so that the reconstruction error becomes extremely large. The graphs in Figure 4-5 illustrate this. The input signals were reconstructed using a Q/R ratio of 1 for the graph on the left and 0.1 for the graph on the right. One can see that the amplitude for the Q/R ratio of 0.1 is smaller than that of 1. When using more values, it can be observed that the amplitude of the input signal converges to 0, if the Q/R ratio converges to zero. Hence, the Q/R ratio has to be chosen larger than 1 for a correct reconstruction of the amplitude.

Figure 4-5: Left: Result obtained by the Deconvolution Kalman Filter for Q/R = 1, with Q = 1000 and R = 1000, Right: Q/R = 0.1, with Q = 100 and R = 1000

The effect of Q/R ratios from 1 to 200000 on the estimation error is shown in Figure 4-6. The kx−xˆk two graphs show the relative error kxk , because the absolute error varies greatly for different Q/R ratios. The graph on the left is plotted to scale and shows dominant random fluctuations for the relative error for different Q/R ratios. The graph on the right is logarithmic and shows that the error decreases linearly for Q/R from 1 to 1000. Evaluating the information obtained in Figure 4-6, it can be attempted to find a general rule how to choose the Q/R ratio. The random fluctuations of the error in both graphs show local minima. For example, for a Q/R ratio of 1.59e5 the error is only 10−4 compared to the error of 10−2, which occurs most often. This suggests that an optimal Q/R ratio could be obtained using a gradient descent algorithm, which minimises the relative error. This is only possible when using synthetic data. Because, for real test cases, the input signal is unknown. The chance that a Q/R ratio, which is optimal for a test case, is also optimal for a corresponding real test is very small. For example, in Figure 4-6, the error to the left and right of the minimum error found at 1.59e5 is a hundred times larger. Hence, finding a global minimum for a real measurement by employing a gradient descent method on a corresponding test case is unlikely.

Master of Science Thesis Richard B.H. Ahlfeld 98 Kalman Filter for Deconvolution

kx−xˆk Figure 4-6: Relative error kxk for different Q/R ratios. Left: Unscaled plot, Right: Double logarithmic plot showing a linear behaviour for Q/R ratios between 1 and 1000.

For a practical application of the method, it is more helpful to realise that from a certain Q/R ratio upwards, an upper boundary for the estimation error can be found. In Figure 4-6, there is a boundary for the estimation error of 0.01 for Q/R ratios from 10000 to 200000. Due to the wide range of ratios for which this rule applies, it is probable that a similar ratio is applicable to a real test. In a similar way, a heuristic choice will be developed for thrust measurements using synthetic data in Section 4-3-2.

Richard B.H. Ahlfeld Master of Science Thesis 4-3 Deconvolution Kalman Filter for Dynamic Thrust Measurements 99

4-3 Deconvolution Kalman Filter for Dynamic Thrust Measure- ments

In this section, the Deconvolution Kalman Filter is adapted for the application on the dynamic thrust measurements problem. Two problems were encountered. One was already elaborated in the Section 4-2-3 and is widely known to be the main drawback of the Kalman Filter: the necessity to choose the covariance matrices Q and R correctly. The second problem is that the low-pass filter integrated into the augmented state-space system sometimes causes oscillations in the reconstructed input signal. A case where this has happened is shown in Figure 4-7 and Figure 4-8. Both effects are investigated in the following sections for synthetic thrust measurement data, which was generated exactly as described in Chapter5. The transfer function used to model the system dynamics of the thrust stand is 0.5887z2 + 0.2072z + 0.02314 H(z) = . (4-2) z2 − 1.15 + 0.9771 The input signal is a sequence of four pulses with an on time of 30ms and an off time of 30ms and a rise and fall time of 2ms. In the visual comparisons, always the third pulse is looked at.

4-3-1 Choosing the Integrated Low-Pass Filter

When applying the Deconvolution Kalman Filter on thrust measurements, it is found that the Butterworth low-pass filter integrated into the state-space equations of the Deconvolution Kalman Filter behaves differently than it does in combination with an inverse filter. This is exemplified in Figure 4-7 where a thrust signal reconstructed with the Deconvolution Kalman Filter is compared with a thrust signal recreated with the Inverse Transfer Function method, which was developed in Section 3-5. For both graphs, a Butterworth filter of order 6 with a cut-off frequency 0.1fNyquist has been used. This filter is capable of removing the entire transient system response, but causes overshoot. This effect is visible in the graph on the right in Figure 4-7. However, integrated into the state-space system of the Deconvolution Kalman Filter, this low-pass filter has a completely different effect. The original transient response is only slightly reduced in amplitude, but remains almost intact, as can be seen in the graph on the left in Figure 4-7. In order to be able to predict the behaviour of the Butterworth low-pass filter integrated into the Kalman Filter, different filters are used and the result are documented.

Master of Science Thesis Richard B.H. Ahlfeld 100 Kalman Filter for Deconvolution

Figure 4-7: Different effects of Butterworth low-pass filter. Left: Integrated into the augmented state-space system of the Deconvolution Kalman Filter, Right: Applied in combination with an inverse filter.

It is found that the effect of the Butterworth low-pass filter depends on the cut-off frequency and on the order. Figure 4-8 shows four thrust signals reconstructed with four different low-pass filters integrated into the augmented state-space system. The two graphs on the top illustrate that the overshoot is dependent on the cut-off frequency. Both graphs were obtained with Butterworth filters of order 3. For the graph on the left, the cut-off frequency is 0.3fNyquist and for the graph on the right 0.1fNyquist. The amplitude of the oscillation in the graph on the right is higher. The graph in the bottom left-hand corner shows that the overshoot depends on the order. The cut-off frequency is 0.3fNyquist, as in the graph above. However, the ringing has a higher amplitude due to the higher order of 6. The graph in the bottom right-hand corner is obtained with a Butterworth filter of order 2 and has a high cut-off frequency of 0.8fNyquist. This low-pass filter has an effect on the highest 20% of the frequency range and no overshoot occurs.

Figure 4-8: Thrust inputs deconvoluted with the Kalman Filter using Butterworth filters with different order and cut-off frequency. In the following abbreviation the first number describes the order, the second number the cut-off frequency. Top left: Butterworth(3,0.3), Top right: Butterworth(3,0.1), Bottom left: Butterworth(6,0.3), Bottom right: Butterworth(2,0.8).

From the results in Figure 4-8, it can be concluded that the ideal low-pass filter for the augmented state-space system of the Deconvolution Kalman Filter is a filter which has only

Richard B.H. Ahlfeld Master of Science Thesis 4-3 Deconvolution Kalman Filter for Dynamic Thrust Measurements 101 little effect on the entire bandwidth of the signal and is of low order. This insight led to the idea to include an integrator instead of a Butterworth filter into the state-space system. 1 In control theory, an integrator is usually described in the frequency domain as I = z . It is used to remove the steady-state error caused by a filter. The steady-state error is the difference between input and output signal of a system as time goes to infinity. It can be seen in Figure 4-9 that the Inverse Transfer Function method has a steady-state error while the Deconvolution Kalman Filter with integrator has none.

Figure 4-9: Left: Steady-state error caused by the Inverse Transfer Function method, Right: No steady-state error occurs for the Deconvolution Kalman Filter with integrator.

The effect, which the integrator has on the Deconvolution Kalman Filter, can be explained mathematically by adapting results obtained by Chen [8]. The steady-state error in the reconstructed input thrust can be defined as

X (z) − Xˆ (z) with Xˆ (z) = X (z) H (z) HC (z) , (4-3) where Xˆ is an estimate for the thrust signal, H(z) is the thrust stand transfer function and HC (z) is the compensator. The steady-state error of a system can be calculated using the final value theorem: e (∞) = lim zH (z) , (4-4) z→0 where e is the steady-state error. To obtain an equation how the steady-state error can be removed with the compensator HC in Equation (4-3), the final value theorem can be adapted to   e (∞) = lim (z − 1) X (z) − Xˆ (z) , (4-5) z→1 because H(z) ≈ 1, the steady-state error vanishes for the limit to 1. The multiplication HC (z) with (z − 1) ensures that the steady state-error still goes to 0. Inserting Equation (4-3) into Equation (4-5) results in     ˆ   lim (z − 1) X (z) − X (z) = lim (z − 1) X (z) (1 − H (z) HC (z)) = 0, (4-6) z→1 | {z } z→1 | {z } error Xˆ(z)=X(z)H(z)HC (z)

Master of Science Thesis Richard B.H. Ahlfeld 102 Kalman Filter for Deconvolution

which is a general equation for the steady-state error for a compensator HC dependent on the input signal X(z). Suitable input signals X(z) to simulate a thrust pulse are the unit step function and the unit ramp function. The general z-transform of a unit step and unit ramp input is: A (z) X (z) = (4-7) (1 − z−1)m with m = 1 and A(z) = 1 for the unit step and m = 2 and A(z) = T z−1 for the unit ramp. Inserting, for example, the unit step into the steady-state error equation (4-6) results in 1 lim (z − 1) (1 − H (z) HC (z)) = 0. (4-8) z→1 (1 − z−1) From Equation (4-8), it can be seen that the limit z → 1 can only be 0 if

 −1 1 − H (z) HC (z) = 1 − z , (4-9) otherwise it becomes infinity. Rearranging Equation (4-9) results in

−1 H (z) HC (z) = z . (4-10) Therefore, the compensator must fulfil z−1 1 H (z) = = (4-11) C H (z) zH (z) in order to avoid a steady-state error. One can see that the term z−1 is needed to have a steady-state error of 0 for a unit step input. This term causes a time delay of 1 sample. In a similar way, it can be found that higher order polynomials of z in the denominator are required to remove the steady-state error for a different input signal. A polynomial of order 2 can be used for a ramp input. Although the derivation is different, the obtained result is common knowledge in Digital Signal Processing (DSP). The steady-state error for an open loop system is known to be dependent on the number of times 0 occurs in the denominator. This number is also called the type of the system. The type of a feedback system is defined as the power n of z which can be factored from the denominator: N (z) H (z) = . (4-12) znD (z) How many additional poles at 0 is required to avoid a steady-state error for different input signals is shown in Figure 4-10.

Figure 4-10: Steady-state system error for different types of feedback systems [14].

Richard B.H. Ahlfeld Master of Science Thesis 4-3 Deconvolution Kalman Filter for Dynamic Thrust Measurements 103

The thrust input signal can either be approximated with a step input or a ramp input. The ramp input is more realistic, because it considers the rise and fall time of the thrust. The transfer function of the Deconvolution Kalman Filter is always bi-proper and its poles occur in complex conjugate pairs for every mode of the thrust stand. Hence, there are no 0 poles and the Deconvolution Kalman Filter transfer function is of type 0. As figure Figure 4-10 shows, for type 0 systems, a finite steady-state error can occur for a step input [73]. Adding an integrator to the augmented state-space system increases the system type by 1 and removes 1 the possibility of a steady-state error. To include an integrator z into the state-space system, which removes the steady-state error for a step input, the matrices AG, BG, CG and DG described in Equation (2-97) have to be chosen as

AG= 0 BG = 1 CG= 1 DG= 0. (4-13)

1 To include a double integrator z2 into the state-space system, which removes the steady-state error for a ramp input, the matrices AG, BG, CG and DG have to be chosen as " # " # 0 0 1 AG = BG = 1 0 0 . (4-14) h i CG = 0 1 DG = 0

In the following, the second, double integrator is chosen to remove the steady-state error caused by the ramp-like thrust input.

4-3-2 Heuristic Tuning of Q and R

In this section, a heuristic approach is developed to choose the filter tuning parameters Q and R for the Deconvolution Kalman Filter for the application in dynamic thrust measurements. A good guess for the measurement noise covariance matrix R is easily obtained from the sensor noise. The statistics of the electronic sensor noise can be determined during periods in which the sensing apparatus is turned on, but no thrust force is exerted, see Section 3-6-1. This is the case at the beginning and end of each thrust measurement. The variance and mean of the electronic noise can be considered to be time-invariant. Hence, the measurement noise covariance matrix R is kept constant at a value typical for electronic measurement noise, for example σR = 0.005N, in the following test series. The tuning of the process noise covariance matrix Q is more difficult. All the model uncer- tainties and inaccuracies as well as the noise affecting the process should quantitatively be incorporated into Q [19]. Therefore, Q is determined in the same way as in Section 4-2-3, by reconstructing an input signal using different Q/R ratios. Instead of using an example by Bora [9], synthetic thrust measurements with known input are used. How the synthetic test case is generated is explained Chapter5. Because R is constant, the Q/R ratio can be used as a single indicator for the chosen values of Q and R. In Figure 4-11, input signals reconstructed for the Q/R ratios 0.1, 1, 10 and 100 are depicted. As before, it can be seen that for Q/R ratios smaller than or equal to 1 the resulting amplitude is so inaccurate that it cannot be used. The accuracy increases for Q/R ratios larger than 1, but it is only for ratios above a 100 that the thrust pulse amplitude reaches an acceptable level of accuracy.

Master of Science Thesis Richard B.H. Ahlfeld 104 Kalman Filter for Deconvolution

Figure 4-11: Thrust signal recovered by Deconvolution Kalman Filter for different values of Q and constant value of R.

In Figure 4-12 is depicted how the error decreases for ratios higher than 1, where the Nor- malised Root Mean Square (NRMS) error, defined in Equation (2-48), is plotted for Q/R ratios from 1 to 1000. It can be seen in the graph on the left-hand side that the error de- creases almost exponentially for ratios until 100 and then levels off. To find the limit of the accuracy, the relative error kx − xˆk / kxk between the input signal x and the reconstructed signal xˆ was calculated for Q/R ratios from 1 to 12000 in the graph on the right-hand side.

Richard B.H. Ahlfeld Master of Science Thesis 4-3 Deconvolution Kalman Filter for Dynamic Thrust Measurements 105

kx−xˆk Figure 4-12: Left: NRMS error, Right: Relative error kxk for different values of Q and constant value of R = 0.005.

It can be seen that the error decreases up to Q/R ratios of 10000, where it becomes constant with a residual error of 0.006. The value reflects the standard deviation of the electronic noise added to the signal of σR = 0.005. This suggests that the noise level of the electronic noise is the limit of the accuracy. A Q/R ratio of approximately 10000 can be obtained by using the standard deviation of the measurement signal as an estimate for Q. This is illustrated in Figure 4-13, where a test with an on time of 30ms and an off time of 30ms was plotted. The standard deviation of the test from the first ignition of the thrust till it is turned off is Q = 54, as can be seen in the graph on the left. The electronic noise contained in the signal has a standard deviation of R = 0.005, as can be seen in the graph on the right. Hence, the Q/R ratio is about 104. This choice for Q falls directly within the region of the lowest possible error in Figure 4-12 as indicated by the red line. Hence, the standard deviation of the measurement signal can be used as an indication for the correct value of Q. However, it is more reliable to use only one pulse than an entire series. Otherwise, long off times between the firing pulses can lower the standard deviation.

Figure 4-13: Left: First four pulses used to determine the value of Q, Right: White Gaussian random noise simulating the electronic noise, used to determine the value of R.

Using this knowledge, the following heuristic choice for the tuning parameters Q and R in dynamic thrust measurements can be recommended:

2 2 Q = σQ R = σR, (4-15)

p where σQ = var (y∆t) is the standard deviation of the measurement signal from the first ignition of the thruster till it is turned off for the last time, if the off time is shorter than the time it takes for the transient response of the thrust stand to subside. If the off time p p is longer, σQ = var (y∆t) is the standard deviation of a decaying pulse. σR = var (yt0 ) is the standard deviation of the system noise measured before the first ignition of the thruster.

Master of Science Thesis Richard B.H. Ahlfeld 106 Kalman Filter for Deconvolution

4-3-3 Rational Tuning of Q and R

A completely different approach to use the covariance matrices Q and R for calibration is suggested by Saha [19]. Instead of estimating the tuning parameters, he suggests the usage of two metrics, J1 and J2, by which the designer can manually tune the linear optimal Kalman Filter. A higher value of the metric J1 improves the sensitivity of the filter performance while an increase in the metric J2 improves the filter robustness. Thus, the designer can either choose the property which fits him best or find a compromise by balancing the two factors:

n −1 o n −1 o J1k = trace (Ak + Bk + Rk) Rk J2k = trace (Ak + Bk) Bk , (4-16)

T T T where Ak and Bk are defined as Ak = CkAkPkAk Ck and Bk = CkQkCk . The two metrics can be derived by rearranging the basic equations of the linear optimal Kalman Filter. The finer details of the derivation can be found in Equations (10-15) in Saha’s publication [19]. In essence, the metric J1 measures the effect of the measurement noise covariance matrix Rk, and the metric J2 the effect of the process noise covariance matrix Qk. In Figure 4-3, it was shown that the Kalman gain and measurement state error covariance matrix P converge to constant values after a few iterations because the model is a LTI system. Therefore, the metrics J1 and J2 similarly converge to constant values for one set of values of Q and R. In order to plot a graph, such as the ones in Figure 4-14, from which suitable values for Q and R can be obtained by use of the two metrics, Saha suggests a constant value p of R as initial choice Q0 = R and then the calculation of both metrics for Q = 10 · Q0, where p ∈ N is contained in the interval [−10, 10] and the x-axis values are computed with nq = log (trace {Bk}). The values of both metrics for the p values of Q and R for the Deconvolution Kalman Filter applied on a thrust test are plotted in the graph on the left in Figure 4-14.1

Figure 4-14: Left: Error metrics J1 and J2 for the Deconvolution Kalman Filter applied to a thrust test, Right: Benchmark results provided by Saha [19] for the Kalman Filter (green) and the Extended Kalman Filter (red).

Figure 4-14 suggests a choice of Q of the same or similar magnitude as R for the best trade- off between robustness and sensitivity. From Section 4-3-2 it is known, however, that such a

1 The value for R = Q = 0.005 was an outlier in J2 and had to be removed.

Richard B.H. Ahlfeld Master of Science Thesis 4-3 Deconvolution Kalman Filter for Dynamic Thrust Measurements 107 choice does not result in the correct amplitude when using the Deconvolution Kalman Filter. Hence, Saha’s method cannot be used for the Deconvolution Kalman Filter to find a better trade-off between Q and R, but it shows that for high choices of Q, the Deconvolution Kalman Filter is more robust. Another advantage of Saha’s method is that not only single values can be chosen for Q and R but also full matrices, as can be seen in Equation (4-16). Their effect can still be evaluated with the same metrics. Normally, it is very difficult to evaluate the effect of a full covariance matrix.

4-3-4 Automatic Tuning of Q and R

The Autocovariance Least Squares (ALS) method was developed by Rajamani in his PhD thesis [74] and can be used to determine the values for Q and R [20]. It is considered by many researchers as the most promising approach to determine the covariance matrices [75]. The method developed by Rajamani [20] was adapted for the Kalman Filter by Aakesson [75], but the details are beyond the scope of this thesis. The main idea behind the ALS method is to address the covariance determination problem by focussing on the innovations of the Kalman Filter. The innovation is defined as qk = yk − Cxk,k−1 and originates from the linear optimal Kalman Filter equation:

αˆk+1,k+1 =α ˆk+1,k + Kk+1 (yk+1 − Ck · αˆk+1,k) , (4-17) | {z } innovation The autocovariance, which is minimised by the method, is defined as the variance of this innovation qk: h T i var(qk) = E qkqk . (4-18)

Application of GNU Octave ALS Toolbox

To apply the version of the ALS method available as a GNU Octave Toolbox2 for the Decon- volution Kalman Filter, a few things have to be noted. First of all, for the matrices A, B and C, the model matrices AH , BH and CH from Equation (2-94) and Equation (2-95) have to be used and not the extended matrices in Equation (2-98): " # 0 1.00 h i A = C = −0.529724 0.841263 . (4-19) F −0.982880 1.149515 F

3 BF is an optional choice in the toolbox and is left out. The toolbox requires a coefficient vector G for the random noise vt, which is not considered for the Deconvoluted Kalman Filter T model here, so G was set to 1, G = [1, 1] . As initial guesses Q0 = 10 and R0 = 0.005 are used. Then, the method requires an extract from the assumed input and output signal used to identify the model. The best results are obtained by using a step input as input function, and the decaying curve after the last pulse in the output signal as output signal. Both signals are depicted in Figure 4-15.

2 The GNU Octave package of the Autocovariance Least Squares Toolbox can be downloaded from http: //jbrwww.che.wisc.edu/software/als/download.html. 3 The entries of CF are computed with ai=ai−a0bi, where ai and bi are the coefficients of the numerator and denominator polynomial, respectively.

Master of Science Thesis Richard B.H. Ahlfeld 108 Kalman Filter for Deconvolution

Figure 4-15: Input Signal and Output Signal used for Autocovariance Determination.

Under these conditions, the ALS method estimates the covariance matrices as

Qest = 3.081590 (4-20) Rest = 1.659573e−4, which gives a Q/R ratio of about 18000. Inserting Qest and Rest into the Deconvolution Kalman Filter results in a relative error of 0.00624, which is slightly smaller than the smallest error obtained by the heuristic choice, which is 0.00674. The ALS method is integrated into the code of the Deconvolution Kalman Filter right after the identification step when the input signal, output signal and the corresponding model coefficients are determined. To increase the probability of reliable results, the heuristic choice for Q and R suggested in Section 4-3-2 is used as initial guess for Q and R. Even so, during testing, the ALS method produces inconsistent results. Occasionally, it returns a larger estimate for R than for Q, which results in far too an low amplitude. The reason for this estimation error could not yet be identified. Therefore, the autocovariance matrix is always disabled as it is not fit for routinely performed thrust evaluation.

4-4 Uncertainty Analysis for the Deconvolution Kalman Filter

4-4-1 Uncertainty Analysis Using the Deconvolution Kalman Filter

During the application of the Deconvolution Kalman Filter, the variance of the measurement state error is updated in each iteration in form of the state error covariance matrix P :

  ˆ  ˆ T Pk,k = E ζk,k − ζk ζk,k − ζk . (4-21)

The variance describes the dispersion of a probability density function around the expecta- tion. It can be interpreted to be the uncertainty associated with the expected value. In

Richard B.H. Ahlfeld Master of Science Thesis 4-4 Uncertainty Analysis for the Deconvolution Kalman Filter 109 the Deconvolution Kalman Filter, the state-space system is augmented to contain the thrust input signal. The state prediction is performed with

T h T T T T i ζk+1,k = Aζk,k with ζk = αk xk βk wk , (4-22) where A and ζ are defined as in Section 2-5-4. The corresponding state error covariance matrix P contains the entries

 2 2 2  σα1 σα1,α2 ··· σα1,x  .   σ2 .. ··· σ2   α2,α1 α2,x  P =  . . .  , (4-23)  . . σ2 .   αn  2 2 2 σx,α1 σx,α2 ··· σx

2 2 where σx is the variance calculated for the input signal, and σx,αi are the covariances between the input signals and the other states. To retrieve an estimate for the uncertainty attached to the thrust input, the covariances have to be evaluated as well. This can be done by using the conditional covariance theorem [76]: if a random vector Z with multivariate normal distribution can be partitioned in two components X and Y , then the mean and variance of Z can also be partitioned into a mean vector µ and a variance-covariance matrix Σ: ! ! µ Σ Σ µ = X Σ = X X,Y . (4-24) µY ΣY,X ΣY

The conditional variance-covariance matrix of Y given that X = x is equal to the variance- covariance matrix of Y minus the terms involving the covariances between X and Y :

−1 var (Y | X = x) = ΣY − ΣYX ΣX ΣXY . (4-25)

The theorem can be applied directly to the matrix P by abbreviating the state vector as h i h i ζ = α1 ··· αn x = Λ x , (4-26) where the state variables αi were replaced with the vector Λ. In the same way, the matrix P can be summarised as " # Σ Σ P = Λ Λ,x , (4-27) Σx,Λ Σx where the sub-matrices of P are defined as

 2 2  σα1 ··· σα1,αn  . . .  2 ΣΛ =  . .. .  Σx = σ (4-28)  . .  x 2 2 σαn,α1 ··· σαn and  2  σα1,x h 2 2 i  .  Σx,Λ = σ ··· σ ΣΛ,x =  .  . (4-29) x,α1 x,αn  .  2 σαn,x

Master of Science Thesis Richard B.H. Ahlfeld 110 Kalman Filter for Deconvolution

Using Equation (4-28) and (4-29), the variance of the input state x can be calculated with

−1 var (x| Λ = Λk) = Σx − ΣxΛΣΛ ΣΛx, (4-30)

given a realisation of the coefficient vector Λ = Λk. Using Equation (4-30), the Deconvolution Kalman Filter can automatically calculate the uncertainty attached to the each reconstructed thrust sample during every iteration. If the Deconvolution Kalman Filter is applied to a LTI system, the measurement state error covariance matrix P converges to a constant value after a few iterations. Hence, only one estimate for the uncertainty in the input thrust signal can be obtained with Equation (4-30). To test the developed method, the 95% credible intervals were computed for a thrust signal of amplitude 10N containing white Gaussian firing noise of 0.3N and electronic measure- ment noise of 0.008N. The Deconvolution Kalman Filter estimates a variance of the error in the input signal of 0.1106N, which corresponds to 95% credible intervals of ±0.1836. This uncertainty margin is displayed in Figure 4-16.

Figure 4-16: Input thrust reconstructed with the Deconvolution Kalman Filter and 95% credible intervals extracted from the state error covariance matrix P .

To validate the obtained estimate, a Monte Carlo simulation was performed for the same test conditions. The simulation returned 95% credible intervals of width ±0.1N, as shown in Figure 4-19. Hence, the credible intervals calculated by the Deconvolution Kalman Filter are validated. The Monte Carlo simulation calculates the uncertainty for each sample and is consequently more accurate than the Deconvolution Kalman Filter, which calculates only one uncertainty margin for one entire test. However, though less accurate, the credible intervals calculated by the Deconvolution Kalman Filter still provide a realistic upper boundary for the uncertainty contained in the input thrust. Moreover, they can be obtained with significantly less computational effort than with the Monte Carlo method. The performed Monte Carlo simulation is described in the next section.

Richard B.H. Ahlfeld Master of Science Thesis 4-4 Uncertainty Analysis for the Deconvolution Kalman Filter 111

Figure 4-17: 95% credible intervals attached to the deconvoluted input signal calculated with a sequential Monte Carlo method with 106 trials.

4-4-2 Uncertainty Analysis Using an Efficient Implementation of the Monte Carlo Method

The Deconvolution Kalman Filter provides the variance of the reconstructed input signal, but only in a time-invariant form. To obtain a time-resolved description of the uncertainty, a Monte Carlo simulation has to be performed. For this, a toolbox developed by Eichstädt [68] is used. The toolbox is based on the same assumptions as used for the Kalman Filter:

- Knowledge of the system outputs y[n] is available in form of discrete-time observations. - The measurement system is linear and time-invariant. - The observational noise process ε[n] can be modelled as a stationary zero-mean ARMA process. (That this last requirement is fulfilled, was shown in Section 3-6-2)

The covariance matrix Uba, required for the toolbox, is calculated as described in Section 2-6-3. As input signal, a step function is used without additional noise. The output signal is calculated using the transfer function described by Equation (4-31). Noise of variance σoutp = 0.008 is added, representative for the electronic measurement noise. The used transfer function is the same as used for all Kalman Filter tests so far: 0.5887z2 + 0.2072z + 0.02314 H(z) = . (4-31) z2 − 1.15 + 0.9771 The filter covariance matrix Uba obtained in this way is  0.081738 −0.139598 0.0579391 −0.000881 0.000919   −0.139598 0.281667 −0.142762 0.002297 −0.002922    −3   Uba = 10 ·  0.057939 −0.142762 0.085481 −0.001416 0.002030  . (4-32)    −0.000881 0.002297 −0.001416 0.000066 −0.000066  0.000919 −0.002922 0.002030 −0.000066 0.000093 The mean of the coefficient vectors resulting from the used Monte Carlo simulation are: h i h i a = 0.595895 0.156678 0.072552 b = 1.000000 −1.148859 0.981404 . (4-33)

Master of Science Thesis Richard B.H. Ahlfeld 112 Kalman Filter for Deconvolution

The uncertainty is evaluated using Equation (4-32) and (4-33) for a test case with an on time of 800ms and a total signal length of 2000 samples, as displayed in Figure 4-18. Firing noise of amplitude 0.3N is added to the input signal during the firing of the thruster and electronic measurement noise of amplitude 0.008N is added to the entire resulting measurement signal.

Figure 4-18: Input and output signal used for the sequential Monte Carlo simulation in state- space form (SMC-SS).

Using a sequential Monte Carlo method in state-space form (SMC-SS) with 106 trials, the uncertainty associated with the reconstructed input signal was calculated and depicted in Figure 4-19.

Figure 4-19: Uncertainty associated with the deconvoluted input signal calculated with a se- quential Monte Carlo method in state-space form (SMC-SS) with 106 trials.

When comparing the measurement signal inFigure 4-18 and the associated uncertainty in Figure 4-19, it can be seen that the uncertainty is dependent on transients in the thrust input signal. It is highest after big changes in amplitude, which occur shortly after the thruster is turned on at 0.2s and off at 1.0s. Therefore, the overall measurement uncertainty is dependent on the PMF frequency of the thruster and can be assumed to be higher for higher PMF frequencies. To illustrate this, a

Richard B.H. Ahlfeld Master of Science Thesis 4-4 Uncertainty Analysis for the Deconvolution Kalman Filter 113

PMF test case with an on and off time of 100ms is shown in Figure 4-20. The uncertainty, shown in the graph on the right-hand side, takes about 20ms to decay after the thruster has been turned on or off. Hence the uncertainty is larger for PMF tests with shorter on or off times.

Figure 4-20: Left: Input and output signal for a PMF test with an on and off time of 100ms, Right: Associated uncertainty.

Figure 4-19 and Figure 4-20 show that the uncertainty is higher after an abrupt change in the thrust signal. These abrupt changes are caused by the ignition of the thruster. Hence, the accuracy of a PMF engine could be improved if the firing of the engine was less abrupt. Figure 4-21 show the uncertainty for one thrust pulse, for which the rise time of the thrust is tripled: the thrust needs 6ms instead of 2ms to reach 10N. The high uncertainty peaks observed in Figure 4-19 and Figure 4-20 have almost vanished.

Figure 4-21: Uncertainty for a single thrust pulse, for which the rise of the thrust has been tripled from 2ms to 6ms.

One can conclude that a fast pulsed firing of the thruster results in a significantly higher uncertainty. The uncertainty can be reduced by increasing the turn on or turn off time of the thruster. However, this requires a change in the valves of the rocket engine, which is difficult

Master of Science Thesis Richard B.H. Ahlfeld 114 Kalman Filter for Deconvolution to achieve. Nevertheless, the results obtained by the uncertainty analysis can be taken into account to improve the PMF accuracy of thrusters. For example, when defining how a thrust level is established, combinations which result in high uncertainty can be avoided.

Richard B.H. Ahlfeld Master of Science Thesis Chapter 5

Test Results

In this chapter the Deconvolution Kalman Filter and the Inverse Transfer Function method (an improved version of the TDMS method) are compared to the Matlab edition of the TDMS method, which is used by Airbus DS in Lampoldshausen to evaluate thrust mea- surement of 10N Hydrazine thrusters. The methods are tested for surrogate test scenarios covering the entire range of on and off times of the Airbus DS thrusters.1 To identify the weight and source of different errors, tests with different configurations are performed. First, only the parts of the deconvolution filters compensating the transient thrust stand response are compared in Section 5-1-1. Second, the effect of random noise on the methods is in- vestigated in Section 5-1-2. Third, the influence of the low-pass filters on the measurement accuracy is tested in Section 5-1-3. The ability of the three methods to cope with firing noise is tested in the most realistic test scenario in Section 5-2. Firing noise is left out in from tests in Section 5-1-1 to 5-1-3 as including a strong random component into the measurement signal makes it more difficult to evaluate the effect of low-pass filter and deconvolution filter. Finally, the computational effort of all methods is compared in Section 5-3 and the test results are summarised in Section 5-4.

5-1 Performance of Deconvolution Filters in Test Scenarios

The test scenario by which the digital deconvolution filters are validated and compared is shown in Figure 5-1. An input signal (1) is created by manually prescribing a periodic series of at least four rectangular or trapezoidal pulses shown in Figure 5-2. The rise time and fall time of a thrust pulse is chosen realistically as 2ms. This is done to investigate how well the methods can capture short rise times. Moreover, the rise time of many thrusters is shorter than 5ms. A series of four pulses is chosen to evaluate the effect of different on and off times on the total error. A periodic series with the same on and off times is selected, because an analytical error analysis using Fourier series is not possible for aperiodic cases (as described in Section 3-3-9). White Gaussian firing noise (2) with a standard deviation of approximately

1 The entire performance range of Airbus DS thrusters is publicly available in [13].

Master of Science Thesis Richard B.H. Ahlfeld 116 Test Results

3% of the nominal thrust value can be added optionally during the on times of the thruster. It is optional, because it is easier to compare most features of the methods without the presence of firing noise. Firing noise is included into the evaluation in the most realistic test scenario described in Section 5-2.

Figure 5-1: Flowchart illustrating how synthetic data are generated to compare different decon- volution methods.

Figure 5-2: Left: Self-generated input pulses with 10ms on and 100ms off time, Right: Measure- ment signal generated with the (n,n) or (n,n-1) transfer function H(z). The oscillation resulting from both models is almost identical.

Assuming that the thrust stand can be modelled as an Linear Time-Invariant (LTI) system, a transient thrust stand response can be integrated into the surrogate measurement signal by convolution with a transfer function (3). The following two discrete 2nd order transfer functions are chosen to imitate the behaviour of a thrust stand: 0.5887z2 + 0.2072z + 0.02314 0.5887z + 0.2295 (n, n): (n, n − 1) : . (5-1) z2 − 1.15 + 0.9771 z2 − 1.15z + 0.9761

Both transfer functions are designed to have a single main mode at 0.3fNyquist. For a sampling rate of 1000Hz this means approximately 150Hz. The main mode at 0.3fNyquist is constructed

Richard B.H. Ahlfeld Master of Science Thesis 5-1 Performance of Deconvolution Filters in Test Scenarios 117 with a high gain of approximately 30 and strong damping for all higher frequencies. The frequency response of both transfer functions is shown in Figure 5-3.

Figure 5-3: Frequency response of the two test models. Left: (2,2) model, Right: (2,1) model. Both models are constructed to have the same frequency response.

After convolution with the transfer function, white Gaussian random noise (4) with a stan- dard deviation of 0.05% of the nominal thrust value is added, so that an artificial thrust measurement signal (5) of the thrust stand is created. The deconvolution filters (6) can be applied to this signal to obtain an estimate xˆ (7) of the input thrust x. The two transfer functions described in Equation (5-1) are needed, because the TDMS and Inverse Transfer Function Filter are programmed for a transfer function of denominator degree n and numerator degree n − 1 (from now on abridged with the tuple (n,n-1))2, while the Deconvolution Kalman Filter needs a (n,n) transfer function for the proper set-up of its state-space system. Hence, either a (n,n-1) transfer function has to be re-identified using a (n,n) model for the Deconvolution Kalman Filter, or a (n,n) model has to be re-identified by an (n,n-1) model for the two IIR filter methods. If a (n,n-1) transfer function is re- identified using a (n,n) model, the numerator coefficient of z2 is identified as a very small constant (10e-10) which can adversely affect the calculations. If a (n,n) transfer function is re-identified using a (n,n-1) model, the transfer function can be only identified correctly for the Deconvolution Kalman Filter. For the two IIR filters, the model can at best be identified up to a time delay of one sample. This is due to the fact that if a transfer function with one zero has to describe a transfer function with two zeros, the missing zero is interpreted as a time delay, see Chapter 2-3-3 and Figure 5-4. Therefore, two different transfer functions have to be used to ensure that the results are not affected by system identification errors. The measurement signal for the IIR filter methods is created with a (n,n-1) transfer function and for the Deconvolution Kalman Filter with a (n,n) transfer function. In this way, both deconvolution filters can possess a full and accurate knowledge of the system dynamics and no time delay occurs.

2 This is not a conventional notation, but merely introduced in this thesis to differentiate between the two transfer functions.

Master of Science Thesis Richard B.H. Ahlfeld 118 Test Results

The deconvolution methods are evaluated by comparing the NRMS error statistic described in Equation (2-48) of x and xˆ. To allow a better comparison of the methods, the deviation of the perfect fit in percent is used, instead of the goodness of fit. This changes the NRMS static such that 0% means a perfect fit and 4% means a deviation of 4 % from a perfect fit. The changed Normalised Root Mean Square (NRMS) statistic can be defined as

   kxˆ − xk  εfit = 100 − 100 1 − n  , (5-2)  1 P  xˆ − n x (i) i=1

where x is the test input and xˆ is the estimate of thrust input obtained by the deconvo- lution method. The NRMS errors are always computed for the full length of the created measurement signals. For a signal consisting of four consecutive pulses and their off times, the measurement signal length is ∆t = 4·ton +4·toff . In this way, the calculated error is more representative of the total error occurring during Pulse Mode Firing (PMF) measurements. In visual comparisons, like in Figure 5-6, only the third pulse is looked at. The system is tested for a set of input pulses with an amplitude of exactly 10N and varying on and off times: 5ms, 10ms, 50ms, 100ms and 1s. This set is chosen to cover the whole range of PMF tests, in which the thrusters are tested by Airbus DS (see Figure 3-9) and to investigate the influence of the pulse length on the measurement accuracy.

5-1-1 Comparison of Deconvolution Filters

At first, only the component of the deconvolution methods compensating the transient thrust stand response is evaluated by excluding as many external influences as possible. No mea- surement noise is added. Therefore, no low-pass filters are needed to complement the com- pensation filters. Although the compensation filters still amplify frequencies higher than approximately 0.4fNyquist, there is no noise contained in the signal which can be amplified. Hence, the low-pass filters can be left out to avoid their effect on the signals.

Figure 5-4: Delay of one sample caused when identifying a (n,n) model with a (n,n-1) transfer function.

Richard B.H. Ahlfeld Master of Science Thesis 5-1 Performance of Deconvolution Filters in Test Scenarios 119

While the low-pass filters can easily be disabled for the Inverse Transfer Function method and Deconvolution Kalman Filter, disabling the low-pass component of the original TDMS method poses a problem. In the TDMS method, noise amplification is avoided by manually adding a pair of zeros. By omitting these additional two zeros, the design of the TDMS filter is somewhat crippled. However, if they remain, the TDMS method applies its low-pass filter while the other two methods do not. To solve this, the additional low-pass filter zeros are left out of the design of the TDMS method. Furthermore, the gain of the filter is corrected as follows: HTDMS_without_lp (iω) HTDMS_without_lp (iω) = HTDMS (1) . (5-3) HTDMS (1) In this way, the gain of the filter is not changed when the additional zeros are omitted. Zooming into a longer test (with 1000ms on time) as shown in Figure 5-5, reveals that the TDMS method and Inverse Transfer Function method have a constant bias of approximately 0.1N when reconstructing a 10N pulse. For a thrust amplitude of 10N, this is a 1% error, while the Deconvolution Kalman Filter only has a bias of 0.00002N, that is an error of 0.0002%.

Figure 5-5: Bias in the TDMS, Inverse Transfer Function and Deconvolution Kalman Filter method.

For all methods the largest part of the error is caused at the rising and falling edges of the reconstructed thrust pulses, although none of the IIR filters causes overshoot without the use of low-pass filters. A test with an on time of 10ms is shown in Figure 5-6. One can see that the TDMS method needs 5ms to reach the true thrust amplitude, the Inverse Transfer

Master of Science Thesis Richard B.H. Ahlfeld 120 Test Results

Function method needs 2ms and the Deconvolution Kalman Filter needs 1ms. Hence, the Deconvolution Kalman Filter is the most accurate for short pulses. The TDMS method’s smoothing effect on the edges of a pulse is constant. Consequently, the error caused by the flanks has a stronger weight, when the pulse length is shorter. For example, while for an on time of 10ms in Figure 5-6 only 5ms in the middle of the pulse are hit correctly, 45ms are hit correctly for an on time of 50ms.

Figure 5-6: Recovery of prescribed input signals with on and off times of the same duration: 10ms and 50ms.

Richard B.H. Ahlfeld Master of Science Thesis 5-1 Performance of Deconvolution Filters in Test Scenarios 121

The dependence of the error on different on and off times can be seen in Table 5-1. To quantify the error, the NRMS error statistic introduced in Equation (5-2) is used. The error is calculated for the entire measurement signal. The true error of the TDMS method is concealed to protect the intellectual property of Airbus DS. For the TDMS method, the table only shows, whether the computed error is larger or smaller than 5%. It can only be revealed that the error of the TDMS method increases for shorter on times as predicted in Section 3-3-9. The overall NRMS error is below 5% only for an on and off time of 1000ms. The Inverse Transfer Function method behaves similarly to the TDMS method, only that the errors are always smaller. The adaptations to the design of the filter increase the accuracy.

TMDS Method on|off time 5 ms 10 ms 50 ms 100ms 1000ms

5 ms >5 >5 >5 >5 >5 10 ms >5 >5 >5 >5 >5 50 ms >5 >5 >5 >5 >5 100 ms >5 >5 >5 >5 >5 1000 ms >5 >5 >5 >5 <5 Inverse Filter

5 ms 0.9465 0.9464 0.9457 0.9441 0.9393 10 ms 0.9556 0.9553 0.9540 0.9507 0.9411 50 ms 0.9910 0.9900 0.9863 0.9768 0.9486 100 ms 1.1060 1.1030 1.0920 1.0629 0.9742 1000 ms 2.0796 2.0636 2.0043 1.8410 1.2577 Kalman Filter

5 ms 0.00002 0.00002 0.00002 0.00003 0.00003 10 ms 0.00002 0.00002 0.00002 0.00002 0.00003 50 ms 0.00002 0.00002 0.00002 0.00002 0.00003 100 ms 0.00003 0.00003 0.00002 0.00002 0.00004 1000 ms 0.00005 0.00005 0.00005 0.00004 0.00003

Table 5-1: Goodness of Fit for different on and off times for TDMS, Inverse Transfer Function and Deconvolution Kalman Filter method without noise and low-pass filter (rows contain the same on time, columns the same off time).

The average error of the Inverse Transfer Function method is about 1%. The minimum error is approximately 0.94% and occurs for on times of 5ms and all off times tested. The maximum error occurs for an on time of 1000ms and off time of 5ms. This large error can be explained with the bias of the method observed in Figure 5-6. Because of the bias for the Inverse Transfer Function method holds: the longer the on time, the higher is the error caused by the bias. For the same on time, the error decreases slightly for increasing off time. This effect can be best observed for an on time of 1000ms, where the error is 2.07% for an off time of 2ms and 1.25% for an off time of 1000ms. This can be explained by the increasing weight of the off times. As the NRMS error is computed for the entire signal and the thrust oscillation takes only 400ms to decay, each off time adds 600 samples of comparing 0 with 0 to the error.

Master of Science Thesis Richard B.H. Ahlfeld 122 Test Results

5-1-2 White Gaussian Random Noise

The effect of random errors on the performance of the deconvolution filters is evaluated by adding white Gaussian random noise with standard deviation 0.005N (corresponding to 0.05% of the nominal thrust force for 10N) to the created measurement signals. The NRMS error for different combinations of on and off times is listed in Table 5-2. The occurrence of random noise decreases the accuracy for all methods. The average error for the Inverse Transfer Function method increases from 1% to about 3% with noise. Similarly, the average error of the Deconvolution Kalman Filter is increased from 0.002% to about 1%. Nonetheless, the Deconvolution Kalman Filter is still the most accurate overall. The only value which stands out, is the high error of 12% for the Inverse Transfer Function method for an on time of 5ms and an off time of 1000ms. It can be explained by considering that about 99.5% of this signal is 0. In the 0 regions, random noise is compared to 0, adding to the overall error. This is also true for the Deconvolution Kalman Filter. However, for the Deconvolution Kalman Filter the error is only 3.4%, because it improves the signal-to-noise ratio while the Inverse Transfer Function method does not. The NRMS statistic is not a good error indicator for tests with long off times and short on times. For such cases a visual comparison of the true and deconvoluted input thrust is preferable.

Figure 5-7: Effect of random noise with standard deviation of σ = 0.15 and NRMS error for all three deconvolution methods.

To visualise how sensitive the different deconvolution methods are to an increase in the noise,

Richard B.H. Ahlfeld Master of Science Thesis 5-1 Performance of Deconvolution Filters in Test Scenarios 123

TDMS Method on|off time 5 ms 10 ms 50 ms 100ms 1000ms

5 ms >5 >5 >5 >5 >5 10 ms >5 >5 >5 >5 >5 50 ms >5 >5 >5 >5 >5 100 ms >5 >5 >5 >5 >5 1000 ms >5 >5 >5 >5 >5 Inverse Filter

5 ms 5.7754 5.8817 6.1530 6.8278 12.7755 10 ms 4.1244 4.1165 4.5193 5.3928 8.9498 50 ms 2.8686 2.8803 2.8648 3.2034 5.3235 100 ms 2.0274 2.0291 2.1416 2.1671 3.2183 1000 ms 2.8984 2.8311 2.7906 2.5780 2.0192 Kalman Filter

5 ms 2.3214 2.2983 2.3391 2.3649 3.3658 10 ms 1.7400 1.7348 1.7400 1.8333 2.4505 50 ms 1.1062 1.1086 1.1073 1.0816 1.3327 100 ms 1.0529 1.0088 1.0197 1.0165 1.0711 1000 ms 1.6272 1.6023 1.5187 1.4366 1.0057

Table 5-2: Goodness of Fit for different on and off times for TDMS, Inverse Transfer Function and Deconvolution Kalman Filter method with white Gaussian noise with a standard deviation of 0.005N, but without low-pass filter. measurement noise with a standard deviation of 0.15N is imposed on the synthetic measure- ment signal. This noise is about 30 times larger than the commonly encountered electronic noise. The reconstructed inputs thrusts are depicted in Figure 5-7. The noise is smoothed out most evenly by the TDMS method. Figure 5-7 explains why the error is generally higher for the Inverse Transfer Function method than for the Deconvolution Kalman Filter. Without a low-pass filter, the Inverse Transfer Function method amplifies the imposed measurement noise. The Deconvolution Kalman Filter’s output still shows a certain randomness. However, the standard deviation of the noise in the reconstructed input signal is only 0.8244N while it had a standard deviation 0.15N in the measurement signal. The Deconvolution Kalman Filter does not amplify the noise: it decreases its amplitude and improves the signal-to-noise ratio. The effect can be explained with results obtained by Chen in [8]. He discovered that additional poles at 0 can improve the cancellation properties of a filter for white Gaussian random noise. The integrator has the same effect, only that it does not cause a time delay.

5-1-3 Low-Pass Filter Effects

To avoid noise amplification, the low-pass filter of the Inverse Transfer Function method is activated and a Butterworth filter of order 1 with a cut-off frequency of 0.5fNyquist is used. A comparison of the result obtained with and without low-pass filter for electronic noise with

Master of Science Thesis Richard B.H. Ahlfeld 124 Test Results standard deviation 0.005N is shown in Figure 5-8. It shows that the effect of the low-pass filter on the signal flanks outweighs the effect of the noise cancellation considerably in the NRMS error.

Figure 5-8: Input thrust of 10ms on time deconvoluted with Inverse Transfer Function method without (left) and with (right) Butterworth low-pass filter of order 1.

Figure 5-9: Effect of white noise with standard deviation 0.15N on the TMDS, Inverse Transfer Function and Deconvolution Kalman Filter method for a 10ms long pulse.

Richard B.H. Ahlfeld Master of Science Thesis 5-1 Performance of Deconvolution Filters in Test Scenarios 125

To visualise the effect of the low-pass filter for stronger noise, noise with a standard deviation 0.15N is imposed and a Butterworth filter of order 3 with cut-off frequency 0.3fNyquist is in- cluded into the Inverse Transfer Function method and into the augmented state-space system of the Deconvolution Kalman Filter. The results are displayed in Figure 5-9. The TDMS method shows regular ripples where the random noise has been smoothed. The application of a stronger low-pass filter in the Inverse Transfer Function method becomes clearly visible in the overshoots caused at the beginning and end of a firing pulse. For the Deconvolution Kalman Filter, the noise cancellation is not as effective as for the other two methods, but no overshoots occur and the signal flanks are both accurately represented.

TDMS Filter on|off time 5 ms 10 ms 50 ms 100ms 1000ms

5 ms >5 >5 >5 >5 >5 10 ms >5 >5 >5 >5 >5 50 ms >5 >5 >5 >5 >5 100 ms >5 >5 >5 >5 >5 1000 ms >5 >5 >5 >5 >5 Inverse Filter

5 ms 22.8822 22.8360 22.7947 22.7060 22.6889 10 ms 95.7037 95.7305 95.8219 95.2246 91.0405 50 ms 13.7061 13.7422 13.6629 13.5271 13.1509 100 ms 8.4377 8.4058 8.3264 8.1260 7.4934 1000 ms 5.4076 5.3672 5.2244 4.7988 3.2978 Kalman Filter

5 ms 1.3512 1.3577 1.5509 1.5799 3.0397 10 ms 1.0778 1.0172 1.1165 1.2222 2.1974 50 ms 0.6048 0.5929 0.6157 0.6343 1.0527 100 ms 0.5090 0.5144 0.5303 0.5305 0.7864 1000 ms 0.6906 0.6869 0.6707 0.6176 0.5027

Table 5-3: Goodness of Fit for different on and off times for TDMS, Inverse Transfer Function and Deconvolution Kalman Filter method with Gaussian white noise and Butterworth low-pass filter of order 1 with 0.5fNyquist cut-off frequency.

In Table 5-3, it can be seen that the low-pass filter causes larger errors than the random noise. Therefore, it can be concluded that for the design of a low-pass filter for short PMF tests, more attention should be paid to the flanks than to the noise cancellation. If a separate Butterworth low-pass filter is applied as a follow-up after the Deconvolution Kalman Filter, almost the same NRMS errors are produced as for the Inverse Transfer Function method. Hence, the Deconvolution Kalman Filter works better without a subsequent low-pass filter. Tests with higher noise levels, as well as tests with real data have revealed that a Butterworth filter included into the state-space system has an improving effect on the thrust signal, if the noise in the measurement signal is strong enough. For noise of standard deviation 0.005, it is sufficient to replace the Deconvolution Kalman Filter with the same Butterworth filter of

Master of Science Thesis Richard B.H. Ahlfeld 126 Test Results order 1 as used by the Inverse Transfer Function method to improve the accuracy as seen in Table 5-3. Hence, the included low-pass filter in the state-space system has a smaller effect on the measurement signal’s flanks than the separate execution after application of the Deconvolution Kalman Filter. From the test results above, it can be concluded that the integration of the low-pass filter into the state-space system of the Deconvolution Kalman Filter can become useful for stronger random noise in the output signal. For weak random noise in the output signal, the application of an integrator produces in the best results. Similarly, the random firing noise in the input signal can be reconstructed most accurately if an integrator is used. This is demonstrated in the next section.

5-2 Realistic Test Scenario

The following test scenario tries to reconstruct realistic test conditions for small liquid rocket engines. The surrogate input signal is generated as a series of trapezoidal pulses with an amplitude of exactly 10N, a rise and fall time of 2ms, an on and off time of 50ms. The on time is chosen as 50ms to make the effects of firing noise visible. Electronic noise with standard deviation 0.008N is added to the output signal and firing noise with standard deviation 0.3N is added during the on times of the thruster as depicted in Figure 5-10. The TDMS, Inverse Transfer Function and Deconvolution Kalman Filter method all use their integrated low-pass filter components.

Figure 5-10: Synthetic input and output data with firing noise in the input and electronic noise in the output signal.

The deconvoluted input results are depicted in Figure 5-11. The smoothest results are ob- tained by the TDMS method. The Inverse Transfer Function method follows the random noise little better, but not consistently. The Deconvolution Kalman Filter is significantly better suited to the task of extracting the random firing noise from the system response than the other two methods. It is the only method capable of extracting the time-resolved firing signal. It is difficult to evaluate whether a better fit to the firing noise makes the Deconvolution Kalman Filter more or less accurate. If the error is computed with respect to a smooth and

Richard B.H. Ahlfeld Master of Science Thesis 5-2 Realistic Test Scenario 127 noise-free input signal despite the presence of firing noise, the following NRMS errors are obtained: 13.5145 for the TDMS method, 14.8277 for the Inverse Transfer Function method, and only 3.574 for the Deconvolution Kalman Filter. The error of the TDMS method becomes smaller compared with a smooth input signal, but it is still higher than the other two values. Again, the reason is the bad fit at the signal flanks. The error of the Inverse Transfer Function method also decreases slightly, because it smooths the firing noise. Still, even for a smooth input signal the NRMS error is considerably smaller for the Deconvolution Kalman Filter than for the other IIR filter methods. This can be explained by the Deconvolution Kalman Filter’s ability to hit the amplitude most accurately. In addition, for the Deconvolution Kalman Filter, the firing noise is zero-mean Gaussian around the correct amplitude value of 10N. Once again, its mean gives the correct amplitude. Hence, even if a smooth input is desired, the Deconvolution Kalman Filter is still the most accurate.

Figure 5-11: TDMS, Inverse Transfer Function and Deconvolution Kalman Filter method decon- volution of input signal including firing noise with standard deviation 0.3N and electronic noise with standard deviation 0.008N.

It still has to be tested whether the smooth reconstruction of the input signal or a recon- struction of the input signal with firing noise is eventually more accurate. This is done by comparing real thrust integrals and centroid times. However, following the indications of the test series, it is most likely that the Deconvolution Kalman Filter creates the most accu- rate thrust integrals and centroid times, because it has the smallest bias and hits the thrust amplitude and signal edges most accurately.

Master of Science Thesis Richard B.H. Ahlfeld 128 Test Results

To obtain results comparable to those of the TDMS method for real test cases, a stronger low- pass filter has to be integrated in the Inverse Transfer Function method and Deconvolution Kalman Filter. The results most similar to the ones achieved with the TDMS method were obtained by a Butterworth filter of order 3 with a cut-off frequency of 0.4fNyquist.

5-3 Computational Effort

The computation time needed by the three methods for measurement signals of increasing signal length is depicted in Figure 5-12. The Inverse Transfer Function method is the fastest, immediately followed by the TMDS method. The Deconvolution Kalman Filter needs sig- nificantly longer. While all three methods show linear computation time, the Deconvolution Kalman Filter’s gradient is more than ten times higher than that of the other two methods. The reason for this is that the Deconvolution Kalman Filter has to solve a system of equa- tions in each iteration to find the measurement state error covariance matrix P . The transfer function filter methods only have to find their model once and then traverse the output signal with it.3

Figure 5-12: Comparison of computational effort of the Deconvolution Kalman Filter and the two transfer function approaches.

Long measurement tests with signal lengths of more than 300000 samples can take about 5 to 6 seconds when evaluated with the Deconvolution Kalman Filter. This is no significant disadvantage for two reasons. First, a measurement signal of 300000 samples is 30 seconds long. Hence, the Deconvolution Kalman Filter could already evaluate the measurement while it is taken and finish in time without causing a delay. Second, even if the measurements are evaluated a posteriori, the required evaluation time is not unreasonable. Even if 300 tests were performed in one day, they could all be evaluated in 25 minutes. One can conclude that the increase in computation time can be justified by the improvement in accuracy.

3 The measurement time was computed using 4 cores of an Intel i7 processor with 8GB RAM.

Richard B.H. Ahlfeld Master of Science Thesis 5-4 Summary of Test Results 129

5-4 Summary of Test Results

The accuracy of all methods shows a dependency on the length of on and off times during PMF. In general, shorter on and off times disturb the oscillation of the system and increase the error. The inaccurate representation of the true signal flanks in the reconstructed thrust signal has been identified as the main reason behind the increasing error for shorter pulses. The TDMS method has a strong smoothing effect on the measurement noise. White Gaussian random noise has no great effect up to a certain magnitude and the firing noise occurring during real tests is smoothed. Moreover, the TDMS method requires only little computational effort. However, it has a constant bias of about 1% of the thrust level and produces a large error at the signal flanks. The Inverse Transfer Function method hits the signal flanks more accurately, but it, too, has a bias of 1%. It needs an additional low-pass filter to avoid noise amplification due to the ill-posedness of the inversion problem. How much the firing noise occurring during real tests is smoothed depends on the order of this low-pass filter. The Inverse Transfer Function method requires a little more computational effort than the TDMS method. The Deconvolution Kalman Filter represents the signal flanks most accurately and with a steady-state error so low, that it is in the order of the electronic noise. The Deconvolution Kalman Filter does not invert the transfer function and, therefore, does not amplify the noise. Its integrator has no effect on the system flanks and also reduces the noise amplitude. It is more suitable for an accurate extraction of short pulses than the tested IIR filters. It can reconstruct the firing noise as accurately as a smooth pulse. This accurate reconstruction of the firing noise could be beneficial for the computation of the correct centroid times and thrust integrals. This will have to be investigated further using real test data. The Deconvolution Kalman Filter requires more computational effort than the other methods, but the additional effort can be justified by the increase in accuracy.

Master of Science Thesis Richard B.H. Ahlfeld 130 Test Results

Richard B.H. Ahlfeld Master of Science Thesis Chapter 6

Conclusion

In an age of fierce competition, as more private companies venture into the space sector, the fuel and cost efficiency of satellites and their thrusters is of primary importance. A precise firing of the thrusters during a position adjustment of a satellite can save precious fuel and increases the service life [8]. Such precise thrust levels can be better obtained by pulsed than by steady-state firing [15]. For this reason, the design of highly accurate measurement evaluation methods for pulsed liquid rocket engines has received more attention in the last decade [8, 15, 16, 17]. To avoid costly new designs for the majority of industrial suppliers, a new evaluation method is needed to adapt commonly used strain gage type thrust stands to the demands of pulsed thrust measurements. In this thesis, a new method was developed to increase the measurement accuracy for such Pulse Mode Firing (PMF) rocket thrust measurements. The method is intended as a cost-efficient alternative for industrial rocket manufacturers who wish to increase their measurement accuracy without building a new thrust stand specifically designed for PMF measurements. Using a design made by Bora [9], the Kalman Filter was adapted to deconvolute the input thrust from a noise-corrupted transient thrust stand response. This Deconvolution Kalman Filter distinguishes itself from conventional, industrial IIR filtering approaches by its algorith- mic simplicity and the few designing choices it requires. The designer only needs to supply an Autoregressive-Moving Average (ARMA) model describing the thrust stand behaviour. The model can be identified with, for example, a linear least squares method. The model coefficients can be obtained most reliably by assuming a step function input and extracting a corresponding decaying oscillation from the measurement signal. For Infinite Impulse Re- sponse (IIR) filters, a stability analysis has to be conducted for the identified coefficients in case they are unstable. This is not necessary for the Deconvolution Kalman Filter, because it does not invert the model. During testing, it was discovered that including an integrator into the augmented state-space system of the Deconvolution Kalman Filter offered a way to remove the steady-state error and, at the same time, attenuate white Gaussian measurement noise. A similar observation was already made by Chen [8]. They noticed that a thrust compensator can be improved by inserting an additional pole at 0 into the transfer function at the cost of causing a time

Master of Science Thesis Richard B.H. Ahlfeld 132 Conclusion delay. An integrator has the same effect, only that no time delay is caused. For dynamic thrust measurements, the use of an integrator has two more advantages. First, white Gaussian random components in the input signal can be reconstructed accurately even if it changes at the rate of the sampling rate. For thrust measurements, this means that the combustion noise of the rocket engine can be recovered accurately. Second, with the help of an integrator, thrust pulses can be reconstructed in rectangular form with a reconstruction error in the order of the standard deviation of the electronic measurement noise.

The ability to evaluate rectangular pulses makes the Deconvolution Kalman Filter especially suitable for the evaluation of PMF rocket thrust measurements with short firing times. This was demonstrated by comparing the Deconvolution Kalman Filter with two IIR filtering meth- ods. It was found that a low-pass filter, incorporated into the augmented state-space system of the Deconvolution Kalman Filter results in a more accurate reconstruction of rectangular pulses than when applied in combination with an IIR filter.

The commonly known weak-spot of the Kalman Filter is the determination of its measurement and process noise covariance matrices Q and R. It was found that for PMF thrust measure- ments, Q can be chosen as the standard deviation of the oscillations following a sharp thrust pulse and R can be chosen as the standard deviation of electronic noise picked up at the be- ginning of a measurement. If these heuristic choices do not lead to good results, the rational metrics developed by Saha [19] or the Autocovariance Least Squares (ALS) method developed by Rajamani [20, 75] can be used.

In the special set-up of the augmented state-space Kalman Filter, the input signal is added as an additional state. The state error covariance matrix P contains the variance of the error for this state. The variance of the error in the input signal can be interpreted as an estimate of the uncertainty in the reconstructed thrust signal and can be extracted using the conditional covariance theorem. In this way, an evaluation of the measurement uncertainty can be conveniently integrated into the deconvolution process for the Kalman Filter. By contrast, the deterministic models used by FIR and IIR Filter approaches do not include an evaluation of the measurement uncertainty, but need an additional Monte Carlo simulation.

A Monte Carlo simulation was carried out for the model used by the Deconvolution Kalman Filter to obtain a time-resolved estimate of the uncertainty at each sampling point. This Monte Carlo simulation showed that the uncertainty in dynamic thrust measurements is greatly influenced by transients in the thrust input signal. To the knowledge of the author, the uncertainty caused by the transients in dynamic thrust measurements has so far not been considered in the design of pulsed rocket engines. The analysis performed in this thesis shows that the uncertainty is tripled immediately after the thrust is turned on or off. Hence, a fast PMF results in a significantly higher uncertainty level overall. The uncertainty could be reduced by increasing the turn on and turn off times of the thruster. As this requires a change in the valves of the rocket engine, it is difficult to achieve. Nonetheless, the results obtained by the uncertainty analysis can be taken into account to improve the PMF accuracy of thrusters. When defining how a thrust level is established, combinations which result in high uncertainty can be avoided.

Richard B.H. Ahlfeld Master of Science Thesis 6-1 Further Research Possibilities 133

6-1 Further Research Possibilities

Improvement of System Identification: Nonlinear Modal Analysis

The entire analysis performed in this thesis was based on the assumption that the thrust stand can be modelled as a Linear Time-Invariant system. While it could be shown that this assumption is legitimate, further research could investigate to what extent the accuracy can be improved by including dynamic nonlinearities into the model. Ren [15] developed a very promising recursive nonlinear method, which can accurately describe the frequency response of system modes up to 2500Hz, as shown in Figure 6-1.

Figure 6-1: The theoretical model built by Ren with a nonlinear modal analysis is accurate enough to replace the actual frequency response [15].

A similar approach could be used to reduce the system identification error and the uncer- tainty caused by it. However, a better fit to the frequency response is no guarantee that the deconvolution filter will perform more accurately, as shown in Section 3-5-3 of this thesis. This problem would need to be addressed before implementing Ren’s method.

Improvement of Low-Pass Filter: Gaussian Filter

A low-pass filter designed especially for the purpose of complementing deconvolution filters for dynamic thrust measurements still has to be found. Not only the Deconvolution Kalman Filter, but all FIR and IIR filtering methods could be improved with a low-pass filter with uniform time delay, abrupt cut-off, no pass-band ripples, no overshoot, no phase distortion and, most importantly, short rise and fall times. One promising method is the Gaussian filter. It produces no overshoot for a step function input and minimises the rise and fall time.

Improvement of Deconvolution Kalman Filter

The Kalman Filter can only be optimal, if the process and measurement noise covariance matrices Q and R are predicted absolutely correctly. Although the heuristic and rational

Master of Science Thesis Richard B.H. Ahlfeld 134 Conclusion choices suggested in this thesis were shown to produce only small errors, the exact values for Q and R could not be determined. Among the automatic methods to estimate the covariance matrices Q and R, the ALS method is the most promising approach. Nevertheless, many researchers have made similar experiences as in this thesis: the obtained estimates are not always reliable. Further research could focus on improving the reliability of the ALS method. Due to the popularity of the Kalman Filter, research in this direction is likely to find great appreciation by the Digital Signal Processing (DSP) community.

Alternative Methods: Bayesian Deconvolution, OUFIR Filters, Numerical Approach

Two other slight disadvantages of the Deconvolution Kalman Filter are its restricted appli- cability, as it can only be used for cases with white Gaussian noise, and its slightly higher computation time in comparison toIIR filters. These problems could be avoided by switching to different methods, which, however, might have disadvantages of their own. It could be seen throughout this thesis that it is difficult to determine to what extent noise is white Gaussian. This is a disadvantage, because the optimality of the Deconvolution Kalman Filter depends on the assumption that the noise is white Gaussian. Different probability distributions could be used by exchanging the Deconvolution Kalman Filter for the more general concept of Bayesian Deconvolution, which operates similarly to the Deconvolution Kalman Filter, but without the assumption of white Gaussian noise. The concept is not new and a considerable amount of research in this direction has already been done [77, 78]. However, Bayesian Deconvolution has not yet been applied to the dynamic rocket thrust measurement problem. Less ambitious, but similarly fruitful would be the application of an approach, which ignores the noise statics altogether. Attempts in this direction have been made by several researchers and were recently summarised by Shmaliy [10]. According to Shmaliy, Optimal Unbiased FIR (OUFIR) filters are better and more robust under real-world conditions with uncertainties and non-Gaussian noise than the Kalman Filter. While the Kalman Filter is more accurate in cases where the real noise covariance matrices are known exactly, OUFIR filters produce only slightly less accurate estimates and are significantly more robust, because their accuracy is not reduced by errors in the noise covariances, as illustrated by Figure 6-2.

Richard B.H. Ahlfeld Master of Science Thesis 6-1 Further Research Possibilities 135

Figure 6-2: Effect of errors in the noise covariances of Kalman Filter and OUFIR filter estimates [10].

A simple way to improve the computation time of the Deconvolution Kalman filter is the parallelisation of the method. If the initial conditions are determined either with the Riccati equation or in a short pre-run, the measurement signal can be divided into several sections, so that the Deconvolution Kalman Filter algorithm can be parallelised to some extent. Alterna- tively, it might be interesting to look at the problem from a completely different perspective using a purely numerical approach. For instance, a fast and parallelised solver for integral equations with convolution-type Kernel was proposed by Ye and Zhang [38]. Such approaches could provide a distinctive advantage in terms of computation time, but have not yet been rigorously compared to conventional deconvolution approaches applied in DSP.

Master of Science Thesis Richard B.H. Ahlfeld 136 Conclusion

Richard B.H. Ahlfeld Master of Science Thesis Bibliography

[1] ESA, “ISS orbit boosted by ATV Edoardo Amaldi.” online via ESA website http:// blogs.esa.int/promisse/2012/04/02/iss-orbit-boost-atv-31march/, Accessed: 19.08.2014.

[2] O. Bozic, “A test facility for rocket ignition.” online via DLR website: http://www.dlr.de/dlr/presse/en/desktopdefault.aspx/tabid-10172/213_ read-9357/year-all/gallery, Accessed: 19.08.2014.

[3] Astrium, “Bipropellant thrusters.” online via Astrium EADS website http: //cs.astrium.eads.net/sp/spacecraft-propulsion/bipropellant-thrusters/ index.html, Accessed: 19.08.2014.

[4] F. L. Crosswy and H. T. Kalb, “Investigation of dynamic thrust measurement tech- niques,” tech. rep., Arnold Engineering Development Center Inc., November 1967.

[5] B. R. Tartler, “Construction and performance of an inverted pendulum thrust balance.” Coursenotes Massachusetts Institute of Technology, 2010.

[6] T. Esward, C. Matthews, B. Hughes, J. Perez-Luna, C. Edwards, and D. Robinson, “System identification and uncertainty evaluation for dynamic force measurements at the micronewton level for space satellite applications,” in 7th International Workshop on Analysis of Dynamic Measurement, October 2012.

[7] C. Gao and B. Sun, “Investigation of the piezoelectric thrust test stand for rocket engine,” Science, Measurement Technology, IET, vol. 3, no. 6, pp. 395–402, 2009.

[8] L. Chen, M. Wang, J. Li, and H. Dai, “Digital compensators for dynamic thrust mea- surement,” in 8th IEEE International Conference on Control and Automation (ICCA), pp. 842–847, 2010. cited By (since 1996) 0.

[9] S. S. Bora, Y. Karuna, R. Dhuli, and B. Lall, “IIR deconvolution from noisy observations using kalman filtering,” in International Conference on Signal and Image Processing, 2010.

Master of Science Thesis Richard B.H. Ahlfeld 138 Bibliography

[10] Y. S. Shmaliy and D. Simon, “Iterative unbiased FIR state estimation: a review of algorithms,” EURASIP Journal on Advances in Signal Processing, vol. 113, pp. 1–16, 2013.

[11] S. Eichstädt, A. Link, C. Elster, and P. Harris, “Efficient implementation of a monte carlo method for uncertainty evaluation in dynamic measurements,” in 7th Workshop on the analysis of dynamic measurements, 2012.

[12] Interface, “SM S-type load cell (U.S. & metric).” Online on company web- site: http://www.interfaceforce.com/index.php?SM-S-Type-Load-Cell-U.S. -and-Metric-General-Purpose&mod=product&show=28, Accessed 19.08.2014.

[13] H. Ellerbrock, “10 n bi-propellant thruster reliable control of large spacecraft,” tech. rep., Astrium an EADS Company, 2012.

[14] J. W. Kamman, “Control systems.” Coursenotes University of Michigan, 2014.

[15] Z. Ren, B. Sun, J. Zhang, and M. Qian, “The dynamic model and acceleration com- pensation for the thrust measurement system of attitude/orbit rocket,” in 2008 Inter- national Workshop on Modelling, Simulation and Optimization, Key Lab. for Precision & Non-traditional Machining Technology of Ministry of Education, Dalian University of Technology, China, 2008.

[16] Q. Xing, J. Zhang, M. Qian, Z.-Y. Jia, and B.-Y. Sun, “Thrust stand for low-thrust liquid pulsed rocket engines,” Review of Scientific Instruments, vol. 81, pp. 95102 – 95107, September 2010. cited By (since 1996) 0.

[17] E. Cubbin, J. Ziemer, E. Choueiri, and R. Jahn, “Pulsed thrust measurements using laser interferometry,” Review of Scientific Instruments, vol. 68, no. 6, pp. 2339-2346, 1997. cited By (since 1996) 38.

[18] J. A. Sprouse and W. K. McGregor, “Investigations of thrust compensation methods,” tech. rep., ARNOLD Engineering Development Center, 1963.

[19] M. Saha, B. Goswami, and R. Ghosh, “Two novel costs for determining the tuning parameters of the kalman filter,” ArXiv e-prints, Oct. 2011.

[20] M. R. Rajamani and J. B. Rawlings, “Estimation of the disturbance structure from data using semidefinite programming and optimal weighting,” Automatica, vol. 45, no. 1, pp. 142 – 148, 2009.

[21] S. Eichstädt, Analysis of Dynamic Measurements - Evaluation of dynamic measurement uncertainty -. PhD thesis, Technische Universität Berlin, February 2012.

[22] T. E. Markusic, B. J. Stanojev, B. Dehoyos, K. Polzin, and B. Spaun, “Thrust stand for electric propulsion performance evaluation,” tech. rep., NASA-Marshall Space Flight Center, July 2004.

[23] R. J. Stephen, K. Rajanna, V. Dhar, K. G. K. Kumar, and S. Nagabushanam, “Strain gauge based thrust measurement system for a stationary plasma thruster,” Measurement Science and Technology, vol. 12, no. 9, p. 1568, 2001.

Richard B.H. Ahlfeld Master of Science Thesis 139

[24] M. G. S. de Aquino, S. E. de Lucena, and A. Caporalli-Filho, “A load cell for grain- propelled ballistic rocket thrust measurement,” in Instrumentation and Measurement Technology Conference, pp. 1767–1772, May 2005.

[25] G. X. Kunning and L. R. W. Mitchell, “High-power, null-type, inverted pendulum thrust stand,” Review of Scientific Instruments, vol. 80, p. 055103, 2009.

[26] S. Eichstädt, C. Elster, T. Esward, and J. Hessling, “Deconvolution filters for the analysis of dynamic measurement processes: a tutorial” Metrologia, vol. 47, pp. 522–533, 2010.

[27] C. Tricaud and Y. Chen, Optimal Mobile Sensing and Actuation Policies in Cyber- Physical Systems. Springer, 2012.

[28] H. Ahmadian, “Distributed-parameter systems: approximate methods.” Coursenotes Iran University of Science and Technology, 2004.

[29] V. Tkach, A. Milov, A. Loshkarev, and D. Merzljakov, “Testing the next generaton of rocket engines,” tech. rep., ANSYS, INC., 2013.

[30] B. C. Barber, “Wideband thrust and transient impulse measurement of electrothermal gasdynamic and pulsed plasma thrusters,” in AIAA 10th Electric Propulsion Conference, 1973.

[31] J. Buchholz, R. Clark, and A. Smits, “Thrust performance of unsteady propulsors using a novel measurement system, and corresponding wake patterns,” Experiments in Fluids, vol. 45, no. 3, pp. 461–472, 2008.

[32] T. W. Haag, “Thrust stand for high power electric propulsion devices,” Rev. Sci. In- strum., vol. 62, p. 1186, 1991.

[33] Piezotronics, “Dynamic force and strain sensors,” tech. rep., PCB Inc., 3425 Walden Avenue, Depew, NY 14043, 2006.

[34] T. Kleckers, “Force sensors based on strain gages and piezoelectric crystal-based force transducers in mechatronic systems - a comparison,” tech. rep., Hottinger Baldwin Messtechnik GmbH, 2011.

[35] T. Kleckers, “Spoilt for choice: piezoelectric or strain gauge based force transducers?,” tech. rep., Hottinger Baldwin Messtechnik GmbH, 2011.

[36] S. M. Riad, “The deconvolution problem: an overview,” Proceedings of the IEEE, vol. 74, pp. 82 – 85, 1986.

[37] S. Eichstädt, “Fredholm integral equations of the first kind.” Personal Communication, November 2013.

[38] W. Ye and Y. Zhang, “A fast solver for integral equations with convolution-type kernel,” Advanced Computational Mathematics, vol. 39, pp. 45–67, 2013.

[39] S. W. Smith, The Scientist and Engineer’s Guide to Digital Signal Processing. Bertrams, 1997.

Master of Science Thesis Richard B.H. Ahlfeld 140 Bibliography

[40] K. Maleknejad, N. Aghazadeh, and R. Mollapourasl, “Numerical solution of fredholm integral equation of the first kind with collocation method and estimation of error bound,” Applied Mathematics and Computation, vol. 179, no. 1, pp. 352 – 359, 2006.

[41] A. N. Tikhonov and V. Y. Arsenirl, Solution of Ill-Posed Problems. New York: Halsted, 1977.

[42] H. Hindin, “Impulse response and transfer phase of transitional butterworth-thompson filters,” Circuit Theory, IEEE Transactions on, vol. 15, pp. 471–474, Dec 1968.

[43] P. J. Parker and R. P. Bitmead, “Approximation of stable and unstable systems via frequency response interpolation,” in Automatic Control: Proc. 10th Triennial World Congress of IFAC (Munich, Germany), pp. 357–62, 1987.

[44] B. Beliczynski, I. Kale, and G. Cain, “Approximation of FIR by IIR digital filters: an algorithm based on balanced model reduction,” Signal Processing, IEEE Transactions on, vol. 40, pp. 532–542, Mar 1992.

[45] F. J. Fabozzi, S. M. Focardi, S. T. Rachev, and B. G. Arshanapalli, The Basics of Fi- nancial Econometrics: Tools, Concepts, and Asset Management Applications. Hoboken, NJ, USA: John Wiley & Sons, Inc., 2014.

[46] R. Vuerinckx, Y. Rolain, J. Schoukens, and R. Pintelon, “Design of stable IIR filters in the complex domain by automatic delay selection,” IEEE Trans. Signal Proc., vol. 44, p. 2339Ű44, 1996.

[47] A. V. Oppenheim and R. W. Schafer, Discrete-Time Signal Processing. Englewood Cliffs, NJ: Prentice-Hall, 2nd edition ed., 1989.

[48] J. Hessling, “A novel method of dynamic correction in the time domain,” Meas. Sci. Technol., vol. 19, pp. 75–101, 2008.

[49] T. Kailath, Lectures on Wiener and Kalman Filtering (Vienna: Springer). Springer, 1981.

[50] R. Pintelon, Y. Rolain, M. Bossche, and J. Schoukens, “Towards an ideal data acquisition channel,” IEEE Transactions on Instrumentation and Measurement, vol. 39, pp. 116 – 120, 1990.

[51] R. Pintelon and J. Renneboog, “Phase correction via the maximum likelihood method,” IFAC Symp. on Identification and System Parameter Estimation, vol. 2, pp. 878–883, 1988.

[52] R. Pintelon, Analysis and application of a maximum likelihood estimator for linear sys- tems. PhD thesis, Vrije Univ. Brussel. Dep. ELEC. Belgium, 1988.

[53] R. E. Kalman, “A new approach to linear filtering and prediction problems,” Journal of Basic Engineering, vol. 82, pp. 35–45, 1960.

[54] Y. Haddab, Q. Chen, and P. Lutz, “Improvement of strain gauges micro-forces measure- ment using kalman optimal filtering,” Mechatronics, vol. 19, pp. 457–462, June 2009.

Richard B.H. Ahlfeld Master of Science Thesis 141

[55] A. Sayman, “Application of kalman filter to synthetic seismic traces,” Jeofízík, vol. 6, pp. 67–75, 1992.

[56] T. Rotunno, F. Palmisanol, G. Tiravanti, and G. Zambonin, “Kalman filter deconvolution after cubic splines background removal,” Chromatographia, vol. 29, pp. 269–274, 1990.

[57] P. Rousseaux and J. Trochet, “Deconvolution of time-varying systems by kalman filtering: its application to the computation of the active state in the muscle,” Signal Processing, vol. 10, pp. 291–301, 1986.

[58] N. S. Nise, Control Systems Engineering. John Wiley & Sons, Inc., 6th ed., 2010.

[59] G. Welch and G. Bishop, An Introduction to the Kalman Filter. PhD thesis, University of North Carolina, 1997.

[60] N. Wiener, “The extrapolation, interpolation and smoothing of stationary time series,” tech. rep., John Wiley & Sons, Inc., New York, 1949.

[61] C. D. Visser, “Modern system identification of aerospace vehicles.” Coursenotes Delft University of Technology, 2014.

[62] G. A. Kyriazis, M. A. Martins, and R. A. Kalid, “Bayesian recursive estimation of linear dynamic system states from measurement information,” Measurement, vol. 45, no. 6, pp. 1558 – 1563, 2012.

[63] M. Ananthasayanam, A. Sarkar, and S. Vathsal, “Improved adaptive estimation of noise covariances in design of trajectory tracking filter,” tech. rep., American Institute of Aero- nautics and Astronautics, 2002.

[64] J. van den Berg, “Kalman filtering.” Coursenotes in Automation, University of California, Berkeley.

[65] O. Korniyenko, M. Sharawi, and D. Aloi, “Neural network based approach for tuning kalman filter,” in Electro Information Technology, 2005 IEEE International Conference on, pp. 1–5, May 2005.

[66] J. Rosendo, A. Bachiller, and A. Gomez, “Application of self-tuned kalman filters to control of active power filters,” in Power Tech, 2007 IEEE Lausanne, pp. 1262–1265, July 2007.

[67] T. D. Powell, “Automated tuning of an extended kalman filter using the downhill simplex algorithm,” Journal of Guidance, Control, and Dynamics, vol. 25, pp. 901 – 908, 2002.

[68] S. Eichstädt, A. Link, P. Harris, and C. Elster, “Efficient implementation of a monte carlo method for uncertainty evaluation in dynamic measurements,” Metrologia, vol. 49, no. 3, p. 401, 2012.

[69] R. Sutton and A. Barto, Monte Carlo Methods. MIT Press, 1998.

[70] C. Gao and B. Sun, “Investigation of the piezoelectric thrust test stand for rocket engine,” IET Science, Measurement and Technology, vol. 3, pp. 395–402, 2008.

Master of Science Thesis Richard B.H. Ahlfeld 142 Bibliography

[71] T. W. Parks and C. S. Burrus, Digital Filter Design. New York: Wiley and Sons, Inc., 1987.

[72] S. Eichstädt, “Efficient implementation of dynamic monte carlo method.” Online on PTM website: http://www.ptb.de/cms/en/fachabteilungen/abt8/fb-84/ag-842/ dynamischemessungen-842/download.html, Accessed: 19.08.2014.

[73] N. S. Nise, Control Systems Engineering. Hoboken, NJ, 2004.

[74] M. R. Rajamani, Data-based Techniques to Improve State Estimation in Model Predictive Control. PhD thesis, University of Wisconsin-Madison, 2007.

[75] B. M. Åkesson, J. B. Jørgensen, N. K. Poulsen, and S. B. Jørgensen, “A tool for kalman filter tuning,” in 17th European Symposium on Computer Aided Process Engineering (V. Plesu and P. S. Agachi, eds.), vol. 24 of Computer Aided Chemical Engineering, pp. 859 – 864, Elsevier, 2007.

[76] R. Johnson and D. Wichern, Applied Multivariate Statistical Analysis. Prentice Hall, New York., 6th ed., 2007. Conditional Distributions.

[77] G. L. Bretthorst, “Bayesian interpolation and deconvolution,” tech. rep., The Advanced Sensor Directorate Research, 1992.

[78] C. Andrieu, E. Barat, and A. Doucet, “Bayesian deconvolution of noisy filtered point processes,” Signal Processing, IEEE Transactions on, vol. 49, pp. 134–146, Jan 2001.

Richard B.H. Ahlfeld Master of Science Thesis Glossary

List of Acronyms

AEDC Arnold Engineering Development Center

ALS Autocovariance Least Squares

AR Autoregressive

ARMA Autoregressive-Moving Average

ATV Automated Transfer Vehicle

DSP Digital Signal Processing

FIR Finite Impulse Response

IIR Infinite Impulse Response

LTI Linear Time-Invariant

MA Moving Average

MSD Mass-Spring-Damper

NRMS Normalised Root Mean Square

PMF Pulse Mode Firing

RMS Root Mean Square

SOS Second Order System

SSF Steady-State Firing

TDMS Technical Data Management System

TMB Thrust Measurement Bridge

Master of Science Thesis Richard B.H. Ahlfeld