getLoopTransfer is giving the same open loop transfer functions for two different systems

11 次查看(过去 30 天)
I have two separate systems and I am using slLinearizer and getLoopTransfer function to get the open loop transfer functions at the input of the plant (u) for both the systems. Although, the plant dynamics are same, but the controllers are designed differently. Still, getLoopTransfer function gives the same open loop function for both the systems.
CL_lqr = slLinearizer(mod_lqr);
addPoint(CL_lqr,'u')
Li_lqr = getLoopTransfer(CL_lqr, 'u', -1);
CL_lqg = slLinearizer(mod_lqg);
addPoint(CL_lqg,'u')
Li_lqg = getLoopTransfer(CL_lqg, 'u', -1); % result same as Li_lqr
System 2:
When I manually open the loop at 'u' for the 2nd system and linearize it, the result is a different open loop transfer function which seems correct.
Li_lqg = linearize(mod_lqg);
What could be the reason for the difference in the results? I have tried different ways of troubleshooting, I think getLoopTransfer function works differently than linearizing the model by putting in and out ports.

采纳的回答

Paul
Paul 2023-9-30
Hi Janki,
I'd have to go through the math on the two calls to getLoopTransfer to determine if that result makes sense. Offhand, it doesn't sound like those two results should be the same, unless the estimator gain matrix, L, in the Kalman Filter block is zero (I'm assuming that block is really an ordinary Luenberger observer). Can you show a screen capture of the block paramters dialog for the Kalman Filter block?
The "manual" approach on the call to linearize is not the same as the call to getLoopTransfer on CL_lqg. The latter puts the analysis point at the output of the sum junction to the left of the node that branches off to the Kalman Filter block.
  13 个评论
Paul
Paul 2023-10-1
Consider the plant and estimator dynamics written as follows
xdot = A*x + B*u
y = C*x
ye = y - yhat
xhatdot = A*xhat + B*u + L*ye
yhat = C*xhat
If the input signal, u, is the exact same input that drives the plant AND the initial conditions on x and xhat are the same, then it must be the case that:
x = xhat
y = yhat
i.e., the estimated state output of the estimator is exactly the same as the state output of the plant and the output estimation error, ye, is zero. That's why in the initial problem breaking the loop the left of the node on the input path yielded the same results for both systems. On the output side, the same thing happens when we break the loop at the n_z signal as long as the nz_fb signal is input to the filter. But, when we break the loop at nz_fb, we get a very different system
ye = [0 1]*y - yhat
xhatdot = A*xhat + B*u + L*ye
In this case, the estimator gain is multiplying a non-zero signal (becuase yhat(1) ~= 0) and that will introduce additional dynamics into the open loop system.
If you modify the Simulink model for the lqg case to explicity implement the esimator dynamics as shown above, you can probe the individual signals (y, yhat, ye) and verify. Alterntatively, you could go through all of the block diagram algebra for both cases.
Disclaimer: All of the above is only based on thinking about the problem, strongly advise additional simulation/analysis to verify.

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by