Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Simulink help solving numerical oscillation

  1. Jul 16, 2014 #1
    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
     

    Attached Files:

    Last edited: Jul 16, 2014
  2. jcsd
  3. Aug 10, 2014 #2
    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?
     
  4. Aug 17, 2014 #3
    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook