MATLAB Answers

Simulink¿how to change parameters over time ?

18 ビュー (過去 30 日間)
jiraiya-boy
jiraiya-boy 2018 年 11 月 19 日
Commented: Arunkumar M 2018 年 11 月 19 日
Hi,I am new in simulink and I have the following problem:
I need to specify that 2 Parameters, 'b' and 'p' ,change over time. 'b' and 'p' must be 0 when 0<time<10 , 'b' and 'p' must be 5 and 0.008 when 10<time<20, and 'b' and 'p' must be 2 and 0.8 when 10<time<20.
I share you the exercise and my program in the attached files.
thanks!!

  0 件のコメント

サインイン to comment.

件の回答 (1)

Arunkumar M
Arunkumar M 2018 年 11 月 19 日
編集済み: Arunkumar M 2018 年 11 月 19 日
b = [0 0;10 5;20 2];
p = [0 0;10 0.008;20 0.8];
Create b and p arrays in workspace like shown above - first column is time and second column has the variable value at corresponding time.
Insert From Workspace block into your simulink model and in datafield enter b
Remove check mark in interpolate data and set Holding Final value for Form output data after final value.
Do the same for parameter p also.

  2 件のコメント

madhan ravi
madhan ravi 2018 年 11 月 19 日
@Arunkumar you can format your code by selecting the code and pressing the code button so that it is easy to read
Arunkumar M
Arunkumar M 2018 年 11 月 19 日
@madhan ravi will do :) thanks for the tip

サインイン to comment.

サインイン してこの質問に回答します。

タグ


Translated by