From differential equations to transfer functions

Click For Summary

Discussion Overview

The discussion revolves around deriving transfer functions for a water tank system using differential equations. Participants are exploring the mathematical modeling of the system, including the effects of input flow and temperature on the water level and temperature dynamics, with a focus on using Laplace transforms to obtain transfer functions suitable for a PID controller in a Simulink block diagram.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • The first differential equation for water level is presented, but participants express difficulty in factoring due to the square root of height, H.
  • The second differential equation for temperature includes voltage as both an input and a parameter, complicating the derivation of a transfer function.
  • Some participants question the dimensional consistency of the equations, particularly regarding the units of flow and voltage.
  • One participant suggests examining the case with no input flow to simplify the analysis of the first equation.
  • Another participant attempts to carry the square root of H to the left side and applies Laplace transforms, leading to a series of algebraic manipulations to derive a transfer function.
  • There is confusion regarding the treatment of voltage as a dimensionless quantity and the implications of using different units for flow rates.

Areas of Agreement / Disagreement

Participants express various levels of understanding and confusion regarding the equations and their dimensional analysis. There is no consensus on the correctness of the equations or the treatment of units, indicating multiple competing views and unresolved issues.

Contextual Notes

Participants note limitations in the clarity of variable definitions and units, which may affect the analysis. The discussion reflects ongoing attempts to reconcile different approaches to the mathematical modeling of the system.

Who May Find This Useful

This discussion may be useful for students and practitioners in engineering and applied mathematics who are interested in control systems, differential equations, and dimensional analysis in the context of fluid dynamics.

Maniac_XOX
Messages
86
Reaction score
5
*** MENTOR NOTE: This thread was moved from another forum to this forum hence no homework template.

Summary:: Trying to find transfer functions to design a block diagram on simulink with a PID controller and transfer functions for a water tank system.

----EDIT---
The variables and parameters presented are:
H, height measured in m
T, temperature of the water
F_in, flow of water directed inside the tank measured in m^3/hr
F_out, flow of water out of the tank measured in m^2.5/hr
Volume of the tank measured in m^3
A, cross sectional area of the tank measured in m^2
rho, water density measured in kg/m^3
Q, heat input measured in kJ/hr
Voltage, amplifier that makes water flow in, units are not considered as they do not affect equations.
T_in, initial temperature of the water measured in 10C

----ORIGINAL POST---

Bit of a long one, here we go!

The water level equation is known to be:

##\frac {dH}{dt} = (F_{in} Voltage - F_{out} \sqrt {H}) \frac {1}{A}##

whilst the temperature equation is known to be:

##\frac {dT}{dt} = \frac {(F_{in} Voltage)(T_{in}-T)}{Volume} + \frac {Q}{Volume*\rho*C_p} ##

where:
H and T are OUTPUTS;
Voltage is the INPUT;
T_in. F_in, F_out, rho, Cp, Q are parameters;

The target is to find the Transfer Functions G and H respectively, where $$ \text{transfer function, G or H} = \frac {\text{Laplace transform of Output}}{\text {Laplace transform of Input}} = \frac {\theta_o}{\theta_i}$$

After getting the Laplace transforms, substituting all the differential operators with the Laplace operator s to simplify, I cannot manage to find algebraically a Transfer function.

1st equation: $$ AsH_{(s)} + F_{out} \sqrt {H} = (F_{in} Voltage)$$ the problem is the square rooted H, which does not let me factorize the H to achieve an equation of the form ## G = \frac {H_{(s)}}{Voltage}##. I tried achieving it by squaring, thus obtaining a quadratic equation, but finding the roots of H didnt work.

2nd equation: $$s{T_{(s)} + \frac {(F_{in} Voltage)T_{(s)}}{Volume}}= \frac {(F_{in} Voltage)T_{in}}{Volume} + \frac {Q}{Volume*\rho*C_p} $$ the problem is the voltage being on both numerator and denominator of the right hand sign when I factorize the T, therefore being unable to factorize Voltage and get a transfer function in terms of s and parameters only, Voltage is an amplifier and independent variable. Much like the first, am trying to find an equation of the form ## H = \frac {T_{(s)}}{Voltage}##

