find overshoot, undershoot, rise time and fall time on a non step response function
Show older comments
So i know i can do this with a step response plot
But say i have a continuous time doman plot aka just a vector of data
I want to find rise and fall time over shoot and undershoot
are there any built in functions for this?
2 Comments
John D'Errico
on 13 Aug 2021
Why would there be? You can write the code.
Robert Scott
on 13 Aug 2021
Accepted Answer
More Answers (3)
Paul
on 14 Aug 2021
I'm not sure what you mean by "fall time," so can't help you there.
Why isn't
stepinfo(y,t)
sufficient? Is the data too noisy or something?
1 Comment
I'm still not sure why stepinfo() isn't useful for your application.
As I understand the problem, you have some data and you wish to find some figures-of merit of the data. I'm still under the impression that the data is essentially the output of a system that was excited by a step input.
Why am I under that impression? Because:
a) the figures of merit overshoot, undershoot, and rise time are commonly used to describe the output of a system in response to a step input. I'm not familiar with "fall time" but a quick search suggests it's essentially the same as the rist time
b) this answer, which you seemed to be pursuing, suggested using the function stepinfo(), which is used to estimate the figures of merit you seek for the output of a system in response to a step input
Based on the above, I'm assuming you have some data that looks like a "typical 2nd order step response." For what I'm sure are good reasons, you can't show us the data. So let's create some
sys = tf(1,[1 2*.7 1]); % 2nd order system for experimenting
stepinfo(sys) % get the figures of merit based on the model
[y,t] = step(sys); % generate some data
stepinfo(y,t) % gneerate the same figures of merit based on data
As expected, the FOMs based on the data closely match what stepinfo caclulates based on the model.
Does this example capture the essence of what you're trying to do?
If not, you'd probably get more traction here if you posted an example of what you're trying to accomplish with some actual data. Not the real data in question if you can't share it, but some example data that sitll illustrates the problem.
Robert Scott
on 15 Aug 2021
0 votes
1 Comment
Image Analyst
on 15 Aug 2021
How about this instead:
"Picture this -- see the screenshot below of my data plotted."
And then indicate with red lines or arrows exactly what x and y distances you want to measure between.
Robert Scott
on 15 Aug 2021
0 votes
1 Comment
Star Strider
on 15 Aug 2021
Just out of curiosity, what were you able to do with Python that you could not do with MATLAB?
I am still not certain what the problem is with the data. If it is noisy, one option could be the Savitzky-Golay filter sgolayfilt function that generally works and is preferable for broadband noise where frequency-selective filters completely fail. (Select 3 for the order, then experiment with the frame length to get the best result.) The smoothdata function can slso use it, however it is apparently necessary to have the Signal Processing Toolbox to use it with smoothdata.
.
Categories
Find more on Response Computation and Visualization 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!