EXPERIMENT 1_merged (2)
EXPERIMENT 1_merged (2)
- 1
Aim: Introduction to MATLAB computing control Software.
Theory:
Control System Toolbox provides algorithms and apps for systematically analyzing, designing,
and tuning linear control systems. You can specify your system as a transfer function, state-
space, zero-pole-gain, or frequency-response model. Apps and functions, such as step response
plot and Bode plot, let you analyze and visualize system behavior in the time and frequency
domains. You can tune compensator parameters using interactive techniques such as Bode loop
shaping and the root locus method. The toolbox automatically tunes both SISO and MIMO
compensators, including PID controllers. Compensators can include multiple tunable blocks
spanning several feedback loops. You can tune gain-scheduled controllers and specify multiple
tuning objectives, such as reference tracking, disturbance rejection, and stability margins. You
can validate your design by verifying rise time, overshoot, settling time, gain and phase margins,
and other requirements.
>>help control
General.
Data extraction.
Conversions.
Frequency-domain analysis.
Model simplification.
LQR/LQG design.
Time delays.
' - Pertransposition.
.* - Element-by-element multiplication.
Transfer Function can be representing MATLAB as LTI(Linear Time Invariant) objects using
G(s) = s2(s+3s1)+1
+
It can be represented in MATLAB as:-
>> pole(G)
ans = -
2.6180
-0.3820
>> zpk(G)
Zero/pole/gain:
(s+1)
-------------------
(s+2.618) (s+0.382)
Example :- The function conv has been used to multiply polynomials in the MATLAB
session for the file transfer function :
GH(s)=
>> den=conv(d1,conv(d2,d3);
>> GH=tf(num,den)
Transfer function:
7500 s^2 + 2000 s + 100
-----------------------
30 s^3 + 13 s^2 + s
>> zero(GH)
ans =
-0.2000
-0.0667
>> pole(GH) ans
=
0
-0.3333
-0.1000
>> zpk(GH)
Zero/pole/gain:
-----------------------
s (s+0.3333) (s+0.1)
Example :-2
Transfer Function Can also be directly in polynomial form as we enter them in the
notebook using LTI object. Observe the following MATLAB session.
G1=150*(s^2+2*s+7)/(s*(s^2+5*s+4)
It can be represented in MATLAB as:-
>> den=conv(d1,d2);
>> G1=tf(num,den)
Transfer function:
-1
>> zpk(G1)
Zero/pole/gain:
150 (s^2 + 2s + 7)
------------------
s (s+4) (s+1)
EXPERIMENT NO.- 4
OBJECT: Analysis of the Response of RLC circuit
Problem:
The following figure shows the parallel form of a band pass RLC circuit.
s
G (s ) = RC
s 2
+ s + 1
RC LC
The Bode plot is a convenient tool for investigating the bandpass characteristics of the RLC
network. Use tf to specify the circuit's transfer function for the values
Input:
<<%|R=L=C=1|:
<<R = 1; L = 1; C = 1;
<<G = tf([1/(R*C) 0],[1 1/(R*C) 1/(L*C)])
>> bode(G), grid
Output:
Continuous-time transfer function
s
-----------
s^2 + s + 1
Input:
<<R1 = 5; G1 = tf([1/(R1*C) 0],[1 1/(R1*C) 1/(L*C)]);
<<R2 = 20; G2 = tf([1/(R2*C) 0],[1 1/(R2*C) 1/(L*C)]);
<<bode(G,'b',G1,'r',G2,'g'), grid
<<legend('R = 1','R = 5','R = 20')
Output:
The resistor value R=20 gives a filter narrowly tuned around the target frequency of 1 rad/s.
We can confirm the attenuation properties of the circuit G2 (R=20) by simulating how this filter
transforms sine waves with frequency 0.9, 1, and 1.1 rad/s:
Input:
<<t = 0:0.05:250;
<<opt = timeoptions;
<<opt.Title.FontWeight = 'Bold';
<<subplot(311), lsim(G2,sin(t),t,opt), title('w = 1')
<<subplot(312), lsim(G2,sin(0.9*t),t,opt), title('w = 0.9')
<<subplot(313), lsim(G2,sin(1.1*t),t,opt), title('w = 1.1')
Output:
The waves at 0.9 and 1.1 rad/s are considerably attenuated. The wave at 1 rad/s comes out
unchanged once the transients have died off. The long transient results from the poorly damped
poles of the filters, which unfortunately are required for a narrow passing band:
Output:
Interactive GUI
To analyze other standard circuit configurations such as low-pass and high-pass RLC networks,
click on the link below to launch an interactive GUI. In this GUI, you can change the R,L,C
parameters and see the effect on the time and frequency responses in real time.
Input:
<<rlc_gui
Output:
Fig:4.5
EXPERIMENT NO.- 5
OBJECT: Assessing gain and phase margins to examine the effect of stability margins on
closed-loop response characteristics of a control system.
Problem:
Output:
-0.2305 + 1.3062i
-0.2305 - 1.3062i
-0.7389 + 0.0000i
Root Locus
15
10
5
Imaginary Axis
-5
-10
-15
-3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1
Real Axis
Bode Diagram
20
0
Magnitude (dB)
-20
-40
-60
-80
-100
-90
Phase (deg)
-135
-180
-225
-1 0 1 2
10 10 10 10
Frequency (rad/sec)
1.2
0.8
Amplitude
0.6
0.4
0.2
0
0 5 10 15 20 25
Time (sec)
GmdB =
2.7471
Pm =
8.6328
Closed-loop response for k=2
1.6
1.4
1.2
1
Amplitude
0.8
0.6
0.4
0.2
0
0 10 20 30 40 50 60 70 80
Time (sec)
Fig: 3.6 SISO feed back loop with Multiple Phase Crossovers
Input:
>>G = tf(20,[1 7]) * tf([1 3.2 7.2],[1 -1.2 0.8]) * tf([1 -8 400],[1 33 700]);
T = feedback(G,1);
step(T), title('Closed-loop response for k=1')
>>bode(G), grid
>>k1 = 2; T1 = feedback(G*k1,1);
k2 = 1/2; T2 = feedback(G*k2,1);
step(T,'b',T1,'r',T2,'g',12),
legend('k = 1','k = 2','k = 0.5')
>>m = allmargin(G)
GainMargins_dB = mag2db(m.GainMargin)
margin_gui
Output:
1.2
0.8
Amplitude
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7
Time (sec)
Magnitude (dB) 20
-20
-40
270
180
Phase (deg)
90
-90
-2 -1 0 1 2 3
10 10 10 10 10 10
Frequency (rad/sec)
Step Response
1.5
k=1
k=2
k = 0.5
1
Amplitude
0.5
0
0 2 4 6 8 10 12
Time (sec)
Designing and implementing a closed-loop control system for a DC motor involves several key steps,
including modeling the motor, designing the control algorithm, and implementing the system in
MATLAB/Simulink. Here's a step-by-step guide to help you through the process:
1. Motor Equations:
The DC motor can be modeled using the following differential equations:
o Electrical equation: V(t)=Ldi(t)dt+Ri(t)+Keω(t)
o Mechanical equation: Jdω(t)dt+Bω(t)=Kmi(t)
o Where:
o V(t) is the input voltage.
o i(t) is the armature current.
o ω(t) is the angular velocity.
o L is the armature inductance.
o R is the armature resistance.
o Ke is the back EMF constant.
o Km is the torque constant.
o J is the moment of inertia.
o B is the friction coefficient.
2. Transfer Function:
Convert the motor equations into a transfer function or state-space representation. For
example:
3.Simulink Model:
Implement the transfer function in Simulink using blocks like Transfer Function, Gain,
Sum, etc.
Control Objective:
Define the control objective, such as speed or position control.
Controller Type:
Choose a suitable controller type, such as Proportional-Integral-Derivative (PID), based on the
system requirements.
PID Tuning:
Use methods like Ziegler-Nichols, trial and error, or MATLAB’s PID Tuner to tune the
PID controller.
Ensure that the controller meets the desired transient and steady-state performance
criteria (e.g., settling time, overshoot, steady-state error).
Simulink Implementation:
Implement the PID controller in Simulink using the PID Controller block.
1. Choose Hardware:
Select a suitable hardware platform like Arduino, Raspberry Pi, or a DSP board with
PWM output and ADC input capabilities for real-time implementation.
2. Motor Driver:
Use an H-bridge motor driver compatible with the chosen hardware platform to control
the motor.
3.Real-Time Control:
Use MATLAB’s Simulink Coder to generate code from the Simulink model and deploy
it to the hardware platform.
Implement sensor feedback (e.g., encoder for position feedback) to close the loop in real-
time.
1. Performance Verification:
Compare the simulation results with the real-time hardware implementation. Ensure that
the hardware system behaves as expected.
2. Refinement:
Fine-tune the controller parameters on the hardware to account for non-idealities such as
sensor noise, motor friction, etc.
R = 1; % Resistance
L = 0.5; % Inductance
% Transfer function
s = tf('s');
% PID Tuning
C = pidtune(P_motor, 'PID');
T = feedback(C*P_motor, 1);
step(T);
This approach will help you design, simulate, and implement a closed-loop control system for a DC
motor using MATLAB/Simulink and suitable hardware platforms.
Here all the required time domain specifications are described in this image. The transient response is
called as the response to the settling time and the response after the settling time is known as steady state
response.
A) Delay Time: Delay time is known as the time requirement for the response to reach half of its final
value from the zero instant, represented by:
Now see the step response of the second order system for t ≥ 0, when ‘δ’ lies between zero and one.
Here the final value of the step response is one.
Therefore, at t=td, the value of the step response will be 0.5. Substitute,
If you use the linear approximation, you will get the delay time td as,
B) Rise time: Rise time is the time required for the response to rise from 0% to 100% of its final
value. Usually this is applicable for the under-damped systems. You can consider the duration from
10% to 90% of the final value for the over-damped systems. Rise time is denoted by tr.
At t =t1= 0, c(t) = 0.
A) Peak time: Peak time is the time required for the response to reach the peak value for the first
time. It is represented by tp. At t=tp, the first derivate of the response is zero.
B) We have an idea that the step response of second order system for under-damped case is,
Differentiate c(t)with respect to ‘t’.
We can finalize the peak time tp and from the above equation that the damped frequency ωd are inversely
proportional to each other.
C) Peak Overshoot: Peak overshoot Mp is also called as the deviation of the response at peak time
from the final value of response. This is also *called as the maximum overshoot.
We can write it mathematically as
Where,
Both the settling time and the time constant are independent of the system gain. That means even the
system gain changes, the settling time and time constant will never change.
Problem:
In this lab, the time responses of control systems will be studied using MATLAB. The time response of a
control system is usually divided into two parts: the transient response and the steady-state response. We
will study these responses for the second order systems. For simplicity, the "step input" will be used, though
other inputs can also be applied.
(2) Underdamped
4
G(s) = ------------ (2)
s^2 + s +4
The step response of system (2) is
(3) Undamped
4
G(s) = ------------ (3)
s^2 + 4
The step response of system (3) is
The system's response diverges and blows up finally, which means the system is "unstable." An unstable
system is not desirable. What we want is that the system could behave smoothly and have its output follow
(track) our desired (reference) input. For this purpose, we use "feedback control". Let us feed the output of the
system G(s) back to the input position and compare it with our desired (reference) input to construct the
following closed-loop system
__ _______ ______
+ / \ | | | | output
ref input -->( )------>| K |----->| G(s) |---------> (6)
r(t)\__/ e(t) | | x(t) | | |y(t)
----- ------ |
- /|\ |
| |
|__________________________________|
The closed-loop transfer function of system (6) is calculated as
4 K
Gc(s) = ------------------ (7)
s^2 + s + 4 (K-1)
From which we can plot the step response as follows:
• If K>1, the closed-loop system (7) is Asymptotically Stable.
• If K<1, the closed-loop system (7) is Unstable.
• If K=1, the closed-loop system (7) is Marginally Stable (Stable but not Asymptotically Stable).
Justify why it happens.
Case 2: Let K be 0.5, 1.0, 1.5 and 15 respectively, observe and plot the different step responses. Calculate
(theoretically) the steady error for the two cases of K=1.5 and K=15, check them against your figure and
compare them to see what conclusion you can draw.
This system is not asymptotically stable (can you tell why?). Therefore you could not observe a convergent
response. This means that we have a system which does not behave as we expected. Now let us use a
"feedback control" to regulate its behavior to our desired one. What is our expectation to its behavior or, more
precisely, its output? Yes, we wish its output to follow (track) our reference input, say, the step function.
Alright, let us use the following unit feedback strategy:
__ ______
+ / \ | | output
ref input -->( )----------->| G(s) |---------> (9)
r(t)\__/ e(t) | | |y(t)
------ |
- /|\ |
| |
|__________________________|
Now, perform the following
(a) Derive the closed-loop transfer function of system (9).
(b) Do simulation for step response. Calculate (theoretically) the damped natural frequency, peak time, percent
overshoot, rise time and settling time and, mark them on your resultant simulation figure.
Determining the rise time, settling time and response time (‘stepinfo’ command):
S = stepinfo(sys)computes the step-response characteristics for a dynamic system model sys. The function
returns the characteristics in a structure containing the fields:
RiseTime — Time it takes for the response to rise from 10% to 90% of the steady-state response.
SettlingTime — Time it takes for the error |y(t) - yfinal| between the response y(t) and the steady-state
response yfinal to fall to within 2% of yfinal.
SettlingMin — Minimum value of y(t) once the response has risen.
SettlingMax — Maximum value of y(t) once the response has risen.
Overshoot — Percentage overshoot, relative to yfinal.
Undershoot — Percentage undershoot.
Peak — Peak absolute value of y(t)
PeakTime — Time at which the peak value occurs.
The following figure illustrates some of these quantities on a typical second-order response.
Observations:
Various analyses for studying the responses of second order systems are performed.
EXPERIMENT NO.- 8
Lag Compensator
The Lag Compensator is an electrical network which produces a sinusoidal output having the
phase lag when a sinusoidal input is applied. The lag compensator circuit in the ‘s’ domain is
shown in the following figure.
Here, the capacitor is in series with the resistor R2 and the output is measured across this
combination.
The lead compensator is an electrical network which produces a sinusoidal output having phase
lead when a sinusoidal input is applied. The lead compensator circuit in the ‘s’ domain is shown
in the following figure.
Here, the capacitor is parallel to the resistor R1 and the output is measured across resistor R2.
From the transfer function, we can conclude that the lead compensator has pole at s=−1/β and
zero at s=−1/βτ.
Substitute, s=jω in the transfer function 𝑉 𝑜𝑖(( 𝑗𝜔 ) =
𝑉 𝑗𝜔 ) 𝛽(𝑗𝜔𝛽𝜏+1𝑗𝜔𝜏+1 )
Lag-Lead Compensator
Lag-Lead compensator is an electrical network which produces phase lag at one frequency region
and phase lead at other frequency region. It is a combination of both the lag and the lead
compensators. The lag-lead compensator circuit in the ‘s’ domain is shown in the following
figure.
This circuit looks like both the compensators are cascaded. So, the transfer function of this circuit
will be the product of transfer functions of the lead and the lag compensators.
[y1,z1,t]=step(num1,den1,t); [y2,z2,t]=step(num1c,den1c,t);
plot(t,y1,'*',t,y2,'+',t,t,'--') grid
title('Unit-Ramp Responses of Compensated and Uncompensated Systems')
xlabel('t Sec') ylabel('Outputs')
text(0.89,3.7,'Compensated System') text(2.25,1.1,'Uncompensated
System'
Unit-Ramp Responses of Compensated and Uncompensated Systems
Observations & conclusion:
1) Lead compensation -achieves the desired result through the merits of its phase–lead
contribution, whereas lag compensation accomplishes the result through the merits of its
attenuation property at high frequencies.
a. Lead compensation is commonly used for improving stability margins.
b. Lead compensation yields a higher gain crossover frequency than is possible with lag
compensation. The higher gain crossover frequency means larger band width. A large
band width means reduction in the settling time. The band width of a system with lead
compensation is always greater than that with lag compensation. Therefore, if a large
band width or fast response is desired, lead compensation should be employed. If,
however noise signals are present, then a large band width may not be desirable since
it makes the system more susceptible to noise signals because of increase in the high
frequency gain.
c. Lead compensation requires an additional increase in gain to offset the attenuation
inherent in the lead network. This means that lead compensation will require a larger
gain than that required by lag compensation. A larger gain, in most cases, implies
larger space, greater weight, and higher cost.
2. Lag compensation -reduces the system gain at higher frequencies without reducing the
system gain at lower frequencies. Since the system band width is reduced, the system has a slower
speed to respond. Because of the reduced high frequency gain, the total system gain can be
increased, and thereby low frequency gain can be increased and the steady state can be improved.
Also, any high frequency noises involved in the system can be attenuated.
3. If both fast responses and good static accuracy are desired, a lag –lead compensator may
be employed. By use of the lag–lead compensator, the low–frequency gain can be increased
(which means an improvement in steady- state accuracy), while at the same time the system band
width and stability margins can be increased. Although a large number of practical compensation
tasks can be accomplished with lead, lag –lead compensators; for complicated system simple
compensation by use of these compensators may not yield satisfactory results. Then, different
compensators having different pole-zero configurations must be employed.
Swami Keshvanand Institute of Technology, Management & Gramothan,
Ramnagaria, Jagatpura, Jaipur-302017, INDIA
Approved by AICTE, Ministry of HRD, Government of India
Recognized by UGC under Section 2(f) of the UGC Act, 1956
Tel. : +91-0141- 5160400 Fax: +91-0141-2759555
E-mail: [email protected] Web: www.skit.ac.in
EXPERIMENT NO.- 9
Theory:
In practical terms, it automatically applies an accurate and responsive correction to a control function. An
everyday example is the cruise control on a car, where ascending a hill would lower speed if only constant
engine power were applied. The controller's PID algorithm restores the measured speed to the desired
speed with minimal delay and overshoot by increasing the power output of the engine in a controlled
manner.
The first theoretical analysis and practical application was in the field of automatic steering systems for
ships, developed from the early 1920s onwards. It was then used for automatic process control in the
manufacturing industry, where it was widely implemented in at first pneumatic, and then electronic
controllers. Today the PID concept is used universally in applications requiring accurate and optimized
automatic control.
Figure 9.1. Tuning by Ziegler Nichols Method
Swami Keshvanand Institute of Technology, Management & Gramothan,
Ramnagaria, Jagatpura, Jaipur-302017, INDIA
Approved by AICTE, Ministry of HRD, Government of India
Recognized by UGC under Section 2(f) of the UGC Act, 1956
Tel. : +91-0141- 5160400 Fax: +91-0141-2759555
E-mail: [email protected] Web: www.skit.ac.in
The distinguishing feature of the PID controller is the ability to use the three control terms of proportional, integral
and derivative influence on the controller output to apply accurate and optimal control. The block diagram shows
the principles of how these terms are generated and applied. It shows a PID controller, which continuously
calculates an error as the difference between a desired and a measured process variable and applies a correction
based on proportional, integral, and derivative terms. The controller attempts to minimize the error over time by
adjustment of a control variableu(t), such as the opening of a control valve, to a new value determined by a
weighted sum of the control terms.
Term P is proportional to the current value of the SP − PV error e(t)}e(t). For example, if the error is large and
positive, the control output will be proportionately large and positive, taking into account the gain factor "K". Using
proportional control alone will result in an error between the setpoint and the actual process value because it
requires an error to generate the proportional response. If there is no error, there is no corrective response.
Term I accounts for past values of the SP − PV error and integrates them over time to produce the I term. For
example, if there is a residual SP − PV error after the application of proportional control, the integral term seeks to
eliminate the residual error by adding a control effect due to the historic cumulative value of the error. When the
error is eliminated, the integral term will cease to grow. This will result in the proportional effect diminishing as the
error decreases, but this is compensated for by the growing integral effect.
Swami Keshvanand Institute of Technology, Management & Gramothan,
Ramnagaria, Jagatpura, Jaipur-302017, INDIA
Approved by AICTE, Ministry of HRD, Government of India
Recognized by UGC under Section 2(f) of the UGC Act, 1956
Tel. : +91-0141- 5160400 Fax: +91-0141-2759555
E-mail: [email protected] Web: www.skit.ac.in
Term D is a best estimate of the future trend of the SP − PV error, based on its current rate of change. It is
sometimes called "anticipatory control", as it is effectively seeking to reduce the effect of the SP − PV
error by exerting a control influence generated by the rate of error change. The more rapid the change, the
greater the controlling or damping effect.
Tuning – The balance of these effects is achieved by loop tuning to produce the optimal control function.
The tuning constants are shown below as "K" and must be derived for each control application, as they
depend on the response characteristics of the complete loop external to the controller. These are dependent
on the behavior of the measuring sensor, the final control element (such as a control valve), any control
signal delays and the process itself. Approximate values of constants can usually be initially entered
knowing the type of application, but they are normally refined, or tuned, by "bumping" the process in
practice by introducing a setpoint change and observing the system response.Control action –
The mathematical model and practical loop use a direct control action for all the terms, which means an
increasing positive error results in an increasing positive control output correction. The system is called
reverse acting if it is necessary to apply negative corrective action. For instance, if the valve in the flow
loop was 100–0% valve opening for 0–100% control output – meaning that the controller action has to be
reversed. Some process control schemes and final control elements require this reverse action. An
example would be a valve for cooling water, where the fail-safe mode, in the case of loss of signal, would
be 100% opening of the valve; therefore 0% controller output needs to cause 100% valve opening.
Swami Keshvanand Institute of Technology, Management & Gramothan,
Ramnagaria, Jagatpura, Jaipur-302017, INDIA
Approved by AICTE, Ministry of HRD, Government of India
Recognized by UGC under Section 2(f) of the UGC Act, 1956
Tel. : +91-0141- 5160400 Fax: +91-0141-2759555
E-mail: [email protected] Web: www.skit.ac.in
Computer Program
Observations: We observe that the settling time and rise time are optimal when we employ PID controller on a
given open loop system. In future, different control algorithms can be employed and tested on given system.
Swami Keshvanand Institute of Technology, Management & Gramothan,
Ramnagaria, Jagatpura, Jaipur-302017, INDIA
Approved by AICTE, Ministry of HRD, Government of India
Recognized by UGC under Section 2(f) of the UGC Act, 1956
Tel. : +91-0141- 5160400 Fax: +91-0141-2759555
E-mail: [email protected] Web: www.skit.ac.in
EXPERIMENT NO.- 10
Theory: Temperature control is a process in which change of temperature of a space (and objects
collectively there within), or of a substance, is measured or otherwise detected, and the passage of heat
energy into or out of the space or substance is adjusted to achieve a desired temperature.
Air-conditioners, space-heaters, refrigerators, water-heaters, etc. are examples of devices that perform
temperature control. These are often broadly classified as Thermostatically Controlled Loads (TCLs).
An object's or space's temperature increases when heat energy moves into it, increasing the average kinetic
energy of its atoms, e.g., of things and air in a room. Heat energy leaving an object or space lowers its
temperature. Heat flows from one place to another (always from a higher temperature to a lower one) by
one or more of three processes: conduction, convection and radiation. In conduction, energy is passed
from one atom to another by direct contact. In convection, heat energy moves by conduction into some
movable fluid (such as air or water) and the fluid moves from one place to another, carrying the heat with
it.
At some point the heat energy in the fluid is usually transferred to some other object by means conduction
again. The movement of the fluid can be driven by negative-buoyancy, as when cooler (and therefore
denser) air drops and thus upwardly displaces warmer (less-dense) air (natural convection), or by fans or
pumps (forced convection). In radiation, the heated atoms make electromagnetic emissions absorbed by
remote other atoms, whether nearby or at astronomical distance. For example, the Sun radiates heat as
both invisible and visible electromagnetic energy. What we know as "light" is but a narrow region of the
electromagnetic spectrum. If, in a place or thing, more energy is received than is lost, its temperature
increases. If the amount of energy coming in and going out are exactly the same, the temperature stays
constant—there is thermal balance, or thermal equilibrium.
Swami Keshvanand Institute of Technology, Management & Gramothan,
Ramnagaria, Jagatpura, Jaipur-302017, INDIA
Approved by AICTE, Ministry of HRD, Government of India
Recognized by UGC under Section 2(f) of the UGC Act, 1956
Tel. : +91-0141- 5160400 Fax: +91-0141-2759555
E-mail: [email protected] Web: www.skit.ac.in
When controlling the temperature of an industrial furnace, it is usually better to control the opening of the fuel valve
in proportion to the current needs of the furnace. This helps avoid thermal shocks and applies heat more effectively.
At low gains, only a small corrective action is applied when errors are detected. The system may be safe and stable,
but may be sluggish in response to changing conditions. Errors will remain uncorrected for relatively long periods
of time and the system is overdamped. If the proportional gain is increased, such systems become more responsive
and errors are dealt with more quickly. There is an optimal value for the gain setting when the overall system is said
to be critically damped. Increases in loop gain beyond this point lead to oscillations in the PV and such a system is
underdamped.
.
Swami Keshvanand Institute of Technology, Management & Gramothan,
Ramnagaria, Jagatpura, Jaipur-302017, INDIA
Approved by AICTE, Ministry of HRD, Government of India
Recognized by UGC under Section 2(f) of the UGC Act, 1956
Tel. : +91-0141- 5160400 Fax: +91-0141-2759555
E-mail: [email protected] Web: www.skit.ac.in
Adjusting gain to achieve critically damped behavior is known as tuning the control system. In the
underdamped case, the furnace heats quickly. Once the setpoint is reached, stored heat within the heater
sub-system and in the walls of the furnace will keep the measured temperature rising beyond what is
required. After rising above the setpoint, the temperature falls back and eventually heat is applied again.
Any delay in reheating the heater sub-system allows the furnace temperature to fall further below setpoint
and the cycle repeats. The temperature oscillations that an underdamped furnace control system produces
are undesirable. In a critically damped system, as the temperature approaches the setpoint, the heat input
begins to be reduced, the rate of heating of the furnace has time to slow and the system avoids overshoot.
Overshoot is also avoided in an overdamped system but an overdamped system is unnecessarily slow to
initially reach setpoint respond to external changes to the system, e.g. opening the furnace door.
Simulation Problem
According to the given conditions a suitable range of time and K and a are selected and increment
operators are decided. By employing different for loops all possible solutions are generated that can
satisfies the given design criterion. Following section presents the computer program and output
calculated from the program.
Swami Keshvanand Institute of Technology, Management & Gramothan,
Ramnagaria, Jagatpura, Jaipur-302017, INDIA
Approved by AICTE, Ministry of HRD, Government of India
Recognized by UGC under Section 2(f) of the UGC Act, 1956
Tel. : +91-0141- 5160400 Fax: +91-0141-2759555
E-mail: [email protected] Web: www.skit.ac.in
Computer Program:
Computer Program
t = 0:0.01:8;
k = 0;
size(t); %801
for K = 3:0.2:5; % assume step size 0.2
for a = 0.1:0.1:3; % assume step size 0.1
num = [4*K 8*K*a 4*K*a^2];
den = [1 6 8+4*K 4+8*K*a 4*K*a^2];
y = step(num,den,t);
s = 801;
while y(s)>0.98 & y(s)<1.02; % Plotting step response
s = s-1;
end; % End of While Loop
ts = (s-1)*0.01; % ts = settling time;
m = max(y); % Peak overshoot
if m<1.15 & m>1.10; % given Condition
if ts<3.00; % given design specification
k = k+1;
solution(k,:) = [K a m ts];
end % End of if Loop
end % End of if loop
end % End of for Loop
end % End of for Loop
sortsolution = sortrows(solution,3); % sort solution as per maximum overshoot
K = sortsolution(1,1), a = sortsolution(1,2); % store the solution in K and a
corresponing to minimum overshoot
num = [4*K 8*K*a 4*K*a^2];
den = [1 6 8+4*K 4+8*K*a 4*K*a^2];
y = step(num,den,t);
plot(t,y) % See Figure 8–24.
grid
title('Unit-Step Response')
xlabel('t sec')
Swami Keshvanand Institute of Technology, Management & Gramothan,
Ramnagaria, Jagatpura, Jaipur-302017, INDIA
Approved by AICTE, Ministry of HRD, Government of India
Recognized by UGC under Section 2(f) of the UGC Act, 1956
Tel. : +91-0141- 5160400 Fax: +91-0141-2759555
E-mail: [email protected] Web: www.skit.ac.in
As per given criterion the closed loop transfer function of the system can be given as:
Conclusion: The program is written for iterative tuning of PID controller as per given specifications, A
solution vector is obtained and an optimal design is selected by using sort command. Expression (a) shows
the designed compensated system as per design criterion.