How to plot bode plot with a transfer functions which are calculated?

15 ビュー (過去 30 日間)
EE_student
EE_student 2021 年 4 月 24 日
編集済み: Biral Pradhan 2022 年 4 月 1 日
I am trying to tune a PID controller using Matlab(not Simulink because I am learning/uni coursework).
Problem I need help with
  • So, I have a transfer function of a system for which there are phase margin requirement that needs to met
  • In order to find the phase advance part of the PID I need to solve a bunch of equations to plot a bode plot using the variables calculated
  • https://i.stack.imgur.com/w0LiC.png
I've done this so far
-I tried to replace the tf([num],[den]) with real numbers but that is not feasible as it defeats the purpose of doing this, I want Matlab to calculate the GR and frequency and substitute that into the tf

回答 (1 件)

Biral Pradhan
Biral Pradhan 2022 年 3 月 29 日
編集済み: Biral Pradhan 2022 年 4 月 1 日
I understand, you want to calculate the transfer function by substituting intermediate variables calculated with GR and frequency. I went through your live code file, and noticed the use of symbolic variables in tf( ) command. This is not supported. Instead, I recommend creating your ratios symbolic as shown below.
PA = ((Kpa*k*ti)*s + Kpa)/(ti*s + 1);
PI = (taui*s + 1)/(taui*s);
Now, in order to create the bode plots, you need numeric transfer functions. Kindly refer to the below link to obtain the required numeric transfer functions from your symbolic expressions.

カテゴリ

Help Center および File ExchangeGet Started with Control System Toolbox についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by