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
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?
采纳的回答
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 个评论
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 Exchange 中查找有关 Fuzzy Logic in Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!