![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/178630/image.png)
I get different results using the step response function only changing the order of the products of some parameters
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello everybody,
This is quite a simple code: I define some parameters (resistances, inductances) and after I analyse the dynamic responses. There, to obtain the kp and ki values of the PI controller, I define wn. As you can see in the code, I define two, only altering the order of the multiplications: wn = x*R/L; WN = R/L*x; The result I obtain with each one are different in the step response, as you can see in the image or compiling the code:
if true
%%Code starts here
clear all
close all
clc
%%Parameters
Rs = 1.405; % Stator resistance (Ohm)
Lls = 0.005839; % Stator Leakage inductance (H)
Llr = Lls; % Rotor Leakage inductance (H)
Rr = 1.395; % Rotor resistance (Ohm)
Lm = 0.1722; % Mutual inductance (H)
Ls = Lm + Lls; % Stator inductance
Lr = Lm + Llr; % Rotor inductance
R = Rs + Rr*(Lm^2)/(Lr^2);
sigma = 1 - Lm^2/Lr/Ls;
L = sigma*Ls;
%%Dynamics
s = tf([1 0],[1]);
x = 5; % "x" times faster dynamics (%xi = 1)
wn = x*R/L;
WN = R/L*x;
kp = 2*wn*L-R;
KP = 2*WN*L-R;
ki = wn^2*L;
KI = WN^2*L;
Ids_cl=(kp*s + ki)/L/(s^2 + (R + kp)/L*s + ki/L);
Ids_CL=(KP*s + KI)/L/(s^2 + (R + KP)/L*s + KI/L);
%%Graphs
figure()
step(Ids_cl)
hold on
step(Ids_CL)
grid on
end
Thank you for your attention,
댓글 수: 0
답변 (1개)
Mischa Kim
2017년 10월 12일
편집: Mischa Kim
2017년 10월 12일
Hi Mattin, welcome to the world of numerical analysis. While
wn = x*R/L;
WN = R/L*x;
are the same expressions symbolically, they are not numerically. In fact
wn - WN
ans = 2.273736754432321e-13
and, therefore
ki - KI
ans = 9.094947017729282e-12
As a result, one system is underdamped ( Ids_cl ), the other is not. In the pole zero map below you can see the Ids_cl is just "barely" underdamped, note the scale on the y-axis.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/178630/image.png)
참고 항목
카테고리
Help Center 및 File Exchange에서 Motor Parameter Estimation and Plant Modeling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!