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

3 views (last 30 days)
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
Tommy Fu
Tommy Fu on 7 Jun 2022
Edited: Tommy Fu on 7 Jun 2022
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?

Sign in to comment.

Accepted Answer

Jon on 7 Jun 2022
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
Jon on 7 Jun 2022
Edited: Jon on 7 Jun 2022
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.

Sign in to comment.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!

Translated by