+ Post New Thread
Results 1 to 20 of 21

9th December 2016, 13:21 #1
 Join Date
 Dec 2016
 Posts
 13
 Helped
 0 / 0
 Points
 127
 Level
 1
Inverse Transfer Function in sDomain
Hello,
I have the transfer function of a system in the sdomain. For a given output I want to obtain the input. The most natural way to me seems to multiply the output with the inverse of the
transfer function. The problem in implementing this e.g. in Matlab is, that the inverse transfer function would have more zeros than poles which leads to an error.
Another idea is for example to implement a block diagram in simulink. The input is my output signal and in the negative feedback I put the original transfer function. This approach, however does not lead to the desired results.
I'm glad for any hints!

9th December 2016, 13:21

9th December 2016, 17:09 #2
 Join Date
 Dec 2015
 Location
 Madrid, Spain
 Posts
 742
 Helped
 185 / 185
 Points
 4,175
 Level
 15
Re: Inverse Transfer Function in sDomain
Do you have analytical form of the output , or just an array of values ?

9th December 2016, 17:32 #3

12th December 2016, 10:41 #4
 Join Date
 Dec 2016
 Posts
 13
 Helped
 0 / 0
 Points
 127
 Level
 1
Re: Inverse Transfer Function in sDomain
The output is just an array of values

12th December 2016, 11:00 #5

12th December 2016, 11:13 #6
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 40,376
 Helped
 12335 / 12335
 Points
 233,680
 Level
 100
Re: Inverse Transfer Function in sDomain
Answering post #2, I suppose.

12th December 2016, 14:28 #7

13th December 2016, 11:38 #8
 Join Date
 Dec 2016
 Posts
 13
 Helped
 0 / 0
 Points
 127
 Level
 1
Re: Inverse Transfer Function in sDomain
What do you mean with the diffOperator in this case?
If I decompose A(s) still has more zeros than poles.

13th December 2016, 11:38

13th December 2016, 13:06 #9
 Join Date
 Oct 2006
 Location
 Real Homeless
 Posts
 1,530
 Helped
 428 / 428
 Points
 10,889
 Level
 25
Re: Inverse Transfer Function in sDomain
A(s) is polynomial not rational.
http://www.webmath.com/polydiv.html
https://en.wikipedia.org/wiki/Polynomial_long_divisionLast edited by pancho_hideboo; 13th December 2016 at 13:25.

13th December 2016, 19:04 #10
 Join Date
 Dec 2015
 Location
 Madrid, Spain
 Posts
 742
 Helped
 185 / 185
 Points
 4,175
 Level
 15
Re: Inverse Transfer Function in sDomain
Plot the output and show it here. Show transfer function of your model also.

13th December 2016, 19:04

14th December 2016, 06:42 #11
 Join Date
 Feb 2015
 Posts
 727
 Helped
 217 / 217
 Points
 4,410
 Level
 15
Re: Inverse Transfer Function in sDomain
This is the problem of deconvolution. https://en.wikipedia.org/wiki/Deconvolution
In general, you will have an approximation of the inverse. It is sometimes impossible to get an exact inverse. For example, a highpass filter with 0 gain at 0Hz will result in an inverse filter with infinite gain at 0Hz.
Likewise, for a causal filter the inverse will be noncausal.

15th December 2016, 10:28 #12
 Join Date
 Dec 2016
 Posts
 13
 Helped
 0 / 0
 Points
 127
 Level
 1
Re: Inverse Transfer Function in sDomain
Ok so below I attached the circuit model. This model is a rough estimate of what the system really looks like. In order to reobtain the input signal (which is the current at the ampmeter, a monoexponential decay) I first want to find a solid method for this model before I apply it to the actual system. Of course I could derive the exact transfer function for the simulation, but since it won't be possible for the real circuit I suppose to only know the output voltage and the input current.
Then I used the system identification toolbox in order to estimate the system's transfer function. I did so for different numbers of poles/zeros. (Estimation was >99%).
I fed that to the Simulink model below. Here I first apply the transfer function to the current input and then do the inverse by putting the transfer function into the negative feedback.
If I do so for a transfer function with 2 poles and 2 zeros I approximate the input better for higher gain. However the signal starts to oscillate unboundedly towards the end ( Can be avoided for gain > inf).
The important part of the signal (which is the monoexponential decay at the beginning) can however be reconstructed very well. (Yellow curve is input, red curve after transfer function, blue curve after inverse transfer function).
If I then choose a transfer function with 3 poles and 2 zeros the input signal cannot be approximated anymore by applying the inverse transfer function. If the gain is choose to high an error occurs and the simulation terminates.
From the simulation model I should expect 0 zeros (op amp circuit at output is 2nd order low pass bessel filter) and 3 poles. Results with that combination are however similar to the ones with 3 poles and 2 zeros.
Thanks for your advice!Last edited by twig27; 15th December 2016 at 10:48.

15th December 2016, 16:46 #13
 Join Date
 Dec 2016
 Posts
 13
 Helped
 0 / 0
 Points
 127
 Level
 1
