I want to set a time variable (from simulation time) to become one of the variables in equation

1 回表示 (過去 30 日間)
Jung-Woo Kwon
Jung-Woo Kwon 2017 年 4 月 6 日
編集済み: behnam jafari 2019 年 11 月 11 日
from the image above, i want to use simulation time as variable for changing reluctance value.
For example, if time of the simulation is set to be as variable X, i want to input X*85*5 for cross sectional area of reluctance block.
Help me solve this simple issue, but which i cannot figure out
Thank you.

回答 (1 件)

Gillian Rosen
Gillian Rosen 2017 年 4 月 11 日
Hi Jung-Woo, 
I understand that you would like to use the simulation time to change the cross-sectional area of a Reluctance block in your model.
Please note that it is not possible to change the parameters of a Simscape block during simulation (see https://www.mathworks.com/help/physmod/simscape/run-time-parameters.html for more information). However, as a workaround, you can use a Variable Reluctance block with a carefully constructed input signal. 
The Variable Reluctance block takes a physical signal as input, which it uses as the thickness of the section or air gap in its calculations. However, using the equations given in the block parameters, you can solve for the needed input value as a function of the cross-sectional area, and set the block parameter for the cross-sectional area to a dummy value of 1.
Once you have solved the system, you can use Clock and Gain blocks to obtain a signal that contains your desired input as a function of the cross-sectional area, then connect this signal to a Variable Reference block using a Simulink-PS Converter.
  1 件のコメント
behnam jafari
behnam jafari 2019 年 11 月 11 日
編集済み: behnam jafari 2019 年 11 月 11 日
so is it absolutely a sure thing that this ( changing parameters of a simscape block ) cannot happen ?
because i've got the same problem ...
building block formulations with simulink blocks can be a good idea then as you referred ...
thanks

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

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by