フィルターのクリア

Collect the coefficients of a symbolic expression for an Op Amp circuit function

2 ビュー (過去 30 日間)
Hello,
I have writen function for Op Amp Sallen-Key Circuit. All values including the 's' are used as symbolic expresion.
I would need to rearange the variables in order to have on the left side the V2/V1. I have been trying to use solve(V2,V1) but are not rearanged.
On the right side I would need the denominator to be on the form of . I have been trying with factor(G) but it gives denominator on the form of .
Is there any way to achieve the above.
Giannis

採用された回答

Dyuman Joshi
Dyuman Joshi 2023 年 7 月 29 日
syms A Ga Gb G1 G2 C2 V1 V2 s
%Defining expression
expr = V2 == A*((G1*G2*V1 + C2*G2*V2*s)/(C2^2*s^2+G1*G2 + C2*G1*s + 2*C2*G2*s) - Gb*V2/(Ga+Gb))
expr = 
%Isolating V2 to LHS
expr = isolate(expr,V2)
expr = 
%Assuming that V2/V1 can isolated from the expression
%Dividing both sides of the expression by V1 to obtain V2/V1 on the left side
expr = expr/V1
expr = 
If you want to simplify the RHS, this approach works good enough -
%Get numerator and denominator of RHS in a rational form
[n,d] = numden(rhs(expr))
n = 
d = 
%Redefine the expression
expr = lhs(expr) == n/d
expr = 
If you want the coefficient of s^2 in the denominator to be 1, get its coefficient by using coeffs and divide d by the coefficient.
  4 件のコメント
NGiannis
NGiannis 2023 年 7 月 30 日
Thank you Star Strider for your reply.
Star Strider
Star Strider 2023 年 7 月 30 日
My pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by