how to make bode plot in simulink system

205 ビュー (過去 30 日間)
Kyungmin
Kyungmin 2023 年 9 月 4 日
回答済み: Drew Davis 2025 年 11 月 14 日 19:13
Hello,
I have one question about how to make a bode-plot in simulink system.
I made one simulink system using PMSM.
and I want to check system margin using bode-plot.
I tried example simulink system from help desk.
but it was different .
Aslo I know that if there are transfer function, it's possible to make bodeplot easily.
but I don't know the transfer function.
So I ask you.
please let me know.
best regards,
Kim

採用された回答

Sam Chak
Sam Chak 2023 年 9 月 7 日
You can insert the Bode Plot block in the Simulink model and follow the steps described in this link for visualizing the Bode response of the Model during simulation as shown in the following example. However, your PMSM is a little complicated to me. Generally, you need to mark the signals (right-click the signal and select Linear Analysis Points) to identify the open-loop Input and the open-loop Output. And then on the Linearization Tab (double-click the Bode Plot block), you need to check on the 'Show plot on block open'.
  7 件のコメント
Kyungmin
Kyungmin 2023 年 9 月 18 日
This system does not need external data for simulation.
Ayesha
Ayesha 2024 年 2 月 26 日
Hello
@Sam Chak, If I want to measure the closed loop response of my system in simulink how can I do that? In my case reference is 0 and I want my system to sweep from 10Hz to 10kHz

サインインしてコメントする。

その他の回答 (2 件)

Tianyu
Tianyu 2023 年 9 月 6 日
Hi Kim,
Not sure if this is the best way but you can use "Control System Designer" under Simulink app tab.
Click "New plot" and select "New Bode". Then "Add Signal" > "Select signal from model".
Select the input/output signal in your model and plot.
  1 件のコメント
Kyungmin
Kyungmin 2023 年 9 月 12 日
I will try it again.
Thanks a lot.

サインインしてコメントする。


Drew Davis
Drew Davis 2025 年 11 月 14 日 19:13
In addition to the answers already provided, this can be done from the command line as follows:
If the model is linearize-able, you can use the linearize command to generate a state-space model, then use the bode command to visualize the linear system's frequency response.
% linearize the model about its initial conditions.
sys = linearize("mymodel",io);
% plot the frequency response
bode(sys);
If the model is not linearize-able, which is common for many PMSM models due to hard switching electrical elements (e.g. PWM), you can use the frestimate command to generate a frequency response of the model, which can then be plotted using the bode command.
% create a perturbation specification
In = frest.PRBS();
% estimate the FRD
est_sys = frestimate("mymodel",io,in);
% plot the frequency response
bode(est_sys);

カテゴリ

Help Center および File ExchangePlot Customization についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by