Transfer function for Rayleigh-Plesset equation

I want to calculate the transfer function for the following second order nonlinear differential equation:

eq = x[t]*x''[t] + 3/2*x'[t]^2 == (1 + w)*x[t]^(-3*k) -
1 - (2/(w*x[t])) - (4*β*x'[t]/x[t]) - f*Sin[Ω*t]


with x[0] = 1 and x'[0] = 0, while β,w,k,Ω are constants.

• What is the transfer function is this context and how does one calculate it? What have you done so far? Feb 10 at 10:41
• You can't have transfer function for non linear ode. This is by definition. You have to either linearize the ode around some point, or obtain state space representation which will be non-linear state space. Mathematica supports nonlinear state space, Feb 10 at 10:51
• What is $f$? Is $f \sin (\Omega t)$ an input signal? Feb 10 at 22:41
• Yes, it is an input signal. Feb 11 at 0:00
• That makes sense. The input signal is not part of the model. Feb 11 at 0:43

You can't have transfer function for nonlinear ode. You have to either first linearize it around some operating point, or use nonlinear state space representation.

Mathematica has NonlinearStateSpaceModel

$$xx^{\prime\prime}+\frac{3}{2}\left( x^{\prime}\right) ^{2}=\left( 1+\omega\right) x^{k-3}-1-\frac{2}{\omega x}-4\beta\frac{x^{\prime}}{x} -f\sin\left( \Omega t\right)$$

Let $$x=x_{1},x_{2}=x^{\prime}$$. Then $$x_{1}^{\prime}=x_{2}$$ and $$x_{2} ^{\prime}=x^{\prime\prime}$$. From the above

\begin{align*} x^{\prime\prime} & =-\frac{3}{2}\frac{\left( x^{\prime}\right) ^{2}} {x}+\left( 1+\omega\right) \frac{x^{k-3}}{x}-\frac{1}{x}-\frac{2}{\omega x^{2}}-4\beta\frac{x^{\prime}}{x^{2}}-\frac{1}{x}f\sin\left( \Omega t\right) \\ x_{2}^{\prime} & =-\frac{3}{2}\frac{\left( x_{2}\right) ^{2}}{x_{1} }+\left( 1+\omega\right) x_{1}^{k-2}-\frac{1}{x_{1}}-\frac{2}{\omega x_{1}^{2}}-4\beta\frac{x_{2}}{x_{1}^{2}}-\frac{1}{x_{1}}f\sin\left( \Omega t\right) \end{align*}

Therefore the system is

$$\begin{pmatrix} x_{1}^{\prime}\\ x_{2}^{\prime} \end{pmatrix} = \begin{pmatrix} x_{2}\\ -\frac{3}{2}\frac{\left( x_{2}\right) ^{2}}{x_{1}}+\left( 1+\omega\right) x_{1}^{k-2}-\frac{1}{x_{1}}-\frac{2}{\omega x_{1}^{2}}-4\beta\frac{x_{2} }{x_{1}^{2}}-\frac{1}{x_{1}}f\sin\left( \Omega t\right) \end{pmatrix}$$

In Mathematica the above becomes

eq1 = x2
eq2 = -3/2*x2^2/x1 + (1 + ω)*x1^(k - 2) - 1/x1 -
2/(ω*x1^2) - 4*β*x2/x1^2 - 1/x1*f*Sin[Ω*t]
nsys = NonlinearStateSpaceModel[{{eq1, eq2}, {x1}}, {{x1, 1}, {x2, 0}}, u]


And now

param = {k -> 5, f -> 2, ω -> 3, β -> 4, Ω -> 4}
OutputResponse[nsys /. param, UnitStep[t], {t, 0, 2.3}];
Plot[%, {t, 0, 2.3}, PlotRange -> All]


Using different parameters

param = {k -> 1, f -> 2, ω -> 3, β -> 4, Ω -> 4}
OutputResponse[nsys /. param, UnitStep[t], {t, 0, 5}];
Plot[%, {t, 0, 5}, PlotRange -> All]


As Nasser alluded to, you can only have a transfer function of a nonlinear system by linearizing it about an operating point.

Usually the operating point is the origin, but not for this system because $$x(t)$$ appears in the denominator. You already specified $$x(t)=1$$ and we're going to start with that. I'm also going to assume that $$f \sin (\Omega t)$$ is an input signal and will denote it by $$u(t)$$.

eq = x[t]*x''[t] + 3/2*x'[t]^2 == (1 + w)*x[t]^(-3*k) - 1 - (2/(w*x[t]))-
(4*β*x'[t]/x[t]) - u[t]

opPtX = {x[t] -> 1};
eq /. opPtX /. Derivative[_][_][t] :> 0;
opPtU = Solve[%, u[t]][[1]]


{u[t] -> (-2 + w^2)/w}

Now you can compute the transfer function directly from the equation and operating point using StateSpaceModel and converting it using TransferFunctionModel.

TransferFunctionModel[StateSpaceModel[eq, opPtX, opPtU, x[t], t], s]


This is the transfer function from $$\Delta x$$ to $$\Delta u$$. That is the deviations of $$x$$ and $$u$$ from the above operating point values.

• Thanks @Suba Thomas Feb 11 at 0:02