Tuesday, February 9, 2016

CT 1 Assignment

Q1. Write a short note on Self Regulating processes.

I found this wonderful source.
When dealing with a process, its dynamic characteristics are usually of interest to us control engineers.
If the system gives a unbounded output for a step input, then this means the system is integrating. Thus when the manipulated variable is stepped up, the process variable continues to rise without reaching any steady state.

Otherwise the system (i.e. the process) is called a self regulatory process. This is because even without any additional controller in place the process still reaches a steady state.

Q2. How do you design a Dead Time Compensator?

Dead time is the delay from when a controller output signal is issued until when the measured process variable first begins to respond.

The controller must wait until the dead time has passed before it gets any feedback from the process.

And usually this delay is more than twice the time constant (for many chemical processes)

Okay so how do you FIX this problem?

P controller

When we deal with controlling a plant in closed loop (with feedback from plant output), we can try with a P-Only controller.

Will insert a UML diagram here once I get around to trying that ikkk out

So we have a single parameter of interest - which defines how aggressively the controller manipulates the MV (Whatever you use to change the state of the system). The input to this controller would be the error ( difference between Setpoint - desired output and Plant output), which would be amplified by the factor.

Note that this method has a great shortcoming - called offset. This can be understood by the fact that as the plant output reaches the setpoint the controller proportionally stops trying to influence the system. Thus the system never actually gets to reach the setpoint at steady state!

PI Controller

To eliminate this weakness of the P only controller we add a new term to the controller. A term that sums up all the errors up (integrate) until then (scaled with a constant) and uses this to decide how much the MV should be influenced.

Controller Output =

Here is a constant, used to ensure that CO (Controller output) never has to suddenly change (Bumpless Transfer).

Now the Proportional controller’s term does the same thing as it did in the P only controller. Here the integral saves us from offset because as the Plant output approaches the setpoint, the plant output will oscillate about the setpoint value. Note that negative errors will also accumulate along with positive errors, Thus as time goes the area under each successive oscillation will be less and less. This is why using a PI controller we are assured of reaching our Setpoint during steady state.

Ok now that we understand PI controller to a good degree let’s get back to the problem at hand.

I used this mathworks page and this page to get a idea. But on whole - We prefer to use PI controllers in the industry because

  • When we use Model predictive control techniques like Smith predictor over PI controller, we sacrifice Robustness. What this means is that this control system we design will lack the ability to adapt well to uncertain changes.
  • The performance of the PI controller is severely limited by the long dead time. This is because the PI controller has no knowledge of the dead time and reacts too “impatiently” when the actual output y does not match the desired setpoint ysp.

Smith Predictor

Written with StackEdit.

Wednesday, February 3, 2016

System Analysis

Objective

Systems analysis is a problem solving technique that decomposes a system into its component pieces for the purpose of the studying how well those component parts work and interact to accomplish their purpose.
So in order to do so we need to first represent the system is a way that makes this analysis easier. Here I will try to do the following,

  • Understand the relationship between the two representations - Transfer function and the State Space.
  • Discuss the tools in MATLAB to convert between these representations.
  • To work with both SISO as well as MIMO systems and discuss its stability criteria.
  • We use Bode plot, Polar plot and Root locus for achieving the same.
  • Getting familiar with MATLAB’s sisotool which makes the compensator design process much easier.

Transfer Function

This is a representation of the relation between the input and output of a linear time-invariant system (LTI) with zero initial conditions and zero-point equilibrium (This representation is in terms of spatial or temporal frequency - ).

Thus, for continuous-time input signal and output , the transfer function is the linear mapping of the Laplace transform of the input, , to the Laplace transform of the output .

You may wonder why a LTI system, this is because LTI systems have this really useful property - the eigenfunctions of all LTI are complex exponentials.

What this means is that if we give a input for some complex amplitude and complex frequency , the output will be some complex constant times the input, say for some new complex amplitude . Then this ratio is the transfer function at frequency s.

What we can interpret from this is that if the input to the system is a sinusoid (sum of complex exponentials with complex-conjugate frequencies), then the output of the system will also be a sinusoid, perhaps with a different amplitude and a different phase, but always with the same frequency upon reaching steady-state.

LTI systems cannot produce frequency components that are not in the input.

LTI system theory is good at describing many important systems. Most LTI systems are considered “easy” to analyze, at least compared to the time-varying and/or nonlinear case. Any system that can be modeled as a linear homogeneous differential equation with constant coefficients is an LTI system.

So we can use this to transform the governing differential equation into an algebraic equation which is often easier to analyze.

Further, for a LTI system its impulse response can be used to fully describe the system’s output to any input. The transfer function is the Laplace transform of the impulse response.

We can continue discussing the Transfer function but for now lets see what limitations it faces when it comes to having to analyze MIMO systems.

State-space representation

In reality when we need to control a realistic system it usually has many sensors and actuators. Now since all of them are related with a single system their performances are coupled.

What this means is that since for number of actuators and number of sensors, one will have number of transfer functions and one has to design as many controllers for the system!

With the advent of computers and computer based digital control, one can design control systems for the MIMO systems directly in the time domain.

This is achieved by replaces an th order differential equation with first order differential equations - which are represented as a matrix .

Also unlike the frequency domain approach, the use of the state-space representation is not limited to systems with linear components and zero initial conditions.

The most general state-space representation of a linear system with inputs, outputs and state variables is written in the following form


where:
is called the “state vector”,
is called the “output vector”,
is called the “input (or control) vector”,
is the “state (or system) matrix”,
is the “input matrix”,
is the “output matrix”,
is the “feedthrough (or feedforward) matrix”

Note that in cases where the system model does not have a direct feedthrough, is the zero matrix.

Answers to questions

Question 1

Given the zeros and poles of a transfer function, construct the equivalent state space representation.

TF to SS

As you see, we used zpk command which constructed the TF (Transfer Function) Object - from the zeros and poles.

Then we used ssdata to extract the State Space model from .

Question 2

Given a State Space representation of a system, find its transfer function.

Given State Space Model

We can use tf command to get the transfer function.

Equivalent TF representation

Question 3

Given a system in its state space representation, find its Transmission Zeros.

Transmission Zeros of SS

So with the tzero command we got both the transmission zeros.

Question 4

Given a matrix of transfer functions (MIMO system), find its state space equivalent representation.

TF of MIMO system

So, we use the same command as before and MATLAB does all the work.

StateSpace
remaining image

Question 5

Question 4

We can construct the various Matrices which uniquely define the State Space representation of this system.

Ans_1_1

The equivalent Transfer function using ss2tf (State-space to transfer function conversion).

ans_1_2

The poles and zeros are as follows,

Poles and Zeros

Question 6

Q6

The closed loop plant transfer function will be,

Closed Loop

Now its State Space representation will be,

SS_1
SS_2
SS_3
SS_4
enter image description here

Written with StackEdit.