control system
The Electromechanical Servomechanism Virtual Laboratory is designed to emulate a DC motor within a feedback control system. An example of the physical device being controlled is shown in figure 1.
1
)
(
+
+
+
=
s
s
K
s
K
K
s
G
D
i
p
c
g
Figure 1 : The servomechanism. 2
Figure 2 : Screenshot showing Virtual Laboratory Servomechanism layout.2
To set system parameters :
A screenshot for the servomechanism virtual laboratory program is shown as Figure 2. In the top section of the window, a representation of the control system is shown. Animation is used to show a simplified representation of the physical operation of the system. Coloured boxes indicate the blocks which have user definable parameters. For the servomechanism, these include :
Definable constant gains (e.g. Gp and Gt for the servomechanism laboratory).
The PID block represents a PID controller. Here, there are three main parameters, the proportional gain Kp, integral gain Ki, and derivative gain KD. Gamma gives the time constant of the filter in the derivative term. The controller is then represented by the transfer function :
The Signal Generator allows definition of the type of signal applied to the feedback system. For these experiments, the most commonly used (to generate step input) will be of type
constant
or
square wave
.
The Ideal Second Order System block provides a means of comparison of the system’s output to a user defined second order system. The second order system is defined by the parameters
Omega
((n) and
Damping
((). [This block is not available in all laboratories.]
Also connected to the block representation of the servomechanism are diamond shaped observation points. These are points at which the signal can be observed on the DSO (Digital Storage Oscilloscope) in the lower section of the program window. The number shown within the diamond gives the channel number used for that point. Up to six channels are available, and can be changed by double clicking on the diamond and selecting the required channel number (or
none
, to turn display off).
Using the DSO (Digital Storage Oscilloscope) :
While the simulation in the top section of the screen indicates the effect of inputs and parameters on the system attribute of interest, a graphical representation over time is required for analysis of control system performance. The lower section of the program window provides a DSO with functionality similar to that of a CRO (cathode ray oscilloscope).
As shown in figure 3, this section of the screen is divided into three main parts :
1. DSO control panel – top right part of DSO. Here, channel settings and DSO operation can be changed.
2. DSO data box – bottom right part of DSO. Data provided in this box includes sampled signal values on each channel, current voltage scaling, time delay, and time and voltage cursor information.
3.
DSO trace display – left side of the DSO. Here, the signal’s on each displayed channel are traced in a similar manner to that of a CRO. Markers on the side of display indicate the 0V mark for each channel.
Figure 3 : Screenshot of Digital Signal Oscilloscope.
Using the DSO control panel :
Display Buttons
The buttons in the upper-right part of the DSO control panel enable control over general DSO operation.
- to start collecting signal data and tracing signals on each channel.
- to stop collecting signal data and hold the current signal image on the screen.
- to clear display screen, and clear signal data buffer.
- to change display options such as line type, thickness and screen grid type.
- to print current screen view.
- to export data (currently in DSO’s memory) to clipboard or file. Data can also be exported to Matlab matrix. Within Matlab, Ctrl-V is used to then retrieve the matrix of data.
Time Base
The time base of all channels can also be horizontally scaled. The delay arrows can be used to shift the signals horizontally. The current delay is displayed numerically in the data box. Note that a non-zero delay will also effect the refreshing of the signal display, and therefore should be reset to zero before starting another run on the DSO.
Channel Settings
For each channel, output can be vertically scaled. If the signal goes off screen, the Position arrows can be used to shift the signal up and down. Arrows on the side of the trace window indicates where zero volts is for each channel. Dragging these directly will also shift the signal up/down. Vertical scaling of any channel can be done both while DSO is in Run or Stop mode.
Additionally, there are options as to how the signal of each channel is connected to the DSO. Options are:
DC coupled (for direct connection),
AC coupled (for high pass filtering of signal to remove DC component),
GND (connects this DSO channel to ground (0V)),
OFF (to stop display of this signal).
DC coupling is the most commonly used in these laboratory experiments.
Time & Voltage Cursors :
Checking the time cursors box displays two red lines on the screen. These can be moved by dragging them sideways. In the data box, the time value at each line is given as Ta and Tb. The time difference between the two instances is also given as (T.
Checking the voltage cursors also displays two red lines on the screen. These horizontal lines can be moved by dragging them up/down. In the case of voltage cursors, the channel to which they apply must be selected, since channel settings may have different voltage scaling for different channels. Voltages at each line are displayed in the data box as Va and Vb, with the difference between them given as (V.
Trigger :
The trigger options determine the conditions to be met by a signal before the signal is traced on the DSO.
Trigger source – Selects the channel which determines if the triggering condition is met.
Trigger mode – Describes the event which will trigger DSO tracing to occur.
Normal mode – When trigger condition met, a sweep of MSO occurs until screen is full, then waits for the condition to be met again.
Auto mode – MSO waits a set amount of time for trigger, otherwise starts sweep on its own. One-shot mode – When trigger condition met, data is collected until the buffer is full, then stops. The user can then examine this captured data.
Generally, the automatic mode is used here.
Trigger level & slope – Defines the trigger condition. Either rising or falling edge can be selected. Checking the show level box allows defining of the point through which the level must pass to meet the trigger condition, with rising / falling edge defining the direction it must be going.
� EMBED MSPhotoEd.3 ���
� EMBED MSPhotoEd.3 ���
� EMBED MSPhotoEd.3 ���
DSO data box
DSO control panel
DSO trace display
� EMBED MSPhotoEd.3 ���
� EMBED MSPhotoEd.3 ���
� EMBED MSPhotoEd.3 ���
� EMBED MSPhotoEd.3 ���
� EMBED MSPhotoEd.3 ���
1. Designed for use with “Virtual Laboratories for Control System Design : Electromechanical Servo-mechanism”, CDSC, 2007.
2 “Virtual Laboratories for Control System Design Laboratory Book : Laboratory 1 Electromechanical Servomechanism”
G.C. Goodwin, University of Newcastle Research Associates (TUNRA), 2007, p xi-xiv.
� EMBED MSPhotoEd.3 ���
Appendix 1
Using the Electromechanical Servomechanism Virtual Laboratory 1,2
1. Designed for use with “Virtual Laboratories for Control System Design : Electromechanical Servo-mechanism”, CDSC, 2007.
2. “Virtual Laboratories for Control System Design Laboratory Book : Laboratory 1 Electromechanical Servomechanism”
G.C. Goodwin, University of Newcastle Research Associates (TUNRA), 2007, p xi-xiv.
� EMBED MSPhotoEd.3 ���
� EMBED MSPhotoEd.3 ���
Appendix 1
Using the Electromechanical Servomechanism Virtual Laboratory 1,2
1. Designed for use with “Virtual Laboratories for Control System Design : Electromechanical Servo-mechanism”, CDSC, 2007.
2 “Virtual Laboratories for Control System Design Laboratory Book : Laboratory 1 Electromechanical Servomechanism”
G.C. Goodwin, University of Newcastle Research Associates (TUNRA), 2007, p xi-xiv.
� EMBED MSPhotoEd.3 ���
� EMBED MSPhotoEd.3 ���
Appendix 1
Using the Electromechanical Servomechanism Virtual Laboratory 1,2
� EMBED MSPhotoEd.3 ���
� EMBED MSPhotoEd.3 ���
� EMBED MSPhotoEd.3 ���
� EMBED MSPhotoEd.3 ���
� EMBED MSPhotoEd.3 ���
1. Designed for use with “Virtual Laboratories for Control System Design : Electromechanical Servo-mechanism”, CDSC, 2007.
2 Extract from : “Virtual Laboratories for Control System Design Laboratory Book : Laboratory 1 Electromechanical Servomechanism”
G.C. Goodwin, University of Newcastle Research Associates (TUNRA), 2007, p4-5.
� EMBED MSPhotoEd.3 ���