If you read this far you're a trooper, thank you for any help!
 
Last edited by a moderator:
Physics news on Phys.org
Sorry, I haven't taken the time yet to really understand everything the way you present it.
However, my motivation left when I read the first equation. What are the units? Maybe address dimensional analysis first, because it looks to me like you have, dimensionally speaking ##\sqrt{ distance } = voltage ## and maybe nothing with time in it, although you didn't define "A" or "F".

Slow down, try again, communicate more clearly. We aren't mind readers here.
 
DaveE said:
Sorry, I haven't taken the time yet to really understand everything the way you present it.
However, my motivation left when I read the first equation. What are the units? Maybe address dimensional analysis first, because it looks to me like you have, dimensionally speaking ##\sqrt{ distance } = voltage ## and maybe nothing with time in it, although you didn't define "A" or "F".

Slow down, try again, communicate more clearly. We aren't mind readers here.
I'll try edit it better right now thank you. In response to the unit analysis, the voltage is an amplifier as I mentioned therefore its units do not affect the equation (as i have been told by the lecturer). I will add the units and define all the variable so that it is clearer
 
Maniac_XOX said:
I will add the units and define all the variable so that it is clearer
Clearer, but still not clear dimensionally speaking. While maybe not necessary for your HW assignment, as a practicing engineer, I'm not really OK with flow sometimes being ##m^3/sec## and other times being ##m^{2.5}/sec##. But maybe we should just ignore all of the units since we already have the "mystery volts" that don't count. If you want to see a bit about a dimensionally correct treatment of flow from a tank, you can look at this.

So when you took the transform of the first equation, you did the transform of the left side ##\frac{dH}{dt}## but not the right side, it also has a H term that matters. Maybe as a first step you should look at the case with no input flow, where we have something like ##\frac{dx(t)}{dt} = -k \sqrt{x(t)}## with k constant.
 
Last edited:
DaveE said:
Clearer, but still not clear dimensionally speaking. While maybe not necessary for your HW assignment, as a practicing engineer, I'm not really OK with flow sometimes being ##m^3/sec## and other times being ##m^{2.5}/sec##. But maybe we should just ignore all of the units since we already have the "mystery volts" that don't count. If you want to see a bit about a dimensionally correct treatment of flow from a tank, you can look at this.

So when you took the transform of the first equation, you did the transform of the left side ##\frac{dH}{dt}## but not the right side, it also has a H term that matters. Maybe as a first step you should look at the case with no input flow, where we have something like ##\frac{dx(t)}{dt} = -k \sqrt{x(t)}## with k constant.
honestly i am confused about her mention of the volt units as well lol, coming from a physics background i am not used to that concept.. The m^2.5 of Flow_out i am also unsure although that si the info I have been given in the HW, when i analyse the units i do find that they seem to match on both sides though, as long as the Voltage is considered without units, for some reason, I'll ask her about this.
ANYYWAYY, i tried carrying the ##\sqrt{H}## on the left side and taking the Laplace transform of both H terms. I have looked at a Laplace transform table for the conversions and have come up with the following:
$$\frac{dH}{dt} = \frac{F_{in}\text{Voltage}-F_{out}\sqrt{H}}{\text{Volume}}$$
$$\frac{dH}{dt} + \frac{F_{out}\sqrt{H}}{Volume}= \frac{F_{in}\text{Voltage}}{\text{Volume}}$$
Laplace transform:
$$sH + k_o\frac{\sqrt{\pi}}{2s^{\frac{3}{2}}}=k_i \frac{1}{s}$$
where: $$\text{INPUT}, V= \frac{1}{s}$$, $$k_o = \frac{F_{out}}{\text{Volume}}$$ and
$$ k_i=\frac{F_{in}}{\text{Volume}}$$

Therefore:
$$G = \frac{sH + k_o\frac{\sqrt{\pi}}{2s^{\frac{3}{2}}}}{\frac{1}{s}}=k_i$$
$$G = s^2H + k_o\frac{\sqrt{\pi}}{2s^{\frac{2}{2}}}=k_i$$
$$G = s^2H =k_i- k_o\frac{\sqrt{\pi}}{2s}$$

