通过近似时间延迟创建一个车床控制器
lathe = StateSpaceModel[10.Derivative[2][x][t] == -100 x[t] - Derivative[1][x][t] - 200 (f[t] + x[t] - x[t - 1]), {x[t], x'[t]}, {f[t]}, x[t], t]OutputResponse[lathe, DiracDelta[t - 1], {t, 0, 5}];
Plot[%, {t, 0, 5}]latheApprox = SystemsModelDelayApproximate[lathe, 3]openlooppoles = Eigenvalues[Normal[latheApprox][[1]]];
l = EstimatorGains[latheApprox, Join[Drop[Sort[openlooppoles], -2], {-4 + I, -4 - I}]];
k = StateFeedbackGains[latheApprox, Join[Drop[Sort[openlooppoles], -2], {-4 + I, -4 - I}]];
controller = EstimatorRegulator[latheApprox, {l, k}];closedloopLathe = SystemsModelFeedbackConnect[lathe, controller];OutputResponse[closedloopLathe, DiracDelta[t - 1], {t, 0, 20}];
Plot[%, {t, 0, 20}]