How to incorporate equations in the connect function for control design?

4 次查看(过去 30 天)
I would like to synthesize a h-infinity controller and need to connect a few blocks. How do I go about integrating the equation
y=x^2+a^2
in the following manner with the connect function?
It is no issue in Simulink but I feel like I am forgetting some basics with MATLAB.
  5 个评论
Jiten Parmar
Jiten Parmar 2023-4-20
That is not the model that I am utilizing. The wind turbine model is as follows:
However. I believe I have found a viable approach based on your double integrator example. I need to linearize the model above with respect to Ta and then use the augmentation approach.

请先登录,再进行评论。

采纳的回答

Sam Chak
Sam Chak 2023-4-19
Thanks for clarifying that. For more info, you can find out how use 'connect' here. But I have seen people using 'augw' to augment the LTI plant with the weighting functions for general control design.
Here is an example for the control of a Double Integrator:
s = zpk('s');
% Augmenting plant with the weighting functions
Gp = 1/(s^2); % Double Integrator plant
W1 = 0.1*(s + 1e2)/(1e2*s + 1);
W2 = 0.1;
W3 = [];
P = augw(Gp, W1, W2, W3);
% H-infinity control design
[K, CL, gamma] = hinfsyn(P, 1, 1)
K = A = x1 x2 x3 x1 -0.01 0 0 x2 4.007 -1.699 0.06469 x3 328.4 -139.2 -78.46 B = u1 x1 0.3125 x2 -0.01633 x3 -1.254e-06 C = x1 x2 x3 y1 328.4 -139.2 -78.46 D = u1 y1 0 Continuous-time state-space model. CL = A = x1 x2 x3 x4 x5 x6 x1 -0.01 -0.3125 0 0 0 0 x2 0 0 1 0 0 0 x3 0 0 0 328.4 -139.2 -78.46 x4 0 -0.3125 0 -0.01 0 0 x5 0 0.01633 0 4.007 -1.699 0.06469 x6 0 1.254e-06 0 328.4 -139.2 -78.46 B = u1 x1 0.3125 x2 0 x3 0 x4 0.3125 x5 -0.01633 x6 -1.254e-06 C = x1 x2 x3 x4 x5 x6 y1 0.32 -0.001 0 0 0 0 y2 0 0 0 32.84 -13.92 -7.846 D = u1 y1 0.001 y2 0 Input groups: Name Channels U1 1 Output groups: Name Channels Y1 1,2 Continuous-time state-space model.
gamma = 0.1339
Gc = tf(K) % transfer function form of H-inf ctrl
Gc = 104.9 s^2 + 0.01633 s + 1.254e-06 --------------------------------- s^3 + 80.17 s^2 + 143.1 s + 1.423 Continuous-time transfer function.
margin(Gc*Gp)
% Closed-loop control system
Gcl = tf(minreal(feedback(Gc*Gp, 1)))
Gcl = 104.9 s^2 + 0.01633 s + 1.254e-06 --------------------------------------------------------------- s^5 + 80.17 s^4 + 143.1 s^3 + 106.3 s^2 + 0.01633 s + 1.254e-06 Continuous-time transfer function.
step(Gcl)
S = stepinfo(Gcl)
S = struct with fields:
RiseTime: 2.1066 TransientTime: 3.2529 SettlingTime: 3.2529 SettlingMin: 0.9061 SettlingMax: 1.0074 Overshoot: 0.7396 Undershoot: 0 Peak: 1.0074 PeakTime: 4.2777
ssy = dcgain(Gcl) % steady-state output
ssy = 1.0000

更多回答(1 个)

Paul
Paul 2023-4-20
connect only works with lti system objects. Nonlinear elemens have to be linearized around an equilibrium point and the linearized models can be connected, etc. for LTI system analysis.

类别

Help CenterFile Exchange 中查找有关 H-Infinity Synthesis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by