# Blog

# Control system-QA55

- March 28, 2018
- Posted by:
- Category: Control system QA

**Transfer Functions**

**1. Assume that the unit step response of a linear time-invariant system is given by**

c(t) = 1 + e−t cos(t) + e−2t sin(3t), t _ 0. (1)

(a) Obtain the transfer function of the system.

(b) Determine the zeros and poles of the system.

**Linearization of Nonlinear Dynamical Systems**

2. Consider a 1 (kg) mass connected to a nonlinear damper and spring whose forces are given by 2 tanh(x˙ ) and 2 tan−1(x), respectively, in which x and x˙ represent the horizontal position (m) and velocity (m/s) of the mass.

Then, the dynamical equation of motion can be given by

x¨ + 2 tanh(x˙ ) + 2 tan−1(x) = u, (2)

Where u denotes the external force applied to the mass.

(a) Present a state-space equation for the dynamical system in (2).

(b) Using MATLAB/Simulink, obtain the system response for a step input with the magnitude

0.1 (N) and initial conditions being x(0) = 0 (m) and x˙ (0) = 0 (m/s) over the time interval

[0, 10](s).

(c) Obtain the liberalized model of (2) around x = 0 (m) and x˙ = 0 (m/s).

(d) Using MATLAB/Simulink, obtain the response of the linearized system for a step input with the magnitude 0.1 (N) and initial conditions being zero over the time interval [0, 10](s).

(e) Plot the responses of the liberalized and nonlinear systems together and compare the solutions. What do you conclude?

**Mathematical Modelling**

3. Consider the dynamical system represent the vertical displacements of

masses m1 and m2 with respect to the ground, respectively. Let u denote the external force applied to mass m1. Assume that m1 = 10 (kg) m2 = 0.1 (kg), and k1 = k2 = 10 (N/m).

Remark: Do not consider the gravity terms.

(a) Present a state-space equation for the dynamical system in Fig.1.

(b) Using MATLAB/Simulink, plot the system response for a step input with the magnitude 0.1 (N), and initial conditions x1(0) = 0.1 (m), x2(0) = −0.1 (m), x˙ 1(0) = x˙ 2(0) = 0 (m/s) over the time interval [0, 10](s).

(c) Obtain the transfer functions x1(s) u(s) and x2(s)

u(s) . Compute the zeros and poles of these transfer functions.

**Second-Order Systems**

4. Consider a rigid body with the moment of inertia J rotating around a fixed axis. Let _, ! =_˙ and represent the angular position and velocity of the body, and the external torque applied to the body, respectively. Here, we assume that there are no rotational friction and compliance in this motion.

To stabilize the position of the body, we employ a control system as shown in Fig. 4. The

closed-loop system includes position and velocity loops with gains Kp and Kv, respectively.

(a) Obtain the closed-loop transfer function _(s) r(s) , where r(s) is the set-point for the position.

(b) Assume that J = 1 (kgm2). Design Kp and Kv such that the maximum overshoot and the

peak time for the unit step response become 0.2 and 1 (s), respectively.

**Design of a PID Controller for the Ball and Beam System**

5. Physical Setup: A ball is placed on a beam, see figure below, where it is allowed to roll with 1 degree of freedom along the length of the beam. A lever arm is attached to the beam at one end and a servo gear at the other.

As the servo gear turns by an angle the lever changes the angle of the beam by .When the angle is changed from the horizontal position, gravity causes the ball to roll along the beam.

A controller will be designed for this system so that the ball’s position can be manipulated.

System Parameters: For this problem, we will assume that the ball rolls without slipping and

friction between the beam and ball is negligible.

The constants and variables for this problem are defined as follows:

(m) mass of the ball =0.11 (kg)

(R) radius of the ball =0.015 (m)

(d) lever arm offset =0.03 (m)

(g) gravitational acceleration =9.8 (m/s2)

(L) length of the beam =1.0 (m)

(J) ball’s moment of inertia =9.99×10−6 (kg.m2)

(r) ball position coordinate

(_) beam angle coordinate

(_) servo gear angle

System Equations: The second derivative of the input angle _ actually affects the second derivative of r. However, we will ignore this contribution. The Lagrangian equation of motion for the ball is then given by the following:

0 = _ J R2 + m_r¨+ mg sin _ − mr_˙ 2 (3)

Linearization of this equation about the beam angle, _ = 0, gives us the following linear approximation of the system:

_ J R2 + m_ ¨r = −mg_ (4)

The equation which relates the beam angle to the angle of the gear can be approximated as linear by the equation below:

_ = d L _ (5)

Substituting this into the previous equation, we get:

