ColorGrayscale Jeffrey Schiano 2014. All rights reserved. Rec 6. EE 350Continuous-Time Linear SystemsRecitation 61 Jeffrey Schiano 2014. All rights reserved. Rec 6. Recitation 6 Topics• Solved Problems – Generalized functions – Determining the impulse response h(t)– Determining the zero-state response using convolution• MATLAB Functions– Anonymous function– Inline function– Primary function2 Jeffrey Schiano 2014. All rights reserved. Rec 6. Generalized Functions• The generalized function δ(t) is defined by its effect on other functions by the sampling property• The generalized function δ(t), also as a functional, has the following properties3(t) ( ) ( ).ftTdtfT() 1( ) 0 when t 0tdtt Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 1• Using the definition and properties of δ(t), simplify the following expressions444(a) ( 10) ( 10) ( 8)(b) (2 8)(c) 8 d22ttttetteft Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 1 Solution5 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 1 Solution6 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 2• Consider the RL network with input f(t) and output y(t)1. Represent the electrical network using an ODE2. Represent the network using the impulse response signal h(t)7f(t)2R1RLy(t) Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 2 Solution8 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 2 Solution9 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 2 Solution10 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 2 Solution11 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 3• For the RL network in Problem 2, let• Determine the zero-state response for the input f(t)1. By solving the ODE representation of the network2. By evaluating the convolution integral 1212500R= R= 1Ω,L = 1mH() ()tft e ut Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 3 Solution13 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 3 Solution14 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 3 Solution15 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 3 Solution16 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 4• An electrical network with input f(t) and output y(t) is represented by the ODE • Represent the network by an impulse response signal h(t)1770 1000 1000yy y f Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 4 Solution18 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 4 Solution19 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 4 Solution20 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 5• A LTI system with input f(t) and output y(t) is represented by the impulse response1. Sketch h(t)2. Is h(t) a causal or noncausal signal?3. Determine the zero-state response for the input f(t) = δ(t) by evaluating the convolution integral4. Based on your response in part 3, is the systemcausal or noncausal21()tht e Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 5 Solution22 Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 5 Solution23 Jeffrey Schiano 2014. All rights reserved. Rec 6. MATLAB Functions24• Why use functions?• Splitting a large program into smaller pieces that each performs a well defined task provides several advantages – The program is easier to read– The program is easier to modify– The program is more resistant to error– Functions are reusable; once defined, they can be used over and over again in the same program, or in different programs Jeffrey Schiano 2014. All rights reserved. Rec 6. Types of MATLAB Functions• MATLAB provides two distinctly different types of functions• Functions defined by a single line– Anonymous function– Inline function• Functions defined by multiple lines in a m-file– Primary function25 Jeffrey Schiano 2014. All rights reserved. Rec 6. Anonymous Functions• Defined using one statement• Can be placed used in a– command line– m-file– another function• Syntax• The function_name identifies the function and is called the function handle26function_name = @(list of input arguments) function_expression Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 6• The polynomial Q(D) for a second-order system may be represented using two different notations• Write an anonymous function that takes as an input the vector Q = [1, a1, ao] and returns the vector [ z, wn ]• Verify your result using the polynomial 2721022(D)(D) 2nnQD aDaQD D2(D) 2 4QDD Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 6 Solution28 Jeffrey Schiano 2014. All rights reserved. Rec 6. Inline Functions• Similar to anonymous functions• Uses built-in function inline• Syntax29function_name = inline('function_expression'), 'var_1', 'var_2', ) Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 7• The polynomial Q(D) for a second-order system may be represented using two different notations• Write an inline function that takes as an input the vector Q = [1, a1, ao] and returns the vector [ z, wn ]• Verify your result using the polynomial 3021022(D)(D) 2nnQD aDaQD D2(D) 2 4QDD Jeffrey Schiano 2014. All rights reserved. Rec 6. Problem 7 Solution31 Jeffrey Schiano 2014. All rights reserved. Rec 6. Primary Functions• A user-defined function script is written within a m-file• The name of the m-file and the function name must be identical• The m-file must start with the primary function definition line1. The character string function is a reserved key word that must be in in lowercase 2. Output and input arguments are a list of valid MATLAB variable names separated by commas32function [output arguments] = function_name
View Full Document