options = findopOptions('DisplayReport','off');
[op_point, op_report] = findop(plantMDL,op,options);
x0 = [op_report.States(1).x;op_report.States(2).x];
y0 = op_report.Outputs.y;
u0 = op_report.Inputs.u;
A goal of this example is to obtain plant frequency responses from 0.1 rad/s to 10 rad/s at
two other steady-state operating points, plant output = 0.5 and plant output = -0.5. To
bring the plant to these operating points, design a discrete PID controller at the initial
operating point. Use a controller sample time of 0.01 sec and an open-loop bandwidth is
20 rad/s.
Ts = 0.01;
G0 = c2d(linearize(plantMDL,op_point),Ts);
c = pidtune(G0,'pidf',20);
Online Estimation Using Sinestream Mode
The model scdfreSinestream includes the plant in a PID control loop using the
controller c. It also contains the Frequency Response Estimator block in the control
action + perturbation output configuration. In that configuration, you insert the block
into the control loop between controller and plant.
mdlSS = 'scdfreSinestream';
open_system(mdlSS);
6 Online Frequency Response Estimation