SVDD Procedure

Example 34.1 Analysis of Aircraft Engine Degradation

Sun and Tsung (2003) introduced an SVDD-based K-chart, which is a nonparametric multivariate control chart that is used for statistical process control and can also be used for monitoring equipment health and operating data. A K-chart is implemented in two phases: In phase I, observations from normal operations of the process are collected and are used to train a SVDD model and obtain the threshold value. This model of normal operations is then operationalized in phase II for process or equipment monitoring. For each new observation z, its distance value is computed and compared to the threshold value. Observations for which generally indicate something abnormal in the process.

This example uses a K-chart to illustrate the analysis of aircraft engine degradation and uses data from Saxena et al. (2008); Saxena and Goebel (2008). The data that are used in this example consist of the flight history of 15 engines. For each flight, three variables are related to the engine’s operating conditions and 21 variables are for sensor measurements. Because each engine degrades at a different rate, the number of flights until the end of life is different for each engine.

The following code creates a phase I (normal operations) data set (the engine data set in the Work library) by selecting the first 25% of observations of a random sample of five engines. The analysis assumes that the first 25% of observations represent normal operations of the aircraft engine.


data engine;
   input Engine cycle x1-x24;
   datalines;

   ... more lines ...   

The following statements creates a subset of work.engine by selecting the first 25% of observations that belong to five randomly selected engines:

data eid(keep=engine);
   set engine;
   by engine;
   if first.engine then output;
run;
data reid;
   retain nleft 5;
   set eid nobs=n;
   r = ranuni(1994);
   if r <= nleft/n then do;
      nleft = nleft - 1;
      output;
   end;
   n = n - 1;
run;
 %macro a;
data _null_;
   set reid;
   call symput('e'||left(_n_), engine);
run;
 %do i=1 %to 5;
    %if &i=1 %then %do;
       %let st=&&e&i;
   %end;
   %else %do;
       %let st=&st &&e&i;
   %end;
 %end;
data eid_cy;
   set engine;
   by engine ;
   if engine in (&st) and last.engine=1 then output;
run;
data eid_cy;
   set eid_cy;
   ds1=floor(0.25*cycle);
run;
	/* The following DATA steps create the training data set */
data train;
   set engine;
   if engine in (&st) then output;
run;
data train;
   merge train(in=a) eid_cy(in=b);
   by engine;
   if a=b;
run;
data train;
   set train (where=(cycle le ds1));
run;
/* The following DATA step creates the scoring data set. The scoring data set
contains flight data for all engines, which were not part of the training data set */
data score;
   set engine;
   if engine not in (&st)  then output;
run;
 %mend a;
 %a

You can load the work.train data set into your SAS session by specifying your SAS libref in the first statement in the following DATA step. These statements assume that your SAS libref is named mylib, as in the section Using SAS Viya Workbench, but you can substitute any appropriately defined SAS libref.

data mylib.train;
   set train;
run;

You can load the work.score data set into your SAS session by specifying your SAS libref in the first statement in the following DATA step:

data mylib.score;
   set score;
run;

The following statements execute the SVDD algorithm on the mylib.train data table and produce Output 34.1.1 through Output 34.1.2.

 proc svdd data=mylib.train;
    id engine cycle;
    input x1-x24/level=interval;
    kernel rbf / bw=94;
    savestate rstore=mylib.state;
 run;

The INPUT statement defines 24 input variables (x1–x24) as interval variables. The KERNEL statement specifies the radial basis function as the kernel function and specifies a value of 94 for the bandwidth parameter. The SAVESTATE statement creates an analytic store for the model and saves it as a binary object in the mylib.state data table. You can use the analytic store later in the ASTORE procedure to score new data. The "Model Information" table in Output 34.1.1 summarizes the key options and input data variables.

Output 34.1.1: Aircraft Engine Degradation Analysis Model Information

Model Information
Optimization MethodActive Set
Kernel TypeRBF
RBF Kernel Bandwidth94
Bandwidth Selection MethodUser specified
Bandwidth Relative Scale0.797583926
Expected Outlier Fraction1E-6
Optimization Tolerance0.0001
Number of Interval Variables24
Number of Nominal Variables0


The "Training Results" table in Output 34.1.2 shows the number of support vectors and the threshold value.

Output 34.1.2: Aircraft Engine Degradation Analysis Training Results

Training Results
Number of Support Vectors13
Number of Support Vectors on Boundary13
Number of Dropped Observations0
Threshold R Square Value0.80366
Constant (C_r) Value0.19634
Run Time (seconds)0.00411


Output 34.1.3 displays the number of observations in the training data set.

Output 34.1.3: Aircraft Engine Degradation Analysis Training Observations

Number of Observations Read225
Number of Observations Used225


The "Optimization Summary" table in Output 34.1.4 shows whether the solution is optimal, the number of iterations that were required and the objective function value.

Output 34.1.4: Aircraft Engine Degradation Analysis Optimization Summary

Optimization Summary
Number of Iterations1
Objective Value0.1963442117
Infeasibility6.019851E-12
Optimization StatusOptimal
DegenerateNo


The following PROC ASTORE code scores the mylib.score data, which contain the entire flight history for 10 engines. In the context of K-charts, this scoring constitutes the phase II analysis, where new observations are scored to infer any departure from the normal operations.

 proc astore;
    score data=mylib.score
    out=mylib.test_out
    rstore=mylib.state;
 quit;

Output 34.1.5 shows the scoring results for Engine 6. The plot indicates the value that is plotted on the Y axis against the flight or cycle number on the X axis. The blue line indicates the value, and the red line indicates a moving average that is computed using five observations. The horizontal reference line indicates the threshold value of 0.80378 that was obtained from training, which also acts as an upper control limit (UCL) for the value. The vertical reference line indicates the last cycle (flight) of the first engine. Output 34.1.5 shows that the value serves as a good proxy for engine degradation.

Output 34.1.5: Scoring Results Scatter Plot

Scoring Results Scatter Plot


.

Last updated: September 23, 2026