Esempio n. 1
0
#%% Setting the observed data set

# inputs
Estime.setDados(0, (time, uxtime), (temperature, uxtemperature))
# outputs
Estime.setDados(1, (y, uy))

# Defining the previous data set to be used to parameter estimation
Estime.setConjunto()

#%% Optimization - estimating the parameters
# initial_estimative: List with the initial estimates for the parameters;
# algorithm: Informs the optimization algorithm that will be used. Each algorithm has its own keywords;
# optimizationReport: Informs whether the optimization report should be created (True or False);
Estime.optimize(initial_estimative=[18, 20000.000],
                optimizationReport=False,
                algorithm='ipopt')

#%% Evaluating the parameters uncertainty and coverage region
# uncertaintyMethod: method for calculating the covariance matrix of the parameters;
# objectiveFunctionMapping: Deals with mapping the objective function (True or False);
Estime.parametersUncertainty(uncertaintyMethod='2InvHessiana',
                             objectiveFunctionMapping=True)

#%%Running the charts without prediction.
# using solely default options
Estime.plots()

#%% Evaluating model predictions
# export_y: Exports the calculated data of y, its uncertainty, and degrees of freedom in a txt with comma separation (True or False);
# export_y_xls: Exports the calculated data of y, its uncertainty, and degrees of freedom in a xls (True or False);
Esempio n. 2
0
# Defining the previous data set to be used to parameter estimation
# dataType: Defines the purpose of the informed data set: estimacao, predicao.
# glx: Degrees of freedom of quantity x;
# gly: Degrees of freedom of quantity y;
Estime.setConjunto(dataType='estimacao', glx=[], gly=[])

#%% Optimization - estimating the parameters
# initial_estimative: List with the initial estimates for the parameters;
# lower_bound: List with the lower bounds for the parameters;
# upper_bound: List with the upper bounds for the parameters;
# algorithm: Informs the optimization algorithm that will be used. Each algorithm has its own keywords;
# optimizationReport: Informs whether the optimization report should be created (True or False);
# parametersReport: Informs whether the parameters report should be created (True or False).
Estime.optimize(initial_estimative=[0.005, 20000.000],
                algorithm='ipopt',
                lower_bound=[0.006, 15000],
                upper_bound=[100, 30000],
                optimizationReport=True,
                parametersReport=False)

#%% Evaluating the parameters uncertainty and coverage region
# uncertaintyMethod: method for calculating the covariance matrix of the parameters;
# objectiveFunctionMapping: Deals with mapping the objective function (True or False);
# limite_inferior: Lower limit of parameters;
# limite_superior: Upper limit of the parameters;
# iterations: Number of iterations to perform the mapping of the objective function. The higher the better mapping, but it
# increases the execution time
# parametersReport: Informs whether the parameters report should be created.
Estime.parametersUncertainty(uncertaintyMethod='Geral',
                             objectiveFunctionMapping=True,
                             lower_bound=[7.2e-3, 26400],
                             upper_bound=[7.7e-3, 28600],
Esempio n. 3
0
# inputs
Estimation.setDados(0, (T, uxT))
# outputs
Estimation.setDados(1, (P, uP))

# Defining the previous data set to be used to parameter estimation.
# dataType: Defines the purpose of the informed data set: estimacao, predicao.
Estimation.setConjunto(dataType='estimacao')

#%% Optimization - estimating the parameters,
# initial_estimative: List with the initial estimates for the parameters;
# algorithm: Informs the optimization algorithm that will be used. Each algorithm has its own keywords;
# optimizationReport: Informs whether the optimization report should be created (True or False);
# parametersReport: Informs whether the parameters report should be created (True or False).
Estimation.optimize(initial_estimative=[1, 1.5, 0.009],
                    algorithm='bonmin',
                    optimizationReport=True,
                    parametersReport=False)

#%% Evaluating the parameters uncertainty and coverage region
# uncertaintyMethod: method for calculating the covariance matrix of the parameters: 2InvHessian, Geral, SensibilidadeModelo
# Geral obtains the parameters uncertainty matrix without approximations (most accurate), while 2InvHessian and SensibilidadeModelo involves
# some approximations.
# objectiveFunctionMapping: Deals with mapping the objective function (True or False);
# parametersReport: Informs whether the parameters report should be created (True or False).
# iterations: Number of iterations to perform the mapping of the objective function. The higher the better mapping, but it
# increases the execution time
Estimation.parametersUncertainty(uncertaintyMethod='Geral',
                                 objectiveFunctionMapping=True,
                                 iterations=5000,
                                 parametersReport=False)
Esempio n. 4
0
Estime.setDados(1, (y1, uy1), (y2, uy2))

# Defining the previous data set to be used to parameter estimation
# dataType: Defines the purpose of the informed data set: estimacao, predicao.
# glx: Degrees of freedom of quantity x;
# gly: Degrees of freedom of quantity y;
Estime.setConjunto(dataType='estimacao', glx=[], gly=[])

#%% Optimization - estimating the parameters
# initial_estimative: List with the initial estimates for the parameters;
# lower_bound: List with the lower bounds for the parameters;
# upper_bound: List with the upper bounds for the parameters;
# algorithm: Informs the optimization algorithm that will be used. Each algorithm has its own keywords;
# optimizationReport: Informs whether the optimization report should be created (True or False);
# parametersReport: Informs whether the parameters report should be created (True or False).
Estime.optimize(initial_estimative=[3,0.1,5,0.4], algorithm='ipopt', lower_bound=[0.2,0.09,3.1,0.3], upper_bound=[3.6,0.3,5.6,0.6],
                optimizationReport = True, parametersReport = False)

#%% Evaluating the parameters uncertainty and coverage region
# uncertaintyMethod: method for calculating the covariance matrix of the parameters;
# objectiveFunctionMapping: Deals with mapping the objective function (True or False);
# lower_bound: Lower limit of parameters;
# upper_bound: Upper limit of the parameters.
# parametersReport: Informs whether the parameters report should be created.
Estime.parametersUncertainty(uncertaintyMethod='2InvHessiana', objectiveFunctionMapping=True, lower_bound=[1,0.04,1.75,0.175], upper_bound=[4.5,0.16,6.75,1],
                             parametersReport = True)

#%% Evaluating model predictions
# export_y: Exports the calculated data of y, its uncertainty, and degrees of freedom in a txt with comma separation (True or False);
# export_y_xls: Exports the calculated data of y, its uncertainty, and degrees of freedom in a xls (True or False);
# export_cov_y: Exports the covariance matrix of y (True or False);
# export_x: Exports the calculated data of x, its uncertainty, and degrees of freedom in a txt with comma separation(True or False);
Esempio n. 5
0
]

