Clear Filters
Clear Filters

How to insert a bode plot into simulink

8 views (last 30 days)
I am trying to get a bode plot in the simulink model below. I am following these two links below and I hit road block.
Thanks for any help in you can assist me with.
https://www.mathworks.com/help/slcontrol/gs/bode-response-of-simulink-model.html
https://www.mathworks.com/help/physmod/simscape/ug/linearize-an-electronic-circuit.html
It says you have to linearize points in the model. That is first problem I ran into. I think if I can that I can figure out the rest.

Accepted Answer

Birdman
Birdman on 20 Nov 2017
The process is litte hard to comprehend but I will explain it in steps:
1-Firstly, the links that you share are really useful if you know how to look into them.
2-What I basically did is to use the Bode Plot block in Simulink which Control System Toolbox provides to us. But to be able to use it, there are some important points to be mentioned. What you need to do is to identify root level inport and outport for linearizing points. In this case, you will choose your ac voltage source as an input, but you have to define it as an root level inport, which I did in the model I shared.
3-Secondly, by right clicking on inport and outport signals, I selected the signals as Input Perturbation and Output Measurements respectively. By doing so, I made it possible for Bode Plot block to use these points in linearizing the circuit and obtaining the Bode plot.
4-After that, in Bode Plot block, you have to decide at which times you will linearize the system. The default was 0 but to make sure, I have changed the setting. Furthermore, in Logging tab, you can check the setting where you can log the linearized system to workspace as a struct.
5- After this point, also check the setting Show plot on block open to be able to plot the Bode diagram automatically after the simulation is over.
Just run the simulation and then double click on the Bode Plot block. The linearized Bode plot will be automatically open. You can make experiments for different values of capacitors and inductors. Hope this helps.
  1 Comment
Robert Payne
Robert Payne on 20 Nov 2017
Thank you. That works great. It seemed very difficult to do. I will have to further investigate input and output signals. I am not really good with that. Thank You again for your help.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!