_ J R2 + m_ ¨r = −mg d L _ (6)

• By taking the Laplace transform of the equation (6), obtain the transfer function of the openloop system, defined as,

G(s) := r(s) _(s).

Here, the servo gear angle _ is assumed to be the control input for the open-loop system.

• Design a unity closed-loop control system with the desired input rd (i.e., desired ball position) and the actual output r (i.e., actual ball position) using a PID controller to achieve the following requirements:

(1) Settling time < 3 seconds, and
(2) Overshoot < 5%.
• Using MATLAB/Simulink, simulate the linear closed-loop system’s response for a step input 0.1 (m) in the presence of a step-like external disturbance with the magnitude 5_
180 (rad) over the time interval [0, 10] (s).
• Using final value theorem, compute the final value of the closed-loop output, i.e., limt!1 r(t), for a ramp input in the absence of the external disturbance. Repeat this computation for an acceleration input. Check your results with MATLAB/Simulink.**Design of a PID Controller for an Aircraft Pitch System**

5. Physical Setup: The equations governing the motion of an aircraft are a very complicated set of six nonlinear coupled differential equations.

However, under certain assumptions, they can be decoupled and liberalized into longitudinal and lateral equations. Aircraft pitch is governed by the longitudinal dynamics. In this problem, we will design an autopilot that controls the pitch of an aircraft.

The basic coordinate axes and forces acting on an aircraft are shown in the figure given below.

We will assume that the aircraft is in steady-cruise at constant altitude and velocity; thus, the thrust, drag, weight and lift forces balance each other in the x- and y-directions.

We will also assume that a change in pitch angle will not change the speed of the aircraft under any circumstance (unrealistic but simplifies the problem a bit). Under these assumptions, the longitudinal equations of motion for the aircraft can be written as follows:

_˙ = −0.313_ + 56.7q + 0.232_ (7) q˙ = −0.0139_ − 0.426q + 0.0203_ (8) ˙_ = 56.7q. (9)

For this system, the input will be the elevator deflection angle _ and the output will be the pitch angle of the aircraft. The numerical values are taken from the data from one of Boeing’s commercial aircraft.

• By taking the Laplace transform of the above equations, obtain the transfer function of the

open-loop system, defined as,

G(s) := _(s) _(s) .

• Design a unity closed-loop control system with the desired input _d (i.e., desired pitch position ) and the actual output _ (i.e., actual pitch position) using a PID controller to achieve the following requirements:

(1) Settling time < 10 seconds, and
(2) Overshoot < 10%.
• Using MATLAB/Simulink, simulate the closed-loop system’s response for a step input 0.1
(rad) in the presence of a step-like external disturbance with the magnitude −6_ 180 (rad) over the time interval [0, 20] (s).
• Using final value theorem, compute the final value of the closed-loop output, i.e., limt!1 _(t), for a ramp input in the absence of the external disturbance. Check your results with MATLAB/ Simulink.
**Final ProjectLinear Control of the 2D Segway PT**

**Segway PT**

The Segway PT is a two-wheeled, self-balancing, battery-powered electric vehicle invented by Dean Kaman.

The name Segway is derived from the word segue, meaning smooth transition. PT is an abbreviation for personal transporter .

Computers and motors in the base of the device keep the Segway PT upright when powered on with balancing enabled.

**Objective**

The objective of this project is to design a linear control system to stabilize the motion of the 2D Segway PT.

We will make use of the techniques and approaches of ME 330 to design a stabilizing controller.

**Mathematical Modelling**

Consider the simplified model of the 2D Segway system. The system consists of a long body with two wheels mounted at one end. For the 2D model, the two wheels are considered as a unit. Moreover, the body is considered as a point mass.

The total kinetic (K) and potential (V) energies of the mechanical system can be given by

K(θ1, θ2, θ˙1, θ˙2) := 1 2 m1 r2 + I1_ θ˙2 1 +12m2 _r2 θ˙21 + 2 r L cos(θ2) θ˙1 θ˙2 + L2 θ˙22_ +12I2 θ˙22V(θ1, θ2) := m2 g L cos(θ2),(1)in which g = 9.81 (m/s2) is the gravitational constant, θ˙1 := dθ1

dt , and θ˙2 := dθ2dt .

Next, by defining the Lagrangian of the mechanical system as the difference between the kinetic and potential energies, i.e.,L(θ1, θ2, θ˙1, θ˙2) := K(θ1, θ2, θ˙1, θ˙2) − V(θ1, θ2), (2)the Lagrange’s equations becomeddt _ ∂L∂θ˙1_ −∂L∂θ1= τddt _ ∂L∂θ˙2_ −∂L

