Posts: 2020
Threads: 133
Joined: July 26, 2017
Reputation:
5
RE: Routh-Hurwitz Stability Criterion
April 22, 2023 at 9:24 am
With the help from people from forum.hr, I have modified the code of my program like this:
Code: Function obrni_polinom() Which Returns Nothing Is Declared;
Function f(Integer16 i, Integer16 j) Which Returns Integer16 Does
// Za pretvaranje indeksa dvodimenzionalnog polja u indeks jednodimenzionalnog
// polja. Kada u svoj AEC compiler još nisam implementirao dvodimenzionalna
// polja...
Return 20 * i + j;
EndFunction
Function popuni_matricu() Which Returns Integer16 Does
Integer16 broj_stupaca :=
(stupanj_polinoma + 1) / 2 + mod(stupanj_polinoma + 1, 2),
broj_redaka := stupanj_polinoma + 1;
Integer16 i := 0;
//Popunimo matricu prvo not-a-numbersima...
While i < broj_redaka Loop
Integer16 j := 0;
While j < broj_stupaca Loop
matrica[f(i, j)] := 0. / 0.;
j += 1;
EndWhile
i += 1;
EndWhile
//Zatim idemo primjeniti Hurwitzov algoritam...
i := 0;
While i < broj_redaka Loop
Integer16 j := 0;
While j < broj_stupaca Loop
If i = 0 Then // Prvi redak
matrica[f(i, j)] := polinom[j * 2];
ElseIf i = 1 Then // Drugi redak
matrica[f(i, j)] := (j * 2 + 1 < stupanj_polinoma + 1) ?
polinom[j * 2 + 1] :
0;
Else // Ostali reci...
If matrica[f(i - 1, 0)] = 0 Then // Posebni slučajevi, kada se u prvom
// stupcu matrice pojavi nula.
If jesmo_li_obrnuli_polinom Then // Obrtanje polinoma nije "upalilo".
Return 0;
Else // Možda obrtanje polinoma "upali"...
obrni_polinom(); // https://www.forum.hr/showpost.php?p=97955497&postcount=16
jesmo_li_obrnuli_polinom := 1;
Return popuni_matricu();
EndIf
EndIf
matrica[f(i, j)] := (matrica[f(i - 1, 0)] *
(j + 1 < broj_stupaca ?
matrica[f(i - 2, j + 1)] : 0) -
(matrica[f(i - 2, 0)] *
(j + 1 < broj_stupaca ?
matrica[f(i - 1, j + 1)] : 0))) /
matrica[f(i - 1 , 0)];
EndIf
j += 1;
EndWhile
i += 1;
EndWhile
If matrica[f(broj_redaka - 1, 0)] = polinom[stupanj_polinoma] Then
Return 1;
EndIf
Return 0;
EndFunction
Function broj_korijena_u_desnoj_poluravnini() Which Returns Integer16 Does
Integer16 i := 1, brojac := 0;
While i < stupanj_polinoma + 1 Loop
brojac += not(signum(matrica[f(i, 0)]) = signum(matrica[f(i - 1, 0)]));
i += 1;
EndWhile
Return brojac;
EndFunction
Function obrni_polinom() Which Returns Nothing Does
Decimal64 pomocni_polinom[20];
Integer16 i := 0, j := stupanj_polinoma;
While i < stupanj_polinoma + 1 Loop
pomocni_polinom[i] := polinom[j];
i += 1;
j -= 1;
EndWhile
i := 0;
While i < stupanj_polinoma + 1 Loop
polinom[i] := pomocni_polinom[i];
i += 1;
EndWhile
EndFunction
It seems to work so far.
So, we can focus on my second question: How can I solve the preparation for the laboratory exercise that is asking to calculate the range (interval) of gain for which the system will be stable using both the Hurwitz'es Criterion and the Bode's Criterion? Neither the Hurwitz'es Criterion nor the Bode's Criterion give us ranges. Hurwitz'es Criterion gives us the number of poles on the right-hand-side of the imaginary axis, which is always zero for stable systems. Bode's Criterion gives us, for stable systems, the Amplitude Security and Phase Security. Can you somehow calculate the range of gain for which the system is stable using Amplitude Security and Phase Security? I don't know.
Posts: 16728
Threads: 128
Joined: July 10, 2013
Reputation:
65
RE: Routh-Hurwitz Stability Criterion
April 22, 2023 at 9:28 am
No one here cares.
Stop coming here to get help with your schoolwork.
Posts: 8292
Threads: 40
Joined: March 18, 2014
Reputation:
54
RE: Routh-Hurwitz Stability Criterion
April 22, 2023 at 2:45 pm
(April 22, 2023 at 9:24 am)FlatAssembler Wrote: With the help from people from forum.hr, I have modified the code of my program like this:
[hide]
Code: Function obrni_polinom() Which Returns Nothing Is Declared;
Function f(Integer16 i, Integer16 j) Which Returns Integer16 Does
// Za pretvaranje indeksa dvodimenzionalnog polja u indeks jednodimenzionalnog
// polja. Kada u svoj AEC compiler još nisam implementirao dvodimenzionalna
// polja...
Return 20 * i + j;
EndFunction
Function popuni_matricu() Which Returns Integer16 Does
Integer16 broj_stupaca :=
(stupanj_polinoma + 1) / 2 + mod(stupanj_polinoma + 1, 2),
broj_redaka := stupanj_polinoma + 1;
Integer16 i := 0;
//Popunimo matricu prvo not-a-numbersima...
While i < broj_redaka Loop
Integer16 j := 0;
While j < broj_stupaca Loop
matrica[f(i, j)] := 0. / 0.;
j += 1;
EndWhile
i += 1;
EndWhile
//Zatim idemo primjeniti Hurwitzov algoritam...
i := 0;
While i < broj_redaka Loop
Integer16 j := 0;
While j < broj_stupaca Loop
If i = 0 Then // Prvi redak
matrica[f(i, j)] := polinom[j * 2];
ElseIf i = 1 Then // Drugi redak
matrica[f(i, j)] := (j * 2 + 1 < stupanj_polinoma + 1) ?
polinom[j * 2 + 1] :
0;
Else // Ostali reci...
If matrica[f(i - 1, 0)] = 0 Then // Posebni slučajevi, kada se u prvom
// stupcu matrice pojavi nula.
If jesmo_li_obrnuli_polinom Then // Obrtanje polinoma nije "upalilo".
Return 0;
Else // Možda obrtanje polinoma "upali"...
obrni_polinom(); // https://www.forum.hr/showpost.php?p=97955497&postcount=16
jesmo_li_obrnuli_polinom := 1;
Return popuni_matricu();
EndIf
EndIf
matrica[f(i, j)] := (matrica[f(i - 1, 0)] *
(j + 1 < broj_stupaca ?
matrica[f(i - 2, j + 1)] : 0) -
(matrica[f(i - 2, 0)] *
(j + 1 < broj_stupaca ?
matrica[f(i - 1, j + 1)] : 0))) /
matrica[f(i - 1 , 0)];
EndIf
j += 1;
EndWhile
i += 1;
EndWhile
If matrica[f(broj_redaka - 1, 0)] = polinom[stupanj_polinoma] Then
Return 1;
EndIf
Return 0;
EndFunction
Function broj_korijena_u_desnoj_poluravnini() Which Returns Integer16 Does
Integer16 i := 1, brojac := 0;
While i < stupanj_polinoma + 1 Loop
brojac += not(signum(matrica[f(i, 0)]) = signum(matrica[f(i - 1, 0)]));
i += 1;
EndWhile
Return brojac;
EndFunction
Function obrni_polinom() Which Returns Nothing Does
Decimal64 pomocni_polinom[20];
Integer16 i := 0, j := stupanj_polinoma;
While i < stupanj_polinoma + 1 Loop
pomocni_polinom[i] := polinom[j];
i += 1;
j -= 1;
EndWhile
i := 0;
While i < stupanj_polinoma + 1 Loop
polinom[i] := pomocni_polinom[i];
i += 1;
EndWhile
EndFunction
Thief and assassin for hire. Member in good standing of the Rogues Guild.
Posts: 2020
Threads: 133
Joined: July 26, 2017
Reputation:
5
RE: Routh-Hurwitz Stability Criterion
April 25, 2023 at 11:36 am
(April 22, 2023 at 9:28 am)arewethereyet Wrote: No one here cares.
Stop coming here to get help with your schoolwork.
Wow, the community here is so toxic...
Posts: 46641
Threads: 543
Joined: July 24, 2013
Reputation:
108
RE: Routh-Hurwitz Stability Criterion
April 25, 2023 at 1:03 pm
(April 22, 2023 at 9:24 am)FlatAssembler Wrote: With the help from people from forum.hr, I have modified the code of my program like this:
Code: Function obrni_polinom() Which Returns Nothing Is Declared;
Function f(Integer16 i, Integer16 j) Which Returns Integer16 Does
// Za pretvaranje indeksa dvodimenzionalnog polja u indeks jednodimenzionalnog
// polja. Kada u svoj AEC compiler još nisam implementirao dvodimenzionalna
// polja...
Return 20 * i + j;
EndFunction
Function popuni_matricu() Which Returns Integer16 Does
Integer16 broj_stupaca :=
(stupanj_polinoma + 1) / 2 + mod(stupanj_polinoma + 1, 2),
broj_redaka := stupanj_polinoma + 1;
Integer16 i := 0;
//Popunimo matricu prvo not-a-numbersima...
While i < broj_redaka Loop
Integer16 j := 0;
While j < broj_stupaca Loop
matrica[f(i, j)] := 0. / 0.;
j += 1;
EndWhile
i += 1;
EndWhile
//Zatim idemo primjeniti Hurwitzov algoritam...
i := 0;
While i < broj_redaka Loop
Integer16 j := 0;
While j < broj_stupaca Loop
If i = 0 Then // Prvi redak
matrica[f(i, j)] := polinom[j * 2];
ElseIf i = 1 Then // Drugi redak
matrica[f(i, j)] := (j * 2 + 1 < stupanj_polinoma + 1) ?
polinom[j * 2 + 1] :
0;
Else // Ostali reci...
If matrica[f(i - 1, 0)] = 0 Then // Posebni slučajevi, kada se u prvom
// stupcu matrice pojavi nula.
If jesmo_li_obrnuli_polinom Then // Obrtanje polinoma nije "upalilo".
Return 0;
Else // Možda obrtanje polinoma "upali"...
obrni_polinom(); // https://www.forum.hr/showpost.php?p=97955497&postcount=16
jesmo_li_obrnuli_polinom := 1;
Return popuni_matricu();
EndIf
EndIf
matrica[f(i, j)] := (matrica[f(i - 1, 0)] *
(j + 1 < broj_stupaca ?
matrica[f(i - 2, j + 1)] : 0) -
(matrica[f(i - 2, 0)] *
(j + 1 < broj_stupaca ?
matrica[f(i - 1, j + 1)] : 0))) /
matrica[f(i - 1 , 0)];
EndIf
j += 1;
EndWhile
i += 1;
EndWhile
If matrica[f(broj_redaka - 1, 0)] = polinom[stupanj_polinoma] Then
Return 1;
EndIf
Return 0;
EndFunction
Function broj_korijena_u_desnoj_poluravnini() Which Returns Integer16 Does
Integer16 i := 1, brojac := 0;
While i < stupanj_polinoma + 1 Loop
brojac += not(signum(matrica[f(i, 0)]) = signum(matrica[f(i - 1, 0)]));
i += 1;
EndWhile
Return brojac;
EndFunction
Function obrni_polinom() Which Returns Nothing Does
Decimal64 pomocni_polinom[20];
Integer16 i := 0, j := stupanj_polinoma;
While i < stupanj_polinoma + 1 Loop
pomocni_polinom[i] := polinom[j];
i += 1;
j -= 1;
EndWhile
i := 0;
While i < stupanj_polinoma + 1 Loop
polinom[i] := pomocni_polinom[i];
i += 1;
EndWhile
EndFunction
It seems to work so far.
So, we can focus on my second question: How can I solve the preparation for the laboratory exercise that is asking to calculate the range (interval) of gain for which the system will be stable using both the Hurwitz'es Criterion and the Bode's Criterion? Neither the Hurwitz'es Criterion nor the Bode's Criterion give us ranges. Hurwitz'es Criterion gives us the number of poles on the right-hand-side of the imaginary axis, which is always zero for stable systems. Bode's Criterion gives us, for stable systems, the Amplitude Security and Phase Security. Can you somehow calculate the range of gain for which the system is stable using Amplitude Security and Phase Security? I don't know.
What’s this ‘we’ stuff? You have a mouse in your pocket or something?
Boru
‘I can’t be having with this.’ - Esmeralda Weatherwax
Posts: 35390
Threads: 205
Joined: August 13, 2012
Reputation:
145
RE: Routh-Hurwitz Stability Criterion
April 25, 2023 at 3:32 pm
(April 22, 2023 at 9:24 am)FlatAssembler Wrote: With the help from people from forum.hr, I have modified the code of my program like this:
Code: Function obrni_polinom() Which Returns Nothing Is Declared;
Function f(Integer16 i, Integer16 j) Which Returns Integer16 Does
// Za pretvaranje indeksa dvodimenzionalnog polja u indeks jednodimenzionalnog
// polja. Kada u svoj AEC compiler još nisam implementirao dvodimenzionalna
// polja...
Return 20 * i + j;
EndFunction
Function popuni_matricu() Which Returns Integer16 Does
Integer16 broj_stupaca :=
(stupanj_polinoma + 1) / 2 + mod(stupanj_polinoma + 1, 2),
broj_redaka := stupanj_polinoma + 1;
Integer16 i := 0;
//Popunimo matricu prvo not-a-numbersima...
While i < broj_redaka Loop
Integer16 j := 0;
While j < broj_stupaca Loop
matrica[f(i, j)] := 0. / 0.;
j += 1;
EndWhile
i += 1;
EndWhile
//Zatim idemo primjeniti Hurwitzov algoritam...
i := 0;
While i < broj_redaka Loop
Integer16 j := 0;
While j < broj_stupaca Loop
If i = 0 Then // Prvi redak
matrica[f(i, j)] := polinom[j * 2];
ElseIf i = 1 Then // Drugi redak
matrica[f(i, j)] := (j * 2 + 1 < stupanj_polinoma + 1) ?
polinom[j * 2 + 1] :
0;
Else // Ostali reci...
If matrica[f(i - 1, 0)] = 0 Then // Posebni slučajevi, kada se u prvom
// stupcu matrice pojavi nula.
If jesmo_li_obrnuli_polinom Then // Obrtanje polinoma nije "upalilo".
Return 0;
Else // Možda obrtanje polinoma "upali"...
obrni_polinom(); // https://www.forum.hr/showpost.php?p=97955497&postcount=16
jesmo_li_obrnuli_polinom := 1;
Return popuni_matricu();
EndIf
EndIf
matrica[f(i, j)] := (matrica[f(i - 1, 0)] *
(j + 1 < broj_stupaca ?
matrica[f(i - 2, j + 1)] : 0) -
(matrica[f(i - 2, 0)] *
(j + 1 < broj_stupaca ?
matrica[f(i - 1, j + 1)] : 0))) /
matrica[f(i - 1 , 0)];
EndIf
j += 1;
EndWhile
i += 1;
EndWhile
If matrica[f(broj_redaka - 1, 0)] = polinom[stupanj_polinoma] Then
Return 1;
EndIf
Return 0;
EndFunction
Function broj_korijena_u_desnoj_poluravnini() Which Returns Integer16 Does
Integer16 i := 1, brojac := 0;
While i < stupanj_polinoma + 1 Loop
brojac += not(signum(matrica[f(i, 0)]) = signum(matrica[f(i - 1, 0)]));
i += 1;
EndWhile
Return brojac;
EndFunction
Function obrni_polinom() Which Returns Nothing Does
Decimal64 pomocni_polinom[20];
Integer16 i := 0, j := stupanj_polinoma;
While i < stupanj_polinoma + 1 Loop
pomocni_polinom[i] := polinom[j];
i += 1;
j -= 1;
EndWhile
i := 0;
While i < stupanj_polinoma + 1 Loop
polinom[i] := pomocni_polinom[i];
i += 1;
EndWhile
EndFunction
It seems to work so far.
So, we can focus on my second question: How can I solve the preparation for the laboratory exercise that is asking to calculate the range (interval) of gain for which the system will be stable using both the Hurwitz'es Criterion and the Bode's Criterion? Neither the Hurwitz'es Criterion nor the Bode's Criterion give us ranges. Hurwitz'es Criterion gives us the number of poles on the right-hand-side of the imaginary axis, which is always zero for stable systems. Bode's Criterion gives us, for stable systems, the Amplitude Security and Phase Security. Can you somehow calculate the range of gain for which the system is stable using Amplitude Security and Phase Security? I don't know.
If you ping the Hysenberg criterion with a quantum filiment while goosing the Wilhelm Integer through a Vorpal Complexitor, you'll be able to vector the nunning-Brewger Bridge on the 7th rotation.
And, if done correctly, you can also save the life of Kaiser Wilhelm thus preventing WW1.
Playing Cluedo with my mum while I was at Uni:
"You did WHAT? With WHO? WHERE???"
Posts: 2020
Threads: 133
Joined: July 26, 2017
Reputation:
5
RE: Routh-Hurwitz Stability Criterion
April 26, 2023 at 10:20 am
(April 25, 2023 at 1:03 pm)BrianSoddingBoru4 Wrote: (April 22, 2023 at 9:24 am)FlatAssembler Wrote: With the help from people from forum.hr, I have modified the code of my program like this:
Code: Function obrni_polinom() Which Returns Nothing Is Declared;
Function f(Integer16 i, Integer16 j) Which Returns Integer16 Does
// Za pretvaranje indeksa dvodimenzionalnog polja u indeks jednodimenzionalnog
// polja. Kada u svoj AEC compiler još nisam implementirao dvodimenzionalna
// polja...
Return 20 * i + j;
EndFunction
Function popuni_matricu() Which Returns Integer16 Does
Integer16 broj_stupaca :=
(stupanj_polinoma + 1) / 2 + mod(stupanj_polinoma + 1, 2),
broj_redaka := stupanj_polinoma + 1;
Integer16 i := 0;
//Popunimo matricu prvo not-a-numbersima...
While i < broj_redaka Loop
Integer16 j := 0;
While j < broj_stupaca Loop
matrica[f(i, j)] := 0. / 0.;
j += 1;
EndWhile
i += 1;
EndWhile
//Zatim idemo primjeniti Hurwitzov algoritam...
i := 0;
While i < broj_redaka Loop
Integer16 j := 0;
While j < broj_stupaca Loop
If i = 0 Then // Prvi redak
matrica[f(i, j)] := polinom[j * 2];
ElseIf i = 1 Then // Drugi redak
matrica[f(i, j)] := (j * 2 + 1 < stupanj_polinoma + 1) ?
polinom[j * 2 + 1] :
0;
Else // Ostali reci...
If matrica[f(i - 1, 0)] = 0 Then // Posebni slučajevi, kada se u prvom
// stupcu matrice pojavi nula.
If jesmo_li_obrnuli_polinom Then // Obrtanje polinoma nije "upalilo".
Return 0;
Else // Možda obrtanje polinoma "upali"...
obrni_polinom(); // https://www.forum.hr/showpost.php?p=97955497&postcount=16
jesmo_li_obrnuli_polinom := 1;
Return popuni_matricu();
EndIf
EndIf
matrica[f(i, j)] := (matrica[f(i - 1, 0)] *
(j + 1 < broj_stupaca ?
matrica[f(i - 2, j + 1)] : 0) -
(matrica[f(i - 2, 0)] *
(j + 1 < broj_stupaca ?
matrica[f(i - 1, j + 1)] : 0))) /
matrica[f(i - 1 , 0)];
EndIf
j += 1;
EndWhile
i += 1;
EndWhile
If matrica[f(broj_redaka - 1, 0)] = polinom[stupanj_polinoma] Then
Return 1;
EndIf
Return 0;
EndFunction
Function broj_korijena_u_desnoj_poluravnini() Which Returns Integer16 Does
Integer16 i := 1, brojac := 0;
While i < stupanj_polinoma + 1 Loop
brojac += not(signum(matrica[f(i, 0)]) = signum(matrica[f(i - 1, 0)]));
i += 1;
EndWhile
Return brojac;
EndFunction
Function obrni_polinom() Which Returns Nothing Does
Decimal64 pomocni_polinom[20];
Integer16 i := 0, j := stupanj_polinoma;
While i < stupanj_polinoma + 1 Loop
pomocni_polinom[i] := polinom[j];
i += 1;
j -= 1;
EndWhile
i := 0;
While i < stupanj_polinoma + 1 Loop
polinom[i] := pomocni_polinom[i];
i += 1;
EndWhile
EndFunction
It seems to work so far.
So, we can focus on my second question: How can I solve the preparation for the laboratory exercise that is asking to calculate the range (interval) of gain for which the system will be stable using both the Hurwitz'es Criterion and the Bode's Criterion? Neither the Hurwitz'es Criterion nor the Bode's Criterion give us ranges. Hurwitz'es Criterion gives us the number of poles on the right-hand-side of the imaginary axis, which is always zero for stable systems. Bode's Criterion gives us, for stable systems, the Amplitude Security and Phase Security. Can you somehow calculate the range of gain for which the system is stable using Amplitude Security and Phase Security? I don't know.
What’s this ‘we’ stuff? You have a mouse in your pocket or something?
Boru
I mean, I and people who are willing to help me.
Posts: 8292
Threads: 40
Joined: March 18, 2014
Reputation:
54
RE: Routh-Hurwitz Stability Criterion
April 26, 2023 at 2:38 pm
(April 26, 2023 at 10:20 am)FlatAssembler Wrote: (April 25, 2023 at 1:03 pm)BrianSoddingBoru4 Wrote: What’s this ‘we’ stuff? You have a mouse in your pocket or something?
Boru
I mean, I and people who are willing to help me.
Why don't you simply do your own work instead of cheating your way through?
Do your professors know you pass off the work of others as your own?
Thief and assassin for hire. Member in good standing of the Rogues Guild.
Posts: 2020
Threads: 133
Joined: July 26, 2017
Reputation:
5
RE: Routh-Hurwitz Stability Criterion
April 29, 2023 at 5:30 pm
In case you are interested in how this reversing the polynomial trick that has been explained to me on forum.hr works, here is a simple explanation: https://math.stackexchange.com/a/4689107/791819
Posts: 46641
Threads: 543
Joined: July 24, 2013
Reputation:
108
RE: Routh-Hurwitz Stability Criterion
April 29, 2023 at 5:33 pm
(April 29, 2023 at 5:30 pm)FlatAssembler Wrote: In case you are interested in how this reversing the polynomial trick that has been explained to me on forum.hr works, here is a simple explanation: https://math.stackexchange.com/a/4689107/791819
I’m not.
Boru
‘I can’t be having with this.’ - Esmeralda Weatherwax
|