14#ifndef TWOINERTIASIMULATORS
15#define TWOINERTIASIMULATORS
30 #define arcs_assert(a) (assert(a))
33 #define EventLogVar(a)
50 for(
size_t i = 0; i < N; ++i){
51 PlantSyss.at(i).SetParameters(Params.at(i), SmplTime);
58 : PlantSyss(std::move(r.PlantSyss))
73 for(
size_t i = 0; i < N; ++i){
74 PlantSyss.at(i).SetCurrentAndLoadTorque(Current.at(i), LoadTorque.at(i));
82 std::array<double, N> iq, ts;
92 void GetResponses(std::array<double, N>& LoadSpeed, std::array<double, N>& TorsionAngle, std::array<double, N>& MotorSpeed){
94 for(
size_t i = 0; i < N; ++i){
95 PlantSyss.at(i).GetResponses(LoadSpeed.at(i), TorsionAngle.at(i), MotorSpeed.at(i));
104 std::array<double, N> wl, ths, wm;
116 for(
size_t i = 0; i < N; ++i){
117 MotorPosition.at(i) = PlantSyss.at(i).GetMotorPosition();
125 std::array<double, N> thm;
135 for(
size_t i = 0; i < N; ++i){
136 LoadPosition.at(i) = PlantSyss.at(i).GetLoadPosition();
144 std::array<double, N> thl;
153 std::array<TwoInertiaSimulator, N> PlantSyss;
#define PassedLog()
イベントログ用マクロ(ファイルと行番号のみ記録版)
Definition ARCSeventlog.hh:26
行列/ベクトル計算クラス(テンプレート版)
Definition Matrix.hh:44
constexpr void LoadArray(const std::array< TT, MM > &Array)
1次元std::array配列を縦ベクトルとして読み込む関数
Definition Matrix.hh:424
constexpr void StoreArray(std::array< TT, MM > &Array) const
縦ベクトルを1次元std::array配列に書き込む関数
Definition Matrix.hh:432
2慣性共振系シミュレータV2(ベクトル版)
Definition TwoInertiaSimulators.hh:40
TwoInertiaSimulators(const std::array< struct TwoInertiaParamDef, N > &Params, const double SmplTime)
コンストラクタ
Definition TwoInertiaSimulators.hh:45
void GetMotorPosition(std::array< double, N > &MotorPosition)
モータ側位置を取得する関数(std::array版) 注意: GetResponses()を事前に実行しないと位置は反映されない。
Definition TwoInertiaSimulators.hh:114
TwoInertiaSimulators(TwoInertiaSimulators &&r)
ムーブコンストラクタ
Definition TwoInertiaSimulators.hh:57
void GetLoadPosition(Matrix< 1, N > &LoadPosition)
負荷側位置を取得する関数(ベクトル版) 注意: GetResponses()を事前に実行しないと位置は反映されない。
Definition TwoInertiaSimulators.hh:143
void SetCurrentAndLoadTorque(const Matrix< 1, N > &Current, const Matrix< 1, N > &LoadTorque)
予めモータ電流と負荷トルクを設定する関数(ベクトル版)
Definition TwoInertiaSimulators.hh:81
void GetResponses(Matrix< 1, N > &LoadSpeed, Matrix< 1, N > &TorsionAngle, Matrix< 1, N > &MotorSpeed)
予め設定された電流と負荷から負荷側速度&ねじれ角&モータ側速度を計算する関数(ベクトル版)
Definition TwoInertiaSimulators.hh:103
~TwoInertiaSimulators()
デストラクタ
Definition TwoInertiaSimulators.hh:64
void GetLoadPosition(std::array< double, N > &LoadPosition)
負荷側位置を取得する関数(std::array版) 注意: GetResponses()を事前に実行しないと位置は反映されない。
Definition TwoInertiaSimulators.hh:133
void GetMotorPosition(Matrix< 1, N > &MotorPosition)
モータ側位置を取得する関数(ベクトル版) 注意: GetResponses()を事前に実行しないと位置は反映されない。
Definition TwoInertiaSimulators.hh:124
void GetResponses(std::array< double, N > &LoadSpeed, std::array< double, N > &TorsionAngle, std::array< double, N > &MotorSpeed)
予め設定された電流と負荷から負荷側速度&ねじれ角&モータ側速度を計算する関数(std::array版)
Definition TwoInertiaSimulators.hh:92
void SetCurrentAndLoadTorque(const std::array< double, N > &Current, const std::array< double, N > &LoadTorque)
予めモータ電流と負荷トルクを設定する関数(std::array版)
Definition TwoInertiaSimulators.hh:71