can someone please help me coding this saturation equations in matlab

38 次查看(过去 30 天)
hello
u_s = sat(u) = [sat(u_1),.....,sat(u_m)]^T
sat(u_i) = sign(u_i)*min{|u_i|,u_max,i} ,u_max,i >0
U_i = [-u_max,i , u_max,i]
u_s = sat(u) = (1+psi_sat(u))*u
psi_sat(u) = diag (psi_1(u_1),....,psi_m(u_m))
where psi_i(u_i) ∈ R is a non-linear function
psi_i(u_i) = 0 for u_i ∈ U_i
or
psi_i(u_i) = (sat(u_i) /|u_i|)-1 for u_i ∉ U_i
can some tell me how to code this saturation equations . thank you
  • - - - - - - - - - - - - - - - - - - - - - - -

采纳的回答

Torsten
Torsten 2024-4-9,15:01
编辑:Torsten 2024-4-9,15:02
m, umax and u have to be defined previously.
psi = zeros(m,1);
idx = abs(u) > umax;
psi(idx) = sign(u(idx)).*min(abs(u(idx)),umax(idx));
psi_sat = diag(psi);
us = (1 + psi_sat)*u

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Mathematics and Optimization 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by