TechTeach SimView
TechTeach SimView
htm
1 di 1 23/05/2019, 18:27
TechTeach: SimView http://techteach.no/simview/
[What is SimView?] [What is needed to run the simulators?] [Tips for using SimVIEW] [Previous SimView (2010)]
DYNAMIC SYSTEMS
TRANSFER FUNCTION MODELS
Integrator
Time constant
Second order system
Time delay
Transfer function (with two poles and one zero)
PHYSICAL SYSTEMS
Liquid tank with valve and pump outlets
Blending tank
Heated tank
Mass-spring-damper
RC-circuit
DC-motor
STABILITY
Stability and poles
CONTROL
APPLICATIONS (INCL. BASIC PID TUNING)
You - the controller!
Level control of wood chip tank
Temperature control of liquid tank
Dynamic positioning
Control of separator train
Speed servo
Level control of equalization tank
PRACTICAL PROPERTIES OF PID-CONTROLLERS
Anti wind-up
Discrete-time PID controller
Reverse and direct action of a PID controller
Reducing control kicks in PID controller
Serial and parallel PID controller
Bumpless transfer PID controller
Pulse Width Modulated (PWM) PID control signal
Measurement noise in PID control loop: See Level control of wood chip tank
CONTROL METHODS
Cascade control of product temperature in vessel
Feedforward control of liquid level
Feedforward control of tank temperature
Feedforward control of heat exchanger temperature
Gain scheduling
Control of product quality and flow including ratio control
Multivariable control using linear decoupling
Smith-predictor (Dead-time compensator)
1 di 2 23/05/2019, 18:11
TechTeach: SimView http://techteach.no/simview/
[TechTeach]
2 di 2 23/05/2019, 18:11
TechTeach: SimView http://techteach.no/simview/integrator/index.php
Integrator
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: integrator.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the
exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
1 di 3 23/05/2019, 18:11
TechTeach: SimView http://techteach.no/simview/integrator/index.php
The relation between the input signal u and the output signal y can be expressed with the
following integral equation:
dy(t)/dt = Ku(t)
The simulator is based on discretizing the integrator with the Runge-Kutta second-order
method with time-step of 0.05 sec.
Aims
The aims of the simulator is to give insight into the dynamic behaviour of an integrator.
Motivation
There are many dynamic systems with interating behaviour, e.g.:
Liquid tanks where the outflow is level is independent of the level, as if the outflow is
produced by a pump. In such a system the pump control signal can be the input variable
and the level is the output variable of the integrator.
Thermal systems without heat loss to the environment. The iInput variable is heat supply
(via a heatring element), and the output variable is the temperature.
A motor having neglectable (or very quick) dynamics. The input variable is the motor
control signal, and the output variable is the motor rotational position.
The integrator-term of a PID-controller. The input variable is the control error, and the
output variable is the integrator term, ui.
Tasks
Below, U is the amplitude of the input step, and K is the gain of the integrator.
1. The shape of the step response: Set K = 1. Simulate with an input step amplitude of U
= 1. Characterize the shape of the step response.
2. The importance of the gain K: Simulate with input step amplitude U = 1 for different
values of K, both positive and negative. How does the slope of the step response depend
on K?
3. The integrator effect: Simulate while adjusting the input u(t). Do you see that the
2 di 3 23/05/2019, 18:11
TechTeach: SimView http://techteach.no/simview/integrator/index.php
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:11
TechTeach: SimView http://techteach.no/simview/time_constant/index.php
Time Constant
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: time_constant.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the
exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
A mathematical model of the first order system is the following differential equation:
where
K is the gain
T is the time-constant
1 di 3 23/05/2019, 18:12
TechTeach: SimView http://techteach.no/simview/time_constant/index.php
Motivation
First order systems constitute an important class of dynamic systems: Many physical systems
behave (approximately) as first order systems, e.g. stirred liquid tanks, motors, and sensors.
And a very common lowpass filter algorithm is a first order system.
Tasks
Note: The equality sign "=" in the following text can be regarded as "approximately equal to"
(so that you do not have to enter exact numeric values).
2. Impact of time-constant T: Unless otherwise instructed, set U=2 and K=2. Adjust T.
a. What is the impact of T on the stationary response?
b. What is the impact of T on the response-time?
c. Adjust U up and down continuously (like a sinusoidal variation) for a small and for
a large value of T. How does T influate the "speed" of the system?
4. Very large time-constant: Set U=1, T=100, and K=100 (enter these values into the
respective numeric displays). Characterize the step response. Explain that this step
response is (almost) the same response as for an integrator.
[SimView] [TechTeach]
2 di 3 23/05/2019, 18:12
TechTeach: SimView http://techteach.no/simview/time_constant/index.php
3 di 3 23/05/2019, 18:12
TechTeach: SimView http://techteach.no/simview/second_order_system/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: second_order_system.zip (unzip, and open second_order_system.exe).
The mathematical model of the second order system which is simulated in this lab, is the
differential equation
1 di 3 23/05/2019, 18:12
TechTeach: SimView http://techteach.no/simview/second_order_system/index.php
where
K is the gain
z is the relative damping factor
w0 is the natural resonance frequency
An alternative way of representing this model is by Laplace transforming the differential equation,
and taking the ratio of output to input (in the Laplace domain), to get the transfer function from
input u to output y:
Aim
To develop a qualitative understanding of how the following (standard) parameters influate the step
respons of a second order system: Gain K, relative damping factor z, natural (or undamped)
resonance frequency w0, and the step input height U.
Motivation
Second order systems - as first order systems - constitute an important class of dynamic systems:
There are many physical systems which behave (approximately) as second first order systems, e.g.
stirred liquid tanks with thermal capacities in the liquid and in the heating element, DC-motors with
armature dynamics and electro-mechanical dynamics, feedback control systems (e.g. process
control systems and servomechanisms), sensors, and second order lowpass filters.
Tasks
The equality sign "=" in the following text can be regarded as "approximately equal to" (so that you
do not have to enter exact numeric values).
In several taskes below you are to give a value for the response-time, Tr. It is a convenient
parameter to characterize how quick is a dynamic system with respect to it's step response. Tr is
defined as the time it takes the step response to reach 63% of it's stationary (final) value. (For first
order systems the response-time is equal to the time-constant.) It can be shown that for second
order systems Tr is approximately equal to 1.5/w0 (it actually varies somewhat with z).
2 di 3 23/05/2019, 18:12
TechTeach: SimView http://techteach.no/simview/second_order_system/index.php
4. Importance of step height U: Set K=2, z=0.2, w0=2. Adjust U. What is the impact of U on
the stationary response?
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:12
TechTeach: SimView http://techteach.no/simview/timedelay/index.php
Time Delay
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: timedelay.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the
exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
y(t)=u(t-Td)
1 di 2 23/05/2019, 18:12
TechTeach: SimView http://techteach.no/simview/timedelay/index.php
Aims
The main aim is to develop an understanding of how a time delay works in the time domain.
Motivation
The time delay is an important phenomenon in practical systems. It appears in transportation of
material and signals. A time delay can be used to represent imperfect blending in tanks. In
feedback control systems time delays are important identify since any increase of the time
delay will decrease the stability of the control loop.
Task
1. Adjust the input signal in any way, and observe how the response in the output signal
depends on the time delay.
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:12
TechTeach: SimView http://techteach.no/simview/transferfunction/index.php
Transfer Function
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: transferfunction.zip (unzip, and open transferfunction.exe).
H(s) can have both poles and zeros. You can determine the coefficients of the numerator and the
denominator polynomial.
Aims
1 di 2 23/05/2019, 18:13
TechTeach: SimView http://techteach.no/simview/transferfunction/index.php
The aims of this simulator is to develop the understanding of the relation between poles and zeros
and the time response of transfer function models.
Motivation
Transfer function models are frequently used in signal processing (to represent signal filters) and
control theory (to represent process models, controllers, and sensors).
Tasks
It is assumed that you answer the following questions by running the simulator.
1. Is it confirmed that the system is unstable if the system has at least one pole in the right half
plane? (You may set b1 = 0; b0 = 1; a1 = -0.2; a0 = 1;)
2. Is it confirmed that the system is on the stability limit if the system have poles on the
imaginary axis (and no poles in the right half plane)? (You may set b1 = 0; b0 = 1; a1 = 0; a0
= 1;)
3. Find (by calculation) the static transfer function Hs of the system. Assume that the input u is
a step of amplitude U. Calculate the corresponding static response, ys. Is the resultat
confirmed in a simulation? (You may set b1 = 0; b0 = 1; a1 = 1; a0 = 1;)
4. Is it confirmed that a zero in the right half plane causes an inverse response (assuming a step
in the setpoint)? (You may set b1 = -2; b0 = 1; a1 = 1; a0 = 1;)
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:13
TechTeach: SimView http://techteach.no/simview/liquid_tank/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: liquid_tank.exe.
A mathematical model of the tank can be derived using mass balance of the liquid. The model is
where A is the cross sectional area, qin is the volumetric inflow, qp is the volumetric outflow
1 di 2 23/05/2019, 18:14
TechTeach: SimView http://techteach.no/simview/liquid_tank/index.php
through the pump and qv is the volumetric outflow through the valve.
Aim
The aim of this simulator is to develop an understanding of the dynamic properties of a liquid tank,
and the differences between having a valve and a pump in the outlet.
Motivation
Liquid tanks are common in industrial process plants. It is therefore useful to understand the
dynamic properties of liquid tanks.
Tasks
1. Explain that the liquid level is proportional to the integral of the inflow. Verify the integrator
behaviour with a simulation (set both the valve outflow and the pump outflow to zero).
2. Pump outflow (no valve outflow): Explain that the liquid level is proportional to the integral
of the pump control signal. Is the outflow dependent of the level? Verify your answer to these
two questions with a simulation (set the inflow to zero, and fill the tank with water using the
reset-button, and then set the pump control signal to e.g. 1).
3. Valve outflow (no pump outflow): Explain that the liquid level is not proportional to the
integral of the valve control signal. Is the outflow dependent of the level? Verify your answer
to these two questions with a simulation (set the inflow to zero, and fill the tank with water
using the reset-button, and then set the valve control signal to e.g. 1).
4. A process is said to be self-regulating if the process variable (state variable) stabilizes at
some constant value when the system is excited by constant input signal(s). Is the tank self-
regulating with pump outlet (no valve)? What if there is valve outlet (no pump)? Verify your
answers with simulations.
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:14
TechTeach: SimView http://techteach.no/simview/blending_tank/index.php
Blending Tank
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: blending_tank.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the exe-
file on any directory (folder) on your PC and then run the exe-file, which starts the simulator.
[SimView] [TechTeach]
1 di 1 23/05/2019, 18:14
TechTeach: SimView http://techteach.no/simview/heated_tank/index.php
Heated Tank
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: heated_tank.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the exe-
file on any directory (folder) on your PC and then run the exe-file, which starts the simulator.
1 di 2 23/05/2019, 18:14
TechTeach: SimView http://techteach.no/simview/heated_tank/index.php
der
Aims
The aim of the simulator and the tasks below is to develop the understanding of the dynamic
properties of a continuously stirred heated tank with continuous heating and inlet flow and outlet
flow. This system .
Motivation
Stirred tanks are common in industrial plants. The dynamic properties of heated tanks, heat
exchangers, and reactors have many similarities with stirred tanks.
Task
Unless otherwise stated, you should use the default values of the parameters (a default value is
retrieved via right-click on the element / Reinitialize to Default on the front panel).
1. Get familiar with the system/model: Observe in simulations how the temperature T of the
liquid in the tank depends qualitatively of the following variables and parameters:
Inlet temperature Ti (it can be changed e.g. as a step)
Mass flow w (e.g. increase it).
Environmental temperature Ti.
Heat transfer coefficient U (increase from e.g. U=500).
2. Static operating point: It is specified that the static value of the tank temperature, Ts, shall
be 40 degrees C. The inlet flow temperature is assumed to be Ti0 = 20 degrees C. Calculate
from the static version of the model the constant power, P0, neeeded. In this case use the
default values of the prosess parameters (as shown on the frontpanel). Confirm the calculated
resultat in a simulation.
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:14
TechTeach: SimView http://techteach.no/simview/mass_spring_damper/index.php
Mass-Spring-Damper
Snapshot from the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: mass_spring_damper.exe . The simulator runs immediately after the download
by clicking Open in the download window. Alternatively, you can first save a copy of the
exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
The mathematical model of the system can be derived from a force balance (or Newton's second
law: mass times acceleration is equal to the sum of forces) to give the following second order
differential equation:
1 di 3 23/05/2019, 18:14
TechTeach: SimView http://techteach.no/simview/mass_spring_damper/index.php
mdx2/dt2 = -Ddx/dt - Kf x + F
where
It can be shown that the transfer function from force F to position x is a second order tramsfer
function with the following standard parameters:
K = 1/Kf
z = D/[2*sqrt(mKf)]
w0 = sqrt(Kf/m)
The values of the above parameters can be seen on the front panel of the simulator.
Aim
The aim of the simulator is to develop an understanding of the dynamic properties of a mass-
spring-damper.
This simulator can develop a "physical" interpretation of the standard parameters of second order
systems. (This assumes you master the theory of of second order systems.) However, you may
benefit well from working with most of the tasks below even if you do not master this theory (you
can skip tasks 1d, 2d and 3d).
Motivation
The mass-spring-damper system is a standard example of a second order system, since it relatively
easy to give a physical interpretation of the model parameters of the second order system.
Tasks
Unless otherwise stated, it is assumed that you use the default values of the parameters.
2 di 3 23/05/2019, 18:14
TechTeach: SimView http://techteach.no/simview/mass_spring_damper/index.php
4. The importance of the constant force Fs: Observe the step response in x for various Fs.
How does the stationary value of the step response, xs, depend on Fs?
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:14
TechTeach: SimView http://techteach.no/simview/rc_circuit/index.php
RC-Circuit
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: rc_circuit.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the exe-
file on any directory (folder) on your PC and then run the exe-file, which starts the simulator.
In the tasks below the dynamic properties of the RC-circuit will be observed through simulations.
In the simulator the input signal is a sum of two independent sinusoids and a bias (a constant).
Aim
1 di 3 23/05/2019, 18:15
TechTeach: SimView http://techteach.no/simview/rc_circuit/index.php
The aim of this simulator is to increase the understanding of the RC-circuit as a dynamic system.
Motivation
In applikations where a simple analog lowpass filter is needed, the RC-circuit is commonly used, as
in I/O equipment (input/output) for attenuation of measurement noise.
Mathematical model
It can be shown that the relation between the input voltage v1 and the output voltage v2 is given by
the following differential equation:
(1) RC*dv2/dt = v1 - v2
By taking the Laplace transform of this differencial equation we find the following transfer
function, H(s), from v1 to v2:
where
(3) T = RC [s]
Using frequency response theory, it can be found that the bandwidth of the filter is
Tasks
Unless otherwise stated you should use default values of the various parameters (you get the the
default value via right-click on the front panel element).
1. The step resonse of the filter: In this subtask, you should suppress the sinusoids (by setting
the amplitudes to zero).
a. Calculate (by hand) the time constant T according to Eq. (3) above. Is the result the
same as can be seen on the front panel of the simulator when the simulator runs? Then
run a simulation where you adjust the signal component B as a step, and read off the
time constant from the response. Is the observed time constant the same as the
calculated time constant?
b. Run a simulation with some constant input signal, say V1. What is the corresponding
steady-state value, v2s, of the output voltage response? From these results, what is the
relation between V1 and v2s? Can you calculate this relation directly from the model
(1)?
2. Frequency response of the filter: Set the signal component B to zero. Use default values of
R and C.
a. Let the sinusoid v1a have amplitude 0.5 and frequency 0.05Hz, and let sinusoid v1b
2 di 3 23/05/2019, 18:15
TechTeach: SimView http://techteach.no/simview/rc_circuit/index.php
have amplitude 0.5 and frequency 1Hz. Thus, signal component v1a has a smaller
frequency than the bandwidth, which is 0.16Hz, while the component v1b has larger
frequency than the bandwidth. In other words, v1a are in the passband of the filter,
while v1b is in the stoppband of the filter. Run the simulator! Can you observe from the
simulation that signal component that component 1 is in the passband, while v1b is in
the stoppband?
b. The bandwidth is defined as the frequency where the amplitude gain of the filter is
1/sqrt(2) = 0.71 = -3dB. In other words, if the sinusoidal input signal has frequency
equal to the bandwidth, the amplitude of the output signal is 71% of the amplitude of
the input signal. Verify this by running a simulation.
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:15
TechTeach: SimView http://techteach.no/simview/dc_motor/index.php
DC-Motor
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: dc_motor.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the exe-
file on any directory (folder) on your PC and then run the exe-file, which starts the simulator.
Introduction
DC-motors are used in many servo mechanisms. Compared to other electric motors, DC-motors are
easy to model mathematically.
The DC-motor simulated is the Electro-Craft S-19-3AT which is an armature controlled DC-motor.
The motor parameters are given on the front panel of the simulator.
Theory
1 di 3 23/05/2019, 18:15
TechTeach: SimView http://techteach.no/simview/dc_motor/index.php
In the expressions below the following quantities are used: S is rotational speed. va is armature
voltage. ia is armature current. Tf is friction torque. TL is load torque. J is the sum of the intertias
of the motor and the load, i.e. J = Jmotor + Jload. B is the sum of the damping coefficients of motor
and load. La is the armature inductance. Ra is the armature resistance. Ke is the voltage constant
(the so called back-emf constant). KT is the torque constant.
A mathematical model of the motor can be found from the Kirchhoff's voltage law on the armature
circuit and the torque balance of the mechanical rotation:
By taking the Laplace transform of the model above we will find the following transfer function
from armature voltage va to speed S:
Gain:
(5) z = 0.5*(JRa+BLa)/[sqrt(JLa(KtKe+BRa))]
Static model
By setting the derivatives in (1) and (2) equal to zero and eliminating ia, we get the following static
model (all variables are assumed to have constant values):
Tasks
1. Assume that the armature voltage va is 30 volt and that the motor parameters have values
equal to the default values (can be recalled using the menu Operate / Reinitialize All to
Default on the front panel of the simulator).
a. Find the static speed (using simulation).
2 di 3 23/05/2019, 18:15
TechTeach: SimView http://techteach.no/simview/dc_motor/index.php
b. Calculate the static speed from the static model (7). Is the answer in accordance with
the result found in task 1a?
2. See equation (5). How are the relative damping factor and the undamped resonance
frequency changed if the total inertia J increases? Is the result confirmed in a simulation
(qualitatively)?
3. Confirm both from the model and from simulations that the statis speed is independent of the
inertia.
4. Use the default values of the motor parameters.
a. What is the value of w0 (you can read it off from the simulator front panel)?
b. In general the response time (the 63% raise time of the step response) of a second order
system is approximately equal to 1.5/w0 [sec]. Calculate from this the response time of
the motor. Is the result in accordance with a simulated step response?
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:15
TechTeach: SimView http://techteach.no/simview/stability_poles/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: stability_poles.zip (unzip, and open stability_poles.exe).
It can be shown that the transfer funcion from setpoint ymSP to process measurement ym is
= Kp/(s3+2s2 + s + Kp)
= Kp/a(s)
The stability property of the feedback system can be determined from the poles, which are the roots
1 di 2 23/05/2019, 18:16
TechTeach: SimView http://techteach.no/simview/stability_poles/index.php
a(s) = s3+2s2 + s + Kp = 0
In the simulator the controller gain Kp can be adjusted in real time, and the response in the process
measurement and the poles are shown.
Aims
The aim of this simulator is to observe the connection between stability and pole placement.
Tasks
1. From the poles, which are displayed on the front panel of the simulator, for which values of
the controller gain Kp (both negative and positive values Kp should be investigated) the
feedback system is
asymptotically stable
marginally stable
unstable
2. Select one Kp value for each of the three cases described above. For each such Kp: Does the
step response confirm the stability property as determined by pole placement? (Apply a step
at the setpoint.)
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:16
TechTeach: SimView http://techteach.no/simview/you_the_controller/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: you_the_controller.exe . The simulator runs immediately after the download
by clicking Open in the download window. Alternatively, you can first save a copy of the
exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
To quantize the performance of the controller the IAE performance index (Integral of Absolute
value of control Error) is calculated continuously:
1 di 2 23/05/2019, 18:16
TechTeach: SimView http://techteach.no/simview/you_the_controller/index.php
We can say that the less IAE index, the better control. However, the IAE index does not express the
control usage, so it may happen that the control usage is abrupt, causing wear on mechanical
actuatorsas valves, motors and pumps.
When you click the IAE button on the front panel of the simulator, the chip outflow (disturbance)
wout and the level setpoint are automatically changed at specific points of time, and the IAE
calculation is started to be running for 250 minutes (simulation time). The less IAE you obtain, the
better controller you are!
Aim
One aim is that you experience how a controller works by trying to being a controller yourself, and
to observe that it may be difficult to control a process manually equally well as an automatic PI(D)
controller does.
Motivation
Many industrial processes may be controlled manually, i.e. by an operator, but it can be useful to
experience that a PI controller can do the job better - and not the least important: to do it
automatically.
Tasks
Follow the instructions down to the left on the front panel of the simulator.
1. What is the IAE value with the PID controller in action? (You can use the default PI settings
in the simulator.)
2. What IAE value do you achieve by manually controlling the process? (You may of course try
several times.)
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:16
TechTeach: SimView http://techteach.no/simview/levelcontrol_chiptank/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: levelcontrol_chiptank.exe . The simulator runs immediately after the
download by clicking Open in the download window. Alternatively, you can first save a copy
of the exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
The level control system is (quite) similar to an existing control system at Tofte Södra Cell in
Norway.
The process consists of a chip tank with an inlet screw, a conveyor, and an outlet screw. The inlet
flow can be controlled by adjusting the screw control variable. The outlet flow can not be
controlled, and it constitutes a disturbance on the level.
1 di 5 23/05/2019, 18:17
TechTeach: SimView http://techteach.no/simview/levelcontrol_chiptank/index.php
Video
Here are a couple of instructional videoe where the present simulator is used as an example:
Feedback control
Process model
Dynamically, this process is "an integrator with dead-time" from the screw control.
The values of the model parameters are available via the front panel of the simulator.
The level is measured with a gamma-ray based measurement device having range 0 - 15 m,
corresponding to 0 - 100% range. The correspondence between the measurement value ym in
percent and the level y in percent is given by the measurement function:
Measurement random noise is added to the level measurement. The measurement signal passes
through a lowpass filter which attenuates the noise component of the signal. The filter is
characterized by its time constant, Tf [s]. The filter action is removed by setting Tf = 0.
Aims
2 di 5 23/05/2019, 18:17
TechTeach: SimView http://techteach.no/simview/levelcontrol_chiptank/index.php
to give an understanding of how an automatic feedback control system works, and which
benefits feedback control has compared to using a fixed value of the manipulated variable
to give an understanding of the properties of two important control functions, namely PID
control and on/off-control
to develop skills in tuning controller parameters
to give insight into how various parameters (in the controller, in the process, and in the
measurement device) influates the dynamic properties and the stability properties of the
control system.
In other words: This lab will give your (more) insight into the most important issues of control
engineering!
Motivation
Control systems are essential in industry because it is important to control process variables so that
they are kept equal to or close to set-points. The PID-controller is by far the most frequently used
controller function, and it is a main topic in this lab.
This lab is about level control, and in most plants there is a need to control level. The simulated
tank with it's level control system in this lab is a "real" system, as it actually exists, as mentioned
above.
Suggested exercises
In the tasks below it is assumed that the process is in it's nominal operating point unless something
else is stated. The nominal operating point is defined as follows:
In the tasks about PID-control: Set the set-point weights wp and wd equal to 1, and the coefficient a
= Tf/Td equal to 0.1 (these are also the default values as set on the front panel). Let the PID-
controller have anti-windup.
1. First: No controller! Set the controller in manual mode. Give the outflow a step from e.g.
1500 to 1800 kg/min, which implies that unom no longer fits to the nominal outflow, wut,nom.
Characterize the response in the level. Is control using a fixed value of the manipulated
variable (unom = constant) an acceptable way of controlling this process?
2. Then: Manual control, that is: YOU are the controller! Set the controller in manual mode.
Give the outflow a step from e.g. 1500 to 1800 kg/min. Compensate for this disturbance by
adjusting unom. How long time do you need to bring the level back to the set-point with an
error less than 0.1 meter? Are there any drawbacks with using a human being as a continuous
controller?
3. Automatic control using an on/off controller: Set the controller in automatic mode. Set the
on/off controller's amplitude to 10 % and the hysteresis width to 0%. Give wut and unom their
nominal values.
a. Characterize the response in the level. Explain!
3 di 5 23/05/2019, 18:17
TechTeach: SimView http://techteach.no/simview/levelcontrol_chiptank/index.php
b. Apply a step to wut from 1500 to 1800 kg/min. How is the response in the level?
Explain! What happens with the response if you increase M (from 10%)?
4. Automatic control with a PID-controller: Parameter tuning: In the tasks above you
should have observed that there are certain problems connected to having a constant
manipulated variable, and also with on/off-control. May be continuous control with PID-
controller will work better?
a. Find the PID-parameters using the Åstrøm-Hägglund-method. (You will see that the
response in the level is not sinusoidal, but just pretend it is - that is, you can read off
the amplitude of the oscillations in the usual way.)
b. Find the PID-parameters also using Ziegler-Nichols' closed-loop method. Are the
parameters approximately the same as with the relay- or on/off-tuner?
In the following tasks you shall use the PID-parameter values as found in task 4a or 4b.
If you have not executed task 4, you can use the following PID-parameter values,
which you can regard as "standard values":
5. Is the stability of the control system OK? Give wut a step from e.g. 1500 to 2000 kg/m, and
observer how the level returns to the set-point. Does the control system have proper stability?
6. Compensation properties:
a. How large is the stationary control error using a PID-controller after a step in wut from
1500 to 1800 kg/min?
b. How long time time does it take for the PID-controller to bring the level back to the
set-point with an error smaller than 0,1m (after the step in wut as described above)?
Which controller is best in this respect: You, the on/off-controller, or the PID?
c. Use a P-controller. Choose a proper value of Kp in the P-controller. How large is now
the stationary control error? Zero?
7. Tracking properties: How large is the stationary control error with a PID-ontroller after a
step in the set-point (choose the step value yourself)?
8. How the P-, I- and D-term woks: Observe how the three terms in the control signal, u,
works after a step in the disturbance. (There is a button beneath the diagram of u to show the
time-response of the individual control signal terms.)
9. How parameter changes influences the stability of the control system: Observe how the
stability of the control system changes due to the parameter changes describes below. In each
subtask/experiment you can excite the control system with a small step in the set-point. The
experiments must be performed independant of each other, that is, you have to reset the
parameters to the standard values (defines above) between each experiment.
a. The controller gain Kp is increased (much).
b. The integral time Ti is reduced (much).
c. The derivate time Td is increased (much).
d. The screw gain Ku is increased (much).
e. The sampling interval of the controller, Ts_reg (which can be adjusted in the parameter
field in the upper part of the front panel) is increased (much).
f. The dead-time (time-delay) td of the conveyor is increased (much).
g. The cross sectional area A is reduced (much).
h. The measurement gain Km,LT is increased (much).
i. The set-point gain Km,LC is increased (much).
4 di 5 23/05/2019, 18:17
TechTeach: SimView http://techteach.no/simview/levelcontrol_chiptank/index.php
10. The importance of using the correct measurement function in the setpoint generation:
a. What happens with the control error of the set-point gain Km,LC is different from the
measurement gain Km,LT?
b. What happens with the control error if the lower limit, rm0, of the set-point range is
different from the lower limit, ym0, of the measurement range?
11. Measurement lowpass filter: Demonstrate that the measurement lowpass filter attenuates
the noise component of the measurement signal. Also demonstrate that the filter reduces the
variation of the control signal. (Compare the behaviour of the signals with filter and without
filter.) In general, what may be the drawback of large variations of the control signal?
12. Derivative term and measurement noise: Demonstrate that the derivative term of the
controller causes the control signal to vary more (compared to not having derivative term).
[SimView] [TechTeach]
5 di 5 23/05/2019, 18:17
TechTeach: SimView http://techteach.no/simview/temp_control_pid_onoff/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: temp_control_pid_onoff.exe.
The process model on which the simulator is based is a 1. order model based on energy balance
under the assumption of homogenous conditions in the liquid in the tank. The processs model also
contains a time delay which represents the time delay which in practice exists between an exitation
of the heating element and the response in the temperature sensor. In addition the simulator
contains a 1. order transfer function representing a time constant in the heating element.
Video
Here are some instructional videos where the present simulator is used as an example:
1 di 4 23/05/2019, 18:17
TechTeach: SimView http://techteach.no/simview/temp_control_pid_onoff/index.php
Process model
Knowledge about the process model is not necessary for doing the tasks below. The parameter
values are shown on the front panel of the simulator.
where Keu = P is the power delivered by the heating element. T1 is the temperature in the tank
assuming homogenous conditions. In practice there is a time delay between an excitation in the
heating element and the response in the temperature sensor:
We assume that this time delay is inversely proportional to the mass flow w:
(3) t = Kt/w
By taking the Laplsce transform of the model above we can get the following transfer function
from the control signal to the temperature T:
Thus a first order model with time delay. The parameters of H(s) are:
In addition the simulator contains a 1. order transfer function representing a time constant in the
heating element. (This submodel is not shown in the model above.)
Aims
To get an understanding of how an automatic control system based on feedback works and
which benefits feedback control has compared to control using a constant control signal.
To get an understanding of the features of the PID controller and the on/off controller.
To get skills in tuning a PID controller
To get insight into the importance of different system parameters on the dynamic properties
of the control system.
In other words: You will get knowledge about the basics of control!
Motivation
2 di 4 23/05/2019, 18:17
TechTeach: SimView http://techteach.no/simview/temp_control_pid_onoff/index.php
Control systems are essential in industrial processes since it is important and useful to control
process variables so that they are kept on or close to specifies values (setpoints). The PID controller
is the most frequently used control function in industrial systems.
In the industry temperature control is used on e.g. reactors and heat exchangers.
Tasks
The nominal operating point of the process is defined as follows:
The default process parameter values are as shown on the this snapshot of the front panel of the
simulator.
Unless otherwise stated it is assumed that the tasks below are executed while the simulator runs.
1. First: Control using constant control signal. Set the controller in manual mode. Find the
nominal control signal uman "experimentally". Then change the distrubance Tin from 20 to 15
degrees C. What is the value of the resulting steady-state control error?
2. Feedback control by you ! Reset the settings of the simulator to its default values (menu:
Operate / Reinitialize All to Default), but the controller shall be in manual mode. Change the
disturbance Tin from 20 to 15 degrees C, and control the process via the nominal control
signal u0. Are you able to obtain zero steady-state control error?
3. Automatic control using a PI controller: Tuning the controller: Tune the controller using
the Ziegler-Nichols' closed loop method.
In the subsequent tasks you shall use a PI controller with settings as found in Task 4.
Alternatively, you can use the following parameter values:
4. Disturbance compensation: Reset the settings of the simulator to its default values (menu:
Operate / Reinitialize All to Default). Change the disturbance Tin from 20 to 15 degrees C.
What is the steady-state control error?
5. Setpoint tracking: Change the setpoint as a step, say from 50 to 60 degrees C. What is the
steady-state control error?
6. The stability of the control system at parameter variations: Reset the settings of the
simulator to its default values (menu: Operate / Reinitialize All to Default). Check what
happens with the stability of the control system at the below parameter changes. In each of
the subtasks/experiments you can excite the control system using a small step in the setpoint.
3 di 4 23/05/2019, 18:17
TechTeach: SimView http://techteach.no/simview/temp_control_pid_onoff/index.php
The experiments shall be performed independent of each other, that is, the parameters should
be reset to the default values once the experiment is completed.
a. Controller gain Kp is increased (much).
b. Integral time Ti is reduced (much).
c. Derivative time Td is increased (much).
d. Power gain Ke is increased (much).
e. Mass flow w is decreased (much).
f. Measurement gain Km,TT is increased (much). (This gain is the ration between the
temperature measurement in % and the temperature in degreees C. The gain is changed
by changing the measurement range. If you change the measurement range, you must
also change the setpoint range accordingly, otherwise there will be a steady-state
control error.)
[SimView] [TechTeach]
4 di 4 23/05/2019, 18:17
TechTeach: SimView http://techteach.no/simview/dynpos/index.php
Dynamic Positioning
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: dynpos.zip (unzip, and open dynpos.exe).
[SimView] [TechTeach]
1 di 1 23/05/2019, 18:18
TechTeach: SimView http://techteach.no/simview/separators/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: separators.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the exe-
file on any directory (folder) on your PC and then run the exe-file, which starts the simulator.
Aim
...
Motivation
...
Tasks
1 di 2 23/05/2019, 18:18
TechTeach: SimView http://techteach.no/simview/separators/index.php
.....
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:18
TechTeach: SimView http://techteach.no/simview/speedservo/index.php
Speed Servo
Snapshot of parts of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: speedservo.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the exe-
file on any directory (folder) on your PC and then run the exe-file, which starts the simulator.
The speed is measured using a tachometer. The tachometer gain and the other motor parameters
can be adjusted from the front panel of the simulator.
Mathematical model
In the expressions below the following quantities are used: S is rotational speed. va is armature
voltage. ia is armature current. Tf is friction torque. TL is load torque. J is the sum of the intertias
of the motor and the load, i.e. J = Jmotor + Jload. B is the sum of the damping coefficients of motor
and load. La is the armature inductance. Ra is the armature resistance. Ke is the voltage constant
1 di 4 23/05/2019, 18:18
TechTeach: SimView http://techteach.no/simview/speedservo/index.php
The values of the motor parameters can be adjusted from the front panel.
A mathematical model of the motor can be found from the Kirchhoff's voltage law on the armature
circuit and the torque balance of the mechanical rotation (refererence):
By taking the Laplace transform of the model above we will find the following transfer function
from armature voltage va to speed S:
Gain:
(5) z = 0.5*(JRa+BLa)/[sqrt(JLa(KtKe+BRa))]
Static model
By setting the derivatives in (1) and (2) equal to zero and eliminating ia, we get the following static
model (all variables are assumed to have constant values):
Aim
The aim of this simulator is to get a better understanding of how a speed control system works
dynamically.
Motivation
DC motors are used in many servo systems. Compared to other electro motors DC motors are easy
2 di 4 23/05/2019, 18:18
TechTeach: SimView http://techteach.no/simview/speedservo/index.php
Tasks
In the tasks below is assumed - unless otherwise stated - that the process (motor) is in its normal or
nominal operating point, defined as follows:
The speed S is 3.0 krpm (revolutions per minute), which is used as a nominal speed setpoint.
The load torque TL is 0 Nm.
Unless other information is given, it is assumed that the simulator runs while you do the tasks.
1. Control using constant control signal. Set the controller in manual mode.
a. Find the nominal control signal u0 experimentally (on the simulator) which brings the
process to the nominal operating point.
b. Change the load torque (disturbance) from 0 to -20 Nm. What is the steady-state
control error?
2. Tuning a PID control: In the subsequent tasks the motor speed is controlled by a PID
controller (unless otherwise stated). Adjust the controller using the Ziegler-Nichols' closed
loop method.
5. Tracking a setpoint ramp: Let the load torque be constant. Let the setpoint be a ramp of
slope 100 krpm/s.
a. Use a PID controller. What is the steady state control error (as read off from the front
panel of the simulator)?
b. Use a P controller. What is the steady state control error?
6. The stability of the control system at parameter changes: Let the setpoint be 3.0 krpm and
the load torque 0 Nm. Observe what happen to the control system stability at the parameter
changes described below. In each task/experimentyou can excite the control system via a
small step in the setpoint. The experiments should be performed independently, i.e. the
parameter values should be reset to default values once each of the experiments is finished.
a. The control gain is increased (much).
3 di 4 23/05/2019, 18:18
TechTeach: SimView http://techteach.no/simview/speedservo/index.php
[SimView] [TechTeach]
4 di 4 23/05/2019, 18:18
TechTeach: SimView http://techteach.no/simview/level_control_equalization_tank/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator:level_control_equalization_tank.exe.
The mathematical model of the process to be controlled is based on mass balance of the contents,
which is water, of the tank. The mass balance is as follows:
The outflow Fout(t) is assumed to be the same as the pump control signal u(t) (both in unit of m3/s).
Video
Here is an instructional video where a previous version of the present simulator is used as an
example: Flow Smoothing with Buffer Tank.
1 di 2 23/05/2019, 18:19
TechTeach: SimView http://techteach.no/simview/level_control_equalization_tank/index.php
Aims
The aim of this simulator is to demonstrate the use of level control to obtain equalization (or
buffering) of flow.
Motivation
Flow equalization is important in e.g. wastewater treatment plants. Compliant or soft level control
is used to obtain a proper equalization or smoothing of the varying inflow.
Tasks
1. Observe in simulations how the closed-loop time-constant, T_c, in the Skogestad PI tuning
method affects the flow equalization or smoothing property of the level controlled tank.
2. It can be shown (assuming the level controller is a P controller) that the maximum variation in
the level, dh_max, due to a step change of amplitude dF in the inflow is not larger than T_c*dF/A.
Verify this in a simulation.
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:19
TechTeach: SimView http://techteach.no/simview/antiwindup/index.php
Anti Windup
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: antiwindup.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the exe-
file on any directory (folder) on your PC and then run the exe-file, which starts the simulator.
Video
Here is an instructional video where the present simulator is used as an example: Anti windup in a
PI(D) controller.
1 di 2 23/05/2019, 18:19
TechTeach: SimView http://techteach.no/simview/antiwindup/index.php
Aim
The aim is to observe the importance of having anti windup in the PID controller when a large
disturbance drives the control variable into saturation.
Motivation
All practical PI(D) controllers must have anti windup, so this is standard in commercial controllers.
If you are to implement a PI(D) controller yourself, it should definitely have anti windup.
Tasks
Reasonable PID parameter settings are shown on the front panel of the simulator (i.e. Kp=6.7,
Ti=252s, Td=63s). The temperature setpoint can be set to 80 degrees C.
1. Control without anti windup: Deactivate the anti windup action. Set Tin = 40 degrees C,
and let the control system settle to a steady state. Then reduce Tin to 10 degrees C and keep
Tin at this value for about 100min. Does the control variable go into saturation? Then
increase Tin back to 40 degrees. How long does it take until the temperature T converges to
the setpoint with zero control error after Tin was increased from 10 to 40 degrees? To which
value is the I-term (ui) integrated?
2. Control with anti windup: Activate the anti windup, and adjust Tin as in Task 1. How long
does it take before the temperature T converges to the setpoint with zero control error after
Tin was increased from 10 to 40 degrees? To which value is the I-term (ui) integrated?
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:19
TechTeach: SimView http://techteach.no/simview/piddiscrete/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: piddiscrete.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the exe-
file on any directory (folder) on your PC and then run the exe-file, which starts the simulator.
Tasks
1 di 2 23/05/2019, 18:20
TechTeach: SimView http://techteach.no/simview/piddiscrete/index.php
Assuming the following parametrers of the process to be controlled (these values are default values
of the simulator): Ku=1, Kv=1, T1=2, T2=1, tau=0.5. Controller tuning using the Ziegler-Nichols'
ultimate gain tuning method yields
You can apply the above parameter values in the following task.
1. Set Ts = 0.1. Change the setpoint e.g. as a step. Observe the control signal. Does this signal
seem to be almost continuous?
2. Increase Ts to 0.5. What does the control signal look like? What has happened to the stability
of the control system?
3. Find experimentally (on the simulator) for which values of Ts the control system is
asymptotically stable.
4. Adjust Ts to the value giving marginally stability of the control loop. Readjust the PID
parameters so that the loop again becomes asymptotically stable (using e.g. the Ziegler-
Nichols' closed loop method). Is the control loop as quick with this new PID setting as with
the original setting?
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:20
TechTeach: SimView http://techteach.no/simview/pid_reverse_direct/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: pid_reverse_direct.exe.
Video
Here is an instructional video where the present simulator is used as an example: Reverse or direct
action in the PID controller?
Aim
The aim of this simulator is to observe the consequences of selecting wrong sign of the controller
gain.
Motivation
1 di 2 23/05/2019, 18:20
TechTeach: SimView http://techteach.no/simview/pid_reverse_direct/index.php
Commercial controller give the user the option to select the controller gain according to the process
gain. Selecting wrong sign has dramatic concequences for the stability of the control loop.
Tasks
1. Explain (without simulating) that the left tank process has positive gain, and that right tank
process has negative gain.
2. What happens to the stability of the control systems if you select the wrong mode among the
reverse and direct modes?
3. What happens to the stability of the control systems if you select the correct mode(s)?
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:20
TechTeach: SimView http://techteach.no/simview/control_kick/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: control_kick.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the exe-
file on any directory (folder) on your PC and then run the exe-file, which starts the simulator.
ud = KpTd d(wdySP-y)/dt
1 di 3 23/05/2019, 18:20
TechTeach: SimView http://techteach.no/simview/control_kick/index.php
where wd is the weight of value either 1 or 0 (values between 1 ans 0 are not used in practice).
Normally wd is 1. With wd equal to 0 the setpoint is effectively removed from the derivative term.
In some PID controllers the user can select a reduced setpoint weight also in the proportional term:
up = Kp(wpySP-y)
Reduced setpoint weight implies that abrupt setpoint changes (as step changes) are not propagated
to the control signal. This results in a smoother control signal, but it also causes a somewhat more
sluggish control system as far as setpoint tracking is concerned, which may be unfortunate when
the controller is a secondary controller in a cascade control system.
An alternative way to achieve a smoother control signal is to simply use a smoother setpoint signal,
e.g. changing the setpoint between two values as a ramp in stead of as a step.
Aims
The aims of this simulator is to observe the benefits and drawbacks of using reduced setpoint
weights in the proportional term and the derivative term of a PID controller, and to see that ramping
of the setpoint can be an alternative to reduced setpoint weighting.
Motivation
In many commercial controllers the user can select reduced setpoint weight in the proportional and
in the derivative term. It is important to be aware the benefits and drawbacks of such reduced
weighting, and to know about the alternative solution of choosing smooth setpoint changes, a
ramped change between two setpoint values.
Tasks
If the controlled process has default parameter values (i.e. Ku=1, Kv=1, T1=2, T2=1, tau=0.5)
proper PID settings are
(as found using the Ziegler-Nichols' closed loop method). These settings may be used in the tasks
below.
2 di 3 23/05/2019, 18:20
TechTeach: SimView http://techteach.no/simview/control_kick/index.php
3. Using ramped setpoint changes: Set the setpoint weights wp and wd to 1. Is the control
signal smoother at a ramped setpoint change than at a stepwise change?
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:20
TechTeach: SimView http://techteach.no/simview/pid_serial_parallel/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: pid_serial_parallel.exe . The simulator runs immediately after the download
by clicking Open in the download window. Alternatively, you can first save a copy of the
exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
In the simulator the user can choose to transform the PID parameters for a serial PID controller to
parameters for a parallel controller so that the parallel controller behaves like a serial controller.
1 di 3 23/05/2019, 18:20
TechTeach: SimView http://techteach.no/simview/pid_serial_parallel/index.php
Aim
The aims of this simulator is to observe differences between a PID controller on serial form and a
PID controller on parallel form, and to see if there is any use of transforming parallel PID
parameters to serial PID parameters.
Motivation
There are both serial and parallel commercial PID controllers. It is useful to see if there is any
substantial difference between these two controllers. Furthermore, it may be useful to see if a
transformation from serial PID parameters to parallel PID parameters has any important effect.
Tasks
In the outset you can use the following PID parameters (found by using the Ziegler-Nichols' closed
loop method on the default process):
1. First, use the same PID parameter values in the serial controller as in the parallel controller.
Is there any substantial difference between the responses in the process output variable of the
two control systems due to a setpoint step and a disturbance step?
2. What are the PID parameter settings for the parallel controller when the serial PID settings
are transformed to parallel PID settings? Apply these transformed PID settings to the parallel
2 di 3 23/05/2019, 18:20
TechTeach: SimView http://techteach.no/simview/pid_serial_parallel/index.php
controller. Is there any observable difference between the responses in the two control
systems?
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:20
TechTeach: SimView http://techteach.no/simview/bumpless_transfer/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: bumpless_transfer.exe . The simulator runs immediately after the download
by clicking Open in the download window. Alternatively, you can first save a copy of the
exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
1 di 3 23/05/2019, 18:21
TechTeach: SimView http://techteach.no/simview/bumpless_transfer/index.php
How is bumpless transfer realized in the PID controller used in this simulator? The PID controller
calculates the control signal as follows:
u = u0 + up + ui + ud
where u0 is the nominal control signal, which is an adjustable constant. When the controller is in
manual mode, u = u0.
Bumpless transfer from automatic to manual mode is realized by giving u0 value equal to the
control signal immediately before the switching (from automatic to manual mode).
Bumpless transfer from automatic to manual mode is realized by ensuring that u0 keeps its
value from manual mode and that up, ui and ud are set equal to 0 immediately before the
switching.
If bumpless transfer is deactivated (which is an option in this simulator), u0 maintains its value
from automatic mode in manual mode (thus it does not get the value of u as it is immediately
before the switch). Also at switching from manual to automatic mode, u0 maintains its value (this is
the same implementation as for bumpless transfer)
Aim
The aim of this simulator is to demonstrate why it is important that a PID controller has bumpless
transfer.
Motivation
Bumpless transfer is an important property of practical PID controllers. You can assume that
bumpless transfer is implemented in commercial PID controllers. If you are to implement a
practical controller yourself, you should implement it with bumpless transfer.
Tasks
The normal operating point of the process is defined as follows:
You can use the following PID settings (according to the Ziegler-Nichols' closed loop method):
Unless otherwise stated the tasks below assumes that the simulator runs.
2 di 3 23/05/2019, 18:21
TechTeach: SimView http://techteach.no/simview/bumpless_transfer/index.php
signal to the process is u0 = 0. Characterize the control action during the mode
switching.
c. Switch the controller from manual to automatic mode, which implies that the control
signal is equal to the sum of u0 and the P-, I- and D-terms. Characterize the control
action during the mode switching.
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:21
TechTeach: SimView http://techteach.no/simview/pwm_control/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: pwm_control.zip (unzip, and open pwm_control.exe).
The purpose of PWM is to obtain an approximately continuous or smooth control signal using a
binary or on/off actuator or PWM elementet which typically is an SSR element (solid state relay).
The principle of PWM is to keep the element in the on state (and in off state) so that the resulting
average control signal is as specified. PWM elements operates with a given fixed period, Tp, e.g. 1
sec. The part of the period where the PWM element is in on-state is denoted the duty cycle (D),
1 di 3 23/05/2019, 18:21
TechTeach: SimView http://techteach.no/simview/pwm_control/index.php
Figure 1
In general, the less PWM period Tp, the smoother control signal. PWM is not proper for
mechanical actuators as valves because of excessive wear.
Aims
The aims of this simulator is to give an understanding of how pulse width modulation works, and to
show how the control action works in a control system where the control signal is pulse width
modulated.
Motivation
PWM is an important control technique. It is frequently used for controlling transistor based
switches, as SSR elements (solid state relays) for controlling motors or valves.
Tasks
The normal operating point is defined as ym = 75 and v = 0.
1. Set the controller in manual mode. The disturbance may be set to zero. The PWM periode
may be set to 1 sec. Control the process with a control signal (u0) equal to 75%. Observe the
PWM signal. Is the generated PWM signal 75% in average, as it should be?
2. Set the controller in automatic mode. Set ySP to 75%. The controller can be a PI controller
with gain Kp = 3.5 and Ti = 6.0 (tuned using the Ziegler-Nichols' closed loop method). Is the
control system behaving satisfactory regarding stability and average control error?
3. Now use a PID controller with settings Kp = 4.8, Ti = 3.5 and Td = 0.9 (according the
Ziegler-Nichols' closed loop method). Set ySP = 75%. What is the average control error?
How is the behaviour of the PWM control signal? Can you explain why the control signal u
2 di 3 23/05/2019, 18:21
TechTeach: SimView http://techteach.no/simview/pwm_control/index.php
(from the controller) is more variable with the PID controller than with the PI controller?
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:21
TechTeach: SimView http://techteach.no/simview/cascade_control_temperature/index.php
Cascade Control
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: cascade_control_temperature.zip (unzip, and open
cascade_control_temperature.exe)
A cascade control system with temperature control of both the tank and the jacket.
A single-loop control system with temperature control of the tank only.
Both control systems are excited by the same temperature setpoint and the same disturbances.
In both control systems the process to be controlled is given by the following model based on
energy balances:
dTp/dt=[cp*Fp*(Tpin-Tp)+Uhp*(Th-Tp)]/(cp*dp*Vp)
dTh/dt=[ch*Fh*(Thin-Th)-Uhp*(Th-Tp)+Ueh*(Te-Th)]/(ch*dh*Vh)
where Tp is product liquid temperature, Th is heating liquid temperature, cp and ch are specific
heat capacities, Fp and Fh are flows, Tpin and Thin are inlet temperatures, Vp and Vh are volumes
1 di 3 23/05/2019, 18:22
TechTeach: SimView http://techteach.no/simview/cascade_control_temperature/index.php
of jacket and tank respectively, Te is environmental temperature, dp and dh are liquid densities,
Uhp and Ueh are heat transfer coefficients between jacket and tank, and between jacket and
enviroment (air) respectively. (All parameter values are available from the front panel of the
simulator.)
To account for unmodelled dynamics, a pure time delay is added to the measured temperatures Tp
and Th.
The measurements of Tp and Th are fed to measurement lowpass filters with time constant Tf.
Aims
The aims of the tasks given below are
Motivation
Cascade control is a common control structure in both process control systems and in
servomechanisms. In process control cascade control is used for temperature control, level control,
pressure control, and quality control. These are the primary control loops, while the secondary loop
typically performs flow control or pressure control.
In servomechanisms the primary loops perform positional control or speed control, while the
secondary loop typically performs speed control (in a primary positional loop), or current control
(in electrical servomechanisms).
Cascade control can give a much better compensation for disturbances than single loop control can
do.
Tasks
In the tasks below the starting point is that the process is in it's nominal operating point which is
characterized as follows:
The controllers have already been tuned for fast and stable control, but you should check if
the present PI settings are ok.
Excite the control systems with a small step in the set-point (a step amplitude of 0.5 C is
appropriate here). Is the stability of the control loops ok (just make a qualitative assessment)?
2 di 3 23/05/2019, 18:22
TechTeach: SimView http://techteach.no/simview/cascade_control_temperature/index.php
(You may of course tune the controllers yourself, but this is not a prerequisite for the tasks
below.)
Observe also how the control variable works in the two control systems. In which of
them is the control variable working most actively?
b. Setpoint tracking: Make step change of the temperature setpoint, Tpsp. Is cascade
control significantly better than single-loop control? Why/why not?
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:22
TechTeach: SimView http://techteach.no/simview/feedforward_liquid_level_control/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator:feedforward_liquid_level_control.exe.
The mathematical model of the process to be controlled is based on mass balance of the contents,
which is water, of the tank. The mass balance is as follows:
Here the inflow Fin(t) is assumed to be the same as the pump control signal u(t), hence both are in
1 di 3 23/05/2019, 18:22
TechTeach: SimView http://techteach.no/simview/feedforward_liquid_level_control/index.php
which constitutes the process model written as a state-space model. This model will be the basis of
the development of the feedforward control action, cf. the tasks below.
Video
Here is an instructional video where the present simulator is used as an example: Feedforward
control.
Aims
The aim of this simulator is to demonstrate the benefit for the level control by using feedforward
control in addition to the (compulsory) feedback control.
Motivation
Feedforward control can improve the control substantially, i.e. the control error may become
substantially smaller compared to not using feedforward. However, feedforward control may be
difficult to implement because a process model is required (in the present example, however, the
process model is quite simple), and disturbances have to be measured, implying extra expenses.
Tasks
In all the task below always use feedback control (with PI controller), i.e. set the PI controller in
automatic mode. The PI parameter settings can be as shown in the figure above.
1. Deriving the feedforward control function: Assume that the level control setpoint is hSP [m].
From the process model given above, show that the feedforward control function is
Explain the physical meaning of this feedforward control! Does this control function "make sense"?
You should never implement a pure time-differentiation because the time-derivative is very
sensitive to noise and abrupt changes of the signal to be differentiated. In stead, you should
implement a smoothed derivative by letting the signal pass through a lowpass filter before the
differentiation. According to this we modify the feedforward from setpoint part of our feedforward
controller as shown below:
where hSP,filt is a lowpass filtered level setpoint. The filter may be a time-constant filter:
where Tf is the filter time-constant. In the simulator the time constant is set to 5 sec.
2 di 3 23/05/2019, 18:22
TechTeach: SimView http://techteach.no/simview/feedforward_liquid_level_control/index.php
1. Adjust the outflow (disturbance) arbitrarily. Observe the level control error.
2. Then, adjust the level setpoint arbitrarily, and observe the control error.
1. By default the output of the feedback controller (PI controller) has only a positive value
range, from 0 to 5 kg/s. This non-negative range may imply that the controller is not able to
make the control error become zero in steady state after you have activated the feedforward
controller. Why not?
2. Then, change the minimum output value of the PI controller from 0 to -5. Does this help?
3. Adjust the outflow arbitrarily. Is the level control error reduced because of the feedforward
control action?
4. Then, djust the level setpoint arbitrarily. Is the control error smaller with feedforward
control?
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:22
TechTeach: SimView http://techteach.no/simview/feedforward_control_tank_temp/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: feedforward_control_tank_temp.exe . The simulator runs immediately after
the download by clicking Open in the download window. Alternatively, you can first save a
copy of the exe-file on any directory (folder) on your PC and then run the exe-file, which
starts the simulator.
Introduction
The system being simulated is a temperature control system based on feedforward control in
addition to feedback PID control from temperature measurement. The PID controller has already
been tuned (as a PI controller, actually) for good stability.
Tasks
In all the task below, use feedback control in addition to feedforward control. It is assumed that the
simulator runs as you do the tasks.
1 di 2 23/05/2019, 18:22
TechTeach: SimView http://techteach.no/simview/feedforward_control_tank_temp/index.php
give more or less randomly abrupt setpoint changes. How does the control signal react
as compared to a smoother setpoint ramp, as in task no. a above?
2. Feedforward control at disturbance changes: Change the inflow temperature. Is the
control error be reduced by introdusing feedforward control?
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:22
TechTeach: SimView http://techteach.no/simview/feedforward_temp_control_heat_ex/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: feedforward_temp_control_heat_ex.exe . The simulator runs immediately
after the download by clicking Open in the download window. Alternatively, you can first
save a copy of the exe-file on any directory (folder) on your PC and then run the exe-file,
which starts the simulator.
Aim
The aim is to observe how adding feedforward control to the basic feedback control is improving
1 di 2 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/feedforward_temp_control_heat_ex/index.php
Motivation
Disturbance compensation is the main task of most control systems.
Tasks
While adjusting the T_{in} temperature, try first feedback control and then add feedforward
control. Is the control system performance improved with feedforward control?
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/gain_scheduling/index.php
Gain Scheduling
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: gain_scheduling.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the exe-
file on any directory (folder) on your PC and then run the exe-file, which starts the simulator.
A process model can be derived from an energy balance (it is for simplicity assumed that the heat
transfer through the walls is zero, i.e. U = 0, see the front panel of the simulator):
1 di 4 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/gain_scheduling/index.php
P = KP*u
T1 is the temperature of the liquid in the tank assuming homogenous conditions. In practice there is
a time delay t in the response in the temperature sensor relative to an excitation in the supplied
power P. Thus,
We assume that the time delay is inversely proportional to the mass flow w:
The controller
In the simulator the gain scheduling PID controller of the PID Control Toolset in LabVIEW is used.
In this controller a piecewise constant interpolation is used between the different PID parameter
sets. In each interval the PID parameter values are held constant at a conservative value, which
implies that the stability is ensured during the interval.
Aims
The aims of the tasks below are as follows:
To demonstrate that the dynamics of a process may vary with process parameter value, here:
the mass flow through the system.
To calculate proper PID settings for various mass flows, to be used in a gain scheduled PID
controller
To observe the benefits of gain scheduling (i.e. an adaptive controller) compared to a
controller with fixed parameter values.
Motivation
Gain scheduling is an important practical way to implement an adaptive PID controller, which
means that the controller is continuously adapted to the process it controls. Gain scheduling is
available in many commercial PID controllers.
A typical kind of processes which may require gain scheduling (i.e. controller adaptivity) is
processes with varying mass flow, as in the present simulator. Concrete examples of such processes
are heat exchangers and continuous reactors being in a process line with varying production rate.
2 di 4 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/gain_scheduling/index.php
Tasks
1. Varying process dynamics:
a. From the model equations (1), (2) and (3) above, derive the transfer function HP(s)
from the control signal u [%] to the temperature T. This transfer function becomes of
first order with time delay. Show that the transfer function has the following
parameters:
b. Run simulations to demonstrate that Ku, Tc and t depends on the mass flow w as found
in Task a above. Qualitative resultes are sufficient (thus, you are not expected to
calculate the values of the gain, time constant and time delay for different values of w).
(Tips for the simulations: Set the controller in manual mode. Change the supplied
power as a step from the value, P0 (found experimentally, although you may calculate
it from the model), which keeps the process at the operating point, and observe the
response in the tank temperature.
3 di 4 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/gain_scheduling/index.php
follows: From 24 to 20, from 20 to 16, from 16 to 12). Observe that both the process
parameters and the controller parameters varies. Is the stability of the control system
satisfactory for any mass flow? Is gain sheduling (adaptivity) beneficial compared to
using a controller with fixed settings, cf. Taks 2 above?
[SimView] [TechTeach]
4 di 4 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/quality_flow_control/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: quality_flow_control.exe . The simulator runs immediately after the download
by clicking Open in the download window. Alternatively, you can first save a copy of the
exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
In the simulator Fp and Tp can be controlled manually by manipulating Fc and Kf. They can also
1 di 3 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/quality_flow_control/index.php
be controlled automatically using feedback from measured Fp and Tp and using Fc and Kf as
control (or manipulating) variables.
Aim
The aim of this simulator is to get knowledge about controlling flow and quality of a simple, yet
representative, industrial process, and to experience the benefits of using feedback control in stead
of an open loop control strategy.
Motivation
The process in this simulator is in many aspects similar to industrial processes as combustion
processes and reactors which can be controlled analogously.
Tasks
In the text below values are given without any specific unit. You may however assume that the unit
is percent corresponding to some transformation from physical units as degrees C or kg/min to
percent. The time unit may be interpreted as minutes.
Assume that Fp should have value 60 and that Tp should have value 45. Tc is assumed
to be 30, and Tv is assumed to be 70. What are the corresponding values of Fc and Kf?
(The simulator calculate these values.) Use these values as setpoint values Fc,SP and
Kf,SP for Fc,SP,local and Kf_SP_local. What is the static (steady state) control error for Fp
and for Tp?
c. Repeat task 1b, but now include model errors by setting Tc_error equal to 10. What is
2 di 3 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/quality_flow_control/index.php
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/multivariable_control/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: multivariable_control.exe . The simulator runs immediately after the
download by clicking Open in the download window. Alternatively, you can first save a copy
of the exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
Aim
The aims of this simulator is to give an understanding of the dynamics of a multivariable process,
to give experience with controller tuning, and to observe the benefits of using decoupling.
1 di 3 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/multivariable_control/index.php
Motivation
Multivariable processes may be difficult to control due to cross couplings in the process, which
causes interaction between the control loops. The PID controller tuning shoould follow certain
procedures. Using a decoupler between the PID controllers and the process may give better control.
Linear decouplers are available in some commercial control systems.
Tasks
1. Configuring a process without cross couplings:
a. Choose parameter values of the process transfer functions (but you may keep the
default values), but it is required in this subtask that the process has no cross couplings.
b. Verify the process dynamics (as expresses by the transfer functions) by running some
setp response tests (steps in the control variables with the controllers in manual mode).
In particular, verify that there are no cross couplings in the process.
(1) Tune the controller in each of the loops in turn with all the other controllers
in manual mode. (2): Close all the loops (set all controllers in automatic mode).
(3) If there are stability problems, reduce the gain and/or increase the integral
time of the controllers in the least important loops.
a. Find a decoupler for the process (calculate the parameters of the transfer functions in
the decoupler from the process model). Show (using simulations) that the decoupling
works (run step response tests of the process, with the controllers in manual mode).
b. Tune the PID controllers for the process including the decoupler. Show (using
simulations) that there is no interaction between the control loops. (Note: You may
observe a steady state control error even though there is integral action on the
controllers. This may stem from saturation in the control signal as it tries to
2 di 3 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/multivariable_control/index.php
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/smith_predictor/index.php
Smith Predictor
(Dead-Time Compensation)
Snapshot of a part of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: smith_predictor.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the exe-
file on any directory (folder) on your PC and then run the exe-file, which starts the simulator.
The Smith-predictor contains a PID-controller. In the simulator there is support for tuning this
controller as a PI-controller based on pole-placement design [cf. Ch. 8 in PID Control (to appear
during Summer 2004)].
In the simulator the PI(D)-controller in the traditional single-loop control system can be tuned as a
PI-controller using Skogestad's method of PID-tuning [cf. Ch. 8 in PID Control (to appear during
Summer 2004)].
Aim
1 di 2 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/smith_predictor/index.php
To see the benefits and drawbacks of using Smith-predictor to control processes having dead-time
compared to using ordinary single-loop control.
Motivation
Some industrial processes has a dominating dead-time, e.g. transportation processes. Using
ordinary single-loop PID control the dead-time forces the bandwidth of the control system to be
relatively low. If the dead-time can not be reduced, usning a Smith-predictor may be beneficial both
for tracking control purposes and disturbance compensation purposes.
Tasks
If nothing else is stated, you should use the default values of the parameters (in general, the default
value is retrieved using right-click in the element on the front panel of the simulator).
1. Assuming perfect process model: Use the following parameters in both the process model
and the process model usind internally in the Smith predictor: Ku = 1 = Kv, T = 0.5 sec and
tau = 2 sec (relatively large dead-time). Thus, there is no model errors in this case.
a. Tune the PI controller in the Smith-predictor and the PI controller in the traditional
single-loop control system. (Alternatively, you can use the following parameters:
Smith-predictor: Kp = 1.4 and Ti = 0.17. Traditional single-loop control system: Kp =
0.17 and Ti = 0.50.)
b. Check (using simulations) if the tracking properties and the distrurbance compensation
properties are better with the Smith-predictor than with traditional single-loop control
system. In the simulations you can apply setpoint steps and disturbance steps,
respectively.
2. Robustness of Smith-predictor against model errors: Use the same parameter values as in
Task 1, unless otherwise stated (below).
a. Increase the dead-time of the controlled process from 2.0 to 2.5 sec (without adjusting
any controller parameter). Is the Smith-predictor robust against this parameter change,
which introduces a model error. (Observe the stability of the control system). What
about the traditional control system - does it have greater robustness against the model
error?
b. Are the two stability of each of the two control systems robust against a reduction of
the dead-time from 2.0 to 1.5?
3. Improving the robstness of the Smith-predictor?:
a. Tune the PI controller in the Smith-predictor out from the following more careful or
conservative requirement: The relative damping factor, z, of the internal control loop in
the Smith-predictor is increased from 0.6 to 0.8, and, in addition, the natural resonance
frequency, w0, is reduced to the half, from 4 to 2 rad/s. (Alternatively, you can use the
following PI parameters in the Smith-predictor: Kp = 0.6 and Ti = 0.3 sec.)
b. Check if the robustness of the Smith-predictor is improved as compared to Task 2.
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:23
TechTeach: SimView http://techteach.no/simview/freqanalysis_controlsys/index.php
The process model which is controlled in this simulator can be chosen you. By default the
transfer function from control variable, u, to measurement signal, y, is a second order transfer
function with time-delay, with a disturbance, v, acting on the process at the same place
dynamically as the control variable. More specifically, the default process model is
where
Controller function
Hc(s) = Kp [(1+Tis)(1+Tds)]/[Tis(Tfs+1)]
Aim
1 di 3 23/05/2019, 18:24
TechTeach: SimView http://techteach.no/simview/freqanalysis_controlsys/index.php
The aim of this simulator is to give practice in frequency response based analysis of feedback
control systems.
Motivation
The frequency response is a good tool for expressing the dynamic properties of a control
system, regarding setpoint tracking and disturbance compensation, and stability.
Tasks
In the tasks below it is assumed that the process is in the nominal operating point, which is
defined above.
1. Controller tuning:
Find proper PID settings using e.g. Ziegler-Nichols' closed-loop method (the sustained
oscillations method or the frequency response method).
Unless otherwise stated, it is assumed that you use a PID controller with these settings in
the tasks below.
Tr = 1.5/wb.
Compare with the response time as found from a simulation. Are the values
similar?
e. What is the bandwidth and the response time for a properly tuned PI controller?
Compare with the PID controller.
2 di 3 23/05/2019, 18:24
TechTeach: SimView http://techteach.no/simview/freqanalysis_controlsys/index.php
6. Stability:
a. What are the stability margins (gain margin GM and phase margin PM) with the
PID controller (tuned in task 1)? Do they have proper values?
b.
i. Increase the controller gain Kp until the control system becomes marginally
stable as seen from the time response. (Keep this value Kp in the following
subtasks.)
ii. What does the tracking function |T| and the sensivity function |S| look like
(at marginal stability)?
iii. Read off the amplitude crossover frequency and the phase crossover
frequency. Do they have equal values?
iv. Calculate the period of the time response from the wc value. Confirm the
result by a simulation.
v.
c. Reset the PID controller to proper settings (as found in task 1).
i. Increase the controller gain Kp until the control system gets poor stability.
How are the |T| and |S| curves changed? (Then reset Kp.)
ii. Increase the process time delay until the control system gets poor stability.
How are the |T| and |S| curves changed?
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:24
TechTeach: SimView http://techteach.no/simview/logics/index.php
Logical Functions
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: logics.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the
exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
Aim
The aim is to understand the fundamental logic functions.
1 di 2 23/05/2019, 18:25
TechTeach: SimView http://techteach.no/simview/logics/index.php
Motivation
Logic control is important in most automation systems. Some examples:
The motor is stopped when the traversal crane has reached its end position.
The lamp is lit when the switch is turned on.
The valve is closed when the specified water level has been reached.
If you are to develop a logic control system you must master the fundamental logic functions.
Tasks
Find the logic function implemented in each of the different systems in the simulator.
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:25
TechTeach: SimView http://techteach.no/simview/sequential_control/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: sequential_control.exe . The simulator runs immediately after the download
by clicking Open in the download window. Alternatively, you can first save a copy of the
exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
The simulator is based on the following mathematical model of the process (the individual
parameters are defined on the front panel of the simulator):
dh/dt=(1/rho)*(1/A)*[K_in*u_valve_in-K_out*u_valve_out]
dT/dt=[1/(c*rho*A*h)]*[K_heat*u_heat+(T_in-T)*c*w_in+(T_env-T)*U]
1 di 3 23/05/2019, 18:25
TechTeach: SimView http://techteach.no/simview/sequential_control/index.php
u_motor
The motor is assumed to ensure homogenuous thermal conditions in the water in the tank.
u_valve_out (boolean)
u_motor (boolean)
Aim
The aim of the tasks below is to develop a better understanding of sequential control, and using a
state diagram.
Motivation
Sequential control is crucial in many control applications, as in chemical batch processes.
A sequential control procedure can be represented graphically by one of the following two
methods:
A state diagram
A sequential function chart (SFC)
State diagrams and SFC are quite similar, as they have the same basic elements:
Controllers can be implemented using graphical programming of state diagrams or SFCs in proper
programming tools. For example, state diagrams are supported by the State Diagram Toolkit in
LabVIEW, and HiGraph in the Step 7 programming tools of Simatic PLCs, while SFC is supported
by the GX IEC Developer programming tool of Mitsubishi FX2N PLCs.
Tasks
1. Run the simulator, and make sure you understand how the control system works.
2. Draw a detailed SFC of the sequential control system (draw without looking at the SFC
available from the front panel of the simulator). The actions in every state must be defined,
and the transition conditions in every transition must be defined. For your information:
Introduction to state diagrams.
2 di 3 23/05/2019, 18:25
TechTeach: SimView http://techteach.no/simview/sequential_control/index.php
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:25
TechTeach: SimView http://techteach.no/simview/kalmanfilter/index.php
Kalman Filter
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: kalmanfilter.zip (unzip, and open kalmanfilter.exe).
Aims
The aim of this simulator is to show how a Kalman Filter can be used to continuously estimate the
value of an unknown process variable. The typical trade-off is demonstrated: You can not have both
fast estimate update and noise-attenuated estimates, i.e. you have to choose to emphasize either of
them.
Motivation
The Kalman Filter is a generic algorithm for estimating process variables, assuming that you have a
mathematical model of the process (a set of differential equations) and that there is at least one
variable that is continuously measured. The Kalman Filter is used in a large variety of applications
- in control applications where the controller uses estimates as if they were real measurements and
1 di 2 23/05/2019, 18:25
TechTeach: SimView http://techteach.no/simview/kalmanfilter/index.php
Tasks
1. Change the outflow Fout arbitrarily, but keep it constant for a while, too. Is the Kalman Filter
able to estimate Fout correctly in steady-state?
2. In an attempt to make the estimate converge faster to the real value, the assumed process
disturbance variance Q22 of state x2 (which is the outflow) can be increased. What is the impact on
the state-estimate (benefit and drawback)? Simultaneously, observe how the Kalman Gain K21 is
changed accordingly. Does this change of K21 make sense?
3. Also the assumed measurement variance R influences the state-estimates. Descrease R. What is
the impact on the state-estimate (benefit and drawback)? Simultaneously, observe how the Kalman
Gains K21 are changed accordingly. Does these changes of make sense?
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:25
TechTeach: SimView http://techteach.no/simview/signal_types/index.php
Signal Types
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: signal_types.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the
exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
Introduction
When you are to analyze dynamic systems (e.g. control systems, motors, thermal processes,
signal filters), you may excite the system with some signal. This simulator realizes the most
common test signals:
In practice the test signal is overlayed (added to) a constant, which is denoted bias or DC
component (direct current).
Tasks
1. Square pulse: Ideally an impulse is a signal of infinite amplitude and zero duration but
1 di 2 23/05/2019, 18:25
TechTeach: SimView http://techteach.no/simview/signal_types/index.php
with a finite area men A under the signal curve. The area is also denoted the strength of
the impulse. If we assume that the impulse comes at time t0 and that it has bias B, it can
be expressed as follows:
An ideal impulse can not be realized fully. An approximation is a square pulse having
amplitude or height H and duration dt. The area of this signal is A = H*dt.
Task: Run the simulator. Select signal type "Square pulse". Observe how the signal
depends on H, dt, and B, and time t0.
where U is the step amplitude or step height, and B is the bias. t0 is the step time. S(t) is
the unit step function, having amplitude 1.
Task: Select signal type "Step". Observe how the signal depends on U, B and t0.
where K is the slope. B is the bias. t0 is the starting time. R(t) is a unit ramp, having slope
1, and starting at t = 0.
Task: Select signal type "Ramp". Observe the signal depends on K, B and t0.
where A is the amplitude, w is the frequency in rad/s, f is the frequency in Hertz and B is
the bias. The period of the signal is
Tp = 1/f [sec]
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:25
TechTeach: SimView http://techteach.no/simview/noise_white_coloured/index.php
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: noise_white_coloured.exe . The simulator runs immediately after the
download by clicking Open in the download window. Alternatively, you can first save a
copy of the exe-file on any directory (folder) on your PC and then run the exe-file, which
starts the simulator.
where a is a filter parameter and K is a gain. With a = 0, the filter output signal, x, is also white
noise. With parameter between 0 and 1, x becomes coloured noise, which means it does not
1 di 2 23/05/2019, 18:26
TechTeach: SimView http://techteach.no/simview/noise_white_coloured/index.php
vary completely randomly between the samples. The autocorrelation of x, Rxx(L), is plotted. L
is the lag parameter. Rxx(L) shows the "colour" of x.
Aims
To see typical plots of white noise and coloured noise.
To observe how the autocorrelation function expresses the "colourness" of a signal.
Motivation
White noise and coloured noise are important signals in stochastic systems. For example, in
applications as minimum variance optimal control and in state estimation using a Kalman filter
the noise signals acting on the system (for control or estimation) are assumed to be white. If the
noise is coloured, it can be regarded as the output of a dynamic signal filter typically called a
shaping filter.
Tasks
1. White noise: Set parameter a = 0, causing x to be white noise. Also set the gain K = 1.
a. Observe the signal x. Can you clearly see the random characteristics of the signal?
b. Observe the autocorrelation Rxx(L). For ideal white noise the normalized Rxx(L) is
1 for lag L = 0, and 0 for other values of L. Why does the autocorrelation of x
differ from the ideal form of Rxx(L).
2. Coloured noise:
a. Initially, set a = 0. Also set the gain K = 1.
b. Increase the parameter a continuously. Observe how the shape of the signal x
changes. Does it become less random? Explain thsi from the shaping filter model.
Simultaneously, observe the autocorrelation Rxx(L). How does its shape change as
parameter a increases? Explain!
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:26
TechTeach: SimView http://techteach.no/simview/signal_quantizer/index.php
Signal Quantizer
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: signal_quantizer.exe . The simulator runs immediately after the download
by clicking Open in the download window. Alternatively, you can first save a copy of the
exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
When an analog, continuous-time signal y(t) of signal range [Ymin, Ymax] is sampled by an AD
(analog-digital) converter of n bits: bn-1, bn,..., b1, b0, the resolution, i.e. the maximum signal
range represented by the LSB (least significant bit), is
q = (Ymax - Ymin)/(2n - 1)
Example: Given a signal y between Ymax = 100% and Ymin = 0% which is sampled using a 8
1 di 2 23/05/2019, 18:26
TechTeach: SimView http://techteach.no/simview/signal_quantizer/index.php
q = (Ymax - Ymin)/(2n - 1)
= (100% - 0%)/(28 - 1)
= 100%/255
= 0.392 %
Aim
The aim of the tasks below is to give an understanding of how the sampled (discrete-time
signal) depends on the number of bits in the AD converter.
Motivation
Sampling av continuous-time signals takes place in all applications where a computer is used to
read measurement data. It is important to be able to calculate the resolution of the digital signal
generated by the AD converter to decide if the accuracy is acceptable.
Tasks
1. Change the input signal u, and observe how the resolution of the digital signal depends
on the number of bits n. You can select n between 2 and 12.
2. There will be a difference between the analog signal and the digital (sampled) signal.
What is the maximum value of this difference? Verify the result by running a proper
simulation.
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:26
TechTeach: SimView http://techteach.no/simview/aliasing/index.php
Aliasing at Sampling
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: aliasing.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the
exe-file on any directory (folder) on your PC and then run the exe-file, which starts the
simulator.
1 di 3 23/05/2019, 18:26
TechTeach: SimView http://techteach.no/simview/aliasing/index.php
Aim
The aim is to develop an understanding of the aliasing phenomenon.
Motivation
Sampling av continuous-time signals takes place in all applications where a computer is used to
read measurement data. If the sampling rate is too low compared to the frequency of the signal
to be sampled, aliasing occurs. Aliasing means that the discrete-time signal gets a lower
frequency than the original signal. Obviously, sampling can cause problems in applications, e.g.
in audio applications.
Theory
Given a continuous-time signal, x(t), of frequency fcont [Hz] which is sampled with sampling
frequency fs [Hz]. The Nyquist frequency fN is defined as half of the sampling frequency:
fN = fs/2
It ca be shown that if the signal frequency fcont is larger than fN, there is aliasing, which implies
that the resulting discrete-time signal, xs, gets a frequency, fdisc, which is smaller than the signal
frequency fcont. Figure 1 shows the relation between fdisc and fcont.
Figure 1
From the figure one observation is that fdisc is equal to the difference fs - fcont if fcont is
between fN and fs.
Tasks
1. Select fcont and fs so that there is no aliasing (cf. Figure 1). Run the simulator. Is it
confirm that there is no aliasing?
2. Select fcont and fs so that there is aliasing (e.g. fcont = 0.5 and fs = 0.6 Hz), cf. Figure 1.
Calculate from Figure 1 the resulting frequency fdisc (of the discrete-time signal). Run the
simulator. Do you observe aliasing? If so, what is the frequency fdisc? Is the observation
in accordance with the calculation?
3. What is fdisc if fcont is equal to the Nyquist frequency? Run the simulator. Is the result
2 di 3 23/05/2019, 18:26
TechTeach: SimView http://techteach.no/simview/aliasing/index.php
confirmed?
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:26
TechTeach: SimView http://techteach.no/simview/lowpass_filter/index.php
Lowpass Filter
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: lowpass_filter.zip (unzip, and open lowpass_filter.exe)
Aims
The aims of this simulator are:
Motivation
Lowpass filters are frequently needed in practical application based in some processing of
measurements. This is because all practical measurements are noisy. Typically the noise is
approximately a random signal. The filter is used to attenuate the noise.
One very important application is in a control system. The process measurement (temperature,
level, pressure, speed etc.) always contains some noise. If the noise is not attenuated it will
propagate through the controller and cause abrupt (noisy) variations in the control signal, causing
1 di 4 23/05/2019, 18:26
TechTeach: SimView http://techteach.no/simview/lowpass_filter/index.php
The filter algorithm given above is relatively simple, but still it is probably the most commonly
used filter algorithm in practical application.
A discrete-time first order filter is simulated. The input signal to the filter consists of three additive
terms:
A sinusoidal signal
A random signal (white noise)
A constant (or bias)
Each of these signals can be deactivated (removed). The (total) input and the output signals are
plotted in real time in a chart. Also, the amplitude gain plot (Bode plot) of the filter is plotted.
The filter is a discretized version of a continuous-time time-constant filter given by the following
s-transfer function:
The filter algorithm that is implemented in the simulator is given by the following difference
equation:
where tk is the discrete point of time at time index k. Hence, tk-1 means the previous discrete point
of time. y is the filter output, and u is the filter input.
In general the filter parameter a can be set directly. In this simulator Eq. 1 is developed by
discretizing a continuous-time filter. The derivation is shown in detail in filter_algorithm.pdf. There
it is shown that
a = h/(Tf + h) (Eq. 2)
Frequency response
The amplitude gain of the frequency response of a filter expresses how a sinusoid is attenuated
through the filter. In the simulator the amplitude gain of the filter is plotted. The amplitude gain is
calculated from the z-transfer function of Eq. 1. This transfer function found by taking the
z-transform of Eq. 1, and it is
2 di 4 23/05/2019, 18:26
TechTeach: SimView http://techteach.no/simview/lowpass_filter/index.php
The amplitude gain is calculated as the absolute value of Hf(z) when z = ejwh where w is the
frequency [rad/s] and h [s] is the sampling interval. j is the imaginary unit. In the simulator the
Bode.vi function in LabVIEW is used to calculate and plot the amplitude gain in a Bode diagram.
The relation beween the time-constant Tf and the filter bandwidth fb [Hz] for Hf(z) is rather
complicated. However, if the sampling time h is relatively small (less than 1/5 of Tf) the following
relation holds (approximately):
It is useful to know how the filter attenuates random noise. The attenuation can be expressed as the
ratio between the standard deviation of the filter output and the standard deviation of the filter
input, hence "standard deviation gain", Ksigma (sigma is the greek character symbol for standard
deviation). In random_noise_attenuation.pdf it is shown that
Tasks
1. Manually adjusted input: The only input in this subtask is u3 (hence set the amplitude of
the sinusoid to zero and the amplitude of the random noise to zero). Adjust u3 arbitrarily for
various time-constants Tf. How does the relation between the output and the input (u3)
depend on Tf? More specifically, is the filtering stronger or looser as Tf. is increased? In
particalular, what is the relation between the output and the input signal if the input signal is
constant?
2. Sinusoidal input: Set u3 (manual input) and u2 (random input) to zero. Set the amplitude of
the sinusoid to 1 and the frequency to (say) 0.2 Hz.
a. Observe how the amplitude attenuation through the filter depends (qualitatively) on Tf
by looking at the simulated responses. Is this observation in accordance with the
amplitude gain Bode?
b. Set Tf to one specific value, say 0.5 s. The corresponding bandwidth fb [Hz] of the
filter can be found by comparing the input and output signals. Find "experimentally"
the bandwidth by adjusting the frequency of the input signal so that the amplitude of
the output is 1/sqrt(2) = 71% of the amplitude of the input signal. Is this
"experimental" bandwidth in accordance with the theoretical bandwidth as given by
Eq. 4? Finally, is the experimental bandwidth in accordance with the bandwidth that
you can fins from the Bode plot?
3. Random input: Set u1 (sinusoid) and u2 (manual input) to zero. Set Tf to one specific
value, say 0.5 s. Set the maximum random amplitude B to 1.
a. Observe how the noise attenuation through the filter depends (qualitatively) on Tf by
looking at the simulated responses. Is the filtering (the attenuation or smoothing)
stronger with large Tf or with small Tf?
b. Assume that you want to find Tf so that Ksigma is 0.2, i.e. the filter attenuates the noise
5 times (with respect to the standard deviations, as explained above). Find Tf
experimentally so that Ksigma = 0.2. What is the theoretical Ksigma (it is caclulated and
3 di 4 23/05/2019, 18:26
TechTeach: SimView http://techteach.no/simview/lowpass_filter/index.php
[SimView] [TechTeach]
4 di 4 23/05/2019, 18:26
TechTeach: SimView http://techteach.no/simview/filters/index.php
Filter Types
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: filters.zip (unzip, and open filters.exe)
lowpass filter
highpass filter
bandstop filter
bandpass filter
You can select among these filter types. You can adjust the corner frequencies and the order while
the simulator runs. The input signal is a sinusoid of which you can adjuste the amplitude and the
frequency, and the filter response (output) is plotted in the same diagram. In addition the amplitude
gain function of the frequency response is plotted. In other words, both time domain and frequency
domain properties are shown.
1 di 3 23/05/2019, 18:27
TechTeach: SimView http://techteach.no/simview/filters/index.php
Aims
The aims of the tasks below are demonstrate characteristics of various filters by showing both time
domain and frequency domain properties.
Motivation
Filters are used to attenuate (ideally: remove) certain frequency commponents of a signal. For
example, lowpass filters are used to attenuate high frequent noise in a measurement signal.
Tasks
The tasks below assumes that the simulator runs. Initially, you can use the default choices for filter
topology, which is Butterworth, and the default choice of filter order. The input signal amplitude
can be set to U = 1.
1. Lowpass filter: The filter bandwidth or corner frequency can be set to fb = 100Hz.
a. Explain from the amplitude gain function A(f) that the filter performs lowpass
filtering.
b. Change the signal freqency f continuously. Does the time response confirm the
lowpass characteristic of the filter (qualitatively)?
c. Set the signal freqency to a fixed value, e.g. f = 100Hz. What is the amplitude gain at
this frequency as seen in the Bode plot? Is this result confirmed by the time response?
d. Select a filter order larger than the default value. How does the filtering properties
depend on the filter order (observe both the amplitude function and the time response).
3. Bandstop filter: Set the lower corner frequency to 100Hz and the upper corner frequency to
400Hz.
a. Explain from the amplitude function A(f) that the filter performs bandstop filtering.
b. Change the signal freqency f continuously. Does the time response confirm the
bandpass characteristic of the filter (qualitatively)?
c. Select a filter order larger than the default value. How does the filtering properties
depend on the filter order (observe both the amplitude function and the time response).
4. Bandpass filter: Set the lower corner frequency to 100Hz and the upper frequency to 400Hz.
a. Explain from the amplitude gain function A(f) that the filter performs bandstop
filtering.
b. Change the signal freqency f continuously. Does the time response confirm the
bandpass characteristic of the filter (qualitatively)?
2 di 3 23/05/2019, 18:27
TechTeach: SimView http://techteach.no/simview/filters/index.php
c. Select a filter order larger than the default value. How does the filtering properties
depend on the filter order (observe both the amplitude function and the time response).
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:27
TechTeach: SimView http://techteach.no/simview/spectral_analysis/index.php
Spectral Analysis
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: spectral_analysis.zip (unzip, and open spectral_analysis.exe)
PSDx(f) = (|DFTx|/N)2
fk = df*k
1 di 3 23/05/2019, 18:27
TechTeach: SimView http://techteach.no/simview/spectral_analysis/index.php
where k is a frequency index: k = 0,..,N-1, where N is the number of samples of the time series
(signal) x. The frequency resolution or frequency increment df is
df = fs/N
fs = 1/Ts
PSD (and DFT) gives spectral information only for the frequency range from 0 up to the
Nyquist frequency fN defined as half the sampling frequency:
fN = fs/2
PSD also gives spectral information in the frequency range larger than fN, i.e. from fN to fs, but
this information is equal to the spectral information for the frequency range from 0 to fN - but
mirrored.
Since DFT, and hence the PSD, is calculated from a number of samples of the signal x random
noise in the signal is averaged, and hence the effect of such noise on the calculation of PSD is
averaged (out). This implies that the PSD is able to show the spectral contents of very noisy
signals.
In the simulator the signal x for which the PSD is calculated, is a sum of the following four
signals: Two sinusoids, x1 and x2, a uniformly distributed random signal r, and a bias (constant
signal) of value B:
x = x1 + x2 + r + B
What is the PSD of a sinusoid and of a constant signal (both are components of the signal x
used in the simulator)? It can be shown that a sinusoid of amplitude A and frequency f1 have
PSD of value
A2/4
at the frequency f1 (and the same value at the mirrored frequency fs - f1), and zero PSD at other
frequencies. This can be used to calculate the amplitude and the frequency of an assumed
sinusoid. Thus, a sinusoid appears as a spike at frequency f1 in a PSD plot).
It can also be shown that a constant signal of value B has PSD value B2 at frequency 0 and PSD
value 0 at other frequencies.
In the simulator PSD is calculated using the LabVIEW function Power Spectrum PtByPt
(Point-by-point).
Motivation
Spectral analysis is used to show the frequency - or spectral - contents of a signal. One
important appliaction is detection of vibrations of machine bearings.
2 di 3 23/05/2019, 18:27
TechTeach: SimView http://techteach.no/simview/spectral_analysis/index.php
Tasks
Run the simulator. Unless otherwise stated the random signal r can be suppressed (by setting
the maximum amplitude R equal to 0). Also the bias can be suppressed (with B = 0).
2. Detection of a bias (constant signal): Select a value of B different from zero, e.g. B =
0.5. Is the bias indicated by the PSD plot? Does the PSD plot give correct information
about the B value?
3. The impact of random noise: As Task 1, but add a significant (large) noise component,
r. For example, you can set R equal to the largest amplitude of the two sinusoids (you can
choose these amplitudes yourself). Is the PSD plot able to detect the two sinusoids? How
does the ability of the PSD for expressing the frequency components depend on the
number of samples, N?
4. Note: Aliasing! As you probably know, cf. the aliasing simulator a signal of frequency
fsignal larger than the Nyquist frequency is aliased to a frequency falias which is equal to
the difference between the signal frequency fsignal and the sampling frequency fs, i.e.
falias = fs - fsignal
If the PSD is calculated from the resulting (aliased) signal the PSD will of course indicate
the frequency of this signal, and not the frequency of the original signal.
Let the signal x1 have frequency 8Hz (you can suppress the signals x2 and r and also the
bias). Set the sampling frequency to 10Hz (i.e. the sampling interval is 0.1s). According
to the facts presented above (in this subtask), what is the falias? Is this result confirmed by
the PSD plot?
[SimView] [TechTeach]
3 di 3 23/05/2019, 18:27
TechTeach: SimView http://techteach.no/simview/correlation/index.php
Correlation
Snapshot of the front panel of the simulator:
What is needed to run the the simulator? Read to get most recent information!
Tips for using the simulator.
The simulator: correlation.exe . The simulator runs immediately after the download by
clicking Open in the download window. Alternatively, you can first save a copy of the exe-
file on any directory (folder) on your PC and then run the exe-file, which starts the simulator.
The user can also introduce a lag L [samples] between signals. The cross correlation of the signal
and the delayed signal is computed.
Aims
1 di 2 23/05/2019, 18:27
TechTeach: SimView http://techteach.no/simview/correlation/index.php
Motivation
The autocorrelation of a signal can be used to express the random character of a signal.
The cross correlation can be used to detect a time delay between two signals.
Tasks
Initially, choose
non-normalized correlation
zero lag between the signals (time series)
2. Auto correlation of a random signal: Let x(n) be a pure random signal with zero mean.
a. Does the form of the correlation function Rx(L) indicate that the signal is ransom (with
zero bias)?
b. Use a normalized correlation function Rx. Describe the difference between this Rx and
the non-normalized correlation?
c. Does Rx clearly express the dandomness of a signal if the number of samples of the
signal of which the correlation function is calculated, is small?
d. Select non-normalized correlation. Read off the energy of x from the correlation
function.
3. Correlation of lagged random signals: Let x(n) be a random signal with zero mean.
Introduce some lag in the signal. Use non-normalized correlation. The correlation is now
being calculated between x(n) and x(n-L).
a. In which way is the lag expressed by the correlation function? (You may try with
different lags.)
[SimView] [TechTeach]
2 di 2 23/05/2019, 18:27