Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Transfer function of Multi variable system

Status
Not open for further replies.

peterkj93@gmail.com

Junior Member level 1
Joined
Jul 24, 2013
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
118
hi all,

I am a research student in electrical engineering. Now I came across a complicated system, whose transfer function has to be calculated and ploted in frequency domain. I have found out the values of all variables. Please help me ASAP. I have attached the problem.

Values are,
Rs = 50, R1 = 0.075, R2 = 0.23, R3 = 0.11, R4 = 0.032, RL = 100,
C2 = 34p, C3 =470p,
L1 = 1.2u, L2 = 11.2u, L3=0.80u, L4 =0.065u
M12=0.623u, M13= 0.00098u, M14 = 0.0059u, M23 = 0.014u, M24 = 0.0179u, M34 = 0.173u


https://obrazki.elektroda.pl/3231497500_1501150459.jpg
 

You got 4 equations and 4 unkown, what else you need ??.. Try to write a MatLAB code an solve by yourself.
 

You got 4 equations and 4 unkown, what else you need ??.. Try to write a MatLAB code an solve by yourself.

Two doubts. In these 4 equations, apart from i1,i2,i3 and i4 , there is a jw term. Which will make 5 variable 4 equation form. And after all I have to find out Vl/Vs (transfer function in w domain)

- - - Updated - - -

Two doubts. In these 4 equations, apart from i1,i2,i3 and i4 , there is a jw term. Which will make 5 variable 4 equation form. And after all I have to find out Vl/Vs (transfer function in w domain)


Now I got an approximate idea. We have 5 variables (i1, i2, i3, i4, w(frequency))and 4 equations. We have to plot Vl/Vs with frequency. So I suggest, we have to calculate this Vl/Vs by putting different values to f ie w. So at each instant, f value is known, so the system converges to 4 variable 4 equation form. But how to write the above mentioned algorithm in MATLAB.
 

I think your problem can be solved by iterative solving techniques because there are two variables and each variable is depended other one.
 

I think your problem can be solved by iterative solving techniques because there are two variables and each variable is depended other one.

I somehow wrote a MATLAB code. But it says

??? Error using ==> char
Conversion to char from logical is not possible.

Error in ==> solve at 88
vc = char(v);

You have any idea?
 

I have only a basic knowledge of Matlab (and english) but you can write:

Code:
% Data
Rs = 50 ; R1 = 0.075 ; R2 = 0.23 ; % ohms
R3 = 0.11 ; R4 = 0.032 ;           % ohms 
RL = 100 ;                         % ohms 

C2 = 34 ; C3 = 470 ;               % picofarads

L1 = 1.2  ; L2 = 11.2  ; L3 = 0.80  ; L4 = 0.065 ; % microhenrys

M12 = 0.623 ; M13 = 0.00098 ; M14 = 0.0059 ;       % microhenrys
M23 = 0.014 ; M24 = 0.0179  ; M34 = 0.173 ;        % microhenrys

% Build matrices 
R = [Rs+R1,0,0,0;0,R2,0,0;0,0,R3,0;0,0,0,R4+RL];
Xc = [0,0,0,0;0,1/C2,0,0;0,0,1/C3,0;0,0,0,0]*10^12;
M = [L1,M12,M13,M14;M12,L2,M23,M24;M13,M23,L3,M34;M14,M24,M34,L4]/10^6;

% And finally
s = tf('s') ; TF = [0,0,0,-RL]*((R + Xc/s + M*s)\[1;0;0;0])
bode(TF)

Returning
Code:
Transfer function:
   1.514e007 s^5 + 2.464e012 s^4 + 8.716e022 s^3 + 7.64e027 s^2 + 1.284e038 s - 2.931e031
--------------------------------------------------------------------------------------------
s^6 + 3.674e009 s^5 + 1.656e017 s^4 + 1.988e025 s^3 + 8.433e032 s^2 + 2.689e040 s + 1.09e048
and the bode plot
 

This should easily translate into a state space representation, which can then be converted directly to a transfer function. In matlab you can just use the ss2tf function.
 

I have only a basic knowledge of Matlab (and english) but you can write:

Code:
% Data
Rs = 50 ; R1 = 0.075 ; R2 = 0.23 ; % ohms
R3 = 0.11 ; R4 = 0.032 ;           % ohms 
RL = 100 ;                         % ohms 

C2 = 34 ; C3 = 470 ;               % picofarads

L1 = 1.2  ; L2 = 11.2  ; L3 = 0.80  ; L4 = 0.065 ; % microhenrys

M12 = 0.623 ; M13 = 0.00098 ; M14 = 0.0059 ;       % microhenrys
M23 = 0.014 ; M24 = 0.0179  ; M34 = 0.173 ;        % microhenrys

% Build matrices 
R = [Rs+R1,0,0,0;0,R2,0,0;0,0,R3,0;0,0,0,R4+RL];
Xc = [0,0,0,0;0,1/C2,0,0;0,0,1/C3,0;0,0,0,0]*10^12;
M = [L1,M12,M13,M14;M12,L2,M23,M24;M13,M23,L3,M34;M14,M24,M34,L4]/10^6;

% And finally
s = tf('s') ; TF = [0,0,0,-RL]*((R + Xc/s + M*s)\[1;0;0;0])
bode(TF)

Returning
Code:
Transfer function:
   1.514e007 s^5 + 2.464e012 s^4 + 8.716e022 s^3 + 7.64e027 s^2 + 1.284e038 s - 2.931e031
--------------------------------------------------------------------------------------------
s^6 + 3.674e009 s^5 + 1.656e017 s^4 + 1.988e025 s^3 + 8.433e032 s^2 + 2.689e040 s + 1.09e048
and the bode plot


This is a nice solution. Sine my version is MATLAB2008, it is returning error for the same code. Can you attach the bode plot?
 

This is a nice solution. Sine my version is MATLAB2008, it is returning error for the same code. Can you attach the bode plot?

My version is 2008b.

The Bode plot is

bode.jpg


------------------------------------

For versions lower than 2008b try this function:

Code:
% Convert Symbolic Transfer Function to ZPK Transfer Function
% Crystal Nassouri 2009
% Allows for substitution/manipulation that can only be done with syms
%
% Ex: Gs = syms2tf(G)
% Where G is a symbolic equation and Gs is a zpk transfer function

function[ans] = syms2tf(G)
[symNum,symDen] = numden(G); %Get num and den of Symbolic TF
TFnum = sym2poly(symNum);    %Convert Symbolic num to polynomial
TFden = sym2poly(symDen);    %Convert Symbolic den to polynomial
ans =tf(TFnum,TFden);

Then, after build the matrices do:
Code:
syms x ;  TFsyms = [0,0,0,-RL]*((R + Xc/x + M*x)\[1;0;0;0]);
TF = syms2tf(TFsyms);
bode(TF)

There's a slight difference in the TF coefficients due the roundings ,system greater than 3x3 are numerically sensibles, but the bode is the same.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top