Plotting Output Response Curve with Unit Steps: A Matlab Guide

AI Thread Summary
To plot an output response curve in MATLAB for various damping ratios with a normalized undamped natural frequency of 1, users can utilize a 2D plot with a time scale of 0 to 10 seconds in 0.2-second intervals. Implementing a 'for loop' allows for the generation of step responses for each damping ratio efficiently. Creating an m-file automates the plotting process, enabling users to execute multiple commands with a single file. For advanced visualization, users can produce 3D plots using functions like mesh and surf. Additionally, MATLAB can be used to calculate rise time, peak time, settling time, and maximum overshoot for specific second-order system equations.
lukus09
Messages
32
Reaction score
0
How do i plot an output response curve when input unit steps are (undamped natural frequency is normalised to 1):

damping ration = 0, 0.1, 0.4,0.6,0.8,0.9 1 and 2

1) how do i plot a 2d plot for all curves on same graph. Time scale 0 - 10, steps of 0.2 seconds.
2) How do i make use of a 'for loop' to generate step response for the damping ratios,
3) How do i produce an m file to obtain response.
4) how can i produce a 3d plot
5)how do i produce a Matlab program to get rise time, peak time, settling time and max overshoot of the 2nd order system [for equation 10/ 2s^2 + 4s +15]
 
Physics news on Phys.org
From your PM, I'd recommend that you ask your prof for materials / a lecture / lab on MATLAB, especially if you [collectively you, meaning you and your classmates] have never used it before. If learning MATLAB by yourself *is* part of this course, then you should probably read the textbook (if provided) or go through some of the http://www.mathworks.com/academia/student_center/tutorials/launchpad.html" , and/or go through the following thread:
https://www.physicsforums.com/showthread.php?t=296209


1) Assuming you have data for each of the graphs you wish to plot:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/plot.html


3) An m-file allows you to automate a sequence of commands. Instead of typing out 20 commands each and every time you want to do something, you type out the 20 commands in the m-file, and just type the name of the m-file (assuming it's in the current directory) to execute these commands. You can start a new m-file by going File > New m file (or something similar). Getting started with m scripts:
http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_prog/f7-38085.html#f7-60588


2) The 'for' loop in MATLAB:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/for.html


4) Producing a (basic) 3d plot:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/plot3.html

Note that you can generate various 3D surface plots using, for instance, mesh and surf:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/mesh.html
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/surf.html


5) Take a look at the following Wikibook on using MATLAB for Control Systems:
http://en.wikibooks.org/wiki/Control_Systems/MATLAB
 
Last edited by a moderator:
Back
Top