For this example, linearize the model at a steady-state operating point to obtain a state-
space model you can use to initialize the sinestream signal.
io(1)=linio('watertank/PID Controller',1,'input');
io(2)=linio('watertank/Water-Tank System',1,'openoutput');
watertank_spec = operspec(model);
opOpts = findopOptions('DisplayReport','off');
op = findop(model,watertank_spec,opOpts);
sys = linearize(model,op,io);
Create the sinestream signal.
input = frest.Sinestream(sys);
frest.Sinestream chooses frequencies based on the system dynamics. It also
automatically initializes other parameters of the sinestream signal.
input
The sinestream input signal:
Frequency : [0.0015811;0.0026375;0.0043996;0.007339 ...] (rad/s)
Amplitude : 1e-05
SamplesPerPeriod : 40
NumPeriods : [4;4;4;4 ...]
RampPeriods : 0
FreqUnits (rad/s,Hz): rad/s
frest.Sinestream