如何根据时间采样数据计算三相千瓦时 [英] How calculate three phase kilowatt hour from time sampled data
问题描述
我的问题是我想根据电流和电压的时间采样数据计算三相功率.
My problem is I want to calculate three phase power from time sampled data of current and voltages.
我的问题:
如何根据时间采样数据计算能量(单位千瓦时)?是否有可用的方程式?
How can I calculate the energy (unit kilowatt hour) from time sampled data? Are any equations available?
是否需要考虑相移?(如何计算相移?如何将其与计算三相功率联系起来?)
Is it needed to take the phase shift in account? (How can I calculate the phase shift? How do I link this to calculating the three phase power?)
是否有更好的平台可以解决我的问题?
Is some better platform is available for solving my question?
我得到的是瞬时样本值(不是连续的).(我有一些传感器可以提供电流和电压 - 我将其转换为数字进行处理).每秒获取大约 50 个样本.(由于 120 的相移,当我们将三相的所有功率全部加满时,它是否为零?)如何从这些采样值计算三相总能量?我正在 Arduino 中处理我的数据.
I get the instantaneous sample value (not continuous). (I have some sensors that gives the current and voltage - I convert this to digital for processing). Around 50 samples are got per second. (Is it to be zero when we some up all the power of three phase - due to phase shift of 120?) How can I calculate total three phase energy from these sampled values? I am processing my data in Arduino.
(我不知道这是问我问题的地方(如果我能从其他地方获得更好的帮助,请建议我).)
(I don't know this is the place to ask my question (if I can get a better help from some where else please suggest me).)
推荐答案
数值演算来救援.
如果你有多个电压和电流样本,那么你也有很多瞬时功率样本:P(t) = U(t) * I(t)
.
If you have several samples of voltage and current, then you also have that many samples of momentary power: P(t) = U(t) * I(t)
.
现在你有权力也有时间,你可以整合 关于时间的力量.一个简单的数值方法是梯形规则.这个问题被标记为Arduino",我对 C 相当了解,所以这里有一些说明该技术的伪 C:
Now you have power and you have time, you can integrate the power with respect to time. A simple numeric approach is the trapezoidal rule. This question is tagged "Arduino" and I know C reasonably well so here's some pseudo-C that illustrates the technique:
int n_samples = 1000; // or however many samples you have
double integral = 0.0;
for (int i = 0; i < n_samples - 1; i++) {
integral += (samples[i] + samples[i + 1]) / 2;
}
integral *= (t_max - t_min) / n;
其中t_min
和t_max
分别是采样的开始和结束时间,n_samples
是你得到的样本数,samples
是一个包含计算出的瞬时功率值的数组(大概是 double
左右).integral
将保存结果.
Where t_min
and t_max
are the beginning and ending time of the sampling, respectively, n_samples
is the number of samples you got, samples
is an array (presumably of double
or so) that contains the calculated momentary power values. integral
will hold the result.
这篇关于如何根据时间采样数据计算三相千瓦时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!