Simulink help solving numerical oscillation

Click For Summary
SUMMARY

The discussion centers on resolving numerical oscillations in a Simulink model simulating air flow between two chambers. The oscillations arise due to the disparity in time constants between the chambers and the power governing the air flow calculation, specifically when the power is less than one. The user, Tusike, has attempted various solutions, including filters and conditional flow adjustments, but has not achieved stability. The consensus suggests that modifying the system is necessary for stabilization, particularly when dealing with complex systems described by partial differential equations.

PREREQUISITES
  • Understanding of Simulink modeling and simulation techniques
  • Familiarity with differential equations, particularly ordinary and partial differential equations
  • Knowledge of numerical methods for solving differential equations, including Euler's method
  • Experience with control systems and stability analysis
NEXT STEPS
  • Research methods for stabilizing systems described by partial differential equations
  • Explore advanced Simulink techniques for managing oscillations in dynamic systems
  • Investigate the impact of time constants and gain parameters on system behavior
  • Study literature on numerical methods for improving convergence in simulations
USEFUL FOR

Engineers and researchers working with dynamic systems in Simulink, particularly those dealing with fluid dynamics and stability issues in numerical simulations.

Tusike
Messages
137
Reaction score
0
Hi!

I'm trying to compute air flow between chambers for a project.

I'm having a numerical oscillation problem, and I've created an example Simulink program that highlights the cause.

Please see the attached Simulink model for a clear understanding; in the following I will do my best to give an explanation about the model, the problem that arises, my interpretation for it, and the solutions I have tried.

Description of the model:
The chambers are represented by numbers, and the air flow between them is represented by a number flow. The number flow between two numbers is calculated based on the difference of the two numbers (diff raised to a given power).

In the example, we are trying to fill up a chamber through another chamber that is given a constant air flow. Some of this air goes out of the system into the environment, and some reaches Chamber 2. Over time, an equilibrium is reached.

The problem that arises:
The oscillation occurres when the two Chamber's pressure ( = value) get close to each other, and then gets amplified.
The two main reasons I have found for this behavior (besides the discrete time-step solution):
1. Chamber 2's "time constant"is much smaller than Chamber 1's. In the example, this means that a given air flow increases Chamber 2's value more than Chamber 1's. (Gain parameter of the Chamber block).
2. The rule governing the air flow between two chambers is (val1-val2)^power. If power < 1, the oscillation occurres.

My explanation:
I'm guessing that near the equilibrium, air doesn't flow out of Chamber 1 as much as before, but the air flowing in causes it's value to increase. And so Chamber 1's value is greater than it should be, and Chamber 2's value is less than it should be. (The time step governs, "by how much"). Then, during the next time step, due to the mentioned difference, more air flows from 1->2 than it should, causes Chamber 2's value to decrease more than it should. And so the oscillation starts, and is amplified due to the power being less than 1.

Attempt at the solution:
In the scopes, you can clearly see how the solution oscillates around the precise solution. I wish to find a solution which reaches the precise solution, (without altering the time-step, solver type (Euler!), power & gain factors.

I've tried a lot of things, some which work for this particular example (topology of elements), but I haven't found a global solution yet. Some of the things I tried:
-Filters (exponential + averaging) merely decreased the frequency and amplitude of the oscillation.
-I also tried checking if the two numbers are "near", + also if a change in air flow direction has occurred, and if so, have the air flow not change it's value for a time step. (Actually I tried a lot of things "that should happen" in the situation occurres, but none of them worked.

I'm done with "trying", I want to solve this problem using mathematical considerations, but I'm lost at how to start.

Any help (including ideas, ways to tackle the problem, or what literature I should check out) - is greatly appreciated!

-Tusike

Air flow (top) and pressure (value) change of a chamber:
example.jpg
 

Attachments

Last edited:
Physics news on Phys.org
I'm sorry you are not generating any responses at the moment. Is there any additional information you can share with us? Any new findings?
 
Hi!

Yes, I realized that the behavior is caused by the nature of the differential equations I'm working with. It seems the only solution is to modify the system in exchange for stability. The difficulty now arises in finding the least amount of modification needed to stabilize the system.

I was able to handle the case of a system described by one O.D.E (two chambers connected by a valve), but I didn't know how to extend my ideas to more complicated cases described by partial differential equations.

After this I wasn't sure that my problem actually related to math software, so I also posted in the General Math forum hoping to get help on how to continue:

https://www.physicsforums.com/showthread.php?t=762557

I also posted a short document of my calculations for the two chambers in the above thread.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 45 ·
2
Replies
45
Views
7K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 39 ·
2
Replies
39
Views
4K
  • · Replies 10 ·
Replies
10
Views
4K