How do I enter output/input data in PID Tuner app?
9 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Arkadiy Turevskiy
on 24 Apr 2015
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%.
0 Comments
See Also
Categories
Find more on PID Controller Tuning in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!