👨🎓个人主页:研学社的博客
💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
分数VO和RO方程的预测校正方法,本文包括两个函数:
(1)fractPC.m 提供了分数阶松弛-振荡方程的预测因子-校正器方法(u_t_alpha=-B u(t)+f(t), 0<alpha<=2)。
(2)variablerandomorder.m 为可变阶 (0<\alpha(t)<=1) 和随机阶数 (p(0<\alpha_0+noise<=1)=1) 分数松弛方程提供了预测校正器方法。当导数阶数为常数 (0<\alpha<=1) 时,它也可用。
读取器可以更改此代码中的可变顺序和随机顺序函数。也可以在代码中更改相关参数。此外,我们应该指出,此代码可用于变量顺序或随机顺序,变化很小。如果差分阶函数变化很快,请给出较小的时间步长。但是,当微分阶函数急剧变化时,它不起作用。
📚2 运行结果
部分代码:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if (a>2) | (a<0)
sprintf('wrong number of input parameters')
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Parameter introduction
% clc % Clear
tic; % Time account
alpha=a;%fractional derivative order
B=b; % Relaxation Coefficient
dt=0.01 ; % The selection of time step
t_max=10; % Time length
t=0:dt:t_max; % Time points
n=length(t); % The number of time points
u=zeros(n,1); % Initialization of function u(*)
u1=zeros(n,1); % Initialization of test function u1(*)
% f=zeros(n,1);
y0=1.0;%the initial value
b=zeros(n-1,1); % Initialization of parameter
a=zeros(2*n-3,1); % Initialization of parameter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Give the expression of variable-order or random-order
% gammax=0.05; % Scale parameter in the random-order
for i=1:(n+1)
T(i)=(i-1)/n*t_max; % Time
f(i)=0;% expression of function f(*)
end
% f0=.1; % expression of function f(0)
f0=0; % expression of function f(0)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Numerical computation
for i=1:n
b(i)=0;
for j=0:(i-1)
if j==0
b(i)=b(i)+(dt^alpha/alpha*((i-j)^alpha-(i-1-j)^alpha))*(f0-B*y0); % Prediction term
else
b(i)=b(i)+(dt^alpha/alpha*((i-j)^alpha-(i-1-j)^alpha))*(f(j)-B*y(j)); % Prediction term
end
end
y(i)=y0+1/gamma(alpha)*b(i); % Prediction term
a(i)=0;
for j=0:i
if j==0
a(i)=a(i)+dt^alpha/(alpha*(alpha+1))*((i-1)^(alpha+1)-(i-1-alpha)*(i)^alpha)*(f0-B*y0); % Correction term
elseif j==i
a(i)=a(i)+dt^alpha/(alpha*(alpha+1))*(f(i)-B*y(i)); % Correction term
else
a(i)=a(i)+(dt^alpha/(alpha*(alpha+1))*((i-1-j+2)^(alpha+1)+(i-1-j)^(alpha+1)-2*(i-1-j+1)^(alpha+1)))*(f(j)-B*y(j)); % Correction term
end
end
y(i)=y0+1/gamma(alpha)*a(i); % Correction result
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Give the exact solution when \alpha=0.5,
for i=n:(-1):1
y(i+1)=y(i);
u1(i+1)=1*exp(T(i+1))*erfc((T(i+1)^0.5)); % Exact solution when \alpha=0.5
%u1(i)=exp(-t(i));
%u1(i)=cos(t(i));
end
y(1)=y0; % Initial value
u1(1)=y0; % Initial value
t1=toc % Time account
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Plot the numerical result
% hold on,plot(T,y,'b-',T,u1,'r-');% A test of the constant-order
% relaxation equation with \alpha=0.5.
% hold on
plot(T,y,'b-') % Plot the numerical result
xlabel('t')
ylabel('u(t)')
🎉3 参考文献
部分理论来源于网络,如有侵权请联系删除。
(1) HongGuang Sun, YangQuan Chen, Wen Chen. Random-order fractional
differential equation models. Signal Processing, 91 (2011): 525-530.
(2) HongGuang Sun, Wen Chen, Hu Sheng, YangQuan Chen, On mean square
displacement behaviors of anomalous diffusions with variable and random orders. Physics Letters A, 2010, 374: 906-910.
(3) K. Diethelm, N.J. Ford, A.D. Freed, A predictor-corrector approach
for the numerical solution of fractional di?erential equations, Nonlinear
Dynamics 29 (2002) 3-22.
(4) YANG Chen hang, LIU Fa wang. A Fractional Predictor-corrector Method of the Fractional Relaxation-Oscillation Equation