Perform Accelerated Life Testing Data Analysis with Stress Profiles: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 60: Line 60:
     {{APIPrefix|Sub}} Main()
     {{APIPrefix|Sub}} Main()
    
    
   {{APIComment|'Declare a new stress profile and define its segments.}}  
   {{APIComment|'Declare a new stress profile and define its properties.}}  
     {{APIPrefix|Dim}} sp {{APIPrefix|As New}} ALTAStressProfile
     {{APIPrefix|Dim}} myProfile {{APIPrefix|As New}} cProfile ({{APIString|"stressProfile"}})
     sp.AddSegment(200, 125)
     myProfile.ProfileType = ProfileTypeEnum.Stress
    sp.AddSegment(300, 175)
    myProfile.IsCyclical = False
    sp.AddSegment(350, 200)
    sp.AddSegment(375, 250)
  {{APIComment|'Define four segments for the stress profile.}}
     sp.RepeatCycle = False
    {{APIPrefix|Dim}} listofsegments() {{APIPrefix|As}} ProfileSegment = {
      {{APIPrefix|New}} ProfileSegment {{APIPrefix|With}} {.SegmentEnd = 200, .Value = 124},
      {{APIPrefix|New}} ProfileSegment {{APIPrefix|With}} {.SegmentEnd = 300, .Value = 175},
      {{APIPrefix|New}} ProfileSegment {{APIPrefix|With}} {.SegmentEnd = 350, .Value = 200},
      {{APIPrefix|New}} ProfileSegment {{APIPrefix|With}} {.SegmentEnd = 375, .Value = 250}
      }
  {{APIComment|'Add the segments to the stress profile.}}
     myProfile.SetSegments(listofsegments)
   
   
   {{APIComment|'Declare a new ALTADataSet object.}}  
   {{APIComment|'Declare a new ALTADataSet object.}}  
Line 72: Line 80:
   
   
   {{APIComment|'Assign the stress profile to the data set.}}  
   {{APIComment|'Assign the stress profile to the data set.}}  
     ADS.AddStressProfile(sp)
     ADS.AddStressProfile(myProfile)
   
   
   {{APIComment|'The stress profile uses the logarithmic (power LSR) stress transformation}}
   {{APIComment|'The stress profile uses the logarithmic (power LSR) stress transformation}}
Line 79: Line 87:
    
    
   {{APIComment|'Add the failure times to the data set.}}
   {{APIComment|'Add the failure times to the data set.}}
     ADS.AddFailure(252, 1, sp)
     ADS.AddFailure(252, 1, myProfile)
     ADS.AddFailure(280, 1, sp)
     ADS.AddFailure(280, 1, myProfile)
     ADS.AddFailure(320, 1, sp)
     ADS.AddFailure(320, 1, myProfile)
     ADS.AddFailure(335, 1, sp)
     ADS.AddFailure(335, 1, myProfile)
     ADS.AddFailure(354, 1, sp)
     ADS.AddFailure(354, 1, myProfile)
     ADS.AddFailure(361, 1, sp)
     ADS.AddFailure(361, 1, myProfile)
     ADS.AddFailure(362, 1, sp)
     ADS.AddFailure(362, 1, myProfile)
     ADS.AddFailure(368, 1, sp)
     ADS.AddFailure(368, 1, myProfile)
      
      
   {{APIComment|'Add the suspensions to the data set.}}
   {{APIComment|'Add the suspensions to the data set.}}
     ADS.AddSuspension(328, 1, sp)   
     ADS.AddSuspension(328, 1, myProfile)   
     ADS.AddSuspension(375, 3, sp)  
     ADS.AddSuspension(375, 3, myProfile)  
    
    
   {{APIComment|'Use the cumulative damage - Weibull model to analyze the data set.}}
   {{APIComment|'Use the cumulative damage - Weibull model to analyze the data set.}}
Line 110: Line 118:
===Discussion===
===Discussion===


The [[ALTAStressProfile_Class|ALTAStressProfile]] class represents a time-dependent stress profile. In this example, the stresses are increased in a stepwise fashion. The <code>RepeatCycle</code> property is set to False, indicating that all times after the last segment will use the stress value defined in the last segment.
The [[CProfile_Class|cProfile]] class represents a time-dependent stress profile. The <code>IsCyclical</code> property is set to False, indicating that all times after the last segment will use the stress value defined in the last segment.
 
  {{APIComment|'Declare a new stress profile and define its properties.}}
    {{APIPrefix|Dim}} myProfile {{APIPrefix|As New}} cProfile ({{APIString|"stressProfile"}})
    myProfile.ProfileType = ProfileTypeEnum.Stress
    myProfile.IsCyclical = False
 
The [[ProfileSegment Class|ProfileSegment]] class represents the segments of the associated cProfile object. In this example, the stresses are increased in a stepwise fashion.
 
  {{APIComment|'Define four segments for the stress profile.}}
    {{APIPrefix|Dim}} listofsegments() {{APIPrefix|As}} ProfileSegment = {
      {{APIPrefix|New}} ProfileSegment {{APIPrefix|With}} {.SegmentEnd = 200, .Value = 124},
      {{APIPrefix|New}} ProfileSegment {{APIPrefix|With}} {.SegmentEnd = 300, .Value = 175},
      {{APIPrefix|New}} ProfileSegment {{APIPrefix|With}} {.SegmentEnd = 350, .Value = 200},
      {{APIPrefix|New}} ProfileSegment {{APIPrefix|With}} {.SegmentEnd = 375, .Value = 250}
      }
 
After the segments are defined, they are added to the stress profile.


{{APIComment|'Declare a new stress profile and define its segments.}}  
  {{APIComment|'Add the segments to the stress profile.}}  
  {{APIPrefix|Dim}} sp {{APIPrefix|As New}} ALTAStressProfile
    myProfile.SetSegments(listofsegments)
  sp.AddSegment(200, 125)  
  sp.AddSegment(300, 175)
  sp.AddSegment(350, 200)
  sp.AddSegment(375, 250)
  sp.RepeatCycle = False


Next, create an ALTA data set by declaring a new [[ALTADataSet Class|ALTADataSet]] object, and then using the [[ALTADataSet.AddStressProfile|AddStressProfile]] method to associate the stress profile with the object.  
Next, create an ALTA data set by declaring a new [[ALTADataSet Class|ALTADataSet]] object, and then using the [[ALTADataSet.AddStressProfile|AddStressProfile]] method to associate the stress profile with the object.  
Line 126: Line 146:
    
    
  {{APIComment|'Assign the stress profile to the data set.}}  
  {{APIComment|'Assign the stress profile to the data set.}}  
   ADS.AddStressProfile(sp)
   ADS.AddStressProfile(myProfile)


Use the [[ALTADataSet.AddStressDefinition|AddStressDefinition]] method to define the name, stress transformation and use stress level of the stress profile.
Use the [[ALTADataSet.AddStressDefinition|AddStressDefinition]] method to define the name, stress transformation and use stress level of the stress profile.
Line 137: Line 157:


  {{APIComment|'Add the failure times to the data set.}}
  {{APIComment|'Add the failure times to the data set.}}
   ADS.AddFailure(252, 1, sp)
   ADS.AddFailure(252, 1, myProfile)
   ADS.AddFailure(280, 1, sp)
   ADS.AddFailure(280, 1, myProfile)
   ADS.AddFailure(320, 1, sp)
   ADS.AddFailure(320, 1, myProfile)
   ADS.AddFailure(335, 1, sp)
   ADS.AddFailure(335, 1, myProfile)
   ADS.AddFailure(354, 1, sp)
   ADS.AddFailure(354, 1, myProfile)
   ADS.AddFailure(361, 1, sp)
   ADS.AddFailure(361, 1, myProfile)
   ADS.AddFailure(362, 1, sp)
   ADS.AddFailure(362, 1, myProfile)
   ADS.AddFailure(368, 1, sp)
   ADS.AddFailure(368, 1, myProfile)
      
      
  {{APIComment|'Add the suspensions to the data set.}}
  {{APIComment|'Add the suspensions to the data set.}}
   ADS.AddSuspension(328, 1, sp)   
   ADS.AddSuspension(328, 1, myProfile)   
   ADS.AddSuspension(375, 3, sp)  
   ADS.AddSuspension(375, 3, myProfile)  


The <code>AnalysisSetting</code> property stores a reference to the [[ALTAAnalysisOptions Class|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.
The <code>AnalysisSetting</code> property stores a reference to the [[ALTAAnalysisOptions Class|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.
Line 174: Line 194:


  {{APIComment|'Define two stress profiles.}}  
  {{APIComment|'Define two stress profiles.}}  
   {{APIPrefix|Dim}} SP1 {{APIPrefix|As New}} ALTAStressProfile
   {{APIPrefix|Dim}} myProfile1 {{APIPrefix|As New}} cProfile
   {{APIPrefix|Dim}} SP2 {{APIPrefix|As New}} ALTAStressProfile
   {{APIPrefix|Dim}} myProfile2 {{APIPrefix|As New}} cProfile
  {{APIComment|...}}
  {{APIComment|...}}
   
   
  {{APIComment|'Assign the stress profiles to a data set.}}  
  {{APIComment|'Assign the stress profiles to a data set.}}  
   {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
   {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
   ADS.AddStressProfile(SP1)
   ADS.AddStressProfile(myProfile1)
   ADS.AddStressProfile(SP2)
   ADS.AddStressProfile(myProfile2)
   
   
  {{APIComment|'Define the stress transformations and use stress levels.}}  
  {{APIComment|'Define the stress transformations and use stress levels.}}  
Line 194: Line 214:


===References===
===References===
*[[ALTAStressProfile Class]]
*[[CProfile Class|cProfile Class]]
*[[ProfileSegment Class]]
*[[ALTADataSet Class]]
*[[ALTADataSet Class]]
**[[ALTADataSet.AddStressProfile|ALTADataSet.AddStressProfile Method]]
**[[ALTADataSet.AddStressProfile|ALTADataSet.AddStressProfile Method]]

Revision as of 18:22, 23 March 2017

APIWiki.png


<< Back to Tutorials Main Page

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:

Stress Profile
Start End Stress
0 200 125
200 300 175
300 350 200
350 375 250
Data Set
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 properties.  
   Dim myProfile As New cProfile ("stressProfile")
   myProfile.ProfileType = ProfileTypeEnum.Stress
   myProfile.IsCyclical = False

  'Define four segments for the stress profile.  
   Dim listofsegments() As ProfileSegment = {
      New ProfileSegment With {.SegmentEnd = 200, .Value = 124},
      New ProfileSegment With {.SegmentEnd = 300, .Value = 175},
      New ProfileSegment With {.SegmentEnd = 350, .Value = 200},
      New ProfileSegment With {.SegmentEnd = 375, .Value = 250}
      } 

  'Add the segments to the stress profile.  
   myProfile.SetSegments(listofsegments)

  'Declare a new ALTADataSet object.  
   Dim ADS As New ALTADataSet

  'Assign the stress profile to the data set.  
   ADS.AddStressProfile(myProfile)

  'The stress profile uses the logarithmic (power LSR) stress transformation 
  'and has a use stress level = 100.  
   ADS.AddStressDefinition("Stress1", ALTASolverLSR.Power, 100)
 
  'Add the failure times to the data set. 
   ADS.AddFailure(252, 1, myProfile)
   ADS.AddFailure(280, 1, myProfile)
   ADS.AddFailure(320, 1, myProfile)
   ADS.AddFailure(335, 1, myProfile)
   ADS.AddFailure(354, 1, myProfile)
   ADS.AddFailure(361, 1, myProfile)
   ADS.AddFailure(362, 1, myProfile)
   ADS.AddFailure(368, 1, myProfile)
   
  'Add the suspensions to the data set. 
   ADS.AddSuspension(328, 1, myProfile)   
   ADS.AddSuspension(375, 3, myProfile) 
 
  'Use the cumulative damage - Weibull model to analyze the data set. 
  'Keep all other analysis settings at default. 
   ADS.AnalysisSettings.ModelType = ALTASolverModel.CumDamage
   ADS.AnalysisSettings.Distribution = ALTASolverDistribution.Weibull
 
  'Analyze the data set. 
   ADS.Calculate()

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

   End Sub
End Module

Discussion

The cProfile class represents a time-dependent stress profile. The IsCyclical 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 properties.  
   Dim myProfile As New cProfile ("stressProfile")
   myProfile.ProfileType = ProfileTypeEnum.Stress
   myProfile.IsCyclical = False

The ProfileSegment class represents the segments of the associated cProfile object. In this example, the stresses are increased in a stepwise fashion.

  'Define four segments for the stress profile.  
   Dim listofsegments() As ProfileSegment = {
      New ProfileSegment With {.SegmentEnd = 200, .Value = 124},
      New ProfileSegment With {.SegmentEnd = 300, .Value = 175},
      New ProfileSegment With {.SegmentEnd = 350, .Value = 200},
      New ProfileSegment With {.SegmentEnd = 375, .Value = 250}
      } 

After the segments are defined, they are added to the stress profile.

  'Add the segments to the stress profile.  
   myProfile.SetSegments(listofsegments)

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.  
  Dim ADS As New ALTADataSet
 
 'Assign the stress profile to the data set.  
  ADS.AddStressProfile(myProfile)

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.  
  ADS.AddStressDefinition("Stress1", ALTASolverLSR.Power, 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. 
  ADS.AddFailure(252, 1, myProfile)
  ADS.AddFailure(280, 1, myProfile)
  ADS.AddFailure(320, 1, myProfile)
  ADS.AddFailure(335, 1, myProfile)
  ADS.AddFailure(354, 1, myProfile)
  ADS.AddFailure(361, 1, myProfile)
  ADS.AddFailure(362, 1, myProfile)
  ADS.AddFailure(368, 1, myProfile)
    
 'Add the suspensions to the data set. 
  ADS.AddSuspension(328, 1, myProfile)   
  ADS.AddSuspension(375, 3, myProfile) 

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. 
  ADS.AnalysisSettings.ModelType = ALTASolverModel.CumDamage
  ADS.AnalysisSettings.Distribution = ALTASolverDistribution.Weibull

Use the Calculate method to analyze the data set.

 'Analyze the data set. 
  ADS.Calculate()

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
  r = ADS.FittedModel.Time(.99)
  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 myProfile1 As New cProfile
  Dim myProfile2 As New cProfile
 ... 

 'Assign the stress profiles to a data set.  
  Dim ADS As New ALTADataSet
  ADS.AddStressProfile(myProfile1)
  ADS.AddStressProfile(myProfile2)

 'Define the stress transformations and use stress levels.  
  ADS.AddStressDefinition("Stress1", ALTASolverLSR.Arrhenius, 100)
  ADS.AddStressDefinition("Stress2", ALTASolverLSR.Power, 4)

 ... 
 'Add failure times. 
  ADS.AddFailure(171, 1, SP1, SP2)
  ADS.AddFailure(174, 1, SP1, SP2)
 ... 

References