How can I minimize the real part of the roots of this function involving both $x$ and $e^x$ terms? The 2019 Stack Overflow Developer Survey Results Are InGiven the Laplace transform of a function $f(t)$, can I find the “total squared error” $int_0^infty f(t)^2 dt$?Force Control on a TetherHow to Optimize PID Gains Non-Heuristicallyasymptotic stability with exact feedback and feedback with measurement errorsSystem control of an induction heated systemEigenvalues determination (/Determinant computation) of a Block Matrix (not block diagonal), come across in a state space representation.How to extract PID parameters from a controller in zpk form?Can fuzzy control be used with LQR - Gain schedulingAll advanced controller - Are they always used as optimized controllers?Quadcopter Control System IntuitionHow do I make sure advanced controllers are robust?
Why is it "Tumoren" and not "Tumore"?
Where to refill my bottle in India?
Patience, young "Padovan"
Understanding the implication of what "well-defined" means for the operation in quotient group
How to change the limits of integration
Can the Protection from Evil and Good spell be used on the caster?
Pristine Bit Checking
Lethal sonic weapons
How long do I have to send my income tax payment to the IRS?
Why did Howard Stark use all the Vibranium they had on a prototype shield?
Geography at the pixel level
What can other administrators access on my machine?
Idiomatic way to prevent slicing?
Protecting Dualbooting Windows from dangerous code (like rm -rf)
Manuscript was "unsubmitted" because the manuscript was deposited in Arxiv Preprints
Why isn't airport relocation done gradually?
On the insanity of kings as an argument against monarchy
What does Linus Torvalds mean when he says that Git "never ever" tracks a file?
Are USB sockets on wall outlets live all the time, even when the switch is off?
What does "sndry explns" mean in one of the Hitchhiker's guide books?
How come people say “Would of”?
How can I fix this gap between bookcases I made?
Does light intensity oscillate really fast since it is a wave?
Is flight data recorder erased after every flight?
How can I minimize the real part of the roots of this function involving both $x$ and $e^x$ terms?
The 2019 Stack Overflow Developer Survey Results Are InGiven the Laplace transform of a function $f(t)$, can I find the “total squared error” $int_0^infty f(t)^2 dt$?Force Control on a TetherHow to Optimize PID Gains Non-Heuristicallyasymptotic stability with exact feedback and feedback with measurement errorsSystem control of an induction heated systemEigenvalues determination (/Determinant computation) of a Block Matrix (not block diagonal), come across in a state space representation.How to extract PID parameters from a controller in zpk form?Can fuzzy control be used with LQR - Gain schedulingAll advanced controller - Are they always used as optimized controllers?Quadcopter Control System IntuitionHow do I make sure advanced controllers are robust?
$begingroup$
The question
I have a function $D(s) = s^2 + c s + k + K_d s e^-s + K_p e^-s.$ The values of $c$ and $k$ are fixed, but I can choose $K_d$ and $K_p$. How do I choose these two values in order to minimize $max operatornameRe(s) : D(s) = 0 $?
Motivation
I'm writing an autopilot program for a flight simulation video game. Given information about the current state of the aircraft, it attempts to calculate flight control inputs which will put it into a desired state.
I'm using PID controllers to accomplish this. However, it's difficult to make these work in practice. The main reason is that aircraft are inherently oscillatory in several ways, and poorly chosen PID parameters exacerbate these oscillations. Attempting to find PID parameters which control the aircraft effectively without producing oscillations is very tedious.
In order to try to calculate parameters automatically, I've decided to examine a "toy" control problem whose behavior is similar to the aircraft in the video game.
Problem
In the "toy" problem, the system is a damped harmonic oscillator. The oscillator is driven by a PD controller which attempts to drive the position of the oscillator to $0$. However, the controller suffers a delay of $1$ second.
The differential equation describing this system is
$$f''(t) = - c f'(t) - k f(t) - K_d f'(t - 1) - K_p f(t - 1).$$
Here, the $c$ term represents the damping force and the $k$ term represents the restoring force. The $K_d$ and $K_p$ terms form the driving force; the $K_d$ term attempts to slow the motion of the system, and the $K_p$ term attempts to push the position of the system towards $0$. The constants $c$ and $k$ cannot be changed, but we are able to select $K_d$ and $K_p$.
We can find the Laplace transform of $f$:
$$s^2 F(s) - s f(0) - f'(0) = -c (s F(s) - f(0)) - k F(s) - K_d (s e^-s F(s) - f(-1)) - K_p e^-s F(s)$$
$$s^2 F(s) + c s F(s) + k F(s) + K_d s e^-s F(s) + K_p e^-s F(s) = s f(0) + f'(0) + c f(0) + K_d f(-1)$$
$$F(s) = fracs f(0) + f'(0) + c f(0) + K_d f(-1)s^2 + c s + k + K_d s e^-s + K_p e^-s$$
If I understand the Laplace transform correctly, the system converges whenever all of the poles of $F(s)$ have a negative real part; and it suffers from divergent oscillations whenever at least one of the poles of $F(s)$ has at least one positive real part.
So, the behavior is determined by the rightmost root of $s^2 + c s + k + K_d s e^-s + K_p e^-s$. If the real part of this root is negative, then the system will converge. Furthermore, the closer the real part is to negative infinity, the more quickly the system will converge. So, we want to choose $K_d$ and $K_p$ so as to make the real part of the rightmost root as small as possible.
Hence, the question at the top of this post.
My thoughts
The equation $s^2 + c s + k + K_d s e^-s + K_p e^-s = 0$ doesn't look like it admits an elementary solution. I could probably find its roots using some type of numerical search; is this the best way?
Even if I had a fast way to calculate the solutions to this equation, I'd then have to perform another search in order to find the one which minimizes the maximum real part. If I had to perform nested searches, then the whole process could get very slow.
Based on playing around with the function in graphing calculators, it looks like it usually has three roots near the origin (not necessarily distinct). Does this function always have exactly three roots near the origin when $K_d$ and $K_p$ are not both zero?
If a numerical search is the best way to go for both parts of the problem (locating the roots and minimizing them), maybe the best approach is going to be to use gradient descent in the outer loop to minimize the roots, and Newton's method in the inner loop to locate the roots.
complex-analysis optimization control-theory
$endgroup$
add a comment |
$begingroup$
The question
I have a function $D(s) = s^2 + c s + k + K_d s e^-s + K_p e^-s.$ The values of $c$ and $k$ are fixed, but I can choose $K_d$ and $K_p$. How do I choose these two values in order to minimize $max operatornameRe(s) : D(s) = 0 $?
Motivation
I'm writing an autopilot program for a flight simulation video game. Given information about the current state of the aircraft, it attempts to calculate flight control inputs which will put it into a desired state.
I'm using PID controllers to accomplish this. However, it's difficult to make these work in practice. The main reason is that aircraft are inherently oscillatory in several ways, and poorly chosen PID parameters exacerbate these oscillations. Attempting to find PID parameters which control the aircraft effectively without producing oscillations is very tedious.
In order to try to calculate parameters automatically, I've decided to examine a "toy" control problem whose behavior is similar to the aircraft in the video game.
Problem
In the "toy" problem, the system is a damped harmonic oscillator. The oscillator is driven by a PD controller which attempts to drive the position of the oscillator to $0$. However, the controller suffers a delay of $1$ second.
The differential equation describing this system is
$$f''(t) = - c f'(t) - k f(t) - K_d f'(t - 1) - K_p f(t - 1).$$
Here, the $c$ term represents the damping force and the $k$ term represents the restoring force. The $K_d$ and $K_p$ terms form the driving force; the $K_d$ term attempts to slow the motion of the system, and the $K_p$ term attempts to push the position of the system towards $0$. The constants $c$ and $k$ cannot be changed, but we are able to select $K_d$ and $K_p$.
We can find the Laplace transform of $f$:
$$s^2 F(s) - s f(0) - f'(0) = -c (s F(s) - f(0)) - k F(s) - K_d (s e^-s F(s) - f(-1)) - K_p e^-s F(s)$$
$$s^2 F(s) + c s F(s) + k F(s) + K_d s e^-s F(s) + K_p e^-s F(s) = s f(0) + f'(0) + c f(0) + K_d f(-1)$$
$$F(s) = fracs f(0) + f'(0) + c f(0) + K_d f(-1)s^2 + c s + k + K_d s e^-s + K_p e^-s$$
If I understand the Laplace transform correctly, the system converges whenever all of the poles of $F(s)$ have a negative real part; and it suffers from divergent oscillations whenever at least one of the poles of $F(s)$ has at least one positive real part.
So, the behavior is determined by the rightmost root of $s^2 + c s + k + K_d s e^-s + K_p e^-s$. If the real part of this root is negative, then the system will converge. Furthermore, the closer the real part is to negative infinity, the more quickly the system will converge. So, we want to choose $K_d$ and $K_p$ so as to make the real part of the rightmost root as small as possible.
Hence, the question at the top of this post.
My thoughts
The equation $s^2 + c s + k + K_d s e^-s + K_p e^-s = 0$ doesn't look like it admits an elementary solution. I could probably find its roots using some type of numerical search; is this the best way?
Even if I had a fast way to calculate the solutions to this equation, I'd then have to perform another search in order to find the one which minimizes the maximum real part. If I had to perform nested searches, then the whole process could get very slow.
Based on playing around with the function in graphing calculators, it looks like it usually has three roots near the origin (not necessarily distinct). Does this function always have exactly three roots near the origin when $K_d$ and $K_p$ are not both zero?
If a numerical search is the best way to go for both parts of the problem (locating the roots and minimizing them), maybe the best approach is going to be to use gradient descent in the outer loop to minimize the roots, and Newton's method in the inner loop to locate the roots.
complex-analysis optimization control-theory
$endgroup$
add a comment |
$begingroup$
The question
I have a function $D(s) = s^2 + c s + k + K_d s e^-s + K_p e^-s.$ The values of $c$ and $k$ are fixed, but I can choose $K_d$ and $K_p$. How do I choose these two values in order to minimize $max operatornameRe(s) : D(s) = 0 $?
Motivation
I'm writing an autopilot program for a flight simulation video game. Given information about the current state of the aircraft, it attempts to calculate flight control inputs which will put it into a desired state.
I'm using PID controllers to accomplish this. However, it's difficult to make these work in practice. The main reason is that aircraft are inherently oscillatory in several ways, and poorly chosen PID parameters exacerbate these oscillations. Attempting to find PID parameters which control the aircraft effectively without producing oscillations is very tedious.
In order to try to calculate parameters automatically, I've decided to examine a "toy" control problem whose behavior is similar to the aircraft in the video game.
Problem
In the "toy" problem, the system is a damped harmonic oscillator. The oscillator is driven by a PD controller which attempts to drive the position of the oscillator to $0$. However, the controller suffers a delay of $1$ second.
The differential equation describing this system is
$$f''(t) = - c f'(t) - k f(t) - K_d f'(t - 1) - K_p f(t - 1).$$
Here, the $c$ term represents the damping force and the $k$ term represents the restoring force. The $K_d$ and $K_p$ terms form the driving force; the $K_d$ term attempts to slow the motion of the system, and the $K_p$ term attempts to push the position of the system towards $0$. The constants $c$ and $k$ cannot be changed, but we are able to select $K_d$ and $K_p$.
We can find the Laplace transform of $f$:
$$s^2 F(s) - s f(0) - f'(0) = -c (s F(s) - f(0)) - k F(s) - K_d (s e^-s F(s) - f(-1)) - K_p e^-s F(s)$$
$$s^2 F(s) + c s F(s) + k F(s) + K_d s e^-s F(s) + K_p e^-s F(s) = s f(0) + f'(0) + c f(0) + K_d f(-1)$$
$$F(s) = fracs f(0) + f'(0) + c f(0) + K_d f(-1)s^2 + c s + k + K_d s e^-s + K_p e^-s$$
If I understand the Laplace transform correctly, the system converges whenever all of the poles of $F(s)$ have a negative real part; and it suffers from divergent oscillations whenever at least one of the poles of $F(s)$ has at least one positive real part.
So, the behavior is determined by the rightmost root of $s^2 + c s + k + K_d s e^-s + K_p e^-s$. If the real part of this root is negative, then the system will converge. Furthermore, the closer the real part is to negative infinity, the more quickly the system will converge. So, we want to choose $K_d$ and $K_p$ so as to make the real part of the rightmost root as small as possible.
Hence, the question at the top of this post.
My thoughts
The equation $s^2 + c s + k + K_d s e^-s + K_p e^-s = 0$ doesn't look like it admits an elementary solution. I could probably find its roots using some type of numerical search; is this the best way?
Even if I had a fast way to calculate the solutions to this equation, I'd then have to perform another search in order to find the one which minimizes the maximum real part. If I had to perform nested searches, then the whole process could get very slow.
Based on playing around with the function in graphing calculators, it looks like it usually has three roots near the origin (not necessarily distinct). Does this function always have exactly three roots near the origin when $K_d$ and $K_p$ are not both zero?
If a numerical search is the best way to go for both parts of the problem (locating the roots and minimizing them), maybe the best approach is going to be to use gradient descent in the outer loop to minimize the roots, and Newton's method in the inner loop to locate the roots.
complex-analysis optimization control-theory
$endgroup$
The question
I have a function $D(s) = s^2 + c s + k + K_d s e^-s + K_p e^-s.$ The values of $c$ and $k$ are fixed, but I can choose $K_d$ and $K_p$. How do I choose these two values in order to minimize $max operatornameRe(s) : D(s) = 0 $?
Motivation
I'm writing an autopilot program for a flight simulation video game. Given information about the current state of the aircraft, it attempts to calculate flight control inputs which will put it into a desired state.
I'm using PID controllers to accomplish this. However, it's difficult to make these work in practice. The main reason is that aircraft are inherently oscillatory in several ways, and poorly chosen PID parameters exacerbate these oscillations. Attempting to find PID parameters which control the aircraft effectively without producing oscillations is very tedious.
In order to try to calculate parameters automatically, I've decided to examine a "toy" control problem whose behavior is similar to the aircraft in the video game.
Problem
In the "toy" problem, the system is a damped harmonic oscillator. The oscillator is driven by a PD controller which attempts to drive the position of the oscillator to $0$. However, the controller suffers a delay of $1$ second.
The differential equation describing this system is
$$f''(t) = - c f'(t) - k f(t) - K_d f'(t - 1) - K_p f(t - 1).$$
Here, the $c$ term represents the damping force and the $k$ term represents the restoring force. The $K_d$ and $K_p$ terms form the driving force; the $K_d$ term attempts to slow the motion of the system, and the $K_p$ term attempts to push the position of the system towards $0$. The constants $c$ and $k$ cannot be changed, but we are able to select $K_d$ and $K_p$.
We can find the Laplace transform of $f$:
$$s^2 F(s) - s f(0) - f'(0) = -c (s F(s) - f(0)) - k F(s) - K_d (s e^-s F(s) - f(-1)) - K_p e^-s F(s)$$
$$s^2 F(s) + c s F(s) + k F(s) + K_d s e^-s F(s) + K_p e^-s F(s) = s f(0) + f'(0) + c f(0) + K_d f(-1)$$
$$F(s) = fracs f(0) + f'(0) + c f(0) + K_d f(-1)s^2 + c s + k + K_d s e^-s + K_p e^-s$$
If I understand the Laplace transform correctly, the system converges whenever all of the poles of $F(s)$ have a negative real part; and it suffers from divergent oscillations whenever at least one of the poles of $F(s)$ has at least one positive real part.
So, the behavior is determined by the rightmost root of $s^2 + c s + k + K_d s e^-s + K_p e^-s$. If the real part of this root is negative, then the system will converge. Furthermore, the closer the real part is to negative infinity, the more quickly the system will converge. So, we want to choose $K_d$ and $K_p$ so as to make the real part of the rightmost root as small as possible.
Hence, the question at the top of this post.
My thoughts
The equation $s^2 + c s + k + K_d s e^-s + K_p e^-s = 0$ doesn't look like it admits an elementary solution. I could probably find its roots using some type of numerical search; is this the best way?
Even if I had a fast way to calculate the solutions to this equation, I'd then have to perform another search in order to find the one which minimizes the maximum real part. If I had to perform nested searches, then the whole process could get very slow.
Based on playing around with the function in graphing calculators, it looks like it usually has three roots near the origin (not necessarily distinct). Does this function always have exactly three roots near the origin when $K_d$ and $K_p$ are not both zero?
If a numerical search is the best way to go for both parts of the problem (locating the roots and minimizing them), maybe the best approach is going to be to use gradient descent in the outer loop to minimize the roots, and Newton's method in the inner loop to locate the roots.
complex-analysis optimization control-theory
complex-analysis optimization control-theory
asked Mar 23 at 5:24
Tanner SwettTanner Swett
4,3041739
4,3041739
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
One common method for dealing with time delays in continuous systems is to use the Padé-Approximation. Replace the exponential functions with the following Padé-Approximation.
$$exp(-s)=dfracexp(-s/2)exp(s/2)approx dfrac1-s/2+1/2!(s/2)^2-1/3!(s/2)^3+ ... + 1/m!(-s/2)^m1+s/2+1/2!(s/2)^2+1/3!(s/2)^3+ ...+1/m!(s/2)^m.$$
You can gradually increase $m$ and try to find conditions for the polynomials.
Another method would be to use the Nyquist criterion because it can handle delays. But you would need to fix some of the parameters.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3158979%2fhow-can-i-minimize-the-real-part-of-the-roots-of-this-function-involving-both-x%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
One common method for dealing with time delays in continuous systems is to use the Padé-Approximation. Replace the exponential functions with the following Padé-Approximation.
$$exp(-s)=dfracexp(-s/2)exp(s/2)approx dfrac1-s/2+1/2!(s/2)^2-1/3!(s/2)^3+ ... + 1/m!(-s/2)^m1+s/2+1/2!(s/2)^2+1/3!(s/2)^3+ ...+1/m!(s/2)^m.$$
You can gradually increase $m$ and try to find conditions for the polynomials.
Another method would be to use the Nyquist criterion because it can handle delays. But you would need to fix some of the parameters.
$endgroup$
add a comment |
$begingroup$
One common method for dealing with time delays in continuous systems is to use the Padé-Approximation. Replace the exponential functions with the following Padé-Approximation.
$$exp(-s)=dfracexp(-s/2)exp(s/2)approx dfrac1-s/2+1/2!(s/2)^2-1/3!(s/2)^3+ ... + 1/m!(-s/2)^m1+s/2+1/2!(s/2)^2+1/3!(s/2)^3+ ...+1/m!(s/2)^m.$$
You can gradually increase $m$ and try to find conditions for the polynomials.
Another method would be to use the Nyquist criterion because it can handle delays. But you would need to fix some of the parameters.
$endgroup$
add a comment |
$begingroup$
One common method for dealing with time delays in continuous systems is to use the Padé-Approximation. Replace the exponential functions with the following Padé-Approximation.
$$exp(-s)=dfracexp(-s/2)exp(s/2)approx dfrac1-s/2+1/2!(s/2)^2-1/3!(s/2)^3+ ... + 1/m!(-s/2)^m1+s/2+1/2!(s/2)^2+1/3!(s/2)^3+ ...+1/m!(s/2)^m.$$
You can gradually increase $m$ and try to find conditions for the polynomials.
Another method would be to use the Nyquist criterion because it can handle delays. But you would need to fix some of the parameters.
$endgroup$
One common method for dealing with time delays in continuous systems is to use the Padé-Approximation. Replace the exponential functions with the following Padé-Approximation.
$$exp(-s)=dfracexp(-s/2)exp(s/2)approx dfrac1-s/2+1/2!(s/2)^2-1/3!(s/2)^3+ ... + 1/m!(-s/2)^m1+s/2+1/2!(s/2)^2+1/3!(s/2)^3+ ...+1/m!(s/2)^m.$$
You can gradually increase $m$ and try to find conditions for the polynomials.
Another method would be to use the Nyquist criterion because it can handle delays. But you would need to fix some of the parameters.
edited Mar 23 at 9:29
answered Mar 23 at 8:57
MachineLearnerMachineLearner
1,344112
1,344112
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3158979%2fhow-can-i-minimize-the-real-part-of-the-roots-of-this-function-involving-both-x%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown