Info

This question is closed. Reopen it to edit or answer.

Why is that plot goes into negative area ?

3 views (last 30 days)
Gourou
Gourou on 1 Jan 2013
Hello,
I am facing a ploting problem which I cannot solve by myself. Hopefuly you could help.
I have acquired, by using a USB read/write card, a step response. I have then done a identification of the process by using Matlab, then I compare with with some others process models (by using the "compare" Matlab function. See below the code).
The global trend is quite normal.
But if you zoom at the begining of the plot, you can the start of the curves go into the negative area. It should not !!! The mathematical expression does not include "zero". If I run "step(tf_manu)" the plot si correct : i.e. the curve does not goes into negative area.
Is there a Matlab parameter that I should change, modify, adjust then the plot is correct ?
Is it not possible to include screenshot in there ? I would like to show you here, this way more easy it will be.
By the way, I am running Matlab R2012b with all modules installed. I got the same problem with R2012a.
Below is the code :
clear all;
close all;
clc;
cd ~/datas_et_scripts/RI_BO
command = load ('reponse_indicielle_BO_command.data');
actual_value = load ('reponse_indicielle_BO_actualvalue.data');
t = command(:,1)/10;
x = command(:,2);
y = actual_value(:,2);
disp '1 - Création du modèle après identification manuelle'
s=tf('s');
k=0.2233;
t0=5;
tau=302;
H=exp(-t0*s)*k/(1+tau*s);
tf_manu=tf(H);
disp '2 - Identification automatique sans connaissance de paramètre'
disp ' a - Création d un objet de type iddata'
data = iddata(y,x,0.01);
data.InputName = 'Température de consigne';
data.InputUnit = '\Theta';
data.OutputName = 'Température mesurée';
data.OutputUnit = '\Theta';
data.TimeUnit = 'seconds';
disp ' b - Lancement de l estimation'
tf_auto = procest(data,'P1D');
disp '3 - Estimation automatique avec connaissance de paramètres'
disp ' a - Création d un modèle avec des minimums et maximums sur certains paramètres'
init_sys = idproc('P1D');
init_sys.TimeUnit = 'seconds';
init_sys.Structure.Td.Minimum = 4;
init_sys.Structure.Td.Maximum = 10;
disp ' b - Lancement de l estimation'
tf_auto_init = procest(data,init_sys);
disp '4 - Affichage de la réponse indicielle réelle et comparaison avec les trois modèles :'
compare(data,tf_manu,tf_auto,tf_auto_init);
Do you have an idea ?
Regards, Bastien

Answers (0)

This question is closed.

Products

Community Treasure Hunt

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

Start Hunting!