Simulinkでif、action subsystem中discrete time integraterの用法

3 views (last 30 days)
ifブロックとaction subsystemでシステムを構築してます。ifの条件成立時に締結しているaction subsystem 内のdiscrete time integraterを増加させ、不成立になるとリセットさせるように組みたいと思います。if条件不成立時にはelse側に締結されたaction subsystem内のdiscrete time integraterが増加し、成立時のdiscrete time integraterはリセットしたいです。どのように組めばよろしいでしょうか?例を示して頂けるとありがたいです。よろしくお願いします。

Answers (2)

Atsushi Ueno
Atsushi Ueno on 25 Mar 2024
サンプルモデルも添付しましたが、下記のような設定で良いのではないでしょうか。
2つのサブシステム内は入力と出力の間にdiscretetimeintegrator をつなげてあります。
  1 Comment
和也
和也 on 25 Mar 2024
ありがとうございます。やりたいことが出来ました。こちらのモデルは繰り返し処理の中で使用したいと考えてますが、処理するレートを変更してもdiscrete time integraterの積算ピッチは変化がないのでしょうか?
例えば1回処理/100msec→1回処理/200msec・・・1回処理/1000msecと処理するレートを変化させても
discrete time integraterの出力自体はconstantで1を入力する限り1/1secの出力傾向ですか?

Sign in to comment.


交感神経優位なあかべぇ
Edited: 交感神経優位なあかべぇ on 25 Mar 2024
Action Subsystem内のAction Portブロックの実行を再開時の状態をリセットに設定します。
そうすると、条件不成立から成立時に切り替わる時に、Action SubSystem内のdiscrete time integraterやUnit Delayなどの状態変数を持つブロックの初期値がリセットされます。

Tags

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!