Re: Inverse Transfer Function in sDomain
Since any of the transfer functions I estimated has zeros in the right half plane, I guess the approach with the transfer function in the negative feedback is not going to work, because the will turn into poles and cause unbounded oscillations. Correct?
I did also try a Simulink model with input>transfer function>inverse transfer function> recover input signal. If I however plug in any other signal into the inverse transfer function the ouput will oscillate again.
Does this mean that for my circuit it is impossible to apply the inverse transfer function to the output in order to recover the input signal?

15th December 2016, 20:21 #14
 Join Date
 Dec 2015
 Location
 Madrid, Spain
 Posts
 742
 Helped
 185 / 185
 Points
 4,175
 Level
 15
Re: Inverse Transfer Function in sDomain
First of all, before jumping into the "find the input necessary that gives a desired output" problem, you have to check the output of your model. Seems like the output is unstable for your input. In such case, you have to stabilize it. (I do not see how that is possible since System Identification Toolbox gave you that).
Since any of the transfer functions I estimated has zeros in the right half plane, I guess the approach with the transfer function in the negative feedback is not going to work, because the will turn into poles and cause unbounded oscillations. Correct?
If Identification tool from MATLAB gives you several matches, obviously you have to choose the easiest one.
I did also try a Simulink model with input>transfer function>inverse transfer function> recover input signal. If I however plug in any other signal into the inverse transfer function the ouput will oscillate again.
Does this mean that for my circuit it is impossible to apply the inverse transfer function to the output in order to recover the input signal?
1 members found this post helpful.

19th December 2016, 14:52 #15
 Join Date
 Dec 2016
 Posts
 13
 Helped
 0 / 0
 Points
 127
 Level
 1
Re: Inverse Transfer Function in sDomain
I've been trying to make the inverse transfer function proper by adding negative poles far away from the imaginary axis, i.e. multiplying by (s+1E6)^2.
This worked well for the simulation containing only the bessel filter which has 2 poles. I am able to get a pretty good reconstruction of my original signal. (The actual poles are around 2E4).
If I add another RC Lowpass which introduces another pole the same method stops working. In this case I multiply by (s+1E6)^3 before inversion. The transfer function then becomes proper.
If I choose the artificial poles way to far from the imaginary axis, the reconstruction will also fail.
Is there a method to find the optimal location of artificial poles, so they only have a negligible impact on the transfer function characteristics?

19th December 2016, 18:52 #16
 Join Date
 Dec 2015
 Location
 Madrid, Spain
 Posts
 742
 Helped
 185 / 185
 Points
 4,175
 Level
 15
Re: Inverse Transfer Function in sDomain
10 times farther than the dominant poles should be O.K.
1 members found this post helpful.

19th December 2016, 18:52

8th February 2017, 11:39 #17
 Join Date
 Oct 2006
 Location
 Real Homeless
 Posts
 1,530
 Helped
 428 / 428
 Points
 10,889
 Level
 25
Re: Inverse Transfer Function in sDomain
Originally Posted by twig27
x2 = diff(x1)/dt
x3 = diff(x2)/dt
y = x3 + a*x2 + b*x1 + c*x
If you don't have much data points for input x, you have to increase them by invoking interp1().
And I recommend independent variable, t is equispaced, dt.
Code:dt=2*pi/1000; t=[0:dt:2*pi]; x=sin(t); size(x) >> 1, 1001 x1=diff(x)/dt x2=diff(x1)/dt x3=diff(x2)/dt size(x1) >> 1, 1000 size(x2) >> 1, 999 size(x3) >> 1, 998 y = x3(1:end) + x2(2:end) + x1(3:end) + x(4:end)
Code:>> plot(x, 'r') >> hold on, grid on >> plot(x1, 'c') >> plot(x2, 'g') >> plot(x3, 'y')
Last edited by pancho_hideboo; 8th February 2017 at 11:59.

15th February 2017, 16:05 #18
 Join Date
 Dec 2016
 Posts
 13
 Helped
 0 / 0
 Points
 127
 Level
 1
Re: Inverse Transfer Function in sDomain
Thanks for explaining the technique! It works quite well, however there are problems when I try reconstruct a signal containing high freuquencies. The reconstructed signal exhibits strong oscillations. Are there certain constraints with regard to time resolution?
Could you recommend any literature on this?
Thanks!

15th February 2017, 16:23 #19
 Join Date
 Oct 2006
 Location
 Real Homeless
 Posts
 1,530
 Helped
 428 / 428
 Points
 10,889
 Level
 25
Re: Inverse Transfer Function in sDomain
Show me input signal and reconstructed output signal.
It is no more than linear differential and integral equation problem.
So any elementary mathematics text book will be enough helpful for you.
Consider a decomposition of an input signal to low frequency and high frequency components.Last edited by pancho_hideboo; 15th February 2017 at 16:33.

15th February 2017, 17:39 #20
 Join Date
 Dec 2015
 Location
 Madrid, Spain
 Posts
 742
 Helped
 185 / 185
 Points
 4,175
 Level
 15
+ Post New Thread
Please login