0
\$\begingroup\$

While I am continuing my studies of the Norman S. Nise book about Control System Engineering, and while trying to solve exercises of chapter 1, I noticed that I am out of the scope of solving differential equation. I forgot how to solve a differential equation and what the characteristic equation and how to obtain the variables values from initial conditions.

In one of the exercises, the author asked to solve the following equation:

(dx/dt) + 7x = 5cos2t

The solution started with:

(7C + 2D)cos(2t) + (-2C + 7D)sin(2t) = 5cos(2t)

Then:

7C + 2D = 5

-2C + 7D = 0

Which give: C=35/33 ; D=10/53

He gives the following characteristic equation: M + 7 = 0

And the final solution was:

enter image description here

My questions are:

  1. How the author solve the differential equation ? I didn't get his technique nor his method of solving.

  2. IS the following link is good enough to refresh my mind on how to solve differential equation ?

  3. Does control system engineers still solve differential equation by hand like this, or Matlab is always used to win some time ?

\$\endgroup\$
6
  • \$\begingroup\$ Once you learn state-space representation and stability criterias, then you won't feel the need to solve differential equations by hand like this. Not even using matlab, only in an indirect sense (solving optimization problems and simulating systems). You still should hammer down on diff equations and have a solid enough grasp of the fundamentals, otherwise it would all be castles of sand. \$\endgroup\$ Jun 20, 2018 at 7:31
  • \$\begingroup\$ The link is useful and directly related to the method in control system ? \$\endgroup\$
    – alim1990
    Jun 20, 2018 at 7:44
  • 1
    \$\begingroup\$ I'm voting to close this question as off-topic because it has nothing to do with electronics, besides being a problem found in a book about electronics. Basic linear ODE solving methods can be easily googled or asked about on a math-related site of the SE network. \$\endgroup\$ Jun 20, 2018 at 10:29
  • \$\begingroup\$ Please check question number 3 of my post @LorenzoDonati . \$\endgroup\$
    – alim1990
    Jun 20, 2018 at 12:28
  • \$\begingroup\$ I didn't bother to comment on your point 3, since even if it were the only question you pose, it would probably deserve to be flagged as too broad. No one could give you a precise, focused answer (as required by our guidelines) about that. Either because it would be too specific to a single person ("Matlab is always used..." Matlab is not the only tool used), or would be too general (entire books have been, or could be, written about engineering best practices). \$\endgroup\$ Jun 20, 2018 at 12:45

1 Answer 1

4
\$\begingroup\$
  1. How the author solve the differential equation ? I didn't get his technique nor his method of solving.

Typically, you construct a solution from a homogeneous solution and a particular solution.

  1. Homogeneous solution

This is the solution to the problem without excitation, in other words:

$$\frac{dx}{dt} + 7x = 0$$

One way of solving this is by solving the characteristic equation by replacing a derivative with \$\lambda\$, second derivative by \$\lambda^2\$, etc. In this case:

$$\lambda + 7 = 0 \Rightarrow \lambda = -7$$

The homogeneous solution is then:

$$\begin{align} x_h(t) &= \sum_{\lambda_i} A_i e^{\lambda_it} \\ &= A e^{-7t} \end{align}$$

  1. Particular solution

This is the solution to the problem with the excitation, ie.

$$\frac{dx}{dt} + 7x = 5\cos(2t)$$

For particular solutions, we just choose a similar expression to the excitation in a smart way. In this case, the excitation is a cosine, so any derivative will be either a sine or a cosine as well with the same frequency. In other words, the particular solution will look as follows:

$$x_p(t) = B + C\cos(2t) + D\sin(2t)$$

Plugging this test in the equation yields

$$\begin{align} \frac{d(x_p(t))}{dt} + 7x_p(t) &= 5\cos(2t) \\ &\Downarrow \\ \left(-2C\sin(2t) + 2D\cos(2t)\right) + 7\left(B + C\cos(2t) + D\sin(2t)\right) &= 5\cos(2t) \\ &\Downarrow \\ (7C + 2D)\cos(2t) + (-2C + 7D)\sin(2t) + 7B &= 5\cos(2t) \end{align}$$

