# Perform Accelerated Life Testing Data Analysis with Stress Profiles 10

If you have ALTA PRO, you can use the Synthesis API to analyze an ALTA data set with time-dependent stress profiles. In this tutorial, you will learn how to define stress profiles, analyze an ALTA data set, and obtain analysis results from the model.

Note that this tutorial is for demonstration purposes only; it doesn't take efficiency into account and doesn't include any exception handling.

## Tutorial: Accelerated Life Testing Data Analysis - Stress Profiles

This example demonstrates how to use the Synthesis API to analyze an ALTA data set with a single stress profile and obtain an estimate of the B1 life (i.e., time at which reliability is equal to 99%). A discussion of the example follows. The VBA version of the code sample is available here.

The data sets used in this example are:

 Start End Stress 0 200 125 200 300 175 300 350 200 350 375 250
 Number in State State Time to F or S 1 F 252 1 F 280 1 F 320 1 S 328 1 F 335 1 F 354 1 F 361 1 F 362 1 F 368 3 S 375
VB.NET

Imports SynthesisAPI

Module Module1
Sub Main()

'Declare a new stress profile and define its segments.
Dim sp As New ALTAStressProfile
sp.RepeatCycle = False

'Assign the stress profile to the data set.

'The stress profile uses the logarithmic (power LSR) stress transformation
'and has a use stress level = 100.

'Add the failure times to the data set.

'Add the suspensions to the data set.

'Use the cumulative damage - Weibull model to analyze the data set.
'Keep all other analysis settings at default.

'Analyze the data set.

'Calculate the B1 life and display the result.
Dim r As Double
MsgBox("B1 Life: " & r)

End Sub
End Module


### Discussion

The ALTAStressProfile class represents a time-dependent stress profile. In this example, the stresses are increased in a stepwise fashion. The RepeatCycle property is set to False, indicating that all times after the last segment will use the stress value defined in the last segment.

 'Declare a new stress profile and define its segments.
Dim sp As New ALTAStressProfile
sp.RepeatCycle = False


Next, create an ALTA data set by declaring a new ALTADataSet object, and then using the AddStressProfile method to associate the stress profile with the object.

 'Declare a new ALTADataSet object.

'Assign the stress profile to the data set.


Use the AddStressDefinition method to define the name, stress transformation and use stress level of the stress profile.

 'The stress profile uses the logarithmic (power LSR) stress transformation
'and has a use stress level = 100.


The data set can contain failures, suspensions or interval data. The following example shows how to use the AddFailure method and AddSuspension method to add the stress profile to the data points.

 'Add the failure times to the data set.

'Add the suspensions to the data set.


The AnalysisSetting property stores a reference to the ALTAAnalysisOptions object, which represents the analysis settings of the data set. In this example, we use the property to change some of the attributes of the object.

 'Use the cumulative damage - Weibull model to analyze the data set.
'Keep all other analysis settings at default.


Use the Calculate method to analyze the data set.

 'Analyze the data set.


The FittedModel property gets the cModel object that represents the fitted model of the analysis. From the model, you can calculate useful metrics such as reliability, failure rate, mean time, etc. In this example, we use the cModel.Time method to calculate for the B1 life.

 'Calculate the B1 life and display the result.
Dim r As Double
MsgBox("B1 Life: " & r)


## Notes

For analyses that require multiple stress profiles, the number of stress definitions must be equal to the number of stress profiles used in the analysis. For example:

 'Define two stress profiles.
Dim SP1 As New ALTAStressProfile
Dim SP2 As New ALTAStressProfile
...

'Assign the stress profiles to a data set.