◆ ControllerUnitTest()
ControllerUnitTest::ControllerUnitTest |
( |
| ) |
|
|
inline |
◆ f1()
double Mdouble
Definition: GeneralDefine.h:34
Mdouble x2
Definition: ControllerUnitTest.cpp:12
References x2.
Referenced by RungeKutta().
◆ f2()
Mdouble m
Definition: ControllerUnitTest.cpp:13
Mdouble F
Definition: ControllerUnitTest.cpp:19
Mdouble c
Definition: ControllerUnitTest.cpp:14
Mdouble x1
Definition: ControllerUnitTest.cpp:11
Mdouble k
Definition: ControllerUnitTest.cpp:15
References c, F, k, m, x1, and x2.
Referenced by RungeKutta().
◆ RungeKutta()
39 for (
int i=0;
i<200/
dt;
i++) {
48 x1 =
x1+(k11+2*k12+2*k13+k14)/6;
49 x2 =
x2+(k21+2*k22+2*k23+k24)/6;
Mdouble t
Definition: ControllerUnitTest.cpp:16
Mdouble xDesire
Definition: ControllerUnitTest.cpp:18
Mdouble dt
Definition: ControllerUnitTest.cpp:17
Mdouble x1Error
Definition: ControllerUnitTest.cpp:20
Mdouble f2(Mdouble x1, Mdouble x2)
Definition: ControllerUnitTest.cpp:32
Mdouble f1(Mdouble x2)
Definition: ControllerUnitTest.cpp:27
Definition: PIController.h:9
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51
References PIController::apply(), dt, F, f1(), f2(), constants::i, t, x1, x1Error, x2, and xDesire.
Referenced by SpringMassControl().
◆ SpringMassControl()
Mdouble ControllerUnitTest::SpringMassControl |
( |
| ) |
|
|
inline |
Mdouble RungeKutta(Mdouble x1, Mdouble x2, Mdouble dt)
Definition: ControllerUnitTest.cpp:37
References dt, RungeKutta(), x1, and x2.
Referenced by main().
◆ dt
Mdouble ControllerUnitTest::dt =0.01 |
|
private |
Mdouble ControllerUnitTest::k =100.0 |
|
private |
◆ x1
Mdouble ControllerUnitTest::x1 =0.0 |
|
private |
◆ x1Error
Mdouble ControllerUnitTest::x1Error =0.0 |
|
private |
◆ x2
Mdouble ControllerUnitTest::x2 =0.0 |
|
private |
◆ xDesire
Mdouble ControllerUnitTest::xDesire =5 |
|
private |
The documentation for this class was generated from the following file: