How to measure the transfer function in Simulink?

Click For Summary
To measure the transfer function in Simulink, utilize the "Linear Analysis Tool" from the Control System Toolbox, which allows for detailed analysis of system characteristics, including Bode plots. The "Bode Plot" block can also be employed to directly visualize the transfer function by processing input and output signals. Issues with the "PS Divide" block may arise, as it can lead to inaccuracies when dividing signals. Additionally, ensure that the simulation settings, such as the solver, are appropriate for your model to achieve accurate results. Properly configuring these tools will yield a more reliable representation of the system's frequency response.
jean28
Messages
83
Reaction score
0
Let's say I simulate a simple filter in simulink and I want to see the transfer function graph (bode plot) of it. What do I do to get Vout/ Vin? I tried using the "PS Divide" Block and divide the output voltage and the input voltage, but that didn't work. Could anyone help me out here?

This is what I tried:

http://i1226.photobucket.com/albums/ee410/jean28x/bode1.jpg

This is the graph I got:

http://i1226.photobucket.com/albums/ee410/jean28x/bode2.jpg

Thank you all very much.
 
Engineering news on Phys.org
The scale on your scope is way of. Hit the button next to the printer and uncheck the box saying something like "save only last 1000 data points". Simulate again and hit the button with the binoculars. Does the result seem to be correct now? Check with your analytical answer!

If no results appear, check the Matlab command window for warnings and errors. A divide block can cause problems for certain inputs.

Also this setup does not create the bode plot of the system. A bode plot is the frequency response, here you got only one frequency.

Further hints: A system can create a phase shift between the input and output. Comparing the input and output at the same instant of time gives no true information about the attenuation. How is this done in your model...
 
SirAskalot said:
The scale on your scope is way of. Hit the button next to the printer and uncheck the box saying something like "save only last 1000 data points". Simulate again and hit the button with the binoculars. Does the result seem to be correct now? Check with your analytical answer!

If no results appear, check the Matlab command window for warnings and errors. A divide block can cause problems for certain inputs.

Also this setup does not create the bode plot of the system. A bode plot is the frequency response, here you got only one frequency.

Further hints: A system can create a phase shift between the input and output. Comparing the input and output at the same instant of time gives no true information about the attenuation. How is this done in your model...

Ok thanks a lot! One more quick question. I am trying to simulate this circuit (quite complicated) and I can't seem to get an output signal that seems sinusoidal. I think it has something to do with the Refine factor, because when I simulate simpler circuits I DO get a good sine wave. Do you have any idea why this would act this way?

Circuit:

http://i1226.photobucket.com/albums/ee410/jean28x/finalproyect.jpg

Graph I get (instead of Sine Wave):

http://i1226.photobucket.com/albums/ee410/jean28x/simulinkpic3.jpg
 
Try changing solver. Now you are using ODE45, but other might be better for this system of equations.

http://www.mathworks.se/help/simulink/ug/choosing-a-solver.html
 


To measure the transfer function in Simulink, you can use the "Linear Analysis Tool" which is part of the Control System Toolbox. This tool allows you to analyze the linear characteristics of your system, including the transfer function. To use this tool, you need to first create a Simulink model of your system and then open the Linear Analysis Tool from the "Apps" tab in the Simulink window. From there, you can specify the inputs and outputs of your system and run the analysis. The tool will then display the transfer function, Bode plot, and other relevant information for your system. You can also use the "Bode Plot" block from the Simulink library to directly plot the transfer function of your system. This block takes in the input and output signals and automatically calculates the transfer function and plots the Bode plot. I would recommend using these tools instead of the "PS Divide" block, as they are specifically designed for this purpose and will provide more accurate results.
 
Thread 'I thought it was only Amazon that sold unsafe junk'
I grabbed an under cabinet LED light today at a big box store. Nothing special. 18 inches in length and made to plug several lights together. Here is a pic of the power cord: The drawing on the box led me to believe that it would accept a standard IEC cord which surprised me. But it's a variation of it. I didn't try it, but I would assume you could plug a standard IEC cord into this and have a double male cord AKA suicide cord. And to boot, it's likely going to reverse the hot and...

Similar threads

Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
35K
  • · Replies 18 ·
Replies
18
Views
36K
  • · Replies 4 ·
Replies
4
Views
9K
  • · Replies 8 ·
Replies
8
Views
16K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K