zero crossing detection -simulink

2 views (last 30 days)
NN
NN on 16 Sep 2019
Answered: Prabhan Purwar on 20 Sep 2019
hi,
How can we know if zero crossing is actually required for a block or not.If not how accurately we can decide it and eliminate from the paramters.
My simulation file is too slow, and i doubt if its beause of zero crossing detection enable with most blocks
Thanks in Advance

Answers (1)

Prabhan Purwar
Prabhan Purwar on 20 Sep 2019
Hi,
A variable-step solver dynamically adjusts the time step size, causing it to increase when a variable is changing slowly and to decrease when the variable changes rapidly. Zero-crossing is used to accurately locate a discontinuity without resorting to excessively small-time steps.
Following is an example illustrating, exactly when to enable and disable zero-crossing in a system to maintain a balance between required run-time and accuracy of the output.
  • Simulink model
m1.JPG
In the above model, zero-crossing is enabled for Integrator,Hit-Crossing and Hit-Crossing 1 blocks.
In order to find the no of zero crossings in the model make use of debugger as shown.
m2.JPG
  • From the debugger results, we can infer that there is no zero-crossing detected for the Integrator block, while zero-crossing is prominent for Hit Crossing and Hit Crossing 1 block. Thus, it is advisable to disable zero-crossing for integrator block to speed up the simulation.
Alternatively, you can make use of Zero-crossing block to count the number of zero-crossings and enable zero-crossing accordingly.
Please refer the following link for further information

Community Treasure Hunt

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

Start Hunting!