How to get the range of a complex Inequality

2 次查看(过去 30 天)
I am trying to get the range of values from a complex inequality that I am trying to solve. For example in the following code:
syms kp ki
a5=1;
a4=((2047986680487193847267328*ki - 13715030938073068*kp))/(2047986680487193847267328*kp + 87042659012253300578844672);
a3=(((184889681621683227480892934480434054447104*kp)/625 - 13715030938073068*ki + 17196119675118872248493326935156326400))/(2047986680487193847267328*kp + 87042659012253300578844672);
a2=(((184889681621683227480892934480434054447104*ki)/625 - (22196527874515618602308700203063*kp)/16384))/(2047986680487193847267328*kp + 87042659012253300578844672);
a1=(((18220068596449371851061970182309744452038457569574912*kp)/625 - (22196527874515618602308700203063*ki)/16384 + 846451363799069169891931531128018151619713564672))/(2047986680487193847267328*kp + 87042659012253300578844672);
a0=(18220068596449371851061970182309744452038457569574912*ki)/(1279991675304496154542080000*kp + 54401661882658312861777920000);
b1=(a4*a3-a5*a2)/a4;
b2=(a4*a1-a5*a0)/a4;
b3=(b1*a2-b2*a4)/b1;
b4=(b3*b2-b1*a0)/b3;
S=solve(a4>0,b1>0,b3>0,b4>0,a0>0,[kp,ki])
When I am running this code, it shows that it cannot find an explicit solution. However, when I have put the code inside two for loops and sweeped over a range of values for kp and ki, I get numerous values of them satisfying the inequalities.
But I want to get a more scientific solution instead of sweeping over a random range of values based on trial and error. Can you suggest me any modification that can help me run my code? Thank you in advance.

回答(1 个)

Devineni Aslesha
Devineni Aslesha 2020-2-28
The range of complex inequality can be obtained by using the following syntax for ‘solve’ function.
S = solve(a0>0, [kp,ki], 'IgnoreAnalyticConstraints', true,'ReturnConditions', true);
For more information, refer the following link.

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by