同期速度は極数を\(p\)、電源周波数を\(f\)とすると
\begin{align}
N_s=\frac{120f}{p}
\end{align}
で与えられる。
実行結果
Ns -> 1500
ソースコード
#define _USE_MATH_DEFINES
#include <iostream>
#include <math.h>
class IM {
public:
std::string name = "";
double r1 = 0.0;
double r2 = 0.0;
double x1 = 0.0;
double x2 = 0.0;
double s = 0.0;
double V = 0.0;
double I = 0.0;
unsigned char p = 0.0;
double f = 0.0;
double P = 0.0;
double T = 0.0;
unsigned int N = 0.0;
unsigned int Ns = 0.0;
void show(void) {
std::cout << "r1->" << r1 << std::endl;
std::cout << "r2->" << r2 << std::endl;
std::cout << "x1->" << x1 << std::endl;
std::cout << "x2->" << x2 << std::endl;
std::cout << "s->" << s << std::endl;
std::cout << "V->" << V << std::endl;
std::cout << "I->" << I << std::endl;
}
double syncspeed(IM motor) {
return 120*motor.f / motor.p;
}
double torque(IM motor) {
return motor.P / (2 * M_PI * motor.N / 60);
}
double current(IM motor) {
double Z, R, X;
R = motor.r1 + motor.r2 / motor.s;
X = motor.x1 + motor.x2;
Z = sqrt(std::pow(R, 2) + std::pow(X, 2));
return motor.V / (sqrt(3) * Z);
}
};
int main() {
double P0;
IM motor1;
motor1.p = 4;
motor1.f = 50;
motor1.Ns = motor1.syncspeed(motor1);
std::cout << "Ns -> " << motor1.Ns << std::endl;
return 0;
}
コメント