Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpa
libs
pucrio-tecgraf
Commits
b723b746
Commit
b723b746
authored
Oct 26, 2021
by
Bernardo Quaresma Dias
Browse files
Integração de revisões em filtro adaptativo
INSTMPA-1330
parent
6bdf5143
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib-blocos-4_0.mpam
View file @
b723b746
...
...
@@ -245,7 +245,8 @@ class{ id = "bloco_filtro", name = "Bloco Filtro", group = "Blocos de C
local erro_ref = getattribute(self, 'cfg_erro_tipico')
local fator_max = self.cfg_fator
fator = limitar(filtro_calc_fator_proporcional_erro(valor, y_ant, erro_ref), nil, fator_max)
fator = limitar(filtro_calc_fator_proporcional_erro(valor, y_ant, erro_ref), 0, fator_max)
self._fator_adapt = fator
else
fator = getattribute(self, 'cfg_fator')
end
...
...
lib-filtro-1_0.mpam
View file @
b723b746
...
...
@@ -15,7 +15,7 @@ func{ id = "filtro_calc_fator_proporcional_erro", name = "Filtro: Calcular Fator
local erro_prop = erro/(2*sqrt(2)*erro_ref)
local erro_erf = math_calc_erf(erro_prop)
return
(
erro_erf
*2)/sqrt(pi)
return erro_erf
end ]===],
}
...
...
lib-math-1_2.mpam
View file @
b723b746
...
...
@@ -33,7 +33,9 @@ func { id = "math_calc_erf", name = "Calcular Fun
{ name = "Valor Calculado", type = "REAL" }
},
code = [===[ function(x)
return math_calc_polinomio(x, MATH_ERF_POTS, MATH_ERF_COEFS)
local erro_pol = math_calc_polinomio(x, MATH_ERF_POTS, MATH_ERF_COEFS)
return erro_pol*2/sqrt(pi)
end ]===],
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment