Vous êtes sur la page 1sur 16

CONTROL SYSTEM LABORATORY

MODELLING IN THE FREQUENCY


DOMAIN
TRANSFER FUNCTION USING THE
SYMBOLIC MATH TOOLBOX

Required transfer function: G(s) = I2(s)/V(s)


R1 = 4000
The s-domain loop equation for the above R2= 1000
circuit are: C = 1/8 F
R1I1(s) + LsI1(s) Ls I2(s) = V(s) L = 4/13 H
LsI2(s) + R2I2(s) + (1/Cs)I2(s)-LsI1(s) = 0
CRAMERS RULE AND DETERMINANTS
IN MATLAB
Cramers rule can be performed in the
symbolic math toolbox of MATLAB using the
det()command.
The simple() command of MATLAB on the
other hand combines all the coefficient of
same degree.
DET command
Using cramers rule on the following equation to determine G(s):
R1I1(s) + LsI1(s) Ls I2(s) = V(s)
LsI2(s) + R2I2(s) + (1/Cs)I2(s)-LsI1(s) = 0
On the MATLAB command window type the following:

The MATLAB should give you the following result for I2(s):
simple () command
Note the coefficients of s in different degrees are not grouped
together

On the command window of MATLAB type

MATLAB should answer:

Notice the coefficients of s are now grouped


TRANSFER FUNCTION
Continuing; on the command window type:

This is the transfer function G(s) = I2(s)/V(s) of


the circuit.

MATLAB answers:
IMPULSE RESPONSE g(t)
Using the ilaplace() on G(S) will give you the
impulse response:

Which results to g(t)

g =

1/(R1+R2)*(dirac(t)+exp(-1/2*(L+R1*R2*C)/L/C/(R1+R2)*t)*(-
(L+R1*R2*C)/L/C/(R1+R2)*cosh(1/2*t/L/C/(R1+R2)*(L^2-2*L*R1*R2*C+R1^2*R2^2*C^2-
4*R1^2*L*C)^(1/2))+(R1^2*R2^2*C^2+L^2-2*R1^2*L*C)/C/L/(L^2-
2*L*R1*R2*C+R1^2*R2^2*C^2-4*R1^2*L*C)^(1/2)/(R1+R2)*sinh(1/2*t/L/C/(R1+R2)*(L^2-
2*L*R1*R2*C+R1^2*R2^2*C^2-4*R1^2*L*C)^(1/2))))
Unit step response of the System
Note that the Laplace transform of u(t) is 1/s
Let U(s) = 1/s in the command window type the
following:

Resulting to:

Taking the inverse laplace will give the unit step


response of the system.
Unit step response Cont

i2 =

((1/2*(L^2-2*L*R1*R2*C+R1^2*R2^2*C^2-4*R1^2*L*C)^(1/2)-1/2*L-
1/2*R1*R2*C)*exp(-1/2*(-(L^2-2*L*R1*R2*C+R1^2*R2^2*C^2-
4*R1^2*L*C)^(1/2)+L+R1*R2*C)*t/L/C/(R1+R2))+(1/2*(L^2-
2*L*R1*R2*C+R1^2*R2^2*C^2-4*R1^2*L*C)^(1/2)+1/2*L+1/2*R1*R2*C)*exp(-
1/2*((L^2-2*L*R1*R2*C+R1^2*R2^2*C^2-
4*R1^2*L*C)^(1/2)+L+R1*R2*C)*t/L/C/(R1+R2)))/(L^2-
2*L*R1*R2*C+R1^2*R2^2*C^2-4*R1^2*L*C)^(1/2)/(R1+R2)
vpa(A,d) command
Variable precision arithmetic (vpa) used to
reduce the fractional part of the variable to
decimal.
Activity
For the previous RLC circuit, let
R1 = 4000
R2= 1000
C = 1/8 F
L = 4/13 H

Determine the impulse and step response of the circuit if the


output is
1. vC (t)
2. vL (t)
Activity
Write the s-domain equation of the following electric circuits and determine the
following:
3) Transfer function using det() and simple() command
4) Determine vL(s)

3a and 4a
3b and 4b 3c and 4c
Activity
5. Determine the Step response and 6. impulse
response of the following circuit

5a and 6a

5b and 6b
Requirements:
1. M-files
2. Word document containing the results

Vous aimerez peut-être aussi