필터 지우기
필터 지우기

How do I obtain the bode plot of the given transfer function?

조회 수: 2 (최근 30일)
bebo
bebo 2023년 11월 29일
답변: Sam Chak 2023년 11월 29일
Given the transfer function below, how can I graph it on Matlab to get the bode plot? provide code pls!

답변 (2개)

Angelo Yeo
Angelo Yeo 2023년 11월 29일
Here is a simple example. You can further put your parameters in H.
s = tf('s');
H = (s+1)/(s^2+s+1);
bodeplot(H)
grid on; zoom on;
  댓글 수: 2
bebo
bebo 2023년 11월 29일
편집: Walter Roberson 2023년 11월 29일
This is the code I have so far I broke the equation into parts so it's easier to plug in but I'm still getting an error message.
% Parameters of the boost converter
Vin = 75; % Input voltage
Vout = 150; % Output voltage
L = 7.5e-5; % Inductance
C = 5.01e-4; % Capacitance
R = 30; % Load resistance
fs = 100000; % Switching frequency
D = 0.5; % Duty cycle
rC = .005; %ESR
rL = .1; %ESR
% Equation broken into parts
X = (Vout(R+2*rC))/(L*C(R+rC));
Y = (s+1)/(C(R/2+rC));
Z = (s^2+C(rL(R+rC)+R*rC(1-D)^2)+L)/(L*C(R+rC));
A = (s+(1-D)^2*R+rL)/(L*C(R+rC));
s = tf('s');
H = X(Y/Z*A);
bodeplot(H)
grid on; zoom on;
Walter Roberson
Walter Roberson 2023년 11월 29일
MATLAB does not have implied multiplication anywhere -- not even in the interal language of the moisture vaporators.
If you want multiplication, you need to use the .* or * operator.

댓글을 달려면 로그인하십시오.


Sam Chak
Sam Chak 2023년 11월 29일
You need to improve your skills in identifying math operators. There are many missing '*' operators
% Parameters of the boost converter
Vin = 75; % Input voltage
Vout = 150; % Output voltage
L = 7.5e-5; % Inductance
C = 5.01e-4; % Capacitance
R = 30; % Load resistance
fs = 100000; % Switching frequency
D = 0.5; % Duty cycle
rC = .005; % ESR??
rL = .1; % ESR??
% Equation broken into parts
X = (Vout*(R+2*rC))/(L*C*(R+rC));
% ^ ^
s = tf('s');
Y = (s+1)/(C*(R/2+rC));
% ^
Z = (s^2+C*(rL*(R+rC)+R*rC*(1-D)^2)+L)/(L*C*(R+rC));
% ^ ^ ^ ^
A = (s+(1-D)^2*R+rL)/(L*C*(R+rC));
% ^
H = X*(Y/Z*A);
% ^
bodeplot(H)
% grid on; zoom on;

카테고리

Help CenterFile Exchange에서 Electrical Block Libraries에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by