How to simplify the symbolic expression?

조회 수: 2 (최근 30일)
Aditya Zade
Aditya Zade 2024년 2월 15일
댓글: Star Strider 2024년 2월 15일
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*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ps^2*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
Torsten
Torsten 2024년 2월 15일
Can this expression be further simplified?
Does it matter ? It will remain uninterpretable.

댓글을 달려면 로그인하십시오.

채택된 답변

Star Strider
Star Strider 2024년 2월 15일
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
Aditya Zade
Aditya Zade 2024년 2월 15일
Thanks
Star Strider
Star Strider 2024년 2월 15일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Vector Volume Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by