asymptotic magnitude bode plot of fractional order transfer function

5 views (last 30 days)
how do i plot figure 2 of fractional zero
figure 1 code
(clc;clf;
clear all;close all;
alpha=0.02;
Wcr=10;
w1=logspace(-1,log10(Wcr),1000);
w2=logspace(log10(Wcr),3,1000);
Mag1=20*alpha*ones(1,numel(w1));
Mag2=@(w2) 20*alpha*log10(w2);
semilogx(w1,Mag1);
hold on;
semilogx(w2,Mag2(w2));
grid on;
xlabel('Frequency');
ylabel('Magnitude dB'))

Answers (1)

Birdman
Birdman on 30 Mar 2020
The following code should give you what you want:
hold off;
alpha=0.9;Wcr=2;
w1=logspace(-1,log10(Wcr),1000);w2=logspace(log10(Wcr),3,1000);
Mag1=20*log10(Wcr)*ones(1,numel(w1));Mag2=@(w2) 20*log10(w2);
semilogx(w1,Mag1);hold on;semilogx(w2,Mag2(w2));grid on;xlabel('Frequency');ylabel('dB')
clear
clc
syms w alpha
alpha=0.9;beta=2;
w=logspace(-1,3,1000);
Mag1=@(w) 20*log10(abs(sqrt(((1i.*w).^alpha+beta).^2)));
semilogx(w,Mag1(w));hold on;grid on;xlabel('Frequency');ylabel('dB')
  7 Comments
Irshad Baruah
Irshad Baruah on 7 Apr 2020
Edited: Irshad Baruah on 7 Apr 2020
but as per the paper i have to show the alpha value in the magnitide equation of the first part of your script
and please justify this equation
Mag1=20*log10(Wcr)*ones(1,numel(w1))
and there is no mention regarding a in the first portion as the equations are
Mag1= 20 log10 |a|;
Mag2=20*alpha*log10(w)
Irshad Baruah
Irshad Baruah on 7 Apr 2020
Edited: Irshad Baruah on 7 Apr 2020
i tried to modify but it is not cutting each other as you have shown in your previous code
hold off;
alpha=0.9;
Wcr=2.15;a=2;
w1=logspace(-2,log10(Wcr),1000);
w2=logspace(log10(Wcr),2,1000);
Mag1= 20*log10(abs(a))*ones(1,numel(w1));
Mag2=@(w2) 20*alpha*log10(w2);
semilogx(w1,Mag1);
hold on;
semilogx(w2,Mag2(w2));
grid on;
xlabel('Frequency');
ylabel('Magnitude dB')
clc;
clear all;
syms w alpha
alpha=0.9;
a=2;
w=logspace(-2,2,1000);
Mag1=@(w) (20*log10(abs(sqrt(((1i.*w).^alpha+a).^2))));
semilogx(w,Mag1(w));
hold on;
grid on;
xlabel('Frequency (rad/sec)');
ylabel('Magnitude (dB)')

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!