MECE3350 Control System. Lecture 17, Exercise 104: Bode plots with complex poles.
Lecture here: • Video
Lecture notes here: https://www.biomechatronics.ca/teaching/
See the Matlab code posted below.
%Lecture 17, exercise 104
clear all
close all
%define the range of frequencies
w = 10^(-3):10^(-3):10^3;
%calculate the magnitude of the transfer function
Magnitude = 20*log10(30)-20*log10(((30-w.^2).^2+w.^2).^0.5);
%calculate the phase of the transfer function
Phase = 0 - atan2(w,(30-w.^2));
%convert rad to deg
Phase = Phase*180/(2*pi);
%plot phase and magnitude
subplot(3,1,1)
semilogx(w, Magnitude); %or plot(20*log10(x), Magnitude)
xlabel('Frequency [rad/s]');
ylabel('Magnitude [dB]');
subplot(3,1,2)
semilogx(w, Phase); %or plot(20*log10(x), Phase)
xlabel('Phase [deg]');
ylabel('Magnitude [dB]');
%plot Bode using the pre-built function
subplot(3,1,3)
s= tf([1 0],[1]);
G = 30/(s^2+s+30);
bode(G)
%display the maximum value of G(s)
max(Magnitude)
Watch video L17E104 Control Systems Lecture 17 Exercise 104: Bode plot with Matlab online without registration, duration hours minute second in high quality. This video was added by user bioMechatronics Lab 03 October 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,650 once and liked it 9 people.