∂θ2= −τ(3)or equivalently,(m1 + m2) r2 + I1_ θ¨1 + m2 r L cos(θ2) θ¨2 − m2 r L sin(θ2) θ˙22 = τm2 r L cos(θ2) ¨θ1 + m2 L2 + I2_ ¨θ2 − m2 g L sin(θ2) = −τ.(4)

**Linearization around Nominal Solutions**

The dynamical equations of motion in (4) can be written as

f1(θ1, θ2, ˙ θ1, ˙θ2, ¨θ1, ¨θ2, τ) = 0f2(θ1, θ2, ˙ θ1, ˙θ2, ¨θ1, ¨θ2, τ) = 0,(5)2where f1(θ1, θ2, θ˙1, θ˙2, θ¨1, θ¨2, τ) := (m1 + m2) r2 + I1_ θ¨1 + m2 r L cos(θ2) θ¨2 − m2 r L sin(θ2) θ˙22

f2(θ1, θ2, θ˙1, θ˙2, θ¨1, θ¨2, τ) := m2 r L cos(θ2) θ¨1 + m2 L2 + I2_ ¨θ2 − m2 g L sin(θ2) + τ. (6)

1.(Nominal Solution) Show that for the nominal input τ⋆(t) _ 0, the nominal solution can be given by

where c 2 R is an arbitrary real number. What is the physical interpretation of this nominal solution?

2. (Linearization) Linearize the nonlinear equation (5) around the nominal solution.

Hint: To linearize the system, you can make use of the following equations

2Xi=1∂f1∂θi(⋆) δθi +2Xi=∂f1∂˙θi(⋆) δθ˙i +2Xi=1∂f1∂¨θi(⋆) δ¨θi +∂f1∂τ(⋆) δτ = 02Xi=1∂f2

∂θi(⋆) δθi +2Xi=1∂f2∂˙θi(⋆) δθ˙i +2Xi=1∂f2∂¨θi(⋆) δ¨θi +∂f2∂τ(⋆) δτ = 0,(8)

where (⋆) is a compact notation to represent the function evaluated at the nominal solution, and

δθi := θi − θ⋆ i δθ˙i := θ˙i − θ˙⋆ i δ¨θi := ¨θi − ¨θ⋆ i δτ := τ − τ⋆ (9) for i = 1, 2. You may use an alternative approach for the linearization by assuming cos(θ2) _ 1, sin(θ2) _ θ2 and θ˙2

Check the results of these two approaches. The results should be same.

However, the first approach in (8) is more systematic and can be applied to general mechanical systems with high degrees of freedom.

3. (Transfer Function) From the above step, obtain the open-loop transfer function

G(s) := δθ2(s) δτ(s) (10)

as well as the corresponding zeros and poles. Is this system stable? Here the input is taken as δτ, whereas the output is δθ2 (angle of the body).

Hint: Apply the Laplace transform to the linearized model (8) and eliminate δθ1. Show that the transfer function can be given by

G(s) = −(m11 + m12) (m11m22 − m2 12) s2 − m11 c2 ,

in which

m11 := (m1 + m2) r2 + I1

m12 := m2 r L

m22 := m2 L2 + I2

c2 := m2 g L.

**Numerical Simulator of the Nonlinear System**

Here, we follow the standard approach of robotic systems to numerically simulate the nonlinear equations of motion in (4). To this end, we first introduce angular velocities ω1 :=

θ˙1 and ω2 := θ˙2. Next, the dynamical equation (4) can be rewritten as follows

d11 ω˙ 1 + d12 ω˙ 2 + h1 = τ d12 ω˙ 1 + d22 ω˙ 2 + h2 = −τ, (11)

where

d11 := (m1 + m2) r2 + I1

d12 := m2 r L cos(θ2)

d22 := m2 L2 + I2

h1 := −m2 r L sin(θ2) ω2 2

h2 := −m2 g L sin(θ2). (12)

Next, one can solve for the angular accelerations ω˙ 1 and ω˙ 2 from (11) as follows

ω˙ 1 = 1 _ (d22(τ − h1) + d12(τ + h2)) ω˙ 2 = 1 _ (−d12(τ − h1) − d11(τ + h2)) (13)

Next, one can solve for the angular accelerations ω˙ 1 and ω˙ 2 from (11) as follows

ω˙ 1 = 1 _ (d22(τ − h1) + d12(τ + h2))

ω˙ 2 = 1 _ (−d12(τ − h1) − d11(τ + h2)) (13)

in which

_ := d11 d22 − d2 12 = det__d11 d12 d12 d22__. (14)

