How to use RBF training to simulate this function, (simulation and using code seperatly)

13 ビュー (過去 30 日間)
Jabbar moosavi
Jabbar moosavi 2021 年 11 月 27 日
編集済み: Leepakshi 2025 年 9 月 2 日

f = @(x)(prod([x(1),x(2),x(3),x(5),x(3)-1])+x(4)) ./ (1 + x(2)^2 + x(3)^3);

k = 5; % demo value y = 1:5; % demo value u = 1:5; % demo value

y(k+1) = f([y(k), y(k-1), y(k-2), u(k), u(k-1)])

回答 (1 件)

Leepakshi
Leepakshi 2025 年 9 月 2 日
編集済み: Leepakshi 2025 年 9 月 2 日
Hi Jabbar,
You can simulate this function using Radial Basis Function Training using below three steps:
  1. Simulate the system using your nonlinear function to generate input-output data.
  2. Train an RBF network on this data: "newrb" function can help, refer to below example code.
  3. Test the RBF network and compare its output to the true function.
Refer to this code for better understanding:
f = @(x)(prod([x(1),x(2),x(3),x(5),x(3)-1])+x(4)) ./ (1 + x(2)^2 + x(3)^3);
N = 200; % .... Generate data using loop and randn, if not available.
X = [y(3:N+2)', y(2:N+1)', y(1:N)', u(3:N+2)', u(2:N+1)']; % Prepare inputs (X) and targets (T)
T = y(4:N+3)';
net = newrb(X', T', 1e-3, 1.0, 50); % Train RBF network
Hope this helps!
Thanks

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by