Fractional order filters in Simulink

조회 수: 3 (최근 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