MATLAB/SIMULINK:模拟河流的填充和排空 [英] MATLAB / SIMULINK: Simulate filling and emptying of a river

查看:183
本文介绍了MATLAB/SIMULINK:模拟河流的填充和排空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:

河流的横截面不是恒定的.在标准条件下,水位为h_Std(请参见下图).

A river has a non-constant cross-section. Under standard conditions, the water level amounts h_Std (see figure below).

开始下雨时,水位上升直到等于h_Rain(见下图)

As it begins to rain, the water level rises until it is equal to h_Rain (see figure below)

雨停止后,水位下降回到标准水位.

After the rain stops, the water level decreases back to the standard water level.

从图中可以看出,水位和体积之间的关系不是恒定的.但是,该函数可以用数学来描述,并且以我特定的河流横截面而闻名.

As one can see from the diagrams, the relation between water level and volume is non-constant. However, the function can be desribed mathematically and is known for my particular cross-section of the river.

问题描述:

我想模拟下雨时河水的水位.下雨的信号可以是0(不下雨)或1(下雨)(请参见下图中的红色曲线):

I want to simulate the water level of the river over time in case of raining. The rain is represented by an signal which can either be 0 (not raining) or 1 (raining) (see red curve in figure below):

下图的深蓝色部分是非线性的,表示上图中的h_Std和h_Rain之间的区域.完全填满河流的时间是已知的(t_Fill).

The dark-blue parts of the lower diagram are nonlinear and represents the section between h_Std and h_Rain from the diagrams above. The time for completly filling the river is known (t_Fill).

一般来说,我想激活由外部信号触发的用户定义功能(在我的情况下,水/雨量与河流水位之间的关系)(在我的情况下,以雨水表示" -信号).

Generaly spoken, I want to activate an user-defined function (in my case the relation between the amount of water / rain and the water level of the river) triggered by an external signal (in my case represented by the "rain"-signal).

我如何获得这样的功能(通过带有Simulink块的Matlab代码oder)?

How can I obtain such a function (either with a piece of Matlab-Code oder with Simulink blocks)?

推荐答案

有几种方法可以完成,其中一种方法是使用启用的子系统来处理降雨阶段而不是降雨阶段.您需要更改以下2个子系统的内容,以在2个区域中反映您的确切身高分布.

There are several ways this could be done, one of which is to use enabled subsystems to process the raining and not raining phases. You'd need to change the contents of the 2 subsystems below to reflect your exact height profile in the 2 regions.

这篇关于MATLAB/SIMULINK:模拟河流的填充和排空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