zero crossing detection -simulink

2 次查看(过去 30 天)
NN
NN 2019-9-16
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

回答(1 个)

Prabhan Purwar
Prabhan Purwar 2019-9-20
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

类别

Help CenterFile Exchange 中查找有关 General Applications 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by