# Transfer function / diff. eq. question

1. Nov 19, 2008

### mankku

Hi everyone!

I'm stuck with an assignment in control systems and I need some opinions on what I've got so far.

1. The problem statement, all variables and given/known data

The problem relates to an RC circuit as displayed:

The task is to form the differential equation and transfer function for the circuit, with V0(t) being the input and V2(t) being the output. The values for the components are given in the image. It is assumed that initial conditions (currents, voltages) are all zero.

2. Relevant equations

Well, basic electrical theory such as voltage, current, impedance as well as parallel and series combination of impedances, I guess.

3. The attempt at a solution

So I started out using the Laplace (frequency domain) impedances, attacking the problem from a voltage divider point of view. Thus, the resistor and capacitor on the left in the schematic were "combined" into a single impedance Z1, and the resistor and capacitor on the right were combined into Z2. The output voltage would thus be

$$V_{2}(s)=V_{0}(s) * \frac{Z_{2}(s)}{Z_{1}(s)+Z_{2}(s)}$$

Thus the transfer function is obtained through dividing by V0(s) and is thus

$$G(s) = \frac{V_{2}(s)}{V_{0}(s)} = \frac{Z_{2}(s)}{Z_{1}(s)+Z_{2}(s)}$$

The two impedances used are formed as:

$$Z_{1}(s) = R_1 || \frac{1}{sC} = \frac{\frac{R_1}{sC}}{\frac{sR_{1}C+1}{sC}} = \frac{R_1}{sR_{1}C+1}$$

$$Z_{2}(s) = R_2 + \frac{1}{sC} = \frac{sR_{2}C+1}{sC}$$

The sum of these two becomes:

$$Z_{1}(s)+Z_{2}(s) = \frac{sR_1C}{sC(sR_{1}C+1)}+\frac{(sR_{2}C+1)(sR_{1}C+1)}{sC(sR_{1}C+1)} = \frac{s^{2}R_{1}R_{2}C^{2}+s(2R_{1}C+R_{2}C)+1}{sC(sR_{1}C+1)}$$

Forming the transfer function now then, we invert the above calculated sum and multiply by Z2(s) to obtain:

$$G(s) = \frac{Z_{2}(s)}{Z_{1}(s)+Z_{2}(s)} = \frac{sR_{2}C+1}{sC}*\frac{sC(sR_{1}C+1)}{s^{2}R_{1}R_{2}C^{2}+s(2R_{1}C+R_{2}C)+1}$$

The sC eliminate each other and I am left with:

$$G(s) = \frac{(sR_{1}C+1)(sR_{2}C+1)}{s^{2}R_{1}R_{2}C^{2}+s(2R_{1}C+R_{2}C)+1}$$

Which given a bit of cleaning turns into

$$G(s) = \frac{s^{2}R_{1}R_{2}C^{2}+s(R_{1}C+R_{2}C)+1}{s^{2}R_{1}R_{2}C^{2}+s(2R_{1}C+R_{2}C)+1}$$

In case someone wants to plug in the values given for the components, the result becomes

$$G(s) = \frac{0.0000027s^2+0.0037s+1}{0.0000027s^2+0.0064s+1} = \frac{s^2+1370.37s+370370.37}{s^2+2370.37s+370370.37}$$

4. The real question :tongue2:

The reason why I'm asking is that this transfer function seems quite ok to start with. The zeroes and poles are all real, which means from a stability point of view that the system does not oscillate, as would be expected by an RC circuit. Also, the DC gain (i.e. s -> 0) is 1, which holds true seeing that if the input signal is DC, then the capacitor on the right is an open circuit and the resistor R_1 pulls the output to equal the input. So from this point of view, I'm satisfied.

On the other hand, is it possible to have a transfer function with numerator of equal degree as the denominator? I know that Simulink does not like that, and I don't know how to work around this. I have done a long division on the two polynoms and sure, it gave me 1+<something> where something had a numerator with degree less than that of the denominator, but IMO that does not help in this situation.

So to get the differential equation I would be tempted to use the expression for G(s) that I have, multiply with denominator and V0(s) and do an inverse Laplace transform. The problem is that I'm unsure whether I am allowed to do that and if that will yield the correct answer.

The diff.eq. I would get would thus be:

$$\ddot{v_2}(t)+2370.37\dot{v_2}(t)+370370.37v_{2}(t) = \ddot{v_0}(t)+1370.37\dot{v_0}(t)+370370.37v_{0}(t)$$

First of all, if anyone actually read through this in detail, thank you.

If you have any thoughts on the above, please reply because I am in desperate need of assistance. The assignment is due on Tuesday so there is still time, however I would like to get this sorted out of the way because it has been bothering me for several days now.

Cheers

// Mankku

Last edited: Nov 19, 2008
2. Nov 19, 2008

### The Electrician

Right away, you have a problem with the voltage divider expression. The fraction should be:

Z2(s)
------------
Z1(s)+Z2(s)

I won't even bother to follow the rest of it until you fix this.

3. Nov 19, 2008

### mankku

Which was indeed a typo on my behalf. The rest should be correct. Thanks for pointing the typo out, hopefully it hasn't caused others to stop reading through the post.

// Mankku

4. Nov 19, 2008

### The Electrician

The transfer function is correct. There's nothing wrong with having the numerator and denominator of equal degree. All pass functions are an example of such a thing.

As far as "the differential equation" of the circuit, there are various ways of doing that. I would have thought you should solve the network with one of the standard methods such as the loop or node method, but using the constitutive relation (i(t) = C*de/dt) for the capacitor, instead of the Laplace formulation (using the variable s).

5. Nov 20, 2008

### CEL

When you divide the numerator by the denominator of the transfer function you get
$$\frac{V_2(s)}{V_0(s)} = 1 + \frac{R(s)}{D(s)}$$, where D(s) is the denominator and R(s) the remainder of the division.
So, $$V_2(s) = V_0(s) + \frac{R(s)}{D(s)}V_0(s)$$.
You only have to worry with the inverse transform of the second term in the sum, since the first one is an identity.

6. Nov 20, 2008

### mankku

In fact, the solution to the problem hit me this morning while I was having breakfast. It's kinda odd how the mind works, I wasn't even thinking about the assignment and suddenly *boing*, it hit me. And in five minutes I had derived the differential equation from scratch, and it corresponds to the transfer function I had worked out earlier.

When I got to work, I looked up the Wikipedia article on state space models, as the assignment next required me to form one for the system in question. There, I was introduced to the concept of proper and strictly proper transfer functions. In fact, I had performed the division which CEL suggested, but thought that it was of no use. Now I know otherwise.

I was able to make a Simulink model of the system, simulate with the required inputs and now all I have to do is write the report. Thanks to both of you guys for your input.

Cheers

// Mankku