Question

I encountered an interesting phenomenon in Dymola, which I think the cause of it might come from my model, but I don't know what kind of thing may cause this. Greatly appreciated if anyone could give me a little hint on this.

The problem of mine is that, the simulation will "stop" at a certain time (it's running but very slowly), when I plotted the results, a block that tests if the error is within tolerance keeps generating events at a very large frequency.

Tracing back from the "within Tolerance" block, it is an "error block" from the standard lib which has 3 signals

u1 - sensor data, u2 - reference value, y - output signal[u1-u2=y]

(unfortunately I cannot upload my plots due to my low reputation)

Here's what I found when I zoomed in (Many many times) the "tail" of these signals (where they stopped running),

For error.y signal: I can see very tiny(1e-10) but high frequency chattering around my errorTolerance target, but only at the tail where the simulation started running very slow. It behaves like a sawtooth shape signal.

For u1(sensor data) signal: I zoomed in to the same scale as signal error.y, but I do NOT see any chattering.

For u2(reference) signal: Constant all time

I wonder what kind of thing may cause this, as the error block is only a simple minus calculation, how come it induces this kind of chattering. Thanks!

HY

Was it helpful?

Solution

What you describe sounds exactly like chattering. The case you really need to watch out for is a case where the system dynamics on one side of an event drive it toward the event. In other words, if x>c, der(x) <= 0 and if x<=c, der(x) >= 0. Another case is if such an event occurs at an equilibrium point.

You say "what kind of thing may cause this", but it seems to me (at least from what I can understand of your description) that the answer is obvious. It is your error block. You say it "is only a simple minus calculation", but if there any kind of conditional expression in the block (which I assume there is), then an event will be triggered.

My guess, from your description, is that your system is coming to an equilibrium point at exactly the point where the condition statement transitions from true to false. As such, numerical noise in the solution at that point is cause it to cross back and forth across that threshhold triggering an event each time.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top