PRBS input to an ODE system

3 views (last 30 days)
Giacomo Filippini
Giacomo Filippini on 5 Jan 2018
Hi,I've generated a PRBS for an inlet flowrate with this code:
ns = 110; %s
ts = 30; %s
F = idinput(round(ns),'prbs',[0 1],[9 11]);
FinPRBS = iddata ([],F,ts);
Now, I want to pass this input to an ODE system like this:
function dXdt = systemresponse(~,X)
global A res F
Fo1 = (X(1)-X(2))/res(1);
Fi2 = Fo1;
Fo2 = X(2)/res(2);
% The differential system is set up:
dXdt(1) = 1/A(1)*(F - Fo1);
dXdt(2) = 1/A(2)*(Fi2 - Fo2);
dXdt = dXdt';
end
How can I do this? Thank you!

Answers (0)

Community Treasure Hunt

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

Start Hunting!