Compressor map approximation using Chebyshev polynomials

Compressor maps are one of the main elements describing the behaviour of centrifugal compressors. Although the compressor map is often provided by the manufacturer, there may be changes during the lifetime of the compressor due to refurbishments or wear. Since the compressor maps are often used in real-time optimization problems, there is a need for simple approximation methods. This paper focuses on approximation of physical models using Chebyshev polynomials instead of third order polynomials which are unable to capture some aspects of the compressor behaviour. Chebyshev polynomials capture the characteristics better than third order polynomials. They provide a flexible tool for compressor map approximation and analysis.

may also be reconstructed from operating data. A typical use for a compressor map is within a real-time optimization framework [3] where there is a need to be able to perform calculations on the map in real-time. For this purpose, a lookup table or other simple approximation is of great value. This paper considers the use of Chebyshev polynomials for approximation of the map. A meta-modelling approach is presented where the polynomials are fitted to data generated from a first principles model.
A compressor map is a graphical depiction of the pressure versus mass flow rate characteristic of the compressor over a range of compressor speeds. Calculating the characteristics of a compressor using physical modelling is based on the assumption that the compressor system can be modelled as an isentropic process in series with an isobaric process including entropy increase [6]. This approach takes into account various losses inside the compressor (see [7], [6], [8]). However, physical modelling requires detailed knowledge about the geometry of the compression unit which is not always available. A data driven approach overcomes this difficulty and to create a model of the process using polynomial approximation. This approach is mainly based on classical polynomials proposed by [9] in which they were applied for analysis of transient states in a compressor and further exploited in [10], who developed a piecewise continuous polynomial approximation. The compressor map is approximated with second order polynomial for negative mass flow and quadratic or third order polynomial otherwise. In [11], the authors investigated spline approximation combined with physical modelling. However, most authors use a single third order (cubic) polynomial [6]. In [12] the approximation using third order polynomials was successfully used for controller design for a compressor. However, this approach is unable to capture some aspects of the compressor behaviour and to preserve the shape of the characteristics. The main contribution of this work is a new method of approximation of compressor maps based on Chebyshev polynomials.
The paper is organised as follows. The first section introduces the compressor map calculation derived from first principles. The next two parts present approximation methods using third order and Chebyshev polynomials. Then the efficacy of both methods is described as the number of measurements varies. The paper ends with discussion of depicted results and suggestions for future work.

II. COMPRESSOR MAP
A compressor map captures the relationship between the pressure rise inside the compressor as a function of the mass flow m and compressor rotational velocity N . In this article, the compressor described in [8] was used. The compressor map for this unit can be found in Figure 1 and is described with the equation (1) where the pressure rise for positive mass flow in a compressor is modelled as where p 2 -pressure downstream of a compressor, p 01 -inlet pressure, T 01 -inlet temperature, c p -specific heat capacity, κ -specific heat ratio. The parameter c n defines the slope for the negative mass flow rate side of the characteristics and is estimated from experimental data [13].
The isentropic efficiency of a compressor is defined as where Δh 0c,ideal -total specific enthalpy delivered to the gas and Δh loss = Δh ii + Δh if + Δh di + Δh df -sum of friction (subscript f ) and incidence (second subscript i) losses in the impeller (first subscript i) and diffuser (subscript d).
The full characteristics of the compressor calculated according to [8] are in Figure 1. As can be seen, this approach gives a realistic depiction of a compressor map.

