# Transfer functions with constant voltage sources in them?

I am trying to get the transfer function: $$H(s)=\frac{V_o}{I_i}$$ For the following circuit:

simulate this circuit – Schematic created using CircuitLab

I think I can get it without $V_2+R_3$ by transforming $V_1+R_1$ into its Norton equivalent and summing the current sources together before retransforming them into the Thevenin equivalent and use standard RC blocks but even then I'm not sure: 1) whether the RC blocks can be done regardless of the impedance of $R_2+C_2$ compared to $C_1$ 2) if it's actually a transfer function (enabled me to wire it in Simulink at least).

And in the end, I do need $V_2+R_3$... Either way, I don't know what to do with those voltage sources to get the transfer function of the circuit.

## Update

In the comments it's been suggested to use the superposition theorem. I tried that:

1. Converted both $V_1+R_1$ and $V_2+R_2$ into their Norton equivalent

2. Defined $X_1=R_1||C_1$ and $X_2=R_3||C_3$

3. Calculated $V_o$ for $I_i$ open and $V_1$ shorted:

$$V_{o1}=\frac{X_2 \cdot (R_2+X_1)}{R_2+X_1+X_2} \cdot \frac{V_2}{R_3}$$

1. Calculated $V_o$ for $I_i$ open and $V_2$ shorted:

$$V_{o2}=\frac{X_2 \cdot X_1}{R_2+X_1+X_2}\cdot\frac{V_1}{R_1}$$

1. Calculated $V_o$ for $V_1$ and $V_2$ shorted:

$$V_{o3}=\frac{X_2 \cdot X_1}{R_2+X_1+X_2} \cdot I_i$$

However summing all that up does not enable me to isolate $I_i$ to calculate $H$...

• Laplace transform of a constant A = A/s Commented Jan 22, 2015 at 12:21
• Hadn't thought about it, thanks. But how does that fit in in that example? Commented Jan 22, 2015 at 12:40
• Use the principle of superposition, and consider the sources one at a time. Commented Jan 22, 2015 at 12:50
• Actually, xform of a STEP of magnitude A is A/s. Unless you set up initial conditions correctly, you'll end up with a transient response at the beginning, so you need to take that into account. Commented Jan 22, 2015 at 13:29
• I gave a try to the superposition theorem, but can't get H (updated my post)... Thanks Commented Jan 22, 2015 at 13:35

The key is to remember that a voltage source generates whatever current is needed to assert the voltage difference. However, a DC voltage source (as drawn in your schematic) doesn't assert any AC voltage and therefore doesn't drive any AC current either.

So at any nonzero frequency, the voltage sources just look like shorts to ground. Kirchhoff's current law gets you the transfer function in this case.

At DC, consider the current $I_1$ through $V_1$ and $I_2$ through $V_2$. We must have $I_i = I_1 + I_2$, but also we must have $\dfrac{I_1}{I_2} = \dfrac{R_2+R_3}{R_1}$. Solving these for $I_2$, we get $V_0 = V_2 + I_2 R_3$.

Using the superposition theorem you can simply break your circuit down into 3 with one source active at a time - the overall response is the sum of the responses of each.

You might want to evolve your model into a state-space representation instead of the transfer function. State space has multiple advantages:

• Multiple inputs and multiple outputs just as easily done as 1 input/1 output
• Allows initial conditions different than 0
• Quicker to evaluate (takes only matrix arithmetic), really easy to propagate/simulate. You can write your own propagator in a few lines.
• Which means that you can change the coefficients/physical parameters (say, if some depend on time or if some are not linear) in your own propagator without much hassle.

The downside being that it's more complex to obtain the matrices in the first place.

If you wish to do that, then:

1. Calculate using Kirchoff laws, for one voltage/current source at a time, the differential equation :$$f(V_o, \frac{dV_o}{dt}, \frac{d²V_o}{dt²})=0$$As an example, $$V_o=R_3*(\frac{V_i-V_{C1}}{R_1}-C_1\frac{dV_{C1}}{dt}-C_2\frac{dV_o}{dt})$$and $$V_{C1}=R_2*(C_2*\frac{dV_o}{dt}+\frac{V_o}{R_3})+V_o$$ should give you the first differential equation when V1 is the only one ON.
2. Rearrange each differential equation in the following way: $$\ddot{V_o}+a_{1,i}\dot{V_o}+a_{2,i}{V_o}=b_{0,i}U_i$$
3. From there you can build the A, B, C and D matrices that define the state space representation of each differential equation. You have the choice between defining V1 and V2 as inputs to your system, or to define them as state variables which have zero differential over time and set them once and for all in your initial conditions. Here is what the matrices look like if all are inputs: $$A_i=\begin{bmatrix} 0 & 1\\ -a_{2,i} & -a_{1,i} \end{bmatrix}$$ $$B_i=\begin{bmatrix} 0 & 0 & 0\\ b_{0,i} & b_{0,i} & b_{0,i} \end{bmatrix}$$ $$C_i=[1, 0]$$ $$D_i=0$$ For a state vector $$X_i=\begin{bmatrix} V_{o,i}\\ \dot{V_{o,i}} \end{bmatrix}$$ In $$\dot{X_i}=A_iX_i+B_iU_i$$ $$V_{o,i}=C_iX_i+D_iU_i$$ Where U_i is the input vector - a scalar for each of those 3 state space models (in my example, either V1 Ii or V2.
4. Finally, you can either solve those 3 models for each timestep and sum the responses together according to the superposition theorem $$V_o=\Sigma_i V_{o,i}$$ Or concatenate the 3 state space models in a single one and solve this one instead: $$\dot{X}=\begin{bmatrix}\dot{V}_{01} \\ \ddot{V}_{01} \\ \dot{V}_{02} \\ \ddot{V}_{02} \\ \dot{V}_{03} \\ \ddot{V}_{03} \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & 0 & 0 & 0 \\ -\gamma_1/\alpha_1 & -\beta_1/\alpha_1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & -\gamma_2/\alpha_2 & -\beta_2/\alpha_2 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & -\gamma_3/\alpha_3 & -\beta_3/\alpha_3 \end{bmatrix} \begin{bmatrix}{V}_{01} \\ \dot{V}_{01} \\ {V}_{02} \\ \dot{V}_{02} \\ {V}_{03} \\ \dot{V}_{03} \end{bmatrix} + \begin{bmatrix} 0 & 0 & 0 \\ \delta_1/\alpha_1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & \delta_2/\alpha_2 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & \delta_3/\alpha_3 \end{bmatrix} \begin{bmatrix}I_i \\ V_1 \\ V_2 \end{bmatrix}$$ $$V_o=\begin{bmatrix} 1 && 0 && 1 && 0 && 1 && 0 \end{bmatrix} X+\begin{bmatrix} 0 && 0 && 0 \end{bmatrix}\begin{bmatrix}I_i \\ V_1 \\ V_2 \end{bmatrix}$$

This might help you. I must admit I had the superposition theorem wrong the first time, obareey from the Maths SE helped me put that together.

... don't forget that transfer functions assume zero initial conditions, therefore constant terms are not recognised (unless they are truly step functions applied at t=0). Treating these as step inputs, having Laplace transform of the form A/s will not provide accurate results. This does not prevent Laplace transform analysis, however.