Lab4_StepResponse

pdf

School

University of Illinois, Urbana Champaign *

*We aren’t endorsed by this school

Course

425

Subject

Electrical Engineering

Date

Feb 20, 2024

Type

pdf

Pages

7

Uploaded by bdbarbe2

Report
Lab4: Step response of a first order system. STUDENT NAME February 25, 2021 1 Objectives The objective of this lab is to understand the unit step response of a first order dynamic system being an RC network. 2 Introduction Given is a basic electrical first order system comprising a resistor and a capacitor as shown in Fig. 1. This system can be described using a First Order differential equation as follows: U IN = τ ˙ U O + U O (1) Where τ = RC is the time constant. Translating this system to the Laplace domain using the definition L ( f ( t )) = Z t = t =0 f ( t ) e - st dt (2) gives: U IN ( s ) = τsU O ( s ) + U O ( s ) (3) Therefore the transfer function can be written as: U O ( s ) U IN ( s ) = 1 τs + 1 (4) Figure 1: An RC network is a classical example of a First Order System. 1
If we excite the system with a unit step function which has a Laplace Transform of U IN ( s ) = 1 s , the output U O ( s ) can be written as: U O ( s ) = 1 τs + 1 U IN ( s ) = 1 τs + 1 1 s (5) This can be transformed back to time using Partial Fraction Expansion and the Laplace Transform Table. The solution is as follows: U O ( t ) = 1 - e - t τ (6) To measure the time constant RC of the circuit, we can use a trick. In Eqn. 6 if we substitute t = τ we get: U O ( t ) = 1 - e - 1 = 0 . 63 (7) In this lab, we will build a circuit, measure the step response of the system and compare it to the theoretical solution shown here. In our circuit we do not have a unit step function, since we are putting a step of 5V on the circuit, but the principle is the same. Therefore, if all goes well, you should measure an exponential curve starting at 0V, and reaching +5V at a long time delay (this is called the steady state). The signal should reach a value of 5*0.63 = 3.15V when the time reaches the time constant τ . The theoretical time constant of our circuit is RC = 10 5 * 10 - 5 = 1 second. 3 Building the hardware The components needed for this lab are: 1. Arduino 2. Small breadboard 3. Electrolytic capacitor, 10 μF 4. Resistor, 100k Build the circuit as shown in Fig. 2 using the small breadboard, a resistor R = 100 k Ω and a capacitor of 10 μF . BE CAREFUL HERE. This is an electrolytic capacitor which has a polarity. You can see where the ground lead of the capacitor is on the package: there is a large minus sign shown in an arrow, AND the short lead is always ground. Dutch students remember this as ”de korte kant is koud” meaning literally ”the short side is cold”. If you reverse the polarity of an electrolytic capacitor, it will literally blow its lid, and noxious fumes will fill the room. If you have a decent Digital Multi Meter (DMM), go ahead a measure the true value of the resistor and capacitor (AGAIN BE CAREFUL, the common black wire goes to the ground (-) being the short wire of the capacitor). If you do not have such a meter, just assume that the resistor is 100 k Ω and the capacitor is 10 μF . Figure 3 shows a photo of the circuit. 4 Building the software Figure 4 shows the Graphical User Interface (GUI) of the App. At the top left, there is an axes where we will plot the step response curve. On the right is an image of the circuit. NrSamples is a spinner, set the range to [100,500] with a step of 100. Elapsed time is an Edit Field (Numeric) 2
Figure 2: Shown is the schematic of the Step response circuit. component, make sure you uncheck the Editable property as the user is not allowed to enter any- thing in it. The Com port is an Edit Field (Text) from which we grab the Comp port string. The Trigger and STOP buttons are simple Push Button. Figure 5 shows the properties of the Step Response App. Figure 6 shows the Nassi-Shneiderman (NS) diagram of the startupFcn of the App which is ex- ecuted at startup. Since this lab is about experimentation with a step response, you may copy the code into your code view of the App. As you can see, here the Com port is adaptive; the user can type in any Com port number in Windows or Com string on a Mac. The code uses a ’eval’ command to define the Arduino object a, essentially a string is composed that is executed in Matlab. Since this string itself contains single quotes (apostrophes if you want to be French about it), you end up with multiple single quotes in a row. Composing a string like this one typically takes some experimentation. Figures 7 and 8 show the callback functions of the TriggerButtonPushed and the STOPButton- Pushed components respectively. 5 Questions Q1: How can you tell from the differential equation shown in Eqn. 1 that the unit of the time constant τ is second? A1: Q2: Show that the unit of the time constant τ = RC is indeed second, using Ohm’s Law and the Capacitor Equation. A2: 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Figure 3: Shown is the small breadboard with a 100k resistor and a 10 μF electrolytic capacitor connected. MAKE SURE to connect the short lead (negative side) to the ground, if you reverse this, bad things will happen! 4
Figure 4: Graphical User Interface of the Step Response App. Figure 5: NS diagram of the Properties of the App. 5
Figure 6: NS diagram of the startupFcn. Figure 7: NS diagram of the TriggerButtonPushed callback. Figure 8: NS diagram of the STOPButtonPushed callback. 6
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
6 Submission Submit a narrated video on the ABE425 Submission Channel, where you show and explain the working of your complete App. Also, answer the questions in the video, so you do not have to upload anything on Compass. Show your handwritten work for A2. 7