Battery duty cycle at each instant ?

1 次查看(过去 30 天)
MUKESH KUMAR
MUKESH KUMAR 2018-8-17
重新打开: Walter Roberson 2019-1-12
I have battery voltage Vi at each time instant(predefined before in simulink) and taking the reference voltage Vo (between 718-719 choose randomly at each instant). Now, I want to calculate and store duty cycle D of battery at each time instant according to D = {1-(Vi/Vo)}. How can I do it in a incremental time stamp loop or using for loop. Thanks

采纳的回答

Adam Danz
Adam Danz 2018-8-20
I didn't understand what Vi and Vo are. Are they each vectors of voltages sampled at temporal intervals?
If that's the case, and if Vi and Vo have the same length, the duty cycle, according to your equation would just be
D = 1 - Vi./Vo;
But I have a feeling this doesn't address what you need. Feel free to follow-up in the comments below.
  2 个评论
MUKESH KUMAR
MUKESH KUMAR 2018-8-21
Yes, Vi and Vo are vectors of voltages sampled at each time instant and I want to calculate duty cycle at each instant but I do not know the length of vector So I can not use "i=1:sample_number" in for loop So how can i check it at every next instant for duty cycle. Thanks for your help.
Adam Danz
Adam Danz 2018-8-21
My method above does not require knowing the length of each vector and it does not require a loop. As long as Vi and V0 are the same lenght
length(Vi) == length(Vo)
and as long as Vi and Vo are sampled together at the same time, that 1-line should do what you're asking, if I'm understanding correctly.
Have you tried running that line? Is there an error?

请先登录,再进行评论。

更多回答(0 个)

社区

更多回答在  Power Electronics Control

类别

Help CenterFile Exchange 中查找有关 Propulsion and Power Systems 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by