plot the electrical power of a motor having for a time t=20s the values of u(ur,us,ut) and i(ir,is,it))

2 ビュー (過去 30 日間)
Maura
Maura 2018 年 8 月 8 日
編集済み: Stephan 2018 年 8 月 10 日
how can i plot the electrical power P of a motor, having for a time t=20s differents values of u(ur,us,ut) and i(ir,is,it)?
  2 件のコメント
Stephan
Stephan 2018 年 8 月 9 日
編集済み: Stephan 2018 年 8 月 9 日
Do you have the values for i(t) and u(t) for the wanted range of 20 sec? Do you also have the equation to calculate power?
Maura
Maura 2018 年 8 月 9 日
Yes. U and I are matrices. And I know that the power P=U.I

サインインしてコメントする。

回答 (1 件)

Stephan
Stephan 2018 年 8 月 10 日
編集済み: Stephan 2018 年 8 月 10 日
Hi,
this is an example which should work for your purpose:
% some values for U(t) and I(t) --> i take random values for I(t)...
% and i assume a 24 V DC machine, to have data for the example.
U = 24 *ones(1,201);
I = 3 * rand(1,201) + 1.5;
% lets say you have measured values every 100 ms from 0-20 secs...
% Then build a time vector which is used as x-axis for the plot
t = linspace(0,20,201);
% calculate the power ELEMENTWISE with '.*' operator gives a...
% vector of the same size as wanted
P = U.*I;
% plot P against t and give labels and a title
plot(t,P)
ax = gca;
xlabel('Time in sec')
ylabel('Power in W')
title('Power against time diagram')
which gives:
I think if you modify t for your case and insert your variables of U(t) and I(t) this should work for you.
Best regards
Stephan

コミュニティ

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by