フィルターのクリア

How can I skip initial value on continuously updating closed loop system?

6 ビュー (過去 30 日間)
Chintan
Chintan 2014 年 3 月 12 日
回答済み: nl2605 2014 年 3 月 12 日
Our model is a closed loop system and we need one parameter that gets updated in each run, but for the initial step the loop output is zero and the parameter that we are updating, has a division hence making it infinity. Is there any way we can skip this initial value or update our parameter as zero for first run, and from the next step let it be updated as it is?
As of now, we have tried using delay and switch blocks. Using conditional(if) block hasn’t been helpful although it is one of the best ways to eliminate infinity issues.
  3 件のコメント
shruthi
shruthi 2014 年 3 月 12 日
Since we cannot share the original model, here is a sample. The K value gets updated at each iteration but if the initial value of Y is 0, the infinity problem arises. Please suggest ways in which this can be rectified.
Chintan
Chintan 2014 年 3 月 12 日
So technically what we want is, if Y = 0, K =0, if Y is not equal to zero, let this division be performed just the way it is.

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

回答 (2 件)

nl2605
nl2605 2014 年 3 月 12 日
You can specify the initial condition or value as 1 or whatever value you want for the integrator block. Just double click the integrator block and put in the value.
  2 件のコメント
Chintan
Chintan 2014 年 3 月 12 日
Yes,
Also, there is one more condition here, if Y=0, K should also be zero. If I keep initial value of Y as 1, the X will still be subtracted in the summation, which is not right.
nl2605
nl2605 2014 年 3 月 12 日
If you have to skip all values coming from Y as '0' then you can check the condition using Relational Operator and set it to '1'. Check the Relational Operator block.

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


nl2605
nl2605 2014 年 3 月 12 日
This should work. I hope so.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by