## Transfer Function of a simple Circuit using Simulink

on 25 May 2014
Latest activity Commented on by Kashif Mehmood

### Kashif Mehmood (view profile)

on 5 Sep 2019 at 13:36

I have a simple circuit for which I just need to obtain transfer function using Simulink. I have attached the image below. Any help would be appreciated. Thanks

### Products

on 30 May 2014

on 30 May 2014

You did not specify which transfer function you want. Let's assume you want a transfer function from input voltage to output voltage.
1. Start a new Simulink model and add Capacitor, Inductor and Resistor blocks from Simscape, Foundation Library, Electrical, Electrical Elements:
2. Add Controlled Voltage Source block (from Electrical Sources sublibrary) for providing input voltage, Voltage Sensor (Electrical Sensors sublibrary) for measuring output voltage, also add Electrical Reference (ground) (Electrical Elements sublibrary) and Solver Configuration block (Utilities sublibrary in Simscape). Connect the blocks as shown in your image, and specify all the values as shown in the image.
3. Add Simulink-PS Converter and PS -Simulink Converter blocks (also from Utilities sublibrary) for converting Simulink signal to physical signal and back. Use Step block as an input to the model, and Scope as the output.
4. Now right click on the line coming from Step block, and select Linear Analysis Points - Input Perturbation. Right click on the line coming from PS-Simulink Converter block and select Linear Analysis Points - Output Measurement. Note that this requires a license of Simulink Control Design .
5. In the menu select Analysis - Control Design - Linear Analysis
6. In the Linear Analysis Tool click on Linearize:
This linearizes the model, plots the step response (or some other graph if you selected something else, Bode plot, for example) and adds a computed linear system to Linear Analysis Tool workspace:
8. Copy linsys1 to MATLAB workspace (drag and drop in Linear Analysis Tool).Now you can look at the formula and use the linear system for further analysis and design

on 20 Jun 2019
@ Rajan Kumar:
If the transformer only has passive elements - yes. If it has power semiconductors, then this approach will not work, as power semiconductors are essentially swithces with discontinuities and cannot be linearized. In that case you will need to use ac sweep approach - see my other comment below.
Kashif Mehmood

### Kashif Mehmood (view profile)

on 5 Sep 2019 at 13:36
Dear sir i have succesfully simulated your example.its really a nice example to understand.
i want to find out the transfer function of this circuit can you help me please .i have followed the steps but getting errors
Kashif Mehmood

### Kashif Mehmood (view profile)

on 5 Sep 2019 at 13:36
@ Rajan Kumar
did you get transfer function of the transformer

### Luigi Dilan Gervasio (view profile)

on 19 May 2016

Sorry, I can obtain a symbolic transfer function without specific value of my component?

Luke Rucker

### Luke Rucker (view profile)

on 20 Nov 2018
This is the real question.
fima v

### fima v (view profile)

on 7 Jun 2019
yes i will be happy to have a parametric transfer function

on 20 Jun 2019
No, creation of a symbolic transfer function from a Simscape model is not supported.

### Azzi Abdelmalek (view profile)

on 25 May 2014

Do you want to simulate this circuit with Simulink? If yes , you will need a simscape toolbox

#### 1 Comment

on 25 May 2014
I already have the Simscape toolbox just need step by step advice as I'm new to this

### Nguyen Dinh Thuc (view profile)

on 2 Jun 2017

From input "Step" to output "PS-Simulink Converter":
1000 s + 5e06
---------------------
s^2 + 6000 s + 2.5e07
Name: Linearization at model initial condition Continuous-time transfer function.

#### 1 Comment

on 20 Jun 2019
you got a transfer function, what's the problem?

### Harshit Derasari (view profile)

on 24 Jan 2018
Edited by Harshit Derasari

### Harshit Derasari (view profile)

on 24 Jan 2018

can u give any suggestion how to get transfer function of this circuit???? which i attached here... as per the above steps i not able to attach PS-simulink converter... here DC input voltage is 12v and output of buck converter is around 6v with 50% duty cycle.. inductor of 1mH capacitor of 220uF and R is 10 ohm and i want transfer function from output to input

Dan Herbison

### Dan Herbison (view profile)

on 6 Apr 2018
Switching circuits do not have "small signal transfer functions", as they are depend fundamentally on large signal circuit behavior. There are several ways of doing what you want, from using an "average model" of the power stage, to using a simulator like Simplis or Saber that handle switching circuit analysis well.

on 20 Jun 2019
Simscape Electrical handles switching circuits just fine. For a power electronics model with switching from power semiconductors, you will need to use an ac sweep. As switches like diodes are discontinuous, you cannot linearize them. To approximate your model with a transfer function, you inject a small signal (ac sweep) into your system, and compute frequency response from the input to the output. Once you have the frequency response, you can fit a transfer function to it.
This workflow is shown in this example.