Anda di halaman 1dari 6

Laboratory 12: Cover Sheet Roll No.

: __________________Name of the Student: ____________________________ Semester: _______________ Course Title: ____________________________________ Laboratory Objectives: 1. Converting Centigrade to Fahrenheit 2. Modeling the differential equation Place a check mark in the Assigned column next to the exercises your instructor has assigned to you. Attach this cover sheet to the front of the packet of materials you submit following the laboratory. Activities Pre-lab Exercises In-lab Exercises Take Home Exercises Any Other Remarks Signature

1. Introduction Lets model the equation that converts Centigrade temperature to Fahrenheit: TF = 9/5(Tc) + 32 First, consider the blocks needed to built the model: A Gain block, to multiply the input signal by 9/5, from the linear library A Constant block, to define a constant of 32, from the Sources library A Sum block, to add the two quantities, from the linear library A Sine Wave block to input the signal, from the Sources library A Scope block to display the output, from the Sinks library

Next, gather the blocks into your model window:

Assign values to the Gain and Constant blocks by opening (double-clicking on) each block and entering the appropriate values. Then, click on the OK button. Adjust the amplitude of the Sine Wave block to 10 to get more temperature variation. Now connect the blocks.

Comm. System Labs Manual

Page 2

The Sine Wave represents Centigrade temperature. The Gain block generates 9/5(T c). That value is added to the constant 32 by the Sum block. The output of that block is the Fahrenheit temperature. Open the Scope block to view the output. Set the horizontal scale to some short amount of time, say 10 seconds. Set the vertical scale so you can view all the output at least 50. Keep the scope block open. Specify the simulation parameters by choosing Parameters on the Simulation menu. Specify a stop time of 10 seconds and a maximum step size of 0.1.

Those values should run the simulation quickly. Now, choose Start on the Simulation menu to run the simulation.

Comm. System Labs Manual

Page 3

2. Model the Differential Equation x = -2x+u The integrate block integrates its input, dx/dt, and produces x. Other blocks needed in this model include a Gain block and a Sum block. To generate a square wave, use a Signal Generator block. Again, view the output using a Scope block. Gather the blocks and define the gain.

In this model, to reverse the direction of the Gain block, use the Flip Back command on the Format menu. Also, to create the line from the output of the Integrator block to the Gain block, now you can connect all the blocks. An important concept in this model is the loop that includes the Sum block, the Integrator block, and the Gain block. In this equation, x is the output of the integrator block as well as input to the blocks that compute x, on which it is based. This relationship is implemented using a loop. The Scope displays x at each time step. For a Simulation lasting 10 seconds and scope vertical range of 1, output looks like this:

Comm. System Labs Manual

Page 4

The equation you modeled in this example can also be expressed as a transfer function. The model uses the Transfer Fcn block, which accepts u as input and outputs x. So, the block implements x/u. If you substitute sx for x in the equation above, you get sx = -2x + u Solving for x gives us x = u/(s+2) Or, x/u = 1/(s+2) The Transfer Fcn block uses parameters to specify the numerator and denominator. In this case, the numerator is 1 and the denominator is s+2. Specify both terms as vector of coefficients of successively decreasing powers of s; in this case the numerator is [1] and the denominator is [1 2].

The model now becomes quite simple:

Comm. System Labs Manual

Page 5

The results of this simulation are identical to those of the previous model.

ASSIGNMENT
Design a System with an algebraic loop. The loop consists of the Sum, Transfer Fcn (S+2/S+1), and gain blocks.

Comm. System Labs Manual

Page 6

Anda mungkin juga menyukai