In order for this equation to match for all \$t\$, we need that

$$\begin{align} 7C + 2D &= 5 \\ -2C + 7D &= 0 \\ B &= 0 \end{align}$$

  1. Final solution

The final solution is the sum of the homogeneous and particular solutions, and so

$$x(t) = Ae^{-7t} + C\cos(2t) + D\sin(2t)$$

You can think of it as the sum of all solutions that result in \$0\$ and one particular solution that will result in the excitation signal. It's like saying \$1 = 0 + 1\$ with the right hand side the homogeneous and particular solution.

At this point in time, we still don't have a value for \$A\$. This is found by enforcing a certain initial condition. For example, forcing \$x(0) = 0\$ will yield that

$$x(0) = A + C = 0 \Rightarrow A = -C$$

As is the case in your example.

  1. Is the following link is good enough to refresh my mind on how to solve differential equation ?

I am not planning on watching this series of video's so I will reserve my answer for this.

  1. Does control system engineers still solve differential equation by hand like this, or Matlab is always used to win some time ?

While this method does work, I don't think many engineers will still solve differential equations. In control theory, you usually reason with poles and zero's, and how the system behaves if they are moving, are added or removed. A simulator such as Matlab's Simulink can then be used to verify your reasoning and tune the positions of these poles and zero's.

Actually solving differential equations by hand only works for relatively simple (they often aren't) and linear (they often aren't) systems. I believe you will find these types of problems more often in an educational context rather than in practice.

Nevertheless, it is in my personal opinion a good idea to keep these things in the back of your head. There may always be cases where a simple and linear approximation of the problem at hand would be enough.

On a side note, my preferred way of solving this type of problems is by using the Laplace transform. As such:

$$\begin{align} \mathcal{L}\left\{\frac{dx}{dt} + 7x\right\} &= \mathcal{L}\left\{5\cos(2t)\right\} \\ &\Downarrow \\ sX(s) - x(0) + 7X(s) &= \frac{5s}{s^2 + 4} \\ &\Downarrow \\ X(s) &= \frac{1}{s + 7}\frac{5s}{s^2 + 4} \end{align}$$

Then you split in partial fractions (I won't calculate the coefficients for keeping this answer shorter)

$$\begin{align} X(s) &= \frac{A}{s + 7} + \frac{Bs}{s^2 + 4} + \frac{2C}{s^2 + 4} \\ &\Downarrow \\ x(t) &= \mathcal{L}^{-1}\left\{X(s)\right\} \\ &= Ae^{-7t} + B\cos(2t) + C\sin(2t) \end{align}$$

They should both give the same result. I prefer this method because it doesn't require me to split the solution into a homogeneous and particular one. The downside is that you need to remember your Laplace transforms. It also helps greatly if you know some tricks for splitting in partial fractions.

\$\endgroup\$
5
  • \$\begingroup\$ Your answer saved a lot of time for me to take a recap on differential equation. I will write your answer on the studying paper and save it for when it's needed. \$\endgroup\$
    – alim1990
    Jun 20, 2018 at 8:57
  • \$\begingroup\$ What is the excitation is u(t) ? \$\endgroup\$
    – alim1990
    Jun 20, 2018 at 11:52
  • \$\begingroup\$ I just used "excitation" for the independent term (ie. independent of \$x\$ or any derivative). \$\endgroup\$
    – Sven B
    Jun 20, 2018 at 11:56
  • \$\begingroup\$ I mean on the x(t) of particular would still equal to 0 ? \$\endgroup\$
    – alim1990
    Jun 20, 2018 at 12:09
  • \$\begingroup\$ I'm afraid I can't understand your question. Could you elaborate? \$\endgroup\$
    – Sven B
    Jun 20, 2018 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.