Products
Rewards
from HOLOOLY

We are determined to provide the latest solutions related to all subjects FREE of charge!

Enjoy Limited offers, deals & Discounts by signing up to Holooly Rewards Program

HOLOOLY

HOLOOLY
TABLES

All the data tables that you may search for.

HOLOOLY
ARABIA

For Arabic Users, find a teacher/tutor in your City or country in the Middle East.

HOLOOLY
TEXTBOOKS

Find the Source, Textbook, Solution Manual that you are looking for in 1 click.

HOLOOLY
HELP DESK

Need Help? We got you covered.

## Q. 7.EX.2

Cruise Control Step Response
(a) Rewrite the equation of motion from Example 2.1 in state-variable form, where the output is the car position $x.$
(b) Use MATLAB to find the response of the velocity of the car for the case in which the input jumps from being $u = 0$ at time $t = 0$ to a constant $u = 500 N$ thereafter. Assume that the car mass $m$ is $1000 \text{ kg and } b = 50 \text{ N.sec/m}.$

## Verified Solution

(a) Equations of motion: First we need to express the differential equation describing the plant, Eq. (2.3), as a set of simultaneous first-order equations. To do so, we define the position and the velocity of the car as the state-variables x and v, so that $x = [x v]^{T}$ . The single second-order equation, Eq. (2.3), can then be rewritten as a set of two first-order equations:

$\ddot{x} + \frac{b}{m} \dot{x} = \frac{u}{m}.$               (2.3)

$\dot{x} = v,$

$\dot{v} = − \frac{b}{m}v + \frac{1}{m}u.$

Next, we use the standard form of Eq. (7.3), $\dot{ \pmb x} = \pmb{Fx} + \pmb Gu,$ to express these equations:

$\left[\begin{matrix} \dot{x} \\ \dot{v}\end{matrix} \right] = \left[\begin{matrix} 0 & 1 \\ 0 & -b/m \end{matrix} \right] \left[\begin{matrix} x \\ v \end{matrix} \right] + \left[\begin{matrix} 0 \\ 1/m \end{matrix} \right] u .$             (7.5)

The output of the system is the car position y = x1 = x, which is expressed in matrix form as

$y= \left[\begin{matrix} 1 & 0 \end{matrix} \right] \left[\begin{matrix} x \\ v \end{matrix} \right] ,$ ,

or

$y = \pmb{Hx}.$

So the state-variable-form matrices defining this example are

$\pmb F = \left[\begin{matrix} 0 & 1 \\ 0 & -b/m \end{matrix} \right] , \ \ \ \pmb G = \left[\begin{matrix} 0 \\ 1/m \end{matrix} \right] , \ \ \ \pmb H = \left[\begin{matrix} 1 & 0 \end{matrix} \right] , \ \ \ J =0 .$

(b) Time response: The equations of motion are those given in part (a), except that now the output is $v = x_2.$ Therefore, the output matrix is

$\pmb H = \left[\begin{matrix} 0 & 1 \end{matrix} \right] .$

The coefficients required are $b/m = 0.05$ and $1/m = 0.001.$ The numerical values of the matrices defining the system are thus

$\pmb F = \left[\begin{matrix} 0 & 1 \\ 0 & -0.05 \end{matrix} \right] , \ \ \ \pmb G = \left[\begin{matrix} 0 \\ 0.001 \end{matrix} \right] , \ \ \ \pmb H = \left[\begin{matrix} 0 & 1 \end{matrix} \right] , \ \ \ J =0 .$

The step function in MATLAB calculates the time response of a linear system to a unit-step input. Because the system is linear, the output for this case can be multiplied by the magnitude of the input step to derive a step response of any amplitude. Equivalently, the $\pmb G$ matrix can be multiplied by the magnitude of the input step.

The statements

## Script Files

F = [0 1;0 −0.05];
G = [0;0.001];
H = [0 1];
J = 0;
sys = ss(F, 500*G,H,J); % step gives unit step response, so 500*G

gives $u = 500 N.$

step(sys); % plots the step response

calculate and plot the time response for an input step with a $500-N$ magnitude. The step response is shown in Fig. 7.2