diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-10-06 17:06:15 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-10-06 17:06:15 -0300 |
commit | 89befdb9b259d02249876e39ec6fd28860272439 (patch) | |
tree | 054de50365749426623bed352a10e84299e84cad /Project/TransferFunction.h | |
parent | bc5a3e8923cb8efedbbd5b88e212eb0e9009cf87 (diff) | |
download | PSP.git-89befdb9b259d02249876e39ec6fd28860272439.tar.gz PSP.git-89befdb9b259d02249876e39ec6fd28860272439.tar.xz PSP.git-89befdb9b259d02249876e39ec6fd28860272439.zip |
A lot of documentation written
Diffstat (limited to 'Project/TransferFunction.h')
-rw-r--r-- | Project/TransferFunction.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Project/TransferFunction.h b/Project/TransferFunction.h index fd83ba4..af84ba5 100644 --- a/Project/TransferFunction.h +++ b/Project/TransferFunction.h @@ -25,6 +25,13 @@ class TransferFunctionForm; +/** + * @class TransferFunction + * @author Thales Lima Oliveira <thales@ufu.br> + * @date 06/10/2017 + * @brief Calculates the time response by a frequency domain transfer function. + * @file TransferFunction.h + */ class TransferFunction : public ControlElement { public: @@ -51,7 +58,21 @@ class TransferFunction : public ControlElement virtual void UpdateTFText(); virtual void UpdateText() { UpdateTFText(); } virtual SpaceState GetSpaceState() { return m_ss; } + /** + * @brief Convert the transfer function to space state on controllable canonical form (CCF). + * @param maxIteration Max number of solution iteration. + * @param error Tolerance for calculation. + */ virtual void CalculateSpaceState(int maxIteration = 100, double error = 1e-3); + /** + * @brief Calculates the time response by the space state form of transfer function. + * + * Uses the implicit trapezoidal rule to solve: + * <center>\f$ y_{n+1}=y_n+\frac{1}{2}h(y'_n+y'_{n+1}) \f$</center> + * @param input Input value. + * @param timeStep Time step. + * @return true if the calculation converges, false otherwise. + */ virtual bool Solve(double input, double timeStep); virtual Element* GetCopy(); |