III. COMPRESSOR MAP APPROXIMATION
Since the model in form (1) requires detailed knowledge of the geometry of the compressor, it might not be possible to use it. The data-driven modelling based on polynomial approximation is another approach which can be used for drawing a compressor map. Table I presents the comparison between physical modelling and polynomial approximation. Although a physical model is more accurate and gives better insight to the behaviour of the compressor, it requires a detailed knowledge about the parameters of the compression unit. Polynomial approximation methods overcome this requirement at the expense of accuracy.
The numerical data for this section was taken from the physical model calculated in [8] and described  in Section II. Since the data for approximation come from a continuous physical model, it is assumed that the measurements can be done for N ranging from 25000 rpm to 55000 rpm, and for any mass flow from the interval [−0.2, 0.8]. Two datasets of measurements were considered for each rotational velocity: • Five measurements. According to [6], five measurements distributed across the range of mass flow rates should be enough to capture the behaviour of a compressor. • Twenty measurements. For the flat curves which occur for N ∈ {20000, 25000} ( Fig. 1), five measurements do not preserve the desired shape. The results were compared using two indicators: • Approximation error e k , where where k is an index denoting the types of approximating polynomials, third order and Chebyshev, respectively. The formula used for calculation is where (m i , N j ) are the points where measurements Ψ(m i , N j ) were taken from physical model, Ψ k is the calculated characteristics, i = 1, . . . , 5 or i = 1, . . . , 20, and j = 1, . . . , 5. • Shape indicator defined as linear interpolation between maximum value of the characteristics calculated for positive mass flow for each rotational velocity. The purpose of the shape indicator is to give a visual indication of how well the approximations match the compressor map in Fig.1. This pressure versus mass flow lines all have a peak for some non-zero mass flow rate, and the shape indicator joins the peaks. The shape indicator for a good approximation should broadly match the dashed red line which is shown in Fig. 1. It is worth noting that the shape indicator is close to the theoretical surge line defined as the line connecting the peaks on the characteristics of the compressor [8]. Unsteady oscillations of mass flow and pressure during surge can be dangerous for the equipment; hence the importance of antisurge protection which often uses approximated compressor maps. Nevertheless, the practical surge line might not coincide with theoretical results.

A. Third order polynomial approximation
This section examines the construction of compressor characteristics by means of third order polynomials using the method recommended in [6], in order to provide a baseline comparison with the Chebyshev polynomial approximation. The algorithm is as follows: 1) For each rotational velocity N find at least four values of pressure. 2) Find an approximation in form of third order polynomial as function of mass flow. 3) Take the coefficients of the approximating polynomials for a given power of mass and find an approximation as function of rotational speed. The last step ensures that the characteristics are continuous with respect not only to mass flow, but also to the rotational speed N . The resulting characteristics have the form The parameters c ij , i, j = 0, 1, 2, 3, were found through least squares optimization. 1) Approximation of five measurements: According to [6], it is sufficient to take five data points for each rotational velocity N in order to obtain an accurate approximation. They are depicted in Figure 2b.
The polynomials (7) are ( Fig. 2a):   Figure 2b shows that the fitted curves fail to capture several of the maxima in the pressure versus flow curves that are expected for positive mass flow rates.
2) Approximation of 20 measurements: The second approach used 20 points in order to find the approximation.They are depicted in Figure 3b.
The resulting compressor map can be found in Figure  3b. Even though the data points used for approximation defined the shape of expected curves, the shape indicator line in Fig. 3b shows that the approximation did not preserve it. The curves were flattened by the approximation and the maxima for most of the rotational velocities are shifted to m = 0.

B. Chebyshev polynomials approximation
This section compares the approach using third order polynomials illustrated above with an approximation using Chebyshev polynomials. It was based on 'chebfun' package, an open-source Matlab toolbox developed by researchers from Oxford University [14]. It was primarily designed for univariate functions analysis and then extended to two variables. The two-dimensional version is described by formula (11) from [14], [15] f (x, y) ≈ p M (x, y) = The algorithm proposed in [15] adjusts the values of a ij (M ) so that predicted values of p M (x i , y j ), i = 0, . . . , r − 1, j = 1, . . . , n−1 are close in a least squares sense to the measured values f (x i , y j ). The parameter M is called the rank of approximation and describes the number of terms used to calculate the coefficients a ij (M ) on the right hand side of (11) [15]. M can take values between 1 and min{r, n}.
Applied to modelling of a compressor map, the variables x i and y j will be mass flow m i and rotational velocity N j which can be measured. The values f (x i , y j ) denote in this case the pressure ratio. The parameters r and n are the numbers of data points available. There are two assumptions about (x i , y j ) which must be taken into account. The formula (11) assumes that (x i , y j ) ∈ [−1, 1] 2 and x i = cos iπ r , y j = cos jπ n . Therefore, the measurement must be taken according to these two formulas. Moreover, it is necessary to provide a linear scaling for mass flow and rotational velocity: The parameters r and n used for approximation depend on the number of measurements and are gathered in Table II.

1) Approximation of five measurements:
The first approach used five data points. The resulting compressor map is shown in Figure 4.   The coefficients of the approximation a ij form a 5 × 5 matrix (transposed in order to enable easier comparison with approximation of 20 measurements): (13) The shape indicator can be divided in two parts. For small rotational velocities, N < 30000 rpm, the curves are flat and do not resemble the characteristics in Fig. 1. However, for N > 30000 rpm, the approximation preserved the shape of the curves and the shape indicator looks similar to the reference curve in Fig. 1.
2) Approximation of 20 measurements: The resulting compressor map for 20 data points is shown in Figure 5.   The coefficients of the approximation a ij form a 5 × 20 matrix (transposed due to space requirements): The shape indicator in Fig. 5 shows that Chebyshev polynomials preserved the shape of the characteristics for the whole range of rotational velocities. In comparison to the reference characteristics in Fig. 1, it is shifted to the left, but, nevertheless, it suggests that approximation using Chebyshev polynomials is more accurate than using third order polynomials.

IV. DISCUSSION
The Table III presents the approximation error for the third order and Chebyshev polynomials. The Chebyshev polynomials give smaller errors, especially in case of five data points approximation where there is a difference of one order of magnitude. The Figures  2b and 5 confirm that they give more accurate results. Chebyshev polynomials preserve the shape of the curves both for positive and negative mass flow, whereas the characteristics resulting from third order polynomials approximation is flatter than expected, especially for positive mass flow. This phenomenon can be observed both for five and 20 measurements. For 20 data points both methods have similar error values, but analysis of the figures suggests that Chebyshev polynomials provide a more accurate approximation.
The analysis of the formulas (9) and (10) shows that third order polynomials give similar results for both five and 20 measurements. The shape indicators in both cases do not coincide with the baseline curve from Fig. 1. It suggests that the approximation algorithm is not very sensitive to the number of measurements. However, the comparison of approximation error from Table III indicates that the results obtained for five measurements are better since the approximation error for 20 measurements is larger than for five data points.
An analogous comparison is done for Chebyshev approximation with matrices given by (13) and (14). The analysis of the matrices and the approximation error suggests that this approximation method exhibits properties similar to the third order polynomials approximation. Nonetheless, Figures  4 and 5 show that the Chebyshev approximation is more sensitive to the number of measurements. Even though the approximation error is larger for 20 measurements, the shape indicator for 20 measurements is closer to the baseline curve than the indicator from Fig. 4.
The computational complexity of both methods is also worth considering. The third order polynomial approximation consists in principle of two separate least-square polynomial curve fitting algorithms: the first one with respect to mass flow, the second one with respect to rotational speed. The complexity of each step is given by O(C 2 K) where Cnumber of parameters, K -number of measurements [16]. In this case, C = 4 since third order polynomials are used in both algorithms, K = 5 for five measurements and K = 20 for 20 measurements. Chebyshev polynomial approximation has the complexity of form O(M (r log r + n log n)) [15]. Here M = 2 -internal parameter of chebfun package, and r and n are given in Table II. Table IV presents the  comparison of both methods. There are significant differences between the two approaches. The approximation using third order polynomials is more computationally expensive than Chebyshev polynomials for both five and 20 measurements. The number of operations required to approximate 20 measurements using third order polynomials combined with insufficient shape preservation suggests that increasing the number of measurements is not necessary in this method; five data points are sufficient, as suggested in [6]. Chebyshev polynomials based approximation, even though sensitive to the number of measurements, is less computationally expensive. Both methods can be used directly in Matlab software; the chebfun package required for approximation with Chebyshev polynomials is available on the authors' website [14]. Table V gathers the advantages and disadvantages of both approaches.

V. CONCLUSION
The compressor map is an important element in the analysis of a compression system. Often provided by the manufacturer of the compressor, it can change during the lifetime of the system. Since real-time optimization is one of the main applications of a compressor map, there is a need to provide a simple method which will perform the calculations in realtime. One of the solutions is to use third order polynomial approximation approach. However, this method does not preserve some of the features of the compressor map. This paper applies the polynomial approximation based on Chebyshev polynomials to reconstruct the map created with first principles approach.
The approximation using Chebyshev polynomials captures all the important aspects of compressor behaviour. Moreover, the comparison shows that Chebyshev polynomials allow the map to be reconstructed accurately from fewer points than third order polynomials. This can be useful when using experimental data since there may only be a few operating points available for the calculations. As suggested by one of the reviewers, the method will be also useful when dealing with compressor instability, as well as with the optimization of the working point of the compressor itself because it improves the accuracy.
Nevertheless, the validation of approximation using Chebyshev polynomials on experimental data is a matter for future research; it will also take into account the efficiency maps. Further works include also its application in dynamic modelling of a compressor train.