![]() |
|
#1
|
|||
|
|||
Problem using MATLABThe system under consideration:
Figure 1 depicts a drive system for a heavy mechanical load (e.g. a large plate mill). The system features high inertia, frictional effects and relatively long driveshaft (which can therefore exhibit a certain amount of 'springiness'). A test was carried out on this system as follows: Initially, the output shafts were turning at 230 r.p.m and a speed increase of 10% was called for. For this system, a 10% speed increase is normally achieved by increasing the voltage input by 1V. A 1V step change in input was therefore applied, at a time designated as t=0. Table 1 shows some recorded values of the increase in rotational velocity of the rolls, measured from t=0 onwards. time(s) 0 0.12 0.30 0.46 0.72 0.96 1.20 output (rand s-2) 0 0.132 0.663 1.260 2.125 2.622 2.770 time(s) 1.50 1.76 2.12 2.50 3.02 3.40 3.98 output (rand s-2) 2.770 2.691 2.553 2.495 2.501 2.524 2.535 Table 1 The first task for this assignment: 1. Produce a computer-generated, report-quality plot of the step response of this system, as given in table 1. Indicate the data point locations in addition to any plot line. Show the commented code that you used to generate this plot; you must only use Matlab statement to generate the plot. The plot shown in your work should not be a screen dump of the Matlab figure showing the plot. You now discover that the test was repeated and that another set of data exists. This second set of result was obtained at regularly-spaced sampling times, every 20ms, between t=0 and t=4.5sec. This set of time values can be reconstructed using one MATLAB command so it is not stored for you. However, the corresponding values of the system's output step response are below you need to load, i.e. read, the data into the workspace - you should end up with a variable in the workspace called stepdata. Note that you should not copy and paste the data into Matlab and you should not use any command that includes the word 'read' in its name. marks will not be awarded if these instructions are not followed. 33333333333333333 33333333333 333333333333 333333 33 3 2. Produce a plot of the new (downloaded) steps response data against a correctly- scaled time axis. Your plot should have * A solid line for the new step response * Indications of the locations of the data points from the original trial (i.e. the values in Table 1. 3. Carefully discuss the differences between the two plots and any issues which they highlight about carrying out plant 9and laboratory0 test of this nature. Explain what you think could account for the features seen in the second data set, stepdata, but not in the tabulated data. Why is it possible to see features in one data set that cannot be seen in the other? 4. The plot produces in task (2) can be compared by producing a plot of the difference between two data sets. In order to find the difference between two data sets both data sets need to be the same length. However, the two data sets are of different length. Show how you can generate data sets of the same length - this will mean either creating data points or removing data points so that the (remaining) data in both data sets occurs at the same values of time. List the command code that you used to produce this difference plot. The pass standard in typically to produce all the required plots and make an attempt at question 3. To get better marks, the plots need to be reported-quality; the discussion needs to be thorough and correct. |
|||
|
#2
|
||||
|
||||
Re: Pls can anybody help in solving dis problem using MATLAB "MATLAB ONLY PLS"I hope you have done or plan to do some work yourself.
This is obviously homework, and we are here to help, not do it for you. __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#3
|
|||
|
|||
Re: Pls can anybody help in solving dis problem using MATLAB "MATLAB ONLY PLS"yes am on it already doin it but i just need some who can help in discovering commands, which i am having problems with.
|
|
#4
|
|||
|
|||
Re: Pls can anybody help in solving dis problem using MATLAB "MATLAB ONLY PLS"Quote:
As I mentioned in a previous post, I have GNU Octave, not Matlab. The actual data manipulation for GNU Octave is the same for both programs. Octave is run from a command line prompt. If you have Matlab with a GUI (Graphics User Interfafce) you will execute Matlab programs, stored as "something.m" in whatever way that your system is set up. Here's the drill for command-line stuff Part 1: Create a file, say example1.m, with a text editor Here's some of the stuff in the file: define a vector for the time: Code:
define a vector for the output: Code:
Note that t and y have the same number of elements Simple plot: Code:
Invoke Matlab from the directory where you created example1.m and, from Matlab, execute example1 Make sure that this works. I get a plot window with a line plot (straight-line segments between the fourteen given points). On my Linux system, with GNU Octave, the default color is blue. What do you get? Now, here's the place where Octave may be different from Matlab: in the various plot options. For example, instead of the above plot command, try Code:
Now I get just the points, blue asterisks, not connected by lines. I hate to repeat myself, but Matlab may be different with stuff like this. Matlab has more powerful plotting options, but try the simple stuff first. Now, try Code:
I get a red line between the data points, and the data points are blue asterisks. All on the same plot. By "report quality" I assume that axis labels and titles are required. Some of these can be designated in the "plot" command, but I like to keep them separate. For example, after the plot command: Code:
Change your labels, title, and legend, if necessary, to make them whatever it is that you need for your assignment. Now, if any of these don't work (or the result is not "report quality" by your instructor's definition), then use Matlab help (Enter "help plot" from within Matlab) or look at Matlab manuals or use the Matlab help desk at http://www.mathworks.com to get information about plotting, including labels, titles, legends, etc. Regards, Dave |
|
#5
|
||||
|
||||
Re: Pls can anybody help in solving dis problem using MATLAB "MATLAB ONLY PLS"Quote:
Good. I suggest you ask specific questions about things you need help with. This will definitely increase chances of someone helping you. __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#6
|
|||
|
|||
Re: Pls can anybody help in solving dis problem using MATLAB "MATLAB ONLY PLS"Thanksss soooooooooo much dave, that was wat I did but was confused may be am getting it wrong. Thank you I soo much appreciate
|
|
#7
|
|||
|
|||
Re: Problem using MATLABhello dave am making progress with it, the hint you gave me realy helped.
-Could anyone please tell me how to produce a plot the difference between two data. -I have two data sets of different lenght please how can i generate data sets of the same lenght. -I have ploted this already (0:0.02:4.5,0.0000000e+000>4.1106828e-003> 1.6087901e-002>3.5405460e-002 till 2.5317549e+000) but am trying to generate and plot of there differences.which code can I use to make the two datas same lenght. |
|
#8
|
|||
|
|||
Re: Problem using MATLABQuote:
If one set of data has values for 20 points and the other has values for 40 points, what the heck do you have? That is, each point on a plot represents values of two coordinates. You can plot any number of data sets on the same graph, but what do you mean about "plotting the difference?" Here's a way to plot two different data sets on the same graph (whether they have the same length or not): Code:
If the data sets are different sizes, what do the values refer to? Does one set need to be padded with zeros at one end or the other, or to have zeros filling in some "holes" in between the points or what? Can you be more specific? Where did the values come from? Stuff like that. Regards, Dave |
Recent GIDBlog
Problems with the Navy (Enlisted) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| really need help solving this problem :S | cflower | Java Forum | 5 | 29-Oct-2006 23:47 |
| Internet Problem Solving Contest... | netnut | Miscellaneous Programming Forum | 0 | 12-May-2006 10:12 |
| a significant problem after installing Xp | mohammad | Computer Software Forum - Windows | 10 | 09-Aug-2005 07:03 |
| Help in solving this C++ problem..... | homz | C++ Forum | 3 | 24-May-2004 22:04 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The