Plotting Output Response Curve with Unit Steps: A Matlab Guide

Click For Summary
SUMMARY

This discussion focuses on plotting output response curves in MATLAB for various damping ratios (0, 0.1, 0.4, 0.6, 0.8, 0.9, 1, and 2) with a normalized undamped natural frequency of 1. Key tasks include creating a 2D plot for all curves on the same graph over a time scale of 0 to 10 seconds, utilizing a 'for loop' to generate step responses, and producing an m-file to automate the process. Additionally, the discussion covers generating rise time, peak time, settling time, and maximum overshoot for a second-order system defined by the equation 10 / (2s^2 + 4s + 15).

PREREQUISITES
  • Familiarity with MATLAB programming and syntax
  • Understanding of control systems and damping ratios
  • Knowledge of plotting functions in MATLAB, specifically 2D and 3D plots
  • Basic understanding of m-files and automation in MATLAB
NEXT STEPS
  • Learn how to implement MATLAB 'for loops' for iterative calculations
  • Explore MATLAB's plotting functions, including plot, plot3, mesh, and surf
  • Study the creation and usage of m-files in MATLAB for automating tasks
  • Investigate MATLAB's capabilities for analyzing control system parameters such as rise time and overshoot
USEFUL FOR

Students and professionals in engineering, particularly those focusing on control systems, MATLAB users seeking to enhance their plotting skills, and anyone interested in automating MATLAB tasks for system response analysis.

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:

Similar threads

  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K