Controls Lab OnLine


______UTC______
Assignment 6



Web-Lab Assignment #6
Sine Response Modelling
Modelling FOPDT - Excel - Sine Input

FOPDT

If the input function to a FOPDT is a sine function, having an amplitude=A and frequency of f, then

Input Sine Function eqn is here

Here is what the graph of that looks like:

Input Sine Function graph is here

With this input, the output time response of the FOPDT system is

Output Sine Function eqn is here

where K is the gain, to is the dead-time and tau is the first-order time constant, or characteristic time, of the FOPDT system. The variables m(t) and c(t) in these equations are deviation variables.

We want to have Excel draw a graph of these equations so we can see the effect of the various parameters and see what parameters best match our experimental results.

Comparing Time Responses for Model and Experiment

We're going to build our model in a file that has some experimental sine-response data in it. Open an Excel by double clicking on the Excel icon. Open the data file from Week 6 by using the File/Open... menu item.

Part of the spreadsheet will look like this:

Sine SSheet pic is here

The first 22 lines are not useful for plotting, so delete them.

Save this now in a new file named "A6-something-or-other." Do this with the File/Save As... menu.

We're going to enter in two columns of numbers to have Excel plot for us. The columns are "Input" and "Output." Type each of these names in the top row of the spreadsheet in columns D and E, respectively. Move to the right in the spreadsheet by touching the "tab" key or using the -> key or by clicking where you want to move to.

We're going to put formulas in cells D2 and E2 for the functions m(t) and c(t). In columns F and G, we're going to put names and values for A, f, K, to, tau, input baseline and output baseline. Let's use 2, 3, 0.2, 0.3, 0.4, 40 and 11, respsectively. So those columns will look like this:

Sine SSheet pic is here

Click on D2 and put in this formula:

=2*sin(2*PI()*$G$2*A2)+$G$6

(In Netscape, you can select this formula with the mouse, copy it and paste it into Excel.)

Click on E2 and put in this formula:

=$G$1*$G$3/(SQRT(1+2*PI()*$G$2*2*PI()*$G$2*$G$5*$G$5))*
SIN(2*PI()*$G$2*A2+ATAN(-2*PI()*$G$5)-2*PI()*$G$2*$G$4)+$G$7

(In Netscape, you can select this formula with the mouse, copy it and paste it into Excel.)

Save the file.

Now copy these formulas down the spreadsheet. Click in the last time-value in column D and drag across to column E and release the mouse. Both should be selected. Now click on the square at the right bottom of that selection and drag it down (off the screen and it will scroll down) to the end of the experimental data.

Now you should have 5 columns with the values in them that we want. Save the file.

GRAPHING

Scroll back to the top of the spreadsheet. Highlight the five columns we want to plot by clicking on the A at the top of column A and dragging over to the E above column E.

Now click on the graphing button (ChartWizard).

Move the cursor over the spreeadsheet and click-and-drag a rectangle as large as you want your graph. Then answer questions posed by the Chart-Wizard. ALWAYS CHOOSE SCATTER PLOT!

When the graph is drawn, double click on it to make it a separate window, then click on the upper right "grow"-box to enlarge the graph. Save the file.

VARYING PARAMETERS

Now go back to the parameter cells and change one of them and watch the graph change. Find the values of the parameters that make the model agree well with the experimental results. Save the file.

COMPARISONS

Do the above comparison for three experimental results comparisons. Do it for the data at the lowest frequency, do it for the data at the frequency closest to the "corner" frequency and do it for the data at the highest frequency.


To download this entire Excel SpreadSheet model for sine response Sine Input Model Excel SpreadSheet

Comparing Bode Plot for Model and Experiment

From last week, you got some values of the Amplitude Ratio (AR) and Phase Angle (PA) for the sine inputs to your system at some different frequencies. Enter these into a new Excel spreadsheet, like this:

Bode SSheet is here

You are leaving columns C and F blank for now; later you'll put the model equations in there. It will be useful if you enter column D by using a formula and setting it to column A. The formula for cell D2 is =A2.

The model equations for the Bode plots are

Sine AR eqn is here

and

Sine PA eqn is here

So, add to your spreadsheet, in columns G and H, the names and values of the approximate model parameters for your system: K, to and tau. Let H1, H2 and H2 be the cells the values are in.

In the cell in column C BELOW the last experimental point, let's say, C10, enter this formula for the amplitude ratio

=$H$1/SQRT(1+2*PI()*A10^2*$H$3^2)

(In Netscape, you can select this formula with the mouse, copy it and paste it into Excel.)

In the cell in column F BELOW the last experimental point, let's say, F10, enter this formula for the phase angle

=ATAN(-2*PI()*A10*$H$3)-2*PI()*A2*$H$2

(In Netscape, you can select this formula with the mouse, copy it and paste it into Excel.)

Now plot the amplitude ratio part of the Bode plot by highlighting columns A, B and C; choosing the ChartWizard, selecting Scatter and selecting log-log plot.

Now plot the phase angle part of the Bode plot by highlighting columns D, E and F; choosing the ChartWizard, selecting Scatter and selecting semi-log plot.

To download this entire Excel SpreadSheet model for Bode graphs

Bode Diagram Excel SpreadSheet

-- Construct a Bode plot. Here is how the Bode plot might look
A-R Bode pic is here
A-R Bode pic is here

Click to download an Excel spreadsheet to draw these Bode plots

Send an e-mail (report) within the next few days. (Click on "report" to get instructions.)

**** CONTINUOUS IMPROVEMENT ***

For suggestions and feedback,

contact Jim Henry - Lab-Master Send E-Mail to Jim Henry
12 October 1997, Last revised 15 March 1999

Home Page of The University of Tennessee at Chattanooga Lab
Front
Door
Web-Manual
Table of
Contents