From differential equations to transfer functions

In summary, the conversation revolves around finding transfer functions to design a block diagram on Simulink with a PID controller and transfer functions for a water tank system. The equations for water level and temperature are known, but the goal is to find transfer functions G and H. However, there are difficulties in algebraically finding the transfer functions due to the presence of square rooted H and voltage on both the numerator and denominator. Clarification on units and dimensional analysis is also needed.
  • #1
Maniac_XOX
86
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
  • #2
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.
 
  • #3
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
 
  • #4
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:
  • #5
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:
  • #6
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
 

1. What are differential equations?

Differential equations are mathematical equations that describe the relationship between a function and its derivatives. They are commonly used in physics, engineering, and other scientific fields to model dynamic systems and predict their behavior.

2. How are differential equations related to transfer functions?

Transfer functions are derived from differential equations by taking the Laplace transform of the equation. This transforms the equation from the time domain to the frequency domain, making it easier to analyze and manipulate.

3. What is the purpose of using transfer functions?

Transfer functions allow us to analyze the behavior of a system in the frequency domain, which can provide valuable insights and help us design and control systems more effectively. They also allow us to easily combine multiple systems and analyze their overall behavior.

4. Can transfer functions be used for nonlinear systems?

Transfer functions are typically used for linear systems, but they can also be used for some nonlinear systems. However, in these cases, the transfer function may only be valid for a limited range of input values.

5. How can transfer functions be used in real-world applications?

Transfer functions are widely used in various fields, including control systems, signal processing, and circuit analysis. They can help us understand and improve the performance of complex systems, such as electronic circuits, mechanical systems, and biological systems.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
12
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
13
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
Back
Top