Transfer Function

ANALOG SIGNAL PROCESSING TRANSFER FUNCTION AND MATLAB IMPLEMENTATION T.A : Trung Mai Van Email : [email protected] I

Views 210 Downloads 37 File size 372KB

Report DMCA / Copyright

DOWNLOAD FILE

Recommend stories

Citation preview

ANALOG SIGNAL PROCESSING

TRANSFER FUNCTION AND MATLAB IMPLEMENTATION T.A : Trung Mai Van Email : [email protected]

Instructor : Dr Ing Tuan Do Hong

1

Transfer Function

X(s)

Y(s) H(s)

To find the frequency response of a system – apply an step signal at the input.

Analog Signal Processing 2012

2

Transfer Function

Derive the transfer function If C = 1nC, R1 = 2 K Ohm. Plot the magnitude response with different values of R2 1. R2 = 100 K Ohm

2. R2 = 300 K Ohm

3. R2 = 500 K Ohm

Analog Signal Processing 2012

3

Transfer Function

% Bode plot R1 = 2000; % in ohm C = 1e-10; % in F R2 = 100000; % in ohm TC1 = C*R1; TC2 = C*R2; numTF=[0 -1/TC1]; denomTF=[1 1/TC2]; w=0:10:10e5; %Function ‘freqs’ gives the frequency response in the s-domain Y=freqs(numTF,denomTF,w); y1=abs(Y); y2=angle(Y); subplot(2,1,1) semilogx(w,20*log10(y1)) grid on ylabel('Magnitude (dB)') title('Bode Diagram') subplot(2,1,2) semilogx(w,y2*(180/pi)) grid on ylabel('Phase (deg))') xlabel('Frequency (Rad/s)')

Analog Signal Processing 2012

4

Transfer Function % Make sure your Matlab has the control toolbox s = tf('s'); R1 = 2000; % in ohm R1 = 2000; % in ohm C = 1e-10; % in F R2 = 100000; % in ohm TC1 = C*R1; TC2 = C*R2; H = (-1/TC1)/(s + 1/TC2); bode(H); grid;

Analog Signal Processing 2012

5

Transfer Function

1. Derive the transfer function in s-domain.

2. Plot the magnitude and phase response of the above transfer function using two commands provided in Matlab : bode and freqs with C1 = 0.1 uF ; C2 = 0.1 uF ; R1 = 10 K ohm ; R2 = 10 Ohm

Analog Signal Processing 2012

6

Transfer Function

Analog Signal Processing 2012

7

Simulink Simulink is an input/output device GUI block diagram simulator. • Simulink contains a Library Editor of tools from which we can build input/output devices and continuous and discrete time model simulations. • To open Simulink, type in the MATLAB work space.

>> simulink

Analog Signal Processing 2012

8

Simulink

Analog Signal Processing 2012

9

Simulink Model elements are added by selecting the appropriate elements from the Library Browser and dragging them into the Model window. Alternately, they may be copied from the Library Browser and pasted into the model window. • To illustrate lets model the capacitor charging equation

u(t) is the step function.

Analog Signal Processing 2012

10

Simulink

Analog Signal Processing 2012

11

Simulink

I will walk you through the problem step – by – step.

Analog Signal Processing 2012

12

Simulink Building a model in Simulink 1. Build up the differential equation and transform it into sdomain. 2. Drag and drop the components from the Library Browser and connect them as the way you do with Spice or Electric Workbench. 3. Editing the parameters for needed blocks. 4. Run the simulations and check the results with scopes or import data to the workspace and use Matlab built-in drawing tools to visualize the results.

Analog Signal Processing 2012

13

Simulink

Analog Signal Processing 2012

14

Simulink

Analog Signal Processing 2012

15

References [1] James Grimbleby, “Analogue Filter Design”. University of Reading, 2009. [2] John O. Attia. “Electronics and Circuit Analysis using Matlab”. CRC Press, 1999. [3] Bradley J. Bazuin, “Analog and RF Filters Design Manual”. Western Michigan University, 2005.

Analog Signal Processing 2012

16