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

조회 수: 3 (최근 30일)
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 CenterFile Exchange에서 Fuzzy 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