Zero Crossing Detection in Simscape (specifically SimHydraulics)

9 visualizaciones (últimos 30 días)
I run a lot of simulations using Simscape, mostly in SimHydraulics. I find that for almost all of my simulations, which vary in physical complexity from moderate to heavy, attempting to run with zero crossing detection enabled brings the solver to its knees (at best, solutions take hours, at worst, they error out due to excessive zero crossings). I find that the most problematic blocks appear to be orifices (which I think fail due to the integral ABS function) and any component with a hard stop (such as a hydraulic cylinder).
I am close to giving up and running all of my models with zero crossing detection disabled by default, but I've read that it can compromise solution accuracy. The help documentation is vauge as to exactly what the consequences are, so I would like to know the implications of doing this. Is the global accuracy of the solution affected, or only the signals (states) with ZCD enabled? Is the solution compromised only around the zero crossing event, or for all simulated time?
Can you give me any information specific to SimHydraulics? For example, does an orifice block solve differently with ACD disabled?
Thanks in advance for any advice.

Respuesta aceptada

Guy Rouleau
Guy Rouleau el 23 de Ag. de 2011
Based on my experience, I do NOT recommend to turn off zero-crossing in a Simscape model. As you probably saw in the next link, "Disabling it can lead to major simulation inaccuracies"
The thing is that when there is a zero-crossing, the Simscape engine recomputes the Transition Initialization, see next link for where this steps is involved:
Without zero-crossing, the Simscape could miss (or see later) an event (like a step in an input signal, or the switching of an if/else statement inside an simscape file, for example).
Instead of disabling zero-crossing, I would look at the dynamics involved in your network. Most of the times, to many zero-crossings is a sign of undesired oscillations or chattering. For example, with a hard-stop, it is important to pick stiffness and damping carefully. My rule of thumb is that stiffness should be as small as possible, without compromising results accuracy. Usually a stiffness 10 times smaller does a good job. You should do something similar with hydraulic parts.
In case you do not know this submission, I recommend using the Simscape explorer, which I highlighted in that post:
It really helps identifying the source of oscillation in a model.
  1 comentario
Daniel Kluk
Daniel Kluk el 23 de Ag. de 2011
Thanks for the reply. I did not know about the Simscape explorer tool; it looks like it will be very helpful.
I have had the same experience with hard stops; I generally try to set the stiffness just high enough to avoid excessive penetration into the stop, and then I have to increase the damping significantly to avoid oscillations.
Hydraulically, my simulations typically involve large hose and/or accumulator volumes interacting with valves and other orifices, which tend to generate oscillatory flows and waterhammer at many different frequencies. Unfortunately, these dynamics are typically what I am interested in, so simplifying them out of my simulation defeats the purpose.
I think what I will do is start modeling and debugging with zero crossing control disabled, and then enable it for my final runs--which will probably have to take place overnight.
Thanks again for the advice.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by