필터 지우기
필터 지우기

How do I enter output/input data in PID Tuner app?

조회 수: 3 (최근 30일)
Jessica Cruz
Jessica Cruz 2015년 4월 21일
답변: Arkadiy Turevskiy 2015년 4월 24일
I have a table with time,output variable and input variable. I saw a video on how to introduce the data but when I do as the video says I get a message of error " The output signal must be a vector or iddata object containing one signal " . I was wondering if anyone could help me on how to put in matlab the data so I can use the app, I just started using the program so I am a little lost.
Thank you so much !! I leave the data here in case I didn't explain myself correctly.
t input output -2 100 200 -1 100 200 0 150 201 .2 150 201.1 .4 150 204 .6 150 227 .8 150 251 1 150 280 1.2 150 302.5 1.4 150 318 1.6 150 329.5 1.8 150 336 2.0 150 339 2.2 150 340.5 2.4 150 341

답변 (1개)

Arkadiy Turevskiy
Arkadiy Turevskiy 2015년 4월 24일
The time vector has to be uniformly sampled. In your data time starts at -2, then a sample at -1, then 0, then sample time becomes 0.2.
Can you get the data for uniformly sample time vector?
Here is the code that gets your data ready for use by the tool, using interpolation.
data=[-2 100 200 -1 100 200 0 150 201 .2 150 201.1 .4 150 204 .6 150 227 .8 150 251 1 150 280 1.2 150 302.5 1.4 150 318 1.6 150 329.5 1.8 150 336 2.0 150 339 2.2 150 340.5 2.4 150 341];
time=data(1:3:end);
input=data(2:3:end);
output=data(3:3:end)
% now create uniformly sample time vector and interpolate
t=[time(1):0.2:time(end)]
inputint=interp1(time,input,t);
outputint=interp1(time,output,t);
The data is now ready for use in PID Tuner. PID Tuner requires start time to be a non-negative number, so specify it as 0.
I think you will need to remove the offset from your output signal, to make it start at zero, and then fit underdamped pole pair with time delay model. I got a fit of 98%.

카테고리

Help CenterFile Exchange에서 PID Controller Tuning에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by