how to implement "2s+1" Tfcn in Simulink

4 views (last 30 days)
luis garay
luis garay on 16 Oct 2021
Answered: Paul on 16 Oct 2021
I'm trying to implement 2s+1 transfer function on simulink. If i use the Transfer function block (2 1 / 0 1) an error showns up. The denominator needs to be same or higher level.

Answers (1)

Paul
Paul on 16 Oct 2021
Can't be done explicitly as you've found.
Option 1: make the Tfcn (2*s + 1)/(c*s + 1) where c is small enough such that the output is good approximation to what you actually want for expected inputs signals to the block, but not so small that it drives the simulation step size very small and slows down the simulation. There may be a trade-off here and you have to have a good feel for your model to pick a good value of c.
Option 2: Use block diagram manipultion to absorb the 2s + 1 into the numerator of one or more other Tfcn blocks in the diagram. For example, if the ouput of the 2s+1 feeds another Tfcn block with denominator order greater than that of the numerator, you can convolve the 2s+1 with the numerator of that Tfcn block and still matain the same overall transfer function for that line in the diagram. Of course, whether or not this is feasible depends on the structure of the model.
Option 3: not recommended, use a Derivative block to numerically compute the derivative, udot, of the input signal, u, and then use a gain and sum block to form 2*udot + u.
Option 4: if the input, u, to the 2s+1 is coming from a source block or is some other known signal, you may be able to implement udot explcitly and then construct 2*udot + u.
I think this issue problem is discussed often on this forum,search "improper transfer function" for example.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!