Finally, the equations of motions in (4) can be implemented as the following four first-order ODEs θ˙1 = ω1 θ˙2 = ω2 ω˙ 1 = 1 _ (d22(τ − h1) + d12(τ + h2)) ω˙ 2 = 1 _ (−d12(τ − h1) − d11(τ + h2)) (15)

## How it Works?

**How it Works?**

**Step 1:- **Want to buy solution for this. Please click on submit your assignment here and then fill all details and please mentioned **product code** at the end of the case. **Product code** is extremely important to locate your assignment. You can also mail us by keeping product code as mail subject to besthomewrokhelpers@gmail.com

**Step 2:-** As soon as we received your details, we will inform you with through email about quotations of the given assignment. Requesting you to please mention your budget. Also ensure our email besthomeworkhelpers@gmail.com should not go into your spam folder.

**Step 3:-** Once you agree with our price, click on pay now and pay the agreed amount and once we received the payment assignment will be delivered before agreed deadline.

**Step 4:-**You can also call us in our phone no. as given in the top of the home page or chat with our customer service representatives by clicking on chat now given in the bottom right corner.

## Features

**Our Features for Assignment Help Services**

**Plagiarism Free Solution**

The first and foremost things that we promise to our customer is plagiarism free solution i.e. a complete and unique solution as per customer’s university requirements.

**Excellent Customer Care Services**

You can feel our responsiveness once you use our service. Our team of excellent and dedicated customer service representatives are always ready to provide best customer care service 24X7 . Just drop a mail to besthomeworkhelpers@gmail.com and you can receive response in just no time.

**Multiple Stage Quality Assurance**

We design a unique multiple stage quality assurance team to ensure plagiarism free, original, relevant and as per customer’s requirements. We not only give importance to accurate solutions or writing but also we give equal importance to references style too.

**Privacy and Confidentiality**

We believe in maintaining complete privacy and confidentiality of all our clients. None of the information furnished to us is shared with anyone else.

**Our Clients**

We receive requests from clients all over the World. Most of our customers are from USA, UK, Australia, Canada, UAE, Muscat, Oman, Qatar, UAE, New-Zealand, France Germany etc.

## Related Services

- Accounting Homework Help
- Accounting Assignment Help
- Computer Science Homework Help
- Management Homework Help
- Finance Assignment Help
- Online Essay Writing Help
- Strategic management case study help
- Case Study Assignment Help
- Dissertation Writing Help
- Trade finance case study help
- Project Management Assignment Help
- Mechanical Engineering Homework Help
- Online Quiz Help
- Maths homework Help
- Online Exam Help
- Economics Assignment Help
- Economics Homework Help
- English Homework Help
- Macroeconomics Homework Help
- Microeconomics Homework Help
- Statistics Assignment Help
- Australia Taxation Homework Help
- Supply chain management homework help
- Taxation homework help
- USA taxation assignment help
- Advanced accounting homework help online
- Auditing homework writing help
- Human resource management homework help
- Nursing homework help online
- Psychology homework help online
- Sociology homework help online
- Ratio analysis homework help online
- Strategic Management Homework Help Online
- Mba operations management homework help
- Human resource management homework help
- Operations management homework help

** **

4. Create a new MATLAB function as follows and save it as “nonlinear Segway PT.m”.

function [dx] = nonlinear_Segway_PT(input vector)

5. Create a new SIMULINK model and save it as “Segway PT Model”. Next do the following steps.

(a) From View/Library Browser/Simulink/Ports & Subsystems, drag a Subsystem to the model and change its name to Segway PT 1. Next, drag one In1 (input port) and four Out1 (output ports) into the block Segway PT. Change the name of the input and output ports to tau, theta 1, theta 2, omega 1, and omega 2

(b) From View/Library Browser/Simulink/Continuous, drag two Integrators to the model. These are the “position integrators” and double click on them to set the Initial conditions of the Position Integrator 1 and Position Integrator 2 to “theta 10” and “theta 20”, respectively.

(c) Drag two additional Integrators to the model as the “velocity integrators” with the Initial

conditions set to “omega 10” and “omega 20” for the Velocity Integrator 1 and Velocity

Integrator 2, respectively.

(d) From View/Library Browser/Simulink/User-Defined Functions, drag an Interpreted MATLAB Function to the model.

Double click on that and set the MATLAB Function to nonlinear Segway PT. This is the name of the MATLAB function you already defined in Step 4 to calculate the righthand- side of (15).

(e) From View/Library Browser/Simulink/Signal Routing, drag a Demux to the model. Double click on the Demux and set the Number of outputs to 4. Next, wire the output of the Interpreted MATLAB Function to the input of the Demux.

