Fractional order filters in Simulink

7 次查看(过去 30 天)
Marko
Marko 2016-4-13
评论: Marko 2016-4-13
Hi guys,
I'd like to check the behaviour of my system using fractional order filters. Basically, I'd like to have a way to implement filters with -2db/decade to -20db/decade with step of -2. The filters are in the figure.
So this is my code in Matlab but I'm not sure how to implement it in Simulink.
p = 0.1:0.1:1;
w = logspace(-4,10,500000);
for i = 1:10
Fr = @(w) 80./((Tcc1*j*w)+1).^p(i);
figure(5)
semilogx(w,20*log10(abs(Fr(w))))
hold on
end
title('Fractional order filters');
xlabel('Frequency [rad/s]');
ylabel('Magnitude [dB]');
So my best guess so far was to use MATLAB function block and compute the magnitude in linear scale like in the figure below.
And the code for this one would be:
function y = fcn(u)
Tcc1 = 5.3052e-05;
y = 20*log(abs(1./((Tcc1*j*u)+1)^0.5));
y = u;
Any ideas? Thanks in advance!
  1 个评论
Marko
Marko 2016-4-13
I managed to do it in the meanwhile but I will answer my own question if anyone ever comes across a similar request. So the idea is semi-correct. The function should be:
function y = fcn(u)
Tcc1 = 5.3052e-05;
y = 20*log10(abs(80./((Tcc1*j*u)+1)^1));
And the simulink model is:
And you should also make sure that f is the same as your signal frequency if it's a sinusoidal signal.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by