Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Translate the entire conversation x

"solve" inside a programm

hegel
7-Bedrock

"solve" inside a programm

hello everyone, let's see if you can help me. It turns out that I want to plot a root locus.
It turns out that I have to solve the equation [1+ K G(s)* H(s)= 0] for each K.
For a given K I can do it with solve: for example:
G(s):=10/(s^2+2*s+10) and H(s):=5/(s+5) for a k:=3 gives me the following result.

R:[-7.75;0.375-5.07i;0.375+5.07i]

how do I get the same within a program by varying k by different values?

 

2 REPLIES 2
Werner_E
25-Diamond I
(To:hegel)

You could use a numeric solve block with "find" and turn it into a function dependent on k and then call this function (as every other function) from within your program.

A numeric solve block will only give you just one solution depending on the guess value provided.

If you need all three solutions and you used the symbolic "solve" command, you can try to turn this symbolic evaluation into a function of k.

Here in Mathcad 15:

Werner_E_0-1742174785052.png

 

For further help you will have to attach your worksheet and specify in more detail what exactly you need and intend to do.

LucMeekes
23-Emerald III
(To:hegel)

And if you have that function f(k) as Werner shows, you can plot the loci of s on the complex plane:

LucMeekes_0-1742235845629.png

Success!
Luc

Announcements

Top Tags