Help with battery simulation

Hi everyone. I am trying to simulate a battery in simulink with Simpowersystems blockset. Now, in order to specify the values of the equivalent circuit, I have to measure the voltage across a capacitor. Then each time based on that voltage value I calculate each resistance value, according to some formulas.
Now, here is my problem, the formula is lets say (a+b)^2. I take the signal a I add to b with the sum block and then I use the block square to get the result. How can I use this result as an input in the resistance dialog box??? I can only insert a number there. Not a output from a subsystem.
Actually I don't know if this is the correct way to do this, but I need this model for my thesis and I am really stuck... So any help will be greatly appreciated.
Thanks in advance,
George

 采纳的回答

Kaustubha Govind
Kaustubha Govind 2012-5-8

0 个投票

That is not possible, see How Do I Change a Block Parameter Based on the Output of Another Block? You might need to implement the block yourself so as to take the resistance value as an input signal. (Sorry for being vague, but I don't have any experience modeling in SimPowerSystems)

更多回答(1 个)

George
George 2012-5-9

0 个投票

Ok, so this cannot be done. Any idea how to simulate a resistance?
edit. Now I have just checked simulinks battery block. If you look under the mask, there is a resistance and it hasn't a numerical value but that "Batt.R" in the parameter toolbox... Is there a way to do the same for my simulation?

1 个评论

Sorry, like I mentioned, I don't have any experience with SimPowerSystems modeling, so I don't have answer to your first question. You could try asking this as a new question on the forum.
Any Simulink block can take a variable-name instead of a numerical value for the dialog parameter. As long as the value you provided can be resolved to a numerical value in the model or base workspace, Simulink will evaluate it for you and get the corresponding numerical value. I don't see how using a variable-name instead of a value for the parameter changes anything w.r.t. your situation. You still cannot use a signal as the parameter value.

请先登录,再进行评论。

社区

更多回答在  Power Electronics Control

类别

Community Treasure Hunt

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

Start Hunting!

Translated by