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.

odd order calculation of filter

Status
Not open for further replies.

oshaye3

Member level 3
Member level 3
Joined
Aug 4, 2010
Messages
62
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
london
Activity points
1,822
Dear all,

I am trying to find a way calculate my componet values from first order section of my Transfer function. How can I manipulate the code in Matlab to calculate the first order section. I put the code below and the results with error. This is 3rd order. Any response is highly appreciated.

code:
pp1=p{1}(1)/p{1}(3);pp2=p{1}(2)/p{1}(3);pp3=p{1}(3)/p{1}(3);
up=gain_c/p{1}(3);fsf=sqrt(p{1}(3));norm=(p{1}(2)/(p{1}(3))); Q=1/(fsf*norm)
R1 = 10000 % the value set.
R4 = R1/10^(dc/20)
R3 = (R1*R4/(R1+R4))
C5 =pp2/(2*R1); C2 = (pp1)/(R1*R3*C5);
C5=1/Bw*C5
C2=1/Bw*C2

% 4th order section
pp1b=(p{2}(1)/p{2}(3)); pp2b=(p{2}(2)/p{2}(3)) ;pp3b=(p{2}(3)/p{2}(3));
upb=gain_c/p{2}(3);fsfb=sqrt(p{2}(3));normb=(p{2}(2)/(p{2}(3)));
Qb=1/(fsfb*normb);
R1b = 10000 % the value set.
R4b = R1b/10^(dc/20)
R3b = (R1b*R4b/(R1b+R4b))
C5b = pp2b/(2*R1b);
C2b = (pp1b)/(R1b*R3b*C5b);
C5b=1/Bw*C5b
C2b=1/Bw*C2b

Transfer function from input 1 to output:
0.1774
-----------------------
s^2 + 0.2986 s + 0.8392

Transfer function from input 2 to output:
0.1774
----------
s + 0.2986

R1 =

10000


R4 =

7.9433e+003


R3 =

4.4269e+003


C5 =

5.6635e-011


C2 =

4.8157e-009

??? Attempted to access p.—ell(3); index out of bounds because numel(p.

Error in ==> new at 78
pp1b=(p{2}(1)/p{2}(3));
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top