|
From: | Doug Stewart |
Subject: | Re: octave-control: stepinfo |
Date: | Mon, 9 Feb 2015 08:36:50 -0500 |
On Sun, Feb 8, 2015 at 7:59 PM, Doug Stewart <address@hidden> wrote:On Sun, Feb 8, 2015 at 10:30 PM, Doug Stewart <address@hidden> wrote:Yes very good :-)On Sun, Feb 8, 2015 at 10:29 PM, Aidan Macdonald <address@hidden> wrote:On Sun, Feb 8, 2015 at 6:54 PM, Doug Stewart <address@hidden> wrote:On Sun, Feb 8, 2015 at 9:48 PM, Aidan Macdonald <address@hidden> wrote:We always bottom post on this listAidan Plenert Macdonald4178 Decoro Street, San Diego, CA 92122Cell: 805 418 0174On Sun, Feb 8, 2015 at 6:31 PM, Doug Stewart <address@hidden> wrote:On Sun, Feb 8, 2015 at 8:41 PM, Aidan Macdonald <address@hidden> wrote:_______________________________________________Hi,I wrote some code for stepinfo in the octave-control package. I tried to match the guidelines found here.I attached the code. It doesn't match the Matlab standard perfectly, but I was wondering how much I should do before submitting it. I wrote it to take in one system and give the results specified in http://www.mathworks.com/help/control/ref/stepinfo.html.I was also a little concerned with the math I did. I couldn't find a better explanation of the various parameters than Matlab's website specified. That said, I wrote it and compared it to a few examples using my universities Matlab and they mostly match.Let me know what I should do to improve it. I am very new to the open source contributing scene, let me know what I should do to help.Enjoy,Aidan Plenert Macdonald4178 Decoro Street, San Diego, CA 92122Cell: 805 418 0174
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave
I just did a quick read through and I see that for slope you did time over y_yalueI am sure that it should be the other way rise over runI will do more checking laterDoug--Thanks for looking. No, I think the slope is right. I am using is to calculate the true times below given the error in the difference from the ideal 90% and 10% voltage. The slope is in units seconds/volts. With an error from the ideal in volts (the error come from discretization of the signal), I linearly approximate the true value.--
Sorry, Does this look better? I am using Gmail
Aidan Plenert Macdonald4178 Decoro Street, San Diego, CA 92122Cell: 805 418 0174Perhaps you could point me to a better definition, but I was using what Matlab said here that the response has settled when the error abs(yfinal - y(t)) has reached ST times the peak value. So I use convolution to average the y values over a span. I picked an arbitrary averaging width, perhaps you know a better one.I then take the use average in place of y(t), which I argue in the case of oscillating signals is required. I attempt to minimize the absolute value of the error minus the ST*ypeak value. The second abs(...) is so the min function isn't taking negative error differences.I take the minimum value of the error - ST*ypeak to be the closest point to settled, and use that corresponding time value.I looked around, including 2 books I have for more precise definition in terms of the step functions response. Wikipedia, from what I saw, only had it is a function of variables in the system function, but I want a numerical definition.Thanks.Aidan Plenert Macdonald4178 Decoro Street, San Diego, CA 92122Cell: 805 418 0174
sys = tf([1 5],[1 2 5 7 2]); S = stepinfo(sys,'RiseTimeLimits',[0.05,0.95])
RiseTime: 7.4454 SettlingTime: 13.9378 SettlingMin: 2.3737 SettlingMax: 2.5201 Overshoot: 0.8032 Undershoot: 0 Peak: 2.5201 PeakTime: 15.1869
from your software:
>> sys = tf([1 5],[1 2 5 7 2]); >> S = stepinfo(sys,'RiseTimeLimits',[0.05,0.95]) yfinal = 2.5002 ysettle = 0.47566 settling_ind = 79 S = scalar structure containing the fields: RiseTime = 5.1696 SettlingTime = 39.866 SettlingMin = 2.1908 SettlingMax = 2.5192 Overshoot = 0.0076091 Undershoot = 0.012105 Peak = 2.5192 PeakTime = 15.381
[Prev in Thread] | Current Thread | [Next in Thread] |