How can I show step response information?

조회 수: 14 (최근 30일)
Maciej Zareba
Maciej Zareba 2021년 4월 17일
답변: Nagasai Bharat 2021년 4월 23일
Hi,
Last time i was trying to show step response information. I used matlab function "stepinfo" and i compared the results with informations from step response characteristic. These times were different, even though it was that same plant. Why these times are different?
I also have problem with interpretation of the rise time as shown in picture below. Why the values of these times are the same, even though they are on different place on the time axis?
  댓글 수: 2
Nagasai Bharat
Nagasai Bharat 2021년 4월 20일
Can you show the code you are using to reproduce the issue you are facing?
Maciej Zareba
Maciej Zareba 2021년 4월 20일
lear;
close all;
clear all;
s=tf('s'); %deklaracja zmiennej "s"
disp('-------------Obiekt nominalny------------------');
G=1/s^2 ; %obiekt
[A, B, C, D]=ssdata(G); %Wyznaczenie macierzy stanu obiektu z trensmitancji G(s)
Gss=ss(G); %Wyznaczenie modelu w przestrzeni stanu z transmitancji G(s)
n=size(A,1); %Wyznacznie rzędu macierzy A
Q=eye(n); %Deklaracja macierzy wagowej Q jednostkowej o rozmiarze n x n
R=10; %Deklaracja macierzy wagowej R
K=lqr(A, B, Q, R); %Utworzenie macierzy wzmocnienia K z macierzy A, B oraz macierzy wagowych Q i R,
Acl=A-B*K; %Deklaracja macierzy sterowania
Gclz_q=ss(Acl,B,C,0); %Towrzenie modelu w przestrzeni stanu UR który reprezentuje dynamikę pętli zamkniętej
F_q=1/dcgain(Gclz_q); %Dodanie prekompensatora
Gclu_q=ss(Acl,B,-K,0); %Tworzenie modelu w przestrzeni stanu UR ze regulatorem w układzie sprzężenia zwrotnego/ wyznaczenie sygnału sterującego
P=eig(Acl); %Wyznaczneie wartości własnych macierzy sterowania.
L=place(A' ,C',3*P); %Wyznaczenie obserwatora na podstawie biegunów i macierzy.
disp(L);
Css=reg(Gss,K,L'); %Wyznacznie modelu dynamicznego regulatora w przstrzeni stanu
Gclz_o=feedback(Gss,Css,1); %Wyznczenie modelu stanu UR z regulatorem dynamicznym w układzie sprzężenia zwrotnego
F_o=1/dcgain(Gclz_o); %Dodanie prekompensatora do układu dynamicznego
Gclu_o=feedback(Gss*Css,1,1); %Wyznacznie modelu stanu UR z regulatorem w układzie dynamicznym w celu uzyskania sygnału sterujacego.
tfinal=12; %Deklaracja czasu badania przebiegu.
%% Odpowiedzi skokowe
figure, step(F_q*Gclz_q,F_o*Gclz_o,tfinal)
title(['Odpowiedź skokowa układu zamkniętego bez/z obserwatorem dla R = ' num2str(R)]), grid
legend('Układ statyczny','Układ dynamiczny')
figure, step(F_q*Gclu_q,F_o*Gclu_o,tfinal)
title(['Sygnal sterujący dla R = ' num2str(R)]), grid
legend('Układ statyczny','Układ dynamiczny')
disp('----------------------------------------')
disp(['Parametry układu dynamicznego dla R = ' num2str(R)])
stepinfo(F_q*Gclz_o)
disp(['Parametry układu statycznego dla R = ' num2str(R)])
stepinfo(F_q*Gclz_q)
disp('Wykres ulokowania biegunów członu ciągłego');
figure, pzmap(F_q*Gclz_q,F_o*Gclz_o);
%legend('Układ statyczny','Układ dynamiczny');
%title(['Wykres ulokowanych biegunów dla R = ' num2str(R)]), grid

댓글을 달려면 로그인하십시오.

채택된 답변

Nagasai Bharat
Nagasai Bharat 2021년 4월 23일
Hi,
From my understanding and taking reference from the code. The stepinfo function is working fine if you look at the characterics of figure 1
figure, step(F_q*Gclz_q,F_o*Gclz_o,tfinal) ;
stepinfo(F_q*Gclz_o);
stepinfo(F_q*Gclz_q);
The above three lines of code would give the same characteristics.
But the plot you have mentioned is for
figure, step(F_q*Gclu_q,F_o*Gclu_o,tfinal)
And the stepinfo is not called for these models. If you change the code to the one below. The correct step characterics would be displayes.
disp(['Parametry układu dynamicznego dla R = ' num2str(R)])
stepinfo(F_q*Gclu_o)
disp(['Parametry układu statycznego dla R = ' num2str(R)])
stepinfo(F_q*Gclu_q)
Thanks,

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by