Which ultimately becomes:
$$G=s^2H=\frac{k}{s}$$ where $$k= \frac{1}{\text{Volume}}(F_{in}-F_{out})\frac{\sqrt{\pi}}{2}=0.2186$$

1649093298948.png


image source: https://www.bitdrivencircuits.com/Math_Physics/laplace.html
 
Last edited:
Maniac_XOX said:
honestly i am confused about her mention of the volt units as well lol, coming from a physics background i am not used to that concept.. The m^2.5 of Flow_out i am also unsure although that si the info I have been given in the HW, when i analyse the units i do find that they seem to match on both sides though, as long as the Voltage is considered without units, for some reason, I'll ask her about this.
ANYYWAYY, i tried carrying the ##\sqrt{H}## on the left side and taking the Laplace transform of both H terms. I have looked at a Laplace transform table for the conversions and have come up with the following:
$$\frac{dH}{dt} = \frac{F_{in}\text{Voltage}-F_{out}\sqrt{H}}{\text{Volume}}$$
$$\frac{dH}{dt} + \frac{F_{out}\sqrt{H}}{Volume}= \frac{F_{in}\text{Voltage}}{\text{Volume}}$$
Laplace transform:
$$sH + k_o\frac{\sqrt{\pi}}{2s^{\frac{3}{2}}}=k_i \frac{1}{s}$$
where: $$\text{INPUT}, V= \frac{1}{s}$$, $$k_o = \frac{F_{out}}{\text{Volume}}$$ and
$$ k_i=\frac{F_{in}}{\text{Volume}}$$

Therefore:
$$G = \frac{sH + k_o\frac{\sqrt{\pi}}{2s^{\frac{3}{2}}}}{\frac{1}{s}}=k_i$$
$$G = s^2H + k_o\frac{\sqrt{\pi}}{2s^{\frac{2}{2}}}=k_i$$
$$G = s^2H =k_i- k_o\frac{\sqrt{\pi}}{2s}$$

Which ultimately becomes:
$$G=s^2H=\frac{k}{s}$$ where $$k= \frac{1}{\text{Volume}}(F_{in}-F_{out})\frac{\sqrt{\pi}}{2}=0.2186$$

View attachment 299402

image source: https://www.bitdrivencircuits.com/Math_Physics/laplace.html
Noticed a couple of my own mistake so I'll fix them real quick. in the Laplace transform of the input term, V as it should result in ##\frac{1}{s^2} \text{instead of} \frac{1}{s}##

So, on the Therefore part:
$$sH_{(s)} =\frac{k_i}{s^2} - k_o\frac{\sqrt{\pi}}{2s^{\frac{3}{2}}}$$
Next, bring the s from the left side to the right side:
$$H_{(s)} = \frac{k_i}{s^3} - k_o\frac{\sqrt{\pi}}{2s^2}$$
Now, i divide ##H_{(s)}## by ##V_{(s)} = \frac{1}{s^2}## to get the result of transfer function G.
$$\frac{H_{(s)}}{V_{(s)}} = s^2 H_{(s)} = s^2 (\frac{k_i}{s^3} - k_o\frac{\sqrt{\pi}}{2s^2})$$
$$s^2 H_{(s)} = \frac{k_i}{s} - k_o\frac{\sqrt{\pi}}{2}$$
Therefore, ##G = \frac{H_{(s)}}{V_{(s)}} = \frac{k_i}{s} - k_o\frac{\sqrt{\pi}}{2}##
Where, ##k_i = \frac{F_in}{Volume}## and ##k_o = \frac{F_out}{Volume}##
$$G = \frac{\frac{F_in}{Volume}}{s} - \frac{F_out}{Volume}\frac{\sqrt{\pi}}{2}$$
$$G = \frac{4}{15s} - \frac{1}{50}\frac{\sqrt{\pi}}{2} =\frac{0.8-0.079765}{3s} $$Please let me know if this is correct this time.. thanks
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
1
Views
2K