how to filter out column of data with zero value on continuous signal in simulink?

2 ビュー (過去 30 日間)
Tommy Fu
Tommy Fu 2022 年 6 月 7 日
編集済み: Jon 2022 年 6 月 7 日
Hi, I'm working on a project that uses ANFIS as its control, and I'm simulating it in Simulink. The problem that I encounter is the delay when I am normalizing the output before it goes into ANFIS (the model was built with the normalized database too), the delay was 1 second, and during those delay, the output is zero, and when those outputs get processed into my system, an error occurs, it says :
"Derivative of state '1' in block 'CAR_SIMULINK_MODEL_2/Uncontrolled1/Integrator2' at time 0.0 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)".
I notice it was because of value 0 cannot be integrated in my system, i try both reducing the step and fixed the step size but it didn't help. Which brings me back to the question of how to filter out a column of data with zero value on continuous signal in Simulink?
I also have attached my model for further understanding,
Thankyou in advance,
Best Regards
  2 件のコメント
Jon
Jon 2022 年 6 月 7 日
I'm not familar with ANFIS, but from your problem description, I'm wondering if your problem is that you are not intializing the state of your delay, so that it does not put out zero on the first step? Can you confirm that you delay element output is intitialized and that this is not the problem?
Tommy Fu
Tommy Fu 2022 年 6 月 7 日
編集済み: Tommy Fu 2022 年 6 月 7 日
I did initialize the state of my delay for 1 sec, and during those delay, it produce a constant zero signal. The delay output is inevitable as it is part of the normalization process, so It is not the problem. The problem is the constant zero signal causes my model to not work, so i wanted to delete those column of zero before it goes into the model system. is this possible?

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

採用された回答

Jon
Jon 2022 年 6 月 7 日
I would suggest assigning the "Initial output" parameter of your Transport Delay block and the "Initial Condition" of your Memory block (both blocks are inside your Normalization1 subsystem). Currently those values are set to zero, you should assign them to a reasonable initial value for your problem, to avoid downstream problems with zero values
  2 件のコメント
Tommy Fu
Tommy Fu 2022 年 6 月 7 日
Thank You for your suggestion, it works like a charm!.
however I wonder does it have any effect on the outcome?since it is connected to a control.
Again, thank you for your answer Jon, appreciate it
Jon
Jon 2022 年 6 月 7 日
編集済み: Jon 2022 年 6 月 7 日
I don't know the details of your application, but as a general guideline, I would suggest making sure that the control be left in manual mode (turned off) until all of the needed inputs have been obtained and have reached steady state (time delays, filters etc). Once all the inputs are good, you can then switch the control to automoatic mode (turn it on). Be sure that when the control is in manual mode, it produces the desired output to maintain the process (in this case I guess a car) in an acceptable state or trajectory. Also make sure that there is no discontinuous bump when the control is switched on.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFuzzy Logic in Simulink についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by