(f) From View/Library Browser/Simulink/Signal Routing, drag a Mux to the model. Double click on the Mux and set Number of inputs to 11. Next, wire the output of the Mux to the input of the Interpreted MATLAB Function.

(g) Now we need to wire the inputs to the Mux in the order defined in the nonlinear Segway PT.m in Step 4. In particular, theta 1, theta 2, omega 1 and omega 2 are the outputs of the position andvelocity integrators, respectively. For the input τ, we make use of the output of the input port tau.

For m 1, m 2, I 1, I 2, L and r, drag a Constant block to the model. Double click on the Constant blocks to enter the corresponding values at the Constant value section. For example, enter m 1 for the constant m1. See Fig. 4 for more details.

(h) In order to send the outputs to the MATLAB Workspace, drag five To Workspace blocks fromView/Library Browser/Simulink/Sinks and wire them to the outputs of the input port tau aswell as integrators. Double click on these blocks and change the Variable name to tau, theta1,theta 2, omega 1, and omega 2, respectively. Do not forget to change the Save format to Arrayfor these blocks.

(i) On the top of the SIMULINK model, change the simulation time 10(s) to Tf (desired simulation time). Moreover, double click on the “Model Configuration Parameters”. Go to the Data Import/Export section and uncheck the box Limit data points to last:1000.

7. Set the initial condition theta 20 to zero in the main file and using the simulator, confirm that the solution you obtain in Step 1 is indeed a nominal solution. Plot the signals θ1, θ2, ω1, ω2 and τ over the time interval [0, 20] (s).

8. Set theta 20=0.01; the initial condition is not on the nominal solution. Plot the signals θ1, θ2, ω1, ω2 and τ over the time interval [0, 20] (s). Your solution does not converge to the nominal solution. These plots confirm that your nominal solution in Step 1 is unstable.

**Stabilization and Disturbance Rejection**

Our objective is now to design a unity feedback system whose input r(t) is the set point (reference input measured in radians) for θ2 and the output c(t) is the actual θ2, respectively.

Remember that to design your controller, you need to make use of the linearized model in Step 3, whereas you eventually apply your proposed controller to the original nonlinear model.

9. Design a controller K(s) such that the following requirements are satisfied simultaneously for the unity feedback system.

(a) The steady-state tracking error for the inputs of the form

r(t) = A.1(t) becomes zeros (i.e., limt!1 e(t) = 0), where e(t) := r(t) − c(t), A is an arbitrary real number and 1(t) is the unit step function.

(b) The effect of a disturbance torque signal of the form

d(t) = B.1(t) on the steady-state response of the system becomes zero, where B is an arbitrary real number.

(c) The poles of the closed-loop system belong to the desired region Re(s) < −4, where Re{s} represents the real part of the complex Laplace variables.
10. Next, using MATLAB/SIMULINK, apply your designed controller to the original nonlinear system and assume that the reference input and disturbance are given by
r(t) = 6π 180 . 1(t) (rad)
d(t) = 5. 1(t) (Nm).
(a) Plot the signals θ1, θ2, ω1, ω2, e and u over the time interval [0, 20] (s), where u(t) is the controller output, that is u(t) + d(t) = τ(t).
(b) Using the approach of your notes, calculate the steady-state tracking error for the ramp input r(t) = t.1(t). Plot e(t) for the ramp input and check your analytical result with the numerical result from the simulation.
(c) Now let us gradually increase the set point to the system and see if the proposed controller works well. To do this, plot the error signal for the following three reference inputs
r(t) =15π180. 1(t) (rad)r(t) =30π180. 1(t) (rad)r(t) =60π180. 1(t) (rad).
Justify your results.
(d) Now we try a periodic reference input. Using the Signal Generator block in SIMULINK, employ a square wave r(t) whose amplitude and frequency are taken as 10π
180 (rad) and 2π 5 (rad/s), respectively. Plot the signals θ1, θ2, ω1, ω2, e and u over the time interval [0, 40] (s).
**ME 330 – Control Systems Laboratory Homework**

Problem 1) Consider the following mechanical system,

(a) How many degrees of freedom does the system have?

(b) Derive the deferential equations.

(c) Obtain the transfer functions X1(s)=U(s) and X2(s)=U(s) of the mechanical system.

Problem 2) Consider the following system,

(a) How many degrees of freedom does the system have?

(b) Derive the di_erential equations.

(c) Obtain the transfer functions X(s)=U(s) and _(s)=U(s) of the system.

product code:Control system-QA55

Looking for this assignment, please submit your details here with product code mentioned above.