An outline of all sections included in this SRS is recorded here for easy reference.
This section records information for easy reference.
The unit system used throughout is SI (Système International d'Unités). In addition to the basic units, several derived units are also used. For each unit, the Table of Units lists the symbol, a description, and the SI name.
Symbol | Description | SI Name |
---|---|---|
kg | mass | kilogram |
s | time | second |
The symbols used in this document are summarized in the Table of Symbols along with their units. The symbols are listed in alphabetical order.
Symbol | Description | Units |
---|---|---|
AbsTol | Absolute Tolerance | -- |
Cs | Control Variable in the frequency domain | -- |
c | Damping coefficient of the spring | -- |
ct | Control Variable in the time domain | -- |
Ds | Derivative control in the frequency domain | -- |
Es | Process Error in the frequency domain | -- |
et | Process Error in the time domain | -- |
Fs | Laplace Transform of a function | -- |
ft | Function in the time domain | -- |
Hs | Transfer Function in the frequency domain | -- |
Kd | Derivative Gain | -- |
Kp | Proportional Gain | -- |
k | Stiffness coefficient of the spring | s |
L⁻¹[F(s)] | Inverse Laplace Transform of a function | -- |
m | Mass | kg |
Ps | Proportional control in the frequency domain | -- |
Rs | Set-Point in the frequency domain | -- |
rt | Set-Point | -- |
RelTol | Relative Tolerance | -- |
s | Complex frequency-domain parameter | -- |
t | Time | s |
tsim | Simulation Time | s |
tstep | Step Time | s |
Ys | Process Variable in the frequency domain | -- |
yt | Process Variable | -- |
Abbreviation | Full Form |
---|---|
A | Assumption |
D | derivative |
DD | Data Definition |
GD | General Definition |
GS | Goal Statement |
I | integral |
IM | Instance Model |
P | proportional |
PD | proportional derivative |
PID | proportional integral derivative |
PS | Physical System Description |
R | Requirement |
RefBy | Referenced by |
Refname | Reference Name |
SRS | Software Requirements Specification |
TM | Theoretical Model |
Uncert. | Typical Uncertainty |
Automatic process control with a controller (P/PI/PD/PID) is used in a variety of applications such as thermostats, automobile cruise-control, etc. The gains of a controller in an application must be tuned before the controller is ready for production. Therefore a simulation of the PD Controller with a Second Order System is created in this project that can be used to tune the gain constants.
The following section provides an overview of the Software Requirements Specification (SRS) for PD Controller. This section explains the purpose of this document, the scope of the requirements, the characteristics of the intended reader, and the organization of the document.
The purpose of this document is to capture all the necessary information including assumptions, data definitions, constraints, models, and requirements to facilitate an unambiguous development of the PD Controller software and test procedures.
The scope of the requirements includes a PD Control Loop with three subsystems, namely: a PD Controller, a Summing Point, and a Power Plant. Only the Proportional and Derivative controllers are used in this software; the Integral controller is beyond the scope of this project. Additionally, this software is intended to aid with the manual tuning of the PD Controller.
Reviewers of this documentation should have an understanding of control systems (control theory and controllers) at the fourth-year undergraduate level and engineering mathematics at a second-year undergraduate level. The users of PD Controller can have a lower level of expertise, as explained in Sec:User Characteristics.
The organization of this document follows the template for an SRS for scientific computing software proposed by koothoor2013, smithLai2005, smithEtAl2007, and smithKoothoor2016. The presentation follows the standard pattern of presenting goals, theories, definitions, and assumptions. For readers that would like a more bottom up approach, they can start reading the data definitions and trace back to find any additional information they require.
The goal statements are refined to the theoretical models and the theoretical models to the instance models. The instance model referred as IM:pdEquationIM provides an Ordinary Differential Equation (ODE) that models the PD Controller.
This section provides general information about the system. It identifies the interfaces between the system and its environment, describes the user characteristics, and lists the system constraints.
Fig:systemContextDiag shows the system context. The circle represents an external entity outside the software, the user in this case. The rectangle represents the software system itself, PD Controller in this case. Arrows are used to show the data flow between the system and its environment.
PD Controller is self-contained. The only external interaction is with the user. The responsibilities of the user and the system are as follows:
The end-user of PD Controller is expected to have taken a course on Control Systems at an undergraduate level.
There are no system constraints.
This section first presents the problem description, which gives a high-level view of the problem to be solved. This is followed by the solution characteristics specification, which presents the assumptions, theories, and definitions that are used.
A system is needed to provide a model of a PD Controller that can be used for the tuning of the gain constants before the deployment of the controller.
This subsection provides a list of terms that are used in the subsequent sections and their meaning, with the purpose of reducing ambiguity and making it easier to correctly understand the requirements.
The physical system of PD Controller, as shown in Fig:pidSysDiagram, includes the following elements:
PS1: The Summing Point.
PS2: The PD Controller.
PS3: The Power Plant.
Given Set-Point, Simulation Time, Proportional Gain, Derivative Gain, and Step Time, the goal statement is:
The instance models that govern PD Controller are presented in the Instance Model Section. The information to understand the meaning of the instance models and their derivation is also presented, so that the instance models can be verified.
This section simplifies the original problem and helps in developing the theoretical models by filling in the missing information for the physical system. The assumptions refine the scope by providing more detail.
This section focuses on the general equations and laws that PD Controller is based on.
Refname | TM:laplaceTransform |
---|---|
Label | Laplace Transform |
Equation | \[{F_{\text{s}}}=\int_{\mathit{-∞}}^{∞}{{f_{\text{t}}} e^{-s t}}\,dt\] |
Description | |
Notes |
Bilateral Laplace Transform. The Laplace transforms are typically inferred from a pre-computed table of Laplace Transforms (laplaceWiki). |
Source | |
RefBy |
GD:gdPowerPlant, DD:ddPropCtrl, DD:ddProcessError, and DD:ddDerivCtrl |
Refname | TM:invLaplaceTransform |
---|---|
Label | Inverse Laplace Transform |
Equation | \[{f_{\text{t}}}=\mathit{L⁻¹[F(s)]}\] |
Description | |
Notes |
Inverse Laplace Transform of F(S). The Inverse Laplace transforms are typically inferred from a pre-computed table of Laplace Transforms (laplaceWiki). |
Source | |
RefBy |
Refname | TM:tmSOSystem |
---|---|
Label |
Second Order Mass-Spring-Damper System |
Equation | \[\frac{1}{m s^{2}+c s+k}\] |
Description | |
Notes |
The Transfer Function (from A:Transfer Function) of a Second Order System (mass-spring-damper) is characterized by this equation. |
Source | |
RefBy |
This section collects the laws and equations that will be used to build the instance models.
Refname | GD:gdPowerPlant |
---|---|
Label |
The Transfer Function of the Power Plant |
Equation | \[\frac{1}{s^{2}+s+20}\] |
Description | |
Notes |
The Transfer Function of the Second Order System (from TM:tmSOSystem) is reduced to this equation by substituting the mass (m) to 1 Kg (from A:Spring Mass), the Damping Coefficient (c) to 1 (from A:Spring Damping Coefficient), and the Stiffness Coefficient (k) to 20 (from A:Spring Stiffness Coefficient). The equation is converted to the frequency domain by applying the Laplace transform (from TM:laplaceTransform). Additionally, there are no external disturbances to the power plant (from A:External disturbance). |
Source |
pidWiki and abbasi2015 |
RefBy |
This section collects and defines all the data needed to build the instance models.
Refname | DD:ddProcessError |
---|---|
Label |
Process Error in the frequency domain |
Symbol | Es |
Units | Unitless |
Equation | \[{E_{\text{s}}}={R_{\text{s}}}-{Y_{\text{s}}}\] |
Description | |
Notes |
The Process Error is the difference between the Set-Point and Process Variable. The equation is converted to the frequency domain by applying the Laplace transform (from TM:laplaceTransform). The Set-Point is assumed to be constant throughout the simulation (from A:Set-Point). The initial value of the Process Variable is assumed to be zero (from A:Initial Value). |
Source | |
RefBy |
Refname | DD:ddPropCtrl |
---|---|
Label |
Proportional control in the frequency domain |
Symbol | Ps |
Units | Unitless |
Equation | \[{P_{\text{s}}}={K_{\text{p}}} {E_{\text{s}}}\] |
Description | |
Notes |
The Proportional Controller is the product of the Proportional Gain and the Process Error (from DD:ddProcessError). The equation is converted to the frequency domain by applying the Laplace transform (from TM:laplaceTransform). |
Source | |
RefBy |
Refname | DD:ddDerivCtrl |
---|---|
Label |
Derivative control in the frequency domain |
Symbol | Ds |
Units | Unitless |
Equation | \[{D_{\text{s}}}={K_{\text{d}}} {E_{\text{s}}} s\] |
Description | |
Notes |
The Derivative Controller is the product of the Derivative Gain and the differential of the Process Error (from DD:ddProcessError). The equation is converted to the frequency domain by applying the Laplace transform (from TM:laplaceTransform). A pure form of the Derivative controller is used in this application (from A:Unfiltered Derivative). |
Source | |
RefBy |
Refname | DD:ddCtrlVar |
---|---|
Label |
Control Variable in the frequency domain |
Symbol | Cs |
Units | Unitless |
Equation | \[{C_{\text{s}}}={E_{\text{s}}} \left({K_{\text{p}}}+{K_{\text{d}}} s\right)\] |
Description | |
Notes |
The Control Variable is the output of the controller. In this case, it is the sum of the Proportional (from DD:ddPropCtrl) and Derivative (from DD:ddDerivCtrl) controllers. The parallel (from A:Parallel Equation) and de-coupled (from A:Decoupled equation) form of the PD equation is used in this document. |
Source | |
RefBy |
This section transforms the problem defined in the problem description into one which is expressed in mathematical terms. It uses concrete symbols defined in the data definitions to replace the abstract symbols in the models identified in theoretical models and general definitions.
Refname | IM:pdEquationIM |
---|---|
Label |
Computation of the Process Variable as a function of time |
Input |
rt, Kp, Kd |
Output | yt |
Input Constraints | \[{r_{\text{t}}}\gt{}0\] \[{K_{\text{p}}}\gt{}0\] \[{K_{\text{d}}}\gt{}0\] |
Output Constraints | \[{y_{\text{t}}}\gt{}0\] |
Equation | \[\frac{\,d^{2}{y_{\text{t}}}}{\,dt^{2}}+\left(1+{K_{\text{d}}}\right) \frac{\,d{y_{\text{t}}}}{\,dt}+\left(20+{K_{\text{p}}}\right) {{y_{\text{t}}}}={r_{\text{t}}} {K_{\text{p}}}\] |
Description | |
Source | |
RefBy |
The Process Variable Ys in a PD Control Loop is the product of the Process Error (from DD:ddProcessError), Control Variable (from DD:ddCtrlVar), and the Power Plant (from GD:gdPowerPlant).
\[{Y_{\text{s}}}=\left({R_{\text{s}}}-{Y_{\text{s}}}\right) \left({K_{\text{p}}}+{K_{\text{d}}} s\right) \frac{1}{s^{2}+s+20}\]Substituting the values and rearranging the equation.
\[s^{2} {Y_{\text{s}}}+\left(1+{K_{\text{d}}}\right) {Y_{\text{s}}} s+\left(20+{K_{\text{p}}}\right) {Y_{\text{s}}}-{R_{\text{s}}} s {K_{\text{d}}}-{R_{\text{s}}} {K_{\text{p}}}=0\]Computing the Inverse Laplace Transform of a function (from TM:invLaplaceTransform) of the equation.
\[\frac{\,d\frac{\,d{y_{\text{t}}}}{\,dt}}{\,dt}+\left(1+{K_{\text{d}}}\right) \frac{\,d{y_{\text{t}}}}{\,dt}+\left(20+{K_{\text{p}}}\right) {y_{\text{t}}}-{K_{\text{d}}} \frac{\,d{r_{\text{t}}}}{\,dt}-{r_{\text{t}}} {K_{\text{p}}}=0\]The Set-Point rt is a step function and a constant (from A:Set-Point). Therefore the differential of the set point is zero. Hence the equation reduces to
\[\frac{\,d\frac{\,d{y_{\text{t}}}}{\,dt}}{\,dt}+\left(1+{K_{\text{d}}}\right) \frac{\,d{y_{\text{t}}}}{\,dt}+\left(20+{K_{\text{p}}}\right) {y_{\text{t}}}-{r_{\text{t}}} {K_{\text{p}}}=0\]The Data Constraints Table shows the data constraints on the input variables. The column for physical constraints gives the physical limitations on the range of values that can be taken by the variable. The uncertainty column provides an estimate of the confidence with which the physical quantities can be measured. This information would be part of the input if one were performing an uncertainty quantification exercise. The constraints are conservative to give the user of the model the flexibility to experiment with unusual situations. The column of typical values is intended to provide a feel for a common scenario.
Var | Physical Constraints | Typical Value | Uncert. |
---|---|---|---|
Kd | Kd ≥ 0 | 1 | 10% |
Kp | Kp > 0 | 20 | 10% |
rt | rt > 0 | 1 | 10% |
tsim | 1 ≤ tsim ≤ 60 | 10 s | 10% |
tstep | \(\frac{1}{1000}\) ≤ tstep < tsim | 0.001 s | 10% |
This section provides the functional requirements, the tasks and behaviours that the software is expected to complete, and the non-functional requirements, the qualities that the software is expected to exhibit.
This section provides the functional requirements, the tasks and behaviours that the software is expected to complete.
Symbol | Description | Units |
---|---|---|
Kd | Derivative Gain | -- |
Kp | Proportional Gain | -- |
rt | Set-Point | -- |
tsim | Simulation Time | s |
tstep | Step Time | s |
This section provides the non-functional requirements, the qualities that the software is expected to exhibit.
This section lists the likely changes to be made to the software.
The purpose of the traceability matrices is to provide easy references on what has to be additionally modified if a certain component is changed. Every time a component is changed, the items in the column of that component that are marked with an "X" should be modified as well. Tab:TraceMatAvsA shows the dependencies of the assumptions on each other. Tab:TraceMatAvsAll shows the dependencies of the data definitions, theoretical models, general definitions, instance models, requirements, likely changes, and unlikely changes on the assumptions. Tab:TraceMatRefvsRef shows the dependencies of the data definitions, theoretical models, general definitions, and instance models on each other. Tab:TraceMatAllvsR shows the dependencies of the requirements and goal statements on the data definitions, theoretical models, general definitions, and instance models.
The purpose of the traceability graphs is also to provide easy references on what has to be additionally modified if a certain component is changed. The arrows in the graphs represent dependencies. The component at the tail of an arrow is depended on by the component at the head of that arrow. Therefore, if a component is changed, the components that it points to should also be changed. Fig:TraceGraphAvsA shows the dependencies of assumptions on each other. Fig:TraceGraphAvsAll shows the dependencies of data definitions, theoretical models, general definitions, instance models, requirements, likely changes, and unlikely changes on the assumptions. Fig:TraceGraphRefvsRef shows the dependencies of data definitions, theoretical models, general definitions, and instance models on each other. Fig:TraceGraphAllvsR shows the dependencies of requirements and goal statements on the data definitions, theoretical models, general definitions, and instance models. Fig:TraceGraphAllvsAll shows the dependencies of dependencies of assumptions, models, definitions, requirements, goals, and changes with each other.
For convenience, the following graphs can be found at the links below: