Extract values at a particular time of a simulation to use in the same simulation
1 次查看(过去 30 天)
显示 更早的评论
Im trying to create a block diagram that estimates de inductance of a RL branch. For that I inyect a step signal (a voltage) and by observing at what instance the current arrives at the 63% of the final current we can determine the indutance
. So basically I need to find a mechanism that allows me to find the value of
from the simulation.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1041490/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1041495/image.png)
Any idea on how to do that?
0 个评论
采纳的回答
Jon
2022-6-22
You can use the "Stop Simulation" block for this purpose. This block stops the simulation when its input becomes true (non-zer0)
Assuming you know in advance the final current value, you can use a relational operator (>=) block to test if the signal is greater than 0.63*finalCurrent and feed this to the stop block
1 个评论
Jon
2022-6-22
For example, you could do something like this, where the Vin is a unit step (1 volt) and the values for L and R are assigned in the base workspace (assign them in a script or on the command line before running)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1041625/image.png)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!