Experiment 2
Experiment 2
Spring 2023
Experiment No. 2
System Modelling
Objective
The objective of this lab is to get familiarized with the basics of MATLAB and Simulink.
Reference Material
Chapter 2 and 3 of Modern Control Engineering 5th Edition by Katsuhiko Ogata
The first step in the control design process is to develop appropriate mathematical models of the system to be
controlled. These models may be derived either from physical laws or experimental data. In this experiment, we
shall introduce the state-space and transfer function representations of dynamic systems. We then review some
basic approaches to modeling mechanical and electrical systems and show how to generate these models in
MATLAB for further analysis.
Using the Newton’s 2nd law, write the governing equation for the system.
Write the state space equation of the system by choosing the position and velocity as state variables and
position of the mass as the output.
Develop a state space representation in MATLAB by using the following numerical values of the variables.
m mass 1.0 kg
k spring constant 1.0 N/m
b damping constant 0.2 Ns/m
F input force 1.0 N
Derive the transfer function of the system and represent it in MATLAB by two methods.
Verify that it is the same as the transfer function obtained using the state space representation above from
MATLAB.
We will now consider a simple series combination of three passive electrical elements: a resistor, an inductor, and
a capacitor, known as an RLC Circuit.
We will assume that the input of the system is the voltage source ( ) applied to the motor's armature, while the
output is the rotational speed of the shaft .
From the figure above, we can derive the following governing equations based on Newton's 2 nd law and Kirchhoff's
voltage law.
Derive the transfer function.considering the rotational speed as output and the armature voltage as input.
Represent it in MATLAB.
Derive the state-space form by choosing the rotational speed and electric current as the state variables. The
armature voltage is treated as the input and the rotational speed is chosen as the output. Represent it in MATLAB.
Derive the transfer function.considering the position of the shaft ( ). as output and the armature voltage ( )
as input. Represent it in MATLAB.
Derive the state space form by choosing the motor position , rotational speed and electric current as the state
variables. The armature voltage is treated as the input and the rotational position is chosen as the output. Represent
it in MATLAB.
Generate the above transfer function and state space models models in MATLAB by using the following system
parameters.
(M1) 1/4 bus body mass 2500 kg
Aircraft Pitch
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 linearized into longitudinal and lateral
equations. Aircraft pitch is governed by the longitudinal dynamics. We shall 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.
Under these assumptions, the longitudinal equations of motion for the aircraft can be written as follows.
For this system, the input will be the elevator deflection angle and the output will be the pitch angle of the
aircraft.
Before finding the transfer function and state-space models, let's plug in some numerical values to simplify the
modeling equations shown above:
These values are taken from the data from one of Boeing's commercial aircraft.
Recognizing the fact that the modeling equations above are already in the state-variable form, write the state space
equations.
Write the transfer function.
Taking the Laplace transform of the equation above, find the transfer function from the gear angle ( ) (input)
to the ball position ( ) (output). It should be noted that the above plant transfer function is a double integrator.
As such it is marginally stable and will provide a challenging control problem.
Derive the state space form by selecting the ball's position ( ) and velocity ( ) as the state variable and the gear
angle ( ) as the input. The state-space representation is shown below:
Derive the state equation such that instead of controlling the position through the gear angle, , we will control the
torque applied to the beam directly. For this system the gear and lever arm would not be used, instead a motor at
the center of the beam will apply torque to the beam, to control the ball's position.
Laboratory Performance Rubrics
Excellent (100%) Good (80%) Satisfactory (60%) Needs
Improvement (0% –
40%)
Execution Properly done the Experiment results Experiment results Did not try to
of Lab experiment and results had minor issues had issues and could perform the
Tasks shown to the instructor. but corrected on its not correct own its experiment,
Used time well in lab own. Used time own. Did the lab but Participation was
and focused attention well. Stayed did not appear very minimal, or student
on the experiment. focused on the interested. Sometimes was hostile about
CLO 2
Routinely provides experiment most of provides useful ideas participating.
20 Marks useful ideas when the time. Usually when participating in Rarely provides
participating in the provides useful the group and in useful ideas when
group and in ideas when classroom discussion. participating in the
classroom discussion. participating in the A satisfactory group group and
Actively looks for and group and in member who does discussion. May
suggests solutions to classroom what is required. refuse to
problems. discussion. participate.
Report Well defined problem Well defined Well defined problem Poorly defined
with clear cut problem with clear with clear objectives problem with un-
objectives and objectives and but not so appropriate clear objectives
methodology methodology methodology and methodology
CLO 1
Results are relevant Results are Results are Results are neither
10 Marks and presented in relevant but not somewhat relevant relevant nor
appropriate manner. presented in but not presented in presented
Work is well appropriate appropriate manner appropriately
summarised and manner Work is summarised Work is not
concluded Work is well and concluded summarised and
summarised and concluded properly
concluded