Question: % Define the natural frequency ( wn ) and the range of damping factors ( zeta ) wn = 1 ; % Normalized natural frequencyzeta

% Define the natural frequency (wn) and the range of damping factors (zeta)wn =1; % Normalized natural frequencyzeta_values =[0.1,0.2,0.3,0.5,0.7,1,1.5]; % Different damping factors% Frequency range for the Bode plotw = logspace(-1,1,500); % Frequency range from 0.1 to 10 in log scale% Loop over different zeta values and plot Bode plotfigure;hold on;for zeta = zeta_values % Define the transfer function for each zeta num =[100]; % Numerator s^2 term den =[12*zeta*wn wn^2]; % Denominator s^2+2*zeta*wn*s + wn^2 sys = tf(num, den); % Create transfer function [mag, phase]= bode(sys, w); % Compute magnitude and phase % Convert magnitude to dB mag_dB =20*log10(squeeze(mag)); phase_deg = squeeze(phase); % Convert phase to degrees % Plot magnitude and phase subplot(2,1,1); semilogx(w/wn, mag_dB, 'DisplayName', ['\zeta =' num2str(zeta)]); xlabel('\omega /\omega_n'); ylabel('20 log |G(j\omega)|'); title('Magnitude Response'); grid on; hold on; subplot(2,1,2); semilogx(w/wn, phase_deg, 'DisplayName', ['\zeta =' num2str(zeta)]); xlabel('\omega /\omega_n'); ylabel('Phase (degrees)'); title('Phase Response'); grid on; hold on;end% Add legendssubplot(2,1,1);legend('show');subplot(2,1,2);legend('show');
Make a graph in code above symmetrical to the y-axis

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!