How to simplify the symbolic expression?
2 views (last 30 days)
Show older comments
Aditya Zade
on 15 Feb 2024
Commented: Star Strider
on 15 Feb 2024
Hello,
Can this expression be further simplified? I have tried simplify and collect functions.
syms s Vpo Von Dp Dn ws Lp Cps Ll Lm Vsecm Isec_real Isec_imag Isec_abs Thetasec Ix_real Ix_imag Ix_abs real
Expression =
(2*Ix_imag*Lm*Vpo*Cps^2*Isec_abs^2*Ll^2*ws^7 + 4*Ix_imag*Lm*Vpo*Cps^2*Isec_abs^2*Lp^2*ws^7 - 4*Ix_imag*Lm*Vpo*Cps*Isec_abs^2*Ll*ws^5 + 6*Ix_imag*Lm*Vpo*Cps*Isec_abs^2*Lp*ws^5 + 2*Ix_imag*Lm*Vpo*Isec_abs^2*ws^3)*sin(pi*Dp) + (- 2*Ix_real*Lm*Vpo*Cps^2*Isec_abs^2*Ll^2*ws^7 - 4*Ix_real*Lm*Vpo*Cps^2*Isec_abs^2*Lp^2*ws^7 + 4*Ix_real*Lm*Vpo*Cps*Isec_abs^2*Ll*ws^5 - 6*Ix_real*Lm*Vpo*Cps*Isec_abs^2*Lp*ws^5 - 2*Ix_real*Lm*Vpo*Isec_abs^2*ws^3)*cos(pi*Dp) + (Isec_imag*Ix_imag*Vpo*Vsecm*ws^2 - Isec_real*Ix_real*Vpo*Vsecm*ws^2 - 2*Cps*Isec_imag*Ix_imag*Ll*Vpo*Vsecm*ws^4 + 2*Cps*Isec_real*Ix_real*Ll*Vpo*Vsecm*ws^4 + 3*Cps*Isec_imag*Ix_imag*Lm*Vpo*Vsecm*ws^4 - 3*Cps*Isec_real*Ix_real*Lm*Vpo*Vsecm*ws^4 + Cps*Isec_imag*Ix_imag*Lp*Vpo*Vsecm*ws^4 - Cps*Isec_real*Ix_real*Lp*Vpo*Vsecm*ws^4 + Cps^2*Isec_imag*Ix_imag*Ll^2*Vpo*Vsecm*ws^6 - Cps^2*Isec_real*Ix_real*Ll^2*Vpo*Vsecm*ws^6 + Cps^2*Isec_imag*Ix_imag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isec_imag*Ix_real*Lp^2*Vpo*Vsecm*ws^6 - 2*Cps^2*Isec_real*Ix_imag*Lp^2*Vpo*Vsecm*ws^6 + 3*Cps^2*Isec_imag*Ix_real*Ll*Lm*Vpo*Vsecm*ws^6 - 3*Cps^2*Isec_real*Ix_imag*Ll*Lm*Vpo*Vsecm*ws^6 - Cps^2*Isec_imag*Ix_real*Lm*Lp*Vpo*Vsecm*ws^6 + Cps^2*Isec_real*Ix_imag*Lm*Lp*Vpo*Vsecm*ws^6)*cos(Thetasec - pi*Dp)
1 Comment
Torsten
on 15 Feb 2024
Can this expression be further simplified?
Does it matter ? It will remain uninterpretable.
Accepted Answer
Star Strider
on 15 Feb 2024
When I simplified it offline, using:
Expression = simplify(Expression, 500)
this was the result :
Expression =
Vpo*Vsecm*ws^2*sin(Thetasec + pi*Dp)*(Isec_imag*Ix_imag - Isec_real*Ix_real)*(Cps^2*Ll^2*ws^4 - 2*Cps*Ll*ws^2 + 3*Cps*Lm*ws^2 + Cps*Lp*ws^2 + Cps^2*Ll*Lm*ws^4 - 2*Cps^2*Ll*Lp*ws^4 + 3*Cps^2*Lm*Lp*ws^4 + 1) - Vpo*Vsecm*ws^2*cos(Thetasec + pi*Dp)*(Isec_imag*Ix_real + Isec_real*Ix_imag)*(Cps^2*Ll^2*ws^4 - 2*Cps*Ll*ws^2 + 3*Cps*Lm*ws^2 + Cps*Lp*ws^2 + Cps^2*Ll*Lm*ws^4 - 2*Cps^2*Ll*Lp*ws^4 + 3*Cps^2*Lm*Lp*ws^4 + 1) + Vpo*Vsecm*ws^2*cos(Thetasec - pi*Dp)*(Isec_imag*Ix_real - Isec_real*Ix_imag)*(3*Cps^2*Ll^2*ws^4 + 3*Lm*Cps^2*Ll*ws^4 + 2*Cps^2*Lp^2*ws^4 - Lm*Cps^2*Lp*ws^4 - 6*Cps*Ll*ws^2 + 5*Cps*Lp*ws^2 + Lm*Cps*ws^2 + 3) + Vpo*Vsecm*ws^2*sin(Thetasec - pi*Dp)*(Isec_imag*Ix_imag + Isec_real*Ix_real)*(3*Cps^2*Ll^2*ws^4 + 3*Lm*Cps^2*Ll*ws^4 + 2*Cps^2*Lp^2*ws^4 + 3*Lm*Cps^2*Lp*ws^4 - 6*Cps*Ll*ws^2 + 5*Cps*Lp*ws^2 + Lm*Cps*ws^2 + 3) - 2*Isec_abs^2*Ix_real*Lm*Vpo*ws^3*cos(pi*Dp)*(Cps^2*Ll^2*ws^4 + 2*Cps^2*Lp^2*ws^4 - 2*Cps*Ll*ws^2 + 3*Cps*Lp*ws^2 + 1) + 2*Isec_abs^2*Ix_imag*Lm*Vpo*ws^3*sin(pi*Dp)*(Cps^2*Ll^2*ws^4 + 2*Cps^2*Lp^2*ws^4 - 2*Cps*Ll*ws^2 + 3*Cps*Lp*ws^2 + 1)
It would seem so. You need to tell simplify to keep working until it either cannot simplify further or reaches the iteration limit (500 here).
.
2 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!