uy = [1] * 41
uxtempo = [1] * 41
uxtemperatura = [1] * 41

#Execução do MT_PEU
Estime = EstimacaoNaoLinear(Modelo,
                            simbolos_x=['t', 'T'],
                            simbolos_y=['y'],
                            simbolos_param=['ko', 'E'],
                            Folder='Exemplo1')
Estime.setDados(0, (tempo, uxtempo), (temperatura, uxtemperatura))
Estime.setDados(1, (y, uy))
Estime.setConjunto(tipo='estimacao')
Estime.optimize(initial_estimative=[0.5, 25000], algoritmo='ipopt')
Estime.incertezaParametros(metodoIncerteza='Geral' '')
Estime.predicao()

# Valores originais
hessian = array([[5.46625676e+00, -7.50116238e-03],
                 [-7.50116238e-03, 1.02960714e-05]])
sensibilidade = array([[-1.06335451e-01, 1.52826132e-04],
                       [-5.59353653e-02, 8.03907392e-05],
                       [-1.28132438e-01, 1.80542088e-04],
                       [-2.26100338e-01, 3.18581523e-04],
                       [-2.26100338e-01, 3.18581523e-04],
                       [-1.28132438e-01, 1.80542088e-04],
                       [-2.07847997e-01, 2.89084593e-04],
                       [-1.16257751e-01, 1.61696650e-04],
                       [-6.14815711e-02, 8.55114088e-05],
Esempio n. 6
0
Estimation.setDados(1, (P, uP))

# Defining the previous data set to be used to parameter estimation
# dataType: Defines the purpose of the informed data set: estimacao, predicao.
# glx: Degrees of freedom of quantity x;
# gly: Degrees of freedom of quantity y;
Estimation.setConjunto(dataType='estimacao', glx=[], gly=[])

#%% Optimization - estimating the parameters
# initial_estimative: List with the initial estimates for the parameters;
# lower_bound: List with the lower bounds for the parameters;
# algorithm: Informs the optimization algorithm that will be used. Each algorithm has its own keywords;
# optimizationReport: Informs whether the optimization report should be created (True or False);
# parametersReport: Informs whether the parameters report should be created (True or False).
Estimation.optimize(initial_estimative=[200, -80680.1],
                    algorithm='ipopt',
                    optimizationReport=True,
                    parametersReport=False)

#%% Evaluating the parameters uncertainty and coverage region
# uncertaintyMethod: method for calculating the covariance matrix of the parameters;
# objectiveFunctionMapping: Deals with mapping the objective function (True or False);
# parametersReport: Informs whether the parameters report should be created.
Estimation.parametersUncertainty(uncertaintyMethod='SensibilidadeModelo',
                                 objectiveFunctionMapping=True,
                                 parametersReport=True)

#%% Evaluating model predictions
# export_y: Exports the calculated data of y, its uncertainty, and degrees of freedom in a txt with comma separation (True or False);
# export_y_xls: Exports the calculated data of y, its uncertainty, and degrees of freedom in a xls (True or False);
# export_cov_y: Exports the covariance matrix of y (True or False);
# export_x: Exports the calculated data of x, its uncertainty, and degrees of freedom in a txt with comma separation(True or False);
Esempio n. 7
0
639.0,639.0,639.0,639.0,639.0,639.0,639.0]
# input 2 uncertainty
uxtemperature = [1]*41

#%% Setting the observed data set
# Independent variables
Estime.setDados(0,(time,uxtime),(temperature,uxtemperature))
# Dependent variable
Estime.setDados(1,(y,uy))

# Defining the previous data set to be used to parameter estimation
Estime.setConjunto()

#%% Optimization - estimating the parameters
# initial_estimate: list containing initial estimate for optimization algorithm
Estime.optimize(initial_estimative=[0.5,25000])

#%% Evaluating the parameters uncertainty and coverage region
# using solely default options
Estime.parametersUncertainty()

#%% Evaluating model predictions
# using solely default options
Estime.prediction()

#%% Evaluating residuals and quality index
# using solely default options
Estime.residualAnalysis()

#%% Plotting the main results
# using solely default options