0% found this document useful (0 votes)
338 views

Lab02 Worksheet

This lab document describes a two-part experiment using Simulink to analyze and model three unknown systems. In part one, students apply step inputs to each system to determine their static gains and classify them as first or second-order. They then estimate parameters like time constants. In part two, students modify a preexisting Simulink model to allow a MATLAB script to control inputs/outputs and plot multiple responses on the same figure.

Uploaded by

Spin Fotonio
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
338 views

Lab02 Worksheet

This lab document describes a two-part experiment using Simulink to analyze and model three unknown systems. In part one, students apply step inputs to each system to determine their static gains and classify them as first or second-order. They then estimate parameters like time constants. In part two, students modify a preexisting Simulink model to allow a MATLAB script to control inputs/outputs and plot multiple responses on the same figure.

Uploaded by

Spin Fotonio
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

ES205 Analysis and Design of Engineering Systems

Lab 2
Introduction
In this lab you will apply a step input to three unknown systems. From the system responses, you will develop models for the systems based on your knowledge of 1st- and 2nd-order system characteristics. In part 2 of the lab you will use Matlab to control the input and output of a Simulink simulation, including creating multiple plots on the same page.

Part 1: System Characteristics and Modeling


You received a Simulink file via email called lab02.mdl. The file contains three blocks which model three different systems. The equations of motion of these systems are unknown to you. A snapshot of the Simulink file is shown. In Simulink, complete the simulation diagram by adding a step input block and an output scope to each of the three unknown systems. Apply a step input of magnitude 1 to system #1. From the steady-state response, determine the static gain. Record your answer on the Worksheet. Print and label the scope plot showing the steady-state response. Note: select the Scope window, press Alt-PrntScrn, and you can Paste the figure into an MSWord document. Apply a step input of magnitude 2 to system #2. From the steady-state response, determine the static gain. Record your answer on the Worksheet. Print and label the scope plot showing the steady-state response. Apply a step input of magnitude 3 to system #3. From the steady-state response, determine the static gain. Record your answer on the Worksheet. Print and label the scope plot showing the steady-state response.

For each of the three systems, if the system appears to be first-order, estimate the systems time constant . If the system appears to be second-order, estimate the systems damped natural frequency d. Record your estimates on the Worksheet. Attach a sample calculation to the worksheet.

Part 2: Using Matlab to Control Simulation Inputs and Outputs


In Lab 1, you created a Simulink model called example2.mdl to numerically solve the ODE & + cx + kx = f (t ) . Your model should be similar to the simulation diagram shown below. In m& x this part of the lab, the input f(t) and the damping coefficient c will be varied in different combinations using a Matlab m-file and the system responses will be plotted using Matlab. f (t) +

1 m

& & x

1 s

& x

1 s

x( t )

k
Change your Simulink model so that a Matlab m-file controls the parameters (m, c, k), the initial conditions, and the input magnitude and start time, and so that the output x(t) and the time vector t is returned to the Matlab workspace for plotting. In your simulations, select time spans such that all responses reach steady-state. Using the subplot command, put both figures described below on the same page. Attach a copy of your m-file and a copy of the two figures to the Worksheet. Figure 1 Step input, mag = 1, starting at t = 1 s. Four simulations: c = 0.3, 0.5, 0.7 and 1 N/m/s. Initial conditions (ICs) are zero, m = 1 kg, and k = 1 N/m. Plot all four responses (each with a different symbol) in a single figure; subplot(211). Include a legend and the title Fig 1: Step responses as damping varies. Figure 2 Step input, mag = 2.5, starts at t = 0 s. Use c = 0.5 N/m/s, m = 1, kg and k = 1 N/m. & (0) = - 2 . Response #1: x(0) = 0, x & (0) = 0 . Response #2: x(0) = -3, x & (0) = 2 . Response #3: x(0) = 3, x Plot all three responses (each with a different symbol) in a single figure; subplot(212). Include a legend and the title Step response with different ICs.

Name _____________________________________ Section ____________CM ____________

Lab 2 Worksheet
Part 1
System #1 Magnitude of step input Magnitude of steady-state response Static gain Apparent order of the system Characteristic (with units) second-order
d = =

System #2

System #3

first-order

second-order
d =

From the response shown, system #2 appears to be first-order. But the response shown might also be that of a second-order system. Explain.

Determine the natural frequencies by measuring the damped period for systems #1 and #3. Also find the damping ratios by either using the logarithmic decrement or the percent overshoot equation. Include a sample calculation to show your method. System #1 Natural frequency n Damping ratio System #2 n/a n/a System #3

From the information in the tables, create a mathematical model (ODE) for each system. Show your work. ODE model of system #1:

Transfer function model of system #1:

Name _____________________________________ Section ____________CM ____________ ODE model of system #2:

Transfer function model of system #2:

ODE model of system #3:

Transfer function model of system #3:

Part 2
Comment on the system responses in Figure 1 and Figure 2.

Attachments
1. 2. 3. 4. Attach a copy of your scope windows from the three unknown systems in Part 1. Attach a sheet of sample calculations from Part 1. Attach a copy of your m-file from Part 2. Attach a copy of your Matlab plots from Part 2.

You might also like